1 | export namespace Replies {
|
2 | interface Empty {
|
3 | }
|
4 | interface AssertQueue {
|
5 | queue: string;
|
6 | messageCount: number;
|
7 | consumerCount: number;
|
8 | }
|
9 | interface PurgeQueue {
|
10 | messageCount: number;
|
11 | }
|
12 | interface DeleteQueue {
|
13 | messageCount: number;
|
14 | }
|
15 | interface AssertExchange {
|
16 | exchange: string;
|
17 | }
|
18 | interface Consume {
|
19 | consumerTag: string;
|
20 | }
|
21 | }
|
22 |
|
23 | export namespace Options {
|
24 | interface Connect {
|
25 | |
26 |
|
27 |
|
28 |
|
29 |
|
30 | protocol?: string | undefined;
|
31 | |
32 |
|
33 |
|
34 |
|
35 |
|
36 | hostname?: string | undefined;
|
37 | |
38 |
|
39 |
|
40 |
|
41 |
|
42 | port?: number | undefined;
|
43 | |
44 |
|
45 |
|
46 |
|
47 |
|
48 | username?: string | undefined;
|
49 | |
50 |
|
51 |
|
52 |
|
53 |
|
54 | password?: string | undefined;
|
55 | |
56 |
|
57 |
|
58 |
|
59 |
|
60 | locale?: string | undefined;
|
61 | |
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 | frameMax?: number | undefined;
|
68 | |
69 |
|
70 |
|
71 |
|
72 |
|
73 | heartbeat?: number | undefined;
|
74 | |
75 |
|
76 |
|
77 |
|
78 |
|
79 | vhost?: string | undefined;
|
80 | }
|
81 |
|
82 | interface AssertQueue {
|
83 | exclusive?: boolean | undefined;
|
84 | durable?: boolean | undefined;
|
85 | autoDelete?: boolean | undefined;
|
86 | arguments?: any;
|
87 | messageTtl?: number | undefined;
|
88 | expires?: number | undefined;
|
89 | deadLetterExchange?: string | undefined;
|
90 | deadLetterRoutingKey?: string | undefined;
|
91 | maxLength?: number | undefined;
|
92 | maxPriority?: number | undefined;
|
93 | }
|
94 | interface DeleteQueue {
|
95 | ifUnused?: boolean | undefined;
|
96 | ifEmpty?: boolean | undefined;
|
97 | }
|
98 | interface AssertExchange {
|
99 | durable?: boolean | undefined;
|
100 | internal?: boolean | undefined;
|
101 | autoDelete?: boolean | undefined;
|
102 | alternateExchange?: string | undefined;
|
103 | arguments?: any;
|
104 | }
|
105 | interface DeleteExchange {
|
106 | ifUnused?: boolean | undefined;
|
107 | }
|
108 | interface Publish {
|
109 | expiration?: string | number | undefined;
|
110 | userId?: string | undefined;
|
111 | CC?: string | string[] | undefined;
|
112 |
|
113 | mandatory?: boolean | undefined;
|
114 | persistent?: boolean | undefined;
|
115 | deliveryMode?: boolean | number | undefined;
|
116 | BCC?: string | string[] | undefined;
|
117 |
|
118 | contentType?: string | undefined;
|
119 | contentEncoding?: string | undefined;
|
120 | headers?: any;
|
121 | priority?: number | undefined;
|
122 | correlationId?: string | undefined;
|
123 | replyTo?: string | undefined;
|
124 | messageId?: string | undefined;
|
125 | timestamp?: number | undefined;
|
126 | type?: string | undefined;
|
127 | appId?: string | undefined;
|
128 | }
|
129 | interface Consume {
|
130 | consumerTag?: string | undefined;
|
131 | noLocal?: boolean | undefined;
|
132 | noAck?: boolean | undefined;
|
133 | exclusive?: boolean | undefined;
|
134 | priority?: number | undefined;
|
135 | arguments?: any;
|
136 | }
|
137 | interface Get {
|
138 | noAck?: boolean | undefined;
|
139 | }
|
140 | }
|
141 |
|
142 | export interface Message {
|
143 | content: Buffer;
|
144 | fields: MessageFields;
|
145 | properties: MessageProperties;
|
146 | }
|
147 |
|
148 | export interface GetMessage extends Message {
|
149 | fields: GetMessageFields;
|
150 | }
|
151 |
|
152 | export interface ConsumeMessage extends Message {
|
153 | fields: ConsumeMessageFields;
|
154 | }
|
155 |
|
156 | export interface CommonMessageFields {
|
157 | deliveryTag: number;
|
158 | redelivered: boolean;
|
159 | exchange: string;
|
160 | routingKey: string;
|
161 | }
|
162 |
|
163 | export interface MessageFields extends CommonMessageFields {
|
164 | messageCount?: number | undefined;
|
165 | consumerTag?: string | undefined;
|
166 | }
|
167 |
|
168 | export interface GetMessageFields extends CommonMessageFields {
|
169 | messageCount: number;
|
170 | }
|
171 |
|
172 | export interface ConsumeMessageFields extends CommonMessageFields {
|
173 | consumerTag: string;
|
174 | }
|
175 |
|
176 | export interface MessageProperties {
|
177 | contentType: any | undefined;
|
178 | contentEncoding: any | undefined;
|
179 | headers: MessagePropertyHeaders;
|
180 | deliveryMode: any | undefined;
|
181 | priority: any | undefined;
|
182 | correlationId: any | undefined;
|
183 | replyTo: any | undefined;
|
184 | expiration: any | undefined;
|
185 | messageId: any | undefined;
|
186 | timestamp: any | undefined;
|
187 | type: any | undefined;
|
188 | userId: any | undefined;
|
189 | appId: any | undefined;
|
190 | clusterId: any | undefined;
|
191 | }
|
192 |
|
193 | export interface MessagePropertyHeaders {
|
194 | "x-first-death-exchange"?: string | undefined;
|
195 | "x-first-death-queue"?: string | undefined;
|
196 | "x-first-death-reason"?: string | undefined;
|
197 | "x-death"?: XDeath[] | undefined;
|
198 | [key: string]: any;
|
199 | }
|
200 |
|
201 | export interface XDeath {
|
202 | count: number;
|
203 | reason: "rejected" | "expired" | "maxlen";
|
204 | queue: string;
|
205 | time: {
|
206 | "!": "timestamp";
|
207 | value: number;
|
208 | };
|
209 | exchange: string;
|
210 | "original-expiration"?: any;
|
211 | "routing-keys": string[];
|
212 | }
|
213 |
|
214 | export interface ServerProperties {
|
215 | host: string;
|
216 | product: string;
|
217 | version: string;
|
218 | platform: string;
|
219 | copyright?: string | undefined;
|
220 | information: string;
|
221 | [key: string]: string | undefined;
|
222 | }
|