@getlatedev/node 0.2.1440 → 0.2.1442

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -2602,9 +2602,25 @@ type Ad = {
2602
2602
  */
2603
2603
  description?: string;
2604
2604
  /**
2605
- * Meta: the call to action type (`call_to_action.type`, or the first `asset_feed_spec.call_to_action_types` entry), e.g. LEARN_MORE or SIGN_UP.
2605
+ * Meta: the call to action type (`call_to_action.type`, or the first `asset_feed_spec.call_to_action_types` entry), e.g. LEARN_MORE or SIGN_UP. TikTok: the ad's `call_to_action`.
2606
2606
  */
2607
2607
  callToAction?: string;
2608
+ /**
2609
+ * TikTok only, with `live=true` on GET /v1/ads/{adId}: the identity the ad runs as (`identity_id`), the same id GET /v1/ads/tiktok-identities lists.
2610
+ */
2611
+ identityId?: string;
2612
+ /**
2613
+ * TikTok only, with `live=true`: the identity type (`identity_type`), e.g. TT_USER, BC_AUTH_TT, CUSTOMIZED_USER or AUTH_CODE.
2614
+ */
2615
+ identityType?: string;
2616
+ /**
2617
+ * TikTok only, with `live=true`: the Business Center that authorized a BC_AUTH_TT identity (`identity_authorized_bc_id`).
2618
+ */
2619
+ identityAuthorizedBcId?: string;
2620
+ /**
2621
+ * TikTok only, with `live=true`: the TikTok post a Spark ad runs (`tiktok_item_id`).
2622
+ */
2623
+ tiktokItemId?: string;
2608
2624
  /**
2609
2625
  * Meta: the instant form the call to action opens (`call_to_action.value.lead_gen_form_id`, or the asset feed's `call_to_actions` on a dynamic creative), the same value as the `leadGenFormId` create input. Absent on ads without a lead form.
2610
2626
  */
@@ -2657,7 +2673,7 @@ type Ad = {
2657
2673
  }>;
2658
2674
  };
2659
2675
  /**
2660
- * Meta video ID for VIDEO-type ads. Null for non-video ads. Callers that need an embeddable MP4 can call GET /{videoId}?fields=source with the page access token.
2676
+ * Meta video ID for VIDEO-type ads (TikTok: the ad library `video_id`). Null for non-video ads. Callers that need an embeddable MP4 can call GET /{videoId}?fields=source with the page access token.
2661
2677
  */
2662
2678
  videoId?: (string) | null;
2663
2679
  /**
@@ -2767,12 +2783,12 @@ type Ad = {
2767
2783
  */
2768
2784
  isServing?: (boolean) | null;
2769
2785
  /**
2770
- * LinkedIn only. The LinkedIn ad format, in LinkedIn's own vocabulary: STANDARD_UPDATE, SINGLE_VIDEO, CAROUSEL, NATIVE_DOCUMENT, EVENT, TEXT_AD, SPOTLIGHT, FOLLOW_COMPANY, JOBS, SPONSORED_INMAILS and others. The list is open, so treat an unrecognized value as valid.
2786
+ * LinkedIn (and TikTok with `live=true`). The LinkedIn ad format, in LinkedIn's own vocabulary: STANDARD_UPDATE, SINGLE_VIDEO, CAROUSEL, NATIVE_DOCUMENT, EVENT, TEXT_AD, SPOTLIGHT, FOLLOW_COMPANY, JOBS, SPONSORED_INMAILS and others. The list is open, so treat an unrecognized value as valid.
2771
2787
  *
2772
2788
  * - On an ad Zernio created: the format it was created as.
2773
2789
  * - On an ad synced from Campaign Manager: the parent campaign's raw `format`, which is what LinkedIn actually enforces on its creatives.
2774
2790
  *
2775
- * Absent on LinkedIn ads not yet re-synced, and on every other platform.
2791
+ * Absent on LinkedIn ads not yet re-synced. On TikTok with `live=true`: the ad's `ad_format` (e.g. SINGLE_VIDEO). Absent on every other platform.
2776
2792
  */
2777
2793
  adFormat?: (string) | null;
2778
2794
  /**
@@ -4256,6 +4272,12 @@ type AdsTimelineResponse = {
4256
4272
  * All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.
4257
4273
  */
4258
4274
  allConversions?: number;
4275
+ /**
4276
+ * `conversions` split by what was counted. Keys are the Meta action_type (e.g. `offsite_conversion.fb_pixel_purchase`) or the Google conversion action name, so a goal change shows as one key ending and another starting. Meta and Google only; empty before 2026-11.
4277
+ */
4278
+ conversionsByType?: {
4279
+ [key: string]: (number);
4280
+ };
4259
4281
  costPerConversion?: number;
