@samva/webhooks 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/effect.js +4 -4
- package/dist/{json-schemas.gen-CzhmDgcj.js → json-schemas.gen-BPULV030.js} +656 -1962
- package/dist/promise.js +2 -2
- package/dist/protocol-D0_izLnI.js +591 -0
- package/dist/protocol.js +1 -1
- package/dist/schemas.gen.d.ts +32 -697
- package/dist/schemas.gen.js +123 -1025
- package/dist/types.gen.d.ts +17 -472
- package/package.json +3 -4
- package/dist/protocol-BSGksDha.js +0 -714
package/dist/types.gen.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type MessageSentEvent = {
|
|
|
6
6
|
readonly timestamp: string;
|
|
7
7
|
readonly data: {
|
|
8
8
|
readonly mailboxId?: string | null;
|
|
9
|
-
readonly channel: "
|
|
9
|
+
readonly channel: "email";
|
|
10
10
|
readonly status?: string | null;
|
|
11
11
|
readonly metadata?: {
|
|
12
12
|
readonly [x: string]: JsonValue;
|
|
@@ -19,21 +19,16 @@ export type MessageSentEvent = {
|
|
|
19
19
|
readonly conversationId?: string | null;
|
|
20
20
|
readonly isBillable?: boolean | null;
|
|
21
21
|
readonly messageType?: string | null;
|
|
22
|
-
readonly templateCategory?: "marketing" | "utility" | "authentication" | null;
|
|
23
22
|
readonly subject?: string | null;
|
|
24
23
|
readonly toEmails?: ReadonlyArray<string> | null;
|
|
25
24
|
readonly providerMessageId?: string | null;
|
|
26
|
-
readonly waId?: string | null;
|
|
27
25
|
readonly hasAttachments?: boolean | null;
|
|
28
26
|
readonly isAutoReply?: boolean | null;
|
|
29
|
-
readonly segments?: number | null;
|
|
30
27
|
readonly to?: string | null;
|
|
31
28
|
readonly from?: string | null;
|
|
32
29
|
readonly body?: string | null;
|
|
33
30
|
readonly direction?: "inbound" | "outbound" | null;
|
|
34
31
|
readonly errorMessage?: string | null;
|
|
35
|
-
readonly parts?: number | null;
|
|
36
|
-
readonly carrier?: string | null;
|
|
37
32
|
readonly messageId: string;
|
|
38
33
|
readonly organizationId: string;
|
|
39
34
|
} & {
|
|
@@ -48,7 +43,7 @@ export type MessageDeliveredEvent = {
|
|
|
48
43
|
readonly timestamp: string;
|
|
49
44
|
readonly data: {
|
|
50
45
|
readonly mailboxId?: string | null;
|
|
51
|
-
readonly channel: "
|
|
46
|
+
readonly channel: "email";
|
|
52
47
|
readonly status?: string | null;
|
|
53
48
|
readonly metadata?: {
|
|
54
49
|
readonly [x: string]: JsonValue;
|
|
@@ -61,21 +56,16 @@ export type MessageDeliveredEvent = {
|
|
|
61
56
|
readonly conversationId?: string | null;
|
|
62
57
|
readonly isBillable?: boolean | null;
|
|
63
58
|
readonly messageType?: string | null;
|
|
64
|
-
readonly templateCategory?: "marketing" | "utility" | "authentication" | null;
|
|
65
59
|
readonly subject?: string | null;
|
|
66
60
|
readonly toEmails?: ReadonlyArray<string> | null;
|
|
67
61
|
readonly providerMessageId?: string | null;
|
|
68
|
-
readonly waId?: string | null;
|
|
69
62
|
readonly hasAttachments?: boolean | null;
|
|
70
63
|
readonly isAutoReply?: boolean | null;
|
|
71
|
-
readonly segments?: number | null;
|
|
72
64
|
readonly to?: string | null;
|
|
73
65
|
readonly from?: string | null;
|
|
74
66
|
readonly body?: string | null;
|
|
75
67
|
readonly direction?: "inbound" | "outbound" | null;
|
|
76
68
|
readonly errorMessage?: string | null;
|
|
77
|
-
readonly parts?: number | null;
|
|
78
|
-
readonly carrier?: string | null;
|
|
79
69
|
readonly messageId: string;
|
|
80
70
|
readonly organizationId: string;
|
|
81
71
|
} & {
|
|
@@ -85,54 +75,12 @@ export type MessageDeliveredEvent = {
|
|
|
85
75
|
readonly [x: string]: JsonValue;
|
|
86
76
|
};
|
|
87
77
|
export type MessageDeliveredPayload = MessageDeliveredEvent["data"];
|
|
88
|
-
export type MessageReadEvent = {
|
|
89
|
-
readonly type: "message.read";
|
|
90
|
-
readonly timestamp: string;
|
|
91
|
-
readonly data: {
|
|
92
|
-
readonly mailboxId?: string | null;
|
|
93
|
-
readonly channel: "sms" | "whatsapp" | "email";
|
|
94
|
-
readonly status?: string | null;
|
|
95
|
-
readonly metadata?: {
|
|
96
|
-
readonly [x: string]: JsonValue;
|
|
97
|
-
} | null;
|
|
98
|
-
readonly cost?: number | null;
|
|
99
|
-
readonly recipient?: string | null;
|
|
100
|
-
readonly occurredAt?: string | null;
|
|
101
|
-
readonly failureReason?: string | null;
|
|
102
|
-
readonly errorCode?: string | null;
|
|
103
|
-
readonly conversationId?: string | null;
|
|
104
|
-
readonly isBillable?: boolean | null;
|
|
105
|
-
readonly messageType?: string | null;
|
|
106
|
-
readonly templateCategory?: "marketing" | "utility" | "authentication" | null;
|
|
107
|
-
readonly subject?: string | null;
|
|
108
|
-
readonly toEmails?: ReadonlyArray<string> | null;
|
|
109
|
-
readonly providerMessageId?: string | null;
|
|
110
|
-
readonly waId?: string | null;
|
|
111
|
-
readonly hasAttachments?: boolean | null;
|
|
112
|
-
readonly isAutoReply?: boolean | null;
|
|
113
|
-
readonly segments?: number | null;
|
|
114
|
-
readonly to?: string | null;
|
|
115
|
-
readonly from?: string | null;
|
|
116
|
-
readonly body?: string | null;
|
|
117
|
-
readonly direction?: "inbound" | "outbound" | null;
|
|
118
|
-
readonly errorMessage?: string | null;
|
|
119
|
-
readonly parts?: number | null;
|
|
120
|
-
readonly carrier?: string | null;
|
|
121
|
-
readonly messageId: string;
|
|
122
|
-
readonly organizationId: string;
|
|
123
|
-
} & {
|
|
124
|
-
readonly [x: string]: JsonValue;
|
|
125
|
-
};
|
|
126
|
-
} & {
|
|
127
|
-
readonly [x: string]: JsonValue;
|
|
128
|
-
};
|
|
129
|
-
export type MessageReadPayload = MessageReadEvent["data"];
|
|
130
78
|
export type MessageFailedEvent = {
|
|
131
79
|
readonly type: "message.failed";
|
|
132
80
|
readonly timestamp: string;
|
|
133
81
|
readonly data: {
|
|
134
82
|
readonly mailboxId?: string | null;
|
|
135
|
-
readonly channel: "
|
|
83
|
+
readonly channel: "email";
|
|
136
84
|
readonly status?: string | null;
|
|
137
85
|
readonly metadata?: {
|
|
138
86
|
readonly [x: string]: JsonValue;
|
|
@@ -145,21 +93,16 @@ export type MessageFailedEvent = {
|
|
|
145
93
|
readonly conversationId?: string | null;
|
|
146
94
|
readonly isBillable?: boolean | null;
|
|
147
95
|
readonly messageType?: string | null;
|
|
148
|
-
readonly templateCategory?: "marketing" | "utility" | "authentication" | null;
|
|
149
96
|
readonly subject?: string | null;
|
|
150
97
|
readonly toEmails?: ReadonlyArray<string> | null;
|
|
151
98
|
readonly providerMessageId?: string | null;
|
|
152
|
-
readonly waId?: string | null;
|
|
153
99
|
readonly hasAttachments?: boolean | null;
|
|
154
100
|
readonly isAutoReply?: boolean | null;
|
|
155
|
-
readonly segments?: number | null;
|
|
156
101
|
readonly to?: string | null;
|
|
157
102
|
readonly from?: string | null;
|
|
158
103
|
readonly body?: string | null;
|
|
159
104
|
readonly direction?: "inbound" | "outbound" | null;
|
|
160
105
|
readonly errorMessage?: string | null;
|
|
161
|
-
readonly parts?: number | null;
|
|
162
|
-
readonly carrier?: string | null;
|
|
163
106
|
readonly messageId: string;
|
|
164
107
|
readonly organizationId: string;
|
|
165
108
|
} & {
|
|
@@ -174,7 +117,7 @@ export type MessageBouncedEvent = {
|
|
|
174
117
|
readonly timestamp: string;
|
|
175
118
|
readonly data: {
|
|
176
119
|
readonly mailboxId?: string | null;
|
|
177
|
-
readonly channel: "
|
|
120
|
+
readonly channel: "email";
|
|
178
121
|
readonly status?: string | null;
|
|
179
122
|
readonly metadata?: {
|
|
180
123
|
readonly [x: string]: JsonValue;
|
|
@@ -187,21 +130,16 @@ export type MessageBouncedEvent = {
|
|
|
187
130
|
readonly conversationId?: string | null;
|
|
188
131
|
readonly isBillable?: boolean | null;
|
|
189
132
|
readonly messageType?: string | null;
|
|
190
|
-
readonly templateCategory?: "marketing" | "utility" | "authentication" | null;
|
|
191
133
|
readonly subject?: string | null;
|
|
192
134
|
readonly toEmails?: ReadonlyArray<string> | null;
|
|
193
135
|
readonly providerMessageId?: string | null;
|
|
194
|
-
readonly waId?: string | null;
|
|
195
136
|
readonly hasAttachments?: boolean | null;
|
|
196
137
|
readonly isAutoReply?: boolean | null;
|
|
197
|
-
readonly segments?: number | null;
|
|
198
138
|
readonly to?: string | null;
|
|
199
139
|
readonly from?: string | null;
|
|
200
140
|
readonly body?: string | null;
|
|
201
141
|
readonly direction?: "inbound" | "outbound" | null;
|
|
202
142
|
readonly errorMessage?: string | null;
|
|
203
|
-
readonly parts?: number | null;
|
|
204
|
-
readonly carrier?: string | null;
|
|
205
143
|
readonly messageId: string;
|
|
206
144
|
readonly organizationId: string;
|
|
207
145
|
} & {
|
|
@@ -216,7 +154,7 @@ export type MessageComplainedEvent = {
|
|
|
216
154
|
readonly timestamp: string;
|
|
217
155
|
readonly data: {
|
|
218
156
|
readonly mailboxId?: string | null;
|
|
219
|
-
readonly channel: "
|
|
157
|
+
readonly channel: "email";
|
|
220
158
|
readonly status?: string | null;
|
|
221
159
|
readonly metadata?: {
|
|
222
160
|
readonly [x: string]: JsonValue;
|
|
@@ -229,21 +167,16 @@ export type MessageComplainedEvent = {
|
|
|
229
167
|
readonly conversationId?: string | null;
|
|
230
168
|
readonly isBillable?: boolean | null;
|
|
231
169
|
readonly messageType?: string | null;
|
|
232
|
-
readonly templateCategory?: "marketing" | "utility" | "authentication" | null;
|
|
233
170
|
readonly subject?: string | null;
|
|
234
171
|
readonly toEmails?: ReadonlyArray<string> | null;
|
|
235
172
|
readonly providerMessageId?: string | null;
|
|
236
|
-
readonly waId?: string | null;
|
|
237
173
|
readonly hasAttachments?: boolean | null;
|
|
238
174
|
readonly isAutoReply?: boolean | null;
|
|
239
|
-
readonly segments?: number | null;
|
|
240
175
|
readonly to?: string | null;
|
|
241
176
|
readonly from?: string | null;
|
|
242
177
|
readonly body?: string | null;
|
|
243
178
|
readonly direction?: "inbound" | "outbound" | null;
|
|
244
179
|
readonly errorMessage?: string | null;
|
|
245
|
-
readonly parts?: number | null;
|
|
246
|
-
readonly carrier?: string | null;
|
|
247
180
|
readonly messageId: string;
|
|
248
181
|
readonly organizationId: string;
|
|
249
182
|
} & {
|
|
@@ -258,7 +191,7 @@ export type MessageReceivedEvent = {
|
|
|
258
191
|
readonly timestamp: string;
|
|
259
192
|
readonly data: {
|
|
260
193
|
readonly mailboxId?: string | null;
|
|
261
|
-
readonly channel: "
|
|
194
|
+
readonly channel: "email";
|
|
262
195
|
readonly status?: string | null;
|
|
263
196
|
readonly metadata?: {
|
|
264
197
|
readonly [x: string]: JsonValue;
|
|
@@ -271,331 +204,16 @@ export type MessageReceivedEvent = {
|
|
|
271
204
|
readonly conversationId?: string | null;
|
|
272
205
|
readonly isBillable?: boolean | null;
|
|
273
206
|
readonly messageType?: string | null;
|
|
274
|
-
readonly templateCategory?: "marketing" | "utility" | "authentication" | null;
|
|
275
207
|
readonly subject?: string | null;
|
|
276
208
|
readonly toEmails?: ReadonlyArray<string> | null;
|
|
277
209
|
readonly providerMessageId?: string | null;
|
|
278
|
-
readonly waId?: string | null;
|
|
279
210
|
readonly hasAttachments?: boolean | null;
|
|
280
211
|
readonly isAutoReply?: boolean | null;
|
|
281
|
-
readonly segments?: number | null;
|
|
282
212
|
readonly to?: string | null;
|
|
283
213
|
readonly from?: string | null;
|
|
284
214
|
readonly body?: string | null;
|
|
285
215
|
readonly direction?: "inbound" | "outbound" | null;
|
|
286
216
|
readonly errorMessage?: string | null;
|
|
287
|
-
readonly parts?: number | null;
|
|
288
|
-
readonly carrier?: string | null;
|
|
289
|
-
readonly whatsapp?: ({
|
|
290
|
-
readonly text?: string | null;
|
|
291
|
-
readonly template?: ({
|
|
292
|
-
readonly name: string;
|
|
293
|
-
readonly language: string;
|
|
294
|
-
readonly components: ReadonlyArray<{
|
|
295
|
-
readonly type: "header" | "body" | "footer" | "button";
|
|
296
|
-
readonly sub_type?: "url" | "quick_reply" | "copy_code" | null;
|
|
297
|
-
readonly index?: string | null;
|
|
298
|
-
readonly parameters: ReadonlyArray<{
|
|
299
|
-
readonly type: "text" | "currency" | "date_time" | "image" | "document" | "video" | "coupon_code";
|
|
300
|
-
readonly text?: string | null;
|
|
301
|
-
readonly currency?: ({
|
|
302
|
-
readonly fallback_value: string;
|
|
303
|
-
readonly code: string;
|
|
304
|
-
readonly amount_1000: number;
|
|
305
|
-
} & {
|
|
306
|
-
readonly [x: string]: JsonValue;
|
|
307
|
-
}) | null;
|
|
308
|
-
readonly date_time?: ({
|
|
309
|
-
readonly fallback_value: string;
|
|
310
|
-
} & {
|
|
311
|
-
readonly [x: string]: JsonValue;
|
|
312
|
-
}) | null;
|
|
313
|
-
readonly image?: ({
|
|
314
|
-
readonly link: string;
|
|
315
|
-
} & {
|
|
316
|
-
readonly [x: string]: JsonValue;
|
|
317
|
-
}) | null;
|
|
318
|
-
readonly document?: ({
|
|
319
|
-
readonly link: string;
|
|
320
|
-
readonly filename?: string | null;
|
|
321
|
-
} & {
|
|
322
|
-
readonly [x: string]: JsonValue;
|
|
323
|
-
}) | null;
|
|
324
|
-
readonly video?: ({
|
|
325
|
-
readonly link: string;
|
|
326
|
-
} & {
|
|
327
|
-
readonly [x: string]: JsonValue;
|
|
328
|
-
}) | null;
|
|
329
|
-
readonly coupon_code?: string | null;
|
|
330
|
-
} & {
|
|
331
|
-
readonly [x: string]: JsonValue;
|
|
332
|
-
}>;
|
|
333
|
-
} & {
|
|
334
|
-
readonly [x: string]: JsonValue;
|
|
335
|
-
}>;
|
|
336
|
-
} & {
|
|
337
|
-
readonly [x: string]: JsonValue;
|
|
338
|
-
}) | null;
|
|
339
|
-
readonly interactive?: ({
|
|
340
|
-
readonly type: "buttons";
|
|
341
|
-
readonly header?: ({
|
|
342
|
-
readonly type: "text";
|
|
343
|
-
readonly text: string;
|
|
344
|
-
} & {
|
|
345
|
-
readonly [x: string]: JsonValue;
|
|
346
|
-
}) | ({
|
|
347
|
-
readonly type: "image";
|
|
348
|
-
readonly url: string;
|
|
349
|
-
} & {
|
|
350
|
-
readonly [x: string]: JsonValue;
|
|
351
|
-
}) | ({
|
|
352
|
-
readonly type: "image";
|
|
353
|
-
readonly mediaId: string;
|
|
354
|
-
} & {
|
|
355
|
-
readonly [x: string]: JsonValue;
|
|
356
|
-
}) | ({
|
|
357
|
-
readonly type: "video";
|
|
358
|
-
readonly url: string;
|
|
359
|
-
} & {
|
|
360
|
-
readonly [x: string]: JsonValue;
|
|
361
|
-
}) | ({
|
|
362
|
-
readonly type: "video";
|
|
363
|
-
readonly mediaId: string;
|
|
364
|
-
} & {
|
|
365
|
-
readonly [x: string]: JsonValue;
|
|
366
|
-
}) | ({
|
|
367
|
-
readonly type: "document";
|
|
368
|
-
readonly filename?: string;
|
|
369
|
-
readonly url: string;
|
|
370
|
-
} & {
|
|
371
|
-
readonly [x: string]: JsonValue;
|
|
372
|
-
}) | ({
|
|
373
|
-
readonly type: "document";
|
|
374
|
-
readonly filename?: string;
|
|
375
|
-
readonly mediaId: string;
|
|
376
|
-
} & {
|
|
377
|
-
readonly [x: string]: JsonValue;
|
|
378
|
-
});
|
|
379
|
-
readonly body: string;
|
|
380
|
-
readonly footer?: string;
|
|
381
|
-
readonly buttons: ReadonlyArray<{
|
|
382
|
-
readonly id: string;
|
|
383
|
-
readonly title: string;
|
|
384
|
-
} & {
|
|
385
|
-
readonly [x: string]: JsonValue;
|
|
386
|
-
}>;
|
|
387
|
-
} & {
|
|
388
|
-
readonly [x: string]: JsonValue;
|
|
389
|
-
}) | ({
|
|
390
|
-
readonly type: "list";
|
|
391
|
-
readonly header?: {
|
|
392
|
-
readonly type: "text";
|
|
393
|
-
readonly text: string;
|
|
394
|
-
} & {
|
|
395
|
-
readonly [x: string]: JsonValue;
|
|
396
|
-
};
|
|
397
|
-
readonly body: string;
|
|
398
|
-
readonly footer?: string;
|
|
399
|
-
readonly button: string;
|
|
400
|
-
readonly sections: ReadonlyArray<{
|
|
401
|
-
readonly title?: string;
|
|
402
|
-
readonly rows: ReadonlyArray<{
|
|
403
|
-
readonly id: string;
|
|
404
|
-
readonly title: string;
|
|
405
|
-
readonly description?: string;
|
|
406
|
-
} & {
|
|
407
|
-
readonly [x: string]: JsonValue;
|
|
408
|
-
}>;
|
|
409
|
-
} & {
|
|
410
|
-
readonly [x: string]: JsonValue;
|
|
411
|
-
}>;
|
|
412
|
-
} & {
|
|
413
|
-
readonly [x: string]: JsonValue;
|
|
414
|
-
}) | ({
|
|
415
|
-
readonly type: "cta_url";
|
|
416
|
-
readonly header?: ({
|
|
417
|
-
readonly type: "text";
|
|
418
|
-
readonly text: string;
|
|
419
|
-
} & {
|
|
420
|
-
readonly [x: string]: JsonValue;
|
|
421
|
-
}) | ({
|
|
422
|
-
readonly type: "image";
|
|
423
|
-
readonly url: string;
|
|
424
|
-
} & {
|
|
425
|
-
readonly [x: string]: JsonValue;
|
|
426
|
-
}) | ({
|
|
427
|
-
readonly type: "image";
|
|
428
|
-
readonly mediaId: string;
|
|
429
|
-
} & {
|
|
430
|
-
readonly [x: string]: JsonValue;
|
|
431
|
-
}) | ({
|
|
432
|
-
readonly type: "video";
|
|
433
|
-
readonly url: string;
|
|
434
|
-
} & {
|
|
435
|
-
readonly [x: string]: JsonValue;
|
|
436
|
-
}) | ({
|
|
437
|
-
readonly type: "video";
|
|
438
|
-
readonly mediaId: string;
|
|
439
|
-
} & {
|
|
440
|
-
readonly [x: string]: JsonValue;
|
|
441
|
-
}) | ({
|
|
442
|
-
readonly type: "document";
|
|
443
|
-
readonly filename?: string;
|
|
444
|
-
readonly url: string;
|
|
445
|
-
} & {
|
|
446
|
-
readonly [x: string]: JsonValue;
|
|
447
|
-
}) | ({
|
|
448
|
-
readonly type: "document";
|
|
449
|
-
readonly filename?: string;
|
|
450
|
-
readonly mediaId: string;
|
|
451
|
-
} & {
|
|
452
|
-
readonly [x: string]: JsonValue;
|
|
453
|
-
});
|
|
454
|
-
readonly body: string;
|
|
455
|
-
readonly footer?: string;
|
|
456
|
-
readonly displayText: string;
|
|
457
|
-
readonly url: string;
|
|
458
|
-
} & {
|
|
459
|
-
readonly [x: string]: JsonValue;
|
|
460
|
-
}) | ({
|
|
461
|
-
readonly type: "flow";
|
|
462
|
-
readonly header?: {
|
|
463
|
-
readonly type: "text";
|
|
464
|
-
readonly text: string;
|
|
465
|
-
} & {
|
|
466
|
-
readonly [x: string]: JsonValue;
|
|
467
|
-
};
|
|
468
|
-
readonly body: string;
|
|
469
|
-
readonly footer?: string;
|
|
470
|
-
readonly flowId: string;
|
|
471
|
-
readonly cta: string;
|
|
472
|
-
readonly token?: string;
|
|
473
|
-
readonly screen?: string;
|
|
474
|
-
readonly data?: {
|
|
475
|
-
readonly [x: string]: JsonValue;
|
|
476
|
-
};
|
|
477
|
-
readonly flowVersionId: string;
|
|
478
|
-
readonly providerFlowId: string;
|
|
479
|
-
} & {
|
|
480
|
-
readonly [x: string]: JsonValue;
|
|
481
|
-
});
|
|
482
|
-
readonly media?: ({
|
|
483
|
-
readonly type: "image" | "video" | "audio" | "document" | "sticker";
|
|
484
|
-
readonly url: string;
|
|
485
|
-
readonly caption?: string;
|
|
486
|
-
readonly filename?: string;
|
|
487
|
-
} & {
|
|
488
|
-
readonly [x: string]: JsonValue;
|
|
489
|
-
}) | ({
|
|
490
|
-
readonly type: "image" | "video" | "audio" | "document" | "sticker";
|
|
491
|
-
readonly mediaId: string;
|
|
492
|
-
readonly caption?: string;
|
|
493
|
-
readonly filename?: string;
|
|
494
|
-
} & {
|
|
495
|
-
readonly [x: string]: JsonValue;
|
|
496
|
-
}) | ({
|
|
497
|
-
readonly type: "image" | "video" | "audio" | "document" | "sticker";
|
|
498
|
-
readonly providerMediaId: string;
|
|
499
|
-
readonly mimeType?: string | null;
|
|
500
|
-
readonly caption?: string | null;
|
|
501
|
-
readonly filename?: string;
|
|
502
|
-
} & {
|
|
503
|
-
readonly [x: string]: JsonValue;
|
|
504
|
-
}) | null;
|
|
505
|
-
readonly reaction?: {
|
|
506
|
-
readonly messageId: string | null;
|
|
507
|
-
readonly providerMessageId: string;
|
|
508
|
-
readonly emoji: string | null;
|
|
509
|
-
} & {
|
|
510
|
-
readonly [x: string]: JsonValue;
|
|
511
|
-
};
|
|
512
|
-
readonly location?: {
|
|
513
|
-
readonly latitude: number;
|
|
514
|
-
readonly longitude: number;
|
|
515
|
-
readonly name?: string;
|
|
516
|
-
readonly address?: string;
|
|
517
|
-
readonly url?: string;
|
|
518
|
-
} & {
|
|
519
|
-
readonly [x: string]: JsonValue;
|
|
520
|
-
};
|
|
521
|
-
readonly contacts?: ReadonlyArray<{
|
|
522
|
-
readonly name?: {
|
|
523
|
-
readonly formattedName?: string;
|
|
524
|
-
readonly firstName?: string;
|
|
525
|
-
readonly lastName?: string;
|
|
526
|
-
readonly middleName?: string;
|
|
527
|
-
readonly prefix?: string;
|
|
528
|
-
readonly suffix?: string;
|
|
529
|
-
} & {
|
|
530
|
-
readonly [x: string]: JsonValue;
|
|
531
|
-
};
|
|
532
|
-
readonly phones?: ReadonlyArray<{
|
|
533
|
-
readonly phone?: string;
|
|
534
|
-
readonly type?: string;
|
|
535
|
-
readonly waId?: string;
|
|
536
|
-
} & {
|
|
537
|
-
readonly [x: string]: JsonValue;
|
|
538
|
-
}>;
|
|
539
|
-
readonly emails?: ReadonlyArray<{
|
|
540
|
-
readonly email?: string;
|
|
541
|
-
readonly type?: string;
|
|
542
|
-
} & {
|
|
543
|
-
readonly [x: string]: JsonValue;
|
|
544
|
-
}>;
|
|
545
|
-
readonly urls?: ReadonlyArray<{
|
|
546
|
-
readonly url?: string;
|
|
547
|
-
readonly type?: string;
|
|
548
|
-
} & {
|
|
549
|
-
readonly [x: string]: JsonValue;
|
|
550
|
-
}>;
|
|
551
|
-
readonly org?: {
|
|
552
|
-
readonly company?: string;
|
|
553
|
-
readonly department?: string;
|
|
554
|
-
readonly title?: string;
|
|
555
|
-
} & {
|
|
556
|
-
readonly [x: string]: JsonValue;
|
|
557
|
-
};
|
|
558
|
-
readonly addresses?: ReadonlyArray<{
|
|
559
|
-
readonly street?: string;
|
|
560
|
-
readonly city?: string;
|
|
561
|
-
readonly state?: string;
|
|
562
|
-
readonly zip?: string;
|
|
563
|
-
readonly country?: string;
|
|
564
|
-
readonly countryCode?: string;
|
|
565
|
-
readonly type?: string;
|
|
566
|
-
} & {
|
|
567
|
-
readonly [x: string]: JsonValue;
|
|
568
|
-
}>;
|
|
569
|
-
readonly birthday?: string;
|
|
570
|
-
} & {
|
|
571
|
-
readonly [x: string]: JsonValue;
|
|
572
|
-
}>;
|
|
573
|
-
readonly reply?: {
|
|
574
|
-
readonly type: "button" | "list" | "template_button";
|
|
575
|
-
readonly id: string;
|
|
576
|
-
readonly title: string;
|
|
577
|
-
readonly description?: string;
|
|
578
|
-
} & {
|
|
579
|
-
readonly [x: string]: JsonValue;
|
|
580
|
-
};
|
|
581
|
-
readonly flowResponse?: {
|
|
582
|
-
readonly flowToken: string | null;
|
|
583
|
-
readonly response: {
|
|
584
|
-
readonly [x: string]: JsonValue;
|
|
585
|
-
};
|
|
586
|
-
readonly body?: string;
|
|
587
|
-
} & {
|
|
588
|
-
readonly [x: string]: JsonValue;
|
|
589
|
-
};
|
|
590
|
-
readonly context?: {
|
|
591
|
-
readonly messageId: string | null;
|
|
592
|
-
readonly providerMessageId: string;
|
|
593
|
-
} & {
|
|
594
|
-
readonly [x: string]: JsonValue;
|
|
595
|
-
};
|
|
596
|
-
} & {
|
|
597
|
-
readonly [x: string]: JsonValue;
|
|
598
|
-
}) | null;
|
|
599
217
|
readonly messageId: string;
|
|
600
218
|
readonly organizationId: string;
|
|
601
219
|
} & {
|
|
@@ -841,7 +459,7 @@ export type ContactConsentChangedEvent = {
|
|
|
841
459
|
} & {
|
|
842
460
|
readonly [x: string]: JsonValue;
|
|
843
461
|
};
|
|
844
|
-
readonly channel: "
|
|
462
|
+
readonly channel: "email";
|
|
845
463
|
readonly status: "opted_in" | "opted_out";
|
|
846
464
|
readonly previousStatus: "opted_in" | "opted_out" | null;
|
|
847
465
|
readonly source: string;
|
|
@@ -860,8 +478,8 @@ export type ConversationCreatedEvent = {
|
|
|
860
478
|
readonly conversationId: string;
|
|
861
479
|
readonly organizationId: string;
|
|
862
480
|
readonly title?: string | null | null;
|
|
863
|
-
readonly channels: ReadonlyArray<"
|
|
864
|
-
readonly primaryChannel: "
|
|
481
|
+
readonly channels: ReadonlyArray<"email">;
|
|
482
|
+
readonly primaryChannel: "email";
|
|
865
483
|
readonly status: "active" | "waiting" | "resolved" | "escalated" | "archived";
|
|
866
484
|
readonly primaryContactId?: string | null | null;
|
|
867
485
|
readonly createdAt: string;
|
|
@@ -880,8 +498,8 @@ export type ConversationUpdatedEvent = {
|
|
|
880
498
|
readonly conversationId: string;
|
|
881
499
|
readonly organizationId: string;
|
|
882
500
|
readonly title?: string | null | null;
|
|
883
|
-
readonly channels: ReadonlyArray<"
|
|
884
|
-
readonly primaryChannel: "
|
|
501
|
+
readonly channels: ReadonlyArray<"email">;
|
|
502
|
+
readonly primaryChannel: "email";
|
|
885
503
|
readonly status: "active" | "waiting" | "resolved" | "escalated" | "archived";
|
|
886
504
|
readonly primaryContactId?: string | null | null;
|
|
887
505
|
readonly createdAt: string;
|
|
@@ -900,8 +518,8 @@ export type ConversationArchivedEvent = {
|
|
|
900
518
|
readonly conversationId: string;
|
|
901
519
|
readonly organizationId: string;
|
|
902
520
|
readonly title?: string | null | null;
|
|
903
|
-
readonly channels: ReadonlyArray<"
|
|
904
|
-
readonly primaryChannel: "
|
|
521
|
+
readonly channels: ReadonlyArray<"email">;
|
|
522
|
+
readonly primaryChannel: "email";
|
|
905
523
|
readonly status: "active" | "waiting" | "resolved" | "escalated" | "archived";
|
|
906
524
|
readonly primaryContactId?: string | null | null;
|
|
907
525
|
readonly createdAt: string;
|
|
@@ -1057,79 +675,6 @@ export type DomainWarmingUpdatedEvent = {
|
|
|
1057
675
|
readonly [x: string]: JsonValue;
|
|
1058
676
|
};
|
|
1059
677
|
export type DomainWarmingUpdatedPayload = DomainWarmingUpdatedEvent["data"];
|
|
1060
|
-
export type TemplateRegistrationUpdatedEvent = {
|
|
1061
|
-
readonly type: "template.registration.updated";
|
|
1062
|
-
readonly timestamp: string;
|
|
1063
|
-
readonly data: {
|
|
1064
|
-
readonly id: string;
|
|
1065
|
-
readonly templateId: string;
|
|
1066
|
-
readonly publicationId: string;
|
|
1067
|
-
readonly target: ({
|
|
1068
|
-
readonly provider: "whatsapp";
|
|
1069
|
-
readonly wabaId: string;
|
|
1070
|
-
} & {
|
|
1071
|
-
readonly [x: string]: JsonValue;
|
|
1072
|
-
}) | ({
|
|
1073
|
-
readonly provider: "dlt";
|
|
1074
|
-
readonly entityId: string;
|
|
1075
|
-
readonly headerId: string;
|
|
1076
|
-
} & {
|
|
1077
|
-
readonly [x: string]: JsonValue;
|
|
1078
|
-
});
|
|
1079
|
-
readonly name: string;
|
|
1080
|
-
readonly language: string;
|
|
1081
|
-
readonly status: "draft" | "submitted" | "approved" | "rejected" | "paused" | "disabled";
|
|
1082
|
-
readonly category: "marketing" | "utility" | "authentication" | "transactional" | "service_implicit" | "service_explicit" | "promotional";
|
|
1083
|
-
readonly providerCategory: "marketing" | "utility" | "authentication" | "transactional" | "service_implicit" | "service_explicit" | "promotional" | null;
|
|
1084
|
-
readonly providerTemplateId: string | null;
|
|
1085
|
-
readonly reason: string | null;
|
|
1086
|
-
readonly submittedAt: string | null;
|
|
1087
|
-
readonly statusChangedAt: string;
|
|
1088
|
-
readonly createdAt: string;
|
|
1089
|
-
readonly updatedAt: string;
|
|
1090
|
-
readonly organizationId: string;
|
|
1091
|
-
readonly previousStatus: "draft" | "submitted" | "approved" | "rejected" | "paused" | "disabled";
|
|
1092
|
-
} & {
|
|
1093
|
-
readonly [x: string]: JsonValue;
|
|
1094
|
-
};
|
|
1095
|
-
} & {
|
|
1096
|
-
readonly [x: string]: JsonValue;
|
|
1097
|
-
};
|
|
1098
|
-
export type TemplateRegistrationUpdatedPayload = TemplateRegistrationUpdatedEvent["data"];
|
|
1099
|
-
export type FlowRegistrationUpdatedEvent = {
|
|
1100
|
-
readonly type: "flow.registration.updated";
|
|
1101
|
-
readonly timestamp: string;
|
|
1102
|
-
readonly data: {
|
|
1103
|
-
readonly id: string;
|
|
1104
|
-
readonly flowId: string;
|
|
1105
|
-
readonly versionId: string;
|
|
1106
|
-
readonly versionNumber: number;
|
|
1107
|
-
readonly wabaId: string;
|
|
1108
|
-
readonly providerFlowId: string | null;
|
|
1109
|
-
readonly name: string;
|
|
1110
|
-
readonly status: "draft" | "published" | "throttled" | "blocked" | "deprecated";
|
|
1111
|
-
readonly validationErrors: ReadonlyArray<{
|
|
1112
|
-
readonly error: string;
|
|
1113
|
-
readonly message: string;
|
|
1114
|
-
readonly path?: string;
|
|
1115
|
-
readonly line?: number;
|
|
1116
|
-
readonly column?: number;
|
|
1117
|
-
} & {
|
|
1118
|
-
readonly [x: string]: JsonValue;
|
|
1119
|
-
}>;
|
|
1120
|
-
readonly publishedAt: string | null;
|
|
1121
|
-
readonly statusChangedAt: string;
|
|
1122
|
-
readonly createdAt: string;
|
|
1123
|
-
readonly updatedAt: string;
|
|
1124
|
-
readonly organizationId: string;
|
|
1125
|
-
readonly previousStatus: "draft" | "published" | "throttled" | "blocked" | "deprecated" | null;
|
|
1126
|
-
} & {
|
|
1127
|
-
readonly [x: string]: JsonValue;
|
|
1128
|
-
};
|
|
1129
|
-
} & {
|
|
1130
|
-
readonly [x: string]: JsonValue;
|
|
1131
|
-
};
|
|
1132
|
-
export type FlowRegistrationUpdatedPayload = FlowRegistrationUpdatedEvent["data"];
|
|
1133
678
|
export type MailboxMessageReceivedEvent = {
|
|
1134
679
|
readonly type: "mailbox.message.received";
|
|
1135
680
|
readonly timestamp: string;
|
|
@@ -1138,7 +683,7 @@ export type MailboxMessageReceivedEvent = {
|
|
|
1138
683
|
readonly namespaceId: string | null;
|
|
1139
684
|
readonly message: {
|
|
1140
685
|
readonly id: string;
|
|
1141
|
-
readonly channel?: "email"
|
|
686
|
+
readonly channel?: "email";
|
|
1142
687
|
readonly threadId: string;
|
|
1143
688
|
readonly from: {
|
|
1144
689
|
readonly address: string;
|
|
@@ -1197,7 +742,7 @@ export type MailboxMessageSentEvent = {
|
|
|
1197
742
|
};
|
|
1198
743
|
readonly message: {
|
|
1199
744
|
readonly id: string;
|
|
1200
|
-
readonly channel?: "email"
|
|
745
|
+
readonly channel?: "email";
|
|
1201
746
|
readonly threadId: string;
|
|
1202
747
|
readonly from: {
|
|
1203
748
|
readonly address: string;
|
|
@@ -1366,7 +911,7 @@ export type MailboxMessageReleasedEvent = {
|
|
|
1366
911
|
readonly reason: "spam" | "dmarc" | "virus" | "virus_unscanned" | "phishing" | "fraud" | "prompt_injection";
|
|
1367
912
|
readonly message: {
|
|
1368
913
|
readonly id: string;
|
|
1369
|
-
readonly channel?: "email"
|
|
914
|
+
readonly channel?: "email";
|
|
1370
915
|
readonly threadId: string;
|
|
1371
916
|
readonly from: {
|
|
1372
917
|
readonly address: string;
|
|
@@ -1468,7 +1013,7 @@ export type JourneyWebhookEvent = {
|
|
|
1468
1013
|
readonly [x: string]: JsonValue;
|
|
1469
1014
|
};
|
|
1470
1015
|
export type JourneyWebhookPayload = JourneyWebhookEvent["data"];
|
|
1471
|
-
export type SamvaWebhookEvent = MessageSentEvent | MessageDeliveredEvent |
|
|
1016
|
+
export type SamvaWebhookEvent = MessageSentEvent | MessageDeliveredEvent | MessageFailedEvent | MessageBouncedEvent | MessageComplainedEvent | MessageReceivedEvent | MessageOpenedEvent | MessageClickedEvent | ContactCreatedEvent | ContactUpdatedEvent | ContactDeletedEvent | ContactSubscribedEvent | ContactUnsubscribedEvent | ContactResubscribedEvent | ContactConsentChangedEvent | ConversationCreatedEvent | ConversationUpdatedEvent | ConversationArchivedEvent | WebhookCreatedEvent | WebhookUpdatedEvent | WebhookDeletedEvent | WebhookTestEvent | DomainUpdatedEvent | DomainWarmingUpdatedEvent | MailboxMessageReceivedEvent | MailboxMessageSentEvent | MailboxActionPendingApprovalEvent | MailboxActionResolvedEvent | MailboxMessageQuarantinedEvent | MailboxMessageReleasedEvent | MailboxMessageDiscardedEvent | JourneyWebhookEvent;
|
|
1472
1017
|
export interface UnknownWebhookEvent {
|
|
1473
1018
|
readonly type: string;
|
|
1474
1019
|
readonly timestamp: string;
|