@zernio/node 0.2.612 → 0.2.641
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 +13 -0
- package/dist/index.d.mts +937 -62
- package/dist/index.d.ts +937 -62
- package/dist/index.js +99 -2
- package/dist/index.mjs +99 -2
- package/package.json +1 -1
- package/src/client.ts +32 -0
- package/src/generated/sdk.gen.ts +228 -9
- package/src/generated/types.gen.ts +961 -62
|
@@ -105,9 +105,9 @@ export type Ad = {
|
|
|
105
105
|
*/
|
|
106
106
|
creativeType?: ('carousel' | 'video' | 'document' | 'image') | null;
|
|
107
107
|
/**
|
|
108
|
-
* Available goals vary by platform. Meta (Facebook/Instagram) supports all
|
|
108
|
+
* Available goals vary by platform. Meta (Facebook/Instagram) supports all 10 (incl. `lead_conversion` = website pixel lead optimization, `catalog_sales` = Advantage+ catalog ads and `page_likes` = Page Likes conversion location under Engagement). TikTok supports engagement, traffic, awareness, video_views, lead_generation, conversions, app_promotion. LinkedIn supports all Meta goals except app_promotion / lead_conversion / catalog_sales / page_likes. Twitter/X supports engagement, traffic, awareness, video_views, app_promotion. Pinterest and Google Ads support only engagement, traffic, awareness, video_views.
|
|
109
109
|
*/
|
|
110
|
-
goal?: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'conversions' | 'app_promotion' | 'catalog_sales' | 'job_applicants';
|
|
110
|
+
goal?: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'conversions' | 'app_promotion' | 'catalog_sales' | 'page_likes' | 'job_applicants';
|
|
111
111
|
/**
|
|
112
112
|
* True for ads synced from platform ad managers
|
|
113
113
|
*/
|
|
@@ -373,9 +373,9 @@ export type adType = 'boost' | 'standalone';
|
|
|
373
373
|
export type creativeType = 'carousel' | 'video' | 'document' | 'image';
|
|
374
374
|
|
|
375
375
|
/**
|
|
376
|
-
* Available goals vary by platform. Meta (Facebook/Instagram) supports all
|
|
376
|
+
* Available goals vary by platform. Meta (Facebook/Instagram) supports all 10 (incl. `lead_conversion` = website pixel lead optimization, `catalog_sales` = Advantage+ catalog ads and `page_likes` = Page Likes conversion location under Engagement). TikTok supports engagement, traffic, awareness, video_views, lead_generation, conversions, app_promotion. LinkedIn supports all Meta goals except app_promotion / lead_conversion / catalog_sales / page_likes. Twitter/X supports engagement, traffic, awareness, video_views, app_promotion. Pinterest and Google Ads support only engagement, traffic, awareness, video_views.
|
|
377
377
|
*/
|
|
378
|
-
export type goal = 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'conversions' | 'app_promotion' | 'catalog_sales' | 'job_applicants';
|
|
378
|
+
export type goal = 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'conversions' | 'app_promotion' | 'catalog_sales' | 'page_likes' | 'job_applicants';
|
|
379
379
|
|
|
380
380
|
export type type = 'daily' | 'lifetime';
|
|
381
381
|
|
|
@@ -481,9 +481,9 @@ export type AdCampaign = {
|
|
|
481
481
|
*/
|
|
482
482
|
platformObjective?: (string) | null;
|
|
483
483
|
/**
|
|
484
|
-
*
|
|
484
|
+
* A single string when every ad set shares one optimization goal; a JSON array of the distinct goals when ad sets differ (never a comma-joined string); array element order is not guaranteed, treat it as an unordered set; the key is absent when no ad set carries a goal. Meta: e.g. OFFSITE_CONVERSIONS, VALUE, LEAD_GENERATION. LinkedIn: the campaign optimizationTargetType (e.g. MAX_CLICK, MAX_IMPRESSION, NONE); `NONE` with a manual costType is a campaign LinkedIn will not deliver.
|
|
485
485
|
*/
|
|
486
|
-
optimizationGoal?: (string)
|
|
486
|
+
optimizationGoal?: Array<(string)>;
|
|
487
487
|
/**
|
|
488
488
|
* Campaign-level bid strategy. Ad sets inherit this unless they override.
|
|
489
489
|
*/
|
|
@@ -872,6 +872,10 @@ export type AdTreeAdSet = {
|
|
|
872
872
|
* Derived from child ad statuses
|
|
873
873
|
*/
|
|
874
874
|
status?: (AdStatus);
|
|
875
|
+
/**
|
|
876
|
+
* Earliest `platformCreatedAt` (platform ad creation time; falls back to `createdAt`, Zernio's sync time, for ads synced before that field existed) across this ad set's ads. Not the ad set's own creation time on the platform — a proxy usable for sorting.
|
|
877
|
+
*/
|
|
878
|
+
createdTime?: (string) | null;
|
|
875
879
|
adCount?: number;
|
|
876
880
|
/**
|
|
877
881
|
* Effective budget at this level (back-compat). For CBO campaigns this mirrors the parent campaign's budget; for ABO this is the ad-set-specific budget. Use `adSetBudget` / parent `campaignBudget` + `budgetLevel` to disambiguate.
|
|
@@ -937,6 +941,10 @@ export type AdTreeCampaign = {
|
|
|
937
941
|
platformCampaignId?: string;
|
|
938
942
|
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
|
|
939
943
|
campaignName?: string;
|
|
944
|
+
/**
|
|
945
|
+
* Earliest `platformCreatedAt` (platform ad creation time; falls back to `createdAt`, Zernio's sync time, for ads synced before that field existed) across every ad in the campaign. Not the platform campaign's own creation time (Meta's `Campaign.created_time` etc. is not synced) — a campaign created empty and populated later will show its first ad's time, not the campaign's. Usable for sorting "most recently created" without the numeric-campaign-id heuristic. Same source as `AdTreeAdSet.createdTime` and `Ad.platformCreatedAt`; mirrors `AdCampaign.earliestAd`.
|
|
946
|
+
*/
|
|
947
|
+
createdTime?: (string) | null;
|
|
940
948
|
/**
|
|
941
949
|
* Delivery status derived from child ad statuses. Distinct from `reviewStatus`, which reflects the platform-side review state.
|
|
942
950
|
*/
|
|
@@ -1009,9 +1017,9 @@ export type AdTreeCampaign = {
|
|
|
1009
1017
|
*/
|
|
1010
1018
|
platformObjective?: (string) | null;
|
|
1011
1019
|
/**
|
|
1012
|
-
*
|
|
1020
|
+
* A single string when every ad set shares one optimization goal; a JSON array of the distinct goals when ad sets differ (never a comma-joined string); array element order is not guaranteed, treat it as an unordered set; the key is absent when no ad set carries a goal. Meta: e.g. OFFSITE_CONVERSIONS, VALUE, LEAD_GENERATION. LinkedIn: the campaign optimizationTargetType (e.g. MAX_CLICK, MAX_IMPRESSION, NONE); `NONE` with a manual costType is a campaign LinkedIn will not deliver.
|
|
1013
1021
|
*/
|
|
1014
|
-
optimizationGoal?: (string)
|
|
1022
|
+
optimizationGoal?: Array<(string)>;
|
|
1015
1023
|
/**
|
|
1016
1024
|
* Campaign-level bid strategy. Ad sets inherit this unless they override.
|
|
1017
1025
|
*/
|
|
@@ -2104,21 +2112,49 @@ export type CtwaAdRequestBody = {
|
|
|
2104
2112
|
*
|
|
2105
2113
|
*/
|
|
2106
2114
|
video?: {
|
|
2107
|
-
url: string;
|
|
2108
2115
|
/**
|
|
2109
|
-
*
|
|
2110
|
-
|
|
2116
|
+
* Public URL of the video to upload. Provide either `url` or `id`.
|
|
2117
|
+
*/
|
|
2118
|
+
url?: string;
|
|
2119
|
+
/**
|
|
2120
|
+
* Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`.
|
|
2121
|
+
*/
|
|
2122
|
+
id?: string;
|
|
2123
|
+
/**
|
|
2124
|
+
* OPTIONAL: when omitted, the poster is auto-generated from
|
|
2125
|
+
* Meta's own preferred video thumbnail. When Meta produces no
|
|
2126
|
+
* candidate the request fails with a 502 platform_error
|
|
2127
|
+
* (reason: video_thumbnail_unavailable) — retry, or supply
|
|
2128
|
+
* this field to control the poster frame exactly.
|
|
2111
2129
|
*
|
|
2112
2130
|
*/
|
|
2113
|
-
thumbnailUrl
|
|
2131
|
+
thumbnailUrl?: string;
|
|
2132
|
+
};
|
|
2133
|
+
/**
|
|
2134
|
+
* Custom chat welcome message (Meta's `page_welcome_message`,
|
|
2135
|
+
* "Mensaje de bienvenida" / "Mensaje predefinido" in Ads Manager).
|
|
2136
|
+
* Single-creative shape only; for `creatives[]` set it per entry.
|
|
2137
|
+
*
|
|
2138
|
+
*/
|
|
2139
|
+
welcomeMessage?: {
|
|
2140
|
+
/**
|
|
2141
|
+
* Greeting shown when the chat opens. Replaces Meta's default ("Hi! Can we help you?").
|
|
2142
|
+
*/
|
|
2143
|
+
text: string;
|
|
2144
|
+
/**
|
|
2145
|
+
* Message put into the user's text input, ready to send. Replaces Meta's default ("Hi! I want more info."). Lets one ad steer the opening message toward what it promotes (e.g. a specific product).
|
|
2146
|
+
*/
|
|
2147
|
+
prefillText: string;
|
|
2114
2148
|
};
|
|
2115
2149
|
/**
|
|
2116
2150
|
* Multi-creative shape: N CTWA ads under one campaign + one
|
|
2117
2151
|
* ad set, sharing budget and targeting. Mutually exclusive
|
|
2118
2152
|
* with the top-level single-creative fields (`headline` /
|
|
2119
|
-
* `body` / `imageUrl` / `video`)
|
|
2120
|
-
*
|
|
2121
|
-
*
|
|
2153
|
+
* `body` / `imageUrl` / `video`): setting both is a 400,
|
|
2154
|
+
* unlike `POST /v1/ads/create` where the top-level fields
|
|
2155
|
+
* are silently ignored in multi-creative mode. Each entry
|
|
2156
|
+
* must supply its own headline, body, and exactly one of
|
|
2157
|
+
* `imageUrl` / `video`.
|
|
2122
2158
|
*
|
|
2123
2159
|
*/
|
|
2124
2160
|
creatives?: Array<{
|
|
@@ -2139,22 +2175,44 @@ export type CtwaAdRequestBody = {
|
|
|
2139
2175
|
*
|
|
2140
2176
|
*/
|
|
2141
2177
|
video?: {
|
|
2142
|
-
url: string;
|
|
2143
2178
|
/**
|
|
2144
|
-
*
|
|
2145
|
-
|
|
2179
|
+
* Public URL of the video to upload. Provide either `url` or `id`.
|
|
2180
|
+
*/
|
|
2181
|
+
url?: string;
|
|
2182
|
+
/**
|
|
2183
|
+
* Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`.
|
|
2184
|
+
*/
|
|
2185
|
+
id?: string;
|
|
2186
|
+
/**
|
|
2187
|
+
* OPTIONAL: when omitted, the poster is auto-generated
|
|
2188
|
+
* from Meta's own preferred video thumbnail. When Meta
|
|
2189
|
+
* produces no candidate the request fails with a 502
|
|
2190
|
+
* platform_error (reason: video_thumbnail_unavailable).
|
|
2146
2191
|
*
|
|
2147
2192
|
*/
|
|
2148
|
-
thumbnailUrl
|
|
2193
|
+
thumbnailUrl?: string;
|
|
2194
|
+
};
|
|
2195
|
+
/**
|
|
2196
|
+
* Custom chat welcome message for this entry. See the top-level `welcomeMessage` for the single-creative shape.
|
|
2197
|
+
*/
|
|
2198
|
+
welcomeMessage?: {
|
|
2199
|
+
/**
|
|
2200
|
+
* Greeting shown when the chat opens. Replaces Meta's default.
|
|
2201
|
+
*/
|
|
2202
|
+
text: string;
|
|
2203
|
+
/**
|
|
2204
|
+
* Message put into the user's text input, ready to send. Replaces Meta's default.
|
|
2205
|
+
*/
|
|
2206
|
+
prefillText: string;
|
|
2149
2207
|
};
|
|
2150
2208
|
}>;
|
|
2151
2209
|
/**
|
|
2152
2210
|
* Attach the creatives to this EXISTING messaging ad set instead of
|
|
2153
2211
|
* building a campaign, so the ad set keeps its learning phase. It then
|
|
2154
2212
|
* owns budget, targeting and schedule, so `budgetAmount`, `budgetType`,
|
|
2155
|
-
* `endDate`, `objective`, `countries`, `interests
|
|
2156
|
-
* rejected with a 400 alongside it. Its
|
|
2157
|
-
* the ad's destination.
|
|
2213
|
+
* `endDate`, `objective`, `countries`, `interests`, `audienceId` and
|
|
2214
|
+
* `campaignStatus` are rejected with a 400 alongside it. Its
|
|
2215
|
+
* `destination_type` must match the ad's destination.
|
|
2158
2216
|
*
|
|
2159
2217
|
*/
|
|
2160
2218
|
adSetId?: string;
|
|
@@ -2298,6 +2356,22 @@ export type CtwaAdRequestBody = {
|
|
|
2298
2356
|
*
|
|
2299
2357
|
*/
|
|
2300
2358
|
objective?: 'OUTCOME_ENGAGEMENT' | 'OUTCOME_SALES' | 'OUTCOME_LEADS';
|
|
2359
|
+
/**
|
|
2360
|
+
* Ad-level status. Defaults to `ACTIVE`. `PAUSED` skips activating the
|
|
2361
|
+
* newly created ad(s) after Meta accepts them.
|
|
2362
|
+
*
|
|
2363
|
+
*/
|
|
2364
|
+
status?: 'ACTIVE' | 'PAUSED';
|
|
2365
|
+
/**
|
|
2366
|
+
* Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults
|
|
2367
|
+
* to `ACTIVE`. `PAUSED` holds activation at the campaign so it never
|
|
2368
|
+
* spends before the advertiser reviews it, while the ad set and ad still
|
|
2369
|
+
* switch on (one resume call brings the whole hierarchy live). Only
|
|
2370
|
+
* meaningful when a new campaign is being created; rejected with a 400
|
|
2371
|
+
* alongside `adSetId` (the attach shape reuses an existing campaign).
|
|
2372
|
+
*
|
|
2373
|
+
*/
|
|
2374
|
+
campaignStatus?: 'ACTIVE' | 'PAUSED';
|
|
2301
2375
|
/**
|
|
2302
2376
|
* Meta bid strategy applied to the shared ad set. Defaults to
|
|
2303
2377
|
* `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted.
|
|
@@ -2363,6 +2437,24 @@ export type advantageAudience = 0 | 1;
|
|
|
2363
2437
|
*/
|
|
2364
2438
|
export type objective = 'OUTCOME_ENGAGEMENT' | 'OUTCOME_SALES' | 'OUTCOME_LEADS';
|
|
2365
2439
|
|
|
2440
|
+
/**
|
|
2441
|
+
* Ad-level status. Defaults to `ACTIVE`. `PAUSED` skips activating the
|
|
2442
|
+
* newly created ad(s) after Meta accepts them.
|
|
2443
|
+
*
|
|
2444
|
+
*/
|
|
2445
|
+
export type status4 = 'ACTIVE' | 'PAUSED';
|
|
2446
|
+
|
|
2447
|
+
/**
|
|
2448
|
+
* Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults
|
|
2449
|
+
* to `ACTIVE`. `PAUSED` holds activation at the campaign so it never
|
|
2450
|
+
* spends before the advertiser reviews it, while the ad set and ad still
|
|
2451
|
+
* switch on (one resume call brings the whole hierarchy live). Only
|
|
2452
|
+
* meaningful when a new campaign is being created; rejected with a 400
|
|
2453
|
+
* alongside `adSetId` (the attach shape reuses an existing campaign).
|
|
2454
|
+
*
|
|
2455
|
+
*/
|
|
2456
|
+
export type campaignStatus = 'ACTIVE' | 'PAUSED';
|
|
2457
|
+
|
|
2366
2458
|
/**
|
|
2367
2459
|
* Meta bid strategy applied to the shared ad set. Defaults to
|
|
2368
2460
|
* `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted.
|
|
@@ -2718,7 +2810,7 @@ export type privacy_level = 2;
|
|
|
2718
2810
|
/**
|
|
2719
2811
|
* 1=SCHEDULED, 2=ACTIVE, 3=COMPLETED, 4=CANCELED
|
|
2720
2812
|
*/
|
|
2721
|
-
export type
|
|
2813
|
+
export type status5 = 1 | 2 | 3 | 4;
|
|
2722
2814
|
|
|
2723
2815
|
/**
|
|
2724
2816
|
* 1=STAGE_INSTANCE, 2=VOICE, 3=EXTERNAL
|
|
@@ -3420,7 +3512,7 @@ export type InboxWebhookConversation = {
|
|
|
3420
3512
|
contactId?: string;
|
|
3421
3513
|
};
|
|
3422
3514
|
|
|
3423
|
-
export type
|
|
3515
|
+
export type status6 = 'active' | 'archived';
|
|
3424
3516
|
|
|
3425
3517
|
/**
|
|
3426
3518
|
* The message object included in inbox webhook payloads.
|
|
@@ -3529,6 +3621,9 @@ export type InboxWebhookMessage = {
|
|
|
3529
3621
|
isVerified?: (boolean) | null;
|
|
3530
3622
|
};
|
|
3531
3623
|
};
|
|
3624
|
+
/**
|
|
3625
|
+
* When the message was sent, as reported by the platform and passed through unmodified. Full ISO 8601 date-time: Instagram and Facebook carry millisecond precision, while some platforms (for example WhatsApp and Telegram) report whole seconds. Use this field as the chronological ordering key. If two messages share the same value, fetch the conversation messages with sortOrder=desc for the deterministic order.
|
|
3626
|
+
*/
|
|
3532
3627
|
sentAt: string;
|
|
3533
3628
|
isRead: boolean;
|
|
3534
3629
|
};
|
|
@@ -4290,7 +4385,7 @@ export type LinkedInPlatformData = {
|
|
|
4290
4385
|
*/
|
|
4291
4386
|
disableLinkPreview?: boolean;
|
|
4292
4387
|
/**
|
|
4293
|
-
* LinkedIn post link to repost (use the post's "Copy link to post" action), or a urn:li:share / urn:li:ugcPost / urn:li:groupPost URN.
|
|
4388
|
+
* LinkedIn post link to repost (use the post's "Copy link to post" action), or a urn:li:share / urn:li:ugcPost / urn:li:groupPost URN. The published post is always a reshare authored by your account with the original embedded underneath: with content your text is the commentary (LinkedIn's "repost with your thoughts"), and with no content it publishes as a text-free reshare. Note that a text-free reshare is NOT LinkedIn's one-click "Repost" (the feed treatment where the original author stays the author); LinkedIn's API exposes no way to create that, so the post still appears authored by you with the original embedded. Mutually exclusive with media. Works on personal profiles and organization pages.
|
|
4294
4389
|
*/
|
|
4295
4390
|
reshareUrl?: string;
|
|
4296
4391
|
geoRestriction?: GeoRestriction;
|
|
@@ -4463,7 +4558,7 @@ export type PlatformAnalytics = {
|
|
|
4463
4558
|
errorMessage?: (string) | null;
|
|
4464
4559
|
};
|
|
4465
4560
|
|
|
4466
|
-
export type
|
|
4561
|
+
export type status7 = 'published' | 'failed';
|
|
4467
4562
|
|
|
4468
4563
|
/**
|
|
4469
4564
|
* Sync state of analytics for this platform
|
|
@@ -4590,7 +4685,7 @@ export type Post = {
|
|
|
4590
4685
|
updatedAt?: string;
|
|
4591
4686
|
};
|
|
4592
4687
|
|
|
4593
|
-
export type
|
|
4688
|
+
export type status8 = 'draft' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
4594
4689
|
|
|
4595
4690
|
export type visibility = 'public' | 'private' | 'unlisted';
|
|
4596
4691
|
|
|
@@ -5735,7 +5830,7 @@ export type UploadTokenResponse = {
|
|
|
5735
5830
|
status?: 'pending' | 'completed' | 'expired';
|
|
5736
5831
|
};
|
|
5737
5832
|
|
|
5738
|
-
export type
|
|
5833
|
+
export type status9 = 'pending' | 'completed' | 'expired';
|
|
5739
5834
|
|
|
5740
5835
|
export type UploadTokenStatusResponse = {
|
|
5741
5836
|
token?: string;
|
|
@@ -5743,7 +5838,7 @@ export type UploadTokenStatusResponse = {
|
|
|
5743
5838
|
files?: Array<UploadedFile>;
|
|
5744
5839
|
createdAt?: string;
|
|
5745
5840
|
expiresAt?: string;
|
|
5746
|
-
completedAt?: string;
|
|
5841
|
+
completedAt?: (string) | null;
|
|
5747
5842
|
};
|
|
5748
5843
|
|
|
5749
5844
|
/**
|
|
@@ -6156,7 +6251,7 @@ export type Verification = {
|
|
|
6156
6251
|
resend?: boolean;
|
|
6157
6252
|
};
|
|
6158
6253
|
|
|
6159
|
-
export type
|
|
6254
|
+
export type status10 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
|
|
6160
6255
|
|
|
6161
6256
|
export type channel2 = 'sms';
|
|
6162
6257
|
|
|
@@ -6183,7 +6278,7 @@ export type Webhook = {
|
|
|
6183
6278
|
/**
|
|
6184
6279
|
* Events subscribed to
|
|
6185
6280
|
*/
|
|
6186
|
-
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.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' | 'verification.approved' | 'verification.failed')>;
|
|
6281
|
+
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' | 'verification.approved' | 'verification.failed')>;
|
|
6187
6282
|
/**
|
|
6188
6283
|
* Whether webhook delivery is enabled
|
|
6189
6284
|
*/
|
|
@@ -6275,7 +6370,7 @@ export type WebhookLog = {
|
|
|
6275
6370
|
/**
|
|
6276
6371
|
* Delivery outcome
|
|
6277
6372
|
*/
|
|
6278
|
-
export type
|
|
6373
|
+
export type status11 = 'success' | 'failed';
|
|
6279
6374
|
|
|
6280
6375
|
/**
|
|
6281
6376
|
* Webhook payload for `account.ads.initial_sync_completed` events.
|
|
@@ -6387,7 +6482,7 @@ export type event = 'account.ads.initial_sync_completed';
|
|
|
6387
6482
|
/**
|
|
6388
6483
|
* Overall outcome of the initial sync.
|
|
6389
6484
|
*/
|
|
6390
|
-
export type
|
|
6485
|
+
export type status12 = 'success' | 'failure';
|
|
6391
6486
|
|
|
6392
6487
|
/**
|
|
6393
6488
|
* Stable category for UX branching. New values may be added; existing ones are
|
|
@@ -6906,7 +7001,7 @@ export type WebhookPayloadComment = {
|
|
|
6906
7001
|
*/
|
|
6907
7002
|
imageUrl: (string) | null;
|
|
6908
7003
|
/**
|
|
6909
|
-
* Public URL of the post. Null for
|
|
7004
|
+
* Public URL of the post. Null when no URL was ever stored for it, for example a platform draft or a post recovered without one.
|
|
6910
7005
|
*/
|
|
6911
7006
|
permalink: (string) | null;
|
|
6912
7007
|
};
|
|
@@ -7217,6 +7312,9 @@ export type WebhookPayloadMessage = {
|
|
|
7217
7312
|
isVerified?: (boolean) | null;
|
|
7218
7313
|
};
|
|
7219
7314
|
};
|
|
7315
|
+
/**
|
|
7316
|
+
* When the message was sent, as reported by the platform and passed through unmodified. Full ISO 8601 date-time: Instagram and Facebook carry millisecond precision, while some platforms (for example WhatsApp and Telegram) report whole seconds. Use this field as the chronological ordering key. If two messages share the same value, fetch the conversation messages with sortOrder=desc for the deterministic order.
|
|
7317
|
+
*/
|
|
7220
7318
|
sentAt: string;
|
|
7221
7319
|
isRead: boolean;
|
|
7222
7320
|
};
|
|
@@ -7253,7 +7351,8 @@ export type WebhookPayloadMessage = {
|
|
|
7253
7351
|
/**
|
|
7254
7352
|
* WhatsApp only. Which kind of interactive reply the user sent:
|
|
7255
7353
|
* `button_reply` (tap on an interactive button), `list_reply` (tap on a
|
|
7256
|
-
* list row), or `nfm_reply` (a WhatsApp Flow submission
|
|
7354
|
+
* list row), or `nfm_reply` (a WhatsApp Flow submission or an
|
|
7355
|
+
* `address_message` submission, see `nfmReplyName`).
|
|
7257
7356
|
*
|
|
7258
7357
|
*/
|
|
7259
7358
|
interactiveType?: 'button_reply' | 'list_reply' | 'nfm_reply';
|
|
@@ -7280,12 +7379,23 @@ export type WebhookPayloadMessage = {
|
|
|
7280
7379
|
/**
|
|
7281
7380
|
* WhatsApp only. Parsed Flow response JSON. Populated when
|
|
7282
7381
|
* `flowResponseJson` is valid JSON; otherwise omitted. Keys and
|
|
7283
|
-
* value types depend on the specific Flow that was submitted.
|
|
7382
|
+
* value types depend on the specific Flow that was submitted. An
|
|
7383
|
+
* `address_message` submission (`nfmReplyName: address_message`) carries
|
|
7384
|
+
* the address fields (`name`, `address`, `city`, `state`, `in_pin_code`,
|
|
7385
|
+
* ...), either at the top level or nested under `values`; read both.
|
|
7284
7386
|
*
|
|
7285
7387
|
*/
|
|
7286
7388
|
flowResponseData?: {
|
|
7287
7389
|
[key: string]: unknown;
|
|
7288
7390
|
};
|
|
7391
|
+
/**
|
|
7392
|
+
* WhatsApp only. `nfm_reply.name` as Meta sent it, e.g. `flow` or
|
|
7393
|
+
* `address_message`. Address submissions share the `nfm_reply`
|
|
7394
|
+
* envelope with Flow submissions and are otherwise indistinguishable
|
|
7395
|
+
* in `flowResponseData`; use this field to tell them apart.
|
|
7396
|
+
*
|
|
7397
|
+
*/
|
|
7398
|
+
nfmReplyName?: string;
|
|
7289
7399
|
/**
|
|
7290
7400
|
* WhatsApp only. Cart submitted by the user from a commerce message
|
|
7291
7401
|
* (catalog, product, or product-list message). Meta's `order` object
|
|
@@ -7511,7 +7621,8 @@ export type event13 = 'message.received';
|
|
|
7511
7621
|
/**
|
|
7512
7622
|
* WhatsApp only. Which kind of interactive reply the user sent:
|
|
7513
7623
|
* `button_reply` (tap on an interactive button), `list_reply` (tap on a
|
|
7514
|
-
* list row), or `nfm_reply` (a WhatsApp Flow submission
|
|
7624
|
+
* list row), or `nfm_reply` (a WhatsApp Flow submission or an
|
|
7625
|
+
* `address_message` submission, see `nfmReplyName`).
|
|
7515
7626
|
*
|
|
7516
7627
|
*/
|
|
7517
7628
|
export type interactiveType = 'button_reply' | 'list_reply' | 'nfm_reply';
|
|
@@ -7697,6 +7808,9 @@ export type WebhookPayloadMessageSent = {
|
|
|
7697
7808
|
username?: string;
|
|
7698
7809
|
picture?: string;
|
|
7699
7810
|
};
|
|
7811
|
+
/**
|
|
7812
|
+
* When the message was sent, as reported by the platform and passed through unmodified. Full ISO 8601 date-time: Instagram and Facebook carry millisecond precision, while some platforms (for example WhatsApp and Telegram) report whole seconds. Use this field as the chronological ordering key. If two messages share the same value, fetch the conversation messages with sortOrder=desc for the deterministic order.
|
|
7813
|
+
*/
|
|
7700
7814
|
sentAt: string;
|
|
7701
7815
|
isRead: boolean;
|
|
7702
7816
|
/**
|
|
@@ -7864,7 +7978,7 @@ export type event19 = 'post.platform.published' | 'post.platform.failed' | 'post
|
|
|
7864
7978
|
/**
|
|
7865
7979
|
* Terminal status this event fires on. Matches the event suffix.
|
|
7866
7980
|
*/
|
|
7867
|
-
export type
|
|
7981
|
+
export type status13 = 'published' | 'failed' | 'deleted';
|
|
7868
7982
|
|
|
7869
7983
|
/**
|
|
7870
7984
|
* Webhook payload for reaction received events (WhatsApp, Telegram, Slack, Instagram, Facebook Messenger)
|
|
@@ -8073,6 +8187,62 @@ export type WebhookPayloadTest = {
|
|
|
8073
8187
|
|
|
8074
8188
|
export type event24 = 'webhook.test';
|
|
8075
8189
|
|
|
8190
|
+
/**
|
|
8191
|
+
* Webhook payload for the `whatsapp.account.name_status_updated` event.
|
|
8192
|
+
* Fired when Meta finishes reviewing a WhatsApp display-name change on a
|
|
8193
|
+
* connected number. Maps Meta's `phone_number_name_update` WABA webhook
|
|
8194
|
+
* field onto our event envelope. Fires only for a review outcome
|
|
8195
|
+
* (APPROVED, DECLINED, PENDING_REVIEW); a name applied without review
|
|
8196
|
+
* reports `name_status: AVAILABLE_WITHOUT_REVIEW` on the phone node
|
|
8197
|
+
* instead, and Meta never sends this webhook field for that case.
|
|
8198
|
+
*
|
|
8199
|
+
*/
|
|
8200
|
+
export type WebhookPayloadWhatsAppAccountNameStatusUpdated = {
|
|
8201
|
+
/**
|
|
8202
|
+
* Stable webhook event ID
|
|
8203
|
+
*/
|
|
8204
|
+
id: string;
|
|
8205
|
+
event: 'whatsapp.account.name_status_updated';
|
|
8206
|
+
account: {
|
|
8207
|
+
accountId: string;
|
|
8208
|
+
profileId: string;
|
|
8209
|
+
platform: 'whatsapp';
|
|
8210
|
+
username: string;
|
|
8211
|
+
displayName?: string;
|
|
8212
|
+
};
|
|
8213
|
+
name: {
|
|
8214
|
+
/**
|
|
8215
|
+
* Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
|
|
8216
|
+
*/
|
|
8217
|
+
status: 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
|
|
8218
|
+
/**
|
|
8219
|
+
* The display name Meta reviewed. Null if Meta did not send one.
|
|
8220
|
+
*/
|
|
8221
|
+
requestedName: (string) | null;
|
|
8222
|
+
/**
|
|
8223
|
+
* Meta's free-form decline reason. Null on approval, or when Meta sends the literal string "NONE".
|
|
8224
|
+
*/
|
|
8225
|
+
rejectionReason: (string) | null;
|
|
8226
|
+
/**
|
|
8227
|
+
* The phone number this review is for, as Meta reported it.
|
|
8228
|
+
*/
|
|
8229
|
+
displayPhoneNumber: (string) | null;
|
|
8230
|
+
};
|
|
8231
|
+
/**
|
|
8232
|
+
* UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
|
|
8233
|
+
*/
|
|
8234
|
+
timestamp: string;
|
|
8235
|
+
};
|
|
8236
|
+
|
|
8237
|
+
export type event25 = 'whatsapp.account.name_status_updated';
|
|
8238
|
+
|
|
8239
|
+
export type platform12 = 'whatsapp';
|
|
8240
|
+
|
|
8241
|
+
/**
|
|
8242
|
+
* Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
|
|
8243
|
+
*/
|
|
8244
|
+
export type status14 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
|
|
8245
|
+
|
|
8076
8246
|
/**
|
|
8077
8247
|
* Webhook payload for the `whatsapp.template.category_updated` event.
|
|
8078
8248
|
* Fired when Meta reclassifies a template's category attached to a
|
|
@@ -8135,9 +8305,7 @@ export type WebhookPayloadWhatsAppTemplateCategoryUpdated = {
|
|
|
8135
8305
|
timestamp: string;
|
|
8136
8306
|
};
|
|
8137
8307
|
|
|
8138
|
-
export type
|
|
8139
|
-
|
|
8140
|
-
export type platform12 = 'whatsapp';
|
|
8308
|
+
export type event26 = 'whatsapp.template.category_updated';
|
|
8141
8309
|
|
|
8142
8310
|
/**
|
|
8143
8311
|
* `scheduled` is Meta's 24h advance notice of an upcoming
|
|
@@ -8214,7 +8382,7 @@ export type WebhookPayloadWhatsAppTemplateStatusUpdated = {
|
|
|
8214
8382
|
timestamp: string;
|
|
8215
8383
|
};
|
|
8216
8384
|
|
|
8217
|
-
export type
|
|
8385
|
+
export type event27 = 'whatsapp.template.status_updated';
|
|
8218
8386
|
|
|
8219
8387
|
/**
|
|
8220
8388
|
* New status. Forwarded verbatim from Meta's `event` field.
|
|
@@ -8222,7 +8390,7 @@ export type event26 = 'whatsapp.template.status_updated';
|
|
|
8222
8390
|
* request before the template is actually removed.
|
|
8223
8391
|
*
|
|
8224
8392
|
*/
|
|
8225
|
-
export type
|
|
8393
|
+
export type status15 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
|
|
8226
8394
|
|
|
8227
8395
|
export type WhatsAppBodyComponent = {
|
|
8228
8396
|
type: 'body';
|
|
@@ -8371,7 +8539,7 @@ export type WhatsAppSandboxSession = {
|
|
|
8371
8539
|
* list responses.
|
|
8372
8540
|
*
|
|
8373
8541
|
*/
|
|
8374
|
-
export type
|
|
8542
|
+
export type status16 = 'pending' | 'active';
|
|
8375
8543
|
|
|
8376
8544
|
export type WhatsAppTemplateButton = {
|
|
8377
8545
|
type: 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
|
|
@@ -8490,7 +8658,7 @@ export type WorkflowExecutionEvent = {
|
|
|
8490
8658
|
|
|
8491
8659
|
export type action2 = 'execution_started' | 'execution_completed' | 'execution_exited' | 'execution_paused' | 'execution_resumed' | 'node_started' | 'node_completed' | 'node_failed' | 'node_skipped';
|
|
8492
8660
|
|
|
8493
|
-
export type
|
|
8661
|
+
export type status17 = 'success' | 'failed' | 'pending';
|
|
8494
8662
|
|
|
8495
8663
|
/**
|
|
8496
8664
|
* A node in a workflow graph. `config` shape depends on `type`.
|
|
@@ -10915,7 +11083,7 @@ export type CreatePostData = {
|
|
|
10915
11083
|
body: {
|
|
10916
11084
|
title?: string;
|
|
10917
11085
|
/**
|
|
10918
|
-
* Post caption/text. Optional when media is attached, all platforms have customContent, every platform entry is an X Article (platformSpecificData.article), or every platform entry is a LinkedIn
|
|
11086
|
+
* Post caption/text. Optional when media is attached, all platforms have customContent, every platform entry is an X Article (platformSpecificData.article), or every platform entry is a LinkedIn text-free reshare (platformSpecificData.reshareUrl with no text). Required for other text-only posts.
|
|
10919
11087
|
*/
|
|
10920
11088
|
content?: string;
|
|
10921
11089
|
mediaItems?: Array<MediaItem>;
|
|
@@ -11477,7 +11645,10 @@ export type GetProfileError = ({
|
|
|
11477
11645
|
export type UpdateProfileData = {
|
|
11478
11646
|
body: {
|
|
11479
11647
|
name?: string;
|
|
11480
|
-
|
|
11648
|
+
/**
|
|
11649
|
+
* Set to null to clear the description.
|
|
11650
|
+
*/
|
|
11651
|
+
description?: (string) | null;
|
|
11481
11652
|
color?: string;
|
|
11482
11653
|
isDefault?: boolean;
|
|
11483
11654
|
};
|
|
@@ -12263,7 +12434,12 @@ export type HandleOAuthCallbackData = {
|
|
|
12263
12434
|
profileId: string;
|
|
12264
12435
|
};
|
|
12265
12436
|
path: {
|
|
12266
|
-
|
|
12437
|
+
/**
|
|
12438
|
+
* Social platform to complete the connect for. Discord, Slack and Telegram are absent because they are
|
|
12439
|
+
* served by their own dedicated routes, documented separately.
|
|
12440
|
+
*
|
|
12441
|
+
*/
|
|
12442
|
+
platform: 'instagram' | 'twitter' | 'threads' | 'linkedin' | 'youtube' | 'tiktok' | 'reddit' | 'pinterest';
|
|
12267
12443
|
};
|
|
12268
12444
|
};
|
|
12269
12445
|
|
|
@@ -12271,6 +12447,56 @@ export type HandleOAuthCallbackResponse = (unknown);
|
|
|
12271
12447
|
|
|
12272
12448
|
export type HandleOAuthCallbackError = (unknown | {
|
|
12273
12449
|
error?: string;
|
|
12450
|
+
} | {
|
|
12451
|
+
/**
|
|
12452
|
+
* Human-readable error message suitable for end-user display.
|
|
12453
|
+
*/
|
|
12454
|
+
error: string;
|
|
12455
|
+
/**
|
|
12456
|
+
* Machine-readable error code. Stable across versions.
|
|
12457
|
+
*/
|
|
12458
|
+
code: 'PAYMENT_REQUIRED';
|
|
12459
|
+
/**
|
|
12460
|
+
* Discriminator for which gate fired.
|
|
12461
|
+
*/
|
|
12462
|
+
reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required';
|
|
12463
|
+
/**
|
|
12464
|
+
* Link to the relevant documentation page.
|
|
12465
|
+
*/
|
|
12466
|
+
documentation_url?: string;
|
|
12467
|
+
/**
|
|
12468
|
+
* Deep-link to send the end-user to. For
|
|
12469
|
+
* `free_tier_exceeded` and `twitter_passthrough` this is
|
|
12470
|
+
* the Zernio billing tab. For `enterprise_required` this
|
|
12471
|
+
* is the Zernio enterprise contact page.
|
|
12472
|
+
*
|
|
12473
|
+
*/
|
|
12474
|
+
dashboard_url?: string;
|
|
12475
|
+
/**
|
|
12476
|
+
* Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
|
|
12477
|
+
*/
|
|
12478
|
+
details?: {
|
|
12479
|
+
/**
|
|
12480
|
+
* How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
|
|
12481
|
+
*/
|
|
12482
|
+
free_tier_account_limit?: number;
|
|
12483
|
+
/**
|
|
12484
|
+
* How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
|
|
12485
|
+
*/
|
|
12486
|
+
current_account_count?: number;
|
|
12487
|
+
/**
|
|
12488
|
+
* Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
|
|
12489
|
+
*/
|
|
12490
|
+
has_payment_method?: boolean;
|
|
12491
|
+
/**
|
|
12492
|
+
* The negotiated connected-account cap from the
|
|
12493
|
+
* team's enterprise contract. Self-service teams
|
|
12494
|
+
* have no cap and never receive this reason. Only
|
|
12495
|
+
* set when reason=enterprise_required.
|
|
12496
|
+
*
|
|
12497
|
+
*/
|
|
12498
|
+
effective_account_limit?: number;
|
|
12499
|
+
};
|
|
12274
12500
|
});
|
|
12275
12501
|
|
|
12276
12502
|
export type ConnectAdsData = {
|
|
@@ -12333,7 +12559,17 @@ export type ConnectAdsData = {
|
|
|
12333
12559
|
*/
|
|
12334
12560
|
profileId: string;
|
|
12335
12561
|
/**
|
|
12336
|
-
* Custom
|
|
12562
|
+
* Custom URL the browser is sent to once the OAuth flow finishes. Honored on
|
|
12563
|
+
* every ads platform, including the separate-token (`tiktok`, `twitter`) and
|
|
12564
|
+
* standalone (`googleads`) flows. Accepts an http(s) URL, a custom app scheme
|
|
12565
|
+
* for mobile deeplinks (e.g. myapp://callback), or a relative path. On success
|
|
12566
|
+
* `tiktok`, `twitter` and `googleads` land on the URL unchanged, while the
|
|
12567
|
+
* same-token platforms (`facebook`, `instagram`, `linkedin`, `pinterest`)
|
|
12568
|
+
* append `connected`, `profileId`, `accountId`, `username` and, on API-key
|
|
12569
|
+
* calls, `connect_token`. On failure every platform appends error details,
|
|
12570
|
+
* starting with `error` and `platform`. When omitted, the browser lands on
|
|
12571
|
+
* the Zernio dashboard.
|
|
12572
|
+
*
|
|
12337
12573
|
*/
|
|
12338
12574
|
redirect_url?: string;
|
|
12339
12575
|
};
|
|
@@ -14619,6 +14855,10 @@ export type ConnectWhatsAppCredentialsResponse = ({
|
|
|
14619
14855
|
* Present when the account was created but Meta rejected the Cloud API registration. The number cannot send messages until this is resolved.
|
|
14620
14856
|
*/
|
|
14621
14857
|
registrationWarning?: string;
|
|
14858
|
+
/**
|
|
14859
|
+
* Present when the WABA webhook subscription (with the Zernio override callback) succeeded. Explains the delivery cutover and warns against unsubscribing the app from the WABA afterward.
|
|
14860
|
+
*/
|
|
14861
|
+
webhookNotice?: string;
|
|
14622
14862
|
account?: {
|
|
14623
14863
|
accountId?: string;
|
|
14624
14864
|
platform?: 'whatsapp';
|
|
@@ -14634,7 +14874,15 @@ export type ConnectWhatsAppCredentialsResponse = ({
|
|
|
14634
14874
|
/**
|
|
14635
14875
|
* The connected phone number
|
|
14636
14876
|
*/
|
|
14637
|
-
|
|
14877
|
+
phoneNumber?: string;
|
|
14878
|
+
/**
|
|
14879
|
+
* Meta-verified business name for the phone number
|
|
14880
|
+
*/
|
|
14881
|
+
verifiedName?: string;
|
|
14882
|
+
/**
|
|
14883
|
+
* Meta quality rating for the phone number (e.g. GREEN, YELLOW, RED, UNKNOWN)
|
|
14884
|
+
*/
|
|
14885
|
+
qualityRating?: string;
|
|
14638
14886
|
};
|
|
14639
14887
|
});
|
|
14640
14888
|
|
|
@@ -14763,6 +15011,232 @@ export type CompleteWhatsAppPhoneSelectionError = (ErrorResponse | {
|
|
|
14763
15011
|
error?: string;
|
|
14764
15012
|
} | unknown);
|
|
14765
15013
|
|
|
15014
|
+
export type ConnectWhatsAppEmbeddedSignupData = {
|
|
15015
|
+
body: {
|
|
15016
|
+
/**
|
|
15017
|
+
* Authorization code from the WA_EMBEDDED_SIGNUP postMessage
|
|
15018
|
+
*/
|
|
15019
|
+
code: string;
|
|
15020
|
+
profileId: string;
|
|
15021
|
+
/**
|
|
15022
|
+
* WhatsApp Business Account id, when the SDK reported one
|
|
15023
|
+
*/
|
|
15024
|
+
wabaId?: string;
|
|
15025
|
+
phoneNumberId?: string;
|
|
15026
|
+
/**
|
|
15027
|
+
* Number is also live in the WhatsApp Business app
|
|
15028
|
+
*/
|
|
15029
|
+
isCoexistence?: boolean;
|
|
15030
|
+
/**
|
|
15031
|
+
* Rejects the connect when Meta returns a different number
|
|
15032
|
+
*/
|
|
15033
|
+
expectedPhoneNumber?: string;
|
|
15034
|
+
};
|
|
15035
|
+
};
|
|
15036
|
+
|
|
15037
|
+
export type ConnectWhatsAppEmbeddedSignupResponse = (unknown);
|
|
15038
|
+
|
|
15039
|
+
export type ConnectWhatsAppEmbeddedSignupError = (ErrorResponse | {
|
|
15040
|
+
error?: string;
|
|
15041
|
+
} | {
|
|
15042
|
+
/**
|
|
15043
|
+
* Human-readable error message suitable for end-user display.
|
|
15044
|
+
*/
|
|
15045
|
+
error: string;
|
|
15046
|
+
/**
|
|
15047
|
+
* Machine-readable error code. Stable across versions.
|
|
15048
|
+
*/
|
|
15049
|
+
code: 'PAYMENT_REQUIRED';
|
|
15050
|
+
/**
|
|
15051
|
+
* Discriminator for which gate fired.
|
|
15052
|
+
*/
|
|
15053
|
+
reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required';
|
|
15054
|
+
/**
|
|
15055
|
+
* Link to the relevant documentation page.
|
|
15056
|
+
*/
|
|
15057
|
+
documentation_url?: string;
|
|
15058
|
+
/**
|
|
15059
|
+
* Deep-link to send the end-user to. For
|
|
15060
|
+
* `free_tier_exceeded` and `twitter_passthrough` this is
|
|
15061
|
+
* the Zernio billing tab. For `enterprise_required` this
|
|
15062
|
+
* is the Zernio enterprise contact page.
|
|
15063
|
+
*
|
|
15064
|
+
*/
|
|
15065
|
+
dashboard_url?: string;
|
|
15066
|
+
/**
|
|
15067
|
+
* Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
|
|
15068
|
+
*/
|
|
15069
|
+
details?: {
|
|
15070
|
+
/**
|
|
15071
|
+
* How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
|
|
15072
|
+
*/
|
|
15073
|
+
free_tier_account_limit?: number;
|
|
15074
|
+
/**
|
|
15075
|
+
* How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
|
|
15076
|
+
*/
|
|
15077
|
+
current_account_count?: number;
|
|
15078
|
+
/**
|
|
15079
|
+
* Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
|
|
15080
|
+
*/
|
|
15081
|
+
has_payment_method?: boolean;
|
|
15082
|
+
/**
|
|
15083
|
+
* The negotiated connected-account cap from the
|
|
15084
|
+
* team's enterprise contract. Self-service teams
|
|
15085
|
+
* have no cap and never receive this reason. Only
|
|
15086
|
+
* set when reason=enterprise_required.
|
|
15087
|
+
*
|
|
15088
|
+
*/
|
|
15089
|
+
effective_account_limit?: number;
|
|
15090
|
+
};
|
|
15091
|
+
} | unknown);
|
|
15092
|
+
|
|
15093
|
+
export type ConnectDiscordChannelData = {
|
|
15094
|
+
body: {
|
|
15095
|
+
/**
|
|
15096
|
+
* Discord server (guild) the channel belongs to
|
|
15097
|
+
*/
|
|
15098
|
+
guildId: string;
|
|
15099
|
+
/**
|
|
15100
|
+
* Text, announcement or forum channel to publish to
|
|
15101
|
+
*/
|
|
15102
|
+
channelId: string;
|
|
15103
|
+
/**
|
|
15104
|
+
* Profile to connect the channel to
|
|
15105
|
+
*/
|
|
15106
|
+
profileId: string;
|
|
15107
|
+
};
|
|
15108
|
+
};
|
|
15109
|
+
|
|
15110
|
+
export type ConnectDiscordChannelResponse = (unknown);
|
|
15111
|
+
|
|
15112
|
+
export type ConnectDiscordChannelError = (ErrorResponse | {
|
|
15113
|
+
error?: string;
|
|
15114
|
+
} | {
|
|
15115
|
+
/**
|
|
15116
|
+
* Human-readable error message suitable for end-user display.
|
|
15117
|
+
*/
|
|
15118
|
+
error: string;
|
|
15119
|
+
/**
|
|
15120
|
+
* Machine-readable error code. Stable across versions.
|
|
15121
|
+
*/
|
|
15122
|
+
code: 'PAYMENT_REQUIRED';
|
|
15123
|
+
/**
|
|
15124
|
+
* Discriminator for which gate fired.
|
|
15125
|
+
*/
|
|
15126
|
+
reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required';
|
|
15127
|
+
/**
|
|
15128
|
+
* Link to the relevant documentation page.
|
|
15129
|
+
*/
|
|
15130
|
+
documentation_url?: string;
|
|
15131
|
+
/**
|
|
15132
|
+
* Deep-link to send the end-user to. For
|
|
15133
|
+
* `free_tier_exceeded` and `twitter_passthrough` this is
|
|
15134
|
+
* the Zernio billing tab. For `enterprise_required` this
|
|
15135
|
+
* is the Zernio enterprise contact page.
|
|
15136
|
+
*
|
|
15137
|
+
*/
|
|
15138
|
+
dashboard_url?: string;
|
|
15139
|
+
/**
|
|
15140
|
+
* Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
|
|
15141
|
+
*/
|
|
15142
|
+
details?: {
|
|
15143
|
+
/**
|
|
15144
|
+
* How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
|
|
15145
|
+
*/
|
|
15146
|
+
free_tier_account_limit?: number;
|
|
15147
|
+
/**
|
|
15148
|
+
* How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
|
|
15149
|
+
*/
|
|
15150
|
+
current_account_count?: number;
|
|
15151
|
+
/**
|
|
15152
|
+
* Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
|
|
15153
|
+
*/
|
|
15154
|
+
has_payment_method?: boolean;
|
|
15155
|
+
/**
|
|
15156
|
+
* The negotiated connected-account cap from the
|
|
15157
|
+
* team's enterprise contract. Self-service teams
|
|
15158
|
+
* have no cap and never receive this reason. Only
|
|
15159
|
+
* set when reason=enterprise_required.
|
|
15160
|
+
*
|
|
15161
|
+
*/
|
|
15162
|
+
effective_account_limit?: number;
|
|
15163
|
+
};
|
|
15164
|
+
} | unknown);
|
|
15165
|
+
|
|
15166
|
+
export type ConnectSlackChannelData = {
|
|
15167
|
+
body: {
|
|
15168
|
+
profileId: string;
|
|
15169
|
+
/**
|
|
15170
|
+
* Slack channel id, C... or G...
|
|
15171
|
+
*/
|
|
15172
|
+
channelId: string;
|
|
15173
|
+
/**
|
|
15174
|
+
* Nonce from the OAuth redirect. Required unless accountId is sent.
|
|
15175
|
+
*/
|
|
15176
|
+
pendingDataToken?: string;
|
|
15177
|
+
/**
|
|
15178
|
+
* Existing Slack account whose workspace token is reused. Required unless pendingDataToken is sent.
|
|
15179
|
+
*/
|
|
15180
|
+
accountId?: string;
|
|
15181
|
+
};
|
|
15182
|
+
};
|
|
15183
|
+
|
|
15184
|
+
export type ConnectSlackChannelResponse = (unknown);
|
|
15185
|
+
|
|
15186
|
+
export type ConnectSlackChannelError = (ErrorResponse | {
|
|
15187
|
+
error?: string;
|
|
15188
|
+
} | {
|
|
15189
|
+
/**
|
|
15190
|
+
* Human-readable error message suitable for end-user display.
|
|
15191
|
+
*/
|
|
15192
|
+
error: string;
|
|
15193
|
+
/**
|
|
15194
|
+
* Machine-readable error code. Stable across versions.
|
|
15195
|
+
*/
|
|
15196
|
+
code: 'PAYMENT_REQUIRED';
|
|
15197
|
+
/**
|
|
15198
|
+
* Discriminator for which gate fired.
|
|
15199
|
+
*/
|
|
15200
|
+
reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required';
|
|
15201
|
+
/**
|
|
15202
|
+
* Link to the relevant documentation page.
|
|
15203
|
+
*/
|
|
15204
|
+
documentation_url?: string;
|
|
15205
|
+
/**
|
|
15206
|
+
* Deep-link to send the end-user to. For
|
|
15207
|
+
* `free_tier_exceeded` and `twitter_passthrough` this is
|
|
15208
|
+
* the Zernio billing tab. For `enterprise_required` this
|
|
15209
|
+
* is the Zernio enterprise contact page.
|
|
15210
|
+
*
|
|
15211
|
+
*/
|
|
15212
|
+
dashboard_url?: string;
|
|
15213
|
+
/**
|
|
15214
|
+
* Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
|
|
15215
|
+
*/
|
|
15216
|
+
details?: {
|
|
15217
|
+
/**
|
|
15218
|
+
* How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
|
|
15219
|
+
*/
|
|
15220
|
+
free_tier_account_limit?: number;
|
|
15221
|
+
/**
|
|
15222
|
+
* How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
|
|
15223
|
+
*/
|
|
15224
|
+
current_account_count?: number;
|
|
15225
|
+
/**
|
|
15226
|
+
* Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
|
|
15227
|
+
*/
|
|
15228
|
+
has_payment_method?: boolean;
|
|
15229
|
+
/**
|
|
15230
|
+
* The negotiated connected-account cap from the
|
|
15231
|
+
* team's enterprise contract. Self-service teams
|
|
15232
|
+
* have no cap and never receive this reason. Only
|
|
15233
|
+
* set when reason=enterprise_required.
|
|
15234
|
+
*
|
|
15235
|
+
*/
|
|
15236
|
+
effective_account_limit?: number;
|
|
15237
|
+
};
|
|
15238
|
+
} | unknown);
|
|
15239
|
+
|
|
14766
15240
|
export type GetTelegramConnectStatusData = {
|
|
14767
15241
|
query: {
|
|
14768
15242
|
/**
|
|
@@ -16949,7 +17423,7 @@ export type CreateWebhookSettingsData = {
|
|
|
16949
17423
|
/**
|
|
16950
17424
|
* Events to subscribe to (at least one required)
|
|
16951
17425
|
*/
|
|
16952
|
-
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.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' | 'verification.approved' | 'verification.failed')>;
|
|
17426
|
+
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' | 'verification.approved' | 'verification.failed')>;
|
|
16953
17427
|
/**
|
|
16954
17428
|
* Enable or disable webhook delivery. Defaults to `true` when omitted.
|
|
16955
17429
|
*/
|
|
@@ -17004,7 +17478,7 @@ export type UpdateWebhookSettingsData = {
|
|
|
17004
17478
|
/**
|
|
17005
17479
|
* Events to subscribe to. Must contain at least one event if provided.
|
|
17006
17480
|
*/
|
|
17007
|
-
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.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' | 'verification.approved' | 'verification.failed')>;
|
|
17481
|
+
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' | 'verification.approved' | 'verification.failed')>;
|
|
17008
17482
|
/**
|
|
17009
17483
|
* Enable or disable webhook delivery
|
|
17010
17484
|
*/
|
|
@@ -17514,6 +17988,13 @@ export type ListInboxConversationsResponse = ({
|
|
|
17514
17988
|
retryAfter?: (number) | null;
|
|
17515
17989
|
}>;
|
|
17516
17990
|
lastUpdated?: string;
|
|
17991
|
+
/**
|
|
17992
|
+
* Connected accounts that were not queried: their platform does not support this feature, or the account is not enabled for it
|
|
17993
|
+
*/
|
|
17994
|
+
accountsSkipped?: Array<{
|
|
17995
|
+
accountId?: string;
|
|
17996
|
+
platform?: string;
|
|
17997
|
+
}>;
|
|
17517
17998
|
};
|
|
17518
17999
|
});
|
|
17519
18000
|
|
|
@@ -18229,8 +18710,7 @@ export type SendInboxMessageData = {
|
|
|
18229
18710
|
* commerce messages (single product, product list, catalog, and
|
|
18230
18711
|
* carousel). When set, takes priority over `buttons` and
|
|
18231
18712
|
* `quickReplies`. The shape mirrors Meta's Cloud API `interactive`
|
|
18232
|
-
* object
|
|
18233
|
-
* will also work here.
|
|
18713
|
+
* object for the types in the enum below.
|
|
18234
18714
|
*
|
|
18235
18715
|
* Use `buttons` / `quickReplies` for simple button replies
|
|
18236
18716
|
* (WhatsApp's `interactive.type: "button"`): the abstraction caps at
|
|
@@ -18276,6 +18756,18 @@ export type SendInboxMessageData = {
|
|
|
18276
18756
|
* For `catalog_message`, `action` may also be omitted (we default it
|
|
18277
18757
|
* to `{ "name": "catalog_message" }`).
|
|
18278
18758
|
*
|
|
18759
|
+
* For `address_message`, `parameters.country` is required (Meta
|
|
18760
|
+
* rejects the whole send without it); everything else in
|
|
18761
|
+
* `parameters` (`values`, `saved_addresses`, `validation_errors`)
|
|
18762
|
+
* is forwarded to Meta as-is. This is Meta's native structured
|
|
18763
|
+
* shipping-address capture, generally available in India as of
|
|
18764
|
+
* 2026-08; check Meta's documentation for current country
|
|
18765
|
+
* availability before relying on it elsewhere. The submitted
|
|
18766
|
+
* address arrives as an `nfm_reply` on the `message.received`
|
|
18767
|
+
* webhook, same as a Flow submission, but with
|
|
18768
|
+
* `metadata.nfmReplyName` set to `address_message` so you can
|
|
18769
|
+
* tell the two apart.
|
|
18770
|
+
*
|
|
18279
18771
|
* Tap events come back via the `message.received` webhook with
|
|
18280
18772
|
* `metadata.interactiveType` set to `list_reply` or `nfm_reply`.
|
|
18281
18773
|
* Carts submitted from commerce messages arrive as `metadata.order`;
|
|
@@ -18286,7 +18778,7 @@ export type SendInboxMessageData = {
|
|
|
18286
18778
|
/**
|
|
18287
18779
|
* Which interactive layout to render.
|
|
18288
18780
|
*/
|
|
18289
|
-
type: 'list' | 'cta_url' | 'flow' | 'location_request_message' | 'request_contact_info' | 'voice_call' | 'product' | 'product_list' | 'catalog_message' | 'carousel';
|
|
18781
|
+
type: 'list' | 'cta_url' | 'flow' | 'location_request_message' | 'request_contact_info' | 'voice_call' | 'product' | 'product_list' | 'catalog_message' | 'carousel' | 'address_message';
|
|
18290
18782
|
/**
|
|
18291
18783
|
* Optional header shown above the body. Required with
|
|
18292
18784
|
* `type: "text"` for `product_list`; not allowed for `product`
|
|
@@ -18497,6 +18989,32 @@ export type SendInboxMessageData = {
|
|
|
18497
18989
|
};
|
|
18498
18990
|
[key: string]: unknown | number | string;
|
|
18499
18991
|
}>;
|
|
18992
|
+
} | {
|
|
18993
|
+
name: 'address_message';
|
|
18994
|
+
parameters: {
|
|
18995
|
+
/**
|
|
18996
|
+
* ISO 3166-1 alpha-2 country code Meta should localize the address form for (e.g. IN). Required: Meta rejects the send without it.
|
|
18997
|
+
*/
|
|
18998
|
+
country: string;
|
|
18999
|
+
/**
|
|
19000
|
+
* Optional pre-filled address field values.
|
|
19001
|
+
*/
|
|
19002
|
+
values?: {
|
|
19003
|
+
[key: string]: unknown;
|
|
19004
|
+
};
|
|
19005
|
+
/**
|
|
19006
|
+
* Optional list of the recipient's previously saved addresses to offer as quick picks.
|
|
19007
|
+
*/
|
|
19008
|
+
saved_addresses?: Array<{
|
|
19009
|
+
[key: string]: unknown;
|
|
19010
|
+
}>;
|
|
19011
|
+
/**
|
|
19012
|
+
* Optional per-field error messages to show when re-prompting after a failed validation.
|
|
19013
|
+
*/
|
|
19014
|
+
validation_errors?: {
|
|
19015
|
+
[key: string]: (string);
|
|
19016
|
+
};
|
|
19017
|
+
};
|
|
18500
19018
|
});
|
|
18501
19019
|
};
|
|
18502
19020
|
/**
|
|
@@ -19182,6 +19700,13 @@ export type ListInboxCommentsResponse = ({
|
|
|
19182
19700
|
retryAfter?: (number) | null;
|
|
19183
19701
|
}>;
|
|
19184
19702
|
lastUpdated?: string;
|
|
19703
|
+
/**
|
|
19704
|
+
* Connected accounts that were not queried: their platform does not support this feature, or the account is not enabled for it
|
|
19705
|
+
*/
|
|
19706
|
+
accountsSkipped?: Array<{
|
|
19707
|
+
accountId?: string;
|
|
19708
|
+
platform?: string;
|
|
19709
|
+
}>;
|
|
19185
19710
|
};
|
|
19186
19711
|
});
|
|
19187
19712
|
|
|
@@ -20268,6 +20793,13 @@ export type ListInboxReviewsResponse = ({
|
|
|
20268
20793
|
retryAfter?: (number) | null;
|
|
20269
20794
|
}>;
|
|
20270
20795
|
lastUpdated?: string;
|
|
20796
|
+
/**
|
|
20797
|
+
* Connected accounts that were not queried: their platform does not support this feature, or the account is not enabled for it
|
|
20798
|
+
*/
|
|
20799
|
+
accountsSkipped?: Array<{
|
|
20800
|
+
accountId?: string;
|
|
20801
|
+
platform?: string;
|
|
20802
|
+
}>;
|
|
20271
20803
|
};
|
|
20272
20804
|
summary?: {
|
|
20273
20805
|
totalReviews?: number;
|
|
@@ -20487,6 +21019,9 @@ export type UpdateWhatsAppTemplateResponse = ({
|
|
|
20487
21019
|
template?: {
|
|
20488
21020
|
id?: string;
|
|
20489
21021
|
name?: string;
|
|
21022
|
+
/**
|
|
21023
|
+
* Approval state read back from Meta after the update, normally PENDING. If the state cannot be read back, the last known status is returned instead.
|
|
21024
|
+
*/
|
|
20490
21025
|
status?: string;
|
|
20491
21026
|
};
|
|
20492
21027
|
});
|
|
@@ -22492,6 +23027,10 @@ export type ListPhoneNumbersResponse = ({
|
|
|
22492
23027
|
* False for numbers you brought yourself (connected via Meta embedded signup) — they live on your own carrier, so SMS/Calls can't be enabled on them.
|
|
22493
23028
|
*/
|
|
22494
23029
|
hostedByZernio?: boolean;
|
|
23030
|
+
/**
|
|
23031
|
+
* SIP trunk the number is attached to; null when not trunked. While attached, enabling Calls or WhatsApp calling, requesting WhatsApp verification, and releasing the number all return 409.
|
|
23032
|
+
*/
|
|
23033
|
+
sipTrunkId?: (string) | null;
|
|
22495
23034
|
profileId?: {
|
|
22496
23035
|
[key: string]: unknown;
|
|
22497
23036
|
};
|
|
@@ -22583,6 +23122,10 @@ export type GetPhoneNumberResponse = ({
|
|
|
22583
23122
|
*/
|
|
22584
23123
|
regulatoryDeclineReason?: (string) | null;
|
|
22585
23124
|
provisionedAt?: string;
|
|
23125
|
+
/**
|
|
23126
|
+
* SIP trunk the number is attached to; null when not trunked. While attached, enabling Calls or WhatsApp calling, requesting WhatsApp verification, and releasing the number all return 409.
|
|
23127
|
+
*/
|
|
23128
|
+
sipTrunkId?: (string) | null;
|
|
22586
23129
|
};
|
|
22587
23130
|
});
|
|
22588
23131
|
|
|
@@ -22906,6 +23449,10 @@ export type GetWhatsAppPhoneNumbersResponse = ({
|
|
|
22906
23449
|
* False for numbers you brought yourself (connected via Meta embedded signup) — they live on your own carrier, so SMS/Calls can't be enabled on them.
|
|
22907
23450
|
*/
|
|
22908
23451
|
hostedByZernio?: boolean;
|
|
23452
|
+
/**
|
|
23453
|
+
* SIP trunk the number is attached to; null when not trunked. While attached, enabling Calls or WhatsApp calling, requesting WhatsApp verification, and releasing the number all return 409.
|
|
23454
|
+
*/
|
|
23455
|
+
sipTrunkId?: (string) | null;
|
|
22909
23456
|
profileId?: {
|
|
22910
23457
|
[key: string]: unknown;
|
|
22911
23458
|
};
|
|
@@ -24455,6 +25002,191 @@ export type DisableVoiceOnNumberError = ({
|
|
|
24455
25002
|
error?: string;
|
|
24456
25003
|
} | unknown);
|
|
24457
25004
|
|
|
25005
|
+
export type CreateSipTrunkData = {
|
|
25006
|
+
body: {
|
|
25007
|
+
/**
|
|
25008
|
+
* Display name for the trunk.
|
|
25009
|
+
*/
|
|
25010
|
+
label: string;
|
|
25011
|
+
/**
|
|
25012
|
+
* Fully-qualified hostname inbound calls are delivered to (e.g. sip.rtc.elevenlabs.io, sip.retellai.com).
|
|
25013
|
+
*/
|
|
25014
|
+
sipHost: string;
|
|
25015
|
+
/**
|
|
25016
|
+
* Defaults to 5061 for tls, 5060 otherwise.
|
|
25017
|
+
*/
|
|
25018
|
+
sipPort?: number;
|
|
25019
|
+
/**
|
|
25020
|
+
* Signaling transport toward sipHost. Default tls (with SRTP media).
|
|
25021
|
+
*/
|
|
25022
|
+
transport?: 'tls' | 'tcp' | 'udp';
|
|
25023
|
+
};
|
|
25024
|
+
};
|
|
25025
|
+
|
|
25026
|
+
export type CreateSipTrunkResponse = ({
|
|
25027
|
+
id?: string;
|
|
25028
|
+
label?: string;
|
|
25029
|
+
sipHost?: string;
|
|
25030
|
+
sipPort?: number;
|
|
25031
|
+
transport?: 'tls' | 'tcp' | 'udp';
|
|
25032
|
+
termination?: {
|
|
25033
|
+
/**
|
|
25034
|
+
* Telnyx termination host the platform dials for outbound (sip.telnyx.com).
|
|
25035
|
+
*/
|
|
25036
|
+
uri?: string;
|
|
25037
|
+
/**
|
|
25038
|
+
* SIP digest username.
|
|
25039
|
+
*/
|
|
25040
|
+
username?: string;
|
|
25041
|
+
};
|
|
25042
|
+
numbersAttached?: number;
|
|
25043
|
+
createdAt?: (string) | null;
|
|
25044
|
+
/**
|
|
25045
|
+
* SIP digest password, shown only in this response.
|
|
25046
|
+
*/
|
|
25047
|
+
digestPassword?: string;
|
|
25048
|
+
});
|
|
25049
|
+
|
|
25050
|
+
export type CreateSipTrunkError = (ErrorResponse | {
|
|
25051
|
+
error?: string;
|
|
25052
|
+
} | unknown);
|
|
25053
|
+
|
|
25054
|
+
export type ListSipTrunksResponse = ({
|
|
25055
|
+
trunks?: Array<{
|
|
25056
|
+
id?: string;
|
|
25057
|
+
label?: string;
|
|
25058
|
+
sipHost?: string;
|
|
25059
|
+
sipPort?: number;
|
|
25060
|
+
transport?: 'tls' | 'tcp' | 'udp';
|
|
25061
|
+
termination?: {
|
|
25062
|
+
uri?: string;
|
|
25063
|
+
username?: string;
|
|
25064
|
+
};
|
|
25065
|
+
numbersAttached?: number;
|
|
25066
|
+
createdAt?: (string) | null;
|
|
25067
|
+
}>;
|
|
25068
|
+
/**
|
|
25069
|
+
* Whether this workspace can create SIP trunks. Managing existing trunks always works.
|
|
25070
|
+
*/
|
|
25071
|
+
enabled?: boolean;
|
|
25072
|
+
});
|
|
25073
|
+
|
|
25074
|
+
export type ListSipTrunksError = ({
|
|
25075
|
+
error?: string;
|
|
25076
|
+
});
|
|
25077
|
+
|
|
25078
|
+
export type GetSipTrunkData = {
|
|
25079
|
+
path: {
|
|
25080
|
+
id: string;
|
|
25081
|
+
};
|
|
25082
|
+
};
|
|
25083
|
+
|
|
25084
|
+
export type GetSipTrunkResponse = ({
|
|
25085
|
+
id?: string;
|
|
25086
|
+
label?: string;
|
|
25087
|
+
sipHost?: string;
|
|
25088
|
+
sipPort?: number;
|
|
25089
|
+
transport?: 'tls' | 'tcp' | 'udp';
|
|
25090
|
+
termination?: {
|
|
25091
|
+
uri?: string;
|
|
25092
|
+
username?: string;
|
|
25093
|
+
};
|
|
25094
|
+
numbersAttached?: number;
|
|
25095
|
+
createdAt?: (string) | null;
|
|
25096
|
+
numbers?: Array<{
|
|
25097
|
+
/**
|
|
25098
|
+
* Phone number record ID.
|
|
25099
|
+
*/
|
|
25100
|
+
id?: string;
|
|
25101
|
+
phoneNumber?: string;
|
|
25102
|
+
}>;
|
|
25103
|
+
});
|
|
25104
|
+
|
|
25105
|
+
export type GetSipTrunkError = (ErrorResponse | {
|
|
25106
|
+
error?: string;
|
|
25107
|
+
} | unknown);
|
|
25108
|
+
|
|
25109
|
+
export type DeleteSipTrunkData = {
|
|
25110
|
+
path: {
|
|
25111
|
+
id: string;
|
|
25112
|
+
};
|
|
25113
|
+
};
|
|
25114
|
+
|
|
25115
|
+
export type DeleteSipTrunkResponse = ({
|
|
25116
|
+
deleted?: boolean;
|
|
25117
|
+
});
|
|
25118
|
+
|
|
25119
|
+
export type DeleteSipTrunkError = (ErrorResponse | {
|
|
25120
|
+
error?: string;
|
|
25121
|
+
} | unknown);
|
|
25122
|
+
|
|
25123
|
+
export type RotateSipTrunkCredentialsData = {
|
|
25124
|
+
path: {
|
|
25125
|
+
id: string;
|
|
25126
|
+
};
|
|
25127
|
+
};
|
|
25128
|
+
|
|
25129
|
+
export type RotateSipTrunkCredentialsResponse = ({
|
|
25130
|
+
termination?: {
|
|
25131
|
+
/**
|
|
25132
|
+
* Telnyx termination host the platform dials for outbound (sip.telnyx.com).
|
|
25133
|
+
*/
|
|
25134
|
+
uri?: string;
|
|
25135
|
+
/**
|
|
25136
|
+
* SIP digest username.
|
|
25137
|
+
*/
|
|
25138
|
+
username?: string;
|
|
25139
|
+
};
|
|
25140
|
+
digestPassword?: string;
|
|
25141
|
+
});
|
|
25142
|
+
|
|
25143
|
+
export type RotateSipTrunkCredentialsError = (ErrorResponse | {
|
|
25144
|
+
error?: string;
|
|
25145
|
+
} | unknown);
|
|
25146
|
+
|
|
25147
|
+
export type AttachNumberToSipTrunkData = {
|
|
25148
|
+
body: {
|
|
25149
|
+
/**
|
|
25150
|
+
* SIP trunk ID (from POST /v1/phone-numbers/sip-trunks).
|
|
25151
|
+
*/
|
|
25152
|
+
trunkId: string;
|
|
25153
|
+
};
|
|
25154
|
+
path: {
|
|
25155
|
+
/**
|
|
25156
|
+
* Phone number record ID (from GET /v1/phone-numbers).
|
|
25157
|
+
*/
|
|
25158
|
+
id: string;
|
|
25159
|
+
};
|
|
25160
|
+
};
|
|
25161
|
+
|
|
25162
|
+
export type AttachNumberToSipTrunkResponse = ({
|
|
25163
|
+
attached?: boolean;
|
|
25164
|
+
phoneNumber?: string;
|
|
25165
|
+
trunkId?: string;
|
|
25166
|
+
});
|
|
25167
|
+
|
|
25168
|
+
export type AttachNumberToSipTrunkError = (ErrorResponse | {
|
|
25169
|
+
error?: string;
|
|
25170
|
+
} | unknown);
|
|
25171
|
+
|
|
25172
|
+
export type DetachNumberFromSipTrunkData = {
|
|
25173
|
+
path: {
|
|
25174
|
+
id: string;
|
|
25175
|
+
};
|
|
25176
|
+
};
|
|
25177
|
+
|
|
25178
|
+
export type DetachNumberFromSipTrunkResponse = ({
|
|
25179
|
+
/**
|
|
25180
|
+
* Always false after a successful detach.
|
|
25181
|
+
*/
|
|
25182
|
+
attached?: boolean;
|
|
25183
|
+
phoneNumber?: string;
|
|
25184
|
+
});
|
|
25185
|
+
|
|
25186
|
+
export type DetachNumberFromSipTrunkError = (ErrorResponse | {
|
|
25187
|
+
error?: string;
|
|
25188
|
+
} | unknown);
|
|
25189
|
+
|
|
24458
25190
|
export type EnableSmsOnNumberData = {
|
|
24459
25191
|
path: {
|
|
24460
25192
|
/**
|
|
@@ -24761,6 +25493,10 @@ export type GetWhatsAppPhoneNumberResponse = ({
|
|
|
24761
25493
|
*/
|
|
24762
25494
|
regulatoryDeclineReason?: (string) | null;
|
|
24763
25495
|
provisionedAt?: string;
|
|
25496
|
+
/**
|
|
25497
|
+
* SIP trunk the number is attached to; null when not trunked. While attached, enabling Calls or WhatsApp calling, requesting WhatsApp verification, and releasing the number all return 409.
|
|
25498
|
+
*/
|
|
25499
|
+
sipTrunkId?: (string) | null;
|
|
24764
25500
|
};
|
|
24765
25501
|
});
|
|
24766
25502
|
|
|
@@ -25246,6 +25982,10 @@ export type CreateWhatsAppFlowData = {
|
|
|
25246
25982
|
* When cloning, true keeps the clone in cloneFlowId's version lineage (auto-numbered next version); false/absent creates an independent flow. Ignored without cloneFlowId.
|
|
25247
25983
|
*/
|
|
25248
25984
|
asVersion?: boolean;
|
|
25985
|
+
/**
|
|
25986
|
+
* HTTPS-only data exchange endpoint for the flow. Settable only while the flow is in DRAFT, and the flow's uploaded Flow JSON must declare data_api_version "3.0" for the endpoint to be used.
|
|
25987
|
+
*/
|
|
25988
|
+
endpointUri?: string;
|
|
25249
25989
|
};
|
|
25250
25990
|
};
|
|
25251
25991
|
|
|
@@ -25323,6 +26063,10 @@ export type UpdateWhatsAppFlowData = {
|
|
|
25323
26063
|
*/
|
|
25324
26064
|
name?: string;
|
|
25325
26065
|
categories?: Array<('SIGN_UP' | 'SIGN_IN' | 'APPOINTMENT_BOOKING' | 'LEAD_GENERATION' | 'CONTACT_US' | 'CUSTOMER_SUPPORT' | 'SURVEY' | 'OTHER')>;
|
|
26066
|
+
/**
|
|
26067
|
+
* HTTPS-only data exchange endpoint for the flow. Settable only while the flow is in DRAFT, and the flow's uploaded Flow JSON must declare data_api_version "3.0" for the endpoint to be used.
|
|
26068
|
+
*/
|
|
26069
|
+
endpointUri?: string;
|
|
25326
26070
|
};
|
|
25327
26071
|
path: {
|
|
25328
26072
|
/**
|
|
@@ -26411,6 +27155,17 @@ export type ListBroadcastRecipientsResponse = ({
|
|
|
26411
27155
|
skip?: number;
|
|
26412
27156
|
hasMore?: boolean;
|
|
26413
27157
|
};
|
|
27158
|
+
/**
|
|
27159
|
+
* Delivery totals across all recipients in the broadcast, independent of pagination and status filtering.
|
|
27160
|
+
*/
|
|
27161
|
+
summary?: {
|
|
27162
|
+
total?: number;
|
|
27163
|
+
pending?: number;
|
|
27164
|
+
sent?: number;
|
|
27165
|
+
delivered?: number;
|
|
27166
|
+
read?: number;
|
|
27167
|
+
failed?: number;
|
|
27168
|
+
};
|
|
26414
27169
|
});
|
|
26415
27170
|
|
|
26416
27171
|
export type ListBroadcastRecipientsError = (unknown | {
|
|
@@ -28238,7 +28993,7 @@ export type CreateAdCampaignData = {
|
|
|
28238
28993
|
/**
|
|
28239
28994
|
* Mapped to the ODAX objective (same mapping as POST /v1/ads/create).
|
|
28240
28995
|
*/
|
|
28241
|
-
goal: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'job_applicants' | 'conversions' | 'app_promotion' | 'catalog_sales';
|
|
28996
|
+
goal: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'job_applicants' | 'conversions' | 'app_promotion' | 'catalog_sales' | 'page_likes';
|
|
28242
28997
|
specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
|
|
28243
28998
|
/**
|
|
28244
28999
|
* Campaign-level (CBO) budget in WHOLE currency units (USD: 50 = $50.00), NOT cents — Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Requires budgetType.
|
|
@@ -28831,7 +29586,7 @@ export type GetAdTreeData = {
|
|
|
28831
29586
|
*/
|
|
28832
29587
|
accountId?: string;
|
|
28833
29588
|
/**
|
|
28834
|
-
*
|
|
29589
|
+
* One or more platform ad account IDs to scope the tree to (agency profiles connect a whole Business Manager but a workspace usually cares about a subset). Comma-separate for multiple (`?adAccountId=act_1,act_2,act_3`); single value keeps its old shape. Max 50 accounts per request; the plural aliases `adAccountIds` and `platformAdAccountIds` are rejected with a 400 to stop them from silently returning the unfiltered fleet.
|
|
28835
29590
|
*/
|
|
28836
29591
|
adAccountId?: string;
|
|
28837
29592
|
/**
|
|
@@ -29211,6 +29966,50 @@ export type GetAdPreviewsError = (unknown | {
|
|
|
29211
29966
|
error?: string;
|
|
29212
29967
|
});
|
|
29213
29968
|
|
|
29969
|
+
export type GetAdMediaData = {
|
|
29970
|
+
path: {
|
|
29971
|
+
/**
|
|
29972
|
+
* Zernio ad id (24-char hex) or platform ad id.
|
|
29973
|
+
*/
|
|
29974
|
+
adId: string;
|
|
29975
|
+
};
|
|
29976
|
+
};
|
|
29977
|
+
|
|
29978
|
+
export type GetAdMediaResponse = ({
|
|
29979
|
+
adId?: string;
|
|
29980
|
+
/**
|
|
29981
|
+
* 'facebook' or 'instagram' — only Meta is supported for now.
|
|
29982
|
+
*/
|
|
29983
|
+
platform?: string;
|
|
29984
|
+
media?: Array<{
|
|
29985
|
+
type?: 'image' | 'video';
|
|
29986
|
+
/**
|
|
29987
|
+
* Direct file URL (signed; short-lived — see description).
|
|
29988
|
+
*/
|
|
29989
|
+
url?: string;
|
|
29990
|
+
/**
|
|
29991
|
+
* Video poster URL (videos only).
|
|
29992
|
+
*/
|
|
29993
|
+
thumbnailUrl?: string;
|
|
29994
|
+
/**
|
|
29995
|
+
* Meta video id (videos only), reusable as video.id on the create endpoints.
|
|
29996
|
+
*/
|
|
29997
|
+
videoId?: string;
|
|
29998
|
+
/**
|
|
29999
|
+
* Video length in seconds (videos only).
|
|
30000
|
+
*/
|
|
30001
|
+
length?: number;
|
|
30002
|
+
/**
|
|
30003
|
+
* 0-based position for carousel children or asset_feed_spec entries.
|
|
30004
|
+
*/
|
|
30005
|
+
index?: number;
|
|
30006
|
+
}>;
|
|
30007
|
+
});
|
|
30008
|
+
|
|
30009
|
+
export type GetAdMediaError = (unknown | {
|
|
30010
|
+
error?: string;
|
|
30011
|
+
});
|
|
30012
|
+
|
|
29214
30013
|
export type GenerateKeywordIdeasData = {
|
|
29215
30014
|
body: {
|
|
29216
30015
|
/**
|
|
@@ -31039,6 +31838,7 @@ export type CreateStandaloneAdData = {
|
|
|
31039
31838
|
* - `lead_generation`: OUTCOME_LEADS with instant forms. Requires `leadGenFormId`. `promotedObject.pageId` is optional and auto-filled from the connected Page.
|
|
31040
31839
|
* - `app_promotion`: requires `promotedObject.applicationId` and `promotedObject.objectStoreUrl`.
|
|
31041
31840
|
* - `catalog_sales`: Advantage+ catalog ads, for example vehicle inventory. Requires `promotedObject.productSetId`, `promotedObject.pixelId` and `promotedObject.customEventType`. Builds a catalog TEMPLATE creative from the copy fields, which may carry template tags like {{product.name}} or {{vehicle.make}}. No imageUrl or video is sent; Meta renders the visuals per catalog item. Discover catalogs via GET /v1/ads/catalogs and product sets via GET /v1/ads/catalogs/{catalogId}/product-sets. Single shape only, no creatives[], adSetId, dynamicCreative or placementAssets.
|
|
31841
|
+
* - `page_likes`: Page Likes conversion location under OUTCOME_ENGAGEMENT (destination_type ON_PAGE, optimization PAGE_LIKES). `promotedObject.pageId` is optional and auto-filled from the connected Page. The creative CTA is fixed to LIKE_PAGE targeting that Page; headline / body / linkUrl / callToAction / imageUrl / video are all optional (Meta derives the link and the Like button from the Page).
|
|
31042
31842
|
*
|
|
31043
31843
|
* **TikTok**
|
|
31044
31844
|
* - `conversions`: website-conversion ad group. Requires `promotedObject.pixelId`, your TikTok Pixel ID. Accepts an optional `promotedObject.customEventType` with a TikTok optimization_event code your pixel tracks (newer pixels use e.g. SHOPPING for purchase events; legacy pixels use ON_WEB_ORDER, INITIATE_ORDER, ON_WEB_REGISTER or FORM). To inherit pixel and event from an existing ad group, pass `adSetId` instead.
|
|
@@ -31052,7 +31852,7 @@ export type CreateStandaloneAdData = {
|
|
|
31052
31852
|
* - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns 422.
|
|
31053
31853
|
*
|
|
31054
31854
|
*/
|
|
31055
|
-
goal?: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'conversions' | 'app_promotion' | 'catalog_sales' | 'job_applicants';
|
|
31855
|
+
goal?: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'conversions' | 'app_promotion' | 'catalog_sales' | 'page_likes' | 'job_applicants';
|
|
31056
31856
|
/**
|
|
31057
31857
|
* Meta only. Explicit ad-set `optimization_goal` (e.g. `LANDING_PAGE_VIEWS`, `LINK_CLICKS`, `REACH`, `IMPRESSIONS`, `OFFSITE_CONVERSIONS`, `THRUPLAY`, `LEAD_GENERATION`). Overrides the default derived from `goal` (e.g. `traffic` defaults to `LINK_CLICKS`). Forwarded verbatim to Meta, which validates compatibility with the campaign objective and rejects incompatible combinations.
|
|
31058
31858
|
*/
|
|
@@ -31517,7 +32317,8 @@ export type CreateStandaloneAdData = {
|
|
|
31517
32317
|
* Meta only. Hand-built carousel: 2-10 authored cards in DETERMINISTIC order, mapped to
|
|
31518
32318
|
* the creative's `link_data.child_attachments`. Unlike `dynamicCreative`,
|
|
31519
32319
|
* you control the card order and per-card copy/link. Requires top-level `body`,
|
|
31520
|
-
* `linkUrl` and `callToAction`.
|
|
32320
|
+
* `linkUrl` and `callToAction`. Those become the ad's own Destination and
|
|
32321
|
+
* button (`link_data.link` / `link_data.call_to_action`), and double as the per-card fallback when a card omits its own.
|
|
31521
32322
|
* Mutually exclusive with `imageUrl`/`video`, `creatives[]`, `dynamicCreative`,
|
|
31522
32323
|
* `placementAssets`, `existingCreativeId`, `adSetId`, `leadGenFormId` and goal
|
|
31523
32324
|
* `catalog_sales`.
|
|
@@ -31711,6 +32512,34 @@ export type CreateStandaloneAdData = {
|
|
|
31711
32512
|
* Google Search RSA only. Extra descriptions.
|
|
31712
32513
|
*/
|
|
31713
32514
|
additionalDescriptions?: Array<(string)>;
|
|
32515
|
+
/**
|
|
32516
|
+
* Google Search only. Sitelink assets to create and attach at the campaign level.
|
|
32517
|
+
* Each entry becomes an Asset (with sitelink_asset + Asset.final_urls) plus a
|
|
32518
|
+
* CampaignAsset link (field_type SITELINK). Approval is async — Google reviews
|
|
32519
|
+
* assets after creation; poll asset.policy_summary later to read the verdict.
|
|
32520
|
+
* Google requires at least two sitelinks to surface them on an ad; four or more
|
|
32521
|
+
* is Google's own recommendation for maximum visibility. The response's
|
|
32522
|
+
* creative.sitelinks[] echoes each input plus its Google resourceName.
|
|
32523
|
+
*
|
|
32524
|
+
*/
|
|
32525
|
+
sitelinks?: Array<{
|
|
32526
|
+
/**
|
|
32527
|
+
* The clickable link text shown under the ad. 25-char cap comes from Google.
|
|
32528
|
+
*/
|
|
32529
|
+
text: string;
|
|
32530
|
+
/**
|
|
32531
|
+
* Final URL the sitelink navigates to.
|
|
32532
|
+
*/
|
|
32533
|
+
linkUrl: string;
|
|
32534
|
+
/**
|
|
32535
|
+
* First description line under the link text (optional). 35-char cap.
|
|
32536
|
+
*/
|
|
32537
|
+
description1?: string;
|
|
32538
|
+
/**
|
|
32539
|
+
* Second description line (optional; usually paired with description1).
|
|
32540
|
+
*/
|
|
32541
|
+
description2?: string;
|
|
32542
|
+
}>;
|
|
31714
32543
|
/**
|
|
31715
32544
|
* Meta only. Controls the Advantage audience feature (targeting_automation). 0 = disabled (default), 1 = enabled. Meta Marketing API requires this field on all ad set creation requests.
|
|
31716
32545
|
*/
|
|
@@ -32513,6 +33342,49 @@ export type ListAdImagesError = (unknown | {
|
|
|
32513
33342
|
error?: string;
|
|
32514
33343
|
});
|
|
32515
33344
|
|
|
33345
|
+
export type UploadAdVideoData = {
|
|
33346
|
+
body: {
|
|
33347
|
+
/**
|
|
33348
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
33349
|
+
*/
|
|
33350
|
+
accountId: string;
|
|
33351
|
+
/**
|
|
33352
|
+
* Meta ad account id (act_<n>).
|
|
33353
|
+
*/
|
|
33354
|
+
adAccountId: string;
|
|
33355
|
+
/**
|
|
33356
|
+
* Public https URL of the video; downloaded server-side (SSRF-guarded) before chunked upload. Provide exactly one of videoUrl or videoBase64.
|
|
33357
|
+
*/
|
|
33358
|
+
videoUrl?: string;
|
|
33359
|
+
/**
|
|
33360
|
+
* Raw base64 video bytes, or a full data URL (the data:video/...;base64, prefix is stripped). Capped by Vercel's body limit (~4.5 MB payload). Provide exactly one of videoUrl or videoBase64.
|
|
33361
|
+
*/
|
|
33362
|
+
videoBase64?: string;
|
|
33363
|
+
/**
|
|
33364
|
+
* Optional filename shown alongside the upload session. Applied only when uploading via videoBase64.
|
|
33365
|
+
*/
|
|
33366
|
+
filename?: string;
|
|
33367
|
+
};
|
|
33368
|
+
};
|
|
33369
|
+
|
|
33370
|
+
export type UploadAdVideoResponse = ({
|
|
33371
|
+
adAccountId?: string;
|
|
33372
|
+
video?: {
|
|
33373
|
+
/**
|
|
33374
|
+
* Meta video id, reusable as video.id on POST /v1/ads/create and inside POST /v1/ads/preview creativeSpec.
|
|
33375
|
+
*/
|
|
33376
|
+
id?: string;
|
|
33377
|
+
/**
|
|
33378
|
+
* Meta-hosted poster URL if available; null when Meta has not produced a poster yet.
|
|
33379
|
+
*/
|
|
33380
|
+
thumbnailUrl?: (string) | null;
|
|
33381
|
+
};
|
|
33382
|
+
});
|
|
33383
|
+
|
|
33384
|
+
export type UploadAdVideoError = (unknown | {
|
|
33385
|
+
error?: string;
|
|
33386
|
+
});
|
|
33387
|
+
|
|
32516
33388
|
export type ListAdVideosData = {
|
|
32517
33389
|
query: {
|
|
32518
33390
|
/**
|
|
@@ -32555,6 +33427,35 @@ export type ListAdVideosError = (ErrorResponse | {
|
|
|
32555
33427
|
error?: string;
|
|
32556
33428
|
} | unknown);
|
|
32557
33429
|
|
|
33430
|
+
export type DeleteAdVideoData = {
|
|
33431
|
+
path: {
|
|
33432
|
+
/**
|
|
33433
|
+
* Meta ad video id (numeric).
|
|
33434
|
+
*/
|
|
33435
|
+
videoId: string;
|
|
33436
|
+
};
|
|
33437
|
+
query: {
|
|
33438
|
+
/**
|
|
33439
|
+
* Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
33440
|
+
*/
|
|
33441
|
+
accountId: string;
|
|
33442
|
+
/**
|
|
33443
|
+
* Meta ad account id (act_<n>) that owns the video.
|
|
33444
|
+
*/
|
|
33445
|
+
adAccountId: string;
|
|
33446
|
+
};
|
|
33447
|
+
};
|
|
33448
|
+
|
|
33449
|
+
export type DeleteAdVideoResponse = ({
|
|
33450
|
+
adAccountId?: string;
|
|
33451
|
+
videoId?: string;
|
|
33452
|
+
success?: boolean;
|
|
33453
|
+
});
|
|
33454
|
+
|
|
33455
|
+
export type DeleteAdVideoError = (ErrorResponse | {
|
|
33456
|
+
error?: string;
|
|
33457
|
+
} | unknown);
|
|
33458
|
+
|
|
32558
33459
|
export type SearchAdInterestsData = {
|
|
32559
33460
|
query: {
|
|
32560
33461
|
/**
|
|
@@ -33019,9 +33920,7 @@ export type CreateAdAudienceData = {
|
|
|
33019
33920
|
/**
|
|
33020
33921
|
* Required for meta_engagement audiences (Meta only): what people
|
|
33021
33922
|
* engaged with. `page` = a Facebook Page, `instagram` = an IG
|
|
33022
|
-
* professional account, `video` = a video.
|
|
33023
|
-
* eligible for engagement audiences or Meta rejects with subcode
|
|
33024
|
-
* 1713151 ("Invalid Event Name"), surfaced verbatim.
|
|
33923
|
+
* professional account, `video` = a video.
|
|
33025
33924
|
*
|
|
33026
33925
|
*/
|
|
33027
33926
|
engagementSource?: 'page' | 'instagram' | 'video';
|