4260
4282
  /**
4261
4283
  * Per-action-type counts merged across all ads on this day. Keys are platform-native action types.
@@ -14472,6 +14494,8 @@ type ParameterIdempotencyKeyHeader = string;
14472
14494
  * - At most 20 platform objects are read per request.
14473
14495
  * - Where a read fails (credentials, platform error, no reader on that platform), stored values come back with `statusReadAt: null`.
14474
14496
  *
14497
+ * **On GET /v1/ads/{adId} for a TikTok ad** the creative is read live too: ad text, call to action, landing page, video, format and identity, returned over the stored creative and never stored. See "Status freshness" in GET /v1/ads/{adId}.
14498
+ *
14475
14499
  * **On X** the budget is read live too:
14476
14500
  *
14477
14501
  * - GET /v1/ads/{adId}: `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches).
@@ -50372,6 +50396,8 @@ type ListAdCampaignsData = {
50372
50396
  * - At most 20 platform objects are read per request.
50373
50397
  * - Where a read fails (credentials, platform error, no reader on that platform), stored values come back with `statusReadAt: null`.
50374
50398
  *
50399
+ * **On GET /v1/ads/{adId} for a TikTok ad** the creative is read live too: ad text, call to action, landing page, video, format and identity, returned over the stored creative and never stored. See "Status freshness" in GET /v1/ads/{adId}.
50400
+ *
50375
50401
  * **On X** the budget is read live too:
50376
50402
  *
50377
50403
  * - GET /v1/ads/{adId}: `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches).
@@ -51350,6 +51376,8 @@ type ListAdSetsData = {
51350
51376
  * - At most 20 platform objects are read per request.
51351
51377
  * - Where a read fails (credentials, platform error, no reader on that platform), stored values come back with `statusReadAt: null`.
51352
51378
  *
51379
+ * **On GET /v1/ads/{adId} for a TikTok ad** the creative is read live too: ad text, call to action, landing page, video, format and identity, returned over the stored creative and never stored. See "Status freshness" in GET /v1/ads/{adId}.
51380
+ *
51353
51381
  * **On X** the budget is read live too:
51354
51382
  *
51355
51383
  * - GET /v1/ads/{adId}: `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches).
@@ -52379,6 +52407,8 @@ type GetAdData = {
52379
52407
  * - At most 20 platform objects are read per request.
52380
52408
  * - Where a read fails (credentials, platform error, no reader on that platform), stored values come back with `statusReadAt: null`.
52381
52409
  *
52410
+ * **On GET /v1/ads/{adId} for a TikTok ad** the creative is read live too: ad text, call to action, landing page, video, format and identity, returned over the stored creative and never stored. See "Status freshness" in GET /v1/ads/{adId}.
52411
+ *
52382
52412
  * **On X** the budget is read live too:
52383
52413
  *
52384
52414
  * - GET /v1/ads/{adId}: `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches).
@@ -58125,7 +58155,7 @@ type CreateStandaloneAdData = {
58125
58155
  */
58126
58156
  aiDisclosure?: 'OPT_IN' | 'OPT_OUT';
58127
58157
  /**
58128
- * Validate the request without creating anything. Any other platform, or a Google campaignType other than pmax or demand_gen, returns 501 `feature_not_available`.
58158
+ * Validate the request without creating anything. Supported on Meta, TikTok, ChatGPT (OpenAI) and Google Performance Max / Demand Gen. Any other platform, or a Google campaignType other than pmax or demand_gen, returns 501 `feature_not_available`.
58129
58159
  *
58130
58160
  * **Google Performance Max**: validates the complete atomic campaign and asset group, with no resource creation or local persistence. Validation still downloads image URLs and consumes quota.
58131
58161
  *
@@ -58142,6 +58172,16 @@ type CreateStandaloneAdData = {
58142
58172
  *
58143
58173
  * **ChatGPT (OpenAI)**: no platform dry-run. Zernio runs every check it knows (creative lengths, budget, bid strategy, targeting) plus live lookups of the conversion event and target countries, and uploads or creates nothing. OpenAI's own checks (image fetch, currency-specific minimums, ad review) run only on a real create.
58144
58174
  *
58175
+ * **TikTok**: TikTok has no dry-run. Zernio runs the input checks and the read-only TikTok calls a real create makes. It uploads or creates nothing: no video, Brand Identity, campaign, ad group or ad. A failure returns the same 4xx a real create would.
58176
+ *
58177
+ * - Advertiser: `message` names its currency when TikTok returns it.
58178
+ * - Identity: `identityId` is authorized on the advertiser (the `identity` node). `message` names the identity and type the ad would run as.
58179
+ * - `existingCampaignId`: exists and is not an Upgraded Smart+ campaign.
58180
+ * - Pixel and optimization event resolve on the advertiser, and the schedule and targeting build.
58181
+ * - Not checked (marked `unverified` with the reason): the video (format, size, length, cover), the ad group as TikTok would create it (the budget minimum for the advertiser currency, location and audience ids, bid), a new campaign, and TikTok's review of the ad text, call to action and landing page.
58182
+ * - A Brand Identity a real create would make from `brandIdentity` is not made: the `identity` node is `unverified`.
58183
+ * - Supported: the single standalone video ad. `smartPlus` and `adSetId` return 400.
58184
+ *
58145
58185
  */
