samva 0.43.3 → 0.45.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 (103) hide show
  1. package/AGENTS.md +3 -0
  2. package/README.md +4 -0
  3. package/dist/client/sdk.gen.d.ts +308 -2
  4. package/dist/client/sdk.gen.js +937 -2
  5. package/dist/client/types.gen.d.ts +2294 -54
  6. package/dist/effect/agents.d.ts +86 -86
  7. package/dist/effect/agents.js +2 -2
  8. package/dist/effect/api-keys.d.ts +36 -36
  9. package/dist/effect/api-keys.js +2 -2
  10. package/dist/effect/attachments.d.ts +3 -3
  11. package/dist/effect/attachments.js +1 -1
  12. package/dist/effect/campaigns.d.ts +250 -250
  13. package/dist/effect/campaigns.js +3 -3
  14. package/dist/effect/categories.d.ts +23 -5
  15. package/dist/effect/categories.js +11 -20
  16. package/dist/effect/contact-groups.d.ts +44 -44
  17. package/dist/effect/contact-groups.js +3 -3
  18. package/dist/effect/contacts.d.ts +3 -3
  19. package/dist/effect/contacts.js +1 -1
  20. package/dist/effect/conversations.d.ts +53 -53
  21. package/dist/effect/conversations.js +1 -1
  22. package/dist/effect/email.d.ts +99 -97
  23. package/dist/effect/email.js +21 -21
  24. package/dist/effect/errors.d.ts +1 -1
  25. package/dist/effect/errors.js +2 -2
  26. package/dist/effect/extension-installations.d.ts +6 -6
  27. package/dist/effect/extension-installations.js +1 -1
  28. package/dist/effect/generated/campaigns.js +2 -2
  29. package/dist/effect/generated/email.d.ts +7 -0
  30. package/dist/effect/generated/email.js +8 -9
  31. package/dist/effect/generated/index.d.ts +9 -1
  32. package/dist/effect/generated/journeys.d.ts +1 -3
  33. package/dist/effect/generated/journeys.js +2 -6
  34. package/dist/effect/generated/mailboxes.d.ts +14 -14
  35. package/dist/effect/generated/mailboxes.js +2 -0
  36. package/dist/effect/generated/messages.d.ts +1 -5
  37. package/dist/effect/generated/messages.js +2 -10
  38. package/dist/effect/generated/newsletter-issues.js +29 -29
  39. package/dist/effect/generated/organizations.js +2 -2
  40. package/dist/effect/generated/scheduled-messages.js +3 -3
  41. package/dist/effect/generated/shared.d.ts +112 -2
  42. package/dist/effect/generated/shared.js +66 -25
  43. package/dist/effect/generated/subscriptions.js +4 -4
  44. package/dist/effect/generated/template-registrations.d.ts +651 -0
  45. package/dist/effect/generated/template-registrations.js +138 -0
  46. package/dist/effect/generated/templates.d.ts +789 -6
  47. package/dist/effect/generated/templates.js +156 -54
  48. package/dist/effect/generated/whats-app-flows.d.ts +1838 -0
  49. package/dist/effect/generated/whats-app-flows.js +338 -0
  50. package/dist/effect/generated/whats-app-setup-links.d.ts +705 -0
  51. package/dist/effect/generated/whats-app-setup-links.js +150 -0
  52. package/dist/effect/generated/whats-app.d.ts +2089 -0
  53. package/dist/effect/generated/whats-app.js +633 -0
  54. package/dist/effect/generated-metadata.d.ts +257 -0
  55. package/dist/effect/generated-metadata.js +223 -48
  56. package/dist/effect/index.d.ts +4 -0
  57. package/dist/effect/index.js +6 -2
  58. package/dist/effect/mailboxes.d.ts +301 -301
  59. package/dist/effect/mailboxes.js +3 -3
  60. package/dist/effect/media.d.ts +4 -4
  61. package/dist/effect/media.js +2 -2
  62. package/dist/effect/messages.d.ts +17 -17
  63. package/dist/effect/messages.js +4 -4
  64. package/dist/effect/namespaces.d.ts +5 -5
  65. package/dist/effect/namespaces.js +1 -1
  66. package/dist/effect/newsletter-issues.d.ts +8 -8
  67. package/dist/effect/newsletter-issues.js +2 -2
  68. package/dist/effect/newsletters.d.ts +3 -3
  69. package/dist/effect/newsletters.js +1 -1
  70. package/dist/effect/organizations.d.ts +10 -10
  71. package/dist/effect/organizations.js +1 -1
  72. package/dist/effect/runtime.d.ts +2 -0
  73. package/dist/effect/runtime.js +2 -1
  74. package/dist/effect/scheduled-messages.d.ts +839 -839
  75. package/dist/effect/scheduled-messages.js +1 -1
  76. package/dist/effect/template-registrations.d.ts +12 -0
  77. package/dist/effect/template-registrations.js +16 -0
  78. package/dist/effect/templates.d.ts +66 -56
  79. package/dist/effect/templates.js +16 -12
  80. package/dist/effect/topic-forms.d.ts +4 -4
  81. package/dist/effect/topic-forms.js +1 -1
  82. package/dist/effect/topics.d.ts +11 -11
  83. package/dist/effect/topics.js +2 -2
  84. package/dist/effect/webhooks.d.ts +18 -18
  85. package/dist/effect/webhooks.js +3 -3
  86. package/dist/effect/whatsapp-flows.d.ts +34 -0
  87. package/dist/effect/whatsapp-flows.js +30 -0
  88. package/dist/effect/whatsapp-setup-links.d.ts +66 -0
  89. package/dist/effect/whatsapp-setup-links.js +18 -0
  90. package/dist/effect/whatsapp.d.ts +51 -0
  91. package/dist/effect/whatsapp.js +34 -0
  92. package/dist/index.js +2 -2
  93. package/dist/mailbox/types.d.ts +2 -1
  94. package/dist/package.js +1 -1
  95. package/dist/promises/client.d.ts +9 -1
  96. package/dist/promises/client.js +11 -3
  97. package/dist/promises/errors.gen.d.ts +38 -2
  98. package/dist/promises/errors.gen.js +160 -3
  99. package/dist/promises/index.js +2 -2
  100. package/dist/promises/types.gen.d.ts +1 -1
  101. package/dist/service-map.d.ts +923 -734
  102. package/dist/service-map.js +288 -233
  103. package/package.json +27 -11
@@ -8,6 +8,13 @@ export type MalformedRequestError = {
8
8
  [key: string]: Array<string>;
9
9
  };
10
10
  };
