UNPKG

1.61 kBTypeScriptView Raw
1import { Header } from "../message/SupportingTypes";
2export interface WebhookRequestTriggers {
3 Open?: OpenWebhookTrigger;
4 Click?: WebhookTrigger;
5 Delivery?: WebhookTrigger;
6 Bounce?: BounceWebhookTrigger;
7 SpamComplaint?: SpamWebhookTrigger;
8 SubscriptionChange?: WebhookTrigger;
9}
10export declare class UpdateWebhookRequest {
11 Url?: string;
12 HttpAuth?: HttpAuth;
13 HttpHeaders?: Header[];
14 Triggers?: WebhookRequestTriggers;
15 constructor(url?: string, triggers?: WebhookRequestTriggers, httpAuth?: HttpAuth, httpHeaders?: Header[]);
16}
17export declare class CreateWebhookRequest extends UpdateWebhookRequest {
18 MessageStream?: string;
19 constructor(url?: string, triggers?: WebhookRequestTriggers, httpAuth?: HttpAuth, httpHeaders?: Header[], messageStream?: string);
20}
21export interface WebhookTrigger {
22 Enabled: boolean;
23}
24export interface OpenWebhookTrigger extends WebhookTrigger {
25 PostFirstOpenOnly?: boolean;
26}
27export interface BounceWebhookTrigger extends WebhookTrigger {
28 IncludeContent?: boolean;
29}
30export interface SpamWebhookTrigger extends WebhookTrigger {
31 IncludeContent?: boolean;
32}
33export interface HttpAuth {
34 Username: string;
35 Password: string;
36}
37export interface Webhook {
38 ID: number;
39 Url: string;
40 HttpAuth?: HttpAuth;
41 HttpHeaders?: Header[];
42 MessageStream: string;
43 Triggers: {
44 Open: OpenWebhookTrigger;
45 Click: WebhookTrigger;
46 Delivery: WebhookTrigger;
47 Bounce: BounceWebhookTrigger;
48 SpamComplaint: SpamWebhookTrigger;
49 SubscriptionChange: WebhookTrigger;
50 };
51}