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,17 +1,18 @@
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, ConflictError, ContactId, ConversationId, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MailboxId, MalformedRequestError, MessagePage, NamespaceId, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared";
4
4
  export type UnknownRecord = {
5
5
  readonly [x: string]: JsonValue;
6
6
  };
7
7
  export declare const UnknownRecord: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
8
8
  export type ConversationSummary = {
9
9
  readonly id: ConversationId;
10
+ readonly namespaceId: NamespaceId | null;
10
11
  readonly title: string | null;
11
12
  readonly externalId: string | null;
12
13
  readonly status: "active" | "waiting" | "resolved" | "escalated" | "archived";
13
- readonly primaryChannel: "email";
14
- readonly channels: ReadonlyArray<"email">;
14
+ readonly primaryChannel: "sms" | "whatsapp" | "email";
15
+ readonly channels: ReadonlyArray<"sms" | "whatsapp" | "email">;
15
16
  readonly priority: number;
16
17
  readonly urgency: "low" | "medium" | "high" | "critical";
17
18
  readonly tags: ReadonlyArray<string>;
@@ -22,11 +23,12 @@ export type ConversationSummary = {
22
23
  };
23
24
  export declare const ConversationSummary: Schema.Struct<{
24
25
  readonly id: Schema.brand<Schema.String, "ConversationId">;
26
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
25
27
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
26
28
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
27
29
  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">>;
30
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
31
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
30
32
  readonly priority: Schema.Finite;
31
33
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
32
34
  readonly tags: Schema.$Array<Schema.String>;
@@ -84,11 +86,12 @@ export type ConversationPage = {
84
86
  export declare const ConversationPage: Schema.Struct<{
85
87
  readonly items: Schema.$Array<Schema.Struct<{
86
88
  readonly id: Schema.brand<Schema.String, "ConversationId">;
89
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
87
90
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
88
91
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
89
92
  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">>;
93
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
94
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
92
95
  readonly priority: Schema.Finite;
93
96
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
94
97
  readonly tags: Schema.$Array<Schema.String>;
@@ -101,11 +104,12 @@ export declare const ConversationPage: Schema.Struct<{
101
104
  }>;
102
105
  export type Conversation = {
103
106
  readonly id: ConversationId;
107
+ readonly namespaceId: NamespaceId | null;
104
108
  readonly title: string | null;
105
109
  readonly externalId: string | null;
106
110
  readonly status: "active" | "waiting" | "resolved" | "escalated" | "archived";
107
- readonly primaryChannel: "email";
108
- readonly channels: ReadonlyArray<"email">;
111
+ readonly primaryChannel: "sms" | "whatsapp" | "email";
112
+ readonly channels: ReadonlyArray<"sms" | "whatsapp" | "email">;
109
113
  readonly priority: number;
110
114
  readonly urgency: "low" | "medium" | "high" | "critical";
111
115
  readonly tags: ReadonlyArray<string>;
@@ -133,11 +137,12 @@ export type Conversation = {
133
137
  };
134
138
  export declare const Conversation: Schema.Struct<{
135
139
  readonly id: Schema.brand<Schema.String, "ConversationId">;
140
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
136
141
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
137
142
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
138
143
  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">>;
144
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
145
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
141
146
  readonly priority: Schema.Finite;
142
147
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
143
148
  readonly tags: Schema.$Array<Schema.String>;
@@ -184,33 +189,36 @@ export declare const Conversation: Schema.Struct<{
184
189
  }>;
185
190
  export type ConversationsListQuery = {
186
191
  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;
192
+ readonly cursor?: string;
193
+ readonly namespaceId?: NamespaceId;
194
+ readonly status?: "active" | "waiting" | "resolved" | "escalated" | "archived";
195
+ readonly channel?: "sms" | "whatsapp" | "email";
196
+ readonly contactId?: ContactId;
197
+ readonly mailboxId?: MailboxId;
198
+ readonly after?: string;
199
+ readonly before?: string;
194
200
  };
195
201
  export declare const ConversationsListQuery: Schema.Struct<{
196
202
  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]>>;
203
+ readonly cursor: Schema.optionalKey<Schema.String>;
204
+ readonly namespaceId: Schema.optionalKey<Schema.brand<Schema.String, "NamespaceId">>;
205
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>>;
206
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
207
+ readonly contactId: Schema.optionalKey<Schema.brand<Schema.String, "ContactId">>;
208
+ readonly mailboxId: Schema.optionalKey<Schema.brand<Schema.String, "MailboxId">>;
209
+ readonly after: Schema.optionalKey<Schema.String>;
210
+ readonly before: Schema.optionalKey<Schema.String>;
204
211
  }>;
205
212
  export type ConversationsList200 = ConversationPage;
206
213
  export declare const ConversationsList200: Schema.Struct<{
207
214
  readonly items: Schema.$Array<Schema.Struct<{
208
215
  readonly id: Schema.brand<Schema.String, "ConversationId">;
216
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
209
217
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
210
218
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
211
219
  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">>;
220
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
221
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
214
222
  readonly priority: Schema.Finite;
215
223
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
216
224
  readonly tags: Schema.$Array<Schema.String>;
@@ -221,6 +229,8 @@ export declare const ConversationsList200: Schema.Struct<{
221
229
  }>>;
222
230
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
223
231
  }>;
232
+ export type ConversationsList400 = MalformedRequestError;
233
+ export declare const ConversationsList400: typeof MalformedRequestError;
224
234
  export type ConversationsList401 = UnauthorizedError;
225
235
  export declare const ConversationsList401: typeof UnauthorizedError;
226
236
  export type ConversationsList403 = ForbiddenError;
@@ -232,12 +242,13 @@ export declare const ConversationsList500: typeof InternalError;
232
242
  export type ConversationsList504 = GatewayTimeoutError;
233
243
  export declare const ConversationsList504: typeof GatewayTimeoutError;
234
244
  export type ConversationsCreateRequestJson = {
245
+ readonly namespaceId?: NamespaceId | null;
235
246
  readonly title?: string | null;
236
247
  readonly description?: string | null;
237
248
  readonly externalId?: string | null;
238
249
  readonly parentConversationId?: ConversationId | null;
239
- readonly channels: ReadonlyArray<"email">;
240
- readonly primaryChannel: "email";
250
+ readonly channels: ReadonlyArray<"sms" | "whatsapp" | "email">;
251
+ readonly primaryChannel: "sms" | "whatsapp" | "email";
241
252
  readonly status?: "active" | "waiting" | "resolved" | "escalated" | "archived" | null;
242
253
  readonly statusReason?: string | null;
243
254
  readonly priority?: number | null;
@@ -252,12 +263,13 @@ export type ConversationsCreateRequestJson = {
252
263
  readonly isPrivate?: boolean | null;
253
264
  };
254
265
  export declare const ConversationsCreateRequestJson: Schema.Struct<{
266
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
255
267
  readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
256
268
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
257
269
  readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
258
270
  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">;
271
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
272
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
261
273
  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
274
  readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
263
275
  readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
@@ -284,11 +296,12 @@ export declare const ConversationsCreateRequestJson: Schema.Struct<{
284
296
  export type ConversationsCreate201 = Conversation;
285
297
  export declare const ConversationsCreate201: Schema.Struct<{
286
298
  readonly id: Schema.brand<Schema.String, "ConversationId">;
299
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
287
300
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
288
301
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
289
302
  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">>;
303
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
304
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
292
305
  readonly priority: Schema.Finite;
293
306
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
294
307
  readonly tags: Schema.$Array<Schema.String>;
@@ -333,10 +346,16 @@ export declare const ConversationsCreate201: Schema.Struct<{
333
346
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
334
347
  readonly updatedAt: Schema.String;
335
348
  }>;
349
+ export type ConversationsCreate400 = MalformedRequestError;
350
+ export declare const ConversationsCreate400: typeof MalformedRequestError;
336
351
  export type ConversationsCreate401 = UnauthorizedError;
337
352
  export declare const ConversationsCreate401: typeof UnauthorizedError;
338
353
  export type ConversationsCreate403 = ForbiddenError;
339
354
  export declare const ConversationsCreate403: typeof ForbiddenError;
355
+ export type ConversationsCreate404 = ResourceNotFoundError;
356
+ export declare const ConversationsCreate404: typeof ResourceNotFoundError;
357
+ export type ConversationsCreate409 = ConflictError;
358
+ export declare const ConversationsCreate409: typeof ConflictError;
340
359
  export type ConversationsCreate422 = ValidationError;
341
360
  export declare const ConversationsCreate422: typeof ValidationError;
342
361
  export type ConversationsCreate500 = InternalError;
@@ -352,11 +371,12 @@ export declare const ConversationsGetByIdPathParams: Schema.Struct<{
352
371
  export type ConversationsGetById200 = Conversation;
353
372
  export declare const ConversationsGetById200: Schema.Struct<{
354
373
  readonly id: Schema.brand<Schema.String, "ConversationId">;
374
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
355
375
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
356
376
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
357
377
  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">>;
378
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
379
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
360
380
  readonly priority: Schema.Finite;
361
381
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
362
382
  readonly tags: Schema.$Array<Schema.String>;
@@ -401,6 +421,8 @@ export declare const ConversationsGetById200: Schema.Struct<{
401
421
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
402
422
  readonly updatedAt: Schema.String;
403
423
  }>;
424
+ export type ConversationsGetById400 = MalformedRequestError;
425
+ export declare const ConversationsGetById400: typeof MalformedRequestError;
404
426
  export type ConversationsGetById401 = UnauthorizedError;
405
427
  export declare const ConversationsGetById401: typeof UnauthorizedError;
406
428
  export type ConversationsGetById403 = ForbiddenError;
@@ -424,7 +446,7 @@ export type ConversationsUpdateRequestJson = {
424
446
  readonly description?: string | null;
425
447
  readonly externalId?: string | null;
426
448
  readonly parentConversationId?: ConversationId | null;
427
- readonly primaryChannel?: "email" | null;
449
+ readonly primaryChannel?: "sms" | "whatsapp" | "email" | null;
428
450
  readonly status?: "active" | "waiting" | "resolved" | "escalated" | "archived" | null;
429
451
  readonly statusReason?: string | null;
430
452
  readonly priority?: number | null;
@@ -441,7 +463,7 @@ export declare const ConversationsUpdateRequestJson: Schema.Struct<{
441
463
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
442
464
  readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
443
465
  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]>>;
466
+ readonly primaryChannel: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>, Schema.Null]>>;
445
467
  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
468
  readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
447
469
  readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
@@ -466,11 +488,12 @@ export declare const ConversationsUpdateRequestJson: Schema.Struct<{
466
488
  export type ConversationsUpdate200 = Conversation;
467
489
  export declare const ConversationsUpdate200: Schema.Struct<{
468
490
  readonly id: Schema.brand<Schema.String, "ConversationId">;
491
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
469
492
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
470
493
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
471
494
  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">>;
495
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
496
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
474
497
  readonly priority: Schema.Finite;
475
498
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
476
499
  readonly tags: Schema.$Array<Schema.String>;
@@ -515,12 +538,16 @@ export declare const ConversationsUpdate200: Schema.Struct<{
515
538
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
516
539
  readonly updatedAt: Schema.String;
517
540
  }>;
541
+ export type ConversationsUpdate400 = MalformedRequestError;
542
+ export declare const ConversationsUpdate400: typeof MalformedRequestError;
518
543
  export type ConversationsUpdate401 = UnauthorizedError;
519
544
  export declare const ConversationsUpdate401: typeof UnauthorizedError;
520
545
  export type ConversationsUpdate403 = ForbiddenError;
521
546
  export declare const ConversationsUpdate403: typeof ForbiddenError;
522
547
  export type ConversationsUpdate404 = ResourceNotFoundError;
523
548
  export declare const ConversationsUpdate404: typeof ResourceNotFoundError;
549
+ export type ConversationsUpdate409 = ConflictError;
550
+ export declare const ConversationsUpdate409: typeof ConflictError;
524
551
  export type ConversationsUpdate422 = ValidationError;
525
552
  export declare const ConversationsUpdate422: typeof ValidationError;
526
553
  export type ConversationsUpdate500 = InternalError;
@@ -542,11 +569,12 @@ export declare const ConversationsAddCategoriesRequestJson: Schema.Struct<{
542
569
  export type ConversationsAddCategories200 = Conversation;
543
570
  export declare const ConversationsAddCategories200: Schema.Struct<{
544
571
  readonly id: Schema.brand<Schema.String, "ConversationId">;
572
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
545
573
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
546
574
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
547
575
  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">>;
576
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
577
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
550
578
  readonly priority: Schema.Finite;
551
579
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
552
580
  readonly tags: Schema.$Array<Schema.String>;
@@ -591,6 +619,8 @@ export declare const ConversationsAddCategories200: Schema.Struct<{
591
619
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
592
620
  readonly updatedAt: Schema.String;
593
621
  }>;
622
+ export type ConversationsAddCategories400 = MalformedRequestError;
623
+ export declare const ConversationsAddCategories400: typeof MalformedRequestError;
594
624
  export type ConversationsAddCategories401 = UnauthorizedError;
595
625
  export declare const ConversationsAddCategories401: typeof UnauthorizedError;
596
626
  export type ConversationsAddCategories403 = ForbiddenError;
@@ -618,11 +648,12 @@ export declare const ConversationsRemoveCategoriesRequestJson: Schema.Struct<{
618
648
  export type ConversationsRemoveCategories200 = Conversation;
619
649
  export declare const ConversationsRemoveCategories200: Schema.Struct<{
620
650
  readonly id: Schema.brand<Schema.String, "ConversationId">;
651
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
621
652
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
622
653
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
623
654
  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">>;
655
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
656
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
626
657
  readonly priority: Schema.Finite;
627
658
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
628
659
  readonly tags: Schema.$Array<Schema.String>;
@@ -667,6 +698,8 @@ export declare const ConversationsRemoveCategories200: Schema.Struct<{
667
698
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
668
699
  readonly updatedAt: Schema.String;
669
700
  }>;
701
+ export type ConversationsRemoveCategories400 = MalformedRequestError;
702
+ export declare const ConversationsRemoveCategories400: typeof MalformedRequestError;
670
703
  export type ConversationsRemoveCategories401 = UnauthorizedError;
671
704
  export declare const ConversationsRemoveCategories401: typeof UnauthorizedError;
672
705
  export type ConversationsRemoveCategories403 = ForbiddenError;
@@ -686,19 +719,23 @@ export declare const ConversationsAddChannelsPathParams: Schema.Struct<{
686
719
  readonly id: Schema.brand<Schema.String, "ConversationId">;
687
720
  }>;
688
721
  export type ConversationsAddChannelsRequestJson = {
689
- readonly channels: readonly ["email", ...Array<"email">];
722
+ readonly channels: readonly [
723
+ "sms" | "whatsapp" | "email",
724
+ ...Array<"sms" | "whatsapp" | "email">
725
+ ];
690
726
  };
691
727
  export declare const ConversationsAddChannelsRequestJson: Schema.Struct<{
692
- readonly channels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Literal<"email">]>, readonly [Schema.Literal<"email">]>;
728
+ 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
729
  }>;
694
730
  export type ConversationsAddChannels200 = Conversation;
695
731
  export declare const ConversationsAddChannels200: Schema.Struct<{
696
732
  readonly id: Schema.brand<Schema.String, "ConversationId">;
733
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
697
734
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
698
735
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
699
736
  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">>;
737
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
738
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
702
739
  readonly priority: Schema.Finite;
703
740
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
704
741
  readonly tags: Schema.$Array<Schema.String>;
@@ -743,6 +780,8 @@ export declare const ConversationsAddChannels200: Schema.Struct<{
743
780
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
744
781
  readonly updatedAt: Schema.String;
745
782
  }>;
783
+ export type ConversationsAddChannels400 = MalformedRequestError;
784
+ export declare const ConversationsAddChannels400: typeof MalformedRequestError;
746
785
  export type ConversationsAddChannels401 = UnauthorizedError;
747
786
  export declare const ConversationsAddChannels401: typeof UnauthorizedError;
748
787
  export type ConversationsAddChannels403 = ForbiddenError;
@@ -762,19 +801,23 @@ export declare const ConversationsRemoveChannelsPathParams: Schema.Struct<{
762
801
  readonly id: Schema.brand<Schema.String, "ConversationId">;
763
802
  }>;
764
803
  export type ConversationsRemoveChannelsRequestJson = {
765
- readonly channels: readonly ["email", ...Array<"email">];
804
+ readonly channels: readonly [
805
+ "sms" | "whatsapp" | "email",
806
+ ...Array<"sms" | "whatsapp" | "email">
807
+ ];
766
808
  };
767
809
  export declare const ConversationsRemoveChannelsRequestJson: Schema.Struct<{
768
- readonly channels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Literal<"email">]>, readonly [Schema.Literal<"email">]>;
810
+ 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
811
  }>;
770
812
  export type ConversationsRemoveChannels200 = Conversation;
771
813
  export declare const ConversationsRemoveChannels200: Schema.Struct<{
772
814
  readonly id: Schema.brand<Schema.String, "ConversationId">;
815
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
773
816
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
774
817
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
775
818
  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">>;
819
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
820
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
778
821
  readonly priority: Schema.Finite;
779
822
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
780
823
  readonly tags: Schema.$Array<Schema.String>;
@@ -819,6 +862,8 @@ export declare const ConversationsRemoveChannels200: Schema.Struct<{
819
862
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
820
863
  readonly updatedAt: Schema.String;
821
864
  }>;
865
+ export type ConversationsRemoveChannels400 = MalformedRequestError;
866
+ export declare const ConversationsRemoveChannels400: typeof MalformedRequestError;
822
867
  export type ConversationsRemoveChannels401 = UnauthorizedError;
823
868
  export declare const ConversationsRemoveChannels401: typeof UnauthorizedError;
824
869
  export type ConversationsRemoveChannels403 = ForbiddenError;
@@ -846,11 +891,12 @@ export declare const ConversationsAddContactsRequestJson: Schema.Struct<{
846
891
  export type ConversationsAddContacts200 = Conversation;
847
892
  export declare const ConversationsAddContacts200: Schema.Struct<{
848
893
  readonly id: Schema.brand<Schema.String, "ConversationId">;
894
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
849
895
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
850
896
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
851
897
  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">>;
898
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
899
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
854
900
  readonly priority: Schema.Finite;
855
901
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
856
902
  readonly tags: Schema.$Array<Schema.String>;
@@ -895,6 +941,8 @@ export declare const ConversationsAddContacts200: Schema.Struct<{
895
941
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
896
942
  readonly updatedAt: Schema.String;
897
943
  }>;
944
+ export type ConversationsAddContacts400 = MalformedRequestError;
945
+ export declare const ConversationsAddContacts400: typeof MalformedRequestError;
898
946
  export type ConversationsAddContacts401 = UnauthorizedError;
899
947
  export declare const ConversationsAddContacts401: typeof UnauthorizedError;
900
948
  export type ConversationsAddContacts403 = ForbiddenError;
@@ -922,11 +970,12 @@ export declare const ConversationsRemoveContactsRequestJson: Schema.Struct<{
922
970
  export type ConversationsRemoveContacts200 = Conversation;
923
971
  export declare const ConversationsRemoveContacts200: Schema.Struct<{
924
972
  readonly id: Schema.brand<Schema.String, "ConversationId">;
973
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
925
974
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
926
975
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
927
976
  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">>;
977
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
978
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
930
979
  readonly priority: Schema.Finite;
931
980
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
932
981
  readonly tags: Schema.$Array<Schema.String>;
@@ -971,6 +1020,8 @@ export declare const ConversationsRemoveContacts200: Schema.Struct<{
971
1020
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
972
1021
  readonly updatedAt: Schema.String;
973
1022
  }>;
1023
+ export type ConversationsRemoveContacts400 = MalformedRequestError;
1024
+ export declare const ConversationsRemoveContacts400: typeof MalformedRequestError;
974
1025
  export type ConversationsRemoveContacts401 = UnauthorizedError;
975
1026
  export declare const ConversationsRemoveContacts401: typeof UnauthorizedError;
976
1027
  export type ConversationsRemoveContacts403 = ForbiddenError;
@@ -991,15 +1042,15 @@ export declare const ConversationsListMessagesPathParams: Schema.Struct<{
991
1042
  }>;
992
1043
  export type ConversationsListMessagesQuery = {
993
1044
  readonly limit?: number | null;
994
- readonly cursor?: Cursor | null;
995
- readonly after?: string | null;
996
- readonly before?: string | null;
1045
+ readonly cursor?: string;
1046
+ readonly after?: string;
1047
+ readonly before?: string;
997
1048
  };
998
1049
  export declare const ConversationsListMessagesQuery: Schema.Struct<{
999
1050
  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]>>;
1051
+ readonly cursor: Schema.optionalKey<Schema.String>;
1052
+ readonly after: Schema.optionalKey<Schema.String>;
1053
+ readonly before: Schema.optionalKey<Schema.String>;
1003
1054
  }>;
1004
1055
  export type ConversationsListMessages200 = MessagePage;
1005
1056
  export declare const ConversationsListMessages200: Schema.Struct<{
@@ -1009,7 +1060,7 @@ export declare const ConversationsListMessages200: Schema.Struct<{
1009
1060
  readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
1010
1061
  readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
1011
1062
  }>, Schema.Null]>>;
1012
- readonly channel: Schema.Literal<"email">;
1063
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1013
1064
  readonly direction: Schema.Union<readonly [Schema.Literal<"outbound">, Schema.Literal<"inbound">]>;
1014
1065
  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
1066
  readonly from: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1020,6 +1071,8 @@ export declare const ConversationsListMessages200: Schema.Struct<{
1020
1071
  }>>;
1021
1072
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
1022
1073
  }>;
1074
+ export type ConversationsListMessages400 = MalformedRequestError;
1075
+ export declare const ConversationsListMessages400: typeof MalformedRequestError;
1023
1076
  export type ConversationsListMessages401 = UnauthorizedError;
1024
1077
  export declare const ConversationsListMessages401: typeof UnauthorizedError;
1025
1078
  export type ConversationsListMessages403 = ForbiddenError;
@@ -1047,11 +1100,12 @@ export declare const ConversationsAddTagsRequestJson: Schema.Struct<{
1047
1100
  export type ConversationsAddTags200 = Conversation;
1048
1101
  export declare const ConversationsAddTags200: Schema.Struct<{
1049
1102
  readonly id: Schema.brand<Schema.String, "ConversationId">;
1103
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1050
1104
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1051
1105
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1052
1106
  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">>;
1107
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1108
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1055
1109
  readonly priority: Schema.Finite;
1056
1110
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1057
1111
  readonly tags: Schema.$Array<Schema.String>;
@@ -1096,6 +1150,8 @@ export declare const ConversationsAddTags200: Schema.Struct<{
1096
1150
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
1097
1151
  readonly updatedAt: Schema.String;
1098
1152
  }>;
1153
+ export type ConversationsAddTags400 = MalformedRequestError;
1154
+ export declare const ConversationsAddTags400: typeof MalformedRequestError;
1099
1155
  export type ConversationsAddTags401 = UnauthorizedError;
1100
1156
  export declare const ConversationsAddTags401: typeof UnauthorizedError;
1101
1157
  export type ConversationsAddTags403 = ForbiddenError;
@@ -1123,11 +1179,12 @@ export declare const ConversationsRemoveTagsRequestJson: Schema.Struct<{
1123
1179
  export type ConversationsRemoveTags200 = Conversation;
1124
1180
  export declare const ConversationsRemoveTags200: Schema.Struct<{
1125
1181
  readonly id: Schema.brand<Schema.String, "ConversationId">;
1182
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1126
1183
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1127
1184
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1128
1185
  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">>;
1186
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1187
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1131
1188
  readonly priority: Schema.Finite;
1132
1189
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1133
1190
  readonly tags: Schema.$Array<Schema.String>;
@@ -1172,6 +1229,8 @@ export declare const ConversationsRemoveTags200: Schema.Struct<{
1172
1229
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
1173
1230
  readonly updatedAt: Schema.String;
1174
1231
  }>;
1232
+ export type ConversationsRemoveTags400 = MalformedRequestError;
1233
+ export declare const ConversationsRemoveTags400: typeof MalformedRequestError;
1175
1234
  export type ConversationsRemoveTags401 = UnauthorizedError;
1176
1235
  export declare const ConversationsRemoveTags401: typeof UnauthorizedError;
1177
1236
  export type ConversationsRemoveTags403 = ForbiddenError;
@@ -1190,11 +1249,12 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1190
1249
  readonly categories: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.String]>, readonly [Schema.String]>;
1191
1250
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1192
1251
  readonly id: Schema.brand<Schema.String, "ConversationId">;
1252
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1193
1253
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1194
1254
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1195
1255
  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">>;
1256
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1257
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1198
1258
  readonly priority: Schema.Finite;
1199
1259
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1200
1260
  readonly tags: Schema.$Array<Schema.String>;
@@ -1266,6 +1326,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1266
1326
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1267
1327
  readonly message: Schema.String;
1268
1328
  readonly retryAfterSeconds: Schema.Finite;
1329
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1330
+ readonly _tag: "MalformedRequestError";
1331
+ readonly message: string;
1332
+ readonly fields: {
1333
+ readonly [x: string]: readonly string[];
1334
+ };
1335
+ }, readonly [Schema.Struct<{
1336
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1337
+ readonly message: Schema.String;
1338
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1339
+ }>], {
1340
+ readonly _tag: "MalformedRequestError";
1341
+ readonly message: string;
1342
+ readonly fields: {
1343
+ readonly [x: string]: readonly string[];
1344
+ };
1345
+ }>, Schema.Struct<{
1346
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1347
+ readonly message: Schema.String;
1348
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1269
1349
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1270
1350
  readonly _tag: "ResourceNotFoundError";
1271
1351
  readonly resource: string;
@@ -1321,14 +1401,15 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1321
1401
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"conversationsAddChannels", "POST", "/v1/conversations/:id/channels", Schema.toCodecStringTree<Schema.Struct<{
1322
1402
  readonly id: Schema.brand<Schema.String, "ConversationId">;
1323
1403
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1324
- readonly channels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Literal<"email">]>, readonly [Schema.Literal<"email">]>;
1404
+ 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
1405
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1326
1406
  readonly id: Schema.brand<Schema.String, "ConversationId">;
1407
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1327
1408
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1328
1409
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1329
1410
  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">>;
1411
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1412
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1332
1413
  readonly priority: Schema.Finite;
1333
1414
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1334
1415
  readonly tags: Schema.$Array<Schema.String>;
@@ -1400,6 +1481,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1400
1481
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1401
1482
  readonly message: Schema.String;
1402
1483
  readonly retryAfterSeconds: Schema.Finite;
1484
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1485
+ readonly _tag: "MalformedRequestError";
1486
+ readonly message: string;
1487
+ readonly fields: {
1488
+ readonly [x: string]: readonly string[];
1489
+ };
1490
+ }, readonly [Schema.Struct<{
1491
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1492
+ readonly message: Schema.String;
1493
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1494
+ }>], {
1495
+ readonly _tag: "MalformedRequestError";
1496
+ readonly message: string;
1497
+ readonly fields: {
1498
+ readonly [x: string]: readonly string[];
1499
+ };
1500
+ }>, Schema.Struct<{
1501
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1502
+ readonly message: Schema.String;
1503
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1403
1504
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1404
1505
  readonly _tag: "ResourceNotFoundError";
1405
1506
  readonly resource: string;
@@ -1458,11 +1559,12 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1458
1559
  readonly contactIds: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "ContactId">]>, readonly [Schema.brand<Schema.String, "ContactId">]>;
1459
1560
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1460
1561
  readonly id: Schema.brand<Schema.String, "ConversationId">;
1562
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1461
1563
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1462
1564
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1463
1565
  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">>;
1566
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1567
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1466
1568
  readonly priority: Schema.Finite;
1467
1569
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1468
1570
  readonly tags: Schema.$Array<Schema.String>;
@@ -1534,6 +1636,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1534
1636
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1535
1637
  readonly message: Schema.String;
1536
1638
  readonly retryAfterSeconds: Schema.Finite;
1639
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1640
+ readonly _tag: "MalformedRequestError";
1641
+ readonly message: string;
1642
+ readonly fields: {
1643
+ readonly [x: string]: readonly string[];
1644
+ };
1645
+ }, readonly [Schema.Struct<{
1646
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1647
+ readonly message: Schema.String;
1648
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1649
+ }>], {
1650
+ readonly _tag: "MalformedRequestError";
1651
+ readonly message: string;
1652
+ readonly fields: {
1653
+ readonly [x: string]: readonly string[];
1654
+ };
1655
+ }>, Schema.Struct<{
1656
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1657
+ readonly message: Schema.String;
1658
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1537
1659
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1538
1660
  readonly _tag: "ResourceNotFoundError";
1539
1661
  readonly resource: string;
@@ -1592,11 +1714,12 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1592
1714
  readonly tags: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.String]>, readonly [Schema.String]>;
1593
1715
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1594
1716
  readonly id: Schema.brand<Schema.String, "ConversationId">;
1717
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1595
1718
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1596
1719
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1597
1720
  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">>;
1721
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1722
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1600
1723
  readonly priority: Schema.Finite;
1601
1724
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1602
1725
  readonly tags: Schema.$Array<Schema.String>;
@@ -1668,6 +1791,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1668
1791
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1669
1792
  readonly message: Schema.String;
1670
1793
  readonly retryAfterSeconds: Schema.Finite;
1794
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1795
+ readonly _tag: "MalformedRequestError";
1796
+ readonly message: string;
1797
+ readonly fields: {
1798
+ readonly [x: string]: readonly string[];
1799
+ };
1800
+ }, readonly [Schema.Struct<{
1801
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1802
+ readonly message: Schema.String;
1803
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1804
+ }>], {
1805
+ readonly _tag: "MalformedRequestError";
1806
+ readonly message: string;
1807
+ readonly fields: {
1808
+ readonly [x: string]: readonly string[];
1809
+ };
1810
+ }>, Schema.Struct<{
1811
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1812
+ readonly message: Schema.String;
1813
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1671
1814
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1672
1815
  readonly _tag: "ResourceNotFoundError";
1673
1816
  readonly resource: string;
@@ -1721,12 +1864,13 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1721
1864
  readonly message: Schema.String;
1722
1865
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1723
1866
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"conversationsCreate", "POST", "/v1/conversations", never, never, Schema.toCodecJson<Schema.Struct<{
1867
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
1724
1868
  readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1725
1869
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1726
1870
  readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1727
1871
  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">;
1872
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1873
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1730
1874
  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
1875
  readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1732
1876
  readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
@@ -1751,11 +1895,12 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1751
1895
  readonly isPrivate: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1752
1896
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1753
1897
  readonly id: Schema.brand<Schema.String, "ConversationId">;
1898
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1754
1899
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1755
1900
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1756
1901
  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">>;
1902
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
1903
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1759
1904
  readonly priority: Schema.Finite;
1760
1905
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1761
1906
  readonly tags: Schema.$Array<Schema.String>;
@@ -1799,7 +1944,27 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1799
1944
  readonly resolutionType: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"automated">, Schema.Literal<"human_assisted">, Schema.Literal<"escalated">, Schema.Literal<"abandoned">, Schema.Literal<"timeout">]>, Schema.Null]>;
1800
1945
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
1801
1946
  readonly updatedAt: Schema.String;
1802
- }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
1947
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
1948
+ readonly _tag: "ConflictError";
1949
+ readonly message: string;
1950
+ readonly resource: string;
1951
+ readonly id?: string | null;
1952
+ }, readonly [Schema.Struct<{
1953
+ readonly _tag: Schema.tag<"ConflictError">;
1954
+ readonly message: Schema.String;
1955
+ readonly resource: Schema.String;
1956
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1957
+ }>], {
1958
+ readonly _tag: "ConflictError";
1959
+ readonly message: string;
1960
+ readonly resource: string;
1961
+ readonly id?: string | null;
1962
+ }>, Schema.Struct<{
1963
+ readonly _tag: Schema.tag<"ConflictError">;
1964
+ readonly message: Schema.String;
1965
+ readonly resource: Schema.String;
1966
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1967
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
1803
1968
  readonly _tag: "ForbiddenError";
1804
1969
  readonly message: string;
1805
1970
  }, readonly [Schema.Struct<{
@@ -1827,6 +1992,46 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1827
1992
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1828
1993
  readonly message: Schema.String;
1829
1994
  readonly retryAfterSeconds: Schema.Finite;
1995
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1996
+ readonly _tag: "MalformedRequestError";
1997
+ readonly message: string;
1998
+ readonly fields: {
1999
+ readonly [x: string]: readonly string[];
2000
+ };
2001
+ }, readonly [Schema.Struct<{
2002
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2003
+ readonly message: Schema.String;
2004
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2005
+ }>], {
2006
+ readonly _tag: "MalformedRequestError";
2007
+ readonly message: string;
2008
+ readonly fields: {
2009
+ readonly [x: string]: readonly string[];
2010
+ };
2011
+ }>, Schema.Struct<{
2012
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2013
+ readonly message: Schema.String;
2014
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2015
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
2016
+ readonly _tag: "ResourceNotFoundError";
2017
+ readonly resource: string;
2018
+ readonly id: string;
2019
+ readonly message: string;
2020
+ }, readonly [Schema.Struct<{
2021
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
2022
+ readonly resource: Schema.String;
2023
+ readonly id: Schema.String;
2024
+ readonly message: Schema.String;
2025
+ }>], {
2026
+ readonly _tag: "ResourceNotFoundError";
2027
+ readonly resource: string;
2028
+ readonly id: string;
2029
+ readonly message: string;
2030
+ }>, Schema.Struct<{
2031
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
2032
+ readonly resource: Schema.String;
2033
+ readonly id: Schema.String;
2034
+ readonly message: Schema.String;
1830
2035
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
1831
2036
  readonly _tag: "UnauthorizedError";
1832
2037
  readonly message: string;
@@ -1863,11 +2068,12 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1863
2068
  readonly id: Schema.brand<Schema.String, "ConversationId">;
1864
2069
  }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1865
2070
  readonly id: Schema.brand<Schema.String, "ConversationId">;
2071
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1866
2072
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
1867
2073
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1868
2074
  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">>;
2075
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2076
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
1871
2077
  readonly priority: Schema.Finite;
1872
2078
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
1873
2079
  readonly tags: Schema.$Array<Schema.String>;
@@ -1939,6 +2145,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1939
2145
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1940
2146
  readonly message: Schema.String;
1941
2147
  readonly retryAfterSeconds: Schema.Finite;
2148
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2149
+ readonly _tag: "MalformedRequestError";
2150
+ readonly message: string;
2151
+ readonly fields: {
2152
+ readonly [x: string]: readonly string[];
2153
+ };
2154
+ }, readonly [Schema.Struct<{
2155
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2156
+ readonly message: Schema.String;
2157
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2158
+ }>], {
2159
+ readonly _tag: "MalformedRequestError";
2160
+ readonly message: string;
2161
+ readonly fields: {
2162
+ readonly [x: string]: readonly string[];
2163
+ };
2164
+ }>, Schema.Struct<{
2165
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2166
+ readonly message: Schema.String;
2167
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1942
2168
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1943
2169
  readonly _tag: "ResourceNotFoundError";
1944
2170
  readonly resource: string;
@@ -1993,21 +2219,23 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1993
2219
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1994
2220
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"conversationsList", "GET", "/v1/conversations", never, Schema.toCodecStringTree<Schema.Struct<{
1995
2221
  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]>>;
2222
+ readonly cursor: Schema.optionalKey<Schema.String>;
2223
+ readonly namespaceId: Schema.optionalKey<Schema.brand<Schema.String, "NamespaceId">>;
2224
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>>;
2225
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
2226
+ readonly contactId: Schema.optionalKey<Schema.brand<Schema.String, "ContactId">>;
2227
+ readonly mailboxId: Schema.optionalKey<Schema.brand<Schema.String, "MailboxId">>;
2228
+ readonly after: Schema.optionalKey<Schema.String>;
2229
+ readonly before: Schema.optionalKey<Schema.String>;
2003
2230
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
2004
2231
  readonly items: Schema.$Array<Schema.Struct<{
2005
2232
  readonly id: Schema.brand<Schema.String, "ConversationId">;
2233
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
2006
2234
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
2007
2235
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2008
2236
  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">>;
2237
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2238
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
2011
2239
  readonly priority: Schema.Finite;
2012
2240
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
2013
2241
  readonly tags: Schema.$Array<Schema.String>;
@@ -2045,6 +2273,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2045
2273
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
2046
2274
  readonly message: Schema.String;
2047
2275
  readonly retryAfterSeconds: Schema.Finite;
2276
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2277
+ readonly _tag: "MalformedRequestError";
2278
+ readonly message: string;
2279
+ readonly fields: {
2280
+ readonly [x: string]: readonly string[];
2281
+ };
2282
+ }, readonly [Schema.Struct<{
2283
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2284
+ readonly message: Schema.String;
2285
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2286
+ }>], {
2287
+ readonly _tag: "MalformedRequestError";
2288
+ readonly message: string;
2289
+ readonly fields: {
2290
+ readonly [x: string]: readonly string[];
2291
+ };
2292
+ }>, Schema.Struct<{
2293
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2294
+ readonly message: Schema.String;
2295
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2048
2296
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
2049
2297
  readonly _tag: "UnauthorizedError";
2050
2298
  readonly message: string;
@@ -2081,9 +2329,9 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2081
2329
  readonly id: Schema.brand<Schema.String, "ConversationId">;
2082
2330
  }>>, Schema.toCodecStringTree<Schema.Struct<{
2083
2331
  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]>>;
2332
+ readonly cursor: Schema.optionalKey<Schema.String>;
2333
+ readonly after: Schema.optionalKey<Schema.String>;
2334
+ readonly before: Schema.optionalKey<Schema.String>;
2087
2335
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
2088
2336
  readonly items: Schema.$Array<Schema.Struct<{
2089
2337
  readonly id: Schema.brand<Schema.String, "MessageId">;
@@ -2091,7 +2339,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2091
2339
  readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
2092
2340
  readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
2093
2341
  }>, Schema.Null]>>;
2094
- readonly channel: Schema.Literal<"email">;
2342
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2095
2343
  readonly direction: Schema.Union<readonly [Schema.Literal<"outbound">, Schema.Literal<"inbound">]>;
2096
2344
  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
2345
  readonly from: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -2129,6 +2377,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2129
2377
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
2130
2378
  readonly message: Schema.String;
2131
2379
  readonly retryAfterSeconds: Schema.Finite;
2380
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2381
+ readonly _tag: "MalformedRequestError";
2382
+ readonly message: string;
2383
+ readonly fields: {
2384
+ readonly [x: string]: readonly string[];
2385
+ };
2386
+ }, readonly [Schema.Struct<{
2387
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2388
+ readonly message: Schema.String;
2389
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2390
+ }>], {
2391
+ readonly _tag: "MalformedRequestError";
2392
+ readonly message: string;
2393
+ readonly fields: {
2394
+ readonly [x: string]: readonly string[];
2395
+ };
2396
+ }>, Schema.Struct<{
2397
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2398
+ readonly message: Schema.String;
2399
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2132
2400
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
2133
2401
  readonly _tag: "ResourceNotFoundError";
2134
2402
  readonly resource: string;
@@ -2187,11 +2455,12 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2187
2455
  readonly categories: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.String]>, readonly [Schema.String]>;
2188
2456
  }>>, never, Schema.toCodecJson<Schema.Struct<{
2189
2457
  readonly id: Schema.brand<Schema.String, "ConversationId">;
2458
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
2190
2459
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
2191
2460
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2192
2461
  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">>;
2462
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2463
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
2195
2464
  readonly priority: Schema.Finite;
2196
2465
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
2197
2466
  readonly tags: Schema.$Array<Schema.String>;
@@ -2263,6 +2532,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2263
2532
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
2264
2533
  readonly message: Schema.String;
2265
2534
  readonly retryAfterSeconds: Schema.Finite;
2535
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2536
+ readonly _tag: "MalformedRequestError";
2537
+ readonly message: string;
2538
+ readonly fields: {
2539
+ readonly [x: string]: readonly string[];
2540
+ };
2541
+ }, readonly [Schema.Struct<{
2542
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2543
+ readonly message: Schema.String;
2544
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2545
+ }>], {
2546
+ readonly _tag: "MalformedRequestError";
2547
+ readonly message: string;
2548
+ readonly fields: {
2549
+ readonly [x: string]: readonly string[];
2550
+ };
2551
+ }>, Schema.Struct<{
2552
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2553
+ readonly message: Schema.String;
2554
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2266
2555
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
2267
2556
  readonly _tag: "ResourceNotFoundError";
2268
2557
  readonly resource: string;
@@ -2318,14 +2607,15 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2318
2607
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"conversationsRemoveChannels", "DELETE", "/v1/conversations/:id/channels", Schema.toCodecStringTree<Schema.Struct<{
2319
2608
  readonly id: Schema.brand<Schema.String, "ConversationId">;
2320
2609
  }>>, never, Schema.toCodecJson<Schema.Struct<{
2321
- readonly channels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Literal<"email">]>, readonly [Schema.Literal<"email">]>;
2610
+ 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
2611
  }>>, never, Schema.toCodecJson<Schema.Struct<{
2323
2612
  readonly id: Schema.brand<Schema.String, "ConversationId">;
2613
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
2324
2614
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
2325
2615
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2326
2616
  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">>;
2617
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2618
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
2329
2619
  readonly priority: Schema.Finite;
2330
2620
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
2331
2621
  readonly tags: Schema.$Array<Schema.String>;
@@ -2397,6 +2687,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2397
2687
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
2398
2688
  readonly message: Schema.String;
2399
2689
  readonly retryAfterSeconds: Schema.Finite;
2690
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2691
+ readonly _tag: "MalformedRequestError";
2692
+ readonly message: string;
2693
+ readonly fields: {
2694
+ readonly [x: string]: readonly string[];
2695
+ };
2696
+ }, readonly [Schema.Struct<{
2697
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2698
+ readonly message: Schema.String;
2699
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2700
+ }>], {
2701
+ readonly _tag: "MalformedRequestError";
2702
+ readonly message: string;
2703
+ readonly fields: {
2704
+ readonly [x: string]: readonly string[];
2705
+ };
2706
+ }>, Schema.Struct<{
2707
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2708
+ readonly message: Schema.String;
2709
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2400
2710
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
2401
2711
  readonly _tag: "ResourceNotFoundError";
2402
2712
  readonly resource: string;
@@ -2455,11 +2765,12 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2455
2765
  readonly contactIds: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "ContactId">]>, readonly [Schema.brand<Schema.String, "ContactId">]>;
2456
2766
  }>>, never, Schema.toCodecJson<Schema.Struct<{
2457
2767
  readonly id: Schema.brand<Schema.String, "ConversationId">;
2768
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
2458
2769
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
2459
2770
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2460
2771
  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">>;
2772
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2773
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
2463
2774
  readonly priority: Schema.Finite;
2464
2775
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
2465
2776
  readonly tags: Schema.$Array<Schema.String>;
@@ -2531,6 +2842,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2531
2842
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
2532
2843
  readonly message: Schema.String;
2533
2844
  readonly retryAfterSeconds: Schema.Finite;
2845
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2846
+ readonly _tag: "MalformedRequestError";
2847
+ readonly message: string;
2848
+ readonly fields: {
2849
+ readonly [x: string]: readonly string[];
2850
+ };
2851
+ }, readonly [Schema.Struct<{
2852
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2853
+ readonly message: Schema.String;
2854
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2855
+ }>], {
2856
+ readonly _tag: "MalformedRequestError";
2857
+ readonly message: string;
2858
+ readonly fields: {
2859
+ readonly [x: string]: readonly string[];
2860
+ };
2861
+ }>, Schema.Struct<{
2862
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2863
+ readonly message: Schema.String;
2864
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2534
2865
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
2535
2866
  readonly _tag: "ResourceNotFoundError";
2536
2867
  readonly resource: string;
@@ -2589,11 +2920,12 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2589
2920
  readonly tags: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.String]>, readonly [Schema.String]>;
2590
2921
  }>>, never, Schema.toCodecJson<Schema.Struct<{
2591
2922
  readonly id: Schema.brand<Schema.String, "ConversationId">;
2923
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
2592
2924
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
2593
2925
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2594
2926
  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">>;
2927
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
2928
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
2597
2929
  readonly priority: Schema.Finite;
2598
2930
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
2599
2931
  readonly tags: Schema.$Array<Schema.String>;
@@ -2665,6 +2997,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2665
2997
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
2666
2998
  readonly message: Schema.String;
2667
2999
  readonly retryAfterSeconds: Schema.Finite;
3000
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
3001
+ readonly _tag: "MalformedRequestError";
3002
+ readonly message: string;
3003
+ readonly fields: {
3004
+ readonly [x: string]: readonly string[];
3005
+ };
3006
+ }, readonly [Schema.Struct<{
3007
+ readonly _tag: Schema.tag<"MalformedRequestError">;
3008
+ readonly message: Schema.String;
3009
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
3010
+ }>], {
3011
+ readonly _tag: "MalformedRequestError";
3012
+ readonly message: string;
3013
+ readonly fields: {
3014
+ readonly [x: string]: readonly string[];
3015
+ };
3016
+ }>, Schema.Struct<{
3017
+ readonly _tag: Schema.tag<"MalformedRequestError">;
3018
+ readonly message: Schema.String;
3019
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2668
3020
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
2669
3021
  readonly _tag: "ResourceNotFoundError";
2670
3022
  readonly resource: string;
@@ -2724,7 +3076,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2724
3076
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2725
3077
  readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2726
3078
  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]>>;
3079
+ readonly primaryChannel: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>, Schema.Null]>>;
2728
3080
  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
3081
  readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2730
3082
  readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
@@ -2747,11 +3099,12 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2747
3099
  readonly isPrivate: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
2748
3100
  }>>, never, Schema.toCodecJson<Schema.Struct<{
2749
3101
  readonly id: Schema.brand<Schema.String, "ConversationId">;
3102
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
2750
3103
  readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
2751
3104
  readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2752
3105
  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">>;
3106
+ readonly primaryChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3107
+ readonly channels: Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
2755
3108
  readonly priority: Schema.Finite;
2756
3109
  readonly urgency: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>;
2757
3110
  readonly tags: Schema.$Array<Schema.String>;
@@ -2795,7 +3148,27 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2795
3148
  readonly resolutionType: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"automated">, Schema.Literal<"human_assisted">, Schema.Literal<"escalated">, Schema.Literal<"abandoned">, Schema.Literal<"timeout">]>, Schema.Null]>;
2796
3149
  readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
2797
3150
  readonly updatedAt: Schema.String;
2798
- }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
3151
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
3152
+ readonly _tag: "ConflictError";
3153
+ readonly message: string;
3154
+ readonly resource: string;
3155
+ readonly id?: string | null;
3156
+ }, readonly [Schema.Struct<{
3157
+ readonly _tag: Schema.tag<"ConflictError">;
3158
+ readonly message: Schema.String;
3159
+ readonly resource: Schema.String;
3160
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3161
+ }>], {
3162
+ readonly _tag: "ConflictError";
3163
+ readonly message: string;
3164
+ readonly resource: string;
3165
+ readonly id?: string | null;
3166
+ }>, Schema.Struct<{
3167
+ readonly _tag: Schema.tag<"ConflictError">;
3168
+ readonly message: Schema.String;
3169
+ readonly resource: Schema.String;
3170
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3171
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
2799
3172
  readonly _tag: "ForbiddenError";
2800
3173
  readonly message: string;
2801
3174
  }, readonly [Schema.Struct<{
@@ -2823,6 +3196,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
2823
3196
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
2824
3197
  readonly message: Schema.String;
2825
3198
  readonly retryAfterSeconds: Schema.Finite;
3199
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
3200
+ readonly _tag: "MalformedRequestError";
3201
+ readonly message: string;
3202
+ readonly fields: {
3203
+ readonly [x: string]: readonly string[];
3204
+ };
3205
+ }, readonly [Schema.Struct<{
3206
+ readonly _tag: Schema.tag<"MalformedRequestError">;
3207
+ readonly message: Schema.String;
3208
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
3209
+ }>], {
3210
+ readonly _tag: "MalformedRequestError";
3211
+ readonly message: string;
3212
+ readonly fields: {
3213
+ readonly [x: string]: readonly string[];
3214
+ };
3215
+ }>, Schema.Struct<{
3216
+ readonly _tag: Schema.tag<"MalformedRequestError">;
3217
+ readonly message: Schema.String;
3218
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2826
3219
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
2827
3220
  readonly _tag: "ResourceNotFoundError";
2828
3221
  readonly resource: string;