samva 0.34.0 → 0.35.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.
Files changed (117) hide show
  1. package/README.md +1 -1
  2. package/dist/client/sdk.gen.d.ts +224 -250
  3. package/dist/client/sdk.gen.js +84 -210
  4. package/dist/client/types.gen.d.ts +2894 -401
  5. package/dist/effect/agents.d.ts +28 -13
  6. package/dist/effect/agents.js +5 -1
  7. package/dist/effect/analytics.d.ts +15 -15
  8. package/dist/effect/api-keys.d.ts +27 -18
  9. package/dist/effect/campaigns.d.ts +721 -65
  10. package/dist/effect/categories.d.ts +3 -3
  11. package/dist/effect/contact-groups.d.ts +15 -15
  12. package/dist/effect/contacts.d.ts +56 -52
  13. package/dist/effect/conversations.d.ts +45 -45
  14. package/dist/effect/email.d.ts +82 -82
  15. package/dist/effect/errors.d.ts +1 -1
  16. package/dist/effect/errors.js +2 -2
  17. package/dist/effect/extension-installations.d.ts +11 -11
  18. package/dist/effect/extensions.d.ts +16 -16
  19. package/dist/effect/generated/agents.d.ts +1063 -33
  20. package/dist/effect/generated/agents.js +133 -11
  21. package/dist/effect/generated/analytics.d.ts +109 -136
  22. package/dist/effect/generated/analytics.js +65 -36
  23. package/dist/effect/generated/api-keys.d.ts +240 -19
  24. package/dist/effect/generated/api-keys.js +24 -8
  25. package/dist/effect/generated/attachments.d.ts +89 -1
  26. package/dist/effect/generated/attachments.js +10 -2
  27. package/dist/effect/generated/brands.d.ts +133 -1
  28. package/dist/effect/generated/brands.js +22 -10
  29. package/dist/effect/generated/campaigns.d.ts +1442 -140
  30. package/dist/effect/generated/campaigns.js +82 -20
  31. package/dist/effect/generated/contact-events.d.ts +26 -4
  32. package/dist/effect/generated/contact-events.js +5 -3
  33. package/dist/effect/generated/contact-groups.d.ts +233 -13
  34. package/dist/effect/generated/contact-groups.js +33 -17
  35. package/dist/effect/generated/contacts.d.ts +634 -96
  36. package/dist/effect/generated/contacts.js +82 -20
  37. package/dist/effect/generated/conversations.d.ts +398 -106
  38. package/dist/effect/generated/conversations.js +96 -22
  39. package/dist/effect/generated/custom-fields.d.ts +89 -1
  40. package/dist/effect/generated/custom-fields.js +11 -3
  41. package/dist/effect/generated/email.d.ts +1447 -83
  42. package/dist/effect/generated/email.js +167 -43
  43. package/dist/effect/generated/events.d.ts +51 -7
  44. package/dist/effect/generated/events.js +9 -5
  45. package/dist/effect/generated/extension-installations.d.ts +208 -10
  46. package/dist/effect/generated/extension-installations.js +26 -8
  47. package/dist/effect/generated/extensions.d.ts +123 -13
  48. package/dist/effect/generated/extensions.js +20 -10
  49. package/dist/effect/generated/feedback.d.ts +23 -1
  50. package/dist/effect/generated/feedback.js +6 -4
  51. package/dist/effect/generated/journeys.d.ts +684 -16
  52. package/dist/effect/generated/journeys.js +37 -9
  53. package/dist/effect/generated/mailboxes.d.ts +3085 -627
  54. package/dist/effect/generated/mailboxes.js +340 -141
  55. package/dist/effect/generated/media.d.ts +125 -15
  56. package/dist/effect/generated/media.js +15 -2
  57. package/dist/effect/generated/messages.d.ts +2036 -117
  58. package/dist/effect/generated/messages.js +286 -54
  59. package/dist/effect/generated/namespaces.d.ts +209 -25
  60. package/dist/effect/generated/namespaces.js +27 -9
  61. package/dist/effect/generated/newsletter-domains.d.ts +98 -12
  62. package/dist/effect/generated/newsletter-domains.js +20 -13
  63. package/dist/effect/generated/newsletter-issues.d.ts +354 -19
  64. package/dist/effect/generated/newsletter-issues.js +162 -98
  65. package/dist/effect/generated/newsletters.d.ts +123 -13
  66. package/dist/effect/generated/newsletters.js +19 -9
  67. package/dist/effect/generated/operations.d.ts +76 -10
  68. package/dist/effect/generated/operations.js +12 -6
  69. package/dist/effect/generated/organizations.d.ts +287 -7
  70. package/dist/effect/generated/organizations.js +33 -5
  71. package/dist/effect/generated/scheduled-messages.d.ts +4427 -99
  72. package/dist/effect/generated/scheduled-messages.js +71 -12
  73. package/dist/effect/generated/shared.d.ts +2213 -190
  74. package/dist/effect/generated/shared.js +527 -76
  75. package/dist/effect/generated/subscriptions.d.ts +23 -1
  76. package/dist/effect/generated/subscriptions.js +6 -4
  77. package/dist/effect/generated/templates.d.ts +1718 -136
  78. package/dist/effect/generated/templates.js +421 -226
  79. package/dist/effect/generated/topic-forms.d.ts +111 -1
  80. package/dist/effect/generated/topic-forms.js +23 -13
  81. package/dist/effect/generated/topics.d.ts +353 -43
  82. package/dist/effect/generated/topics.js +67 -19
  83. package/dist/effect/generated/webhooks.d.ts +296 -38
  84. package/dist/effect/generated/webhooks.js +58 -16
  85. package/dist/effect/generated/whoami.d.ts +35 -1
  86. package/dist/effect/generated/whoami.js +4 -2
  87. package/dist/effect/generated-metadata.d.ts +20 -0
  88. package/dist/effect/generated-metadata.js +10 -0
  89. package/dist/effect/index.js +2 -2
  90. package/dist/effect/internal/client.js +1 -1
  91. package/dist/effect/internal/email-sender.d.ts +1 -1
  92. package/dist/effect/internal/send.d.ts +1 -1
  93. package/dist/effect/journeys.d.ts +105 -19
  94. package/dist/effect/mailboxes.d.ts +405 -174
  95. package/dist/effect/media.d.ts +1 -1
  96. package/dist/effect/messages.d.ts +40 -40
  97. package/dist/effect/namespaces.d.ts +15 -15
  98. package/dist/effect/newsletter-domains.d.ts +5 -5
  99. package/dist/effect/newsletters.d.ts +1 -1
  100. package/dist/effect/operations.d.ts +11 -11
  101. package/dist/effect/organizations.d.ts +2 -2
  102. package/dist/effect/scheduled-messages.d.ts +863 -8
  103. package/dist/effect/templates.d.ts +37 -37
  104. package/dist/effect/topics.d.ts +21 -21
  105. package/dist/effect/webhooks.d.ts +22 -22
  106. package/dist/index.js +2 -2
  107. package/dist/normalize.js +13 -1
  108. package/dist/package.js +1 -1
  109. package/dist/promises/client.d.ts +1 -1
  110. package/dist/promises/client.js +2 -2
  111. package/dist/promises/errors.gen.d.ts +22 -2
  112. package/dist/promises/errors.gen.js +60 -2
  113. package/dist/promises/index.js +2 -2
  114. package/dist/promises/types.gen.d.ts +1 -1
  115. package/dist/service-map.d.ts +9 -0
  116. package/dist/service-map.js +5 -0
  117. package/package.json +9 -8
