samva 0.33.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +1 -1
  2. package/dist/client/sdk.gen.d.ts +225 -251
  3. package/dist/client/sdk.gen.js +85 -211
  4. package/dist/client/types.gen.d.ts +2897 -403
  5. package/dist/effect/agents.d.ts +28 -13
  6. package/dist/effect/agents.js +5 -1
  7. package/dist/effect/analytics.d.ts +15 -15
  8. package/dist/effect/api-keys.d.ts +27 -18
  9. package/dist/effect/campaigns.d.ts +721 -65
  10. package/dist/effect/categories.d.ts +3 -3
  11. package/dist/effect/contact-groups.d.ts +15 -15
  12. package/dist/effect/contacts.d.ts +56 -52
  13. package/dist/effect/conversations.d.ts +45 -45
  14. package/dist/effect/email.d.ts +82 -82
  15. package/dist/effect/errors.d.ts +1 -1
  16. package/dist/effect/errors.js +2 -2
  17. package/dist/effect/extension-installations.d.ts +11 -11
  18. package/dist/effect/extensions.d.ts +16 -16
  19. package/dist/effect/generated/agents.d.ts +1063 -33
  20. package/dist/effect/generated/agents.js +133 -11
  21. package/dist/effect/generated/analytics.d.ts +109 -136
  22. package/dist/effect/generated/analytics.js +65 -36
  23. package/dist/effect/generated/api-keys.d.ts +240 -19
  24. package/dist/effect/generated/api-keys.js +24 -8
  25. package/dist/effect/generated/attachments.d.ts +89 -1
  26. package/dist/effect/generated/attachments.js +10 -2
  27. package/dist/effect/generated/brands.d.ts +133 -1
  28. package/dist/effect/generated/brands.js +22 -10
  29. package/dist/effect/generated/campaigns.d.ts +1442 -140
  30. package/dist/effect/generated/campaigns.js +82 -20
  31. package/dist/effect/generated/contact-events.d.ts +26 -4
  32. package/dist/effect/generated/contact-events.js +5 -3
  33. package/dist/effect/generated/contact-groups.d.ts +233 -13
  34. package/dist/effect/generated/contact-groups.js +33 -17
  35. package/dist/effect/generated/contacts.d.ts +634 -96
  36. package/dist/effect/generated/contacts.js +82 -20
  37. package/dist/effect/generated/conversations.d.ts +398 -106
  38. package/dist/effect/generated/conversations.js +96 -22
  39. package/dist/effect/generated/custom-fields.d.ts +89 -1
  40. package/dist/effect/generated/custom-fields.js +11 -3
  41. package/dist/effect/generated/email.d.ts +1447 -83
  42. package/dist/effect/generated/email.js +167 -43
  43. package/dist/effect/generated/events.d.ts +51 -7
  44. package/dist/effect/generated/events.js +9 -5
  45. package/dist/effect/generated/extension-installations.d.ts +208 -10
  46. package/dist/effect/generated/extension-installations.js +26 -8
  47. package/dist/effect/generated/extensions.d.ts +123 -13
  48. package/dist/effect/generated/extensions.js +20 -10
  49. package/dist/effect/generated/feedback.d.ts +23 -1
  50. package/dist/effect/generated/feedback.js +6 -4
  51. package/dist/effect/generated/journeys.d.ts +684 -16
  52. package/dist/effect/generated/journeys.js +37 -9
  53. package/dist/effect/generated/mailboxes.d.ts +3085 -627
  54. package/dist/effect/generated/mailboxes.js +340 -141
  55. package/dist/effect/generated/media.d.ts +125 -15
  56. package/dist/effect/generated/media.js +15 -2
  57. package/dist/effect/generated/messages.d.ts +2036 -117
  58. package/dist/effect/generated/messages.js +286 -54
  59. package/dist/effect/generated/namespaces.d.ts +209 -25
  60. package/dist/effect/generated/namespaces.js +27 -9
  61. package/dist/effect/generated/newsletter-domains.d.ts +98 -12
  62. package/dist/effect/generated/newsletter-domains.js +20 -13
  63. package/dist/effect/generated/newsletter-issues.d.ts +354 -19
  64. package/dist/effect/generated/newsletter-issues.js +162 -98
  65. package/dist/effect/generated/newsletters.d.ts +123 -13
  66. package/dist/effect/generated/newsletters.js +19 -9
  67. package/dist/effect/generated/operations.d.ts +76 -10
  68. package/dist/effect/generated/operations.js +12 -6
  69. package/dist/effect/generated/organizations.d.ts +287 -7
  70. package/dist/effect/generated/organizations.js +33 -5
  71. package/dist/effect/generated/scheduled-messages.d.ts +4427 -99
  72. package/dist/effect/generated/scheduled-messages.js +71 -12
  73. package/dist/effect/generated/shared.d.ts +2213 -190
  74. package/dist/effect/generated/shared.js +527 -76
  75. package/dist/effect/generated/subscriptions.d.ts +23 -1
  76. package/dist/effect/generated/subscriptions.js +6 -4
  77. package/dist/effect/generated/templates.d.ts +1718 -136
  78. package/dist/effect/generated/templates.js +421 -226
  79. package/dist/effect/generated/topic-forms.d.ts +111 -1
  80. package/dist/effect/generated/topic-forms.js +23 -13
  81. package/dist/effect/generated/topics.d.ts +353 -43
  82. package/dist/effect/generated/topics.js +67 -19
  83. package/dist/effect/generated/webhooks.d.ts +308 -46
  84. package/dist/effect/generated/webhooks.js +67 -19
  85. package/dist/effect/generated/whoami.d.ts +35 -1
  86. package/dist/effect/generated/whoami.js +4 -2
  87. package/dist/effect/generated-metadata.d.ts +20 -0
  88. package/dist/effect/generated-metadata.js +10 -0
  89. package/dist/effect/index.js +2 -2
  90. package/dist/effect/internal/client.js +1 -1
  91. package/dist/effect/internal/email-sender.d.ts +1 -1
  92. package/dist/effect/internal/send.d.ts +1 -1
  93. package/dist/effect/journeys.d.ts +105 -19
  94. package/dist/effect/mailboxes.d.ts +405 -174
  95. package/dist/effect/media.d.ts +1 -1
  96. package/dist/effect/messages.d.ts +40 -40
  97. package/dist/effect/namespaces.d.ts +15 -15
  98. package/dist/effect/newsletter-domains.d.ts +5 -5
  99. package/dist/effect/newsletters.d.ts +1 -1
  100. package/dist/effect/operations.d.ts +11 -11
  101. package/dist/effect/organizations.d.ts +2 -2
  102. package/dist/effect/scheduled-messages.d.ts +863 -8
  103. package/dist/effect/templates.d.ts +37 -37
  104. package/dist/effect/topics.d.ts +21 -21
  105. package/dist/effect/webhooks.d.ts +28 -26
  106. package/dist/index.js +2 -2
  107. package/dist/normalize.js +13 -1
  108. package/dist/package.js +1 -1
  109. package/dist/promises/client.d.ts +1 -1
  110. package/dist/promises/client.js +2 -2
  111. package/dist/promises/errors.gen.d.ts +22 -2
  112. package/dist/promises/errors.gen.js +60 -2
  113. package/dist/promises/index.js +2 -2
  114. package/dist/promises/types.gen.d.ts +1 -1
  115. package/dist/service-map.d.ts +9 -0
  116. package/dist/service-map.js +5 -0
  117. package/package.json +9 -8
