samva 0.44.0 → 0.45.1

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 (93) hide show
  1. package/AGENTS.md +3 -0
  2. package/README.md +4 -0
  3. package/dist/client/sdk.gen.d.ts +281 -1
  4. package/dist/client/sdk.gen.js +856 -1
  5. package/dist/client/types.gen.d.ts +1858 -46
  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 +97 -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/analytics.d.ts +6 -0
  29. package/dist/effect/generated/analytics.js +4 -2
  30. package/dist/effect/generated/index.d.ts +9 -1
  31. package/dist/effect/generated/journeys.d.ts +1 -3
  32. package/dist/effect/generated/journeys.js +2 -6
  33. package/dist/effect/generated/messages.d.ts +1 -5
  34. package/dist/effect/generated/messages.js +2 -10
  35. package/dist/effect/generated/shared.d.ts +92 -2
  36. package/dist/effect/generated/shared.js +43 -2
  37. package/dist/effect/generated/template-registrations.d.ts +651 -0
  38. package/dist/effect/generated/template-registrations.js +138 -0
  39. package/dist/effect/generated/whats-app-flows.d.ts +1838 -0
  40. package/dist/effect/generated/whats-app-flows.js +338 -0
  41. package/dist/effect/generated/whats-app-setup-links.d.ts +705 -0
  42. package/dist/effect/generated/whats-app-setup-links.js +150 -0
  43. package/dist/effect/generated/whats-app.d.ts +2089 -0
  44. package/dist/effect/generated/whats-app.js +633 -0
  45. package/dist/effect/generated-metadata.d.ts +245 -0
  46. package/dist/effect/generated-metadata.js +221 -48
  47. package/dist/effect/index.d.ts +4 -0
  48. package/dist/effect/index.js +6 -2
  49. package/dist/effect/mailboxes.d.ts +298 -298
  50. package/dist/effect/mailboxes.js +3 -3
  51. package/dist/effect/media.d.ts +4 -4
  52. package/dist/effect/media.js +2 -2
  53. package/dist/effect/messages.d.ts +17 -17
  54. package/dist/effect/messages.js +4 -4
  55. package/dist/effect/namespaces.d.ts +5 -5
  56. package/dist/effect/namespaces.js +1 -1
  57. package/dist/effect/newsletter-issues.d.ts +8 -8
  58. package/dist/effect/newsletter-issues.js +2 -2
  59. package/dist/effect/newsletters.d.ts +3 -3
  60. package/dist/effect/newsletters.js +1 -1
  61. package/dist/effect/organizations.d.ts +10 -10
  62. package/dist/effect/organizations.js +1 -1
  63. package/dist/effect/runtime.d.ts +2 -0
  64. package/dist/effect/runtime.js +2 -1
  65. package/dist/effect/scheduled-messages.d.ts +839 -839
  66. package/dist/effect/scheduled-messages.js +1 -1
  67. package/dist/effect/template-registrations.d.ts +12 -0
  68. package/dist/effect/template-registrations.js +16 -0
  69. package/dist/effect/templates.d.ts +66 -66
  70. package/dist/effect/templates.js +13 -13
  71. package/dist/effect/topic-forms.d.ts +4 -4
  72. package/dist/effect/topic-forms.js +1 -1
  73. package/dist/effect/topics.d.ts +11 -11
  74. package/dist/effect/topics.js +2 -2
  75. package/dist/effect/webhooks.d.ts +18 -18
  76. package/dist/effect/webhooks.js +3 -3
  77. package/dist/effect/whatsapp-flows.d.ts +34 -0
  78. package/dist/effect/whatsapp-flows.js +30 -0
  79. package/dist/effect/whatsapp-setup-links.d.ts +66 -0
  80. package/dist/effect/whatsapp-setup-links.js +18 -0
  81. package/dist/effect/whatsapp.d.ts +51 -0
  82. package/dist/effect/whatsapp.js +34 -0
  83. package/dist/index.js +2 -2
  84. package/dist/package.js +1 -1
  85. package/dist/promises/client.d.ts +9 -1
  86. package/dist/promises/client.js +11 -3
  87. package/dist/promises/errors.gen.d.ts +38 -2
  88. package/dist/promises/errors.gen.js +160 -3
  89. package/dist/promises/index.js +2 -2
  90. package/dist/promises/types.gen.d.ts +1 -1
  91. package/dist/service-map.d.ts +917 -736
  92. package/dist/service-map.js +288 -235
  93. package/package.json +19 -3
