@zernio/node 0.2.951 → 0.2.953
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 +5 -0
- package/dist/index.d.mts +210 -49
- package/dist/index.d.ts +210 -49
- package/dist/index.js +13 -1
- package/dist/index.mjs +13 -1
- package/package.json +1 -1
- package/src/client.ts +8 -0
- package/src/generated/sdk.gen.ts +23 -1
- package/src/generated/types.gen.ts +215 -48
|
@@ -4585,6 +4585,20 @@ export type FacebookSettings = {
|
|
|
4585
4585
|
textFormatPresetId?: string;
|
|
4586
4586
|
};
|
|
4587
4587
|
|
|
4588
|
+
export type FeedbackReceipt = {
|
|
4589
|
+
/**
|
|
4590
|
+
* Feedback id. Quote it if you follow up with support.
|
|
4591
|
+
*/
|
|
4592
|
+
id?: string;
|
|
4593
|
+
status?: 'received';
|
|
4594
|
+
/**
|
|
4595
|
+
* True when this matched a submission with the same summary from the last 24 hours.
|
|
4596
|
+
*/
|
|
4597
|
+
duplicate?: boolean;
|
|
4598
|
+
};
|
|
4599
|
+
|
|
4600
|
+
export type status11 = 'received';
|
|
4601
|
+
|
|
4588
4602
|
export type FollowerStatsResponse = {
|
|
4589
4603
|
accounts?: Array<AccountWithFollowerStats>;
|
|
4590
4604
|
stats?: {
|
|
@@ -4708,7 +4722,7 @@ export type GoogleAdLabel = {
|
|
|
4708
4722
|
description?: (string) | null;
|
|
4709
4723
|
};
|
|
4710
4724
|
|
|
4711
|
-
export type
|
|
4725
|
+
export type status12 = 'ENABLED' | 'REMOVED' | 'UNKNOWN';
|
|
4712
4726
|
|
|
4713
4727
|
/**
|
|
4714
4728
|
* At least one id across the four target lists. Up to 1000 ids per list.
|
|
@@ -4806,7 +4820,7 @@ export type GoogleAdsManagerLink = {
|
|
|
4806
4820
|
/**
|
|
4807
4821
|
* Status the link has after this call.
|
|
4808
4822
|
*/
|
|
4809
|
-
export type
|
|
4823
|
+
export type status13 = 'PENDING' | 'ACTIVE' | 'REFUSED' | 'CANCELED' | 'INACTIVE';
|
|
4810
4824
|
|
|
4811
4825
|
/**
|
|
4812
4826
|
* Link one asset to the asset group. Send exactly one of asset (an existing asset), text, imageUrl or youtubeVideoId (new content, created in the same request).
|
|
@@ -5603,7 +5617,7 @@ export type kind = 'phone' | 'email';
|
|
|
5603
5617
|
|
|
5604
5618
|
export type region = 'US' | 'GB';
|
|
5605
5619
|
|
|
5606
|
-
export type
|
|
5620
|
+
export type status14 = 'ordering' | 'activating' | 'active' | 'suspended' | 'canceled' | 'failed';
|
|
5607
5621
|
|
|
5608
5622
|
/**
|
|
5609
5623
|
* Attachment snapshot inside an edit-history entry.
|
|
@@ -5675,7 +5689,7 @@ export type InboxWebhookConversation = {
|
|
|
5675
5689
|
contactId?: string;
|
|
5676
5690
|
};
|
|
5677
5691
|
|
|
5678
|
-
export type
|
|
5692
|
+
export type status15 = 'active' | 'archived';
|
|
5679
5693
|
|
|
5680
5694
|
/**
|
|
5681
5695
|
* The conversation object included in conversation lifecycle webhook payloads (conversation.started, conversation.control_changed).
|
|
@@ -7262,7 +7276,7 @@ export type OwnedPhoneNumber = {
|
|
|
7262
7276
|
}>;
|
|
7263
7277
|
};
|
|
7264
7278
|
|
|
7265
|
-
export type
|
|
7279
|
+
export type status16 = 'pending_payment' | 'pending_regulatory' | 'regulatory_declined' | 'provisioning' | 'verifying' | 'active' | 'suspended' | 'releasing' | 'released';
|
|
7266
7280
|
|
|
7267
7281
|
export type metaVerificationStatus = 'pending' | 'code_requested' | 'verified' | 'expired';
|
|
7268
7282
|
|
|
@@ -7387,7 +7401,7 @@ export type PlatformAnalytics = {
|
|
|
7387
7401
|
errorMessage?: (string) | null;
|
|
7388
7402
|
};
|
|
7389
7403
|
|
|
7390
|
-
export type
|
|
7404
|
+
export type status17 = 'published' | 'failed';
|
|
7391
7405
|
|
|
7392
7406
|
/**
|
|
7393
7407
|
* Sync state of analytics for this platform
|
|
@@ -7789,7 +7803,7 @@ export type Product = {
|
|
|
7789
7803
|
|
|
7790
7804
|
export type platform8 = 'shopify';
|
|
7791
7805
|
|
|
7792
|
-
export type
|
|
7806
|
+
export type status18 = 'active' | 'draft' | 'archived';
|
|
7793
7807
|
|
|
7794
7808
|
export type ProductImage = {
|
|
7795
7809
|
url?: string;
|
|
@@ -9065,7 +9079,7 @@ export type UploadTokenResponse = {
|
|
|
9065
9079
|
status?: 'pending' | 'completed' | 'expired';
|
|
9066
9080
|
};
|
|
9067
9081
|
|
|
9068
|
-
export type
|
|
9082
|
+
export type status19 = 'pending' | 'completed' | 'expired';
|
|
9069
9083
|
|
|
9070
9084
|
export type UploadTokenStatusResponse = {
|
|
9071
9085
|
token?: string;
|
|
@@ -9564,7 +9578,7 @@ export type Verification = {
|
|
|
9564
9578
|
resend?: boolean;
|
|
9565
9579
|
};
|
|
9566
9580
|
|
|
9567
|
-
export type
|
|
9581
|
+
export type status20 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
|
|
9568
9582
|
|
|
9569
9583
|
export type channel4 = 'sms';
|
|
9570
9584
|
|
|
@@ -9591,7 +9605,7 @@ export type Webhook = {
|
|
|
9591
9605
|
/**
|
|
9592
9606
|
* Events subscribed to
|
|
9593
9607
|
*/
|
|
9594
|
-
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated')>;
|
|
9608
|
+
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated')>;
|
|
9595
9609
|
/**
|
|
9596
9610
|
* Whether webhook delivery is enabled
|
|
9597
9611
|
*/
|
|
@@ -9624,6 +9638,28 @@ export type Webhook = {
|
|
|
9624
9638
|
accountIds?: Array<(string)>;
|
|
9625
9639
|
};
|
|
9626
9640
|
|
|
9641
|
+
export type WebhookAdsSyncAccount = {
|
|
9642
|
+
/**
|
|
9643
|
+
* The ads connection's account ID (same as used in /v1/accounts/{accountId})
|
|
9644
|
+
*/
|
|
9645
|
+
accountId: string;
|
|
9646
|
+
profileId: string;
|
|
9647
|
+
/**
|
|
9648
|
+
* The ads connection platform, e.g. metaads, googleads, tiktokads, linkedinads
|
|
9649
|
+
*/
|
|
9650
|
+
platform: string;
|
|
9651
|
+
username: string;
|
|
9652
|
+
displayName?: (string) | null;
|
|
9653
|
+
};
|
|
9654
|
+
|
|
9655
|
+
export type WebhookAdsSyncAdAccount = {
|
|
9656
|
+
/**
|
|
9657
|
+
* The platform ad account ID, e.g. act_1489036928764209 on Meta
|
|
9658
|
+
*/
|
|
9659
|
+
platformAdAccountId: string;
|
|
9660
|
+
name: (string) | null;
|
|
9661
|
+
};
|
|
9662
|
+
|
|
9627
9663
|
/**
|
|
9628
9664
|
* A single webhook delivery attempt recorded by Zernio (30-day retention).
|
|
9629
9665
|
*/
|
|
@@ -9691,7 +9727,7 @@ export type WebhookLog = {
|
|
|
9691
9727
|
/**
|
|
9692
9728
|
* Delivery outcome
|
|
9693
9729
|
*/
|
|
9694
|
-
export type
|
|
9730
|
+
export type status21 = 'success' | 'failed';
|
|
9695
9731
|
|
|
9696
9732
|
/**
|
|
9697
9733
|
* Webhook payload for `account.ads.initial_sync_completed` events.
|
|
@@ -9803,7 +9839,7 @@ export type event = 'account.ads.initial_sync_completed';
|
|
|
9803
9839
|
/**
|
|
9804
9840
|
* Overall outcome of the initial sync.
|
|
9805
9841
|
*/
|
|
9806
|
-
export type
|
|
9842
|
+
export type status22 = 'success' | 'failure';
|
|
9807
9843
|
|
|
9808
9844
|
/**
|
|
9809
9845
|
* Stable category for UX branching. New values may be added; existing ones are
|
|
@@ -9821,6 +9857,85 @@ export type status21 = 'success' | 'failure';
|
|
|
9821
9857
|
*/
|
|
9822
9858
|
export type errorCategory2 = 'token_invalid' | 'permission_denied' | 'no_ad_accounts' | 'rate_limited' | 'discovery_failed' | 'unknown';
|
|
9823
9859
|
|
|
9860
|
+
/**
|
|
9861
|
+
* Webhook payload for `account.ads.sync_failed` events. Fired once per ad account
|
|
9862
|
+
* when its ads stop syncing: no successful sync for 24 hours, or every live ad in it
|
|
9863
|
+
* at the retry cap. It does not fire again for the same ad account until
|
|
9864
|
+
* `account.ads.sync_recovered`. Metrics for the ad account are stale meanwhile.
|
|
9865
|
+
*
|
|
9866
|
+
*/
|
|
9867
|
+
export type WebhookPayloadAccountAdsSyncFailed = {
|
|
9868
|
+
/**
|
|
9869
|
+
* Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery.
|
|
9870
|
+
*/
|
|
9871
|
+
id: string;
|
|
9872
|
+
event: 'account.ads.sync_failed';
|
|
9873
|
+
account: WebhookAdsSyncAccount;
|
|
9874
|
+
adAccount: WebhookAdsSyncAdAccount;
|
|
9875
|
+
sync: {
|
|
9876
|
+
lastSuccessfulSyncAt: string;
|
|
9877
|
+
/**
|
|
9878
|
+
* Consecutive failed sync attempts on the ad account's ads.
|
|
9879
|
+
*/
|
|
9880
|
+
failureCount: number;
|
|
9881
|
+
/**
|
|
9882
|
+
* ad_account_not_listed = the platform no longer returns the ad account to this
|
|
9883
|
+
* connection (access removed, or a platform-side change); sync_error = the platform
|
|
9884
|
+
* returned an error, see `error`; stale = no sync succeeded and no error was
|
|
9885
|
+
* recorded. New values may be added.
|
|
9886
|
+
*
|
|
9887
|
+
*/
|
|
9888
|
+
errorCategory: 'ad_account_not_listed' | 'sync_error' | 'stale';
|
|
9889
|
+
/**
|
|
9890
|
+
* Human-readable detail, for display and debugging. Branch on errorCategory.
|
|
9891
|
+
*/
|
|
9892
|
+
error: string;
|
|
9893
|
+
};
|
|
9894
|
+
/**
|
|
9895
|
+
* UTC time at which Zernio generated this event. Retries and redeliveries keep the original value.
|
|
9896
|
+
*/
|
|
9897
|
+
timestamp: string;
|
|
9898
|
+
};
|
|
9899
|
+
|
|
9900
|
+
export type event2 = 'account.ads.sync_failed';
|
|
9901
|
+
|
|
9902
|
+
/**
|
|
9903
|
+
* ad_account_not_listed = the platform no longer returns the ad account to this
|
|
9904
|
+
* connection (access removed, or a platform-side change); sync_error = the platform
|
|
9905
|
+
* returned an error, see `error`; stale = no sync succeeded and no error was
|
|
9906
|
+
* recorded. New values may be added.
|
|
9907
|
+
*
|
|
9908
|
+
*/
|
|
9909
|
+
export type errorCategory3 = 'ad_account_not_listed' | 'sync_error' | 'stale';
|
|
9910
|
+
|
|
9911
|
+
/**
|
|
9912
|
+
* Webhook payload for `account.ads.sync_recovered` events. Fired once when an ad account
|
|
9913
|
+
* previously reported by `account.ads.sync_failed` syncs successfully again.
|
|
9914
|
+
*
|
|
9915
|
+
*/
|
|
9916
|
+
export type WebhookPayloadAccountAdsSyncRecovered = {
|
|
9917
|
+
/**
|
|
9918
|
+
* Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery.
|
|
9919
|
+
*/
|
|
9920
|
+
id: string;
|
|
9921
|
+
event: 'account.ads.sync_recovered';
|
|
9922
|
+
account: WebhookAdsSyncAccount;
|
|
9923
|
+
adAccount: WebhookAdsSyncAdAccount;
|
|
9924
|
+
sync: {
|
|
9925
|
+
lastSuccessfulSyncAt: string;
|
|
9926
|
+
/**
|
|
9927
|
+
* The last successful sync before the failure started.
|
|
9928
|
+
*/
|
|
9929
|
+
failingSince: string;
|
|
9930
|
+
};
|
|
9931
|
+
/**
|
|
9932
|
+
* UTC time at which Zernio generated this event. Retries and redeliveries keep the original value.
|
|
9933
|
+
*/
|
|
9934
|
+
timestamp: string;
|
|
9935
|
+
};
|
|
9936
|
+
|
|
9937
|
+
export type event3 = 'account.ads.sync_recovered';
|
|
9938
|
+
|
|
9824
9939
|
/**
|
|
9825
9940
|
* Webhook payload for account connected events
|
|
9826
9941
|
*/
|
|
@@ -9849,7 +9964,7 @@ export type WebhookPayloadAccountConnected = {
|
|
|
9849
9964
|
timestamp: string;
|
|
9850
9965
|
};
|
|
9851
9966
|
|
|
9852
|
-
export type
|
|
9967
|
+
export type event4 = 'account.connected';
|
|
9853
9968
|
|
|
9854
9969
|
/**
|
|
9855
9970
|
* Webhook payload for account disconnected events
|
|
@@ -9887,7 +10002,7 @@ export type WebhookPayloadAccountDisconnected = {
|
|
|
9887
10002
|
timestamp: string;
|
|
9888
10003
|
};
|
|
9889
10004
|
|
|
9890
|
-
export type
|
|
10005
|
+
export type event5 = 'account.disconnected';
|
|
9891
10006
|
|
|
9892
10007
|
/**
|
|
9893
10008
|
* Whether the disconnection was intentional (user action) or unintentional (token expired/revoked)
|
|
@@ -10008,7 +10123,7 @@ export type WebhookPayloadAdStatusChanged = {
|
|
|
10008
10123
|
timestamp: string;
|
|
10009
10124
|
};
|
|
10010
10125
|
|
|
10011
|
-
export type
|
|
10126
|
+
export type event6 = 'ad.status_changed';
|
|
10012
10127
|
|
|
10013
10128
|
/**
|
|
10014
10129
|
* Hierarchy level the status applies to. Mirrors Meta's `level`. Creative-level events are not forwarded.
|
|
@@ -10086,7 +10201,7 @@ export type WebhookPayloadAnalyticsSynced = {
|
|
|
10086
10201
|
timestamp: string;
|
|
10087
10202
|
};
|
|
10088
10203
|
|
|
10089
|
-
export type
|
|
10204
|
+
export type event7 = 'analytics.synced';
|
|
10090
10205
|
|
|
10091
10206
|
/**
|
|
10092
10207
|
* Webhook payload for the `call.ended` event. Fires on call hangup
|
|
@@ -10156,7 +10271,7 @@ export type WebhookPayloadCallEnded = {
|
|
|
10156
10271
|
timestamp: string;
|
|
10157
10272
|
};
|
|
10158
10273
|
|
|
10159
|
-
export type
|
|
10274
|
+
export type event8 = 'call.ended';
|
|
10160
10275
|
|
|
10161
10276
|
/**
|
|
10162
10277
|
* Webhook payload for the `call.failed` event. Fired when a call
|
|
@@ -10190,7 +10305,7 @@ export type WebhookPayloadCallFailed = {
|
|
|
10190
10305
|
timestamp: string;
|
|
10191
10306
|
};
|
|
10192
10307
|
|
|
10193
|
-
export type
|
|
10308
|
+
export type event9 = 'call.failed';
|
|
10194
10309
|
|
|
10195
10310
|
/**
|
|
10196
10311
|
* Webhook payload for the `call.permission_request` event. Fires
|
|
@@ -10227,7 +10342,7 @@ export type WebhookPayloadCallPermissionRequest = {
|
|
|
10227
10342
|
timestamp: string;
|
|
10228
10343
|
};
|
|
10229
10344
|
|
|
10230
|
-
export type
|
|
10345
|
+
export type event10 = 'call.permission_request';
|
|
10231
10346
|
|
|
10232
10347
|
export type response = 'accept' | 'reject';
|
|
10233
10348
|
|
|
@@ -10281,7 +10396,7 @@ export type WebhookPayloadCallReceived = {
|
|
|
10281
10396
|
timestamp: string;
|
|
10282
10397
|
};
|
|
10283
10398
|
|
|
10284
|
-
export type
|
|
10399
|
+
export type event11 = 'call.received';
|
|
10285
10400
|
|
|
10286
10401
|
/**
|
|
10287
10402
|
* Webhook payload for comment received events (Instagram, Facebook, Threads, YouTube, LinkedIn, Bluesky, Reddit, TikTok). X/Twitter does NOT fire this event. TikTok events carry only the author id: the comment.update webhook has no username, picture or owner flag.
|
|
@@ -10437,7 +10552,7 @@ export type WebhookPayloadComment = {
|
|
|
10437
10552
|
timestamp: string;
|
|
10438
10553
|
};
|
|
10439
10554
|
|
|
10440
|
-
export type
|
|
10555
|
+
export type event12 = 'comment.received';
|
|
10441
10556
|
|
|
10442
10557
|
export type platform12 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
|
|
10443
10558
|
|
|
@@ -10475,7 +10590,7 @@ export type WebhookPayloadConversationControlChanged = {
|
|
|
10475
10590
|
timestamp: string;
|
|
10476
10591
|
};
|
|
10477
10592
|
|
|
10478
|
-
export type
|
|
10593
|
+
export type event13 = 'conversation.control_changed';
|
|
10479
10594
|
|
|
10480
10595
|
/**
|
|
10481
10596
|
* Who answers now. ai_agent: Meta Business Agent; app: you; other: another partner app on the number.
|
|
@@ -10512,7 +10627,7 @@ export type WebhookPayloadConversationStarted = {
|
|
|
10512
10627
|
timestamp: string;
|
|
10513
10628
|
};
|
|
10514
10629
|
|
|
10515
|
-
export type
|
|
10630
|
+
export type event14 = 'conversation.started';
|
|
10516
10631
|
|
|
10517
10632
|
/**
|
|
10518
10633
|
* Webhook payload for post.external.created / post.external.updated /
|
|
@@ -10544,7 +10659,7 @@ export type WebhookPayloadExternalPost = {
|
|
|
10544
10659
|
timestamp: string;
|
|
10545
10660
|
};
|
|
10546
10661
|
|
|
10547
|
-
export type
|
|
10662
|
+
export type event15 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
|
|
10548
10663
|
|
|
10549
10664
|
/**
|
|
10550
10665
|
* Webhook payload for lead.received events (Meta Lead Gen / Instant Forms).
|
|
@@ -10615,7 +10730,7 @@ export type WebhookPayloadLead = {
|
|
|
10615
10730
|
timestamp: string;
|
|
10616
10731
|
};
|
|
10617
10732
|
|
|
10618
|
-
export type
|
|
10733
|
+
export type event16 = 'lead.received';
|
|
10619
10734
|
|
|
10620
10735
|
export type platform13 = 'facebook';
|
|
10621
10736
|
|
|
@@ -11153,7 +11268,7 @@ export type WebhookPayloadMessage = {
|
|
|
11153
11268
|
timestamp: string;
|
|
11154
11269
|
};
|
|
11155
11270
|
|
|
11156
|
-
export type
|
|
11271
|
+
export type event17 = 'message.received';
|
|
11157
11272
|
|
|
11158
11273
|
/**
|
|
11159
11274
|
* Which Zernio surface produced the message. Always present and
|
|
@@ -11214,7 +11329,7 @@ export type WebhookPayloadMessageDeleted = {
|
|
|
11214
11329
|
timestamp: string;
|
|
11215
11330
|
};
|
|
11216
11331
|
|
|
11217
|
-
export type
|
|
11332
|
+
export type event18 = 'message.deleted';
|
|
11218
11333
|
|
|
11219
11334
|
/**
|
|
11220
11335
|
* Shared payload for message.delivered, message.read, and
|
|
@@ -11274,7 +11389,7 @@ export type WebhookPayloadMessageDeliveryStatus = {
|
|
|
11274
11389
|
timestamp: string;
|
|
11275
11390
|
};
|
|
11276
11391
|
|
|
11277
|
-
export type
|
|
11392
|
+
export type event19 = 'message.delivered' | 'message.read' | 'message.failed';
|
|
11278
11393
|
|
|
11279
11394
|
/**
|
|
11280
11395
|
* Webhook payload for message.edited events. Fires when the sender
|
|
@@ -11312,7 +11427,7 @@ export type WebhookPayloadMessageEdited = {
|
|
|
11312
11427
|
timestamp: string;
|
|
11313
11428
|
};
|
|
11314
11429
|
|
|
11315
|
-
export type
|
|
11430
|
+
export type event20 = 'message.edited';
|
|
11316
11431
|
|
|
11317
11432
|
/**
|
|
11318
11433
|
* Webhook payload for message sent events (fired when a message is sent via the API, or from the WhatsApp Business app on Coexistence numbers)
|
|
@@ -11528,7 +11643,7 @@ export type WebhookPayloadMessageSent = {
|
|
|
11528
11643
|
timestamp: string;
|
|
11529
11644
|
};
|
|
11530
11645
|
|
|
11531
|
-
export type
|
|
11646
|
+
export type event21 = 'message.sent';
|
|
11532
11647
|
|
|
11533
11648
|
/**
|
|
11534
11649
|
* Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
|
|
@@ -11582,7 +11697,7 @@ export type WebhookPayloadPhoneNumberStockAvailable = {
|
|
|
11582
11697
|
timestamp: string;
|
|
11583
11698
|
};
|
|
11584
11699
|
|
|
11585
|
-
export type
|
|
11700
|
+
export type event22 = 'phone_number.stock_available';
|
|
11586
11701
|
|
|
11587
11702
|
/**
|
|
11588
11703
|
* Webhook payload for post events
|
|
@@ -11632,7 +11747,7 @@ export type WebhookPayloadPost = {
|
|
|
11632
11747
|
timestamp: string;
|
|
11633
11748
|
};
|
|
11634
11749
|
|
|
11635
|
-
export type
|
|
11750
|
+
export type event23 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
|
|
11636
11751
|
|
|
11637
11752
|
/**
|
|
11638
11753
|
* Webhook payload for the per-platform terminal events
|
|
@@ -11751,12 +11866,12 @@ export type WebhookPayloadPostPlatform = {
|
|
|
11751
11866
|
timestamp: string;
|
|
11752
11867
|
};
|
|
11753
11868
|
|
|
11754
|
-
export type
|
|
11869
|
+
export type event24 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
|
|
11755
11870
|
|
|
11756
11871
|
/**
|
|
11757
11872
|
* Terminal status this event fires on. Matches the event suffix.
|
|
11758
11873
|
*/
|
|
11759
|
-
export type
|
|
11874
|
+
export type status23 = 'published' | 'failed' | 'deleted';
|
|
11760
11875
|
|
|
11761
11876
|
/**
|
|
11762
11877
|
* Webhook payload for reaction received events (WhatsApp, Telegram, Slack, Instagram, Facebook Messenger, TikTok)
|
|
@@ -11811,7 +11926,7 @@ export type WebhookPayloadReaction = {
|
|
|
11811
11926
|
timestamp: string;
|
|
11812
11927
|
};
|
|
11813
11928
|
|
|
11814
|
-
export type
|
|
11929
|
+
export type event25 = 'reaction.received';
|
|
11815
11930
|
|
|
11816
11931
|
export type action = 'added' | 'removed';
|
|
11817
11932
|
|
|
@@ -11885,7 +12000,7 @@ export type WebhookPayloadReferral = {
|
|
|
11885
12000
|
timestamp: string;
|
|
11886
12001
|
};
|
|
11887
12002
|
|
|
11888
|
-
export type
|
|
12003
|
+
export type event26 = 'referral.received';
|
|
11889
12004
|
|
|
11890
12005
|
/**
|
|
11891
12006
|
* Webhook payload for the review.new event (new review posted on a connected account).
|
|
@@ -11912,7 +12027,7 @@ export type WebhookPayloadReviewNew = {
|
|
|
11912
12027
|
timestamp: string;
|
|
11913
12028
|
};
|
|
11914
12029
|
|
|
11915
|
-
export type
|
|
12030
|
+
export type event27 = 'review.new';
|
|
11916
12031
|
|
|
11917
12032
|
/**
|
|
11918
12033
|
* Webhook payload for the review.updated event. Fired when the reviewer edits their
|
|
@@ -11945,7 +12060,7 @@ export type WebhookPayloadReviewUpdated = {
|
|
|
11945
12060
|
timestamp: string;
|
|
11946
12061
|
};
|
|
11947
12062
|
|
|
11948
|
-
export type
|
|
12063
|
+
export type event28 = 'review.updated';
|
|
11949
12064
|
|
|
11950
12065
|
/**
|
|
11951
12066
|
* Webhook payload for test deliveries
|
|
@@ -11966,7 +12081,7 @@ export type WebhookPayloadTest = {
|
|
|
11966
12081
|
timestamp: string;
|
|
11967
12082
|
};
|
|
11968
12083
|
|
|
11969
|
-
export type
|
|
12084
|
+
export type event29 = 'webhook.test';
|
|
11970
12085
|
|
|
11971
12086
|
/**
|
|
11972
12087
|
* Webhook payload for the `whatsapp.account.name_status_updated` event.
|
|
@@ -12015,14 +12130,14 @@ export type WebhookPayloadWhatsAppAccountNameStatusUpdated = {
|
|
|
12015
12130
|
timestamp: string;
|
|
12016
12131
|
};
|
|
12017
12132
|
|
|
12018
|
-
export type
|
|
12133
|
+
export type event30 = 'whatsapp.account.name_status_updated';
|
|
12019
12134
|
|
|
12020
12135
|
export type platform15 = 'whatsapp';
|
|
12021
12136
|
|
|
12022
12137
|
/**
|
|
12023
12138
|
* Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
|
|
12024
12139
|
*/
|
|
12025
|
-
export type
|
|
12140
|
+
export type status24 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
|
|
12026
12141
|
|
|
12027
12142
|
/**
|
|
12028
12143
|
* Webhook payload for the `whatsapp.template.category_updated` event.
|
|
@@ -12086,7 +12201,7 @@ export type WebhookPayloadWhatsAppTemplateCategoryUpdated = {
|
|
|
12086
12201
|
timestamp: string;
|
|
12087
12202
|
};
|
|
12088
12203
|
|
|
12089
|
-
export type
|
|
12204
|
+
export type event31 = 'whatsapp.template.category_updated';
|
|
12090
12205
|
|
|
12091
12206
|
/**
|
|
12092
12207
|
* `scheduled` is Meta's 24h advance notice of an upcoming
|
|
@@ -12163,7 +12278,7 @@ export type WebhookPayloadWhatsAppTemplateStatusUpdated = {
|
|
|
12163
12278
|
timestamp: string;
|
|
12164
12279
|
};
|
|
12165
12280
|
|
|
12166
|
-
export type
|
|
12281
|
+
export type event32 = 'whatsapp.template.status_updated';
|
|
12167
12282
|
|
|
12168
12283
|
/**
|
|
12169
12284
|
* New status. Forwarded verbatim from Meta's `event` field.
|
|
@@ -12171,7 +12286,7 @@ export type event30 = 'whatsapp.template.status_updated';
|
|
|
12171
12286
|
* request before the template is actually removed.
|
|
12172
12287
|
*
|
|
12173
12288
|
*/
|
|
12174
|
-
export type
|
|
12289
|
+
export type status25 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
|
|
12175
12290
|
|
|
12176
12291
|
export type WhatsAppBodyComponent = {
|
|
12177
12292
|
type: 'body';
|
|
@@ -12325,7 +12440,7 @@ export type WhatsAppSandboxSession = {
|
|
|
12325
12440
|
* list responses.
|
|
12326
12441
|
*
|
|
12327
12442
|
*/
|
|
12328
|
-
export type
|
|
12443
|
+
export type status26 = 'pending' | 'active';
|
|
12329
12444
|
|
|
12330
12445
|
export type WhatsAppTemplateButton = {
|
|
12331
12446
|
type: 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
|
|
@@ -12483,7 +12598,7 @@ export type WorkflowExecutionEvent = {
|
|
|
12483
12598
|
|
|
12484
12599
|
export type action2 = 'execution_started' | 'execution_completed' | 'execution_exited' | 'execution_paused' | 'execution_resumed' | 'node_started' | 'node_completed' | 'node_failed' | 'node_skipped';
|
|
12485
12600
|
|
|
12486
|
-
export type
|
|
12601
|
+
export type status27 = 'success' | 'failed' | 'pending';
|
|
12487
12602
|
|
|
12488
12603
|
/**
|
|
12489
12604
|
* A node in a workflow graph. `config` shape depends on `type`.
|
|
@@ -16508,6 +16623,58 @@ export type VerifyCredentialError = ({
|
|
|
16508
16623
|
error?: string;
|
|
16509
16624
|
});
|
|
16510
16625
|
|
|
16626
|
+
export type SubmitFeedbackData = {
|
|
16627
|
+
body: {
|
|
16628
|
+
/**
|
|
16629
|
+
* What kind of feedback this is.
|
|
16630
|
+
*/
|
|
16631
|
+
type: 'bug' | 'missing_feature' | 'docs' | 'other';
|
|
16632
|
+
/**
|
|
16633
|
+
* One line describing the problem or the missing capability. Also the dedup key.
|
|
16634
|
+
*/
|
|
16635
|
+
summary: string;
|
|
16636
|
+
/**
|
|
16637
|
+
* Longer explanation: what you were trying to do, steps to reproduce, the use case.
|
|
16638
|
+
*/
|
|
16639
|
+
details?: string;
|
|
16640
|
+
/**
|
|
16641
|
+
* The endpoint involved, e.g. `POST /v1/posts`.
|
|
16642
|
+
*/
|
|
16643
|
+
endpoint?: string;
|
|
16644
|
+
/**
|
|
16645
|
+
* The `x-request-id` header of the failing response, if any.
|
|
16646
|
+
*/
|
|
16647
|
+
requestId?: string;
|
|
16648
|
+
/**
|
|
16649
|
+
* What you expected to happen.
|
|
16650
|
+
*/
|
|
16651
|
+
expected?: string;
|
|
16652
|
+
/**
|
|
16653
|
+
* What actually happened, e.g. the error message.
|
|
16654
|
+
*/
|
|
16655
|
+
actual?: string;
|
|
16656
|
+
/**
|
|
16657
|
+
* Optional identification of the agent submitting the feedback.
|
|
16658
|
+
*/
|
|
16659
|
+
agent?: {
|
|
16660
|
+
/**
|
|
16661
|
+
* Agent or tool name, e.g. `claude-code`.
|
|
16662
|
+
*/
|
|
16663
|
+
name?: string;
|
|
16664
|
+
/**
|
|
16665
|
+
* Model powering the agent.
|
|
16666
|
+
*/
|
|
16667
|
+
model?: string;
|
|
16668
|
+
};
|
|
16669
|
+
};
|
|
16670
|
+
};
|
|
16671
|
+
|
|
16672
|
+
export type SubmitFeedbackResponse = (FeedbackReceipt);
|
|
16673
|
+
|
|
16674
|
+
export type SubmitFeedbackError = (ErrorResponse | {
|
|
16675
|
+
error?: string;
|
|
16676
|
+
});
|
|
16677
|
+
|
|
16511
16678
|
export type ListApiKeysResponse = ({
|
|
16512
16679
|
apiKeys?: Array<ApiKey>;
|
|
16513
16680
|
});
|
|
@@ -22666,7 +22833,7 @@ export type CreateWebhookSettingsData = {
|
|
|
22666
22833
|
/**
|
|
22667
22834
|
* Events to subscribe to (at least one required)
|
|
22668
22835
|
*/
|
|
22669
|
-
events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated')>;
|
|
22836
|
+
events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated')>;
|
|
22670
22837
|
/**
|
|
22671
22838
|
* Enable or disable webhook delivery. Defaults to `true` when omitted.
|
|
22672
22839
|
*/
|
|
@@ -22734,7 +22901,7 @@ export type UpdateWebhookSettingsData = {
|
|
|
22734
22901
|
/**
|
|
22735
22902
|
* Events to subscribe to. Must contain at least one event if provided.
|
|
22736
22903
|
*/
|
|
22737
|
-
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated')>;
|
|
22904
|
+
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated')>;
|
|
22738
22905
|
/**
|
|
22739
22906
|
* Enable or disable webhook delivery
|
|
22740
22907
|
*/
|