meta-cloud-api 3.3.0 → 3.5.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.
- package/README.md +1 -0
- package/dist/index.d.mts +331 -63
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/dist/types/enums.d.ts +7 -1
- package/dist/types/enums.d.ts.map +1 -1
- package/dist/types/enums.js +1 -1
- package/dist/types/enums.js.map +1 -1
- package/dist/types/index.d.ts +215 -52
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,6 +75,7 @@ wa.registration // Phone registration
|
|
|
75
75
|
wa.twoStepVerification // 2FA management
|
|
76
76
|
wa.encryption // End-to-end encryption
|
|
77
77
|
wa.blockUsers // Block/unblock users
|
|
78
|
+
wa.contactBook // Delete a BSUID contact book entry
|
|
78
79
|
wa.waba // WhatsApp Business Account management
|
|
79
80
|
```
|
|
80
81
|
|
package/dist/index.d.mts
CHANGED
|
@@ -187,8 +187,14 @@ declare enum WebhookTypesEnum {
|
|
|
187
187
|
Video = "video"
|
|
188
188
|
}
|
|
189
189
|
declare enum SystemChangeTypesEnum {
|
|
190
|
+
/** @deprecated Meta renamed this to `user_changed_number`. Use {@link SystemChangeTypesEnum.UserChangedNumber}. */
|
|
190
191
|
CustomerChangedNumber = "customer_changed_number",
|
|
191
|
-
|
|
192
|
+
/** @deprecated Meta renamed this to `user_identity_changed`. Use {@link SystemChangeTypesEnum.UserIdentityChanged}. */
|
|
193
|
+
CustomerIdentityChanged = "customer_identity_changed",
|
|
194
|
+
UserChangedNumber = "user_changed_number",
|
|
195
|
+
UserIdentityChanged = "user_identity_changed",
|
|
196
|
+
/** The user's business-scoped user ID (BSUID) changed. */
|
|
197
|
+
UserChangedUserId = "user_changed_user_id"
|
|
192
198
|
}
|
|
193
199
|
declare enum ReferralSourceTypesEnum {
|
|
194
200
|
Ad = "ad",
|
|
@@ -1481,6 +1487,87 @@ declare class CommerceApi extends BaseAPI implements CommerceClass {
|
|
|
1481
1487
|
updateCommerceSettings(params: UpdateCommerceSettingsRequest): Promise<ResponseSuccess>;
|
|
1482
1488
|
}
|
|
1483
1489
|
//#endregion
|
|
1490
|
+
//#region src/api/contactBook/types/contactBook.d.ts
|
|
1491
|
+
/**
|
|
1492
|
+
* Contact Book API Types
|
|
1493
|
+
* @see https://developers.facebook.com/documentation/business-messaging/whatsapp/business-scoped-user-ids/
|
|
1494
|
+
*/
|
|
1495
|
+
/**
|
|
1496
|
+
* Parameters for deleting a contact book entry.
|
|
1497
|
+
*/
|
|
1498
|
+
type DeleteContactBookEntryParams = {
|
|
1499
|
+
/**
|
|
1500
|
+
* Business-scoped user ID whose entry should be removed, in standard BSUID
|
|
1501
|
+
* format (e.g. "US.13491208655302741918").
|
|
1502
|
+
*/
|
|
1503
|
+
bsuid: string;
|
|
1504
|
+
};
|
|
1505
|
+
/**
|
|
1506
|
+
* Response for a contact book delete request.
|
|
1507
|
+
*/
|
|
1508
|
+
type DeleteContactBookEntryResponse = {
|
|
1509
|
+
messaging_product: 'whatsapp'; /** `true` when the request was processed successfully. */
|
|
1510
|
+
success?: boolean;
|
|
1511
|
+
/**
|
|
1512
|
+
* `true` when an entry existed for the BSUID and was removed.
|
|
1513
|
+
*
|
|
1514
|
+
* Since August 25, 2026 the endpoint reports `false` instead of returning an
|
|
1515
|
+
* error when the BSUID is unknown, malformed, or belongs to another business
|
|
1516
|
+
* portfolio, so a delete is effectively idempotent — always read this flag
|
|
1517
|
+
* rather than treating a resolved call as proof the entry existed.
|
|
1518
|
+
*/
|
|
1519
|
+
deleted?: boolean;
|
|
1520
|
+
};
|
|
1521
|
+
interface ContactBookClass {
|
|
1522
|
+
deleteEntry(params: DeleteContactBookEntryParams): Promise<DeleteContactBookEntryResponse>;
|
|
1523
|
+
}
|
|
1524
|
+
//#endregion
|
|
1525
|
+
//#region src/api/contactBook/ContactBookApi.d.ts
|
|
1526
|
+
/**
|
|
1527
|
+
* API for the Meta-hosted contact book.
|
|
1528
|
+
*
|
|
1529
|
+
* The contact book pairs a WhatsApp user's phone number with their
|
|
1530
|
+
* business-scoped user ID (BSUID). Meta populates it automatically: any message
|
|
1531
|
+
* or call between a business phone number in your portfolio and a user stores
|
|
1532
|
+
* that pairing, which is why webhooks keep including the phone number even after
|
|
1533
|
+
* the user adopts a username. It is scoped to the business portfolio, not to a
|
|
1534
|
+
* single phone number, and only captures interactions from early April 2026
|
|
1535
|
+
* onward — there is no historical backfill.
|
|
1536
|
+
*
|
|
1537
|
+
* Endpoints covered:
|
|
1538
|
+
* - `DELETE /{PHONE_NUMBER_ID}/contact_book` - Delete a user's contact book entry
|
|
1539
|
+
*
|
|
1540
|
+
* @see https://developers.facebook.com/documentation/business-messaging/whatsapp/business-scoped-user-ids/
|
|
1541
|
+
*/
|
|
1542
|
+
declare class ContactBookApi extends BaseAPI implements ContactBookClass {
|
|
1543
|
+
private readonly endpoint;
|
|
1544
|
+
/**
|
|
1545
|
+
* Delete a user's entry from your contact book.
|
|
1546
|
+
*
|
|
1547
|
+
* Once deleted, the user's phone number and BSUID are no longer included in
|
|
1548
|
+
* webhook payloads for any business phone number in the portfolio — unless
|
|
1549
|
+
* the number is still in the 30-day cache, or a new interaction recreates the
|
|
1550
|
+
* entry.
|
|
1551
|
+
*
|
|
1552
|
+
* Unknown, malformed, and other-portfolio BSUIDs no longer raise an API error
|
|
1553
|
+
* (changed August 25, 2026): the request resolves with `deleted: false`, so
|
|
1554
|
+
* check that flag instead of relying on a thrown error to detect a miss.
|
|
1555
|
+
*
|
|
1556
|
+
* @param params - Delete parameters.
|
|
1557
|
+
* @param params.bsuid - BSUID of the entry to delete (e.g. "US.13491208655302741918").
|
|
1558
|
+
* @returns Response reporting whether the entry was deleted (`deleted: false` when no entry matched).
|
|
1559
|
+
* @see https://developers.facebook.com/documentation/business-messaging/whatsapp/business-scoped-user-ids/
|
|
1560
|
+
*
|
|
1561
|
+
* @example
|
|
1562
|
+
* ```typescript
|
|
1563
|
+
* const result = await client.contactBook.deleteEntry({ bsuid: 'US.13491208655302741918' });
|
|
1564
|
+
* // true when an entry was removed, false when the BSUID had no entry in the portfolio
|
|
1565
|
+
* console.log(result.deleted);
|
|
1566
|
+
* ```
|
|
1567
|
+
*/
|
|
1568
|
+
deleteEntry(params: DeleteContactBookEntryParams): Promise<DeleteContactBookEntryResponse>;
|
|
1569
|
+
}
|
|
1570
|
+
//#endregion
|
|
1484
1571
|
//#region src/api/encryption/types/publicKey.d.ts
|
|
1485
1572
|
type EncryptionPublicKeyResponse = ResponseData<{
|
|
1486
1573
|
business_public_key: string;
|
|
@@ -2229,10 +2316,51 @@ declare class MessagesClass extends BaseClass {
|
|
|
2229
2316
|
* @see https://developers.facebook.com/documentation/business-messaging/whatsapp/marketing-messages/send-marketing-messages/
|
|
2230
2317
|
*/
|
|
2231
2318
|
type MarketingMessageRequest = {
|
|
2232
|
-
|
|
2319
|
+
/**
|
|
2320
|
+
* WhatsApp user phone number. Omit when addressing the user by `recipient`
|
|
2321
|
+
* (BSUID) instead.
|
|
2322
|
+
*/
|
|
2323
|
+
to?: string;
|
|
2324
|
+
/**
|
|
2325
|
+
* Business-scoped user ID (BSUID) or parent BSUID of the recipient, used in
|
|
2326
|
+
* place of `to` for individual messages.
|
|
2327
|
+
*
|
|
2328
|
+
* Templates carrying `bid_spec` (max price) cannot be sent to a BSUID
|
|
2329
|
+
* recipient — that combination fails with error `131062`.
|
|
2330
|
+
*/
|
|
2331
|
+
recipient?: string;
|
|
2233
2332
|
template: MessageTemplateObject<ComponentTypesEnum>;
|
|
2234
2333
|
message_activity_sharing?: boolean;
|
|
2235
2334
|
product_policy?: 'CLOUD_API_FALLBACK' | 'STRICT';
|
|
2335
|
+
/**
|
|
2336
|
+
* Per-message max price adjustment. Scales the template's `bid_amount`
|
|
2337
|
+
* (set in `optimization_spec`) for this send only, without editing the
|
|
2338
|
+
* template.
|
|
2339
|
+
*
|
|
2340
|
+
* Meta's recommendation: set the template's `bid_amount` to the highest
|
|
2341
|
+
* price you are willing to pay, then use a multiplier below 1 to scale
|
|
2342
|
+
* individual messages down. This gives the delivery system the widest
|
|
2343
|
+
* range to optimize against.
|
|
2344
|
+
*
|
|
2345
|
+
* The message-level multiplier is subject to change during the beta.
|
|
2346
|
+
*/
|
|
2347
|
+
bid_spec?: MarketingMessageBidSpec;
|
|
2348
|
+
};
|
|
2349
|
+
/**
|
|
2350
|
+
* Send-time max price multiplier for `POST /{PHONE_NUMBER_ID}/marketing_messages`.
|
|
2351
|
+
*
|
|
2352
|
+
* Meta keeps the `bid_spec` object name on the send call even though template
|
|
2353
|
+
* create/update moved from `bid_spec` to `optimization_spec` on July 31, 2026.
|
|
2354
|
+
*
|
|
2355
|
+
* @see https://developers.facebook.com/documentation/business-messaging/whatsapp/marketing-messages/pricing
|
|
2356
|
+
*/
|
|
2357
|
+
type MarketingMessageBidSpec = {
|
|
2358
|
+
/**
|
|
2359
|
+
* Positive multiplier applied to the template's `bid_amount`. Defaults to
|
|
2360
|
+
* `1` (the template amount unchanged); `1.5` raises the max price for this
|
|
2361
|
+
* message by 50%, `0.5` halves it.
|
|
2362
|
+
*/
|
|
2363
|
+
per_message_bid_multiplier: number;
|
|
2236
2364
|
};
|
|
2237
2365
|
interface MarketingMessagesClass {
|
|
2238
2366
|
sendTemplateMessage(params: MarketingMessageRequest): Promise<MessagesResponse>;
|
|
@@ -2926,11 +3054,47 @@ type ProductCarouselCard = {
|
|
|
2926
3054
|
components: TemplateHeader[];
|
|
2927
3055
|
};
|
|
2928
3056
|
type ComponentTypes = TemplateHeader | TemplateBody | TemplateFooter | TemplateButtons | TemplateLimitedTimeOffer | TemplateCarousel;
|
|
3057
|
+
/**
|
|
3058
|
+
* Max price ("bid") configuration for a marketing template.
|
|
3059
|
+
*
|
|
3060
|
+
* Max price is set per template, and templates carrying it must be sent through
|
|
3061
|
+
* the Marketing Messages API (`POST /{PHONE_NUMBER_ID}/marketing_messages`).
|
|
3062
|
+
* Sending one through the Cloud API `/messages` endpoint fails with error
|
|
3063
|
+
* `131061`; sending one to a BSUID recipient fails with error `131062`.
|
|
3064
|
+
* Omitting `optimization_spec` leaves the template on standard rate card pricing.
|
|
3065
|
+
*
|
|
3066
|
+
* As of August 31, 2026, eligible templates can be switched between rate card
|
|
3067
|
+
* pricing and max price without creating a new template — send
|
|
3068
|
+
* `optimization_spec` to `POST /{TEMPLATE_ID}` ({@link TemplateClass.updateTemplate}).
|
|
3069
|
+
*
|
|
3070
|
+
* @see https://developers.facebook.com/documentation/business-messaging/whatsapp/marketing-messages/pricing
|
|
3071
|
+
*/
|
|
3072
|
+
type TemplateOptimizationSpec = {
|
|
3073
|
+
/** Bid strategy. Only `LOWEST_COST_WITH_BID_CAP` is currently accepted. */bid_strategy: 'LOWEST_COST_WITH_BID_CAP';
|
|
3074
|
+
/**
|
|
3075
|
+
* Maximum price per 1,000 message deliveries, in the smallest unit of the
|
|
3076
|
+
* WABA's currency. Multiply the desired per-delivery price by 1,000 after
|
|
3077
|
+
* converting it to the smallest unit.
|
|
3078
|
+
*/
|
|
3079
|
+
bid_amount: number;
|
|
3080
|
+
};
|
|
3081
|
+
/**
|
|
3082
|
+
* @deprecated Meta deprecated `bid_spec` on template create/update on
|
|
3083
|
+
* July 31, 2026. Use {@link TemplateOptimizationSpec} with `optimization_spec`.
|
|
3084
|
+
*/
|
|
3085
|
+
type TemplateBidSpec = {
|
|
3086
|
+
/** Maximum price per 1,000 message deliveries, in the WABA currency's smallest unit. */bid_amount: number;
|
|
3087
|
+
};
|
|
2929
3088
|
type TemplateRequestBody = GeneralRequestBody & {
|
|
2930
3089
|
name: string;
|
|
2931
3090
|
language: LanguagesEnum;
|
|
2932
3091
|
category?: CategoryEnum;
|
|
2933
|
-
components?: ComponentTypes[];
|
|
3092
|
+
components?: ComponentTypes[]; /** Max price configuration. Marketing templates only, MM API sends only. */
|
|
3093
|
+
optimization_spec?: TemplateOptimizationSpec;
|
|
3094
|
+
/**
|
|
3095
|
+
* @deprecated Deprecated by Meta on July 31, 2026. Use `optimization_spec`.
|
|
3096
|
+
*/
|
|
3097
|
+
bid_spec?: TemplateBidSpec;
|
|
2934
3098
|
};
|
|
2935
3099
|
type TemplateResponse = {
|
|
2936
3100
|
id: string;
|
|
@@ -2938,7 +3102,8 @@ type TemplateResponse = {
|
|
|
2938
3102
|
language: LanguagesEnum;
|
|
2939
3103
|
category: CategoryEnum;
|
|
2940
3104
|
name: string;
|
|
2941
|
-
components: ComponentTypes[];
|
|
3105
|
+
components: ComponentTypes[]; /** Max price configuration, returned for templates created with one. */
|
|
3106
|
+
optimization_spec?: TemplateOptimizationSpec;
|
|
2942
3107
|
};
|
|
2943
3108
|
type TemplateGetParams = {
|
|
2944
3109
|
limit?: number;
|
|
@@ -4253,12 +4418,25 @@ interface OrderMessage extends BaseMessage {
|
|
|
4253
4418
|
}>;
|
|
4254
4419
|
};
|
|
4255
4420
|
}
|
|
4421
|
+
/**
|
|
4422
|
+
* System message webhook (identity changes).
|
|
4423
|
+
*
|
|
4424
|
+
* - `user_changed_number` — the user's phone number changed; `wa_id` holds the new number.
|
|
4425
|
+
* - `user_identity_changed` — the user's identity (profile) changed.
|
|
4426
|
+
* - `user_changed_user_id` — the user's business-scoped user ID (BSUID) changed;
|
|
4427
|
+
* `user_id` / `parent_user_id` hold the new BSUID / parent BSUID.
|
|
4428
|
+
*
|
|
4429
|
+
* Note: there is no subscribable `user_id_update` webhook field. BSUID changes are
|
|
4430
|
+
* delivered as these `messages` field system messages.
|
|
4431
|
+
*/
|
|
4256
4432
|
interface SystemMessage extends BaseMessage {
|
|
4257
4433
|
type: MessageTypesEnum.System;
|
|
4258
4434
|
system: {
|
|
4259
|
-
body: string;
|
|
4260
|
-
wa_id: string;
|
|
4261
|
-
|
|
4435
|
+
/** Human-readable description, e.g. "User A changed from <OLD_BSUID> to <NEW_BSUID>" */body: string; /** New WhatsApp ID of the user */
|
|
4436
|
+
wa_id: string; /** New business-scoped user ID, present for `user_changed_user_id` */
|
|
4437
|
+
user_id?: string; /** New parent business-scoped user ID, present for `user_changed_user_id` */
|
|
4438
|
+
parent_user_id?: string;
|
|
4439
|
+
type: 'user_changed_number' | 'user_identity_changed' | 'user_changed_user_id';
|
|
4262
4440
|
};
|
|
4263
4441
|
}
|
|
4264
4442
|
/**
|
|
@@ -4559,6 +4737,48 @@ interface MessageEchoesWebhookValue {
|
|
|
4559
4737
|
value: MessageEchoesValue;
|
|
4560
4738
|
}
|
|
4561
4739
|
//#endregion
|
|
4740
|
+
//#region src/core/webhook/types/status.d.ts
|
|
4741
|
+
interface StatusWebhook {
|
|
4742
|
+
id: string;
|
|
4743
|
+
status: 'sent' | 'delivered' | 'read' | 'failed';
|
|
4744
|
+
timestamp: string;
|
|
4745
|
+
recipient_id: string;
|
|
4746
|
+
recipient_type?: 'group';
|
|
4747
|
+
recipient_participant_id?: string;
|
|
4748
|
+
recipient_identity_key_hash?: string;
|
|
4749
|
+
biz_opaque_callback_data?: string;
|
|
4750
|
+
/**
|
|
4751
|
+
* ID of the template used to send a Direct Send message.
|
|
4752
|
+
* Present only on statuses for messages sent with a `category` field.
|
|
4753
|
+
*
|
|
4754
|
+
* @see {@link https://developers.facebook.com/documentation/business-messaging/whatsapp/direct-send/supported-message-types | Direct Send}
|
|
4755
|
+
*/
|
|
4756
|
+
template_id?: string;
|
|
4757
|
+
conversation?: {
|
|
4758
|
+
id: string;
|
|
4759
|
+
expiration_timestamp?: string;
|
|
4760
|
+
origin: {
|
|
4761
|
+
type: 'authentication' | 'authentication_international' | 'marketing' | 'marketing_lite' | 'referral_conversion' | 'service' | 'utility';
|
|
4762
|
+
};
|
|
4763
|
+
};
|
|
4764
|
+
pricing?: {
|
|
4765
|
+
billable: boolean;
|
|
4766
|
+
pricing_model: 'CBP' | 'PMP';
|
|
4767
|
+
type: 'regular' | 'free_customer_service' | 'free_entry_point';
|
|
4768
|
+
category: 'authentication' | 'authentication_international' | 'marketing' | 'marketing_lite' | 'referral_conversion' | 'service' | 'utility';
|
|
4769
|
+
};
|
|
4770
|
+
errors?: Array<WebhookError>;
|
|
4771
|
+
}
|
|
4772
|
+
/**
|
|
4773
|
+
* Message status enum
|
|
4774
|
+
*/
|
|
4775
|
+
declare enum MessageStatus {
|
|
4776
|
+
DELIVERED = "delivered",
|
|
4777
|
+
READ = "read",
|
|
4778
|
+
SENT = "sent",
|
|
4779
|
+
FAILED = "failed"
|
|
4780
|
+
}
|
|
4781
|
+
//#endregion
|
|
4562
4782
|
//#region src/core/webhook/types/messaging.d.ts
|
|
4563
4783
|
interface MessagingHandoverControlPassed {
|
|
4564
4784
|
/** Optional metadata string passed with the handover */
|
|
@@ -4584,19 +4804,86 @@ interface MessagingHandoversWebhookValue {
|
|
|
4584
4804
|
field: 'messaging_handovers';
|
|
4585
4805
|
value: MessagingHandoversValue;
|
|
4586
4806
|
}
|
|
4807
|
+
/**
|
|
4808
|
+
* Flow definition attached to a standby message echo, present only for flow
|
|
4809
|
+
* message echoes.
|
|
4810
|
+
*/
|
|
4811
|
+
interface StandbyMessageEchoFlow {
|
|
4812
|
+
id: string;
|
|
4813
|
+
name: string;
|
|
4814
|
+
status: string;
|
|
4815
|
+
categories: string[];
|
|
4816
|
+
}
|
|
4817
|
+
/**
|
|
4818
|
+
* A single echoed outbound message observed while in standby. Carries the raw
|
|
4819
|
+
* Send Message API request body used by the active handler, not rendered content.
|
|
4820
|
+
*/
|
|
4821
|
+
interface StandbyMessageEcho {
|
|
4822
|
+
/** WhatsApp message ID (wamid.*) of the echoed outbound message */
|
|
4823
|
+
id: string;
|
|
4824
|
+
/** Unix timestamp (seconds, as a string) of when the message was sent */
|
|
4825
|
+
timestamp: string;
|
|
4826
|
+
/**
|
|
4827
|
+
* The exact Send Message API request body used to send the message, e.g.
|
|
4828
|
+
* `{ messaging_product, to, recipient_type?, type, [type]: {...}, context? }`.
|
|
4829
|
+
* For template messages the send-time variable values live here under `template`.
|
|
4830
|
+
*/
|
|
4831
|
+
message: {
|
|
4832
|
+
messaging_product: 'whatsapp';
|
|
4833
|
+
recipient_type?: string;
|
|
4834
|
+
to: string;
|
|
4835
|
+
type: string;
|
|
4836
|
+
context?: {
|
|
4837
|
+
message_id: string;
|
|
4838
|
+
};
|
|
4839
|
+
[key: string]: unknown;
|
|
4840
|
+
};
|
|
4841
|
+
/**
|
|
4842
|
+
* Full unhydrated template definition (layout with placeholders). Present only
|
|
4843
|
+
* for template message echoes, alongside `message`.
|
|
4844
|
+
*/
|
|
4845
|
+
template?: Record<string, unknown>;
|
|
4846
|
+
/** Full flow definition. Present only for flow message echoes, alongside `message`. */
|
|
4847
|
+
flow?: StandbyMessageEchoFlow;
|
|
4848
|
+
}
|
|
4849
|
+
/**
|
|
4850
|
+
* The standby event payload nested under `value.standby`. Contains exactly one of
|
|
4851
|
+
* `messages`, `message_echoes`, or `statuses` (with `contacts` alongside `messages`).
|
|
4852
|
+
*/
|
|
4853
|
+
interface StandbyEvent {
|
|
4854
|
+
/** Contact profiles for the users in an inbound standby message event */
|
|
4855
|
+
contacts?: WebhookContact[];
|
|
4856
|
+
/** Inbound messages received while your app is not the active handler */
|
|
4857
|
+
messages?: WhatsAppMessage[];
|
|
4858
|
+
/** Echoes of outbound messages sent by the active handler (e.g. Meta Business Agent) */
|
|
4859
|
+
message_echoes?: StandbyMessageEcho[];
|
|
4860
|
+
/** Delivery/read status updates for messages sent by the active handler */
|
|
4861
|
+
statuses?: StatusWebhook[];
|
|
4862
|
+
}
|
|
4587
4863
|
interface StandbyValue {
|
|
4588
4864
|
messaging_product: 'whatsapp';
|
|
4589
|
-
|
|
4865
|
+
metadata: WebhookMetadata;
|
|
4866
|
+
/** The standby event payload; carries exactly one event array */
|
|
4867
|
+
standby: StandbyEvent;
|
|
4590
4868
|
}
|
|
4591
4869
|
interface StandbyWebhookValue {
|
|
4592
4870
|
field: 'standby';
|
|
4593
4871
|
value: StandbyValue;
|
|
4594
4872
|
}
|
|
4595
4873
|
interface UserPreferenceEntry {
|
|
4596
|
-
/** WhatsApp ID of the user */
|
|
4597
|
-
wa_id
|
|
4598
|
-
/**
|
|
4599
|
-
|
|
4874
|
+
/** WhatsApp ID of the user. May be absent when only BSUIDs are shared. */
|
|
4875
|
+
wa_id?: string;
|
|
4876
|
+
/**
|
|
4877
|
+
* Business-scoped user ID the preference applies to (e.g. "US.1234567").
|
|
4878
|
+
* The preference is always scoped to this ID.
|
|
4879
|
+
*/
|
|
4880
|
+
user_id?: string;
|
|
4881
|
+
/**
|
|
4882
|
+
* Parent business-scoped user ID of the user, when the user is enrolled in a
|
|
4883
|
+
* parent BSUID. Informational only — preferences are never applied at the
|
|
4884
|
+
* parent BSUID level.
|
|
4885
|
+
*/
|
|
4886
|
+
parent_user_id?: string;
|
|
4600
4887
|
/** Human-readable description of the preference change */
|
|
4601
4888
|
detail: string;
|
|
4602
4889
|
/**
|
|
@@ -4606,9 +4893,9 @@ interface UserPreferenceEntry {
|
|
|
4606
4893
|
category: 'marketing_messages' | string;
|
|
4607
4894
|
/**
|
|
4608
4895
|
* New preference value.
|
|
4609
|
-
* Known
|
|
4896
|
+
* Known values: "stop" (user opted out), "resume" (user opted back in)
|
|
4610
4897
|
*/
|
|
4611
|
-
value: 'stop' | string;
|
|
4898
|
+
value: 'stop' | 'resume' | string;
|
|
4612
4899
|
/** Unix timestamp of when the preference was changed */
|
|
4613
4900
|
timestamp: number;
|
|
4614
4901
|
/** Signup ID associated with the preference, if applicable */
|
|
@@ -4619,10 +4906,12 @@ interface UserPreferencesContact {
|
|
|
4619
4906
|
/** Display name of the user */name: string; /** WhatsApp username, if available */
|
|
4620
4907
|
username?: string;
|
|
4621
4908
|
};
|
|
4622
|
-
/** WhatsApp ID of the user */
|
|
4623
|
-
wa_id
|
|
4624
|
-
/**
|
|
4909
|
+
/** WhatsApp ID of the user. May be absent when only BSUIDs are shared. */
|
|
4910
|
+
wa_id?: string;
|
|
4911
|
+
/** Business-scoped user ID of the user */
|
|
4625
4912
|
user_id?: string;
|
|
4913
|
+
/** Parent business-scoped user ID of the user, when enrolled */
|
|
4914
|
+
parent_user_id?: string;
|
|
4626
4915
|
}
|
|
4627
4916
|
interface UserPreferencesValue {
|
|
4628
4917
|
messaging_product: 'whatsapp';
|
|
@@ -4735,48 +5024,6 @@ interface SecurityWebhookValue {
|
|
|
4735
5024
|
value: SecurityValue;
|
|
4736
5025
|
}
|
|
4737
5026
|
//#endregion
|
|
4738
|
-
//#region src/core/webhook/types/status.d.ts
|
|
4739
|
-
interface StatusWebhook {
|
|
4740
|
-
id: string;
|
|
4741
|
-
status: 'sent' | 'delivered' | 'read' | 'failed';
|
|
4742
|
-
timestamp: string;
|
|
4743
|
-
recipient_id: string;
|
|
4744
|
-
recipient_type?: 'group';
|
|
4745
|
-
recipient_participant_id?: string;
|
|
4746
|
-
recipient_identity_key_hash?: string;
|
|
4747
|
-
biz_opaque_callback_data?: string;
|
|
4748
|
-
/**
|
|
4749
|
-
* ID of the template used to send a Direct Send message.
|
|
4750
|
-
* Present only on statuses for messages sent with a `category` field.
|
|
4751
|
-
*
|
|
4752
|
-
* @see {@link https://developers.facebook.com/documentation/business-messaging/whatsapp/direct-send/supported-message-types | Direct Send}
|
|
4753
|
-
*/
|
|
4754
|
-
template_id?: string;
|
|
4755
|
-
conversation?: {
|
|
4756
|
-
id: string;
|
|
4757
|
-
expiration_timestamp?: string;
|
|
4758
|
-
origin: {
|
|
4759
|
-
type: 'authentication' | 'authentication_international' | 'marketing' | 'marketing_lite' | 'referral_conversion' | 'service' | 'utility';
|
|
4760
|
-
};
|
|
4761
|
-
};
|
|
4762
|
-
pricing?: {
|
|
4763
|
-
billable: boolean;
|
|
4764
|
-
pricing_model: 'CBP' | 'PMP';
|
|
4765
|
-
type: 'regular' | 'free_customer_service' | 'free_entry_point';
|
|
4766
|
-
category: 'authentication' | 'authentication_international' | 'marketing' | 'marketing_lite' | 'referral_conversion' | 'service' | 'utility';
|
|
4767
|
-
};
|
|
4768
|
-
errors?: Array<WebhookError>;
|
|
4769
|
-
}
|
|
4770
|
-
/**
|
|
4771
|
-
* Message status enum
|
|
4772
|
-
*/
|
|
4773
|
-
declare enum MessageStatus {
|
|
4774
|
-
DELIVERED = "delivered",
|
|
4775
|
-
READ = "read",
|
|
4776
|
-
SENT = "sent",
|
|
4777
|
-
FAILED = "failed"
|
|
4778
|
-
}
|
|
4779
|
-
//#endregion
|
|
4780
5027
|
//#region src/core/webhook/types/template.d.ts
|
|
4781
5028
|
/**
|
|
4782
5029
|
* Message template status events
|
|
@@ -5006,13 +5253,13 @@ type MetaErrorData = {
|
|
|
5006
5253
|
interface MetaError extends Error {
|
|
5007
5254
|
error: MetaErrorData;
|
|
5008
5255
|
}
|
|
5009
|
-
declare const WHATSAPP_ERROR_CODES: readonly [0, 1, 2, 3, 4, 10, 33, 100, 190, 200, 299, 368, 613, 80007, 130429, 130472, 130497, 131000, 131005, 131008, 131009, 131016, 131020, 131021, 131026, 131030, 131031, 131037, 131041, 131042, 131044, 131045, 131047, 131048, 131049, 131050, 131051, 131052, 131053, 131055, 131056, 131057, 131059, 131201, 131202, 131203, 131204, 131207, 131208, 131209, 131210, 131211, 131212, 131213, 131214, 131215, 132000, 132001, 132005, 132007, 132008, 132012, 132015, 132016, 132068, 132069, 133000, 133004, 133005, 133006, 133008, 133009, 133010, 133015, 133016, 134011, 134100, 134101, 134102, 135000, 137000, 138000, 138001, 138002, 138003, 138004, 138005, 138006, 138007, 138009, 138012, 138013, 138018, 139000, 139001, 139002, 139003, 139004, 139100, 139101, 139102, 139103, 147005, 200005, 200006, 200007, 1752041, 2388001, 2388012, 2388019, 2388040, 2388047, 2388072, 2388073, 2388091, 2388093, 2388103, 2388293, 2388299, 2494100, 2593079, 2593085, 2593107, 2593108];
|
|
5256
|
+
declare const WHATSAPP_ERROR_CODES: readonly [0, 1, 2, 3, 4, 10, 33, 100, 190, 200, 299, 368, 613, 80007, 130429, 130472, 130497, 131000, 131005, 131008, 131009, 131016, 131020, 131021, 131026, 131030, 131031, 131037, 131041, 131042, 131044, 131045, 131047, 131048, 131049, 131050, 131051, 131052, 131053, 131055, 131056, 131057, 131059, 131061, 131062, 131201, 131202, 131203, 131204, 131207, 131208, 131209, 131210, 131211, 131212, 131213, 131214, 131215, 132000, 132001, 132005, 132007, 132008, 132012, 132015, 132016, 132068, 132069, 133000, 133004, 133005, 133006, 133008, 133009, 133010, 133015, 133016, 134011, 134100, 134101, 134102, 135000, 137000, 138000, 138001, 138002, 138003, 138004, 138005, 138006, 138007, 138009, 138012, 138013, 138018, 139000, 139001, 139002, 139003, 139004, 139100, 139101, 139102, 139103, 147005, 200005, 200006, 200007, 1752041, 2388001, 2388012, 2388019, 2388040, 2388047, 2388072, 2388073, 2388091, 2388093, 2388103, 2388293, 2388299, 2494100, 2593079, 2593085, 2593107, 2593108];
|
|
5010
5257
|
type ApiPermissionErrorCode = number;
|
|
5011
5258
|
type WhatsAppErrorCode = (typeof WHATSAPP_ERROR_CODES)[number] | ApiPermissionErrorCode;
|
|
5012
5259
|
declare const AUTHORIZATION_ERROR_CODES: readonly [0, 3, 10, 190];
|
|
5013
5260
|
declare const THROTTLING_ERROR_CODES: readonly [4, 80007, 130429, 131048, 131056];
|
|
5014
5261
|
declare const INTEGRITY_ERROR_CODES: readonly [368, 130497, 131031];
|
|
5015
|
-
declare const SEND_MESSAGE_ERROR_CODES: readonly [130472, 131000, 131005, 131008, 131009, 131016, 131021, 131026, 131030, 131042, 131044, 131045, 131047, 131050, 131051, 131052, 131053, 131056, 131057, 131048, 132000, 132001, 132005, 132007, 132008, 132012, 132015, 132016, 132068, 132069, 135000, 137000];
|
|
5262
|
+
declare const SEND_MESSAGE_ERROR_CODES: readonly [130472, 131000, 131005, 131008, 131009, 131016, 131021, 131026, 131030, 131042, 131044, 131045, 131047, 131050, 131051, 131052, 131053, 131056, 131057, 131048, 131061, 131062, 132000, 132001, 132005, 132007, 132008, 132012, 132015, 132016, 132068, 132069, 135000, 137000];
|
|
5016
5263
|
declare const FLOW_ERROR_CODES: readonly [139000, 139001, 139002, 139003, 139004];
|
|
5017
5264
|
declare const BLOCK_USER_ERROR_CODES: readonly [139100, 139101, 139102, 139103];
|
|
5018
5265
|
declare const CALLING_ERROR_CODES: readonly [138000, 138001, 138002, 138003, 138004, 138005, 138006, 138007, 138009, 138012, 138013, 138018, 613];
|
|
@@ -5272,8 +5519,11 @@ declare const WebhookTypes: {
|
|
|
5272
5519
|
};
|
|
5273
5520
|
type WebhookTypesType = (typeof WebhookTypes)[keyof typeof WebhookTypes];
|
|
5274
5521
|
declare const SystemChangeTypes: {
|
|
5275
|
-
readonly CustomerChangedNumber: "customer_changed_number";
|
|
5522
|
+
/** @deprecated Meta renamed this to `user_changed_number`. Use `UserChangedNumber`. */readonly CustomerChangedNumber: "customer_changed_number"; /** @deprecated Meta renamed this to `user_identity_changed`. Use `UserIdentityChanged`. */
|
|
5276
5523
|
readonly CustomerIdentityChanged: "customer_identity_changed";
|
|
5524
|
+
readonly UserChangedNumber: "user_changed_number";
|
|
5525
|
+
readonly UserIdentityChanged: "user_identity_changed"; /** The user's business-scoped user ID (BSUID) changed. */
|
|
5526
|
+
readonly UserChangedUserId: "user_changed_user_id";
|
|
5277
5527
|
};
|
|
5278
5528
|
type SystemChangeTypesType = (typeof SystemChangeTypes)[keyof typeof SystemChangeTypes];
|
|
5279
5529
|
declare const ReferralSourceTypes: {
|
|
@@ -6307,11 +6557,16 @@ declare class MarketingMessagesApi extends BaseAPI implements MarketingMessagesC
|
|
|
6307
6557
|
/**
|
|
6308
6558
|
* Send a marketing template message to a WhatsApp user.
|
|
6309
6559
|
*
|
|
6560
|
+
* Address the user either by phone number (`to`) or by business-scoped user ID
|
|
6561
|
+
* (`recipient`). Exactly one of the two is required.
|
|
6562
|
+
*
|
|
6310
6563
|
* @param params - The marketing message request parameters.
|
|
6311
6564
|
* @param params.to - The recipient's WhatsApp phone number.
|
|
6565
|
+
* @param params.recipient - The recipient's BSUID or parent BSUID, used instead of `to`.
|
|
6312
6566
|
* @param params.template - The template configuration (name, language, components).
|
|
6313
6567
|
* @param params.message_activity_sharing - Optional flag to enable message activity sharing.
|
|
6314
6568
|
* @param params.product_policy - Optional product policy for marketing messages.
|
|
6569
|
+
* @param params.bid_spec - Optional send-time multiplier applied to the template's max price.
|
|
6315
6570
|
* @returns The messages response with message ID and status.
|
|
6316
6571
|
* @see https://developers.facebook.com/documentation/business-messaging/whatsapp/marketing-messages/send-marketing-messages/
|
|
6317
6572
|
*/
|
|
@@ -7989,6 +8244,12 @@ declare class TemplateApi extends BaseAPI implements TemplateClass {
|
|
|
7989
8244
|
* an approved template will resubmit it for review, changing its status back
|
|
7990
8245
|
* to `PENDING`.
|
|
7991
8246
|
*
|
|
8247
|
+
* Marketing templates also accept `optimization_spec` here. As of
|
|
8248
|
+
* August 31, 2026, an eligible template can be switched between standard rate
|
|
8249
|
+
* card pricing and max price without creating a new template, and an existing
|
|
8250
|
+
* max price can be updated in place. Approved templates allow up to 100 edits
|
|
8251
|
+
* per hour and 2,400 per day.
|
|
8252
|
+
*
|
|
7992
8253
|
* **Endpoint:** `POST /{TEMPLATE_ID}`
|
|
7993
8254
|
*
|
|
7994
8255
|
* @param templateId - The unique identifier of the template to update
|
|
@@ -7996,12 +8257,18 @@ declare class TemplateApi extends BaseAPI implements TemplateClass {
|
|
|
7996
8257
|
* @returns A promise resolving to a success response (`{ success: true }`)
|
|
7997
8258
|
*
|
|
7998
8259
|
* @see {@link https://developers.facebook.com/docs/whatsapp/cloud-api/reference/message-templates | Message Templates Reference}
|
|
8260
|
+
* @see {@link https://developers.facebook.com/documentation/business-messaging/whatsapp/marketing-messages/pricing | Max price for marketing messages}
|
|
7999
8261
|
*
|
|
8000
8262
|
* @example
|
|
8001
8263
|
* ```ts
|
|
8002
8264
|
* await client.template.updateTemplate('template_id_123', {
|
|
8003
8265
|
* components: [{ type: 'BODY', text: 'Updated greeting: Hello {{1}}!' }],
|
|
8004
8266
|
* });
|
|
8267
|
+
*
|
|
8268
|
+
* // Switch an eligible marketing template onto max price (or change the cap).
|
|
8269
|
+
* await client.template.updateTemplate('template_id_123', {
|
|
8270
|
+
* optimization_spec: { bid_strategy: 'LOWEST_COST_WITH_BID_CAP', bid_amount: 25000 },
|
|
8271
|
+
* });
|
|
8005
8272
|
* ```
|
|
8006
8273
|
*/
|
|
8007
8274
|
updateTemplate(templateId: string, template: Partial<TemplateRequestBody>): Promise<ResponseSuccess>;
|
|
@@ -8326,6 +8593,7 @@ declare class WhatsApp {
|
|
|
8326
8593
|
business: BusinessApi;
|
|
8327
8594
|
calling: CallingApi;
|
|
8328
8595
|
commerce: CommerceApi;
|
|
8596
|
+
contactBook: ContactBookApi;
|
|
8329
8597
|
groups: GroupsApi;
|
|
8330
8598
|
marketingMessages: MarketingMessagesApi;
|
|
8331
8599
|
messageHistory: MessageHistoryApi;
|
|
@@ -9301,5 +9569,5 @@ declare function isFlowErrorRequest(request: FlowEndpointRequest): request is Fl
|
|
|
9301
9569
|
*/
|
|
9302
9570
|
declare function isFlowPingRequest(request: FlowEndpointRequest): request is FlowHealthCheckRequest;
|
|
9303
9571
|
//#endregion
|
|
9304
|
-
export { AUTHORIZATION_ERROR_CODES, type AcceptCallRequest, AcceptSolutionRequest, AccountMode, AddPhoneNumbersRequest, type ApiPermissionErrorCode, AssignedUserRequest, AssignedUsersListParams, type AudioMediaObject, AudioMediaTypes, AudioMediaTypesEnum, AudioMediaTypesType, type AudioMessage, type AudioMessageHandler, type AudioProcessedMessage, type AuthenticationTemplateOptions, BLOCK_USER_ERROR_CODES, type BaseApiRequest, type BaseApiResponse, type BaseClass, BlockUserObject, BlockUsersApi, BlockUsersClass, BlockUsersRequest, BlockUsersResponse, BlockedUserInfo, type BodyOptions, BusinessApi, BusinessClass, BusinessComplianceInfoResponse, BusinessFieldsParam, BusinessGraphListResponse, BusinessGraphObject, BusinessListParams, BusinessProfileApi, type BusinessProfileClass, type BusinessProfileData, type BusinessProfileField, type BusinessProfileFieldsParam, type BusinessProfileResponse, BusinessVerticalEnum, type ButtonMessage, type ButtonMessageHandler, type ButtonOptions, ButtonPosition, ButtonPositionEnum, ButtonPositionType, type ButtonProcessedMessage, CALLING_ERROR_CODES, type CallAction, type CallActionResponse, type CallAnnouncementLanguage, type CallCaptureStatus, type CallHours, type CallHoursDay, type CallHoursStatus, type CallIconVisibility, type CallPermission, type CallPermissionAction, type CallPermissionLimit, type CallPermissionsResponse, type CallRecordingConfig, type CallSdpType, type CallSession, type CallTranscriptionConfig, type CallbackPermissionStatus, CallingApi, type CallingClass, type CallingSettings, type CallingSettingsResponse, type CallingStatus, CarouselCard, type CarouselOptions, CatalogButton, type CatalogTemplateOptions, Category, CategoryEnum, CategoryType, CodeVerificationStatus, CommerceApi, type CommerceClass, type CommerceSetting, type CommerceSettingsResponse, ComponentType, ComponentTypeType, ComponentTypes, ComponentTypesEnum, type ContactInfo, type ContactObject, type ContactsMessage, type ContactsMessageHandler, type ContactsProcessedMessage, ConversationTypes, ConversationTypesEnum, ConversationTypesType, ConversationalAutomationRequest, ConversationalAutomationResponse, ConversationalCommand, ConversationalPrompt, CopyCodeButton, type CouponTemplateOptions, type CreateFlowResponse, CreateOBOMobilityIntentRequest, CreatePhoneNumberRequest, CreatePhoneNumberResponse, type CreateQrCodeRequest, CreateScheduleRequest, type CreateUploadSessionParams, CreateWhatsAppBusinessSolutionRequest, CurrencyCodesEnum, type CurrencyParameter, CursorPaginationParams, Cursors, DataLocalizationRegion, DataLocalizationRegionEnum, DataLocalizationRegionType, type DateTimeParameter, type DirectSendCategory, type DirectSendConfig, type DirectSendOptions, type DocumentMediaObject, DocumentMediaTypes, DocumentMediaTypesEnum, DocumentMediaTypesType, type DocumentMessage, type DocumentMessageHandler, type DocumentProcessedMessage, type EncryptedMessageRequest, type EncryptedMessagesResponse, EncryptionApi, type EncryptionClass, type EncryptionKeyPair, type EncryptionPublicKeyResponse, type ErrorWebhookValue, type ExpressRequest, type ExpressResponse, type ExpressWebhookConfig, FLOW_ERROR_CODES, FailedUserInfo, type Flow, FlowActionEnum, FlowApi, type FlowAsset, type FlowAssetsResponse, FlowButton, FlowCategoryEnum, type FlowClass, type FlowDataExchangeRequest, type FlowDataExchangeResponse, type FlowDecryptedRequestResponse, type FlowEncryptedRequestPayload, type FlowEndpointRequest, type FlowEndpointResponse, type FlowErrorNotificationRequest, type FlowErrorNotificationResponse, type FlowHandler, type FlowHealthCheckRequest, type FlowHealthCheckResponse, type FlowHttpRequest, type FlowMigrationFailure, type FlowMigrationResponse, type FlowMigrationResult, type FlowPreview, type FlowPreviewResponse, FlowStatusEnum, type FlowSuccessScreenResponse, type FlowType, FlowTypeEnum, type FlowValidationError, type FlowValidationErrorPointer, type FlowsListResponse, type FooterOptions, GROUP_ERROR_CODES, type GeneralHeaderInterface, type GeneralMessageBody, type GeneralRequestBody, type GetUploadHandleParams, GraphObject, type GroupCreateRequest, type GroupCreateResponse, type GroupInfoField, type GroupInfoFieldsParam, type GroupInfoResponse, type GroupInviteLinkResponse, type GroupJoinApprovalMode, type GroupJoinRequest, type GroupJoinRequestError, type GroupJoinRequestFailure, type GroupJoinRequestsActionResponse, type GroupJoinRequestsResponse, type GroupListParams, type GroupListResponse, type GroupMessage, type GroupParticipant, type GroupParticipantInput, type GroupParticipantsRequest, type GroupSettingsResponse, GroupsApi, type GroupsClass, type HeaderOptions, HealthStatus, HealthStatusEntity, type HolidaySchedule, HostPlatform, HttpMethods, HttpMethodsEnum, HttpMethodsType, type HttpsClientClass, type HttpsClientResponseClass, INTEGRITY_ERROR_CODES, type ImageMediaObject, ImageMediaTypes, ImageMediaTypesEnum, ImageMediaTypesType, type ImageMessage, type ImageMessageHandler, type ImageProcessedMessage, type InitiateCallRequest, type InitiateCallResponse, type InteractiveButtonReplyMessage, type InteractiveListReplyMessage, type InteractiveMessage, type InteractiveMessageHandler, type InteractiveObject, type InteractiveProcessedMessage, type InteractiveReply, InteractiveTypes, InteractiveTypesEnum, InteractiveTypesType, Languages, LanguagesEnum, LanguagesType, type LimitedTimeOfferOptions, type LimitedTimeOfferTemplateOptions, ListBlockedUsersParams, ListBlockedUsersResponse, type LocationInfo, type LocationMessage, type LocationMessageHandler, type LocationObject, type LocationParameter, type LocationProcessedMessage, Logger, type LoggerInterface, MPMButton, type MPMTemplateOptions, type MarketingMessageRequest, MarketingMessagesApi, type MarketingMessagesClass, MediaApi, type MediaCardCarouselTemplateOptions, MediaCarouselCard, MediaClass, type MediaInfo, type MediaParameter, MediaResponse, MediasResponse, MessagesApi as MessageApi, MessagesApi, MessageCategory, MessageCategoryEnum, MessageCategoryType, type MessageHandler, MessageHistoryApi, MessageHistoryClass, MessageHistoryEventListParams, MessageHistoryFieldsParam, MessageHistoryItem, MessageHistoryListParams, MessageHistoryResponse, type MessageRecipientType, type MessageRequestBody, type MessageRequestParams, type MessageStatus, MessageTemplateObject, MessageTemplateRequestBody, MessageTypes, MessageTypesEnum, MessageTypesType, type MessageWebhookValue, type MessagesClass, type MessagesResponse, MessagingLimitTier, type MetaError, type MetaErrorData, type MetaErrorDetail, type NextFunction, type NextJsAppWebhookConfig, type NextJsWebhookConfig, OTPButton, type OTPTemplateOptions, OfficialBusinessAccountAction, OfficialBusinessAccountApplicationData, OfficialBusinessAccountStatusResponse, OnboardPartnersToMMLiteRequest, type OrderInfo, type OrderMessage, type OrderMessageHandler, type OrderProcessedMessage, type Pagination, type PaginationCursors, type Paging, PagingCursors, PagingInfo, ParametersTypes, ParametersTypesEnum, ParametersTypesType, type PaymentConfiguration, type PaymentConfigurationCode, type PaymentConfigurationCreateRequest, type PaymentConfigurationCreateResponse, type PaymentConfigurationDeleteRequest, type PaymentConfigurationOauthLinkRequest, type PaymentConfigurationOauthLinkResponse, type PaymentConfigurationProvider, type PaymentConfigurationStatus, type PaymentConfigurationUpdateRequest, type PaymentConfigurationUpdateResponse, type PaymentConfigurationsResponse, PaymentsApi, type PaymentsClass, PhoneNumberApi, PhoneNumberButton, PhoneNumberClass, PhoneNumberField, PhoneNumberFieldsParam, PhoneNumberFilter, PhoneNumberResponse, PhoneNumberSettingsFieldsParam, PhoneNumberSettingsParams, PhoneNumberSettingsResponse, PhoneNumberSort, PhoneNumberStatus, PhoneNumbersListParams, PhoneNumbersResponse, PlatformType, type PreAcceptCallRequest, type ProcessedMessage, type ProcessedStatus, type ProductCardCarouselTemplateOptions, ProductCarouselCard, type ProductParameter, type ProductSection, QrCodeApi, type QrCodeClass, type QrCodeResponse, type QrCodesResponse, QualityRating, QualityScore, QuickReplyButton, type ReactionInfo, type ReactionMessage, type ReactionMessageHandler, type ReactionParams, type ReactionProcessedMessage, ReferralSourceTypes, ReferralSourceTypesEnum, ReferralSourceTypesType, RegistrationApi, type RegistrationClass, type RegistrationRequest, type RejectCallRequest, RejectSolutionRequest, RemoveAssignedUserRequest, RequestCodeMethods, RequestCodeMethodsEnum, RequestCodeMethodsType, RequestPreVerifiedPhoneNumberCodeRequest, RequestVerificationCodeRequest, type RequesterClass, type RequesterResponseInterface, type ResponseData, type ResponseHeaderValue, type ResponseHeaders, type ResponseJSONBody, type ResponsePagination, type ResponseSuccess, SEND_MESSAGE_ERROR_CODES, SPMButton, type SPMTemplateOptions, SetOBOMobilityIntentRequest, SetSolutionMigrationIntentRequest, SharePreVerifiedPhoneNumberRequest, type SipServer, type SipSettings, type SipStatus, SolutionDeactivationRequest, SolutionFieldsParam, SolutionGraphObject, SolutionListParams, SolutionListResponse, SolutionMigrationIntent, SolutionsApi, SolutionsClass, Status, StatusEnum, type StatusHandler, type StatusParams, type StatusResponse, StatusType, type StatusWebhook, type StatusWebhookValue, type StickerMediaObject, StickerMediaTypes, StickerMediaTypesEnum, StickerMediaTypesType, type StickerMessage, type StickerMessageHandler, type StickerProcessedMessage, SubType, SubTypeEnum, SubTypeType, SystemChangeTypes, SystemChangeTypesEnum, SystemChangeTypesType, type SystemMessage, type SystemMessageHandler, type SystemProcessedMessage, THROTTLING_ERROR_CODES, TemplateApi, TemplateBody, TemplateButton, TemplateButtons, TemplateCarousel, TemplateClass, TemplateDeleteParams, TemplateFooter, TemplateFormat, TemplateGetParams, TemplateHeader, TemplateHeaderExample, TemplateLimitedTimeOffer, type TemplateOptions, type TemplateParameter, TemplateRequestBody, TemplateResponse, TemplateStatus, TemplateStatusEnum, TemplateStatusType, type TerminateCallRequest, type TextMessage, type TextMessageHandler, type TextMessageParams, type TextObject, type TextParameter, type TextProcessedMessage, Throughput, ThroughputLevel, ThroughputResponse, TwoStepVerificationApi, type TwoStepVerificationClass, TwoStepVerificationParams, type TwoStepVerificationRequest, URLButton, UnblockUsersRequest, UnifiedCertStatus, type UnsupportedMessage, UpdateBusinessComplianceInfoRequest, type UpdateBusinessProfileRequest, type UpdateCallingSettingsRequest, type UpdateCommerceSettingsRequest, type UpdateFlowResponse, type UpdateGroupSettingsRequest, UpdateOfficialBusinessAccountStatusRequest, UpdatePhoneNumberSettingsRequest, UpdatePhoneNumberStatusRequest, type UpdateQrCodeRequest, UpdateUsernameRequest, UpdateWabaAccountRequest, UpdateWabaSubscription, UpdateWhatsAppBusinessProfileRequest, type UploadBusinessProfileResponse, type UploadHandle, type UploadMediaParams, UploadMediaResponse, type UploadSession, type UploadSessionResponse, UsernameResponse, UsernameStatus, UsernameSuggestionsResponse, UsernameTransferAction, type ValidateFlowJsonResponse, VerifyCodeRequest, VerifyPreVerifiedPhoneNumberCodeRequest, type VideoMediaObject, VideoMediaTypes, VideoMediaTypesEnum, VideoMediaTypesType, type VideoMessage, type VideoMessageHandler, type VideoProcessedMessage, WABAClass, WHATSAPP_ERROR_CODES, WabaAccount, WabaAccountFields, WabaAccountFieldsParam, WabaAccountReviewStatus, WabaAccountStatus, WabaApi, WabaBusinessVerificationStatus, WabaConfigEnum, type WabaConfigType, WabaFieldsParam, WabaGraphObject, WabaHealthStatus, WabaHealthStatusCanSendMessage, WabaHealthStatusEntity, WabaHealthStatusError, WabaListParams, WabaListResponse, WabaSubscription, WabaSubscriptions, type WebhookContact, type WebhookEvent, type WebhookHandlerContext, type WebhookMessage, type WebhookPayload, WebhookProcessor, type WebhookResponse, WebhookTypes, WebhookTypesEnum, WebhookTypesType, type WebhookValue, type WeeklyOperatingHours, WhatsApp, WhatsAppApiError, WhatsAppAuthorizationError, WhatsAppBlockUserError, WhatsAppCallingError, type WhatsAppConfig, WhatsAppError, type WhatsAppErrorCode, WhatsAppFlowError, WhatsAppGroupError, WhatsAppIntegrityError, type WhatsAppMessage, WhatsAppNetworkError, WhatsAppSendMessageError, WhatsAppThrottlingError, WhatsAppUnknownError, WhatsAppValidationError, buildFieldsQueryString, constructFullUrl, createAuthenticationTemplate, createCatalogTemplate, createCouponTemplate, createLimitedTimeOfferTemplate, createMPMTemplate, createMediaCardCarouselTemplate, createOTPTemplate, createProductCardCarouselTemplate, createSPMTemplate, createTemplate, createWhatsAppApiError, decryptFlowRequest, encryptFlowResponse, expressWebhookHandler, extractMessageText, formatConfigTable, generateEncryption, generateXHub256Sig, getContactsInfo, getInteractiveReply, getLocationInfo, getMediaInfo, getOrderInfo, getReactionInfo, isApiPermissionErrorCode, isAudioMessage, isAuthorizationErrorCode, isBlockUserErrorCode, isButtonMessage, isButtonReply, isCallingErrorCode, isContactsMessage, isDocumentMessage, isFlowDataExchangeRequest, isFlowErrorCode, isFlowErrorRequest, isFlowPingRequest, isGroupErrorCode, isImageMessage, isIntegrityErrorCode, isInteractiveMessage, isListReply, isLocationMessage, isMetaError, isNfmReply, isOrderMessage, isReactionMessage, isSendMessageErrorCode, isStickerMessage, isSystemMessage, isTextMessage, isThrottlingErrorCode, isVideoMessage, isWhatsAppApiErrorResponse, isWhatsAppAuthorizationError, isWhatsAppBlockUserError, isWhatsAppCallingError, isWhatsAppErrorCode, isWhatsAppFlowError, isWhatsAppGroupError, isWhatsAppIntegrityError, isWhatsAppSendMessageError, isWhatsAppThrottlingError, nextjsAppWebhookHandler, nextjsPagesWebhookHandler, normalizeMetaError, objectToQueryString, processFlowRequest, processWebhookMessages };
|
|
9572
|
+
export { AUTHORIZATION_ERROR_CODES, type AcceptCallRequest, AcceptSolutionRequest, AccountMode, AddPhoneNumbersRequest, type ApiPermissionErrorCode, AssignedUserRequest, AssignedUsersListParams, type AudioMediaObject, AudioMediaTypes, AudioMediaTypesEnum, AudioMediaTypesType, type AudioMessage, type AudioMessageHandler, type AudioProcessedMessage, type AuthenticationTemplateOptions, BLOCK_USER_ERROR_CODES, type BaseApiRequest, type BaseApiResponse, type BaseClass, BlockUserObject, BlockUsersApi, BlockUsersClass, BlockUsersRequest, BlockUsersResponse, BlockedUserInfo, type BodyOptions, BusinessApi, BusinessClass, BusinessComplianceInfoResponse, BusinessFieldsParam, BusinessGraphListResponse, BusinessGraphObject, BusinessListParams, BusinessProfileApi, type BusinessProfileClass, type BusinessProfileData, type BusinessProfileField, type BusinessProfileFieldsParam, type BusinessProfileResponse, BusinessVerticalEnum, type ButtonMessage, type ButtonMessageHandler, type ButtonOptions, ButtonPosition, ButtonPositionEnum, ButtonPositionType, type ButtonProcessedMessage, CALLING_ERROR_CODES, type CallAction, type CallActionResponse, type CallAnnouncementLanguage, type CallCaptureStatus, type CallHours, type CallHoursDay, type CallHoursStatus, type CallIconVisibility, type CallPermission, type CallPermissionAction, type CallPermissionLimit, type CallPermissionsResponse, type CallRecordingConfig, type CallSdpType, type CallSession, type CallTranscriptionConfig, type CallbackPermissionStatus, CallingApi, type CallingClass, type CallingSettings, type CallingSettingsResponse, type CallingStatus, CarouselCard, type CarouselOptions, CatalogButton, type CatalogTemplateOptions, Category, CategoryEnum, CategoryType, CodeVerificationStatus, CommerceApi, type CommerceClass, type CommerceSetting, type CommerceSettingsResponse, ComponentType, ComponentTypeType, ComponentTypes, ComponentTypesEnum, ContactBookApi, ContactBookClass, type ContactInfo, type ContactObject, type ContactsMessage, type ContactsMessageHandler, type ContactsProcessedMessage, ConversationTypes, ConversationTypesEnum, ConversationTypesType, ConversationalAutomationRequest, ConversationalAutomationResponse, ConversationalCommand, ConversationalPrompt, CopyCodeButton, type CouponTemplateOptions, type CreateFlowResponse, CreateOBOMobilityIntentRequest, CreatePhoneNumberRequest, CreatePhoneNumberResponse, type CreateQrCodeRequest, CreateScheduleRequest, type CreateUploadSessionParams, CreateWhatsAppBusinessSolutionRequest, CurrencyCodesEnum, type CurrencyParameter, CursorPaginationParams, Cursors, DataLocalizationRegion, DataLocalizationRegionEnum, DataLocalizationRegionType, type DateTimeParameter, DeleteContactBookEntryParams, DeleteContactBookEntryResponse, type DirectSendCategory, type DirectSendConfig, type DirectSendOptions, type DocumentMediaObject, DocumentMediaTypes, DocumentMediaTypesEnum, DocumentMediaTypesType, type DocumentMessage, type DocumentMessageHandler, type DocumentProcessedMessage, type EncryptedMessageRequest, type EncryptedMessagesResponse, EncryptionApi, type EncryptionClass, type EncryptionKeyPair, type EncryptionPublicKeyResponse, type ErrorWebhookValue, type ExpressRequest, type ExpressResponse, type ExpressWebhookConfig, FLOW_ERROR_CODES, FailedUserInfo, type Flow, FlowActionEnum, FlowApi, type FlowAsset, type FlowAssetsResponse, FlowButton, FlowCategoryEnum, type FlowClass, type FlowDataExchangeRequest, type FlowDataExchangeResponse, type FlowDecryptedRequestResponse, type FlowEncryptedRequestPayload, type FlowEndpointRequest, type FlowEndpointResponse, type FlowErrorNotificationRequest, type FlowErrorNotificationResponse, type FlowHandler, type FlowHealthCheckRequest, type FlowHealthCheckResponse, type FlowHttpRequest, type FlowMigrationFailure, type FlowMigrationResponse, type FlowMigrationResult, type FlowPreview, type FlowPreviewResponse, FlowStatusEnum, type FlowSuccessScreenResponse, type FlowType, FlowTypeEnum, type FlowValidationError, type FlowValidationErrorPointer, type FlowsListResponse, type FooterOptions, GROUP_ERROR_CODES, type GeneralHeaderInterface, type GeneralMessageBody, type GeneralRequestBody, type GetUploadHandleParams, GraphObject, type GroupCreateRequest, type GroupCreateResponse, type GroupInfoField, type GroupInfoFieldsParam, type GroupInfoResponse, type GroupInviteLinkResponse, type GroupJoinApprovalMode, type GroupJoinRequest, type GroupJoinRequestError, type GroupJoinRequestFailure, type GroupJoinRequestsActionResponse, type GroupJoinRequestsResponse, type GroupListParams, type GroupListResponse, type GroupMessage, type GroupParticipant, type GroupParticipantInput, type GroupParticipantsRequest, type GroupSettingsResponse, GroupsApi, type GroupsClass, type HeaderOptions, HealthStatus, HealthStatusEntity, type HolidaySchedule, HostPlatform, HttpMethods, HttpMethodsEnum, HttpMethodsType, type HttpsClientClass, type HttpsClientResponseClass, INTEGRITY_ERROR_CODES, type ImageMediaObject, ImageMediaTypes, ImageMediaTypesEnum, ImageMediaTypesType, type ImageMessage, type ImageMessageHandler, type ImageProcessedMessage, type InitiateCallRequest, type InitiateCallResponse, type InteractiveButtonReplyMessage, type InteractiveListReplyMessage, type InteractiveMessage, type InteractiveMessageHandler, type InteractiveObject, type InteractiveProcessedMessage, type InteractiveReply, InteractiveTypes, InteractiveTypesEnum, InteractiveTypesType, Languages, LanguagesEnum, LanguagesType, type LimitedTimeOfferOptions, type LimitedTimeOfferTemplateOptions, ListBlockedUsersParams, ListBlockedUsersResponse, type LocationInfo, type LocationMessage, type LocationMessageHandler, type LocationObject, type LocationParameter, type LocationProcessedMessage, Logger, type LoggerInterface, MPMButton, type MPMTemplateOptions, type MarketingMessageBidSpec, type MarketingMessageRequest, MarketingMessagesApi, type MarketingMessagesClass, MediaApi, type MediaCardCarouselTemplateOptions, MediaCarouselCard, MediaClass, type MediaInfo, type MediaParameter, MediaResponse, MediasResponse, MessagesApi as MessageApi, MessagesApi, MessageCategory, MessageCategoryEnum, MessageCategoryType, type MessageHandler, MessageHistoryApi, MessageHistoryClass, MessageHistoryEventListParams, MessageHistoryFieldsParam, MessageHistoryItem, MessageHistoryListParams, MessageHistoryResponse, type MessageRecipientType, type MessageRequestBody, type MessageRequestParams, type MessageStatus, MessageTemplateObject, MessageTemplateRequestBody, MessageTypes, MessageTypesEnum, MessageTypesType, type MessageWebhookValue, type MessagesClass, type MessagesResponse, MessagingLimitTier, type MetaError, type MetaErrorData, type MetaErrorDetail, type NextFunction, type NextJsAppWebhookConfig, type NextJsWebhookConfig, OTPButton, type OTPTemplateOptions, OfficialBusinessAccountAction, OfficialBusinessAccountApplicationData, OfficialBusinessAccountStatusResponse, OnboardPartnersToMMLiteRequest, type OrderInfo, type OrderMessage, type OrderMessageHandler, type OrderProcessedMessage, type Pagination, type PaginationCursors, type Paging, PagingCursors, PagingInfo, ParametersTypes, ParametersTypesEnum, ParametersTypesType, type PaymentConfiguration, type PaymentConfigurationCode, type PaymentConfigurationCreateRequest, type PaymentConfigurationCreateResponse, type PaymentConfigurationDeleteRequest, type PaymentConfigurationOauthLinkRequest, type PaymentConfigurationOauthLinkResponse, type PaymentConfigurationProvider, type PaymentConfigurationStatus, type PaymentConfigurationUpdateRequest, type PaymentConfigurationUpdateResponse, type PaymentConfigurationsResponse, PaymentsApi, type PaymentsClass, PhoneNumberApi, PhoneNumberButton, PhoneNumberClass, PhoneNumberField, PhoneNumberFieldsParam, PhoneNumberFilter, PhoneNumberResponse, PhoneNumberSettingsFieldsParam, PhoneNumberSettingsParams, PhoneNumberSettingsResponse, PhoneNumberSort, PhoneNumberStatus, PhoneNumbersListParams, PhoneNumbersResponse, PlatformType, type PreAcceptCallRequest, type ProcessedMessage, type ProcessedStatus, type ProductCardCarouselTemplateOptions, ProductCarouselCard, type ProductParameter, type ProductSection, QrCodeApi, type QrCodeClass, type QrCodeResponse, type QrCodesResponse, QualityRating, QualityScore, QuickReplyButton, type ReactionInfo, type ReactionMessage, type ReactionMessageHandler, type ReactionParams, type ReactionProcessedMessage, ReferralSourceTypes, ReferralSourceTypesEnum, ReferralSourceTypesType, RegistrationApi, type RegistrationClass, type RegistrationRequest, type RejectCallRequest, RejectSolutionRequest, RemoveAssignedUserRequest, RequestCodeMethods, RequestCodeMethodsEnum, RequestCodeMethodsType, RequestPreVerifiedPhoneNumberCodeRequest, RequestVerificationCodeRequest, type RequesterClass, type RequesterResponseInterface, type ResponseData, type ResponseHeaderValue, type ResponseHeaders, type ResponseJSONBody, type ResponsePagination, type ResponseSuccess, SEND_MESSAGE_ERROR_CODES, SPMButton, type SPMTemplateOptions, SetOBOMobilityIntentRequest, SetSolutionMigrationIntentRequest, SharePreVerifiedPhoneNumberRequest, type SipServer, type SipSettings, type SipStatus, SolutionDeactivationRequest, SolutionFieldsParam, SolutionGraphObject, SolutionListParams, SolutionListResponse, SolutionMigrationIntent, SolutionsApi, SolutionsClass, Status, StatusEnum, type StatusHandler, type StatusParams, type StatusResponse, StatusType, type StatusWebhook, type StatusWebhookValue, type StickerMediaObject, StickerMediaTypes, StickerMediaTypesEnum, StickerMediaTypesType, type StickerMessage, type StickerMessageHandler, type StickerProcessedMessage, SubType, SubTypeEnum, SubTypeType, SystemChangeTypes, SystemChangeTypesEnum, SystemChangeTypesType, type SystemMessage, type SystemMessageHandler, type SystemProcessedMessage, THROTTLING_ERROR_CODES, TemplateApi, TemplateBidSpec, TemplateBody, TemplateButton, TemplateButtons, TemplateCarousel, TemplateClass, TemplateDeleteParams, TemplateFooter, TemplateFormat, TemplateGetParams, TemplateHeader, TemplateHeaderExample, TemplateLimitedTimeOffer, TemplateOptimizationSpec, type TemplateOptions, type TemplateParameter, TemplateRequestBody, TemplateResponse, TemplateStatus, TemplateStatusEnum, TemplateStatusType, type TerminateCallRequest, type TextMessage, type TextMessageHandler, type TextMessageParams, type TextObject, type TextParameter, type TextProcessedMessage, Throughput, ThroughputLevel, ThroughputResponse, TwoStepVerificationApi, type TwoStepVerificationClass, TwoStepVerificationParams, type TwoStepVerificationRequest, URLButton, UnblockUsersRequest, UnifiedCertStatus, type UnsupportedMessage, UpdateBusinessComplianceInfoRequest, type UpdateBusinessProfileRequest, type UpdateCallingSettingsRequest, type UpdateCommerceSettingsRequest, type UpdateFlowResponse, type UpdateGroupSettingsRequest, UpdateOfficialBusinessAccountStatusRequest, UpdatePhoneNumberSettingsRequest, UpdatePhoneNumberStatusRequest, type UpdateQrCodeRequest, UpdateUsernameRequest, UpdateWabaAccountRequest, UpdateWabaSubscription, UpdateWhatsAppBusinessProfileRequest, type UploadBusinessProfileResponse, type UploadHandle, type UploadMediaParams, UploadMediaResponse, type UploadSession, type UploadSessionResponse, UsernameResponse, UsernameStatus, UsernameSuggestionsResponse, UsernameTransferAction, type ValidateFlowJsonResponse, VerifyCodeRequest, VerifyPreVerifiedPhoneNumberCodeRequest, type VideoMediaObject, VideoMediaTypes, VideoMediaTypesEnum, VideoMediaTypesType, type VideoMessage, type VideoMessageHandler, type VideoProcessedMessage, WABAClass, WHATSAPP_ERROR_CODES, WabaAccount, WabaAccountFields, WabaAccountFieldsParam, WabaAccountReviewStatus, WabaAccountStatus, WabaApi, WabaBusinessVerificationStatus, WabaConfigEnum, type WabaConfigType, WabaFieldsParam, WabaGraphObject, WabaHealthStatus, WabaHealthStatusCanSendMessage, WabaHealthStatusEntity, WabaHealthStatusError, WabaListParams, WabaListResponse, WabaSubscription, WabaSubscriptions, type WebhookContact, type WebhookEvent, type WebhookHandlerContext, type WebhookMessage, type WebhookPayload, WebhookProcessor, type WebhookResponse, WebhookTypes, WebhookTypesEnum, WebhookTypesType, type WebhookValue, type WeeklyOperatingHours, WhatsApp, WhatsAppApiError, WhatsAppAuthorizationError, WhatsAppBlockUserError, WhatsAppCallingError, type WhatsAppConfig, WhatsAppError, type WhatsAppErrorCode, WhatsAppFlowError, WhatsAppGroupError, WhatsAppIntegrityError, type WhatsAppMessage, WhatsAppNetworkError, WhatsAppSendMessageError, WhatsAppThrottlingError, WhatsAppUnknownError, WhatsAppValidationError, buildFieldsQueryString, constructFullUrl, createAuthenticationTemplate, createCatalogTemplate, createCouponTemplate, createLimitedTimeOfferTemplate, createMPMTemplate, createMediaCardCarouselTemplate, createOTPTemplate, createProductCardCarouselTemplate, createSPMTemplate, createTemplate, createWhatsAppApiError, decryptFlowRequest, encryptFlowResponse, expressWebhookHandler, extractMessageText, formatConfigTable, generateEncryption, generateXHub256Sig, getContactsInfo, getInteractiveReply, getLocationInfo, getMediaInfo, getOrderInfo, getReactionInfo, isApiPermissionErrorCode, isAudioMessage, isAuthorizationErrorCode, isBlockUserErrorCode, isButtonMessage, isButtonReply, isCallingErrorCode, isContactsMessage, isDocumentMessage, isFlowDataExchangeRequest, isFlowErrorCode, isFlowErrorRequest, isFlowPingRequest, isGroupErrorCode, isImageMessage, isIntegrityErrorCode, isInteractiveMessage, isListReply, isLocationMessage, isMetaError, isNfmReply, isOrderMessage, isReactionMessage, isSendMessageErrorCode, isStickerMessage, isSystemMessage, isTextMessage, isThrottlingErrorCode, isVideoMessage, isWhatsAppApiErrorResponse, isWhatsAppAuthorizationError, isWhatsAppBlockUserError, isWhatsAppCallingError, isWhatsAppErrorCode, isWhatsAppFlowError, isWhatsAppGroupError, isWhatsAppIntegrityError, isWhatsAppSendMessageError, isWhatsAppThrottlingError, nextjsAppWebhookHandler, nextjsPagesWebhookHandler, normalizeMetaError, objectToQueryString, processFlowRequest, processWebhookMessages };
|
|
9305
9573
|
//# sourceMappingURL=index.d.mts.map
|