11
+ export type ValidationError = {
12
+ _tag: "ValidationError";
13
+ message: string;
14
+ fields?: {
15
+ [key: string]: Array<string>;
16
+ } | null | undefined;
17
+ };
11
18
  export type GatewayTimeoutError = {
12
19
  _tag: "GatewayTimeoutError";
13
20
  message: string;
@@ -21,16 +28,14 @@ export type ForbiddenError = {
21
28
  _tag: "ForbiddenError";
22
29
  message: string;
23
30
  };
24
- export type InternalError = {
25
- _tag: "InternalError";
31
+ export type FlagDisabledError = {
32
+ _tag: "FlagDisabledError";
33
+ flag: string;
26
34
  message: string;
27
35
  };
28
- export type ValidationError = {
29
- _tag: "ValidationError";
36
+ export type InternalError = {
37
+ _tag: "InternalError";
30
38
  message: string;
31
- fields?: {
32
- [key: string]: Array<string>;
33
- } | null | undefined;
34
39
  };
35
40
  export type ResourceNotFoundError = {
36
41
  _tag: "ResourceNotFoundError";
@@ -38,6 +43,272 @@ export type ResourceNotFoundError = {
38
43
  id: string;
39
44
  message: string;
40
45
  };
46
+ export type TemplateRegistration = {
47
+ id: TemplateRegistrationId;
48
+ templateId: TemplateId;
49
+ publicationId: TemplatePublicationId;
50
+ target: TemplateRegistrationTarget;
51
+ name: string;
52
+ language: string;
53
+ status: "draft" | "submitted" | "approved" | "rejected" | "paused" | "disabled";
54
+ category: "marketing" | "utility" | "authentication" | "transactional" | "service_implicit" | "service_explicit" | "promotional";
55
+ providerCategory: "marketing" | "utility" | "authentication" | "transactional" | "service_implicit" | "service_explicit" | "promotional" | null;
56
+ providerTemplateId: string | null;
57
+ reason: string | null;
58
+ submittedAt: string | null;
59
+ statusChangedAt: string;
60
+ createdAt: string;
61
+ updatedAt: string;
62
+ };
63
+ export type TemplateRegistrationTarget = WhatsAppRegistrationTarget | DltRegistrationTarget;
64
+ export type DltRegistrationTarget = {
65
+ provider: "dlt";
66
+ entityId: string;
67
+ headerId: string;
68
+ };
69
+ export type WhatsAppRegistrationTarget = {
70
+ provider: "whatsapp";
71
+ wabaId: string;
72
+ };
73
+ export type TemplatePublicationId = string;
74
+ export type TemplateId = string;
75
+ export type TemplateRegistrationId = string;
76
+ export type TemplateRegistrationList = {
77
+ data: Array<TemplateRegistration>;
78
+ };
79
+ export type CredentialsError = {
80
+ _tag: "CredentialsError";
81
+ message: string;
82
+ retryable: boolean;
83
+ };
84
+ export type WhatsAppChannelError = {
85
+ _tag: "WhatsAppChannelError";
86
+ reason: "transport" | "rejected" | "rate_limited" | "auth" | "unsupported";
87
+ message: string;
88
+ provider: string;
89
+ providerCode?: string | null | undefined;
90
+ statusCode?: number | null | undefined;
91
+ };
92
+ export type ConflictError = {
93
+ _tag: "ConflictError";
94
+ message: string;
95
+ resource: string;
96
+ id?: string | null | undefined;
97
+ };
98
+ export type SubmitTemplateRegistrationPayload = {
99
+ provider: "whatsapp";
100
+ businessAccountId?: WhatsAppBusinessAccountId | undefined;
101
+ };
102
+ export type WhatsAppBusinessAccountId = string;
103
+ export type WhatsAppSetupLinkUnavailableError = {
104
+ _tag: "WhatsAppSetupLinkUnavailableError";
105
+ reason: "completed" | "revoked" | "expired";
106
+ message: string;
107
+ };
108
+ export type WhatsAppSetupLink = {
109
+ id: WhatsAppSetupLinkId;
110
+ organizationId: OrganizationId;
111
+ namespaceId: NamespaceId;
112
+ status: WhatsAppSetupLinkStatus;
113
+ redirectUrl: string | null;
114
+ metadata: WhatsAppSetupLinkMetadata;
115
+ expiresAt: string;
116
+ businessAccountId: WhatsAppBusinessAccountId | null;
117
+ completedAt: string | null;
118
+ revokedAt: string | null;
119
+ createdAt: string;
120
+ updatedAt: string;
121
+ };
122
+ export type WhatsAppSetupLinkMetadata = {
123
+ [key: string]: string;
124
+ };
125
+ export type WhatsAppSetupLinkMetadataWritable = {
126
+ [key: string]: string | undefined;
127
+ };
128
+ export type WhatsAppSetupLinkStatus = "pending" | "completed" | "revoked" | "expired";
129
+ export type NamespaceId = string;
130
+ export type OrganizationId = string;
131
+ export type WhatsAppSetupLinkId = string;
132
+ export type WhatsAppSetupLinkPage = {
133
+ items: Array<WhatsAppSetupLink>;
134
+ nextCursor: string | null;
135
+ };
136
+ export type BillingProviderError = {
137
+ _tag: "BillingProviderError";
138
+ message: string;
139
+ };
140
+ export type PaymentRequiredError = {
141
+ _tag: "PaymentRequiredError";
142
+ message: string;
143
+ resource: string;
144
+ currentUsage: number;
145
+ limit: number;
146
+ };
147
+ export type CreatedWhatsAppSetupLink = {
148
+ id: WhatsAppSetupLinkId;
149
+ organizationId: OrganizationId;
150
+ namespaceId: NamespaceId;
151
+ status: WhatsAppSetupLinkStatus;
152
+ redirectUrl: string | null;
153
+ metadata: WhatsAppSetupLinkMetadata;
154
+ expiresAt: string;
155
+ businessAccountId: WhatsAppBusinessAccountId | null;
156
+ completedAt: string | null;
157
+ revokedAt: string | null;
158
+ createdAt: string;
159
+ updatedAt: string;
160
+ url: string;
161
+ };
162
+ export type CreateWhatsAppSetupLinkPayload = {
163
+ namespaceId: NamespaceId;
164
+ redirectUrl?: WhatsAppSetupLinkRedirectUrl | null | undefined;
165
+ metadata?: WhatsAppSetupLinkMetadata | null | undefined;
166
+ expiresAt?: string | null | undefined;
167
+ };
168
+ export type WhatsAppSetupLinkRedirectUrl = string;
169
+ export type WhatsAppFlowRegistrationList = {
170
+ data: Array<WhatsAppFlowRegistration>;
171
+ };
172
+ export type WhatsAppFlowRegistration = {
173
+ id: WhatsAppFlowRegistrationId;
174
+ flowId: WhatsAppFlowId;
175
+ versionId: WhatsAppFlowVersionId;
176
+ versionNumber: number;
177
+ wabaId: string;
178
+ providerFlowId: string | null;
179
+ name: string;
180
+ status: "draft" | "published" | "throttled" | "blocked" | "deprecated";
181
+ validationErrors: Array<WhatsAppFlowValidationError>;
182
+ endpointAlerts: Array<WhatsAppFlowEndpointAlert>;
183
+ publishedAt: string | null;
184
+ statusChangedAt: string;
185
+ createdAt: string;
186
+ updatedAt: string;
187
+ };
188
+ export type WhatsAppFlowEndpointAlert = {
189
+ kind: string;
190
+ message: string;
191
+ value: number | null;
192
+ threshold: number | null;
193
+ activatedAt: string;
194
+ };
195
+ export type WhatsAppFlowValidationError = {
196
+ error: string;
197
+ message: string;
198
+ path?: string | undefined;
199
+ line?: number | undefined;
200
+ column?: number | undefined;
201
+ };
202
+ export type WhatsAppFlowVersionId = string;
203
+ export type WhatsAppFlowId = string;
204
+ export type WhatsAppFlowRegistrationId = string;
205
+ export type WhatsAppFlowEndpointSettings = {
206
+ url: string;
207
+ updatedAt: string;
208
+ secret?: string | undefined;
209
+ };
210
+ export type SetWhatsAppFlowEndpointPayload = {
211
+ url: string;
212
+ };
213
+ export type WhatsAppFlowEncryptionKey = {
214
+ wabaId: string;
215
+ publicKey: string;
216
+ phoneNumberIds: Array<string>;
217
+ createdAt: string;
218
+ };
219
+ export type RotateWhatsAppFlowEncryptionKeyPayload = {
220
+ businessAccountId?: WhatsAppBusinessAccountId | undefined;
221
+ };
222
+ export type RegisterWhatsAppFlowPayload = {
223
+ businessAccountId?: WhatsAppBusinessAccountId | undefined;
224
+ };
225
+ export type WhatsAppFlowVersionList = {
226
+ data: Array<WhatsAppFlowVersion>;
227
+ };
228
+ export type WhatsAppFlowVersion = {
229
+ id: WhatsAppFlowVersionId;
230
+ flowId: WhatsAppFlowId;
231
+ number: number;
232
+ commitSha: string;
233
+ digest: string;
234
+ jsonVersion: string;
235
+ screens: Array<string>;
236
+ dataExchange: boolean;
237
+ createdAt: string;
238
+ };
239
+ export type ServiceUnavailableError = {
240
+ _tag: "ServiceUnavailableError";
241
+ message: string;
242
+ retryAfterSeconds: number;
243
+ };
244
+ export type RecordWhatsAppFlowVersionPayload = {
245
+ commitSha: string;
246
+ expectedWorkspaceRevision: string;
247
+ };
248
+ export type WhatsAppFlow = {
249
+ id: WhatsAppFlowId;
250
+ projectId: TemplateProjectId;
251
+ handle: string;
252
+ path: string;
253
+ categories: Array<"SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER">;
254
+ endpoint: WhatsAppFlowEndpoint | null;
255
+ currentVersion: WhatsAppFlowVersion | null;
256
+ createdAt: string;
257
+ updatedAt: string;
258
+ };
259
+ export type WhatsAppFlowEndpoint = {
260
+ url: string;
261
+ updatedAt: string;
262
+ };
263
+ export type TemplateProjectId = string;
264
+ export type WhatsAppFlowList = {
265
+ data: Array<WhatsAppFlow>;
266
+ };
267
+ export type CreateWhatsAppFlowPayload = {
268
+ projectId: TemplateProjectId;
269
+ handle: string;
270
+ categories: Array<"SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER">;
271
+ };
272
+ export type PaginationMeta = {
273
+ page: number;
274
+ limit: number;
275
+ total: number;
276
+ totalPages: number;
277
+ };
278
+ export type MessageDeliveryId = string;
279
+ export type MoneyAmount = {
280
+ amount: string;
281
+ currency: string;
282
+ };
283
+ export type WhatsAppServiceWindowId = string;
284
+ export type WhatsAppTemplateStats = {
285
+ items: Array<WhatsAppTemplateStatsRow>;
286
+ };
287
+ export type WhatsAppTemplateStatsRow = {
288
+ templateId: TemplateId;
289
+ templateSlug: string;
290
+ name: string;
291
+ language: string;
292
+ category: "marketing" | "utility" | "authentication" | null;
293
+ source: WhatsAppTemplateStatsSource;
294
+ sent: number;
295
+ delivered: number;
296
+ read: number;
297
+ failed: number;
298
+ estimatedProviderCosts: Array<MoneyAmount>;
299
+ };
300
+ export type WhatsAppTemplateStatsSource = {
301
+ type: "campaign";
302
+ campaignId: CampaignId;
303
+ } | {
304
+ type: "journey";
305
+ journeyId: JourneyId;
306
+ nodeId: string;
307
+ } | {
308
+ type: "direct";
309
+ };
310
+ export type JourneyId = string;
311
+ export type CampaignId = string;
41
312
  export type ExtensionRun = {
42
313
  id: string;
43
314
  eventId: string;
@@ -63,12 +334,6 @@ export type ExtensionRunSummary = {
63
334
  outcome: "succeeded" | "failed" | "timed_out" | "budget_exhausted" | "revoked";
64
335
  error: string | null;
65
336
  };
66
- export type ConflictError = {
67
- _tag: "ConflictError";
68
- message: string;
69
- resource: string;
70
- id?: string | null | undefined;
71
- };
72
337
  export type ExtensionInstallation = {
73
338
  id: ExtensionInstallationId;
74
339
  extensionId: ExtensionId;
@@ -93,7 +358,6 @@ export type ExtensionInstallation = {
93
358
  disabledAt: string | null;
94
359
  };
95
360
  export type WebhookEndpointId = string;
96
- export type NamespaceId = string;
97
361
  export type MailboxId = string;
98
362
  export type PolicyRule = {
99
363
  match: PolicyRuleMatch;
@@ -161,7 +425,6 @@ export type ExtensionPermissionDiff = {
161
425
  added: Array<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded">;
162
426
  removed: Array<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded">;
163
427
  };
164
- export type OrganizationId = string;
165
428
  export type UpgradeExtensionPayload = {
166
429
  version?: string | ExtensionVersionId | null | undefined;
167
430
  acceptPermissions?: Array<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded"> | null | undefined;
@@ -309,12 +572,6 @@ export type CreateNamespacePortalLinkPayload = {
309
572
  metadata?: NamespacePortalLinkMetadata | null | undefined;
310
573
  expiresIn?: number | null | undefined;
311
574
  };
312
- export type WhatsAppSetupLinkRedirectUrl = string;
313
- export type FlagDisabledError = {
314
- _tag: "FlagDisabledError";
315
- flag: string;
316
- message: string;
317
- };
318
575
  export type NamespaceResource = {
319
576
  type: NamespaceResourceType;
320
577
  id: string;
@@ -645,7 +902,6 @@ export type JsonObjectWritable = {
645
902
  [key: string]: JsonValueWritable | undefined;
646
903
  };
647
904
  export type TemplateChannelVariantId = string;
648
- export type TemplateId = string;
649
905
  export type MailboxSmsEndpointBinding = {
650
906
  channel: "sms";
651
907
  phoneNumberId: SmsPhoneNumberId;
@@ -655,7 +911,6 @@ export type MailboxWhatsAppEndpointBinding = {
655
911
  channel: "whatsapp";
656
912
  businessAccountId: WhatsAppBusinessAccountId;
657
913
  };
658
- export type WhatsAppBusinessAccountId = string;
659
914
  export type MailboxEndpointId = string;
660
915
  export type MailboxEmailSendSnapshot = {
661
916
  channel: "email";
@@ -686,17 +941,6 @@ export type DenyMailboxActionPayload = {
686
941
  reviewRound: PolicyReviewRound;
687
942
  reason: string;
688
943
  };
689
- export type BillingProviderError = {
690
- _tag: "BillingProviderError";
691
- message: string;
692
- };
693
- export type PaymentRequiredError = {
694
- _tag: "PaymentRequiredError";
695
- message: string;
696
- resource: string;
697
- currentUsage: number;
698
- limit: number;
699
- };
700
944
  export type RateLimitedError = {
701
945
  _tag: "RateLimitedError";
702
946
  message: string;
@@ -847,7 +1091,7 @@ export type MailboxChannel = "sms" | "whatsapp" | "email";
847
1091
  export type MailboxQuarantinedMessage = {
848
1092
  id: MessageId;
849
1093
  disposition: "quarantined" | "isolated";
850
- reason: "spam" | "dmarc" | "virus" | "virus_unscanned" | "phishing" | "fraud" | "prompt_injection";
1094
+ reason: "spam" | "dmarc" | "virus" | "virus_unscanned" | "verdict_missing" | "phishing" | "fraud" | "prompt_injection";
851
1095
  source: "receipt" | "classifier";
852
1096
  from: {
853
1097
  address: string;
@@ -944,7 +1188,6 @@ export type MailboxMessageSender = {
944
1188
  address: string;
945
1189
  };
946
1190
  export type CampaignRunId = string;
947
- export type CampaignId = string;
948
1191
  export type MailboxEmailMessage = {
949
1192
  id: MessageId;
950
1193
  campaign?: {
@@ -1259,7 +1502,7 @@ export type MailboxNeedsYouItem = {
1259
1502
  type: "quarantinedMessage";
1260
1503
  id: MessageId;
1261
1504
  mailbox: MailboxThreadMailbox;
1262
- reason: "spam" | "dmarc" | "virus" | "virus_unscanned" | "phishing" | "fraud" | "prompt_injection";
1505
+ reason: "spam" | "dmarc" | "virus" | "virus_unscanned" | "verdict_missing" | "phishing" | "fraud" | "prompt_injection";
1263
1506
  source: "receipt" | "classifier";
1264
1507
  heldAt: string;
1265
1508
  };
@@ -1912,11 +2155,6 @@ export type CreateBrand = {
1912
2155
  export type BrandList = {
1913
2156
  items: Array<Brand>;
1914
2157
  };
1915
- export type ServiceUnavailableError = {
1916
- _tag: "ServiceUnavailableError";
1917
- message: string;
1918
- retryAfterSeconds: number;
1919
- };
1920
2158
  export type TemplateSourceError = {
1921
2159
  _tag: "TemplateSourceError";
1922
2160
  message: string;
@@ -1953,7 +2191,6 @@ export type TemplateInUseError = {
1953
2191
  id: string;
1954
2192
  }>;
1955
2193
  };
1956
- export type TemplateProjectId = string;
1957
2194
  export type TemplateInputContractId = string;
1958
2195
  export type TemplateInputContractPage = {
1959
2196
  items: Array<{
@@ -1975,7 +2212,6 @@ export type TemplatePublicationRender = {
1975
2212
  html: string;
1976
2213
  text: string;
1977
2214
  };
1978
- export type TemplatePublicationId = string;
1979
2215
  export type RenderTemplatePublicationPayload = {
1980
2216
  /**
1981
2217
  * The input to render with, validated against the publication's input schema.
@@ -2007,6 +2243,9 @@ export type Template = {
2007
2243
  * Whether the template's project is shared with every namespace. Every entry in a project shares it. A namespace-scoped key reads and sends a shared template in its own namespace but cannot change it. Only an organization-level project is shared.
2008
2244
  */
2009
2245
  shared: boolean;
2246
+ /**
2247
+ * A relative .tsx file under templates or emails/, at most 1024 characters, with no backslash, . or .., or .git segments.
2248
+ */
2010
2249
  entryPath: string;
2011
2250
  status: "draft" | "pending" | "approved" | "published" | "rejected" | "archived";
2012
2251
  publishedAt: string | null;
@@ -2135,6 +2374,9 @@ export type TemplateFromDefaultInput = {
2135
2374
  name?: string | null | undefined;
2136
2375
  };
2137
2376
  export type AddTemplateEntryPayload = {
2377
+ /**
2378
+ * A relative .tsx file under templates or emails/, at most 1024 characters, with no backslash, . or .., or .git segments.
2379
+ */
2138
2380
  entryPath: string;
2139
2381
  name: string;
2140
2382
  slug: string;
@@ -2166,6 +2408,97 @@ export type CreateTemplateFromWebsitePayload = {
2166
2408
  */
2167
2409
  namespaceId?: NamespaceId | null | undefined;
2168
2410
  };
2411
+ /**
2412
+ * A template project created from a brief. `startedFrom` is the gallery design the project was created from.
2413
+ */
2414
+ export type TemplateFromBrief = {
2415
+ template: Template;
2416
+ startedFrom: TemplateStarterSuggestion;
2417
+ /**
2418
+ * The other designs suggested for the brief, best first.
2419
+ */
2420
+ alternatives: Array<TemplateStarterSuggestion>;
2421
+ recreation: TemplateRecreationMatch | null;
2422
+ /**
2423
+ * The request to send the template assistant in the editor: the brief, then the design the project starts from and what the gallery has of a company email the brief names. The assistant adapts the design to it; nothing runs until it is sent.
2424
+ */
2425
+ ask: string;
2426
+ };
2427
+ /**
2428
+ * The company email the brief named: `exact` when the gallery recreates that kind of email from it, `kind-differs` when it recreates another kind (start from it for the look and adapt the kind), `missing` when the gallery has no recreation of that company.
2429
+ */
2430
+ export type TemplateRecreationMatch = {
2431
+ status: "exact";
2432
+ company: string;
2433
+ galleryTemplateId: string;
2434
+ } | {
2435
+ status: "kind-differs";
2436
+ company: string;
2437
+ galleryTemplateId: string;
2438
+ recreationName: string;
2439
+ } | {
2440
+ status: "missing";
2441
+ company: string;
2442
+ };
2443
+ export type TemplateStarterSuggestion = {
2444
+ /**
2445
+ * The gallery design to start from. Pass it as `galleryTemplateId` to create a template from it.
2446
+ */
2447
+ galleryTemplateId: string;
2448
+ /**
2449
+ * The design's gallery page, under /templates/.
2450
+ */
2451
+ slug: string;
2452
+ name: string;
2453
+ description: string;
2454
+ /**
2455
+ * The brief this design fits, in one sentence.
2456
+ */
2457
+ intent: string;
2458
+ tags: Array<string>;
2459
+ /**
2460
+ * How the design is built: letter, code, ledger, timeline, grid, poster, and so on.
2461
+ */
2462
+ structure: string;
2463
+ /**
2464
+ * Whether adapting it means replacing pictures: none, graphics built in markup, or image files.
2465
+ */
2466
+ imagery: "none" | "markup" | "pictures";
2467
+ /**
2468
+ * The company whose email this design recreates.
2469
+ */
2470
+ recreates?: string | undefined;
2471
+ /**
2472
+ * Why it was suggested for this brief.
2473
+ */
2474
+ reason: string;
2475
+ };
2476
+ export type CreateTemplateFromBriefPayload = {
2477
+ /**
2478
+ * 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.
2479
+ */
2480
+ brief: string;
2481
+ name?: string | null | undefined;
2482
+ galleryTemplateId?: string | null | undefined;
2483
+ useBrand?: boolean | null | undefined;
2484
+ /**
2485
+ * The namespace the new template project belongs to. Omit for organization level. A namespace-scoped key always creates in its own namespace.
2486
+ */
2487
+ namespaceId?: NamespaceId | null | undefined;
2488
+ };
2489
+ export type TemplateStarterSuggestions = {
2490
+ /**
2491
+ * Best first; a new email for this brief starts from the first.
2492
+ */
2493
+ suggestions: Array<TemplateStarterSuggestion>;
2494
+ recreation: TemplateRecreationMatch | null;
2495
+ };
2496
+ export type SuggestTemplateStartersPayload = {
2497
+ /**
2498
+ * 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.
2499
+ */
2500
+ brief: string;
2501
+ };
2169
2502
  export type CreateTemplatePayload = {
2170
2503
  name: string;
2171
2504
  projectName?: string | null | undefined;
@@ -2224,6 +2557,9 @@ export type TemplateSummary = {
2224
2557
  * Whether the template's project is shared with every namespace. Every entry in a project shares it. A namespace-scoped key reads and sends a shared template in its own namespace but cannot change it. Only an organization-level project is shared.
2225
2558
  */
2226
2559
  shared: boolean;
2560
+ /**
2561
+ * A relative .tsx file under templates or emails/, at most 1024 characters, with no backslash, . or .., or .git segments.
2562
+ */
2227
2563
  entryPath: string;
2228
2564
  status: "draft" | "pending" | "approved" | "published" | "rejected" | "archived";
2229
2565
  publishedAt: string | null;
@@ -2264,12 +2600,18 @@ export type PublicationDomainPage = {
2264
2600
  nextCursor: string | null;
2265
2601
  };
2266
2602
  export type NewsletterIssueRenderPayload = {
2603
+ /**
2604
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
2605
+ */
2267
2606
  path: string;
2268
2607
  expectedRevision: string;
2269
2608
  fixture: string;
2270
2609
  target: "email" | "web";
2271
2610
  };
2272
2611
  export type NewsletterIssueCheckPayload = {
2612
+ /**
2613
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
2614
+ */
2273
2615
  path: string;
2274
2616
  expectedRevision: string;
2275
2617
  };
@@ -2279,15 +2621,24 @@ export type NewsletterIssueSavePayload = {
2279
2621
  message: string;
2280
2622
  };
2281
2623
  export type NewsletterIssueRemovePayload = {
2624
+ /**
2625
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
2626
+ */
2282
2627
  path: string;
2283
2628
  expectedRevision: string;
2284
2629
  };
2285
2630
  export type NewsletterIssueUpdatePayload = {
2631
+ /**
2632
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
2633
+ */
2286
2634
  path: string;
2287
2635
  content: string;
2288
2636
  expectedRevision: string;
2289
2637
  };
2290
2638
  export type NewsletterIssueCreatePayload = {
2639
+ /**
2640
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
2641
+ */
2291
2642
  path: string;
2292
2643
  content: string;
2293
2644
  expectedRevision?: string | null | undefined;
@@ -2295,6 +2646,9 @@ export type NewsletterIssueCreatePayload = {
2295
2646
  export type NewsletterIssueDocument = {
2296
2647
  projectId: TemplateProjectId;
2297
2648
  revision: string;
2649
+ /**
2650
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
2651
+ */
2298
2652
  path: string;
2299
2653
  content: string;
2300
2654
  };
@@ -2304,6 +2658,9 @@ export type NewsletterIssueList = {
2304
2658
  items: Array<NewsletterIssueListItem>;
2305
2659
  };
2306
2660
  export type NewsletterIssueListItem = {
2661
+ /**
2662
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
2663
+ */
2307
2664
  path: string;
2308
2665
  title: string | null;
2309
2666
  latestSend: NewsletterIssueSend | null;
@@ -2827,7 +3184,6 @@ export type JourneyRunTrigger = {
2827
3184
  };
2828
3185
  export type JourneyRunExitReason = "completed" | "goal" | "archived";
2829
3186
  export type JourneyRunStatus = "active" | "paused" | "exited" | "failed";
2830
- export type JourneyId = string;
2831
3187
  export type JourneyRunId = string;
2832
3188
  export type JourneyRunPage = {
2833
3189
  items: Array<JourneyRun>;
@@ -3760,6 +4116,10 @@ export type EmailSenderPage = {
3760
4116
  verificationStatus: "pending" | "verified" | "failed";
3761
4117
  verifiedAt: string | null;
3762
4118
  verificationToken: string | null;
4119
+ /**
4120
+ * Whether a send from this address passes the ownership check every send runs: the sender is verified and active, and the address or its domain is a sending identity this organization owns. Always false for a pending, failed, or inactive sender. A verified sender whose domain is no longer verified here, or whose sending identity setup failed, is not sendable, and sends from it are refused with 403.
4121
+ */
4122
+ sendable: boolean;
3763
4123
  providerLifecycle: "provisioning" | "active" | "deleting" | "failed";
3764
4124
  providerFailureCode: string | null;
3765
4125
  isDefault: boolean;
@@ -4221,6 +4581,9 @@ export type EmailCampaignContent = {
4221
4581
  * Render a saved Markdown issue from the audience topic's repository. Its saved title and preheader supply the email content; templateData supplies recipient fallbacks.
4222
4582
  */
4223
4583
  issue?: {
4584
+ /**
4585
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
4586
+ */
4224
4587
  path: string;
4225
4588
  commit: string;
4226
4589
  } | null | undefined;
@@ -4376,6 +4739,9 @@ export type EmailCampaignContentInput = {
4376
4739
  * Render a saved Markdown issue from the audience topic's repository. Its saved title and preheader supply the email content; templateData supplies recipient fallbacks.
4377
4740
  */
4378
4741
  issue?: {
4742
+ /**
4743
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
4744
+ */
4379
4745
  path: string;
4380
4746
  commit: string;
4381
4747
  } | null | undefined;
@@ -4574,7 +4940,6 @@ export type WhatsAppFlowMessageWritable = {
4574
4940
  [key: string]: JsonValueWritable | undefined;
4575
4941
  } | undefined;
4576
4942
  };
4577
- export type WhatsAppFlowId = string;
4578
4943
  export type WhatsAppMediaContent = {
4579
4944
  media: WhatsAppOutboundMedia;
4580
4945
  };
@@ -5099,7 +5464,6 @@ export type WhatsAppStoredFlowMessage = {
5099
5464
  flowVersionId: WhatsAppFlowVersionId;
5100
5465
  providerFlowId: string;
5101
5466
  };
5102
- export type WhatsAppFlowVersionId = string;
5103
5467
  export type WhatsAppCtaUrlMessage = {
5104
5468
  type: "cta_url";
5105
5469
  header?: WhatsAppInteractiveHeader | undefined;
@@ -5204,7 +5568,6 @@ export type MessageDeliveryError = {
5204
5568
  message: string | null;
5205
5569
  retryable: boolean | null;
5206
5570
  };
5207
- export type MessageDeliveryId = string;
5208
5571
  export type Message = {
5209
5572
  id: MessageId;
5210
5573
  campaign?: {
@@ -8846,6 +9209,10 @@ export type EmailGetSenderResponses = {
8846
9209
  verificationStatus: "pending" | "verified" | "failed";
8847
9210
  verifiedAt: string | null;
8848
9211
  verificationToken: string | null;
9212
+ /**
9213
+ * Whether a send from this address passes the ownership check every send runs: the sender is verified and active, and the address or its domain is a sending identity this organization owns. Always false for a pending, failed, or inactive sender. A verified sender whose domain is no longer verified here, or whose sending identity setup failed, is not sendable, and sends from it are refused with 403.
9214
+ */
9215
+ sendable: boolean;
8849
9216
  providerLifecycle: "provisioning" | "active" | "deleting" | "failed";
8850
9217
  providerFailureCode: string | null;
8851
9218
  isDefault: boolean;
@@ -16113,6 +16480,9 @@ export type NewsletterIssuesListResponses = {
16113
16480
  export type NewsletterIssuesListResponse = NewsletterIssuesListResponses[keyof NewsletterIssuesListResponses];
16114
16481
  export type NewsletterIssuesUpdateData = {
16115
16482
  body: {
16483
+ /**
16484
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
16485
+ */
16116
16486
  path: string;
16117
16487
  content: string;
16118
16488
  expectedRevision: string;
@@ -16188,6 +16558,9 @@ export type NewsletterIssuesUpdateResponses = {
16188
16558
  status: "added" | "modified" | "deleted";
16189
16559
  }>;
16190
16560
  conflicts: Array<{
16561
+ /**
16562
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
16563
+ */
16191
16564
  path: string;
16192
16565
  base: string | null;
16193
16566
  draft: string | null;
@@ -16205,6 +16578,9 @@ export type NewsletterIssuesUpdateResponses = {
16205
16578
  root: "/project";
16206
16579
  access: "read-write";
16207
16580
  } | {
16581
+ /**
16582
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
16583
+ */
16208
16584
  root: string;
16209
16585
  digest: string;
16210
16586
  fileCount: number;
@@ -16215,6 +16591,9 @@ export type NewsletterIssuesUpdateResponses = {
16215
16591
  slug: string;
16216
16592
  name: string;
16217
16593
  } | {
16594
+ /**
16595
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
16596
+ */
16218
16597
  root: string;
16219
16598
  digest: string;
16220
16599
  fileCount: number;
@@ -16224,6 +16603,9 @@ export type NewsletterIssuesUpdateResponses = {
16224
16603
  resourceId: string;
16225
16604
  name: string;
16226
16605
  } | {
16606
+ /**
16607
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
16608
+ */
16227
16609
  root: string;
16228
16610
  digest: string;
16229
16611
  fileCount: number;
@@ -16254,6 +16636,9 @@ export type NewsletterIssuesUpdateResponses = {
16254
16636
  export type NewsletterIssuesUpdateResponse = NewsletterIssuesUpdateResponses[keyof NewsletterIssuesUpdateResponses];
16255
16637
  export type NewsletterIssuesCreateData = {
16256
16638
  body: {
16639
+ /**
16640
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
16641
+ */
16257
16642
  path: string;
16258
16643
  content: string;
16259
16644
  expectedRevision?: string | null | undefined;
@@ -16329,6 +16714,9 @@ export type NewsletterIssuesCreateResponses = {
16329
16714
  status: "added" | "modified" | "deleted";
16330
16715
  }>;
16331
16716
  conflicts: Array<{
16717
+ /**
16718
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
16719
+ */
16332
16720
  path: string;
16333
16721
  base: string | null;
16334
16722
  draft: string | null;
@@ -16346,6 +16734,9 @@ export type NewsletterIssuesCreateResponses = {
16346
16734
  root: "/project";
16347
16735
  access: "read-write";
16348
16736
  } | {
16737
+ /**
16738
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
16739
+ */
16349
16740
  root: string;
16350
16741
  digest: string;
16351
16742
  fileCount: number;
@@ -16356,6 +16747,9 @@ export type NewsletterIssuesCreateResponses = {
16356
16747
  slug: string;
16357
16748
  name: string;
16358
16749
  } | {
16750
+ /**
16751
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
16752
+ */
16359
16753
  root: string;
16360
16754
  digest: string;
16361
16755
  fileCount: number;
@@ -16365,6 +16759,9 @@ export type NewsletterIssuesCreateResponses = {
16365
16759
  resourceId: string;
16366
16760
  name: string;
16367
16761
  } | {
16762
+ /**
16763
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
16764
+ */
16368
16765
  root: string;
16369
16766
  digest: string;
16370
16767
  fileCount: number;
@@ -16463,6 +16860,9 @@ export type NewsletterIssuesOpenResponses = {
16463
16860
  status: "added" | "modified" | "deleted";
16464
16861
  }>;
16465
16862
  conflicts: Array<{
16863
+ /**
16864
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
16865
+ */
16466
16866
  path: string;
16467
16867
  base: string | null;
16468
16868
  draft: string | null;
@@ -16480,6 +16880,9 @@ export type NewsletterIssuesOpenResponses = {
16480
16880
  root: "/project";
16481
16881
  access: "read-write";
16482
16882
  } | {
16883
+ /**
16884
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
16885
+ */
16483
16886
  root: string;
16484
16887
  digest: string;
16485
16888
  fileCount: number;
@@ -16490,6 +16893,9 @@ export type NewsletterIssuesOpenResponses = {
16490
16893
  slug: string;
16491
16894
  name: string;
16492
16895
  } | {
16896
+ /**
16897
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
16898
+ */
16493
16899
  root: string;
16494
16900
  digest: string;
16495
16901
  fileCount: number;
@@ -16499,6 +16905,9 @@ export type NewsletterIssuesOpenResponses = {
16499
16905
  resourceId: string;
16500
16906
  name: string;
16501
16907
  } | {
16908
+ /**
16909
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
16910
+ */
16502
16911
  root: string;
16503
16912
  digest: string;
16504
16913
  fileCount: number;
@@ -16533,6 +16942,9 @@ export type NewsletterIssuesGetData = {
16533
16942
  id: NewsletterId;
16534
16943
  };
16535
16944
  query: {
16945
+ /**
16946
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
16947
+ */
16536
16948
  path: string;
16537
16949
  expectedRevision: string;
16538
16950
  };
@@ -16586,6 +16998,9 @@ export type NewsletterIssuesGetResponses = {
16586
16998
  export type NewsletterIssuesGetResponse = NewsletterIssuesGetResponses[keyof NewsletterIssuesGetResponses];
16587
16999
  export type NewsletterIssuesRemoveData = {
16588
17000
  body: {
17001
+ /**
17002
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
17003
+ */
16589
17004
  path: string;
16590
17005
  expectedRevision: string;
16591
17006
  };
@@ -16660,6 +17075,9 @@ export type NewsletterIssuesRemoveResponses = {
16660
17075
  status: "added" | "modified" | "deleted";
16661
17076
  }>;
16662
17077
  conflicts: Array<{
17078
+ /**
17079
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
17080
+ */
16663
17081
  path: string;
16664
17082
  base: string | null;
16665
17083
  draft: string | null;
@@ -16677,6 +17095,9 @@ export type NewsletterIssuesRemoveResponses = {
16677
17095
  root: "/project";
16678
17096
  access: "read-write";
16679
17097
  } | {
17098
+ /**
17099
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
17100
+ */
16680
17101
  root: string;
16681
17102
  digest: string;
16682
17103
  fileCount: number;
@@ -16687,6 +17108,9 @@ export type NewsletterIssuesRemoveResponses = {
16687
17108
  slug: string;
16688
17109
  name: string;
16689
17110
  } | {
17111
+ /**
17112
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
17113
+ */
16690
17114
  root: string;
16691
17115
  digest: string;
16692
17116
  fileCount: number;
@@ -16696,6 +17120,9 @@ export type NewsletterIssuesRemoveResponses = {
16696
17120
  resourceId: string;
16697
17121
  name: string;
16698
17122
  } | {
17123
+ /**
17124
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
17125
+ */
16699
17126
  root: string;
16700
17127
  digest: string;
16701
17128
  fileCount: number;
@@ -16841,6 +17268,9 @@ export type NewsletterIssuesSaveResponses = {
16841
17268
  export type NewsletterIssuesSaveResponse = NewsletterIssuesSaveResponses[keyof NewsletterIssuesSaveResponses];
16842
17269
  export type NewsletterIssuesCheckData = {
16843
17270
  body: {
17271
+ /**
17272
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
17273
+ */
16844
17274
  path: string;
16845
17275
  expectedRevision: string;
16846
17276
  };
@@ -16899,7 +17329,7 @@ export type NewsletterIssuesCheckResponses = {
16899
17329
  200: {
16900
17330
  projectId: TemplateProjectId;
16901
17331
  revision: string;
16902
- entryPath: string | string;
17332
+ entryPath: string;
16903
17333
  declaration: {
16904
17334
  codeDigest: string;
16905
17335
  templateId: string;
@@ -16913,6 +17343,9 @@ export type NewsletterIssuesCheckResponses = {
16913
17343
  fixtures: Array<string>;
16914
17344
  } | null;
16915
17345
  issue?: {
17346
+ /**
17347
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
17348
+ */
16916
17349
  path: string;
16917
17350
  frontmatter: {
16918
17351
  title: string;
@@ -16981,6 +17414,9 @@ export type NewsletterIssuesCheckResponses = {
16981
17414
  export type NewsletterIssuesCheckResponse = NewsletterIssuesCheckResponses[keyof NewsletterIssuesCheckResponses];
16982
17415
  export type NewsletterIssuesRenderData = {
16983
17416
  body: {
17417
+ /**
17418
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
17419
+ */
16984
17420
  path: string;
16985
17421
  expectedRevision: string;
16986
17422
  fixture: string;
@@ -17041,7 +17477,7 @@ export type NewsletterIssuesRenderResponses = {
17041
17477
  200: {
17042
17478
  projectId: TemplateProjectId;
17043
17479
  revision: string;
17044
- entryPath: string | string;
17480
+ entryPath: string;
17045
17481
  declaration: {
17046
17482
  codeDigest: string;
17047
17483
  templateId: string;
@@ -17055,6 +17491,9 @@ export type NewsletterIssuesRenderResponses = {
17055
17491
  fixtures: Array<string>;
17056
17492
  } | null;
17057
17493
  issue?: {
17494
+ /**
17495
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
17496
+ */
17058
17497
  path: string;
17059
17498
  frontmatter: {
17060
17499
  title: string;
@@ -18583,6 +19022,118 @@ export type TemplatesUpdateResponses = {
18583
19022
  200: Template;
18584
19023
  };
18585
19024
  export type TemplatesUpdateResponse = TemplatesUpdateResponses[keyof TemplatesUpdateResponses];
19025
+ export type TemplatesSuggestStartersData = {
19026
+ body: {
19027
+ /**
19028
+ * 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.
19029
+ */
19030
+ brief: string;
19031
+ };
19032
+ path?: never;
19033
+ query?: never;
19034
+ url: "/v1/templates/suggestions";
19035
+ };
19036
+ export type TemplatesSuggestStartersErrors = {
19037
+ /**
19038
+ * MalformedRequestError
19039
+ */
19040
+ 400: MalformedRequestError;
19041
+ /**
19042
+ * UnauthorizedError
19043
+ */
19044
+ 401: UnauthorizedError;
19045
+ /**
19046
+ * ForbiddenError
19047
+ */
19048
+ 403: ForbiddenError;
19049
+ /**
19050
+ * ValidationError
19051
+ */
19052
+ 422: ValidationError;
19053
+ /**
19054
+ * InternalError
19055
+ */
19056
+ 500: InternalError;
19057
+ /**
19058
+ * GatewayTimeoutError
19059
+ */
19060
+ 504: GatewayTimeoutError;
19061
+ };
19062
+ export type TemplatesSuggestStartersError = TemplatesSuggestStartersErrors[keyof TemplatesSuggestStartersErrors];
19063
+ export type TemplatesSuggestStartersResponses = {
19064
+ /**
19065
+ * TemplateStarterSuggestions
19066
+ */
19067
+ 200: TemplateStarterSuggestions;
19068
+ };
19069
+ export type TemplatesSuggestStartersResponse = TemplatesSuggestStartersResponses[keyof TemplatesSuggestStartersResponses];
19070
+ export type TemplatesCreateFromBriefData = {
19071
+ body: {
19072
+ /**
19073
+ * 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.
19074
+ */
19075
+ brief: string;
19076
+ name?: string | null | undefined;
19077
+ galleryTemplateId?: string | null | undefined;
19078
+ useBrand?: boolean | null | undefined;
19079
+ /**
19080
+ * The namespace the new template project belongs to. Omit for organization level. A namespace-scoped key always creates in its own namespace.
19081
+ */
19082
+ namespaceId?: NamespaceId | null | undefined;
19083
+ };
19084
+ headers: {
19085
+ "idempotency-key": string;
19086
+ };
19087
+ path?: never;
19088
+ query?: never;
19089
+ url: "/v1/templates/from-brief";
19090
+ };
19091
+ export type TemplatesCreateFromBriefErrors = {
19092
+ /**
19093
+ * MalformedRequestError
19094
+ */
19095
+ 400: MalformedRequestError;
19096
+ /**
19097
+ * UnauthorizedError
19098
+ */
19099
+ 401: UnauthorizedError;
19100
+ /**
19101
+ * ForbiddenError
19102
+ */
19103
+ 403: ForbiddenError;
19104
+ /**
19105
+ * ResourceNotFoundError
19106
+ */
19107
+ 404: ResourceNotFoundError;
19108
+ /**
19109
+ * ConflictError | TemplateInUseError
19110
+ */
19111
+ 409: ConflictError | TemplateInUseError;
19112
+ /**
19113
+ * TemplateSourceError | ValidationError
19114
+ */
19115
+ 422: TemplateSourceError | ValidationError;
19116
+ /**
19117
+ * InternalError
19118
+ */
19119
+ 500: InternalError;
19120
+ /**
19121
+ * ServiceUnavailableError
19122
+ */
19123
+ 503: ServiceUnavailableError;
19124
+ /**
19125
+ * GatewayTimeoutError
19126
+ */
19127
+ 504: GatewayTimeoutError;
19128
+ };
19129
+ export type TemplatesCreateFromBriefError = TemplatesCreateFromBriefErrors[keyof TemplatesCreateFromBriefErrors];
19130
+ export type TemplatesCreateFromBriefResponses = {
19131
+ /**
19132
+ * Success
19133
+ */
19134
+ 201: TemplateFromBrief;
19135
+ };
19136
+ export type TemplatesCreateFromBriefResponse = TemplatesCreateFromBriefResponses[keyof TemplatesCreateFromBriefResponses];
18586
19137
  export type TemplatesCreateFromWebsiteData = {
18587
19138
  body: {
18588
19139
  /**
@@ -18650,6 +19201,9 @@ export type TemplatesCreateFromWebsiteResponses = {
18650
19201
  export type TemplatesCreateFromWebsiteResponse = TemplatesCreateFromWebsiteResponses[keyof TemplatesCreateFromWebsiteResponses];
18651
19202
  export type TemplatesAddEntryData = {
18652
19203
  body: {
19204
+ /**
19205
+ * A relative .tsx file under templates or emails/, at most 1024 characters, with no backslash, . or .., or .git segments.
19206
+ */
18653
19207
  entryPath: string;
18654
19208
  name: string;
18655
19209
  slug: string;
@@ -18758,6 +19312,9 @@ export type TemplatesPatchWorkspaceData = {
18758
19312
  body: {
18759
19313
  expectedRevision: string;
18760
19314
  patches: Array<{
19315
+ /**
19316
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
19317
+ */
18761
19318
  path: string;
18762
19319
  content: string | null;
18763
19320
  }>;
@@ -18833,6 +19390,9 @@ export type TemplatesPatchWorkspaceResponses = {
18833
19390
  status: "added" | "modified" | "deleted";
18834
19391
  }>;
18835
19392
  conflicts: Array<{
19393
+ /**
19394
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
19395
+ */
18836
19396
  path: string;
18837
19397
  base: string | null;
18838
19398
  draft: string | null;
@@ -18850,6 +19410,9 @@ export type TemplatesPatchWorkspaceResponses = {
18850
19410
  root: "/project";
18851
19411
  access: "read-write";
18852
19412
  } | {
19413
+ /**
19414
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
19415
+ */
18853
19416
  root: string;
18854
19417
  digest: string;
18855
19418
  fileCount: number;
@@ -18860,6 +19423,9 @@ export type TemplatesPatchWorkspaceResponses = {
18860
19423
  slug: string;
18861
19424
  name: string;
18862
19425
  } | {
19426
+ /**
19427
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
19428
+ */
18863
19429
  root: string;
18864
19430
  digest: string;
18865
19431
  fileCount: number;
@@ -18869,6 +19435,9 @@ export type TemplatesPatchWorkspaceResponses = {
18869
19435
  resourceId: string;
18870
19436
  name: string;
18871
19437
  } | {
19438
+ /**
19439
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
19440
+ */
18872
19441
  root: string;
18873
19442
  digest: string;
18874
19443
  fileCount: number;
@@ -18967,6 +19536,9 @@ export type TemplatesOpenWorkspaceResponses = {
18967
19536
  status: "added" | "modified" | "deleted";
18968
19537
  }>;
18969
19538
  conflicts: Array<{
19539
+ /**
19540
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
19541
+ */
18970
19542
  path: string;
18971
19543
  base: string | null;
18972
19544
  draft: string | null;
@@ -18984,6 +19556,9 @@ export type TemplatesOpenWorkspaceResponses = {
18984
19556
  root: "/project";
18985
19557
  access: "read-write";
18986
19558
  } | {
19559
+ /**
19560
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
19561
+ */
18987
19562
  root: string;
18988
19563
  digest: string;
18989
19564
  fileCount: number;
@@ -18994,6 +19569,9 @@ export type TemplatesOpenWorkspaceResponses = {
18994
19569
  slug: string;
18995
19570
  name: string;
18996
19571
  } | {
19572
+ /**
19573
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
19574
+ */
18997
19575
  root: string;
18998
19576
  digest: string;
18999
19577
  fileCount: number;
@@ -19003,6 +19581,9 @@ export type TemplatesOpenWorkspaceResponses = {
19003
19581
  resourceId: string;
19004
19582
  name: string;
19005
19583
  } | {
19584
+ /**
19585
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
19586
+ */
19006
19587
  root: string;
19007
19588
  digest: string;
19008
19589
  fileCount: number;
@@ -19089,6 +19670,9 @@ export type TemplatesDiffWorkspaceResponses = {
19089
19670
  baseCommit: string;
19090
19671
  revision: string;
19091
19672
  changes: Array<{
19673
+ /**
19674
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
19675
+ */
19092
19676
  path: string;
19093
19677
  before: string | null;
19094
19678
  after: string | null;
@@ -19105,6 +19689,9 @@ export type TemplatesDiffWorkspaceResponse = TemplatesDiffWorkspaceResponses[key
19105
19689
  export type TemplatesPutWorkspaceAssetData = {
19106
19690
  body: {
19107
19691
  expectedRevision: string;
19692
+ /**
19693
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
19694
+ */
19108
19695
  path: string;
19109
19696
  contentBase64: string;
19110
19697
  replace: boolean;
@@ -19180,6 +19767,9 @@ export type TemplatesPutWorkspaceAssetResponses = {
19180
19767
  status: "added" | "modified" | "deleted";
19181
19768
  }>;
19182
19769
  conflicts: Array<{
19770
+ /**
19771
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
19772
+ */
19183
19773
  path: string;
19184
19774
  base: string | null;
19185
19775
  draft: string | null;
@@ -19197,6 +19787,9 @@ export type TemplatesPutWorkspaceAssetResponses = {
19197
19787
  root: "/project";
19198
19788
  access: "read-write";
19199
19789
  } | {
19790
+ /**
19791
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
19792
+ */
19200
19793
  root: string;
19201
19794
  digest: string;
19202
19795
  fileCount: number;
@@ -19207,6 +19800,9 @@ export type TemplatesPutWorkspaceAssetResponses = {
19207
19800
  slug: string;
19208
19801
  name: string;
19209
19802
  } | {
19803
+ /**
19804
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
19805
+ */
19210
19806
  root: string;
19211
19807
  digest: string;
19212
19808
  fileCount: number;
@@ -19216,6 +19812,9 @@ export type TemplatesPutWorkspaceAssetResponses = {
19216
19812
  resourceId: string;
19217
19813
  name: string;
19218
19814
  } | {
19815
+ /**
19816
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
19817
+ */
19219
19818
  root: string;
19220
19819
  digest: string;
19221
19820
  fileCount: number;
@@ -19247,6 +19846,9 @@ export type TemplatesPutWorkspaceAssetResponse = TemplatesPutWorkspaceAssetRespo
19247
19846
  export type TemplatesResolveWorkspaceConflictData = {
19248
19847
  body: {
19249
19848
  expectedRevision: string;
19849
+ /**
19850
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
19851
+ */
19250
19852
  path: string;
19251
19853
  resolution: "draft" | "main" | {
19252
19854
  content: string | null;
@@ -19323,6 +19925,9 @@ export type TemplatesResolveWorkspaceConflictResponses = {
19323
19925
  status: "added" | "modified" | "deleted";
19324
19926
  }>;
19325
19927
  conflicts: Array<{
19928
+ /**
19929
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
19930
+ */
19326
19931
  path: string;
19327
19932
  base: string | null;
19328
19933
  draft: string | null;
@@ -19340,6 +19945,9 @@ export type TemplatesResolveWorkspaceConflictResponses = {
19340
19945
  root: "/project";
19341
19946
  access: "read-write";
19342
19947
  } | {
19948
+ /**
19949
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
19950
+ */
19343
19951
  root: string;
19344
19952
  digest: string;
19345
19953
  fileCount: number;
@@ -19350,6 +19958,9 @@ export type TemplatesResolveWorkspaceConflictResponses = {
19350
19958
  slug: string;
19351
19959
  name: string;
19352
19960
  } | {
19961
+ /**
19962
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
19963
+ */
19353
19964
  root: string;
19354
19965
  digest: string;
19355
19966
  fileCount: number;
@@ -19359,6 +19970,9 @@ export type TemplatesResolveWorkspaceConflictResponses = {
19359
19970
  resourceId: string;
19360
19971
  name: string;
19361
19972
  } | {
19973
+ /**
19974
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
19975
+ */
19362
19976
  root: string;
19363
19977
  digest: string;
19364
19978
  fileCount: number;
@@ -19579,6 +20193,9 @@ export type TemplatesRestoreWorkspaceResponses = {
19579
20193
  status: "added" | "modified" | "deleted";
19580
20194
  }>;
19581
20195
  conflicts: Array<{
20196
+ /**
20197
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
20198
+ */
19582
20199
  path: string;
19583
20200
  base: string | null;
19584
20201
  draft: string | null;
@@ -19596,6 +20213,9 @@ export type TemplatesRestoreWorkspaceResponses = {
19596
20213
  root: "/project";
19597
20214
  access: "read-write";
19598
20215
  } | {
20216
+ /**
20217
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
20218
+ */
19599
20219
  root: string;
19600
20220
  digest: string;
19601
20221
  fileCount: number;
@@ -19606,6 +20226,9 @@ export type TemplatesRestoreWorkspaceResponses = {
19606
20226
  slug: string;
19607
20227
  name: string;
19608
20228
  } | {
20229
+ /**
20230
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
20231
+ */
19609
20232
  root: string;
19610
20233
  digest: string;
19611
20234
  fileCount: number;
@@ -19615,6 +20238,9 @@ export type TemplatesRestoreWorkspaceResponses = {
19615
20238
  resourceId: string;
19616
20239
  name: string;
19617
20240
  } | {
20241
+ /**
20242
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
20243
+ */
19618
20244
  root: string;
19619
20245
  digest: string;
19620
20246
  fileCount: number;
@@ -19774,7 +20400,7 @@ export type TemplatesCheckWorkspaceResponses = {
19774
20400
  200: {
19775
20401
  projectId: TemplateProjectId;
19776
20402
  revision: string;
19777
- entryPath: string | string;
20403
+ entryPath: string;
19778
20404
  declaration: {
19779
20405
  codeDigest: string;
19780
20406
  templateId: string;
@@ -19788,6 +20414,9 @@ export type TemplatesCheckWorkspaceResponses = {
19788
20414
  fixtures: Array<string>;
19789
20415
  } | null;
19790
20416
  issue?: {
20417
+ /**
20418
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
20419
+ */
19791
20420
  path: string;
19792
20421
  frontmatter: {
19793
20422
  title: string;
@@ -19911,7 +20540,7 @@ export type TemplatesRenderWorkspaceFixtureResponses = {
19911
20540
  200: {
19912
20541
  projectId: TemplateProjectId;
19913
20542
  revision: string;
19914
- entryPath: string | string;
20543
+ entryPath: string;
19915
20544
  declaration: {
19916
20545
  codeDigest: string;
19917
20546
  templateId: string;
@@ -19925,6 +20554,9 @@ export type TemplatesRenderWorkspaceFixtureResponses = {
19925
20554
  fixtures: Array<string>;
19926
20555
  } | null;
19927
20556
  issue?: {
20557
+ /**
20558
+ * A .md file under issues/, at most 1024 characters, with no backslash, . or .., .git, or control characters.
20559
+ */
19928
20560
  path: string;
19929
20561
  frontmatter: {
19930
20562
  title: string;
@@ -20069,6 +20701,9 @@ export type TemplatesPublishData = {
20069
20701
  body: {
20070
20702
  projectId: TemplateProjectId;
20071
20703
  commitSha: string;
20704
+ /**
20705
+ * A relative .tsx file under templates or emails/, at most 1024 characters, with no backslash, . or .., or .git segments.
20706
+ */
20072
20707
  entryPath: string;
20073
20708
  expectedWorkspaceRevision: string;
20074
20709
  ifCurrentPublicationId?: TemplatePublicationId | null | undefined;
@@ -20130,6 +20765,9 @@ export type TemplatesPublishResponses = {
20130
20765
  inputContractId: TemplateInputContractId;
20131
20766
  commitSha: string;
20132
20767
  treeSha: string;
20768
+ /**
20769
+ * A relative .tsx file under templates or emails/, at most 1024 characters, with no backslash, . or .., or .git segments.
20770
+ */
20133
20771
  entryPath: string;
20134
20772
  buildIdentity: string;
20135
20773
  manifest: {
@@ -20158,7 +20796,7 @@ export type TemplatesPublishResponses = {
20158
20796
  source: {
20159
20797
  commitSha: string;
20160
20798
  treeSha: string;
20161
- entryPath: string | string;
20799
+ entryPath: string;
20162
20800
  treeDigest: string;
20163
20801
  };
20164
20802
  brand?: {
@@ -20288,6 +20926,9 @@ export type TemplatesGetPublicationResponses = {
20288
20926
  inputContractId: TemplateInputContractId;
20289
20927
  commitSha: string;
20290
20928
  treeSha: string;
20929
+ /**
20930
+ * A relative .tsx file under templates or emails/, at most 1024 characters, with no backslash, . or .., or .git segments.
20931
+ */
20291
20932
  entryPath: string;
20292
20933
  buildIdentity: string;
20293
20934
  manifest: {
@@ -20316,7 +20957,7 @@ export type TemplatesGetPublicationResponses = {
20316
20957
  source: {
20317
20958
  commitSha: string;
20318
20959
  treeSha: string;
20319
- entryPath: string | string;
20960
+ entryPath: string;
20320
20961
  treeDigest: string;
20321
20962
  };
20322
20963
  brand?: {
@@ -20685,6 +21326,9 @@ export type TemplatesAttachWorkspaceResourceData = {
20685
21326
  resourceId: string;
20686
21327
  name: string;
20687
21328
  files: Array<{
21329
+ /**
21330
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
21331
+ */
20688
21332
  path: string;
20689
21333
  mediaType: string;
20690
21334
  contentBase64: string;
@@ -20761,6 +21405,9 @@ export type TemplatesAttachWorkspaceResourceResponses = {
20761
21405
  status: "added" | "modified" | "deleted";
20762
21406
  }>;
20763
21407
  conflicts: Array<{
21408
+ /**
21409
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
21410
+ */
20764
21411
  path: string;
20765
21412
  base: string | null;
20766
21413
  draft: string | null;
@@ -20778,6 +21425,9 @@ export type TemplatesAttachWorkspaceResourceResponses = {
20778
21425
  root: "/project";
20779
21426
  access: "read-write";
20780
21427
  } | {
21428
+ /**
21429
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
21430
+ */
20781
21431
  root: string;
20782
21432
  digest: string;
20783
21433
  fileCount: number;
@@ -20788,6 +21438,9 @@ export type TemplatesAttachWorkspaceResourceResponses = {
20788
21438
  slug: string;
20789
21439
  name: string;
20790
21440
  } | {
21441
+ /**
21442
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
21443
+ */
20791
21444
  root: string;
20792
21445
  digest: string;
20793
21446
  fileCount: number;
@@ -20797,6 +21450,9 @@ export type TemplatesAttachWorkspaceResourceResponses = {
20797
21450
  resourceId: string;
20798
21451
  name: string;
20799
21452
  } | {
21453
+ /**
21454
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
21455
+ */
20800
21456
  root: string;
20801
21457
  digest: string;
20802
21458
  fileCount: number;
@@ -20896,6 +21552,9 @@ export type TemplatesRemoveWorkspaceResourceResponses = {
20896
21552
  status: "added" | "modified" | "deleted";
20897
21553
  }>;
20898
21554
  conflicts: Array<{
21555
+ /**
21556
+ * A relative path of 1–1024 characters with no backslash, . or .., or .git segments.
21557
+ */
20899
21558
  path: string;
20900
21559
  base: string | null;
20901
21560
  draft: string | null;
@@ -20913,6 +21572,9 @@ export type TemplatesRemoveWorkspaceResourceResponses = {
20913
21572
  root: "/project";
20914
21573
  access: "read-write";
20915
21574
  } | {
21575
+ /**
21576
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
21577
+ */
20916
21578
  root: string;
20917
21579
  digest: string;
20918
21580
  fileCount: number;
@@ -20923,6 +21585,9 @@ export type TemplatesRemoveWorkspaceResourceResponses = {
20923
21585
  slug: string;
20924
21586
  name: string;
20925
21587
  } | {
21588
+ /**
21589
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
21590
+ */
20926
21591
  root: string;
20927
21592
  digest: string;
20928
21593
  fileCount: number;
@@ -20932,6 +21597,9 @@ export type TemplatesRemoveWorkspaceResourceResponses = {
20932
21597
  resourceId: string;
20933
21598
  name: string;
20934
21599
  } | {
21600
+ /**
21601
+ * An absolute path under a workspace mount root, at most 2048 characters, with no . or .., or .git segments.
21602
+ */
20935
21603
  root: string;
20936
21604
  digest: string;
20937
21605
  fileCount: number;
@@ -27536,3 +28204,1575 @@ export type ExtensionInstallationsGetRunResponses = {
27536
28204
  200: ExtensionRun;
27537
28205
  };
27538
28206
  export type ExtensionInstallationsGetRunResponse = ExtensionInstallationsGetRunResponses[keyof ExtensionInstallationsGetRunResponses];
28207
+ export type WhatsappGetStatsData = {
28208
+ body?: never;
28209
+ path?: never;
28210
+ query?: {
28211
+ startDate?: string | undefined;
28212
+ endDate?: string | undefined;
28213
+ };
28214
+ url: "/v1/whatsapp/stats";
28215
+ };
28216
+ export type WhatsappGetStatsErrors = {
28217
+ /**
28218
+ * MalformedRequestError
28219
+ */
28220
+ 400: MalformedRequestError;
28221
+ /**
28222
+ * UnauthorizedError
28223
+ */
28224
+ 401: UnauthorizedError;
28225
+ /**
28226
+ * FlagDisabledError | ForbiddenError
28227
+ */
28228
+ 403: FlagDisabledError | ForbiddenError;
28229
+ /**
28230
+ * ValidationError
28231
+ */
28232
+ 422: ValidationError;
28233
+ /**
28234
+ * InternalError
28235
+ */
28236
+ 500: InternalError;
28237
+ /**
28238
+ * GatewayTimeoutError
28239
+ */
28240
+ 504: GatewayTimeoutError;
28241
+ };
28242
+ export type WhatsappGetStatsError = WhatsappGetStatsErrors[keyof WhatsappGetStatsErrors];
28243
+ export type WhatsappGetStatsResponses = {
28244
+ /**
28245
+ * Success
28246
+ */
28247
+ 200: {
28248
+ totalSent: number;
28249
+ totalDelivered: number;
28250
+ totalRead: number;
28251
+ totalFailed: number;
28252
+ deliveryRate: number;
28253
+ readRate: number;
28254
+ failureRate: number;
28255
+ };
28256
+ };
28257
+ export type WhatsappGetStatsResponse = WhatsappGetStatsResponses[keyof WhatsappGetStatsResponses];
28258
+ export type WhatsappGetTemplateStatsData = {
28259
+ body?: never;
28260
+ path?: never;
28261
+ query?: {
28262
+ startDate?: string | undefined;
28263
+ endDate?: string | undefined;
28264
+ templateId?: TemplateId | undefined;
28265
+ campaignId?: CampaignId | undefined;
28266
+ journeyId?: JourneyId | undefined;
28267
+ };
28268
+ url: "/v1/whatsapp/templates/stats";
28269
+ };
28270
+ export type WhatsappGetTemplateStatsErrors = {
28271
+ /**
28272
+ * MalformedRequestError
28273
+ */
28274
+ 400: MalformedRequestError;
28275
+ /**
28276
+ * UnauthorizedError
28277
+ */
28278
+ 401: UnauthorizedError;
28279
+ /**
28280
+ * FlagDisabledError | ForbiddenError
28281
+ */
28282
+ 403: FlagDisabledError | ForbiddenError;
28283
+ /**
28284
+ * ValidationError
28285
+ */
28286
+ 422: ValidationError;
28287
+ /**
28288
+ * InternalError
28289
+ */
28290
+ 500: InternalError;
28291
+ /**
28292
+ * GatewayTimeoutError
28293
+ */
28294
+ 504: GatewayTimeoutError;
28295
+ };
28296
+ export type WhatsappGetTemplateStatsError = WhatsappGetTemplateStatsErrors[keyof WhatsappGetTemplateStatsErrors];
28297
+ export type WhatsappGetTemplateStatsResponses = {
28298
+ /**
28299
+ * WhatsAppTemplateStats
28300
+ */
28301
+ 200: WhatsAppTemplateStats;
28302
+ };
28303
+ export type WhatsappGetTemplateStatsResponse = WhatsappGetTemplateStatsResponses[keyof WhatsappGetTemplateStatsResponses];
28304
+ export type WhatsappGetServiceWindowStatusData = {
28305
+ body?: never;
28306
+ path?: never;
28307
+ query: {
28308
+ customerPhone: string;
28309
+ businessPhone: string;
28310
+ };
28311
+ url: "/v1/whatsapp/service-window/status";
28312
+ };
28313
+ export type WhatsappGetServiceWindowStatusErrors = {
28314
+ /**
28315
+ * MalformedRequestError
28316
+ */
28317
+ 400: MalformedRequestError;
28318
+ /**
28319
+ * UnauthorizedError
28320
+ */
28321
+ 401: UnauthorizedError;
28322
+ /**
28323
+ * FlagDisabledError | ForbiddenError
28324
+ */
28325
+ 403: FlagDisabledError | ForbiddenError;
28326
+ /**
28327
+ * ResourceNotFoundError
28328
+ */
28329
+ 404: ResourceNotFoundError;
28330
+ /**
28331
+ * ValidationError
28332
+ */
28333
+ 422: ValidationError;
28334
+ /**
28335
+ * InternalError
28336
+ */
28337
+ 500: InternalError;
28338
+ /**
28339
+ * GatewayTimeoutError
28340
+ */
28341
+ 504: GatewayTimeoutError;
28342
+ };
28343
+ export type WhatsappGetServiceWindowStatusError = WhatsappGetServiceWindowStatusErrors[keyof WhatsappGetServiceWindowStatusErrors];
28344
+ export type WhatsappGetServiceWindowStatusResponses = {
28345
+ /**
28346
+ * Success
28347
+ */
28348
+ 200: {
28349
+ serviceWindowId: WhatsAppServiceWindowId;
28350
+ isServiceWindowActive: boolean;
28351
+ isFreeEntryPointActive: boolean;
28352
+ serviceWindowExpiresAt: string | null;
28353
+ freeEntryPointExpiresAt: string | null;
28354
+ };
28355
+ };
28356
+ export type WhatsappGetServiceWindowStatusResponse = WhatsappGetServiceWindowStatusResponses[keyof WhatsappGetServiceWindowStatusResponses];
28357
+ export type WhatsappGetServiceWindowBillingData = {
28358
+ body?: never;
28359
+ path?: never;
28360
+ query: {
28361
+ serviceWindowId: WhatsAppServiceWindowId;
28362
+ };
28363
+ url: "/v1/whatsapp/service-window/billing";
28364
+ };
28365
+ export type WhatsappGetServiceWindowBillingErrors = {
28366
+ /**
28367
+ * MalformedRequestError
28368
+ */
28369
+ 400: MalformedRequestError;
28370
+ /**
28371
+ * UnauthorizedError
28372
+ */
28373
+ 401: UnauthorizedError;
28374
+ /**
28375
+ * FlagDisabledError | ForbiddenError
28376
+ */
28377
+ 403: FlagDisabledError | ForbiddenError;
28378
+ /**
28379
+ * ResourceNotFoundError
28380
+ */
28381
+ 404: ResourceNotFoundError;
28382
+ /**
28383
+ * ValidationError
28384
+ */
28385
+ 422: ValidationError;
28386
+ /**
28387
+ * InternalError
28388
+ */
28389
+ 500: InternalError;
28390
+ /**
28391
+ * GatewayTimeoutError
28392
+ */
28393
+ 504: GatewayTimeoutError;
28394
+ };
28395
+ export type WhatsappGetServiceWindowBillingError = WhatsappGetServiceWindowBillingErrors[keyof WhatsappGetServiceWindowBillingErrors];
28396
+ export type WhatsappGetServiceWindowBillingResponses = {
28397
+ /**
28398
+ * Success
28399
+ */
28400
+ 200: {
28401
+ totalMessages: number;
28402
+ totalFreeMessages: number;
28403
+ totalPaidMessages: number;
28404
+ estimatedProviderCosts: Array<MoneyAmount>;
28405
+ };
28406
+ };
28407
+ export type WhatsappGetServiceWindowBillingResponse = WhatsappGetServiceWindowBillingResponses[keyof WhatsappGetServiceWindowBillingResponses];
28408
+ export type WhatsappGetMediaDownloadUrlData = {
28409
+ body?: never;
28410
+ path: {
28411
+ deliveryId: MessageDeliveryId;
28412
+ };
28413
+ query?: never;
28414
+ url: "/v1/whatsapp/media/{deliveryId}/download-url";
28415
+ };
28416
+ export type WhatsappGetMediaDownloadUrlErrors = {
28417
+ /**
28418
+ * MalformedRequestError
28419
+ */
28420
+ 400: MalformedRequestError;
28421
+ /**
28422
+ * UnauthorizedError
28423
+ */
28424
+ 401: UnauthorizedError;
28425
+ /**
28426
+ * FlagDisabledError | ForbiddenError
28427
+ */
28428
+ 403: FlagDisabledError | ForbiddenError;
28429
+ /**
28430
+ * ResourceNotFoundError
28431
+ */
28432
+ 404: ResourceNotFoundError;
28433
+ /**
28434
+ * ValidationError
28435
+ */
28436
+ 422: ValidationError;
28437
+ /**
28438
+ * InternalError
28439
+ */
28440
+ 500: InternalError;
28441
+ /**
28442
+ * GatewayTimeoutError
28443
+ */
28444
+ 504: GatewayTimeoutError;
28445
+ };
28446
+ export type WhatsappGetMediaDownloadUrlError = WhatsappGetMediaDownloadUrlErrors[keyof WhatsappGetMediaDownloadUrlErrors];
28447
+ export type WhatsappGetMediaDownloadUrlResponses = {
28448
+ /**
28449
+ * Success
28450
+ */
28451
+ 200: {
28452
+ url: string;
28453
+ expiresAt: string;
28454
+ };
28455
+ };
28456
+ export type WhatsappGetMediaDownloadUrlResponse = WhatsappGetMediaDownloadUrlResponses[keyof WhatsappGetMediaDownloadUrlResponses];
28457
+ export type WhatsappListBusinessAccountsData = {
28458
+ body?: never;
28459
+ path?: never;
28460
+ query?: {
28461
+ page?: number | null | undefined;
28462
+ limit?: number | null | undefined;
28463
+ isActive?: boolean | null | undefined;
28464
+ verificationStatus?: "pending" | "verified" | "failed" | "suspended" | undefined;
28465
+ namespaceId?: NamespaceId | undefined;
28466
+ };
28467
+ url: "/v1/whatsapp/business-accounts";
28468
+ };
28469
+ export type WhatsappListBusinessAccountsErrors = {
28470
+ /**
28471
+ * MalformedRequestError
28472
+ */
28473
+ 400: MalformedRequestError;
28474
+ /**
28475
+ * UnauthorizedError
28476
+ */
28477
+ 401: UnauthorizedError;
28478
+ /**
28479
+ * ForbiddenError | FlagDisabledError
28480
+ */
28481
+ 403: ForbiddenError | FlagDisabledError;
28482
+ /**
28483
+ * ValidationError
28484
+ */
28485
+ 422: ValidationError;
28486
+ /**
28487
+ * InternalError
28488
+ */
28489
+ 500: InternalError;
28490
+ /**
28491
+ * GatewayTimeoutError
28492
+ */
28493
+ 504: GatewayTimeoutError;
28494
+ };
28495
+ export type WhatsappListBusinessAccountsError = WhatsappListBusinessAccountsErrors[keyof WhatsappListBusinessAccountsErrors];
28496
+ export type WhatsappListBusinessAccountsResponses = {
28497
+ /**
28498
+ * Success
28499
+ */
28500
+ 200: {
28501
+ items: Array<{
28502
+ id: WhatsAppBusinessAccountId;
28503
+ organizationId: string;
28504
+ namespaceId: NamespaceId | null;
28505
+ phoneNumber: string;
28506
+ phoneNumberId: string;
28507
+ displayName: string;
28508
+ whatsappBusinessAccountId: string;
28509
+ verificationStatus: "pending" | "verified" | "failed" | "suspended";
28510
+ credentialStatus: "active" | "reconnect_required";
28511
+ tokenExpiresAt: string | null;
28512
+ isDefault: boolean;
28513
+ webhookUrl: string | null;
28514
+ qualityRating: "green" | "yellow" | "red" | "unknown";
28515
+ messagingLimit: string | null;
28516
+ currentLimit: number;
28517
+ businessPortfolioId: string | null;
28518
+ businessAppConnectedAt: string | null;
28519
+ businessAppDisconnectedAt: string | null;
28520
+ businessAppDisconnectReason: "partnerRemoved" | "offboarded" | "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "primaryInactivity" | "userReRegistered" | null;
28521
+ contactsSyncRequestedAt: string | null;
28522
+ historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
28523
+ historySyncProgress: number | null;
28524
+ isActive: boolean;
28525
+ createdAt: string;
28526
+ updatedAt: string;
28527
+ }>;
28528
+ pagination: PaginationMeta;
28529
+ };
28530
+ };
28531
+ export type WhatsappListBusinessAccountsResponse = WhatsappListBusinessAccountsResponses[keyof WhatsappListBusinessAccountsResponses];
28532
+ export type WhatsappConnectBusinessAccountData = {
28533
+ body: {
28534
+ code: string;
28535
+ wabaId: string;
28536
+ phoneNumberId: string;
28537
+ namespaceId?: NamespaceId | null | undefined;
28538
+ };
28539
+ path?: never;
28540
+ query?: never;
28541
+ url: "/v1/whatsapp/business-accounts";
28542
+ };
28543
+ export type WhatsappConnectBusinessAccountErrors = {
28544
+ /**
28545
+ * MalformedRequestError
28546
+ */
28547
+ 400: MalformedRequestError;
28548
+ /**
28549
+ * UnauthorizedError
28550
+ */
28551
+ 401: UnauthorizedError;
28552
+ /**
28553
+ * PaymentRequiredError
28554
+ */
28555
+ 402: PaymentRequiredError;
28556
+ /**
28557
+ * ForbiddenError | FlagDisabledError
28558
+ */
28559
+ 403: ForbiddenError | FlagDisabledError;
28560
+ /**
28561
+ * ResourceNotFoundError
28562
+ */
28563
+ 404: ResourceNotFoundError;
28564
+ /**
28565
+ * ConflictError
28566
+ */
28567
+ 409: ConflictError;
28568
+ /**
28569
+ * ValidationError
28570
+ */
28571
+ 422: ValidationError;
28572
+ /**
28573
+ * InternalError | CredentialsError
28574
+ */
28575
+ 500: InternalError | CredentialsError;
28576
+ /**
28577
+ * WhatsAppChannelError | BillingProviderError
28578
+ */
28579
+ 502: WhatsAppChannelError | BillingProviderError;
28580
+ /**
28581
+ * GatewayTimeoutError
28582
+ */
28583
+ 504: GatewayTimeoutError;
28584
+ };
28585
+ export type WhatsappConnectBusinessAccountError = WhatsappConnectBusinessAccountErrors[keyof WhatsappConnectBusinessAccountErrors];
28586
+ export type WhatsappConnectBusinessAccountResponses = {
28587
+ /**
28588
+ * Success
28589
+ */
28590
+ 201: {
28591
+ id: WhatsAppBusinessAccountId;
28592
+ organizationId: string;
28593
+ namespaceId: NamespaceId | null;
28594
+ phoneNumber: string;
28595
+ phoneNumberId: string;
28596
+ displayName: string;
28597
+ whatsappBusinessAccountId: string;
28598
+ verificationStatus: "pending" | "verified" | "failed" | "suspended";
28599
+ credentialStatus: "active" | "reconnect_required";
28600
+ tokenExpiresAt: string | null;
28601
+ isDefault: boolean;
28602
+ webhookUrl: string | null;
28603
+ qualityRating: "green" | "yellow" | "red" | "unknown";
28604
+ messagingLimit: string | null;
28605
+ currentLimit: number;
28606
+ businessPortfolioId: string | null;
28607
+ businessAppConnectedAt: string | null;
28608
+ businessAppDisconnectedAt: string | null;
28609
+ businessAppDisconnectReason: "partnerRemoved" | "offboarded" | "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "primaryInactivity" | "userReRegistered" | null;
28610
+ contactsSyncRequestedAt: string | null;
28611
+ historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
28612
+ historySyncProgress: number | null;
28613
+ isActive: boolean;
28614
+ createdAt: string;
28615
+ updatedAt: string;
28616
+ };
28617
+ };
28618
+ export type WhatsappConnectBusinessAccountResponse = WhatsappConnectBusinessAccountResponses[keyof WhatsappConnectBusinessAccountResponses];
28619
+ export type WhatsappDisconnectBusinessAccountData = {
28620
+ body?: never;
28621
+ path: {
28622
+ accountId: WhatsAppBusinessAccountId;
28623
+ };
28624
+ query?: never;
28625
+ url: "/v1/whatsapp/business-accounts/{accountId}";
28626
+ };
28627
+ export type WhatsappDisconnectBusinessAccountErrors = {
28628
+ /**
28629
+ * MalformedRequestError
28630
+ */
28631
+ 400: MalformedRequestError;
28632
+ /**
28633
+ * UnauthorizedError
28634
+ */
28635
+ 401: UnauthorizedError;
28636
+ /**
28637
+ * FlagDisabledError | ForbiddenError
28638
+ */
28639
+ 403: FlagDisabledError | ForbiddenError;
28640
+ /**
28641
+ * ResourceNotFoundError
28642
+ */
28643
+ 404: ResourceNotFoundError;
28644
+ /**
28645
+ * ValidationError
28646
+ */
28647
+ 422: ValidationError;
28648
+ /**
28649
+ * InternalError
28650
+ */
28651
+ 500: InternalError;
28652
+ /**
28653
+ * GatewayTimeoutError
28654
+ */
28655
+ 504: GatewayTimeoutError;
28656
+ };
28657
+ export type WhatsappDisconnectBusinessAccountError = WhatsappDisconnectBusinessAccountErrors[keyof WhatsappDisconnectBusinessAccountErrors];
28658
+ export type WhatsappDisconnectBusinessAccountResponses = {
28659
+ /**
28660
+ * Success
28661
+ */
28662
+ 200: {
28663
+ success: true;
28664
+ };
28665
+ };
28666
+ export type WhatsappDisconnectBusinessAccountResponse = WhatsappDisconnectBusinessAccountResponses[keyof WhatsappDisconnectBusinessAccountResponses];
28667
+ export type WhatsappGetBusinessAccountData = {
28668
+ body?: never;
28669
+ path: {
28670
+ accountId: WhatsAppBusinessAccountId;
28671
+ };
28672
+ query?: never;
28673
+ url: "/v1/whatsapp/business-accounts/{accountId}";
28674
+ };
28675
+ export type WhatsappGetBusinessAccountErrors = {
28676
+ /**
28677
+ * MalformedRequestError
28678
+ */
28679
+ 400: MalformedRequestError;
28680
+ /**
28681
+ * UnauthorizedError
28682
+ */
28683
+ 401: UnauthorizedError;
28684
+ /**
28685
+ * FlagDisabledError | ForbiddenError
28686
+ */
28687
+ 403: FlagDisabledError | ForbiddenError;
28688
+ /**
28689
+ * ResourceNotFoundError
28690
+ */
28691
+ 404: ResourceNotFoundError;
28692
+ /**
28693
+ * ValidationError
28694
+ */
28695
+ 422: ValidationError;
28696
+ /**
28697
+ * InternalError
28698
+ */
28699
+ 500: InternalError;
28700
+ /**
28701
+ * GatewayTimeoutError
28702
+ */
28703
+ 504: GatewayTimeoutError;
28704
+ };
28705
+ export type WhatsappGetBusinessAccountError = WhatsappGetBusinessAccountErrors[keyof WhatsappGetBusinessAccountErrors];
28706
+ export type WhatsappGetBusinessAccountResponses = {
28707
+ /**
28708
+ * Success
28709
+ */
28710
+ 200: {
28711
+ id: WhatsAppBusinessAccountId;
28712
+ organizationId: string;
28713
+ namespaceId: NamespaceId | null;
28714
+ phoneNumber: string;
28715
+ phoneNumberId: string;
28716
+ displayName: string;
28717
+ whatsappBusinessAccountId: string;
28718
+ verificationStatus: "pending" | "verified" | "failed" | "suspended";
28719
+ credentialStatus: "active" | "reconnect_required";
28720
+ tokenExpiresAt: string | null;
28721
+ isDefault: boolean;
28722
+ webhookUrl: string | null;
28723
+ qualityRating: "green" | "yellow" | "red" | "unknown";
28724
+ messagingLimit: string | null;
28725
+ currentLimit: number;
28726
+ businessPortfolioId: string | null;
28727
+ businessAppConnectedAt: string | null;
28728
+ businessAppDisconnectedAt: string | null;
28729
+ businessAppDisconnectReason: "partnerRemoved" | "offboarded" | "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "primaryInactivity" | "userReRegistered" | null;
28730
+ contactsSyncRequestedAt: string | null;
28731
+ historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
28732
+ historySyncProgress: number | null;
28733
+ isActive: boolean;
28734
+ createdAt: string;
28735
+ updatedAt: string;
28736
+ };
28737
+ };
28738
+ export type WhatsappGetBusinessAccountResponse = WhatsappGetBusinessAccountResponses[keyof WhatsappGetBusinessAccountResponses];
28739
+ export type WhatsappUpdateBusinessAccountData = {
28740
+ body: {
28741
+ displayName?: string | null | undefined;
28742
+ webhookUrl?: string | null | undefined;
28743
+ };
28744
+ path: {
28745
+ accountId: WhatsAppBusinessAccountId;
28746
+ };
28747
+ query?: never;
28748
+ url: "/v1/whatsapp/business-accounts/{accountId}";
28749
+ };
28750
+ export type WhatsappUpdateBusinessAccountErrors = {
28751
+ /**
28752
+ * MalformedRequestError
28753
+ */
28754
+ 400: MalformedRequestError;
28755
+ /**
28756
+ * UnauthorizedError
28757
+ */
28758
+ 401: UnauthorizedError;
28759
+ /**
28760
+ * FlagDisabledError | ForbiddenError
28761
+ */
28762
+ 403: FlagDisabledError | ForbiddenError;
28763
+ /**
28764
+ * ResourceNotFoundError
28765
+ */
28766
+ 404: ResourceNotFoundError;
28767
+ /**
28768
+ * ValidationError
28769
+ */
28770
+ 422: ValidationError;
28771
+ /**
28772
+ * InternalError
28773
+ */
28774
+ 500: InternalError;
28775
+ /**
28776
+ * GatewayTimeoutError
28777
+ */
28778
+ 504: GatewayTimeoutError;
28779
+ };
28780
+ export type WhatsappUpdateBusinessAccountError = WhatsappUpdateBusinessAccountErrors[keyof WhatsappUpdateBusinessAccountErrors];
28781
+ export type WhatsappUpdateBusinessAccountResponses = {
28782
+ /**
28783
+ * Success
28784
+ */
28785
+ 200: {
28786
+ id: WhatsAppBusinessAccountId;
28787
+ organizationId: string;
28788
+ namespaceId: NamespaceId | null;
28789
+ phoneNumber: string;
28790
+ phoneNumberId: string;
28791
+ displayName: string;
28792
+ whatsappBusinessAccountId: string;
28793
+ verificationStatus: "pending" | "verified" | "failed" | "suspended";
28794
+ credentialStatus: "active" | "reconnect_required";
28795
+ tokenExpiresAt: string | null;
28796
+ isDefault: boolean;
28797
+ webhookUrl: string | null;
28798
+ qualityRating: "green" | "yellow" | "red" | "unknown";
28799
+ messagingLimit: string | null;
28800
+ currentLimit: number;
28801
+ businessPortfolioId: string | null;
28802
+ businessAppConnectedAt: string | null;
28803
+ businessAppDisconnectedAt: string | null;
28804
+ businessAppDisconnectReason: "partnerRemoved" | "offboarded" | "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "primaryInactivity" | "userReRegistered" | null;
28805
+ contactsSyncRequestedAt: string | null;
28806
+ historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
28807
+ historySyncProgress: number | null;
28808
+ isActive: boolean;
28809
+ createdAt: string;
28810
+ updatedAt: string;
28811
+ };
28812
+ };
28813
+ export type WhatsappUpdateBusinessAccountResponse = WhatsappUpdateBusinessAccountResponses[keyof WhatsappUpdateBusinessAccountResponses];
28814
+ export type WhatsappSetDefaultBusinessAccountData = {
28815
+ body?: never;
28816
+ path: {
28817
+ accountId: WhatsAppBusinessAccountId;
28818
+ };
28819
+ query?: never;
28820
+ url: "/v1/whatsapp/business-accounts/{accountId}/set-default";
28821
+ };
28822
+ export type WhatsappSetDefaultBusinessAccountErrors = {
28823
+ /**
28824
+ * MalformedRequestError
28825
+ */
28826
+ 400: MalformedRequestError;
28827
+ /**
28828
+ * UnauthorizedError
28829
+ */
28830
+ 401: UnauthorizedError;
28831
+ /**
28832
+ * FlagDisabledError | ForbiddenError
28833
+ */
28834
+ 403: FlagDisabledError | ForbiddenError;
28835
+ /**
28836
+ * ResourceNotFoundError
28837
+ */
28838
+ 404: ResourceNotFoundError;
28839
+ /**
28840
+ * ValidationError
28841
+ */
28842
+ 422: ValidationError;
28843
+ /**
28844
+ * InternalError
28845
+ */
28846
+ 500: InternalError;
28847
+ /**
28848
+ * GatewayTimeoutError
28849
+ */
28850
+ 504: GatewayTimeoutError;
28851
+ };
28852
+ export type WhatsappSetDefaultBusinessAccountError = WhatsappSetDefaultBusinessAccountErrors[keyof WhatsappSetDefaultBusinessAccountErrors];
28853
+ export type WhatsappSetDefaultBusinessAccountResponses = {
28854
+ /**
28855
+ * Success
28856
+ */
28857
+ 200: {
28858
+ id: WhatsAppBusinessAccountId;
28859
+ organizationId: string;
28860
+ namespaceId: NamespaceId | null;
28861
+ phoneNumber: string;
28862
+ phoneNumberId: string;
28863
+ displayName: string;
28864
+ whatsappBusinessAccountId: string;
28865
+ verificationStatus: "pending" | "verified" | "failed" | "suspended";
28866
+ credentialStatus: "active" | "reconnect_required";
28867
+ tokenExpiresAt: string | null;
28868
+ isDefault: boolean;
28869
+ webhookUrl: string | null;
28870
+ qualityRating: "green" | "yellow" | "red" | "unknown";
28871
+ messagingLimit: string | null;
28872
+ currentLimit: number;
28873
+ businessPortfolioId: string | null;
28874
+ businessAppConnectedAt: string | null;
28875
+ businessAppDisconnectedAt: string | null;
28876
+ businessAppDisconnectReason: "partnerRemoved" | "offboarded" | "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "primaryInactivity" | "userReRegistered" | null;
28877
+ contactsSyncRequestedAt: string | null;
28878
+ historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
28879
+ historySyncProgress: number | null;
28880
+ isActive: boolean;
28881
+ createdAt: string;
28882
+ updatedAt: string;
28883
+ };
28884
+ };
28885
+ export type WhatsappSetDefaultBusinessAccountResponse = WhatsappSetDefaultBusinessAccountResponses[keyof WhatsappSetDefaultBusinessAccountResponses];
28886
+ export type WhatsappSyncAccountStatusData = {
28887
+ body?: never;
28888
+ path: {
28889
+ accountId: WhatsAppBusinessAccountId;
28890
+ };
28891
+ query?: never;
28892
+ url: "/v1/whatsapp/business-accounts/{accountId}/sync";
28893
+ };
28894
+ export type WhatsappSyncAccountStatusErrors = {
28895
+ /**
28896
+ * MalformedRequestError
28897
+ */
28898
+ 400: MalformedRequestError;
28899
+ /**
28900
+ * UnauthorizedError
28901
+ */
28902
+ 401: UnauthorizedError;
28903
+ /**
28904
+ * FlagDisabledError | ForbiddenError
28905
+ */
28906
+ 403: FlagDisabledError | ForbiddenError;
28907
+ /**
28908
+ * ResourceNotFoundError
28909
+ */
28910
+ 404: ResourceNotFoundError;
28911
+ /**
28912
+ * ValidationError
28913
+ */
28914
+ 422: ValidationError;
28915
+ /**
28916
+ * InternalError | CredentialsError
28917
+ */
28918
+ 500: InternalError | CredentialsError;
28919
+ /**
28920
+ * WhatsAppChannelError
28921
+ */
28922
+ 502: WhatsAppChannelError;
28923
+ /**
28924
+ * GatewayTimeoutError
28925
+ */
28926
+ 504: GatewayTimeoutError;
28927
+ };
28928
+ export type WhatsappSyncAccountStatusError = WhatsappSyncAccountStatusErrors[keyof WhatsappSyncAccountStatusErrors];
28929
+ export type WhatsappSyncAccountStatusResponses = {
28930
+ /**
28931
+ * Success
28932
+ */
28933
+ 200: {
28934
+ id: WhatsAppBusinessAccountId;
28935
+ qualityRating: "green" | "yellow" | "red" | "unknown";
28936
+ messagingLimit: string | null;
28937
+ currentLimit: number;
28938
+ businessPortfolioId: string | null;
28939
+ verificationStatus: "pending" | "verified" | "failed" | "suspended";
28940
+ syncedAt: string;
28941
+ };
28942
+ };
28943
+ export type WhatsappSyncAccountStatusResponse = WhatsappSyncAccountStatusResponses[keyof WhatsappSyncAccountStatusResponses];
28944
+ export type WhatsappFlowsListData = {
28945
+ body?: never;
28946
+ path?: never;
28947
+ query?: never;
28948
+ url: "/v1/whatsapp/flows";
28949
+ };
28950
+ export type WhatsappFlowsListErrors = {
28951
+ /**
28952
+ * MalformedRequestError
28953
+ */
28954
+ 400: MalformedRequestError;
28955
+ /**
28956
+ * UnauthorizedError
28957
+ */
28958
+ 401: UnauthorizedError;
28959
+ /**
28960
+ * FlagDisabledError | ForbiddenError
28961
+ */
28962
+ 403: FlagDisabledError | ForbiddenError;
28963
+ /**
28964
+ * ValidationError
28965
+ */
28966
+ 422: ValidationError;
28967
+ /**
28968
+ * InternalError
28969
+ */
28970
+ 500: InternalError;
28971
+ /**
28972
+ * GatewayTimeoutError
28973
+ */
28974
+ 504: GatewayTimeoutError;
28975
+ };
28976
+ export type WhatsappFlowsListError = WhatsappFlowsListErrors[keyof WhatsappFlowsListErrors];
28977
+ export type WhatsappFlowsListResponses = {
28978
+ /**
28979
+ * WhatsAppFlowList
28980
+ */
28981
+ 200: WhatsAppFlowList;
28982
+ };
28983
+ export type WhatsappFlowsListResponse = WhatsappFlowsListResponses[keyof WhatsappFlowsListResponses];
28984
+ export type WhatsappFlowsCreateData = {
28985
+ body: {
28986
+ projectId: TemplateProjectId;
28987
+ handle: string;
28988
+ categories: Array<"SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER">;
28989
+ };
28990
+ path?: never;
28991
+ query?: never;
28992
+ url: "/v1/whatsapp/flows";
28993
+ };
28994
+ export type WhatsappFlowsCreateErrors = {
28995
+ /**
28996
+ * MalformedRequestError
28997
+ */
28998
+ 400: MalformedRequestError;
28999
+ /**
29000
+ * UnauthorizedError
29001
+ */
29002
+ 401: UnauthorizedError;
29003
+ /**
29004
+ * FlagDisabledError | ForbiddenError
29005
+ */
29006
+ 403: FlagDisabledError | ForbiddenError;
29007
+ /**
29008
+ * ResourceNotFoundError
29009
+ */
29010
+ 404: ResourceNotFoundError;
29011
+ /**
29012
+ * ConflictError
29013
+ */
29014
+ 409: ConflictError;
29015
+ /**
29016
+ * ValidationError
29017
+ */
29018
+ 422: ValidationError;
29019
+ /**
29020
+ * InternalError
29021
+ */
29022
+ 500: InternalError;
29023
+ /**
29024
+ * GatewayTimeoutError
29025
+ */
29026
+ 504: GatewayTimeoutError;
29027
+ };
29028
+ export type WhatsappFlowsCreateError = WhatsappFlowsCreateErrors[keyof WhatsappFlowsCreateErrors];
29029
+ export type WhatsappFlowsCreateResponses = {
29030
+ /**
29031
+ * WhatsAppFlow
29032
+ */
29033
+ 201: WhatsAppFlow;
29034
+ };
29035
+ export type WhatsappFlowsCreateResponse = WhatsappFlowsCreateResponses[keyof WhatsappFlowsCreateResponses];
29036
+ export type WhatsappFlowsGetData = {
29037
+ body?: never;
29038
+ path: {
29039
+ id: WhatsAppFlowId;
29040
+ };
29041
+ query?: never;
29042
+ url: "/v1/whatsapp/flows/{id}";
29043
+ };
29044
+ export type WhatsappFlowsGetErrors = {
29045
+ /**
29046
+ * MalformedRequestError
29047
+ */
29048
+ 400: MalformedRequestError;
29049
+ /**
29050
+ * UnauthorizedError
29051
+ */
29052
+ 401: UnauthorizedError;
29053
+ /**
29054
+ * FlagDisabledError | ForbiddenError
29055
+ */
29056
+ 403: FlagDisabledError | ForbiddenError;
29057
+ /**
29058
+ * ResourceNotFoundError
29059
+ */
29060
+ 404: ResourceNotFoundError;
29061
+ /**
29062
+ * ValidationError
29063
+ */
29064
+ 422: ValidationError;
29065
+ /**
29066
+ * InternalError
29067
+ */
29068
+ 500: InternalError;
29069
+ /**
29070
+ * GatewayTimeoutError
29071
+ */
29072
+ 504: GatewayTimeoutError;
29073
+ };
29074
+ export type WhatsappFlowsGetError = WhatsappFlowsGetErrors[keyof WhatsappFlowsGetErrors];
29075
+ export type WhatsappFlowsGetResponses = {
29076
+ /**
29077
+ * WhatsAppFlow
29078
+ */
29079
+ 200: WhatsAppFlow;
29080
+ };
29081
+ export type WhatsappFlowsGetResponse = WhatsappFlowsGetResponses[keyof WhatsappFlowsGetResponses];
29082
+ export type WhatsappFlowsListVersionsData = {
29083
+ body?: never;
29084
+ path: {
29085
+ id: WhatsAppFlowId;
29086
+ };
29087
+ query?: never;
29088
+ url: "/v1/whatsapp/flows/{id}/versions";
29089
+ };
29090
+ export type WhatsappFlowsListVersionsErrors = {
29091
+ /**
29092
+ * MalformedRequestError
29093
+ */
29094
+ 400: MalformedRequestError;
29095
+ /**
29096
+ * UnauthorizedError
29097
+ */
29098
+ 401: UnauthorizedError;
29099
+ /**
29100
+ * FlagDisabledError | ForbiddenError
29101
+ */
29102
+ 403: FlagDisabledError | ForbiddenError;
29103
+ /**
29104
+ * ResourceNotFoundError
29105
+ */
29106
+ 404: ResourceNotFoundError;
29107
+ /**
29108
+ * ValidationError
29109
+ */
29110
+ 422: ValidationError;
29111
+ /**
29112
+ * InternalError
29113
+ */
29114
+ 500: InternalError;
29115
+ /**
29116
+ * GatewayTimeoutError
29117
+ */
29118
+ 504: GatewayTimeoutError;
29119
+ };
29120
+ export type WhatsappFlowsListVersionsError = WhatsappFlowsListVersionsErrors[keyof WhatsappFlowsListVersionsErrors];
29121
+ export type WhatsappFlowsListVersionsResponses = {
29122
+ /**
29123
+ * WhatsAppFlowVersionList
29124
+ */
29125
+ 200: WhatsAppFlowVersionList;
29126
+ };
29127
+ export type WhatsappFlowsListVersionsResponse = WhatsappFlowsListVersionsResponses[keyof WhatsappFlowsListVersionsResponses];
29128
+ export type WhatsappFlowsRecordVersionData = {
29129
+ body: {
29130
+ commitSha: string;
29131
+ expectedWorkspaceRevision: string;
29132
+ };
29133
+ path: {
29134
+ id: WhatsAppFlowId;
29135
+ };
29136
+ query?: never;
29137
+ url: "/v1/whatsapp/flows/{id}/versions";
29138
+ };
29139
+ export type WhatsappFlowsRecordVersionErrors = {
29140
+ /**
29141
+ * MalformedRequestError
29142
+ */
29143
+ 400: MalformedRequestError;
29144
+ /**
29145
+ * UnauthorizedError
29146
+ */
29147
+ 401: UnauthorizedError;
29148
+ /**
29149
+ * FlagDisabledError | ForbiddenError
29150
+ */
29151
+ 403: FlagDisabledError | ForbiddenError;
29152
+ /**
29153
+ * ResourceNotFoundError
29154
+ */
29155
+ 404: ResourceNotFoundError;
29156
+ /**
29157
+ * ConflictError
29158
+ */
29159
+ 409: ConflictError;
29160
+ /**
29161
+ * ValidationError
29162
+ */
29163
+ 422: ValidationError;
29164
+ /**
29165
+ * InternalError
29166
+ */
29167
+ 500: InternalError;
29168
+ /**
29169
+ * ServiceUnavailableError
29170
+ */
29171
+ 503: ServiceUnavailableError;
29172
+ /**
29173
+ * GatewayTimeoutError
29174
+ */
29175
+ 504: GatewayTimeoutError;
29176
+ };
29177
+ export type WhatsappFlowsRecordVersionError = WhatsappFlowsRecordVersionErrors[keyof WhatsappFlowsRecordVersionErrors];
29178
+ export type WhatsappFlowsRecordVersionResponses = {
29179
+ /**
29180
+ * WhatsAppFlowVersion
29181
+ */
29182
+ 201: WhatsAppFlowVersion;
29183
+ };
29184
+ export type WhatsappFlowsRecordVersionResponse = WhatsappFlowsRecordVersionResponses[keyof WhatsappFlowsRecordVersionResponses];
29185
+ export type WhatsappFlowsListRegistrationsData = {
29186
+ body?: never;
29187
+ path: {
29188
+ id: WhatsAppFlowId;
29189
+ };
29190
+ query?: never;
29191
+ url: "/v1/whatsapp/flows/{id}/registrations";
29192
+ };
29193
+ export type WhatsappFlowsListRegistrationsErrors = {
29194
+ /**
29195
+ * MalformedRequestError
29196
+ */
29197
+ 400: MalformedRequestError;
29198
+ /**
29199
+ * UnauthorizedError
29200
+ */
29201
+ 401: UnauthorizedError;
29202
+ /**
29203
+ * FlagDisabledError | ForbiddenError
29204
+ */
29205
+ 403: FlagDisabledError | ForbiddenError;
29206
+ /**
29207
+ * ResourceNotFoundError
29208
+ */
29209
+ 404: ResourceNotFoundError;
29210
+ /**
29211
+ * ValidationError
29212
+ */
29213
+ 422: ValidationError;
29214
+ /**
29215
+ * InternalError
29216
+ */
29217
+ 500: InternalError;
29218
+ /**
29219
+ * GatewayTimeoutError
29220
+ */
29221
+ 504: GatewayTimeoutError;
29222
+ };
29223
+ export type WhatsappFlowsListRegistrationsError = WhatsappFlowsListRegistrationsErrors[keyof WhatsappFlowsListRegistrationsErrors];
29224
+ export type WhatsappFlowsListRegistrationsResponses = {
29225
+ /**
29226
+ * WhatsAppFlowRegistrationList
29227
+ */
29228
+ 200: WhatsAppFlowRegistrationList;
29229
+ };
29230
+ export type WhatsappFlowsListRegistrationsResponse = WhatsappFlowsListRegistrationsResponses[keyof WhatsappFlowsListRegistrationsResponses];
29231
+ export type WhatsappFlowsRegisterData = {
29232
+ body: {
29233
+ businessAccountId?: WhatsAppBusinessAccountId | undefined;
29234
+ };
29235
+ path: {
29236
+ id: WhatsAppFlowId;
29237
+ };
29238
+ query?: never;
29239
+ url: "/v1/whatsapp/flows/{id}/registrations";
29240
+ };
29241
+ export type WhatsappFlowsRegisterErrors = {
29242
+ /**
29243
+ * MalformedRequestError
29244
+ */
29245
+ 400: MalformedRequestError;
29246
+ /**
29247
+ * UnauthorizedError
29248
+ */
29249
+ 401: UnauthorizedError;
29250
+ /**
29251
+ * FlagDisabledError | ForbiddenError
29252
+ */
29253
+ 403: FlagDisabledError | ForbiddenError;
29254
+ /**
29255
+ * ResourceNotFoundError
29256
+ */
29257
+ 404: ResourceNotFoundError;
29258
+ /**
29259
+ * ConflictError
29260
+ */
29261
+ 409: ConflictError;
29262
+ /**
29263
+ * ValidationError
29264
+ */
29265
+ 422: ValidationError;
29266
+ /**
29267
+ * CredentialsError | InternalError
29268
+ */
29269
+ 500: CredentialsError | InternalError;
29270
+ /**
29271
+ * WhatsAppChannelError
29272
+ */
29273
+ 502: WhatsAppChannelError;
29274
+ /**
29275
+ * GatewayTimeoutError
29276
+ */
29277
+ 504: GatewayTimeoutError;
29278
+ };
29279
+ export type WhatsappFlowsRegisterError = WhatsappFlowsRegisterErrors[keyof WhatsappFlowsRegisterErrors];
29280
+ export type WhatsappFlowsRegisterResponses = {
29281
+ /**
29282
+ * WhatsAppFlowRegistration
29283
+ */
29284
+ 201: WhatsAppFlowRegistration;
29285
+ };
29286
+ export type WhatsappFlowsRegisterResponse = WhatsappFlowsRegisterResponses[keyof WhatsappFlowsRegisterResponses];
29287
+ export type WhatsappFlowsRotateEncryptionKeyData = {
29288
+ body: {
29289
+ businessAccountId?: WhatsAppBusinessAccountId | undefined;
29290
+ };
29291
+ path?: never;
29292
+ query?: never;
29293
+ url: "/v1/whatsapp/flows/encryption-key/rotate";
29294
+ };
29295
+ export type WhatsappFlowsRotateEncryptionKeyErrors = {
29296
+ /**
29297
+ * MalformedRequestError
29298
+ */
29299
+ 400: MalformedRequestError;
29300
+ /**
29301
+ * UnauthorizedError
29302
+ */
29303
+ 401: UnauthorizedError;
29304
+ /**
29305
+ * FlagDisabledError | ForbiddenError
29306
+ */
29307
+ 403: FlagDisabledError | ForbiddenError;
29308
+ /**
29309
+ * ResourceNotFoundError
29310
+ */
29311
+ 404: ResourceNotFoundError;
29312
+ /**
29313
+ * ValidationError
29314
+ */
29315
+ 422: ValidationError;
29316
+ /**
29317
+ * CredentialsError | InternalError
29318
+ */
29319
+ 500: CredentialsError | InternalError;
29320
+ /**
29321
+ * WhatsAppChannelError
29322
+ */
29323
+ 502: WhatsAppChannelError;
29324
+ /**
29325
+ * GatewayTimeoutError
29326
+ */
29327
+ 504: GatewayTimeoutError;
29328
+ };
29329
+ export type WhatsappFlowsRotateEncryptionKeyError = WhatsappFlowsRotateEncryptionKeyErrors[keyof WhatsappFlowsRotateEncryptionKeyErrors];
29330
+ export type WhatsappFlowsRotateEncryptionKeyResponses = {
29331
+ /**
29332
+ * WhatsAppFlowEncryptionKey
29333
+ */
29334
+ 200: WhatsAppFlowEncryptionKey;
29335
+ };
29336
+ export type WhatsappFlowsRotateEncryptionKeyResponse = WhatsappFlowsRotateEncryptionKeyResponses[keyof WhatsappFlowsRotateEncryptionKeyResponses];
29337
+ export type WhatsappFlowsSetEndpointData = {
29338
+ body: {
29339
+ url: string;
29340
+ };
29341
+ path: {
29342
+ id: WhatsAppFlowId;
29343
+ };
29344
+ query?: never;
29345
+ url: "/v1/whatsapp/flows/{id}/endpoint";
29346
+ };
29347
+ export type WhatsappFlowsSetEndpointErrors = {
29348
+ /**
29349
+ * MalformedRequestError
29350
+ */
29351
+ 400: MalformedRequestError;
29352
+ /**
29353
+ * UnauthorizedError
29354
+ */
29355
+ 401: UnauthorizedError;
29356
+ /**
29357
+ * FlagDisabledError | ForbiddenError
29358
+ */
29359
+ 403: FlagDisabledError | ForbiddenError;
29360
+ /**
29361
+ * ResourceNotFoundError
29362
+ */
29363
+ 404: ResourceNotFoundError;
29364
+ /**
29365
+ * ValidationError
29366
+ */
29367
+ 422: ValidationError;
29368
+ /**
29369
+ * CredentialsError | InternalError
29370
+ */
29371
+ 500: CredentialsError | InternalError;
29372
+ /**
29373
+ * GatewayTimeoutError
29374
+ */
29375
+ 504: GatewayTimeoutError;
29376
+ };
29377
+ export type WhatsappFlowsSetEndpointError = WhatsappFlowsSetEndpointErrors[keyof WhatsappFlowsSetEndpointErrors];
29378
+ export type WhatsappFlowsSetEndpointResponses = {
29379
+ /**
29380
+ * WhatsAppFlowEndpointSettings
29381
+ */
29382
+ 200: WhatsAppFlowEndpointSettings;
29383
+ };
29384
+ export type WhatsappFlowsSetEndpointResponse = WhatsappFlowsSetEndpointResponses[keyof WhatsappFlowsSetEndpointResponses];
29385
+ export type WhatsappFlowsRotateEndpointSecretData = {
29386
+ body?: never;
29387
+ path: {
29388
+ id: WhatsAppFlowId;
29389
+ };
29390
+ query?: never;
29391
+ url: "/v1/whatsapp/flows/{id}/endpoint/rotate-secret";
29392
+ };
29393
+ export type WhatsappFlowsRotateEndpointSecretErrors = {
29394
+ /**
29395
+ * MalformedRequestError
29396
+ */
29397
+ 400: MalformedRequestError;
29398
+ /**
29399
+ * UnauthorizedError
29400
+ */
29401
+ 401: UnauthorizedError;
29402
+ /**
29403
+ * FlagDisabledError | ForbiddenError
29404
+ */
29405
+ 403: FlagDisabledError | ForbiddenError;
29406
+ /**
29407
+ * ResourceNotFoundError
29408
+ */
29409
+ 404: ResourceNotFoundError;
29410
+ /**
29411
+ * ValidationError
29412
+ */
29413
+ 422: ValidationError;
29414
+ /**
29415
+ * CredentialsError | InternalError
29416
+ */
29417
+ 500: CredentialsError | InternalError;
29418
+ /**
29419
+ * GatewayTimeoutError
29420
+ */
29421
+ 504: GatewayTimeoutError;
29422
+ };
29423
+ export type WhatsappFlowsRotateEndpointSecretError = WhatsappFlowsRotateEndpointSecretErrors[keyof WhatsappFlowsRotateEndpointSecretErrors];
29424
+ export type WhatsappFlowsRotateEndpointSecretResponses = {
29425
+ /**
29426
+ * WhatsAppFlowEndpointSettings
29427
+ */
29428
+ 200: WhatsAppFlowEndpointSettings;
29429
+ };
29430
+ export type WhatsappFlowsRotateEndpointSecretResponse = WhatsappFlowsRotateEndpointSecretResponses[keyof WhatsappFlowsRotateEndpointSecretResponses];
29431
+ export type WhatsappSetupLinksListData = {
29432
+ body?: never;
29433
+ path?: never;
29434
+ query?: {
29435
+ limit?: number | null | undefined;
29436
+ cursor?: string | undefined;
29437
+ namespaceId?: NamespaceId | undefined;
29438
+ status?: WhatsAppSetupLinkStatus | undefined;
29439
+ };
29440
+ url: "/v1/whatsapp/setup-links";
29441
+ };
29442
+ export type WhatsappSetupLinksListErrors = {
29443
+ /**
29444
+ * MalformedRequestError
29445
+ */
29446
+ 400: MalformedRequestError;
29447
+ /**
29448
+ * UnauthorizedError
29449
+ */
29450
+ 401: UnauthorizedError;
29451
+ /**
29452
+ * ForbiddenError | FlagDisabledError
29453
+ */
29454
+ 403: ForbiddenError | FlagDisabledError;
29455
+ /**
29456
+ * ValidationError
29457
+ */
29458
+ 422: ValidationError;
29459
+ /**
29460
+ * InternalError
29461
+ */
29462
+ 500: InternalError;
29463
+ /**
29464
+ * GatewayTimeoutError
29465
+ */
29466
+ 504: GatewayTimeoutError;
29467
+ };
29468
+ export type WhatsappSetupLinksListError = WhatsappSetupLinksListErrors[keyof WhatsappSetupLinksListErrors];
29469
+ export type WhatsappSetupLinksListResponses = {
29470
+ /**
29471
+ * WhatsAppSetupLinkPage
29472
+ */
29473
+ 200: WhatsAppSetupLinkPage;
29474
+ };
29475
+ export type WhatsappSetupLinksListResponse = WhatsappSetupLinksListResponses[keyof WhatsappSetupLinksListResponses];
29476
+ export type WhatsappSetupLinksCreateData = {
29477
+ body: {
29478
+ namespaceId: NamespaceId;
29479
+ redirectUrl?: WhatsAppSetupLinkRedirectUrl | null | undefined;
29480
+ metadata?: WhatsAppSetupLinkMetadataWritable | null | undefined;
29481
+ expiresAt?: string | null | undefined;
29482
+ };
29483
+ path?: never;
29484
+ query?: never;
29485
+ url: "/v1/whatsapp/setup-links";
29486
+ };
29487
+ export type WhatsappSetupLinksCreateErrors = {
29488
+ /**
29489
+ * MalformedRequestError
29490
+ */
29491
+ 400: MalformedRequestError;
29492
+ /**
29493
+ * UnauthorizedError
29494
+ */
29495
+ 401: UnauthorizedError;
29496
+ /**
29497
+ * PaymentRequiredError
29498
+ */
29499
+ 402: PaymentRequiredError;
29500
+ /**
29501
+ * ForbiddenError | FlagDisabledError
29502
+ */
29503
+ 403: ForbiddenError | FlagDisabledError;
29504
+ /**
29505
+ * ResourceNotFoundError
29506
+ */
29507
+ 404: ResourceNotFoundError;
29508
+ /**
29509
+ * ValidationError
29510
+ */
29511
+ 422: ValidationError;
29512
+ /**
29513
+ * InternalError
29514
+ */
29515
+ 500: InternalError;
29516
+ /**
29517
+ * BillingProviderError
29518
+ */
29519
+ 502: BillingProviderError;
29520
+ /**
29521
+ * GatewayTimeoutError
29522
+ */
29523
+ 504: GatewayTimeoutError;
29524
+ };
29525
+ export type WhatsappSetupLinksCreateError = WhatsappSetupLinksCreateErrors[keyof WhatsappSetupLinksCreateErrors];
29526
+ export type WhatsappSetupLinksCreateResponses = {
29527
+ /**
29528
+ * CreatedWhatsAppSetupLink
29529
+ */
29530
+ 201: CreatedWhatsAppSetupLink;
29531
+ };
29532
+ export type WhatsappSetupLinksCreateResponse = WhatsappSetupLinksCreateResponses[keyof WhatsappSetupLinksCreateResponses];
29533
+ export type WhatsappSetupLinksGetData = {
29534
+ body?: never;
29535
+ path: {
29536
+ linkId: WhatsAppSetupLinkId;
29537
+ };
29538
+ query?: never;
29539
+ url: "/v1/whatsapp/setup-links/{linkId}";
29540
+ };
29541
+ export type WhatsappSetupLinksGetErrors = {
29542
+ /**
29543
+ * MalformedRequestError
29544
+ */
29545
+ 400: MalformedRequestError;
29546
+ /**
29547
+ * UnauthorizedError
29548
+ */
29549
+ 401: UnauthorizedError;
29550
+ /**
29551
+ * FlagDisabledError | ForbiddenError
29552
+ */
29553
+ 403: FlagDisabledError | ForbiddenError;
29554
+ /**
29555
+ * ResourceNotFoundError
29556
+ */
29557
+ 404: ResourceNotFoundError;
29558
+ /**
29559
+ * ValidationError
29560
+ */
29561
+ 422: ValidationError;
29562
+ /**
29563
+ * InternalError
29564
+ */
29565
+ 500: InternalError;
29566
+ /**
29567
+ * GatewayTimeoutError
29568
+ */
29569
+ 504: GatewayTimeoutError;
29570
+ };
29571
+ export type WhatsappSetupLinksGetError = WhatsappSetupLinksGetErrors[keyof WhatsappSetupLinksGetErrors];
29572
+ export type WhatsappSetupLinksGetResponses = {
29573
+ /**
29574
+ * WhatsAppSetupLink
29575
+ */
29576
+ 200: WhatsAppSetupLink;
29577
+ };
29578
+ export type WhatsappSetupLinksGetResponse = WhatsappSetupLinksGetResponses[keyof WhatsappSetupLinksGetResponses];
29579
+ export type WhatsappSetupLinksRevokeData = {
29580
+ body?: never;
29581
+ path: {
29582
+ linkId: WhatsAppSetupLinkId;
29583
+ };
29584
+ query?: never;
29585
+ url: "/v1/whatsapp/setup-links/{linkId}/revoke";
29586
+ };
29587
+ export type WhatsappSetupLinksRevokeErrors = {
29588
+ /**
29589
+ * MalformedRequestError
29590
+ */
29591
+ 400: MalformedRequestError;
29592
+ /**
29593
+ * UnauthorizedError
29594
+ */
29595
+ 401: UnauthorizedError;
29596
+ /**
29597
+ * FlagDisabledError | ForbiddenError
29598
+ */
29599
+ 403: FlagDisabledError | ForbiddenError;
29600
+ /**
29601
+ * ResourceNotFoundError
29602
+ */
29603
+ 404: ResourceNotFoundError;
29604
+ /**
29605
+ * WhatsAppSetupLinkUnavailableError
29606
+ */
29607
+ 410: WhatsAppSetupLinkUnavailableError;
29608
+ /**
29609
+ * ValidationError
29610
+ */
29611
+ 422: ValidationError;
29612
+ /**
29613
+ * InternalError
29614
+ */
29615
+ 500: InternalError;
29616
+ /**
29617
+ * GatewayTimeoutError
29618
+ */
29619
+ 504: GatewayTimeoutError;
29620
+ };
29621
+ export type WhatsappSetupLinksRevokeError = WhatsappSetupLinksRevokeErrors[keyof WhatsappSetupLinksRevokeErrors];
29622
+ export type WhatsappSetupLinksRevokeResponses = {
29623
+ /**
29624
+ * WhatsAppSetupLink
29625
+ */
29626
+ 200: WhatsAppSetupLink;
29627
+ };
29628
+ export type WhatsappSetupLinksRevokeResponse = WhatsappSetupLinksRevokeResponses[keyof WhatsappSetupLinksRevokeResponses];
29629
+ export type TemplateRegistrationsListData = {
29630
+ body?: never;
29631
+ path: {
29632
+ id: TemplateId;
29633
+ };
29634
+ query?: never;
29635
+ url: "/v1/templates/{id}/registrations";
29636
+ };
29637
+ export type TemplateRegistrationsListErrors = {
29638
+ /**
29639
+ * MalformedRequestError
29640
+ */
29641
+ 400: MalformedRequestError;
29642
+ /**
29643
+ * UnauthorizedError
29644
+ */
29645
+ 401: UnauthorizedError;
29646
+ /**
29647
+ * FlagDisabledError | ForbiddenError
29648
+ */
29649
+ 403: FlagDisabledError | ForbiddenError;
29650
+ /**
29651
+ * ResourceNotFoundError
29652
+ */
29653
+ 404: ResourceNotFoundError;
29654
+ /**
29655
+ * ValidationError
29656
+ */
29657
+ 422: ValidationError;
29658
+ /**
29659
+ * InternalError
29660
+ */
29661
+ 500: InternalError;
29662
+ /**
29663
+ * GatewayTimeoutError
29664
+ */
29665
+ 504: GatewayTimeoutError;
29666
+ };
29667
+ export type TemplateRegistrationsListError = TemplateRegistrationsListErrors[keyof TemplateRegistrationsListErrors];
29668
+ export type TemplateRegistrationsListResponses = {
29669
+ /**
29670
+ * TemplateRegistrationList
29671
+ */
29672
+ 200: TemplateRegistrationList;
29673
+ };
29674
+ export type TemplateRegistrationsListResponse = TemplateRegistrationsListResponses[keyof TemplateRegistrationsListResponses];
29675
+ export type TemplateRegistrationsSubmitData = {
29676
+ body: {
29677
+ provider: "whatsapp";
29678
+ businessAccountId?: WhatsAppBusinessAccountId | undefined;
29679
+ };
29680
+ path: {
29681
+ id: TemplateId;
29682
+ };
29683
+ query?: never;
29684
+ url: "/v1/templates/{id}/registrations";
29685
+ };
29686
+ export type TemplateRegistrationsSubmitErrors = {
29687
+ /**
29688
+ * MalformedRequestError
29689
+ */
29690
+ 400: MalformedRequestError;
29691
+ /**
29692
+ * UnauthorizedError
29693
+ */
29694
+ 401: UnauthorizedError;
29695
+ /**
29696
+ * ForbiddenError | FlagDisabledError
29697
+ */
29698
+ 403: ForbiddenError | FlagDisabledError;
29699
+ /**
29700
+ * ResourceNotFoundError
29701
+ */
29702
+ 404: ResourceNotFoundError;
29703
+ /**
29704
+ * ConflictError
29705
+ */
29706
+ 409: ConflictError;
29707
+ /**
29708
+ * ValidationError
29709
+ */
29710
+ 422: ValidationError;
29711
+ /**
29712
+ * CredentialsError | InternalError
29713
+ */
29714
+ 500: CredentialsError | InternalError;
29715
+ /**
29716
+ * WhatsAppChannelError
29717
+ */
29718
+ 502: WhatsAppChannelError;
29719
+ /**
29720
+ * GatewayTimeoutError
29721
+ */
29722
+ 504: GatewayTimeoutError;
29723
+ };
29724
+ export type TemplateRegistrationsSubmitError = TemplateRegistrationsSubmitErrors[keyof TemplateRegistrationsSubmitErrors];
29725
+ export type TemplateRegistrationsSubmitResponses = {
29726
+ /**
29727
+ * TemplateRegistration
29728
+ */
29729
+ 201: TemplateRegistration;
29730
+ };
29731
+ export type TemplateRegistrationsSubmitResponse = TemplateRegistrationsSubmitResponses[keyof TemplateRegistrationsSubmitResponses];
29732
+ export type TemplateRegistrationsGetData = {
29733
+ body?: never;
29734
+ path: {
29735
+ id: TemplateId;
29736
+ registrationId: TemplateRegistrationId;
29737
+ };
29738
+ query?: never;
29739
+ url: "/v1/templates/{id}/registrations/{registrationId}";
29740
+ };
29741
+ export type TemplateRegistrationsGetErrors = {
29742
+ /**
29743
+ * MalformedRequestError
29744
+ */
29745
+ 400: MalformedRequestError;
29746
+ /**
29747
+ * UnauthorizedError
29748
+ */
29749
+ 401: UnauthorizedError;
29750
+ /**
29751
+ * FlagDisabledError | ForbiddenError
29752
+ */
29753
+ 403: FlagDisabledError | ForbiddenError;
29754
+ /**
29755
+ * ResourceNotFoundError
29756
+ */
29757
+ 404: ResourceNotFoundError;
29758
+ /**
29759
+ * ValidationError
29760
+ */
29761
+ 422: ValidationError;
29762
+ /**
29763
+ * InternalError
29764
+ */
29765
+ 500: InternalError;
29766
+ /**
29767
+ * GatewayTimeoutError
29768
+ */
29769
+ 504: GatewayTimeoutError;
29770
+ };
29771
+ export type TemplateRegistrationsGetError = TemplateRegistrationsGetErrors[keyof TemplateRegistrationsGetErrors];
29772
+ export type TemplateRegistrationsGetResponses = {
29773
+ /**
29774
+ * TemplateRegistration
29775
+ */
29776
+ 200: TemplateRegistration;
29777
+ };
29778
+ export type TemplateRegistrationsGetResponse = TemplateRegistrationsGetResponses[keyof TemplateRegistrationsGetResponses];