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