@messagebird/bird-plugin-medusa 0.0.0-stage → 0.1.1

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.
@@ -0,0 +1,830 @@
1
+ export declare const birdOperations: {
2
+ readonly email: {
3
+ readonly operationId: "createEmailMessage";
4
+ readonly method: "POST";
5
+ readonly path: "/v1/email/messages";
6
+ readonly scopes: readonly ["emails"];
7
+ readonly categories: readonly ["marketing", "transactional"];
8
+ };
9
+ readonly sms: {
10
+ readonly operationId: "createSMSMessage";
11
+ readonly method: "POST";
12
+ readonly path: "/v1/sms/messages";
13
+ readonly scopes: readonly ["sms"];
14
+ readonly categories: readonly ["transactional", "marketing", "authentication", "service"];
15
+ };
16
+ readonly whatsapp: {
17
+ readonly operationId: "createWhatsAppMessage";
18
+ readonly method: "POST";
19
+ readonly path: "/v1/whatsapp/messages";
20
+ readonly scopes: readonly ["whatsapp"];
21
+ };
22
+ };
23
+ export type EmailMessageRequest = InputEmailMessageSendRequest;
24
+ export type EmailMessageResponse = OutputEmailMessage;
25
+ export type SmsMessageRequest = InputSMSMessageSendRequest;
26
+ export type SmsMessageResponse = OutputSMSMessage;
27
+ export type WhatsAppMessageRequest = InputWhatsAppMessageSendRequest;
28
+ export type WhatsAppMessageResponse = OutputWhatsAppMessage;
29
+ type InputEmailAddress = {
30
+ email: string;
31
+ name?: string;
32
+ };
33
+ type InputEmailAddressInput = (string | InputEmailAddress);
34
+ type InputEmailAttachment = {
35
+ content: string;
36
+ content_id?: string;
37
+ content_type?: string;
38
+ filename: string;
39
+ };
40
+ type InputEmailMessageCategory = ("marketing" | "transactional");
41
+ type InputEmailMessageSendRequest = {
42
+ attachments?: Array<InputEmailAttachment>;
43
+ bcc?: Array<InputEmailAddressInput>;
44
+ category?: InputEmailMessageCategory;
45
+ cc?: Array<InputEmailAddressInput>;
46
+ from: InputEmailAddressInput;
47
+ headers?: {
48
+ [key: string]: string;
49
+ };
50
+ html?: string;
51
+ ip_pool_id?: string;
52
+ metadata?: {
53
+ [key: string]: unknown;
54
+ };
55
+ parameters?: {
56
+ [key: string]: unknown;
57
+ };
58
+ reference?: InputMessageReference;
59
+ reply_to?: Array<InputEmailAddressInput>;
60
+ scheduled_at?: string;
61
+ subject?: string;
62
+ tags?: Array<InputTag>;
63
+ template?: InputEmailTemplateSend;
64
+ text?: string;
65
+ to: Array<InputEmailAddressInput>;
66
+ track_clicks?: boolean;
67
+ track_opens?: boolean;
68
+ };
69
+ type InputEmailTemplateID = string;
70
+ type InputEmailTemplateSend = ({
71
+ id?: InputEmailTemplateID;
72
+ language?: InputLanguageTag;
73
+ parameters?: {
74
+ [key: string]: unknown;
75
+ };
76
+ slug?: InputTemplateSlug;
77
+ } & ({
78
+ id: InputEmailTemplateID;
79
+ } & {
80
+ slug?: never;
81
+ } | {
82
+ slug: InputTemplateSlug;
83
+ } & {
84
+ id?: never;
85
+ }));
86
+ type InputLanguageTag = string;
87
+ type InputMessageReference = string;
88
+ type InputSMSBinary = {
89
+ data: string;
90
+ udh?: string;
91
+ };
92
+ type InputSMSMessageCategory = ("transactional" | "marketing" | "authentication" | "service");
93
+ type InputSMSMessageSendRequest = ({
94
+ audience_id?: string;
95
+ binary?: InputSMSBinary;
96
+ broadcast_id?: string;
97
+ campaign_id?: string;
98
+ category?: InputSMSMessageCategory;
99
+ contact_id?: string;
100
+ cost_center?: string;
101
+ from?: string;
102
+ media_urls?: Array<string>;
103
+ messaging_profile_id?: string;
104
+ metadata?: {
105
+ [key: string]: unknown;
106
+ };
107
+ options?: InputSMSSendOptions;
108
+ personalization?: {
109
+ [key: string]: unknown;
110
+ };
111
+ reference?: InputMessageReference;
112
+ scheduled_at?: string;
113
+ tags?: Array<InputTag>;
114
+ template?: InputSMSTemplateSend;
115
+ text?: string;
116
+ to: string;
117
+ to_country_code?: string;
118
+ topic_id?: string;
119
+ validity_period?: number;
120
+ } & ({
121
+ text: string;
122
+ } | {
123
+ template: InputSMSTemplateSend;
124
+ } | {
125
+ binary: InputSMSBinary;
126
+ }) & ({
127
+ text?: never;
128
+ } | {
129
+ template?: never;
130
+ }) & ({
131
+ text?: never;
132
+ } | {
133
+ binary?: never;
134
+ }) & ({
135
+ template?: never;
136
+ } | {
137
+ binary?: never;
138
+ }) & ({
139
+ template?: never;
140
+ } | {
141
+ category?: never;
142
+ }) & ({
143
+ template?: never;
144
+ } | {
145
+ media_urls?: never;
146
+ }));
147
+ type InputSMSSendOptions = {
148
+ callback_url?: (string | null);
149
+ ignore_suppression?: boolean;
150
+ max_price_per_segment?: number;
151
+ smart_encoding?: boolean;
152
+ track_clicks?: boolean;
153
+ };
154
+ type InputSMSTemplateID = string;
155
+ type InputSMSTemplateSend = ({
156
+ id?: InputSMSTemplateID;
157
+ language?: InputLanguageTag;
158
+ name?: string;
159
+ parameters?: {
160
+ [key: string]: unknown;
161
+ };
162
+ slug?: InputTemplateSlug;
163
+ } & ({
164
+ id: InputSMSTemplateID;
165
+ } & {
166
+ slug?: never;
167
+ } & {
168
+ name?: never;
169
+ } | {
170
+ slug: InputTemplateSlug;
171
+ } & {
172
+ id?: never;
173
+ } & {
174
+ name?: never;
175
+ } | {
176
+ name: string;
177
+ } & {
178
+ id?: never;
179
+ } & {
180
+ slug?: never;
181
+ }));
182
+ type InputTag = {
183
+ name: string;
184
+ value: string;
185
+ };
186
+ type InputTemplateSlug = string;
187
+ type InputWhatsAppAudioSend = {
188
+ url: string;
189
+ voice?: boolean;
190
+ };
191
+ type InputWhatsAppContactAddressSend = {
192
+ city?: string;
193
+ country?: string;
194
+ country_code?: string;
195
+ state?: string;
196
+ street?: string;
197
+ type?: string;
198
+ zip?: string;
199
+ };
200
+ type InputWhatsAppContactCardSend = {
201
+ addresses?: Array<InputWhatsAppContactAddressSend>;
202
+ birthday?: string;
203
+ emails?: Array<InputWhatsAppContactEmailSend>;
204
+ name: InputWhatsAppContactNameSend;
205
+ org?: InputWhatsAppContactOrgSend;
206
+ phone_numbers?: Array<InputWhatsAppContactPhoneSend>;
207
+ urls?: Array<InputWhatsAppContactUrlSend>;
208
+ };
209
+ type InputWhatsAppContactEmailSend = {
210
+ email: string;
211
+ type?: string;
212
+ };
213
+ type InputWhatsAppContactNameSend = {
214
+ first_name?: string;
215
+ formatted_name: string;
216
+ last_name?: string;
217
+ middle_name?: string;
218
+ prefix?: string;
219
+ suffix?: string;
220
+ };
221
+ type InputWhatsAppContactOrgSend = {
222
+ company?: string;
223
+ department?: string;
224
+ title?: string;
225
+ };
226
+ type InputWhatsAppContactPhoneSend = {
227
+ phone_number: string;
228
+ type?: string;
229
+ };
230
+ type InputWhatsAppContactUrlSend = {
231
+ type?: string;
232
+ url: string;
233
+ };
234
+ type InputWhatsAppDocumentSend = {
235
+ caption?: string;
236
+ filename?: string;
237
+ url: string;
238
+ };
239
+ type InputWhatsAppImageSend = {
240
+ caption?: string;
241
+ url: string;
242
+ };
243
+ type InputWhatsAppInteractiveButtonSend = ({
244
+ cta_url?: InputWhatsAppInteractiveCtaUrlSend;
245
+ quick_reply?: InputWhatsAppInteractiveQuickReplyButtonSend;
246
+ type: InputWhatsAppInteractiveButtonTypeWrite;
247
+ } & ({
248
+ cta_url?: never;
249
+ quick_reply: InputWhatsAppInteractiveQuickReplyButtonSend;
250
+ type: "quick_reply";
251
+ } | {
252
+ cta_url: InputWhatsAppInteractiveCtaUrlSend;
253
+ quick_reply?: never;
254
+ type: "cta_url";
255
+ }));
256
+ type InputWhatsAppInteractiveButtonTypeWrite = ("quick_reply" | "cta_url");
257
+ type InputWhatsAppInteractiveCardHeaderSend = ({
258
+ type: InputWhatsAppInteractiveHeaderTypeWrite;
259
+ url: string;
260
+ } & ({
261
+ type?: "image";
262
+ } | {
263
+ type?: "video";
264
+ }));
265
+ type InputWhatsAppInteractiveCardSend = ({
266
+ body_text?: string;
267
+ buttons: Array<InputWhatsAppInteractiveButtonSend>;
268
+ header: InputWhatsAppInteractiveCardHeaderSend;
269
+ } & ({
270
+ buttons?: unknown;
271
+ } | {
272
+ buttons?: unknown;
273
+ }));
274
+ type InputWhatsAppInteractiveCtaUrlSend = {
275
+ text: string;
276
+ url: string;
277
+ };
278
+ type InputWhatsAppInteractiveHeaderSend = ({
279
+ text?: string;
280
+ type: InputWhatsAppInteractiveHeaderTypeWrite;
281
+ url?: string;
282
+ } & ({
283
+ text: string;
284
+ type: "text";
285
+ url?: never;
286
+ } | {
287
+ text?: never;
288
+ type: ("image" | "video" | "document");
289
+ url: string;
290
+ }));
291
+ type InputWhatsAppInteractiveHeaderTypeWrite = ("text" | "image" | "video" | "document");
292
+ type InputWhatsAppInteractiveListRowSend = {
293
+ description?: string;
294
+ slug: string;
295
+ text: string;
296
+ };
297
+ type InputWhatsAppInteractiveListSectionSend = {
298
+ rows: Array<InputWhatsAppInteractiveListRowSend>;
299
+ title: string;
300
+ };
301
+ type InputWhatsAppInteractiveListSend = {
302
+ button_text: string;
303
+ sections: Array<InputWhatsAppInteractiveListSectionSend>;
304
+ };
305
+ type InputWhatsAppInteractiveQuickReplyButtonSend = {
306
+ slug: string;
307
+ text: string;
308
+ };
309
+ type InputWhatsAppInteractiveSend = ({
310
+ body_text: string;
311
+ buttons?: Array<InputWhatsAppInteractiveButtonSend>;
312
+ cards?: Array<InputWhatsAppInteractiveCardSend>;
313
+ cta_url?: InputWhatsAppInteractiveCtaUrlSend;
314
+ footer_text?: string;
315
+ header?: InputWhatsAppInteractiveHeaderSend;
316
+ list?: InputWhatsAppInteractiveListSend;
317
+ type: InputWhatsAppInteractiveTypeWrite;
318
+ } & ({
319
+ body_text?: unknown;
320
+ buttons: unknown;
321
+ cards?: never;
322
+ cta_url?: never;
323
+ list?: never;
324
+ type: "button";
325
+ } | {
326
+ buttons?: never;
327
+ cards?: never;
328
+ cta_url?: never;
329
+ header?: {
330
+ type?: "text";
331
+ url?: never;
332
+ };
333
+ list: InputWhatsAppInteractiveListSend;
334
+ type: "list";
335
+ } | {
336
+ body_text?: unknown;
337
+ buttons?: never;
338
+ cards?: never;
339
+ cta_url: InputWhatsAppInteractiveCtaUrlSend;
340
+ list?: never;
341
+ type: "cta_url";
342
+ } | {
343
+ body_text?: unknown;
344
+ buttons?: never;
345
+ cards: Array<InputWhatsAppInteractiveCardSend>;
346
+ cta_url?: never;
347
+ footer_text?: never;
348
+ header?: never;
349
+ list?: never;
350
+ type: "carousel";
351
+ } | {
352
+ body_text?: unknown;
353
+ buttons?: never;
354
+ cards?: never;
355
+ cta_url?: never;
356
+ footer_text?: never;
357
+ header?: never;
358
+ list?: never;
359
+ type: "location_request_message";
360
+ } | {
361
+ body_text?: unknown;
362
+ buttons?: never;
363
+ cards?: never;
364
+ cta_url?: never;
365
+ footer_text?: never;
366
+ header?: never;
367
+ list?: never;
368
+ type: "request_contact_info";
369
+ }));
370
+ type InputWhatsAppInteractiveTypeWrite = ("button" | "list" | "cta_url" | "carousel" | "location_request_message" | "request_contact_info");
371
+ type InputWhatsAppLocationSend = {
372
+ address?: string;
373
+ latitude: number;
374
+ longitude: number;
375
+ name?: string;
376
+ };
377
+ type InputWhatsAppMessageID = string;
378
+ type InputWhatsAppMessageSendRequest = {
379
+ audio?: InputWhatsAppAudioSend;
380
+ contact_cards?: Array<InputWhatsAppContactCardSend>;
381
+ document?: InputWhatsAppDocumentSend;
382
+ from?: string;
383
+ image?: InputWhatsAppImageSend;
384
+ in_reply_to_message_id?: InputWhatsAppMessageID;
385
+ interactive?: InputWhatsAppInteractiveSend;
386
+ location?: InputWhatsAppLocationSend;
387
+ metadata?: {
388
+ [key: string]: unknown;
389
+ };
390
+ reference?: InputMessageReference;
391
+ sticker?: InputWhatsAppStickerSend;
392
+ tags?: Array<InputTag>;
393
+ template?: InputWhatsAppTemplateSend;
394
+ text?: InputWhatsAppTextSend;
395
+ to: string;
396
+ video?: InputWhatsAppVideoSend;
397
+ };
398
+ type InputWhatsAppMessageTemplateCard = {
399
+ components: Array<InputWhatsAppMessageTemplateCardComponent>;
400
+ };
401
+ type InputWhatsAppMessageTemplateCardComponent = {
402
+ parameters?: Array<InputWhatsAppMessageTemplateComponentParameter>;
403
+ type: string;
404
+ };
405
+ type InputWhatsAppMessageTemplateComponent = {
406
+ cards?: Array<InputWhatsAppMessageTemplateCard>;
407
+ parameters?: Array<InputWhatsAppMessageTemplateComponentParameter>;
408
+ type: string;
409
+ };
410
+ type InputWhatsAppMessageTemplateComponentParameter = {
411
+ filename?: string;
412
+ location?: InputWhatsAppLocationSend;
413
+ name?: string;
414
+ text?: string;
415
+ type: InputWhatsAppTemplateParameterType;
416
+ url?: string;
417
+ };
418
+ type InputWhatsAppStickerSend = {
419
+ url: string;
420
+ };
421
+ type InputWhatsAppTemplateID = string;
422
+ type InputWhatsAppTemplateParameterType = string;
423
+ type InputWhatsAppTemplateSend = ({
424
+ bid_multiplier?: number;
425
+ components?: Array<InputWhatsAppMessageTemplateComponent>;
426
+ id?: InputWhatsAppTemplateID;
427
+ language?: InputLanguageTag;
428
+ slug?: InputTemplateSlug;
429
+ } & ({
430
+ id: InputWhatsAppTemplateID;
431
+ } & {
432
+ slug?: never;
433
+ } | {
434
+ slug: InputTemplateSlug;
435
+ } & {
436
+ id?: never;
437
+ }));
438
+ type InputWhatsAppTextSend = {
439
+ body: string;
440
+ preview_url?: boolean;
441
+ };
442
+ type InputWhatsAppVideoSend = {
443
+ caption?: string;
444
+ url: string;
445
+ };
446
+ type OutputCountryCode = string;
447
+ type OutputCurrencyCode = string;
448
+ type OutputEmailAddress = {
449
+ email: string;
450
+ name?: string;
451
+ };
452
+ type OutputEmailAttachmentID = string;
453
+ type OutputEmailAttachmentRef = {
454
+ content_id?: (string | null);
455
+ content_type?: string;
456
+ filename: string;
457
+ id?: OutputEmailAttachmentID;
458
+ inline?: boolean;
459
+ size: number;
460
+ };
461
+ type OutputEmailBroadcastID = string;
462
+ type OutputEmailID = string;
463
+ type OutputEmailMessage = {
464
+ accepted_count: number;
465
+ attachments?: Array<OutputEmailAttachmentRef>;
466
+ bcc?: Array<OutputEmailAddress>;
467
+ bounced_count: number;
468
+ broadcast_id?: OutputEmailBroadcastID;
469
+ category: OutputEmailMessageCategory;
470
+ cc?: Array<OutputEmailAddress>;
471
+ click_count: number;
472
+ complained_count: number;
473
+ created_at: string;
474
+ deferred_count: number;
475
+ delivered_at?: (string | null);
476
+ delivered_count: number;
477
+ delivery_latency_ms?: (number | null);
478
+ from: OutputEmailAddress;
479
+ id: OutputEmailID;
480
+ in_reply_to_message_id?: (OutputEmailID | null);
481
+ metadata?: {
482
+ [key: string]: unknown;
483
+ };
484
+ open_count: number;
485
+ parameters?: ({
486
+ [key: string]: unknown;
487
+ } | null);
488
+ processed_count: number;
489
+ processing_latency_ms?: (number | null);
490
+ reference?: OutputMessageReference;
491
+ rejected_count: number;
492
+ reply_to?: (Array<OutputEmailAddress> | null);
493
+ requested_language?: (OutputLanguageTag | null);
494
+ resolved_language?: (OutputLanguageTag | null);
495
+ scheduled_at?: string;
496
+ status: OutputEmailMessageStatus;
497
+ subject: string;
498
+ tags?: Array<OutputTag>;
499
+ template_id?: (OutputEmailTemplateID | null);
500
+ template_version_id?: (OutputEmailTemplateVersionID | null);
501
+ thread_id?: (string | null);
502
+ to: Array<OutputEmailAddress>;
503
+ total_latency_ms?: (number | null);
504
+ track_clicks: boolean;
505
+ track_opens: boolean;
506
+ };
507
+ type OutputEmailMessageCategory = ("marketing" | "transactional");
508
+ type OutputEmailMessageStatus = ("scheduled" | "accepted" | "processed" | "deferred" | "delivered" | "partial_failure" | "bounced" | "complained" | "rejected" | "canceled");
509
+ type OutputEmailTemplateID = string;
510
+ type OutputEmailTemplateVersionID = string;
511
+ type OutputLanguageTag = string;
512
+ type OutputMessageCost = ({
513
+ amount: string;
514
+ currency_code: OutputCurrencyCode;
515
+ passthrough_amount: (string | null);
516
+ transaction_amount: (string | null);
517
+ } | null);
518
+ type OutputMessageReference = string;
519
+ type OutputSMSBinary = {
520
+ data: string;
521
+ udh?: string;
522
+ };
523
+ type OutputSMSError = ({
524
+ carrier_error_code?: (string | null);
525
+ code: OutputSMSErrorCode;
526
+ description: string;
527
+ occurred_at: string;
528
+ permanent?: (boolean | null);
529
+ } | null);
530
+ type OutputSMSErrorCode = string;
531
+ type OutputSMSInReplyToMessage = {
532
+ id: OutputSMSMessageID;
533
+ sent_at?: string;
534
+ text?: string;
535
+ };
536
+ type OutputSMSMessage = {
537
+ binary?: OutputSMSBinary;
538
+ carrier?: string;
539
+ category?: (OutputSMSMessageCategory | null);
540
+ cost?: OutputMessageCost;
541
+ cost_center?: string;
542
+ country_code?: OutputCountryCode;
543
+ created_at: string;
544
+ delivered_at?: (string | null);
545
+ direction: ("outbound" | "inbound");
546
+ from: string;
547
+ id: OutputSMSMessageID;
548
+ in_reply_to_message?: OutputSMSInReplyToMessage;
549
+ last_error?: OutputSMSError;
550
+ mcc_mnc?: string;
551
+ messaging_profile_id?: OutputSMSMessagingProfileID;
552
+ metadata?: {
553
+ [key: string]: unknown;
554
+ };
555
+ options?: OutputSMSMessageEffectiveOptions;
556
+ reference?: OutputMessageReference;
557
+ requested_language: (OutputLanguageTag | null);
558
+ resolved_language: (OutputLanguageTag | null);
559
+ segments: OutputSMSSegments;
560
+ sent_at?: (string | null);
561
+ status: OutputSMSMessageStatus;
562
+ tags?: Array<OutputTag>;
563
+ template_content_hash: (OutputSMSTemplateContentHash | null);
564
+ template_id: (OutputSMSTemplateID | null);
565
+ template_version_id: (OutputSMSTemplateVersionID | null);
566
+ text?: string;
567
+ to: string;
568
+ validity_period?: number;
569
+ };
570
+ type OutputSMSMessageCategory = ("transactional" | "marketing" | "authentication" | "service");
571
+ type OutputSMSMessageEffectiveOptions = {
572
+ callback_url?: string;
573
+ ignore_suppression?: boolean;
574
+ smart_encoding: boolean;
575
+ };
576
+ type OutputSMSMessageID = string;
577
+ type OutputSMSMessageStatus = ("scheduled" | "accepted" | "sent" | "delivered" | "undelivered" | "failed" | "rejected" | "canceled" | "expired" | "received");
578
+ type OutputSMSMessagingProfileID = string;
579
+ type OutputSMSSegments = {
580
+ characters: number;
581
+ count: number;
582
+ encoding: ("GSM_7BIT" | "UCS2" | "BINARY");
583
+ };
584
+ type OutputSMSTemplateContentHash = string;
585
+ type OutputSMSTemplateID = string;
586
+ type OutputSMSTemplateVersionID = string;
587
+ type OutputTag = {
588
+ name: string;
589
+ value: string;
590
+ };
591
+ type OutputTemplateSlug = string;
592
+ type OutputWhatsAppAddress = {
593
+ bsuid?: string;
594
+ display_name?: string;
595
+ group_id?: OutputWhatsAppGroupID;
596
+ phone_number?: string;
597
+ username?: string;
598
+ };
599
+ type OutputWhatsAppAudio = ({
600
+ [key: string]: unknown;
601
+ } & (OutputWhatsAppMedia & {
602
+ voice?: boolean;
603
+ }));
604
+ type OutputWhatsAppContactAddress = {
605
+ city?: string;
606
+ country?: string;
607
+ country_code?: string;
608
+ state?: string;
609
+ street?: string;
610
+ type?: string;
611
+ zip?: string;
612
+ };
613
+ type OutputWhatsAppContactCard = {
614
+ addresses?: Array<OutputWhatsAppContactAddress>;
615
+ birthday?: string;
616
+ emails?: Array<OutputWhatsAppContactEmail>;
617
+ name?: OutputWhatsAppContactName;
618
+ org?: OutputWhatsAppContactOrg;
619
+ origin?: string;
620
+ phone_numbers?: Array<OutputWhatsAppContactPhone>;
621
+ urls?: Array<OutputWhatsAppContactUrl>;
622
+ vcard?: string;
623
+ };
624
+ type OutputWhatsAppContactEmail = {
625
+ email?: string;
626
+ type?: string;
627
+ };
628
+ type OutputWhatsAppContactName = {
629
+ first_name?: string;
630
+ formatted_name?: string;
631
+ last_name?: string;
632
+ middle_name?: string;
633
+ prefix?: string;
634
+ suffix?: string;
635
+ };
636
+ type OutputWhatsAppContactOrg = {
637
+ company?: string;
638
+ department?: string;
639
+ title?: string;
640
+ };
641
+ type OutputWhatsAppContactPhone = {
642
+ phone_number?: string;
643
+ type?: string;
644
+ };
645
+ type OutputWhatsAppContactUrl = {
646
+ type?: string;
647
+ url?: string;
648
+ };
649
+ type OutputWhatsAppDocument = ({
650
+ [key: string]: unknown;
651
+ } & (OutputWhatsAppMedia & {
652
+ caption?: string;
653
+ filename?: string;
654
+ }));
655
+ type OutputWhatsAppError = ({
656
+ code: OutputWhatsAppErrorCode;
657
+ description: string;
658
+ meta_error_code?: (string | null);
659
+ occurred_at: string;
660
+ } | null);
661
+ type OutputWhatsAppErrorCode = string;
662
+ type OutputWhatsAppFileID = string;
663
+ type OutputWhatsAppGroupID = string;
664
+ type OutputWhatsAppImage = ({
665
+ [key: string]: unknown;
666
+ } & (OutputWhatsAppMedia & {
667
+ caption?: string;
668
+ }));
669
+ type OutputWhatsAppInteractive = {
670
+ body_text: string;
671
+ buttons?: Array<OutputWhatsAppInteractiveButton>;
672
+ cards?: Array<OutputWhatsAppInteractiveCard>;
673
+ cta_url?: OutputWhatsAppInteractiveCtaUrl;
674
+ footer_text?: string;
675
+ header?: OutputWhatsAppInteractiveHeader;
676
+ list?: OutputWhatsAppInteractiveList;
677
+ type: OutputWhatsAppInteractiveType;
678
+ };
679
+ type OutputWhatsAppInteractiveButton = {
680
+ cta_url?: OutputWhatsAppInteractiveCtaUrl;
681
+ quick_reply?: OutputWhatsAppInteractiveQuickReplyButton;
682
+ type: OutputWhatsAppInteractiveButtonType;
683
+ };
684
+ type OutputWhatsAppInteractiveButtonType = string;
685
+ type OutputWhatsAppInteractiveCard = {
686
+ body_text?: string;
687
+ buttons: Array<OutputWhatsAppInteractiveButton>;
688
+ header: OutputWhatsAppInteractiveHeader;
689
+ };
690
+ type OutputWhatsAppInteractiveCtaUrl = {
691
+ text: string;
692
+ url: string;
693
+ };
694
+ type OutputWhatsAppInteractiveHeader = {
695
+ text?: string;
696
+ type: OutputWhatsAppInteractiveHeaderType;
697
+ url?: string;
698
+ };
699
+ type OutputWhatsAppInteractiveHeaderType = string;
700
+ type OutputWhatsAppInteractiveList = {
701
+ button_text: string;
702
+ sections: Array<OutputWhatsAppInteractiveListSection>;
703
+ };
704
+ type OutputWhatsAppInteractiveListRow = {
705
+ description?: string;
706
+ slug: string;
707
+ text: string;
708
+ };
709
+ type OutputWhatsAppInteractiveListSection = {
710
+ rows: Array<OutputWhatsAppInteractiveListRow>;
711
+ title: string;
712
+ };
713
+ type OutputWhatsAppInteractiveQuickReplyButton = {
714
+ slug: string;
715
+ text: string;
716
+ };
717
+ type OutputWhatsAppInteractiveReply = {
718
+ button?: OutputWhatsAppInteractiveQuickReplyButton;
719
+ list?: OutputWhatsAppInteractiveListRow;
720
+ type: OutputWhatsAppInteractiveReplyType;
721
+ };
722
+ type OutputWhatsAppInteractiveReplyType = string;
723
+ type OutputWhatsAppInteractiveType = string;
724
+ type OutputWhatsAppLocation = {
725
+ address?: string;
726
+ latitude?: number;
727
+ longitude?: number;
728
+ name?: string;
729
+ url?: string;
730
+ };
731
+ type OutputWhatsAppLocationSend = {
732
+ address?: string;
733
+ latitude: number;
734
+ longitude: number;
735
+ name?: string;
736
+ };
737
+ type OutputWhatsAppMedia = {
738
+ id?: OutputWhatsAppFileID;
739
+ mime_type?: string;
740
+ url?: string;
741
+ };
742
+ type OutputWhatsAppMessage = {
743
+ audio?: OutputWhatsAppAudio;
744
+ contact_cards?: Array<OutputWhatsAppContactCard>;
745
+ cost?: OutputMessageCost;
746
+ created_at: string;
747
+ delivered_at?: (string | null);
748
+ delivered_count?: number;
749
+ direction: ("outbound" | "inbound");
750
+ document?: OutputWhatsAppDocument;
751
+ from: OutputWhatsAppAddress;
752
+ id: OutputWhatsAppMessageID;
753
+ image?: OutputWhatsAppImage;
754
+ in_reply_to_message_id?: OutputWhatsAppMessageID;
755
+ interactive?: OutputWhatsAppInteractive;
756
+ interactive_reply?: OutputWhatsAppInteractiveReply;
757
+ last_error?: OutputWhatsAppError;
758
+ location?: OutputWhatsAppLocation;
759
+ metadata?: {
760
+ [key: string]: unknown;
761
+ };
762
+ origin?: OutputWhatsAppMessageOrigin;
763
+ reactions?: Array<OutputWhatsAppReaction>;
764
+ read_at?: (string | null);
765
+ read_count?: number;
766
+ recipient_count?: number;
767
+ reference?: OutputMessageReference;
768
+ sent_at?: (string | null);
769
+ status: OutputWhatsAppMessageStatus;
770
+ sticker?: OutputWhatsAppSticker;
771
+ tags?: Array<OutputTag>;
772
+ template?: OutputWhatsAppMessageTemplate;
773
+ text?: OutputWhatsAppText;
774
+ to: OutputWhatsAppAddress;
775
+ unsupported?: OutputWhatsAppUnsupported;
776
+ video?: OutputWhatsAppVideo;
777
+ };
778
+ type OutputWhatsAppMessageID = string;
779
+ type OutputWhatsAppMessageOrigin = string;
780
+ type OutputWhatsAppMessageStatus = ("scheduled" | "accepted" | "sent" | "delivered" | "failed" | "rejected" | "canceled" | "received");
781
+ type OutputWhatsAppMessageTemplate = {
782
+ bid_multiplier?: number;
783
+ category: OutputWhatsAppTemplateCategory;
784
+ components: Array<OutputWhatsAppMessageTemplateComponent>;
785
+ language: OutputLanguageTag;
786
+ slug: OutputTemplateSlug;
787
+ };
788
+ type OutputWhatsAppMessageTemplateCard = {
789
+ components: Array<OutputWhatsAppMessageTemplateCardComponent>;
790
+ };
791
+ type OutputWhatsAppMessageTemplateCardComponent = {
792
+ parameters?: Array<OutputWhatsAppMessageTemplateComponentParameter>;
793
+ type: string;
794
+ };
795
+ type OutputWhatsAppMessageTemplateComponent = {
796
+ cards?: Array<OutputWhatsAppMessageTemplateCard>;
797
+ parameters?: Array<OutputWhatsAppMessageTemplateComponentParameter>;
798
+ type: string;
799
+ };
800
+ type OutputWhatsAppMessageTemplateComponentParameter = {
801
+ filename?: string;
802
+ location?: OutputWhatsAppLocationSend;
803
+ name?: string;
804
+ text?: string;
805
+ type: OutputWhatsAppTemplateParameterType;
806
+ url?: string;
807
+ };
808
+ type OutputWhatsAppReaction = {
809
+ emoji: string;
810
+ from: OutputWhatsAppAddress;
811
+ };
812
+ type OutputWhatsAppSticker = ({
813
+ [key: string]: unknown;
814
+ } & (OutputWhatsAppMedia & {
815
+ animated?: boolean;
816
+ }));
817
+ type OutputWhatsAppTemplateCategory = string;
818
+ type OutputWhatsAppTemplateParameterType = string;
819
+ type OutputWhatsAppText = {
820
+ body: string;
821
+ };
822
+ type OutputWhatsAppUnsupported = {
823
+ type: string;
824
+ };
825
+ type OutputWhatsAppVideo = ({
826
+ [key: string]: unknown;
827
+ } & (OutputWhatsAppMedia & {
828
+ caption?: string;
829
+ }));
830
+ export {};