@types/amqplib
Advanced tools
Comparing version 0.3.29 to 0.5.0
@@ -1,11 +0,74 @@ | ||
// Type definitions for amqplib 0.3.x | ||
// Type definitions for amqplib 0.5.x | ||
// Project: https://github.com/squaremo/amqp.node | ||
// Definitions by: Michael Nahkies <https://github.com/mnahkies>, Ab Reitsma <https://github.com/abreits> | ||
// Definitions by: Michael Nahkies <https://github.com/mnahkies>, Ab Reitsma <https://github.com/abreits>, Nicolás Fantone <https://github.com/nfantone> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
/// <reference types="when" /> | ||
/// <reference types="node" /> | ||
declare module "amqplib/properties" { | ||
namespace Replies { | ||
declare module 'amqplib' { | ||
import * as Promise from 'bluebird'; | ||
import * as events from 'events'; | ||
import shared = require('amqplib/properties'); | ||
export import Replies = shared.Replies; | ||
export import Options = shared.Options; | ||
export import Message = shared.Message; | ||
export interface Connection extends events.EventEmitter { | ||
close(): Promise<void>; | ||
createChannel(): Promise<Channel>; | ||
createConfirmChannel(): Promise<ConfirmChannel>; | ||
} | ||
export interface Channel extends events.EventEmitter { | ||
close(): Promise<void>; | ||
assertQueue(queue: string, options?: Options.AssertQueue): Promise<Replies.AssertQueue>; | ||
checkQueue(queue: string): Promise<Replies.AssertQueue>; | ||
deleteQueue(queue: string, options?: Options.DeleteQueue): Promise<Replies.DeleteQueue>; | ||
purgeQueue(queue: string): Promise<Replies.PurgeQueue>; | ||
bindQueue(queue: string, source: string, pattern: string, args?: any): Promise<Replies.Empty>; | ||
unbindQueue(queue: string, source: string, pattern: string, args?: any): Promise<Replies.Empty>; | ||
assertExchange(exchange: string, type: string, options?: Options.AssertExchange): Promise<Replies.AssertExchange>; | ||
checkExchange(exchange: string): Promise<Replies.Empty>; | ||
deleteExchange(exchange: string, options?: Options.DeleteExchange): Promise<Replies.Empty>; | ||
bindExchange(destination: string, source: string, pattern: string, args?: any): Promise<Replies.Empty>; | ||
unbindExchange(destination: string, source: string, pattern: string, args?: any): Promise<Replies.Empty>; | ||
publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish): boolean; | ||
sendToQueue(queue: string, content: Buffer, options?: Options.Publish): boolean; | ||
consume(queue: string, onMessage: (msg: Message) => any, options?: Options.Consume): Promise<Replies.Consume>; | ||
cancel(consumerTag: string): Promise<Replies.Empty>; | ||
get(queue: string, options?: Options.Get): Promise<Message | boolean>; | ||
ack(message: Message, allUpTo?: boolean): void; | ||
ackAll(): void; | ||
nack(message: Message, allUpTo?: boolean, requeue?: boolean): void; | ||
nackAll(requeue?: boolean): void; | ||
reject(message: Message, requeue?: boolean): void; | ||
prefetch(count: number, global?: boolean): Promise<Replies.Empty>; | ||
recover(): Promise<Replies.Empty>; | ||
} | ||
export interface ConfirmChannel extends Channel { | ||
publish(exchange:string, routingKey:string, content:Buffer, options?:Options.Publish, callback?:(err:any, ok:Replies.Empty) => void):boolean; | ||
sendToQueue(queue:string, content:Buffer, options?:Options.Publish, callback?:(err:any, ok:Replies.Empty) => void):boolean; | ||
waitForConfirms(): Promise<void>; | ||
} | ||
export function connect(url: string, socketOptions?: any): Promise<Connection>; | ||
} | ||
declare module 'amqplib/properties' { | ||
export namespace Replies { | ||
interface Empty { | ||
@@ -32,3 +95,3 @@ } | ||
namespace Options { | ||
export namespace Options { | ||
interface AssertQueue { | ||
@@ -44,2 +107,3 @@ exclusive?: boolean; | ||
maxLength?: number; | ||
maxPriority?: number; | ||
} | ||
@@ -61,3 +125,3 @@ interface DeleteQueue { | ||
interface Publish { | ||
expiration?: string; | ||
expiration?: string | number; | ||
userId?: string; | ||
@@ -95,3 +159,3 @@ CC?: string | string[]; | ||
interface Message { | ||
export interface Message { | ||
content: Buffer; | ||
@@ -103,7 +167,6 @@ fields: any; | ||
declare module "amqplib" { | ||
declare module 'amqplib/callback_api' { | ||
import events = require('events'); | ||
import shared = require('amqplib/properties') | ||
import events = require("events"); | ||
import when = require("when"); | ||
import shared = require("amqplib/properties") | ||
export import Replies = shared.Replies; | ||
@@ -113,59 +176,3 @@ export import Options = shared.Options; | ||
interface Connection extends events.EventEmitter { | ||
close(): when.Promise<void>; | ||
createChannel(): when.Promise<Channel>; | ||
createConfirmChannel(): when.Promise<Channel>; | ||
} | ||
interface Channel extends events.EventEmitter { | ||
close(): when.Promise<void>; | ||
assertQueue(queue: string, options?: Options.AssertQueue): when.Promise<Replies.AssertQueue>; | ||
checkQueue(queue: string): when.Promise<Replies.AssertQueue>; | ||
deleteQueue(queue: string, options?: Options.DeleteQueue): when.Promise<Replies.DeleteQueue>; | ||
purgeQueue(queue: string): when.Promise<Replies.PurgeQueue>; | ||
bindQueue(queue: string, source: string, pattern: string, args?: any): when.Promise<Replies.Empty>; | ||
unbindQueue(queue: string, source: string, pattern: string, args?: any): when.Promise<Replies.Empty>; | ||
assertExchange(exchange: string, type: string, options?: Options.AssertExchange): when.Promise<Replies.AssertExchange>; | ||
checkExchange(exchange: string): when.Promise<Replies.Empty>; | ||
deleteExchange(exchange: string, options?: Options.DeleteExchange): when.Promise<Replies.Empty>; | ||
bindExchange(destination: string, source: string, pattern: string, args?: any): when.Promise<Replies.Empty>; | ||
unbindExchange(destination: string, source: string, pattern: string, args?: any): when.Promise<Replies.Empty>; | ||
publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish): boolean; | ||
sendToQueue(queue: string, content: Buffer, options?: Options.Publish): boolean; | ||
consume(queue: string, onMessage: (msg: Message) => any, options?: Options.Consume): when.Promise<Replies.Consume>; | ||
cancel(consumerTag: string): when.Promise<Replies.Empty>; | ||
get(queue: string, options?: Options.Get): when.Promise<Message | boolean>; | ||
ack(message: Message, allUpTo?: boolean): void; | ||
ackAll(): void; | ||
nack(message: Message, allUpTo?: boolean, requeue?: boolean): void; | ||
nackAll(requeue?: boolean): void; | ||
reject(message: Message, requeue?: boolean): void; | ||
prefetch(count: number, global?: boolean): when.Promise<Replies.Empty>; | ||
recover(): when.Promise<Replies.Empty>; | ||
} | ||
function connect(url: string, socketOptions?: any): when.Promise<Connection>; | ||
} | ||
declare module "amqplib/callback_api" { | ||
import events = require("events"); | ||
import shared = require("amqplib/properties") | ||
export import Replies = shared.Replies; | ||
export import Options = shared.Options; | ||
export import Message = shared.Message; | ||
interface Connection extends events.EventEmitter { | ||
export interface Connection extends events.EventEmitter { | ||
close(callback?: (err: any) => void): void; | ||
@@ -176,10 +183,10 @@ createChannel(callback: (err: any, channel: Channel) => void): void; | ||
interface Channel extends events.EventEmitter { | ||
export interface Channel extends events.EventEmitter { | ||
close(callback: (err: any) => void): void; | ||
assertQueue(queue?: string, options?: Options.AssertQueue, callback?: (err:any, ok: Replies.AssertQueue) => void): void; | ||
assertQueue(queue?: string, options?: Options.AssertQueue, callback?: (err: any, ok: Replies.AssertQueue) => void): void; | ||
checkQueue(queue: string, callback?: (err: any, ok: Replies.AssertQueue) => void): void; | ||
deleteQueue(queue: string, options?: Options.DeleteQueue, callback?: (err:any, ok: Replies.DeleteQueue) => void): void; | ||
purgeQueue(queue: string, callback?: (err:any, ok: Replies.PurgeQueue) => void): void; | ||
deleteQueue(queue: string, options?: Options.DeleteQueue, callback?: (err: any, ok: Replies.DeleteQueue) => void): void; | ||
purgeQueue(queue: string, callback?: (err: any, ok: Replies.PurgeQueue) => void): void; | ||
@@ -216,3 +223,3 @@ bindQueue(queue: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; | ||
interface ConfirmChannel extends Channel { | ||
export interface ConfirmChannel extends Channel { | ||
publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean; | ||
@@ -224,5 +231,5 @@ sendToQueue(queue: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean; | ||
function connect(callback: (err: any, connection: Connection) => void): void; | ||
function connect(url: string, callback: (err: any, connection: Connection) => void): void; | ||
function connect(url: string, socketOptions: any, callback: (err: any, connection: Connection) => void): void; | ||
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; | ||
} |
{ | ||
"name": "@types/amqplib", | ||
"version": "0.3.29", | ||
"description": "TypeScript definitions for amqplib 0.3.x", | ||
"version": "0.5.0", | ||
"description": "TypeScript definitions for amqplib 0.5.x", | ||
"license": "MIT", | ||
"author": "Michael Nahkies <https://github.com/mnahkies>, Ab Reitsma <https://github.com/abreits>", | ||
"author": "Michael Nahkies <https://github.com/mnahkies>, Ab Reitsma <https://github.com/abreits>, Nicolás Fantone <https://github.com/nfantone>", | ||
"main": "", | ||
@@ -14,7 +14,8 @@ "repository": { | ||
"dependencies": { | ||
"@types/node": "*", | ||
"@types/when": "*" | ||
"@types/bluebird": "*", | ||
"@types/node": "*" | ||
}, | ||
"peerDependencies": {}, | ||
"typings": "index.d.ts", | ||
"typesPublisherContentHash": "d59d03e6de91a07cdab4814d09be7c73c491bd3e6feea3eeb7fdb2c4ef11ee5c" | ||
"typesPublisherContentHash": "85915fdb1f17c69034b845d6ea5e124ffa91b76e372f6afa69b67e2fa24c2be1" | ||
} |
@@ -5,3 +5,3 @@ # Installation | ||
# Summary | ||
This package contains type definitions for amqplib 0.3.x (https://github.com/squaremo/amqp.node). | ||
This package contains type definitions for amqplib 0.5.x (https://github.com/squaremo/amqp.node). | ||
@@ -12,9 +12,9 @@ # Details | ||
Additional Details | ||
* Last updated: Mon, 19 Sep 2016 16:15:22 GMT | ||
* File structure: MultipleModules | ||
* Library Dependencies: node, when | ||
* Module Dependencies: none | ||
* Last updated: Mon, 07 Nov 2016 18:46:05 GMT | ||
* File structure: ModuleAugmentation | ||
* Library Dependencies: node | ||
* Module Dependencies: amqplib/properties, bluebird, events | ||
* Global values: none | ||
# Credits | ||
These definitions were written by Michael Nahkies <https://github.com/mnahkies>, Ab Reitsma <https://github.com/abreits>. | ||
These definitions were written by Michael Nahkies <https://github.com/mnahkies>, Ab Reitsma <https://github.com/abreits>, Nicolás Fantone <https://github.com/nfantone>. |
{ | ||
"authors": "Michael Nahkies <https://github.com/mnahkies>, Ab Reitsma <https://github.com/abreits>", | ||
"authors": "Michael Nahkies <https://github.com/mnahkies>, Ab Reitsma <https://github.com/abreits>, Nicolás Fantone <https://github.com/nfantone>", | ||
"definitionFilename": "index.d.ts", | ||
"libraryDependencies": [ | ||
"node", | ||
"when" | ||
"node" | ||
], | ||
"moduleDependencies": [], | ||
"libraryMajorVersion": "0", | ||
"libraryMinorVersion": "3", | ||
"libraryName": "amqplib 0.3.x", | ||
"moduleDependencies": [ | ||
"amqplib/properties", | ||
"bluebird", | ||
"events" | ||
], | ||
"libraryMajorVersion": 0, | ||
"libraryMinorVersion": 5, | ||
"libraryName": "amqplib 0.5.x", | ||
"typingsPackageName": "amqplib", | ||
@@ -16,7 +19,7 @@ "projectName": "https://github.com/squaremo/amqp.node", | ||
"sourceBranch": "types-2.0", | ||
"kind": "MultipleModules", | ||
"kind": "ModuleAugmentation", | ||
"globals": [], | ||
"declaredModules": [ | ||
"amqplib", | ||
"amqplib/properties", | ||
"amqplib", | ||
"amqplib/callback_api" | ||
@@ -28,3 +31,3 @@ ], | ||
"hasPackageJson": false, | ||
"contentHash": "d59d03e6de91a07cdab4814d09be7c73c491bd3e6feea3eeb7fdb2c4ef11ee5c" | ||
"contentHash": "85915fdb1f17c69034b845d6ea5e124ffa91b76e372f6afa69b67e2fa24c2be1" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12021
212
0
+ Added@types/bluebird@*
+ Added@types/bluebird@3.5.42(transitive)
- Removed@types/when@*
- Removed@types/when@2.4.41(transitive)