@@ -1,6 +1,6 @@
1
1
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
2
2
  import * as Schema from "effect/Schema";
3
- import { ApiKeySecurityMiddleware, ContactId, ConversationId, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MailboxId, MessagePage, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared";
3
+ import { ApiKeySecurityMiddleware, ContactId, ConversationId, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MailboxId, MalformedRequestError, MessagePage, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared";
4
4
  export type UnknownRecord = {
5
5
  readonly [x: string]: JsonValue;
6
6
  };
@@ -10,8 +10,8 @@ export type ConversationSummary = {
10
10
  readonly title: string | null;
11
11
  readonly externalId: string | null;
12
12
  readonly status: "active" | "waiting" | "resolved" | "escalated" | "archived";
13
- readonly primaryChannel: "email";
14
- readonly channels: ReadonlyArray<"email">;
13
+ readonly primaryChannel: "sms" | "whatsapp" | "email";
14
+ readonly channels: ReadonlyArray<"sms" | "whatsapp" | "email">;
15
15
  readonly priority: number;
16
16
  readonly urgency: "low" | "medium" | "high" | "critical";
17
17
  readonly tags: ReadonlyArray<string>;
@@ -25,8 +25,8 @@ export declare const ConversationSummary: Schema.Struct<{
25
25
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
26
26
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
27
27
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
28
- readonly primaryChannel: Schema.Literal<"email">;
29
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
28
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
29
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
30
30
  readonly priority: Schema.Finite;
31
31
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
32
32
  readonly tags: Schema.$Array<Schema.String>;
@@ -87,8 +87,8 @@ export declare const ConversationPage: Schema.Struct<{
87
87
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
88
88
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
89
89
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
90
- readonly primaryChannel: Schema.Literal<"email">;
91
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
90
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
91
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
92
92
  readonly priority: Schema.Finite;
93
93
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
94
94
  readonly tags: Schema.$Array<Schema.String>;
@@ -104,8 +104,8 @@ export type Conversation = {
104
104
  readonly title: string | null;
105
105
  readonly externalId: string | null;
106
106
  readonly status: "active" | "waiting" | "resolved" | "escalated" | "archived";
107
- readonly primaryChannel: "email";
108
- readonly channels: ReadonlyArray<"email">;
107
+ readonly primaryChannel: "sms" | "whatsapp" | "email";
108
+ readonly channels: ReadonlyArray<"sms" | "whatsapp" | "email">;
109
109
  readonly priority: number;
110
110
  readonly urgency: "low" | "medium" | "high" | "critical";
111
111
  readonly tags: ReadonlyArray<string>;
@@ -136,8 +136,8 @@ export declare const Conversation: Schema.Struct<{
136
136
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
137
137
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
138
138
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
139
- readonly primaryChannel: Schema.Literal<"email">;
140
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
139
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
140
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
141
141
  readonly priority: Schema.Finite;
142
142
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
143
143
  readonly tags: Schema.$Array<Schema.String>;
@@ -184,23 +184,23 @@ export declare const Conversation: Schema.Struct<{
184
184
  }>;
185
185
  export type ConversationsListQuery = {
186
186
  readonly limit?: number | null;
187
- readonly cursor?: Cursor | null;
188
- readonly status?: "active" | "waiting" | "resolved" | "escalated" | "archived" | null;
189
- readonly channel?: "email" | null;
190
- readonly contactId?: ContactId | null;
191
- readonly mailboxId?: MailboxId | null;
192
- readonly after?: string | null;
193
- readonly before?: string | null;
187
+ readonly cursor?: string;
188
+ readonly status?: "active" | "waiting" | "resolved" | "escalated" | "archived";
189
+ readonly channel?: "sms" | "whatsapp" | "email";
190
+ readonly contactId?: ContactId;
191
+ readonly mailboxId?: MailboxId;
192
+ readonly after?: string;
193
+ readonly before?: string;
194
194
  };
195
195
  export declare const ConversationsListQuery: Schema.Struct<{
196
196
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
197
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
198
- readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>, Schema.Null]>>;
199
- readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
200
- readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
201
- readonly mailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
202
- readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
203
- readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
197
+ readonly cursor: Schema.optionalKey<Schema.String>;
198
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>>;
199
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
200
+ readonly contactId: Schema.optionalKey<Schema.brand<Schema.String, "ContactId">>;
201
+ readonly mailboxId: Schema.optionalKey<Schema.brand<Schema.String, "MailboxId">>;
202
+ readonly after: Schema.optionalKey<Schema.String>;
203
+ readonly before: Schema.optionalKey<Schema.String>;
204
204
  }>;
205
205
  export type ConversationsList200 = ConversationPage;
206
206
  export declare const ConversationsList200: Schema.Struct<{
@@ -209,8 +209,8 @@ export declare const ConversationsList200: Schema.Struct<{
209
209
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
210
210
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
211
211
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
212
- readonly primaryChannel: Schema.Literal<"email">;
213
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
212
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
213
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
214
214
  readonly priority: Schema.Finite;
215
215
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
216
216
  readonly tags: Schema.$Array<Schema.String>;
@@ -221,6 +221,8 @@ export declare const ConversationsList200: Schema.Struct<{
221
221
  }>>;
222
222
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
223
223
  }>;
224
+ export type ConversationsList400 = MalformedRequestError;
225
+ export declare const ConversationsList400: typeof MalformedRequestError;
224
226
  export type ConversationsList401 = UnauthorizedError;
225
227
  export declare const ConversationsList401: typeof UnauthorizedError;
226
228
  export type ConversationsList403 = ForbiddenError;
@@ -236,8 +238,8 @@ export type ConversationsCreateRequestJson = {
236
238
  readonly description?: string | null;
237
239
  readonly externalId?: string | null;
238
240
  readonly parentConversationId?: ConversationId | null;
239
- readonly channels: ReadonlyArray<"email">;
240
- readonly primaryChannel: "email";
241
+ readonly channels: ReadonlyArray<"sms" | "whatsapp" | "email">;
242
+ readonly primaryChannel: "sms" | "whatsapp" | "email";
241
243
  readonly status?: "active" | "waiting" | "resolved" | "escalated" | "archived" | null;
242
244
  readonly statusReason?: string | null;
243
245
  readonly priority?: number | null;
@@ -256,8 +258,8 @@ export declare const ConversationsCreateRequestJson: Schema.Struct<{
256
258
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
257
259
  readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
258
260
  readonly parentConversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
259
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
260
- readonly primaryChannel: Schema.Literal<"email">;
261
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
262
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
261
263
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>, Schema.Null]>>;
262
264
  readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
263
265
  readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
@@ -287,8 +289,8 @@ export declare const ConversationsCreate201: Schema.Struct<{
287
289
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
288
290
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
289
291
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
290
- readonly primaryChannel: Schema.Literal<"email">;
291
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
292
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
293
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
292
294
  readonly priority: Schema.Finite;
293
295
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
294
296
  readonly tags: Schema.$Array<Schema.String>;
@@ -333,6 +335,8 @@ export declare const ConversationsCreate201: Schema.Struct<{
333
335
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
334
336
  readonly updatedAt: Schema.String;
335
337
  }>;
338
+ export type ConversationsCreate400 = MalformedRequestError;
339
+ export declare const ConversationsCreate400: typeof MalformedRequestError;
336
340
  export type ConversationsCreate401 = UnauthorizedError;
337
341
  export declare const ConversationsCreate401: typeof UnauthorizedError;
338
342
  export type ConversationsCreate403 = ForbiddenError;
@@ -355,8 +359,8 @@ export declare const ConversationsGetById200: Schema.Struct<{
355
359
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
356
360
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
357
361
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
358
- readonly primaryChannel: Schema.Literal<"email">;
359
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
362
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
363
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
360
364
  readonly priority: Schema.Finite;
361
365
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
362
366
  readonly tags: Schema.$Array<Schema.String>;
@@ -401,6 +405,8 @@ export declare const ConversationsGetById200: Schema.Struct<{
401
405
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
402
406
  readonly updatedAt: Schema.String;
403
407
  }>;
408
+ export type ConversationsGetById400 = MalformedRequestError;
409
+ export declare const ConversationsGetById400: typeof MalformedRequestError;
404
410
  export type ConversationsGetById401 = UnauthorizedError;
405
411
  export declare const ConversationsGetById401: typeof UnauthorizedError;
406
412
  export type ConversationsGetById403 = ForbiddenError;
@@ -424,7 +430,7 @@ export type ConversationsUpdateRequestJson = {
424
430
  readonly description?: string | null;
425
431
  readonly externalId?: string | null;
426
432
  readonly parentConversationId?: ConversationId | null;
427
- readonly primaryChannel?: "email" | null;
433
+ readonly primaryChannel?: "sms" | "whatsapp" | "email" | null;
428
434
  readonly status?: "active" | "waiting" | "resolved" | "escalated" | "archived" | null;
429
435
  readonly statusReason?: string | null;
430
436
  readonly priority?: number | null;
@@ -441,7 +447,7 @@ export declare const ConversationsUpdateRequestJson: Schema.Struct<{
441
447
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
442
448
  readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
443
449
  readonly parentConversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
444
- readonly primaryChannel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
450
+ readonly primaryChannel: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>, Schema.Null]>>;
445
451
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>, Schema.Null]>>;
446
452
  readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
447
453
  readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
@@ -469,8 +475,8 @@ export declare const ConversationsUpdate200: Schema.Struct<{
469
475
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
470
476
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
471
477
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
472
- readonly primaryChannel: Schema.Literal<"email">;
473
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
478
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
479
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
474
480
  readonly priority: Schema.Finite;
475
481
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
476
482
  readonly tags: Schema.$Array<Schema.String>;
@@ -515,6 +521,8 @@ export declare const ConversationsUpdate200: Schema.Struct<{
515
521
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
516
522
  readonly updatedAt: Schema.String;
517
523
  }>;
524
+ export type ConversationsUpdate400 = MalformedRequestError;
525
+ export declare const ConversationsUpdate400: typeof MalformedRequestError;
518
526
  export type ConversationsUpdate401 = UnauthorizedError;
519
527
  export declare const ConversationsUpdate401: typeof UnauthorizedError;
520
528
  export type ConversationsUpdate403 = ForbiddenError;
@@ -545,8 +553,8 @@ export declare const ConversationsAddCategories200: Schema.Struct<{
545
553
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
546
554
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
547
555
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
548
- readonly primaryChannel: Schema.Literal<"email">;
549
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
556
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
557
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
550
558
  readonly priority: Schema.Finite;
551
559
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
552
560
  readonly tags: Schema.$Array<Schema.String>;
@@ -591,6 +599,8 @@ export declare const ConversationsAddCategories200: Schema.Struct<{
591
599
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
592
600
  readonly updatedAt: Schema.String;
593
601
  }>;
602
+ export type ConversationsAddCategories400 = MalformedRequestError;
603
+ export declare const ConversationsAddCategories400: typeof MalformedRequestError;
594
604
  export type ConversationsAddCategories401 = UnauthorizedError;
595
605
  export declare const ConversationsAddCategories401: typeof UnauthorizedError;
596
606
  export type ConversationsAddCategories403 = ForbiddenError;
@@ -621,8 +631,8 @@ export declare const ConversationsRemoveCategories200: Schema.Struct<{
621
631
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
622
632
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
623
633
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
624
- readonly primaryChannel: Schema.Literal<"email">;
625
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
634
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
635
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
626
636
  readonly priority: Schema.Finite;
627
637
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
628
638
  readonly tags: Schema.$Array<Schema.String>;
@@ -667,6 +677,8 @@ export declare const ConversationsRemoveCategories200: Schema.Struct<{
667
677
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
668
678
  readonly updatedAt: Schema.String;
669
679
  }>;
680
+ export type ConversationsRemoveCategories400 = MalformedRequestError;
681
+ export declare const ConversationsRemoveCategories400: typeof MalformedRequestError;
670
682
  export type ConversationsRemoveCategories401 = UnauthorizedError;
671
683
  export declare const ConversationsRemoveCategories401: typeof UnauthorizedError;
672
684
  export type ConversationsRemoveCategories403 = ForbiddenError;
@@ -686,10 +698,13 @@ export declare const ConversationsAddChannelsPathParams: Schema.Struct<{
686
698
  readonly id: Schema.brand<Schema.String, "ConversationId">;
687
699
  }>;
688
700
  export type ConversationsAddChannelsRequestJson = {
689
- readonly channels: readonly ["email", ...Array<"email">];
701
+ readonly channels: readonly [
702
+ "sms" | "whatsapp" | "email",
703
+ ...Array<"sms" | "whatsapp" | "email">
704
+ ];
690
705
  };
691
706
  export declare const ConversationsAddChannelsRequestJson: Schema.Struct<{
692
- readonly channels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Literal<"email">]>, readonly [Schema.Literal<"email">]>;
707
+ readonly channels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>]>, readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>]>;
693
708
  }>;
694
709
  export type ConversationsAddChannels200 = Conversation;
695
710
  export declare const ConversationsAddChannels200: Schema.Struct<{
@@ -697,8 +712,8 @@ export declare const ConversationsAddChannels200: Schema.Struct<{
697
712
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
698
713
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
699
714
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
700
- readonly primaryChannel: Schema.Literal<"email">;
701
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
715
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
716
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
702
717
  readonly priority: Schema.Finite;
703
718
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
704
719
  readonly tags: Schema.$Array<Schema.String>;
@@ -743,6 +758,8 @@ export declare const ConversationsAddChannels200: Schema.Struct<{
743
758
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
744
759
  readonly updatedAt: Schema.String;
745
760
  }>;
761
+ export type ConversationsAddChannels400 = MalformedRequestError;
762
+ export declare const ConversationsAddChannels400: typeof MalformedRequestError;
746
763
  export type ConversationsAddChannels401 = UnauthorizedError;
747
764
  export declare const ConversationsAddChannels401: typeof UnauthorizedError;
748
765
  export type ConversationsAddChannels403 = ForbiddenError;
@@ -762,10 +779,13 @@ export declare const ConversationsRemoveChannelsPathParams: Schema.Struct<{
762
779
  readonly id: Schema.brand<Schema.String, "ConversationId">;
763
780
  }>;
764
781
  export type ConversationsRemoveChannelsRequestJson = {
765
- readonly channels: readonly ["email", ...Array<"email">];
782
+ readonly channels: readonly [
783
+ "sms" | "whatsapp" | "email",
784
+ ...Array<"sms" | "whatsapp" | "email">
785
+ ];
766
786
  };
767
787
  export declare const ConversationsRemoveChannelsRequestJson: Schema.Struct<{
768
- readonly channels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Literal<"email">]>, readonly [Schema.Literal<"email">]>;
788
+ readonly channels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>]>, readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>]>;
769
789
  }>;
770
790
  export type ConversationsRemoveChannels200 = Conversation;
771
791
  export declare const ConversationsRemoveChannels200: Schema.Struct<{
@@ -773,8 +793,8 @@ export declare const ConversationsRemoveChannels200: Schema.Struct<{
773
793
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
774
794
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
775
795
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
776
- readonly primaryChannel: Schema.Literal<"email">;
777
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
796
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
797
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
778
798
  readonly priority: Schema.Finite;
779
799
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
780
800
  readonly tags: Schema.$Array<Schema.String>;
@@ -819,6 +839,8 @@ export declare const ConversationsRemoveChannels200: Schema.Struct<{
819
839
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
820
840
  readonly updatedAt: Schema.String;
821
841
  }>;
842
+ export type ConversationsRemoveChannels400 = MalformedRequestError;
843
+ export declare const ConversationsRemoveChannels400: typeof MalformedRequestError;
822
844
  export type ConversationsRemoveChannels401 = UnauthorizedError;
823
845
  export declare const ConversationsRemoveChannels401: typeof UnauthorizedError;
824
846
  export type ConversationsRemoveChannels403 = ForbiddenError;
@@ -849,8 +871,8 @@ export declare const ConversationsAddContacts200: Schema.Struct<{
849
871
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
850
872
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
851
873
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
852
- readonly primaryChannel: Schema.Literal<"email">;
853
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
874
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
875
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
854
876
  readonly priority: Schema.Finite;
855
877
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
856
878
  readonly tags: Schema.$Array<Schema.String>;
@@ -895,6 +917,8 @@ export declare const ConversationsAddContacts200: Schema.Struct<{
895
917
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
896
918
  readonly updatedAt: Schema.String;
897
919
  }>;
920
+ export type ConversationsAddContacts400 = MalformedRequestError;
921
+ export declare const ConversationsAddContacts400: typeof MalformedRequestError;
898
922
  export type ConversationsAddContacts401 = UnauthorizedError;
899
923
  export declare const ConversationsAddContacts401: typeof UnauthorizedError;
900
924
  export type ConversationsAddContacts403 = ForbiddenError;
@@ -925,8 +949,8 @@ export declare const ConversationsRemoveContacts200: Schema.Struct<{
925
949
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
926
950
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
927
951
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
928
- readonly primaryChannel: Schema.Literal<"email">;
929
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
952
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
953
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
930
954
  readonly priority: Schema.Finite;
931
955
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
932
956
  readonly tags: Schema.$Array<Schema.String>;
@@ -971,6 +995,8 @@ export declare const ConversationsRemoveContacts200: Schema.Struct<{
971
995
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
972
996
  readonly updatedAt: Schema.String;
973
997
  }>;
998
+ export type ConversationsRemoveContacts400 = MalformedRequestError;
999
+ export declare const ConversationsRemoveContacts400: typeof MalformedRequestError;
974
1000
  export type ConversationsRemoveContacts401 = UnauthorizedError;
975
1001
  export declare const ConversationsRemoveContacts401: typeof UnauthorizedError;
976
1002
  export type ConversationsRemoveContacts403 = ForbiddenError;
@@ -991,15 +1017,15 @@ export declare const ConversationsListMessagesPathParams: Schema.Struct<{
991
1017
  }>;
992
1018
  export type ConversationsListMessagesQuery = {
993
1019
  readonly limit?: number | null;
994
- readonly cursor?: Cursor | null;
995
- readonly after?: string | null;
996
- readonly before?: string | null;
1020
+ readonly cursor?: string;
1021
+ readonly after?: string;
1022
+ readonly before?: string;
997
1023
  };
998
1024
  export declare const ConversationsListMessagesQuery: Schema.Struct<{
999
1025
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1000
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1001
- readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1002
- readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1026
+ readonly cursor: Schema.optionalKey<Schema.String>;
1027
+ readonly after: Schema.optionalKey<Schema.String>;
1028
+ readonly before: Schema.optionalKey<Schema.String>;
1003
1029
  }>;
1004
1030
  export type ConversationsListMessages200 = MessagePage;
1005
1031
  export declare const ConversationsListMessages200: Schema.Struct<{
@@ -1009,7 +1035,7 @@ export declare const ConversationsListMessages200: Schema.Struct<{
1009
1035
  readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
1010
1036
  readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
1011
1037
  }>, Schema.Null]>>;
1012
- readonly channel: Schema.Literal<"email">;
1038
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1013
1039
  readonly direction: Schema.Union<readonly [Schema.Literal<"outbound">, Schema.Literal<"inbound">]>;
1014
1040
  readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"scheduled">, Schema.Literal<"queued">, Schema.Literal<"processing">, Schema.Literal<"sent">, Schema.Literal<"delivered">, Schema.Literal<"read">, Schema.Literal<"failed">, Schema.Literal<"bounced">, Schema.Literal<"complained">]>;
1015
1041
  readonly from: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1020,6 +1046,8 @@ export declare const ConversationsListMessages200: Schema.Struct<{
1020
1046
  }>>;
1021
1047
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
1022
1048
  }>;
1049
+ export type ConversationsListMessages400 = MalformedRequestError;
1050
+ export declare const ConversationsListMessages400: typeof MalformedRequestError;
1023
1051
  export type ConversationsListMessages401 = UnauthorizedError;
1024
1052
  export declare const ConversationsListMessages401: typeof UnauthorizedError;
1025
1053
  export type ConversationsListMessages403 = ForbiddenError;
@@ -1050,8 +1078,8 @@ export declare const ConversationsAddTags200: Schema.Struct<{
1050
1078
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1051
1079
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1052
1080
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
1053
- readonly primaryChannel: Schema.Literal<"email">;
1054
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
1081
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1082
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1055
1083
  readonly priority: Schema.Finite;
1056
1084
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1057
1085
  readonly tags: Schema.$Array<Schema.String>;
@@ -1096,6 +1124,8 @@ export declare const ConversationsAddTags200: Schema.Struct<{
1096
1124
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
1097
1125
  readonly updatedAt: Schema.String;
1098
1126
  }>;
1127
+ export type ConversationsAddTags400 = MalformedRequestError;
1128
+ export declare const ConversationsAddTags400: typeof MalformedRequestError;
1099
1129
  export type ConversationsAddTags401 = UnauthorizedError;
1100
1130
  export declare const ConversationsAddTags401: typeof UnauthorizedError;
1101
1131
  export type ConversationsAddTags403 = ForbiddenError;
@@ -1126,8 +1156,8 @@ export declare const ConversationsRemoveTags200: Schema.Struct<{
1126
1156
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1127
1157
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1128
1158
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
1129
- readonly primaryChannel: Schema.Literal<"email">;
1130
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
1159
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1160
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1131
1161
  readonly priority: Schema.Finite;
1132
1162
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1133
1163
  readonly tags: Schema.$Array<Schema.String>;
@@ -1172,6 +1202,8 @@ export declare const ConversationsRemoveTags200: Schema.Struct<{
1172
1202
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
1173
1203
  readonly updatedAt: Schema.String;
1174
1204
  }>;
1205
+ export type ConversationsRemoveTags400 = MalformedRequestError;
1206
+ export declare const ConversationsRemoveTags400: typeof MalformedRequestError;
1175
1207
  export type ConversationsRemoveTags401 = UnauthorizedError;
1176
1208
  export declare const ConversationsRemoveTags401: typeof UnauthorizedError;
1177
1209
  export type ConversationsRemoveTags403 = ForbiddenError;
@@ -1193,8 +1225,8 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1193
1225
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1194
1226
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1195
1227
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
1196
- readonly primaryChannel: Schema.Literal<"email">;
1197
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
1228
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1229
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1198
1230
  readonly priority: Schema.Finite;
1199
1231
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1200
1232
  readonly tags: Schema.$Array<Schema.String>;
@@ -1266,6 +1298,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1266
1298
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1267
1299
  readonly message: Schema.String;
1268
1300
  readonly retryAfterSeconds: Schema.Finite;
1301
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1302
+ readonly _tag: "MalformedRequestError";
1303
+ readonly message: string;
1304
+ readonly fields: {
1305
+ readonly [x: string]: readonly string[];
1306
+ };
1307
+ }, readonly [Schema.Struct<{
1308
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1309
+ readonly message: Schema.String;
1310
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1311
+ }>], {
1312
+ readonly _tag: "MalformedRequestError";
1313
+ readonly message: string;
1314
+ readonly fields: {
1315
+ readonly [x: string]: readonly string[];
1316
+ };
1317
+ }>, Schema.Struct<{
1318
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1319
+ readonly message: Schema.String;
1320
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1269
1321
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1270
1322
  readonly _tag: "ResourceNotFoundError";
1271
1323
  readonly resource: string;
@@ -1321,14 +1373,14 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1321
1373
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"conversationsAddChannels", "POST", "/v1/conversations/:id/channels", Schema.toCodecStringTree<Schema.Struct<{
1322
1374
  readonly id: Schema.brand<Schema.String, "ConversationId">;
1323
1375
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1324
- readonly channels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Literal<"email">]>, readonly [Schema.Literal<"email">]>;
1376
+ readonly channels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>]>, readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>]>;
1325
1377
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1326
1378
  readonly id: Schema.brand<Schema.String, "ConversationId">;
1327
1379
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1328
1380
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1329
1381
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
1330
- readonly primaryChannel: Schema.Literal<"email">;
1331
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
1382
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1383
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1332
1384
  readonly priority: Schema.Finite;
1333
1385
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1334
1386
  readonly tags: Schema.$Array<Schema.String>;
@@ -1400,6 +1452,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1400
1452
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1401
1453
  readonly message: Schema.String;
1402
1454
  readonly retryAfterSeconds: Schema.Finite;
1455
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1456
+ readonly _tag: "MalformedRequestError";
1457
+ readonly message: string;
1458
+ readonly fields: {
1459
+ readonly [x: string]: readonly string[];
1460
+ };
1461
+ }, readonly [Schema.Struct<{
1462
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1463
+ readonly message: Schema.String;
1464
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1465
+ }>], {
1466
+ readonly _tag: "MalformedRequestError";
1467
+ readonly message: string;
1468
+ readonly fields: {
1469
+ readonly [x: string]: readonly string[];
1470
+ };
1471
+ }>, Schema.Struct<{
1472
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1473
+ readonly message: Schema.String;
1474
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1403
1475
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1404
1476
  readonly _tag: "ResourceNotFoundError";
1405
1477
  readonly resource: string;
@@ -1461,8 +1533,8 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1461
1533
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1462
1534
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1463
1535
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
1464
- readonly primaryChannel: Schema.Literal<"email">;
1465
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
1536
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1537
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1466
1538
  readonly priority: Schema.Finite;
1467
1539
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1468
1540
  readonly tags: Schema.$Array<Schema.String>;
@@ -1534,6 +1606,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1534
1606
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1535
1607
  readonly message: Schema.String;
1536
1608
  readonly retryAfterSeconds: Schema.Finite;
1609
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1610
+ readonly _tag: "MalformedRequestError";
1611
+ readonly message: string;
1612
+ readonly fields: {
1613
+ readonly [x: string]: readonly string[];
1614
+ };
1615
+ }, readonly [Schema.Struct<{
1616
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1617
+ readonly message: Schema.String;
1618
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1619
+ }>], {
1620
+ readonly _tag: "MalformedRequestError";
1621
+ readonly message: string;
1622
+ readonly fields: {
1623
+ readonly [x: string]: readonly string[];
1624
+ };
1625
+ }>, Schema.Struct<{
1626
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1627
+ readonly message: Schema.String;
1628
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1537
1629
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1538
1630
  readonly _tag: "ResourceNotFoundError";
1539
1631
  readonly resource: string;
@@ -1595,8 +1687,8 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1595
1687
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1596
1688
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1597
1689
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
1598
- readonly primaryChannel: Schema.Literal<"email">;
1599
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
1690
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1691
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1600
1692
  readonly priority: Schema.Finite;
1601
1693
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1602
1694
  readonly tags: Schema.$Array<Schema.String>;
@@ -1668,6 +1760,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1668
1760
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1669
1761
  readonly message: Schema.String;
1670
1762
  readonly retryAfterSeconds: Schema.Finite;
1763
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1764
+ readonly _tag: "MalformedRequestError";
1765
+ readonly message: string;
1766
+ readonly fields: {
1767
+ readonly [x: string]: readonly string[];
1768
+ };
1769
+ }, readonly [Schema.Struct<{
1770
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1771
+ readonly message: Schema.String;
1772
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1773
+ }>], {
1774
+ readonly _tag: "MalformedRequestError";
1775
+ readonly message: string;
1776
+ readonly fields: {
1777
+ readonly [x: string]: readonly string[];
1778
+ };
1779
+ }>, Schema.Struct<{
1780
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1781
+ readonly message: Schema.String;
1782
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1671
1783
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1672
1784
  readonly _tag: "ResourceNotFoundError";
1673
1785
  readonly resource: string;
@@ -1725,8 +1837,8 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1725
1837
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1726
1838
  readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1727
1839
  readonly parentConversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
1728
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
1729
- readonly primaryChannel: Schema.Literal<"email">;
1840
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1841
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1730
1842
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>, Schema.Null]>>;
1731
1843
  readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1732
1844
  readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
@@ -1754,8 +1866,8 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1754
1866
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1755
1867
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1756
1868
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
1757
- readonly primaryChannel: Schema.Literal<"email">;
1758
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
1869
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1870
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1759
1871
  readonly priority: Schema.Finite;
1760
1872
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1761
1873
  readonly tags: Schema.$Array<Schema.String>;
@@ -1827,6 +1939,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1827
1939
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1828
1940
  readonly message: Schema.String;
1829
1941
  readonly retryAfterSeconds: Schema.Finite;
1942
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1943
+ readonly _tag: "MalformedRequestError";
1944
+ readonly message: string;
1945
+ readonly fields: {
1946
+ readonly [x: string]: readonly string[];
1947
+ };
1948
+ }, readonly [Schema.Struct<{
1949
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1950
+ readonly message: Schema.String;
1951
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1952
+ }>], {
1953
+ readonly _tag: "MalformedRequestError";
1954
+ readonly message: string;
1955
+ readonly fields: {
1956
+ readonly [x: string]: readonly string[];
1957
+ };
1958
+ }>, Schema.Struct<{
1959
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1960
+ readonly message: Schema.String;
1961
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1830
1962
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
1831
1963
  readonly _tag: "UnauthorizedError";
1832
1964
  readonly message: string;
@@ -1866,8 +1998,8 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1866
1998
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1867
1999
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1868
2000
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
1869
- readonly primaryChannel: Schema.Literal<"email">;
1870
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
2001
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2002
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1871
2003
  readonly priority: Schema.Finite;
1872
2004
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1873
2005
  readonly tags: Schema.$Array<Schema.String>;
@@ -1939,6 +2071,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1939
2071
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1940
2072
  readonly message: Schema.String;
1941
2073
  readonly retryAfterSeconds: Schema.Finite;
2074
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2075
+ readonly _tag: "MalformedRequestError";
2076
+ readonly message: string;
2077
+ readonly fields: {
2078
+ readonly [x: string]: readonly string[];
2079
+ };
2080
+ }, readonly [Schema.Struct<{
2081
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2082
+ readonly message: Schema.String;
2083
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2084
+ }>], {
2085
+ readonly _tag: "MalformedRequestError";
2086
+ readonly message: string;
2087
+ readonly fields: {
2088
+ readonly [x: string]: readonly string[];
2089
+ };
2090
+ }>, Schema.Struct<{
2091
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2092
+ readonly message: Schema.String;
2093
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1942
2094
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1943
2095
  readonly _tag: "ResourceNotFoundError";
1944
2096
  readonly resource: string;
@@ -1993,21 +2145,21 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1993
2145
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1994
2146
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"conversationsList", "GET", "/v1/conversations", never, Schema.toCodecStringTree<Schema.Struct<{
1995
2147
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1996
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1997
- readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>, Schema.Null]>>;
1998
- readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
1999
- readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
2000
- readonly mailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
2001
- readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2002
- readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2148
+ readonly cursor: Schema.optionalKey<Schema.String>;
2149
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>>;
2150
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
2151
+ readonly contactId: Schema.optionalKey<Schema.brand<Schema.String, "ContactId">>;
2152
+ readonly mailboxId: Schema.optionalKey<Schema.brand<Schema.String, "MailboxId">>;
2153
+ readonly after: Schema.optionalKey<Schema.String>;
2154
+ readonly before: Schema.optionalKey<Schema.String>;
2003
2155
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
2004
2156
  readonly items: Schema.$Array<Schema.Struct<{
2005
2157
  readonly id: Schema.brand<Schema.String, "ConversationId">;
2006
2158
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
2007
2159
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2008
2160
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
2009
- readonly primaryChannel: Schema.Literal<"email">;
2010
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
2161
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2162
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
2011
2163
  readonly priority: Schema.Finite;
2012
2164
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
2013
2165
  readonly tags: Schema.$Array<Schema.String>;
@@ -2045,6 +2197,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2045
2197
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
2046
2198
  readonly message: Schema.String;
2047
2199
  readonly retryAfterSeconds: Schema.Finite;
2200
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2201
+ readonly _tag: "MalformedRequestError";
2202
+ readonly message: string;
2203
+ readonly fields: {
2204
+ readonly [x: string]: readonly string[];
2205
+ };
2206
+ }, readonly [Schema.Struct<{
2207
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2208
+ readonly message: Schema.String;
2209
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2210
+ }>], {
2211
+ readonly _tag: "MalformedRequestError";
2212
+ readonly message: string;
2213
+ readonly fields: {
2214
+ readonly [x: string]: readonly string[];
2215
+ };
2216
+ }>, Schema.Struct<{
2217
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2218
+ readonly message: Schema.String;
2219
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2048
2220
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
2049
2221
  readonly _tag: "UnauthorizedError";
2050
2222
  readonly message: string;
@@ -2081,9 +2253,9 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2081
2253
  readonly id: Schema.brand<Schema.String, "ConversationId">;
2082
2254
  }>>, Schema.toCodecStringTree<Schema.Struct<{
2083
2255
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
2084
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2085
- readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2086
- readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2256
+ readonly cursor: Schema.optionalKey<Schema.String>;
2257
+ readonly after: Schema.optionalKey<Schema.String>;
2258
+ readonly before: Schema.optionalKey<Schema.String>;
2087
2259
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
2088
2260
  readonly items: Schema.$Array<Schema.Struct<{
2089
2261
  readonly id: Schema.brand<Schema.String, "MessageId">;
@@ -2091,7 +2263,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2091
2263
  readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
2092
2264
  readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
2093
2265
  }>, Schema.Null]>>;
2094
- readonly channel: Schema.Literal<"email">;
2266
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2095
2267
  readonly direction: Schema.Union<readonly [Schema.Literal<"outbound">, Schema.Literal<"inbound">]>;
2096
2268
  readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"scheduled">, Schema.Literal<"queued">, Schema.Literal<"processing">, Schema.Literal<"sent">, Schema.Literal<"delivered">, Schema.Literal<"read">, Schema.Literal<"failed">, Schema.Literal<"bounced">, Schema.Literal<"complained">]>;
2097
2269
  readonly from: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -2129,6 +2301,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2129
2301
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
2130
2302
  readonly message: Schema.String;
2131
2303
  readonly retryAfterSeconds: Schema.Finite;
2304
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2305
+ readonly _tag: "MalformedRequestError";
2306
+ readonly message: string;
2307
+ readonly fields: {
2308
+ readonly [x: string]: readonly string[];
2309
+ };
2310
+ }, readonly [Schema.Struct<{
2311
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2312
+ readonly message: Schema.String;
2313
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2314
+ }>], {
2315
+ readonly _tag: "MalformedRequestError";
2316
+ readonly message: string;
2317
+ readonly fields: {
2318
+ readonly [x: string]: readonly string[];
2319
+ };
2320
+ }>, Schema.Struct<{
2321
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2322
+ readonly message: Schema.String;
2323
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2132
2324
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
2133
2325
  readonly _tag: "ResourceNotFoundError";
2134
2326
  readonly resource: string;
@@ -2190,8 +2382,8 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2190
2382
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
2191
2383
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2192
2384
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
2193
- readonly primaryChannel: Schema.Literal<"email">;
2194
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
2385
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2386
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
2195
2387
  readonly priority: Schema.Finite;
2196
2388
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
2197
2389
  readonly tags: Schema.$Array<Schema.String>;
@@ -2263,6 +2455,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2263
2455
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
2264
2456
  readonly message: Schema.String;
2265
2457
  readonly retryAfterSeconds: Schema.Finite;
2458
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2459
+ readonly _tag: "MalformedRequestError";
2460
+ readonly message: string;
2461
+ readonly fields: {
2462
+ readonly [x: string]: readonly string[];
2463
+ };
2464
+ }, readonly [Schema.Struct<{
2465
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2466
+ readonly message: Schema.String;
2467
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2468
+ }>], {
2469
+ readonly _tag: "MalformedRequestError";
2470
+ readonly message: string;
2471
+ readonly fields: {
2472
+ readonly [x: string]: readonly string[];
2473
+ };
2474
+ }>, Schema.Struct<{
2475
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2476
+ readonly message: Schema.String;
2477
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2266
2478
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
2267
2479
  readonly _tag: "ResourceNotFoundError";
2268
2480
  readonly resource: string;
@@ -2318,14 +2530,14 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2318
2530
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"conversationsRemoveChannels", "DELETE", "/v1/conversations/:id/channels", Schema.toCodecStringTree<Schema.Struct<{
2319
2531
  readonly id: Schema.brand<Schema.String, "ConversationId">;
2320
2532
  }>>, never, Schema.toCodecJson<Schema.Struct<{
2321
- readonly channels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Literal<"email">]>, readonly [Schema.Literal<"email">]>;
2533
+ readonly channels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>]>, readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>]>;
2322
2534
  }>>, never, Schema.toCodecJson<Schema.Struct<{
2323
2535
  readonly id: Schema.brand<Schema.String, "ConversationId">;
2324
2536
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
2325
2537
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2326
2538
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
2327
- readonly primaryChannel: Schema.Literal<"email">;
2328
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
2539
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2540
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
2329
2541
  readonly priority: Schema.Finite;
2330
2542
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
2331
2543
  readonly tags: Schema.$Array<Schema.String>;
@@ -2397,6 +2609,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2397
2609
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
2398
2610
  readonly message: Schema.String;
2399
2611
  readonly retryAfterSeconds: Schema.Finite;
2612
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2613
+ readonly _tag: "MalformedRequestError";
2614
+ readonly message: string;
2615
+ readonly fields: {
2616
+ readonly [x: string]: readonly string[];
2617
+ };
2618
+ }, readonly [Schema.Struct<{
2619
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2620
+ readonly message: Schema.String;
2621
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2622
+ }>], {
2623
+ readonly _tag: "MalformedRequestError";
2624
+ readonly message: string;
2625
+ readonly fields: {
2626
+ readonly [x: string]: readonly string[];
2627
+ };
2628
+ }>, Schema.Struct<{
2629
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2630
+ readonly message: Schema.String;
2631
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2400
2632
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
2401
2633
  readonly _tag: "ResourceNotFoundError";
2402
2634
  readonly resource: string;
@@ -2458,8 +2690,8 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2458
2690
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
2459
2691
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2460
2692
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
2461
- readonly primaryChannel: Schema.Literal<"email">;
2462
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
2693
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2694
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
2463
2695
  readonly priority: Schema.Finite;
2464
2696
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
2465
2697
  readonly tags: Schema.$Array<Schema.String>;
@@ -2531,6 +2763,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2531
2763
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
2532
2764
  readonly message: Schema.String;
2533
2765
  readonly retryAfterSeconds: Schema.Finite;
2766
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2767
+ readonly _tag: "MalformedRequestError";
2768
+ readonly message: string;
2769
+ readonly fields: {
2770
+ readonly [x: string]: readonly string[];
2771
+ };
2772
+ }, readonly [Schema.Struct<{
2773
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2774
+ readonly message: Schema.String;
2775
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2776
+ }>], {
2777
+ readonly _tag: "MalformedRequestError";
2778
+ readonly message: string;
2779
+ readonly fields: {
2780
+ readonly [x: string]: readonly string[];
2781
+ };
2782
+ }>, Schema.Struct<{
2783
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2784
+ readonly message: Schema.String;
2785
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2534
2786
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
2535
2787
  readonly _tag: "ResourceNotFoundError";
2536
2788
  readonly resource: string;
@@ -2592,8 +2844,8 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2592
2844
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
2593
2845
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2594
2846
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
2595
- readonly primaryChannel: Schema.Literal<"email">;
2596
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
2847
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2848
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
2597
2849
  readonly priority: Schema.Finite;
2598
2850
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
2599
2851
  readonly tags: Schema.$Array<Schema.String>;
@@ -2665,6 +2917,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2665
2917
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
2666
2918
  readonly message: Schema.String;
2667
2919
  readonly retryAfterSeconds: Schema.Finite;
2920
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2921
+ readonly _tag: "MalformedRequestError";
2922
+ readonly message: string;
2923
+ readonly fields: {
2924
+ readonly [x: string]: readonly string[];
2925
+ };
2926
+ }, readonly [Schema.Struct<{
2927
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2928
+ readonly message: Schema.String;
2929
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2930
+ }>], {
2931
+ readonly _tag: "MalformedRequestError";
2932
+ readonly message: string;
2933
+ readonly fields: {
2934
+ readonly [x: string]: readonly string[];
2935
+ };
2936
+ }>, Schema.Struct<{
2937
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2938
+ readonly message: Schema.String;
2939
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2668
2940
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
2669
2941
  readonly _tag: "ResourceNotFoundError";
2670
2942
  readonly resource: string;
@@ -2724,7 +2996,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2724
2996
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2725
2997
  readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2726
2998
  readonly parentConversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
2727
- readonly primaryChannel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
2999
+ readonly primaryChannel: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>, Schema.Null]>>;
2728
3000
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>, Schema.Null]>>;
2729
3001
  readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2730
3002
  readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
@@ -2750,8 +3022,8 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2750
3022
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
2751
3023
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2752
3024
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
2753
- readonly primaryChannel: Schema.Literal<"email">;
2754
- readonly channels: Schema.$Array<Schema.Literal<"email">>;
3025
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3026
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
2755
3027
  readonly priority: Schema.Finite;
2756
3028
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
2757
3029
  readonly tags: Schema.$Array<Schema.String>;
@@ -2823,6 +3095,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2823
3095
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
2824
3096
  readonly message: Schema.String;
2825
3097
  readonly retryAfterSeconds: Schema.Finite;
3098
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
3099
+ readonly _tag: "MalformedRequestError";
3100
+ readonly message: string;
3101
+ readonly fields: {
3102
+ readonly [x: string]: readonly string[];
3103
+ };
3104
+ }, readonly [Schema.Struct<{
3105
+ readonly _tag: Schema.tag<"MalformedRequestError">;
3106
+ readonly message: Schema.String;
3107
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
3108
+ }>], {
3109
+ readonly _tag: "MalformedRequestError";
3110
+ readonly message: string;
3111
+ readonly fields: {
3112
+ readonly [x: string]: readonly string[];
3113
+ };
3114
+ }>, Schema.Struct<{
3115
+ readonly _tag: Schema.tag<"MalformedRequestError">;
3116
+ readonly message: Schema.String;
3117
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2826
3118
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
2827
3119
  readonly _tag: "ResourceNotFoundError";
2828
3120
  readonly resource: string;