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,13 +1,29 @@
1
1
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
2
2
  import * as Schema from "effect/Schema";
3
- import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactId, Cursor, EmailSenderId, ForbiddenError, GatewayTimeoutError, InternalError, MailboxId, NamespaceId, PaymentRequiredError, ResourceNotFoundError, TemplateId, TopicContactRef, TopicId, UnauthorizedError, ValidationError } from "./shared";
3
+ import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactId, EmailSenderId, ForbiddenError, GatewayTimeoutError, InternalError, MailboxId, MalformedRequestError, NamespaceId, PaymentRequiredError, ResourceNotFoundError, TemplateId, TopicContactRef, TopicId, UnauthorizedError, ValidationError } from "./shared";
4
4
  export type TopicSubscriptionCounts = {
5
+ readonly sms: {
6
+ readonly subscribed: number;
7
+ readonly unsubscribed: number;
8
+ };
9
+ readonly whatsapp: {
10
+ readonly subscribed: number;
11
+ readonly unsubscribed: number;
12
+ };
5
13
  readonly email: {
6
14
  readonly subscribed: number;
7
15
  readonly unsubscribed: number;
8
16
  };
9
17
  };
10
18
  export declare const TopicSubscriptionCounts: Schema.Struct<{
19
+ readonly sms: Schema.Struct<{
20
+ readonly subscribed: Schema.Finite;
21
+ readonly unsubscribed: Schema.Finite;
22
+ }>;
23
+ readonly whatsapp: Schema.Struct<{
24
+ readonly subscribed: Schema.Finite;
25
+ readonly unsubscribed: Schema.Finite;
26
+ }>;
11
27
  readonly email: Schema.Struct<{
12
28
  readonly subscribed: Schema.Finite;
13
29
  readonly unsubscribed: Schema.Finite;
@@ -21,7 +37,7 @@ export declare const TopicSetSubscriptionsResult: Schema.Struct<{
21
37
  }>;
22
38
  export type TopicSubscription = {
23
39
  readonly contactId: ContactId;
24
- readonly channel: "email";
40
+ readonly channel: "sms" | "whatsapp" | "email";
25
41
  readonly status: "subscribed" | "unsubscribed";
26
42
  readonly source: string;
27
43
  readonly subscribedAt: string | null;
@@ -31,7 +47,7 @@ export type TopicSubscription = {
31
47
  };
32
48
  export declare const TopicSubscription: Schema.Struct<{
33
49
  readonly contactId: Schema.brand<Schema.String, "ContactId">;
34
- readonly channel: Schema.Literal<"email">;
50
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
35
51
  readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
36
52
  readonly source: Schema.String;
37
53
  readonly subscribedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -41,7 +57,7 @@ export declare const TopicSubscription: Schema.Struct<{
41
57
  }>;
42
58
  export type TopicSubscriptionCheck = {
43
59
  readonly contactId: ContactId | null;
44
- readonly channel: "email";
60
+ readonly channel: "sms" | "whatsapp" | "email";
45
61
  readonly topics: ReadonlyArray<{
46
62
  readonly topicId: TopicId;
47
63
  readonly topicName: string;
@@ -50,7 +66,7 @@ export type TopicSubscriptionCheck = {
50
66
  };
51
67
  export declare const TopicSubscriptionCheck: Schema.Struct<{
52
68
  readonly contactId: Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>;
53
- readonly channel: Schema.Literal<"email">;
69
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
54
70
  readonly topics: Schema.$Array<Schema.Struct<{
55
71
  readonly topicId: Schema.brand<Schema.String, "TopicId">;
56
72
  readonly topicName: Schema.String;
@@ -82,6 +98,14 @@ export declare const Topic: Schema.Struct<{
82
98
  readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
83
99
  readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
84
100
  readonly subscriptions: Schema.Struct<{
101
+ readonly sms: Schema.Struct<{
102
+ readonly subscribed: Schema.Finite;
103
+ readonly unsubscribed: Schema.Finite;
104
+ }>;
105
+ readonly whatsapp: Schema.Struct<{
106
+ readonly subscribed: Schema.Finite;
107
+ readonly unsubscribed: Schema.Finite;
108
+ }>;
85
109
  readonly email: Schema.Struct<{
86
110
  readonly subscribed: Schema.Finite;
87
111
  readonly unsubscribed: Schema.Finite;
@@ -97,7 +121,7 @@ export type TopicSubscriptionPage = {
97
121
  export declare const TopicSubscriptionPage: Schema.Struct<{
98
122
  readonly items: Schema.$Array<Schema.Struct<{
99
123
  readonly contactId: Schema.brand<Schema.String, "ContactId">;
100
- readonly channel: Schema.Literal<"email">;
124
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
101
125
  readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
102
126
  readonly source: Schema.String;
103
127
  readonly subscribedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -122,6 +146,14 @@ export declare const TopicList: Schema.Struct<{
122
146
  readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
123
147
  readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
124
148
  readonly subscriptions: Schema.Struct<{
149
+ readonly sms: Schema.Struct<{
150
+ readonly subscribed: Schema.Finite;
151
+ readonly unsubscribed: Schema.Finite;
152
+ }>;
153
+ readonly whatsapp: Schema.Struct<{
154
+ readonly subscribed: Schema.Finite;
155
+ readonly unsubscribed: Schema.Finite;
156
+ }>;
125
157
  readonly email: Schema.Struct<{
126
158
  readonly subscribed: Schema.Finite;
127
159
  readonly unsubscribed: Schema.Finite;
@@ -132,10 +164,10 @@ export declare const TopicList: Schema.Struct<{
132
164
  }>>;
133
165
  }>;
134
166
  export type TopicsListQuery = {
135
- readonly namespaceId?: NamespaceId | null;
167
+ readonly namespaceId?: NamespaceId;
136
168
  };
137
169
  export declare const TopicsListQuery: Schema.Struct<{
138
- readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
170
+ readonly namespaceId: Schema.optionalKey<Schema.brand<Schema.String, "NamespaceId">>;
139
171
  }>;
140
172
  export type TopicsList200 = TopicList;
141
173
  export declare const TopicsList200: Schema.Struct<{
@@ -150,6 +182,14 @@ export declare const TopicsList200: Schema.Struct<{
150
182
  readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
151
183
  readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
152
184
  readonly subscriptions: Schema.Struct<{
185
+ readonly sms: Schema.Struct<{
186
+ readonly subscribed: Schema.Finite;
187
+ readonly unsubscribed: Schema.Finite;
188
+ }>;
189
+ readonly whatsapp: Schema.Struct<{
190
+ readonly subscribed: Schema.Finite;
191
+ readonly unsubscribed: Schema.Finite;
192
+ }>;
153
193
  readonly email: Schema.Struct<{
154
194
  readonly subscribed: Schema.Finite;
155
195
  readonly unsubscribed: Schema.Finite;
@@ -159,6 +199,8 @@ export declare const TopicsList200: Schema.Struct<{
159
199
  readonly updatedAt: Schema.String;
160
200
  }>>;
161
201
  }>;
202
+ export type TopicsList400 = MalformedRequestError;
203
+ export declare const TopicsList400: typeof MalformedRequestError;
162
204
  export type TopicsList401 = UnauthorizedError;
163
205
  export declare const TopicsList401: typeof UnauthorizedError;
164
206
  export type TopicsList403 = ForbiddenError;
@@ -199,6 +241,14 @@ export declare const TopicsCreate201: Schema.Struct<{
199
241
  readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
200
242
  readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
201
243
  readonly subscriptions: Schema.Struct<{
244
+ readonly sms: Schema.Struct<{
245
+ readonly subscribed: Schema.Finite;
246
+ readonly unsubscribed: Schema.Finite;
247
+ }>;
248
+ readonly whatsapp: Schema.Struct<{
249
+ readonly subscribed: Schema.Finite;
250
+ readonly unsubscribed: Schema.Finite;
251
+ }>;
202
252
  readonly email: Schema.Struct<{
203
253
  readonly subscribed: Schema.Finite;
204
254
  readonly unsubscribed: Schema.Finite;
@@ -207,6 +257,8 @@ export declare const TopicsCreate201: Schema.Struct<{
207
257
  readonly createdAt: Schema.String;
208
258
  readonly updatedAt: Schema.String;
209
259
  }>;
260
+ export type TopicsCreate400 = MalformedRequestError;
261
+ export declare const TopicsCreate400: typeof MalformedRequestError;
210
262
  export type TopicsCreate401 = UnauthorizedError;
211
263
  export declare const TopicsCreate401: typeof UnauthorizedError;
212
264
  export type TopicsCreate403 = ForbiddenError;
@@ -239,6 +291,14 @@ export declare const TopicsGet200: Schema.Struct<{
239
291
  readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
240
292
  readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
241
293
  readonly subscriptions: Schema.Struct<{
294
+ readonly sms: Schema.Struct<{
295
+ readonly subscribed: Schema.Finite;
296
+ readonly unsubscribed: Schema.Finite;
297
+ }>;
298
+ readonly whatsapp: Schema.Struct<{
299
+ readonly subscribed: Schema.Finite;
300
+ readonly unsubscribed: Schema.Finite;
301
+ }>;
242
302
  readonly email: Schema.Struct<{
243
303
  readonly subscribed: Schema.Finite;
244
304
  readonly unsubscribed: Schema.Finite;
@@ -247,6 +307,8 @@ export declare const TopicsGet200: Schema.Struct<{
247
307
  readonly createdAt: Schema.String;
248
308
  readonly updatedAt: Schema.String;
249
309
  }>;
310
+ export type TopicsGet400 = MalformedRequestError;
311
+ export declare const TopicsGet400: typeof MalformedRequestError;
250
312
  export type TopicsGet401 = UnauthorizedError;
251
313
  export declare const TopicsGet401: typeof UnauthorizedError;
252
314
  export type TopicsGet403 = ForbiddenError;
@@ -271,6 +333,8 @@ export type TopicsRemove200 = {
271
333
  export declare const TopicsRemove200: Schema.Struct<{
272
334
  readonly success: Schema.Boolean;
273
335
  }>;
336
+ export type TopicsRemove400 = MalformedRequestError;
337
+ export declare const TopicsRemove400: typeof MalformedRequestError;
274
338
  export type TopicsRemove401 = UnauthorizedError;
275
339
  export declare const TopicsRemove401: typeof UnauthorizedError;
276
340
  export type TopicsRemove403 = ForbiddenError;
@@ -319,6 +383,14 @@ export declare const TopicsUpdate200: Schema.Struct<{
319
383
  readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
320
384
  readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
321
385
  readonly subscriptions: Schema.Struct<{
386
+ readonly sms: Schema.Struct<{
387
+ readonly subscribed: Schema.Finite;
388
+ readonly unsubscribed: Schema.Finite;
389
+ }>;
390
+ readonly whatsapp: Schema.Struct<{
391
+ readonly subscribed: Schema.Finite;
392
+ readonly unsubscribed: Schema.Finite;
393
+ }>;
322
394
  readonly email: Schema.Struct<{
323
395
  readonly subscribed: Schema.Finite;
324
396
  readonly unsubscribed: Schema.Finite;
@@ -327,6 +399,8 @@ export declare const TopicsUpdate200: Schema.Struct<{
327
399
  readonly createdAt: Schema.String;
328
400
  readonly updatedAt: Schema.String;
329
401
  }>;
402
+ export type TopicsUpdate400 = MalformedRequestError;
403
+ export declare const TopicsUpdate400: typeof MalformedRequestError;
330
404
  export type TopicsUpdate401 = UnauthorizedError;
331
405
  export declare const TopicsUpdate401: typeof UnauthorizedError;
332
406
  export type TopicsUpdate403 = ForbiddenError;
@@ -359,6 +433,14 @@ export declare const TopicsSetDefault200: Schema.Struct<{
359
433
  readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
360
434
  readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
361
435
  readonly subscriptions: Schema.Struct<{
436
+ readonly sms: Schema.Struct<{
437
+ readonly subscribed: Schema.Finite;
438
+ readonly unsubscribed: Schema.Finite;
439
+ }>;
440
+ readonly whatsapp: Schema.Struct<{
441
+ readonly subscribed: Schema.Finite;
442
+ readonly unsubscribed: Schema.Finite;
443
+ }>;
362
444
  readonly email: Schema.Struct<{
363
445
  readonly subscribed: Schema.Finite;
364
446
  readonly unsubscribed: Schema.Finite;
@@ -367,6 +449,8 @@ export declare const TopicsSetDefault200: Schema.Struct<{
367
449
  readonly createdAt: Schema.String;
368
450
  readonly updatedAt: Schema.String;
369
451
  }>;
452
+ export type TopicsSetDefault400 = MalformedRequestError;
453
+ export declare const TopicsSetDefault400: typeof MalformedRequestError;
370
454
  export type TopicsSetDefault401 = UnauthorizedError;
371
455
  export declare const TopicsSetDefault401: typeof UnauthorizedError;
372
456
  export type TopicsSetDefault403 = ForbiddenError;
@@ -387,21 +471,21 @@ export declare const TopicsListSubscriptionsPathParams: Schema.Struct<{
387
471
  }>;
388
472
  export type TopicsListSubscriptionsQuery = {
389
473
  readonly limit?: number | null;
390
- readonly cursor?: Cursor | null;
391
- readonly channel?: "email" | null;
392
- readonly status?: "subscribed" | "unsubscribed" | null;
474
+ readonly cursor?: string;
475
+ readonly channel?: "sms" | "whatsapp" | "email";
476
+ readonly status?: "subscribed" | "unsubscribed";
393
477
  };
394
478
  export declare const TopicsListSubscriptionsQuery: Schema.Struct<{
395
479
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
396
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
397
- readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
398
- readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>, Schema.Null]>>;
480
+ readonly cursor: Schema.optionalKey<Schema.String>;
481
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
482
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>>;
399
483
  }>;
400
484
  export type TopicsListSubscriptions200 = TopicSubscriptionPage;
401
485
  export declare const TopicsListSubscriptions200: Schema.Struct<{
402
486
  readonly items: Schema.$Array<Schema.Struct<{
403
487
  readonly contactId: Schema.brand<Schema.String, "ContactId">;
404
- readonly channel: Schema.Literal<"email">;
488
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
405
489
  readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
406
490
  readonly source: Schema.String;
407
491
  readonly subscribedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -411,6 +495,8 @@ export declare const TopicsListSubscriptions200: Schema.Struct<{
411
495
  }>>;
412
496
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
413
497
  }>;
498
+ export type TopicsListSubscriptions400 = MalformedRequestError;
499
+ export declare const TopicsListSubscriptions400: typeof MalformedRequestError;
414
500
  export type TopicsListSubscriptions401 = UnauthorizedError;
415
501
  export declare const TopicsListSubscriptions401: typeof UnauthorizedError;
416
502
  export type TopicsListSubscriptions403 = ForbiddenError;
@@ -431,7 +517,7 @@ export declare const TopicsSetSubscriptionsPathParams: Schema.Struct<{
431
517
  }>;
432
518
  export type TopicsSetSubscriptionsRequestJson = {
433
519
  readonly contacts: ReadonlyArray<TopicContactRef>;
434
- readonly channel: "email";
520
+ readonly channel: "sms" | "whatsapp" | "email";
435
521
  readonly status: "subscribed" | "unsubscribed";
436
522
  readonly source?: string | null;
437
523
  };
@@ -443,7 +529,7 @@ export declare const TopicsSetSubscriptionsRequestJson: Schema.Struct<{
443
529
  }>, Schema.Struct<{
444
530
  readonly phone: Schema.String;
445
531
  }>]>>;
446
- readonly channel: Schema.Literal<"email">;
532
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
447
533
  readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
448
534
  readonly source: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
449
535
  }>;
@@ -451,6 +537,8 @@ export type TopicsSetSubscriptions200 = TopicSetSubscriptionsResult;
451
537
  export declare const TopicsSetSubscriptions200: Schema.Struct<{
452
538
  readonly updated: Schema.Finite;
453
539
  }>;
540
+ export type TopicsSetSubscriptions400 = MalformedRequestError;
541
+ export declare const TopicsSetSubscriptions400: typeof MalformedRequestError;
454
542
  export type TopicsSetSubscriptions401 = UnauthorizedError;
455
543
  export declare const TopicsSetSubscriptions401: typeof UnauthorizedError;
456
544
  export type TopicsSetSubscriptions402 = PaymentRequiredError;
@@ -468,31 +556,33 @@ export declare const TopicsSetSubscriptions502: typeof BillingProviderError;
468
556
  export type TopicsSetSubscriptions504 = GatewayTimeoutError;
469
557
  export declare const TopicsSetSubscriptions504: typeof GatewayTimeoutError;
470
558
  export type TopicsCheckSubscriptionQuery = {
471
- readonly contactId?: ContactId | null;
472
- readonly email?: string | null;
473
- readonly phone?: string | null;
474
- readonly namespaceId?: NamespaceId | null;
475
- readonly channel: "email";
476
- readonly topicIds?: string | null;
559
+ readonly contactId?: ContactId;
560
+ readonly email?: string;
561
+ readonly phone?: string;
562
+ readonly namespaceId?: NamespaceId;
563
+ readonly channel: "sms" | "whatsapp" | "email";
564
+ readonly topicIds?: string;
477
565
  };
478
566
  export declare const TopicsCheckSubscriptionQuery: Schema.Struct<{
479
- readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
480
- readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
481
- readonly phone: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
482
- readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
483
- readonly channel: Schema.Literal<"email">;
484
- readonly topicIds: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
567
+ readonly contactId: Schema.optionalKey<Schema.brand<Schema.String, "ContactId">>;
568
+ readonly email: Schema.optionalKey<Schema.String>;
569
+ readonly phone: Schema.optionalKey<Schema.String>;
570
+ readonly namespaceId: Schema.optionalKey<Schema.brand<Schema.String, "NamespaceId">>;
571
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
572
+ readonly topicIds: Schema.optionalKey<Schema.String>;
485
573
  }>;
486
574
  export type TopicsCheckSubscription200 = TopicSubscriptionCheck;
487
575
  export declare const TopicsCheckSubscription200: Schema.Struct<{
488
576
  readonly contactId: Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>;
489
- readonly channel: Schema.Literal<"email">;
577
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
490
578
  readonly topics: Schema.$Array<Schema.Struct<{
491
579
  readonly topicId: Schema.brand<Schema.String, "TopicId">;
492
580
  readonly topicName: Schema.String;
493
581
  readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
494
582
  }>>;
495
583
  }>;
584
+ export type TopicsCheckSubscription400 = MalformedRequestError;
585
+ export declare const TopicsCheckSubscription400: typeof MalformedRequestError;
496
586
  export type TopicsCheckSubscription401 = UnauthorizedError;
497
587
  export declare const TopicsCheckSubscription401: typeof UnauthorizedError;
498
588
  export type TopicsCheckSubscription403 = ForbiddenError;
@@ -506,15 +596,15 @@ export declare const TopicsCheckSubscription500: typeof InternalError;
506
596
  export type TopicsCheckSubscription504 = GatewayTimeoutError;
507
597
  export declare const TopicsCheckSubscription504: typeof GatewayTimeoutError;
508
598
  declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpoint.HttpApiEndpoint<"topicsCheckSubscription", "GET", "/v1/topics/check", never, Schema.toCodecStringTree<Schema.Struct<{
509
- readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
510
- readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
511
- readonly phone: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
512
- readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
513
- readonly channel: Schema.Literal<"email">;
514
- readonly topicIds: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
599
+ readonly contactId: Schema.optionalKey<Schema.brand<Schema.String, "ContactId">>;
600
+ readonly email: Schema.optionalKey<Schema.String>;
601
+ readonly phone: Schema.optionalKey<Schema.String>;
602
+ readonly namespaceId: Schema.optionalKey<Schema.brand<Schema.String, "NamespaceId">>;
603
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
604
+ readonly topicIds: Schema.optionalKey<Schema.String>;
515
605
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
516
606
  readonly contactId: Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>;
517
- readonly channel: Schema.Literal<"email">;
607
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
518
608
  readonly topics: Schema.$Array<Schema.Struct<{
519
609
  readonly topicId: Schema.brand<Schema.String, "TopicId">;
520
610
  readonly topicName: Schema.String;
@@ -548,6 +638,26 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
548
638
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
549
639
  readonly message: Schema.String;
550
640
  readonly retryAfterSeconds: Schema.Finite;
641
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
642
+ readonly _tag: "MalformedRequestError";
643
+ readonly message: string;
644
+ readonly fields: {
645
+ readonly [x: string]: readonly string[];
646
+ };
647
+ }, readonly [Schema.Struct<{
648
+ readonly _tag: Schema.tag<"MalformedRequestError">;
649
+ readonly message: Schema.String;
650
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
651
+ }>], {
652
+ readonly _tag: "MalformedRequestError";
653
+ readonly message: string;
654
+ readonly fields: {
655
+ readonly [x: string]: readonly string[];
656
+ };
657
+ }>, Schema.Struct<{
658
+ readonly _tag: Schema.tag<"MalformedRequestError">;
659
+ readonly message: Schema.String;
660
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
551
661
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
552
662
  readonly _tag: "ResourceNotFoundError";
553
663
  readonly resource: string;
@@ -619,6 +729,14 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
619
729
  readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
620
730
  readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
621
731
  readonly subscriptions: Schema.Struct<{
732
+ readonly sms: Schema.Struct<{
733
+ readonly subscribed: Schema.Finite;
734
+ readonly unsubscribed: Schema.Finite;
735
+ }>;
736
+ readonly whatsapp: Schema.Struct<{
737
+ readonly subscribed: Schema.Finite;
738
+ readonly unsubscribed: Schema.Finite;
739
+ }>;
622
740
  readonly email: Schema.Struct<{
623
741
  readonly subscribed: Schema.Finite;
624
742
  readonly unsubscribed: Schema.Finite;
@@ -674,6 +792,26 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
674
792
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
675
793
  readonly message: Schema.String;
676
794
  readonly retryAfterSeconds: Schema.Finite;
795
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
796
+ readonly _tag: "MalformedRequestError";
797
+ readonly message: string;
798
+ readonly fields: {
799
+ readonly [x: string]: readonly string[];
800
+ };
801
+ }, readonly [Schema.Struct<{
802
+ readonly _tag: Schema.tag<"MalformedRequestError">;
803
+ readonly message: Schema.String;
804
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
805
+ }>], {
806
+ readonly _tag: "MalformedRequestError";
807
+ readonly message: string;
808
+ readonly fields: {
809
+ readonly [x: string]: readonly string[];
810
+ };
811
+ }>, Schema.Struct<{
812
+ readonly _tag: Schema.tag<"MalformedRequestError">;
813
+ readonly message: Schema.String;
814
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
677
815
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
678
816
  readonly _tag: "ResourceNotFoundError";
679
817
  readonly resource: string;
@@ -739,6 +877,14 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
739
877
  readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
740
878
  readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
741
879
  readonly subscriptions: Schema.Struct<{
880
+ readonly sms: Schema.Struct<{
881
+ readonly subscribed: Schema.Finite;
882
+ readonly unsubscribed: Schema.Finite;
883
+ }>;
884
+ readonly whatsapp: Schema.Struct<{
885
+ readonly subscribed: Schema.Finite;
886
+ readonly unsubscribed: Schema.Finite;
887
+ }>;
742
888
  readonly email: Schema.Struct<{
743
889
  readonly subscribed: Schema.Finite;
744
890
  readonly unsubscribed: Schema.Finite;
@@ -774,6 +920,26 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
774
920
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
775
921
  readonly message: Schema.String;
776
922
  readonly retryAfterSeconds: Schema.Finite;
923
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
924
+ readonly _tag: "MalformedRequestError";
925
+ readonly message: string;
926
+ readonly fields: {
927
+ readonly [x: string]: readonly string[];
928
+ };
929
+ }, readonly [Schema.Struct<{
930
+ readonly _tag: Schema.tag<"MalformedRequestError">;
931
+ readonly message: Schema.String;
932
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
933
+ }>], {
934
+ readonly _tag: "MalformedRequestError";
935
+ readonly message: string;
936
+ readonly fields: {
937
+ readonly [x: string]: readonly string[];
938
+ };
939
+ }>, Schema.Struct<{
940
+ readonly _tag: Schema.tag<"MalformedRequestError">;
941
+ readonly message: Schema.String;
942
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
777
943
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
778
944
  readonly _tag: "ResourceNotFoundError";
779
945
  readonly resource: string;
@@ -827,7 +993,7 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
827
993
  readonly message: Schema.String;
828
994
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
829
995
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"topicsList", "GET", "/v1/topics", never, Schema.toCodecStringTree<Schema.Struct<{
830
- readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
996
+ readonly namespaceId: Schema.optionalKey<Schema.brand<Schema.String, "NamespaceId">>;
831
997
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
832
998
  readonly items: Schema.$Array<Schema.Struct<{
833
999
  readonly id: Schema.brand<Schema.String, "TopicId">;
@@ -840,6 +1006,14 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
840
1006
  readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
841
1007
  readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
842
1008
  readonly subscriptions: Schema.Struct<{
1009
+ readonly sms: Schema.Struct<{
1010
+ readonly subscribed: Schema.Finite;
1011
+ readonly unsubscribed: Schema.Finite;
1012
+ }>;
1013
+ readonly whatsapp: Schema.Struct<{
1014
+ readonly subscribed: Schema.Finite;
1015
+ readonly unsubscribed: Schema.Finite;
1016
+ }>;
843
1017
  readonly email: Schema.Struct<{
844
1018
  readonly subscribed: Schema.Finite;
845
1019
  readonly unsubscribed: Schema.Finite;
@@ -876,6 +1050,26 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
876
1050
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
877
1051
  readonly message: Schema.String;
878
1052
  readonly retryAfterSeconds: Schema.Finite;
1053
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1054
+ readonly _tag: "MalformedRequestError";
1055
+ readonly message: string;
1056
+ readonly fields: {
1057
+ readonly [x: string]: readonly string[];
1058
+ };
1059
+ }, readonly [Schema.Struct<{
1060
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1061
+ readonly message: Schema.String;
1062
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1063
+ }>], {
1064
+ readonly _tag: "MalformedRequestError";
1065
+ readonly message: string;
1066
+ readonly fields: {
1067
+ readonly [x: string]: readonly string[];
1068
+ };
1069
+ }>, Schema.Struct<{
1070
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1071
+ readonly message: Schema.String;
1072
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
879
1073
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
880
1074
  readonly _tag: "UnauthorizedError";
881
1075
  readonly message: string;
@@ -912,13 +1106,13 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
912
1106
  readonly id: Schema.brand<Schema.String, "TopicId">;
913
1107
  }>>, Schema.toCodecStringTree<Schema.Struct<{
914
1108
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
915
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
916
- readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
917
- readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>, Schema.Null]>>;
1109
+ readonly cursor: Schema.optionalKey<Schema.String>;
1110
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1111
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>>;
918
1112
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
919
1113
  readonly items: Schema.$Array<Schema.Struct<{
920
1114
  readonly contactId: Schema.brand<Schema.String, "ContactId">;
921
- readonly channel: Schema.Literal<"email">;
1115
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
922
1116
  readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
923
1117
  readonly source: Schema.String;
924
1118
  readonly subscribedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -955,6 +1149,26 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
955
1149
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
956
1150
  readonly message: Schema.String;
957
1151
  readonly retryAfterSeconds: Schema.Finite;
1152
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1153
+ readonly _tag: "MalformedRequestError";
1154
+ readonly message: string;
1155
+ readonly fields: {
1156
+ readonly [x: string]: readonly string[];
1157
+ };
1158
+ }, readonly [Schema.Struct<{
1159
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1160
+ readonly message: Schema.String;
1161
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1162
+ }>], {
1163
+ readonly _tag: "MalformedRequestError";
1164
+ readonly message: string;
1165
+ readonly fields: {
1166
+ readonly [x: string]: readonly string[];
1167
+ };
1168
+ }>, Schema.Struct<{
1169
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1170
+ readonly message: Schema.String;
1171
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
958
1172
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
959
1173
  readonly _tag: "ResourceNotFoundError";
960
1174
  readonly resource: string;
@@ -1059,6 +1273,26 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
1059
1273
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1060
1274
  readonly message: Schema.String;
1061
1275
  readonly retryAfterSeconds: Schema.Finite;
1276
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1277
+ readonly _tag: "MalformedRequestError";
1278
+ readonly message: string;
1279
+ readonly fields: {
1280
+ readonly [x: string]: readonly string[];
1281
+ };
1282
+ }, readonly [Schema.Struct<{
1283
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1284
+ readonly message: Schema.String;
1285
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1286
+ }>], {
1287
+ readonly _tag: "MalformedRequestError";
1288
+ readonly message: string;
1289
+ readonly fields: {
1290
+ readonly [x: string]: readonly string[];
1291
+ };
1292
+ }>, Schema.Struct<{
1293
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1294
+ readonly message: Schema.String;
1295
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1062
1296
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1063
1297
  readonly _tag: "ResourceNotFoundError";
1064
1298
  readonly resource: string;
@@ -1124,6 +1358,14 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
1124
1358
  readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
1125
1359
  readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
1126
1360
  readonly subscriptions: Schema.Struct<{
1361
+ readonly sms: Schema.Struct<{
1362
+ readonly subscribed: Schema.Finite;
1363
+ readonly unsubscribed: Schema.Finite;
1364
+ }>;
1365
+ readonly whatsapp: Schema.Struct<{
1366
+ readonly subscribed: Schema.Finite;
1367
+ readonly unsubscribed: Schema.Finite;
1368
+ }>;
1127
1369
  readonly email: Schema.Struct<{
1128
1370
  readonly subscribed: Schema.Finite;
1129
1371
  readonly unsubscribed: Schema.Finite;
@@ -1159,6 +1401,26 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
1159
1401
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1160
1402
  readonly message: Schema.String;
1161
1403
  readonly retryAfterSeconds: Schema.Finite;
1404
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1405
+ readonly _tag: "MalformedRequestError";
1406
+ readonly message: string;
1407
+ readonly fields: {
1408
+ readonly [x: string]: readonly string[];
1409
+ };
1410
+ }, readonly [Schema.Struct<{
1411
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1412
+ readonly message: Schema.String;
1413
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1414
+ }>], {
1415
+ readonly _tag: "MalformedRequestError";
1416
+ readonly message: string;
1417
+ readonly fields: {
1418
+ readonly [x: string]: readonly string[];
1419
+ };
1420
+ }>, Schema.Struct<{
1421
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1422
+ readonly message: Schema.String;
1423
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1162
1424
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1163
1425
  readonly _tag: "ResourceNotFoundError";
1164
1426
  readonly resource: string;
@@ -1221,7 +1483,7 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
1221
1483
  }>, Schema.Struct<{
1222
1484
  readonly phone: Schema.String;
1223
1485
  }>]>>;
1224
- readonly channel: Schema.Literal<"email">;
1486
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1225
1487
  readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
1226
1488
  readonly source: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1227
1489
  }>>, never, Schema.toCodecJson<Schema.Struct<{
@@ -1266,6 +1528,26 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
1266
1528
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1267
1529
  readonly message: Schema.String;
1268
1530
  readonly retryAfterSeconds: Schema.Finite;
1531
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1532
+ readonly _tag: "MalformedRequestError";
1533
+ readonly message: string;
1534
+ readonly fields: {
1535
+ readonly [x: string]: readonly string[];
1536
+ };
1537
+ }, readonly [Schema.Struct<{
1538
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1539
+ readonly message: Schema.String;
1540
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1541
+ }>], {
1542
+ readonly _tag: "MalformedRequestError";
1543
+ readonly message: string;
1544
+ readonly fields: {
1545
+ readonly [x: string]: readonly string[];
1546
+ };
1547
+ }>, Schema.Struct<{
1548
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1549
+ readonly message: Schema.String;
1550
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1269
1551
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<PaymentRequiredError, {
1270
1552
  readonly _tag: "PaymentRequiredError";
1271
1553
  readonly message: string;
@@ -1362,6 +1644,14 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
1362
1644
  readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
1363
1645
  readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
1364
1646
  readonly subscriptions: Schema.Struct<{
1647
+ readonly sms: Schema.Struct<{
1648
+ readonly subscribed: Schema.Finite;
1649
+ readonly unsubscribed: Schema.Finite;
1650
+ }>;
1651
+ readonly whatsapp: Schema.Struct<{
1652
+ readonly subscribed: Schema.Finite;
1653
+ readonly unsubscribed: Schema.Finite;
1654
+ }>;
1365
1655
  readonly email: Schema.Struct<{
1366
1656
  readonly subscribed: Schema.Finite;
1367
1657
  readonly unsubscribed: Schema.Finite;
@@ -1417,6 +1707,26 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
1417
1707
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1418
1708
  readonly message: Schema.String;
1419
1709
  readonly retryAfterSeconds: Schema.Finite;
1710
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1711
+ readonly _tag: "MalformedRequestError";
1712
+ readonly message: string;
1713
+ readonly fields: {
1714
+ readonly [x: string]: readonly string[];
1715
+ };
1716
+ }, readonly [Schema.Struct<{
1717
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1718
+ readonly message: Schema.String;
1719
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1720
+ }>], {
1721
+ readonly _tag: "MalformedRequestError";
1722
+ readonly message: string;
1723
+ readonly fields: {
1724
+ readonly [x: string]: readonly string[];
1725
+ };
1726
+ }>, Schema.Struct<{
1727
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1728
+ readonly message: Schema.String;
1729
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1420
1730
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1421
1731
  readonly _tag: "ResourceNotFoundError";
1422
1732
  readonly resource: string;