@wats/graph 0.3.25 → 0.3.27
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.
- package/README.md +1 -1
- package/dist/endpoints/businessManagement.d.ts +372 -1
- package/dist/endpoints/businessManagement.js +775 -5
- package/dist/endpoints/calling.d.ts +41 -1
- package/dist/endpoints/calling.js +100 -2
- package/dist/endpoints/flows/dataChannel.d.ts +139 -0
- package/dist/endpoints/flows/dataChannel.js +252 -0
- package/dist/endpoints/flows/flowDsl.d.ts +306 -0
- package/dist/endpoints/flows/flowDsl.js +610 -0
- package/dist/endpoints/flows/flowMediaUpload.d.ts +102 -0
- package/dist/endpoints/flows/flowMediaUpload.js +188 -0
- package/dist/endpoints/flows/index.d.ts +9 -1
- package/dist/endpoints/flows/index.js +70 -0
- package/dist/endpoints/flows/metricsMigration.d.ts +36 -0
- package/dist/endpoints/flows/metricsMigration.js +207 -0
- package/dist/endpoints/flows/types.d.ts +145 -0
- package/dist/endpoints/flows/types.js +14 -0
- package/dist/endpoints/flows.d.ts +2 -2
- package/dist/endpoints/flows.js +49 -1
- package/dist/endpoints/media.js +15 -1
- package/dist/endpoints/messages/builders-interactive.d.ts +9 -1
- package/dist/endpoints/messages/builders-interactive.js +49 -0
- package/dist/endpoints/messages/builders-template.d.ts +2 -1
- package/dist/endpoints/messages/builders-template.js +53 -2
- package/dist/endpoints/messages/deepLinks.d.ts +12 -0
- package/dist/endpoints/messages/deepLinks.js +38 -0
- package/dist/endpoints/messages/index.d.ts +4 -3
- package/dist/endpoints/messages/index.js +13 -2
- package/dist/endpoints/messages/types.d.ts +26 -3
- package/dist/endpoints/messages/validation.d.ts +7 -0
- package/dist/endpoints/messages/validation.js +12 -0
- package/dist/endpoints/oauth.d.ts +57 -0
- package/dist/endpoints/oauth.js +116 -0
- package/dist/endpoints/templates/advanced.d.ts +280 -0
- package/dist/endpoints/templates/advanced.js +519 -0
- package/dist/endpoints/templates/builders.js +21 -1
- package/dist/endpoints/templates/index.d.ts +2 -0
- package/dist/endpoints/templates/index.js +15 -0
- package/dist/endpoints/templates/shared.js +7 -1
- package/dist/endpoints/templates/types.d.ts +17 -2
- package/dist/endpoints/templates.d.ts +2 -1
- package/dist/endpoints/templates.js +14 -1
- package/dist/endpoints/wabaEndpoints.d.ts +4 -4
- package/dist/endpoints/wabaEndpoints.js +56 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/nodeMedia.d.ts +57 -0
- package/dist/nodeMedia.js +178 -0
- package/dist/subclients/phoneNumberClient.d.ts +92 -2
- package/dist/subclients/phoneNumberClient.js +133 -1
- package/dist/subclients/wabaClient.d.ts +82 -2
- package/dist/subclients/wabaClient.js +102 -2
- package/package.json +9 -11
package/README.md
CHANGED
|
@@ -30,5 +30,5 @@ await sendMessage(graph, { phoneNumberId: "1234567890" }, {
|
|
|
30
30
|
|
|
31
31
|
Use `createMockTransport` from `@wats/graph/testing` for credential-free tests and examples. Some endpoint families are still expanding and should be treated according to the API stability policy.
|
|
32
32
|
|
|
33
|
-
Docs: https://
|
|
33
|
+
Docs: https://wats.sh/docs/reference/client
|
|
34
34
|
License: MIT
|
|
@@ -2,6 +2,16 @@ import { type EndpointInvokeOptions } from "../endpoint.js";
|
|
|
2
2
|
import type { GraphClient } from "../client.js";
|
|
3
3
|
import type { GraphPaging } from "./waba/types.js";
|
|
4
4
|
export type BusinessManagementFields = string | readonly string[];
|
|
5
|
+
export interface WabaHealthStatusEntity {
|
|
6
|
+
readonly entityType?: string;
|
|
7
|
+
readonly canReceiveCallSip?: boolean;
|
|
8
|
+
readonly [key: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface WabaHealthStatus {
|
|
11
|
+
readonly canReceiveCallSip?: boolean;
|
|
12
|
+
readonly entities?: readonly WabaHealthStatusEntity[];
|
|
13
|
+
readonly [key: string]: unknown;
|
|
14
|
+
}
|
|
5
15
|
export interface WabaInfo {
|
|
6
16
|
readonly id?: string;
|
|
7
17
|
readonly name?: string;
|
|
@@ -15,7 +25,8 @@ export interface WabaInfo {
|
|
|
15
25
|
/** WATS-91 / Graph v24+ portfolio-level messaging limit. */
|
|
16
26
|
readonly whatsapp_business_manager_messaging_limit?: string;
|
|
17
27
|
readonly ownership_type?: string;
|
|
18
|
-
|
|
28
|
+
/** Calling health status normalized from Graph `health_status.can_receive_call_sip`. */
|
|
29
|
+
readonly healthStatus?: WabaHealthStatus;
|
|
19
30
|
readonly currency?: string;
|
|
20
31
|
readonly country?: string;
|
|
21
32
|
readonly subscribed_apps?: unknown;
|
|
@@ -51,7 +62,56 @@ export interface PhoneNumberInfo {
|
|
|
51
62
|
readonly whatsapp_business_manager_messaging_limit?: string;
|
|
52
63
|
readonly [key: string]: unknown;
|
|
53
64
|
}
|
|
65
|
+
/** Read-side `calling.sip.servers[]` entry. `sipUserPassword` / `appId` are GET-only. */
|
|
66
|
+
export interface SipServerSettings {
|
|
67
|
+
readonly hostname?: string;
|
|
68
|
+
readonly port?: number;
|
|
69
|
+
readonly requestUriUserParams?: Record<string, string>;
|
|
70
|
+
/** Response-only; present on read only when `includeSipCredentials=true`. Treat as secret material. */
|
|
71
|
+
readonly sipUserPassword?: string;
|
|
72
|
+
/** Response-only; never sent in updates. */
|
|
73
|
+
readonly appId?: number;
|
|
74
|
+
readonly [key: string]: unknown;
|
|
75
|
+
}
|
|
76
|
+
export interface SipSettings {
|
|
77
|
+
readonly status?: string;
|
|
78
|
+
readonly servers?: readonly SipServerSettings[];
|
|
79
|
+
readonly [key: string]: unknown;
|
|
80
|
+
}
|
|
81
|
+
export interface CallHoursWeeklyOperatingHoursSettings {
|
|
82
|
+
readonly day_of_week?: string;
|
|
83
|
+
readonly open_time?: string;
|
|
84
|
+
readonly close_time?: string;
|
|
85
|
+
readonly [key: string]: unknown;
|
|
86
|
+
}
|
|
87
|
+
export interface CallHoursHolidayScheduleSettings {
|
|
88
|
+
readonly date?: string;
|
|
89
|
+
readonly start_time?: string;
|
|
90
|
+
readonly end_time?: string;
|
|
91
|
+
readonly [key: string]: unknown;
|
|
92
|
+
}
|
|
93
|
+
export interface CallHoursSettings {
|
|
94
|
+
readonly status?: string;
|
|
95
|
+
readonly timezone_id?: string;
|
|
96
|
+
readonly weekly_operating_hours?: readonly CallHoursWeeklyOperatingHoursSettings[];
|
|
97
|
+
readonly holiday_schedule?: readonly CallHoursHolidayScheduleSettings[];
|
|
98
|
+
readonly [key: string]: unknown;
|
|
99
|
+
}
|
|
100
|
+
export interface CallIconsSettings {
|
|
101
|
+
readonly restrict_to_user_countries?: readonly string[];
|
|
102
|
+
readonly [key: string]: unknown;
|
|
103
|
+
}
|
|
104
|
+
export interface CallingSettings {
|
|
105
|
+
readonly status?: string;
|
|
106
|
+
readonly call_icon_visibility?: string;
|
|
107
|
+
readonly call_icons?: CallIconsSettings;
|
|
108
|
+
readonly call_hours?: CallHoursSettings;
|
|
109
|
+
readonly callback_permission_status?: string;
|
|
110
|
+
readonly sip?: SipSettings;
|
|
111
|
+
readonly [key: string]: unknown;
|
|
112
|
+
}
|
|
54
113
|
export interface PhoneNumberSettingsEntry {
|
|
114
|
+
readonly calling?: CallingSettings;
|
|
55
115
|
readonly [key: string]: unknown;
|
|
56
116
|
}
|
|
57
117
|
export interface PhoneNumberSettingsResponse {
|
|
@@ -115,6 +175,18 @@ export interface GetWabaInfoInput {
|
|
|
115
175
|
export interface ListSubscribedAppsInput {
|
|
116
176
|
readonly wabaId: string;
|
|
117
177
|
}
|
|
178
|
+
export interface SetWabaCallbackOverrideInput {
|
|
179
|
+
readonly wabaId: string;
|
|
180
|
+
readonly overrideCallbackUri: string;
|
|
181
|
+
readonly verifyToken: string;
|
|
182
|
+
}
|
|
183
|
+
export interface ClearWabaCallbackOverrideInput {
|
|
184
|
+
readonly wabaId: string;
|
|
185
|
+
}
|
|
186
|
+
export interface WabaCallbackOverrideResponse {
|
|
187
|
+
readonly success?: boolean;
|
|
188
|
+
readonly [key: string]: unknown;
|
|
189
|
+
}
|
|
118
190
|
export interface ListPhoneNumbersInput {
|
|
119
191
|
readonly wabaId: string;
|
|
120
192
|
readonly fields?: BusinessManagementFields;
|
|
@@ -136,9 +208,47 @@ export interface StorageConfigurationInput {
|
|
|
136
208
|
readonly status: "ENABLED" | "DISABLED" | string;
|
|
137
209
|
readonly [key: string]: unknown;
|
|
138
210
|
}
|
|
211
|
+
export type CallingStatus = "ENABLED" | "DISABLED";
|
|
212
|
+
export interface CallIconsInput {
|
|
213
|
+
readonly restrictToUserCountries?: readonly string[];
|
|
214
|
+
}
|
|
215
|
+
export interface WeeklyOperatingHoursInput {
|
|
216
|
+
readonly dayOfWeek: string;
|
|
217
|
+
readonly openTime: string;
|
|
218
|
+
readonly closeTime: string;
|
|
219
|
+
}
|
|
220
|
+
export interface HolidayScheduleInput {
|
|
221
|
+
readonly date: string;
|
|
222
|
+
readonly startTime: string;
|
|
223
|
+
readonly endTime: string;
|
|
224
|
+
}
|
|
225
|
+
export interface CallHoursInput {
|
|
226
|
+
readonly status?: CallingStatus | string;
|
|
227
|
+
readonly timezoneId?: string;
|
|
228
|
+
readonly weeklyOperatingHours?: readonly WeeklyOperatingHoursInput[];
|
|
229
|
+
readonly holidaySchedule?: readonly HolidayScheduleInput[];
|
|
230
|
+
}
|
|
231
|
+
export interface SipServerInput {
|
|
232
|
+
readonly hostname: string;
|
|
233
|
+
readonly port?: number;
|
|
234
|
+
readonly requestUriUserParams?: Record<string, string>;
|
|
235
|
+
}
|
|
236
|
+
export interface SipInput {
|
|
237
|
+
readonly status?: CallingStatus | string;
|
|
238
|
+
readonly servers?: readonly SipServerInput[];
|
|
239
|
+
}
|
|
240
|
+
export interface CallingInput {
|
|
241
|
+
readonly status?: CallingStatus | string;
|
|
242
|
+
readonly callIconVisibility?: "DEFAULT" | "DISABLE_ALL" | string;
|
|
243
|
+
readonly callIcons?: CallIconsInput;
|
|
244
|
+
readonly callHours?: CallHoursInput;
|
|
245
|
+
readonly callbackPermissionStatus?: CallingStatus | string;
|
|
246
|
+
readonly sip?: SipInput;
|
|
247
|
+
}
|
|
139
248
|
export interface UpdatePhoneNumberSettingsInput {
|
|
140
249
|
readonly phoneNumberId: string;
|
|
141
250
|
readonly storageConfiguration?: StorageConfigurationInput;
|
|
251
|
+
readonly calling?: CallingInput;
|
|
142
252
|
}
|
|
143
253
|
export interface PhoneNumberSettingsUpdateResponse {
|
|
144
254
|
readonly success?: boolean;
|
|
@@ -220,6 +330,120 @@ export interface SubmitDisplayNameForReviewResponse {
|
|
|
220
330
|
readonly success?: boolean;
|
|
221
331
|
readonly [key: string]: unknown;
|
|
222
332
|
}
|
|
333
|
+
export interface CreatePhoneNumberInput {
|
|
334
|
+
readonly wabaId: string;
|
|
335
|
+
readonly countryCode: string;
|
|
336
|
+
readonly phoneNumber: string;
|
|
337
|
+
readonly verifiedName: string;
|
|
338
|
+
}
|
|
339
|
+
export interface CreatePhoneNumberResponse {
|
|
340
|
+
readonly id?: string;
|
|
341
|
+
readonly [key: string]: unknown;
|
|
342
|
+
}
|
|
343
|
+
export interface RequestVerificationCodeInput {
|
|
344
|
+
readonly phoneNumberId: string;
|
|
345
|
+
readonly codeMethod: "SMS" | "VOICE" | string;
|
|
346
|
+
readonly language: string;
|
|
347
|
+
}
|
|
348
|
+
export interface RequestVerificationCodeResponse {
|
|
349
|
+
readonly success?: boolean;
|
|
350
|
+
readonly [key: string]: unknown;
|
|
351
|
+
}
|
|
352
|
+
export interface VerifyPhoneNumberInput {
|
|
353
|
+
readonly phoneNumberId: string;
|
|
354
|
+
readonly code: string;
|
|
355
|
+
}
|
|
356
|
+
export interface VerifyPhoneNumberResponse {
|
|
357
|
+
readonly success?: boolean;
|
|
358
|
+
readonly [key: string]: unknown;
|
|
359
|
+
}
|
|
360
|
+
export interface RegisterPhoneNumberInput {
|
|
361
|
+
readonly phoneNumberId: string;
|
|
362
|
+
readonly pin: string;
|
|
363
|
+
readonly dataLocalizationRegion?: string;
|
|
364
|
+
}
|
|
365
|
+
export interface RegisterPhoneNumberResponse {
|
|
366
|
+
readonly success?: boolean;
|
|
367
|
+
readonly [key: string]: unknown;
|
|
368
|
+
}
|
|
369
|
+
export interface DeregisterPhoneNumberInput {
|
|
370
|
+
readonly phoneNumberId: string;
|
|
371
|
+
}
|
|
372
|
+
export interface DeregisterPhoneNumberResponse {
|
|
373
|
+
readonly success?: boolean;
|
|
374
|
+
readonly [key: string]: unknown;
|
|
375
|
+
}
|
|
376
|
+
export interface SetTwoStepVerificationPinInput {
|
|
377
|
+
readonly phoneNumberId: string;
|
|
378
|
+
readonly pin: string;
|
|
379
|
+
}
|
|
380
|
+
export interface SetTwoStepVerificationPinResponse {
|
|
381
|
+
readonly success?: boolean;
|
|
382
|
+
readonly [key: string]: unknown;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Image format for QR code generation. Meta docs: `"SVG"` or `"PNG"`.
|
|
386
|
+
* WATS accepts case-insensitive input and normalizes to uppercase.
|
|
387
|
+
*/
|
|
388
|
+
export type QrImageFormat = "SVG" | "PNG";
|
|
389
|
+
export interface CreateQrCodeInput {
|
|
390
|
+
readonly phoneNumberId: string;
|
|
391
|
+
readonly prefilledMessage: string;
|
|
392
|
+
readonly generateQrImage: QrImageFormat | string;
|
|
393
|
+
}
|
|
394
|
+
export interface QrCodeEntry {
|
|
395
|
+
readonly code?: string;
|
|
396
|
+
readonly prefilled_message?: string;
|
|
397
|
+
readonly deep_link_url?: string;
|
|
398
|
+
readonly qr_image_url?: string;
|
|
399
|
+
readonly [key: string]: unknown;
|
|
400
|
+
}
|
|
401
|
+
export interface CreateQrCodeResponse {
|
|
402
|
+
readonly code?: string;
|
|
403
|
+
readonly prefilled_message?: string;
|
|
404
|
+
readonly deep_link_url?: string;
|
|
405
|
+
readonly qr_image_url?: string;
|
|
406
|
+
readonly [key: string]: unknown;
|
|
407
|
+
}
|
|
408
|
+
export interface ListQrCodesInput {
|
|
409
|
+
readonly phoneNumberId: string;
|
|
410
|
+
readonly fields?: BusinessManagementFields;
|
|
411
|
+
readonly before?: string;
|
|
412
|
+
readonly after?: string;
|
|
413
|
+
}
|
|
414
|
+
export interface ListQrCodesResponse {
|
|
415
|
+
readonly data?: readonly QrCodeEntry[];
|
|
416
|
+
readonly paging?: GraphPaging;
|
|
417
|
+
readonly [key: string]: unknown;
|
|
418
|
+
}
|
|
419
|
+
export interface GetQrCodeInput {
|
|
420
|
+
readonly phoneNumberId: string;
|
|
421
|
+
readonly code: string;
|
|
422
|
+
readonly fields?: BusinessManagementFields;
|
|
423
|
+
}
|
|
424
|
+
export interface GetQrCodeResponse {
|
|
425
|
+
readonly data?: readonly QrCodeEntry[];
|
|
426
|
+
readonly [key: string]: unknown;
|
|
427
|
+
}
|
|
428
|
+
export interface UpdateQrCodeInput {
|
|
429
|
+
readonly phoneNumberId: string;
|
|
430
|
+
readonly code: string;
|
|
431
|
+
readonly prefilledMessage: string;
|
|
432
|
+
}
|
|
433
|
+
export interface UpdateQrCodeResponse {
|
|
434
|
+
readonly code?: string;
|
|
435
|
+
readonly prefilled_message?: string;
|
|
436
|
+
readonly deep_link_url?: string;
|
|
437
|
+
readonly [key: string]: unknown;
|
|
438
|
+
}
|
|
439
|
+
export interface DeleteQrCodeInput {
|
|
440
|
+
readonly phoneNumberId: string;
|
|
441
|
+
readonly code: string;
|
|
442
|
+
}
|
|
443
|
+
export interface DeleteQrCodeResponse {
|
|
444
|
+
readonly success?: boolean;
|
|
445
|
+
readonly [key: string]: unknown;
|
|
446
|
+
}
|
|
223
447
|
export interface GetBusinessProfileInput {
|
|
224
448
|
readonly phoneNumberId: string;
|
|
225
449
|
readonly fields?: BusinessManagementFields;
|
|
@@ -233,6 +457,9 @@ export declare function buildUpdatePhoneNumberSettingsBody(input: UpdatePhoneNum
|
|
|
233
457
|
export declare function normalizeUpdatePhoneNumberSettingsParams(input: UpdatePhoneNumberSettingsInput): WireParams;
|
|
234
458
|
export declare function normalizeWabaInfoParams(input: GetWabaInfoInput): WireParams;
|
|
235
459
|
export declare function normalizeListSubscribedAppsParams(input: ListSubscribedAppsInput): WireParams;
|
|
460
|
+
export declare function normalizeSetWabaCallbackOverrideParams(input: SetWabaCallbackOverrideInput): WireParams;
|
|
461
|
+
export declare function normalizeClearWabaCallbackOverrideParams(input: ClearWabaCallbackOverrideInput): WireParams;
|
|
462
|
+
export declare function buildWabaCallbackOverrideBody(input: SetWabaCallbackOverrideInput): Record<string, unknown>;
|
|
236
463
|
export declare function normalizeListPhoneNumbersParams(input: ListPhoneNumbersInput): WireParams;
|
|
237
464
|
export declare function normalizePhoneNumberInfoParams(input: GetPhoneNumberInfoInput): WireParams;
|
|
238
465
|
export declare function normalizePhoneNumberSettingsParams(input: GetPhoneNumberSettingsInput): WireParams;
|
|
@@ -246,6 +473,22 @@ export declare function buildOfficialBusinessAccountReviewBody(input: RequestOff
|
|
|
246
473
|
export declare function normalizeOfficialBusinessAccountReviewParams(input: RequestOfficialBusinessAccountReviewInput): WireParams;
|
|
247
474
|
export declare function buildDisplayNameReviewBody(input: SubmitDisplayNameForReviewInput): Record<string, unknown>;
|
|
248
475
|
export declare function normalizeDisplayNameReviewParams(input: SubmitDisplayNameForReviewInput): WireParams;
|
|
476
|
+
export declare function buildCreatePhoneNumberBody(input: CreatePhoneNumberInput): Record<string, unknown>;
|
|
477
|
+
export declare function normalizeCreatePhoneNumberParams(input: CreatePhoneNumberInput): WireParams;
|
|
478
|
+
export declare function normalizeRequestVerificationCodeParams(input: RequestVerificationCodeInput): WireParams;
|
|
479
|
+
export declare function normalizeVerifyPhoneNumberParams(input: VerifyPhoneNumberInput): WireParams;
|
|
480
|
+
export declare function buildRegisterPhoneNumberBody(input: RegisterPhoneNumberInput): Record<string, unknown>;
|
|
481
|
+
export declare function normalizeRegisterPhoneNumberParams(input: RegisterPhoneNumberInput): WireParams;
|
|
482
|
+
export declare function normalizeDeregisterPhoneNumberParams(input: DeregisterPhoneNumberInput): WireParams;
|
|
483
|
+
export declare function buildSetTwoStepVerificationPinBody(input: SetTwoStepVerificationPinInput): Record<string, unknown>;
|
|
484
|
+
export declare function normalizeSetTwoStepVerificationPinParams(input: SetTwoStepVerificationPinInput): WireParams;
|
|
485
|
+
export declare function normalizeCreateQrCodeParams(input: CreateQrCodeInput): WireParams;
|
|
486
|
+
export declare function buildCreateQrCodeBody(input: CreateQrCodeInput): Record<string, unknown>;
|
|
487
|
+
export declare function normalizeListQrCodesParams(input: ListQrCodesInput): WireParams;
|
|
488
|
+
export declare function normalizeGetQrCodeParams(input: GetQrCodeInput): WireParams;
|
|
489
|
+
export declare function normalizeUpdateQrCodeParams(input: UpdateQrCodeInput): WireParams;
|
|
490
|
+
export declare function buildUpdateQrCodeBody(input: UpdateQrCodeInput): Record<string, unknown>;
|
|
491
|
+
export declare function normalizeDeleteQrCodeParams(input: DeleteQrCodeInput): WireParams;
|
|
249
492
|
export declare function normalizeBusinessProfileParams(input: GetBusinessProfileInput): WireParams;
|
|
250
493
|
export declare function normalizeCommerceSettingsParams(input: GetCommerceSettingsInput): WireParams;
|
|
251
494
|
export declare function buildUpdateBusinessProfileBody(input: UpdateBusinessProfileInput): Record<string, unknown>;
|
|
@@ -253,6 +496,60 @@ export declare function normalizeUpdateBusinessProfileParams(input: UpdateBusine
|
|
|
253
496
|
export declare function buildUpdateCommerceSettingsBody(input: UpdateCommerceSettingsInput): Record<string, unknown>;
|
|
254
497
|
export declare function normalizeUpdateCommerceSettingsParams(input: UpdateCommerceSettingsInput): WireParams;
|
|
255
498
|
export declare function sanitizeBusinessManagementOptions(opts: EndpointInvokeOptions | undefined, helperName: string): EndpointInvokeOptions | undefined;
|
|
499
|
+
/**
|
|
500
|
+
* Response shape for `GET /{phoneNumberId}/whatsapp_business_encryption`.
|
|
501
|
+
*
|
|
502
|
+
* NOTE: this GET edge is UNVERIFIED live (pywa does not implement a getter).
|
|
503
|
+
* `business_public_key` is the symmetric Graph-convention best-guess. All
|
|
504
|
+
* fields are optional and the `[key: string]: unknown` index provides
|
|
505
|
+
* tolerance until the live shape is confirmed.
|
|
506
|
+
*/
|
|
507
|
+
export interface BusinessPublicKeyResponse {
|
|
508
|
+
readonly business_public_key?: string;
|
|
509
|
+
readonly id?: string;
|
|
510
|
+
readonly [key: string]: unknown;
|
|
511
|
+
}
|
|
512
|
+
/** Response shape for `POST /{phoneNumberId}/whatsapp_business_encryption`. */
|
|
513
|
+
export interface BusinessPublicKeyUpdateResponse {
|
|
514
|
+
readonly success?: boolean;
|
|
515
|
+
readonly [key: string]: unknown;
|
|
516
|
+
}
|
|
517
|
+
export interface GetBusinessPublicKeyInput {
|
|
518
|
+
readonly phoneNumberId: string;
|
|
519
|
+
readonly fields?: BusinessManagementFields;
|
|
520
|
+
}
|
|
521
|
+
export interface SetBusinessPublicKeyInput {
|
|
522
|
+
readonly phoneNumberId: string;
|
|
523
|
+
readonly businessPublicKey: string;
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Validate a `businessPublicKey` PEM string. The value is a PUBLIC key (not a
|
|
527
|
+
* secret), but the caller-supplied value is never echoed in error messages.
|
|
528
|
+
* LF (`\n`) is allowed (PEM armor newlines); NUL (`\0`) and CR (`\r`) are
|
|
529
|
+
* rejected. Length is bounded to `MAX_BUSINESS_PUBLIC_KEY_LENGTH` and the PEM
|
|
530
|
+
* armor markers must both be present.
|
|
531
|
+
*/
|
|
532
|
+
export declare function assertBusinessPublicKey(value: unknown, helperName: string): string;
|
|
533
|
+
export declare function normalizeGetBusinessPublicKeyParams(input: GetBusinessPublicKeyInput): WireParams;
|
|
534
|
+
export declare function normalizeSetBusinessPublicKeyParams(input: SetBusinessPublicKeyInput): WireParams;
|
|
535
|
+
/**
|
|
536
|
+
* Build the form-encoded body for the public-key setter. pywa sends the key
|
|
537
|
+
* as `data={"business_public_key": <PEM>}` (httpx `data=` →
|
|
538
|
+
* `application/x-www-form-urlencoded`), so WATS mirrors that exactly with a
|
|
539
|
+
* `URLSearchParams` body rather than JSON.
|
|
540
|
+
*/
|
|
541
|
+
export declare function buildSetBusinessPublicKeyBody(input: SetBusinessPublicKeyInput): URLSearchParams;
|
|
542
|
+
export declare const getBusinessPublicKey: ((client: GraphClient, params: GetBusinessPublicKeyInput, body?: never, opts?: EndpointInvokeOptions) => Promise<BusinessPublicKeyResponse>) & {
|
|
543
|
+
definition: import("../endpoint.js").EndpointDefinition<{
|
|
544
|
+
phoneNumberId: string;
|
|
545
|
+
fields?: string;
|
|
546
|
+
}, never, BusinessPublicKeyResponse>;
|
|
547
|
+
};
|
|
548
|
+
export declare const setBusinessPublicKey: ((client: GraphClient, params: SetBusinessPublicKeyInput, body?: never, opts?: EndpointInvokeOptions) => Promise<BusinessPublicKeyUpdateResponse>) & {
|
|
549
|
+
definition: import("../endpoint.js").EndpointDefinition<{
|
|
550
|
+
phoneNumberId: string;
|
|
551
|
+
}, SetBusinessPublicKeyInput, BusinessPublicKeyUpdateResponse>;
|
|
552
|
+
};
|
|
256
553
|
export declare const getWabaInfo: ((client: GraphClient, params: GetWabaInfoInput, body?: never, opts?: EndpointInvokeOptions) => Promise<WabaInfo>) & {
|
|
257
554
|
definition: import("../endpoint.js").EndpointDefinition<{
|
|
258
555
|
wabaId: string;
|
|
@@ -264,6 +561,16 @@ export declare const listSubscribedApps: ((client: GraphClient, params: ListSubs
|
|
|
264
561
|
wabaId: string;
|
|
265
562
|
}, never, SubscribedAppsResponse>;
|
|
266
563
|
};
|
|
564
|
+
export declare const setWabaCallbackOverride: ((client: GraphClient, params: SetWabaCallbackOverrideInput, body?: never, opts?: EndpointInvokeOptions) => Promise<WabaCallbackOverrideResponse>) & {
|
|
565
|
+
definition: import("../endpoint.js").EndpointDefinition<{
|
|
566
|
+
wabaId: string;
|
|
567
|
+
}, SetWabaCallbackOverrideInput, WabaCallbackOverrideResponse>;
|
|
568
|
+
};
|
|
569
|
+
export declare const clearWabaCallbackOverride: ((client: GraphClient, params: ClearWabaCallbackOverrideInput, body?: never, opts?: EndpointInvokeOptions) => Promise<WabaCallbackOverrideResponse>) & {
|
|
570
|
+
definition: import("../endpoint.js").EndpointDefinition<{
|
|
571
|
+
wabaId: string;
|
|
572
|
+
}, never, WabaCallbackOverrideResponse>;
|
|
573
|
+
};
|
|
267
574
|
export declare const getPhoneNumberInfo: ((client: GraphClient, params: GetPhoneNumberInfoInput, body?: never, opts?: EndpointInvokeOptions) => Promise<PhoneNumberInfo>) & {
|
|
268
575
|
definition: import("../endpoint.js").EndpointDefinition<{
|
|
269
576
|
phoneNumberId: string;
|
|
@@ -335,4 +642,68 @@ export declare const updateCommerceSettings: ((client: GraphClient, params: Upda
|
|
|
335
642
|
phoneNumberId: string;
|
|
336
643
|
}, UpdateCommerceSettingsInput, CommerceSettingsUpdateResponse>;
|
|
337
644
|
};
|
|
645
|
+
export declare const createPhoneNumber: ((client: GraphClient, params: CreatePhoneNumberInput, body?: never, opts?: EndpointInvokeOptions) => Promise<CreatePhoneNumberResponse>) & {
|
|
646
|
+
definition: import("../endpoint.js").EndpointDefinition<{
|
|
647
|
+
wabaId: string;
|
|
648
|
+
}, CreatePhoneNumberInput, CreatePhoneNumberResponse>;
|
|
649
|
+
};
|
|
650
|
+
export declare const requestVerificationCode: ((client: GraphClient, params: RequestVerificationCodeInput, body?: never, opts?: EndpointInvokeOptions) => Promise<RequestVerificationCodeResponse>) & {
|
|
651
|
+
definition: import("../endpoint.js").EndpointDefinition<{
|
|
652
|
+
phoneNumberId: string;
|
|
653
|
+
code_method?: string;
|
|
654
|
+
language?: string;
|
|
655
|
+
}, never, RequestVerificationCodeResponse>;
|
|
656
|
+
};
|
|
657
|
+
export declare const verifyPhoneNumber: ((client: GraphClient, params: VerifyPhoneNumberInput, body?: never, opts?: EndpointInvokeOptions) => Promise<VerifyPhoneNumberResponse>) & {
|
|
658
|
+
definition: import("../endpoint.js").EndpointDefinition<{
|
|
659
|
+
phoneNumberId: string;
|
|
660
|
+
code?: string;
|
|
661
|
+
}, never, VerifyPhoneNumberResponse>;
|
|
662
|
+
};
|
|
663
|
+
export declare const registerPhoneNumber: ((client: GraphClient, params: RegisterPhoneNumberInput, body?: never, opts?: EndpointInvokeOptions) => Promise<RegisterPhoneNumberResponse>) & {
|
|
664
|
+
definition: import("../endpoint.js").EndpointDefinition<{
|
|
665
|
+
phoneNumberId: string;
|
|
666
|
+
}, RegisterPhoneNumberInput, RegisterPhoneNumberResponse>;
|
|
667
|
+
};
|
|
668
|
+
export declare const deregisterPhoneNumber: ((client: GraphClient, params: DeregisterPhoneNumberInput, body?: never, opts?: EndpointInvokeOptions) => Promise<DeregisterPhoneNumberResponse>) & {
|
|
669
|
+
definition: import("../endpoint.js").EndpointDefinition<{
|
|
670
|
+
phoneNumberId: string;
|
|
671
|
+
}, never, DeregisterPhoneNumberResponse>;
|
|
672
|
+
};
|
|
673
|
+
export declare const setTwoStepVerificationPin: ((client: GraphClient, params: SetTwoStepVerificationPinInput, body?: never, opts?: EndpointInvokeOptions) => Promise<SetTwoStepVerificationPinResponse>) & {
|
|
674
|
+
definition: import("../endpoint.js").EndpointDefinition<{
|
|
675
|
+
phoneNumberId: string;
|
|
676
|
+
}, SetTwoStepVerificationPinInput, SetTwoStepVerificationPinResponse>;
|
|
677
|
+
};
|
|
678
|
+
export declare const createQrCode: ((client: GraphClient, params: CreateQrCodeInput, body?: never, opts?: EndpointInvokeOptions) => Promise<CreateQrCodeResponse>) & {
|
|
679
|
+
definition: import("../endpoint.js").EndpointDefinition<{
|
|
680
|
+
phoneNumberId: string;
|
|
681
|
+
}, CreateQrCodeInput, CreateQrCodeResponse>;
|
|
682
|
+
};
|
|
683
|
+
export declare const listQrCodes: ((client: GraphClient, params: ListQrCodesInput, body?: never, opts?: EndpointInvokeOptions) => Promise<ListQrCodesResponse>) & {
|
|
684
|
+
definition: import("../endpoint.js").EndpointDefinition<{
|
|
685
|
+
phoneNumberId: string;
|
|
686
|
+
fields?: string;
|
|
687
|
+
before?: string;
|
|
688
|
+
after?: string;
|
|
689
|
+
}, never, ListQrCodesResponse>;
|
|
690
|
+
};
|
|
691
|
+
export declare const getQrCode: ((client: GraphClient, params: GetQrCodeInput, body?: never, opts?: EndpointInvokeOptions) => Promise<GetQrCodeResponse>) & {
|
|
692
|
+
definition: import("../endpoint.js").EndpointDefinition<{
|
|
693
|
+
phoneNumberId: string;
|
|
694
|
+
code: string;
|
|
695
|
+
fields?: string;
|
|
696
|
+
}, never, GetQrCodeResponse>;
|
|
697
|
+
};
|
|
698
|
+
export declare const updateQrCode: ((client: GraphClient, params: UpdateQrCodeInput, body?: never, opts?: EndpointInvokeOptions) => Promise<UpdateQrCodeResponse>) & {
|
|
699
|
+
definition: import("../endpoint.js").EndpointDefinition<{
|
|
700
|
+
phoneNumberId: string;
|
|
701
|
+
}, UpdateQrCodeInput, UpdateQrCodeResponse>;
|
|
702
|
+
};
|
|
703
|
+
export declare const deleteQrCode: ((client: GraphClient, params: DeleteQrCodeInput, body?: never, opts?: EndpointInvokeOptions) => Promise<DeleteQrCodeResponse>) & {
|
|
704
|
+
definition: import("../endpoint.js").EndpointDefinition<{
|
|
705
|
+
phoneNumberId: string;
|
|
706
|
+
code: string;
|
|
707
|
+
}, never, DeleteQrCodeResponse>;
|
|
708
|
+
};
|
|
338
709
|
export {};
|