@types/amqplib
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -1,2 +0,2 @@ | ||
// Type definitions for amqplib 0.5.x | ||
// Type definitions for amqplib 0.5 | ||
// Project: https://github.com/squaremo/amqp.node | ||
@@ -8,220 +8,59 @@ // Definitions by: Michael Nahkies <https://github.com/mnahkies>, Ab Reitsma <https://github.com/abreits>, Nicolás Fantone <https://github.com/nfantone> | ||
declare module 'amqplib' { | ||
import * as Promise from 'bluebird'; | ||
import * as events from 'events'; | ||
import shared = require('amqplib/properties'); | ||
import * as Promise from 'bluebird'; | ||
import * as events from 'events'; | ||
import { Replies, Options, Message } from './properties'; | ||
export * from './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 Connection extends events.EventEmitter { | ||
close(): Promise<void>; | ||
createChannel(): Promise<Channel>; | ||
createConfirmChannel(): Promise<ConfirmChannel>; | ||
} | ||
export interface Channel extends events.EventEmitter { | ||
close(): Promise<void>; | ||
export interface Channel extends events.EventEmitter { | ||
close(): Promise<void>; | ||
assertQueue(queue: string, options?: Options.AssertQueue): Promise<Replies.AssertQueue>; | ||
checkQueue(queue: string): Promise<Replies.AssertQueue>; | ||
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>; | ||
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>; | ||
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>; | ||
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>; | ||
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>; | ||
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; | ||
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>; | ||
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>; | ||
cancel(consumerTag: string): Promise<Replies.Empty>; | ||
get(queue: string, options?: Options.Get): Promise<Message | boolean>; | ||
ack(message: Message, allUpTo?: boolean): void; | ||
ackAll(): void; | ||
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; | ||
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>; | ||
prefetch(count: number, global?: boolean): Promise<Replies.Empty>; | ||
recover(): Promise<Replies.Empty>; | ||
} | ||
declare module 'amqplib/properties' { | ||
export namespace Replies { | ||
interface Empty { | ||
} | ||
interface AssertQueue { | ||
queue: string; | ||
messageCount: number; | ||
consumerCount: number; | ||
} | ||
interface PurgeQueue { | ||
messageCount: number; | ||
} | ||
interface DeleteQueue { | ||
messageCount: number; | ||
} | ||
interface AssertExchange { | ||
exchange: string; | ||
} | ||
interface Consume { | ||
consumerTag: string; | ||
} | ||
} | ||
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; | ||
export namespace Options { | ||
interface AssertQueue { | ||
exclusive?: boolean; | ||
durable?: boolean; | ||
autoDelete?: boolean; | ||
arguments?: any; | ||
messageTtl?: number; | ||
expires?: number; | ||
deadLetterExchange?: string; | ||
deadLetterRoutingKey?: string; | ||
maxLength?: number; | ||
maxPriority?: number; | ||
} | ||
interface DeleteQueue { | ||
ifUnused?: boolean; | ||
ifEmpty?: boolean; | ||
} | ||
interface AssertExchange { | ||
durable?: boolean; | ||
internal?: boolean; | ||
autoDelete?: boolean; | ||
alternateExchange?: string; | ||
arguments?: any; | ||
} | ||
interface DeleteExchange { | ||
ifUnused?: boolean; | ||
} | ||
interface Publish { | ||
expiration?: string | number; | ||
userId?: string; | ||
CC?: string | string[]; | ||
mandatory?: boolean; | ||
persistent?: boolean; | ||
deliveryMode?: boolean | number; | ||
BCC?: string | string[]; | ||
contentType?: string; | ||
contentEncoding?: string; | ||
headers?: any; | ||
priority?: number; | ||
correlationId?: string; | ||
replyTo?: string; | ||
messageId?: string; | ||
timestamp?: number; | ||
type?: string; | ||
appId?: string; | ||
} | ||
interface Consume { | ||
consumerTag?: string; | ||
noLocal?: boolean; | ||
noAck?: boolean; | ||
exclusive?: boolean; | ||
priority?: number; | ||
arguments?: any; | ||
} | ||
interface Get { | ||
noAck?: boolean; | ||
} | ||
} | ||
export interface Message { | ||
content: Buffer; | ||
fields: any; | ||
properties: any; | ||
} | ||
waitForConfirms(): Promise<void>; | ||
} | ||
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; | ||
export interface Connection extends events.EventEmitter { | ||
close(callback?: (err: any) => void): void; | ||
createChannel(callback: (err: any, channel: Channel) => void): void; | ||
createConfirmChannel(callback: (err: any, confirmChannel: ConfirmChannel) => void): void; | ||
} | ||
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; | ||
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; | ||
bindQueue(queue: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; | ||
unbindQueue(queue: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; | ||
assertExchange(exchange: string, type: string, options?: Options.AssertExchange, callback?: (err: any, ok: Replies.AssertExchange) => void): void; | ||
checkExchange(exchange: string, callback?: (err: any, ok: Replies.Empty) => void): void; | ||
deleteExchange(exchange: string, options?: Options.DeleteExchange, callback?: (err: any, ok: Replies.Empty) => void): void; | ||
bindExchange(destination: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; | ||
unbindExchange(destination: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; | ||
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, callback?: (err: any, ok: Replies.Consume) => void): void; | ||
cancel(consumerTag: string, callback?: (err: any, ok: Replies.Empty) => void): void; | ||
get(queue: string, options?: Options.Get, callback?: (err: any, ok: Message | boolean) => void): void; | ||
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): void; | ||
recover(callback?: (err: any, ok: Replies.Empty) => void): void; | ||
} | ||
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(callback?: (err: any) => 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; | ||
} | ||
export function connect(url: string, socketOptions?: any): Promise<Connection>; |
{ | ||
"name": "@types/amqplib", | ||
"version": "0.5.0", | ||
"description": "TypeScript definitions for amqplib 0.5.x", | ||
"version": "0.5.1", | ||
"description": "TypeScript definitions for amqplib", | ||
"license": "MIT", | ||
@@ -18,4 +18,4 @@ "author": "Michael Nahkies <https://github.com/mnahkies>, Ab Reitsma <https://github.com/abreits>, Nicolás Fantone <https://github.com/nfantone>", | ||
"peerDependencies": {}, | ||
"typings": "index.d.ts", | ||
"typesPublisherContentHash": "85915fdb1f17c69034b845d6ea5e124ffa91b76e372f6afa69b67e2fa24c2be1" | ||
"typesPublisherContentHash": "78e758ea5d6a487db8dc4ec99381fc59e0727214a97f7628cb95f53620494b55", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -5,12 +5,10 @@ # Installation | ||
# Summary | ||
This package contains type definitions for amqplib 0.5.x (https://github.com/squaremo/amqp.node). | ||
This package contains type definitions for amqplib (https://github.com/squaremo/amqp.node). | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/amqplib | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/amqplib | ||
Additional Details | ||
* Last updated: Mon, 07 Nov 2016 18:46:05 GMT | ||
* File structure: ModuleAugmentation | ||
* Library Dependencies: node | ||
* Module Dependencies: amqplib/properties, bluebird, events | ||
* Last updated: Wed, 18 Jan 2017 08:47:10 GMT | ||
* Dependencies: bluebird, events, node | ||
* Global values: none | ||
@@ -17,0 +15,0 @@ |
{ | ||
"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" | ||
], | ||
"moduleDependencies": [ | ||
"amqplib/properties", | ||
"bluebird", | ||
"events" | ||
], | ||
"libraryMajorVersion": 0, | ||
"libraryMinorVersion": 5, | ||
"libraryName": "amqplib 0.5.x", | ||
"typingsPackageName": "amqplib", | ||
"projectName": "https://github.com/squaremo/amqp.node", | ||
"name": "amqplib", | ||
"libraryName": "amqplib", | ||
"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", | ||
"sourceBranch": "types-2.0", | ||
"kind": "ModuleAugmentation", | ||
"globals": [], | ||
"declaredModules": [ | ||
"amqplib", | ||
"amqplib/properties", | ||
"amqplib/callback_api" | ||
], | ||
"files": [ | ||
"index.d.ts" | ||
], | ||
"hasPackageJson": false, | ||
"contentHash": "85915fdb1f17c69034b845d6ea5e124ffa91b76e372f6afa69b67e2fa24c2be1" | ||
"data": { | ||
"authors": "Michael Nahkies <https://github.com/mnahkies>, Ab Reitsma <https://github.com/abreits>, Nicolás Fantone <https://github.com/nfantone>", | ||
"dependencies": { | ||
"bluebird": "*", | ||
"events": "*", | ||
"node": "*" | ||
}, | ||
"pathMappings": {}, | ||
"libraryMajorVersion": 0, | ||
"libraryMinorVersion": 5, | ||
"typeScriptVersion": "2.0", | ||
"libraryName": "amqplib", | ||
"typingsPackageName": "amqplib", | ||
"projectName": "https://github.com/squaremo/amqp.node", | ||
"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", | ||
"globals": [], | ||
"declaredModules": [ | ||
"amqplib/.", | ||
"amqplib/callback_api", | ||
"amqplib/properties" | ||
], | ||
"files": [ | ||
"callback_api.d.ts", | ||
"index.d.ts", | ||
"properties.d.ts" | ||
], | ||
"hasPackageJson": false, | ||
"contentHash": "78e758ea5d6a487db8dc4ec99381fc59e0727214a97f7628cb95f53620494b55" | ||
}, | ||
"isLatest": true | ||
} |
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
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
6
11186
205
17
1