@@ -1,12 +1,12 @@
1
1
  export declare const list: ((input?: {
2
2
  readonly limit?: number | null | undefined;
3
- readonly cursor?: string | null | undefined;
4
- readonly status?: "cancelled" | "dispatched" | "dispatching" | "failed" | "paused" | "pending" | null | undefined;
3
+ readonly cursor?: string | undefined;
4
+ readonly status?: "cancelled" | "dispatched" | "dispatching" | "failed" | "paused" | "pending" | undefined;
5
5
  } | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"scheduledMessagesList">) & {
6
6
  readonly pages: (input?: {
7
7
  readonly limit?: number | null | undefined;
8
- readonly cursor?: string | null | undefined;
9
- readonly status?: "cancelled" | "dispatched" | "dispatching" | "failed" | "paused" | "pending" | null | undefined;
8
+ readonly cursor?: string | undefined;
9
+ readonly status?: "cancelled" | "dispatched" | "dispatching" | "failed" | "paused" | "pending" | undefined;
10
10
  } | undefined) => import("effect/Stream").Stream<{
11
11
  readonly items: readonly {
12
12
  readonly id: string & import("effect/Brand").Brand<"ScheduledMessageId">;
@@ -78,6 +78,243 @@ export declare const list: ((input?: {
78
78
  readonly [x: string]: string;
79
79
  } | null;
80
80
  };
81
+ } | {
82
+ readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
83
+ readonly metadata?: {
84
+ readonly [x: string]: import("./generated").JsonValue;
85
+ } | null;
86
+ readonly channel: "sms";
87
+ readonly to: readonly ({
88
+ readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
89
+ } | {
90
+ readonly phone: string;
91
+ readonly name?: string | null;
92
+ readonly displayName?: string | null;
93
+ })[];
94
+ readonly sms: {
95
+ readonly text?: string | null;
96
+ readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
97
+ readonly templateSlug?: string | null;
98
+ readonly templateData?: {
99
+ readonly [x: string]: import("./generated").JsonValue;
100
+ } | null;
101
+ };
102
+ } | {
103
+ readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
104
+ readonly metadata?: {
105
+ readonly [x: string]: import("./generated").JsonValue;
106
+ } | null;
107
+ readonly channel: "whatsapp";
108
+ readonly to: readonly ({
109
+ readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
110
+ } | {
111
+ readonly phone: string;
112
+ readonly name?: string | null;
113
+ readonly displayName?: string | null;
114
+ })[];
115
+ readonly whatsapp: {
116
+ readonly text: string;
117
+ } | {
118
+ readonly templateId: string & import("effect/Brand").Brand<"TemplateId">;
119
+ readonly templateData?: {
120
+ readonly [x: string]: import("./generated").JsonValue;
121
+ };
122
+ readonly flowToken?: string;
123
+ } | {
124
+ readonly templateSlug: string;
125
+ readonly templateData?: {
126
+ readonly [x: string]: import("./generated").JsonValue;
127
+ };
128
+ readonly flowToken?: string;
129
+ } | {
130
+ readonly media: {
131
+ readonly type: "image";
132
+ readonly caption?: string;
133
+ readonly url: string;
134
+ } | {
135
+ readonly type: "image";
136
+ readonly caption?: string;
137
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
138
+ } | {
139
+ readonly type: "video";
140
+ readonly caption?: string;
141
+ readonly url: string;
142
+ } | {
143
+ readonly type: "video";
144
+ readonly caption?: string;
145
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
146
+ } | {
147
+ readonly type: "audio";
148
+ readonly url: string;
149
+ } | {
150
+ readonly type: "audio";
151
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
152
+ } | {
153
+ readonly type: "document";
154
+ readonly caption?: string;
155
+ readonly filename?: string;
156
+ readonly url: string;
157
+ } | {
158
+ readonly type: "document";
159
+ readonly caption?: string;
160
+ readonly filename?: string;
161
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
162
+ } | {
163
+ readonly type: "sticker";
164
+ readonly url: string;
165
+ } | {
166
+ readonly type: "sticker";
167
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
168
+ };
169
+ } | {
170
+ readonly interactive: {
171
+ readonly type: "buttons";
172
+ readonly header?: {
173
+ readonly type: "text";
174
+ readonly text: string;
175
+ } | {
176
+ readonly type: "image";
177
+ readonly url: string;
178
+ } | {
179
+ readonly type: "image";
180
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
181
+ } | {
182
+ readonly type: "video";
183
+ readonly url: string;
184
+ } | {
185
+ readonly type: "video";
186
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
187
+ } | {
188
+ readonly type: "document";
189
+ readonly filename?: string;
190
+ readonly url: string;
191
+ } | {
192
+ readonly type: "document";
193
+ readonly filename?: string;
194
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
195
+ };
196
+ readonly body: string;
197
+ readonly footer?: string;
198
+ readonly buttons: readonly {
199
+ readonly id: string;
200
+ readonly title: string;
201
+ }[];
202
+ } | {
203
+ readonly type: "list";
204
+ readonly header?: {
205
+ readonly type: "text";
206
+ readonly text: string;
207
+ };
208
+ readonly body: string;
209
+ readonly footer?: string;
210
+ readonly button: string;
211
+ readonly sections: readonly {
212
+ readonly title?: string;
213
+ readonly rows: readonly {
214
+ readonly id: string;
215
+ readonly title: string;
216
+ readonly description?: string;
217
+ }[];
218
+ }[];
219
+ } | {
220
+ readonly type: "cta_url";
221
+ readonly header?: {
222
+ readonly type: "text";
223
+ readonly text: string;
224
+ } | {
225
+ readonly type: "image";
226
+ readonly url: string;
227
+ } | {
228
+ readonly type: "image";
229
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
230
+ } | {
231
+ readonly type: "video";
232
+ readonly url: string;
233
+ } | {
234
+ readonly type: "video";
235
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
236
+ } | {
237
+ readonly type: "document";
238
+ readonly filename?: string;
239
+ readonly url: string;
240
+ } | {
241
+ readonly type: "document";
242
+ readonly filename?: string;
243
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
244
+ };
245
+ readonly body: string;
246
+ readonly footer?: string;
247
+ readonly displayText: string;
248
+ readonly url: string;
249
+ } | {
250
+ readonly type: "flow";
251
+ readonly header?: {
252
+ readonly type: "text";
253
+ readonly text: string;
254
+ };
255
+ readonly body: string;
256
+ readonly footer?: string;
257
+ readonly flowId: string & import("effect/Brand").Brand<"WhatsAppFlowId">;
258
+ readonly cta: string;
259
+ readonly token?: string;
260
+ readonly action?: "data_exchange" | "navigate";
261
+ readonly screen?: string;
262
+ readonly data?: {
263
+ readonly [x: string]: import("./generated").JsonValue;
264
+ };
265
+ };
266
+ } | {
267
+ readonly reaction: {
268
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
269
+ readonly emoji: string;
270
+ };
271
+ } | {
272
+ readonly location: {
273
+ readonly latitude: number;
274
+ readonly longitude: number;
275
+ readonly name?: string;
276
+ readonly address?: string;
277
+ };
278
+ } | {
279
+ readonly contacts: readonly {
280
+ readonly name: {
281
+ readonly formattedName: string;
282
+ readonly firstName?: string;
283
+ readonly lastName?: string;
284
+ readonly middleName?: string;
285
+ readonly prefix?: string;
286
+ readonly suffix?: string;
287
+ };
288
+ readonly phones?: readonly {
289
+ readonly phone: string;
290
+ readonly type?: string;
291
+ readonly waId?: string;
292
+ }[];
293
+ readonly emails?: readonly {
294
+ readonly email: string;
295
+ readonly type?: string;
296
+ }[];
297
+ readonly urls?: readonly {
298
+ readonly url: string;
299
+ readonly type?: string;
300
+ }[];
301
+ readonly org?: {
302
+ readonly company?: string;
303
+ readonly department?: string;
304
+ readonly title?: string;
305
+ };
306
+ readonly addresses?: readonly {
307
+ readonly street?: string;
308
+ readonly city?: string;
309
+ readonly state?: string;
310
+ readonly zip?: string;
311
+ readonly country?: string;
312
+ readonly countryCode?: string;
313
+ readonly type?: string;
314
+ }[];
315
+ readonly birthday?: string;
316
+ }[];
317
+ };
81
318
  };
82
319
  readonly messageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
83
320
  readonly idempotencyKey: string | null;
@@ -91,11 +328,11 @@ export declare const list: ((input?: {
91
328
  readonly updatedAt: string;
92
329
  }[];
93
330
  readonly nextCursor: string | null;
94
- }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
331
+ }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
95
332
  readonly items: (input?: {
96
333
  readonly limit?: number | null | undefined;
97
- readonly cursor?: string | null | undefined;
98
- readonly status?: "cancelled" | "dispatched" | "dispatching" | "failed" | "paused" | "pending" | null | undefined;
334
+ readonly cursor?: string | undefined;
335
+ readonly status?: "cancelled" | "dispatched" | "dispatching" | "failed" | "paused" | "pending" | undefined;
99
336
  } | undefined) => import("effect/Stream").Stream<{
100
337
  readonly id: string & import("effect/Brand").Brand<"ScheduledMessageId">;
101
338
  readonly status: "cancelled" | "dispatched" | "dispatching" | "failed" | "paused" | "pending";
@@ -166,6 +403,243 @@ export declare const list: ((input?: {
166
403
  readonly [x: string]: string;
167
404
  } | null;
168
405
  };
406
+ } | {
407
+ readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
408
+ readonly metadata?: {
409
+ readonly [x: string]: import("./generated").JsonValue;
410
+ } | null;
411
+ readonly channel: "sms";
412
+ readonly to: readonly ({
413
+ readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
414
+ } | {
415
+ readonly phone: string;
416
+ readonly name?: string | null;
417
+ readonly displayName?: string | null;
418
+ })[];
419
+ readonly sms: {
420
+ readonly text?: string | null;
421
+ readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
422
+ readonly templateSlug?: string | null;
423
+ readonly templateData?: {
424
+ readonly [x: string]: import("./generated").JsonValue;
425
+ } | null;
426
+ };
427
+ } | {
428
+ readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
429
+ readonly metadata?: {
430
+ readonly [x: string]: import("./generated").JsonValue;
431
+ } | null;
432
+ readonly channel: "whatsapp";
433
+ readonly to: readonly ({
434
+ readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
435
+ } | {
436
+ readonly phone: string;
437
+ readonly name?: string | null;
438
+ readonly displayName?: string | null;
439
+ })[];
440
+ readonly whatsapp: {
441
+ readonly text: string;
442
+ } | {
443
+ readonly templateId: string & import("effect/Brand").Brand<"TemplateId">;
444
+ readonly templateData?: {
445
+ readonly [x: string]: import("./generated").JsonValue;
446
+ };
447
+ readonly flowToken?: string;
448
+ } | {
449
+ readonly templateSlug: string;
450
+ readonly templateData?: {
451
+ readonly [x: string]: import("./generated").JsonValue;
452
+ };
453
+ readonly flowToken?: string;
454
+ } | {
455
+ readonly media: {
456
+ readonly type: "image";
457
+ readonly caption?: string;
458
+ readonly url: string;
459
+ } | {
460
+ readonly type: "image";
461
+ readonly caption?: string;
462
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
463
+ } | {
464
+ readonly type: "video";
465
+ readonly caption?: string;
466
+ readonly url: string;
467
+ } | {
468
+ readonly type: "video";
469
+ readonly caption?: string;
470
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
471
+ } | {
472
+ readonly type: "audio";
473
+ readonly url: string;
474
+ } | {
475
+ readonly type: "audio";
476
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
477
+ } | {
478
+ readonly type: "document";
479
+ readonly caption?: string;
480
+ readonly filename?: string;
481
+ readonly url: string;
482
+ } | {
483
+ readonly type: "document";
484
+ readonly caption?: string;
485
+ readonly filename?: string;
486
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
487
+ } | {
488
+ readonly type: "sticker";
489
+ readonly url: string;
490
+ } | {
491
+ readonly type: "sticker";
492
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
493
+ };
494
+ } | {
495
+ readonly interactive: {
496
+ readonly type: "buttons";
497
+ readonly header?: {
498
+ readonly type: "text";
499
+ readonly text: string;
500
+ } | {
501
+ readonly type: "image";
502
+ readonly url: string;
503
+ } | {
504
+ readonly type: "image";
505
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
506
+ } | {
507
+ readonly type: "video";
508
+ readonly url: string;
509
+ } | {
510
+ readonly type: "video";
511
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
512
+ } | {
513
+ readonly type: "document";
514
+ readonly filename?: string;
515
+ readonly url: string;
516
+ } | {
517
+ readonly type: "document";
518
+ readonly filename?: string;
519
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
520
+ };
521
+ readonly body: string;
522
+ readonly footer?: string;
523
+ readonly buttons: readonly {
524
+ readonly id: string;
525
+ readonly title: string;
526
+ }[];
527
+ } | {
528
+ readonly type: "list";
529
+ readonly header?: {
530
+ readonly type: "text";
531
+ readonly text: string;
532
+ };
533
+ readonly body: string;
534
+ readonly footer?: string;
535
+ readonly button: string;
536
+ readonly sections: readonly {
537
+ readonly title?: string;
538
+ readonly rows: readonly {
539
+ readonly id: string;
540
+ readonly title: string;
541
+ readonly description?: string;
542
+ }[];
543
+ }[];
544
+ } | {
545
+ readonly type: "cta_url";
546
+ readonly header?: {
547
+ readonly type: "text";
548
+ readonly text: string;
549
+ } | {
550
+ readonly type: "image";
551
+ readonly url: string;
552
+ } | {
553
+ readonly type: "image";
554
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
555
+ } | {
556
+ readonly type: "video";
557
+ readonly url: string;
558
+ } | {
559
+ readonly type: "video";
560
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
561
+ } | {
562
+ readonly type: "document";
563
+ readonly filename?: string;
564
+ readonly url: string;
565
+ } | {
566
+ readonly type: "document";
567
+ readonly filename?: string;
568
+ readonly mediaId: string & import("effect/Brand").Brand<"MediaId">;
569
+ };
570
+ readonly body: string;
571
+ readonly footer?: string;
572
+ readonly displayText: string;
573
+ readonly url: string;
574
+ } | {
575
+ readonly type: "flow";
576
+ readonly header?: {
577
+ readonly type: "text";
578
+ readonly text: string;
579
+ };
580
+ readonly body: string;
581
+ readonly footer?: string;
582
+ readonly flowId: string & import("effect/Brand").Brand<"WhatsAppFlowId">;
583
+ readonly cta: string;
584
+ readonly token?: string;
585
+ readonly action?: "data_exchange" | "navigate";
586
+ readonly screen?: string;
587
+ readonly data?: {
588
+ readonly [x: string]: import("./generated").JsonValue;
589
+ };
590
+ };
591
+ } | {
592
+ readonly reaction: {
593
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
594
+ readonly emoji: string;
595
+ };
596
+ } | {
597
+ readonly location: {
598
+ readonly latitude: number;
599
+ readonly longitude: number;
600
+ readonly name?: string;
601
+ readonly address?: string;
602
+ };
603
+ } | {
604
+ readonly contacts: readonly {
605
+ readonly name: {
606
+ readonly formattedName: string;
607
+ readonly firstName?: string;
608
+ readonly lastName?: string;
609
+ readonly middleName?: string;
610
+ readonly prefix?: string;
611
+ readonly suffix?: string;
612
+ };
613
+ readonly phones?: readonly {
614
+ readonly phone: string;
615
+ readonly type?: string;
616
+ readonly waId?: string;
617
+ }[];
618
+ readonly emails?: readonly {
619
+ readonly email: string;
620
+ readonly type?: string;
621
+ }[];
622
+ readonly urls?: readonly {
623
+ readonly url: string;
624
+ readonly type?: string;
625
+ }[];
626
+ readonly org?: {
627
+ readonly company?: string;
628
+ readonly department?: string;
629
+ readonly title?: string;
630
+ };
631
+ readonly addresses?: readonly {
632
+ readonly street?: string;
633
+ readonly city?: string;
634
+ readonly state?: string;
635
+ readonly zip?: string;
636
+ readonly country?: string;
637
+ readonly countryCode?: string;
638
+ readonly type?: string;
639
+ }[];
640
+ readonly birthday?: string;
641
+ }[];
642
+ };
169
643
  };
170
644
  readonly messageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
171
645
  readonly idempotencyKey: string | null;
@@ -177,7 +651,7 @@ export declare const list: ((input?: {
177
651
  readonly memberRole: string;
178
652
  readonly createdAt: string;
179
653
  readonly updatedAt: string;
180
- }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
654
+ }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
181
655
  };
182
656
  export declare const create: (input: {
183
657
  readonly send: {
@@ -293,6 +767,387 @@ export declare const create: (input: {
293
767
  readonly [x: string]: string | undefined;
294
768
  } | null | undefined;
295
769
  };
770
+ } | {
771
+ readonly conversationId?: string | null | undefined;
772
+ readonly metadata?: {
773
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | any | {
774
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
775
+ } | null)[] | {
776
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
777
+ } | null)[] | {
778
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
779
+ } | null)[] | {
780
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
781
+ } | null)[] | {
782
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
783
+ } | null)[] | {
784
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
785
+ } | null)[] | {
786
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
787
+ } | null)[] | {
788
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
789
+ } | null)[] | {
790
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
791
+ } | null)[] | {
792
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
793
+ } | null)[] | {
794
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
795
+ } | null)[] | {
796
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
797
+ } | null | undefined;
798
+ } | null | undefined;
799
+ readonly channel: "sms";
800
+ readonly to: readonly ({
801
+ readonly contactId: string;
802
+ } | {
803
+ readonly phone: string;
804
+ readonly name?: string | null | undefined;
805
+ readonly displayName?: string | null | undefined;
806
+ })[];
807
+ readonly sms: {
808
+ readonly text?: string | null | undefined;
809
+ readonly templateId?: string | null | undefined;
810
+ readonly templateSlug?: string | null | undefined;
811
+ readonly templateData?: {
812
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | any | {
813
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
814
+ } | null)[] | {
815
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
816
+ } | null)[] | {
817
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
818
+ } | null)[] | {
819
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
820
+ } | null)[] | {
821
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
822
+ } | null)[] | {
823
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
824
+ } | null)[] | {
825
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
826
+ } | null)[] | {
827
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
828
+ } | null)[] | {
829
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
830
+ } | null)[] | {
831
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
832
+ } | null)[] | {
833
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
834
+ } | null)[] | {
835
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
836
+ } | null | undefined;
837
+ } | null | undefined;
838
+ };
839
+ } | {
840
+ readonly conversationId?: string | null | undefined;
841
+ readonly metadata?: {
842
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | any | {
843
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
844
+ } | null)[] | {
845
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
846
+ } | null)[] | {
847
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
848
+ } | null)[] | {
849
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
850
+ } | null)[] | {
851
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
852
+ } | null)[] | {
853
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
854
+ } | null)[] | {
855
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
856
+ } | null)[] | {
857
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
858
+ } | null)[] | {
859
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
860
+ } | null)[] | {
861
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
862
+ } | null)[] | {
863
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
864
+ } | null)[] | {
865
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
866
+ } | null | undefined;
867
+ } | null | undefined;
868
+ readonly channel: "whatsapp";
869
+ readonly to: readonly ({
870
+ readonly contactId: string;
871
+ } | {
872
+ readonly phone: string;
873
+ readonly name?: string | null | undefined;
874
+ readonly displayName?: string | null | undefined;
875
+ })[];
876
+ readonly whatsapp: {
877
+ readonly text: string;
878
+ } | {
879
+ readonly templateId: string;
880
+ readonly templateData?: {
881
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | any | {
882
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
883
+ } | null)[] | {
884
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
885
+ } | null)[] | {
886
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
887
+ } | null)[] | {
888
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
889
+ } | null)[] | {
890
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
891
+ } | null)[] | {
892
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
893
+ } | null)[] | {
894
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
895
+ } | null)[] | {
896
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
897
+ } | null)[] | {
898
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
899
+ } | null)[] | {
900
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
901
+ } | null)[] | {
902
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
903
+ } | null)[] | {
904
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
905
+ } | null | undefined;
906
+ } | undefined;
907
+ readonly flowToken?: string | undefined;
908
+ } | {
909
+ readonly templateSlug: string;
910
+ readonly templateData?: {
911
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | any | {
912
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
913
+ } | null)[] | {
914
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
915
+ } | null)[] | {
916
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
917
+ } | null)[] | {
918
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
919
+ } | null)[] | {
920
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
921
+ } | null)[] | {
922
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
923
+ } | null)[] | {
924
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
925
+ } | null)[] | {
926
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
927
+ } | null)[] | {
928
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
929
+ } | null)[] | {
930
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
931
+ } | null)[] | {
932
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
933
+ } | null)[] | {
934
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
935
+ } | null | undefined;
936
+ } | undefined;
937
+ readonly flowToken?: string | undefined;
938
+ } | {
939
+ readonly media: {
940
+ readonly type: "image";
941
+ readonly caption?: string | undefined;
942
+ readonly url: string;
943
+ } | {
944
+ readonly type: "image";
945
+ readonly caption?: string | undefined;
946
+ readonly mediaId: string;
947
+ } | {
948
+ readonly type: "video";
949
+ readonly caption?: string | undefined;
950
+ readonly url: string;
951
+ } | {
952
+ readonly type: "video";
953
+ readonly caption?: string | undefined;
954
+ readonly mediaId: string;
955
+ } | {
956
+ readonly type: "audio";
957
+ readonly url: string;
958
+ } | {
959
+ readonly type: "audio";
960
+ readonly mediaId: string;
961
+ } | {
962
+ readonly type: "document";
963
+ readonly caption?: string | undefined;
964
+ readonly filename?: string | undefined;
965
+ readonly url: string;
966
+ } | {
967
+ readonly type: "document";
968
+ readonly caption?: string | undefined;
969
+ readonly filename?: string | undefined;
970
+ readonly mediaId: string;
971
+ } | {
972
+ readonly type: "sticker";
973
+ readonly url: string;
974
+ } | {
975
+ readonly type: "sticker";
976
+ readonly mediaId: string;
977
+ };
978
+ } | {
979
+ readonly interactive: {
980
+ readonly type: "buttons";
981
+ readonly header?: {
982
+ readonly type: "text";
983
+ readonly text: string;
984
+ } | {
985
+ readonly type: "image";
986
+ readonly url: string;
987
+ } | {
988
+ readonly type: "image";
989
+ readonly mediaId: string;
990
+ } | {
991
+ readonly type: "video";
992
+ readonly url: string;
993
+ } | {
994
+ readonly type: "video";
995
+ readonly mediaId: string;
996
+ } | {
997
+ readonly type: "document";
998
+ readonly filename?: string | undefined;
999
+ readonly url: string;
1000
+ } | {
1001
+ readonly type: "document";
1002
+ readonly filename?: string | undefined;
1003
+ readonly mediaId: string;
1004
+ } | undefined;
1005
+ readonly body: string;
1006
+ readonly footer?: string | undefined;
1007
+ readonly buttons: readonly {
1008
+ readonly id: string;
1009
+ readonly title: string;
1010
+ }[];
1011
+ } | {
1012
+ readonly type: "list";
1013
+ readonly header?: {
1014
+ readonly type: "text";
1015
+ readonly text: string;
1016
+ } | undefined;
1017
+ readonly body: string;
1018
+ readonly footer?: string | undefined;
1019
+ readonly button: string;
1020
+ readonly sections: readonly {
1021
+ readonly title?: string | undefined;
1022
+ readonly rows: readonly {
1023
+ readonly id: string;
1024
+ readonly title: string;
1025
+ readonly description?: string | undefined;
1026
+ }[];
1027
+ }[];
1028
+ } | {
1029
+ readonly type: "cta_url";
1030
+ readonly header?: {
1031
+ readonly type: "text";
1032
+ readonly text: string;
1033
+ } | {
1034
+ readonly type: "image";
1035
+ readonly url: string;
1036
+ } | {
1037
+ readonly type: "image";
1038
+ readonly mediaId: string;
1039
+ } | {
1040
+ readonly type: "video";
1041
+ readonly url: string;
1042
+ } | {
1043
+ readonly type: "video";
1044
+ readonly mediaId: string;
1045
+ } | {
1046
+ readonly type: "document";
1047
+ readonly filename?: string | undefined;
1048
+ readonly url: string;
1049
+ } | {
1050
+ readonly type: "document";
1051
+ readonly filename?: string | undefined;
1052
+ readonly mediaId: string;
1053
+ } | undefined;
1054
+ readonly body: string;
1055
+ readonly footer?: string | undefined;
1056
+ readonly displayText: string;
1057
+ readonly url: string;
1058
+ } | {
1059
+ readonly type: "flow";
1060
+ readonly header?: {
1061
+ readonly type: "text";
1062
+ readonly text: string;
1063
+ } | undefined;
1064
+ readonly body: string;
1065
+ readonly footer?: string | undefined;
1066
+ readonly flowId: string;
1067
+ readonly cta: string;
1068
+ readonly token?: string | undefined;
1069
+ readonly action?: "data_exchange" | "navigate" | undefined;
1070
+ readonly screen?: string | undefined;
1071
+ readonly data?: {
1072
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | any | {
1073
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
1074
+ } | null)[] | {
1075
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
1076
+ } | null)[] | {
1077
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
1078
+ } | null)[] | {
1079
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
1080
+ } | null)[] | {
1081
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
1082
+ } | null)[] | {
1083
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
1084
+ } | null)[] | {
1085
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
1086
+ } | null)[] | {
1087
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
1088
+ } | null)[] | {
1089
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
1090
+ } | null)[] | {
1091
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
1092
+ } | null)[] | {
1093
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
1094
+ } | null)[] | {
1095
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
1096
+ } | null | undefined;
1097
+ } | undefined;
1098
+ };
1099
+ } | {
1100
+ readonly reaction: {
1101
+ readonly messageId: string;
1102
+ readonly emoji: string;
1103
+ };
1104
+ } | {
1105
+ readonly location: {
1106
+ readonly latitude: number;
1107
+ readonly longitude: number;
1108
+ readonly name?: string | undefined;
1109
+ readonly address?: string | undefined;
1110
+ };
1111
+ } | {
1112
+ readonly contacts: readonly {
1113
+ readonly name: {
1114
+ readonly formattedName: string;
1115
+ readonly firstName?: string | undefined;
1116
+ readonly lastName?: string | undefined;
1117
+ readonly middleName?: string | undefined;
1118
+ readonly prefix?: string | undefined;
1119
+ readonly suffix?: string | undefined;
1120
+ };
1121
+ readonly phones?: readonly {
1122
+ readonly phone: string;
1123
+ readonly type?: string | undefined;
1124
+ readonly waId?: string | undefined;
1125
+ }[] | undefined;
1126
+ readonly emails?: readonly {
1127
+ readonly email: string;
1128
+ readonly type?: string | undefined;
1129
+ }[] | undefined;
1130
+ readonly urls?: readonly {
1131
+ readonly url: string;
1132
+ readonly type?: string | undefined;
1133
+ }[] | undefined;
1134
+ readonly org?: {
1135
+ readonly company?: string | undefined;
1136
+ readonly department?: string | undefined;
1137
+ readonly title?: string | undefined;
1138
+ } | undefined;
1139
+ readonly addresses?: readonly {
1140
+ readonly street?: string | undefined;
1141
+ readonly city?: string | undefined;
1142
+ readonly state?: string | undefined;
1143
+ readonly zip?: string | undefined;
1144
+ readonly country?: string | undefined;
1145
+ readonly countryCode?: string | undefined;
1146
+ readonly type?: string | undefined;
1147
+ }[] | undefined;
1148
+ readonly birthday?: string | undefined;
1149
+ }[];
1150
+ };
296
1151
  };
297
1152
  readonly scheduledFor: Date;
298
1153
  readonly timezone?: string | null | undefined;