58146
58186
  validateOnly?: boolean;
58147
58187
  /**
@@ -59261,13 +59301,16 @@ type CreateStandaloneAdResponse = ({
59261
59301
  validateOnly?: boolean;
59262
59302
  appliedDefaults?: AdAppliedDefaults;
59263
59303
  results?: Array<{
59264
- node?: 'campaign' | 'adSet' | 'creative' | 'ad' | 'performanceMaxCampaign';
59304
+ /**
59305
+ * `identity` is TikTok only: the identity the ad would run as.
59306
+ */
59307
+ node?: 'campaign' | 'adSet' | 'creative' | 'ad' | 'performanceMaxCampaign' | 'identity';
59265
59308
  status?: 'validated' | 'skipped' | 'unverified';
59266
59309
  /**
59267
59310
  * Explanation for the node's result:
59268
59311
  *
59269
59312
  * - On skipped: why the node could not be validated.
59270
- * - On unverified: why Meta could not dry-run it although the other nodes passed.
59313
+ * - On unverified: why the platform could not dry-run it although the other nodes passed (Meta), or what only a real create checks (TikTok).
59271
59314
  * - On validated: what the dry run could not check, and what the request would do as sent. For example, a Performance Max validation with no location targeting reports here that the campaign would run worldwide.
59272
59315
  */
59273
59316
  reason?: string;
package/dist/index.d.ts CHANGED
@@ -2602,9 +2602,25 @@ type Ad = {
2602
2602
  */
2603
2603
  description?: string;
2604
2604
  /**
2605
- * Meta: the call to action type (`call_to_action.type`, or the first `asset_feed_spec.call_to_action_types` entry), e.g. LEARN_MORE or SIGN_UP.
2605
+ * Meta: the call to action type (`call_to_action.type`, or the first `asset_feed_spec.call_to_action_types` entry), e.g. LEARN_MORE or SIGN_UP. TikTok: the ad's `call_to_action`.
2606
2606
  */
2607
2607
  callToAction?: string;
2608
+ /**
2609
+ * TikTok only, with `live=true` on GET /v1/ads/{adId}: the identity the ad runs as (`identity_id`), the same id GET /v1/ads/tiktok-identities lists.
2610
+ */
2611
+ identityId?: string;
2612
+ /**
2613
+ * TikTok only, with `live=true`: the identity type (`identity_type`), e.g. TT_USER, BC_AUTH_TT, CUSTOMIZED_USER or AUTH_CODE.
2614
+ */
2615
+ identityType?: string;
2616
+ /**
2617
+ * TikTok only, with `live=true`: the Business Center that authorized a BC_AUTH_TT identity (`identity_authorized_bc_id`).
2618
+ */
2619
+ identityAuthorizedBcId?: string;
2620
+ /**
2621
+ * TikTok only, with `live=true`: the TikTok post a Spark ad runs (`tiktok_item_id`).
2622
+ */
2623
+ tiktokItemId?: string;
2608
2624
  /**
2609
2625
  * Meta: the instant form the call to action opens (`call_to_action.value.lead_gen_form_id`, or the asset feed's `call_to_actions` on a dynamic creative), the same value as the `leadGenFormId` create input. Absent on ads without a lead form.
2610
2626
  */
@@ -2657,7 +2673,7 @@ type Ad = {
2657
2673
  }>;
2658
2674
  };
2659
2675
  /**
2660
- * Meta video ID for VIDEO-type ads. Null for non-video ads. Callers that need an embeddable MP4 can call GET /{videoId}?fields=source with the page access token.
2676
+ * Meta video ID for VIDEO-type ads (TikTok: the ad library `video_id`). Null for non-video ads. Callers that need an embeddable MP4 can call GET /{videoId}?fields=source with the page access token.
2661
2677
  */
2662
2678
  videoId?: (string) | null;
