From b6ba23b5dffd930bf57a359a10afa1ae1e707825 Mon Sep 17 00:00:00 2001 From: Diwakar Date: Wed, 3 Jan 2018 05:19:31 +0530 Subject: [PATCH] amqplib: add missing authentication method definitions PLAIN, EXTERNAL (#22509) --- types/amqplib/callback_api.d.ts | 13 +++++++++++++ types/amqplib/index.d.ts | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/types/amqplib/callback_api.d.ts b/types/amqplib/callback_api.d.ts index 60ff8cf622..9fca3972e4 100644 --- a/types/amqplib/callback_api.d.ts +++ b/types/amqplib/callback_api.d.ts @@ -54,6 +54,19 @@ export interface ConfirmChannel extends Channel { waitForConfirms(callback?: (err: any) => void): void; } +export const credentials: { + external(): { + mechanism: string; + response(): Buffer; + }; + plain(username: string, password: string): { + mechanism: string; + response(): Buffer; + username: string; + password: string; + }; +}; + export function connect(callback: (err: any, connection: Connection) => void): void; export function connect(url: string, callback: (err: any, connection: Connection) => void): void; export function connect(url: string, socketOptions: any, callback: (err: any, connection: Connection) => void): void; diff --git a/types/amqplib/index.d.ts b/types/amqplib/index.d.ts index 2d5cb3ba99..25b0ef04e9 100644 --- a/types/amqplib/index.d.ts +++ b/types/amqplib/index.d.ts @@ -63,4 +63,17 @@ export interface ConfirmChannel extends Channel { waitForConfirms(): Promise; } +export const credentials: { + external(): { + mechanism: string; + response(): Buffer; + }; + plain(username: string, password: string): { + mechanism: string; + response(): Buffer; + username: string; + password: string; + }; +}; + export function connect(url: string | Options.Connect, socketOptions?: any): Promise;