samva 0.18.0 → 0.20.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 (70) hide show
  1. package/README.md +2 -0
  2. package/dist/client/sdk.gen.d.ts +94 -36
  3. package/dist/client/sdk.gen.js +269 -55
  4. package/dist/client/types.gen.d.ts +497 -106
  5. package/dist/effect/campaigns.d.ts +35 -3
  6. package/dist/effect/contact-groups.d.ts +39 -3
  7. package/dist/effect/contacts.d.ts +240 -17
  8. package/dist/effect/contacts.js +3 -1
  9. package/dist/effect/conversations.d.ts +11 -11
  10. package/dist/effect/email.d.ts +22 -6
  11. package/dist/effect/errors.d.ts +1 -1
  12. package/dist/effect/errors.js +2 -2
  13. package/dist/effect/extension-installations.d.ts +12 -12
  14. package/dist/effect/extensions.d.ts +3 -3
  15. package/dist/effect/generated/campaigns.d.ts +73 -4
  16. package/dist/effect/generated/campaigns.js +18 -1
  17. package/dist/effect/generated/contact-groups.d.ts +33 -3
  18. package/dist/effect/generated/contacts.d.ts +608 -55
  19. package/dist/effect/generated/contacts.js +55 -10
  20. package/dist/effect/generated/conversations.d.ts +25 -25
  21. package/dist/effect/generated/conversations.js +1 -1
  22. package/dist/effect/generated/email.d.ts +162 -1
  23. package/dist/effect/generated/email.js +31 -11
  24. package/dist/effect/generated/extension-installations.d.ts +44 -44
  25. package/dist/effect/generated/extension-installations.js +6 -0
  26. package/dist/effect/generated/extensions.d.ts +10 -10
  27. package/dist/effect/generated/extensions.js +2 -0
  28. package/dist/effect/generated/journeys.d.ts +13 -61
  29. package/dist/effect/generated/journeys.js +5 -5
  30. package/dist/effect/generated/mailboxes.d.ts +584 -78
  31. package/dist/effect/generated/mailboxes.js +65 -24
  32. package/dist/effect/generated/messages.d.ts +35 -1
  33. package/dist/effect/generated/messages.js +9 -2
  34. package/dist/effect/generated/namespaces.d.ts +432 -2
  35. package/dist/effect/generated/namespaces.js +91 -4
  36. package/dist/effect/generated/organizations.d.ts +13 -11
  37. package/dist/effect/generated/organizations.js +7 -3
  38. package/dist/effect/generated/shared.d.ts +104 -49
  39. package/dist/effect/generated/shared.js +51 -28
  40. package/dist/effect/generated/templates.d.ts +44 -1
  41. package/dist/effect/generated/templates.js +9 -3
  42. package/dist/effect/generated/unsubscribe-groups.d.ts +173 -78
  43. package/dist/effect/generated/unsubscribe-groups.js +75 -58
  44. package/dist/effect/generated/webhooks.d.ts +19 -19
  45. package/dist/effect/generated/webhooks.js +8 -0
  46. package/dist/effect/generated-metadata.d.ts +22 -6
  47. package/dist/effect/generated-metadata.js +334 -329
  48. package/dist/effect/index.js +2 -2
  49. package/dist/effect/journeys.d.ts +4 -4
  50. package/dist/effect/mailboxes.d.ts +144 -12
  51. package/dist/effect/messages.d.ts +8 -0
  52. package/dist/effect/namespaces.d.ts +29 -0
  53. package/dist/effect/namespaces.js +7 -1
  54. package/dist/effect/organizations.d.ts +4 -4
  55. package/dist/effect/templates.d.ts +12 -1
  56. package/dist/effect/unsubscribe-groups.d.ts +29 -18
  57. package/dist/effect/unsubscribe-groups.js +5 -5
  58. package/dist/effect/webhooks.d.ts +8 -8
  59. package/dist/index.js +2 -2
  60. package/dist/mailbox-events.d.ts +31 -4
  61. package/dist/mailbox-events.js +39 -11
  62. package/dist/package.js +1 -1
  63. package/dist/promises/errors.gen.d.ts +2 -12
  64. package/dist/promises/errors.gen.js +1 -26
  65. package/dist/promises/index.d.ts +1 -1
  66. package/dist/promises/index.js +2 -2
  67. package/dist/promises/types.gen.d.ts +1 -1
  68. package/dist/service-map.d.ts +24 -4
  69. package/dist/service-map.js +26 -2
  70. package/package.json +2 -2
