UNPKG

30.2 kBTypeScriptView Raw
1import BaseClient from "./BaseClient";
2import { Callback, ClientOptions, DefaultResponse, FilteringParameters } from "./models/index";
3import { Bounce, BounceActivationResponse, BounceCounts, BounceDump, BounceFilteringParameters, Bounces, BrowserUsageCounts, ClickCounts, ClickLocationCounts, ClickPlatformUsageCounts, CreateInboundRuleRequest, CreateMessageStreamRequest, CreateSuppressionsRequest, CreateTemplateRequest, CreateWebhookRequest, DeleteSuppressionsRequest, DeliveryStatistics, EmailClientUsageCounts, EmailPlaformUsageCounts, EmailReadTimesCounts, InboundMessageDetails, InboundMessages, InboundMessagesFilteringParameters, InboundRule, InboundRules, Message, MessageSendingResponse, MessageStream, MessageStreamArchiveResponse, MessageStreams, MessageStreamsFilteringParameters, MessageStreamUnarchiveResponse, OpenCounts, OutboundMessageClicks, OutboundMessageClicksFilteringParameters, OutboundMessageDetails, OutboundMessageDump, OutboundMessageOpens, OutboundMessageOpensFilteringParameters, OutboundMessages, OutboundMessagesFilteringParameters, OutboundStatistics, SentCounts, Server, SpamCounts, StatisticsFilteringParameters, Suppressions, SuppressionFilteringParameters, SuppressionStatuses, Template, TemplatedMessage, TemplateFilteringParameters, Templates, TemplateValidation, TemplateValidationOptions, TrackedEmailCounts, UpdateMessageStreamRequest, UpdateServerRequest, UpdateTemplateRequest, UpdateWebhookRequest, Webhook, WebhookFilteringParameters, Webhooks } from "./models/index";
4/**
5 * Server client class that can be used to interact with an individual Postmark Server.
6 */
7export default class ServerClient extends BaseClient {
8 /**
9 * Create a client.
10 *
11 * @param serverToken - The token for the server that you wish to interact with.
12 * @param configOptions - Options to customize the behavior of the this client.
13 */
14 constructor(serverToken: string, configOptions?: ClientOptions.Configuration);
15 /** Send a single email message.
16 *
17 * @param email - Email message to send.
18 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
19 * @returns A promise that will complete when the API responds (or an error occurs).
20 */
21 sendEmail(email: Message, callback?: Callback<MessageSendingResponse>): Promise<MessageSendingResponse>;
22 /**
23 * Send a batch of email messages.
24 *
25 * @param emails - An array of messages to send.
26 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
27 * @returns A promise that will complete when the API responds (or an error occurs).
28 */
29 sendEmailBatch(emails: Message[], callback?: Callback<MessageSendingResponse[]>): Promise<MessageSendingResponse[]>;
30 /**
31 * Send a message using a template.
32 *
33 * @param template - Message you wish to send.
34 * @param callback If the callback is provided, it will be passed to the resulting promise as a continuation.
35 * @returns A promise that will complete when the API responds (or an error occurs).
36 */
37 sendEmailWithTemplate(template: TemplatedMessage, callback?: Callback<MessageSendingResponse>): Promise<MessageSendingResponse>;
38 /**
39 * Send a batch of template email messages.
40 *
41 * @param templates - An array of templated messages you wish to send using this Client.
42 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
43 * @returns A promise that will complete when the API responds (or an error occurs).
44 */
45 sendEmailBatchWithTemplates(templates: TemplatedMessage[], callback?: Callback<MessageSendingResponse[]>): Promise<MessageSendingResponse[]>;
46 /**
47 * Get bounce statistic information for the associated Server.
48 *
49 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
50 * @returns A promise that will complete when the API responds (or an error occurs).
51 */
52 getDeliveryStatistics(callback?: Callback<DeliveryStatistics>): Promise<DeliveryStatistics>;
53 /**
54 * Get a batch of bounces.
55 *
56 * @param filter - Optional filtering parameters.
57 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
58 * @returns A promise that will complete when the API responds (or an error occurs).
59 */
60 getBounces(filter?: BounceFilteringParameters, callback?: Callback<Bounces>): Promise<Bounces>;
61 /**
62 * Get details for a specific Bounce.
63 *
64 * @param id - The ID of the Bounce you wish to retrieve.
65 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
66 * @returns A promise that will complete when the API responds (or an error occurs).
67 */
68 getBounce(id: number, callback?: Callback<Bounce>): Promise<Bounce>;
69 /**
70 * Get a Bounce Dump for a specific Bounce.
71 *
72 * @param id - The ID of the Bounce for which you wish to retrieve Bounce Dump.
73 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
74 * @returns A promise that will complete when the API responds (or an error occurs).
75 */
76 getBounceDump(id: number, callback?: Callback<BounceDump>): Promise<BounceDump>;
77 /**
78 * Activate email address that was deactivated due to a Bounce.
79 *
80 * @param id - The ID of the Bounce for which you wish to activate the associated email.
81 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
82 * @returns A promise that will complete when the API responds (or an error occurs).
83 */
84 activateBounce(id: number, callback?: Callback<BounceActivationResponse>): Promise<BounceActivationResponse>;
85 /**
86 * Get the list of templates associated with this server.
87 *
88 * @param filter - Optional filtering options.
89 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
90 * @returns A promise that will complete when the API responds (or an error occurs).
91 */
92 getTemplates(filter?: TemplateFilteringParameters, callback?: Callback<Templates>): Promise<Templates>;
93 /**
94 * Get the a specific template associated with this server.
95 *
96 * @param idOrAlias - ID or alias for the template you wish to retrieve.
97 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
98 * @returns A promise that will complete when the API responds (or an error occurs).
99 */
100 getTemplate(idOrAlias: (number | string), callback?: Callback<Template>): Promise<Template>;
101 /**
102 * Delete a template associated with this server.
103 *
104 * @param idOrAlias - ID or template alias you wish to delete.
105 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
106 * @returns A promise that will complete when the API responds (or an error occurs).
107 */
108 deleteTemplate(idOrAlias: (number | string), callback?: Callback<DefaultResponse>): Promise<DefaultResponse>;
109 /**
110 * Create a new template on the associated server.
111 *
112 * @param options - Configuration options to be used to create the Template.
113 * @param callback If the callback is provided, it will be passed to the resulting promise as a continuation.
114 * @returns A promise that will complete when the API responds (or an error occurs).
115 */
116 createTemplate(options: CreateTemplateRequest, callback?: Callback<Template>): Promise<Template>;
117 /**
118 * Update a template on the associated server.
119 *
120 * @param idOrAlias - Id or alias of the template you wish to update.
121 * @param options - Template options you wish to update.
122 * @param callback If the callback is provided, it will be passed to the resulting promise as a continuation.
123 * @returns A promise that will complete when the API responds (or an error occurs).
124 */
125 editTemplate(idOrAlias: (number | string), options: UpdateTemplateRequest, callback?: Callback<Template>): Promise<Template>;
126 /**
127 * Validate template markup to verify that it will be parsed. Also provides a recommended template
128 * model to be used when sending using the specified template content.
129 *
130 * @param options - The template content you wish to validate.
131 * @param callback If the callback is provided, it will be passed to the resulting promise as a continuation.
132 * @returns A promise that will complete when the API responds (or an error occurs).
133 */
134 validateTemplate(options: TemplateValidationOptions, callback?: Callback<TemplateValidation>): Promise<TemplateValidation>;
135 /**
136 * Get the information for the Server associated with this Client.
137 *
138 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
139 * @returns A promise that will complete when the API responds (or an error occurs).
140 */
141 getServer(callback?: Callback<Server>): Promise<Server>;
142 /**
143 * Modify the Server associated with this Client.
144 *
145 * @param options - The options you wish to modify.
146 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
147 * @returns A promise that will complete when the API responds (or an error occurs).
148 */
149 editServer(options: UpdateServerRequest, callback?: Callback<Server>): Promise<Server>;
150 /**
151 * Get a batch of Outbound Messages.
152 *
153 * @param filter - Optional filtering parameters.
154 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
155 * @returns A promise that will complete when the API responds (or an error occurs).
156 */
157 getOutboundMessages(filter?: OutboundMessagesFilteringParameters, callback?: Callback<OutboundMessages>): Promise<OutboundMessages>;
158 /**
159 * Get details for a specific Outbound Message.
160 *
161 * @param messageId - The ID of the OutboundMessage you wish to retrieve.
162 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
163 * @returns A promise that will complete when the API responds (or an error occurs).
164 */
165 getOutboundMessageDetails(messageId: string, callback?: Callback<OutboundMessageDetails>): Promise<OutboundMessageDetails>;
166 /**
167 * Get details for a specific Outbound Message.
168 *
169 * @param messageId - The ID of the OutboundMessage you wish to retrieve.
170 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
171 * @returns A promise that will complete when the API responds (or an error occurs).
172 */
173 getOutboundMessageDump(messageId: string, callback?: Callback<OutboundMessageDump>): Promise<OutboundMessageDump>;
174 /**
175 * Get a batch of Inbound Messages.
176 *
177 * @param filter - Optional filtering parameters.
178 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
179 * @returns A promise that will complete when the API responds (or an error occurs).
180 */
181 getInboundMessages(filter?: InboundMessagesFilteringParameters, callback?: Callback<InboundMessages>): Promise<InboundMessages>;
182 /**
183 * Get details for a specific Inbound Message.
184 *
185 * @param messageId - The ID of the Inbound Message you wish to retrieve.
186 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
187 * @returns A promise that will complete when the API responds (or an error occurs).
188 */
189 getInboundMessageDetails(messageId: string, callback?: Callback<InboundMessageDetails>): Promise<InboundMessageDetails>;
190 /**
191 * Cause an Inbound Message to bypass filtering rules defined on this Client's associated Server.
192 *
193 * @param messageId - The ID of the Inbound Message for which you wish to bypass the filtering rules.
194 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
195 * @returns A promise that will complete when the API responds (or an error occurs).
196 */
197 bypassBlockedInboundMessage(messageId: string, callback?: Callback<DefaultResponse>): Promise<DefaultResponse>;
198 /**
199 * Request that Postmark retry POSTing to the Inbound Hook for the specified message.
200 *
201 * @param messageId - The ID of the Inbound Message for which you wish to retry the inbound hook.
202 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
203 * @returns A promise that will complete when the API responds (or an error occurs).
204 */
205 retryInboundHookForMessage(messageId: string, callback?: Callback<DefaultResponse>): Promise<DefaultResponse>;
206 /**
207 * Get the Opens for Outbound Messages.
208 *
209 * @param filter - Optional filtering parameters.
210 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
211 * @returns A promise that will complete when the API responds (or an error occurs).
212 */
213 getMessageOpens(filter?: OutboundMessageOpensFilteringParameters, callback?: Callback<OutboundMessageOpens>): Promise<OutboundMessageOpens>;
214 /**
215 * Get details of Opens for specific Outbound Message.
216 *
217 * @param messageId - Message ID of the message for which you wish to retrieve Opens.
218 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
219 * @returns A promise that will complete when the API responds (or an error occurs).
220 */
221 getMessageOpensForSingleMessage(messageId: string, filter?: OutboundMessageOpensFilteringParameters, callback?: Callback<OutboundMessageOpens>): Promise<OutboundMessageOpens>;
222 /**
223 * Get the Clicks for Outbound Messages.
224 *
225 * @param filter - Optional filtering parameters.
226 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
227 * @returns A promise that will complete when the API responds (or an error occurs).
228 */
229 getMessageClicks(filter?: OutboundMessageClicksFilteringParameters, callback?: Callback<OutboundMessageClicks>): Promise<OutboundMessageClicks>;
230 /**
231 * Get Click information for a single Outbound Message.
232 *
233 * @param messageId - The MessageID for which clicks should be retrieved.
234 * @param filter - Optional filtering parameters.
235 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
236 * @returns A promise that will complete when the API responds (or an error occurs).
237 */
238 getMessageClicksForSingleMessage(messageId: string, filter?: OutboundMessageClicksFilteringParameters, callback?: Callback<OutboundMessageClicks>): Promise<OutboundMessageClicks>;
239 /**
240 * Get overview statistics on Outbound Messages sent from the Server associated with this Client.
241 *
242 * @param filter - Optional filtering parameters.
243 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
244 * @returns A promise that will complete when the API responds (or an error occurs).
245 */
246 getOutboundOverview(filter?: StatisticsFilteringParameters, callback?: Callback<OutboundStatistics>): Promise<OutboundStatistics>;
247 /**
248 * Get statistics on email sent from the Server associated with this Client.
249 *
250 * @param filter - Optional filtering parameters.
251 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
252 * @returns A promise that will complete when the API responds (or an error occurs).
253 */
254 getSentCounts(filter?: StatisticsFilteringParameters, callback?: Callback<SentCounts>): Promise<SentCounts>;
255 /**
256 * Get statistiscs on emails that bounced after being sent from the Server associated with this Client.
257 *
258 * @param filter - Optional filtering parameters.
259 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
260 * @returns A promise that will complete when the API responds (or an error occurs).
261 */
262 getBounceCounts(filter?: StatisticsFilteringParameters, callback?: Callback<BounceCounts>): Promise<BounceCounts>;
263 /**
264 * Get SPAM complaint statistics for email sent from the Server associated with this Client.
265 *
266 * @param filter - Optional filtering parameters.
267 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
268 * @returns A promise that will complete when the API responds (or an error occurs).
269 */
270 getSpamComplaintsCounts(filter?: StatisticsFilteringParameters, callback?: Callback<SpamCounts>): Promise<SpamCounts>;
271 /**
272 * Get email tracking statistics for messages sent from the Server associated with this Client.
273 *
274 * @param filter - Optional filtering parameters.
275 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
276 * @returns A promise that will complete when the API responds (or an error occurs).
277 */
278 getTrackedEmailCounts(filter?: StatisticsFilteringParameters, callback?: Callback<TrackedEmailCounts>): Promise<TrackedEmailCounts>;
279 /**
280 * Get Open statistics for messages sent from the Server associated with this Client.
281 *
282 * @param filter - Optional filtering parameters.
283 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
284 * @returns A promise that will complete when the API responds (or an error occurs).
285 */
286 getEmailOpenCounts(filter?: StatisticsFilteringParameters, callback?: Callback<OpenCounts>): Promise<OpenCounts>;
287 /**
288 * Get Email Client Platform statistics for messages sent from the Server associated with this Client.
289 *
290 * @param filter - Optional filtering parameters.
291 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
292 * @returns A promise that will complete when the API responds (or an error occurs).
293 */
294 getEmailOpenPlatformUsage(filter?: StatisticsFilteringParameters, callback?: Callback<EmailPlaformUsageCounts>): Promise<EmailPlaformUsageCounts>;
295 /**
296 * Get statistics on which Email Clients were used to open messages sent from the Server associated with this Client.
297 *
298 * @param filter - Optional filtering parameters.
299 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
300 * @returns A promise that will complete when the API responds (or an error occurs).
301 */
302 getEmailOpenClientUsage(filter?: StatisticsFilteringParameters, callback?: Callback<EmailClientUsageCounts>): Promise<EmailClientUsageCounts>;
303 /**
304 * Get Read Time statistics for messages sent from the Server associated with this Client.
305 * @param filter Optional filtering parameters.
306 * @param callback If the callback is provided, it will be passed to the resulting promise as a continuation.
307 * @returns A promise that will complete when the API responds (or an error occurs).
308 */
309 getEmailOpenReadTimes(filter?: StatisticsFilteringParameters, callback?: Callback<EmailReadTimesCounts>): Promise<EmailReadTimesCounts>;
310 /**
311 * Get total clicks statistics for tracked links for messages sent from the Server associated with this Client.
312 *
313 * @param filter - Optional filtering parameters.
314 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
315 * @returns A promise that will complete when the API responds (or an error occurs).
316 */
317 getClickCounts(filter?: StatisticsFilteringParameters, callback?: Callback<ClickCounts>): Promise<ClickCounts>;
318 /**
319 * Get browser family statistics for tracked links for messages sent from the Server associated with this Client.
320 * @param filter Optional filtering parameters.
321 * @param callback If the callback is provided, it will be passed to the resulting promise as a continuation.
322 * @returns A promise that will complete when the API responds (or an error occurs).
323 */
324 getClickBrowserUsage(filter?: StatisticsFilteringParameters, callback?: Callback<BrowserUsageCounts>): Promise<BrowserUsageCounts>;
325 /**
326 * Get browser platform statistics for tracked links for messages sent from the Server associated with this Client.
327 *
328 * @param filter - Optional filtering parameters.
329 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
330 * @returns A promise that will complete when the API responds (or an error occurs).
331 */
332 getClickPlatformUsage(filter?: StatisticsFilteringParameters, callback?: Callback<ClickPlatformUsageCounts>): Promise<ClickPlatformUsageCounts>;
333 /**
334 * Get click location (in HTML or Text body of the email) statistics for tracked links for messages sent
335 * from the Server associated with this Client.
336 *
337 * @param filter - Optional filtering parameters.
338 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
339 * @returns A promise that will complete when the API responds (or an error occurs).
340 */
341 getClickLocation(filter?: StatisticsFilteringParameters, callback?: Callback<ClickLocationCounts>): Promise<ClickLocationCounts>;
342 /**
343 * Create an Inbound Rule Trigger.
344 *
345 * @param options - Configuration options to be used when creating this Trigger.
346 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
347 * @returns A promise that will complete when the API responds (or an error occurs).
348 */
349 createInboundRuleTrigger(options: CreateInboundRuleRequest, callback?: Callback<InboundRule>): Promise<InboundRule>;
350 /**
351 * Delete an Inbound Rule Trigger.
352 *
353 * @param id - The ID of the Inbound Rule Trigger you wish to delete.
354 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
355 * @returns A promise that will complete when the API responds (or an error occurs).
356 */
357 deleteInboundRuleTrigger(id: number, callback?: Callback<DefaultResponse>): Promise<DefaultResponse>;
358 /**
359 * Get a list of Inbound Rule Triggers.
360 *
361 * @param filter - Optional filtering parameters.
362 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
363 * @returns A promise that will complete when the API responds (or an error occurs).
364 */
365 getInboundRuleTriggers(filter?: FilteringParameters, callback?: Callback<InboundRules>): Promise<InboundRules>;
366 /**
367 * Get the list of Webhooks for specific server.
368 *
369 * @param filter - Optional filtering parameters
370 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
371 * @returns A promise that will complete when the API responds (or an error occurs).
372 */
373 getWebhooks(filter?: WebhookFilteringParameters, callback?: Callback<Webhooks>): Promise<Webhooks>;
374 /**
375 * Get details for a specific Webhook.
376 *
377 * @param id - The ID of the Webhook you wish to retrieve.
378 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
379 * @returns A promise that will complete when the API responds (or an error occurs).
380 */
381 getWebhook(id: number, callback?: Callback<Webhook>): Promise<Webhook>;
382 /**
383 * Create a Webhook on the associated server.
384 *
385 * @param options - Configuration options to be used when creating Webhook trigger.
386 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
387 * @returns A promise that will complete when the API responds (or an error occurs).
388 */
389 createWebhook(options: CreateWebhookRequest, callback?: Callback<Webhook>): Promise<Webhook>;
390 /**
391 * Update Webhook on the associated server.
392 *
393 * @param id - Id of the webhook you wish to update.
394 * @param options - Webhook options you wish to update.
395 * @param callback If the callback is provided, it will be passed to the resulting promise as a continuation.
396 * @returns A promise that will complete when the API responds (or an error occurs).
397 */
398 editWebhook(id: number, options: UpdateWebhookRequest, callback?: Callback<Webhook>): Promise<Webhook>;
399 /**
400 * Delete an existing Webhook.
401 *
402 * @param id - The ID of the Webhook you wish to delete.
403 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
404 * @returns A promise that will complete when the API responds (or an error occurs).
405 */
406 deleteWebhook(id: number, callback?: Callback<DefaultResponse>): Promise<DefaultResponse>;
407 /**
408 * Get the list of message streams on a server.
409 *
410 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
411 * @returns A promise that will complete when the API responds (or an error occurs).
412 */
413 getMessageStreams(filter?: MessageStreamsFilteringParameters, callback?: Callback<MessageStreams>): Promise<MessageStreams>;
414 /**
415 * Get details for a specific message stream on a server.
416 *
417 * @param id - The ID of the message stream you wish to retrieve.
418 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
419 * @returns A promise that will complete when the API responds (or an error occurs).
420 */
421 getMessageStream(id: string, callback?: Callback<MessageStream>): Promise<MessageStream>;
422 /**
423 * Update message stream on the associated server.
424 *
425 * @param id - Id of the webhook you wish to update.
426 * @param options - Webhook options you wish to update.
427 * @param callback If the callback is provided, it will be passed to the resulting promise as a continuation.
428 * @returns A promise that will complete when the API responds (or an error occurs).
429 */
430 editMessageStream(id: string, options: UpdateMessageStreamRequest, callback?: Callback<MessageStream>): Promise<MessageStream>;
431 /**
432 * Create a message stream on the associated server.
433 *
434 * @param options - Configuration options to be used when creating message stream on the server.
435 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
436 * @returns A promise that will complete when the API responds (or an error occurs).
437 */
438 createMessageStream(options: CreateMessageStreamRequest, callback?: Callback<MessageStream>): Promise<MessageStream>;
439 /**
440 * Archive a message stream on the associated server.
441 *
442 * @param options - Configuration options to be used when creating message stream on the server.
443 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
444 * @returns A promise that will complete when the API responds (or an error occurs).
445 */
446 archiveMessageStream(id: string, callback?: Callback<MessageStreamArchiveResponse>): Promise<MessageStreamArchiveResponse>;
447 /**
448 * Unarchive a message stream on the associated server.
449 *
450 * @param options - Configuration options to be used when creating message stream on the server.
451 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
452 * @returns A promise that will complete when the API responds (or an error occurs).
453 */
454 unarchiveMessageStream(id: string, callback?: Callback<MessageStreamUnarchiveResponse>): Promise<MessageStreamUnarchiveResponse>;
455 /**
456 * Get the list of suppressions for a message stream on a server.
457 *
458 * @param messageStream - Select message stream
459 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
460 * @returns A promise that will complete when the API responds (or an error occurs).
461 */
462 getSuppressions(messageStream: string, filter?: SuppressionFilteringParameters, callback?: Callback<Suppressions>): Promise<Suppressions>;
463 /**
464 * Add email addresses to a suppressions list on a message stream on a server.
465 *
466 * @param messageStream - Select message stream
467 * @param options - Suppressions you wish to add.
468 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
469 * @returns A promise that will complete when the API responds (or an error occurs).
470 */
471 createSuppressions(messageStream: string, options: CreateSuppressionsRequest, callback?: Callback<SuppressionStatuses>): Promise<SuppressionStatuses>;
472 /**
473 * Delete email addresses from a suppressions list on a message stream on a server.
474 *
475 * @param messageStream - Select message stream
476 * @param options - Suppressions you wish to delete.
477 * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
478 * @returns A promise that will complete when the API responds (or an error occurs).
479 */
480 deleteSuppressions(messageStream: string, options: DeleteSuppressionsRequest, callback?: Callback<SuppressionStatuses>): Promise<SuppressionStatuses>;
481}