2663
2679
  /**
@@ -2767,12 +2783,12 @@ type Ad = {
2767
2783
  */
2768
2784
  isServing?: (boolean) | null;
2769
2785
  /**
2770
- * LinkedIn only. The LinkedIn ad format, in LinkedIn's own vocabulary: STANDARD_UPDATE, SINGLE_VIDEO, CAROUSEL, NATIVE_DOCUMENT, EVENT, TEXT_AD, SPOTLIGHT, FOLLOW_COMPANY, JOBS, SPONSORED_INMAILS and others. The list is open, so treat an unrecognized value as valid.
2786
+ * LinkedIn (and TikTok with `live=true`). The LinkedIn ad format, in LinkedIn's own vocabulary: STANDARD_UPDATE, SINGLE_VIDEO, CAROUSEL, NATIVE_DOCUMENT, EVENT, TEXT_AD, SPOTLIGHT, FOLLOW_COMPANY, JOBS, SPONSORED_INMAILS and others. The list is open, so treat an unrecognized value as valid.
2771
2787
  *
2772
2788
  * - On an ad Zernio created: the format it was created as.
2773
2789
  * - On an ad synced from Campaign Manager: the parent campaign's raw `format`, which is what LinkedIn actually enforces on its creatives.
2774
2790
  *
2775
- * Absent on LinkedIn ads not yet re-synced, and on every other platform.
2791
+ * Absent on LinkedIn ads not yet re-synced. On TikTok with `live=true`: the ad's `ad_format` (e.g. SINGLE_VIDEO). Absent on every other platform.
2776
2792
  */
2777
2793
  adFormat?: (string) | null;
2778
2794
  /**
@@ -4256,6 +4272,12 @@ type AdsTimelineResponse = {
4256
4272
  * All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.
4257
4273
  */
4258
4274
  allConversions?: number;
4275
+ /**
4276
+ * `conversions` split by what was counted. Keys are the Meta action_type (e.g. `offsite_conversion.fb_pixel_purchase`) or the Google conversion action name, so a goal change shows as one key ending and another starting. Meta and Google only; empty before 2026-11.
4277
+ */
4278
+ conversionsByType?: {
4279
+ [key: string]: (number);
4280
+ };
4259
4281
  costPerConversion?: number;
4260
4282
  /**
4261
4283
  * Per-action-type counts merged across all ads on this day. Keys are platform-native action types.
@@ -14472,6 +14494,8 @@ type ParameterIdempotencyKeyHeader = string;
14472
14494
  * - At most 20 platform objects are read per request.
14473
14495
  * - Where a read fails (credentials, platform error, no reader on that platform), stored values come back with `statusReadAt: null`.
14474
14496
  *
14497
+ * **On GET /v1/ads/{adId} for a TikTok ad** the creative is read live too: ad text, call to action, landing page, video, format and identity, returned over the stored creative and never stored. See "Status freshness" in GET /v1/ads/{adId}.
14498
+ *
14475
14499
  * **On X** the budget is read live too:
14476
14500
  *
14477
14501
  * - GET /v1/ads/{adId}: `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches).
@@ -50372,6 +50396,8 @@ type ListAdCampaignsData = {
50372
50396
  * - At most 20 platform objects are read per request.
50373
50397
  * - Where a read fails (credentials, platform error, no reader on that platform), stored values come back with `statusReadAt: null`.
50374
50398
  *
50399
+ * **On GET /v1/ads/{adId} for a TikTok ad** the creative is read live too: ad text, call to action, landing page, video, format and identity, returned over the stored creative and never stored. See "Status freshness" in GET /v1/ads/{adId}.
50400
+ *
50375
50401
  * **On X** the budget is read live too:
50376
50402
  *
50377
50403
  * - GET /v1/ads/{adId}: `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches).
@@ -51350,6 +51376,8 @@ type ListAdSetsData = {
51350
51376
  * - At most 20 platform objects are read per request.
51351
51377
  * - Where a read fails (credentials, platform error, no reader on that platform), stored values come back with `statusReadAt: null`.
51352
51378
  *
51379
+ * **On GET /v1/ads/{adId} for a TikTok ad** the creative is read live too: ad text, call to action, landing page, video, format and identity, returned over the stored creative and never stored. See "Status freshness" in GET /v1/ads/{adId}.
51380
+ *
51353
51381
  * **On X** the budget is read live too:
51354
51382
  *
51355
51383
  * - GET /v1/ads/{adId}: `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches).
@@ -52379,6 +52407,8 @@ type GetAdData = {
52379
52407
  * - At most 20 platform objects are read per request.
52380
52408
  * - Where a read fails (credentials, platform error, no reader on that platform), stored values come back with `statusReadAt: null`.
52381
52409
  *
52410
+ * **On GET /v1/ads/{adId} for a TikTok ad** the creative is read live too: ad text, call to action, landing page, video, format and identity, returned over the stored creative and never stored. See "Status freshness" in GET /v1/ads/{adId}.
52411
+ *
52382
52412
  * **On X** the budget is read live too:
52383
52413
  *
52384
52414
  * - GET /v1/ads/{adId}: `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches).
@@ -58125,7 +58155,7 @@ type CreateStandaloneAdData = {
58125
58155
  */
