samva 0.47.0 → 0.49.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 (90) hide show
  1. package/dist/agent/index.d.ts +1 -0
  2. package/dist/agent/index.js +2 -1
  3. package/dist/agent/runtime.js +26 -5
  4. package/dist/agent/types.d.ts +27 -0
  5. package/dist/client/sdk.gen.d.ts +234 -34
  6. package/dist/client/sdk.gen.js +574 -60
  7. package/dist/client/types.gen.d.ts +1363 -164
  8. package/dist/effect/accounts.d.ts +6 -6
  9. package/dist/effect/agents.d.ts +13 -13
  10. package/dist/effect/analytics.d.ts +6 -6
  11. package/dist/effect/api-keys.d.ts +13 -11
  12. package/dist/effect/approval-requests.d.ts +4 -4
  13. package/dist/effect/attachments.d.ts +4 -4
  14. package/dist/effect/brands.d.ts +6 -6
  15. package/dist/effect/campaigns.d.ts +15 -15
  16. package/dist/effect/contact-groups.d.ts +10 -10
  17. package/dist/effect/contacts.d.ts +25 -25
  18. package/dist/effect/conversations.d.ts +13 -13
  19. package/dist/effect/custom-fields.d.ts +4 -4
  20. package/dist/effect/descriptors/integrations-catalog.d.ts +134 -0
  21. package/dist/effect/descriptors/integrations-catalog.js +122 -0
  22. package/dist/effect/descriptors/mailboxes.d.ts +32 -12
  23. package/dist/effect/descriptors/mailboxes.js +32 -12
  24. package/dist/effect/email.d.ts +61 -61
  25. package/dist/effect/events.d.ts +2 -2
  26. package/dist/effect/feedback.d.ts +1 -1
  27. package/dist/effect/generated/accounts.d.ts +1 -3
  28. package/dist/effect/generated/accounts.js +2 -7
  29. package/dist/effect/generated/api-keys.d.ts +30 -15
  30. package/dist/effect/generated/api-keys.js +2 -0
  31. package/dist/effect/generated/attachments.js +1 -1
  32. package/dist/effect/generated/integrations-catalog.d.ts +2702 -1
  33. package/dist/effect/generated/integrations-catalog.js +578 -3
  34. package/dist/effect/generated/journeys.d.ts +105 -107
  35. package/dist/effect/generated/journeys.js +6 -12
  36. package/dist/effect/generated/mailboxes.d.ts +752 -463
  37. package/dist/effect/generated/mailboxes.js +163 -98
  38. package/dist/effect/generated/messages.d.ts +109 -4
  39. package/dist/effect/generated/messages.js +41 -8
  40. package/dist/effect/generated/shared.d.ts +255 -59
  41. package/dist/effect/generated/shared.js +64 -18
  42. package/dist/effect/generated/template-registrations.d.ts +53 -4
  43. package/dist/effect/generated/template-registrations.js +13 -5
  44. package/dist/effect/generated/templates.d.ts +77 -15
  45. package/dist/effect/generated/templates.js +26 -17
  46. package/dist/effect/generated/webhooks.d.ts +19 -19
  47. package/dist/effect/generated/webhooks.js +8 -8
  48. package/dist/effect/generated/whoami.d.ts +4 -4
  49. package/dist/effect/generated-metadata.d.ts +114 -18
  50. package/dist/effect/generated-metadata.js +362 -340
  51. package/dist/effect/integrations-catalog.d.ts +228 -3
  52. package/dist/effect/integrations-catalog.js +29 -1
  53. package/dist/effect/integrations.d.ts +7 -7
  54. package/dist/effect/internal/client.d.ts +7 -3
  55. package/dist/effect/internal/operation.d.ts +10 -6
  56. package/dist/effect/internal/operation.js +3 -3
  57. package/dist/effect/journeys.d.ts +14 -14
  58. package/dist/effect/mailboxes.d.ts +117 -91
  59. package/dist/effect/mailboxes.js +11 -7
  60. package/dist/effect/media.d.ts +5 -5
  61. package/dist/effect/messages.d.ts +9 -9
  62. package/dist/effect/namespaces.d.ts +11 -11
  63. package/dist/effect/newsletter-domains.d.ts +4 -4
  64. package/dist/effect/newsletter-issues.d.ts +11 -11
  65. package/dist/effect/newsletters.d.ts +5 -5
  66. package/dist/effect/operations.d.ts +3 -3
  67. package/dist/effect/organizations.d.ts +12 -12
  68. package/dist/effect/policies.d.ts +3 -3
  69. package/dist/effect/retry.js +1 -1
  70. package/dist/effect/scheduled-messages.d.ts +5 -5
  71. package/dist/effect/subscriptions.d.ts +1 -1
  72. package/dist/effect/template-registrations.d.ts +9 -3
  73. package/dist/effect/template-share-links.d.ts +5 -5
  74. package/dist/effect/templates.d.ts +46 -37
  75. package/dist/effect/topic-forms.d.ts +5 -5
  76. package/dist/effect/topics.d.ts +9 -9
  77. package/dist/effect/webhooks.d.ts +15 -15
  78. package/dist/effect/whatsapp-flows.d.ts +10 -10
  79. package/dist/effect/whatsapp-setup-links.d.ts +4 -4
  80. package/dist/effect/whatsapp.d.ts +12 -12
  81. package/dist/effect/whoami.d.ts +1 -1
  82. package/dist/inline-attachments.d.ts +0 -5
  83. package/dist/mailbox-events.d.ts +1 -5
  84. package/dist/mailbox-events.js +2 -2
  85. package/dist/package.js +1 -1
  86. package/dist/promises/client.d.ts +4 -4
  87. package/dist/promises/client.js +8 -4
  88. package/dist/promises/types.gen.d.ts +1 -1
  89. package/dist/service-map.d.ts +83 -9
  90. package/package.json +2 -2
@@ -43,14 +43,22 @@ export type ResourceNotFoundError = {
43
43
  id: string;
44
44
  message: string;
45
45
  };
