meta-cloud-api 2.2.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/dist/index.d.ts CHANGED
@@ -2881,43 +2881,135 @@ interface WABAClass {
2881
2881
  //#endregion
2882
2882
  //#region src/core/webhook/types/account.d.ts
2883
2883
  /**
2884
- * Account update event types
2885
- * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#value--event
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 = 'VERIFIED_ACCOUNT' | 'DISABLED_UPDATE' | 'ACCOUNT_VIOLATION' | 'ACCOUNT_RESTRICTION' | 'ACCOUNT_DELETED' | 'PARTNER_REMOVED' | 'PARTNER_APP_UNINSTALLED';
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
- waba_ban_date?: number;
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 | PhoneNumberNameUpdateWebhookValue | PhoneNumberQualityUpdateWebhookValue | MessageTemplateStatusUpdateWebhookValue | TemplateCategoryUpdateWebhookValue | MessageTemplateQualityUpdateWebhookValue | FlowsWebhookValue | SecurityWebhookValue | HistoryWebhookValue | SmbMessageEchoesWebhookValue | SmbAppStateSyncWebhookValue;
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<{
@@ -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,6 +7569,23 @@ 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>;
@@ -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
  }