meta-cloud-api 2.1.0 → 2.3.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 +96 -59
- package/dist/index.d.ts +1028 -31
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/types/enums.d.ts.map +1 -1
- package/dist/types/enums.js.map +1 -1
- package/dist/types/index.d.ts +700 -23
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +16 -17
package/dist/index.d.ts
CHANGED
|
@@ -1467,7 +1467,7 @@ interface TextMessageParams extends MessageRequestParams<TextObject | string> {
|
|
|
1467
1467
|
//#region src/api/messages/types/template.d.ts
|
|
1468
1468
|
type LanguageObject = {
|
|
1469
1469
|
policy: 'deterministic';
|
|
1470
|
-
code: LanguagesEnum;
|
|
1470
|
+
code: LanguagesEnum | (string & {});
|
|
1471
1471
|
};
|
|
1472
1472
|
type ParametersObject<T extends ParametersTypesEnum> = {
|
|
1473
1473
|
type: T;
|
|
@@ -1680,28 +1680,28 @@ type HeaderObject = {
|
|
|
1680
1680
|
video?: VideoMediaObject$1;
|
|
1681
1681
|
};
|
|
1682
1682
|
type ButtonInteractiveObject = {
|
|
1683
|
-
type: InteractiveTypesEnum.Button;
|
|
1683
|
+
type: InteractiveTypesEnum.Button | 'button';
|
|
1684
1684
|
body: SimpleTextObject;
|
|
1685
1685
|
footer?: SimpleTextObject;
|
|
1686
1686
|
header?: HeaderObject;
|
|
1687
1687
|
action: ActionObject;
|
|
1688
1688
|
};
|
|
1689
1689
|
type ListInteractiveObject = {
|
|
1690
|
-
type: InteractiveTypesEnum.List;
|
|
1690
|
+
type: InteractiveTypesEnum.List | 'list';
|
|
1691
1691
|
body: SimpleTextObject;
|
|
1692
1692
|
footer?: SimpleTextObject;
|
|
1693
1693
|
header?: HeaderObject;
|
|
1694
1694
|
action: ActionObject;
|
|
1695
1695
|
};
|
|
1696
1696
|
type ProductInteractiveObject = {
|
|
1697
|
-
type: InteractiveTypesEnum.Product;
|
|
1697
|
+
type: InteractiveTypesEnum.Product | 'product';
|
|
1698
1698
|
body?: SimpleTextObject;
|
|
1699
1699
|
footer?: SimpleTextObject;
|
|
1700
1700
|
header?: HeaderObject;
|
|
1701
1701
|
action: ActionObject;
|
|
1702
1702
|
};
|
|
1703
1703
|
type ProductListInteractiveObject = {
|
|
1704
|
-
type: InteractiveTypesEnum.ProductList;
|
|
1704
|
+
type: InteractiveTypesEnum.ProductList | 'product_list';
|
|
1705
1705
|
body: SimpleTextObject;
|
|
1706
1706
|
footer?: SimpleTextObject;
|
|
1707
1707
|
header: HeaderObject;
|
|
@@ -1716,7 +1716,7 @@ type CtaUrlActionObject = {
|
|
|
1716
1716
|
parameters: CtaUrlParameters;
|
|
1717
1717
|
};
|
|
1718
1718
|
type CtaUrlInteractiveObject = {
|
|
1719
|
-
type: InteractiveTypesEnum.CtaUrl;
|
|
1719
|
+
type: InteractiveTypesEnum.CtaUrl | 'cta_url';
|
|
1720
1720
|
body?: SimpleTextObject;
|
|
1721
1721
|
footer?: SimpleTextObject;
|
|
1722
1722
|
header?: HeaderObject;
|
|
@@ -1726,7 +1726,7 @@ type LocationRequestActionObject = {
|
|
|
1726
1726
|
name: 'send_location';
|
|
1727
1727
|
};
|
|
1728
1728
|
type LocationRequestInteractiveObject = {
|
|
1729
|
-
type: InteractiveTypesEnum.LocationRequest;
|
|
1729
|
+
type: InteractiveTypesEnum.LocationRequest | 'location_request_message';
|
|
1730
1730
|
body: SimpleTextObject;
|
|
1731
1731
|
footer?: SimpleTextObject;
|
|
1732
1732
|
header?: HeaderObject;
|
|
@@ -1761,7 +1761,7 @@ type AddressMessageActionObject = {
|
|
|
1761
1761
|
parameters: AddressMessageParameters;
|
|
1762
1762
|
};
|
|
1763
1763
|
type AddressMessageInteractiveObject = {
|
|
1764
|
-
type: InteractiveTypesEnum.AddressMessage;
|
|
1764
|
+
type: InteractiveTypesEnum.AddressMessage | 'address_message';
|
|
1765
1765
|
body: SimpleTextObject;
|
|
1766
1766
|
footer?: SimpleTextObject;
|
|
1767
1767
|
header?: HeaderObject;
|
|
@@ -1773,8 +1773,8 @@ type FlowParameters = {
|
|
|
1773
1773
|
flow_name?: string;
|
|
1774
1774
|
flow_cta: string;
|
|
1775
1775
|
mode?: 'draft' | 'published';
|
|
1776
|
-
flow_token
|
|
1777
|
-
flow_action
|
|
1776
|
+
flow_token?: string;
|
|
1777
|
+
flow_action?: 'navigate' | 'data_exchange';
|
|
1778
1778
|
flow_action_payload?: {
|
|
1779
1779
|
screen?: string;
|
|
1780
1780
|
data?: Record<string, string>;
|
|
@@ -1785,7 +1785,7 @@ type FlowActionObject = {
|
|
|
1785
1785
|
parameters: FlowParameters;
|
|
1786
1786
|
};
|
|
1787
1787
|
type FlowInteractiveObject = {
|
|
1788
|
-
type: InteractiveTypesEnum.Flow;
|
|
1788
|
+
type: InteractiveTypesEnum.Flow | 'flow';
|
|
1789
1789
|
body: SimpleTextObject;
|
|
1790
1790
|
footer?: SimpleTextObject;
|
|
1791
1791
|
header?: HeaderObject;
|
|
@@ -1831,7 +1831,7 @@ type CarouselActionObject = {
|
|
|
1831
1831
|
cards: Array<MediaCarouselCard$1 | ProductCarouselCard$1>;
|
|
1832
1832
|
};
|
|
1833
1833
|
type CarouselInteractiveObject = {
|
|
1834
|
-
type: InteractiveTypesEnum.Carousel;
|
|
1834
|
+
type: InteractiveTypesEnum.Carousel | 'carousel';
|
|
1835
1835
|
body: SimpleTextObject;
|
|
1836
1836
|
action: CarouselActionObject;
|
|
1837
1837
|
};
|
|
@@ -1890,7 +1890,7 @@ declare class MessagesClass extends BaseClass {
|
|
|
1890
1890
|
image(params: MessageRequestParams<ImageMediaObject>): Promise<MessagesResponse>;
|
|
1891
1891
|
video(params: MessageRequestParams<VideoMediaObject>): Promise<MessagesResponse>;
|
|
1892
1892
|
sticker(params: MessageRequestParams<StickerMediaObject>): Promise<MessagesResponse>;
|
|
1893
|
-
contacts(params: MessageRequestParams<[
|
|
1893
|
+
contacts(params: MessageRequestParams<ContactObject[]>): Promise<MessagesResponse>;
|
|
1894
1894
|
location(params: MessageRequestParams<LocationObject>): Promise<MessagesResponse>;
|
|
1895
1895
|
interactive(params: MessageRequestParams<InteractiveObject>): Promise<MessagesResponse>;
|
|
1896
1896
|
interactiveList(params: MessageRequestParams<InteractiveObject & {
|
|
@@ -2534,7 +2534,7 @@ type TemplateGetParams = {
|
|
|
2534
2534
|
status?: TemplateStatusEnum;
|
|
2535
2535
|
};
|
|
2536
2536
|
type TemplateDeleteParams = {
|
|
2537
|
-
hsm_id
|
|
2537
|
+
hsm_id?: string;
|
|
2538
2538
|
name: string;
|
|
2539
2539
|
};
|
|
2540
2540
|
declare class TemplateClass {
|
|
@@ -2881,43 +2881,135 @@ interface WABAClass {
|
|
|
2881
2881
|
//#endregion
|
|
2882
2882
|
//#region src/core/webhook/types/account.d.ts
|
|
2883
2883
|
/**
|
|
2884
|
-
*
|
|
2885
|
-
* @see https://developers.facebook.com/
|
|
2884
|
+
* WABA event types for account_update webhook.
|
|
2885
|
+
* @see https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/account_update
|
|
2886
2886
|
*/
|
|
2887
|
-
type AccountUpdateEvent = '
|
|
2887
|
+
type AccountUpdateEvent = 'ACCOUNT_DELETED' | 'ACCOUNT_OFFBOARDED' | 'ACCOUNT_RECONNECTED' | 'ACCOUNT_RESTRICTION' | 'ACCOUNT_VIOLATION' | 'AD_ACCOUNT_LINKED' | 'AUTH_INTL_PRICE_ELIGIBILITY_UPDATE' | 'BUSINESS_PRIMARY_LOCATION_COUNTRY_UPDATE' | 'DISABLED_UPDATE' | 'MM_LITE_TERMS_SIGNED' | 'PARTNER_ADDED' | 'PARTNER_APP_INSTALLED' | 'PARTNER_APP_UNINSTALLED' | 'PARTNER_CLIENT_CERTIFICATION_STATUS_UPDATE' | 'PARTNER_REMOVED' | 'VERIFIED_ACCOUNT' | 'VOLUME_BASED_PRICING_TIER_UPDATE';
|
|
2888
2888
|
/**
|
|
2889
|
-
* WABA ban state
|
|
2890
|
-
* @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#value--ban_info
|
|
2889
|
+
* WABA ban state — present on DISABLED_UPDATE events.
|
|
2891
2890
|
*/
|
|
2892
2891
|
type WabaBanState = 'SCHEDULE_FOR_DISABLE' | 'DISABLE' | 'REINSTATE';
|
|
2893
2892
|
/**
|
|
2894
|
-
* Restriction types imposed on WABA
|
|
2895
|
-
* @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#value--restriction_info
|
|
2893
|
+
* Restriction types imposed on WABA — present on ACCOUNT_RESTRICTION events.
|
|
2896
2894
|
*/
|
|
2897
2895
|
type RestrictionType = 'RESTRICTION_ADD_PHONE_NUMBER_ACTION' | 'RESTRICTED_BIZ_INITIATED_MESSAGING' | 'RESTRICTED_CUSTOMER_INITIATED_MESSAGING';
|
|
2896
|
+
/**
|
|
2897
|
+
* Reason for the disconnection — present on PARTNER_REMOVED events where
|
|
2898
|
+
* the business used both WhatsApp Business app and Cloud API.
|
|
2899
|
+
*/
|
|
2900
|
+
type DisconnectionReason = 'ACCOUNT_DISCONNECTED' | 'BUSINESS_DOWNGRADE' | 'CHANGE_NUMBER' | 'COMPANION_INACTIVITY' | 'PRIMARY_INACTIVITY' | 'USER_RE_REGISTERED';
|
|
2901
|
+
/**
|
|
2902
|
+
* Who initiated the disconnection — present on PARTNER_REMOVED events.
|
|
2903
|
+
*/
|
|
2904
|
+
type DisconnectionInitiatedBy = 'SYSTEM' | 'USER';
|
|
2905
|
+
/**
|
|
2906
|
+
* Status of the partner-led business verification submission.
|
|
2907
|
+
*/
|
|
2908
|
+
type PartnerClientCertificationStatus = 'APPROVED' | 'REJECTED' | 'DISCARDED';
|
|
2909
|
+
/** Present on DISABLED_UPDATE events */
|
|
2898
2910
|
interface AccountUpdateBanInfo {
|
|
2899
2911
|
waba_ban_state: WabaBanState;
|
|
2900
|
-
|
|
2912
|
+
/** Unix timestamp of the ban date */
|
|
2913
|
+
waba_ban_date?: string;
|
|
2901
2914
|
}
|
|
2915
|
+
/** Present on ACCOUNT_VIOLATION events */
|
|
2902
2916
|
interface AccountUpdateViolationInfo {
|
|
2903
2917
|
violation_type: string;
|
|
2904
2918
|
}
|
|
2919
|
+
/** Present on ACCOUNT_RESTRICTION events */
|
|
2905
2920
|
interface AccountUpdateRestrictionInfo {
|
|
2906
2921
|
restriction_type: RestrictionType;
|
|
2922
|
+
/** Unix timestamp when the restriction expires */
|
|
2907
2923
|
expiration?: number;
|
|
2924
|
+
/** Steps the business can take to remediate the restriction */
|
|
2925
|
+
remediation?: string;
|
|
2908
2926
|
}
|
|
2927
|
+
/**
|
|
2928
|
+
* Present on PARTNER_ADDED, PARTNER_APP_INSTALLED, PARTNER_APP_UNINSTALLED,
|
|
2929
|
+
* PARTNER_REMOVED, AD_ACCOUNT_LINKED, and MM_LITE_TERMS_SIGNED events.
|
|
2930
|
+
*/
|
|
2909
2931
|
interface AccountUpdateWabaInfo {
|
|
2932
|
+
/** Customer or own WABA ID */
|
|
2910
2933
|
waba_id: string;
|
|
2934
|
+
/** Business portfolio ID */
|
|
2911
2935
|
owner_business_id: string;
|
|
2936
|
+
/** Partner app ID — present on PARTNER_APP_INSTALLED / PARTNER_APP_UNINSTALLED */
|
|
2912
2937
|
partner_app_id?: string;
|
|
2938
|
+
/** Ad account ID — present on AD_ACCOUNT_LINKED */
|
|
2939
|
+
ad_account_linked?: string;
|
|
2940
|
+
/** Solution ID — present when customer onboarded via multi-partner solution */
|
|
2941
|
+
solution_id?: string;
|
|
2942
|
+
/** Partner business portfolio IDs — present for multi-partner solutions */
|
|
2943
|
+
solution_partner_business_ids?: string[];
|
|
2944
|
+
}
|
|
2945
|
+
/** Present on AUTH_INTL_PRICE_ELIGIBILITY_UPDATE events */
|
|
2946
|
+
interface AuthInternationalRateEligibility {
|
|
2947
|
+
/** Unix timestamp when authentication-international rates become effective */
|
|
2948
|
+
start_time: number;
|
|
2949
|
+
/** Countries with different start times */
|
|
2950
|
+
exception_countries?: Array<{
|
|
2951
|
+
/** ISO 3166-1 alpha-2 country code */
|
|
2952
|
+
country_code: string;
|
|
2953
|
+
/** Unix timestamp for this country's start time */
|
|
2954
|
+
start_time: number;
|
|
2955
|
+
}>;
|
|
2956
|
+
}
|
|
2957
|
+
/** Present on VOLUME_BASED_PRICING_TIER_UPDATE events */
|
|
2958
|
+
interface VolumeTierInfo {
|
|
2959
|
+
/** Unix timestamp of the tier update */
|
|
2960
|
+
tier_update_time: number;
|
|
2961
|
+
/** Pricing category (e.g. "UTILITY") */
|
|
2962
|
+
pricing_category: string;
|
|
2963
|
+
/** Pricing tier identifier */
|
|
2964
|
+
tier: string;
|
|
2965
|
+
/** Effective month in YYYY-MM format (e.g. "2025-11") */
|
|
2966
|
+
effective_month: string;
|
|
2967
|
+
/** Region for the tier update (e.g. "India") */
|
|
2968
|
+
region: string;
|
|
2969
|
+
}
|
|
2970
|
+
/** Present on PARTNER_REMOVED events where disconnection_info is applicable */
|
|
2971
|
+
interface DisconnectionInfo {
|
|
2972
|
+
reason: DisconnectionReason;
|
|
2973
|
+
initiated_by: DisconnectionInitiatedBy;
|
|
2974
|
+
}
|
|
2975
|
+
/** Present on PARTNER_CLIENT_CERTIFICATION_STATUS_UPDATE events */
|
|
2976
|
+
interface PartnerClientCertificationInfo {
|
|
2977
|
+
/** Customer's business portfolio ID */
|
|
2978
|
+
client_business_id: string;
|
|
2979
|
+
/** Status of the verification submission */
|
|
2980
|
+
status: PartnerClientCertificationStatus;
|
|
2981
|
+
/** Rejection reasons — present when status is REJECTED */
|
|
2982
|
+
rejection_reasons?: string[];
|
|
2913
2983
|
}
|
|
2914
2984
|
interface AccountUpdateValue {
|
|
2985
|
+
/** Phone number associated with the WABA, if applicable */
|
|
2915
2986
|
phone_number?: string;
|
|
2987
|
+
/**
|
|
2988
|
+
* Event type describing what changed.
|
|
2989
|
+
* @see AccountUpdateEvent
|
|
2990
|
+
*/
|
|
2916
2991
|
event: AccountUpdateEvent;
|
|
2992
|
+
/**
|
|
2993
|
+
* ISO 3166-1 alpha-2 country code.
|
|
2994
|
+
* Only included for BUSINESS_PRIMARY_LOCATION_COUNTRY_UPDATE events.
|
|
2995
|
+
*/
|
|
2996
|
+
country?: string;
|
|
2997
|
+
/** Present on DISABLED_UPDATE events */
|
|
2917
2998
|
ban_info?: AccountUpdateBanInfo;
|
|
2999
|
+
/** Present on ACCOUNT_VIOLATION events */
|
|
2918
3000
|
violation_info?: AccountUpdateViolationInfo;
|
|
3001
|
+
/** Present on ACCOUNT_RESTRICTION events */
|
|
2919
3002
|
restriction_info?: AccountUpdateRestrictionInfo[];
|
|
3003
|
+
/** Present on partner-related and AD_ACCOUNT_LINKED events */
|
|
2920
3004
|
waba_info?: AccountUpdateWabaInfo;
|
|
3005
|
+
/** Present on AUTH_INTL_PRICE_ELIGIBILITY_UPDATE events */
|
|
3006
|
+
auth_international_rate_eligibility?: AuthInternationalRateEligibility;
|
|
3007
|
+
/** Present on VOLUME_BASED_PRICING_TIER_UPDATE events */
|
|
3008
|
+
volume_tier_info?: VolumeTierInfo;
|
|
3009
|
+
/** Present on PARTNER_REMOVED events where business used WhatsApp Business app + Cloud API */
|
|
3010
|
+
disconnection_info?: DisconnectionInfo;
|
|
3011
|
+
/** Present on PARTNER_CLIENT_CERTIFICATION_STATUS_UPDATE events */
|
|
3012
|
+
partner_client_certification_info?: PartnerClientCertificationInfo;
|
|
2921
3013
|
}
|
|
2922
3014
|
interface AccountUpdateWebhookValue {
|
|
2923
3015
|
field: 'account_update';
|
|
@@ -2967,6 +3059,44 @@ interface AccountAlertsWebhookValue {
|
|
|
2967
3059
|
field: 'account_alerts';
|
|
2968
3060
|
value: AccountAlertsValue;
|
|
2969
3061
|
}
|
|
3062
|
+
interface AccountSettingsCallingConfig {
|
|
3063
|
+
/** Whether calling is enabled for this phone number */
|
|
3064
|
+
status: 'ENABLED' | 'DISABLED' | string;
|
|
3065
|
+
/** Visibility of the call icon in WhatsApp */
|
|
3066
|
+
call_icon_visibility?: string;
|
|
3067
|
+
/** Status of callback permission */
|
|
3068
|
+
callback_permission_status?: 'ENABLED' | 'DISABLED' | string;
|
|
3069
|
+
/** Call hours configuration */
|
|
3070
|
+
call_hours?: {
|
|
3071
|
+
status: 'ENABLED' | 'DISABLED' | string;
|
|
3072
|
+
};
|
|
3073
|
+
/** SIP (Session Initiation Protocol) configuration */
|
|
3074
|
+
sip?: {
|
|
3075
|
+
status: 'ENABLED' | 'DISABLED' | string;
|
|
3076
|
+
};
|
|
3077
|
+
}
|
|
3078
|
+
interface AccountSettingsPhoneNumberSettings {
|
|
3079
|
+
/** The phone number ID these settings apply to */
|
|
3080
|
+
phone_number_id: string;
|
|
3081
|
+
/** Calling feature configuration */
|
|
3082
|
+
calling?: AccountSettingsCallingConfig;
|
|
3083
|
+
}
|
|
3084
|
+
interface AccountSettingsUpdateValue {
|
|
3085
|
+
messaging_product: 'whatsapp';
|
|
3086
|
+
/** Unix timestamp of the settings change */
|
|
3087
|
+
timestamp: string;
|
|
3088
|
+
/**
|
|
3089
|
+
* Type of settings that changed.
|
|
3090
|
+
* Known value: "phone_number_settings"
|
|
3091
|
+
*/
|
|
3092
|
+
type: 'phone_number_settings' | string;
|
|
3093
|
+
/** Present when type is "phone_number_settings" */
|
|
3094
|
+
phone_number_settings?: AccountSettingsPhoneNumberSettings;
|
|
3095
|
+
}
|
|
3096
|
+
interface AccountSettingsUpdateWebhookValue {
|
|
3097
|
+
field: 'account_settings_update';
|
|
3098
|
+
value: AccountSettingsUpdateValue;
|
|
3099
|
+
}
|
|
2970
3100
|
//#endregion
|
|
2971
3101
|
//#region src/core/webhook/types/common.d.ts
|
|
2972
3102
|
/**
|
|
@@ -3094,6 +3224,121 @@ interface BusinessCapabilityUpdateWebhookValue {
|
|
|
3094
3224
|
field: 'business_capability_update';
|
|
3095
3225
|
value: BusinessCapabilityUpdateValue;
|
|
3096
3226
|
}
|
|
3227
|
+
type BusinessStatusUpdateEvent = 'ACCOUNT_DELETED' | 'ACCOUNT_RESTRICTION' | 'ACCOUNT_VIOLATION' | 'DISABLED_UPDATE' | string;
|
|
3228
|
+
interface BusinessStatusUpdateValue {
|
|
3229
|
+
/** Event type describing the status change */
|
|
3230
|
+
event: BusinessStatusUpdateEvent;
|
|
3231
|
+
[key: string]: unknown;
|
|
3232
|
+
}
|
|
3233
|
+
interface BusinessStatusUpdateWebhookValue {
|
|
3234
|
+
field: 'business_status_update';
|
|
3235
|
+
value: BusinessStatusUpdateValue;
|
|
3236
|
+
}
|
|
3237
|
+
//#endregion
|
|
3238
|
+
//#region src/core/webhook/types/calls.d.ts
|
|
3239
|
+
/**
|
|
3240
|
+
* Lifecycle event type for a call.
|
|
3241
|
+
*
|
|
3242
|
+
* - "connect" — Call initiated; for consumer-initiated calls, respond with action=accept
|
|
3243
|
+
* - "call_status" — Business-initiated call started ringing or was accepted (business-initiated only)
|
|
3244
|
+
* - "media_update" — Consumer-side media event; apply the new SDP to your peer connection (business-initiated only)
|
|
3245
|
+
* - "terminate" — Call ended for any reason
|
|
3246
|
+
*/
|
|
3247
|
+
type CallEventType = 'connect' | 'call_status' | 'media_update' | 'terminate';
|
|
3248
|
+
/**
|
|
3249
|
+
* Direction of the call.
|
|
3250
|
+
*
|
|
3251
|
+
* - "business_initiated" — The business placed the call
|
|
3252
|
+
* - "user_initiated" — The user placed the call
|
|
3253
|
+
*/
|
|
3254
|
+
type CallDirection = 'business_initiated' | 'user_initiated';
|
|
3255
|
+
/**
|
|
3256
|
+
* Status for business-initiated calls (call_status event).
|
|
3257
|
+
*
|
|
3258
|
+
* - "ringing" — The outgoing call is ringing on the consumer's device
|
|
3259
|
+
* - "accepted" — The consumer accepted the call
|
|
3260
|
+
*/
|
|
3261
|
+
type CallStatusValue = 'ringing' | 'accepted';
|
|
3262
|
+
/**
|
|
3263
|
+
* Final call outcome (terminate event).
|
|
3264
|
+
*
|
|
3265
|
+
* - "Completed" — Call finished normally (includes calls rejected by either party)
|
|
3266
|
+
* - "Failed" — Call failed mid-connection
|
|
3267
|
+
*/
|
|
3268
|
+
type CallTerminateStatus = 'Completed' | 'Failed';
|
|
3269
|
+
interface CallSdpRenegotiation {
|
|
3270
|
+
/** SDP type — always "offer" for incoming media_update events */
|
|
3271
|
+
sdp_type: 'offer';
|
|
3272
|
+
/** SDP data compliant with RFC 4566 */
|
|
3273
|
+
sdp: string;
|
|
3274
|
+
}
|
|
3275
|
+
interface CallSession$1 {
|
|
3276
|
+
/**
|
|
3277
|
+
* Incremented each time Meta provides new SDP.
|
|
3278
|
+
* If multiple media_update webhooks arrive, apply the one with the highest version.
|
|
3279
|
+
*/
|
|
3280
|
+
version: number;
|
|
3281
|
+
/** Contains the SDP offer from Meta; generate an answer and apply to your peer connection */
|
|
3282
|
+
sdp_renegotiation: CallSdpRenegotiation;
|
|
3283
|
+
}
|
|
3284
|
+
interface CallEntry {
|
|
3285
|
+
/** Unique ID for the call — use in accept / reject / terminate API calls */
|
|
3286
|
+
id: string;
|
|
3287
|
+
/**
|
|
3288
|
+
* Lifecycle event type.
|
|
3289
|
+
* @see CallEventType
|
|
3290
|
+
*/
|
|
3291
|
+
event: CallEventType;
|
|
3292
|
+
/** Unix timestamp */
|
|
3293
|
+
timestamp: number;
|
|
3294
|
+
/** Callee of the call (Page ID) — present on connect */
|
|
3295
|
+
to?: string;
|
|
3296
|
+
/** Caller of the call (PSID) — present on connect */
|
|
3297
|
+
from?: string;
|
|
3298
|
+
/** Whether the call was business- or user-initiated — present on connect */
|
|
3299
|
+
call_direction?: CallDirection;
|
|
3300
|
+
/** PSID of the consumer — present on call_status */
|
|
3301
|
+
recipient_id?: string;
|
|
3302
|
+
/** Ringing or accepted — present on call_status */
|
|
3303
|
+
call_status?: CallStatusValue;
|
|
3304
|
+
/** SDP session information; apply the offer to your local peer connection — present on media_update */
|
|
3305
|
+
session?: CallSession$1;
|
|
3306
|
+
/** Final status of the call — present on terminate */
|
|
3307
|
+
status?: CallTerminateStatus;
|
|
3308
|
+
/** When the call started (Unix timestamp) — present on terminate */
|
|
3309
|
+
start_time?: number;
|
|
3310
|
+
/** When the call ended (Unix timestamp) — present on terminate */
|
|
3311
|
+
end_time?: number;
|
|
3312
|
+
/**
|
|
3313
|
+
* Call duration in seconds, counted from when the business connects.
|
|
3314
|
+
* Empty if the business did not successfully connect.
|
|
3315
|
+
* Present on terminate.
|
|
3316
|
+
*/
|
|
3317
|
+
duration?: number;
|
|
3318
|
+
}
|
|
3319
|
+
interface CallContact {
|
|
3320
|
+
profile: {
|
|
3321
|
+
/** Display name of the caller */
|
|
3322
|
+
name: string;
|
|
3323
|
+
};
|
|
3324
|
+
/** WhatsApp ID of the caller */
|
|
3325
|
+
wa_id: string;
|
|
3326
|
+
}
|
|
3327
|
+
interface CallsValue {
|
|
3328
|
+
messaging_product: 'whatsapp';
|
|
3329
|
+
metadata: {
|
|
3330
|
+
display_phone_number: string;
|
|
3331
|
+
phone_number_id: string;
|
|
3332
|
+
};
|
|
3333
|
+
/** Array of call lifecycle events */
|
|
3334
|
+
calls: CallEntry[];
|
|
3335
|
+
/** Contact profile information for the caller */
|
|
3336
|
+
contacts?: CallContact[];
|
|
3337
|
+
}
|
|
3338
|
+
interface CallsWebhookValue {
|
|
3339
|
+
field: 'calls';
|
|
3340
|
+
value: CallsValue;
|
|
3341
|
+
}
|
|
3097
3342
|
//#endregion
|
|
3098
3343
|
//#region src/core/webhook/types/flows.d.ts
|
|
3099
3344
|
/**
|
|
@@ -3143,6 +3388,165 @@ interface FlowsWebhookValue {
|
|
|
3143
3388
|
value: FlowsValue;
|
|
3144
3389
|
}
|
|
3145
3390
|
//#endregion
|
|
3391
|
+
//#region src/core/webhook/types/groups.d.ts
|
|
3392
|
+
interface GroupWebhookError {
|
|
3393
|
+
/** Error code */
|
|
3394
|
+
code: string;
|
|
3395
|
+
/** Human-readable error message */
|
|
3396
|
+
message: string;
|
|
3397
|
+
/** Short title for the error */
|
|
3398
|
+
title: string;
|
|
3399
|
+
error_data?: {
|
|
3400
|
+
/** Detailed error description */
|
|
3401
|
+
details: string;
|
|
3402
|
+
};
|
|
3403
|
+
}
|
|
3404
|
+
interface GroupAddedParticipant {
|
|
3405
|
+
/** WhatsApp ID of the participant */
|
|
3406
|
+
wa_id: string;
|
|
3407
|
+
/** Phone number input provided when adding (optional) */
|
|
3408
|
+
input?: string;
|
|
3409
|
+
}
|
|
3410
|
+
interface GroupRemovedParticipant {
|
|
3411
|
+
/** Phone number or WhatsApp ID of the removed participant */
|
|
3412
|
+
input: string;
|
|
3413
|
+
}
|
|
3414
|
+
interface GroupFailedParticipant {
|
|
3415
|
+
/** Phone number or WhatsApp ID that failed */
|
|
3416
|
+
input: string;
|
|
3417
|
+
errors: GroupWebhookError[];
|
|
3418
|
+
}
|
|
3419
|
+
type GroupLifecycleEventType = 'group_create' | 'group_delete';
|
|
3420
|
+
interface GroupLifecycleEntry {
|
|
3421
|
+
/** Unix timestamp of the event */
|
|
3422
|
+
timestamp: string;
|
|
3423
|
+
/** The group's WhatsApp ID */
|
|
3424
|
+
group_id: string;
|
|
3425
|
+
/** Event type: group_create or group_delete */
|
|
3426
|
+
type: GroupLifecycleEventType;
|
|
3427
|
+
/** Correlation ID for the API request that triggered this event */
|
|
3428
|
+
request_id: string;
|
|
3429
|
+
/** Group subject/name — present on group_create */
|
|
3430
|
+
subject?: string;
|
|
3431
|
+
/** Group description — present on group_create */
|
|
3432
|
+
description?: string;
|
|
3433
|
+
/** Invite link for the group — present on successful group_create */
|
|
3434
|
+
invite_link?: string;
|
|
3435
|
+
/** Whether users need admin approval to join — present on group_create */
|
|
3436
|
+
join_approval_mode?: string;
|
|
3437
|
+
/** Present when the operation failed */
|
|
3438
|
+
errors?: GroupWebhookError[];
|
|
3439
|
+
}
|
|
3440
|
+
interface GroupLifecycleUpdateValue {
|
|
3441
|
+
messaging_product: 'whatsapp';
|
|
3442
|
+
metadata: WebhookMetadata;
|
|
3443
|
+
/** Array of group lifecycle events */
|
|
3444
|
+
groups: GroupLifecycleEntry[];
|
|
3445
|
+
}
|
|
3446
|
+
interface GroupLifecycleUpdateWebhookValue {
|
|
3447
|
+
field: 'group_lifecycle_update';
|
|
3448
|
+
value: GroupLifecycleUpdateValue;
|
|
3449
|
+
}
|
|
3450
|
+
type GroupParticipantsEventType = 'group_participants_add' | 'group_participants_remove' | 'group_join_request_created' | 'group_join_request_revoked';
|
|
3451
|
+
type GroupParticipantsAddReason = 'invite_link' | 'admin_added';
|
|
3452
|
+
/** Who initiated the remove action */
|
|
3453
|
+
type GroupParticipantsInitiatedBy = 'business' | 'participant';
|
|
3454
|
+
interface GroupParticipantsEntry {
|
|
3455
|
+
/** Unix timestamp of the event */
|
|
3456
|
+
timestamp: string;
|
|
3457
|
+
/** The group's WhatsApp ID */
|
|
3458
|
+
group_id: string;
|
|
3459
|
+
/** Event type */
|
|
3460
|
+
type: GroupParticipantsEventType;
|
|
3461
|
+
/** Correlation ID for the API request */
|
|
3462
|
+
request_id?: string;
|
|
3463
|
+
/** Reason participants were added (e.g. invite_link) */
|
|
3464
|
+
reason?: GroupParticipantsAddReason | string;
|
|
3465
|
+
/** Participants successfully added */
|
|
3466
|
+
added_participants?: GroupAddedParticipant[];
|
|
3467
|
+
/** Whether business or participant initiated the removal */
|
|
3468
|
+
initiated_by?: GroupParticipantsInitiatedBy;
|
|
3469
|
+
/** Participants successfully removed */
|
|
3470
|
+
removed_participants?: GroupRemovedParticipant[];
|
|
3471
|
+
/** Participants that could not be removed */
|
|
3472
|
+
failed_participants?: GroupFailedParticipant[];
|
|
3473
|
+
/** ID of the join request */
|
|
3474
|
+
join_request_id?: string;
|
|
3475
|
+
/** WhatsApp ID of the user who submitted or cancelled the request */
|
|
3476
|
+
wa_id?: string;
|
|
3477
|
+
/** Present when the operation partially or fully failed */
|
|
3478
|
+
errors?: GroupWebhookError[];
|
|
3479
|
+
}
|
|
3480
|
+
interface GroupParticipantsUpdateValue {
|
|
3481
|
+
messaging_product: 'whatsapp';
|
|
3482
|
+
metadata: WebhookMetadata;
|
|
3483
|
+
/** Array of participant update events */
|
|
3484
|
+
groups: GroupParticipantsEntry[];
|
|
3485
|
+
}
|
|
3486
|
+
interface GroupParticipantsUpdateWebhookValue {
|
|
3487
|
+
field: 'group_participants_update';
|
|
3488
|
+
value: GroupParticipantsUpdateValue;
|
|
3489
|
+
}
|
|
3490
|
+
interface GroupSettingFieldResult {
|
|
3491
|
+
/** Whether this specific field was successfully updated */
|
|
3492
|
+
update_successful: boolean;
|
|
3493
|
+
/** Present on profile_picture updates */
|
|
3494
|
+
mime_type?: string;
|
|
3495
|
+
/** SHA-256 hash of the uploaded image — present on profile_picture updates */
|
|
3496
|
+
sha256?: string;
|
|
3497
|
+
/** New text value — present on group_subject / group_description updates */
|
|
3498
|
+
text?: string;
|
|
3499
|
+
/** Present when update_successful is false */
|
|
3500
|
+
errors?: GroupWebhookError[];
|
|
3501
|
+
}
|
|
3502
|
+
interface GroupSettingsEntry {
|
|
3503
|
+
/** Unix timestamp of the event */
|
|
3504
|
+
timestamp: string;
|
|
3505
|
+
/** The group's WhatsApp ID */
|
|
3506
|
+
group_id: string;
|
|
3507
|
+
/** Always "group_settings_update" */
|
|
3508
|
+
type: 'group_settings_update';
|
|
3509
|
+
/** Correlation ID for the API request */
|
|
3510
|
+
request_id?: string;
|
|
3511
|
+
/** Result of the profile picture update */
|
|
3512
|
+
profile_picture?: GroupSettingFieldResult;
|
|
3513
|
+
/** Result of the group subject (name) update */
|
|
3514
|
+
group_subject?: GroupSettingFieldResult;
|
|
3515
|
+
/** Result of the group description update */
|
|
3516
|
+
group_description?: GroupSettingFieldResult;
|
|
3517
|
+
/** Top-level errors when the entire update failed */
|
|
3518
|
+
errors?: GroupWebhookError[];
|
|
3519
|
+
}
|
|
3520
|
+
interface GroupSettingsUpdateValue {
|
|
3521
|
+
messaging_product: 'whatsapp';
|
|
3522
|
+
metadata: WebhookMetadata;
|
|
3523
|
+
/** Array of group settings update events */
|
|
3524
|
+
groups: GroupSettingsEntry[];
|
|
3525
|
+
}
|
|
3526
|
+
interface GroupSettingsUpdateWebhookValue {
|
|
3527
|
+
field: 'group_settings_update';
|
|
3528
|
+
value: GroupSettingsUpdateValue;
|
|
3529
|
+
}
|
|
3530
|
+
type GroupStatusEventType = 'group_suspend' | 'group_suspend_cleared';
|
|
3531
|
+
interface GroupStatusEntry {
|
|
3532
|
+
/** Unix timestamp of the event */
|
|
3533
|
+
timestamp: string;
|
|
3534
|
+
/** The group's WhatsApp ID */
|
|
3535
|
+
group_id: string;
|
|
3536
|
+
/** Event type: group_suspend or group_suspend_cleared */
|
|
3537
|
+
type: GroupStatusEventType;
|
|
3538
|
+
}
|
|
3539
|
+
interface GroupStatusUpdateValue {
|
|
3540
|
+
messaging_product: 'whatsapp';
|
|
3541
|
+
metadata: WebhookMetadata;
|
|
3542
|
+
/** Array of group status events */
|
|
3543
|
+
groups: GroupStatusEntry[];
|
|
3544
|
+
}
|
|
3545
|
+
interface GroupStatusUpdateWebhookValue {
|
|
3546
|
+
field: 'group_status_update';
|
|
3547
|
+
value: GroupStatusUpdateValue;
|
|
3548
|
+
}
|
|
3549
|
+
//#endregion
|
|
3146
3550
|
//#region src/core/webhook/types/message.d.ts
|
|
3147
3551
|
/**
|
|
3148
3552
|
* Base message properties common to all message types
|
|
@@ -3433,6 +3837,75 @@ interface HistoryWebhookValue {
|
|
|
3433
3837
|
value: HistoryValue;
|
|
3434
3838
|
}
|
|
3435
3839
|
//#endregion
|
|
3840
|
+
//#region src/core/webhook/types/marketing.d.ts
|
|
3841
|
+
/**
|
|
3842
|
+
* Detected event type.
|
|
3843
|
+
* Sample payload uses lowercase ("purchase"), docs use PascalCase ("Purchase").
|
|
3844
|
+
* Accept both forms.
|
|
3845
|
+
*/
|
|
3846
|
+
type AutomaticEventName = 'LeadSubmitted' | 'Purchase' | 'purchase' | 'lead_submitted' | string;
|
|
3847
|
+
interface AutomaticEventCustomData {
|
|
3848
|
+
/** ISO 4217 currency code (e.g. "USD") — present on Purchase events */
|
|
3849
|
+
currency: string;
|
|
3850
|
+
/** Monetary value of the purchase — present on Purchase events */
|
|
3851
|
+
value: number;
|
|
3852
|
+
}
|
|
3853
|
+
interface AutomaticEvent {
|
|
3854
|
+
/** WhatsApp message ID that triggered the event detection */
|
|
3855
|
+
id: string;
|
|
3856
|
+
/**
|
|
3857
|
+
* Detected event type.
|
|
3858
|
+
* @see AutomaticEventName
|
|
3859
|
+
*/
|
|
3860
|
+
event_name: AutomaticEventName;
|
|
3861
|
+
/** Unix timestamp of when the event was detected */
|
|
3862
|
+
timestamp: number;
|
|
3863
|
+
/**
|
|
3864
|
+
* Click-to-WhatsApp ad click ID — use with Conversions API.
|
|
3865
|
+
* Present when the event originated from a Click-to-WhatsApp ad.
|
|
3866
|
+
*/
|
|
3867
|
+
ctwa_clid?: string;
|
|
3868
|
+
/** Present on Purchase events */
|
|
3869
|
+
custom_data?: AutomaticEventCustomData;
|
|
3870
|
+
}
|
|
3871
|
+
interface AutomaticEventsValue {
|
|
3872
|
+
messaging_product: 'whatsapp';
|
|
3873
|
+
metadata: WebhookMetadata;
|
|
3874
|
+
/** Array of detected automatic events */
|
|
3875
|
+
automatic_events: AutomaticEvent[];
|
|
3876
|
+
}
|
|
3877
|
+
interface AutomaticEventsWebhookValue {
|
|
3878
|
+
field: 'automatic_events';
|
|
3879
|
+
value: AutomaticEventsValue;
|
|
3880
|
+
}
|
|
3881
|
+
interface TrackingEventData {
|
|
3882
|
+
/** Unique identifier for the click, also appended to the destination URL */
|
|
3883
|
+
click_id?: string;
|
|
3884
|
+
/** Internal Meta token for processing and tracking */
|
|
3885
|
+
tracking_token?: string;
|
|
3886
|
+
}
|
|
3887
|
+
interface TrackingEvent {
|
|
3888
|
+
/**
|
|
3889
|
+
* Name of the tracked event.
|
|
3890
|
+
* Known values: "sent"
|
|
3891
|
+
*/
|
|
3892
|
+
event_name: string;
|
|
3893
|
+
/** Unix timestamp of the event */
|
|
3894
|
+
timestamp: number;
|
|
3895
|
+
/** Tracking data associated with the event */
|
|
3896
|
+
tracking_data?: TrackingEventData;
|
|
3897
|
+
}
|
|
3898
|
+
interface TrackingEventsValue {
|
|
3899
|
+
messaging_product: 'whatsapp';
|
|
3900
|
+
metadata: WebhookMetadata;
|
|
3901
|
+
/** Array of tracking events */
|
|
3902
|
+
events: TrackingEvent[];
|
|
3903
|
+
}
|
|
3904
|
+
interface TrackingEventsWebhookValue {
|
|
3905
|
+
field: 'tracking_events';
|
|
3906
|
+
value: TrackingEventsValue;
|
|
3907
|
+
}
|
|
3908
|
+
//#endregion
|
|
3436
3909
|
//#region src/core/webhook/types/messageEchoes.d.ts
|
|
3437
3910
|
/**
|
|
3438
3911
|
* Message echo error
|
|
@@ -3488,6 +3961,179 @@ interface SmbMessageEchoesWebhookValue {
|
|
|
3488
3961
|
field: 'smb_message_echoes';
|
|
3489
3962
|
value: SmbMessageEchoesValue;
|
|
3490
3963
|
}
|
|
3964
|
+
interface MessageEchoSender {
|
|
3965
|
+
/** Page ID that sent the message */
|
|
3966
|
+
id: string;
|
|
3967
|
+
}
|
|
3968
|
+
interface MessageEchoRecipient {
|
|
3969
|
+
/** Page-scoped ID of the user who received the message */
|
|
3970
|
+
id: string;
|
|
3971
|
+
}
|
|
3972
|
+
interface MessageEchoAttachment {
|
|
3973
|
+
/** Attachment type: image, audio, video, file, template, fallback */
|
|
3974
|
+
type: string;
|
|
3975
|
+
/** URL of the attachment or fallback URL */
|
|
3976
|
+
url?: string;
|
|
3977
|
+
/** Template payload for template attachments */
|
|
3978
|
+
payload?: unknown;
|
|
3979
|
+
title?: string;
|
|
3980
|
+
}
|
|
3981
|
+
interface MessageEchoBody {
|
|
3982
|
+
/** Indicates the message was sent by the page */
|
|
3983
|
+
is_echo: true;
|
|
3984
|
+
/** ID of the app that sent the message */
|
|
3985
|
+
app_id: number;
|
|
3986
|
+
/** Custom metadata string set in the Send API request */
|
|
3987
|
+
metadata?: string;
|
|
3988
|
+
/** Message ID */
|
|
3989
|
+
mid: string;
|
|
3990
|
+
/** Text content — present on text messages */
|
|
3991
|
+
text?: string;
|
|
3992
|
+
/** Attachments — present on media/template messages */
|
|
3993
|
+
attachments?: MessageEchoAttachment[];
|
|
3994
|
+
}
|
|
3995
|
+
interface MessageEchoEntry {
|
|
3996
|
+
sender: MessageEchoSender;
|
|
3997
|
+
recipient: MessageEchoRecipient;
|
|
3998
|
+
/** Unix timestamp in milliseconds */
|
|
3999
|
+
timestamp: number;
|
|
4000
|
+
message: MessageEchoBody;
|
|
4001
|
+
}
|
|
4002
|
+
interface MessageEchoesValue {
|
|
4003
|
+
/** Array of echoed messages */
|
|
4004
|
+
messaging: MessageEchoEntry[];
|
|
4005
|
+
}
|
|
4006
|
+
interface MessageEchoesWebhookValue {
|
|
4007
|
+
field: 'message_echoes';
|
|
4008
|
+
value: MessageEchoesValue;
|
|
4009
|
+
}
|
|
4010
|
+
//#endregion
|
|
4011
|
+
//#region src/core/webhook/types/messaging.d.ts
|
|
4012
|
+
interface MessagingHandoverControlPassed {
|
|
4013
|
+
/** Optional metadata string passed with the handover */
|
|
4014
|
+
metadata?: string;
|
|
4015
|
+
}
|
|
4016
|
+
interface MessagingHandoversValue {
|
|
4017
|
+
messaging_product: 'whatsapp';
|
|
4018
|
+
/** The business phone number that received the handover event */
|
|
4019
|
+
recipient: {
|
|
4020
|
+
display_phone_number: string;
|
|
4021
|
+
phone_number_id: string;
|
|
4022
|
+
};
|
|
4023
|
+
/** The user involved in the handover */
|
|
4024
|
+
sender: {
|
|
4025
|
+
phone_number: string;
|
|
4026
|
+
};
|
|
4027
|
+
/** Unix timestamp of the event */
|
|
4028
|
+
timestamp: string;
|
|
4029
|
+
/** Present when thread control is passed to another app */
|
|
4030
|
+
control_passed?: MessagingHandoverControlPassed;
|
|
4031
|
+
}
|
|
4032
|
+
interface MessagingHandoversWebhookValue {
|
|
4033
|
+
field: 'messaging_handovers';
|
|
4034
|
+
value: MessagingHandoversValue;
|
|
4035
|
+
}
|
|
4036
|
+
interface StandbyValue {
|
|
4037
|
+
messaging_product: 'whatsapp';
|
|
4038
|
+
[key: string]: unknown;
|
|
4039
|
+
}
|
|
4040
|
+
interface StandbyWebhookValue {
|
|
4041
|
+
field: 'standby';
|
|
4042
|
+
value: StandbyValue;
|
|
4043
|
+
}
|
|
4044
|
+
interface UserPreferenceEntry {
|
|
4045
|
+
/** WhatsApp ID of the user */
|
|
4046
|
+
wa_id: string;
|
|
4047
|
+
/** Meta user ID (e.g. "US.1234567") */
|
|
4048
|
+
user_id: string;
|
|
4049
|
+
/** Human-readable description of the preference change */
|
|
4050
|
+
detail: string;
|
|
4051
|
+
/**
|
|
4052
|
+
* Category of the preference that changed.
|
|
4053
|
+
* Known value: "marketing_messages"
|
|
4054
|
+
*/
|
|
4055
|
+
category: 'marketing_messages' | string;
|
|
4056
|
+
/**
|
|
4057
|
+
* New preference value.
|
|
4058
|
+
* Known value: "stop" (user opted out)
|
|
4059
|
+
*/
|
|
4060
|
+
value: 'stop' | string;
|
|
4061
|
+
/** Unix timestamp of when the preference was changed */
|
|
4062
|
+
timestamp: number;
|
|
4063
|
+
/** Signup ID associated with the preference, if applicable */
|
|
4064
|
+
signup_id?: string;
|
|
4065
|
+
}
|
|
4066
|
+
interface UserPreferencesContact {
|
|
4067
|
+
profile: {
|
|
4068
|
+
/** Display name of the user */
|
|
4069
|
+
name: string;
|
|
4070
|
+
/** WhatsApp username, if available */
|
|
4071
|
+
username?: string;
|
|
4072
|
+
};
|
|
4073
|
+
/** WhatsApp ID of the user */
|
|
4074
|
+
wa_id: string;
|
|
4075
|
+
/** Meta user ID */
|
|
4076
|
+
user_id?: string;
|
|
4077
|
+
}
|
|
4078
|
+
interface UserPreferencesValue {
|
|
4079
|
+
messaging_product: 'whatsapp';
|
|
4080
|
+
metadata: WebhookMetadata;
|
|
4081
|
+
/** Array of user preference change events */
|
|
4082
|
+
user_preferences: UserPreferenceEntry[];
|
|
4083
|
+
/** Contact profile information for the users */
|
|
4084
|
+
contacts?: UserPreferencesContact[];
|
|
4085
|
+
}
|
|
4086
|
+
interface UserPreferencesWebhookValue {
|
|
4087
|
+
field: 'user_preferences';
|
|
4088
|
+
value: UserPreferencesValue;
|
|
4089
|
+
}
|
|
4090
|
+
//#endregion
|
|
4091
|
+
//#region src/core/webhook/types/partner.d.ts
|
|
4092
|
+
/**
|
|
4093
|
+
* Partner solution event types.
|
|
4094
|
+
* Known value: "SOLUTION_CREATED"
|
|
4095
|
+
*/
|
|
4096
|
+
type PartnerSolutionEvent = 'SOLUTION_CREATED' | string;
|
|
4097
|
+
/**
|
|
4098
|
+
* Partner solution status values.
|
|
4099
|
+
* Known value: "INITIATED"
|
|
4100
|
+
*/
|
|
4101
|
+
type PartnerSolutionStatus = 'INITIATED' | string;
|
|
4102
|
+
interface PartnerSolutionsValue {
|
|
4103
|
+
/** Type of partner solution event */
|
|
4104
|
+
event: PartnerSolutionEvent;
|
|
4105
|
+
/** Unique identifier for the partner solution */
|
|
4106
|
+
solution_id: string;
|
|
4107
|
+
/** Current status of the partner solution */
|
|
4108
|
+
solution_status: PartnerSolutionStatus;
|
|
4109
|
+
}
|
|
4110
|
+
interface PartnerSolutionsWebhookValue {
|
|
4111
|
+
field: 'partner_solutions';
|
|
4112
|
+
value: PartnerSolutionsValue;
|
|
4113
|
+
}
|
|
4114
|
+
//#endregion
|
|
4115
|
+
//#region src/core/webhook/types/payments.d.ts
|
|
4116
|
+
interface PaymentConfigurationUpdateValue {
|
|
4117
|
+
/** Name of the payment configuration */
|
|
4118
|
+
configuration_name: string;
|
|
4119
|
+
/** Payment provider name (e.g. "razorpay") */
|
|
4120
|
+
provider_name: string;
|
|
4121
|
+
/** Merchant ID assigned by the payment provider */
|
|
4122
|
+
provider_mid: string;
|
|
4123
|
+
/**
|
|
4124
|
+
* Current status of the payment configuration.
|
|
4125
|
+
* Known values: "Needs Testing"
|
|
4126
|
+
*/
|
|
4127
|
+
status: string;
|
|
4128
|
+
/** Unix timestamp of when the configuration was created */
|
|
4129
|
+
created_timestamp: number;
|
|
4130
|
+
/** Unix timestamp of when the configuration was last updated */
|
|
4131
|
+
updated_timestamp: number;
|
|
4132
|
+
}
|
|
4133
|
+
interface PaymentConfigurationUpdateWebhookValue {
|
|
4134
|
+
field: 'payment_configuration_update';
|
|
4135
|
+
value: PaymentConfigurationUpdateValue;
|
|
4136
|
+
}
|
|
3491
4137
|
//#endregion
|
|
3492
4138
|
//#region src/core/webhook/types/phoneNumber.d.ts
|
|
3493
4139
|
/**
|
|
@@ -3638,6 +4284,37 @@ interface MessageTemplateQualityUpdateWebhookValue {
|
|
|
3638
4284
|
field: 'message_template_quality_update';
|
|
3639
4285
|
value: MessageTemplateQualityUpdateValue;
|
|
3640
4286
|
}
|
|
4287
|
+
interface MessageTemplateComponentsUpdateValue {
|
|
4288
|
+
/** Numeric ID of the message template */
|
|
4289
|
+
message_template_id: number;
|
|
4290
|
+
/** Name of the message template */
|
|
4291
|
+
message_template_name: string;
|
|
4292
|
+
/** Language code of the message template (e.g. "en_US") */
|
|
4293
|
+
message_template_language: string;
|
|
4294
|
+
/** Event describing what changed */
|
|
4295
|
+
event: string;
|
|
4296
|
+
[key: string]: unknown;
|
|
4297
|
+
}
|
|
4298
|
+
interface MessageTemplateComponentsUpdateWebhookValue {
|
|
4299
|
+
field: 'message_template_components_update';
|
|
4300
|
+
value: MessageTemplateComponentsUpdateValue;
|
|
4301
|
+
}
|
|
4302
|
+
interface TemplateCorrectCategoryDetectionValue {
|
|
4303
|
+
/** Numeric ID of the affected message template */
|
|
4304
|
+
message_template_id: number;
|
|
4305
|
+
/** Name of the affected message template */
|
|
4306
|
+
message_template_name: string;
|
|
4307
|
+
/** Language code of the affected message template (e.g. "en_US") */
|
|
4308
|
+
message_template_language: string;
|
|
4309
|
+
/** The category WhatsApp determined the template should belong to */
|
|
4310
|
+
suggested_category: TemplateCategory;
|
|
4311
|
+
/** The template's current (approved) category */
|
|
4312
|
+
current_category: TemplateCategory;
|
|
4313
|
+
}
|
|
4314
|
+
interface TemplateCorrectCategoryDetectionWebhookValue {
|
|
4315
|
+
field: 'template_correct_category_detection';
|
|
4316
|
+
value: TemplateCorrectCategoryDetectionValue;
|
|
4317
|
+
}
|
|
3641
4318
|
//#endregion
|
|
3642
4319
|
//#region src/core/webhook/types/index.d.ts
|
|
3643
4320
|
/**
|
|
@@ -3672,7 +4349,7 @@ type WebhookValue = MessageWebhookValue | StatusWebhookValue | ErrorWebhookValue
|
|
|
3672
4349
|
/**
|
|
3673
4350
|
* Union type for all webhook field values
|
|
3674
4351
|
*/
|
|
3675
|
-
type WebhookFieldValue = AccountUpdateWebhookValue | AccountReviewUpdateWebhookValue | AccountAlertsWebhookValue | BusinessCapabilityUpdateWebhookValue |
|
|
4352
|
+
type WebhookFieldValue = AccountUpdateWebhookValue | AccountReviewUpdateWebhookValue | AccountAlertsWebhookValue | AccountSettingsUpdateWebhookValue | AutomaticEventsWebhookValue | BusinessCapabilityUpdateWebhookValue | BusinessStatusUpdateWebhookValue | CallsWebhookValue | FlowsWebhookValue | GroupLifecycleUpdateWebhookValue | GroupParticipantsUpdateWebhookValue | GroupSettingsUpdateWebhookValue | GroupStatusUpdateWebhookValue | HistoryWebhookValue | MessageEchoesWebhookValue | MessageTemplateComponentsUpdateWebhookValue | MessageTemplateQualityUpdateWebhookValue | MessageTemplateStatusUpdateWebhookValue | MessagingHandoversWebhookValue | PartnerSolutionsWebhookValue | PaymentConfigurationUpdateWebhookValue | PhoneNumberNameUpdateWebhookValue | PhoneNumberQualityUpdateWebhookValue | SecurityWebhookValue | SmbAppStateSyncWebhookValue | SmbMessageEchoesWebhookValue | StandbyWebhookValue | TemplateCategoryUpdateWebhookValue | TemplateCorrectCategoryDetectionWebhookValue | TrackingEventsWebhookValue | UserPreferencesWebhookValue;
|
|
3676
4353
|
interface WebhookPayload {
|
|
3677
4354
|
object: 'whatsapp_business_account';
|
|
3678
4355
|
entry: Array<{
|
|
@@ -4867,7 +5544,7 @@ declare class MediaApi extends BaseAPI implements MediaClass {
|
|
|
4867
5544
|
* This conditional type resolves the correct payload interface based on the {@link MessageTypesEnum} value,
|
|
4868
5545
|
* ensuring type-safe message construction at compile time.
|
|
4869
5546
|
*/
|
|
4870
|
-
type MessagePayloadType<T extends MessageTypesEnum> = T extends MessageTypesEnum.Audio ? AudioMediaObject : T extends MessageTypesEnum.Contacts ? [
|
|
5547
|
+
type MessagePayloadType<T extends MessageTypesEnum> = T extends MessageTypesEnum.Audio ? AudioMediaObject : T extends MessageTypesEnum.Contacts ? ContactObject[] : T extends MessageTypesEnum.Document ? DocumentMediaObject : T extends MessageTypesEnum.Image ? ImageMediaObject : T extends MessageTypesEnum.Interactive ? InteractiveObject : T extends MessageTypesEnum.Location ? LocationObject : T extends MessageTypesEnum.Template ? MessageTemplateObject<ComponentTypesEnum> : T extends MessageTypesEnum.Sticker ? StickerMediaObject : T extends MessageTypesEnum.Text ? TextObject : T extends MessageTypesEnum.Video ? VideoMediaObject : T extends MessageTypesEnum.Reaction ? {
|
|
4871
5548
|
message_id: string;
|
|
4872
5549
|
emoji: string;
|
|
4873
5550
|
} : never;
|
|
@@ -5011,7 +5688,7 @@ declare class MessagesApi extends BaseAPI implements MessagesClass {
|
|
|
5011
5688
|
* });
|
|
5012
5689
|
* ```
|
|
5013
5690
|
*/
|
|
5014
|
-
contacts(params: MessageRequestParams<[
|
|
5691
|
+
contacts(params: MessageRequestParams<ContactObject[]>): Promise<MessagesResponse>;
|
|
5015
5692
|
/**
|
|
5016
5693
|
* Sends a document message via the WhatsApp Cloud API.
|
|
5017
5694
|
*
|
|
@@ -5321,7 +5998,7 @@ declare class MessagesApi extends BaseAPI implements MessagesClass {
|
|
|
5321
5998
|
* ```
|
|
5322
5999
|
*/
|
|
5323
6000
|
interactiveList(params: MessageRequestParams<InteractiveObject & {
|
|
5324
|
-
type: InteractiveTypesEnum.List;
|
|
6001
|
+
type: InteractiveTypesEnum.List | 'list';
|
|
5325
6002
|
}>): Promise<MessagesResponse>;
|
|
5326
6003
|
/**
|
|
5327
6004
|
* Sends a Call-to-Action (CTA) URL button interactive message via the WhatsApp Cloud API.
|
|
@@ -5349,7 +6026,7 @@ declare class MessagesApi extends BaseAPI implements MessagesClass {
|
|
|
5349
6026
|
* ```
|
|
5350
6027
|
*/
|
|
5351
6028
|
interactiveCtaUrl(params: MessageRequestParams<InteractiveObject & {
|
|
5352
|
-
type: InteractiveTypesEnum.CtaUrl;
|
|
6029
|
+
type: InteractiveTypesEnum.CtaUrl | 'cta_url';
|
|
5353
6030
|
}>): Promise<MessagesResponse>;
|
|
5354
6031
|
/**
|
|
5355
6032
|
* Sends a location request interactive message via the WhatsApp Cloud API.
|
|
@@ -5439,7 +6116,7 @@ declare class MessagesApi extends BaseAPI implements MessagesClass {
|
|
|
5439
6116
|
* ```
|
|
5440
6117
|
*/
|
|
5441
6118
|
interactiveReplyButtons(params: MessageRequestParams<InteractiveObject & {
|
|
5442
|
-
type: InteractiveTypesEnum.Button;
|
|
6119
|
+
type: InteractiveTypesEnum.Button | 'button';
|
|
5443
6120
|
}>): Promise<MessagesResponse>;
|
|
5444
6121
|
/**
|
|
5445
6122
|
* Sends a flow interactive message via the WhatsApp Cloud API.
|
|
@@ -5472,7 +6149,7 @@ declare class MessagesApi extends BaseAPI implements MessagesClass {
|
|
|
5472
6149
|
* ```
|
|
5473
6150
|
*/
|
|
5474
6151
|
interactiveFlow(params: MessageRequestParams<InteractiveObject & {
|
|
5475
|
-
type: InteractiveTypesEnum.Flow;
|
|
6152
|
+
type: InteractiveTypesEnum.Flow | 'flow';
|
|
5476
6153
|
}>): Promise<MessagesResponse>;
|
|
5477
6154
|
/**
|
|
5478
6155
|
* Sends a carousel interactive message via the WhatsApp Cloud API.
|
|
@@ -6632,6 +7309,74 @@ type ProcessedSmbAppStateSync = {
|
|
|
6632
7309
|
wabaId: string;
|
|
6633
7310
|
value: SmbAppStateSyncWebhookValue['value'];
|
|
6634
7311
|
};
|
|
7312
|
+
type ProcessedAccountSettingsUpdate = {
|
|
7313
|
+
wabaId: string;
|
|
7314
|
+
value: AccountSettingsUpdateWebhookValue['value'];
|
|
7315
|
+
};
|
|
7316
|
+
type ProcessedAutomaticEvents = {
|
|
7317
|
+
wabaId: string;
|
|
7318
|
+
value: AutomaticEventsWebhookValue['value'];
|
|
7319
|
+
};
|
|
7320
|
+
type ProcessedBusinessStatusUpdate = {
|
|
7321
|
+
wabaId: string;
|
|
7322
|
+
value: BusinessStatusUpdateWebhookValue['value'];
|
|
7323
|
+
};
|
|
7324
|
+
type ProcessedCalls = {
|
|
7325
|
+
wabaId: string;
|
|
7326
|
+
value: CallsWebhookValue['value'];
|
|
7327
|
+
};
|
|
7328
|
+
type ProcessedGroupLifecycleUpdate = {
|
|
7329
|
+
wabaId: string;
|
|
7330
|
+
value: GroupLifecycleUpdateWebhookValue['value'];
|
|
7331
|
+
};
|
|
7332
|
+
type ProcessedGroupParticipantsUpdate = {
|
|
7333
|
+
wabaId: string;
|
|
7334
|
+
value: GroupParticipantsUpdateWebhookValue['value'];
|
|
7335
|
+
};
|
|
7336
|
+
type ProcessedGroupSettingsUpdate = {
|
|
7337
|
+
wabaId: string;
|
|
7338
|
+
value: GroupSettingsUpdateWebhookValue['value'];
|
|
7339
|
+
};
|
|
7340
|
+
type ProcessedGroupStatusUpdate = {
|
|
7341
|
+
wabaId: string;
|
|
7342
|
+
value: GroupStatusUpdateWebhookValue['value'];
|
|
7343
|
+
};
|
|
7344
|
+
type ProcessedMessageEchoes = {
|
|
7345
|
+
wabaId: string;
|
|
7346
|
+
value: MessageEchoesWebhookValue['value'];
|
|
7347
|
+
};
|
|
7348
|
+
type ProcessedMessageTemplateComponentsUpdate = {
|
|
7349
|
+
wabaId: string;
|
|
7350
|
+
value: MessageTemplateComponentsUpdateWebhookValue['value'];
|
|
7351
|
+
};
|
|
7352
|
+
type ProcessedMessagingHandovers = {
|
|
7353
|
+
wabaId: string;
|
|
7354
|
+
value: MessagingHandoversWebhookValue['value'];
|
|
7355
|
+
};
|
|
7356
|
+
type ProcessedPartnerSolutions = {
|
|
7357
|
+
wabaId: string;
|
|
7358
|
+
value: PartnerSolutionsWebhookValue['value'];
|
|
7359
|
+
};
|
|
7360
|
+
type ProcessedPaymentConfigurationUpdate = {
|
|
7361
|
+
wabaId: string;
|
|
7362
|
+
value: PaymentConfigurationUpdateWebhookValue['value'];
|
|
7363
|
+
};
|
|
7364
|
+
type ProcessedStandby = {
|
|
7365
|
+
wabaId: string;
|
|
7366
|
+
value: StandbyWebhookValue['value'];
|
|
7367
|
+
};
|
|
7368
|
+
type ProcessedTemplateCorrectCategoryDetection = {
|
|
7369
|
+
wabaId: string;
|
|
7370
|
+
value: TemplateCorrectCategoryDetectionWebhookValue['value'];
|
|
7371
|
+
};
|
|
7372
|
+
type ProcessedTrackingEvents = {
|
|
7373
|
+
wabaId: string;
|
|
7374
|
+
value: TrackingEventsWebhookValue['value'];
|
|
7375
|
+
};
|
|
7376
|
+
type ProcessedUserPreferences = {
|
|
7377
|
+
wabaId: string;
|
|
7378
|
+
value: UserPreferencesWebhookValue['value'];
|
|
7379
|
+
};
|
|
6635
7380
|
type TextProcessedMessage = ProcessedMessage & {
|
|
6636
7381
|
message: Extract<WhatsAppMessage, {
|
|
6637
7382
|
type: MessageTypesEnum.Text;
|
|
@@ -6714,6 +7459,23 @@ type SecurityHandler = (whatsapp: WhatsApp, processed: ProcessedSecurity) => voi
|
|
|
6714
7459
|
type HistoryHandler = (whatsapp: WhatsApp, processed: ProcessedHistory) => void | Promise<void>;
|
|
6715
7460
|
type SmbMessageEchoesHandler = (whatsapp: WhatsApp, processed: ProcessedSmbMessageEchoes) => void | Promise<void>;
|
|
6716
7461
|
type SmbAppStateSyncHandler = (whatsapp: WhatsApp, processed: ProcessedSmbAppStateSync) => void | Promise<void>;
|
|
7462
|
+
type AccountSettingsUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedAccountSettingsUpdate) => void | Promise<void>;
|
|
7463
|
+
type AutomaticEventsHandler = (whatsapp: WhatsApp, processed: ProcessedAutomaticEvents) => void | Promise<void>;
|
|
7464
|
+
type BusinessStatusUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedBusinessStatusUpdate) => void | Promise<void>;
|
|
7465
|
+
type CallsHandler = (whatsapp: WhatsApp, processed: ProcessedCalls) => void | Promise<void>;
|
|
7466
|
+
type GroupLifecycleUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedGroupLifecycleUpdate) => void | Promise<void>;
|
|
7467
|
+
type GroupParticipantsUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedGroupParticipantsUpdate) => void | Promise<void>;
|
|
7468
|
+
type GroupSettingsUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedGroupSettingsUpdate) => void | Promise<void>;
|
|
7469
|
+
type GroupStatusUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedGroupStatusUpdate) => void | Promise<void>;
|
|
7470
|
+
type MessageEchoesHandler = (whatsapp: WhatsApp, processed: ProcessedMessageEchoes) => void | Promise<void>;
|
|
7471
|
+
type MessageTemplateComponentsUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedMessageTemplateComponentsUpdate) => void | Promise<void>;
|
|
7472
|
+
type MessagingHandoversHandler = (whatsapp: WhatsApp, processed: ProcessedMessagingHandovers) => void | Promise<void>;
|
|
7473
|
+
type PartnerSolutionsHandler = (whatsapp: WhatsApp, processed: ProcessedPartnerSolutions) => void | Promise<void>;
|
|
7474
|
+
type PaymentConfigurationUpdateHandler = (whatsapp: WhatsApp, processed: ProcessedPaymentConfigurationUpdate) => void | Promise<void>;
|
|
7475
|
+
type StandbyHandler = (whatsapp: WhatsApp, processed: ProcessedStandby) => void | Promise<void>;
|
|
7476
|
+
type TemplateCorrectCategoryDetectionHandler = (whatsapp: WhatsApp, processed: ProcessedTemplateCorrectCategoryDetection) => void | Promise<void>;
|
|
7477
|
+
type TrackingEventsHandler = (whatsapp: WhatsApp, processed: ProcessedTrackingEvents) => void | Promise<void>;
|
|
7478
|
+
type UserPreferencesHandler = (whatsapp: WhatsApp, processed: ProcessedUserPreferences) => void | Promise<void>;
|
|
6717
7479
|
type TextMessageHandler = (whatsapp: WhatsApp, processed: TextProcessedMessage) => void | Promise<void>;
|
|
6718
7480
|
type ImageMessageHandler = (whatsapp: WhatsApp, processed: ImageProcessedMessage) => void | Promise<void>;
|
|
6719
7481
|
type VideoMessageHandler = (whatsapp: WhatsApp, processed: VideoProcessedMessage) => void | Promise<void>;
|
|
@@ -6749,6 +7511,23 @@ declare function processWebhookMessages(request: Request, whatsapp: WhatsApp, ha
|
|
|
6749
7511
|
historyHandler?: HistoryHandler;
|
|
6750
7512
|
smbMessageEchoesHandler?: SmbMessageEchoesHandler;
|
|
6751
7513
|
smbAppStateSyncHandler?: SmbAppStateSyncHandler;
|
|
7514
|
+
accountSettingsUpdateHandler?: AccountSettingsUpdateHandler;
|
|
7515
|
+
automaticEventsHandler?: AutomaticEventsHandler;
|
|
7516
|
+
businessStatusUpdateHandler?: BusinessStatusUpdateHandler;
|
|
7517
|
+
callsHandler?: CallsHandler;
|
|
7518
|
+
groupLifecycleUpdateHandler?: GroupLifecycleUpdateHandler;
|
|
7519
|
+
groupParticipantsUpdateHandler?: GroupParticipantsUpdateHandler;
|
|
7520
|
+
groupSettingsUpdateHandler?: GroupSettingsUpdateHandler;
|
|
7521
|
+
groupStatusUpdateHandler?: GroupStatusUpdateHandler;
|
|
7522
|
+
messageEchoesHandler?: MessageEchoesHandler;
|
|
7523
|
+
messageTemplateComponentsUpdateHandler?: MessageTemplateComponentsUpdateHandler;
|
|
7524
|
+
messagingHandoversHandler?: MessagingHandoversHandler;
|
|
7525
|
+
partnerSolutionsHandler?: PartnerSolutionsHandler;
|
|
7526
|
+
paymentConfigurationUpdateHandler?: PaymentConfigurationUpdateHandler;
|
|
7527
|
+
standbyHandler?: StandbyHandler;
|
|
7528
|
+
templateCorrectCategoryDetectionHandler?: TemplateCorrectCategoryDetectionHandler;
|
|
7529
|
+
trackingEventsHandler?: TrackingEventsHandler;
|
|
7530
|
+
userPreferencesHandler?: UserPreferencesHandler;
|
|
6752
7531
|
}): Promise<Response>;
|
|
6753
7532
|
/**
|
|
6754
7533
|
* Handle flow requests
|
|
@@ -6790,11 +7569,28 @@ declare class WebhookProcessor {
|
|
|
6790
7569
|
private historyHandler;
|
|
6791
7570
|
private smbMessageEchoesHandler;
|
|
6792
7571
|
private smbAppStateSyncHandler;
|
|
7572
|
+
private accountSettingsUpdateHandler;
|
|
7573
|
+
private automaticEventsHandler;
|
|
7574
|
+
private businessStatusUpdateHandler;
|
|
7575
|
+
private callsHandler;
|
|
7576
|
+
private groupLifecycleUpdateHandler;
|
|
7577
|
+
private groupParticipantsUpdateHandler;
|
|
7578
|
+
private groupSettingsUpdateHandler;
|
|
7579
|
+
private groupStatusUpdateHandler;
|
|
7580
|
+
private messageEchoesHandler;
|
|
7581
|
+
private messageTemplateComponentsUpdateHandler;
|
|
7582
|
+
private messagingHandoversHandler;
|
|
7583
|
+
private partnerSolutionsHandler;
|
|
7584
|
+
private paymentConfigurationUpdateHandler;
|
|
7585
|
+
private standbyHandler;
|
|
7586
|
+
private templateCorrectCategoryDetectionHandler;
|
|
7587
|
+
private trackingEventsHandler;
|
|
7588
|
+
private userPreferencesHandler;
|
|
6793
7589
|
constructor(config: WhatsAppConfig);
|
|
6794
7590
|
processVerification(mode: string | null, token: string | null, challenge: string | null): Promise<WebhookResponse>;
|
|
6795
7591
|
processWebhook(request: Request): Promise<WebhookResponse>;
|
|
6796
7592
|
processFlow(request: Request): Promise<WebhookResponse>;
|
|
6797
|
-
onMessage(type: MessageTypesEnum, handler: MessageHandler): void;
|
|
7593
|
+
onMessage(type: MessageTypesEnum | string, handler: MessageHandler): void;
|
|
6798
7594
|
onStatus(handler: StatusHandler): void;
|
|
6799
7595
|
onMessagePreProcess(handler: MessageHandler): void;
|
|
6800
7596
|
onMessagePostProcess(handler: MessageHandler): void;
|
|
@@ -6934,6 +7730,80 @@ declare class WebhookProcessor {
|
|
|
6934
7730
|
* @see https://developers.facebook.com/docs/graph-api/webhooks/reference/whatsapp-business-account#smb_app_state_sync
|
|
6935
7731
|
*/
|
|
6936
7732
|
onSmbAppStateSync(handler: SmbAppStateSyncHandler): void;
|
|
7733
|
+
/**
|
|
7734
|
+
* Register a handler for account_settings_update webhook field
|
|
7735
|
+
*/
|
|
7736
|
+
onAccountSettingsUpdate(handler: AccountSettingsUpdateHandler): void;
|
|
7737
|
+
/**
|
|
7738
|
+
* Register a handler for automatic_events webhook field
|
|
7739
|
+
*/
|
|
7740
|
+
onAutomaticEvents(handler: AutomaticEventsHandler): void;
|
|
7741
|
+
/**
|
|
7742
|
+
* Register a handler for business_status_update webhook field
|
|
7743
|
+
*/
|
|
7744
|
+
onBusinessStatusUpdate(handler: BusinessStatusUpdateHandler): void;
|
|
7745
|
+
/**
|
|
7746
|
+
* Register a handler for calls webhook field
|
|
7747
|
+
* @see https://developers.facebook.com/documentation/business-messaging/whatsapp/calling/reference/
|
|
7748
|
+
*/
|
|
7749
|
+
onCalls(handler: CallsHandler): void;
|
|
7750
|
+
/**
|
|
7751
|
+
* Register a handler for group_lifecycle_update webhook field
|
|
7752
|
+
* @see https://developers.facebook.com/documentation/business-messaging/whatsapp/groups/reference/
|
|
7753
|
+
*/
|
|
7754
|
+
onGroupLifecycleUpdate(handler: GroupLifecycleUpdateHandler): void;
|
|
7755
|
+
/**
|
|
7756
|
+
* Register a handler for group_participants_update webhook field
|
|
7757
|
+
* @see https://developers.facebook.com/documentation/business-messaging/whatsapp/groups/reference/
|
|
7758
|
+
*/
|
|
7759
|
+
onGroupParticipantsUpdate(handler: GroupParticipantsUpdateHandler): void;
|
|
7760
|
+
/**
|
|
7761
|
+
* Register a handler for group_settings_update webhook field
|
|
7762
|
+
* @see https://developers.facebook.com/documentation/business-messaging/whatsapp/groups/reference/
|
|
7763
|
+
*/
|
|
7764
|
+
onGroupSettingsUpdate(handler: GroupSettingsUpdateHandler): void;
|
|
7765
|
+
/**
|
|
7766
|
+
* Register a handler for group_status_update webhook field
|
|
7767
|
+
* @see https://developers.facebook.com/documentation/business-messaging/whatsapp/groups/reference/
|
|
7768
|
+
*/
|
|
7769
|
+
onGroupStatusUpdate(handler: GroupStatusUpdateHandler): void;
|
|
7770
|
+
/**
|
|
7771
|
+
* Register a handler for message_echoes webhook field
|
|
7772
|
+
* @see https://developers.facebook.com/docs/graph-api/webhooks/reference/whatsapp-business-account#message_echoes
|
|
7773
|
+
*/
|
|
7774
|
+
onMessageEchoes(handler: MessageEchoesHandler): void;
|
|
7775
|
+
/**
|
|
7776
|
+
* Register a handler for message_template_components_update webhook field
|
|
7777
|
+
*/
|
|
7778
|
+
onMessageTemplateComponentsUpdate(handler: MessageTemplateComponentsUpdateHandler): void;
|
|
7779
|
+
/**
|
|
7780
|
+
* Register a handler for messaging_handovers webhook field
|
|
7781
|
+
*/
|
|
7782
|
+
onMessagingHandovers(handler: MessagingHandoversHandler): void;
|
|
7783
|
+
/**
|
|
7784
|
+
* Register a handler for partner_solutions webhook field
|
|
7785
|
+
*/
|
|
7786
|
+
onPartnerSolutions(handler: PartnerSolutionsHandler): void;
|
|
7787
|
+
/**
|
|
7788
|
+
* Register a handler for payment_configuration_update webhook field
|
|
7789
|
+
*/
|
|
7790
|
+
onPaymentConfigurationUpdate(handler: PaymentConfigurationUpdateHandler): void;
|
|
7791
|
+
/**
|
|
7792
|
+
* Register a handler for standby webhook field
|
|
7793
|
+
*/
|
|
7794
|
+
onStandby(handler: StandbyHandler): void;
|
|
7795
|
+
/**
|
|
7796
|
+
* Register a handler for template_correct_category_detection webhook field
|
|
7797
|
+
*/
|
|
7798
|
+
onTemplateCorrectCategoryDetection(handler: TemplateCorrectCategoryDetectionHandler): void;
|
|
7799
|
+
/**
|
|
7800
|
+
* Register a handler for tracking_events webhook field
|
|
7801
|
+
*/
|
|
7802
|
+
onTrackingEvents(handler: TrackingEventsHandler): void;
|
|
7803
|
+
/**
|
|
7804
|
+
* Register a handler for user_preferences webhook field
|
|
7805
|
+
*/
|
|
7806
|
+
onUserPreferences(handler: UserPreferencesHandler): void;
|
|
6937
7807
|
getClient(): WhatsApp;
|
|
6938
7808
|
getConfig(): WabaConfigType;
|
|
6939
7809
|
}
|
|
@@ -7027,9 +7897,136 @@ declare function nextjsPagesWebhookHandler<TRequest extends BaseApiRequest, TRes
|
|
|
7027
7897
|
processor: WebhookProcessor;
|
|
7028
7898
|
};
|
|
7029
7899
|
//#endregion
|
|
7900
|
+
//#region src/core/webhook/utils/extractMessageText.d.ts
|
|
7901
|
+
/**
|
|
7902
|
+
* Extracts a human-readable display text from any incoming WhatsApp message.
|
|
7903
|
+
*
|
|
7904
|
+
* Useful for logging, notifications, chat previews, and storing message summaries.
|
|
7905
|
+
*
|
|
7906
|
+
* @param message - The incoming WhatsApp message from a webhook handler
|
|
7907
|
+
* @returns A display-friendly string representing the message content
|
|
7908
|
+
*
|
|
7909
|
+
* @example
|
|
7910
|
+
* ```ts
|
|
7911
|
+
* handler.processor.onText(async (whatsapp, processed) => {
|
|
7912
|
+
* const text = extractMessageText(processed.message);
|
|
7913
|
+
* console.log(`Message from ${processed.message.from}: ${text}`);
|
|
7914
|
+
* });
|
|
7915
|
+
* ```
|
|
7916
|
+
*/
|
|
7917
|
+
declare function extractMessageText(message: WhatsAppMessage): string;
|
|
7918
|
+
//#endregion
|
|
7030
7919
|
//#region src/core/webhook/utils/generateXHub256Sig.d.ts
|
|
7031
7920
|
declare const generateXHub256Sig: (body: string, appSecret: string) => string;
|
|
7032
7921
|
//#endregion
|
|
7922
|
+
//#region src/core/webhook/utils/messageHelpers.d.ts
|
|
7923
|
+
declare function isTextMessage(msg: WhatsAppMessage): msg is TextMessage;
|
|
7924
|
+
declare function isImageMessage(msg: WhatsAppMessage): msg is ImageMessage;
|
|
7925
|
+
declare function isVideoMessage(msg: WhatsAppMessage): msg is VideoMessage;
|
|
7926
|
+
declare function isAudioMessage(msg: WhatsAppMessage): msg is AudioMessage;
|
|
7927
|
+
declare function isDocumentMessage(msg: WhatsAppMessage): msg is DocumentMessage;
|
|
7928
|
+
declare function isStickerMessage(msg: WhatsAppMessage): msg is StickerMessage;
|
|
7929
|
+
declare function isInteractiveMessage(msg: WhatsAppMessage): msg is InteractiveMessage;
|
|
7930
|
+
declare function isButtonMessage(msg: WhatsAppMessage): msg is ButtonMessage;
|
|
7931
|
+
declare function isLocationMessage(msg: WhatsAppMessage): msg is LocationMessage;
|
|
7932
|
+
declare function isContactsMessage(msg: WhatsAppMessage): msg is ContactsMessage;
|
|
7933
|
+
declare function isReactionMessage(msg: WhatsAppMessage): msg is ReactionMessage;
|
|
7934
|
+
declare function isOrderMessage(msg: WhatsAppMessage): msg is OrderMessage;
|
|
7935
|
+
declare function isSystemMessage(msg: WhatsAppMessage): msg is SystemMessage;
|
|
7936
|
+
declare function isButtonReply(msg: WhatsAppMessage): msg is InteractiveButtonReplyMessage;
|
|
7937
|
+
declare function isListReply(msg: WhatsAppMessage): msg is InteractiveListReplyMessage;
|
|
7938
|
+
declare function isNfmReply(msg: WhatsAppMessage): msg is InteractiveNfmReplyMessage;
|
|
7939
|
+
type MediaInfo = {
|
|
7940
|
+
id: string;
|
|
7941
|
+
mimeType: string;
|
|
7942
|
+
sha256: string;
|
|
7943
|
+
caption?: string;
|
|
7944
|
+
filename?: string;
|
|
7945
|
+
animated?: boolean;
|
|
7946
|
+
voice?: boolean;
|
|
7947
|
+
};
|
|
7948
|
+
/**
|
|
7949
|
+
* Extract media info from image/video/audio/document/sticker messages.
|
|
7950
|
+
* Returns null if the message is not a media message.
|
|
7951
|
+
*
|
|
7952
|
+
* @example
|
|
7953
|
+
* ```ts
|
|
7954
|
+
* const media = getMediaInfo(message);
|
|
7955
|
+
* if (media) {
|
|
7956
|
+
* const url = await sdk.media.get(media.id);
|
|
7957
|
+
* }
|
|
7958
|
+
* ```
|
|
7959
|
+
*/
|
|
7960
|
+
declare function getMediaInfo(msg: WhatsAppMessage): MediaInfo | null;
|
|
7961
|
+
type InteractiveReply = {
|
|
7962
|
+
type: 'button_reply' | 'list_reply' | 'nfm_reply';
|
|
7963
|
+
id: string;
|
|
7964
|
+
title: string;
|
|
7965
|
+
description?: string;
|
|
7966
|
+
responseJson?: string;
|
|
7967
|
+
};
|
|
7968
|
+
/**
|
|
7969
|
+
* Extract the user's selection from interactive messages (button reply, list reply, nfm reply).
|
|
7970
|
+
* Returns null if not an interactive message.
|
|
7971
|
+
*
|
|
7972
|
+
* @example
|
|
7973
|
+
* ```ts
|
|
7974
|
+
* const reply = getInteractiveReply(message);
|
|
7975
|
+
* if (reply) {
|
|
7976
|
+
* console.log(`User selected: ${reply.title} (id: ${reply.id})`);
|
|
7977
|
+
* }
|
|
7978
|
+
* ```
|
|
7979
|
+
*/
|
|
7980
|
+
declare function getInteractiveReply(msg: WhatsAppMessage): InteractiveReply | null;
|
|
7981
|
+
type LocationInfo = {
|
|
7982
|
+
latitude: number;
|
|
7983
|
+
longitude: number;
|
|
7984
|
+
name?: string;
|
|
7985
|
+
address?: string;
|
|
7986
|
+
url?: string;
|
|
7987
|
+
};
|
|
7988
|
+
/**
|
|
7989
|
+
* Extract location data from a location message.
|
|
7990
|
+
* Returns null if not a location message.
|
|
7991
|
+
*/
|
|
7992
|
+
declare function getLocationInfo(msg: WhatsAppMessage): LocationInfo | null;
|
|
7993
|
+
type ContactInfo = {
|
|
7994
|
+
formattedName: string;
|
|
7995
|
+
firstName?: string;
|
|
7996
|
+
lastName?: string;
|
|
7997
|
+
phones: string[];
|
|
7998
|
+
emails: string[];
|
|
7999
|
+
};
|
|
8000
|
+
/**
|
|
8001
|
+
* Extract contact info from a contacts message.
|
|
8002
|
+
* Returns empty array if not a contacts message.
|
|
8003
|
+
*/
|
|
8004
|
+
declare function getContactsInfo(msg: WhatsAppMessage): ContactInfo[];
|
|
8005
|
+
type ReactionInfo = {
|
|
8006
|
+
messageId: string;
|
|
8007
|
+
emoji: string | null;
|
|
8008
|
+
};
|
|
8009
|
+
/**
|
|
8010
|
+
* Extract reaction data from a reaction message.
|
|
8011
|
+
* Returns null if not a reaction message.
|
|
8012
|
+
*/
|
|
8013
|
+
declare function getReactionInfo(msg: WhatsAppMessage): ReactionInfo | null;
|
|
8014
|
+
type OrderInfo = {
|
|
8015
|
+
catalogId: string;
|
|
8016
|
+
text?: string;
|
|
8017
|
+
items: Array<{
|
|
8018
|
+
productId: string;
|
|
8019
|
+
quantity: number;
|
|
8020
|
+
price: number;
|
|
8021
|
+
currency: string;
|
|
8022
|
+
}>;
|
|
8023
|
+
};
|
|
8024
|
+
/**
|
|
8025
|
+
* Extract order data from an order message.
|
|
8026
|
+
* Returns null if not an order message.
|
|
8027
|
+
*/
|
|
8028
|
+
declare function getOrderInfo(msg: WhatsAppMessage): OrderInfo | null;
|
|
8029
|
+
//#endregion
|
|
7033
8030
|
//#region src/utils/buildFieldsQueryString.d.ts
|
|
7034
8031
|
declare function buildFieldsQueryString(fields?: string[] | string): string;
|
|
7035
8032
|
//#endregion
|
|
@@ -7098,5 +8095,5 @@ declare function isFlowErrorRequest(request: FlowEndpointRequest): request is Fl
|
|
|
7098
8095
|
*/
|
|
7099
8096
|
declare function isFlowPingRequest(request: FlowEndpointRequest): request is FlowHealthCheckRequest;
|
|
7100
8097
|
//#endregion
|
|
7101
|
-
export { AUTHORIZATION_ERROR_CODES, AcceptCallRequest, AccountMode, ApiPermissionErrorCode, AudioMediaObject, AudioMediaTypesEnum, AudioMessage, AudioMessageHandler, AudioProcessedMessage, AuthenticationTemplateOptions, BLOCK_USER_ERROR_CODES, BaseApiRequest, BaseApiResponse, BaseClass, BlockUserObject, BlockUsersApi, BlockUsersClass, BlockUsersRequest, BlockUsersResponse, BlockedUserInfo, BodyOptions, BusinessProfileApi, BusinessProfileClass, BusinessProfileData, BusinessProfileField, BusinessProfileFieldsParam, BusinessProfileResponse, BusinessVerticalEnum, ButtonMessage, ButtonMessageHandler, ButtonOptions, ButtonPositionEnum, ButtonProcessedMessage, CALLING_ERROR_CODES, CallAction, CallActionResponse, CallHours, CallHoursDay, CallHoursStatus, CallIconVisibility, CallPermission, CallPermissionAction, CallPermissionLimit, CallPermissionsResponse, CallSdpType, CallSession, CallbackPermissionStatus, CallingApi, CallingClass, CallingSettings, CallingSettingsResponse, CallingStatus, CarouselCard, CarouselOptions, CatalogButton, CatalogTemplateOptions, CategoryEnum, CodeVerificationStatus, CommerceApi, CommerceClass, CommerceSetting, CommerceSettingsResponse, ComponentTypes, ComponentTypesEnum, ContactObject, ContactsMessage, ContactsMessageHandler, ContactsProcessedMessage, ConversationTypesEnum, CopyCodeButton, CouponTemplateOptions, CreateFlowResponse, CreateQrCodeRequest, CreateUploadSessionParams, CurrencyCodesEnum, CurrencyParameter, Cursors, DataLocalizationRegionEnum, DateTimeParameter, DocumentMediaObject, DocumentMediaTypesEnum, DocumentMessage, DocumentMessageHandler, DocumentProcessedMessage, EncryptionApi, EncryptionClass, EncryptionKeyPair, EncryptionPublicKeyResponse, ErrorWebhookValue, ExpressRequest, ExpressResponse, ExpressWebhookConfig, FLOW_ERROR_CODES, FailedUserInfo, Flow, FlowActionEnum, FlowApi, FlowAsset, FlowAssetsResponse, FlowButton, FlowCategoryEnum, FlowClass, FlowDataExchangeRequest, FlowDataExchangeResponse, FlowDecryptedRequestResponse, FlowEncryptedRequestPayload, FlowEndpointRequest, FlowEndpointResponse, FlowErrorNotificationRequest, FlowErrorNotificationResponse, FlowHandler, FlowHealthCheckRequest, FlowHealthCheckResponse, FlowHttpRequest, FlowMigrationFailure, FlowMigrationResponse, FlowMigrationResult, FlowPreview, FlowPreviewResponse, FlowStatusEnum, FlowSuccessScreenResponse, FlowType, FlowTypeEnum, FlowValidationError, FlowValidationErrorPointer, FlowsListResponse, FooterOptions, GROUP_ERROR_CODES, GeneralHeaderInterface, GeneralMessageBody, GeneralRequestBody, GetUploadHandleParams, GroupCreateRequest, GroupCreateResponse, GroupInfoField, GroupInfoFieldsParam, GroupInfoResponse, GroupInviteLinkResponse, GroupJoinApprovalMode, GroupJoinRequest, GroupJoinRequestError, GroupJoinRequestFailure, GroupJoinRequestsActionResponse, GroupJoinRequestsResponse, GroupListParams, GroupListResponse, GroupMessage, GroupParticipant, GroupSettingsResponse, GroupsApi, GroupsClass, HeaderOptions, HealthStatus, HealthStatusEntity, HolidaySchedule, HttpMethodsEnum, HttpsClientClass, HttpsClientResponseClass, INTEGRITY_ERROR_CODES, ImageMediaObject, ImageMediaTypesEnum, ImageMessage, ImageMessageHandler, ImageProcessedMessage, InitiateCallRequest, InitiateCallResponse, InteractiveButtonReplyMessage, InteractiveListReplyMessage, InteractiveMessage, InteractiveMessageHandler, InteractiveObject, InteractiveProcessedMessage, InteractiveTypesEnum, LanguagesEnum, LimitedTimeOfferOptions, LimitedTimeOfferTemplateOptions, ListBlockedUsersParams, ListBlockedUsersResponse, LocationMessage, LocationMessageHandler, LocationObject, LocationParameter, LocationProcessedMessage, Logger, LoggerInterface, MPMButton, MPMTemplateOptions, MarketingMessageRequest, MarketingMessagesApi, MarketingMessagesClass, MediaApi, MediaCardCarouselTemplateOptions, MediaCarouselCard, MediaClass, MediaParameter, MediaResponse, MediasResponse, MessagesApi as MessageApi, MessagesApi, MessageHandler, MessageRequestBody, MessageRequestParams, MessageStatus, MessageTemplateObject, MessageTypesEnum, MessageWebhookValue, MessagesClass, MessagesResponse, MessagingLimitTier, MetaError, MetaErrorData, MetaErrorDetail, NextFunction, NextJsAppWebhookConfig, NextJsWebhookConfig, OTPButton, OTPTemplateOptions, OrderMessage, OrderMessageHandler, OrderProcessedMessage, Pagination, PaginationCursors, Paging, PagingCursors, PagingInfo, ParametersTypesEnum, PaymentConfiguration, PaymentConfigurationCode, PaymentConfigurationCreateRequest, PaymentConfigurationCreateResponse, PaymentConfigurationDeleteRequest, PaymentConfigurationOauthLinkRequest, PaymentConfigurationOauthLinkResponse, PaymentConfigurationProvider, PaymentConfigurationStatus, PaymentConfigurationUpdateRequest, PaymentConfigurationUpdateResponse, PaymentConfigurationsResponse, PaymentsApi, PaymentsClass, PhoneNumberApi, PhoneNumberButton, PhoneNumberClass, PhoneNumberResponse, PhoneNumbersResponse, PlatformType, PreAcceptCallRequest, ProcessedMessage, ProcessedStatus, ProductCardCarouselTemplateOptions, ProductCarouselCard, ProductParameter, ProductSection, QrCodeApi, QrCodeClass, QrCodeResponse, QrCodesResponse, QualityRating, QualityScore, QuickReplyButton, ReactionMessage, ReactionMessageHandler, ReactionParams, ReactionProcessedMessage, ReferralSourceTypesEnum, RegistrationApi, RegistrationClass, RegistrationRequest, RejectCallRequest, RequestCodeMethodsEnum, RequestVerificationCodeRequest, RequesterClass, RequesterResponseInterface, ResponseData, ResponseHeaderValue, ResponseHeaders, ResponseJSONBody, ResponsePagination, ResponseSuccess, SEND_MESSAGE_ERROR_CODES, SPMButton, SPMTemplateOptions, SipServer, SipSettings, SipStatus, StatusEnum, StatusHandler, StatusParams, StatusWebhook, StatusWebhookValue, StickerMediaObject, StickerMediaTypesEnum, StickerMessage, StickerMessageHandler, StickerProcessedMessage, SubTypeEnum, SystemChangeTypesEnum, SystemMessage, SystemMessageHandler, SystemProcessedMessage, THROTTLING_ERROR_CODES, TemplateApi, TemplateBody, TemplateButton, TemplateButtons, TemplateCarousel, TemplateClass, TemplateDeleteParams, TemplateFooter, TemplateFormat, TemplateGetParams, TemplateHeader, TemplateHeaderExample, TemplateLimitedTimeOffer, TemplateOptions, TemplateParameter, TemplateRequestBody, TemplateResponse, TemplateStatusEnum, TerminateCallRequest, TextMessage, TextMessageHandler, TextMessageParams, TextObject, TextParameter, TextProcessedMessage, Throughput, ThroughputLevel, TwoStepVerificationApi, TwoStepVerificationClass, TwoStepVerificationParams, TwoStepVerificationRequest, URLButton, UnblockUsersRequest, UnsupportedMessage, UpdateBusinessProfileRequest, UpdateCallingSettingsRequest, UpdateCommerceSettingsRequest, UpdateFlowResponse, UpdateGroupSettingsRequest, UpdateQrCodeRequest, UpdateWabaSubscription, UploadBusinessProfileResponse, UploadHandle, UploadMediaParams, UploadMediaResponse, UploadSession, UploadSessionResponse, ValidateFlowJsonResponse, VerifyCodeRequest, VideoMediaObject, VideoMediaTypesEnum, VideoMessage, VideoMessageHandler, VideoProcessedMessage, WABAClass, WHATSAPP_ERROR_CODES, WabaAccount, WabaAccountFields, WabaAccountFieldsParam, WabaAccountReviewStatus, WabaAccountStatus, WabaApi, WabaBusinessVerificationStatus, WabaConfigEnum, WabaConfigType, WabaHealthStatus, WabaHealthStatusCanSendMessage, WabaHealthStatusEntity, WabaHealthStatusError, WabaSubscription, WabaSubscriptions, WebhookContact, WebhookEvent, WebhookMessage, WebhookPayload, WebhookProcessor, WebhookResponse, WebhookTypesEnum, WebhookValue, WeeklyOperatingHours, WhatsApp, WhatsAppApiError, WhatsAppAuthorizationError, WhatsAppBlockUserError, WhatsAppCallingError, WhatsAppConfig, WhatsAppError, WhatsAppErrorCode, WhatsAppFlowError, WhatsAppGroupError, WhatsAppIntegrityError, WhatsAppMessage, WhatsAppNetworkError, WhatsAppSendMessageError, WhatsAppThrottlingError, WhatsAppUnknownError, buildFieldsQueryString, constructFullUrl, createAuthenticationTemplate, createCatalogTemplate, createCouponTemplate, createLimitedTimeOfferTemplate, createMPMTemplate, createMediaCardCarouselTemplate, createOTPTemplate, createProductCardCarouselTemplate, createSPMTemplate, createTemplate, createWhatsAppApiError, decryptFlowRequest, encryptFlowResponse, expressWebhookHandler, formatConfigTable, generateEncryption, generateXHub256Sig, isApiPermissionErrorCode, isAuthorizationErrorCode, isBlockUserErrorCode, isCallingErrorCode, isFlowDataExchangeRequest, isFlowErrorCode, isFlowErrorRequest, isFlowPingRequest, isGroupErrorCode, isIntegrityErrorCode, isMetaError, isSendMessageErrorCode, isThrottlingErrorCode, isWhatsAppApiErrorResponse, isWhatsAppAuthorizationError, isWhatsAppBlockUserError, isWhatsAppCallingError, isWhatsAppErrorCode, isWhatsAppFlowError, isWhatsAppGroupError, isWhatsAppIntegrityError, isWhatsAppSendMessageError, isWhatsAppThrottlingError, nextjsAppWebhookHandler, nextjsPagesWebhookHandler, normalizeMetaError, objectToQueryString, processFlowRequest, processWebhookMessages };
|
|
8098
|
+
export { AUTHORIZATION_ERROR_CODES, AcceptCallRequest, AccountMode, ApiPermissionErrorCode, AudioMediaObject, AudioMediaTypesEnum, AudioMessage, AudioMessageHandler, AudioProcessedMessage, AuthenticationTemplateOptions, BLOCK_USER_ERROR_CODES, BaseApiRequest, BaseApiResponse, BaseClass, BlockUserObject, BlockUsersApi, BlockUsersClass, BlockUsersRequest, BlockUsersResponse, BlockedUserInfo, BodyOptions, BusinessProfileApi, BusinessProfileClass, BusinessProfileData, BusinessProfileField, BusinessProfileFieldsParam, BusinessProfileResponse, BusinessVerticalEnum, ButtonMessage, ButtonMessageHandler, ButtonOptions, ButtonPositionEnum, ButtonProcessedMessage, CALLING_ERROR_CODES, CallAction, CallActionResponse, CallHours, CallHoursDay, CallHoursStatus, CallIconVisibility, CallPermission, CallPermissionAction, CallPermissionLimit, CallPermissionsResponse, CallSdpType, CallSession, CallbackPermissionStatus, CallingApi, CallingClass, CallingSettings, CallingSettingsResponse, CallingStatus, CarouselCard, CarouselOptions, CatalogButton, CatalogTemplateOptions, CategoryEnum, CodeVerificationStatus, CommerceApi, CommerceClass, CommerceSetting, CommerceSettingsResponse, ComponentTypes, ComponentTypesEnum, ContactInfo, ContactObject, ContactsMessage, ContactsMessageHandler, ContactsProcessedMessage, ConversationTypesEnum, CopyCodeButton, CouponTemplateOptions, CreateFlowResponse, CreateQrCodeRequest, CreateUploadSessionParams, CurrencyCodesEnum, CurrencyParameter, Cursors, DataLocalizationRegionEnum, DateTimeParameter, DocumentMediaObject, DocumentMediaTypesEnum, DocumentMessage, DocumentMessageHandler, DocumentProcessedMessage, EncryptionApi, EncryptionClass, EncryptionKeyPair, EncryptionPublicKeyResponse, ErrorWebhookValue, ExpressRequest, ExpressResponse, ExpressWebhookConfig, FLOW_ERROR_CODES, FailedUserInfo, Flow, FlowActionEnum, FlowApi, FlowAsset, FlowAssetsResponse, FlowButton, FlowCategoryEnum, FlowClass, FlowDataExchangeRequest, FlowDataExchangeResponse, FlowDecryptedRequestResponse, FlowEncryptedRequestPayload, FlowEndpointRequest, FlowEndpointResponse, FlowErrorNotificationRequest, FlowErrorNotificationResponse, FlowHandler, FlowHealthCheckRequest, FlowHealthCheckResponse, FlowHttpRequest, FlowMigrationFailure, FlowMigrationResponse, FlowMigrationResult, FlowPreview, FlowPreviewResponse, FlowStatusEnum, FlowSuccessScreenResponse, FlowType, FlowTypeEnum, FlowValidationError, FlowValidationErrorPointer, FlowsListResponse, FooterOptions, GROUP_ERROR_CODES, GeneralHeaderInterface, GeneralMessageBody, GeneralRequestBody, GetUploadHandleParams, GroupCreateRequest, GroupCreateResponse, GroupInfoField, GroupInfoFieldsParam, GroupInfoResponse, GroupInviteLinkResponse, GroupJoinApprovalMode, GroupJoinRequest, GroupJoinRequestError, GroupJoinRequestFailure, GroupJoinRequestsActionResponse, GroupJoinRequestsResponse, GroupListParams, GroupListResponse, GroupMessage, GroupParticipant, GroupSettingsResponse, GroupsApi, GroupsClass, HeaderOptions, HealthStatus, HealthStatusEntity, HolidaySchedule, HttpMethodsEnum, HttpsClientClass, HttpsClientResponseClass, INTEGRITY_ERROR_CODES, ImageMediaObject, ImageMediaTypesEnum, ImageMessage, ImageMessageHandler, ImageProcessedMessage, InitiateCallRequest, InitiateCallResponse, InteractiveButtonReplyMessage, InteractiveListReplyMessage, InteractiveMessage, InteractiveMessageHandler, InteractiveObject, InteractiveProcessedMessage, InteractiveReply, InteractiveTypesEnum, LanguagesEnum, LimitedTimeOfferOptions, LimitedTimeOfferTemplateOptions, ListBlockedUsersParams, ListBlockedUsersResponse, LocationInfo, LocationMessage, LocationMessageHandler, LocationObject, LocationParameter, LocationProcessedMessage, Logger, LoggerInterface, MPMButton, MPMTemplateOptions, MarketingMessageRequest, MarketingMessagesApi, MarketingMessagesClass, MediaApi, MediaCardCarouselTemplateOptions, MediaCarouselCard, MediaClass, MediaInfo, MediaParameter, MediaResponse, MediasResponse, MessagesApi as MessageApi, MessagesApi, MessageHandler, MessageRequestBody, MessageRequestParams, MessageStatus, MessageTemplateObject, MessageTypesEnum, MessageWebhookValue, MessagesClass, MessagesResponse, MessagingLimitTier, MetaError, MetaErrorData, MetaErrorDetail, NextFunction, NextJsAppWebhookConfig, NextJsWebhookConfig, OTPButton, OTPTemplateOptions, OrderInfo, OrderMessage, OrderMessageHandler, OrderProcessedMessage, Pagination, PaginationCursors, Paging, PagingCursors, PagingInfo, ParametersTypesEnum, PaymentConfiguration, PaymentConfigurationCode, PaymentConfigurationCreateRequest, PaymentConfigurationCreateResponse, PaymentConfigurationDeleteRequest, PaymentConfigurationOauthLinkRequest, PaymentConfigurationOauthLinkResponse, PaymentConfigurationProvider, PaymentConfigurationStatus, PaymentConfigurationUpdateRequest, PaymentConfigurationUpdateResponse, PaymentConfigurationsResponse, PaymentsApi, PaymentsClass, PhoneNumberApi, PhoneNumberButton, PhoneNumberClass, PhoneNumberResponse, PhoneNumbersResponse, PlatformType, PreAcceptCallRequest, ProcessedMessage, ProcessedStatus, ProductCardCarouselTemplateOptions, ProductCarouselCard, ProductParameter, ProductSection, QrCodeApi, QrCodeClass, QrCodeResponse, QrCodesResponse, QualityRating, QualityScore, QuickReplyButton, ReactionInfo, ReactionMessage, ReactionMessageHandler, ReactionParams, ReactionProcessedMessage, ReferralSourceTypesEnum, RegistrationApi, RegistrationClass, RegistrationRequest, RejectCallRequest, RequestCodeMethodsEnum, RequestVerificationCodeRequest, RequesterClass, RequesterResponseInterface, ResponseData, ResponseHeaderValue, ResponseHeaders, ResponseJSONBody, ResponsePagination, ResponseSuccess, SEND_MESSAGE_ERROR_CODES, SPMButton, SPMTemplateOptions, SipServer, SipSettings, SipStatus, StatusEnum, StatusHandler, StatusParams, StatusWebhook, StatusWebhookValue, StickerMediaObject, StickerMediaTypesEnum, StickerMessage, StickerMessageHandler, StickerProcessedMessage, SubTypeEnum, SystemChangeTypesEnum, SystemMessage, SystemMessageHandler, SystemProcessedMessage, THROTTLING_ERROR_CODES, TemplateApi, TemplateBody, TemplateButton, TemplateButtons, TemplateCarousel, TemplateClass, TemplateDeleteParams, TemplateFooter, TemplateFormat, TemplateGetParams, TemplateHeader, TemplateHeaderExample, TemplateLimitedTimeOffer, TemplateOptions, TemplateParameter, TemplateRequestBody, TemplateResponse, TemplateStatusEnum, TerminateCallRequest, TextMessage, TextMessageHandler, TextMessageParams, TextObject, TextParameter, TextProcessedMessage, Throughput, ThroughputLevel, TwoStepVerificationApi, TwoStepVerificationClass, TwoStepVerificationParams, TwoStepVerificationRequest, URLButton, UnblockUsersRequest, UnsupportedMessage, UpdateBusinessProfileRequest, UpdateCallingSettingsRequest, UpdateCommerceSettingsRequest, UpdateFlowResponse, UpdateGroupSettingsRequest, UpdateQrCodeRequest, UpdateWabaSubscription, UploadBusinessProfileResponse, UploadHandle, UploadMediaParams, UploadMediaResponse, UploadSession, UploadSessionResponse, ValidateFlowJsonResponse, VerifyCodeRequest, VideoMediaObject, VideoMediaTypesEnum, VideoMessage, VideoMessageHandler, VideoProcessedMessage, WABAClass, WHATSAPP_ERROR_CODES, WabaAccount, WabaAccountFields, WabaAccountFieldsParam, WabaAccountReviewStatus, WabaAccountStatus, WabaApi, WabaBusinessVerificationStatus, WabaConfigEnum, WabaConfigType, WabaHealthStatus, WabaHealthStatusCanSendMessage, WabaHealthStatusEntity, WabaHealthStatusError, WabaSubscription, WabaSubscriptions, WebhookContact, WebhookEvent, WebhookMessage, WebhookPayload, WebhookProcessor, WebhookResponse, WebhookTypesEnum, WebhookValue, WeeklyOperatingHours, WhatsApp, WhatsAppApiError, WhatsAppAuthorizationError, WhatsAppBlockUserError, WhatsAppCallingError, WhatsAppConfig, WhatsAppError, WhatsAppErrorCode, WhatsAppFlowError, WhatsAppGroupError, WhatsAppIntegrityError, WhatsAppMessage, WhatsAppNetworkError, WhatsAppSendMessageError, WhatsAppThrottlingError, WhatsAppUnknownError, 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 };
|
|
7102
8099
|
//# sourceMappingURL=index.d.ts.map
|