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
@@ -0,0 +1,2089 @@
1
+ import type * as EffectBrand from "effect/Brand";
2
+ import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
+ import * as Schema from "effect/Schema";
4
+ import { ApiKeySecurityMiddleware, BillingProviderError, CampaignId, ConflictError, CredentialsError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, JourneyId, MalformedRequestError, MessageDeliveryId, NamespaceId, PaymentRequiredError, ResourceNotFoundError, TemplateId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError, __SamvaRuntimeNonEmptySensitiveString, __SamvaRuntimeSensitiveString } from "./shared";
5
+ export type PaginationMeta = {
6
+ readonly page: number;
7
+ readonly limit: number;
8
+ readonly total: number;
9
+ readonly totalPages: number;
10
+ };
11
+ export declare const PaginationMeta: Schema.Struct<{
12
+ readonly page: Schema.Finite;
13
+ readonly limit: Schema.Finite;
14
+ readonly total: Schema.Finite;
15
+ readonly totalPages: Schema.Finite;
16
+ }>;
17
+ export type WhatsAppServiceWindowId = string & EffectBrand.Brand<"WhatsAppServiceWindowId">;
18
+ export declare const WhatsAppServiceWindowId: Schema.brand<Schema.String, "WhatsAppServiceWindowId">;
19
+ export type MoneyAmount = {
20
+ readonly amount: string;
21
+ readonly currency: string;
22
+ };
23
+ export declare const MoneyAmount: Schema.Struct<{
24
+ readonly amount: Schema.String;
25
+ readonly currency: Schema.String;
26
+ }>;
27
+ export type WhatsAppTemplateStatsSource = {
28
+ readonly type: "campaign";
29
+ readonly campaignId: CampaignId;
30
+ } | {
31
+ readonly type: "journey";
32
+ readonly journeyId: JourneyId;
33
+ readonly nodeId: string;
34
+ } | {
35
+ readonly type: "direct";
36
+ };
37
+ export declare const WhatsAppTemplateStatsSource: Schema.Union<readonly [Schema.Struct<{
38
+ readonly type: Schema.Literal<"campaign">;
39
+ readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
40
+ }>, Schema.Struct<{
41
+ readonly type: Schema.Literal<"journey">;
42
+ readonly journeyId: Schema.brand<Schema.String, "JourneyId">;
43
+ readonly nodeId: Schema.String;
44
+ }>, Schema.Struct<{
45
+ readonly type: Schema.Literal<"direct">;
46
+ }>]>;
47
+ export type WhatsAppTemplateStatsRow = {
48
+ readonly templateId: TemplateId;
49
+ readonly templateSlug: string;
50
+ readonly name: string;
51
+ readonly language: string;
52
+ readonly category: "marketing" | "utility" | "authentication" | null;
53
+ readonly source: WhatsAppTemplateStatsSource;
54
+ readonly sent: number;
55
+ readonly delivered: number;
56
+ readonly read: number;
57
+ readonly failed: number;
58
+ readonly estimatedProviderCosts: ReadonlyArray<MoneyAmount>;
59
+ };
60
+ export declare const WhatsAppTemplateStatsRow: Schema.Struct<{
61
+ readonly templateId: Schema.brand<Schema.String, "TemplateId">;
62
+ readonly templateSlug: Schema.String;
63
+ readonly name: Schema.String;
64
+ readonly language: Schema.String;
65
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>, Schema.Null]>;
66
+ readonly source: Schema.Union<readonly [Schema.Struct<{
67
+ readonly type: Schema.Literal<"campaign">;
68
+ readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
69
+ }>, Schema.Struct<{
70
+ readonly type: Schema.Literal<"journey">;
71
+ readonly journeyId: Schema.brand<Schema.String, "JourneyId">;
72
+ readonly nodeId: Schema.String;
73
+ }>, Schema.Struct<{
74
+ readonly type: Schema.Literal<"direct">;
75
+ }>]>;
76
+ readonly sent: Schema.Finite;
77
+ readonly delivered: Schema.Finite;
78
+ readonly read: Schema.Finite;
79
+ readonly failed: Schema.Finite;
80
+ readonly estimatedProviderCosts: Schema.$Array<Schema.Struct<{
81
+ readonly amount: Schema.String;
82
+ readonly currency: Schema.String;
83
+ }>>;
84
+ }>;
85
+ export type WhatsAppTemplateStats = {
86
+ readonly items: ReadonlyArray<WhatsAppTemplateStatsRow>;
87
+ };
88
+ export declare const WhatsAppTemplateStats: Schema.Struct<{
89
+ readonly items: Schema.$Array<Schema.Struct<{
90
+ readonly templateId: Schema.brand<Schema.String, "TemplateId">;
91
+ readonly templateSlug: Schema.String;
92
+ readonly name: Schema.String;
93
+ readonly language: Schema.String;
94
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>, Schema.Null]>;
95
+ readonly source: Schema.Union<readonly [Schema.Struct<{
96
+ readonly type: Schema.Literal<"campaign">;
97
+ readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
98
+ }>, Schema.Struct<{
99
+ readonly type: Schema.Literal<"journey">;
100
+ readonly journeyId: Schema.brand<Schema.String, "JourneyId">;
101
+ readonly nodeId: Schema.String;
102
+ }>, Schema.Struct<{
103
+ readonly type: Schema.Literal<"direct">;
104
+ }>]>;
105
+ readonly sent: Schema.Finite;
106
+ readonly delivered: Schema.Finite;
107
+ readonly read: Schema.Finite;
108
+ readonly failed: Schema.Finite;
109
+ readonly estimatedProviderCosts: Schema.$Array<Schema.Struct<{
110
+ readonly amount: Schema.String;
111
+ readonly currency: Schema.String;
112
+ }>>;
113
+ }>>;
114
+ }>;
115
+ export type WhatsappListBusinessAccountsQuery = {
116
+ readonly page?: number | null;
117
+ readonly limit?: number | null;
118
+ readonly isActive?: boolean | null;
119
+ readonly verificationStatus?: "pending" | "verified" | "failed" | "suspended";
120
+ readonly namespaceId?: NamespaceId;
121
+ };
122
+ export declare const WhatsappListBusinessAccountsQuery: Schema.Struct<{
123
+ readonly page: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
124
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
125
+ readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
126
+ readonly verificationStatus: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>>;
127
+ readonly namespaceId: Schema.optionalKey<Schema.brand<Schema.String, "NamespaceId">>;
128
+ }>;
129
+ export type WhatsappListBusinessAccounts200 = {
130
+ readonly items: ReadonlyArray<{
131
+ readonly id: WhatsAppBusinessAccountId;
132
+ readonly organizationId: string;
133
+ readonly namespaceId: NamespaceId | null;
134
+ readonly phoneNumber: string;
135
+ readonly phoneNumberId: string;
136
+ readonly displayName: string;
137
+ readonly whatsappBusinessAccountId: string;
138
+ readonly verificationStatus: "pending" | "verified" | "failed" | "suspended";
139
+ readonly credentialStatus: "active" | "reconnect_required";
140
+ readonly tokenExpiresAt: string | null;
141
+ readonly isDefault: boolean;
142
+ readonly webhookUrl: string | null;
143
+ readonly qualityRating: "green" | "yellow" | "red" | "unknown";
144
+ readonly messagingLimit: string | null;
145
+ readonly currentLimit: number;
146
+ readonly businessPortfolioId: string | null;
147
+ readonly businessAppConnectedAt: string | null;
148
+ readonly businessAppDisconnectedAt: string | null;
149
+ readonly businessAppDisconnectReason: "partnerRemoved" | "offboarded" | "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "primaryInactivity" | "userReRegistered" | null;
150
+ readonly contactsSyncRequestedAt: string | null;
151
+ readonly historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
152
+ readonly historySyncProgress: number | null;
153
+ readonly isActive: boolean;
154
+ readonly createdAt: string;
155
+ readonly updatedAt: string;
156
+ }>;
157
+ readonly pagination: PaginationMeta;
158
+ };
159
+ export declare const WhatsappListBusinessAccounts200: Schema.Struct<{
160
+ readonly items: Schema.$Array<Schema.Struct<{
161
+ readonly id: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
162
+ readonly organizationId: Schema.String;
163
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
164
+ readonly phoneNumber: Schema.String;
165
+ readonly phoneNumberId: Schema.String;
166
+ readonly displayName: Schema.String;
167
+ readonly whatsappBusinessAccountId: Schema.String;
168
+ readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
169
+ readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
170
+ readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
171
+ readonly isDefault: Schema.Boolean;
172
+ readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
173
+ readonly qualityRating: Schema.Union<readonly [Schema.Literal<"green">, Schema.Literal<"yellow">, Schema.Literal<"red">, Schema.Literal<"unknown">]>;
174
+ readonly messagingLimit: Schema.Union<readonly [Schema.String, Schema.Null]>;
175
+ readonly currentLimit: Schema.Finite;
176
+ readonly businessPortfolioId: Schema.Union<readonly [Schema.String, Schema.Null]>;
177
+ readonly businessAppConnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
178
+ readonly businessAppDisconnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
179
+ readonly businessAppDisconnectReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"partnerRemoved">, Schema.Literal<"offboarded">, Schema.Literal<"accountDisconnected">, Schema.Literal<"businessDowngrade">, Schema.Literal<"changeNumber">, Schema.Literal<"companionInactivity">, Schema.Literal<"primaryInactivity">, Schema.Literal<"userReRegistered">]>, Schema.Null]>;
180
+ readonly contactsSyncRequestedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
181
+ readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
182
+ readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
183
+ readonly isActive: Schema.Boolean;
184
+ readonly createdAt: Schema.String;
185
+ readonly updatedAt: Schema.String;
186
+ }>>;
187
+ readonly pagination: Schema.Struct<{
188
+ readonly page: Schema.Finite;
189
+ readonly limit: Schema.Finite;
190
+ readonly total: Schema.Finite;
191
+ readonly totalPages: Schema.Finite;
192
+ }>;
193
+ }>;
194
+ export type WhatsappListBusinessAccounts400 = MalformedRequestError;
195
+ export declare const WhatsappListBusinessAccounts400: typeof MalformedRequestError;
196
+ export type WhatsappListBusinessAccounts401 = UnauthorizedError;
197
+ export declare const WhatsappListBusinessAccounts401: typeof UnauthorizedError;
198
+ export type WhatsappListBusinessAccounts403 = ForbiddenError | FlagDisabledError;
199
+ export declare const WhatsappListBusinessAccounts403: Schema.Union<readonly [typeof ForbiddenError, typeof FlagDisabledError]>;
200
+ export type WhatsappListBusinessAccounts422 = ValidationError;
201
+ export declare const WhatsappListBusinessAccounts422: typeof ValidationError;
202
+ export type WhatsappListBusinessAccounts500 = InternalError;
203
+ export declare const WhatsappListBusinessAccounts500: typeof InternalError;
204
+ export type WhatsappListBusinessAccounts504 = GatewayTimeoutError;
205
+ export declare const WhatsappListBusinessAccounts504: typeof GatewayTimeoutError;
206
+ export type WhatsappConnectBusinessAccountRequestJson = {
207
+ readonly code: __SamvaRuntimeNonEmptySensitiveString;
208
+ readonly wabaId: string;
209
+ readonly phoneNumberId: string;
210
+ readonly namespaceId?: NamespaceId | null;
211
+ };
212
+ export declare const WhatsappConnectBusinessAccountRequestJson: Schema.Struct<{
213
+ readonly code: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
214
+ readonly wabaId: Schema.String;
215
+ readonly phoneNumberId: Schema.String;
216
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
217
+ }>;
218
+ export type WhatsappConnectBusinessAccount201 = {
219
+ readonly id: WhatsAppBusinessAccountId;
220
+ readonly organizationId: string;
221
+ readonly namespaceId: NamespaceId | null;
222
+ readonly phoneNumber: string;
223
+ readonly phoneNumberId: string;
224
+ readonly displayName: string;
225
+ readonly whatsappBusinessAccountId: string;
226
+ readonly verificationStatus: "pending" | "verified" | "failed" | "suspended";
227
+ readonly credentialStatus: "active" | "reconnect_required";
228
+ readonly tokenExpiresAt: string | null;
229
+ readonly isDefault: boolean;
230
+ readonly webhookUrl: string | null;
231
+ readonly qualityRating: "green" | "yellow" | "red" | "unknown";
232
+ readonly messagingLimit: string | null;
233
+ readonly currentLimit: number;
234
+ readonly businessPortfolioId: string | null;
235
+ readonly businessAppConnectedAt: string | null;
236
+ readonly businessAppDisconnectedAt: string | null;
237
+ readonly businessAppDisconnectReason: "partnerRemoved" | "offboarded" | "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "primaryInactivity" | "userReRegistered" | null;
238
+ readonly contactsSyncRequestedAt: string | null;
239
+ readonly historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
240
+ readonly historySyncProgress: number | null;
241
+ readonly isActive: boolean;
242
+ readonly createdAt: string;
243
+ readonly updatedAt: string;
244
+ };
245
+ export declare const WhatsappConnectBusinessAccount201: Schema.Struct<{
246
+ readonly id: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
247
+ readonly organizationId: Schema.String;
248
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
249
+ readonly phoneNumber: Schema.String;
250
+ readonly phoneNumberId: Schema.String;
251
+ readonly displayName: Schema.String;
252
+ readonly whatsappBusinessAccountId: Schema.String;
253
+ readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
254
+ readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
255
+ readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
256
+ readonly isDefault: Schema.Boolean;
257
+ readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
258
+ readonly qualityRating: Schema.Union<readonly [Schema.Literal<"green">, Schema.Literal<"yellow">, Schema.Literal<"red">, Schema.Literal<"unknown">]>;
259
+ readonly messagingLimit: Schema.Union<readonly [Schema.String, Schema.Null]>;
260
+ readonly currentLimit: Schema.Finite;
261
+ readonly businessPortfolioId: Schema.Union<readonly [Schema.String, Schema.Null]>;
262
+ readonly businessAppConnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
263
+ readonly businessAppDisconnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
264
+ readonly businessAppDisconnectReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"partnerRemoved">, Schema.Literal<"offboarded">, Schema.Literal<"accountDisconnected">, Schema.Literal<"businessDowngrade">, Schema.Literal<"changeNumber">, Schema.Literal<"companionInactivity">, Schema.Literal<"primaryInactivity">, Schema.Literal<"userReRegistered">]>, Schema.Null]>;
265
+ readonly contactsSyncRequestedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
266
+ readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
267
+ readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
268
+ readonly isActive: Schema.Boolean;
269
+ readonly createdAt: Schema.String;
270
+ readonly updatedAt: Schema.String;
271
+ }>;
272
+ export type WhatsappConnectBusinessAccount400 = MalformedRequestError;
273
+ export declare const WhatsappConnectBusinessAccount400: typeof MalformedRequestError;
274
+ export type WhatsappConnectBusinessAccount401 = UnauthorizedError;
275
+ export declare const WhatsappConnectBusinessAccount401: typeof UnauthorizedError;
276
+ export type WhatsappConnectBusinessAccount402 = PaymentRequiredError;
277
+ export declare const WhatsappConnectBusinessAccount402: typeof PaymentRequiredError;
278
+ export type WhatsappConnectBusinessAccount403 = ForbiddenError | FlagDisabledError;
279
+ export declare const WhatsappConnectBusinessAccount403: Schema.Union<readonly [typeof ForbiddenError, typeof FlagDisabledError]>;
280
+ export type WhatsappConnectBusinessAccount404 = ResourceNotFoundError;
281
+ export declare const WhatsappConnectBusinessAccount404: typeof ResourceNotFoundError;
282
+ export type WhatsappConnectBusinessAccount409 = ConflictError;
283
+ export declare const WhatsappConnectBusinessAccount409: typeof ConflictError;
284
+ export type WhatsappConnectBusinessAccount422 = ValidationError;
285
+ export declare const WhatsappConnectBusinessAccount422: typeof ValidationError;
286
+ export type WhatsappConnectBusinessAccount500 = InternalError | CredentialsError;
287
+ export declare const WhatsappConnectBusinessAccount500: Schema.Union<readonly [typeof InternalError, typeof CredentialsError]>;
288
+ export type WhatsappConnectBusinessAccount502 = WhatsAppChannelError | BillingProviderError;
289
+ export declare const WhatsappConnectBusinessAccount502: Schema.Union<readonly [typeof WhatsAppChannelError, typeof BillingProviderError]>;
290
+ export type WhatsappConnectBusinessAccount504 = GatewayTimeoutError;
291
+ export declare const WhatsappConnectBusinessAccount504: typeof GatewayTimeoutError;
292
+ export type WhatsappGetBusinessAccountPathParams = {
293
+ readonly accountId: WhatsAppBusinessAccountId;
294
+ };
295
+ export declare const WhatsappGetBusinessAccountPathParams: Schema.Struct<{
296
+ readonly accountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
297
+ }>;
298
+ export type WhatsappGetBusinessAccount200 = {
299
+ readonly id: WhatsAppBusinessAccountId;
300
+ readonly organizationId: string;
301
+ readonly namespaceId: NamespaceId | null;
302
+ readonly phoneNumber: string;
303
+ readonly phoneNumberId: string;
304
+ readonly displayName: string;
305
+ readonly whatsappBusinessAccountId: string;
306
+ readonly verificationStatus: "pending" | "verified" | "failed" | "suspended";
307
+ readonly credentialStatus: "active" | "reconnect_required";
308
+ readonly tokenExpiresAt: string | null;
309
+ readonly isDefault: boolean;
310
+ readonly webhookUrl: string | null;
311
+ readonly qualityRating: "green" | "yellow" | "red" | "unknown";
312
+ readonly messagingLimit: string | null;
313
+ readonly currentLimit: number;
314
+ readonly businessPortfolioId: string | null;
315
+ readonly businessAppConnectedAt: string | null;
316
+ readonly businessAppDisconnectedAt: string | null;
317
+ readonly businessAppDisconnectReason: "partnerRemoved" | "offboarded" | "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "primaryInactivity" | "userReRegistered" | null;
318
+ readonly contactsSyncRequestedAt: string | null;
319
+ readonly historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
320
+ readonly historySyncProgress: number | null;
321
+ readonly isActive: boolean;
322
+ readonly createdAt: string;
323
+ readonly updatedAt: string;
324
+ };
325
+ export declare const WhatsappGetBusinessAccount200: Schema.Struct<{
326
+ readonly id: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
327
+ readonly organizationId: Schema.String;
328
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
329
+ readonly phoneNumber: Schema.String;
330
+ readonly phoneNumberId: Schema.String;
331
+ readonly displayName: Schema.String;
332
+ readonly whatsappBusinessAccountId: Schema.String;
333
+ readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
334
+ readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
335
+ readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
336
+ readonly isDefault: Schema.Boolean;
337
+ readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
338
+ readonly qualityRating: Schema.Union<readonly [Schema.Literal<"green">, Schema.Literal<"yellow">, Schema.Literal<"red">, Schema.Literal<"unknown">]>;
339
+ readonly messagingLimit: Schema.Union<readonly [Schema.String, Schema.Null]>;
340
+ readonly currentLimit: Schema.Finite;
341
+ readonly businessPortfolioId: Schema.Union<readonly [Schema.String, Schema.Null]>;
342
+ readonly businessAppConnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
343
+ readonly businessAppDisconnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
344
+ readonly businessAppDisconnectReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"partnerRemoved">, Schema.Literal<"offboarded">, Schema.Literal<"accountDisconnected">, Schema.Literal<"businessDowngrade">, Schema.Literal<"changeNumber">, Schema.Literal<"companionInactivity">, Schema.Literal<"primaryInactivity">, Schema.Literal<"userReRegistered">]>, Schema.Null]>;
345
+ readonly contactsSyncRequestedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
346
+ readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
347
+ readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
348
+ readonly isActive: Schema.Boolean;
349
+ readonly createdAt: Schema.String;
350
+ readonly updatedAt: Schema.String;
351
+ }>;
352
+ export type WhatsappGetBusinessAccount400 = MalformedRequestError;
353
+ export declare const WhatsappGetBusinessAccount400: typeof MalformedRequestError;
354
+ export type WhatsappGetBusinessAccount401 = UnauthorizedError;
355
+ export declare const WhatsappGetBusinessAccount401: typeof UnauthorizedError;
356
+ export type WhatsappGetBusinessAccount403 = FlagDisabledError | ForbiddenError;
357
+ export declare const WhatsappGetBusinessAccount403: Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]>;
358
+ export type WhatsappGetBusinessAccount404 = ResourceNotFoundError;
359
+ export declare const WhatsappGetBusinessAccount404: typeof ResourceNotFoundError;
360
+ export type WhatsappGetBusinessAccount422 = ValidationError;
361
+ export declare const WhatsappGetBusinessAccount422: typeof ValidationError;
362
+ export type WhatsappGetBusinessAccount500 = InternalError;
363
+ export declare const WhatsappGetBusinessAccount500: typeof InternalError;
364
+ export type WhatsappGetBusinessAccount504 = GatewayTimeoutError;
365
+ export declare const WhatsappGetBusinessAccount504: typeof GatewayTimeoutError;
366
+ export type WhatsappDisconnectBusinessAccountPathParams = {
367
+ readonly accountId: WhatsAppBusinessAccountId;
368
+ };
369
+ export declare const WhatsappDisconnectBusinessAccountPathParams: Schema.Struct<{
370
+ readonly accountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
371
+ }>;
372
+ export type WhatsappDisconnectBusinessAccount200 = {
373
+ readonly success: true;
374
+ };
375
+ export declare const WhatsappDisconnectBusinessAccount200: Schema.Struct<{
376
+ readonly success: Schema.Literal<true>;
377
+ }>;
378
+ export type WhatsappDisconnectBusinessAccount400 = MalformedRequestError;
379
+ export declare const WhatsappDisconnectBusinessAccount400: typeof MalformedRequestError;
380
+ export type WhatsappDisconnectBusinessAccount401 = UnauthorizedError;
381
+ export declare const WhatsappDisconnectBusinessAccount401: typeof UnauthorizedError;
382
+ export type WhatsappDisconnectBusinessAccount403 = FlagDisabledError | ForbiddenError;
383
+ export declare const WhatsappDisconnectBusinessAccount403: Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]>;
384
+ export type WhatsappDisconnectBusinessAccount404 = ResourceNotFoundError;
385
+ export declare const WhatsappDisconnectBusinessAccount404: typeof ResourceNotFoundError;
386
+ export type WhatsappDisconnectBusinessAccount422 = ValidationError;
387
+ export declare const WhatsappDisconnectBusinessAccount422: typeof ValidationError;
388
+ export type WhatsappDisconnectBusinessAccount500 = InternalError;
389
+ export declare const WhatsappDisconnectBusinessAccount500: typeof InternalError;
390
+ export type WhatsappDisconnectBusinessAccount504 = GatewayTimeoutError;
391
+ export declare const WhatsappDisconnectBusinessAccount504: typeof GatewayTimeoutError;
392
+ export type WhatsappUpdateBusinessAccountPathParams = {
393
+ readonly accountId: WhatsAppBusinessAccountId;
394
+ };
395
+ export declare const WhatsappUpdateBusinessAccountPathParams: Schema.Struct<{
396
+ readonly accountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
397
+ }>;
398
+ export type WhatsappUpdateBusinessAccountRequestJson = {
399
+ readonly displayName?: string | null;
400
+ readonly webhookUrl?: string | null;
401
+ };
402
+ export declare const WhatsappUpdateBusinessAccountRequestJson: Schema.Struct<{
403
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
404
+ readonly webhookUrl: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
405
+ }>;
406
+ export type WhatsappUpdateBusinessAccount200 = {
407
+ readonly id: WhatsAppBusinessAccountId;
408
+ readonly organizationId: string;
409
+ readonly namespaceId: NamespaceId | null;
410
+ readonly phoneNumber: string;
411
+ readonly phoneNumberId: string;
412
+ readonly displayName: string;
413
+ readonly whatsappBusinessAccountId: string;
414
+ readonly verificationStatus: "pending" | "verified" | "failed" | "suspended";
415
+ readonly credentialStatus: "active" | "reconnect_required";
416
+ readonly tokenExpiresAt: string | null;
417
+ readonly isDefault: boolean;
418
+ readonly webhookUrl: string | null;
419
+ readonly qualityRating: "green" | "yellow" | "red" | "unknown";
420
+ readonly messagingLimit: string | null;
421
+ readonly currentLimit: number;
422
+ readonly businessPortfolioId: string | null;
423
+ readonly businessAppConnectedAt: string | null;
424
+ readonly businessAppDisconnectedAt: string | null;
425
+ readonly businessAppDisconnectReason: "partnerRemoved" | "offboarded" | "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "primaryInactivity" | "userReRegistered" | null;
426
+ readonly contactsSyncRequestedAt: string | null;
427
+ readonly historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
428
+ readonly historySyncProgress: number | null;
429
+ readonly isActive: boolean;
430
+ readonly createdAt: string;
431
+ readonly updatedAt: string;
432
+ };
433
+ export declare const WhatsappUpdateBusinessAccount200: Schema.Struct<{
434
+ readonly id: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
435
+ readonly organizationId: Schema.String;
436
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
437
+ readonly phoneNumber: Schema.String;
438
+ readonly phoneNumberId: Schema.String;
439
+ readonly displayName: Schema.String;
440
+ readonly whatsappBusinessAccountId: Schema.String;
441
+ readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
442
+ readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
443
+ readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
444
+ readonly isDefault: Schema.Boolean;
445
+ readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
446
+ readonly qualityRating: Schema.Union<readonly [Schema.Literal<"green">, Schema.Literal<"yellow">, Schema.Literal<"red">, Schema.Literal<"unknown">]>;
447
+ readonly messagingLimit: Schema.Union<readonly [Schema.String, Schema.Null]>;
448
+ readonly currentLimit: Schema.Finite;
449
+ readonly businessPortfolioId: Schema.Union<readonly [Schema.String, Schema.Null]>;
450
+ readonly businessAppConnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
451
+ readonly businessAppDisconnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
452
+ readonly businessAppDisconnectReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"partnerRemoved">, Schema.Literal<"offboarded">, Schema.Literal<"accountDisconnected">, Schema.Literal<"businessDowngrade">, Schema.Literal<"changeNumber">, Schema.Literal<"companionInactivity">, Schema.Literal<"primaryInactivity">, Schema.Literal<"userReRegistered">]>, Schema.Null]>;
453
+ readonly contactsSyncRequestedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
454
+ readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
455
+ readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
456
+ readonly isActive: Schema.Boolean;
457
+ readonly createdAt: Schema.String;
458
+ readonly updatedAt: Schema.String;
459
+ }>;
460
+ export type WhatsappUpdateBusinessAccount400 = MalformedRequestError;
461
+ export declare const WhatsappUpdateBusinessAccount400: typeof MalformedRequestError;
462
+ export type WhatsappUpdateBusinessAccount401 = UnauthorizedError;
463
+ export declare const WhatsappUpdateBusinessAccount401: typeof UnauthorizedError;
464
+ export type WhatsappUpdateBusinessAccount403 = FlagDisabledError | ForbiddenError;
465
+ export declare const WhatsappUpdateBusinessAccount403: Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]>;
466
+ export type WhatsappUpdateBusinessAccount404 = ResourceNotFoundError;
467
+ export declare const WhatsappUpdateBusinessAccount404: typeof ResourceNotFoundError;
468
+ export type WhatsappUpdateBusinessAccount422 = ValidationError;
469
+ export declare const WhatsappUpdateBusinessAccount422: typeof ValidationError;
470
+ export type WhatsappUpdateBusinessAccount500 = InternalError;
471
+ export declare const WhatsappUpdateBusinessAccount500: typeof InternalError;
472
+ export type WhatsappUpdateBusinessAccount504 = GatewayTimeoutError;
473
+ export declare const WhatsappUpdateBusinessAccount504: typeof GatewayTimeoutError;
474
+ export type WhatsappSetDefaultBusinessAccountPathParams = {
475
+ readonly accountId: WhatsAppBusinessAccountId;
476
+ };
477
+ export declare const WhatsappSetDefaultBusinessAccountPathParams: Schema.Struct<{
478
+ readonly accountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
479
+ }>;
480
+ export type WhatsappSetDefaultBusinessAccount200 = {
481
+ readonly id: WhatsAppBusinessAccountId;
482
+ readonly organizationId: string;
483
+ readonly namespaceId: NamespaceId | null;
484
+ readonly phoneNumber: string;
485
+ readonly phoneNumberId: string;
486
+ readonly displayName: string;
487
+ readonly whatsappBusinessAccountId: string;
488
+ readonly verificationStatus: "pending" | "verified" | "failed" | "suspended";
489
+ readonly credentialStatus: "active" | "reconnect_required";
490
+ readonly tokenExpiresAt: string | null;
491
+ readonly isDefault: boolean;
492
+ readonly webhookUrl: string | null;
493
+ readonly qualityRating: "green" | "yellow" | "red" | "unknown";
494
+ readonly messagingLimit: string | null;
495
+ readonly currentLimit: number;
496
+ readonly businessPortfolioId: string | null;
497
+ readonly businessAppConnectedAt: string | null;
498
+ readonly businessAppDisconnectedAt: string | null;
499
+ readonly businessAppDisconnectReason: "partnerRemoved" | "offboarded" | "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "primaryInactivity" | "userReRegistered" | null;
500
+ readonly contactsSyncRequestedAt: string | null;
501
+ readonly historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
502
+ readonly historySyncProgress: number | null;
503
+ readonly isActive: boolean;
504
+ readonly createdAt: string;
505
+ readonly updatedAt: string;
506
+ };
507
+ export declare const WhatsappSetDefaultBusinessAccount200: Schema.Struct<{
508
+ readonly id: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
509
+ readonly organizationId: Schema.String;
510
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
511
+ readonly phoneNumber: Schema.String;
512
+ readonly phoneNumberId: Schema.String;
513
+ readonly displayName: Schema.String;
514
+ readonly whatsappBusinessAccountId: Schema.String;
515
+ readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
516
+ readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
517
+ readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
518
+ readonly isDefault: Schema.Boolean;
519
+ readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
520
+ readonly qualityRating: Schema.Union<readonly [Schema.Literal<"green">, Schema.Literal<"yellow">, Schema.Literal<"red">, Schema.Literal<"unknown">]>;
521
+ readonly messagingLimit: Schema.Union<readonly [Schema.String, Schema.Null]>;
522
+ readonly currentLimit: Schema.Finite;
523
+ readonly businessPortfolioId: Schema.Union<readonly [Schema.String, Schema.Null]>;
524
+ readonly businessAppConnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
525
+ readonly businessAppDisconnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
526
+ readonly businessAppDisconnectReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"partnerRemoved">, Schema.Literal<"offboarded">, Schema.Literal<"accountDisconnected">, Schema.Literal<"businessDowngrade">, Schema.Literal<"changeNumber">, Schema.Literal<"companionInactivity">, Schema.Literal<"primaryInactivity">, Schema.Literal<"userReRegistered">]>, Schema.Null]>;
527
+ readonly contactsSyncRequestedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
528
+ readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
529
+ readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
530
+ readonly isActive: Schema.Boolean;
531
+ readonly createdAt: Schema.String;
532
+ readonly updatedAt: Schema.String;
533
+ }>;
534
+ export type WhatsappSetDefaultBusinessAccount400 = MalformedRequestError;
535
+ export declare const WhatsappSetDefaultBusinessAccount400: typeof MalformedRequestError;
536
+ export type WhatsappSetDefaultBusinessAccount401 = UnauthorizedError;
537
+ export declare const WhatsappSetDefaultBusinessAccount401: typeof UnauthorizedError;
538
+ export type WhatsappSetDefaultBusinessAccount403 = FlagDisabledError | ForbiddenError;
539
+ export declare const WhatsappSetDefaultBusinessAccount403: Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]>;
540
+ export type WhatsappSetDefaultBusinessAccount404 = ResourceNotFoundError;
541
+ export declare const WhatsappSetDefaultBusinessAccount404: typeof ResourceNotFoundError;
542
+ export type WhatsappSetDefaultBusinessAccount422 = ValidationError;
543
+ export declare const WhatsappSetDefaultBusinessAccount422: typeof ValidationError;
544
+ export type WhatsappSetDefaultBusinessAccount500 = InternalError;
545
+ export declare const WhatsappSetDefaultBusinessAccount500: typeof InternalError;
546
+ export type WhatsappSetDefaultBusinessAccount504 = GatewayTimeoutError;
547
+ export declare const WhatsappSetDefaultBusinessAccount504: typeof GatewayTimeoutError;
548
+ export type WhatsappSyncAccountStatusPathParams = {
549
+ readonly accountId: WhatsAppBusinessAccountId;
550
+ };
551
+ export declare const WhatsappSyncAccountStatusPathParams: Schema.Struct<{
552
+ readonly accountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
553
+ }>;
554
+ export type WhatsappSyncAccountStatus200 = {
555
+ readonly id: WhatsAppBusinessAccountId;
556
+ readonly qualityRating: "green" | "yellow" | "red" | "unknown";
557
+ readonly messagingLimit: string | null;
558
+ readonly currentLimit: number;
559
+ readonly businessPortfolioId: string | null;
560
+ readonly verificationStatus: "pending" | "verified" | "failed" | "suspended";
561
+ readonly syncedAt: string;
562
+ };
563
+ export declare const WhatsappSyncAccountStatus200: Schema.Struct<{
564
+ readonly id: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
565
+ readonly qualityRating: Schema.Union<readonly [Schema.Literal<"green">, Schema.Literal<"yellow">, Schema.Literal<"red">, Schema.Literal<"unknown">]>;
566
+ readonly messagingLimit: Schema.Union<readonly [Schema.String, Schema.Null]>;
567
+ readonly currentLimit: Schema.Finite;
568
+ readonly businessPortfolioId: Schema.Union<readonly [Schema.String, Schema.Null]>;
569
+ readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
570
+ readonly syncedAt: Schema.String;
571
+ }>;
572
+ export type WhatsappSyncAccountStatus400 = MalformedRequestError;
573
+ export declare const WhatsappSyncAccountStatus400: typeof MalformedRequestError;
574
+ export type WhatsappSyncAccountStatus401 = UnauthorizedError;
575
+ export declare const WhatsappSyncAccountStatus401: typeof UnauthorizedError;
576
+ export type WhatsappSyncAccountStatus403 = FlagDisabledError | ForbiddenError;
577
+ export declare const WhatsappSyncAccountStatus403: Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]>;
578
+ export type WhatsappSyncAccountStatus404 = ResourceNotFoundError;
579
+ export declare const WhatsappSyncAccountStatus404: typeof ResourceNotFoundError;
580
+ export type WhatsappSyncAccountStatus422 = ValidationError;
581
+ export declare const WhatsappSyncAccountStatus422: typeof ValidationError;
582
+ export type WhatsappSyncAccountStatus500 = InternalError | CredentialsError;
583
+ export declare const WhatsappSyncAccountStatus500: Schema.Union<readonly [typeof InternalError, typeof CredentialsError]>;
584
+ export type WhatsappSyncAccountStatus502 = WhatsAppChannelError;
585
+ export declare const WhatsappSyncAccountStatus502: typeof WhatsAppChannelError;
586
+ export type WhatsappSyncAccountStatus504 = GatewayTimeoutError;
587
+ export declare const WhatsappSyncAccountStatus504: typeof GatewayTimeoutError;
588
+ export type WhatsappGetMediaDownloadUrlPathParams = {
589
+ readonly deliveryId: MessageDeliveryId;
590
+ };
591
+ export declare const WhatsappGetMediaDownloadUrlPathParams: Schema.Struct<{
592
+ readonly deliveryId: Schema.brand<Schema.String, "MessageDeliveryId">;
593
+ }>;
594
+ export type WhatsappGetMediaDownloadUrl200 = {
595
+ readonly url: __SamvaRuntimeSensitiveString;
596
+ readonly expiresAt: string;
597
+ };
598
+ export declare const WhatsappGetMediaDownloadUrl200: Schema.Struct<{
599
+ readonly url: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
600
+ readonly expiresAt: Schema.String;
601
+ }>;
602
+ export type WhatsappGetMediaDownloadUrl400 = MalformedRequestError;
603
+ export declare const WhatsappGetMediaDownloadUrl400: typeof MalformedRequestError;
604
+ export type WhatsappGetMediaDownloadUrl401 = UnauthorizedError;
605
+ export declare const WhatsappGetMediaDownloadUrl401: typeof UnauthorizedError;
606
+ export type WhatsappGetMediaDownloadUrl403 = FlagDisabledError | ForbiddenError;
607
+ export declare const WhatsappGetMediaDownloadUrl403: Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]>;
608
+ export type WhatsappGetMediaDownloadUrl404 = ResourceNotFoundError;
609
+ export declare const WhatsappGetMediaDownloadUrl404: typeof ResourceNotFoundError;
610
+ export type WhatsappGetMediaDownloadUrl422 = ValidationError;
611
+ export declare const WhatsappGetMediaDownloadUrl422: typeof ValidationError;
612
+ export type WhatsappGetMediaDownloadUrl500 = InternalError;
613
+ export declare const WhatsappGetMediaDownloadUrl500: typeof InternalError;
614
+ export type WhatsappGetMediaDownloadUrl504 = GatewayTimeoutError;
615
+ export declare const WhatsappGetMediaDownloadUrl504: typeof GatewayTimeoutError;
616
+ export type WhatsappGetServiceWindowBillingQuery = {
617
+ readonly serviceWindowId: WhatsAppServiceWindowId;
618
+ };
619
+ export declare const WhatsappGetServiceWindowBillingQuery: Schema.Struct<{
620
+ readonly serviceWindowId: Schema.brand<Schema.String, "WhatsAppServiceWindowId">;
621
+ }>;
622
+ export type WhatsappGetServiceWindowBilling200 = {
623
+ readonly totalMessages: number;
624
+ readonly totalFreeMessages: number;
625
+ readonly totalPaidMessages: number;
626
+ readonly estimatedProviderCosts: ReadonlyArray<MoneyAmount>;
627
+ };
628
+ export declare const WhatsappGetServiceWindowBilling200: Schema.Struct<{
629
+ readonly totalMessages: Schema.Finite;
630
+ readonly totalFreeMessages: Schema.Finite;
631
+ readonly totalPaidMessages: Schema.Finite;
632
+ readonly estimatedProviderCosts: Schema.$Array<Schema.Struct<{
633
+ readonly amount: Schema.String;
634
+ readonly currency: Schema.String;
635
+ }>>;
636
+ }>;
637
+ export type WhatsappGetServiceWindowBilling400 = MalformedRequestError;
638
+ export declare const WhatsappGetServiceWindowBilling400: typeof MalformedRequestError;
639
+ export type WhatsappGetServiceWindowBilling401 = UnauthorizedError;
640
+ export declare const WhatsappGetServiceWindowBilling401: typeof UnauthorizedError;
641
+ export type WhatsappGetServiceWindowBilling403 = FlagDisabledError | ForbiddenError;
642
+ export declare const WhatsappGetServiceWindowBilling403: Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]>;
643
+ export type WhatsappGetServiceWindowBilling404 = ResourceNotFoundError;
644
+ export declare const WhatsappGetServiceWindowBilling404: typeof ResourceNotFoundError;
645
+ export type WhatsappGetServiceWindowBilling422 = ValidationError;
646
+ export declare const WhatsappGetServiceWindowBilling422: typeof ValidationError;
647
+ export type WhatsappGetServiceWindowBilling500 = InternalError;
648
+ export declare const WhatsappGetServiceWindowBilling500: typeof InternalError;
649
+ export type WhatsappGetServiceWindowBilling504 = GatewayTimeoutError;
650
+ export declare const WhatsappGetServiceWindowBilling504: typeof GatewayTimeoutError;
651
+ export type WhatsappGetServiceWindowStatusQuery = {
652
+ readonly customerPhone: string;
653
+ readonly businessPhone: string;
654
+ };
655
+ export declare const WhatsappGetServiceWindowStatusQuery: Schema.Struct<{
656
+ readonly customerPhone: Schema.String;
657
+ readonly businessPhone: Schema.String;
658
+ }>;
659
+ export type WhatsappGetServiceWindowStatus200 = {
660
+ readonly serviceWindowId: WhatsAppServiceWindowId;
661
+ readonly isServiceWindowActive: boolean;
662
+ readonly isFreeEntryPointActive: boolean;
663
+ readonly serviceWindowExpiresAt: string | null;
664
+ readonly freeEntryPointExpiresAt: string | null;
665
+ };
666
+ export declare const WhatsappGetServiceWindowStatus200: Schema.Struct<{
667
+ readonly serviceWindowId: Schema.brand<Schema.String, "WhatsAppServiceWindowId">;
668
+ readonly isServiceWindowActive: Schema.Boolean;
669
+ readonly isFreeEntryPointActive: Schema.Boolean;
670
+ readonly serviceWindowExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
671
+ readonly freeEntryPointExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
672
+ }>;
673
+ export type WhatsappGetServiceWindowStatus400 = MalformedRequestError;
674
+ export declare const WhatsappGetServiceWindowStatus400: typeof MalformedRequestError;
675
+ export type WhatsappGetServiceWindowStatus401 = UnauthorizedError;
676
+ export declare const WhatsappGetServiceWindowStatus401: typeof UnauthorizedError;
677
+ export type WhatsappGetServiceWindowStatus403 = FlagDisabledError | ForbiddenError;
678
+ export declare const WhatsappGetServiceWindowStatus403: Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]>;
679
+ export type WhatsappGetServiceWindowStatus404 = ResourceNotFoundError;
680
+ export declare const WhatsappGetServiceWindowStatus404: typeof ResourceNotFoundError;
681
+ export type WhatsappGetServiceWindowStatus422 = ValidationError;
682
+ export declare const WhatsappGetServiceWindowStatus422: typeof ValidationError;
683
+ export type WhatsappGetServiceWindowStatus500 = InternalError;
684
+ export declare const WhatsappGetServiceWindowStatus500: typeof InternalError;
685
+ export type WhatsappGetServiceWindowStatus504 = GatewayTimeoutError;
686
+ export declare const WhatsappGetServiceWindowStatus504: typeof GatewayTimeoutError;
687
+ export type WhatsappGetStatsQuery = {
688
+ readonly startDate?: string;
689
+ readonly endDate?: string;
690
+ };
691
+ export declare const WhatsappGetStatsQuery: Schema.Struct<{
692
+ readonly startDate: Schema.optionalKey<Schema.String>;
693
+ readonly endDate: Schema.optionalKey<Schema.String>;
694
+ }>;
695
+ export type WhatsappGetStats200 = {
696
+ readonly totalSent: number;
697
+ readonly totalDelivered: number;
698
+ readonly totalRead: number;
699
+ readonly totalFailed: number;
700
+ readonly deliveryRate: number;
701
+ readonly readRate: number;
702
+ readonly failureRate: number;
703
+ };
704
+ export declare const WhatsappGetStats200: Schema.Struct<{
705
+ readonly totalSent: Schema.Finite;
706
+ readonly totalDelivered: Schema.Finite;
707
+ readonly totalRead: Schema.Finite;
708
+ readonly totalFailed: Schema.Finite;
709
+ readonly deliveryRate: Schema.Finite;
710
+ readonly readRate: Schema.Finite;
711
+ readonly failureRate: Schema.Finite;
712
+ }>;
713
+ export type WhatsappGetStats400 = MalformedRequestError;
714
+ export declare const WhatsappGetStats400: typeof MalformedRequestError;
715
+ export type WhatsappGetStats401 = UnauthorizedError;
716
+ export declare const WhatsappGetStats401: typeof UnauthorizedError;
717
+ export type WhatsappGetStats403 = FlagDisabledError | ForbiddenError;
718
+ export declare const WhatsappGetStats403: Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]>;
719
+ export type WhatsappGetStats422 = ValidationError;
720
+ export declare const WhatsappGetStats422: typeof ValidationError;
721
+ export type WhatsappGetStats500 = InternalError;
722
+ export declare const WhatsappGetStats500: typeof InternalError;
723
+ export type WhatsappGetStats504 = GatewayTimeoutError;
724
+ export declare const WhatsappGetStats504: typeof GatewayTimeoutError;
725
+ export type WhatsappGetTemplateStatsQuery = {
726
+ readonly startDate?: string;
727
+ readonly endDate?: string;
728
+ readonly templateId?: TemplateId;
729
+ readonly campaignId?: CampaignId;
730
+ readonly journeyId?: JourneyId;
731
+ };
732
+ export declare const WhatsappGetTemplateStatsQuery: Schema.Struct<{
733
+ readonly startDate: Schema.optionalKey<Schema.String>;
734
+ readonly endDate: Schema.optionalKey<Schema.String>;
735
+ readonly templateId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateId">>;
736
+ readonly campaignId: Schema.optionalKey<Schema.brand<Schema.String, "CampaignId">>;
737
+ readonly journeyId: Schema.optionalKey<Schema.brand<Schema.String, "JourneyId">>;
738
+ }>;
739
+ export type WhatsappGetTemplateStats200 = WhatsAppTemplateStats;
740
+ export declare const WhatsappGetTemplateStats200: Schema.Struct<{
741
+ readonly items: Schema.$Array<Schema.Struct<{
742
+ readonly templateId: Schema.brand<Schema.String, "TemplateId">;
743
+ readonly templateSlug: Schema.String;
744
+ readonly name: Schema.String;
745
+ readonly language: Schema.String;
746
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>, Schema.Null]>;
747
+ readonly source: Schema.Union<readonly [Schema.Struct<{
748
+ readonly type: Schema.Literal<"campaign">;
749
+ readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
750
+ }>, Schema.Struct<{
751
+ readonly type: Schema.Literal<"journey">;
752
+ readonly journeyId: Schema.brand<Schema.String, "JourneyId">;
753
+ readonly nodeId: Schema.String;
754
+ }>, Schema.Struct<{
755
+ readonly type: Schema.Literal<"direct">;
756
+ }>]>;
757
+ readonly sent: Schema.Finite;
758
+ readonly delivered: Schema.Finite;
759
+ readonly read: Schema.Finite;
760
+ readonly failed: Schema.Finite;
761
+ readonly estimatedProviderCosts: Schema.$Array<Schema.Struct<{
762
+ readonly amount: Schema.String;
763
+ readonly currency: Schema.String;
764
+ }>>;
765
+ }>>;
766
+ }>;
767
+ export type WhatsappGetTemplateStats400 = MalformedRequestError;
768
+ export declare const WhatsappGetTemplateStats400: typeof MalformedRequestError;
769
+ export type WhatsappGetTemplateStats401 = UnauthorizedError;
770
+ export declare const WhatsappGetTemplateStats401: typeof UnauthorizedError;
771
+ export type WhatsappGetTemplateStats403 = FlagDisabledError | ForbiddenError;
772
+ export declare const WhatsappGetTemplateStats403: Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]>;
773
+ export type WhatsappGetTemplateStats422 = ValidationError;
774
+ export declare const WhatsappGetTemplateStats422: typeof ValidationError;
775
+ export type WhatsappGetTemplateStats500 = InternalError;
776
+ export declare const WhatsappGetTemplateStats500: typeof InternalError;
777
+ export type WhatsappGetTemplateStats504 = GatewayTimeoutError;
778
+ export declare const WhatsappGetTemplateStats504: typeof GatewayTimeoutError;
779
+ declare const WhatsAppGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp", HttpApiEndpoint.HttpApiEndpoint<"whatsappConnectBusinessAccount", "POST", "/v1/whatsapp/business-accounts", never, never, Schema.toCodecJson<Schema.Struct<{
780
+ readonly code: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
781
+ readonly wabaId: Schema.String;
782
+ readonly phoneNumberId: Schema.String;
783
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
784
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
785
+ readonly id: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
786
+ readonly organizationId: Schema.String;
787
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
788
+ readonly phoneNumber: Schema.String;
789
+ readonly phoneNumberId: Schema.String;
790
+ readonly displayName: Schema.String;
791
+ readonly whatsappBusinessAccountId: Schema.String;
792
+ readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
793
+ readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
794
+ readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
795
+ readonly isDefault: Schema.Boolean;
796
+ readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
797
+ readonly qualityRating: Schema.Union<readonly [Schema.Literal<"green">, Schema.Literal<"yellow">, Schema.Literal<"red">, Schema.Literal<"unknown">]>;
798
+ readonly messagingLimit: Schema.Union<readonly [Schema.String, Schema.Null]>;
799
+ readonly currentLimit: Schema.Finite;
800
+ readonly businessPortfolioId: Schema.Union<readonly [Schema.String, Schema.Null]>;
801
+ readonly businessAppConnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
802
+ readonly businessAppDisconnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
803
+ readonly businessAppDisconnectReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"partnerRemoved">, Schema.Literal<"offboarded">, Schema.Literal<"accountDisconnected">, Schema.Literal<"businessDowngrade">, Schema.Literal<"changeNumber">, Schema.Literal<"companionInactivity">, Schema.Literal<"primaryInactivity">, Schema.Literal<"userReRegistered">]>, Schema.Null]>;
804
+ readonly contactsSyncRequestedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
805
+ readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
806
+ readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
807
+ readonly isActive: Schema.Boolean;
808
+ readonly createdAt: Schema.String;
809
+ readonly updatedAt: Schema.String;
810
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ForbiddenError, typeof FlagDisabledError]> | Schema.Union<readonly [typeof InternalError, typeof CredentialsError]> | Schema.Union<readonly [typeof WhatsAppChannelError, typeof BillingProviderError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
811
+ readonly _tag: "ConflictError";
812
+ readonly message: string;
813
+ readonly resource: string;
814
+ readonly id?: string | null;
815
+ }, readonly [Schema.Struct<{
816
+ readonly _tag: Schema.tag<"ConflictError">;
817
+ readonly message: Schema.String;
818
+ readonly resource: Schema.String;
819
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
820
+ }>], {
821
+ readonly _tag: "ConflictError";
822
+ readonly message: string;
823
+ readonly resource: string;
824
+ readonly id?: string | null;
825
+ }>, Schema.Struct<{
826
+ readonly _tag: Schema.tag<"ConflictError">;
827
+ readonly message: Schema.String;
828
+ readonly resource: Schema.String;
829
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
830
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
831
+ readonly _tag: "GatewayTimeoutError";
832
+ readonly message: string;
833
+ readonly retryAfterSeconds: number;
834
+ }, readonly [Schema.Struct<{
835
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
836
+ readonly message: Schema.String;
837
+ readonly retryAfterSeconds: Schema.Finite;
838
+ }>], {
839
+ readonly _tag: "GatewayTimeoutError";
840
+ readonly message: string;
841
+ readonly retryAfterSeconds: number;
842
+ }>, Schema.Struct<{
843
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
844
+ readonly message: Schema.String;
845
+ readonly retryAfterSeconds: Schema.Finite;
846
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
847
+ readonly _tag: "MalformedRequestError";
848
+ readonly message: string;
849
+ readonly fields: {
850
+ readonly [x: string]: readonly string[];
851
+ };
852
+ }, readonly [Schema.Struct<{
853
+ readonly _tag: Schema.tag<"MalformedRequestError">;
854
+ readonly message: Schema.String;
855
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
856
+ }>], {
857
+ readonly _tag: "MalformedRequestError";
858
+ readonly message: string;
859
+ readonly fields: {
860
+ readonly [x: string]: readonly string[];
861
+ };
862
+ }>, Schema.Struct<{
863
+ readonly _tag: Schema.tag<"MalformedRequestError">;
864
+ readonly message: Schema.String;
865
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
866
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<PaymentRequiredError, {
867
+ readonly _tag: "PaymentRequiredError";
868
+ readonly message: string;
869
+ readonly resource: string;
870
+ readonly currentUsage: number;
871
+ readonly limit: number;
872
+ }, readonly [Schema.Struct<{
873
+ readonly _tag: Schema.tag<"PaymentRequiredError">;
874
+ readonly message: Schema.String;
875
+ readonly resource: Schema.String;
876
+ readonly currentUsage: Schema.Finite;
877
+ readonly limit: Schema.Finite;
878
+ }>], {
879
+ readonly _tag: "PaymentRequiredError";
880
+ readonly message: string;
881
+ readonly resource: string;
882
+ readonly currentUsage: number;
883
+ readonly limit: number;
884
+ }>, Schema.Struct<{
885
+ readonly _tag: Schema.tag<"PaymentRequiredError">;
886
+ readonly message: Schema.String;
887
+ readonly resource: Schema.String;
888
+ readonly currentUsage: Schema.Finite;
889
+ readonly limit: Schema.Finite;
890
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
891
+ readonly _tag: "ResourceNotFoundError";
892
+ readonly resource: string;
893
+ readonly id: string;
894
+ readonly message: string;
895
+ }, readonly [Schema.Struct<{
896
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
897
+ readonly resource: Schema.String;
898
+ readonly id: Schema.String;
899
+ readonly message: Schema.String;
900
+ }>], {
901
+ readonly _tag: "ResourceNotFoundError";
902
+ readonly resource: string;
903
+ readonly id: string;
904
+ readonly message: string;
905
+ }>, Schema.Struct<{
906
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
907
+ readonly resource: Schema.String;
908
+ readonly id: Schema.String;
909
+ readonly message: Schema.String;
910
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
911
+ readonly _tag: "UnauthorizedError";
912
+ readonly message: string;
913
+ }, readonly [Schema.Struct<{
914
+ readonly _tag: Schema.tag<"UnauthorizedError">;
915
+ readonly message: Schema.String;
916
+ }>], {
917
+ readonly _tag: "UnauthorizedError";
918
+ readonly message: string;
919
+ }>, Schema.Struct<{
920
+ readonly _tag: Schema.tag<"UnauthorizedError">;
921
+ readonly message: Schema.String;
922
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
923
+ readonly _tag: "ValidationError";
924
+ readonly message: string;
925
+ readonly fields?: {
926
+ readonly [x: string]: readonly string[];
927
+ } | null;
928
+ }, readonly [Schema.Struct<{
929
+ readonly _tag: Schema.tag<"ValidationError">;
930
+ readonly message: Schema.String;
931
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
932
+ }>], {
933
+ readonly _tag: "ValidationError";
934
+ readonly message: string;
935
+ readonly fields?: {
936
+ readonly [x: string]: readonly string[];
937
+ } | null;
938
+ }>, Schema.Struct<{
939
+ readonly _tag: Schema.tag<"ValidationError">;
940
+ readonly message: Schema.String;
941
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
942
+ }>, never, never>>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappDisconnectBusinessAccount", "DELETE", "/v1/whatsapp/business-accounts/:accountId", Schema.toCodecStringTree<Schema.Struct<{
943
+ readonly accountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
944
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
945
+ readonly success: Schema.Literal<true>;
946
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
947
+ readonly _tag: "GatewayTimeoutError";
948
+ readonly message: string;
949
+ readonly retryAfterSeconds: number;
950
+ }, readonly [Schema.Struct<{
951
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
952
+ readonly message: Schema.String;
953
+ readonly retryAfterSeconds: Schema.Finite;
954
+ }>], {
955
+ readonly _tag: "GatewayTimeoutError";
956
+ readonly message: string;
957
+ readonly retryAfterSeconds: number;
958
+ }>, Schema.Struct<{
959
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
960
+ readonly message: Schema.String;
961
+ readonly retryAfterSeconds: Schema.Finite;
962
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
963
+ readonly _tag: "MalformedRequestError";
964
+ readonly message: string;
965
+ readonly fields: {
966
+ readonly [x: string]: readonly string[];
967
+ };
968
+ }, readonly [Schema.Struct<{
969
+ readonly _tag: Schema.tag<"MalformedRequestError">;
970
+ readonly message: Schema.String;
971
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
972
+ }>], {
973
+ readonly _tag: "MalformedRequestError";
974
+ readonly message: string;
975
+ readonly fields: {
976
+ readonly [x: string]: readonly string[];
977
+ };
978
+ }>, Schema.Struct<{
979
+ readonly _tag: Schema.tag<"MalformedRequestError">;
980
+ readonly message: Schema.String;
981
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
982
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
983
+ readonly _tag: "ResourceNotFoundError";
984
+ readonly resource: string;
985
+ readonly id: string;
986
+ readonly message: string;
987
+ }, readonly [Schema.Struct<{
988
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
989
+ readonly resource: Schema.String;
990
+ readonly id: Schema.String;
991
+ readonly message: Schema.String;
992
+ }>], {
993
+ readonly _tag: "ResourceNotFoundError";
994
+ readonly resource: string;
995
+ readonly id: string;
996
+ readonly message: string;
997
+ }>, Schema.Struct<{
998
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
999
+ readonly resource: Schema.String;
1000
+ readonly id: Schema.String;
1001
+ readonly message: Schema.String;
1002
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
1003
+ readonly _tag: "UnauthorizedError";
1004
+ readonly message: string;
1005
+ }, readonly [Schema.Struct<{
1006
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1007
+ readonly message: Schema.String;
1008
+ }>], {
1009
+ readonly _tag: "UnauthorizedError";
1010
+ readonly message: string;
1011
+ }>, Schema.Struct<{
1012
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1013
+ readonly message: Schema.String;
1014
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
1015
+ readonly _tag: "ValidationError";
1016
+ readonly message: string;
1017
+ readonly fields?: {
1018
+ readonly [x: string]: readonly string[];
1019
+ } | null;
1020
+ }, readonly [Schema.Struct<{
1021
+ readonly _tag: Schema.tag<"ValidationError">;
1022
+ readonly message: Schema.String;
1023
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1024
+ }>], {
1025
+ readonly _tag: "ValidationError";
1026
+ readonly message: string;
1027
+ readonly fields?: {
1028
+ readonly [x: string]: readonly string[];
1029
+ } | null;
1030
+ }>, Schema.Struct<{
1031
+ readonly _tag: Schema.tag<"ValidationError">;
1032
+ readonly message: Schema.String;
1033
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1034
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappGetBusinessAccount", "GET", "/v1/whatsapp/business-accounts/:accountId", Schema.toCodecStringTree<Schema.Struct<{
1035
+ readonly accountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
1036
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1037
+ readonly id: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
1038
+ readonly organizationId: Schema.String;
1039
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1040
+ readonly phoneNumber: Schema.String;
1041
+ readonly phoneNumberId: Schema.String;
1042
+ readonly displayName: Schema.String;
1043
+ readonly whatsappBusinessAccountId: Schema.String;
1044
+ readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
1045
+ readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
1046
+ readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1047
+ readonly isDefault: Schema.Boolean;
1048
+ readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
1049
+ readonly qualityRating: Schema.Union<readonly [Schema.Literal<"green">, Schema.Literal<"yellow">, Schema.Literal<"red">, Schema.Literal<"unknown">]>;
1050
+ readonly messagingLimit: Schema.Union<readonly [Schema.String, Schema.Null]>;
1051
+ readonly currentLimit: Schema.Finite;
1052
+ readonly businessPortfolioId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1053
+ readonly businessAppConnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1054
+ readonly businessAppDisconnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1055
+ readonly businessAppDisconnectReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"partnerRemoved">, Schema.Literal<"offboarded">, Schema.Literal<"accountDisconnected">, Schema.Literal<"businessDowngrade">, Schema.Literal<"changeNumber">, Schema.Literal<"companionInactivity">, Schema.Literal<"primaryInactivity">, Schema.Literal<"userReRegistered">]>, Schema.Null]>;
1056
+ readonly contactsSyncRequestedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1057
+ readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
1058
+ readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
1059
+ readonly isActive: Schema.Boolean;
1060
+ readonly createdAt: Schema.String;
1061
+ readonly updatedAt: Schema.String;
1062
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
1063
+ readonly _tag: "GatewayTimeoutError";
1064
+ readonly message: string;
1065
+ readonly retryAfterSeconds: number;
1066
+ }, readonly [Schema.Struct<{
1067
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1068
+ readonly message: Schema.String;
1069
+ readonly retryAfterSeconds: Schema.Finite;
1070
+ }>], {
1071
+ readonly _tag: "GatewayTimeoutError";
1072
+ readonly message: string;
1073
+ readonly retryAfterSeconds: number;
1074
+ }>, Schema.Struct<{
1075
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1076
+ readonly message: Schema.String;
1077
+ readonly retryAfterSeconds: Schema.Finite;
1078
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1079
+ readonly _tag: "MalformedRequestError";
1080
+ readonly message: string;
1081
+ readonly fields: {
1082
+ readonly [x: string]: readonly string[];
1083
+ };
1084
+ }, readonly [Schema.Struct<{
1085
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1086
+ readonly message: Schema.String;
1087
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1088
+ }>], {
1089
+ readonly _tag: "MalformedRequestError";
1090
+ readonly message: string;
1091
+ readonly fields: {
1092
+ readonly [x: string]: readonly string[];
1093
+ };
1094
+ }>, Schema.Struct<{
1095
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1096
+ readonly message: Schema.String;
1097
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1098
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1099
+ readonly _tag: "ResourceNotFoundError";
1100
+ readonly resource: string;
1101
+ readonly id: string;
1102
+ readonly message: string;
1103
+ }, readonly [Schema.Struct<{
1104
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
1105
+ readonly resource: Schema.String;
1106
+ readonly id: Schema.String;
1107
+ readonly message: Schema.String;
1108
+ }>], {
1109
+ readonly _tag: "ResourceNotFoundError";
1110
+ readonly resource: string;
1111
+ readonly id: string;
1112
+ readonly message: string;
1113
+ }>, Schema.Struct<{
1114
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
1115
+ readonly resource: Schema.String;
1116
+ readonly id: Schema.String;
1117
+ readonly message: Schema.String;
1118
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
1119
+ readonly _tag: "UnauthorizedError";
1120
+ readonly message: string;
1121
+ }, readonly [Schema.Struct<{
1122
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1123
+ readonly message: Schema.String;
1124
+ }>], {
1125
+ readonly _tag: "UnauthorizedError";
1126
+ readonly message: string;
1127
+ }>, Schema.Struct<{
1128
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1129
+ readonly message: Schema.String;
1130
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
1131
+ readonly _tag: "ValidationError";
1132
+ readonly message: string;
1133
+ readonly fields?: {
1134
+ readonly [x: string]: readonly string[];
1135
+ } | null;
1136
+ }, readonly [Schema.Struct<{
1137
+ readonly _tag: Schema.tag<"ValidationError">;
1138
+ readonly message: Schema.String;
1139
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1140
+ }>], {
1141
+ readonly _tag: "ValidationError";
1142
+ readonly message: string;
1143
+ readonly fields?: {
1144
+ readonly [x: string]: readonly string[];
1145
+ } | null;
1146
+ }>, Schema.Struct<{
1147
+ readonly _tag: Schema.tag<"ValidationError">;
1148
+ readonly message: Schema.String;
1149
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1150
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappGetMediaDownloadUrl", "GET", "/v1/whatsapp/media/:deliveryId/download-url", Schema.toCodecStringTree<Schema.Struct<{
1151
+ readonly deliveryId: Schema.brand<Schema.String, "MessageDeliveryId">;
1152
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1153
+ readonly url: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
1154
+ readonly expiresAt: Schema.String;
1155
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
1156
+ readonly _tag: "GatewayTimeoutError";
1157
+ readonly message: string;
1158
+ readonly retryAfterSeconds: number;
1159
+ }, readonly [Schema.Struct<{
1160
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1161
+ readonly message: Schema.String;
1162
+ readonly retryAfterSeconds: Schema.Finite;
1163
+ }>], {
1164
+ readonly _tag: "GatewayTimeoutError";
1165
+ readonly message: string;
1166
+ readonly retryAfterSeconds: number;
1167
+ }>, Schema.Struct<{
1168
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1169
+ readonly message: Schema.String;
1170
+ readonly retryAfterSeconds: Schema.Finite;
1171
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1172
+ readonly _tag: "MalformedRequestError";
1173
+ readonly message: string;
1174
+ readonly fields: {
1175
+ readonly [x: string]: readonly string[];
1176
+ };
1177
+ }, readonly [Schema.Struct<{
1178
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1179
+ readonly message: Schema.String;
1180
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1181
+ }>], {
1182
+ readonly _tag: "MalformedRequestError";
1183
+ readonly message: string;
1184
+ readonly fields: {
1185
+ readonly [x: string]: readonly string[];
1186
+ };
1187
+ }>, Schema.Struct<{
1188
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1189
+ readonly message: Schema.String;
1190
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1191
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1192
+ readonly _tag: "ResourceNotFoundError";
1193
+ readonly resource: string;
1194
+ readonly id: string;
1195
+ readonly message: string;
1196
+ }, readonly [Schema.Struct<{
1197
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
1198
+ readonly resource: Schema.String;
1199
+ readonly id: Schema.String;
1200
+ readonly message: Schema.String;
1201
+ }>], {
1202
+ readonly _tag: "ResourceNotFoundError";
1203
+ readonly resource: string;
1204
+ readonly id: string;
1205
+ readonly message: string;
1206
+ }>, Schema.Struct<{
1207
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
1208
+ readonly resource: Schema.String;
1209
+ readonly id: Schema.String;
1210
+ readonly message: Schema.String;
1211
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
1212
+ readonly _tag: "UnauthorizedError";
1213
+ readonly message: string;
1214
+ }, readonly [Schema.Struct<{
1215
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1216
+ readonly message: Schema.String;
1217
+ }>], {
1218
+ readonly _tag: "UnauthorizedError";
1219
+ readonly message: string;
1220
+ }>, Schema.Struct<{
1221
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1222
+ readonly message: Schema.String;
1223
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
1224
+ readonly _tag: "ValidationError";
1225
+ readonly message: string;
1226
+ readonly fields?: {
1227
+ readonly [x: string]: readonly string[];
1228
+ } | null;
1229
+ }, readonly [Schema.Struct<{
1230
+ readonly _tag: Schema.tag<"ValidationError">;
1231
+ readonly message: Schema.String;
1232
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1233
+ }>], {
1234
+ readonly _tag: "ValidationError";
1235
+ readonly message: string;
1236
+ readonly fields?: {
1237
+ readonly [x: string]: readonly string[];
1238
+ } | null;
1239
+ }>, Schema.Struct<{
1240
+ readonly _tag: Schema.tag<"ValidationError">;
1241
+ readonly message: Schema.String;
1242
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1243
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappGetServiceWindowBilling", "GET", "/v1/whatsapp/service-window/billing", never, Schema.toCodecStringTree<Schema.Struct<{
1244
+ readonly serviceWindowId: Schema.brand<Schema.String, "WhatsAppServiceWindowId">;
1245
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1246
+ readonly totalMessages: Schema.Finite;
1247
+ readonly totalFreeMessages: Schema.Finite;
1248
+ readonly totalPaidMessages: Schema.Finite;
1249
+ readonly estimatedProviderCosts: Schema.$Array<Schema.Struct<{
1250
+ readonly amount: Schema.String;
1251
+ readonly currency: Schema.String;
1252
+ }>>;
1253
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
1254
+ readonly _tag: "GatewayTimeoutError";
1255
+ readonly message: string;
1256
+ readonly retryAfterSeconds: number;
1257
+ }, readonly [Schema.Struct<{
1258
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1259
+ readonly message: Schema.String;
1260
+ readonly retryAfterSeconds: Schema.Finite;
1261
+ }>], {
1262
+ readonly _tag: "GatewayTimeoutError";
1263
+ readonly message: string;
1264
+ readonly retryAfterSeconds: number;
1265
+ }>, Schema.Struct<{
1266
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1267
+ readonly message: Schema.String;
1268
+ readonly retryAfterSeconds: Schema.Finite;
1269
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1270
+ readonly _tag: "MalformedRequestError";
1271
+ readonly message: string;
1272
+ readonly fields: {
1273
+ readonly [x: string]: readonly string[];
1274
+ };
1275
+ }, readonly [Schema.Struct<{
1276
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1277
+ readonly message: Schema.String;
1278
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1279
+ }>], {
1280
+ readonly _tag: "MalformedRequestError";
1281
+ readonly message: string;
1282
+ readonly fields: {
1283
+ readonly [x: string]: readonly string[];
1284
+ };
1285
+ }>, Schema.Struct<{
1286
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1287
+ readonly message: Schema.String;
1288
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1289
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1290
+ readonly _tag: "ResourceNotFoundError";
1291
+ readonly resource: string;
1292
+ readonly id: string;
1293
+ readonly message: string;
1294
+ }, readonly [Schema.Struct<{
1295
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
1296
+ readonly resource: Schema.String;
1297
+ readonly id: Schema.String;
1298
+ readonly message: Schema.String;
1299
+ }>], {
1300
+ readonly _tag: "ResourceNotFoundError";
1301
+ readonly resource: string;
1302
+ readonly id: string;
1303
+ readonly message: string;
1304
+ }>, Schema.Struct<{
1305
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
1306
+ readonly resource: Schema.String;
1307
+ readonly id: Schema.String;
1308
+ readonly message: Schema.String;
1309
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
1310
+ readonly _tag: "UnauthorizedError";
1311
+ readonly message: string;
1312
+ }, readonly [Schema.Struct<{
1313
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1314
+ readonly message: Schema.String;
1315
+ }>], {
1316
+ readonly _tag: "UnauthorizedError";
1317
+ readonly message: string;
1318
+ }>, Schema.Struct<{
1319
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1320
+ readonly message: Schema.String;
1321
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
1322
+ readonly _tag: "ValidationError";
1323
+ readonly message: string;
1324
+ readonly fields?: {
1325
+ readonly [x: string]: readonly string[];
1326
+ } | null;
1327
+ }, readonly [Schema.Struct<{
1328
+ readonly _tag: Schema.tag<"ValidationError">;
1329
+ readonly message: Schema.String;
1330
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1331
+ }>], {
1332
+ readonly _tag: "ValidationError";
1333
+ readonly message: string;
1334
+ readonly fields?: {
1335
+ readonly [x: string]: readonly string[];
1336
+ } | null;
1337
+ }>, Schema.Struct<{
1338
+ readonly _tag: Schema.tag<"ValidationError">;
1339
+ readonly message: Schema.String;
1340
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1341
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappGetServiceWindowStatus", "GET", "/v1/whatsapp/service-window/status", never, Schema.toCodecStringTree<Schema.Struct<{
1342
+ readonly customerPhone: Schema.String;
1343
+ readonly businessPhone: Schema.String;
1344
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1345
+ readonly serviceWindowId: Schema.brand<Schema.String, "WhatsAppServiceWindowId">;
1346
+ readonly isServiceWindowActive: Schema.Boolean;
1347
+ readonly isFreeEntryPointActive: Schema.Boolean;
1348
+ readonly serviceWindowExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1349
+ readonly freeEntryPointExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1350
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
1351
+ readonly _tag: "GatewayTimeoutError";
1352
+ readonly message: string;
1353
+ readonly retryAfterSeconds: number;
1354
+ }, readonly [Schema.Struct<{
1355
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1356
+ readonly message: Schema.String;
1357
+ readonly retryAfterSeconds: Schema.Finite;
1358
+ }>], {
1359
+ readonly _tag: "GatewayTimeoutError";
1360
+ readonly message: string;
1361
+ readonly retryAfterSeconds: number;
1362
+ }>, Schema.Struct<{
1363
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1364
+ readonly message: Schema.String;
1365
+ readonly retryAfterSeconds: Schema.Finite;
1366
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1367
+ readonly _tag: "MalformedRequestError";
1368
+ readonly message: string;
1369
+ readonly fields: {
1370
+ readonly [x: string]: readonly string[];
1371
+ };
1372
+ }, readonly [Schema.Struct<{
1373
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1374
+ readonly message: Schema.String;
1375
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1376
+ }>], {
1377
+ readonly _tag: "MalformedRequestError";
1378
+ readonly message: string;
1379
+ readonly fields: {
1380
+ readonly [x: string]: readonly string[];
1381
+ };
1382
+ }>, Schema.Struct<{
1383
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1384
+ readonly message: Schema.String;
1385
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1386
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1387
+ readonly _tag: "ResourceNotFoundError";
1388
+ readonly resource: string;
1389
+ readonly id: string;
1390
+ readonly message: string;
1391
+ }, readonly [Schema.Struct<{
1392
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
1393
+ readonly resource: Schema.String;
1394
+ readonly id: Schema.String;
1395
+ readonly message: Schema.String;
1396
+ }>], {
1397
+ readonly _tag: "ResourceNotFoundError";
1398
+ readonly resource: string;
1399
+ readonly id: string;
1400
+ readonly message: string;
1401
+ }>, Schema.Struct<{
1402
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
1403
+ readonly resource: Schema.String;
1404
+ readonly id: Schema.String;
1405
+ readonly message: Schema.String;
1406
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
1407
+ readonly _tag: "UnauthorizedError";
1408
+ readonly message: string;
1409
+ }, readonly [Schema.Struct<{
1410
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1411
+ readonly message: Schema.String;
1412
+ }>], {
1413
+ readonly _tag: "UnauthorizedError";
1414
+ readonly message: string;
1415
+ }>, Schema.Struct<{
1416
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1417
+ readonly message: Schema.String;
1418
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
1419
+ readonly _tag: "ValidationError";
1420
+ readonly message: string;
1421
+ readonly fields?: {
1422
+ readonly [x: string]: readonly string[];
1423
+ } | null;
1424
+ }, readonly [Schema.Struct<{
1425
+ readonly _tag: Schema.tag<"ValidationError">;
1426
+ readonly message: Schema.String;
1427
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1428
+ }>], {
1429
+ readonly _tag: "ValidationError";
1430
+ readonly message: string;
1431
+ readonly fields?: {
1432
+ readonly [x: string]: readonly string[];
1433
+ } | null;
1434
+ }>, Schema.Struct<{
1435
+ readonly _tag: Schema.tag<"ValidationError">;
1436
+ readonly message: Schema.String;
1437
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1438
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappGetStats", "GET", "/v1/whatsapp/stats", never, Schema.toCodecStringTree<Schema.Struct<{
1439
+ readonly startDate: Schema.optionalKey<Schema.String>;
1440
+ readonly endDate: Schema.optionalKey<Schema.String>;
1441
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1442
+ readonly totalSent: Schema.Finite;
1443
+ readonly totalDelivered: Schema.Finite;
1444
+ readonly totalRead: Schema.Finite;
1445
+ readonly totalFailed: Schema.Finite;
1446
+ readonly deliveryRate: Schema.Finite;
1447
+ readonly readRate: Schema.Finite;
1448
+ readonly failureRate: Schema.Finite;
1449
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
1450
+ readonly _tag: "GatewayTimeoutError";
1451
+ readonly message: string;
1452
+ readonly retryAfterSeconds: number;
1453
+ }, readonly [Schema.Struct<{
1454
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1455
+ readonly message: Schema.String;
1456
+ readonly retryAfterSeconds: Schema.Finite;
1457
+ }>], {
1458
+ readonly _tag: "GatewayTimeoutError";
1459
+ readonly message: string;
1460
+ readonly retryAfterSeconds: number;
1461
+ }>, Schema.Struct<{
1462
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1463
+ readonly message: Schema.String;
1464
+ readonly retryAfterSeconds: Schema.Finite;
1465
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1466
+ readonly _tag: "MalformedRequestError";
1467
+ readonly message: string;
1468
+ readonly fields: {
1469
+ readonly [x: string]: readonly string[];
1470
+ };
1471
+ }, readonly [Schema.Struct<{
1472
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1473
+ readonly message: Schema.String;
1474
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1475
+ }>], {
1476
+ readonly _tag: "MalformedRequestError";
1477
+ readonly message: string;
1478
+ readonly fields: {
1479
+ readonly [x: string]: readonly string[];
1480
+ };
1481
+ }>, Schema.Struct<{
1482
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1483
+ readonly message: Schema.String;
1484
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1485
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
1486
+ readonly _tag: "UnauthorizedError";
1487
+ readonly message: string;
1488
+ }, readonly [Schema.Struct<{
1489
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1490
+ readonly message: Schema.String;
1491
+ }>], {
1492
+ readonly _tag: "UnauthorizedError";
1493
+ readonly message: string;
1494
+ }>, Schema.Struct<{
1495
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1496
+ readonly message: Schema.String;
1497
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
1498
+ readonly _tag: "ValidationError";
1499
+ readonly message: string;
1500
+ readonly fields?: {
1501
+ readonly [x: string]: readonly string[];
1502
+ } | null;
1503
+ }, readonly [Schema.Struct<{
1504
+ readonly _tag: Schema.tag<"ValidationError">;
1505
+ readonly message: Schema.String;
1506
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1507
+ }>], {
1508
+ readonly _tag: "ValidationError";
1509
+ readonly message: string;
1510
+ readonly fields?: {
1511
+ readonly [x: string]: readonly string[];
1512
+ } | null;
1513
+ }>, Schema.Struct<{
1514
+ readonly _tag: Schema.tag<"ValidationError">;
1515
+ readonly message: Schema.String;
1516
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1517
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappGetTemplateStats", "GET", "/v1/whatsapp/templates/stats", never, Schema.toCodecStringTree<Schema.Struct<{
1518
+ readonly startDate: Schema.optionalKey<Schema.String>;
1519
+ readonly endDate: Schema.optionalKey<Schema.String>;
1520
+ readonly templateId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateId">>;
1521
+ readonly campaignId: Schema.optionalKey<Schema.brand<Schema.String, "CampaignId">>;
1522
+ readonly journeyId: Schema.optionalKey<Schema.brand<Schema.String, "JourneyId">>;
1523
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1524
+ readonly items: Schema.$Array<Schema.Struct<{
1525
+ readonly templateId: Schema.brand<Schema.String, "TemplateId">;
1526
+ readonly templateSlug: Schema.String;
1527
+ readonly name: Schema.String;
1528
+ readonly language: Schema.String;
1529
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>, Schema.Null]>;
1530
+ readonly source: Schema.Union<readonly [Schema.Struct<{
1531
+ readonly type: Schema.Literal<"campaign">;
1532
+ readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
1533
+ }>, Schema.Struct<{
1534
+ readonly type: Schema.Literal<"journey">;
1535
+ readonly journeyId: Schema.brand<Schema.String, "JourneyId">;
1536
+ readonly nodeId: Schema.String;
1537
+ }>, Schema.Struct<{
1538
+ readonly type: Schema.Literal<"direct">;
1539
+ }>]>;
1540
+ readonly sent: Schema.Finite;
1541
+ readonly delivered: Schema.Finite;
1542
+ readonly read: Schema.Finite;
1543
+ readonly failed: Schema.Finite;
1544
+ readonly estimatedProviderCosts: Schema.$Array<Schema.Struct<{
1545
+ readonly amount: Schema.String;
1546
+ readonly currency: Schema.String;
1547
+ }>>;
1548
+ }>>;
1549
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
1550
+ readonly _tag: "GatewayTimeoutError";
1551
+ readonly message: string;
1552
+ readonly retryAfterSeconds: number;
1553
+ }, readonly [Schema.Struct<{
1554
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1555
+ readonly message: Schema.String;
1556
+ readonly retryAfterSeconds: Schema.Finite;
1557
+ }>], {
1558
+ readonly _tag: "GatewayTimeoutError";
1559
+ readonly message: string;
1560
+ readonly retryAfterSeconds: number;
1561
+ }>, Schema.Struct<{
1562
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1563
+ readonly message: Schema.String;
1564
+ readonly retryAfterSeconds: Schema.Finite;
1565
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1566
+ readonly _tag: "MalformedRequestError";
1567
+ readonly message: string;
1568
+ readonly fields: {
1569
+ readonly [x: string]: readonly string[];
1570
+ };
1571
+ }, readonly [Schema.Struct<{
1572
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1573
+ readonly message: Schema.String;
1574
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1575
+ }>], {
1576
+ readonly _tag: "MalformedRequestError";
1577
+ readonly message: string;
1578
+ readonly fields: {
1579
+ readonly [x: string]: readonly string[];
1580
+ };
1581
+ }>, Schema.Struct<{
1582
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1583
+ readonly message: Schema.String;
1584
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1585
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
1586
+ readonly _tag: "UnauthorizedError";
1587
+ readonly message: string;
1588
+ }, readonly [Schema.Struct<{
1589
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1590
+ readonly message: Schema.String;
1591
+ }>], {
1592
+ readonly _tag: "UnauthorizedError";
1593
+ readonly message: string;
1594
+ }>, Schema.Struct<{
1595
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1596
+ readonly message: Schema.String;
1597
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
1598
+ readonly _tag: "ValidationError";
1599
+ readonly message: string;
1600
+ readonly fields?: {
1601
+ readonly [x: string]: readonly string[];
1602
+ } | null;
1603
+ }, readonly [Schema.Struct<{
1604
+ readonly _tag: Schema.tag<"ValidationError">;
1605
+ readonly message: Schema.String;
1606
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1607
+ }>], {
1608
+ readonly _tag: "ValidationError";
1609
+ readonly message: string;
1610
+ readonly fields?: {
1611
+ readonly [x: string]: readonly string[];
1612
+ } | null;
1613
+ }>, Schema.Struct<{
1614
+ readonly _tag: Schema.tag<"ValidationError">;
1615
+ readonly message: Schema.String;
1616
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1617
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappListBusinessAccounts", "GET", "/v1/whatsapp/business-accounts", never, Schema.toCodecStringTree<Schema.Struct<{
1618
+ readonly page: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1619
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1620
+ readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1621
+ readonly verificationStatus: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>>;
1622
+ readonly namespaceId: Schema.optionalKey<Schema.brand<Schema.String, "NamespaceId">>;
1623
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1624
+ readonly items: Schema.$Array<Schema.Struct<{
1625
+ readonly id: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
1626
+ readonly organizationId: Schema.String;
1627
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1628
+ readonly phoneNumber: Schema.String;
1629
+ readonly phoneNumberId: Schema.String;
1630
+ readonly displayName: Schema.String;
1631
+ readonly whatsappBusinessAccountId: Schema.String;
1632
+ readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
1633
+ readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
1634
+ readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1635
+ readonly isDefault: Schema.Boolean;
1636
+ readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
1637
+ readonly qualityRating: Schema.Union<readonly [Schema.Literal<"green">, Schema.Literal<"yellow">, Schema.Literal<"red">, Schema.Literal<"unknown">]>;
1638
+ readonly messagingLimit: Schema.Union<readonly [Schema.String, Schema.Null]>;
1639
+ readonly currentLimit: Schema.Finite;
1640
+ readonly businessPortfolioId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1641
+ readonly businessAppConnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1642
+ readonly businessAppDisconnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1643
+ readonly businessAppDisconnectReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"partnerRemoved">, Schema.Literal<"offboarded">, Schema.Literal<"accountDisconnected">, Schema.Literal<"businessDowngrade">, Schema.Literal<"changeNumber">, Schema.Literal<"companionInactivity">, Schema.Literal<"primaryInactivity">, Schema.Literal<"userReRegistered">]>, Schema.Null]>;
1644
+ readonly contactsSyncRequestedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1645
+ readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
1646
+ readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
1647
+ readonly isActive: Schema.Boolean;
1648
+ readonly createdAt: Schema.String;
1649
+ readonly updatedAt: Schema.String;
1650
+ }>>;
1651
+ readonly pagination: Schema.Struct<{
1652
+ readonly page: Schema.Finite;
1653
+ readonly limit: Schema.Finite;
1654
+ readonly total: Schema.Finite;
1655
+ readonly totalPages: Schema.Finite;
1656
+ }>;
1657
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ForbiddenError, typeof FlagDisabledError]> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
1658
+ readonly _tag: "GatewayTimeoutError";
1659
+ readonly message: string;
1660
+ readonly retryAfterSeconds: number;
1661
+ }, readonly [Schema.Struct<{
1662
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1663
+ readonly message: Schema.String;
1664
+ readonly retryAfterSeconds: Schema.Finite;
1665
+ }>], {
1666
+ readonly _tag: "GatewayTimeoutError";
1667
+ readonly message: string;
1668
+ readonly retryAfterSeconds: number;
1669
+ }>, Schema.Struct<{
1670
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1671
+ readonly message: Schema.String;
1672
+ readonly retryAfterSeconds: Schema.Finite;
1673
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1674
+ readonly _tag: "MalformedRequestError";
1675
+ readonly message: string;
1676
+ readonly fields: {
1677
+ readonly [x: string]: readonly string[];
1678
+ };
1679
+ }, readonly [Schema.Struct<{
1680
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1681
+ readonly message: Schema.String;
1682
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1683
+ }>], {
1684
+ readonly _tag: "MalformedRequestError";
1685
+ readonly message: string;
1686
+ readonly fields: {
1687
+ readonly [x: string]: readonly string[];
1688
+ };
1689
+ }>, Schema.Struct<{
1690
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1691
+ readonly message: Schema.String;
1692
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1693
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
1694
+ readonly _tag: "UnauthorizedError";
1695
+ readonly message: string;
1696
+ }, readonly [Schema.Struct<{
1697
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1698
+ readonly message: Schema.String;
1699
+ }>], {
1700
+ readonly _tag: "UnauthorizedError";
1701
+ readonly message: string;
1702
+ }>, Schema.Struct<{
1703
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1704
+ readonly message: Schema.String;
1705
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
1706
+ readonly _tag: "ValidationError";
1707
+ readonly message: string;
1708
+ readonly fields?: {
1709
+ readonly [x: string]: readonly string[];
1710
+ } | null;
1711
+ }, readonly [Schema.Struct<{
1712
+ readonly _tag: Schema.tag<"ValidationError">;
1713
+ readonly message: Schema.String;
1714
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1715
+ }>], {
1716
+ readonly _tag: "ValidationError";
1717
+ readonly message: string;
1718
+ readonly fields?: {
1719
+ readonly [x: string]: readonly string[];
1720
+ } | null;
1721
+ }>, Schema.Struct<{
1722
+ readonly _tag: Schema.tag<"ValidationError">;
1723
+ readonly message: Schema.String;
1724
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1725
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappSetDefaultBusinessAccount", "POST", "/v1/whatsapp/business-accounts/:accountId/set-default", Schema.toCodecStringTree<Schema.Struct<{
1726
+ readonly accountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
1727
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1728
+ readonly id: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
1729
+ readonly organizationId: Schema.String;
1730
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1731
+ readonly phoneNumber: Schema.String;
1732
+ readonly phoneNumberId: Schema.String;
1733
+ readonly displayName: Schema.String;
1734
+ readonly whatsappBusinessAccountId: Schema.String;
1735
+ readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
1736
+ readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
1737
+ readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1738
+ readonly isDefault: Schema.Boolean;
1739
+ readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
1740
+ readonly qualityRating: Schema.Union<readonly [Schema.Literal<"green">, Schema.Literal<"yellow">, Schema.Literal<"red">, Schema.Literal<"unknown">]>;
1741
+ readonly messagingLimit: Schema.Union<readonly [Schema.String, Schema.Null]>;
1742
+ readonly currentLimit: Schema.Finite;
1743
+ readonly businessPortfolioId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1744
+ readonly businessAppConnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1745
+ readonly businessAppDisconnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1746
+ readonly businessAppDisconnectReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"partnerRemoved">, Schema.Literal<"offboarded">, Schema.Literal<"accountDisconnected">, Schema.Literal<"businessDowngrade">, Schema.Literal<"changeNumber">, Schema.Literal<"companionInactivity">, Schema.Literal<"primaryInactivity">, Schema.Literal<"userReRegistered">]>, Schema.Null]>;
1747
+ readonly contactsSyncRequestedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1748
+ readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
1749
+ readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
1750
+ readonly isActive: Schema.Boolean;
1751
+ readonly createdAt: Schema.String;
1752
+ readonly updatedAt: Schema.String;
1753
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
1754
+ readonly _tag: "GatewayTimeoutError";
1755
+ readonly message: string;
1756
+ readonly retryAfterSeconds: number;
1757
+ }, readonly [Schema.Struct<{
1758
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1759
+ readonly message: Schema.String;
1760
+ readonly retryAfterSeconds: Schema.Finite;
1761
+ }>], {
1762
+ readonly _tag: "GatewayTimeoutError";
1763
+ readonly message: string;
1764
+ readonly retryAfterSeconds: number;
1765
+ }>, Schema.Struct<{
1766
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1767
+ readonly message: Schema.String;
1768
+ readonly retryAfterSeconds: Schema.Finite;
1769
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1770
+ readonly _tag: "MalformedRequestError";
1771
+ readonly message: string;
1772
+ readonly fields: {
1773
+ readonly [x: string]: readonly string[];
1774
+ };
1775
+ }, readonly [Schema.Struct<{
1776
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1777
+ readonly message: Schema.String;
1778
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1779
+ }>], {
1780
+ readonly _tag: "MalformedRequestError";
1781
+ readonly message: string;
1782
+ readonly fields: {
1783
+ readonly [x: string]: readonly string[];
1784
+ };
1785
+ }>, Schema.Struct<{
1786
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1787
+ readonly message: Schema.String;
1788
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1789
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1790
+ readonly _tag: "ResourceNotFoundError";
1791
+ readonly resource: string;
1792
+ readonly id: string;
1793
+ readonly message: string;
1794
+ }, readonly [Schema.Struct<{
1795
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
1796
+ readonly resource: Schema.String;
1797
+ readonly id: Schema.String;
1798
+ readonly message: Schema.String;
1799
+ }>], {
1800
+ readonly _tag: "ResourceNotFoundError";
1801
+ readonly resource: string;
1802
+ readonly id: string;
1803
+ readonly message: string;
1804
+ }>, Schema.Struct<{
1805
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
1806
+ readonly resource: Schema.String;
1807
+ readonly id: Schema.String;
1808
+ readonly message: Schema.String;
1809
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
1810
+ readonly _tag: "UnauthorizedError";
1811
+ readonly message: string;
1812
+ }, readonly [Schema.Struct<{
1813
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1814
+ readonly message: Schema.String;
1815
+ }>], {
1816
+ readonly _tag: "UnauthorizedError";
1817
+ readonly message: string;
1818
+ }>, Schema.Struct<{
1819
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1820
+ readonly message: Schema.String;
1821
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
1822
+ readonly _tag: "ValidationError";
1823
+ readonly message: string;
1824
+ readonly fields?: {
1825
+ readonly [x: string]: readonly string[];
1826
+ } | null;
1827
+ }, readonly [Schema.Struct<{
1828
+ readonly _tag: Schema.tag<"ValidationError">;
1829
+ readonly message: Schema.String;
1830
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1831
+ }>], {
1832
+ readonly _tag: "ValidationError";
1833
+ readonly message: string;
1834
+ readonly fields?: {
1835
+ readonly [x: string]: readonly string[];
1836
+ } | null;
1837
+ }>, Schema.Struct<{
1838
+ readonly _tag: Schema.tag<"ValidationError">;
1839
+ readonly message: Schema.String;
1840
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1841
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappSyncAccountStatus", "POST", "/v1/whatsapp/business-accounts/:accountId/sync", Schema.toCodecStringTree<Schema.Struct<{
1842
+ readonly accountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
1843
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1844
+ readonly id: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
1845
+ readonly qualityRating: Schema.Union<readonly [Schema.Literal<"green">, Schema.Literal<"yellow">, Schema.Literal<"red">, Schema.Literal<"unknown">]>;
1846
+ readonly messagingLimit: Schema.Union<readonly [Schema.String, Schema.Null]>;
1847
+ readonly currentLimit: Schema.Finite;
1848
+ readonly businessPortfolioId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1849
+ readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
1850
+ readonly syncedAt: Schema.String;
1851
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof InternalError, typeof CredentialsError]> | Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
1852
+ readonly _tag: "GatewayTimeoutError";
1853
+ readonly message: string;
1854
+ readonly retryAfterSeconds: number;
1855
+ }, readonly [Schema.Struct<{
1856
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1857
+ readonly message: Schema.String;
1858
+ readonly retryAfterSeconds: Schema.Finite;
1859
+ }>], {
1860
+ readonly _tag: "GatewayTimeoutError";
1861
+ readonly message: string;
1862
+ readonly retryAfterSeconds: number;
1863
+ }>, Schema.Struct<{
1864
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
1865
+ readonly message: Schema.String;
1866
+ readonly retryAfterSeconds: Schema.Finite;
1867
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1868
+ readonly _tag: "MalformedRequestError";
1869
+ readonly message: string;
1870
+ readonly fields: {
1871
+ readonly [x: string]: readonly string[];
1872
+ };
1873
+ }, readonly [Schema.Struct<{
1874
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1875
+ readonly message: Schema.String;
1876
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1877
+ }>], {
1878
+ readonly _tag: "MalformedRequestError";
1879
+ readonly message: string;
1880
+ readonly fields: {
1881
+ readonly [x: string]: readonly string[];
1882
+ };
1883
+ }>, Schema.Struct<{
1884
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1885
+ readonly message: Schema.String;
1886
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1887
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1888
+ readonly _tag: "ResourceNotFoundError";
1889
+ readonly resource: string;
1890
+ readonly id: string;
1891
+ readonly message: string;
1892
+ }, readonly [Schema.Struct<{
1893
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
1894
+ readonly resource: Schema.String;
1895
+ readonly id: Schema.String;
1896
+ readonly message: Schema.String;
1897
+ }>], {
1898
+ readonly _tag: "ResourceNotFoundError";
1899
+ readonly resource: string;
1900
+ readonly id: string;
1901
+ readonly message: string;
1902
+ }>, Schema.Struct<{
1903
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
1904
+ readonly resource: Schema.String;
1905
+ readonly id: Schema.String;
1906
+ readonly message: Schema.String;
1907
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
1908
+ readonly _tag: "UnauthorizedError";
1909
+ readonly message: string;
1910
+ }, readonly [Schema.Struct<{
1911
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1912
+ readonly message: Schema.String;
1913
+ }>], {
1914
+ readonly _tag: "UnauthorizedError";
1915
+ readonly message: string;
1916
+ }>, Schema.Struct<{
1917
+ readonly _tag: Schema.tag<"UnauthorizedError">;
1918
+ readonly message: Schema.String;
1919
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
1920
+ readonly _tag: "ValidationError";
1921
+ readonly message: string;
1922
+ readonly fields?: {
1923
+ readonly [x: string]: readonly string[];
1924
+ } | null;
1925
+ }, readonly [Schema.Struct<{
1926
+ readonly _tag: Schema.tag<"ValidationError">;
1927
+ readonly message: Schema.String;
1928
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1929
+ }>], {
1930
+ readonly _tag: "ValidationError";
1931
+ readonly message: string;
1932
+ readonly fields?: {
1933
+ readonly [x: string]: readonly string[];
1934
+ } | null;
1935
+ }>, Schema.Struct<{
1936
+ readonly _tag: Schema.tag<"ValidationError">;
1937
+ readonly message: Schema.String;
1938
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1939
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<WhatsAppChannelError, {
1940
+ readonly _tag: "WhatsAppChannelError";
1941
+ readonly reason: "auth" | "rate_limited" | "rejected" | "transport" | "unsupported";
1942
+ readonly message: string;
1943
+ readonly provider: string;
1944
+ readonly providerCode?: string | null;
1945
+ readonly statusCode?: number | null;
1946
+ }, readonly [Schema.Struct<{
1947
+ readonly _tag: Schema.tag<"WhatsAppChannelError">;
1948
+ readonly reason: Schema.Union<readonly [Schema.Literal<"transport">, Schema.Literal<"rejected">, Schema.Literal<"rate_limited">, Schema.Literal<"auth">, Schema.Literal<"unsupported">]>;
1949
+ readonly message: Schema.String;
1950
+ readonly provider: Schema.String;
1951
+ readonly providerCode: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1952
+ readonly statusCode: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1953
+ }>], {
1954
+ readonly _tag: "WhatsAppChannelError";
1955
+ readonly reason: "auth" | "rate_limited" | "rejected" | "transport" | "unsupported";
1956
+ readonly message: string;
1957
+ readonly provider: string;
1958
+ readonly providerCode?: string | null;
1959
+ readonly statusCode?: number | null;
1960
+ }>, Schema.Struct<{
1961
+ readonly _tag: Schema.tag<"WhatsAppChannelError">;
1962
+ readonly reason: Schema.Union<readonly [Schema.Literal<"transport">, Schema.Literal<"rejected">, Schema.Literal<"rate_limited">, Schema.Literal<"auth">, Schema.Literal<"unsupported">]>;
1963
+ readonly message: Schema.String;
1964
+ readonly provider: Schema.String;
1965
+ readonly providerCode: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1966
+ readonly statusCode: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1967
+ }>, never, never>>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappUpdateBusinessAccount", "PATCH", "/v1/whatsapp/business-accounts/:accountId", Schema.toCodecStringTree<Schema.Struct<{
1968
+ readonly accountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
1969
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1970
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1971
+ readonly webhookUrl: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1972
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1973
+ readonly id: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
1974
+ readonly organizationId: Schema.String;
1975
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1976
+ readonly phoneNumber: Schema.String;
1977
+ readonly phoneNumberId: Schema.String;
1978
+ readonly displayName: Schema.String;
1979
+ readonly whatsappBusinessAccountId: Schema.String;
1980
+ readonly verificationStatus: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"verified">, Schema.Literal<"failed">, Schema.Literal<"suspended">]>;
1981
+ readonly credentialStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"reconnect_required">]>;
1982
+ readonly tokenExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1983
+ readonly isDefault: Schema.Boolean;
1984
+ readonly webhookUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
1985
+ readonly qualityRating: Schema.Union<readonly [Schema.Literal<"green">, Schema.Literal<"yellow">, Schema.Literal<"red">, Schema.Literal<"unknown">]>;
1986
+ readonly messagingLimit: Schema.Union<readonly [Schema.String, Schema.Null]>;
1987
+ readonly currentLimit: Schema.Finite;
1988
+ readonly businessPortfolioId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1989
+ readonly businessAppConnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1990
+ readonly businessAppDisconnectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1991
+ readonly businessAppDisconnectReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"partnerRemoved">, Schema.Literal<"offboarded">, Schema.Literal<"accountDisconnected">, Schema.Literal<"businessDowngrade">, Schema.Literal<"changeNumber">, Schema.Literal<"companionInactivity">, Schema.Literal<"primaryInactivity">, Schema.Literal<"userReRegistered">]>, Schema.Null]>;
1992
+ readonly contactsSyncRequestedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1993
+ readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
1994
+ readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
1995
+ readonly isActive: Schema.Boolean;
1996
+ readonly createdAt: Schema.String;
1997
+ readonly updatedAt: Schema.String;
1998
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
1999
+ readonly _tag: "GatewayTimeoutError";
2000
+ readonly message: string;
2001
+ readonly retryAfterSeconds: number;
2002
+ }, readonly [Schema.Struct<{
2003
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
2004
+ readonly message: Schema.String;
2005
+ readonly retryAfterSeconds: Schema.Finite;
2006
+ }>], {
2007
+ readonly _tag: "GatewayTimeoutError";
2008
+ readonly message: string;
2009
+ readonly retryAfterSeconds: number;
2010
+ }>, Schema.Struct<{
2011
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
2012
+ readonly message: Schema.String;
2013
+ readonly retryAfterSeconds: Schema.Finite;
2014
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2015
+ readonly _tag: "MalformedRequestError";
2016
+ readonly message: string;
2017
+ readonly fields: {
2018
+ readonly [x: string]: readonly string[];
2019
+ };
2020
+ }, readonly [Schema.Struct<{
2021
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2022
+ readonly message: Schema.String;
2023
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2024
+ }>], {
2025
+ readonly _tag: "MalformedRequestError";
2026
+ readonly message: string;
2027
+ readonly fields: {
2028
+ readonly [x: string]: readonly string[];
2029
+ };
2030
+ }>, Schema.Struct<{
2031
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2032
+ readonly message: Schema.String;
2033
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2034
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
2035
+ readonly _tag: "ResourceNotFoundError";
2036
+ readonly resource: string;
2037
+ readonly id: string;
2038
+ readonly message: string;
2039
+ }, readonly [Schema.Struct<{
2040
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
2041
+ readonly resource: Schema.String;
2042
+ readonly id: Schema.String;
2043
+ readonly message: Schema.String;
2044
+ }>], {
2045
+ readonly _tag: "ResourceNotFoundError";
2046
+ readonly resource: string;
2047
+ readonly id: string;
2048
+ readonly message: string;
2049
+ }>, Schema.Struct<{
2050
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
2051
+ readonly resource: Schema.String;
2052
+ readonly id: Schema.String;
2053
+ readonly message: Schema.String;
2054
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
2055
+ readonly _tag: "UnauthorizedError";
2056
+ readonly message: string;
2057
+ }, readonly [Schema.Struct<{
2058
+ readonly _tag: Schema.tag<"UnauthorizedError">;
2059
+ readonly message: Schema.String;
2060
+ }>], {
2061
+ readonly _tag: "UnauthorizedError";
2062
+ readonly message: string;
2063
+ }>, Schema.Struct<{
2064
+ readonly _tag: Schema.tag<"UnauthorizedError">;
2065
+ readonly message: Schema.String;
2066
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
2067
+ readonly _tag: "ValidationError";
2068
+ readonly message: string;
2069
+ readonly fields?: {
2070
+ readonly [x: string]: readonly string[];
2071
+ } | null;
2072
+ }, readonly [Schema.Struct<{
2073
+ readonly _tag: Schema.tag<"ValidationError">;
2074
+ readonly message: Schema.String;
2075
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
2076
+ }>], {
2077
+ readonly _tag: "ValidationError";
2078
+ readonly message: string;
2079
+ readonly fields?: {
2080
+ readonly [x: string]: readonly string[];
2081
+ } | null;
2082
+ }>, Schema.Struct<{
2083
+ readonly _tag: Schema.tag<"ValidationError">;
2084
+ readonly message: Schema.String;
2085
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
2086
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>, false>;
2087
+ export declare class WhatsAppGroup extends WhatsAppGroup_base {
2088
+ }
2089
+ export {};