samva 0.44.0 → 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 (91) 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 +1850 -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/index.d.ts +9 -1
  29. package/dist/effect/generated/journeys.d.ts +1 -3
  30. package/dist/effect/generated/journeys.js +2 -6
  31. package/dist/effect/generated/messages.d.ts +1 -5
  32. package/dist/effect/generated/messages.js +2 -10
  33. package/dist/effect/generated/shared.d.ts +92 -2
  34. package/dist/effect/generated/shared.js +43 -2
  35. package/dist/effect/generated/template-registrations.d.ts +651 -0
  36. package/dist/effect/generated/template-registrations.js +138 -0
  37. package/dist/effect/generated/whats-app-flows.d.ts +1838 -0
  38. package/dist/effect/generated/whats-app-flows.js +338 -0
  39. package/dist/effect/generated/whats-app-setup-links.d.ts +705 -0
  40. package/dist/effect/generated/whats-app-setup-links.js +150 -0
  41. package/dist/effect/generated/whats-app.d.ts +2089 -0
  42. package/dist/effect/generated/whats-app.js +633 -0
  43. package/dist/effect/generated-metadata.d.ts +245 -0
  44. package/dist/effect/generated-metadata.js +221 -48
  45. package/dist/effect/index.d.ts +4 -0
  46. package/dist/effect/index.js +6 -2
  47. package/dist/effect/mailboxes.d.ts +298 -298
  48. package/dist/effect/mailboxes.js +3 -3
  49. package/dist/effect/media.d.ts +4 -4
  50. package/dist/effect/media.js +2 -2
  51. package/dist/effect/messages.d.ts +17 -17
  52. package/dist/effect/messages.js +4 -4
  53. package/dist/effect/namespaces.d.ts +5 -5
  54. package/dist/effect/namespaces.js +1 -1
  55. package/dist/effect/newsletter-issues.d.ts +8 -8
  56. package/dist/effect/newsletter-issues.js +2 -2
  57. package/dist/effect/newsletters.d.ts +3 -3
  58. package/dist/effect/newsletters.js +1 -1
  59. package/dist/effect/organizations.d.ts +10 -10
  60. package/dist/effect/organizations.js +1 -1
  61. package/dist/effect/runtime.d.ts +2 -0
  62. package/dist/effect/runtime.js +2 -1
  63. package/dist/effect/scheduled-messages.d.ts +839 -839
  64. package/dist/effect/scheduled-messages.js +1 -1
  65. package/dist/effect/template-registrations.d.ts +12 -0
  66. package/dist/effect/template-registrations.js +16 -0
  67. package/dist/effect/templates.d.ts +66 -66
  68. package/dist/effect/templates.js +13 -13
  69. package/dist/effect/topic-forms.d.ts +4 -4
  70. package/dist/effect/topic-forms.js +1 -1
  71. package/dist/effect/topics.d.ts +11 -11
  72. package/dist/effect/topics.js +2 -2
  73. package/dist/effect/webhooks.d.ts +18 -18
  74. package/dist/effect/webhooks.js +3 -3
  75. package/dist/effect/whatsapp-flows.d.ts +34 -0
  76. package/dist/effect/whatsapp-flows.js +30 -0
  77. package/dist/effect/whatsapp-setup-links.d.ts +66 -0
  78. package/dist/effect/whatsapp-setup-links.js +18 -0
  79. package/dist/effect/whatsapp.d.ts +51 -0
  80. package/dist/effect/whatsapp.js +34 -0
  81. package/dist/index.js +2 -2
  82. package/dist/package.js +1 -1
  83. package/dist/promises/client.d.ts +9 -1
  84. package/dist/promises/client.js +11 -3
  85. package/dist/promises/errors.gen.d.ts +38 -2
  86. package/dist/promises/errors.gen.js +160 -3
  87. package/dist/promises/index.js +2 -2
  88. package/dist/promises/types.gen.d.ts +1 -1
  89. package/dist/service-map.d.ts +917 -736
  90. package/dist/service-map.js +288 -235
  91. 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?: {
@@ -27972,3 +28204,1575 @@ export type ExtensionInstallationsGetRunResponses = {
27972
28204
  200: ExtensionRun;
27973
28205
  };
27974
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];