@@ -34,7 +34,7 @@ export type ResourceNotFoundError = {
34
34
  export type ExtensionRun = {
35
35
  id: string;
36
36
  eventId: string;
37
- eventType: "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded";
37
+ eventType: "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded";
38
38
  attempt: number;
39
39
  startedAt: string;
40
40
  durationMs: number;
@@ -49,7 +49,7 @@ export type ExtensionRunList = {
49
49
  export type ExtensionRunSummary = {
50
50
  id: string;
51
51
  eventId: string;
52
- eventType: "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded";
52
+ eventType: "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded";
53
53
  attempt: number;
54
54
  startedAt: string;
55
55
  durationMs: number;
@@ -71,7 +71,7 @@ export type ExtensionInstallation = {
71
71
  runtime: "hosted" | "webhook";
72
72
  status: "active" | "disabled";
73
73
  createdAt: string;
74
- events: Array<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
74
+ events: Array<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
75
75
  permissions: Array<"read" | "update" | "send" | "quarantine.read">;
76
76
  sendMode: "send" | "approval";
77
77
  scope: {
@@ -115,13 +115,13 @@ export type ExtensionVersionChange = {
115
115
  };
116
116
  export type UserId = string;
117
117
  export type ExtensionPermissionDiff = {
118
- added: Array<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded">;
119
- removed: Array<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded">;
118
+ added: Array<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded">;
119
+ removed: Array<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded">;
120
120
  };
121
121
  export type OrganizationId = string;
122
122
  export type UpgradeExtensionPayload = {
123
123
  version?: string | ExtensionVersionId | null | undefined;
124
- acceptPermissions?: Array<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded"> | null | undefined;
124
+ acceptPermissions?: Array<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded"> | null | undefined;
125
125
  dryRun?: boolean | null | undefined;
126
126
  };
127
127
  export type SuccessResponse = {
@@ -170,7 +170,7 @@ export type ExtensionVersion = {
170
170
  description?: string | null | undefined;
171
171
  version: string;
172
172
  runtime: "hosted" | "webhook";
173
- events: Array<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
173
+ events: Array<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
174
174
  permissions: Array<"read" | "update" | "send" | "quarantine.read">;
175
175
  };
176
176
  };
@@ -210,7 +210,7 @@ export type PublishExtensionVersionPayload = {
210
210
  description?: string | null | undefined;
211
211
  version: string;
212
212
  runtime: "hosted" | "webhook";
213
- events: Array<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
213
+ events: Array<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
214
214
  permissions: Array<"read" | "update" | "send" | "quarantine.read">;
215
215
  };
216
216
  bundle?: string | null | undefined;
@@ -219,6 +219,26 @@ export type ExtensionPage = {
219
219
  items: Array<Extension>;
220
220
  nextCursor: string | null;
221
221
  };
222
+ export type NamespaceUsage = {
223
+ namespaceId: NamespaceId;
224
+ periodStart: string;
225
+ periodEnd: string;
226
+ emailCount: number;
227
+ totalMessages: number;
228
+ };
229
+ export type NamespaceResource = {
230
+ type: NamespaceResourceType;
231
+ id: string;
232
+ namespaceId: NamespaceId | null;
233
+ };
234
+ export type NamespaceResourceType = "domain" | "sender" | "contact" | "template";
235
+ export type AssignNamespaceResourcePayload = {
236
+ type: NamespaceResourceType;
237
+ /**
238
+ * The resource's id, such as `dom_...` for a domain.
239
+ */
240
+ resourceId: string;
241
+ };
222
242
  export type Namespace = {
223
243
  id: NamespaceId;
224
244
  name: string;
@@ -369,11 +389,35 @@ export type MailboxNonSendAction = {
369
389
  threadId: MailboxThreadId | null;
370
390
  draftId: MailboxDraftId | null;
371
391
  decision: MailboxActionDecision | null;
392
+ /**
393
+ * How a held action's approval ended: who approved, denied, or cancelled it, when, and the denial reason. Null while it waits for approval and for an action that never needed one.
394
+ */
395
+ resolution: MailboxActionResolution | null;
372
396
  createdAt: string;
373
397
  updatedAt: string;
374
398
  type: "updateDraft" | "createNote" | "assignThread" | "changeThreadState" | "call" | "extensionRequest";
375
399
  state: "proposed" | "allowed" | "approvalRequired" | "policyDenied" | "approved" | "approvalDenied" | "executing" | "executed" | "failed";
376
400
  };
401
+ /**
402
+ * How the action's approval ended.
403
+ */
404
+ export type MailboxActionResolution = {
405
+ outcome: "approved" | "denied" | "cancelled";
406
+ /**
407
+ * Who resolved the approval.
408
+ */
409
+ actor: {
410
+ kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
411
+ id: string;
412
+ displayName?: string | null | undefined;
413
+ source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "system";
414
+ };
415
+ resolvedAt: string;
416
+ /**
417
+ * The denial reason; null for an approval or a cancellation.
418
+ */
419
+ reason: string | null;
420
+ };
377
421
  export type MailboxSendAction = {
378
422
  id: MailboxActionId;
379
423
  source: "humanUi" | "externalApi" | "aiSdkTool" | "extension" | "externalAgent" | "samvaManagedAgent" | "system";
@@ -385,6 +429,10 @@ export type MailboxSendAction = {
385
429
  threadId: MailboxThreadId | null;
386
430
  draftId: MailboxDraftId | null;
387
431
  decision: MailboxActionDecision | null;
432
+ /**
433
+ * How a held action's approval ended: who approved, denied, or cancelled it, when, and the denial reason. Null while it waits for approval and for an action that never needed one.
434
+ */
435
+ resolution: MailboxActionResolution | null;
388
436
  createdAt: string;
389
437
  updatedAt: string;
390
438
  type: "sendMessage" | "reply";
@@ -410,6 +458,11 @@ export type MailboxSendSnapshot = {
410
458
  inReplyToMessageId: MessageId | null;
411
459
  };
412
460
  export type ConversationId = string;
461
+ export type JsonObject = {
462
+ [key: string]: JsonValue;
463
+ };
464
+ export type TemplateId = string;
465
+ export type MailboxEndpointId = string;
413
466
  export type EmailAttachment = {
414
467
  filename: string;
415
468
  content?: string | null | undefined;
@@ -457,10 +510,10 @@ export type MailboxSendRefusedError = {
457
510
  message: string;
458
511
  receipt: MailboxSendReceipt;
459
512
  };
460
- export type MailboxChannelUnsupportedError = {
461
- _tag: "MailboxChannelUnsupportedError";
513
+ export type FlagDisabledError = {
514
+ _tag: "FlagDisabledError";
515
+ flag: string;
462
516
  message: string;
463
- channel: string;
464
517
  };
465
518
  export type MailboxPendingAction = MailboxSendAction | MailboxNonSendAction;
466
519
  export type MailboxPendingSendReceipt = {
@@ -505,7 +558,6 @@ export type MailboxDraft = {
505
558
  attachments: Array<EmailAttachment>;
506
559
  };
507
560
  export type MailboxDraftState = "saved" | "locked" | "sent";
508
- export type MailboxEndpointId = string;
509
561
  export type UpdateMailboxDraftPayload = {
510
562
  to?: Array<string> | null | undefined;
511
563
  cc?: Array<string> | null | null | undefined;
@@ -982,7 +1034,7 @@ export type ApiKeyAccess = {
982
1034
  resources: ApiKeyResourceAccess;
983
1035
  mailboxes?: ApiKeyMailboxAccess | null | undefined;
984
1036
  /**
985
- * Confines the key to one namespace: it reaches only that namespace's mailboxes. A key scoped to a namespace or to listed mailboxes holds mailbox access only.
1037
+ * Confines the key to one namespace: it reaches only that namespace's domains, senders, numbers, mailboxes, contacts, templates, and messages, never organization-level ones, and only endpoints that confine to a namespace (others answer 403). It holds grants only on `mailboxes`, `messages`, `email`, `domains`, `contacts`, and `templates`. A key scoped to listed mailboxes holds mailbox access only.
986
1038
  */
987
1039
  namespaceId?: NamespaceId | null | undefined;
988
1040
  };
@@ -1130,7 +1182,7 @@ export type Organization = {
1130
1182
  billingAccountId: string;
1131
1183
  name: string;
1132
1184
  slug: string;
1133
- countryCode: string;
1185
+ defaultRegion: PhoneRegion | null;
1134
1186
  timezone: string;
1135
1187
  plan: string;
1136
1188
  isActive: boolean;
@@ -1150,6 +1202,10 @@ export type Organization = {
1150
1202
  teamMembersUsed: number;
1151
1203
  messagesResetAt: string | null;
1152
1204
  };
1205
+ /**
1206
+ * An ISO 3166-1 alpha-2 region code, such as US or IN.
1207
+ */
1208
+ export type PhoneRegion = string;
1153
1209
  export type IanaTimezone = string;
1154
1210
  export type WebhookAttemptId = string;
1155
1211
  export type WebhookDeliveryId = string;
@@ -1210,7 +1266,7 @@ export type WebhookEndpoint = {
1210
1266
  id: WebhookEndpointId;
1211
1267
  name: string;
1212
1268
  url: string;
1213
- eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
1269
+ eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
1214
1270
  channels: Array<"email"> | null;
1215
1271
  mailboxIds: Array<MailboxId> | null;
1216
1272
  namespaceId: NamespaceId | null;
@@ -1224,7 +1280,7 @@ export type WebhookEndpoint = {
1224
1280
  export type UpdateWebhookPayload = {
1225
1281
  name?: string | null | undefined;
1226
1282
  url?: string | null | undefined;
1227
- eventTypes?: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook"> | null | undefined;
1283
+ eventTypes?: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook"> | null | undefined;
1228
1284
  channels?: Array<"email"> | null | null | undefined;
1229
1285
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | null | undefined;
1230
1286
  namespaceId?: NamespaceId | null | null | undefined;
@@ -1241,7 +1297,7 @@ export type WebhookEndpointListItem = {
1241
1297
  id: WebhookEndpointId;
1242
1298
  name: string;
1243
1299
  url: string;
1244
- eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
1300
+ eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
1245
1301
  channels: Array<"email"> | null;
1246
1302
  mailboxIds: Array<MailboxId> | null;
1247
1303
  namespaceId: NamespaceId | null;
@@ -1263,7 +1319,7 @@ export type WebhookDeliveryCounts = {
1263
1319
  export type CreateWebhookPayload = {
1264
1320
  name: string;
1265
1321
  url: string;
1266
- eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
1322
+ eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
1267
1323
  channels?: Array<"email"> | null | undefined;
1268
1324
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | undefined;
1269
1325
  namespaceId?: NamespaceId | null | undefined;
@@ -1338,7 +1394,6 @@ export type BrandList = {
1338
1394
  items: Array<Brand>;
1339
1395
  };
1340
1396
  export type TemplateProjectId = string;
1341
- export type TemplateId = string;
1342
1397
  export type TemplateInputContractId = string;
1343
1398
  export type TemplateInputContractPage = {
1344
1399
  items: Array<{
@@ -1388,6 +1443,10 @@ export type Template = {
1388
1443
  name: string;
1389
1444
  channel: "email";
1390
1445
  projectId: TemplateProjectId;
1446
+ /**
1447
+ * The namespace the template's project belongs to; every entry in a project shares it. Null at organization level. A namespace-scoped key reaches only its own namespace's templates.
1448
+ */
1449
+ namespaceId: NamespaceId | null;
1391
1450
  entryPath: string;
1392
1451
  status: "draft" | "pending" | "approved" | "published" | "rejected" | "archived";
1393
1452
  isActive: boolean;
@@ -1466,6 +1525,10 @@ export type CreateTemplatePayload = {
1466
1525
  description?: string | null | null | undefined;
1467
1526
  category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null | undefined;
1468
1527
  isActive?: boolean | null | undefined;
1528
+ /**
1529
+ * The namespace the new template project belongs to; the project and every entry added to it share it. Omit for organization level. A namespace-scoped key always creates in its own namespace.
1530
+ */
1531
+ namespaceId?: NamespaceId | null | undefined;
1469
1532
  idempotencyKey: string;
1470
1533
  };
1471
1534
  export type TemplateFamily = {
@@ -1502,6 +1565,10 @@ export type TemplateSummary = {
1502
1565
  name: string;
1503
1566
  channel: "email";
1504
1567
  projectId: TemplateProjectId;
1568
+ /**
1569
+ * The namespace the template's project belongs to; every entry in a project shares it. Null at organization level. A namespace-scoped key reaches only its own namespace's templates.
1570
+ */
1571
+ namespaceId: NamespaceId | null;
1505
1572
  entryPath: string;
1506
1573
  status: "draft" | "pending" | "approved" | "published" | "rejected" | "archived";
1507
1574
  isActive: boolean;
@@ -1517,17 +1584,28 @@ export type AnalyticsQueryError = {
1517
1584
  _tag: "AnalyticsQueryError";
1518
1585
  message: string;
1519
1586
  };
1587
+ export type ContactId = string;
1520
1588
  export type UnsubscribeGroupMemberPage = {
1521
1589
  items: Array<{
1522
- id: string;
1523
- email: string;
1524
- contactId: string | null;
1590
+ id: UnsubscribeGroupMemberId;
1591
+ contactId: ContactId;
1525
1592
  source: "link" | "api" | "manual" | "complaint";
1526
1593
  unsubscribedAt: string;
1527
1594
  createdAt: string;
1528
1595
  }>;
1529
1596
  nextCursor: string | null;
1530
1597
  };
1598
+ export type UnsubscribeGroupMemberId = string;
1599
+ export type UnsubscribeGroupMemberRef = UnsubscribeGroupMemberByContact | UnsubscribeGroupMemberByEmail | UnsubscribeGroupMemberByPhone;
1600
+ export type UnsubscribeGroupMemberByPhone = {
1601
+ phone: string;
1602
+ };
1603
+ export type UnsubscribeGroupMemberByEmail = {
1604
+ email: string;
1605
+ };
1606
+ export type UnsubscribeGroupMemberByContact = {
1607
+ contactId: ContactId;
1608
+ };
1531
1609
  export type UnsubscribeGroupList = {
1532
1610
  items: Array<{
1533
1611
  id: UnsubscribeId;
@@ -1556,7 +1634,6 @@ export type CustomFieldList = {
1556
1634
  updatedAt: string;
1557
1635
  }>;
1558
1636
  };
1559
- export type ContactId = string;
1560
1637
  export type ContactGroupId = string;
1561
1638
  export type ContactGroupMemberPage = {
1562
1639
  items: Array<{
@@ -1580,9 +1657,21 @@ export type ContactGroupMemberPage = {
1580
1657
  };
1581
1658
  export type ContactIdentity = {
1582
1659
  id: ContactIdentityId;
1583
- channel: "email";
1660
+ type: "email" | "phone";
1584
1661
  identifier: string;
1585
1662
  verified: boolean;
1663
+ channels: Array<ContactIdentityChannel>;
1664
+ };
1665
+ export type ContactIdentityChannel = {
1666
+ channel: "email";
1667
+ reachability: "unknown" | "reachable" | "unreachable";
1668
+ consent: ContactConsent | null;
1669
+ };
1670
+ export type ContactConsent = {
1671
+ status: "opted_in" | "opted_out";
1672
+ source: string;
1673
+ capturedAt: string;
1674
+ proof: JsonObject | null;
1586
1675
  };
1587
1676
  export type ContactIdentityId = string;
1588
1677
  export type ContactGroupPage = {
@@ -1614,11 +1703,6 @@ export type DeliveryUnavailableError = {
1614
1703
  message: string;
1615
1704
  retryAfterSeconds: number;
1616
1705
  };
1617
- export type FlagDisabledError = {
1618
- _tag: "FlagDisabledError";
1619
- flag: string;
1620
- message: string;
1621
- };
1622
1706
  export type CampaignFooterRequiredError = {
1623
1707
  _tag: "CampaignFooterRequiredError";
1624
1708
  message: string;
@@ -1688,9 +1772,6 @@ export type JourneyRunTrigger = {
1688
1772
  eventName: string;
1689
1773
  properties: JsonObject;
1690
1774
  };
1691
- export type JsonObject = {
1692
- [key: string]: JsonValue;
1693
- };
1694
1775
  export type JourneyRunExitReason = "completed" | "goal" | "archived";
1695
1776
  export type JourneyRunStatus = "active" | "paused" | "exited" | "failed";
1696
1777
  export type JourneyId = string;
@@ -2027,12 +2108,13 @@ export type ContactLocation = {
2027
2108
  timezone: string;
2028
2109
  };
2029
2110
  export type ContactIdentityInput = {
2030
- channel: "email";
2111
+ type: "email" | "phone";
2031
2112
  identifier: string;
2032
2113
  verified?: boolean | null | undefined;
2033
2114
  };
2034
2115
  export type Contact = {
2035
2116
  id: ContactId;
2117
+ namespaceId: NamespaceId | null;
2036
2118
  name: string;
2037
2119
  displayName: string | null;
2038
2120
  avatar: string | null;
@@ -2050,6 +2132,15 @@ export type Contact = {
2050
2132
  export type ContactTags = {
2051
2133
  tags: [string, ...Array<string>];
2052
2134
  };
2135
+ export type SetContactConsent = {
2136
+ status: "opted_in" | "opted_out";
2137
+ /**
2138
+ * Where the consent was captured, such as a form URL or a checkout step.
2139
+ */
2140
+ source: string;
2141
+ capturedAt: string;
2142
+ proof?: JsonObject | null | undefined;
2143
+ };
2053
2144
  export type ContactProfileUpdate = {
2054
2145
  firstName?: string | null | null | undefined;
2055
2146
  lastName?: string | null | null | undefined;
@@ -2074,6 +2165,7 @@ export type ContactPage = {
2074
2165
  };
2075
2166
  export type ContactSummary = {
2076
2167
  id: ContactId;
2168
+ namespaceId: NamespaceId | null;
2077
2169
  name: string;
2078
2170
  displayName: string | null;
2079
2171
  status: "active" | "paused" | "blocked" | "archived";
@@ -2127,7 +2219,7 @@ export type ConversationContact = {
2127
2219
  name: string;
2128
2220
  displayName: string | null;
2129
2221
  identities: Array<{
2130
- channel: "email";
2222
+ type: "email" | "phone";
2131
2223
  identifier: string;
2132
2224
  verified: boolean;
2133
2225
  }>;
@@ -2462,6 +2554,10 @@ export type EmailSenderPage = {
2462
2554
  email: string;
2463
2555
  name: string | null;
2464
2556
  domainId: EmailDomainId | null;
2557
+ /**
2558
+ * The namespace the sender belongs to, or null at organization level. A sender on a domain takes the domain's namespace.
2559
+ */
2560
+ namespaceId: NamespaceId | null;
2465
2561
  verificationStatus: "pending" | "verified" | "failed";
2466
2562
  verifiedAt: string | null;
2467
2563
  verificationToken: string | null;
@@ -2583,6 +2679,10 @@ export type EmailDomainDetailed = {
2583
2679
  priority?: number | null | undefined;
2584
2680
  }>;
2585
2681
  verifiedAt: string | null;
2682
+ /**
2683
+ * The namespace the domain belongs to, or null at organization level. Only that namespace's keys and organization-wide callers reach it.
2684
+ */
2685
+ namespaceId: NamespaceId | null;
2586
2686
  isDefault: boolean;
2587
2687
  deliverability: DeliverabilityFacts;
2588
2688
  createdAt: string;
@@ -2716,6 +2816,10 @@ export type EmailDomainPage = {
2716
2816
  phase: "dns-setup" | "provisioning" | "verifying" | "ready" | "degraded" | "failed";
2717
2817
  dkimSelector?: string | null | undefined;
2718
2818
  dkimPublicKey?: string | null | undefined;
2819
+ /**
2820
+ * The namespace the domain belongs to, or null at organization level. Only that namespace's keys and organization-wide callers reach it.
2821
+ */
2822
+ namespaceId: NamespaceId | null;
2719
2823
  isDefault: boolean;
2720
2824
  deliverability: DeliverabilityFacts;
2721
2825
  series: SendsSeries;
@@ -2779,7 +2883,7 @@ export type CampaignRecipientPage = {
2779
2883
  status: "pending" | "dispatching" | "dispatched" | "failed" | "skipped";
2780
2884
  messageId: string | null;
2781
2885
  failureReason: string | null;
2782
- skippedReason: "unsubscribed" | "blocked" | "suppressed" | "no_identity" | "inactive" | "run_cancelled" | "run_failed" | null;
2886
+ skippedReason: "unsubscribed" | "blocked" | "suppressed" | "opted_out" | "unreachable" | "no_identity" | "inactive" | "run_cancelled" | "run_failed" | null;
2783
2887
  createdAt: string;
2784
2888
  updatedAt: string;
2785
2889
  }>;
@@ -2807,6 +2911,7 @@ export type CampaignRun = {
2807
2911
  dispatchedCount: number;
2808
2912
  failedCount: number;
2809
2913
  skippedCount: number;
2914
+ skippedReasons: Array<CampaignRunSkippedReason>;
2810
2915
  estimatedCompletionAt: string | null;
2811
2916
  failureReason: string | null;
2812
2917
  holdReason: string | null;
@@ -2818,6 +2923,10 @@ export type CampaignRun = {
2818
2923
  createdAt: string;
2819
2924
  updatedAt: string;
2820
2925
  };
2926
+ export type CampaignRunSkippedReason = {
2927
+ reason: "unsubscribed" | "blocked" | "suppressed" | "opted_out" | "unreachable" | "no_identity" | "inactive" | "run_cancelled" | "run_failed";
2928
+ count: number;
2929
+ };
2821
2930
  export type CampaignPolicy = {
2822
2931
  unsubscribeGroupId?: UnsubscribeId | null | undefined;
2823
2932
  pageSize?: number | null | undefined;
@@ -3122,9 +3231,15 @@ export type MessageDelivery = {
3122
3231
  readAt: string | null;
3123
3232
  failedAt: string | null;
3124
3233
  error: MessageDeliveryError | null;
3234
+ estimatedProviderCost: EstimatedProviderCost | null;
3125
3235
  createdAt: string;
3126
3236
  updatedAt: string;
3127
3237
  };
3238
+ export type EstimatedProviderCost = {
3239
+ amount: string;
3240
+ currency: string;
3241
+ billingMode: "pass_through";
3242
+ };
3128
3243
  export type MessageDeliveryError = {
3129
3244
  code: string | null;
3130
3245
  message: string | null;
@@ -3200,6 +3315,10 @@ export type MessagesListData = {
3200
3315
  conversationId?: ConversationId | null | undefined;
3201
3316
  contactId?: ContactId | null | undefined;
3202
3317
  from?: string | null | undefined;
3318
+ /**
3319
+ * Only this namespace's messages. A key scoped to a namespace always lists its own.
3320
+ */
3321
+ namespaceId?: NamespaceId | null | undefined;
3203
3322
  after?: string | null | undefined;
3204
3323
  before?: string | null | undefined;
3205
3324
  };
@@ -4981,6 +5100,7 @@ export type EmailListDomainsData = {
4981
5100
  limit?: string | null | undefined;
4982
5101
  cursor?: Cursor | null | undefined;
4983
5102
  sendable?: "true" | null | undefined;
5103
+ namespaceId?: NamespaceId | null | undefined;
4984
5104
  };
4985
5105
  url: "/v1/email/domains";
4986
5106
  };
@@ -5021,6 +5141,7 @@ export type EmailAddDomainData = {
5021
5141
  connectionId: string;
5022
5142
  zone: string;
5023
5143
  } | null | undefined;
5144
+ namespaceId?: NamespaceId | null | undefined;
5024
5145
  };
5025
5146
  path?: never;
5026
5147
  query?: never;
@@ -5039,6 +5160,10 @@ export type EmailAddDomainErrors = {
5039
5160
  * ForbiddenError
5040
5161
  */
5041
5162
  403: ForbiddenError;
5163
+ /**
5164
+ * ResourceNotFoundError
5165
+ */
5166
+ 404: ResourceNotFoundError;
5042
5167
  /**
5043
5168
  * ConflictError
5044
5169
  */
@@ -5328,6 +5453,10 @@ export type EmailDetectRegistrarErrors = {
5328
5453
  * ForbiddenError
5329
5454
  */
5330
5455
  403: ForbiddenError;
5456
+ /**
5457
+ * ResourceNotFoundError
5458
+ */
5459
+ 404: ResourceNotFoundError;
5331
5460
  /**
5332
5461
  * ValidationError
5333
5462
  */
@@ -5708,6 +5837,10 @@ export type EmailDisableCustomTrackingErrors = {
5708
5837
  * ForbiddenError
5709
5838
  */
5710
5839
  403: ForbiddenError;
5840
+ /**
5841
+ * ResourceNotFoundError
5842
+ */
5843
+ 404: ResourceNotFoundError;
5711
5844
  /**
5712
5845
  * ConflictError
5713
5846
  */
@@ -5754,6 +5887,10 @@ export type EmailGetCustomTrackingErrors = {
5754
5887
  * ForbiddenError
5755
5888
  */
5756
5889
  403: ForbiddenError;
5890
+ /**
5891
+ * ResourceNotFoundError
5892
+ */
5893
+ 404: ResourceNotFoundError;
5757
5894
  /**
5758
5895
  * ValidationError
5759
5896
  */
@@ -5794,6 +5931,10 @@ export type EmailEnableCustomTrackingErrors = {
5794
5931
  * ForbiddenError
5795
5932
  */
5796
5933
  403: ForbiddenError;
5934
+ /**
5935
+ * ResourceNotFoundError
5936
+ */
5937
+ 404: ResourceNotFoundError;
5797
5938
  /**
5798
5939
  * ConflictError
5799
5940
  */
@@ -5986,6 +6127,10 @@ export type EmailCompleteCustomTrackingDomainConnectErrors = {
5986
6127
  * ForbiddenError
5987
6128
  */
5988
6129
  403: ForbiddenError;
6130
+ /**
6131
+ * ResourceNotFoundError
6132
+ */
6133
+ 404: ResourceNotFoundError;
5989
6134
  /**
5990
6135
  * ValidationError
5991
6136
  */
@@ -6016,6 +6161,7 @@ export type EmailListSendersData = {
6016
6161
  verificationStatus?: "pending" | "verified" | "failed" | null | undefined;
6017
6162
  isActive?: string | null | undefined;
6018
6163
  isDefault?: string | null | undefined;
6164
+ namespaceId?: NamespaceId | null | undefined;
6019
6165
  };
6020
6166
  url: "/v1/email/senders";
6021
6167
  };
@@ -6055,6 +6201,7 @@ export type EmailAddSenderData = {
6055
6201
  domainId?: EmailDomainId | null | undefined;
6056
6202
  name?: string | null | null | undefined;
6057
6203
  replyToEmails?: Array<string> | null | null | undefined;
6204
+ namespaceId?: NamespaceId | null | undefined;
6058
6205
  };
6059
6206
  headers: {
6060
6207
  "idempotency-key": string;
@@ -6250,6 +6397,10 @@ export type EmailGetSenderResponses = {
6250
6397
  email: string;
6251
6398
  name: string | null;
6252
6399
  domainId: EmailDomainId | null;
6400
+ /**
6401
+ * The namespace the sender belongs to, or null at organization level. A sender on a domain takes the domain's namespace.
6402
+ */
6403
+ namespaceId: NamespaceId | null;
6253
6404
  verificationStatus: "pending" | "verified" | "failed";
6254
6405
  verifiedAt: string | null;
6255
6406
  verificationToken: string | null;
@@ -8605,6 +8756,7 @@ export type ContactsListData = {
8605
8756
  query?: {
8606
8757
  limit?: string | null | undefined;
8607
8758
  cursor?: Cursor | null | undefined;
8759
+ namespaceId?: NamespaceId | null | undefined;
8608
8760
  search?: string | null | undefined;
8609
8761
  status?: "active" | "paused" | "blocked" | "archived" | null | undefined;
8610
8762
  fields?: string | null | undefined;
@@ -8647,6 +8799,7 @@ export type ContactsListResponses = {
8647
8799
  export type ContactsListResponse = ContactsListResponses[keyof ContactsListResponses];
8648
8800
  export type ContactsCreateData = {
8649
8801
  body: {
8802
+ namespaceId?: NamespaceId | null | undefined;
8650
8803
  name: string;
8651
8804
  displayName?: string | null | null | undefined;
8652
8805
  avatar?: string | null | null | undefined;
@@ -8676,6 +8829,10 @@ export type ContactsCreateErrors = {
8676
8829
  * ForbiddenError
8677
8830
  */
8678
8831
  403: ForbiddenError;
8832
+ /**
8833
+ * ResourceNotFoundError
8834
+ */
8835
+ 404: ResourceNotFoundError;
8679
8836
  /**
8680
8837
  * ConflictError
8681
8838
  */
@@ -8707,6 +8864,7 @@ export type ContactsCreateResponses = {
8707
8864
  export type ContactsCreateResponse = ContactsCreateResponses[keyof ContactsCreateResponses];
8708
8865
  export type ContactsFindData = {
8709
8866
  body: {
8867
+ namespaceId?: NamespaceId | null | undefined;
8710
8868
  email?: string | null | undefined;
8711
8869
  phone?: string | null | undefined;
8712
8870
  externalId?: string | null | undefined;
@@ -8724,6 +8882,10 @@ export type ContactsFindErrors = {
8724
8882
  * ForbiddenError
8725
8883
  */
8726
8884
  403: ForbiddenError;
8885
+ /**
8886
+ * ResourceNotFoundError
8887
+ */
8888
+ 404: ResourceNotFoundError;
8727
8889
  /**
8728
8890
  * ConflictError
8729
8891
  */
@@ -8751,6 +8913,7 @@ export type ContactsFindResponses = {
8751
8913
  export type ContactsFindResponse = ContactsFindResponses[keyof ContactsFindResponses];
8752
8914
  export type ContactsFindOrCreateData = {
8753
8915
  body: {
8916
+ namespaceId?: NamespaceId | null | undefined;
8754
8917
  lookup: ContactLookup;
8755
8918
  create?: {
8756
8919
  name?: string | null | undefined;
@@ -8778,6 +8941,10 @@ export type ContactsFindOrCreateErrors = {
8778
8941
  * ForbiddenError
8779
8942
  */
8780
8943
  403: ForbiddenError;
8944
+ /**
8945
+ * ResourceNotFoundError
8946
+ */
8947
+ 404: ResourceNotFoundError;
8781
8948
  /**
8782
8949
  * ConflictError
8783
8950
  */
@@ -8962,7 +9129,7 @@ export type ContactsUpdateResponses = {
8962
9129
  export type ContactsUpdateResponse = ContactsUpdateResponses[keyof ContactsUpdateResponses];
8963
9130
  export type ContactsAddIdentityData = {
8964
9131
  body: {
8965
- channel: "email";
9132
+ type: "email" | "phone";
8966
9133
  identifier: string;
8967
9134
  verified?: boolean | null | undefined;
8968
9135
  };
@@ -9053,6 +9220,58 @@ export type ContactsRemoveIdentityResponses = {
9053
9220
  200: Contact;
9054
9221
  };
9055
9222
  export type ContactsRemoveIdentityResponse = ContactsRemoveIdentityResponses[keyof ContactsRemoveIdentityResponses];
9223
+ export type ContactsSetConsentData = {
9224
+ body: {
9225
+ status: "opted_in" | "opted_out";
9226
+ /**
9227
+ * Where the consent was captured, such as a form URL or a checkout step.
9228
+ */
9229
+ source: string;
9230
+ capturedAt: string;
9231
+ proof?: JsonObject | null | undefined;
9232
+ };
9233
+ path: {
9234
+ id: ContactId;
9235
+ identityId: ContactIdentityId;
9236
+ channel: "email";
9237
+ };
9238
+ query?: never;
9239
+ url: "/v1/contacts/{id}/identities/{identityId}/consent/{channel}";
9240
+ };
9241
+ export type ContactsSetConsentErrors = {
9242
+ /**
9243
+ * UnauthorizedError
9244
+ */
9245
+ 401: UnauthorizedError;
9246
+ /**
9247
+ * ForbiddenError
9248
+ */
9249
+ 403: ForbiddenError;
9250
+ /**
9251
+ * ResourceNotFoundError
9252
+ */
9253
+ 404: ResourceNotFoundError;
9254
+ /**
9255
+ * ValidationError
9256
+ */
9257
+ 422: ValidationError;
9258
+ /**
9259
+ * InternalError
9260
+ */
9261
+ 500: InternalError;
9262
+ /**
9263
+ * GatewayTimeoutError
9264
+ */
9265
+ 504: GatewayTimeoutError;
9266
+ };
9267
+ export type ContactsSetConsentError = ContactsSetConsentErrors[keyof ContactsSetConsentErrors];
9268
+ export type ContactsSetConsentResponses = {
9269
+ /**
9270
+ * Contact
9271
+ */
9272
+ 200: Contact;
9273
+ };
9274
+ export type ContactsSetConsentResponse = ContactsSetConsentResponses[keyof ContactsSetConsentResponses];
9056
9275
  export type ContactsRemoveTagsData = {
9057
9276
  body: {
9058
9277
  tags: [string, ...Array<string>];
@@ -9194,6 +9413,7 @@ export type ContactsGetEngagementResponses = {
9194
9413
  export type ContactsGetEngagementResponse = ContactsGetEngagementResponses[keyof ContactsGetEngagementResponses];
9195
9414
  export type ContactsBulkImportData = {
9196
9415
  body: {
9416
+ namespaceId?: NamespaceId | null | undefined;
9197
9417
  contacts: Array<{
9198
9418
  name: string;
9199
9419
  displayName?: string | null | null | undefined;
@@ -9226,6 +9446,10 @@ export type ContactsBulkImportErrors = {
9226
9446
  * ForbiddenError
9227
9447
  */
9228
9448
  403: ForbiddenError;
9449
+ /**
9450
+ * ResourceNotFoundError
9451
+ */
9452
+ 404: ResourceNotFoundError;
9229
9453
  /**
9230
9454
  * ValidationError
9231
9455
  */
@@ -9738,9 +9962,9 @@ export type JourneysCreateErrors = {
9738
9962
  */
9739
9963
  402: PaymentRequiredError;
9740
9964
  /**
9741
- * ForbiddenError
9965
+ * FlagDisabledError | ForbiddenError
9742
9966
  */
9743
- 403: ForbiddenError;
9967
+ 403: FlagDisabledError | ForbiddenError;
9744
9968
  /**
9745
9969
  * ResourceNotFoundError
9746
9970
  */
@@ -9927,9 +10151,9 @@ export type JourneysReplaceDraftErrors = {
9927
10151
  */
9928
10152
  402: PaymentRequiredError;
9929
10153
  /**
9930
- * ForbiddenError
10154
+ * FlagDisabledError | ForbiddenError
9931
10155
  */
9932
- 403: ForbiddenError;
10156
+ 403: FlagDisabledError | ForbiddenError;
9933
10157
  /**
9934
10158
  * ResourceNotFoundError
9935
10159
  */
@@ -9983,9 +10207,9 @@ export type JourneysPublishErrors = {
9983
10207
  */
9984
10208
  402: PaymentRequiredError;
9985
10209
  /**
9986
- * ForbiddenError
10210
+ * FlagDisabledError | ForbiddenError
9987
10211
  */
9988
- 403: ForbiddenError;
10212
+ 403: FlagDisabledError | ForbiddenError;
9989
10213
  /**
9990
10214
  * ResourceNotFoundError
9991
10215
  */
@@ -10083,9 +10307,9 @@ export type JourneysResumeErrors = {
10083
10307
  */
10084
10308
  402: PaymentRequiredError;
10085
10309
  /**
10086
- * ForbiddenError
10310
+ * FlagDisabledError | ForbiddenError
10087
10311
  */
10088
- 403: ForbiddenError;
10312
+ 403: FlagDisabledError | ForbiddenError;
10089
10313
  /**
10090
10314
  * ResourceNotFoundError
10091
10315
  */
@@ -11389,9 +11613,9 @@ export type UnsubscribeSetDefaultResponses = {
11389
11613
  };
11390
11614
  };
11391
11615
  export type UnsubscribeSetDefaultResponse = UnsubscribeSetDefaultResponses[keyof UnsubscribeSetDefaultResponses];
11392
- export type UnsubscribeRemoveEmailsData = {
11616
+ export type UnsubscribeRemoveMembersData = {
11393
11617
  body: {
11394
- emails: Array<string>;
11618
+ members: Array<UnsubscribeGroupMemberRef>;
11395
11619
  };
11396
11620
  path: {
11397
11621
  id: UnsubscribeId;
@@ -11399,7 +11623,7 @@ export type UnsubscribeRemoveEmailsData = {
11399
11623
  query?: never;
11400
11624
  url: "/v1/unsubscribe-groups/{id}/members";
11401
11625
  };
11402
- export type UnsubscribeRemoveEmailsErrors = {
11626
+ export type UnsubscribeRemoveMembersErrors = {
11403
11627
  /**
11404
11628
  * UnauthorizedError
11405
11629
  */
@@ -11425,8 +11649,8 @@ export type UnsubscribeRemoveEmailsErrors = {
11425
11649
  */
11426
11650
  504: GatewayTimeoutError;
11427
11651
  };
11428
- export type UnsubscribeRemoveEmailsError = UnsubscribeRemoveEmailsErrors[keyof UnsubscribeRemoveEmailsErrors];
11429
- export type UnsubscribeRemoveEmailsResponses = {
11652
+ export type UnsubscribeRemoveMembersError = UnsubscribeRemoveMembersErrors[keyof UnsubscribeRemoveMembersErrors];
11653
+ export type UnsubscribeRemoveMembersResponses = {
11430
11654
  /**
11431
11655
  * Success
11432
11656
  */
@@ -11434,7 +11658,7 @@ export type UnsubscribeRemoveEmailsResponses = {
11434
11658
  removed: number;
11435
11659
  };
11436
11660
  };
11437
- export type UnsubscribeRemoveEmailsResponse = UnsubscribeRemoveEmailsResponses[keyof UnsubscribeRemoveEmailsResponses];
11661
+ export type UnsubscribeRemoveMembersResponse = UnsubscribeRemoveMembersResponses[keyof UnsubscribeRemoveMembersResponses];
11438
11662
  export type UnsubscribeListMembersData = {
11439
11663
  body?: never;
11440
11664
  path: {
@@ -11480,9 +11704,9 @@ export type UnsubscribeListMembersResponses = {
11480
11704
  200: UnsubscribeGroupMemberPage;
11481
11705
  };
11482
11706
  export type UnsubscribeListMembersResponse = UnsubscribeListMembersResponses[keyof UnsubscribeListMembersResponses];
11483
- export type UnsubscribeAddEmailsData = {
11707
+ export type UnsubscribeAddMembersData = {
11484
11708
  body: {
11485
- emails: Array<string>;
11709
+ members: Array<UnsubscribeGroupMemberRef>;
11486
11710
  source?: "link" | "api" | "manual" | "complaint" | null | undefined;
11487
11711
  };
11488
11712
  path: {
@@ -11491,11 +11715,15 @@ export type UnsubscribeAddEmailsData = {
11491
11715
  query?: never;
11492
11716
  url: "/v1/unsubscribe-groups/{id}/members";
11493
11717
  };
11494
- export type UnsubscribeAddEmailsErrors = {
11718
+ export type UnsubscribeAddMembersErrors = {
11495
11719
  /**
11496
11720
  * UnauthorizedError
11497
11721
  */
11498
11722
  401: UnauthorizedError;
11723
+ /**
11724
+ * PaymentRequiredError
11725
+ */
11726
+ 402: PaymentRequiredError;
11499
11727
  /**
11500
11728
  * ForbiddenError
11501
11729
  */
@@ -11512,13 +11740,17 @@ export type UnsubscribeAddEmailsErrors = {
11512
11740
  * InternalError
11513
11741
  */
11514
11742
  500: InternalError;
11743
+ /**
11744
+ * BillingProviderError
11745
+ */
11746
+ 502: BillingProviderError;
11515
11747
  /**
11516
11748
  * GatewayTimeoutError
11517
11749
  */
11518
11750
  504: GatewayTimeoutError;
11519
11751
  };
11520
- export type UnsubscribeAddEmailsError = UnsubscribeAddEmailsErrors[keyof UnsubscribeAddEmailsErrors];
11521
- export type UnsubscribeAddEmailsResponses = {
11752
+ export type UnsubscribeAddMembersError = UnsubscribeAddMembersErrors[keyof UnsubscribeAddMembersErrors];
11753
+ export type UnsubscribeAddMembersResponses = {
11522
11754
  /**
11523
11755
  * Success
11524
11756
  */
@@ -11527,12 +11759,14 @@ export type UnsubscribeAddEmailsResponses = {
11527
11759
  skipped: number;
11528
11760
  };
11529
11761
  };
11530
- export type UnsubscribeAddEmailsResponse = UnsubscribeAddEmailsResponses[keyof UnsubscribeAddEmailsResponses];
11762
+ export type UnsubscribeAddMembersResponse = UnsubscribeAddMembersResponses[keyof UnsubscribeAddMembersResponses];
11531
11763
  export type UnsubscribeCheckSubscriptionData = {
11532
11764
  body?: never;
11533
11765
  path?: never;
11534
- query: {
11535
- email: string;
11766
+ query?: {
11767
+ contactId?: ContactId | null | undefined;
11768
+ email?: string | null | undefined;
11769
+ phone?: string | null | undefined;
11536
11770
  groupIds?: string | null | undefined;
11537
11771
  };
11538
11772
  url: "/v1/unsubscribe-groups/check";
@@ -11565,7 +11799,7 @@ export type UnsubscribeCheckSubscriptionResponses = {
11565
11799
  * Success
11566
11800
  */
11567
11801
  200: {
11568
- email: string;
11802
+ contactId: ContactId | null;
11569
11803
  unsubscribedGroups: Array<{
11570
11804
  groupId: string;
11571
11805
  groupName: string;
@@ -11885,6 +12119,10 @@ export type TemplatesListData = {
11885
12119
  status?: "draft" | "pending" | "approved" | "published" | "rejected" | "archived" | null | undefined;
11886
12120
  search?: string | null | undefined;
11887
12121
  projectId?: TemplateProjectId | null | undefined;
12122
+ /**
12123
+ * Only templates in this namespace. A namespace-scoped key lists its own namespace's templates only.
12124
+ */
12125
+ namespaceId?: NamespaceId | null | undefined;
11888
12126
  };
11889
12127
  url: "/v1/templates";
11890
12128
  };
@@ -11928,6 +12166,10 @@ export type TemplatesCreateData = {
11928
12166
  description?: string | null | null | undefined;
11929
12167
  category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null | undefined;
11930
12168
  isActive?: boolean | null | undefined;
12169
+ /**
12170
+ * The namespace the new template project belongs to; the project and every entry added to it share it. Omit for organization level. A namespace-scoped key always creates in its own namespace.
12171
+ */
12172
+ namespaceId?: NamespaceId | null | undefined;
11931
12173
  idempotencyKey: string;
11932
12174
  };
11933
12175
  path?: never;
@@ -11943,6 +12185,10 @@ export type TemplatesCreateErrors = {
11943
12185
  * ForbiddenError
11944
12186
  */
11945
12187
  403: ForbiddenError;
12188
+ /**
12189
+ * ResourceNotFoundError
12190
+ */
12191
+ 404: ResourceNotFoundError;
11946
12192
  /**
11947
12193
  * ConflictError
11948
12194
  */
@@ -14781,7 +15027,7 @@ export type WebhooksCreateData = {
14781
15027
  body: {
14782
15028
  name: string;
14783
15029
  url: string;
14784
- eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
15030
+ eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
14785
15031
  channels?: Array<"email"> | null | undefined;
14786
15032
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | undefined;
14787
15033
  namespaceId?: NamespaceId | null | undefined;
@@ -14935,7 +15181,7 @@ export type WebhooksUpdateData = {
14935
15181
  body: {
14936
15182
  name?: string | null | undefined;
14937
15183
  url?: string | null | undefined;
14938
- eventTypes?: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook"> | null | undefined;
15184
+ eventTypes?: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook"> | null | undefined;
14939
15185
  channels?: Array<"email"> | null | null | undefined;
14940
15186
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | null | undefined;
14941
15187
  namespaceId?: NamespaceId | null | null | undefined;
@@ -15314,7 +15560,7 @@ export type OrganizationsUpdateData = {
15314
15560
  body: {
15315
15561
  name?: string | null | undefined;
15316
15562
  slug?: string | null | undefined;
15317
- countryCode?: string | null | undefined;
15563
+ defaultRegion?: PhoneRegion | null | null | undefined;
15318
15564
  timezone?: IanaTimezone | null | undefined;
15319
15565
  isActive?: boolean | null | undefined;
15320
15566
  metadata?: {
@@ -16102,9 +16348,9 @@ export type MailboxesCreateErrors = {
16102
16348
  */
16103
16349
  402: PaymentRequiredError;
16104
16350
  /**
16105
- * ForbiddenError
16351
+ * FlagDisabledError | ForbiddenError
16106
16352
  */
16107
- 403: ForbiddenError;
16353
+ 403: FlagDisabledError | ForbiddenError;
16108
16354
  /**
16109
16355
  * ResourceNotFoundError
16110
16356
  */
@@ -16114,9 +16360,9 @@ export type MailboxesCreateErrors = {
16114
16360
  */
16115
16361
  409: ConflictError;
16116
16362
  /**
16117
- * ValidationError | MailboxChannelUnsupportedError
16363
+ * ValidationError
16118
16364
  */
16119
- 422: ValidationError | MailboxChannelUnsupportedError;
16365
+ 422: ValidationError;
16120
16366
  /**
16121
16367
  * InternalError
16122
16368
  */
@@ -16289,9 +16535,9 @@ export type MailboxesCreateEndpointErrors = {
16289
16535
  */
16290
16536
  401: UnauthorizedError;
16291
16537
  /**
16292
- * ForbiddenError
16538
+ * FlagDisabledError | ForbiddenError
16293
16539
  */
16294
- 403: ForbiddenError;
16540
+ 403: FlagDisabledError | ForbiddenError;
16295
16541
  /**
16296
16542
  * ResourceNotFoundError
16297
16543
  */
@@ -16301,9 +16547,9 @@ export type MailboxesCreateEndpointErrors = {
16301
16547
  */
16302
16548
  409: ConflictError;
16303
16549
  /**
16304
- * ValidationError | MailboxChannelUnsupportedError
16550
+ * ValidationError
16305
16551
  */
16306
- 422: ValidationError | MailboxChannelUnsupportedError;
16552
+ 422: ValidationError;
16307
16553
  /**
16308
16554
  * InternalError
16309
16555
  */
@@ -17724,9 +17970,9 @@ export type MailboxesSendMessageErrors = {
17724
17970
  */
17725
17971
  402: PaymentRequiredError;
17726
17972
  /**
17727
- * MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
17973
+ * FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
17728
17974
  */
17729
- 403: MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
17975
+ 403: FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
17730
17976
  /**
17731
17977
  * ResourceNotFoundError
17732
17978
  */
@@ -17736,9 +17982,9 @@ export type MailboxesSendMessageErrors = {
17736
17982
  */
17737
17983
  409: MailboxSendConflictError | ConflictError;
17738
17984
  /**
17739
- * MailboxChannelUnsupportedError | ValidationError
17985
+ * Samva API operation.
17740
17986
  */
17741
- 422: MailboxChannelUnsupportedError | ValidationError;
17987
+ 422: ValidationError;
17742
17988
  /**
17743
17989
  * RateLimitedError
17744
17990
  */
@@ -17979,9 +18225,9 @@ export type MailboxesReplyErrors = {
17979
18225
  */
17980
18226
  402: PaymentRequiredError;
17981
18227
  /**
17982
- * MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
18228
+ * FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
17983
18229
  */
17984
- 403: MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
18230
+ 403: FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
17985
18231
  /**
17986
18232
  * ResourceNotFoundError
17987
18233
  */
@@ -17991,9 +18237,9 @@ export type MailboxesReplyErrors = {
17991
18237
  */
17992
18238
  409: MailboxSendConflictError | ConflictError;
17993
18239
  /**
17994
- * MailboxChannelUnsupportedError | ValidationError
18240
+ * Samva API operation.
17995
18241
  */
17996
- 422: MailboxChannelUnsupportedError | ValidationError;
18242
+ 422: ValidationError;
17997
18243
  /**
17998
18244
  * RateLimitedError
17999
18245
  */
@@ -18056,9 +18302,9 @@ export type MailboxesReplyAllErrors = {
18056
18302
  */
18057
18303
  402: PaymentRequiredError;
18058
18304
  /**
18059
- * MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
18305
+ * FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
18060
18306
  */
18061
- 403: MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
18307
+ 403: FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
18062
18308
  /**
18063
18309
  * ResourceNotFoundError
18064
18310
  */
@@ -18068,9 +18314,9 @@ export type MailboxesReplyAllErrors = {
18068
18314
  */
18069
18315
  409: MailboxSendConflictError | ConflictError;
18070
18316
  /**
18071
- * MailboxChannelUnsupportedError | ValidationError
18317
+ * Samva API operation.
18072
18318
  */
18073
- 422: MailboxChannelUnsupportedError | ValidationError;
18319
+ 422: ValidationError;
18074
18320
  /**
18075
18321
  * RateLimitedError
18076
18322
  */
@@ -18133,9 +18379,9 @@ export type MailboxesForwardErrors = {
18133
18379
  */
18134
18380
  402: PaymentRequiredError;
18135
18381
  /**
18136
- * MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
18382
+ * FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
18137
18383
  */
18138
- 403: MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
18384
+ 403: FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
18139
18385
  /**
18140
18386
  * ResourceNotFoundError
18141
18387
  */
@@ -18145,9 +18391,9 @@ export type MailboxesForwardErrors = {
18145
18391
  */
18146
18392
  409: MailboxSendConflictError | ConflictError;
18147
18393
  /**
18148
- * MailboxChannelUnsupportedError | ValidationError
18394
+ * Samva API operation.
18149
18395
  */
18150
- 422: MailboxChannelUnsupportedError | ValidationError;
18396
+ 422: ValidationError;
18151
18397
  /**
18152
18398
  * RateLimitedError
18153
18399
  */
@@ -18406,9 +18652,9 @@ export type MailboxesCreateDraftErrors = {
18406
18652
  */
18407
18653
  404: ResourceNotFoundError;
18408
18654
  /**
18409
- * MailboxChannelUnsupportedError | ValidationError
18655
+ * ValidationError
18410
18656
  */
18411
- 422: MailboxChannelUnsupportedError | ValidationError;
18657
+ 422: ValidationError;
18412
18658
  /**
18413
18659
  * InternalError
18414
18660
  */
@@ -18590,9 +18836,9 @@ export type MailboxesSendDraftErrors = {
18590
18836
  */
18591
18837
  402: PaymentRequiredError;
18592
18838
  /**
18593
- * MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
18839
+ * FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
18594
18840
  */
18595
- 403: MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
18841
+ 403: FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
18596
18842
  /**
18597
18843
  * ResourceNotFoundError
18598
18844
  */
@@ -18602,9 +18848,9 @@ export type MailboxesSendDraftErrors = {
18602
18848
  */
18603
18849
  409: MailboxSendConflictError | ConflictError;
18604
18850
  /**
18605
- * MailboxChannelUnsupportedError | ValidationError
18851
+ * Samva API operation.
18606
18852
  */
18607
- 422: MailboxChannelUnsupportedError | ValidationError;
18853
+ 422: ValidationError;
18608
18854
  /**
18609
18855
  * RateLimitedError
18610
18856
  */
@@ -18749,9 +18995,9 @@ export type MailboxesCancelActionErrors = {
18749
18995
  */
18750
18996
  402: PaymentRequiredError;
18751
18997
  /**
18752
- * MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
18998
+ * FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
18753
18999
  */
18754
- 403: MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
19000
+ 403: FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
18755
19001
  /**
18756
19002
  * ResourceNotFoundError
18757
19003
  */
@@ -18761,9 +19007,9 @@ export type MailboxesCancelActionErrors = {
18761
19007
  */
18762
19008
  409: MailboxSendConflictError | ConflictError;
18763
19009
  /**
18764
- * MailboxChannelUnsupportedError | ValidationError
19010
+ * Samva API operation.
18765
19011
  */
18766
- 422: MailboxChannelUnsupportedError | ValidationError;
19012
+ 422: ValidationError;
18767
19013
  /**
18768
19014
  * RateLimitedError
18769
19015
  */
@@ -18816,9 +19062,9 @@ export type MailboxesRetryActionErrors = {
18816
19062
  */
18817
19063
  402: PaymentRequiredError;
18818
19064
  /**
18819
- * MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
19065
+ * FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
18820
19066
  */
18821
- 403: MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
19067
+ 403: FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
18822
19068
  /**
18823
19069
  * ResourceNotFoundError
18824
19070
  */
@@ -18828,9 +19074,9 @@ export type MailboxesRetryActionErrors = {
18828
19074
  */
18829
19075
  409: MailboxSendConflictError | ConflictError;
18830
19076
  /**
18831
- * MailboxChannelUnsupportedError | ValidationError
19077
+ * Samva API operation.
18832
19078
  */
18833
- 422: MailboxChannelUnsupportedError | ValidationError;
19079
+ 422: ValidationError;
18834
19080
  /**
18835
19081
  * RateLimitedError
18836
19082
  */
@@ -18883,9 +19129,9 @@ export type MailboxesApproveActionErrors = {
18883
19129
  */
18884
19130
  402: PaymentRequiredError;
18885
19131
  /**
18886
- * MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
19132
+ * FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError
18887
19133
  */
18888
- 403: MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
19134
+ 403: FlagDisabledError | MailboxSendRefusedError | OnboardingReviewRequiredError | ForbiddenError;
18889
19135
  /**
18890
19136
  * ResourceNotFoundError
18891
19137
  */
@@ -18895,9 +19141,9 @@ export type MailboxesApproveActionErrors = {
18895
19141
  */
18896
19142
  409: MailboxSendConflictError | ConflictError;
18897
19143
  /**
18898
- * MailboxChannelUnsupportedError | ValidationError
19144
+ * Samva API operation.
18899
19145
  */
18900
- 422: MailboxChannelUnsupportedError | ValidationError;
19146
+ 422: ValidationError;
18901
19147
  /**
18902
19148
  * RateLimitedError
18903
19149
  */
@@ -19250,6 +19496,151 @@ export type NamespacesUpdateResponses = {
19250
19496
  200: Namespace;
19251
19497
  };
19252
19498
  export type NamespacesUpdateResponse = NamespacesUpdateResponses[keyof NamespacesUpdateResponses];
19499
+ export type NamespacesAssignResourceData = {
19500
+ body: {
19501
+ type: NamespaceResourceType;
19502
+ /**
19503
+ * The resource's id, such as `dom_...` for a domain.
19504
+ */
19505
+ resourceId: string;
19506
+ };
19507
+ path: {
19508
+ id: NamespaceId;
19509
+ };
19510
+ query?: never;
19511
+ url: "/v1/namespaces/{id}/resources";
19512
+ };
19513
+ export type NamespacesAssignResourceErrors = {
19514
+ /**
19515
+ * UnauthorizedError
19516
+ */
19517
+ 401: UnauthorizedError;
19518
+ /**
19519
+ * ForbiddenError
19520
+ */
19521
+ 403: ForbiddenError;
19522
+ /**
19523
+ * ResourceNotFoundError
19524
+ */
19525
+ 404: ResourceNotFoundError;
19526
+ /**
19527
+ * ConflictError
19528
+ */
19529
+ 409: ConflictError;
19530
+ /**
19531
+ * ValidationError
19532
+ */
19533
+ 422: ValidationError;
19534
+ /**
19535
+ * InternalError
19536
+ */
19537
+ 500: InternalError;
19538
+ /**
19539
+ * GatewayTimeoutError
19540
+ */
19541
+ 504: GatewayTimeoutError;
19542
+ };
19543
+ export type NamespacesAssignResourceError = NamespacesAssignResourceErrors[keyof NamespacesAssignResourceErrors];
19544
+ export type NamespacesAssignResourceResponses = {
19545
+ /**
19546
+ * NamespaceResource
19547
+ */
19548
+ 200: NamespaceResource;
19549
+ };
19550
+ export type NamespacesAssignResourceResponse = NamespacesAssignResourceResponses[keyof NamespacesAssignResourceResponses];
19551
+ export type NamespacesRemoveResourceData = {
19552
+ body?: never;
19553
+ path: {
19554
+ id: NamespaceId;
19555
+ type: NamespaceResourceType;
19556
+ resourceId: string;
19557
+ };
19558
+ query?: never;
19559
+ url: "/v1/namespaces/{id}/resources/{type}/{resourceId}";
19560
+ };
19561
+ export type NamespacesRemoveResourceErrors = {
19562
+ /**
19563
+ * UnauthorizedError
19564
+ */
19565
+ 401: UnauthorizedError;
19566
+ /**
19567
+ * ForbiddenError
19568
+ */
19569
+ 403: ForbiddenError;
19570
+ /**
19571
+ * ResourceNotFoundError
19572
+ */
19573
+ 404: ResourceNotFoundError;
19574
+ /**
19575
+ * ConflictError
19576
+ */
19577
+ 409: ConflictError;
19578
+ /**
19579
+ * ValidationError
19580
+ */
19581
+ 422: ValidationError;
19582
+ /**
19583
+ * InternalError
19584
+ */
19585
+ 500: InternalError;
19586
+ /**
19587
+ * GatewayTimeoutError
19588
+ */
19589
+ 504: GatewayTimeoutError;
19590
+ };
19591
+ export type NamespacesRemoveResourceError = NamespacesRemoveResourceErrors[keyof NamespacesRemoveResourceErrors];
19592
+ export type NamespacesRemoveResourceResponses = {
19593
+ /**
19594
+ * NamespaceResource
19595
+ */
19596
+ 200: NamespaceResource;
19597
+ };
19598
+ export type NamespacesRemoveResourceResponse = NamespacesRemoveResourceResponses[keyof NamespacesRemoveResourceResponses];
19599
+ export type NamespacesGetUsageData = {
19600
+ body?: never;
19601
+ path: {
19602
+ id: NamespaceId;
19603
+ };
19604
+ query?: {
19605
+ after?: string | null | undefined;
19606
+ before?: string | null | undefined;
19607
+ };
19608
+ url: "/v1/namespaces/{id}/usage";
19609
+ };
19610
+ export type NamespacesGetUsageErrors = {
19611
+ /**
19612
+ * UnauthorizedError
19613
+ */
19614
+ 401: UnauthorizedError;
19615
+ /**
19616
+ * ForbiddenError
19617
+ */
19618
+ 403: ForbiddenError;
19619
+ /**
19620
+ * ResourceNotFoundError
19621
+ */
19622
+ 404: ResourceNotFoundError;
19623
+ /**
19624
+ * ValidationError
19625
+ */
19626
+ 422: ValidationError;
19627
+ /**
19628
+ * InternalError
19629
+ */
19630
+ 500: InternalError;
19631
+ /**
19632
+ * GatewayTimeoutError
19633
+ */
19634
+ 504: GatewayTimeoutError;
19635
+ };
19636
+ export type NamespacesGetUsageError = NamespacesGetUsageErrors[keyof NamespacesGetUsageErrors];
19637
+ export type NamespacesGetUsageResponses = {
19638
+ /**
19639
+ * NamespaceUsage
19640
+ */
19641
+ 200: NamespaceUsage;
19642
+ };
19643
+ export type NamespacesGetUsageResponse = NamespacesGetUsageResponses[keyof NamespacesGetUsageResponses];
19253
19644
  export type ExtensionsListData = {
19254
19645
  body?: never;
19255
19646
  path?: never;
@@ -19303,7 +19694,7 @@ export type ExtensionsPublishData = {
19303
19694
  description?: string | null | undefined;
19304
19695
  version: string;
19305
19696
  runtime: "hosted" | "webhook";
19306
- events: Array<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
19697
+ events: Array<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
19307
19698
  permissions: Array<"read" | "update" | "send" | "quarantine.read">;
19308
19699
  };
19309
19700
  bundle?: string | null | undefined;
@@ -19680,7 +20071,7 @@ export type ExtensionInstallationsGetResponse = ExtensionInstallationsGetRespons
19680
20071
  export type ExtensionInstallationsUpgradeData = {
19681
20072
  body: {
19682
20073
  version?: string | ExtensionVersionId | null | undefined;
19683
- acceptPermissions?: Array<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded"> | null | undefined;
20074
+ acceptPermissions?: Array<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded"> | null | undefined;
19684
20075
  dryRun?: boolean | null | undefined;
19685
20076
  };
19686
20077
  path: {