@@ -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;
@@ -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?: {
@@ -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.
@@ -2948,7 +3184,6 @@ export type JourneyRunTrigger = {
2948
3184
  };
2949
3185
  export type JourneyRunExitReason = "completed" | "goal" | "archived";
2950
3186
  export type JourneyRunStatus = "active" | "paused" | "exited" | "failed";
2951
- export type JourneyId = string;
2952
3187
  export type JourneyRunId = string;
2953
3188
  export type JourneyRunPage = {
2954
3189
  items: Array<JourneyRun>;
@@ -4705,7 +4940,6 @@ export type WhatsAppFlowMessageWritable = {
4705
4940
  [key: string]: JsonValueWritable | undefined;
4706
4941
  } | undefined;
4707
4942
  };
4708
- export type WhatsAppFlowId = string;
4709
4943
  export type WhatsAppMediaContent = {
4710
4944
  media: WhatsAppOutboundMedia;
4711
4945
  };
@@ -5230,7 +5464,6 @@ export type WhatsAppStoredFlowMessage = {
5230
5464
  flowVersionId: WhatsAppFlowVersionId;
5231
5465
  providerFlowId: string;
5232
5466
  };
5233
- export type WhatsAppFlowVersionId = string;
5234
5467
  export type WhatsAppCtaUrlMessage = {
5235
5468
  type: "cta_url";
5236
5469
  header?: WhatsAppInteractiveHeader | undefined;
@@ -5335,7 +5568,6 @@ export type MessageDeliveryError = {
5335
5568
  message: string | null;
5336
5569
  retryable: boolean | null;
5337
5570
  };
5338
- export type MessageDeliveryId = string;
5339
5571
  export type Message = {
5340
5572
  id: MessageId;
5341
5573
  campaign?: {
@@ -17848,6 +18080,10 @@ export type AnalyticsGetStatsResponses = {
17848
18080
  email: number;
17849
18081
  whatsapp: number;
17850
18082
  sms: number;
18083
+ /**
18084
+ * Emails in this bucket that bounced or failed. A subset of `email`.
18085
+ */
18086
+ emailFailed: number;
17851
18087
  }>;
17852
18088
  };
17853
18089
  };
@@ -18017,6 +18253,10 @@ export type AnalyticsGetHourlyDistributionResponses = {
18017
18253
  200: Array<{
18018
18254
  hour: string;
18019
18255
  count: number;
18256
+ /**
18257
+ * `count` split by organization-local weekday: seven entries, Monday first, summing to `count`.
18258
+ */
18259
+ weekdays: Array<number>;
18020
18260
  }>;
18021
18261
  };
18022
18262
  export type AnalyticsGetHourlyDistributionResponse = AnalyticsGetHourlyDistributionResponses[keyof AnalyticsGetHourlyDistributionResponses];
@@ -27972,3 +28212,1575 @@ export type ExtensionInstallationsGetRunResponses = {
27972
28212
  200: ExtensionRun;
27973
28213
  };
27974
28214
  export type ExtensionInstallationsGetRunResponse = ExtensionInstallationsGetRunResponses[keyof ExtensionInstallationsGetRunResponses];
28215
+ export type WhatsappGetStatsData = {
28216
+ body?: never;
28217
+ path?: never;
28218
+ query?: {
28219
+ startDate?: string | undefined;
28220
+ endDate?: string | undefined;
28221
+ };
28222
+ url: "/v1/whatsapp/stats";
28223
+ };
28224
+ export type WhatsappGetStatsErrors = {
28225
+ /**
28226
+ * MalformedRequestError
28227
+ */
28228
+ 400: MalformedRequestError;
28229
+ /**
28230
+ * UnauthorizedError
28231
+ */
28232
+ 401: UnauthorizedError;
28233
+ /**
28234
+ * FlagDisabledError | ForbiddenError
28235
+ */
28236
+ 403: FlagDisabledError | ForbiddenError;
28237
+ /**
28238
+ * ValidationError
28239
+ */
28240
+ 422: ValidationError;
28241
+ /**
28242
+ * InternalError
28243
+ */
28244
+ 500: InternalError;
28245
+ /**
28246
+ * GatewayTimeoutError
28247
+ */
28248
+ 504: GatewayTimeoutError;
28249
+ };
28250
+ export type WhatsappGetStatsError = WhatsappGetStatsErrors[keyof WhatsappGetStatsErrors];
28251
+ export type WhatsappGetStatsResponses = {
28252
+ /**
28253
+ * Success
28254
+ */
28255
+ 200: {
28256
+ totalSent: number;
28257
+ totalDelivered: number;
28258
+ totalRead: number;
28259
+ totalFailed: number;
28260
+ deliveryRate: number;
28261
+ readRate: number;
28262
+ failureRate: number;
28263
+ };
28264
+ };
28265
+ export type WhatsappGetStatsResponse = WhatsappGetStatsResponses[keyof WhatsappGetStatsResponses];
28266
+ export type WhatsappGetTemplateStatsData = {
28267
+ body?: never;
28268
+ path?: never;
28269
+ query?: {
28270
+ startDate?: string | undefined;
28271
+ endDate?: string | undefined;
28272
+ templateId?: TemplateId | undefined;
28273
+ campaignId?: CampaignId | undefined;
28274
+ journeyId?: JourneyId | undefined;
28275
+ };
28276
+ url: "/v1/whatsapp/templates/stats";
28277
+ };
28278
+ export type WhatsappGetTemplateStatsErrors = {
28279
+ /**
28280
+ * MalformedRequestError
28281
+ */
28282
+ 400: MalformedRequestError;
28283
+ /**
28284
+ * UnauthorizedError
28285
+ */
28286
+ 401: UnauthorizedError;
28287
+ /**
28288
+ * FlagDisabledError | ForbiddenError
28289
+ */
28290
+ 403: FlagDisabledError | ForbiddenError;
28291
+ /**
28292
+ * ValidationError
28293
+ */
28294
+ 422: ValidationError;
28295
+ /**
28296
+ * InternalError
28297
+ */
28298
+ 500: InternalError;
28299
+ /**
28300
+ * GatewayTimeoutError
28301
+ */
28302
+ 504: GatewayTimeoutError;
28303
+ };
28304
+ export type WhatsappGetTemplateStatsError = WhatsappGetTemplateStatsErrors[keyof WhatsappGetTemplateStatsErrors];
28305
+ export type WhatsappGetTemplateStatsResponses = {
28306
+ /**
28307
+ * WhatsAppTemplateStats
28308
+ */
28309
+ 200: WhatsAppTemplateStats;
28310
+ };
28311
+ export type WhatsappGetTemplateStatsResponse = WhatsappGetTemplateStatsResponses[keyof WhatsappGetTemplateStatsResponses];
28312
+ export type WhatsappGetServiceWindowStatusData = {
28313
+ body?: never;
28314
+ path?: never;
28315
+ query: {
28316
+ customerPhone: string;
28317
+ businessPhone: string;
28318
+ };
28319
+ url: "/v1/whatsapp/service-window/status";
28320
+ };
28321
+ export type WhatsappGetServiceWindowStatusErrors = {
28322
+ /**
28323
+ * MalformedRequestError
28324
+ */
28325
+ 400: MalformedRequestError;
28326
+ /**
28327
+ * UnauthorizedError
28328
+ */
28329
+ 401: UnauthorizedError;
28330
+ /**
28331
+ * FlagDisabledError | ForbiddenError
28332
+ */
28333
+ 403: FlagDisabledError | ForbiddenError;
28334
+ /**
28335
+ * ResourceNotFoundError
28336
+ */
28337
+ 404: ResourceNotFoundError;
28338
+ /**
28339
+ * ValidationError
28340
+ */
28341
+ 422: ValidationError;
28342
+ /**
28343
+ * InternalError
28344
+ */
28345
+ 500: InternalError;
28346
+ /**
28347
+ * GatewayTimeoutError
28348
+ */
28349
+ 504: GatewayTimeoutError;
28350
+ };
28351
+ export type WhatsappGetServiceWindowStatusError = WhatsappGetServiceWindowStatusErrors[keyof WhatsappGetServiceWindowStatusErrors];
28352
+ export type WhatsappGetServiceWindowStatusResponses = {
28353
+ /**
28354
+ * Success
28355
+ */
28356
+ 200: {
28357
+ serviceWindowId: WhatsAppServiceWindowId;
28358
+ isServiceWindowActive: boolean;
28359
+ isFreeEntryPointActive: boolean;
28360
+ serviceWindowExpiresAt: string | null;
28361
+ freeEntryPointExpiresAt: string | null;
28362
+ };
28363
+ };
28364
+ export type WhatsappGetServiceWindowStatusResponse = WhatsappGetServiceWindowStatusResponses[keyof WhatsappGetServiceWindowStatusResponses];
28365
+ export type WhatsappGetServiceWindowBillingData = {
28366
+ body?: never;
28367
+ path?: never;
28368
+ query: {
28369
+ serviceWindowId: WhatsAppServiceWindowId;
28370
+ };
28371
+ url: "/v1/whatsapp/service-window/billing";
28372
+ };
28373
+ export type WhatsappGetServiceWindowBillingErrors = {
28374
+ /**
28375
+ * MalformedRequestError
28376
+ */
28377
+ 400: MalformedRequestError;
28378
+ /**
28379
+ * UnauthorizedError
28380
+ */
28381
+ 401: UnauthorizedError;
28382
+ /**
28383
+ * FlagDisabledError | ForbiddenError
28384
+ */
28385
+ 403: FlagDisabledError | ForbiddenError;
28386
+ /**
28387
+ * ResourceNotFoundError
28388
+ */
28389
+ 404: ResourceNotFoundError;
28390
+ /**
28391
+ * ValidationError
28392
+ */
28393
+ 422: ValidationError;
28394
+ /**
28395
+ * InternalError
28396
+ */
28397
+ 500: InternalError;
28398
+ /**
28399
+ * GatewayTimeoutError
28400
+ */
28401
+ 504: GatewayTimeoutError;
28402
+ };
28403
+ export type WhatsappGetServiceWindowBillingError = WhatsappGetServiceWindowBillingErrors[keyof WhatsappGetServiceWindowBillingErrors];
28404
+ export type WhatsappGetServiceWindowBillingResponses = {
28405
+ /**
28406
+ * Success
28407
+ */
28408
+ 200: {
28409
+ totalMessages: number;
28410
+ totalFreeMessages: number;
28411
+ totalPaidMessages: number;
28412
+ estimatedProviderCosts: Array<MoneyAmount>;
28413
+ };
28414
+ };
28415
+ export type WhatsappGetServiceWindowBillingResponse = WhatsappGetServiceWindowBillingResponses[keyof WhatsappGetServiceWindowBillingResponses];
28416
+ export type WhatsappGetMediaDownloadUrlData = {
28417
+ body?: never;
28418
+ path: {
28419
+ deliveryId: MessageDeliveryId;
28420
+ };
28421
+ query?: never;
28422
+ url: "/v1/whatsapp/media/{deliveryId}/download-url";
28423
+ };
28424
+ export type WhatsappGetMediaDownloadUrlErrors = {
28425
+ /**
28426
+ * MalformedRequestError
28427
+ */
28428
+ 400: MalformedRequestError;
28429
+ /**
28430
+ * UnauthorizedError
28431
+ */
28432
+ 401: UnauthorizedError;
28433
+ /**
28434
+ * FlagDisabledError | ForbiddenError
28435
+ */
28436
+ 403: FlagDisabledError | ForbiddenError;
28437
+ /**
28438
+ * ResourceNotFoundError
28439
+ */
28440
+ 404: ResourceNotFoundError;
28441
+ /**
28442
+ * ValidationError
28443
+ */
28444
+ 422: ValidationError;
28445
+ /**
28446
+ * InternalError
28447
+ */
28448
+ 500: InternalError;
28449
+ /**
28450
+ * GatewayTimeoutError
28451
+ */
28452
+ 504: GatewayTimeoutError;
28453
+ };
28454
+ export type WhatsappGetMediaDownloadUrlError = WhatsappGetMediaDownloadUrlErrors[keyof WhatsappGetMediaDownloadUrlErrors];
28455
+ export type WhatsappGetMediaDownloadUrlResponses = {
28456
+ /**
28457
+ * Success
28458
+ */
28459
+ 200: {
28460
+ url: string;
28461
+ expiresAt: string;
28462
+ };
28463
+ };
28464
+ export type WhatsappGetMediaDownloadUrlResponse = WhatsappGetMediaDownloadUrlResponses[keyof WhatsappGetMediaDownloadUrlResponses];
28465
+ export type WhatsappListBusinessAccountsData = {
28466
+ body?: never;
28467
+ path?: never;
28468
+ query?: {
28469
+ page?: number | null | undefined;
28470
+ limit?: number | null | undefined;
28471
+ isActive?: boolean | null | undefined;
28472
+ verificationStatus?: "pending" | "verified" | "failed" | "suspended" | undefined;
28473
+ namespaceId?: NamespaceId | undefined;
28474
+ };
28475
+ url: "/v1/whatsapp/business-accounts";
28476
+ };
28477
+ export type WhatsappListBusinessAccountsErrors = {
28478
+ /**
28479
+ * MalformedRequestError
28480
+ */
28481
+ 400: MalformedRequestError;
28482
+ /**
28483
+ * UnauthorizedError
28484
+ */
28485
+ 401: UnauthorizedError;
28486
+ /**
28487
+ * ForbiddenError | FlagDisabledError
28488
+ */
28489
+ 403: ForbiddenError | FlagDisabledError;
28490
+ /**
28491
+ * ValidationError
28492
+ */
28493
+ 422: ValidationError;
28494
+ /**
28495
+ * InternalError
28496
+ */
28497
+ 500: InternalError;
28498
+ /**
28499
+ * GatewayTimeoutError
28500
+ */
28501
+ 504: GatewayTimeoutError;
28502
+ };
28503
+ export type WhatsappListBusinessAccountsError = WhatsappListBusinessAccountsErrors[keyof WhatsappListBusinessAccountsErrors];
28504
+ export type WhatsappListBusinessAccountsResponses = {
28505
+ /**
28506
+ * Success
28507
+ */
28508
+ 200: {
28509
+ items: Array<{
28510
+ id: WhatsAppBusinessAccountId;
28511
+ organizationId: string;
28512
+ namespaceId: NamespaceId | null;
28513
+ phoneNumber: string;
28514
+ phoneNumberId: string;
28515
+ displayName: string;
28516
+ whatsappBusinessAccountId: string;
28517
+ verificationStatus: "pending" | "verified" | "failed" | "suspended";
28518
+ credentialStatus: "active" | "reconnect_required";
28519
+ tokenExpiresAt: string | null;
28520
+ isDefault: boolean;
28521
+ webhookUrl: string | null;
28522
+ qualityRating: "green" | "yellow" | "red" | "unknown";
28523
+ messagingLimit: string | null;
28524
+ currentLimit: number;
28525
+ businessPortfolioId: string | null;
28526
+ businessAppConnectedAt: string | null;
28527
+ businessAppDisconnectedAt: string | null;
28528
+ businessAppDisconnectReason: "partnerRemoved" | "offboarded" | "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "primaryInactivity" | "userReRegistered" | null;
28529
+ contactsSyncRequestedAt: string | null;
28530
+ historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
28531
+ historySyncProgress: number | null;
28532
+ isActive: boolean;
28533
+ createdAt: string;
28534
+ updatedAt: string;
28535
+ }>;
28536
+ pagination: PaginationMeta;
28537
+ };
28538
+ };
28539
+ export type WhatsappListBusinessAccountsResponse = WhatsappListBusinessAccountsResponses[keyof WhatsappListBusinessAccountsResponses];
28540
+ export type WhatsappConnectBusinessAccountData = {
28541
+ body: {
28542
+ code: string;
28543
+ wabaId: string;
28544
+ phoneNumberId: string;
28545
+ namespaceId?: NamespaceId | null | undefined;
28546
+ };
28547
+ path?: never;
28548
+ query?: never;
28549
+ url: "/v1/whatsapp/business-accounts";
28550
+ };
28551
+ export type WhatsappConnectBusinessAccountErrors = {
28552
+ /**
28553
+ * MalformedRequestError
28554
+ */
28555
+ 400: MalformedRequestError;
28556
+ /**
28557
+ * UnauthorizedError
28558
+ */
28559
+ 401: UnauthorizedError;
28560
+ /**
28561
+ * PaymentRequiredError
28562
+ */
28563
+ 402: PaymentRequiredError;
28564
+ /**
28565
+ * ForbiddenError | FlagDisabledError
28566
+ */
28567
+ 403: ForbiddenError | FlagDisabledError;
28568
+ /**
28569
+ * ResourceNotFoundError
28570
+ */
28571
+ 404: ResourceNotFoundError;
28572
+ /**
28573
+ * ConflictError
28574
+ */
28575
+ 409: ConflictError;
28576
+ /**
28577
+ * ValidationError
28578
+ */
28579
+ 422: ValidationError;
28580
+ /**
28581
+ * InternalError | CredentialsError
28582
+ */
28583
+ 500: InternalError | CredentialsError;
28584
+ /**
28585
+ * WhatsAppChannelError | BillingProviderError
28586
+ */
28587
+ 502: WhatsAppChannelError | BillingProviderError;
28588
+ /**
28589
+ * GatewayTimeoutError
28590
+ */
28591
+ 504: GatewayTimeoutError;
28592
+ };
28593
+ export type WhatsappConnectBusinessAccountError = WhatsappConnectBusinessAccountErrors[keyof WhatsappConnectBusinessAccountErrors];
28594
+ export type WhatsappConnectBusinessAccountResponses = {
28595
+ /**
28596
+ * Success
28597
+ */
28598
+ 201: {
28599
+ id: WhatsAppBusinessAccountId;
28600
+ organizationId: string;
28601
+ namespaceId: NamespaceId | null;
28602
+ phoneNumber: string;
28603
+ phoneNumberId: string;
28604
+ displayName: string;
28605
+ whatsappBusinessAccountId: string;
28606
+ verificationStatus: "pending" | "verified" | "failed" | "suspended";
28607
+ credentialStatus: "active" | "reconnect_required";
28608
+ tokenExpiresAt: string | null;
28609
+ isDefault: boolean;
28610
+ webhookUrl: string | null;
28611
+ qualityRating: "green" | "yellow" | "red" | "unknown";
28612
+ messagingLimit: string | null;
28613
+ currentLimit: number;
28614
+ businessPortfolioId: string | null;
28615
+ businessAppConnectedAt: string | null;
28616
+ businessAppDisconnectedAt: string | null;
28617
+ businessAppDisconnectReason: "partnerRemoved" | "offboarded" | "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "primaryInactivity" | "userReRegistered" | null;
28618
+ contactsSyncRequestedAt: string | null;
28619
+ historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
28620
+ historySyncProgress: number | null;
28621
+ isActive: boolean;
28622
+ createdAt: string;
28623
+ updatedAt: string;
28624
+ };
28625
+ };
28626
+ export type WhatsappConnectBusinessAccountResponse = WhatsappConnectBusinessAccountResponses[keyof WhatsappConnectBusinessAccountResponses];
28627
+ export type WhatsappDisconnectBusinessAccountData = {
28628
+ body?: never;
28629
+ path: {
28630
+ accountId: WhatsAppBusinessAccountId;
28631
+ };
28632
+ query?: never;
28633
+ url: "/v1/whatsapp/business-accounts/{accountId}";
28634
+ };
28635
+ export type WhatsappDisconnectBusinessAccountErrors = {
28636
+ /**
28637
+ * MalformedRequestError
28638
+ */
28639
+ 400: MalformedRequestError;
28640
+ /**
28641
+ * UnauthorizedError
28642
+ */
28643
+ 401: UnauthorizedError;
28644
+ /**
28645
+ * FlagDisabledError | ForbiddenError
28646
+ */
28647
+ 403: FlagDisabledError | ForbiddenError;
28648
+ /**
28649
+ * ResourceNotFoundError
28650
+ */
28651
+ 404: ResourceNotFoundError;
28652
+ /**
28653
+ * ValidationError
28654
+ */
28655
+ 422: ValidationError;
28656
+ /**
28657
+ * InternalError
28658
+ */
28659
+ 500: InternalError;
28660
+ /**
28661
+ * GatewayTimeoutError
28662
+ */
28663
+ 504: GatewayTimeoutError;
28664
+ };
28665
+ export type WhatsappDisconnectBusinessAccountError = WhatsappDisconnectBusinessAccountErrors[keyof WhatsappDisconnectBusinessAccountErrors];
28666
+ export type WhatsappDisconnectBusinessAccountResponses = {
28667
+ /**
28668
+ * Success
28669
+ */
28670
+ 200: {
28671
+ success: true;
28672
+ };
28673
+ };
28674
+ export type WhatsappDisconnectBusinessAccountResponse = WhatsappDisconnectBusinessAccountResponses[keyof WhatsappDisconnectBusinessAccountResponses];
28675
+ export type WhatsappGetBusinessAccountData = {
28676
+ body?: never;
28677
+ path: {
28678
+ accountId: WhatsAppBusinessAccountId;
28679
+ };
28680
+ query?: never;
28681
+ url: "/v1/whatsapp/business-accounts/{accountId}";
28682
+ };
28683
+ export type WhatsappGetBusinessAccountErrors = {
28684
+ /**
28685
+ * MalformedRequestError
28686
+ */
28687
+ 400: MalformedRequestError;
28688
+ /**
28689
+ * UnauthorizedError
28690
+ */
28691
+ 401: UnauthorizedError;
28692
+ /**
28693
+ * FlagDisabledError | ForbiddenError
28694
+ */
28695
+ 403: FlagDisabledError | ForbiddenError;
28696
+ /**
28697
+ * ResourceNotFoundError
28698
+ */
28699
+ 404: ResourceNotFoundError;
28700
+ /**
28701
+ * ValidationError
28702
+ */
28703
+ 422: ValidationError;
28704
+ /**
28705
+ * InternalError
28706
+ */
28707
+ 500: InternalError;
28708
+ /**
28709
+ * GatewayTimeoutError
28710
+ */
28711
+ 504: GatewayTimeoutError;
28712
+ };
28713
+ export type WhatsappGetBusinessAccountError = WhatsappGetBusinessAccountErrors[keyof WhatsappGetBusinessAccountErrors];
28714
+ export type WhatsappGetBusinessAccountResponses = {
28715
+ /**
28716
+ * Success
28717
+ */
28718
+ 200: {
28719
+ id: WhatsAppBusinessAccountId;
28720
+ organizationId: string;
28721
+ namespaceId: NamespaceId | null;
28722
+ phoneNumber: string;
28723
+ phoneNumberId: string;
28724
+ displayName: string;
28725
+ whatsappBusinessAccountId: string;
28726
+ verificationStatus: "pending" | "verified" | "failed" | "suspended";
28727
+ credentialStatus: "active" | "reconnect_required";
28728
+ tokenExpiresAt: string | null;
28729
+ isDefault: boolean;
28730
+ webhookUrl: string | null;
28731
+ qualityRating: "green" | "yellow" | "red" | "unknown";
28732
+ messagingLimit: string | null;
28733
+ currentLimit: number;
28734
+ businessPortfolioId: string | null;
28735
+ businessAppConnectedAt: string | null;
28736
+ businessAppDisconnectedAt: string | null;
28737
+ businessAppDisconnectReason: "partnerRemoved" | "offboarded" | "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "primaryInactivity" | "userReRegistered" | null;
28738
+ contactsSyncRequestedAt: string | null;
28739
+ historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
28740
+ historySyncProgress: number | null;
28741
+ isActive: boolean;
28742
+ createdAt: string;
28743
+ updatedAt: string;
28744
+ };
28745
+ };
28746
+ export type WhatsappGetBusinessAccountResponse = WhatsappGetBusinessAccountResponses[keyof WhatsappGetBusinessAccountResponses];
28747
+ export type WhatsappUpdateBusinessAccountData = {
28748
+ body: {
28749
+ displayName?: string | null | undefined;
28750
+ webhookUrl?: string | null | undefined;
28751
+ };
28752
+ path: {
28753
+ accountId: WhatsAppBusinessAccountId;
28754
+ };
28755
+ query?: never;
28756
+ url: "/v1/whatsapp/business-accounts/{accountId}";
28757
+ };
28758
+ export type WhatsappUpdateBusinessAccountErrors = {
28759
+ /**
28760
+ * MalformedRequestError
28761
+ */
28762
+ 400: MalformedRequestError;
28763
+ /**
28764
+ * UnauthorizedError
28765
+ */
28766
+ 401: UnauthorizedError;
28767
+ /**
28768
+ * FlagDisabledError | ForbiddenError
28769
+ */
28770
+ 403: FlagDisabledError | ForbiddenError;
28771
+ /**
28772
+ * ResourceNotFoundError
28773
+ */
28774
+ 404: ResourceNotFoundError;
28775
+ /**
28776
+ * ValidationError
28777
+ */
28778
+ 422: ValidationError;
28779
+ /**
28780
+ * InternalError
28781
+ */
28782
+ 500: InternalError;
28783
+ /**
28784
+ * GatewayTimeoutError
28785
+ */
28786
+ 504: GatewayTimeoutError;
28787
+ };
28788
+ export type WhatsappUpdateBusinessAccountError = WhatsappUpdateBusinessAccountErrors[keyof WhatsappUpdateBusinessAccountErrors];
28789
+ export type WhatsappUpdateBusinessAccountResponses = {
28790
+ /**
28791
+ * Success
28792
+ */
28793
+ 200: {
28794
+ id: WhatsAppBusinessAccountId;
28795
+ organizationId: string;
28796
+ namespaceId: NamespaceId | null;
28797
+ phoneNumber: string;
28798
+ phoneNumberId: string;
28799
+ displayName: string;
28800
+ whatsappBusinessAccountId: string;
28801
+ verificationStatus: "pending" | "verified" | "failed" | "suspended";
28802
+ credentialStatus: "active" | "reconnect_required";
28803
+ tokenExpiresAt: string | null;
28804
+ isDefault: boolean;
28805
+ webhookUrl: string | null;
28806
+ qualityRating: "green" | "yellow" | "red" | "unknown";
28807
+ messagingLimit: string | null;
28808
+ currentLimit: number;
28809
+ businessPortfolioId: string | null;
28810
+ businessAppConnectedAt: string | null;
28811
+ businessAppDisconnectedAt: string | null;
28812
+ businessAppDisconnectReason: "partnerRemoved" | "offboarded" | "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "primaryInactivity" | "userReRegistered" | null;
28813
+ contactsSyncRequestedAt: string | null;
28814
+ historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
28815
+ historySyncProgress: number | null;
28816
+ isActive: boolean;
28817
+ createdAt: string;
28818
+ updatedAt: string;
28819
+ };
28820
+ };
28821
+ export type WhatsappUpdateBusinessAccountResponse = WhatsappUpdateBusinessAccountResponses[keyof WhatsappUpdateBusinessAccountResponses];
28822
+ export type WhatsappSetDefaultBusinessAccountData = {
28823
+ body?: never;
28824
+ path: {
28825
+ accountId: WhatsAppBusinessAccountId;
28826
+ };
28827
+ query?: never;
28828
+ url: "/v1/whatsapp/business-accounts/{accountId}/set-default";
28829
+ };
28830
+ export type WhatsappSetDefaultBusinessAccountErrors = {
28831
+ /**
28832
+ * MalformedRequestError
28833
+ */
28834
+ 400: MalformedRequestError;
28835
+ /**
28836
+ * UnauthorizedError
28837
+ */
28838
+ 401: UnauthorizedError;
28839
+ /**
28840
+ * FlagDisabledError | ForbiddenError
28841
+ */
28842
+ 403: FlagDisabledError | ForbiddenError;
28843
+ /**
28844
+ * ResourceNotFoundError
28845
+ */
28846
+ 404: ResourceNotFoundError;
28847
+ /**
28848
+ * ValidationError
28849
+ */
28850
+ 422: ValidationError;
28851
+ /**
28852
+ * InternalError
28853
+ */
28854
+ 500: InternalError;
28855
+ /**
28856
+ * GatewayTimeoutError
28857
+ */
28858
+ 504: GatewayTimeoutError;
28859
+ };
28860
+ export type WhatsappSetDefaultBusinessAccountError = WhatsappSetDefaultBusinessAccountErrors[keyof WhatsappSetDefaultBusinessAccountErrors];
28861
+ export type WhatsappSetDefaultBusinessAccountResponses = {
28862
+ /**
28863
+ * Success
28864
+ */
28865
+ 200: {
28866
+ id: WhatsAppBusinessAccountId;
28867
+ organizationId: string;
28868
+ namespaceId: NamespaceId | null;
28869
+ phoneNumber: string;
28870
+ phoneNumberId: string;
28871
+ displayName: string;
28872
+ whatsappBusinessAccountId: string;
28873
+ verificationStatus: "pending" | "verified" | "failed" | "suspended";
28874
+ credentialStatus: "active" | "reconnect_required";
28875
+ tokenExpiresAt: string | null;
28876
+ isDefault: boolean;
28877
+ webhookUrl: string | null;
28878
+ qualityRating: "green" | "yellow" | "red" | "unknown";
28879
+ messagingLimit: string | null;
28880
+ currentLimit: number;
28881
+ businessPortfolioId: string | null;
28882
+ businessAppConnectedAt: string | null;
28883
+ businessAppDisconnectedAt: string | null;
28884
+ businessAppDisconnectReason: "partnerRemoved" | "offboarded" | "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "primaryInactivity" | "userReRegistered" | null;
28885
+ contactsSyncRequestedAt: string | null;
28886
+ historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
28887
+ historySyncProgress: number | null;
28888
+ isActive: boolean;
28889
+ createdAt: string;
28890
+ updatedAt: string;
28891
+ };
28892
+ };
28893
+ export type WhatsappSetDefaultBusinessAccountResponse = WhatsappSetDefaultBusinessAccountResponses[keyof WhatsappSetDefaultBusinessAccountResponses];
28894
+ export type WhatsappSyncAccountStatusData = {
28895
+ body?: never;
28896
+ path: {
28897
+ accountId: WhatsAppBusinessAccountId;
28898
+ };
28899
+ query?: never;
28900
+ url: "/v1/whatsapp/business-accounts/{accountId}/sync";
28901
+ };
28902
+ export type WhatsappSyncAccountStatusErrors = {
28903
+ /**
28904
+ * MalformedRequestError
28905
+ */
28906
+ 400: MalformedRequestError;
28907
+ /**
28908
+ * UnauthorizedError
28909
+ */
28910
+ 401: UnauthorizedError;
28911
+ /**
28912
+ * FlagDisabledError | ForbiddenError
28913
+ */
28914
+ 403: FlagDisabledError | ForbiddenError;
28915
+ /**
28916
+ * ResourceNotFoundError
28917
+ */
28918
+ 404: ResourceNotFoundError;
28919
+ /**
28920
+ * ValidationError
28921
+ */
28922
+ 422: ValidationError;
28923
+ /**
28924
+ * InternalError | CredentialsError
28925
+ */
28926
+ 500: InternalError | CredentialsError;
28927
+ /**
28928
+ * WhatsAppChannelError
28929
+ */
28930
+ 502: WhatsAppChannelError;
28931
+ /**
28932
+ * GatewayTimeoutError
28933
+ */
28934
+ 504: GatewayTimeoutError;
28935
+ };
28936
+ export type WhatsappSyncAccountStatusError = WhatsappSyncAccountStatusErrors[keyof WhatsappSyncAccountStatusErrors];
28937
+ export type WhatsappSyncAccountStatusResponses = {
28938
+ /**
28939
+ * Success
28940
+ */
28941
+ 200: {
28942
+ id: WhatsAppBusinessAccountId;
28943
+ qualityRating: "green" | "yellow" | "red" | "unknown";
28944
+ messagingLimit: string | null;
28945
+ currentLimit: number;
28946
+ businessPortfolioId: string | null;
28947
+ verificationStatus: "pending" | "verified" | "failed" | "suspended";
28948
+ syncedAt: string;
28949
+ };
28950
+ };
28951
+ export type WhatsappSyncAccountStatusResponse = WhatsappSyncAccountStatusResponses[keyof WhatsappSyncAccountStatusResponses];
28952
+ export type WhatsappFlowsListData = {
28953
+ body?: never;
28954
+ path?: never;
28955
+ query?: never;
28956
+ url: "/v1/whatsapp/flows";
28957
+ };
28958
+ export type WhatsappFlowsListErrors = {
28959
+ /**
28960
+ * MalformedRequestError
28961
+ */
28962
+ 400: MalformedRequestError;
28963
+ /**
28964
+ * UnauthorizedError
28965
+ */
28966
+ 401: UnauthorizedError;
28967
+ /**
28968
+ * FlagDisabledError | ForbiddenError
28969
+ */
28970
+ 403: FlagDisabledError | ForbiddenError;
28971
+ /**
28972
+ * ValidationError
28973
+ */
28974
+ 422: ValidationError;
28975
+ /**
28976
+ * InternalError
28977
+ */
28978
+ 500: InternalError;
28979
+ /**
28980
+ * GatewayTimeoutError
28981
+ */
28982
+ 504: GatewayTimeoutError;
28983
+ };
28984
+ export type WhatsappFlowsListError = WhatsappFlowsListErrors[keyof WhatsappFlowsListErrors];
28985
+ export type WhatsappFlowsListResponses = {
28986
+ /**
28987
+ * WhatsAppFlowList
28988
+ */
28989
+ 200: WhatsAppFlowList;
28990
+ };
28991
+ export type WhatsappFlowsListResponse = WhatsappFlowsListResponses[keyof WhatsappFlowsListResponses];
28992
+ export type WhatsappFlowsCreateData = {
28993
+ body: {
28994
+ projectId: TemplateProjectId;
28995
+ handle: string;
28996
+ categories: Array<"SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER">;
28997
+ };
28998
+ path?: never;
28999
+ query?: never;
29000
+ url: "/v1/whatsapp/flows";
29001
+ };
29002
+ export type WhatsappFlowsCreateErrors = {
29003
+ /**
29004
+ * MalformedRequestError
29005
+ */
29006
+ 400: MalformedRequestError;
29007
+ /**
29008
+ * UnauthorizedError
29009
+ */
29010
+ 401: UnauthorizedError;
29011
+ /**
29012
+ * FlagDisabledError | ForbiddenError
29013
+ */
29014
+ 403: FlagDisabledError | ForbiddenError;
29015
+ /**
29016
+ * ResourceNotFoundError
29017
+ */
29018
+ 404: ResourceNotFoundError;
29019
+ /**
29020
+ * ConflictError
29021
+ */
29022
+ 409: ConflictError;
29023
+ /**
29024
+ * ValidationError
29025
+ */
29026
+ 422: ValidationError;
29027
+ /**
29028
+ * InternalError
29029
+ */
29030
+ 500: InternalError;
29031
+ /**
29032
+ * GatewayTimeoutError
29033
+ */
29034
+ 504: GatewayTimeoutError;
29035
+ };
29036
+ export type WhatsappFlowsCreateError = WhatsappFlowsCreateErrors[keyof WhatsappFlowsCreateErrors];
29037
+ export type WhatsappFlowsCreateResponses = {
29038
+ /**
29039
+ * WhatsAppFlow
29040
+ */
29041
+ 201: WhatsAppFlow;
29042
+ };
29043
+ export type WhatsappFlowsCreateResponse = WhatsappFlowsCreateResponses[keyof WhatsappFlowsCreateResponses];
29044
+ export type WhatsappFlowsGetData = {
29045
+ body?: never;
29046
+ path: {
29047
+ id: WhatsAppFlowId;
29048
+ };
29049
+ query?: never;
29050
+ url: "/v1/whatsapp/flows/{id}";
29051
+ };
29052
+ export type WhatsappFlowsGetErrors = {
29053
+ /**
29054
+ * MalformedRequestError
29055
+ */
29056
+ 400: MalformedRequestError;
29057
+ /**
29058
+ * UnauthorizedError
29059
+ */
29060
+ 401: UnauthorizedError;
29061
+ /**
29062
+ * FlagDisabledError | ForbiddenError
29063
+ */
29064
+ 403: FlagDisabledError | ForbiddenError;
29065
+ /**
29066
+ * ResourceNotFoundError
29067
+ */
29068
+ 404: ResourceNotFoundError;
29069
+ /**
29070
+ * ValidationError
29071
+ */
29072
+ 422: ValidationError;
29073
+ /**
29074
+ * InternalError
29075
+ */
29076
+ 500: InternalError;
29077
+ /**
29078
+ * GatewayTimeoutError
29079
+ */
29080
+ 504: GatewayTimeoutError;
29081
+ };
29082
+ export type WhatsappFlowsGetError = WhatsappFlowsGetErrors[keyof WhatsappFlowsGetErrors];
29083
+ export type WhatsappFlowsGetResponses = {
29084
+ /**
29085
+ * WhatsAppFlow
29086
+ */
29087
+ 200: WhatsAppFlow;
29088
+ };
29089
+ export type WhatsappFlowsGetResponse = WhatsappFlowsGetResponses[keyof WhatsappFlowsGetResponses];
29090
+ export type WhatsappFlowsListVersionsData = {
29091
+ body?: never;
29092
+ path: {
29093
+ id: WhatsAppFlowId;
29094
+ };
29095
+ query?: never;
29096
+ url: "/v1/whatsapp/flows/{id}/versions";
29097
+ };
29098
+ export type WhatsappFlowsListVersionsErrors = {
29099
+ /**
29100
+ * MalformedRequestError
29101
+ */
29102
+ 400: MalformedRequestError;
29103
+ /**
29104
+ * UnauthorizedError
29105
+ */
29106
+ 401: UnauthorizedError;
29107
+ /**
29108
+ * FlagDisabledError | ForbiddenError
29109
+ */
29110
+ 403: FlagDisabledError | ForbiddenError;
29111
+ /**
29112
+ * ResourceNotFoundError
29113
+ */
29114
+ 404: ResourceNotFoundError;
29115
+ /**
29116
+ * ValidationError
29117
+ */
29118
+ 422: ValidationError;
29119
+ /**
29120
+ * InternalError
29121
+ */
29122
+ 500: InternalError;
29123
+ /**
29124
+ * GatewayTimeoutError
29125
+ */
29126
+ 504: GatewayTimeoutError;
29127
+ };
29128
+ export type WhatsappFlowsListVersionsError = WhatsappFlowsListVersionsErrors[keyof WhatsappFlowsListVersionsErrors];
29129
+ export type WhatsappFlowsListVersionsResponses = {
29130
+ /**
29131
+ * WhatsAppFlowVersionList
29132
+ */
29133
+ 200: WhatsAppFlowVersionList;
29134
+ };
29135
+ export type WhatsappFlowsListVersionsResponse = WhatsappFlowsListVersionsResponses[keyof WhatsappFlowsListVersionsResponses];
29136
+ export type WhatsappFlowsRecordVersionData = {
29137
+ body: {
29138
+ commitSha: string;
29139
+ expectedWorkspaceRevision: string;
29140
+ };
29141
+ path: {
29142
+ id: WhatsAppFlowId;
29143
+ };
29144
+ query?: never;
29145
+ url: "/v1/whatsapp/flows/{id}/versions";
29146
+ };
29147
+ export type WhatsappFlowsRecordVersionErrors = {
29148
+ /**
29149
+ * MalformedRequestError
29150
+ */
29151
+ 400: MalformedRequestError;
29152
+ /**
29153
+ * UnauthorizedError
29154
+ */
29155
+ 401: UnauthorizedError;
29156
+ /**
29157
+ * FlagDisabledError | ForbiddenError
29158
+ */
29159
+ 403: FlagDisabledError | ForbiddenError;
29160
+ /**
29161
+ * ResourceNotFoundError
29162
+ */
29163
+ 404: ResourceNotFoundError;
29164
+ /**
29165
+ * ConflictError
29166
+ */
29167
+ 409: ConflictError;
29168
+ /**
29169
+ * ValidationError
29170
+ */
29171
+ 422: ValidationError;
29172
+ /**
29173
+ * InternalError
29174
+ */
29175
+ 500: InternalError;
29176
+ /**
29177
+ * ServiceUnavailableError
29178
+ */
29179
+ 503: ServiceUnavailableError;
29180
+ /**
29181
+ * GatewayTimeoutError
29182
+ */
29183
+ 504: GatewayTimeoutError;
29184
+ };
29185
+ export type WhatsappFlowsRecordVersionError = WhatsappFlowsRecordVersionErrors[keyof WhatsappFlowsRecordVersionErrors];
29186
+ export type WhatsappFlowsRecordVersionResponses = {
29187
+ /**
29188
+ * WhatsAppFlowVersion
29189
+ */
29190
+ 201: WhatsAppFlowVersion;
29191
+ };
29192
+ export type WhatsappFlowsRecordVersionResponse = WhatsappFlowsRecordVersionResponses[keyof WhatsappFlowsRecordVersionResponses];
29193
+ export type WhatsappFlowsListRegistrationsData = {
29194
+ body?: never;
29195
+ path: {
29196
+ id: WhatsAppFlowId;
29197
+ };
29198
+ query?: never;
29199
+ url: "/v1/whatsapp/flows/{id}/registrations";
29200
+ };
29201
+ export type WhatsappFlowsListRegistrationsErrors = {
29202
+ /**
29203
+ * MalformedRequestError
29204
+ */
29205
+ 400: MalformedRequestError;
29206
+ /**
29207
+ * UnauthorizedError
29208
+ */
29209
+ 401: UnauthorizedError;
29210
+ /**
29211
+ * FlagDisabledError | ForbiddenError
29212
+ */
29213
+ 403: FlagDisabledError | ForbiddenError;
29214
+ /**
29215
+ * ResourceNotFoundError
29216
+ */
29217
+ 404: ResourceNotFoundError;
29218
+ /**
29219
+ * ValidationError
29220
+ */
29221
+ 422: ValidationError;
29222
+ /**
29223
+ * InternalError
29224
+ */
29225
+ 500: InternalError;
29226
+ /**
29227
+ * GatewayTimeoutError
29228
+ */
29229
+ 504: GatewayTimeoutError;
29230
+ };
29231
+ export type WhatsappFlowsListRegistrationsError = WhatsappFlowsListRegistrationsErrors[keyof WhatsappFlowsListRegistrationsErrors];
29232
+ export type WhatsappFlowsListRegistrationsResponses = {
29233
+ /**
29234
+ * WhatsAppFlowRegistrationList
29235
+ */
29236
+ 200: WhatsAppFlowRegistrationList;
29237
+ };
29238
+ export type WhatsappFlowsListRegistrationsResponse = WhatsappFlowsListRegistrationsResponses[keyof WhatsappFlowsListRegistrationsResponses];
29239
+ export type WhatsappFlowsRegisterData = {
29240
+ body: {
29241
+ businessAccountId?: WhatsAppBusinessAccountId | undefined;
29242
+ };
29243
+ path: {
29244
+ id: WhatsAppFlowId;
29245
+ };
29246
+ query?: never;
29247
+ url: "/v1/whatsapp/flows/{id}/registrations";
29248
+ };
29249
+ export type WhatsappFlowsRegisterErrors = {
29250
+ /**
29251
+ * MalformedRequestError
29252
+ */
29253
+ 400: MalformedRequestError;
29254
+ /**
29255
+ * UnauthorizedError
29256
+ */
29257
+ 401: UnauthorizedError;
29258
+ /**
29259
+ * FlagDisabledError | ForbiddenError
29260
+ */
29261
+ 403: FlagDisabledError | ForbiddenError;
29262
+ /**
29263
+ * ResourceNotFoundError
29264
+ */
29265
+ 404: ResourceNotFoundError;
29266
+ /**
29267
+ * ConflictError
29268
+ */
29269
+ 409: ConflictError;
29270
+ /**
29271
+ * ValidationError
29272
+ */
29273
+ 422: ValidationError;
29274
+ /**
29275
+ * CredentialsError | InternalError
29276
+ */
29277
+ 500: CredentialsError | InternalError;
29278
+ /**
29279
+ * WhatsAppChannelError
29280
+ */
29281
+ 502: WhatsAppChannelError;
29282
+ /**
29283
+ * GatewayTimeoutError
29284
+ */
29285
+ 504: GatewayTimeoutError;
29286
+ };
29287
+ export type WhatsappFlowsRegisterError = WhatsappFlowsRegisterErrors[keyof WhatsappFlowsRegisterErrors];
29288
+ export type WhatsappFlowsRegisterResponses = {
29289
+ /**
29290
+ * WhatsAppFlowRegistration
29291
+ */
29292
+ 201: WhatsAppFlowRegistration;
29293
+ };
29294
+ export type WhatsappFlowsRegisterResponse = WhatsappFlowsRegisterResponses[keyof WhatsappFlowsRegisterResponses];
29295
+ export type WhatsappFlowsRotateEncryptionKeyData = {
29296
+ body: {
29297
+ businessAccountId?: WhatsAppBusinessAccountId | undefined;
29298
+ };
29299
+ path?: never;
29300
+ query?: never;
29301
+ url: "/v1/whatsapp/flows/encryption-key/rotate";
29302
+ };
29303
+ export type WhatsappFlowsRotateEncryptionKeyErrors = {
29304
+ /**
29305
+ * MalformedRequestError
29306
+ */
29307
+ 400: MalformedRequestError;
29308
+ /**
29309
+ * UnauthorizedError
29310
+ */
29311
+ 401: UnauthorizedError;
29312
+ /**
29313
+ * FlagDisabledError | ForbiddenError
29314
+ */
29315
+ 403: FlagDisabledError | ForbiddenError;
29316
+ /**
29317
+ * ResourceNotFoundError
29318
+ */
29319
+ 404: ResourceNotFoundError;
29320
+ /**
29321
+ * ValidationError
29322
+ */
29323
+ 422: ValidationError;
29324
+ /**
29325
+ * CredentialsError | InternalError
29326
+ */
29327
+ 500: CredentialsError | InternalError;
29328
+ /**
29329
+ * WhatsAppChannelError
29330
+ */
29331
+ 502: WhatsAppChannelError;
29332
+ /**
29333
+ * GatewayTimeoutError
29334
+ */
29335
+ 504: GatewayTimeoutError;
29336
+ };
29337
+ export type WhatsappFlowsRotateEncryptionKeyError = WhatsappFlowsRotateEncryptionKeyErrors[keyof WhatsappFlowsRotateEncryptionKeyErrors];
29338
+ export type WhatsappFlowsRotateEncryptionKeyResponses = {
29339
+ /**
29340
+ * WhatsAppFlowEncryptionKey
29341
+ */
29342
+ 200: WhatsAppFlowEncryptionKey;
29343
+ };
29344
+ export type WhatsappFlowsRotateEncryptionKeyResponse = WhatsappFlowsRotateEncryptionKeyResponses[keyof WhatsappFlowsRotateEncryptionKeyResponses];
29345
+ export type WhatsappFlowsSetEndpointData = {
29346
+ body: {
29347
+ url: string;
29348
+ };
29349
+ path: {
29350
+ id: WhatsAppFlowId;
29351
+ };
29352
+ query?: never;
29353
+ url: "/v1/whatsapp/flows/{id}/endpoint";
29354
+ };
29355
+ export type WhatsappFlowsSetEndpointErrors = {
29356
+ /**
29357
+ * MalformedRequestError
29358
+ */
29359
+ 400: MalformedRequestError;
29360
+ /**
29361
+ * UnauthorizedError
29362
+ */
29363
+ 401: UnauthorizedError;
29364
+ /**
29365
+ * FlagDisabledError | ForbiddenError
29366
+ */
29367
+ 403: FlagDisabledError | ForbiddenError;
29368
+ /**
29369
+ * ResourceNotFoundError
29370
+ */
29371
+ 404: ResourceNotFoundError;
29372
+ /**
29373
+ * ValidationError
29374
+ */
29375
+ 422: ValidationError;
29376
+ /**
29377
+ * CredentialsError | InternalError
29378
+ */
29379
+ 500: CredentialsError | InternalError;
29380
+ /**
29381
+ * GatewayTimeoutError
29382
+ */
29383
+ 504: GatewayTimeoutError;
29384
+ };
29385
+ export type WhatsappFlowsSetEndpointError = WhatsappFlowsSetEndpointErrors[keyof WhatsappFlowsSetEndpointErrors];
29386
+ export type WhatsappFlowsSetEndpointResponses = {
29387
+ /**
29388
+ * WhatsAppFlowEndpointSettings
29389
+ */
29390
+ 200: WhatsAppFlowEndpointSettings;
29391
+ };
29392
+ export type WhatsappFlowsSetEndpointResponse = WhatsappFlowsSetEndpointResponses[keyof WhatsappFlowsSetEndpointResponses];
29393
+ export type WhatsappFlowsRotateEndpointSecretData = {
29394
+ body?: never;
29395
+ path: {
29396
+ id: WhatsAppFlowId;
29397
+ };
29398
+ query?: never;
29399
+ url: "/v1/whatsapp/flows/{id}/endpoint/rotate-secret";
29400
+ };
29401
+ export type WhatsappFlowsRotateEndpointSecretErrors = {
29402
+ /**
29403
+ * MalformedRequestError
29404
+ */
29405
+ 400: MalformedRequestError;
29406
+ /**
29407
+ * UnauthorizedError
29408
+ */
29409
+ 401: UnauthorizedError;
29410
+ /**
29411
+ * FlagDisabledError | ForbiddenError
29412
+ */
29413
+ 403: FlagDisabledError | ForbiddenError;
29414
+ /**
29415
+ * ResourceNotFoundError
29416
+ */
29417
+ 404: ResourceNotFoundError;
29418
+ /**
29419
+ * ValidationError
29420
+ */
29421
+ 422: ValidationError;
29422
+ /**
29423
+ * CredentialsError | InternalError
29424
+ */
29425
+ 500: CredentialsError | InternalError;
29426
+ /**
29427
+ * GatewayTimeoutError
29428
+ */
29429
+ 504: GatewayTimeoutError;
29430
+ };
29431
+ export type WhatsappFlowsRotateEndpointSecretError = WhatsappFlowsRotateEndpointSecretErrors[keyof WhatsappFlowsRotateEndpointSecretErrors];
29432
+ export type WhatsappFlowsRotateEndpointSecretResponses = {
29433
+ /**
29434
+ * WhatsAppFlowEndpointSettings
29435
+ */
29436
+ 200: WhatsAppFlowEndpointSettings;
29437
+ };
29438
+ export type WhatsappFlowsRotateEndpointSecretResponse = WhatsappFlowsRotateEndpointSecretResponses[keyof WhatsappFlowsRotateEndpointSecretResponses];
29439
+ export type WhatsappSetupLinksListData = {
29440
+ body?: never;
29441
+ path?: never;
29442
+ query?: {
29443
+ limit?: number | null | undefined;
29444
+ cursor?: string | undefined;
29445
+ namespaceId?: NamespaceId | undefined;
29446
+ status?: WhatsAppSetupLinkStatus | undefined;
29447
+ };
29448
+ url: "/v1/whatsapp/setup-links";
29449
+ };
29450
+ export type WhatsappSetupLinksListErrors = {
29451
+ /**
29452
+ * MalformedRequestError
29453
+ */
29454
+ 400: MalformedRequestError;
29455
+ /**
29456
+ * UnauthorizedError
29457
+ */
29458
+ 401: UnauthorizedError;
29459
+ /**
29460
+ * ForbiddenError | FlagDisabledError
29461
+ */
29462
+ 403: ForbiddenError | FlagDisabledError;
29463
+ /**
29464
+ * ValidationError
29465
+ */
29466
+ 422: ValidationError;
29467
+ /**
29468
+ * InternalError
29469
+ */
29470
+ 500: InternalError;
29471
+ /**
29472
+ * GatewayTimeoutError
29473
+ */
29474
+ 504: GatewayTimeoutError;
29475
+ };
29476
+ export type WhatsappSetupLinksListError = WhatsappSetupLinksListErrors[keyof WhatsappSetupLinksListErrors];
29477
+ export type WhatsappSetupLinksListResponses = {
29478
+ /**
29479
+ * WhatsAppSetupLinkPage
29480
+ */
29481
+ 200: WhatsAppSetupLinkPage;
29482
+ };
29483
+ export type WhatsappSetupLinksListResponse = WhatsappSetupLinksListResponses[keyof WhatsappSetupLinksListResponses];
29484
+ export type WhatsappSetupLinksCreateData = {
29485
+ body: {
29486
+ namespaceId: NamespaceId;
29487
+ redirectUrl?: WhatsAppSetupLinkRedirectUrl | null | undefined;
29488
+ metadata?: WhatsAppSetupLinkMetadataWritable | null | undefined;
29489
+ expiresAt?: string | null | undefined;
29490
+ };
29491
+ path?: never;
29492
+ query?: never;
29493
+ url: "/v1/whatsapp/setup-links";
29494
+ };
29495
+ export type WhatsappSetupLinksCreateErrors = {
29496
+ /**
29497
+ * MalformedRequestError
29498
+ */
29499
+ 400: MalformedRequestError;
29500
+ /**
29501
+ * UnauthorizedError
29502
+ */
29503
+ 401: UnauthorizedError;
29504
+ /**
29505
+ * PaymentRequiredError
29506
+ */
29507
+ 402: PaymentRequiredError;
29508
+ /**
29509
+ * ForbiddenError | FlagDisabledError
29510
+ */
29511
+ 403: ForbiddenError | FlagDisabledError;
29512
+ /**
29513
+ * ResourceNotFoundError
29514
+ */
29515
+ 404: ResourceNotFoundError;
29516
+ /**
29517
+ * ValidationError
29518
+ */
29519
+ 422: ValidationError;
29520
+ /**
29521
+ * InternalError
29522
+ */
29523
+ 500: InternalError;
29524
+ /**
29525
+ * BillingProviderError
29526
+ */
29527
+ 502: BillingProviderError;
29528
+ /**
29529
+ * GatewayTimeoutError
29530
+ */
29531
+ 504: GatewayTimeoutError;
29532
+ };
29533
+ export type WhatsappSetupLinksCreateError = WhatsappSetupLinksCreateErrors[keyof WhatsappSetupLinksCreateErrors];
29534
+ export type WhatsappSetupLinksCreateResponses = {
29535
+ /**
29536
+ * CreatedWhatsAppSetupLink
29537
+ */
29538
+ 201: CreatedWhatsAppSetupLink;
29539
+ };
29540
+ export type WhatsappSetupLinksCreateResponse = WhatsappSetupLinksCreateResponses[keyof WhatsappSetupLinksCreateResponses];
29541
+ export type WhatsappSetupLinksGetData = {
29542
+ body?: never;
29543
+ path: {
29544
+ linkId: WhatsAppSetupLinkId;
29545
+ };
29546
+ query?: never;
29547
+ url: "/v1/whatsapp/setup-links/{linkId}";
29548
+ };
29549
+ export type WhatsappSetupLinksGetErrors = {
29550
+ /**
29551
+ * MalformedRequestError
29552
+ */
29553
+ 400: MalformedRequestError;
29554
+ /**
29555
+ * UnauthorizedError
29556
+ */
29557
+ 401: UnauthorizedError;
29558
+ /**
29559
+ * FlagDisabledError | ForbiddenError
29560
+ */
29561
+ 403: FlagDisabledError | ForbiddenError;
29562
+ /**
29563
+ * ResourceNotFoundError
29564
+ */
29565
+ 404: ResourceNotFoundError;
29566
+ /**
29567
+ * ValidationError
29568
+ */
29569
+ 422: ValidationError;
29570
+ /**
29571
+ * InternalError
29572
+ */
29573
+ 500: InternalError;
29574
+ /**
29575
+ * GatewayTimeoutError
29576
+ */
29577
+ 504: GatewayTimeoutError;
29578
+ };
29579
+ export type WhatsappSetupLinksGetError = WhatsappSetupLinksGetErrors[keyof WhatsappSetupLinksGetErrors];
29580
+ export type WhatsappSetupLinksGetResponses = {
29581
+ /**
29582
+ * WhatsAppSetupLink
29583
+ */
29584
+ 200: WhatsAppSetupLink;
29585
+ };
29586
+ export type WhatsappSetupLinksGetResponse = WhatsappSetupLinksGetResponses[keyof WhatsappSetupLinksGetResponses];
29587
+ export type WhatsappSetupLinksRevokeData = {
29588
+ body?: never;
29589
+ path: {
29590
+ linkId: WhatsAppSetupLinkId;
29591
+ };
29592
+ query?: never;
29593
+ url: "/v1/whatsapp/setup-links/{linkId}/revoke";
29594
+ };
29595
+ export type WhatsappSetupLinksRevokeErrors = {
29596
+ /**
29597
+ * MalformedRequestError
29598
+ */
29599
+ 400: MalformedRequestError;
29600
+ /**
29601
+ * UnauthorizedError
29602
+ */
29603
+ 401: UnauthorizedError;
29604
+ /**
29605
+ * FlagDisabledError | ForbiddenError
29606
+ */
29607
+ 403: FlagDisabledError | ForbiddenError;
29608
+ /**
29609
+ * ResourceNotFoundError
29610
+ */
29611
+ 404: ResourceNotFoundError;
29612
+ /**
29613
+ * WhatsAppSetupLinkUnavailableError
29614
+ */
29615
+ 410: WhatsAppSetupLinkUnavailableError;
29616
+ /**
29617
+ * ValidationError
29618
+ */
29619
+ 422: ValidationError;
29620
+ /**
29621
+ * InternalError
29622
+ */
29623
+ 500: InternalError;
29624
+ /**
29625
+ * GatewayTimeoutError
29626
+ */
29627
+ 504: GatewayTimeoutError;
29628
+ };
29629
+ export type WhatsappSetupLinksRevokeError = WhatsappSetupLinksRevokeErrors[keyof WhatsappSetupLinksRevokeErrors];
29630
+ export type WhatsappSetupLinksRevokeResponses = {
29631
+ /**
29632
+ * WhatsAppSetupLink
29633
+ */
29634
+ 200: WhatsAppSetupLink;
29635
+ };
29636
+ export type WhatsappSetupLinksRevokeResponse = WhatsappSetupLinksRevokeResponses[keyof WhatsappSetupLinksRevokeResponses];
29637
+ export type TemplateRegistrationsListData = {
29638
+ body?: never;
29639
+ path: {
29640
+ id: TemplateId;
29641
+ };
29642
+ query?: never;
29643
+ url: "/v1/templates/{id}/registrations";
29644
+ };
29645
+ export type TemplateRegistrationsListErrors = {
29646
+ /**
29647
+ * MalformedRequestError
29648
+ */
29649
+ 400: MalformedRequestError;
29650
+ /**
29651
+ * UnauthorizedError
29652
+ */
29653
+ 401: UnauthorizedError;
29654
+ /**
29655
+ * FlagDisabledError | ForbiddenError
29656
+ */
29657
+ 403: FlagDisabledError | ForbiddenError;
29658
+ /**
29659
+ * ResourceNotFoundError
29660
+ */
29661
+ 404: ResourceNotFoundError;
29662
+ /**
29663
+ * ValidationError
29664
+ */
29665
+ 422: ValidationError;
29666
+ /**
29667
+ * InternalError
29668
+ */
29669
+ 500: InternalError;
29670
+ /**
29671
+ * GatewayTimeoutError
29672
+ */
29673
+ 504: GatewayTimeoutError;
29674
+ };
29675
+ export type TemplateRegistrationsListError = TemplateRegistrationsListErrors[keyof TemplateRegistrationsListErrors];
29676
+ export type TemplateRegistrationsListResponses = {
29677
+ /**
29678
+ * TemplateRegistrationList
29679
+ */
29680
+ 200: TemplateRegistrationList;
29681
+ };
29682
+ export type TemplateRegistrationsListResponse = TemplateRegistrationsListResponses[keyof TemplateRegistrationsListResponses];
29683
+ export type TemplateRegistrationsSubmitData = {
29684
+ body: {
29685
+ provider: "whatsapp";
29686
+ businessAccountId?: WhatsAppBusinessAccountId | undefined;
29687
+ };
29688
+ path: {
29689
+ id: TemplateId;
29690
+ };
29691
+ query?: never;
29692
+ url: "/v1/templates/{id}/registrations";
29693
+ };
29694
+ export type TemplateRegistrationsSubmitErrors = {
29695
+ /**
29696
+ * MalformedRequestError
29697
+ */
29698
+ 400: MalformedRequestError;
29699
+ /**
29700
+ * UnauthorizedError
29701
+ */
29702
+ 401: UnauthorizedError;
29703
+ /**
29704
+ * ForbiddenError | FlagDisabledError
29705
+ */
29706
+ 403: ForbiddenError | FlagDisabledError;
29707
+ /**
29708
+ * ResourceNotFoundError
29709
+ */
29710
+ 404: ResourceNotFoundError;
29711
+ /**
29712
+ * ConflictError
29713
+ */
29714
+ 409: ConflictError;
29715
+ /**
29716
+ * ValidationError
29717
+ */
29718
+ 422: ValidationError;
29719
+ /**
29720
+ * CredentialsError | InternalError
29721
+ */
29722
+ 500: CredentialsError | InternalError;
29723
+ /**
29724
+ * WhatsAppChannelError
29725
+ */
29726
+ 502: WhatsAppChannelError;
29727
+ /**
29728
+ * GatewayTimeoutError
29729
+ */
29730
+ 504: GatewayTimeoutError;
29731
+ };
29732
+ export type TemplateRegistrationsSubmitError = TemplateRegistrationsSubmitErrors[keyof TemplateRegistrationsSubmitErrors];
29733
+ export type TemplateRegistrationsSubmitResponses = {
29734
+ /**
29735
+ * TemplateRegistration
29736
+ */
29737
+ 201: TemplateRegistration;
29738
+ };
29739
+ export type TemplateRegistrationsSubmitResponse = TemplateRegistrationsSubmitResponses[keyof TemplateRegistrationsSubmitResponses];
29740
+ export type TemplateRegistrationsGetData = {
29741
+ body?: never;
29742
+ path: {
29743
+ id: TemplateId;
29744
+ registrationId: TemplateRegistrationId;
29745
+ };
29746
+ query?: never;
29747
+ url: "/v1/templates/{id}/registrations/{registrationId}";
29748
+ };
29749
+ export type TemplateRegistrationsGetErrors = {
29750
+ /**
29751
+ * MalformedRequestError
29752
+ */
29753
+ 400: MalformedRequestError;
29754
+ /**
29755
+ * UnauthorizedError
29756
+ */
29757
+ 401: UnauthorizedError;
29758
+ /**
29759
+ * FlagDisabledError | ForbiddenError
29760
+ */
29761
+ 403: FlagDisabledError | ForbiddenError;
29762
+ /**
29763
+ * ResourceNotFoundError
29764
+ */
29765
+ 404: ResourceNotFoundError;
29766
+ /**
29767
+ * ValidationError
29768
+ */
29769
+ 422: ValidationError;
29770
+ /**
29771
+ * InternalError
29772
+ */
29773
+ 500: InternalError;
29774
+ /**
29775
+ * GatewayTimeoutError
29776
+ */
29777
+ 504: GatewayTimeoutError;
29778
+ };
29779
+ export type TemplateRegistrationsGetError = TemplateRegistrationsGetErrors[keyof TemplateRegistrationsGetErrors];
29780
+ export type TemplateRegistrationsGetResponses = {
29781
+ /**
29782
+ * TemplateRegistration
29783
+ */
29784
+ 200: TemplateRegistration;
29785
+ };
29786
+ export type TemplateRegistrationsGetResponse = TemplateRegistrationsGetResponses[keyof TemplateRegistrationsGetResponses];