amqp-as-promised
Advanced tools
Comparing version 5.2.1 to 5.2.2
@@ -21,11 +21,11 @@ declare function amqp(conf: amqp.AmqpConfig): Promise<amqp.AmqpClient> | ||
on(event: 'error', callback: (err: Error) => void): void; | ||
exchange(name: string, opts?: ExchangeOpts): Promise<Exchange>; | ||
queue<T>(name: string, opts?: QueueOpts): Promise<Queue<T>>; | ||
exchange(name: string | Exchange, opts?: ExchangeOpts): Promise<Exchange>; | ||
queue<T>(name: string | Queue<T>, opts?: QueueOpts): Promise<Queue<T>>; | ||
queue<T>(opts: QueueOpts): Promise<Queue<T>>; | ||
queue<T>(): Promise<Queue<T>>; | ||
rpc<T>(exchange: string, routingKey: string, msg: object | Buffer, headers?: MessageHeaders, opts?: RpcOpts): Promise<T>; | ||
serve<T>(exchange: string, routingKey: string, opts: SubscribeOpts, callback: ServeCallback<T>): void; | ||
serve<T>(exchange: string, routingKey: string, callback: ServeCallback<T>): void; | ||
bind<T>(exchange: string, topic: string, callback: SubscribeCallback<T>): Promise<void>; | ||
bind<T>(exchange: string, queue: string, topic: string, callback: SubscribeCallback<T>): Promise<void>; | ||
rpc<T>(exchange: string | Exchange, routingKey: string, msg: object | Buffer, headers?: MessageHeaders, opts?: RpcOpts): Promise<T>; | ||
serve<T>(exchange: string | Exchange, routingKey: string, opts: SubscribeOpts, callback: ServeCallback<T>): void; | ||
serve<T>(exchange: string | Exchange, routingKey: string, callback: ServeCallback<T>): void; | ||
bind<T>(exchange: string | Exchange, topic: string, callback: SubscribeCallback<T>): Promise<void>; | ||
bind<T>(exchange: string | Exchange, queue: string | Queue<T>, topic: string, callback: SubscribeCallback<T>): Promise<void>; | ||
shutdown(): Promise<void>; | ||
@@ -35,3 +35,3 @@ } | ||
export interface ExchangeOpts { | ||
type: 'topic' | 'fanout' | 'direct' | 'headers' | ||
type?: 'topic' | 'fanout' | 'direct' | 'headers' | ||
passive?: boolean | ||
@@ -96,3 +96,3 @@ durable?: boolean | ||
export interface Queue<T> { | ||
bind(exchange: string, topic: string): Promise<Queue<T>>; | ||
bind(exchange: string | Exchange, topic: string): Promise<Queue<T>>; | ||
unbind(): Promise<Queue<T>>; | ||
@@ -99,0 +99,0 @@ subscribe(opts: SubscribeOpts, callback: SubscribeCallback<T>): Promise<Queue<T>>; |
Changelog | ||
========= | ||
# 5.2.0 - 2020-05-19 | ||
## 5.2.2 - 2020-07-07 | ||
* Bug fix: the `topic` argument for `exchange()` is optional. | ||
* Any method that accept an exhange or queue name string also | ||
accepts an exchange or queue object, respectively. | ||
## 5.2.1 - 2020-05-20 | ||
* Added missing TypeScript definitions for `queue.bind()` | ||
## 5.2.0 - 2020-05-19 | ||
* Added TypeScript definitions. | ||
@@ -7,0 +17,0 @@ |
{ | ||
"name": "amqp-as-promised", | ||
"description": "A promise-based AMQP API build on node-amqp", | ||
"version": "5.2.1", | ||
"version": "5.2.2", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
52229