58126
58156
  aiDisclosure?: 'OPT_IN' | 'OPT_OUT';
58127
58157
  /**
58128
- * Validate the request without creating anything. Any other platform, or a Google campaignType other than pmax or demand_gen, returns 501 `feature_not_available`.
58158
+ * Validate the request without creating anything. Supported on Meta, TikTok, ChatGPT (OpenAI) and Google Performance Max / Demand Gen. Any other platform, or a Google campaignType other than pmax or demand_gen, returns 501 `feature_not_available`.
58129
58159
  *
58130
58160
  * **Google Performance Max**: validates the complete atomic campaign and asset group, with no resource creation or local persistence. Validation still downloads image URLs and consumes quota.
58131
58161
  *
@@ -58142,6 +58172,16 @@ type CreateStandaloneAdData = {
58142
58172
  *
58143
58173
  * **ChatGPT (OpenAI)**: no platform dry-run. Zernio runs every check it knows (creative lengths, budget, bid strategy, targeting) plus live lookups of the conversion event and target countries, and uploads or creates nothing. OpenAI's own checks (image fetch, currency-specific minimums, ad review) run only on a real create.
58144
58174
  *
58175
+ * **TikTok**: TikTok has no dry-run. Zernio runs the input checks and the read-only TikTok calls a real create makes. It uploads or creates nothing: no video, Brand Identity, campaign, ad group or ad. A failure returns the same 4xx a real create would.
58176
+ *
58177
+ * - Advertiser: `message` names its currency when TikTok returns it.
58178
+ * - Identity: `identityId` is authorized on the advertiser (the `identity` node). `message` names the identity and type the ad would run as.
58179
+ * - `existingCampaignId`: exists and is not an Upgraded Smart+ campaign.
58180
+ * - Pixel and optimization event resolve on the advertiser, and the schedule and targeting build.
58181
+ * - Not checked (marked `unverified` with the reason): the video (format, size, length, cover), the ad group as TikTok would create it (the budget minimum for the advertiser currency, location and audience ids, bid), a new campaign, and TikTok's review of the ad text, call to action and landing page.
58182
+ * - A Brand Identity a real create would make from `brandIdentity` is not made: the `identity` node is `unverified`.
58183
+ * - Supported: the single standalone video ad. `smartPlus` and `adSetId` return 400.
58184
+ *
58145
58185
  */
58146
58186
  validateOnly?: boolean;
58147
58187
  /**
@@ -59261,13 +59301,16 @@ type CreateStandaloneAdResponse = ({
59261
59301
  validateOnly?: boolean;
59262
59302
  appliedDefaults?: AdAppliedDefaults;
59263
59303
  results?: Array<{
59264
- node?: 'campaign' | 'adSet' | 'creative' | 'ad' | 'performanceMaxCampaign';
59304
+ /**
59305
+ * `identity` is TikTok only: the identity the ad would run as.
59306
+ */
59307
+ node?: 'campaign' | 'adSet' | 'creative' | 'ad' | 'performanceMaxCampaign' | 'identity';
59265
59308
  status?: 'validated' | 'skipped' | 'unverified';
59266
59309
  /**
59267
59310
  * Explanation for the node's result:
59268
59311
  *
59269
59312
  * - On skipped: why the node could not be validated.
59270
- * - On unverified: why Meta could not dry-run it although the other nodes passed.
59313
+ * - On unverified: why the platform could not dry-run it although the other nodes passed (Meta), or what only a real create checks (TikTok).
59271
59314
  * - On validated: what the dry run could not check, and what the request would do as sent. For example, a Performance Max validation with no location targeting reports here that the campaign would run worldwide.
59272
59315
  */
59273
59316
  reason?: string;
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
36
36
  // package.json
