@zernio/node 0.2.688 → 0.2.689
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.d.mts +264 -33
- package/dist/index.d.ts +264 -33
- package/dist/index.js +8 -1
- package/dist/index.mjs +8 -1
- package/package.json +1 -1
- package/src/client.ts +2 -0
- package/src/generated/sdk.gen.ts +66 -1
- package/src/generated/types.gen.ts +269 -32
|
@@ -1056,6 +1056,104 @@ export type AdTreeResponse = {
|
|
|
1056
1056
|
backfillPending?: boolean;
|
|
1057
1057
|
};
|
|
1058
1058
|
|
|
1059
|
+
/**
|
|
1060
|
+
* One changed analytics snapshot. Metrics are the absolute values recorded at
|
|
1061
|
+
* `syncedAt`, not the amount they moved by since the previous snapshot, so a later
|
|
1062
|
+
* entry for the same `postId` always supersedes an earlier one.
|
|
1063
|
+
*
|
|
1064
|
+
*/
|
|
1065
|
+
export type AnalyticsDeltaEntry = {
|
|
1066
|
+
/**
|
|
1067
|
+
* External post ID. The same identifier as `posts[]._id` in GET /v1/analytics.
|
|
1068
|
+
*/
|
|
1069
|
+
postId: string;
|
|
1070
|
+
/**
|
|
1071
|
+
* Social account this post was published through
|
|
1072
|
+
*/
|
|
1073
|
+
accountId: string;
|
|
1074
|
+
/**
|
|
1075
|
+
* Profile the account belongs to
|
|
1076
|
+
*/
|
|
1077
|
+
profileId: string;
|
|
1078
|
+
platform: string;
|
|
1079
|
+
/**
|
|
1080
|
+
* Platform-side post ID (for example the YouTube video ID)
|
|
1081
|
+
*/
|
|
1082
|
+
platformPostId: string;
|
|
1083
|
+
/**
|
|
1084
|
+
* When the post was published, ISO-8601 UTC
|
|
1085
|
+
*/
|
|
1086
|
+
publishedAt: string;
|
|
1087
|
+
/**
|
|
1088
|
+
* When the sync cycle that produced this snapshot STARTED, ISO-8601 UTC. This
|
|
1089
|
+
* is NOT the order entries arrive in and it is not a resume point: a slow cycle
|
|
1090
|
+
* writes its rows after a faster cycle that started later, so `syncedAt` can go
|
|
1091
|
+
* backwards between consecutive entries. Use `nextCursor` to resume.
|
|
1092
|
+
*
|
|
1093
|
+
*/
|
|
1094
|
+
syncedAt: string;
|
|
1095
|
+
/**
|
|
1096
|
+
* True when the post was detected as deleted on the platform at this sync
|
|
1097
|
+
*/
|
|
1098
|
+
isDeleted: boolean;
|
|
1099
|
+
/**
|
|
1100
|
+
* Metrics a platform does not report are 0, not absent.
|
|
1101
|
+
*/
|
|
1102
|
+
metrics: {
|
|
1103
|
+
impressions: number;
|
|
1104
|
+
reach: number;
|
|
1105
|
+
likes: number;
|
|
1106
|
+
comments: number;
|
|
1107
|
+
shares: number;
|
|
1108
|
+
saves: number;
|
|
1109
|
+
sends: number;
|
|
1110
|
+
clicks: number;
|
|
1111
|
+
views: number;
|
|
1112
|
+
/**
|
|
1113
|
+
* Follows attributed to this post (Instagram)
|
|
1114
|
+
*/
|
|
1115
|
+
follows: number;
|
|
1116
|
+
/**
|
|
1117
|
+
* Instagram Reels average watch time, in milliseconds
|
|
1118
|
+
*/
|
|
1119
|
+
igReelsAvgWatchTime: number;
|
|
1120
|
+
/**
|
|
1121
|
+
* Instagram Reels total watch time, in milliseconds
|
|
1122
|
+
*/
|
|
1123
|
+
igReelsVideoViewTotalTime: number;
|
|
1124
|
+
reposts: number;
|
|
1125
|
+
/**
|
|
1126
|
+
* Instagram Reels skip rate, 0 to 1
|
|
1127
|
+
*/
|
|
1128
|
+
reelsSkipRate: number;
|
|
1129
|
+
};
|
|
1130
|
+
};
|
|
1131
|
+
|
|
1132
|
+
export type AnalyticsDeltaResponse = {
|
|
1133
|
+
/**
|
|
1134
|
+
* Changed snapshots, oldest first, in the order the feed received them. Empty on
|
|
1135
|
+
* the bootstrap call (no `cursor` supplied) and whenever nothing has changed
|
|
1136
|
+
* since your cursor.
|
|
1137
|
+
*
|
|
1138
|
+
*/
|
|
1139
|
+
data: Array<AnalyticsDeltaEntry>;
|
|
1140
|
+
/**
|
|
1141
|
+
* Cursor to send on the next call. ALWAYS present, including on an empty page,
|
|
1142
|
+
* so you always have something to advance with, and it never moves backwards.
|
|
1143
|
+
* Opaque: pass it back verbatim, and do not parse, construct or compare cursors.
|
|
1144
|
+
*
|
|
1145
|
+
*/
|
|
1146
|
+
nextCursor: string;
|
|
1147
|
+
/**
|
|
1148
|
+
* True when more changes are already waiting past `nextCursor`, so call again
|
|
1149
|
+
* immediately. False means you are caught up: keep `nextCursor` and poll again
|
|
1150
|
+
* later. This feed never ends, so `hasMore: false` does NOT mean `nextCursor`
|
|
1151
|
+
* is null.
|
|
1152
|
+
*
|
|
1153
|
+
*/
|
|
1154
|
+
hasMore: boolean;
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1059
1157
|
export type AnalyticsListResponse = {
|
|
1060
1158
|
overview?: AnalyticsOverview;
|
|
1061
1159
|
posts?: Array<{
|
|
@@ -2414,9 +2512,26 @@ export type CtwaAdRequestBody = {
|
|
|
2414
2512
|
*/
|
|
2415
2513
|
dsaPayor?: string;
|
|
2416
2514
|
/**
|
|
2417
|
-
* Meta only. Regional regulation categories required when the ad set targets certain countries (e.g. SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV). Forwarded to the ad set.
|
|
2515
|
+
* Meta only. Regional regulation categories required when the ad set targets certain countries (e.g. BRAZIL_REGULATION, SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV, TAIWAN_FINSERV). Forwarded to the ad set.
|
|
2418
2516
|
*/
|
|
2419
2517
|
regionalRegulatedCategories?: Array<(string)>;
|
|
2518
|
+
/**
|
|
2519
|
+
* Meta only. Beneficiary/payer entity IDs required alongside regionalRegulatedCategories.
|
|
2520
|
+
* Values are numeric IDs from the advertiser's Meta verification/authorization setup.
|
|
2521
|
+
* Keys depend on the declared category: BRAZIL_REGULATION and THAILAND_UNIVERSAL use
|
|
2522
|
+
* universal_beneficiary / universal_payer; SINGAPORE_UNIVERSAL uses
|
|
2523
|
+
* singapore_universal_beneficiary / singapore_universal_payer; TAIWAN_UNIVERSAL uses
|
|
2524
|
+
* taiwan_universal_beneficiary / taiwan_universal_payer; TAIWAN_FINSERV uses
|
|
2525
|
+
* taiwan_finserv_beneficiary / taiwan_finserv_payer; AUSTRALIA_FINSERV uses
|
|
2526
|
+
* australia_finserv_beneficiary / australia_finserv_payer; INDIA_FINSERV uses
|
|
2527
|
+
* india_finserv_beneficiary / india_finserv_payer.
|
|
2528
|
+
* Both beneficiary and payer must be included. If omitted and the advertiser has
|
|
2529
|
+
* set defaults in Meta Ads Manager advertising settings, Meta auto-fills them.
|
|
2530
|
+
*
|
|
2531
|
+
*/
|
|
2532
|
+
regionalRegulationIdentities?: {
|
|
2533
|
+
[key: string]: (number);
|
|
2534
|
+
};
|
|
2420
2535
|
};
|
|
2421
2536
|
|
|
2422
2537
|
/**
|
|
@@ -6466,7 +6581,7 @@ export type Webhook = {
|
|
|
6466
6581
|
/**
|
|
6467
6582
|
* Events subscribed to
|
|
6468
6583
|
*/
|
|
6469
|
-
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' | 'message.received' | 'conversation.started' | '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')>;
|
|
6584
|
+
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' | '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')>;
|
|
6470
6585
|
/**
|
|
6471
6586
|
* Whether webhook delivery is enabled
|
|
6472
6587
|
*/
|
|
@@ -6882,6 +6997,79 @@ export type event4 = 'ad.status_changed';
|
|
|
6882
6997
|
*/
|
|
6883
6998
|
export type level = 'CAMPAIGN' | 'AD_SET' | 'AD';
|
|
6884
6999
|
|
|
7000
|
+
/**
|
|
7001
|
+
* Webhook payload for `analytics.synced`. Fired once per connected account each
|
|
7002
|
+
* time its analytics sync cycle completes successfully. Poll-driven (roughly
|
|
7003
|
+
* hourly per account), not real-time, and never fired for a skipped or failed
|
|
7004
|
+
* cycle.
|
|
7005
|
+
*
|
|
7006
|
+
* A TRIGGER, not a transport: it deliberately carries no metrics and no cursor.
|
|
7007
|
+
* When it arrives, call `GET /v1/analytics/delta` with YOUR OWN last `nextCursor`
|
|
7008
|
+
* to read what changed, across every account, in one paginated stream.
|
|
7009
|
+
*
|
|
7010
|
+
* The absent cursor is deliberate. The feed's ordering position is assigned inside
|
|
7011
|
+
* the analytics store when the row is materialized, which normally has not
|
|
7012
|
+
* happened yet at the moment this event fires, so a cursor minted here could sit
|
|
7013
|
+
* ahead of the very rows the event announces and make you skip them. Your own
|
|
7014
|
+
* `nextCursor` is always in the feed's own ordering and can never do that.
|
|
7015
|
+
*
|
|
7016
|
+
* Because of that same lag, a delta read issued the instant this event lands can
|
|
7017
|
+
* legitimately come back empty. That is not "nothing changed": poll again with the
|
|
7018
|
+
* same cursor you just used rather than treating the account as done.
|
|
7019
|
+
*
|
|
7020
|
+
* Subscribe to this event on a DEDICATED webhook endpoint. It is high volume
|
|
7021
|
+
* (roughly one delivery per connected account per hour) and a subscription's
|
|
7022
|
+
* consecutive-failure count is shared across all of its events, so an outage while
|
|
7023
|
+
* this event is flowing can suppress the low-volume publishing events that share
|
|
7024
|
+
* the same subscription.
|
|
7025
|
+
*
|
|
7026
|
+
*/
|
|
7027
|
+
export type WebhookPayloadAnalyticsSynced = {
|
|
7028
|
+
/**
|
|
7029
|
+
* Stable webhook event ID
|
|
7030
|
+
*/
|
|
7031
|
+
id: string;
|
|
7032
|
+
event: 'analytics.synced';
|
|
7033
|
+
account: {
|
|
7034
|
+
/**
|
|
7035
|
+
* The account's unique identifier (same as used in /v1/accounts/{accountId})
|
|
7036
|
+
*/
|
|
7037
|
+
accountId: string;
|
|
7038
|
+
/**
|
|
7039
|
+
* The profile this account belongs to
|
|
7040
|
+
*/
|
|
7041
|
+
profileId: string;
|
|
7042
|
+
platform: string;
|
|
7043
|
+
username: string;
|
|
7044
|
+
};
|
|
7045
|
+
/**
|
|
7046
|
+
* Summary of the analytics sync cycle that just completed.
|
|
7047
|
+
*/
|
|
7048
|
+
sync: {
|
|
7049
|
+
/**
|
|
7050
|
+
* When the cycle COMPLETED. Not a join key for the delta feed: the rows a
|
|
7051
|
+
* cycle produces carry a `syncedAt` stamped when the cycle STARTED, which
|
|
7052
|
+
* is measured at around one second earlier at the median and up to a
|
|
7053
|
+
* couple of minutes earlier in the tail. Correlate on `account.accountId`.
|
|
7054
|
+
*
|
|
7055
|
+
*/
|
|
7056
|
+
syncedAt: string;
|
|
7057
|
+
/**
|
|
7058
|
+
* Post records created or modified by this cycle. Not the number of delta
|
|
7059
|
+
* feed rows the cycle produced, which the syncer does not report, so a
|
|
7060
|
+
* cycle with a non-zero `postsUpdated` can still yield an empty delta page.
|
|
7061
|
+
*
|
|
7062
|
+
*/
|
|
7063
|
+
postsUpdated: number;
|
|
7064
|
+
};
|
|
7065
|
+
/**
|
|
7066
|
+
* UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued).
|
|
7067
|
+
*/
|
|
7068
|
+
timestamp: string;
|
|
7069
|
+
};
|
|
7070
|
+
|
|
7071
|
+
export type event5 = 'analytics.synced';
|
|
7072
|
+
|
|
6885
7073
|
/**
|
|
6886
7074
|
* Webhook payload for the `call.ended` event. Fires on call hangup
|
|
6887
7075
|
* with the duration and a zero-markup billing breakdown.
|
|
@@ -6936,7 +7124,7 @@ export type WebhookPayloadCallEnded = {
|
|
|
6936
7124
|
timestamp: string;
|
|
6937
7125
|
};
|
|
6938
7126
|
|
|
6939
|
-
export type
|
|
7127
|
+
export type event6 = 'call.ended';
|
|
6940
7128
|
|
|
6941
7129
|
/**
|
|
6942
7130
|
* Webhook payload for the `call.failed` event. Fired when a call
|
|
@@ -6967,7 +7155,7 @@ export type WebhookPayloadCallFailed = {
|
|
|
6967
7155
|
timestamp: string;
|
|
6968
7156
|
};
|
|
6969
7157
|
|
|
6970
|
-
export type
|
|
7158
|
+
export type event7 = 'call.failed';
|
|
6971
7159
|
|
|
6972
7160
|
/**
|
|
6973
7161
|
* Webhook payload for the `call.permission_request` event. Fires
|
|
@@ -7001,7 +7189,7 @@ export type WebhookPayloadCallPermissionRequest = {
|
|
|
7001
7189
|
timestamp: string;
|
|
7002
7190
|
};
|
|
7003
7191
|
|
|
7004
|
-
export type
|
|
7192
|
+
export type event8 = 'call.permission_request';
|
|
7005
7193
|
|
|
7006
7194
|
export type response = 'accept' | 'reject';
|
|
7007
7195
|
|
|
@@ -7055,7 +7243,7 @@ export type WebhookPayloadCallReceived = {
|
|
|
7055
7243
|
timestamp: string;
|
|
7056
7244
|
};
|
|
7057
7245
|
|
|
7058
|
-
export type
|
|
7246
|
+
export type event9 = 'call.received';
|
|
7059
7247
|
|
|
7060
7248
|
/**
|
|
7061
7249
|
* Webhook payload for comment received events (Instagram, Facebook, Twitter/X, YouTube, LinkedIn, Bluesky, Reddit)
|
|
@@ -7211,7 +7399,7 @@ export type WebhookPayloadComment = {
|
|
|
7211
7399
|
timestamp: string;
|
|
7212
7400
|
};
|
|
7213
7401
|
|
|
7214
|
-
export type
|
|
7402
|
+
export type event10 = 'comment.received';
|
|
7215
7403
|
|
|
7216
7404
|
export type platform8 = 'instagram' | 'facebook' | 'twitter' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit';
|
|
7217
7405
|
|
|
@@ -7268,7 +7456,7 @@ export type WebhookPayloadConversationStarted = {
|
|
|
7268
7456
|
timestamp: string;
|
|
7269
7457
|
};
|
|
7270
7458
|
|
|
7271
|
-
export type
|
|
7459
|
+
export type event11 = 'conversation.started';
|
|
7272
7460
|
|
|
7273
7461
|
export type platform9 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms' | 'slack';
|
|
7274
7462
|
|
|
@@ -7302,7 +7490,7 @@ export type WebhookPayloadExternalPost = {
|
|
|
7302
7490
|
timestamp: string;
|
|
7303
7491
|
};
|
|
7304
7492
|
|
|
7305
|
-
export type
|
|
7493
|
+
export type event12 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
|
|
7306
7494
|
|
|
7307
7495
|
/**
|
|
7308
7496
|
* Webhook payload for lead.received events (Meta Lead Gen / Instant Forms).
|
|
@@ -7369,7 +7557,7 @@ export type WebhookPayloadLead = {
|
|
|
7369
7557
|
timestamp: string;
|
|
7370
7558
|
};
|
|
7371
7559
|
|
|
7372
|
-
export type
|
|
7560
|
+
export type event13 = 'lead.received';
|
|
7373
7561
|
|
|
7374
7562
|
export type platform10 = 'facebook';
|
|
7375
7563
|
|
|
@@ -7839,7 +8027,7 @@ export type WebhookPayloadMessage = {
|
|
|
7839
8027
|
timestamp: string;
|
|
7840
8028
|
};
|
|
7841
8029
|
|
|
7842
|
-
export type
|
|
8030
|
+
export type event14 = 'message.received';
|
|
7843
8031
|
|
|
7844
8032
|
/**
|
|
7845
8033
|
* Which Zernio surface produced the message. Always present and
|
|
@@ -7897,7 +8085,7 @@ export type WebhookPayloadMessageDeleted = {
|
|
|
7897
8085
|
timestamp: string;
|
|
7898
8086
|
};
|
|
7899
8087
|
|
|
7900
|
-
export type
|
|
8088
|
+
export type event15 = 'message.deleted';
|
|
7901
8089
|
|
|
7902
8090
|
/**
|
|
7903
8091
|
* Shared payload for message.delivered, message.read, and
|
|
@@ -7945,7 +8133,7 @@ export type WebhookPayloadMessageDeliveryStatus = {
|
|
|
7945
8133
|
timestamp: string;
|
|
7946
8134
|
};
|
|
7947
8135
|
|
|
7948
|
-
export type
|
|
8136
|
+
export type event16 = 'message.delivered' | 'message.read' | 'message.failed';
|
|
7949
8137
|
|
|
7950
8138
|
/**
|
|
7951
8139
|
* Webhook payload for message.edited events. Fires when the sender
|
|
@@ -7980,7 +8168,7 @@ export type WebhookPayloadMessageEdited = {
|
|
|
7980
8168
|
timestamp: string;
|
|
7981
8169
|
};
|
|
7982
8170
|
|
|
7983
|
-
export type
|
|
8171
|
+
export type event17 = 'message.edited';
|
|
7984
8172
|
|
|
7985
8173
|
/**
|
|
7986
8174
|
* Webhook payload for message sent events (fired when a message is sent via the API, or from the WhatsApp Business app on Coexistence numbers)
|
|
@@ -8147,7 +8335,7 @@ export type WebhookPayloadMessageSent = {
|
|
|
8147
8335
|
timestamp: string;
|
|
8148
8336
|
};
|
|
8149
8337
|
|
|
8150
|
-
export type
|
|
8338
|
+
export type event18 = 'message.sent';
|
|
8151
8339
|
|
|
8152
8340
|
/**
|
|
8153
8341
|
* Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
|
|
@@ -8193,7 +8381,7 @@ export type WebhookPayloadPhoneNumberStockAvailable = {
|
|
|
8193
8381
|
timestamp: string;
|
|
8194
8382
|
};
|
|
8195
8383
|
|
|
8196
|
-
export type
|
|
8384
|
+
export type event19 = 'phone_number.stock_available';
|
|
8197
8385
|
|
|
8198
8386
|
/**
|
|
8199
8387
|
* Webhook payload for post events
|
|
@@ -8234,7 +8422,7 @@ export type WebhookPayloadPost = {
|
|
|
8234
8422
|
timestamp: string;
|
|
8235
8423
|
};
|
|
8236
8424
|
|
|
8237
|
-
export type
|
|
8425
|
+
export type event20 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
|
|
8238
8426
|
|
|
8239
8427
|
/**
|
|
8240
8428
|
* Webhook payload for the per-platform terminal events
|
|
@@ -8333,7 +8521,7 @@ export type WebhookPayloadPostPlatform = {
|
|
|
8333
8521
|
timestamp: string;
|
|
8334
8522
|
};
|
|
8335
8523
|
|
|
8336
|
-
export type
|
|
8524
|
+
export type event21 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
|
|
8337
8525
|
|
|
8338
8526
|
/**
|
|
8339
8527
|
* Terminal status this event fires on. Matches the event suffix.
|
|
@@ -8392,7 +8580,7 @@ export type WebhookPayloadReaction = {
|
|
|
8392
8580
|
timestamp: string;
|
|
8393
8581
|
};
|
|
8394
8582
|
|
|
8395
|
-
export type
|
|
8583
|
+
export type event22 = 'reaction.received';
|
|
8396
8584
|
|
|
8397
8585
|
export type action = 'added' | 'removed';
|
|
8398
8586
|
|
|
@@ -8466,7 +8654,7 @@ export type WebhookPayloadReferral = {
|
|
|
8466
8654
|
timestamp: string;
|
|
8467
8655
|
};
|
|
8468
8656
|
|
|
8469
|
-
export type
|
|
8657
|
+
export type event23 = 'referral.received';
|
|
8470
8658
|
|
|
8471
8659
|
/**
|
|
8472
8660
|
* Webhook payload for the review.new event (new review posted on a connected account).
|
|
@@ -8493,7 +8681,7 @@ export type WebhookPayloadReviewNew = {
|
|
|
8493
8681
|
timestamp: string;
|
|
8494
8682
|
};
|
|
8495
8683
|
|
|
8496
|
-
export type
|
|
8684
|
+
export type event24 = 'review.new';
|
|
8497
8685
|
|
|
8498
8686
|
/**
|
|
8499
8687
|
* Webhook payload for the review.updated event. Fired when the reviewer edits
|
|
@@ -8524,7 +8712,7 @@ export type WebhookPayloadReviewUpdated = {
|
|
|
8524
8712
|
timestamp: string;
|
|
8525
8713
|
};
|
|
8526
8714
|
|
|
8527
|
-
export type
|
|
8715
|
+
export type event25 = 'review.updated';
|
|
8528
8716
|
|
|
8529
8717
|
/**
|
|
8530
8718
|
* Webhook payload for test deliveries
|
|
@@ -8545,7 +8733,7 @@ export type WebhookPayloadTest = {
|
|
|
8545
8733
|
timestamp: string;
|
|
8546
8734
|
};
|
|
8547
8735
|
|
|
8548
|
-
export type
|
|
8736
|
+
export type event26 = 'webhook.test';
|
|
8549
8737
|
|
|
8550
8738
|
/**
|
|
8551
8739
|
* Webhook payload for the `whatsapp.account.name_status_updated` event.
|
|
@@ -8594,7 +8782,7 @@ export type WebhookPayloadWhatsAppAccountNameStatusUpdated = {
|
|
|
8594
8782
|
timestamp: string;
|
|
8595
8783
|
};
|
|
8596
8784
|
|
|
8597
|
-
export type
|
|
8785
|
+
export type event27 = 'whatsapp.account.name_status_updated';
|
|
8598
8786
|
|
|
8599
8787
|
export type platform12 = 'whatsapp';
|
|
8600
8788
|
|
|
@@ -8665,7 +8853,7 @@ export type WebhookPayloadWhatsAppTemplateCategoryUpdated = {
|
|
|
8665
8853
|
timestamp: string;
|
|
8666
8854
|
};
|
|
8667
8855
|
|
|
8668
|
-
export type
|
|
8856
|
+
export type event28 = 'whatsapp.template.category_updated';
|
|
8669
8857
|
|
|
8670
8858
|
/**
|
|
8671
8859
|
* `scheduled` is Meta's 24h advance notice of an upcoming
|
|
@@ -8742,7 +8930,7 @@ export type WebhookPayloadWhatsAppTemplateStatusUpdated = {
|
|
|
8742
8930
|
timestamp: string;
|
|
8743
8931
|
};
|
|
8744
8932
|
|
|
8745
|
-
export type
|
|
8933
|
+
export type event29 = 'whatsapp.template.status_updated';
|
|
8746
8934
|
|
|
8747
8935
|
/**
|
|
8748
8936
|
* New status. Forwarded verbatim from Meta's `event` field.
|
|
@@ -9786,6 +9974,39 @@ export type GetAnalyticsError = ({
|
|
|
9786
9974
|
code?: string;
|
|
9787
9975
|
} | AnalyticsSinglePostResponse | ErrorResponse);
|
|
9788
9976
|
|
|
9977
|
+
export type GetAnalyticsDeltaData = {
|
|
9978
|
+
query?: {
|
|
9979
|
+
/**
|
|
9980
|
+
* Opaque cursor from a previous response's `nextCursor`. Omit it to start from
|
|
9981
|
+
* now: the response is then an empty page carrying the feed's current position.
|
|
9982
|
+
* Rejected with a `400` when malformed, or when older than the retention window.
|
|
9983
|
+
*
|
|
9984
|
+
*/
|
|
9985
|
+
cursor?: string;
|
|
9986
|
+
/**
|
|
9987
|
+
* Page size. Out-of-range values are a 400, never a silent clamp.
|
|
9988
|
+
*/
|
|
9989
|
+
limit?: number;
|
|
9990
|
+
/**
|
|
9991
|
+
* Filter to a single platform (for example "youtube"). Omit for every platform.
|
|
9992
|
+
*/
|
|
9993
|
+
platform?: string;
|
|
9994
|
+
/**
|
|
9995
|
+
* Filter by profile ID (default "all"). Must be a valid profile ID or "all".
|
|
9996
|
+
*/
|
|
9997
|
+
profileId?: string;
|
|
9998
|
+
};
|
|
9999
|
+
};
|
|
10000
|
+
|
|
10001
|
+
export type GetAnalyticsDeltaResponse = (AnalyticsDeltaResponse);
|
|
10002
|
+
|
|
10003
|
+
export type GetAnalyticsDeltaError = (ErrorResponse | {
|
|
10004
|
+
error?: string;
|
|
10005
|
+
} | {
|
|
10006
|
+
error?: string;
|
|
10007
|
+
code?: string;
|
|
10008
|
+
});
|
|
10009
|
+
|
|
9789
10010
|
export type GetYouTubeChannelInsightsData = {
|
|
9790
10011
|
query: {
|
|
9791
10012
|
/**
|
|
@@ -18042,7 +18263,7 @@ export type CreateWebhookSettingsData = {
|
|
|
18042
18263
|
/**
|
|
18043
18264
|
* Events to subscribe to (at least one required)
|
|
18044
18265
|
*/
|
|
18045
|
-
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' | 'message.received' | 'conversation.started' | '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')>;
|
|
18266
|
+
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' | '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')>;
|
|
18046
18267
|
/**
|
|
18047
18268
|
* Enable or disable webhook delivery. Defaults to `true` when omitted.
|
|
18048
18269
|
*/
|
|
@@ -18097,7 +18318,7 @@ export type UpdateWebhookSettingsData = {
|
|
|
18097
18318
|
/**
|
|
18098
18319
|
* Events to subscribe to. Must contain at least one event if provided.
|
|
18099
18320
|
*/
|
|
18100
|
-
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' | 'message.received' | 'conversation.started' | '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')>;
|
|
18321
|
+
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' | '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')>;
|
|
18101
18322
|
/**
|
|
18102
18323
|
* Enable or disable webhook delivery
|
|
18103
18324
|
*/
|
|
@@ -32820,9 +33041,15 @@ export type BoostPostData = {
|
|
|
32820
33041
|
*/
|
|
32821
33042
|
specialAdCategoryCountry?: Array<(string)>;
|
|
32822
33043
|
/**
|
|
32823
|
-
* Meta only. Regional regulation categories required when the ad set targets certain countries (e.g. SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV). Forwarded to the ad set.
|
|
33044
|
+
* Meta only. Regional regulation categories required when the ad set targets certain countries (e.g. BRAZIL_REGULATION, SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV, TAIWAN_FINSERV). Forwarded to the ad set.
|
|
32824
33045
|
*/
|
|
32825
33046
|
regionalRegulatedCategories?: Array<(string)>;
|
|
33047
|
+
/**
|
|
33048
|
+
* Meta only. Beneficiary/payer entity IDs for regionalRegulatedCategories. Values are numeric IDs from Meta verification. Keys vary by category (e.g. universal_beneficiary / universal_payer for BRAZIL_REGULATION and THAILAND_UNIVERSAL). If omitted, Meta uses Ads Manager defaults when configured.
|
|
33049
|
+
*/
|
|
33050
|
+
regionalRegulationIdentities?: {
|
|
33051
|
+
[key: string]: (number);
|
|
33052
|
+
};
|
|
32826
33053
|
/**
|
|
32827
33054
|
* Destination URL for the CTA button. Send it together with `callToAction`.
|
|
32828
33055
|
*
|
|
@@ -33394,12 +33621,22 @@ export type CreateStandaloneAdData = {
|
|
|
33394
33621
|
specialAdCategoryCountry?: Array<(string)>;
|
|
33395
33622
|
/**
|
|
33396
33623
|
* Meta only. Regional regulation categories required when the ad set targets certain countries.
|
|
33397
|
-
* Known values: SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL,
|
|
33398
|
-
* INDIA_FINSERV, TAIWAN_FINSERV. Meta rejects the ad set without this when
|
|
33399
|
-
* includes the corresponding country.
|
|
33624
|
+
* Known values: BRAZIL_REGULATION, SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL,
|
|
33625
|
+
* AUSTRALIA_FINSERV, INDIA_FINSERV, TAIWAN_FINSERV. Meta rejects the ad set without this when
|
|
33626
|
+
* the targeting geo includes the corresponding country.
|
|
33400
33627
|
*
|
|
33401
33628
|
*/
|
|
33402
33629
|
regionalRegulatedCategories?: Array<(string)>;
|
|
33630
|
+
/**
|
|
33631
|
+
* Meta only. Beneficiary/payer entity IDs for regionalRegulatedCategories. Values are
|
|
33632
|
+
* numeric IDs from Meta verification. Keys vary by category (e.g. universal_beneficiary /
|
|
33633
|
+
* universal_payer for BRAZIL_REGULATION and THAILAND_UNIVERSAL). If omitted, Meta uses
|
|
33634
|
+
* Ads Manager defaults when configured.
|
|
33635
|
+
*
|
|
33636
|
+
*/
|
|
33637
|
+
regionalRegulationIdentities?: {
|
|
33638
|
+
[key: string]: (number);
|
|
33639
|
+
};
|
|
33403
33640
|
/**
|
|
33404
33641
|
* Required for lifetime budgets
|
|
33405
33642
|
*/
|