46
+ /**
47
+ * `templateChannelVariantId` identifies the exact content last submitted. A journey step or scheduled send pins it with `id` in `pinnedRegistration` and sends only while this registration holds that content approved.
48
+ */
46
49
  export type TemplateRegistration = {
47
50
  id: TemplateRegistrationId;
48
51
  templateId: TemplateId;
49
52
  publicationId: TemplatePublicationId;
53
+ templateChannelVariantId: TemplateChannelVariantId;
50
54
  target: TemplateRegistrationTarget;
51
55
  name: string;
52
56
  language: string;
53
57
  status: "draft" | "submitted" | "approved" | "rejected" | "paused" | "disabled";
58
+ /**
59
+ * Content a submission sent to the provider whose outcome is not yet recorded, because its request failed or is still in flight; the provider may already hold it. While it is set nothing sends from this registration, even when `status` is `approved`. Submitting again settles it.
60
+ */
61
+ pendingTemplateChannelVariantId: TemplateChannelVariantId | null;
54
62
  category: "marketing" | "utility" | "authentication" | "transactional" | "service_implicit" | "service_explicit" | "promotional";
55
63
  providerCategory: "marketing" | "utility" | "authentication" | "transactional" | "service_implicit" | "service_explicit" | "promotional" | null;
56
64
  providerTemplateId: string | null;
@@ -60,6 +68,7 @@ export type TemplateRegistration = {
60
68
  createdAt: string;
61
69
  updatedAt: string;
62
70
  };
71
+ export type TemplateChannelVariantId = string;
63
72
  export type TemplateRegistrationTarget = WhatsAppRegistrationTarget | DltRegistrationTarget;
64
73
  export type DltRegistrationTarget = {
65
74
  provider: "dlt";
@@ -76,6 +85,11 @@ export type TemplateRegistrationId = string;
76
85
  export type TemplateRegistrationList = {
77
86
  data: Array<TemplateRegistration>;
78
87
  };
88
+ export type ServiceUnavailableError = {
89
+ _tag: "ServiceUnavailableError";
90
+ message: string;
91
+ retryAfterSeconds: number;
92
+ };
79
93
  export type CredentialsError = {
80
94
  _tag: "CredentialsError";
81
95
  message: string;
@@ -97,9 +111,32 @@ export type ConflictError = {
97
111
  };
98
112
  export type SubmitTemplateRegistrationPayload = {
99
113
  provider: "whatsapp";
100
- businessAccountId?: WhatsAppBusinessAccountId | undefined;
114
+ businessAccountId?: WhatsAppBusinessAccountId1 | undefined;
115
+ approval?: TemplateRegistrationApproval | undefined;
101
116
  };
102
- export type WhatsAppBusinessAccountId = string;
117
+ /**
118
+ * For a reviewed submission, the exact publication, workspace revision, number and Meta business account. Omit the separate businessAccountId when supplying approval.
119
+ */
120
+ export type TemplateRegistrationApproval = {
121
+ publicationId: TemplatePublicationId;
122
+ businessAccountId: WhatsAppBusinessAccountId2;
123
+ /**
124
+ * The Meta business account ID shown for the selected number before approval.
125
+ */
126
+ expectedWabaId: string;
127
+ /**
128
+ * The workspace revision reviewed for this submission.
129
+ */
130
+ expectedWorkspaceRevision: string;
131
+ };
132
+ /**
133
+ * The connected WhatsApp number selected for this submission.
134
+ */
135
+ export type WhatsAppBusinessAccountId2 = string;
136
+ /**
137
+ * For an immediate submission, the connected number to register on. Defaults to the number for the template's scope.
138
+ */
139
+ export type WhatsAppBusinessAccountId1 = string;
103
140
  export type WhatsAppSetupLinkUnavailableError = {
104
141
  _tag: "WhatsAppSetupLinkUnavailableError";
105
142
  reason: "completed" | "revoked" | "expired";
@@ -119,6 +156,7 @@ export type WhatsAppSetupLink = {
119
156
  createdAt: string;
120
157
  updatedAt: string;
121
158
  };
159
+ export type WhatsAppBusinessAccountId = string;
122
160
  export type WhatsAppSetupLinkMetadata = {
123
161
  [key: string]: string;
124
162
  };
@@ -236,11 +274,6 @@ export type WhatsAppFlowVersion = {
236
274
  dataExchange: boolean;
237
275
  createdAt: string;
238
276
  };
239
- export type ServiceUnavailableError = {
240
- _tag: "ServiceUnavailableError";
241
- message: string;
242
- retryAfterSeconds: number;
243
- };
244
277
  export type RecordWhatsAppFlowVersionPayload = {
245
278
  commitSha: string;
246
279
  expectedWorkspaceRevision: string;
@@ -728,7 +761,6 @@ export type JsonObject = {
728
761
  export type JsonObjectWritable = {
729
762
  [key: string]: JsonValueWritable | undefined;
730
763
  };
731
- export type TemplateChannelVariantId = string;
732
764
  export type MailboxSmsEndpointBinding = {
733
765
  channel: "sms";
734
766
  phoneNumberId: SmsPhoneNumberId;
@@ -984,7 +1016,7 @@ export type ScheduleMailboxDraft = {
984
1016
  draftRevision: number;
985
1017
  sendAt: string;
986
1018
  };
987
- export type MailboxQuarantinedMessage = {
1019
+ export type MailboxSpamHeldMessage = {
988
1020
  id: MessageId;
989
1021
  disposition: "quarantined" | "isolated";
990
1022
  reason: "spam" | "dmarc" | "virus" | "virus_unscanned" | "verdict_missing" | "phishing" | "fraud" | "prompt_injection";
@@ -1000,8 +1032,8 @@ export type MailboxQuarantinedMessage = {
1000
1032
  threadId: MailboxThreadId | null;
1001
1033
  discardedAt: string | null;
1002
1034
  };
1003
- export type MailboxQuarantinePage = {
1004
- items: Array<MailboxQuarantinedMessage>;
1035
+ export type MailboxSpamHeldPage = {
1036
+ items: Array<MailboxSpamHeldMessage>;
1005
1037
  nextCursor: string | null;
1006
1038
  };
1007
1039
  export type ForwardMailboxMessagePayload = {
@@ -1226,10 +1258,16 @@ export type MailboxThreadState = {
1226
1258
  };
1227
1259
  export type MailboxLabelId = string;
1228
1260
  export type MailboxThreadPriority = "low" | "normal" | "high" | "urgent";
1229
- export type MailboxThreadFolder = "inbox" | "assigned" | "pending" | "sent" | "archived" | "trash";
1261
+ export type MailboxThreadFolder = "inbox" | "assigned" | "pending" | "sent" | "archived" | "trash" | "spam";
1230
1262
  export type MailboxThreadLabels = {
1231
1263
  labels: [MailboxLabelId, ...Array<MailboxLabelId>];
1232
1264
  };
1265
+ export type MailboxEmptySpamAccepted = {
1266
+ count: number;
1267
+ };
1268
+ export type MailboxEmptyTrashAccepted = {
1269
+ count: number;
1270
+ };
1233
1271
  export type UpdateMailboxThreadPayload = {
1234
1272
  folder?: MailboxThreadFolder | null | undefined;
1235
1273
  priority?: MailboxThreadPriority | null | undefined;
@@ -1245,6 +1283,10 @@ export type MailboxThread = {
1245
1283
  id: MailboxThreadId;
1246
1284
  channel: MailboxChannel;
1247
1285
  endpointId: MailboxEndpointId | null;
1286
+ /**
1287
+ * The mailbox address that received the thread's first inbound email, including any plus tag. Null when no receiving address is known.
1288
+ */
1289
+ deliveredTo: string | null;
1248
1290
  subject: string | null;
1249
1291
  preview: string | null;
1250
1292
  from: MailboxThreadSender | null;
@@ -1252,6 +1294,7 @@ export type MailboxThread = {
1252
1294
  hasAttachments: boolean;
1253
1295
  hasDraft: boolean;
1254
1296
  folder: MailboxThreadFolder;
1297
+ spam?: MailboxThreadSpam | undefined;
1255
1298
  priority: MailboxThreadPriority;
1256
1299
  labels: Array<MailboxLabelId>;
1257
1300
  read: boolean;
@@ -1285,6 +1328,10 @@ export type MailboxThreadParticipant = {
1285
1328
  role: "recipient" | "sender" | "assignee" | "observer";
1286
1329
  address?: string | null | undefined;
1287
1330
  };
1331
+ export type MailboxThreadSpam = {
1332
+ reason: "spam" | "dmarc" | "virus" | "virus_unscanned" | "verdict_missing" | "phishing" | "fraud" | "prompt_injection" | null;
1333
+ source: "receipt" | "classifier" | "reader";
1334
+ };
1288
1335
  export type MailboxThreadSender = {
1289
1336
  address: string | null;
1290
1337
  displayName: string | null;
@@ -1297,6 +1344,10 @@ export type MailboxThreadSummary = {
1297
1344
  id: MailboxThreadId;
1298
1345
  channel: MailboxChannel;
1299
1346
  endpointId: MailboxEndpointId | null;
1347
+ /**
1348
+ * The mailbox address that received the thread's first inbound email, including any plus tag. Null when no receiving address is known.
1349
+ */
1350
+ deliveredTo: string | null;
1300
1351
  subject: string | null;
1301
1352
  preview: string | null;
1302
1353
  from: MailboxThreadSender | null;
@@ -1304,6 +1355,7 @@ export type MailboxThreadSummary = {
1304
1355
  hasAttachments: boolean;
1305
1356
  hasDraft: boolean;
1306
1357
  folder: MailboxThreadFolder;
1358
+ spam?: MailboxThreadSpam | undefined;
1307
1359
  priority: MailboxThreadPriority;
1308
1360
  labels: Array<MailboxLabelId>;
1309
1361
  read: boolean;
@@ -1328,6 +1380,10 @@ export type OrganizationMailboxThreadSummary = {
1328
1380
  id: MailboxThreadId;
1329
1381
  channel: MailboxChannel;
1330
1382
  endpointId: MailboxEndpointId | null;
1383
+ /**
1384
+ * The mailbox address that received the thread's first inbound email, including any plus tag. Null when no receiving address is known.
1385
+ */
1386
+ deliveredTo: string | null;
1331
1387
  subject: string | null;
1332
1388
  preview: string | null;
1333
1389
  from: MailboxThreadSender | null;
@@ -1335,6 +1391,7 @@ export type OrganizationMailboxThreadSummary = {
1335
1391
  hasAttachments: boolean;
1336
1392
  hasDraft: boolean;
1337
1393
  folder: MailboxThreadFolder;
1394
+ spam?: MailboxThreadSpam | undefined;
1338
1395
  priority: MailboxThreadPriority;
1339
1396
  labels: Array<MailboxLabelId>;
1340
1397
  read: boolean;
@@ -1522,7 +1579,7 @@ export type MailboxGrant = {
1522
1579
  id: string;
1523
1580
  displayName?: string | null | undefined;
1524
1581
  };
1525
- permissions: Array<"mailbox:read" | "mailbox:configure" | "thread:read" | "thread:write" | "label:write" | "draft:write" | "note:write" | "action:propose" | "action:approve" | "policy:read" | "quarantine:read" | "quarantine:release">;
1582
+ permissions: Array<"mailbox:read" | "mailbox:configure" | "thread:read" | "thread:write" | "label:write" | "draft:write" | "note:write" | "action:propose" | "action:approve" | "policy:read" | "spam:read" | "spam:discard">;
1526
1583
  createdAt: string;
1527
1584
  };
1528
1585
  export type UpdateMailboxGrantPayload = {
@@ -1706,11 +1763,11 @@ export type ApiKeyAccess = {
1706
1763
  };
1707
1764
  export type ApiKeyMailboxAccess = {
1708
1765
  /**
1709
- * `read` reads mailboxes, threads, and messages; `update` changes thread state, labels, drafts, and notes; `send` sends and replies; `quarantine.read` reads quarantined mail.
1766
+ * `read` reads mailboxes, threads, and messages; `update` changes thread state, labels, drafts, and notes; `send` sends and replies; `spam.read` reads quarantined mail.
1710
1767
  */
1711
1768
  permissions: [
1712
- "read" | "update" | "send" | "quarantine.read",
1713
- ...Array<"read" | "update" | "send" | "quarantine.read">
1769
+ "read" | "update" | "send" | "spam.read",
1770
+ ...Array<"read" | "update" | "send" | "spam.read">
1714
1771
  ];
1715
1772
  /**
1716
1773
  * The mailboxes the key may act on. Omit to reach every mailbox the owner can.
@@ -1779,6 +1836,7 @@ export type ApiKeyWithSecret = {
1779
1836
  start: string | null;
1780
1837
  end: string | null;
1781
1838
  description?: string | null | undefined;
1839
+ source?: string | null | undefined;
1782
1840
  createdAt: string;
1783
1841
  expiresAt: string | null;
1784
1842
  lastUsedAt: string | null;
@@ -1798,6 +1856,7 @@ export type ApiKey = {
1798
1856
  start: string | null;
1799
1857
  end: string | null;
1800
1858
  description?: string | null | undefined;
1859
+ source?: string | null | undefined;
1801
1860
  createdAt: string;
1802
1861
  expiresAt: string | null;
1803
1862
  lastUsedAt: string | null;
@@ -1954,7 +2013,7 @@ export type WebhookEndpoint = {
1954
2013
  id: WebhookEndpointId;
1955
2014
  name: string;
1956
2015
  url: string;
1957
- 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" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
2016
+ 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" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.spam" | "mailbox.message.discarded" | "mailbox.thread.deleted" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
1958
2017
  channels: Array<"sms" | "whatsapp" | "email"> | null;
1959
2018
  mailboxIds: Array<MailboxId> | null;
1960
2019
  namespaceId: NamespaceId | null;
@@ -1968,7 +2027,7 @@ export type WebhookEndpoint = {
1968
2027
  export type UpdateWebhookPayload = {
1969
2028
  name?: string | null | undefined;
1970
2029
  url?: string | null | undefined;
1971
- 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" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook"> | null | undefined;
2030
+ 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" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.spam" | "mailbox.message.discarded" | "mailbox.thread.deleted" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook"> | null | undefined;
1972
2031
  channels?: Array<"sms" | "whatsapp" | "email"> | null | undefined;
1973
2032
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | undefined;
1974
2033
  namespaceId?: NamespaceId | null | undefined;
@@ -1985,7 +2044,7 @@ export type WebhookEndpointListItem = {
1985
2044
  id: WebhookEndpointId;
1986
2045
  name: string;
1987
2046
  url: string;
1988
- 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" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
2047
+ 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" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.spam" | "mailbox.message.discarded" | "mailbox.thread.deleted" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
1989
2048
  channels: Array<"sms" | "whatsapp" | "email"> | null;
1990
2049
  mailboxIds: Array<MailboxId> | null;
1991
2050
  namespaceId: NamespaceId | null;
@@ -2007,7 +2066,7 @@ export type WebhookDeliveryCounts = {
2007
2066
  export type CreateWebhookPayload = {
2008
2067
  name: string;
2009
2068
  url: string;
2010
- 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" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
2069
+ 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" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.spam" | "mailbox.message.discarded" | "mailbox.thread.deleted" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
2011
2070
  channels?: Array<"sms" | "whatsapp" | "email"> | null | undefined;
2012
2071
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | undefined;
2013
2072
  namespaceId?: NamespaceId | null | undefined;
@@ -2379,9 +2438,13 @@ export type TemplateStarterSuggestion = {
2379
2438
  */
2380
2439
  galleryTemplateId: string;
2381
2440
  /**
2382
- * The design's gallery page, under /templates/.
2441
+ * The channel the design's template sends on.
2383
2442
  */
2384
- slug: string;
2443
+ channel: "email" | "whatsapp";
2444
+ /**
2445
+ * The design's public gallery page, under /templates/. Null for a design without one, such as a WhatsApp starter.
2446
+ */
2447
+ slug: string | null;
2385
2448
  name: string;
2386
2449
  description: string;
2387
2450
  /**
@@ -2408,16 +2471,24 @@ export type TemplateStarterSuggestion = {
2408
2471
  };
2409
2472
  export type CreateTemplateFromBriefPayload = {
2410
2473
  /**
2411
- * What the email is for, as a person would ask for it: who sends it, to whom, and why. Naming a company's email ("like the Vercel login email") starts from Samva's recreation of it when the gallery has one.
2474
+ * What the message is for, as a person would ask for it: who sends it, to whom, and why. Naming a company's email ("like the Vercel login email") starts from Samva's recreation of it when the gallery has one.
2412
2475
  */
2413
2476
  brief: string;
2477
+ /**
2478
+ * The channel to start a template for. Defaults to email. WhatsApp starts from Samva's WhatsApp starters and is available where WhatsApp is enabled for the organization.
2479
+ */
2480
+ channel?: "email" | "whatsapp" | null | undefined;
2414
2481
  name?: string | null | undefined;
2415
2482
  galleryTemplateId?: string | null | undefined;
2416
2483
  useBrand?: boolean | null | undefined;
2417
2484
  /**
2418
- * The namespace the new template project belongs to. Omit for organization level. A namespace-scoped key always creates in its own namespace.
2485
+ * The namespace the new template project belongs to. Omit for organization level. A namespace-scoped key always creates in its own namespace. With `variantOf`, omit it or name the source's namespace.
2419
2486
  */
2420
2487
  namespaceId?: NamespaceId | null | undefined;
2488
+ /**
2489
+ * Make this template another channel's version of an existing template the caller can change: it is created in that template's namespace, holds that template's current draft as a read-only resource the template assistant reads facts from, and joins that template's family (one is made when it has none). The returned `ask` says where the snapshot is mounted; its `variant-source.json` names the source, its entry and the revision taken. A retry with the same idempotency key finishes the same version; the key refuses a different source, or a request without `variantOf`. Refused when `channel` is the source's own or its family already has a template on `channel`. The source's files are mounted whole: a project with more than 31 files, a file over 4 MB, or more than 8 MB in all is refused before anything is created.
2490
+ */
2491
+ variantOf?: TemplateId | null | undefined;
2421
2492
  };
2422
2493
  export type TemplateStarterSuggestions = {
2423
2494
  /**
@@ -2428,9 +2499,13 @@ export type TemplateStarterSuggestions = {
2428
2499
  };
2429
2500
  export type SuggestTemplateStartersPayload = {
2430
2501
  /**
2431
- * What the email is for, as a person would ask for it: who sends it, to whom, and why. Naming a company's email ("like the Vercel login email") starts from Samva's recreation of it when the gallery has one.
2502
+ * What the message is for, as a person would ask for it: who sends it, to whom, and why. Naming a company's email ("like the Vercel login email") starts from Samva's recreation of it when the gallery has one.
2432
2503
  */
2433
2504
  brief: string;
2505
+ /**
2506
+ * The channel to start a template for. Defaults to email. WhatsApp starts from Samva's WhatsApp starters and is available where WhatsApp is enabled for the organization.
2507
+ */
2508
+ channel?: "email" | "whatsapp" | null | undefined;
2434
2509
  };
2435
2510
  export type ShareLinkUnavailable = {
2436
2511
  _tag: "ShareLinkUnavailable";
@@ -2463,6 +2538,10 @@ export type CreateTemplatePayload = {
2463
2538
  export type TemplateFamily = {
2464
2539
  id: TemplateFamilyId;
2465
2540
  name: string;
2541
+ /**
2542
+ * The namespace the family belongs to, which every member it gains shares. Null at organization level. A namespace-scoped key reaches only its own namespace's families.
2543
+ */
2544
+ namespaceId: NamespaceId | null;
2466
2545
  members: Array<TemplateFamilyMember>;
2467
2546
  createdAt: string;
2468
2547
  updatedAt: string;
@@ -2479,6 +2558,13 @@ export type TemplateFamilyMember = {
2479
2558
  export type TemplateFamilyName = {
2480
2559
  name: string;
2481
2560
  };
2561
+ export type CreateTemplateFamilyPayload = {
2562
+ name: string;
2563
+ /**
2564
+ * The namespace the family belongs to; every member it gains must be in it. Omit for organization level. A namespace-scoped key always creates in its own namespace.
2565
+ */
2566
+ namespaceId?: NamespaceId | null | undefined;
2567
+ };
2482
2568
  export type TemplateFamilyPage = {
2483
2569
  items: Array<TemplateFamily>;
2484
2570
  nextCursor: string | null;
@@ -3024,6 +3110,231 @@ export type IntegrationCatalogSearchEntry = {
3024
3110
  connectState: "ready" | "checkedAtConnect" | "unavailable";
3025
3111
  reason: string | null;
3026
3112
  };
3113
+ export type RecipeReadinessResponse = {
3114
+ ready: boolean;
3115
+ channel: "email" | "whatsapp";
3116
+ availability: {
3117
+ shopify: boolean;
3118
+ journeys: boolean;
3119
+ whatsapp: boolean;
3120
+ plan: "granted" | "denied" | "unreachable" | "disabled" | null;
3121
+ };
3122
+ shopify: {
3123
+ id: IntegrationAccountId;
3124
+ status: AccountStatus;
3125
+ shop: string;
3126
+ } | null;
3127
+ publication: {
3128
+ id: TemplatePublicationId;
3129
+ templateId: TemplateId;
3130
+ /**
3131
+ * Top-level inputs of the selected email publication or approved WhatsApp registration.
3132
+ */
3133
+ parameters?: Array<{
3134
+ name: string;
3135
+ required: boolean;
3136
+ }> | undefined;
3137
+ /**
3138
+ * Email input diagnostics and guidance when the journey cannot fill this publication.
3139
+ */
3140
+ inputIssues?: Array<string> | undefined;
3141
+ } | null;
3142
+ email: {
3143
+ senderId: EmailSenderId | null;
3144
+ domainId: EmailDomainId | null;
3145
+ address: string;
3146
+ status: "ready" | "unverified" | "inactive";
3147
+ } | null;
3148
+ whatsapp: {
3149
+ accountId: WhatsAppBusinessAccountId;
3150
+ address: string;
3151
+ status: "ready" | "reconnect" | "unverified" | "inactive";
3152
+ registration: {
3153
+ id: TemplateRegistrationId;
3154
+ status: "draft" | "submitted" | "approved" | "rejected" | "paused" | "disabled";
3155
+ } | null;
3156
+ } | null;
3157
+ reply: {
3158
+ endpointId: MailboxEndpointId;
3159
+ mailboxId: MailboxId;
3160
+ address: string;
3161
+ status: "ready" | "inactive" | "different_account";
3162
+ } | null;
3163
+ };
3164
+ export type EmailDomainId = string;
3165
+ export type AccountStatus = "pending" | "connected" | "needsReconnect";
3166
+ export type RecipeCatalogResponse = {
3167
+ recipes: Array<{
3168
+ id: "post-delivery-check-in";
3169
+ title: string;
3170
+ trigger: "shopify.order_created" | "shopify.order_fulfilled" | "shopify.order_delivered" | "shopify.refund_created" | "shopify.checkout_started";
3171
+ stopEvent: "shopify.order_created" | "shopify.order_fulfilled" | "shopify.order_delivered" | "shopify.refund_created" | "shopify.checkout_started";
3172
+ waitDays: number;
3173
+ channels: Array<"email" | "whatsapp">;
3174
+ }>;
3175
+ events: Array<{
3176
+ event: "shopify.order_created" | "shopify.order_fulfilled" | "shopify.order_delivered" | "shopify.refund_created" | "shopify.checkout_started";
3177
+ version: number;
3178
+ producer: string;
3179
+ schema: JsonObject;
3180
+ paths: Array<{
3181
+ path: string;
3182
+ mayBeEmpty: boolean;
3183
+ }>;
3184
+ samples: Array<{
3185
+ fixture: string;
3186
+ label: string;
3187
+ properties: JsonObject;
3188
+ }>;
3189
+ }>;
3190
+ };
3191
+ export type RecipeTestReceipt = {
3192
+ messageId: MessageId;
3193
+ state: "queued" | "unresolved" | "rejected";
3194
+ };
3195
+ export type RecipeTestResponse = {
3196
+ messageId: MessageId;
3197
+ };
3198
+ export type RecipeTestPayload = {
3199
+ templateId: TemplateId;
3200
+ publicationId: TemplatePublicationId;
3201
+ fixture?: string | undefined;
3202
+ templateData?: JsonObject | undefined;
3203
+ channel: "email";
3204
+ requestId: string;
3205
+ mailboxEndpointId: MailboxEndpointId;
3206
+ topicId?: TopicId | undefined;
3207
+ senderId?: EmailSenderId | undefined;
3208
+ } | {
3209
+ templateId: TemplateId;
3210
+ publicationId: TemplatePublicationId;
3211
+ fixture?: string | undefined;
3212
+ templateData?: JsonObject | undefined;
3213
+ channel: "whatsapp";
3214
+ eventBindings?: {
3215
+ [key: string]: string;
3216
+ } | undefined;
3217
+ requestId: string;
3218
+ mailboxEndpointId: MailboxEndpointId;
3219
+ topicId?: TopicId | undefined;
3220
+ businessAccountId: WhatsAppBusinessAccountId;
3221
+ registrationId: TemplateRegistrationId;
3222
+ challengeId: string;
3223
+ };
3224
+ export type RecipeChallengeStatus = {
3225
+ id: string;
3226
+ expiresAt: string;
3227
+ observedPhone: string | null;
3228
+ confirmedAt: string | null;
3229
+ };
3230
+ export type RecipeChallengeStarted = {
3231
+ id: string;
3232
+ expiresAt: string;
3233
+ address: string;
3234
+ message: string;
3235
+ };
3236
+ export type RecipePreviewResponse = {
3237
+ fixture: string;
3238
+ publicationId: TemplatePublicationId;
3239
+ channel: "email";
3240
+ content: {
3241
+ subject: string;
3242
+ preheader?: string | undefined;
3243
+ html: string;
3244
+ text: string;
3245
+ };
3246
+ } | {
3247
+ fixture: string;
3248
+ publicationId: TemplatePublicationId;
3249
+ channel: "whatsapp";
3250
+ content: JsonObject;
3251
+ };
3252
+ export type RecipePreviewPayload = {
3253
+ templateId: TemplateId;
3254
+ publicationId: TemplatePublicationId;
3255
+ fixture?: string | undefined;
3256
+ templateData?: JsonObject | undefined;
3257
+ channel: "email";
3258
+ } | {
3259
+ templateId: TemplateId;
3260
+ publicationId: TemplatePublicationId;
3261
+ fixture?: string | undefined;
3262
+ templateData?: JsonObject | undefined;
3263
+ channel: "whatsapp";
3264
+ eventBindings?: {
3265
+ [key: string]: string;
3266
+ } | undefined;
3267
+ };
3268
+ export type ActivatedRecipeSetup = {
3269
+ setup: RecipeSetup;
3270
+ journey: {
3271
+ id: JourneyId;
3272
+ status: JourneyStatus;
3273
+ publishedVersion: number;
3274
+ };
3275
+ };
3276
+ export type JourneyStatus = "draft" | "active" | "paused" | "archived";
3277
+ export type RecipeSetup = {
3278
+ id: string;
3279
+ revision: string;
3280
+ references: RecipeSetupReferences;
3281
+ updatedAt: string;
3282
+ };
3283
+ export type RecipeSetupReferences = {
3284
+ channel: "email" | "whatsapp";
3285
+ templateFamilyId?: TemplateFamilyId | undefined;
3286
+ integrationAccountId?: IntegrationAccountId | undefined;
3287
+ publicationId?: TemplatePublicationId | undefined;
3288
+ senderId?: EmailSenderId | undefined;
3289
+ whatsappAccountId?: WhatsAppBusinessAccountId | undefined;
3290
+ registrationId?: TemplateRegistrationId | undefined;
3291
+ mailboxEndpointId?: MailboxEndpointId | undefined;
3292
+ journeyId?: JourneyId | undefined;
3293
+ eventBindings?: {
3294
+ [key: string]: string;
3295
+ } | undefined;
3296
+ };
3297
+ export type RecipeSetupReferencesWritable = {
3298
+ channel: "email" | "whatsapp";
3299
+ templateFamilyId?: TemplateFamilyId | undefined;
3300
+ integrationAccountId?: IntegrationAccountId | undefined;
3301
+ publicationId?: TemplatePublicationId | undefined;
3302
+ senderId?: EmailSenderId | undefined;
3303
+ whatsappAccountId?: WhatsAppBusinessAccountId | undefined;
3304
+ registrationId?: TemplateRegistrationId | undefined;
3305
+ mailboxEndpointId?: MailboxEndpointId | undefined;
3306
+ journeyId?: JourneyId | undefined;
3307
+ eventBindings?: {
3308
+ [key: string]: string | undefined;
3309
+ } | undefined;
3310
+ };
3311
+ export type ActivateRecipeSetup = {
3312
+ revision: string;
3313
+ selection: {
3314
+ channel: "email";
3315
+ publicationId: TemplatePublicationId;
3316
+ senderId?: EmailSenderId | undefined;
3317
+ } | {
3318
+ channel: "whatsapp";
3319
+ whatsappAccountId: WhatsAppBusinessAccountId;
3320
+ registrationId: TemplateRegistrationId;
3321
+ eventBindings: {
3322
+ [key: string]: string;
3323
+ };
3324
+ };
3325
+ };
3326
+ export type ReplaceRecipeSetup = {
3327
+ references: RecipeSetupReferences;
3328
+ revision: string | null;
3329
+ };
3330
+ export type RecipeSetups = {
3331
+ items: Array<RecipeSetup>;
3332
+ };
3333
+ export type RecipeHandoff = {
3334
+ url: string;
3335
+ organizationSlug: string;
3336
+ setupId: string | null;
3337
+ };
3027
3338
  export type DeleteAccountResponse = {
3028
3339
  id: IntegrationAccountId;
3029
3340
  deleted: true;
@@ -3080,7 +3391,6 @@ export type AccountInfo = {
3080
3391
  verifiedEmail?: string | undefined;
3081
3392
  timeZone?: string | undefined;
3082
3393
  };
3083
- export type AccountStatus = "pending" | "connected" | "needsReconnect";
3084
3394
  export type IntegrationAccountList = {
3085
3395
  items: Array<IntegrationAccount>;
3086
3396
  };
@@ -3461,7 +3771,7 @@ export type ShopifyShop = string;
3461
3771
  export type JourneyGoal = {
3462
3772
  eventName: JourneyEventName;
3463
3773
  };
3464
- export type JourneyEventName = JourneyCustomEventName | "contact.created" | "contact.tag_added" | "contact.joined_group";
3774
+ export type JourneyEventName = JourneyCustomEventName | "contact.created" | "contact.tag_added" | "contact.joined_group" | "contact.connection_completed";
3465
3775
  export type JourneyCustomEventName = string;
3466
3776
  export type JourneyNode = JourneySendEmailNode | WhatsAppJourneySendNode | JourneyWaitNode | JourneyWaitForEventNode | JourneyBranchNode | JourneyUpdateTagsNode | JourneyWebhookNode | JourneyExitNode;
3467
3777
  export type JourneyNodeWritable = JourneySendEmailNodeWritable | WhatsAppJourneySendNodeWritable | JourneyWaitNode | JourneyWaitForEventNode | JourneyBranchNode | JourneyUpdateTagsNode | JourneyWebhookNodeWritable | JourneyExitNode;
@@ -3664,7 +3974,6 @@ export type Journey = {
3664
3974
  createdAt: string;
3665
3975
  updatedAt: string;
3666
3976
  };
3667
- export type JourneyStatus = "draft" | "active" | "paused" | "archived";
3668
3977
  export type PublishJourneyPayload = {
3669
3978
  revision: string;
3670
3979
  };
@@ -4226,7 +4535,6 @@ export type DomainWarmingDomainRef = {
4226
4535
  id: EmailDomainId;
4227
4536
  domain: string;
4228
4537
  };
4229
- export type EmailDomainId = string;
4230
4538
  export type DomainWarmingNotePayload = {
4231
4539
  note?: string | null | undefined;
4232
4540
  };
@@ -5788,9 +6096,28 @@ export type SmsMessageContent = {
5788
6096
  parts?: number | null | undefined;
5789
6097
  };
5790
6098
  export type MessageDeliveryList = {
5791
- items: Array<MessageDelivery>;
6099
+ id: MessageId;
6100
+ status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
6101
+ skippedRecipients: Array<SkippedRecipient>;
6102
+ items: Array<MessageDeliveryObservation>;
6103
+ reply: MessageReplyObservation;
6104
+ };
6105
+ export type MessageReplyObservation = {
6106
+ endpoints: Array<{
6107
+ mailboxId: MailboxId;
6108
+ endpointId: MailboxEndpointId;
6109
+ address: string;
6110
+ }>;
6111
+ received: {
6112
+ messageId: MessageId;
6113
+ receivedAt: string;
6114
+ thread: {
6115
+ mailboxId: MailboxId;
6116
+ threadId: MailboxThreadId;
6117
+ } | null;
6118
+ } | null;
5792
6119
  };
5793
- export type MessageDelivery = {
6120
+ export type MessageDeliveryObservation = {
5794
6121
  id: MessageDeliveryId;
5795
6122
  recipient: string | null;
5796
6123
  status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
@@ -5805,6 +6132,7 @@ export type MessageDelivery = {
5805
6132
  estimatedProviderCost: EstimatedProviderCost | null;
5806
6133
  createdAt: string;
5807
6134
  updatedAt: string;
6135
+ queuedAt: string | null;
5808
6136
  };
5809
6137
  export type EstimatedProviderCost = {
5810
6138
  amount: string;
@@ -15359,29 +15687,791 @@ export type AccountsRemoveErrors = {
15359
15687
  /**
15360
15688
  * InternalError
15361
15689
  */
15362
- 500: InternalError;
15690
+ 500: InternalError;
15691
+ /**
15692
+ * GatewayTimeoutError
15693
+ */
15694
+ 504: GatewayTimeoutError;
15695
+ };
15696
+ export type AccountsRemoveError = AccountsRemoveErrors[keyof AccountsRemoveErrors];
15697
+ export type AccountsRemoveResponses = {
15698
+ /**
15699
+ * DeleteAccountResponse
15700
+ */
15701
+ 200: DeleteAccountResponse;
15702
+ };
15703
+ export type AccountsRemoveResponse = AccountsRemoveResponses[keyof AccountsRemoveResponses];
15704
+ export type AccountsGetData = {
15705
+ body?: never;
15706
+ path: {
15707
+ accountId: IntegrationAccountId;
15708
+ };
15709
+ query?: never;
15710
+ url: "/v1/accounts/{accountId}";
15711
+ };
15712
+ export type AccountsGetErrors = {
15713
+ /**
15714
+ * MalformedRequestError
15715
+ */
15716
+ 400: MalformedRequestError;
15717
+ /**
15718
+ * UnauthorizedError
15719
+ */
15720
+ 401: UnauthorizedError;
15721
+ /**
15722
+ * ForbiddenError
15723
+ */
15724
+ 403: ForbiddenError;
15725
+ /**
15726
+ * ResourceNotFoundError
15727
+ */
15728
+ 404: ResourceNotFoundError;
15729
+ /**
15730
+ * ValidationError
15731
+ */
15732
+ 422: ValidationError;
15733
+ /**
15734
+ * InternalError
15735
+ */
15736
+ 500: InternalError;
15737
+ /**
15738
+ * GatewayTimeoutError
15739
+ */
15740
+ 504: GatewayTimeoutError;
15741
+ };
15742
+ export type AccountsGetError = AccountsGetErrors[keyof AccountsGetErrors];
15743
+ export type AccountsGetResponses = {
15744
+ /**
15745
+ * IntegrationAccount
15746
+ */
15747
+ 200: IntegrationAccount;
15748
+ };
15749
+ export type AccountsGetResponse = AccountsGetResponses[keyof AccountsGetResponses];
15750
+ export type AccountsCheckData = {
15751
+ body?: never;
15752
+ path: {
15753
+ accountId: IntegrationAccountId;
15754
+ };
15755
+ query?: never;
15756
+ url: "/v1/accounts/{accountId}/check";
15757
+ };
15758
+ export type AccountsCheckErrors = {
15759
+ /**
15760
+ * MalformedRequestError
15761
+ */
15762
+ 400: MalformedRequestError;
15763
+ /**
15764
+ * UnauthorizedError
15765
+ */
15766
+ 401: UnauthorizedError;
15767
+ /**
15768
+ * ForbiddenError
15769
+ */
15770
+ 403: ForbiddenError;
15771
+ /**
15772
+ * ResourceNotFoundError
15773
+ */
15774
+ 404: ResourceNotFoundError;
15775
+ /**
15776
+ * ValidationError
15777
+ */
15778
+ 422: ValidationError;
15779
+ /**
15780
+ * InternalError
15781
+ */
15782
+ 500: InternalError;
15783
+ /**
15784
+ * GatewayTimeoutError
15785
+ */
15786
+ 504: GatewayTimeoutError;
15787
+ };
15788
+ export type AccountsCheckError = AccountsCheckErrors[keyof AccountsCheckErrors];
15789
+ export type AccountsCheckResponses = {
15790
+ /**
15791
+ * IntegrationAccountHealth
15792
+ */
15793
+ 200: IntegrationAccountHealth;
15794
+ };
15795
+ export type AccountsCheckResponse = AccountsCheckResponses[keyof AccountsCheckResponses];
15796
+ export type AccountsConnectData = {
15797
+ body: {
15798
+ provider: IntegrationKey;
15799
+ input?: JsonObjectWritable | undefined;
15800
+ credentials?: {
15801
+ [key: string]: string | undefined;
15802
+ } | undefined;
15803
+ app?: IntegrationKey | undefined;
15804
+ accountId?: IntegrationAccountId | undefined;
15805
+ expectedHosts?: Array<string> | undefined;
15806
+ returnTo: IntegrationReturnTo;
15807
+ };
15808
+ path?: never;
15809
+ query?: never;
15810
+ url: "/v1/accounts/connect";
15811
+ };
15812
+ export type AccountsConnectErrors = {
15813
+ /**
15814
+ * MalformedRequestError
15815
+ */
15816
+ 400: MalformedRequestError;
15817
+ /**
15818
+ * UnauthorizedError
15819
+ */
15820
+ 401: UnauthorizedError;
15821
+ /**
15822
+ * ForbiddenError
15823
+ */
15824
+ 403: ForbiddenError;
15825
+ /**
15826
+ * ResourceNotFoundError
15827
+ */
15828
+ 404: ResourceNotFoundError;
15829
+ /**
15830
+ * ValidationError
15831
+ */
15832
+ 422: ValidationError;
15833
+ /**
15834
+ * InternalError
15835
+ */
15836
+ 500: InternalError;
15837
+ /**
15838
+ * GatewayTimeoutError
15839
+ */
15840
+ 504: GatewayTimeoutError;
15841
+ };
15842
+ export type AccountsConnectError = AccountsConnectErrors[keyof AccountsConnectErrors];
15843
+ export type AccountsConnectResponses = {
15844
+ /**
15845
+ * ConnectAccountResponse
15846
+ */
15847
+ 201: ConnectAccountResponse;
15848
+ };
15849
+ export type AccountsConnectResponse = AccountsConnectResponses[keyof AccountsConnectResponses];
15850
+ export type IntegrationCatalogRecipeConnectionHandoffData = {
15851
+ body?: never;
15852
+ path: {
15853
+ provider: "shopify" | "whatsapp";
15854
+ };
15855
+ query?: {
15856
+ integrationAccountId?: IntegrationAccountId | undefined;
15857
+ whatsappAccountId?: WhatsAppBusinessAccountId | undefined;
15858
+ setupId?: string | undefined;
15859
+ };
15860
+ url: "/v1/integrations/catalog/recipes/post-delivery-check-in/connections/{provider}";
15861
+ };
15862
+ export type IntegrationCatalogRecipeConnectionHandoffErrors = {
15863
+ /**
15864
+ * MalformedRequestError
15865
+ */
15866
+ 400: MalformedRequestError;
15867
+ /**
15868
+ * UnauthorizedError
15869
+ */
15870
+ 401: UnauthorizedError;
15871
+ /**
15872
+ * ForbiddenError | FlagDisabledError
15873
+ */
15874
+ 403: ForbiddenError | FlagDisabledError;
15875
+ /**
15876
+ * ResourceNotFoundError
15877
+ */
15878
+ 404: ResourceNotFoundError;
15879
+ /**
15880
+ * ValidationError
15881
+ */
15882
+ 422: ValidationError;
15883
+ /**
15884
+ * InternalError
15885
+ */
15886
+ 500: InternalError;
15887
+ /**
15888
+ * GatewayTimeoutError
15889
+ */
15890
+ 504: GatewayTimeoutError;
15891
+ };
15892
+ export type IntegrationCatalogRecipeConnectionHandoffError = IntegrationCatalogRecipeConnectionHandoffErrors[keyof IntegrationCatalogRecipeConnectionHandoffErrors];
15893
+ export type IntegrationCatalogRecipeConnectionHandoffResponses = {
15894
+ /**
15895
+ * RecipeHandoff
15896
+ */
15897
+ 200: RecipeHandoff;
15898
+ };
15899
+ export type IntegrationCatalogRecipeConnectionHandoffResponse = IntegrationCatalogRecipeConnectionHandoffResponses[keyof IntegrationCatalogRecipeConnectionHandoffResponses];
15900
+ export type IntegrationCatalogRecipeTestHandoffData = {
15901
+ body?: never;
15902
+ path?: never;
15903
+ query: {
15904
+ channel: "email" | "whatsapp";
15905
+ templateId: TemplateId;
15906
+ publicationId: TemplatePublicationId;
15907
+ mailboxEndpointId: MailboxEndpointId;
15908
+ fixture?: string | undefined;
15909
+ senderId?: EmailSenderId | undefined;
15910
+ businessAccountId?: WhatsAppBusinessAccountId | undefined;
15911
+ registrationId?: TemplateRegistrationId | undefined;
15912
+ };
15913
+ url: "/v1/integrations/catalog/recipes/post-delivery-check-in/owner-test/handoff";
15914
+ };
15915
+ export type IntegrationCatalogRecipeTestHandoffErrors = {
15916
+ /**
15917
+ * MalformedRequestError
15918
+ */
15919
+ 400: MalformedRequestError;
15920
+ /**
15921
+ * UnauthorizedError
15922
+ */
15923
+ 401: UnauthorizedError;
15924
+ /**
15925
+ * ForbiddenError
15926
+ */
15927
+ 403: ForbiddenError;
15928
+ /**
15929
+ * ResourceNotFoundError
15930
+ */
15931
+ 404: ResourceNotFoundError;
15932
+ /**
15933
+ * ValidationError
15934
+ */
15935
+ 422: ValidationError;
15936
+ /**
15937
+ * InternalError
15938
+ */
15939
+ 500: InternalError;
15940
+ /**
15941
+ * GatewayTimeoutError
15942
+ */
15943
+ 504: GatewayTimeoutError;
15944
+ };
15945
+ export type IntegrationCatalogRecipeTestHandoffError = IntegrationCatalogRecipeTestHandoffErrors[keyof IntegrationCatalogRecipeTestHandoffErrors];
15946
+ export type IntegrationCatalogRecipeTestHandoffResponses = {
15947
+ /**
15948
+ * RecipeHandoff
15949
+ */
15950
+ 200: RecipeHandoff;
15951
+ };
15952
+ export type IntegrationCatalogRecipeTestHandoffResponse = IntegrationCatalogRecipeTestHandoffResponses[keyof IntegrationCatalogRecipeTestHandoffResponses];
15953
+ export type IntegrationCatalogRecipeSetupsListData = {
15954
+ body?: never;
15955
+ path?: never;
15956
+ query?: never;
15957
+ url: "/v1/integrations/catalog/recipes/post-delivery-check-in/setups";
15958
+ };
15959
+ export type IntegrationCatalogRecipeSetupsListErrors = {
15960
+ /**
15961
+ * MalformedRequestError
15962
+ */
15963
+ 400: MalformedRequestError;
15964
+ /**
15965
+ * UnauthorizedError
15966
+ */
15967
+ 401: UnauthorizedError;
15968
+ /**
15969
+ * ForbiddenError
15970
+ */
15971
+ 403: ForbiddenError;
15972
+ /**
15973
+ * ValidationError
15974
+ */
15975
+ 422: ValidationError;
15976
+ /**
15977
+ * InternalError
15978
+ */
15979
+ 500: InternalError;
15980
+ /**
15981
+ * GatewayTimeoutError
15982
+ */
15983
+ 504: GatewayTimeoutError;
15984
+ };
15985
+ export type IntegrationCatalogRecipeSetupsListError = IntegrationCatalogRecipeSetupsListErrors[keyof IntegrationCatalogRecipeSetupsListErrors];
15986
+ export type IntegrationCatalogRecipeSetupsListResponses = {
15987
+ /**
15988
+ * RecipeSetups
15989
+ */
15990
+ 200: RecipeSetups;
15991
+ };
15992
+ export type IntegrationCatalogRecipeSetupsListResponse = IntegrationCatalogRecipeSetupsListResponses[keyof IntegrationCatalogRecipeSetupsListResponses];
15993
+ export type IntegrationCatalogRecipeSetupGetData = {
15994
+ body?: never;
15995
+ path: {
15996
+ id: string;
15997
+ };
15998
+ query?: never;
15999
+ url: "/v1/integrations/catalog/recipes/post-delivery-check-in/setups/{id}";
16000
+ };
16001
+ export type IntegrationCatalogRecipeSetupGetErrors = {
16002
+ /**
16003
+ * MalformedRequestError
16004
+ */
16005
+ 400: MalformedRequestError;
16006
+ /**
16007
+ * UnauthorizedError
16008
+ */
16009
+ 401: UnauthorizedError;
16010
+ /**
16011
+ * ForbiddenError
16012
+ */
16013
+ 403: ForbiddenError;
16014
+ /**
16015
+ * ResourceNotFoundError
16016
+ */
16017
+ 404: ResourceNotFoundError;
16018
+ /**
16019
+ * ValidationError
16020
+ */
16021
+ 422: ValidationError;
16022
+ /**
16023
+ * InternalError
16024
+ */
16025
+ 500: InternalError;
16026
+ /**
16027
+ * GatewayTimeoutError
16028
+ */
16029
+ 504: GatewayTimeoutError;
16030
+ };
16031
+ export type IntegrationCatalogRecipeSetupGetError = IntegrationCatalogRecipeSetupGetErrors[keyof IntegrationCatalogRecipeSetupGetErrors];
16032
+ export type IntegrationCatalogRecipeSetupGetResponses = {
16033
+ /**
16034
+ * RecipeSetup
16035
+ */
16036
+ 200: RecipeSetup;
16037
+ };
16038
+ export type IntegrationCatalogRecipeSetupGetResponse = IntegrationCatalogRecipeSetupGetResponses[keyof IntegrationCatalogRecipeSetupGetResponses];
16039
+ export type IntegrationCatalogRecipeSetupReplaceData = {
16040
+ body: {
16041
+ references: RecipeSetupReferencesWritable;
16042
+ revision: string | null;
16043
+ };
16044
+ path: {
16045
+ id: string;
16046
+ };
16047
+ query?: never;
16048
+ url: "/v1/integrations/catalog/recipes/post-delivery-check-in/setups/{id}";
16049
+ };
16050
+ export type IntegrationCatalogRecipeSetupReplaceErrors = {
16051
+ /**
16052
+ * MalformedRequestError
16053
+ */
16054
+ 400: MalformedRequestError;
16055
+ /**
16056
+ * UnauthorizedError
16057
+ */
16058
+ 401: UnauthorizedError;
16059
+ /**
16060
+ * ForbiddenError
16061
+ */
16062
+ 403: ForbiddenError;
16063
+ /**
16064
+ * ResourceNotFoundError
16065
+ */
16066
+ 404: ResourceNotFoundError;
16067
+ /**
16068
+ * ConflictError
16069
+ */
16070
+ 409: ConflictError;
16071
+ /**
16072
+ * ValidationError
16073
+ */
16074
+ 422: ValidationError;
16075
+ /**
16076
+ * InternalError
16077
+ */
16078
+ 500: InternalError;
16079
+ /**
16080
+ * GatewayTimeoutError
16081
+ */
16082
+ 504: GatewayTimeoutError;
16083
+ };
16084
+ export type IntegrationCatalogRecipeSetupReplaceError = IntegrationCatalogRecipeSetupReplaceErrors[keyof IntegrationCatalogRecipeSetupReplaceErrors];
16085
+ export type IntegrationCatalogRecipeSetupReplaceResponses = {
16086
+ /**
16087
+ * RecipeSetup
16088
+ */
16089
+ 200: RecipeSetup;
16090
+ };
16091
+ export type IntegrationCatalogRecipeSetupReplaceResponse = IntegrationCatalogRecipeSetupReplaceResponses[keyof IntegrationCatalogRecipeSetupReplaceResponses];
16092
+ export type IntegrationCatalogRecipeSetupActivateData = {
16093
+ body: {
16094
+ revision: string;
16095
+ selection: {
16096
+ channel: "email";
16097
+ publicationId: TemplatePublicationId;
16098
+ senderId?: EmailSenderId | undefined;
16099
+ } | {
16100
+ channel: "whatsapp";
16101
+ whatsappAccountId: WhatsAppBusinessAccountId;
16102
+ registrationId: TemplateRegistrationId;
16103
+ eventBindings: {
16104
+ [key: string]: string | undefined;
16105
+ };
16106
+ };
16107
+ };
16108
+ path: {
16109
+ id: string;
16110
+ };
16111
+ query?: never;
16112
+ url: "/v1/integrations/catalog/recipes/post-delivery-check-in/setups/{id}/activate";
16113
+ };
16114
+ export type IntegrationCatalogRecipeSetupActivateErrors = {
16115
+ /**
16116
+ * MalformedRequestError
16117
+ */
16118
+ 400: MalformedRequestError;
16119
+ /**
16120
+ * UnauthorizedError
16121
+ */
16122
+ 401: UnauthorizedError;
16123
+ /**
16124
+ * PaymentRequiredError
16125
+ */
16126
+ 402: PaymentRequiredError;
16127
+ /**
16128
+ * ForbiddenError | FlagDisabledError
16129
+ */
16130
+ 403: ForbiddenError | FlagDisabledError;
16131
+ /**
16132
+ * ResourceNotFoundError
16133
+ */
16134
+ 404: ResourceNotFoundError;
16135
+ /**
16136
+ * ConflictError
16137
+ */
16138
+ 409: ConflictError;
16139
+ /**
16140
+ * ValidationError
16141
+ */
16142
+ 422: ValidationError;
16143
+ /**
16144
+ * InternalError
16145
+ */
16146
+ 500: InternalError;
16147
+ /**
16148
+ * BillingProviderError
16149
+ */
16150
+ 502: BillingProviderError;
16151
+ /**
16152
+ * GatewayTimeoutError
16153
+ */
16154
+ 504: GatewayTimeoutError;
16155
+ };
16156
+ export type IntegrationCatalogRecipeSetupActivateError = IntegrationCatalogRecipeSetupActivateErrors[keyof IntegrationCatalogRecipeSetupActivateErrors];
16157
+ export type IntegrationCatalogRecipeSetupActivateResponses = {
16158
+ /**
16159
+ * ActivatedRecipeSetup
16160
+ */
16161
+ 200: ActivatedRecipeSetup;
16162
+ };
16163
+ export type IntegrationCatalogRecipeSetupActivateResponse = IntegrationCatalogRecipeSetupActivateResponses[keyof IntegrationCatalogRecipeSetupActivateResponses];
16164
+ export type IntegrationCatalogRecipePreviewData = {
16165
+ body: {
16166
+ templateId: TemplateId;
16167
+ publicationId: TemplatePublicationId;
16168
+ fixture?: string | undefined;
16169
+ templateData?: JsonObjectWritable | undefined;
16170
+ channel: "email";
16171
+ } | {
16172
+ templateId: TemplateId;
16173
+ publicationId: TemplatePublicationId;
16174
+ fixture?: string | undefined;
16175
+ templateData?: JsonObjectWritable | undefined;
16176
+ channel: "whatsapp";
16177
+ eventBindings?: {
16178
+ [key: string]: string | undefined;
16179
+ } | undefined;
16180
+ };
16181
+ path?: never;
16182
+ query?: never;
16183
+ url: "/v1/integrations/catalog/recipes/post-delivery-check-in/preview";
16184
+ };
16185
+ export type IntegrationCatalogRecipePreviewErrors = {
16186
+ /**
16187
+ * MalformedRequestError
16188
+ */
16189
+ 400: MalformedRequestError;
16190
+ /**
16191
+ * UnauthorizedError
16192
+ */
16193
+ 401: UnauthorizedError;
16194
+ /**
16195
+ * ForbiddenError
16196
+ */
16197
+ 403: ForbiddenError;
16198
+ /**
16199
+ * ResourceNotFoundError
16200
+ */
16201
+ 404: ResourceNotFoundError;
16202
+ /**
16203
+ * ValidationError
16204
+ */
16205
+ 422: ValidationError;
16206
+ /**
16207
+ * InternalError
16208
+ */
16209
+ 500: InternalError;
16210
+ /**
16211
+ * GatewayTimeoutError
16212
+ */
16213
+ 504: GatewayTimeoutError;
16214
+ };
16215
+ export type IntegrationCatalogRecipePreviewError = IntegrationCatalogRecipePreviewErrors[keyof IntegrationCatalogRecipePreviewErrors];
16216
+ export type IntegrationCatalogRecipePreviewResponses = {
16217
+ /**
16218
+ * RecipePreviewResponse
16219
+ */
16220
+ 200: RecipePreviewResponse;
16221
+ };
16222
+ export type IntegrationCatalogRecipePreviewResponse = IntegrationCatalogRecipePreviewResponses[keyof IntegrationCatalogRecipePreviewResponses];
16223
+ export type IntegrationCatalogRecipeWhatsAppChallengeBeginData = {
16224
+ body?: never;
16225
+ path: {
16226
+ accountId: WhatsAppBusinessAccountId;
16227
+ };
16228
+ query?: never;
16229
+ url: "/v1/integrations/catalog/recipes/post-delivery-check-in/owner-test/whatsapp/{accountId}/challenges";
16230
+ };
16231
+ export type IntegrationCatalogRecipeWhatsAppChallengeBeginErrors = {
16232
+ /**
16233
+ * MalformedRequestError
16234
+ */
16235
+ 400: MalformedRequestError;
16236
+ /**
16237
+ * UnauthorizedError
16238
+ */
16239
+ 401: UnauthorizedError;
16240
+ /**
16241
+ * ForbiddenError | FlagDisabledError
16242
+ */
16243
+ 403: ForbiddenError | FlagDisabledError;
16244
+ /**
16245
+ * ResourceNotFoundError
16246
+ */
16247
+ 404: ResourceNotFoundError;
16248
+ /**
16249
+ * ConflictError
16250
+ */
16251
+ 409: ConflictError;
16252
+ /**
16253
+ * ValidationError
16254
+ */
16255
+ 422: ValidationError;
16256
+ /**
16257
+ * InternalError
16258
+ */
16259
+ 500: InternalError;
16260
+ /**
16261
+ * GatewayTimeoutError
16262
+ */
16263
+ 504: GatewayTimeoutError;
16264
+ };
16265
+ export type IntegrationCatalogRecipeWhatsAppChallengeBeginError = IntegrationCatalogRecipeWhatsAppChallengeBeginErrors[keyof IntegrationCatalogRecipeWhatsAppChallengeBeginErrors];
16266
+ export type IntegrationCatalogRecipeWhatsAppChallengeBeginResponses = {
16267
+ /**
16268
+ * RecipeChallengeStarted
16269
+ */
16270
+ 200: RecipeChallengeStarted;
16271
+ };
16272
+ export type IntegrationCatalogRecipeWhatsAppChallengeBeginResponse = IntegrationCatalogRecipeWhatsAppChallengeBeginResponses[keyof IntegrationCatalogRecipeWhatsAppChallengeBeginResponses];
16273
+ export type IntegrationCatalogRecipeWhatsAppChallengeGetData = {
16274
+ body?: never;
16275
+ path: {
16276
+ accountId: WhatsAppBusinessAccountId;
16277
+ id: string;
16278
+ };
16279
+ query?: never;
16280
+ url: "/v1/integrations/catalog/recipes/post-delivery-check-in/owner-test/whatsapp/{accountId}/challenges/{id}";
16281
+ };
16282
+ export type IntegrationCatalogRecipeWhatsAppChallengeGetErrors = {
16283
+ /**
16284
+ * MalformedRequestError
16285
+ */
16286
+ 400: MalformedRequestError;
16287
+ /**
16288
+ * UnauthorizedError
16289
+ */
16290
+ 401: UnauthorizedError;
16291
+ /**
16292
+ * ForbiddenError | FlagDisabledError
16293
+ */
16294
+ 403: ForbiddenError | FlagDisabledError;
16295
+ /**
16296
+ * ResourceNotFoundError
16297
+ */
16298
+ 404: ResourceNotFoundError;
16299
+ /**
16300
+ * ConflictError
16301
+ */
16302
+ 409: ConflictError;
16303
+ /**
16304
+ * ValidationError
16305
+ */
16306
+ 422: ValidationError;
16307
+ /**
16308
+ * InternalError
16309
+ */
16310
+ 500: InternalError;
16311
+ /**
16312
+ * GatewayTimeoutError
16313
+ */
16314
+ 504: GatewayTimeoutError;
16315
+ };
16316
+ export type IntegrationCatalogRecipeWhatsAppChallengeGetError = IntegrationCatalogRecipeWhatsAppChallengeGetErrors[keyof IntegrationCatalogRecipeWhatsAppChallengeGetErrors];
16317
+ export type IntegrationCatalogRecipeWhatsAppChallengeGetResponses = {
16318
+ /**
16319
+ * RecipeChallengeStatus
16320
+ */
16321
+ 200: RecipeChallengeStatus;
16322
+ };
16323
+ export type IntegrationCatalogRecipeWhatsAppChallengeGetResponse = IntegrationCatalogRecipeWhatsAppChallengeGetResponses[keyof IntegrationCatalogRecipeWhatsAppChallengeGetResponses];
16324
+ export type IntegrationCatalogRecipeWhatsAppChallengeConfirmData = {
16325
+ body: {
16326
+ observedPhone: string;
16327
+ };
16328
+ path: {
16329
+ accountId: WhatsAppBusinessAccountId;
16330
+ id: string;
16331
+ };
16332
+ query?: never;
16333
+ url: "/v1/integrations/catalog/recipes/post-delivery-check-in/owner-test/whatsapp/{accountId}/challenges/{id}/confirm";
16334
+ };
16335
+ export type IntegrationCatalogRecipeWhatsAppChallengeConfirmErrors = {
16336
+ /**
16337
+ * MalformedRequestError
16338
+ */
16339
+ 400: MalformedRequestError;
16340
+ /**
16341
+ * UnauthorizedError
16342
+ */
16343
+ 401: UnauthorizedError;
16344
+ /**
16345
+ * ForbiddenError | FlagDisabledError
16346
+ */
16347
+ 403: ForbiddenError | FlagDisabledError;
16348
+ /**
16349
+ * ResourceNotFoundError
16350
+ */
16351
+ 404: ResourceNotFoundError;
16352
+ /**
16353
+ * ConflictError
16354
+ */
16355
+ 409: ConflictError;
16356
+ /**
16357
+ * ValidationError
16358
+ */
16359
+ 422: ValidationError;
16360
+ /**
16361
+ * InternalError
16362
+ */
16363
+ 500: InternalError;
16364
+ /**
16365
+ * GatewayTimeoutError
16366
+ */
16367
+ 504: GatewayTimeoutError;
16368
+ };
16369
+ export type IntegrationCatalogRecipeWhatsAppChallengeConfirmError = IntegrationCatalogRecipeWhatsAppChallengeConfirmErrors[keyof IntegrationCatalogRecipeWhatsAppChallengeConfirmErrors];
16370
+ export type IntegrationCatalogRecipeWhatsAppChallengeConfirmResponses = {
16371
+ /**
16372
+ * RecipeChallengeStatus
16373
+ */
16374
+ 200: RecipeChallengeStatus;
16375
+ };
16376
+ export type IntegrationCatalogRecipeWhatsAppChallengeConfirmResponse = IntegrationCatalogRecipeWhatsAppChallengeConfirmResponses[keyof IntegrationCatalogRecipeWhatsAppChallengeConfirmResponses];
16377
+ export type IntegrationCatalogRecipeTestData = {
16378
+ body: {
16379
+ templateId: TemplateId;
16380
+ publicationId: TemplatePublicationId;
16381
+ fixture?: string | undefined;
16382
+ templateData?: JsonObjectWritable | undefined;
16383
+ channel: "email";
16384
+ requestId: string;
16385
+ mailboxEndpointId: MailboxEndpointId;
16386
+ topicId?: TopicId | undefined;
16387
+ senderId?: EmailSenderId | undefined;
16388
+ } | {
16389
+ templateId: TemplateId;
16390
+ publicationId: TemplatePublicationId;
16391
+ fixture?: string | undefined;
16392
+ templateData?: JsonObjectWritable | undefined;
16393
+ channel: "whatsapp";
16394
+ eventBindings?: {
16395
+ [key: string]: string | undefined;
16396
+ } | undefined;
16397
+ requestId: string;
16398
+ mailboxEndpointId: MailboxEndpointId;
16399
+ topicId?: TopicId | undefined;
16400
+ businessAccountId: WhatsAppBusinessAccountId;
16401
+ registrationId: TemplateRegistrationId;
16402
+ challengeId: string;
16403
+ };
16404
+ path?: never;
16405
+ query?: never;
16406
+ url: "/v1/integrations/catalog/recipes/post-delivery-check-in/owner-test";
16407
+ };
16408
+ export type IntegrationCatalogRecipeTestErrors = {
16409
+ /**
16410
+ * MalformedRequestError
16411
+ */
16412
+ 400: MalformedRequestError;
16413
+ /**
16414
+ * UnauthorizedError
16415
+ */
16416
+ 401: UnauthorizedError;
16417
+ /**
16418
+ * PaymentRequiredError
16419
+ */
16420
+ 402: PaymentRequiredError;
16421
+ /**
16422
+ * ForbiddenError | FlagDisabledError | OnboardingReviewRequiredError
16423
+ */
16424
+ 403: ForbiddenError | FlagDisabledError | OnboardingReviewRequiredError;
16425
+ /**
16426
+ * ResourceNotFoundError
16427
+ */
16428
+ 404: ResourceNotFoundError;
16429
+ /**
16430
+ * ConflictError
16431
+ */
16432
+ 409: ConflictError;
16433
+ /**
16434
+ * ValidationError | FromAddressRequiredError | BrandAddressRequiredError | CampaignFooterRequiredError
16435
+ */
16436
+ 422: ValidationError | FromAddressRequiredError | BrandAddressRequiredError | CampaignFooterRequiredError;
16437
+ /**
16438
+ * RateLimitedError
16439
+ */
16440
+ 429: RateLimitedError;
16441
+ /**
16442
+ * InternalError
16443
+ */
16444
+ 500: InternalError;
16445
+ /**
16446
+ * BillingProviderError | ExternalServiceError
16447
+ */
16448
+ 502: BillingProviderError | ExternalServiceError;
16449
+ /**
16450
+ * SenderNotReadyError | DeliveryUnavailableError
16451
+ */
16452
+ 503: SenderNotReadyError | DeliveryUnavailableError;
15363
16453
  /**
15364
16454
  * GatewayTimeoutError
15365
16455
  */
15366
16456
  504: GatewayTimeoutError;
15367
16457
  };
15368
- export type AccountsRemoveError = AccountsRemoveErrors[keyof AccountsRemoveErrors];
15369
- export type AccountsRemoveResponses = {
16458
+ export type IntegrationCatalogRecipeTestError = IntegrationCatalogRecipeTestErrors[keyof IntegrationCatalogRecipeTestErrors];
16459
+ export type IntegrationCatalogRecipeTestResponses = {
15370
16460
  /**
15371
- * DeleteAccountResponse
16461
+ * RecipeTestResponse
15372
16462
  */
15373
- 200: DeleteAccountResponse;
16463
+ 200: RecipeTestResponse;
15374
16464
  };
15375
- export type AccountsRemoveResponse = AccountsRemoveResponses[keyof AccountsRemoveResponses];
15376
- export type AccountsGetData = {
16465
+ export type IntegrationCatalogRecipeTestResponse = IntegrationCatalogRecipeTestResponses[keyof IntegrationCatalogRecipeTestResponses];
16466
+ export type IntegrationCatalogRecipeTestReceiptData = {
15377
16467
  body?: never;
15378
16468
  path: {
15379
- accountId: IntegrationAccountId;
16469
+ requestId: string;
15380
16470
  };
15381
16471
  query?: never;
15382
- url: "/v1/accounts/{accountId}";
16472
+ url: "/v1/integrations/catalog/recipes/post-delivery-check-in/owner-test/{requestId}";
15383
16473
  };
15384
- export type AccountsGetErrors = {
16474
+ export type IntegrationCatalogRecipeTestReceiptErrors = {
15385
16475
  /**
15386
16476
  * MalformedRequestError
15387
16477
  */
@@ -15411,23 +16501,21 @@ export type AccountsGetErrors = {
15411
16501
  */
15412
16502
  504: GatewayTimeoutError;
15413
16503
  };
15414
- export type AccountsGetError = AccountsGetErrors[keyof AccountsGetErrors];
15415
- export type AccountsGetResponses = {
16504
+ export type IntegrationCatalogRecipeTestReceiptError = IntegrationCatalogRecipeTestReceiptErrors[keyof IntegrationCatalogRecipeTestReceiptErrors];
16505
+ export type IntegrationCatalogRecipeTestReceiptResponses = {
15416
16506
  /**
15417
- * IntegrationAccount
16507
+ * Success
15418
16508
  */
15419
- 200: IntegrationAccount;
16509
+ 200: RecipeTestReceipt | null;
15420
16510
  };
15421
- export type AccountsGetResponse = AccountsGetResponses[keyof AccountsGetResponses];
15422
- export type AccountsCheckData = {
16511
+ export type IntegrationCatalogRecipeTestReceiptResponse = IntegrationCatalogRecipeTestReceiptResponses[keyof IntegrationCatalogRecipeTestReceiptResponses];
16512
+ export type IntegrationCatalogRecipeCatalogData = {
15423
16513
  body?: never;
15424
- path: {
15425
- accountId: IntegrationAccountId;
15426
- };
16514
+ path?: never;
15427
16515
  query?: never;
15428
- url: "/v1/accounts/{accountId}/check";
16516
+ url: "/v1/integrations/catalog/recipes";
15429
16517
  };
15430
- export type AccountsCheckErrors = {
16518
+ export type IntegrationCatalogRecipeCatalogErrors = {
15431
16519
  /**
15432
16520
  * MalformedRequestError
15433
16521
  */
@@ -15440,10 +16528,6 @@ export type AccountsCheckErrors = {
15440
16528
  * ForbiddenError
15441
16529
  */
15442
16530
  403: ForbiddenError;
15443
- /**
15444
- * ResourceNotFoundError
15445
- */
15446
- 404: ResourceNotFoundError;
15447
16531
  /**
15448
16532
  * ValidationError
15449
16533
  */
@@ -15457,31 +16541,29 @@ export type AccountsCheckErrors = {
15457
16541
  */
15458
16542
  504: GatewayTimeoutError;
15459
16543
  };
15460
- export type AccountsCheckError = AccountsCheckErrors[keyof AccountsCheckErrors];
15461
- export type AccountsCheckResponses = {
16544
+ export type IntegrationCatalogRecipeCatalogError = IntegrationCatalogRecipeCatalogErrors[keyof IntegrationCatalogRecipeCatalogErrors];
16545
+ export type IntegrationCatalogRecipeCatalogResponses = {
15462
16546
  /**
15463
- * IntegrationAccountHealth
16547
+ * RecipeCatalogResponse
15464
16548
  */
15465
- 200: IntegrationAccountHealth;
16549
+ 200: RecipeCatalogResponse;
15466
16550
  };
15467
- export type AccountsCheckResponse = AccountsCheckResponses[keyof AccountsCheckResponses];
15468
- export type AccountsConnectData = {
15469
- body: {
15470
- provider: IntegrationKey;
15471
- input?: JsonObjectWritable | undefined;
15472
- credentials?: {
15473
- [key: string]: string | undefined;
15474
- } | undefined;
15475
- app?: IntegrationKey | undefined;
15476
- accountId?: IntegrationAccountId | undefined;
15477
- expectedHosts?: Array<string> | undefined;
15478
- returnTo: IntegrationReturnTo;
15479
- };
16551
+ export type IntegrationCatalogRecipeCatalogResponse = IntegrationCatalogRecipeCatalogResponses[keyof IntegrationCatalogRecipeCatalogResponses];
16552
+ export type IntegrationCatalogRecipeReadinessData = {
16553
+ body?: never;
15480
16554
  path?: never;
15481
- query?: never;
15482
- url: "/v1/accounts/connect";
16555
+ query: {
16556
+ channel: "email" | "whatsapp";
16557
+ integrationAccountId?: IntegrationAccountId | undefined;
16558
+ publicationId?: TemplatePublicationId | undefined;
16559
+ senderId?: EmailSenderId | undefined;
16560
+ whatsappAccountId?: WhatsAppBusinessAccountId | undefined;
16561
+ registrationId?: TemplateRegistrationId | undefined;
16562
+ mailboxEndpointId?: MailboxEndpointId | undefined;
16563
+ };
16564
+ url: "/v1/integrations/catalog/recipes/post-delivery-check-in/readiness";
15483
16565
  };
15484
- export type AccountsConnectErrors = {
16566
+ export type IntegrationCatalogRecipeReadinessErrors = {
15485
16567
  /**
15486
16568
  * MalformedRequestError
15487
16569
  */
@@ -15494,10 +16576,6 @@ export type AccountsConnectErrors = {
15494
16576
  * ForbiddenError
15495
16577
  */
15496
16578
  403: ForbiddenError;
15497
- /**
15498
- * ResourceNotFoundError
15499
- */
15500
- 404: ResourceNotFoundError;
15501
16579
  /**
15502
16580
  * ValidationError
15503
16581
  */
@@ -15506,19 +16584,23 @@ export type AccountsConnectErrors = {
15506
16584
  * InternalError
15507
16585
  */
15508
16586
  500: InternalError;
16587
+ /**
16588
+ * BillingProviderError
16589
+ */
16590
+ 502: BillingProviderError;
15509
16591
  /**
15510
16592
  * GatewayTimeoutError
15511
16593
  */
15512
16594
  504: GatewayTimeoutError;
15513
16595
  };
15514
- export type AccountsConnectError = AccountsConnectErrors[keyof AccountsConnectErrors];
15515
- export type AccountsConnectResponses = {
16596
+ export type IntegrationCatalogRecipeReadinessError = IntegrationCatalogRecipeReadinessErrors[keyof IntegrationCatalogRecipeReadinessErrors];
16597
+ export type IntegrationCatalogRecipeReadinessResponses = {
15516
16598
  /**
15517
- * ConnectAccountResponse
16599
+ * RecipeReadinessResponse
15518
16600
  */
15519
- 201: ConnectAccountResponse;
16601
+ 200: RecipeReadinessResponse;
15520
16602
  };
15521
- export type AccountsConnectResponse = AccountsConnectResponses[keyof AccountsConnectResponses];
16603
+ export type IntegrationCatalogRecipeReadinessResponse = IntegrationCatalogRecipeReadinessResponses[keyof IntegrationCatalogRecipeReadinessResponses];
15522
16604
  export type IntegrationCatalogPrepareData = {
15523
16605
  body: {
15524
16606
  provider: IntegrationKey;
@@ -19958,6 +21040,10 @@ export type TemplatesListFamiliesData = {
19958
21040
  query?: {
19959
21041
  limit?: number | null | undefined;
19960
21042
  cursor?: string | undefined;
21043
+ /**
21044
+ * Only this namespace's families. A namespace-scoped key always lists its own namespace's.
21045
+ */
21046
+ namespaceId?: NamespaceId | undefined;
19961
21047
  };
19962
21048
  url: "/v1/templates/families";
19963
21049
  };
@@ -19998,6 +21084,10 @@ export type TemplatesListFamiliesResponse = TemplatesListFamiliesResponses[keyof
19998
21084
  export type TemplatesCreateFamilyData = {
19999
21085
  body: {
20000
21086
  name: string;
21087
+ /**
21088
+ * The namespace the family belongs to; every member it gains must be in it. Omit for organization level. A namespace-scoped key always creates in its own namespace.
21089
+ */
21090
+ namespaceId?: NamespaceId | null | undefined;
20001
21091
  };
20002
21092
  path?: never;
20003
21093
  query?: never;
@@ -20016,6 +21106,10 @@ export type TemplatesCreateFamilyErrors = {
20016
21106
  * ForbiddenError
20017
21107
  */
20018
21108
  403: ForbiddenError;
21109
+ /**
21110
+ * ResourceNotFoundError
21111
+ */
21112
+ 404: ResourceNotFoundError;
20019
21113
  /**
20020
21114
  * ValidationError
20021
21115
  */
@@ -20498,9 +21592,13 @@ export type TemplatesUpdateResponse = TemplatesUpdateResponses[keyof TemplatesUp
20498
21592
  export type TemplatesSuggestStartersData = {
20499
21593
  body: {
20500
21594
  /**
20501
- * What the email is for, as a person would ask for it: who sends it, to whom, and why. Naming a company's email ("like the Vercel login email") starts from Samva's recreation of it when the gallery has one.
21595
+ * What the message is for, as a person would ask for it: who sends it, to whom, and why. Naming a company's email ("like the Vercel login email") starts from Samva's recreation of it when the gallery has one.
20502
21596
  */
20503
21597
  brief: string;
21598
+ /**
21599
+ * The channel to start a template for. Defaults to email. WhatsApp starts from Samva's WhatsApp starters and is available where WhatsApp is enabled for the organization.
21600
+ */
21601
+ channel?: "email" | "whatsapp" | null | undefined;
20504
21602
  };
20505
21603
  path?: never;
20506
21604
  query?: never;
@@ -20543,16 +21641,24 @@ export type TemplatesSuggestStartersResponse = TemplatesSuggestStartersResponses
20543
21641
  export type TemplatesCreateFromBriefData = {
20544
21642
  body: {
20545
21643
  /**
20546
- * What the email is for, as a person would ask for it: who sends it, to whom, and why. Naming a company's email ("like the Vercel login email") starts from Samva's recreation of it when the gallery has one.
21644
+ * What the message is for, as a person would ask for it: who sends it, to whom, and why. Naming a company's email ("like the Vercel login email") starts from Samva's recreation of it when the gallery has one.
20547
21645
  */
20548
21646
  brief: string;
21647
+ /**
21648
+ * The channel to start a template for. Defaults to email. WhatsApp starts from Samva's WhatsApp starters and is available where WhatsApp is enabled for the organization.
21649
+ */
21650
+ channel?: "email" | "whatsapp" | null | undefined;
20549
21651
  name?: string | null | undefined;
20550
21652
  galleryTemplateId?: string | null | undefined;
20551
21653
  useBrand?: boolean | null | undefined;
20552
21654
  /**
20553
- * The namespace the new template project belongs to. Omit for organization level. A namespace-scoped key always creates in its own namespace.
21655
+ * The namespace the new template project belongs to. Omit for organization level. A namespace-scoped key always creates in its own namespace. With `variantOf`, omit it or name the source's namespace.
20554
21656
  */
20555
21657
  namespaceId?: NamespaceId | null | undefined;
21658
+ /**
21659
+ * Make this template another channel's version of an existing template the caller can change: it is created in that template's namespace, holds that template's current draft as a read-only resource the template assistant reads facts from, and joins that template's family (one is made when it has none). The returned `ask` says where the snapshot is mounted; its `variant-source.json` names the source, its entry and the revision taken. A retry with the same idempotency key finishes the same version; the key refuses a different source, or a request without `variantOf`. Refused when `channel` is the source's own or its family already has a template on `channel`. The source's files are mounted whole: a project with more than 31 files, a file over 4 MB, or more than 8 MB in all is refused before anything is created.
21660
+ */
21661
+ variantOf?: TemplateId | null | undefined;
20556
21662
  };
20557
21663
  headers: {
20558
21664
  "idempotency-key": string;
@@ -23740,7 +24846,7 @@ export type WebhooksCreateData = {
23740
24846
  body: {
23741
24847
  name: string;
23742
24848
  url: string;
23743
- 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" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
24849
+ 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" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.spam" | "mailbox.message.discarded" | "mailbox.thread.deleted" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
23744
24850
  channels?: Array<"sms" | "whatsapp" | "email"> | null | undefined;
23745
24851
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | undefined;
23746
24852
  namespaceId?: NamespaceId | null | undefined;
@@ -23906,7 +25012,7 @@ export type WebhooksUpdateData = {
23906
25012
  body: {
23907
25013
  name?: string | null | undefined;
23908
25014
  url?: string | null | undefined;
23909
- 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" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook"> | null | undefined;
25015
+ 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" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.spam" | "mailbox.message.discarded" | "mailbox.thread.deleted" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook"> | null | undefined;
23910
25016
  channels?: Array<"sms" | "whatsapp" | "email"> | null | undefined;
23911
25017
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | undefined;
23912
25018
  namespaceId?: NamespaceId | null | undefined;
@@ -26858,6 +27964,57 @@ export type MailboxesListThreadsResponses = {
26858
27964
  200: MailboxThreadPage;
26859
27965
  };
26860
27966
  export type MailboxesListThreadsResponse = MailboxesListThreadsResponses[keyof MailboxesListThreadsResponses];
27967
+ export type MailboxesDeleteThreadData = {
27968
+ body?: never;
27969
+ path: {
27970
+ id: MailboxId;
27971
+ threadId: MailboxThreadId;
27972
+ };
27973
+ query?: never;
27974
+ url: "/v1/mailboxes/{id}/threads/{threadId}";
27975
+ };
27976
+ export type MailboxesDeleteThreadErrors = {
27977
+ /**
27978
+ * MalformedRequestError
27979
+ */
27980
+ 400: MalformedRequestError;
27981
+ /**
27982
+ * UnauthorizedError
27983
+ */
27984
+ 401: UnauthorizedError;
27985
+ /**
27986
+ * ForbiddenError
27987
+ */
27988
+ 403: ForbiddenError;
27989
+ /**
27990
+ * ResourceNotFoundError
27991
+ */
27992
+ 404: ResourceNotFoundError;
27993
+ /**
27994
+ * ConflictError
27995
+ */
27996
+ 409: ConflictError;
27997
+ /**
27998
+ * ValidationError
27999
+ */
28000
+ 422: ValidationError;
28001
+ /**
28002
+ * InternalError
28003
+ */
28004
+ 500: InternalError;
28005
+ /**
28006
+ * GatewayTimeoutError
28007
+ */
28008
+ 504: GatewayTimeoutError;
28009
+ };
28010
+ export type MailboxesDeleteThreadError = MailboxesDeleteThreadErrors[keyof MailboxesDeleteThreadErrors];
28011
+ export type MailboxesDeleteThreadResponses = {
28012
+ /**
28013
+ * SuccessResponse
28014
+ */
28015
+ 200: SuccessResponse;
28016
+ };
28017
+ export type MailboxesDeleteThreadResponse = MailboxesDeleteThreadResponses[keyof MailboxesDeleteThreadResponses];
26861
28018
  export type MailboxesGetThreadData = {
26862
28019
  body?: never;
26863
28020
  path: {
@@ -26962,6 +28119,98 @@ export type MailboxesUpdateThreadResponses = {
26962
28119
  200: MailboxThreadState;
26963
28120
  };
26964
28121
  export type MailboxesUpdateThreadResponse = MailboxesUpdateThreadResponses[keyof MailboxesUpdateThreadResponses];
28122
+ export type MailboxesEmptyTrashData = {
28123
+ body?: never;
28124
+ path: {
28125
+ id: MailboxId;
28126
+ };
28127
+ query?: never;
28128
+ url: "/v1/mailboxes/{id}/trash/empty";
28129
+ };
28130
+ export type MailboxesEmptyTrashErrors = {
28131
+ /**
28132
+ * MalformedRequestError
28133
+ */
28134
+ 400: MalformedRequestError;
28135
+ /**
28136
+ * UnauthorizedError
28137
+ */
28138
+ 401: UnauthorizedError;
28139
+ /**
28140
+ * ForbiddenError
28141
+ */
28142
+ 403: ForbiddenError;
28143
+ /**
28144
+ * ResourceNotFoundError
28145
+ */
28146
+ 404: ResourceNotFoundError;
28147
+ /**
28148
+ * ValidationError
28149
+ */
28150
+ 422: ValidationError;
28151
+ /**
28152
+ * InternalError
28153
+ */
28154
+ 500: InternalError;
28155
+ /**
28156
+ * GatewayTimeoutError
28157
+ */
28158
+ 504: GatewayTimeoutError;
28159
+ };
28160
+ export type MailboxesEmptyTrashError = MailboxesEmptyTrashErrors[keyof MailboxesEmptyTrashErrors];
28161
+ export type MailboxesEmptyTrashResponses = {
28162
+ /**
28163
+ * MailboxEmptyTrashAccepted
28164
+ */
28165
+ 202: MailboxEmptyTrashAccepted;
28166
+ };
28167
+ export type MailboxesEmptyTrashResponse = MailboxesEmptyTrashResponses[keyof MailboxesEmptyTrashResponses];
28168
+ export type MailboxesEmptySpamData = {
28169
+ body?: never;
28170
+ path: {
28171
+ id: MailboxId;
28172
+ };
28173
+ query?: never;
28174
+ url: "/v1/mailboxes/{id}/spam/empty";
28175
+ };
28176
+ export type MailboxesEmptySpamErrors = {
28177
+ /**
28178
+ * MalformedRequestError
28179
+ */
28180
+ 400: MalformedRequestError;
28181
+ /**
28182
+ * UnauthorizedError
28183
+ */
28184
+ 401: UnauthorizedError;
28185
+ /**
28186
+ * ForbiddenError
28187
+ */
28188
+ 403: ForbiddenError;
28189
+ /**
28190
+ * ResourceNotFoundError
28191
+ */
28192
+ 404: ResourceNotFoundError;
28193
+ /**
28194
+ * ValidationError
28195
+ */
28196
+ 422: ValidationError;
28197
+ /**
28198
+ * InternalError
28199
+ */
28200
+ 500: InternalError;
28201
+ /**
28202
+ * GatewayTimeoutError
28203
+ */
28204
+ 504: GatewayTimeoutError;
28205
+ };
28206
+ export type MailboxesEmptySpamError = MailboxesEmptySpamErrors[keyof MailboxesEmptySpamErrors];
28207
+ export type MailboxesEmptySpamResponses = {
28208
+ /**
28209
+ * MailboxEmptySpamAccepted
28210
+ */
28211
+ 202: MailboxEmptySpamAccepted;
28212
+ };
28213
+ export type MailboxesEmptySpamResponse = MailboxesEmptySpamResponses[keyof MailboxesEmptySpamResponses];
26965
28214
  export type MailboxesRemoveThreadLabelsData = {
26966
28215
  body: {
26967
28216
  labels: [MailboxLabelId, ...Array<MailboxLabelId>];
@@ -27869,7 +29118,7 @@ export type MailboxesForwardResponses = {
27869
29118
  202: MailboxPendingSendReceipt;
27870
29119
  };
27871
29120
  export type MailboxesForwardResponse = MailboxesForwardResponses[keyof MailboxesForwardResponses];
27872
- export type MailboxesListQuarantineData = {
29121
+ export type MailboxesListSpamHeldData = {
27873
29122
  body?: never;
27874
29123
  path: {
27875
29124
  id: MailboxId;
@@ -27880,56 +29129,9 @@ export type MailboxesListQuarantineData = {
27880
29129
  after?: string | undefined;
27881
29130
  before?: string | undefined;
27882
29131
  };
27883
- url: "/v1/mailboxes/{id}/quarantine";
27884
- };
27885
- export type MailboxesListQuarantineErrors = {
27886
- /**
27887
- * MalformedRequestError
27888
- */
27889
- 400: MalformedRequestError;
27890
- /**
27891
- * UnauthorizedError
27892
- */
27893
- 401: UnauthorizedError;
27894
- /**
27895
- * ForbiddenError
27896
- */
27897
- 403: ForbiddenError;
27898
- /**
27899
- * ResourceNotFoundError
27900
- */
27901
- 404: ResourceNotFoundError;
27902
- /**
27903
- * ValidationError
27904
- */
27905
- 422: ValidationError;
27906
- /**
27907
- * InternalError
27908
- */
27909
- 500: InternalError;
27910
- /**
27911
- * GatewayTimeoutError
27912
- */
27913
- 504: GatewayTimeoutError;
27914
- };
27915
- export type MailboxesListQuarantineError = MailboxesListQuarantineErrors[keyof MailboxesListQuarantineErrors];
27916
- export type MailboxesListQuarantineResponses = {
27917
- /**
27918
- * MailboxQuarantinePage
27919
- */
27920
- 200: MailboxQuarantinePage;
27921
- };
27922
- export type MailboxesListQuarantineResponse = MailboxesListQuarantineResponses[keyof MailboxesListQuarantineResponses];
27923
- export type MailboxesReleaseMessageData = {
27924
- body?: never;
27925
- path: {
27926
- id: MailboxId;
27927
- messageId: MessageId;
27928
- };
27929
- query?: never;
27930
- url: "/v1/mailboxes/{id}/messages/{messageId}/release";
29132
+ url: "/v1/mailboxes/{id}/spam/held";
27931
29133
  };
27932
- export type MailboxesReleaseMessageErrors = {
29134
+ export type MailboxesListSpamHeldErrors = {
27933
29135
  /**
27934
29136
  * MalformedRequestError
27935
29137
  */
@@ -27946,10 +29148,6 @@ export type MailboxesReleaseMessageErrors = {
27946
29148
  * ResourceNotFoundError
27947
29149
  */
27948
29150
  404: ResourceNotFoundError;
27949
- /**
27950
- * ConflictError
27951
- */
27952
- 409: ConflictError;
27953
29151
  /**
27954
29152
  * ValidationError
27955
29153
  */
@@ -27963,24 +29161,24 @@ export type MailboxesReleaseMessageErrors = {
27963
29161
  */
27964
29162
  504: GatewayTimeoutError;
27965
29163
  };
27966
- export type MailboxesReleaseMessageError = MailboxesReleaseMessageErrors[keyof MailboxesReleaseMessageErrors];
27967
- export type MailboxesReleaseMessageResponses = {
29164
+ export type MailboxesListSpamHeldError = MailboxesListSpamHeldErrors[keyof MailboxesListSpamHeldErrors];
29165
+ export type MailboxesListSpamHeldResponses = {
27968
29166
  /**
27969
- * MailboxQuarantinedMessage
29167
+ * MailboxSpamHeldPage
27970
29168
  */
27971
- 200: MailboxQuarantinedMessage;
29169
+ 200: MailboxSpamHeldPage;
27972
29170
  };
27973
- export type MailboxesReleaseMessageResponse = MailboxesReleaseMessageResponses[keyof MailboxesReleaseMessageResponses];
27974
- export type MailboxesDiscardMessageData = {
29171
+ export type MailboxesListSpamHeldResponse = MailboxesListSpamHeldResponses[keyof MailboxesListSpamHeldResponses];
29172
+ export type MailboxesDiscardSpamHeldData = {
27975
29173
  body?: never;
27976
29174
  path: {
27977
29175
  id: MailboxId;
27978
29176
  messageId: MessageId;
27979
29177
  };
27980
29178
  query?: never;
27981
- url: "/v1/mailboxes/{id}/messages/{messageId}/discard";
29179
+ url: "/v1/mailboxes/{id}/spam/held/{messageId}/discard";
27982
29180
  };
27983
- export type MailboxesDiscardMessageErrors = {
29181
+ export type MailboxesDiscardSpamHeldErrors = {
27984
29182
  /**
27985
29183
  * MalformedRequestError
27986
29184
  */
@@ -27997,10 +29195,6 @@ export type MailboxesDiscardMessageErrors = {
27997
29195
  * ResourceNotFoundError
27998
29196
  */
27999
29197
  404: ResourceNotFoundError;
28000
- /**
28001
- * ConflictError
28002
- */
28003
- 409: ConflictError;
28004
29198
  /**
28005
29199
  * ValidationError
28006
29200
  */
@@ -28018,14 +29212,14 @@ export type MailboxesDiscardMessageErrors = {
28018
29212
  */
28019
29213
  504: GatewayTimeoutError;
28020
29214
  };
28021
- export type MailboxesDiscardMessageError = MailboxesDiscardMessageErrors[keyof MailboxesDiscardMessageErrors];
28022
- export type MailboxesDiscardMessageResponses = {
29215
+ export type MailboxesDiscardSpamHeldError = MailboxesDiscardSpamHeldErrors[keyof MailboxesDiscardSpamHeldErrors];
29216
+ export type MailboxesDiscardSpamHeldResponses = {
28023
29217
  /**
28024
- * MailboxQuarantinedMessage
29218
+ * MailboxSpamHeldMessage
28025
29219
  */
28026
- 200: MailboxQuarantinedMessage;
29220
+ 200: MailboxSpamHeldMessage;
28027
29221
  };
28028
- export type MailboxesDiscardMessageResponse = MailboxesDiscardMessageResponses[keyof MailboxesDiscardMessageResponses];
29222
+ export type MailboxesDiscardSpamHeldResponse = MailboxesDiscardSpamHeldResponses[keyof MailboxesDiscardSpamHeldResponses];
28029
29223
  export type MailboxesScheduleDraftData = {
28030
29224
  body: {
28031
29225
  idempotencyKey: string;
@@ -31598,7 +32792,8 @@ export type TemplateRegistrationsListResponse = TemplateRegistrationsListRespons
31598
32792
  export type TemplateRegistrationsSubmitData = {
31599
32793
  body: {
31600
32794
  provider: "whatsapp";
31601
- businessAccountId?: WhatsAppBusinessAccountId | undefined;
32795
+ businessAccountId?: WhatsAppBusinessAccountId1 | undefined;
32796
+ approval?: TemplateRegistrationApproval | undefined;
31602
32797
  };
31603
32798
  path: {
31604
32799
  id: TemplateId;
@@ -31639,6 +32834,10 @@ export type TemplateRegistrationsSubmitErrors = {
31639
32834
  * WhatsAppChannelError
31640
32835
  */
31641
32836
  502: WhatsAppChannelError;
32837
+ /**
32838
+ * ServiceUnavailableError
32839
+ */
32840
+ 503: ServiceUnavailableError;
31642
32841
  /**
31643
32842
  * GatewayTimeoutError
31644
32843
  */
@@ -31647,7 +32846,7 @@ export type TemplateRegistrationsSubmitErrors = {
31647
32846
  export type TemplateRegistrationsSubmitError = TemplateRegistrationsSubmitErrors[keyof TemplateRegistrationsSubmitErrors];
31648
32847
  export type TemplateRegistrationsSubmitResponses = {
31649
32848
  /**
31650
- * TemplateRegistration
32849
+ * `templateChannelVariantId` identifies the exact content last submitted. A journey step or scheduled send pins it with `id` in `pinnedRegistration` and sends only while this registration holds that content approved.
31651
32850
  */
31652
32851
  201: TemplateRegistration;
31653
32852
  };
@@ -31694,7 +32893,7 @@ export type TemplateRegistrationsGetErrors = {
31694
32893
  export type TemplateRegistrationsGetError = TemplateRegistrationsGetErrors[keyof TemplateRegistrationsGetErrors];
31695
32894
  export type TemplateRegistrationsGetResponses = {
31696
32895
  /**
31697
- * TemplateRegistration
32896
+ * `templateChannelVariantId` identifies the exact content last submitted. A journey step or scheduled send pins it with `id` in `pinnedRegistration` and sends only while this registration holds that content approved.
31698
32897
  */
31699
32898
  200: TemplateRegistration;
31700
32899
  };