37
37
  var package_default = {
38
38
  name: "@getlatedev/node",
39
- version: "0.2.1440",
39
+ version: "0.2.1442",
40
40
  description: "The official Node.js library for the Zernio API",
41
41
  main: "dist/index.js",
42
42
  module: "dist/index.mjs",
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5
5
  // package.json
6
6
  var package_default = {
7
7
  name: "@getlatedev/node",
8
- version: "0.2.1440",
8
+ version: "0.2.1442",
9
9
  description: "The official Node.js library for the Zernio API",
10
10
  main: "dist/index.js",
11
11
  module: "dist/index.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.2.1440",
3
+ "version": "0.2.1442",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -8100,7 +8100,11 @@ export const transferVoiceCall = <ThrowOnError extends boolean = false>(options:
8100
8100
  * Estimate call cost
8101
8101
  * Pre-call cost estimate for a PSTN call: the carrier leg plus optional recording and transcription add-ons.
8102
8102
  *
8103
- * It uses the same billing formula as the post-call invoice, so the quote and the final charge can't disagree. The carrier figure follows the carrier's per-destination rate card: a call dialed from a number in the destination country uses the local mobile rate, and a `tel:` forward destination is quoted as a second carrier leg billed from the same number. The real cost comes from the settled carrier record after the call.
8103
+ * It uses the same billing formula as the post-call invoice, so the quote and the final charge can't disagree.
8104
+ *
8105
+ * The carrier figure follows the carrier's per-destination rate card: a call dialed from a number in the destination country uses the local mobile rate, and a `tel:` forward destination is quoted as a second carrier leg billed from the same number.
8106
+ *
8107
+ * The real cost comes from the settled carrier record after the call.
8104
8108
  *
8105
8109
  * Parity endpoint of `GET /v1/whatsapp/calls/estimate`, minus the Meta line. PSTN calls have no separate Meta bill, so `totalCostUSD` equals `billableCostUSD`.
8106
8110
  *
@@ -13645,6 +13649,9 @@ export const getAdsTimeline = <ThrowOnError extends boolean = false>(options: Op
13645
13649
  * - the ad's own switch (`configuredStatus`)
13646
13650
  * - its delivery status (`status`, `platformStatus`)
13647
13651
  * - its ad set and campaign switches (`platformAdSetStatus`, `platformCampaignStatus`)
13652
+ * - on TikTok, the creative TikTok holds now: `creative.body` (ad text), `creative.callToAction`, `creative.linkUrl` (landing page), `creative.videoId`, `creative.adFormat`, `creative.identityId`, `creative.identityType`, `creative.identityAuthorizedBcId` and, on a Spark ad, `creative.tiktokItemId`.
13653
+ *
13654
+ * The TikTok creative comes from the same TikTok call as the switches. It replaces the stored values in the response only and is never stored. A key TikTok leaves empty keeps its stored value.
13648
13655
  *
13649
13656
  * ### Meta ads that are not synced yet
13650
13657
  *
@@ -345,9 +345,25 @@ export type Ad = {
345
345
  */
346
346
  description?: string;
347
347
  /**
348
- * Meta: the call to action type (`call_to_action.type`, or the first `asset_feed_spec.call_to_action_types` entry), e.g. LEARN_MORE or SIGN_UP.
348
+ * Meta: the call to action type (`call_to_action.type`, or the first `asset_feed_spec.call_to_action_types` entry), e.g. LEARN_MORE or SIGN_UP. TikTok: the ad's `call_to_action`.
349
349
  */
350
350
  callToAction?: string;
351
+ /**
352
+ * TikTok only, with `live=true` on GET /v1/ads/{adId}: the identity the ad runs as (`identity_id`), the same id GET /v1/ads/tiktok-identities lists.
353
+ */
354
+ identityId?: string;
355
+ /**
356
+ * TikTok only, with `live=true`: the identity type (`identity_type`), e.g. TT_USER, BC_AUTH_TT, CUSTOMIZED_USER or AUTH_CODE.
357
+ */
358
+ identityType?: string;
359
+ /**
360
+ * TikTok only, with `live=true`: the Business Center that authorized a BC_AUTH_TT identity (`identity_authorized_bc_id`).
361
+ */
362
+ identityAuthorizedBcId?: string;
363
+ /**
364
+ * TikTok only, with `live=true`: the TikTok post a Spark ad runs (`tiktok_item_id`).
365
+ */
366
+ tiktokItemId?: string;
351
367
  /**
352
368
  * Meta: the instant form the call to action opens (`call_to_action.value.lead_gen_form_id`, or the asset feed's `call_to_actions` on a dynamic creative), the same value as the `leadGenFormId` create input. Absent on ads without a lead form.
353
369
  */
@@ -400,7 +416,7 @@ export type Ad = {
400
416
  }>;
401
417
  };
402
418
  /**
403
- * Meta video ID for VIDEO-type ads. Null for non-video ads. Callers that need an embeddable MP4 can call GET /{videoId}?fields=source with the page access token.
419
+ * Meta video ID for VIDEO-type ads (TikTok: the ad library `video_id`). Null for non-video ads. Callers that need an embeddable MP4 can call GET /{videoId}?fields=source with the page access token.
404
420
  */
405
421
  videoId?: (string) | null;
406
422
  /**
@@ -510,12 +526,12 @@ export type Ad = {
510
526
  */
511
527
  isServing?: (boolean) | null;
512
528
  /**
513
- * LinkedIn only. The LinkedIn ad format, in LinkedIn's own vocabulary: STANDARD_UPDATE, SINGLE_VIDEO, CAROUSEL, NATIVE_DOCUMENT, EVENT, TEXT_AD, SPOTLIGHT, FOLLOW_COMPANY, JOBS, SPONSORED_INMAILS and others. The list is open, so treat an unrecognized value as valid.
529
+ * LinkedIn (and TikTok with `live=true`). The LinkedIn ad format, in LinkedIn's own vocabulary: STANDARD_UPDATE, SINGLE_VIDEO, CAROUSEL, NATIVE_DOCUMENT, EVENT, TEXT_AD, SPOTLIGHT, FOLLOW_COMPANY, JOBS, SPONSORED_INMAILS and others. The list is open, so treat an unrecognized value as valid.
514
530
  *
515
531
  * - On an ad Zernio created: the format it was created as.
516
532
  * - On an ad synced from Campaign Manager: the parent campaign's raw `format`, which is what LinkedIn actually enforces on its creatives.
517
533
  *
518
- * Absent on LinkedIn ads not yet re-synced, and on every other platform.
534
+ * Absent on LinkedIn ads not yet re-synced. On TikTok with `live=true`: the ad's `ad_format` (e.g. SINGLE_VIDEO). Absent on every other platform.
519
535
  */
520
536
  adFormat?: (string) | null;
521
537
  /**
@@ -2065,6 +2081,12 @@ export type AdsTimelineResponse = {
2065
2081
  * All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.
2066
2082
  */
2067
2083
  allConversions?: number;
2084
+ /**
2085
+ * `conversions` split by what was counted. Keys are the Meta action_type (e.g. `offsite_conversion.fb_pixel_purchase`) or the Google conversion action name, so a goal change shows as one key ending and another starting. Meta and Google only; empty before 2026-11.
2086
+ */
2087
+ conversionsByType?: {
2088
+ [key: string]: (number);
2089
+ };
2068
2090
  costPerConversion?: number;
2069
2091
  /**
2070
2092
  * Per-action-type counts merged across all ads on this day. Keys are platform-native action types.
@@ -12742,6 +12764,8 @@ export type ParameterIdempotencyKeyHeader = string;
12742
12764
  * - At most 20 platform objects are read per request.
12743
12765
  * - Where a read fails (credentials, platform error, no reader on that platform), stored values come back with `statusReadAt: null`.
12744
12766
  *
12767
+ * **On GET /v1/ads/{adId} for a TikTok ad** the creative is read live too: ad text, call to action, landing page, video, format and identity, returned over the stored creative and never stored. See "Status freshness" in GET /v1/ads/{adId}.
12768
+ *
12745
12769
  * **On X** the budget is read live too:
12746
12770
  *
12747
12771
  * - GET /v1/ads/{adId}: `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches).
@@ -51133,6 +51157,8 @@ export type ListAdCampaignsData = {
51133
51157
  * - At most 20 platform objects are read per request.
51134
51158
  * - Where a read fails (credentials, platform error, no reader on that platform), stored values come back with `statusReadAt: null`.
51135
51159
  *
51160
+ * **On GET /v1/ads/{adId} for a TikTok ad** the creative is read live too: ad text, call to action, landing page, video, format and identity, returned over the stored creative and never stored. See "Status freshness" in GET /v1/ads/{adId}.
51161
+ *
51136
51162
  * **On X** the budget is read live too:
51137
51163
  *
51138
51164
  * - GET /v1/ads/{adId}: `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches).
@@ -52156,6 +52182,8 @@ export type ListAdSetsData = {
52156
52182
  * - At most 20 platform objects are read per request.
52157
52183
  * - Where a read fails (credentials, platform error, no reader on that platform), stored values come back with `statusReadAt: null`.
52158
52184
  *
52185
+ * **On GET /v1/ads/{adId} for a TikTok ad** the creative is read live too: ad text, call to action, landing page, video, format and identity, returned over the stored creative and never stored. See "Status freshness" in GET /v1/ads/{adId}.
52186
+ *
52159
52187
  * **On X** the budget is read live too:
52160
52188
  *
52161
52189
  * - GET /v1/ads/{adId}: `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches).
@@ -53218,6 +53246,8 @@ export type GetAdData = {
53218
53246
  * - At most 20 platform objects are read per request.
53219
53247
  * - Where a read fails (credentials, platform error, no reader on that platform), stored values come back with `statusReadAt: null`.
53220
53248
  *
53249
+ * **On GET /v1/ads/{adId} for a TikTok ad** the creative is read live too: ad text, call to action, landing page, video, format and identity, returned over the stored creative and never stored. See "Status freshness" in GET /v1/ads/{adId}.
53250
+ *
53221
53251
  * **On X** the budget is read live too:
53222
53252
  *
53223
53253
  * - GET /v1/ads/{adId}: `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches).
@@ -59318,7 +59348,7 @@ export type CreateStandaloneAdData = {
59318
59348
  */
59319
59349
  aiDisclosure?: 'OPT_IN' | 'OPT_OUT';
59320
59350
  /**
59321
- * Validate the request without creating anything. Any other platform, or a Google campaignType other than pmax or demand_gen, returns 501 `feature_not_available`.
59351
+ * Validate the request without creating anything. Supported on Meta, TikTok, ChatGPT (OpenAI) and Google Performance Max / Demand Gen. Any other platform, or a Google campaignType other than pmax or demand_gen, returns 501 `feature_not_available`.
59322
59352
  *
59323
59353
  * **Google Performance Max**: validates the complete atomic campaign and asset group, with no resource creation or local persistence. Validation still downloads image URLs and consumes quota.
59324
59354
  *
@@ -59335,6 +59365,16 @@ export type CreateStandaloneAdData = {
59335
59365
  *
59336
59366
  * **ChatGPT (OpenAI)**: no platform dry-run. Zernio runs every check it knows (creative lengths, budget, bid strategy, targeting) plus live lookups of the conversion event and target countries, and uploads or creates nothing. OpenAI's own checks (image fetch, currency-specific minimums, ad review) run only on a real create.
59337
59367
  *
59368
+ * **TikTok**: TikTok has no dry-run. Zernio runs the input checks and the read-only TikTok calls a real create makes. It uploads or creates nothing: no video, Brand Identity, campaign, ad group or ad. A failure returns the same 4xx a real create would.
59369
+ *
59370
+ * - Advertiser: `message` names its currency when TikTok returns it.
59371
+ * - Identity: `identityId` is authorized on the advertiser (the `identity` node). `message` names the identity and type the ad would run as.
59372
+ * - `existingCampaignId`: exists and is not an Upgraded Smart+ campaign.
59373
+ * - Pixel and optimization event resolve on the advertiser, and the schedule and targeting build.
59374
+ * - Not checked (marked `unverified` with the reason): the video (format, size, length, cover), the ad group as TikTok would create it (the budget minimum for the advertiser currency, location and audience ids, bid), a new campaign, and TikTok's review of the ad text, call to action and landing page.
59375
+ * - A Brand Identity a real create would make from `brandIdentity` is not made: the `identity` node is `unverified`.
59376
+ * - Supported: the single standalone video ad. `smartPlus` and `adSetId` return 400.
59377
+ *
59338
59378
  */
59339
59379
  validateOnly?: boolean;
59340
59380
  /**
@@ -60455,13 +60495,16 @@ export type CreateStandaloneAdResponse = ({
60455
60495
  validateOnly?: boolean;
60456
60496
  appliedDefaults?: AdAppliedDefaults;
60457
60497
  results?: Array<{
60458
- node?: 'campaign' | 'adSet' | 'creative' | 'ad' | 'performanceMaxCampaign';
60498
+ /**
60499
+ * `identity` is TikTok only: the identity the ad would run as.
60500
+ */
60501
+ node?: 'campaign' | 'adSet' | 'creative' | 'ad' | 'performanceMaxCampaign' | 'identity';
60459
60502
  status?: 'validated' | 'skipped' | 'unverified';
60460
60503
  /**
60461
60504
  * Explanation for the node's result:
60462
60505
  *
60463
60506
  * - On skipped: why the node could not be validated.
60464
- * - On unverified: why Meta could not dry-run it although the other nodes passed.
60507
+ * - On unverified: why the platform could not dry-run it although the other nodes passed (Meta), or what only a real create checks (TikTok).
60465
60508
  * - On validated: what the dry run could not check, and what the request would do as sent. For example, a Performance Max validation with no location targeting reports here that the campaign would run worldwide.
60466
60509
  */
60467
60510
  reason?: string;