@zernio/node 0.2.1167 → 0.2.1169

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
@@ -2139,11 +2139,11 @@ type Ad = {
2139
2139
  amount?: number;
2140
2140
  type?: 'daily' | 'lifetime';
2141
2141
  /**
2142
- * LinkedIn only. The parent campaign's `dailyBudget`. LinkedIn allows a daily AND a lifetime budget on the same campaign, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
2142
+ * LinkedIn and X only. The daily budget (LinkedIn: the parent campaign's `dailyBudget`; X: the line item's, or the campaign's when the line item has none). Both allow a daily AND a lifetime budget together, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
2143
2143
  */
2144
2144
  daily?: number;
2145
2145
  /**
2146
- * LinkedIn only. The parent campaign's `totalBudget`, readable even when a daily budget is also set.
2146
+ * LinkedIn and X only. The lifetime total (LinkedIn: the parent campaign's `totalBudget`; X: `total_budget_amount_local_micro`, for example the `lifetimeBudgetCap` of a boost), readable even when a daily budget is also set.
2147
2147
  */
2148
2148
  lifetime?: number;
2149
2149
  /**
@@ -3373,11 +3373,11 @@ type AdTreeAdSet = {
3373
3373
  amount?: number;
3374
3374
  type?: 'daily' | 'lifetime';
3375
3375
  /**
3376
- * LinkedIn only. The campaign's `dailyBudget`. LinkedIn allows a daily AND a lifetime budget on the same campaign, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
3376
+ * LinkedIn and X only. The daily budget (LinkedIn: the campaign's `dailyBudget`; X: the line item's `daily_budget_amount_local_micro`). Both allow a daily AND a lifetime budget together, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
3377
3377
  */
3378
3378
  daily?: number;
3379
3379
  /**
3380
- * LinkedIn only. The campaign's `totalBudget`, readable even when a daily budget is also set.
3380
+ * LinkedIn and X only. The lifetime total (LinkedIn: the campaign's `totalBudget`; X: the line item's `total_budget_amount_local_micro`), readable even when a daily budget is also set.
3381
3381
  */
3382
3382
  lifetime?: number;
3383
3383
  /**
@@ -10696,7 +10696,7 @@ type ParameterCatalogTokenAccountId = string;
10696
10696
  */
10697
10697
  type ParameterIdempotencyKeyHeader = string;
10698
10698
  /**
10699
- * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description.
10699
+ * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description. On X the budget is read live in the same read: on GET /v1/ads/{adId} `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches); on the ad set and campaign listings `budget` is the one that line item or campaign holds now (returned, not stored); a row whose budget the other level holds keeps its synced `budget`.
10700
10700
  */
10701
10701
  type ParameterLiveStatusRead = boolean;
10702
10702
  /**
@@ -12255,6 +12255,10 @@ type SupportRun = {
12255
12255
  * Why the run stopped. Null while it is in progress.
12256
12256
  */
12257
12257
  stopReason: ('answered' | 'human_review' | 'cost_cap' | 'deadline' | 'max_iterations' | 'error' | 'expired') | null;
12258
+ /**
12259
+ * The question as asked, with leading and trailing whitespace trimmed. Null only on runs created before this field was added.
12260
+ */
12261
+ question: (string) | null;
12258
12262
  /**
12259
12263
  * The assistant's answer. Null while the run is in progress or when it failed.
12260
12264
  */
@@ -14577,8 +14581,11 @@ type WebhookPayloadComment = {
14577
14581
  /**
14578
14582
  * Ad context. Present only when the comment was made on paid content.
14579
14583
  * Instagram: populated from the webhook payload's value.media.ad_id, value.media.ad_title and value.media.original_media_id, each only when Meta includes it.
14580
- * Facebook: populated via a Graph API lookup of the parent post's promotion_status.
14581
- * Absent for comments on organic posts that are not currently promoted.
14584
+ * Facebook: populated from a Graph API lookup of the parent post. Present when the post is an
14585
+ * ad dark post (isDarkPost true, whatever its promotionStatus) or an organic post that is or was
14586
+ * boosted (promotionStatus "active", "extendable" or "finished"). Meta does not link a dark post
14587
+ * back to its ad, so id and title are never set on Facebook.
14588
+ * Absent for comments on organic posts that are not promoted.
14582
14589
  *
14583
14590
  */
14584
14591
  ad?: {
@@ -14595,12 +14602,16 @@ type WebhookPayloadComment = {
14595
14602
  */
14596
14603
  originalMediaId?: string;
14597
14604
  /**
14598
- * Facebook promotion status returned by Graph API. Common values:
14599
- * "active" (organic post currently boosted), "ineligible" (dark
14600
- * post or ad creative, not promotable because it already is an ad).
14605
+ * Facebook only. The parent post's promotion_status as the Graph API returns it, for example
14606
+ * "active" (organic post currently boosted). Ad dark posts usually report "inactive" and
14607
+ * sometimes "ineligible", so use isDarkPost, not this value, to tell an ad comment apart.
14601
14608
  *
14602
14609
  */
14603
14610
  promotionStatus?: string;
14611
+ /**
14612
+ * Facebook only: true when the post is an unpublished ad creative (dark post), false for a boosted organic post.
14613
+ */
14614
+ isDarkPost?: boolean;
14604
14615
  };
14605
14616
  /**
14606
14617
  * Facebook only. Present on graphic-only comments (sticker, GIF, photo) that
@@ -40598,7 +40609,7 @@ type ListAdCampaignsData = {
40598
40609
  includeEmpty?: boolean;
40599
40610
  limit?: number;
40600
40611
  /**
40601
- * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description.
40612
+ * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description. On X the budget is read live in the same read: on GET /v1/ads/{adId} `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches); on the ad set and campaign listings `budget` is the one that line item or campaign holds now (returned, not stored); a row whose budget the other level holds keeps its synced `budget`.
40602
40613
  */
40603
40614
  live?: boolean;
40604
40615
  /**
@@ -41055,11 +41066,15 @@ type UpdateAdCampaignResponse = ({
41055
41066
  type UpdateAdCampaignError = (unknown | ErrorResponse);
41056
41067
  type DeleteAdCampaignData = {
41057
41068
  body: {
41058
- platform: 'facebook' | 'instagram' | 'google';
41069
+ platform: 'facebook' | 'instagram' | 'google' | 'twitter';
41059
41070
  /**
41060
41071
  * Zernio SocialAccount id owning the ad account. Required only to delete an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
41061
41072
  */
41062
41073
  accountId?: string;
41074
+ /**
41075
+ * X only, for an EMPTY campaign that was never synced: the X ad account id the campaign belongs to (lowercase letters and digits). The synced campaign's ad account wins when there is one. Also accepted on the query string.
41076
+ */
41077
+ adAccountId?: string;
41063
41078
  };
41064
41079
  path: {
41065
41080
  /**
@@ -41491,7 +41506,7 @@ type ListAdSetsData = {
41491
41506
  */
41492
41507
  campaignId?: string;
41493
41508
  /**
41494
- * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description.
41509
+ * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description. On X the budget is read live in the same read: on GET /v1/ads/{adId} `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches); on the ad set and campaign listings `budget` is the one that line item or campaign holds now (returned, not stored); a row whose budget the other level holds keeps its synced `budget`.
41495
41510
  */
41496
41511
  live?: boolean;
41497
41512
  platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
@@ -41516,11 +41531,11 @@ type ListAdSetsResponse = ({
41516
41531
  amount?: number;
41517
41532
  type?: 'daily' | 'lifetime';
41518
41533
  /**
41519
- * LinkedIn only. The campaign's `dailyBudget`. LinkedIn allows a daily AND a lifetime budget on the same campaign, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
41534
+ * LinkedIn and X only. The daily budget (LinkedIn: the campaign's `dailyBudget`; X: the line item's `daily_budget_amount_local_micro`). Both allow a daily AND a lifetime budget together, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
41520
41535
  */
41521
41536
  daily?: number;
41522
41537
  /**
41523
- * LinkedIn only. The campaign's `totalBudget`, readable even when a daily budget is also set.
41538
+ * LinkedIn and X only. The lifetime total (LinkedIn: the campaign's `totalBudget`; X: the line item's `total_budget_amount_local_micro`), readable even when a daily budget is also set.
41524
41539
  */
41525
41540
  lifetime?: number;
41526
41541
  /**
@@ -41824,11 +41839,11 @@ type UpdateAdSetData = {
41824
41839
  type?: 'daily' | 'lifetime';
41825
41840
  };
41826
41841
  /**
41827
- * Writes the ad set's own on/off switch (Meta: `configured_status`) on Meta and LinkedIn, whatever delivery status its ads report. Omit if not toggling delivery state.
41842
+ * Writes the ad set's own on/off switch (Meta: `configured_status`; X: the line item's `entity_status` ACTIVE / PAUSED), whatever delivery status its ads report. Omit if not toggling delivery state.
41828
41843
  */
41829
41844
  status?: 'active' | 'paused';
41830
41845
  /**
41831
- * Rename the ad set (Meta only; other platforms return 501). At least one of budget/status/bidStrategy/name is required.
41846
+ * Rename the ad set (on X, the line item `name`). Platforms without a rename return 501. At least one of budget/status/bidStrategy/name is required.
41832
41847
  */
41833
41848
  name?: string;
41834
41849
  /**
@@ -41838,8 +41853,13 @@ type UpdateAdSetData = {
41838
41853
  * automatically. On OpenAI, LOWEST_COST_WITH_BID_CAP and COST_CAP both map to
41839
41854
  * the ad group's `bidding_config.max_bid_micros` (one knob covers both);
41840
41855
  * LOWEST_COST_WITH_MIN_ROAS is rejected with 422 (OpenAI has no ROAS-based
41841
- * bidding). Other platforms (linkedin, pinterest, google, twitter) return 501
41842
- * Not Implemented when bidStrategy is set.
41856
+ * bidding). On X it writes the line item's `bid_strategy`:
41857
+ * LOWEST_COST_WITHOUT_CAP = AUTO, LOWEST_COST_WITH_BID_CAP = MAX and
41858
+ * COST_CAP = TARGET, with `bidAmount` as `bid_amount_local_micro`;
41859
+ * LOWEST_COST_WITH_MIN_ROAS is rejected with 422. X decides which strategy
41860
+ * the line item's objective allows (TARGET only on REACH, FOLLOWERS and
41861
+ * WEBSITE_CLICKS, MAX not on REACH or FOLLOWERS). Other platforms
41862
+ * (linkedin, pinterest, google) return 501 Not Implemented when bidStrategy is set.
41843
41863
  *
41844
41864
  */
41845
41865
  bidStrategy?: (BidStrategy);
@@ -41866,7 +41886,7 @@ type UpdateAdSetData = {
41866
41886
  /**
41867
41887
  * Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when
41868
41888
  * bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP. Internally converted to Meta's
41869
- * smallest-denomination integer, or (on OpenAI) to micros (× 1,000,000). Meta only:
41889
+ * smallest-denomination integer, or (on OpenAI and X) to micros (× 1,000,000). Meta only:
41870
41890
  * may be sent alone, WITHOUT bidStrategy, to update the cap amount on an ad set whose
41871
41891
  * parent campaign is COST_CAP or LOWEST_COST_WITH_BID_CAP (the strategy is inherited
41872
41892
  * from the campaign and is left untouched).
@@ -42182,7 +42202,7 @@ type GetAdData = {
42182
42202
  };
42183
42203
  query?: {
42184
42204
  /**
42185
- * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description.
42205
+ * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description. On X the budget is read live in the same read: on GET /v1/ads/{adId} `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches); on the ad set and campaign listings `budget` is the one that line item or campaign holds now (returned, not stored); a row whose budget the other level holds keeps its synced `budget`.
42186
42206
  */
42187
42207
  live?: boolean;
42188
42208
  };
@@ -46374,6 +46394,10 @@ type BoostPostData = {
46374
46394
  * Goes together with budgetAmount. lifetime requires schedule.endDate.
46375
46395
  */
46376
46396
  budgetType?: 'daily' | 'lifetime';
46397
+ /**
46398
+ * X only. A lifetime total, in whole currency units, that caps a daily budget (budgetType daily): the line item gets both daily_budget_amount_local_micro and total_budget_amount_local_micro, and stops spending once the total is reached. Must be at least budgetAmount. Read back as budget.daily and budget.lifetime. 400 on a lifetime budget or on another platform.
46399
+ */
46400
+ lifetimeBudgetCap?: number;
46377
46401
  /**
46378
46402
  * Alias of budgetAmount + budgetType, kept for existing callers
46379
46403
  * @deprecated
@@ -46410,7 +46434,7 @@ type BoostPostData = {
46410
46434
  */
46411
46435
  startDate?: string;
46412
46436
  /**
46413
- * Ad-set end time (ISO 8601), mapped to the ad set's `end_time`. Required for lifetime budgets. On Meta, TikTok, X and Pinterest a value without an offset (`YYYY-MM-DD`, `YYYY-MM-DD HH:MM:SS` or `YYYY-MM-DDTHH:MM:SS`) is read in the ad account timezone, and a date-only end runs to 23:59:59 local. Same field as on POST /v1/ads/create.
46437
+ * Ad-set end time (ISO 8601), mapped to the ad set's `end_time` (on X, the line item's `end_time`; X campaigns carry no flight dates). Required for lifetime budgets. On Meta, TikTok, X and Pinterest a value without an offset (`YYYY-MM-DD`, `YYYY-MM-DD HH:MM:SS` or `YYYY-MM-DDTHH:MM:SS`) is read in the ad account timezone, and a date-only end runs to 23:59:59 local. Same field as on POST /v1/ads/create.
46414
46438
  */
46415
46439
  endDate?: string;
46416
46440
  /**
package/dist/index.d.ts CHANGED
@@ -2139,11 +2139,11 @@ type Ad = {
2139
2139
  amount?: number;
2140
2140
  type?: 'daily' | 'lifetime';
2141
2141
  /**
2142
- * LinkedIn only. The parent campaign's `dailyBudget`. LinkedIn allows a daily AND a lifetime budget on the same campaign, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
2142
+ * LinkedIn and X only. The daily budget (LinkedIn: the parent campaign's `dailyBudget`; X: the line item's, or the campaign's when the line item has none). Both allow a daily AND a lifetime budget together, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
2143
2143
  */
2144
2144
  daily?: number;
2145
2145
  /**
2146
- * LinkedIn only. The parent campaign's `totalBudget`, readable even when a daily budget is also set.
2146
+ * LinkedIn and X only. The lifetime total (LinkedIn: the parent campaign's `totalBudget`; X: `total_budget_amount_local_micro`, for example the `lifetimeBudgetCap` of a boost), readable even when a daily budget is also set.
2147
2147
  */
2148
2148
  lifetime?: number;
2149
2149
  /**
@@ -3373,11 +3373,11 @@ type AdTreeAdSet = {
3373
3373
  amount?: number;
3374
3374
  type?: 'daily' | 'lifetime';
3375
3375
  /**
3376
- * LinkedIn only. The campaign's `dailyBudget`. LinkedIn allows a daily AND a lifetime budget on the same campaign, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
3376
+ * LinkedIn and X only. The daily budget (LinkedIn: the campaign's `dailyBudget`; X: the line item's `daily_budget_amount_local_micro`). Both allow a daily AND a lifetime budget together, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
3377
3377
  */
3378
3378
  daily?: number;
3379
3379
  /**
3380
- * LinkedIn only. The campaign's `totalBudget`, readable even when a daily budget is also set.
3380
+ * LinkedIn and X only. The lifetime total (LinkedIn: the campaign's `totalBudget`; X: the line item's `total_budget_amount_local_micro`), readable even when a daily budget is also set.
3381
3381
  */
3382
3382
  lifetime?: number;
3383
3383
  /**
@@ -10696,7 +10696,7 @@ type ParameterCatalogTokenAccountId = string;
10696
10696
  */
10697
10697
  type ParameterIdempotencyKeyHeader = string;
10698
10698
  /**
10699
- * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description.
10699
+ * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description. On X the budget is read live in the same read: on GET /v1/ads/{adId} `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches); on the ad set and campaign listings `budget` is the one that line item or campaign holds now (returned, not stored); a row whose budget the other level holds keeps its synced `budget`.
10700
10700
  */
10701
10701
  type ParameterLiveStatusRead = boolean;
10702
10702
  /**
@@ -12255,6 +12255,10 @@ type SupportRun = {
12255
12255
  * Why the run stopped. Null while it is in progress.
12256
12256
  */
12257
12257
  stopReason: ('answered' | 'human_review' | 'cost_cap' | 'deadline' | 'max_iterations' | 'error' | 'expired') | null;
12258
+ /**
12259
+ * The question as asked, with leading and trailing whitespace trimmed. Null only on runs created before this field was added.
12260
+ */
12261
+ question: (string) | null;
12258
12262
  /**
12259
12263
  * The assistant's answer. Null while the run is in progress or when it failed.
12260
12264
  */
@@ -14577,8 +14581,11 @@ type WebhookPayloadComment = {
14577
14581
  /**
14578
14582
  * Ad context. Present only when the comment was made on paid content.
14579
14583
  * Instagram: populated from the webhook payload's value.media.ad_id, value.media.ad_title and value.media.original_media_id, each only when Meta includes it.
14580
- * Facebook: populated via a Graph API lookup of the parent post's promotion_status.
14581
- * Absent for comments on organic posts that are not currently promoted.
14584
+ * Facebook: populated from a Graph API lookup of the parent post. Present when the post is an
14585
+ * ad dark post (isDarkPost true, whatever its promotionStatus) or an organic post that is or was
14586
+ * boosted (promotionStatus "active", "extendable" or "finished"). Meta does not link a dark post
14587
+ * back to its ad, so id and title are never set on Facebook.
14588
+ * Absent for comments on organic posts that are not promoted.
14582
14589
  *
14583
14590
  */
14584
14591
  ad?: {
@@ -14595,12 +14602,16 @@ type WebhookPayloadComment = {
14595
14602
  */
14596
14603
  originalMediaId?: string;
14597
14604
  /**
14598
- * Facebook promotion status returned by Graph API. Common values:
14599
- * "active" (organic post currently boosted), "ineligible" (dark
14600
- * post or ad creative, not promotable because it already is an ad).
14605
+ * Facebook only. The parent post's promotion_status as the Graph API returns it, for example
14606
+ * "active" (organic post currently boosted). Ad dark posts usually report "inactive" and
14607
+ * sometimes "ineligible", so use isDarkPost, not this value, to tell an ad comment apart.
14601
14608
  *
14602
14609
  */
14603
14610
  promotionStatus?: string;
14611
+ /**
14612
+ * Facebook only: true when the post is an unpublished ad creative (dark post), false for a boosted organic post.
14613
+ */
14614
+ isDarkPost?: boolean;
14604
14615
  };
14605
14616
  /**
14606
14617
  * Facebook only. Present on graphic-only comments (sticker, GIF, photo) that
@@ -40598,7 +40609,7 @@ type ListAdCampaignsData = {
40598
40609
  includeEmpty?: boolean;
40599
40610
  limit?: number;
40600
40611
  /**
40601
- * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description.
40612
+ * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description. On X the budget is read live in the same read: on GET /v1/ads/{adId} `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches); on the ad set and campaign listings `budget` is the one that line item or campaign holds now (returned, not stored); a row whose budget the other level holds keeps its synced `budget`.
40602
40613
  */
40603
40614
  live?: boolean;
40604
40615
  /**
@@ -41055,11 +41066,15 @@ type UpdateAdCampaignResponse = ({
41055
41066
  type UpdateAdCampaignError = (unknown | ErrorResponse);
41056
41067
  type DeleteAdCampaignData = {
41057
41068
  body: {
41058
- platform: 'facebook' | 'instagram' | 'google';
41069
+ platform: 'facebook' | 'instagram' | 'google' | 'twitter';
41059
41070
  /**
41060
41071
  * Zernio SocialAccount id owning the ad account. Required only to delete an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
41061
41072
  */
41062
41073
  accountId?: string;
41074
+ /**
41075
+ * X only, for an EMPTY campaign that was never synced: the X ad account id the campaign belongs to (lowercase letters and digits). The synced campaign's ad account wins when there is one. Also accepted on the query string.
41076
+ */
41077
+ adAccountId?: string;
41063
41078
  };
41064
41079
  path: {
41065
41080
  /**
@@ -41491,7 +41506,7 @@ type ListAdSetsData = {
41491
41506
  */
41492
41507
  campaignId?: string;
41493
41508
  /**
41494
- * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description.
41509
+ * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description. On X the budget is read live in the same read: on GET /v1/ads/{adId} `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches); on the ad set and campaign listings `budget` is the one that line item or campaign holds now (returned, not stored); a row whose budget the other level holds keeps its synced `budget`.
41495
41510
  */
41496
41511
  live?: boolean;
41497
41512
  platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
@@ -41516,11 +41531,11 @@ type ListAdSetsResponse = ({
41516
41531
  amount?: number;
41517
41532
  type?: 'daily' | 'lifetime';
41518
41533
  /**
41519
- * LinkedIn only. The campaign's `dailyBudget`. LinkedIn allows a daily AND a lifetime budget on the same campaign, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
41534
+ * LinkedIn and X only. The daily budget (LinkedIn: the campaign's `dailyBudget`; X: the line item's `daily_budget_amount_local_micro`). Both allow a daily AND a lifetime budget together, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
41520
41535
  */
41521
41536
  daily?: number;
41522
41537
  /**
41523
- * LinkedIn only. The campaign's `totalBudget`, readable even when a daily budget is also set.
41538
+ * LinkedIn and X only. The lifetime total (LinkedIn: the campaign's `totalBudget`; X: the line item's `total_budget_amount_local_micro`), readable even when a daily budget is also set.
41524
41539
  */
41525
41540
  lifetime?: number;
41526
41541
  /**
@@ -41824,11 +41839,11 @@ type UpdateAdSetData = {
41824
41839
  type?: 'daily' | 'lifetime';
41825
41840
  };
41826
41841
  /**
41827
- * Writes the ad set's own on/off switch (Meta: `configured_status`) on Meta and LinkedIn, whatever delivery status its ads report. Omit if not toggling delivery state.
41842
+ * Writes the ad set's own on/off switch (Meta: `configured_status`; X: the line item's `entity_status` ACTIVE / PAUSED), whatever delivery status its ads report. Omit if not toggling delivery state.
41828
41843
  */
41829
41844
  status?: 'active' | 'paused';
41830
41845
  /**
41831
- * Rename the ad set (Meta only; other platforms return 501). At least one of budget/status/bidStrategy/name is required.
41846
+ * Rename the ad set (on X, the line item `name`). Platforms without a rename return 501. At least one of budget/status/bidStrategy/name is required.
41832
41847
  */
41833
41848
  name?: string;
41834
41849
  /**
@@ -41838,8 +41853,13 @@ type UpdateAdSetData = {
41838
41853
  * automatically. On OpenAI, LOWEST_COST_WITH_BID_CAP and COST_CAP both map to
41839
41854
  * the ad group's `bidding_config.max_bid_micros` (one knob covers both);
41840
41855
  * LOWEST_COST_WITH_MIN_ROAS is rejected with 422 (OpenAI has no ROAS-based
41841
- * bidding). Other platforms (linkedin, pinterest, google, twitter) return 501
41842
- * Not Implemented when bidStrategy is set.
41856
+ * bidding). On X it writes the line item's `bid_strategy`:
41857
+ * LOWEST_COST_WITHOUT_CAP = AUTO, LOWEST_COST_WITH_BID_CAP = MAX and
41858
+ * COST_CAP = TARGET, with `bidAmount` as `bid_amount_local_micro`;
41859
+ * LOWEST_COST_WITH_MIN_ROAS is rejected with 422. X decides which strategy
41860
+ * the line item's objective allows (TARGET only on REACH, FOLLOWERS and
41861
+ * WEBSITE_CLICKS, MAX not on REACH or FOLLOWERS). Other platforms
41862
+ * (linkedin, pinterest, google) return 501 Not Implemented when bidStrategy is set.
41843
41863
  *
41844
41864
  */
41845
41865
  bidStrategy?: (BidStrategy);
@@ -41866,7 +41886,7 @@ type UpdateAdSetData = {
41866
41886
  /**
41867
41887
  * Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when
41868
41888
  * bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP. Internally converted to Meta's
41869
- * smallest-denomination integer, or (on OpenAI) to micros (× 1,000,000). Meta only:
41889
+ * smallest-denomination integer, or (on OpenAI and X) to micros (× 1,000,000). Meta only:
41870
41890
  * may be sent alone, WITHOUT bidStrategy, to update the cap amount on an ad set whose
41871
41891
  * parent campaign is COST_CAP or LOWEST_COST_WITH_BID_CAP (the strategy is inherited
41872
41892
  * from the campaign and is left untouched).
@@ -42182,7 +42202,7 @@ type GetAdData = {
42182
42202
  };
42183
42203
  query?: {
42184
42204
  /**
42185
- * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description.
42205
+ * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description. On X the budget is read live in the same read: on GET /v1/ads/{adId} `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches); on the ad set and campaign listings `budget` is the one that line item or campaign holds now (returned, not stored); a row whose budget the other level holds keeps its synced `budget`.
42186
42206
  */
42187
42207
  live?: boolean;
42188
42208
  };
@@ -46374,6 +46394,10 @@ type BoostPostData = {
46374
46394
  * Goes together with budgetAmount. lifetime requires schedule.endDate.
46375
46395
  */
46376
46396
  budgetType?: 'daily' | 'lifetime';
46397
+ /**
46398
+ * X only. A lifetime total, in whole currency units, that caps a daily budget (budgetType daily): the line item gets both daily_budget_amount_local_micro and total_budget_amount_local_micro, and stops spending once the total is reached. Must be at least budgetAmount. Read back as budget.daily and budget.lifetime. 400 on a lifetime budget or on another platform.
46399
+ */
46400
+ lifetimeBudgetCap?: number;
46377
46401
  /**
46378
46402
  * Alias of budgetAmount + budgetType, kept for existing callers
46379
46403
  * @deprecated
@@ -46410,7 +46434,7 @@ type BoostPostData = {
46410
46434
  */
46411
46435
  startDate?: string;
46412
46436
  /**
46413
- * Ad-set end time (ISO 8601), mapped to the ad set's `end_time`. Required for lifetime budgets. On Meta, TikTok, X and Pinterest a value without an offset (`YYYY-MM-DD`, `YYYY-MM-DD HH:MM:SS` or `YYYY-MM-DDTHH:MM:SS`) is read in the ad account timezone, and a date-only end runs to 23:59:59 local. Same field as on POST /v1/ads/create.
46437
+ * Ad-set end time (ISO 8601), mapped to the ad set's `end_time` (on X, the line item's `end_time`; X campaigns carry no flight dates). Required for lifetime budgets. On Meta, TikTok, X and Pinterest a value without an offset (`YYYY-MM-DD`, `YYYY-MM-DD HH:MM:SS` or `YYYY-MM-DDTHH:MM:SS`) is read in the ad account timezone, and a date-only end runs to 23:59:59 local. Same field as on POST /v1/ads/create.
46414
46438
  */
46415
46439
  endDate?: string;
46416
46440
  /**
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: "@zernio/node",
39
- version: "0.2.1167",
39
+ version: "0.2.1169",
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: "@zernio/node",
8
- version: "0.2.1167",
8
+ version: "0.2.1169",
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": "@zernio/node",
3
- "version": "0.2.1167",
3
+ "version": "0.2.1169",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -9022,7 +9022,7 @@ export const addBroadcastRecipients = <ThrowOnError extends boolean = false>(opt
9022
9022
 
9023
9023
  /**
9024
9024
  * List a thread's support answers
9025
- * Lists the runs of one thread that your team started, with their answers, oldest first. Replies from the Zernio team after a support ticket arrive by email and are not included. Runs are kept for 90 days. Page through a long thread with `limit` and `cursor`: pass `nextCursor` as `cursor` until it is null.
9025
+ * Lists the runs of one thread that your team started, with each question and its answer, oldest first. Replies from the Zernio team after a support ticket arrive by email and are not included. Runs are kept for 90 days. Page through a long thread with `limit` and `cursor`: pass `nextCursor` as `cursor` until it is null.
9026
9026
  */
9027
9027
  export const listSupportAnswers = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListSupportAnswersData, ThrowOnError>) => {
9028
9028
  return (options?.client ?? client).get<ListSupportAnswersResponse, ListSupportAnswersError, ThrowOnError>({
@@ -10054,9 +10054,15 @@ export const updateAdCampaign = <ThrowOnError extends boolean = false>(options:
10054
10054
  * to resolve, so it is invisible to `/v1/ads/tree` and this endpoint would
10055
10055
  * 404. That state is produced by the two-step create flow (campaign, then
10056
10056
  * ads via `existingCampaignId`) whenever Meta rejects the ad step. To
10057
- * delete such a shell, send `accountId` in the body: we skip the local
10058
- * lookup entirely and forward the delete to Meta. `accountId` is ignored
10059
- * when the campaign does have ads.
10057
+ * delete such a shell, send `accountId` in the body or the query string:
10058
+ * we skip the local lookup entirely and forward the delete to Meta, or to
10059
+ * X when `accountId` is an X or X Ads connection. On X the ad account comes
10060
+ * from the synced campaign, which wins over `adAccountId`; when the campaign
10061
+ * was never synced, send `adAccountId` too. Before deleting, Zernio asks X
10062
+ * whether the campaign still holds undeleted line items (ads not synced
10063
+ * yet); if it does the answer is 409 and nothing is deleted, so sync the ad
10064
+ * account and retry. Other platforms answer 501 for an empty campaign.
10065
+ * `accountId` is ignored when the campaign does have ads.
10060
10066
  *
10061
10067
  */
10062
10068
  export const deleteAdCampaign = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteAdCampaignData, ThrowOnError>) => {
@@ -10714,7 +10720,7 @@ export const updateAd = <ThrowOnError extends boolean = false>(options: OptionsL
10714
10720
  *
10715
10721
  * Deletes the ad on the platform and marks it as cancelled in the database. The ad is preserved for history. OpenAI Ads has no delete API; the ad is archived instead (a terminal state, the closest equivalent).
10716
10722
  *
10717
- * Only the ad is deleted; a campaign or ad set is never deleted while it still holds another ad. On Meta, when the ad set and campaign were created by Zernio (by `POST /v1/ads/create` or `POST /v1/ads/boost`) and Meta lists no other ad in the ad set (archived ads count), the emptied ad set is deleted too, then the campaign once it holds no other ad set. Parents created outside Zernio, and the parents of an ad imported from the platform, are always kept. On LinkedIn the ad is a creative inside a campaign inside a campaign group: the creative is always removed, the campaign only when Zernio created it and LinkedIn lists no other creative in it that is not archived, canceled or deleted, and the campaign group only when Zernio created it and LinkedIn lists no other campaign in it that is not canceled or deleted (archived campaigns count). If the creative itself cannot be removed the request fails and no parent is touched. To delete a whole campaign on purpose use `DELETE /v1/ads/campaigns/{campaignId}`.
10723
+ * Only the ad is deleted; a campaign or ad set is never deleted while it still holds another ad. On Meta, when the ad set and campaign were created by Zernio (by `POST /v1/ads/create` or `POST /v1/ads/boost`) and Meta lists no other ad in the ad set (archived ads count), the emptied ad set is deleted too, then the campaign once it holds no other ad set. Parents created outside Zernio, and the parents of an ad imported from the platform, are always kept. On LinkedIn the ad is a creative inside a campaign inside a campaign group: the creative is always removed, the campaign only when Zernio created it and LinkedIn lists no other creative in it that is not archived, canceled or deleted, and the campaign group only when Zernio created it and LinkedIn lists no other campaign in it that is not canceled or deleted (archived campaigns count). If the creative itself cannot be removed the request fails and no parent is touched. On X the ad is a promoted post inside a line item inside a campaign: the promoted post is always removed, the line item only when Zernio created it (by `POST /v1/ads/create` or `POST /v1/ads/boost`) and X lists no other undeleted promoted post in it, and the campaign only when Zernio created it and X lists no other undeleted line item in it. If X refuses the promoted post delete the request fails and no parent is touched. To delete a whole campaign on purpose use `DELETE /v1/ads/campaigns/{campaignId}`.
10718
10724
  *
10719
10725
  */
10720
10726
  export const deleteAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteAdData, ThrowOnError>) => {
@@ -135,11 +135,11 @@ export type Ad = {
135
135
  amount?: number;
136
136
  type?: 'daily' | 'lifetime';
137
137
  /**
138
- * LinkedIn only. The parent campaign's `dailyBudget`. LinkedIn allows a daily AND a lifetime budget on the same campaign, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
138
+ * LinkedIn and X only. The daily budget (LinkedIn: the parent campaign's `dailyBudget`; X: the line item's, or the campaign's when the line item has none). Both allow a daily AND a lifetime budget together, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
139
139
  */
140
140
  daily?: number;
141
141
  /**
142
- * LinkedIn only. The parent campaign's `totalBudget`, readable even when a daily budget is also set.
142
+ * LinkedIn and X only. The lifetime total (LinkedIn: the parent campaign's `totalBudget`; X: `total_budget_amount_local_micro`, for example the `lifetimeBudgetCap` of a boost), readable even when a daily budget is also set.
143
143
  */
144
144
  lifetime?: number;
145
145
  /**
@@ -1405,11 +1405,11 @@ export type AdTreeAdSet = {
1405
1405
  amount?: number;
1406
1406
  type?: 'daily' | 'lifetime';
1407
1407
  /**
1408
- * LinkedIn only. The campaign's `dailyBudget`. LinkedIn allows a daily AND a lifetime budget on the same campaign, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
1408
+ * LinkedIn and X only. The daily budget (LinkedIn: the campaign's `dailyBudget`; X: the line item's `daily_budget_amount_local_micro`). Both allow a daily AND a lifetime budget together, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
1409
1409
  */
1410
1410
  daily?: number;
1411
1411
  /**
1412
- * LinkedIn only. The campaign's `totalBudget`, readable even when a daily budget is also set.
1412
+ * LinkedIn and X only. The lifetime total (LinkedIn: the campaign's `totalBudget`; X: the line item's `total_budget_amount_local_micro`), readable even when a daily budget is also set.
1413
1413
  */
1414
1414
  lifetime?: number;
1415
1415
  /**
@@ -9067,7 +9067,7 @@ export type ParameterCatalogTokenAccountId = string;
9067
9067
  export type ParameterIdempotencyKeyHeader = string;
9068
9068
 
9069
9069
  /**
9070
- * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description.
9070
+ * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description. On X the budget is read live in the same read: on GET /v1/ads/{adId} `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches); on the ad set and campaign listings `budget` is the one that line item or campaign holds now (returned, not stored); a row whose budget the other level holds keeps its synced `budget`.
9071
9071
  */
9072
9072
  export type ParameterLiveStatusRead = boolean;
9073
9073
 
@@ -10717,6 +10717,10 @@ export type SupportRun = {
10717
10717
  * Why the run stopped. Null while it is in progress.
10718
10718
  */
10719
10719
  stopReason: ('answered' | 'human_review' | 'cost_cap' | 'deadline' | 'max_iterations' | 'error' | 'expired') | null;
10720
+ /**
10721
+ * The question as asked, with leading and trailing whitespace trimmed. Null only on runs created before this field was added.
10722
+ */
10723
+ question: (string) | null;
10720
10724
  /**
10721
10725
  * The assistant's answer. Null while the run is in progress or when it failed.
10722
10726
  */
@@ -13129,8 +13133,11 @@ export type WebhookPayloadComment = {
13129
13133
  /**
13130
13134
  * Ad context. Present only when the comment was made on paid content.
13131
13135
  * Instagram: populated from the webhook payload's value.media.ad_id, value.media.ad_title and value.media.original_media_id, each only when Meta includes it.
13132
- * Facebook: populated via a Graph API lookup of the parent post's promotion_status.
13133
- * Absent for comments on organic posts that are not currently promoted.
13136
+ * Facebook: populated from a Graph API lookup of the parent post. Present when the post is an
13137
+ * ad dark post (isDarkPost true, whatever its promotionStatus) or an organic post that is or was
13138
+ * boosted (promotionStatus "active", "extendable" or "finished"). Meta does not link a dark post
13139
+ * back to its ad, so id and title are never set on Facebook.
13140
+ * Absent for comments on organic posts that are not promoted.
13134
13141
  *
13135
13142
  */
13136
13143
  ad?: {
@@ -13147,12 +13154,16 @@ export type WebhookPayloadComment = {
13147
13154
  */
13148
13155
  originalMediaId?: string;
13149
13156
  /**
13150
- * Facebook promotion status returned by Graph API. Common values:
13151
- * "active" (organic post currently boosted), "ineligible" (dark
13152
- * post or ad creative, not promotable because it already is an ad).
13157
+ * Facebook only. The parent post's promotion_status as the Graph API returns it, for example
13158
+ * "active" (organic post currently boosted). Ad dark posts usually report "inactive" and
13159
+ * sometimes "ineligible", so use isDarkPost, not this value, to tell an ad comment apart.
13153
13160
  *
13154
13161
  */
13155
13162
  promotionStatus?: string;
13163
+ /**
13164
+ * Facebook only: true when the post is an unpublished ad creative (dark post), false for a boosted organic post.
13165
+ */
13166
+ isDarkPost?: boolean;
13156
13167
  };
13157
13168
  /**
13158
13169
  * Facebook only. Present on graphic-only comments (sticker, GIF, photo) that
@@ -41017,7 +41028,7 @@ export type ListAdCampaignsData = {
41017
41028
  includeEmpty?: boolean;
41018
41029
  limit?: number;
41019
41030
  /**
41020
- * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description.
41031
+ * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description. On X the budget is read live in the same read: on GET /v1/ads/{adId} `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches); on the ad set and campaign listings `budget` is the one that line item or campaign holds now (returned, not stored); a row whose budget the other level holds keeps its synced `budget`.
41021
41032
  */
41022
41033
  live?: boolean;
41023
41034
  /**
@@ -41498,11 +41509,15 @@ export type UpdateAdCampaignError = (unknown | ErrorResponse);
41498
41509
 
41499
41510
  export type DeleteAdCampaignData = {
41500
41511
  body: {
41501
- platform: 'facebook' | 'instagram' | 'google';
41512
+ platform: 'facebook' | 'instagram' | 'google' | 'twitter';
41502
41513
  /**
41503
41514
  * Zernio SocialAccount id owning the ad account. Required only to delete an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
41504
41515
  */
41505
41516
  accountId?: string;
41517
+ /**
41518
+ * X only, for an EMPTY campaign that was never synced: the X ad account id the campaign belongs to (lowercase letters and digits). The synced campaign's ad account wins when there is one. Also accepted on the query string.
41519
+ */
41520
+ adAccountId?: string;
41506
41521
  };
41507
41522
  path: {
41508
41523
  /**
@@ -41955,7 +41970,7 @@ export type ListAdSetsData = {
41955
41970
  */
41956
41971
  campaignId?: string;
41957
41972
  /**
41958
- * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description.
41973
+ * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description. On X the budget is read live in the same read: on GET /v1/ads/{adId} `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches); on the ad set and campaign listings `budget` is the one that line item or campaign holds now (returned, not stored); a row whose budget the other level holds keeps its synced `budget`.
41959
41974
  */
41960
41975
  live?: boolean;
41961
41976
  platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
@@ -41981,11 +41996,11 @@ export type ListAdSetsResponse = ({
41981
41996
  amount?: number;
41982
41997
  type?: 'daily' | 'lifetime';
41983
41998
  /**
41984
- * LinkedIn only. The campaign's `dailyBudget`. LinkedIn allows a daily AND a lifetime budget on the same campaign, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
41999
+ * LinkedIn and X only. The daily budget (LinkedIn: the campaign's `dailyBudget`; X: the line item's `daily_budget_amount_local_micro`). Both allow a daily AND a lifetime budget together, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
41985
42000
  */
41986
42001
  daily?: number;
41987
42002
  /**
41988
- * LinkedIn only. The campaign's `totalBudget`, readable even when a daily budget is also set.
42003
+ * LinkedIn and X only. The lifetime total (LinkedIn: the campaign's `totalBudget`; X: the line item's `total_budget_amount_local_micro`), readable even when a daily budget is also set.
41989
42004
  */
41990
42005
  lifetime?: number;
41991
42006
  /**
@@ -42303,11 +42318,11 @@ export type UpdateAdSetData = {
42303
42318
  type?: 'daily' | 'lifetime';
42304
42319
  };
42305
42320
  /**
42306
- * Writes the ad set's own on/off switch (Meta: `configured_status`) on Meta and LinkedIn, whatever delivery status its ads report. Omit if not toggling delivery state.
42321
+ * Writes the ad set's own on/off switch (Meta: `configured_status`; X: the line item's `entity_status` ACTIVE / PAUSED), whatever delivery status its ads report. Omit if not toggling delivery state.
42307
42322
  */
42308
42323
  status?: 'active' | 'paused';
42309
42324
  /**
42310
- * Rename the ad set (Meta only; other platforms return 501). At least one of budget/status/bidStrategy/name is required.
42325
+ * Rename the ad set (on X, the line item `name`). Platforms without a rename return 501. At least one of budget/status/bidStrategy/name is required.
42311
42326
  */
42312
42327
  name?: string;
42313
42328
  /**
@@ -42317,8 +42332,13 @@ export type UpdateAdSetData = {
42317
42332
  * automatically. On OpenAI, LOWEST_COST_WITH_BID_CAP and COST_CAP both map to
42318
42333
  * the ad group's `bidding_config.max_bid_micros` (one knob covers both);
42319
42334
  * LOWEST_COST_WITH_MIN_ROAS is rejected with 422 (OpenAI has no ROAS-based
42320
- * bidding). Other platforms (linkedin, pinterest, google, twitter) return 501
42321
- * Not Implemented when bidStrategy is set.
42335
+ * bidding). On X it writes the line item's `bid_strategy`:
42336
+ * LOWEST_COST_WITHOUT_CAP = AUTO, LOWEST_COST_WITH_BID_CAP = MAX and
42337
+ * COST_CAP = TARGET, with `bidAmount` as `bid_amount_local_micro`;
42338
+ * LOWEST_COST_WITH_MIN_ROAS is rejected with 422. X decides which strategy
42339
+ * the line item's objective allows (TARGET only on REACH, FOLLOWERS and
42340
+ * WEBSITE_CLICKS, MAX not on REACH or FOLLOWERS). Other platforms
42341
+ * (linkedin, pinterest, google) return 501 Not Implemented when bidStrategy is set.
42322
42342
  *
42323
42343
  */
42324
42344
  bidStrategy?: (BidStrategy);
@@ -42345,7 +42365,7 @@ export type UpdateAdSetData = {
42345
42365
  /**
42346
42366
  * Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when
42347
42367
  * bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP. Internally converted to Meta's
42348
- * smallest-denomination integer, or (on OpenAI) to micros (× 1,000,000). Meta only:
42368
+ * smallest-denomination integer, or (on OpenAI and X) to micros (× 1,000,000). Meta only:
42349
42369
  * may be sent alone, WITHOUT bidStrategy, to update the cap amount on an ad set whose
42350
42370
  * parent campaign is COST_CAP or LOWEST_COST_WITH_BID_CAP (the strategy is inherited
42351
42371
  * from the campaign and is left untouched).
@@ -42676,7 +42696,7 @@ export type GetAdData = {
42676
42696
  };
42677
42697
  query?: {
42678
42698
  /**
42679
- * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description.
42699
+ * Read the on/off switches live from the platform instead of returning the synced values. The fresh values are stored (so later reads return them too) and the response carries `statusReadAt`, the time of the read. At most 20 platform objects are read per request. Where a read fails (credentials, platform error, no reader on that platform), the stored values come back with `statusReadAt: null`. See "Status freshness" in the operation description. On X the budget is read live in the same read: on GET /v1/ads/{adId} `budget`, `adSetBudget`, `campaignBudget` and `budgetLevel` are the line item and campaign budgets X holds now (stored like the switches); on the ad set and campaign listings `budget` is the one that line item or campaign holds now (returned, not stored); a row whose budget the other level holds keeps its synced `budget`.
42680
42700
  */
42681
42701
  live?: boolean;
42682
42702
  };
@@ -47162,6 +47182,10 @@ export type BoostPostData = {
47162
47182
  * Goes together with budgetAmount. lifetime requires schedule.endDate.
47163
47183
  */
47164
47184
  budgetType?: 'daily' | 'lifetime';
47185
+ /**
47186
+ * X only. A lifetime total, in whole currency units, that caps a daily budget (budgetType daily): the line item gets both daily_budget_amount_local_micro and total_budget_amount_local_micro, and stops spending once the total is reached. Must be at least budgetAmount. Read back as budget.daily and budget.lifetime. 400 on a lifetime budget or on another platform.
47187
+ */
47188
+ lifetimeBudgetCap?: number;
47165
47189
  /**
47166
47190
  * Alias of budgetAmount + budgetType, kept for existing callers
47167
47191
  * @deprecated
@@ -47198,7 +47222,7 @@ export type BoostPostData = {
47198
47222
  */
47199
47223
  startDate?: string;
47200
47224
  /**
47201
- * Ad-set end time (ISO 8601), mapped to the ad set's `end_time`. Required for lifetime budgets. On Meta, TikTok, X and Pinterest a value without an offset (`YYYY-MM-DD`, `YYYY-MM-DD HH:MM:SS` or `YYYY-MM-DDTHH:MM:SS`) is read in the ad account timezone, and a date-only end runs to 23:59:59 local. Same field as on POST /v1/ads/create.
47225
+ * Ad-set end time (ISO 8601), mapped to the ad set's `end_time` (on X, the line item's `end_time`; X campaigns carry no flight dates). Required for lifetime budgets. On Meta, TikTok, X and Pinterest a value without an offset (`YYYY-MM-DD`, `YYYY-MM-DD HH:MM:SS` or `YYYY-MM-DDTHH:MM:SS`) is read in the ad account timezone, and a date-only end runs to 23:59:59 local. Same field as on POST /v1/ads/create.
47202
47226
  */
47203
47227
  endDate?: string;
47204
47228
  /**