@getlatedev/node 0.2.1451 → 0.2.1453

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
@@ -2547,6 +2547,10 @@ type Ad = {
2547
2547
  *
2548
2548
  */
2549
2549
  roasAverageFloor?: (number) | null;
2550
+ /**
2551
+ * Special ad categories declared when Zernio created this ad (`specialAdCategories` on POST /v1/ads/create or /v1/ads/boost), e.g. ["HOUSING"]. Empty or absent when none was declared or the ad was created outside Zernio.
2552
+ */
2553
+ specialAdCategories?: Array<(string)>;
2550
2554
  /**
2551
2555
  * Meta promoted object containing conversion event details. Structure varies by objective. Only present for Meta ads.
2552
2556
  */
@@ -3144,6 +3148,10 @@ type AdCampaign = {
3144
3148
  pixel_id?: string;
3145
3149
  page_id?: string;
3146
3150
  } | null;
3151
+ /**
3152
+ * Special ad categories declared when Zernio created the campaign, read from the ad that created it (its earliest ad), e.g. ["HOUSING"]. Absent when none was declared or the campaign was created outside Zernio.
3153
+ */
3154
+ specialAdCategories?: Array<(string)>;
3147
3155
  earliestAd?: string;
3148
3156
  latestAd?: string;
3149
3157
  };
@@ -4716,6 +4724,10 @@ type AdTreeCampaign = {
4716
4724
  pixel_id?: string;
4717
4725
  page_id?: string;
4718
4726
  } | null;
4727
+ /**
4728
+ * Special ad categories declared when Zernio created the campaign, read from the ad that created it (its earliest ad), e.g. ["HOUSING"]. Absent when none was declared or the campaign was created outside Zernio.
4729
+ */
4730
+ specialAdCategories?: Array<(string)>;
4719
4731
  adSets?: Array<AdTreeAdSet>;
4720
4732
  /**
4721
4733
  * Per-day metric series for this campaign. Present only when `GET /v1/ads/tree` is called with `timeIncrement=1` (any `dailyLevel`). This is the per-campaign daily trend. Summing its additive fields reproduces the campaign `metrics` total, except `reach`: on Meta the range total is de-duplicated, so daily reach does not sum to it.
@@ -50429,6 +50441,10 @@ type GetCampaignResultsUploadResponse = ({
50429
50441
  campaign?: string;
50430
50442
  reason?: 'no_campaign' | 'ambiguous';
50431
50443
  }>;
50444
+ /**
50445
+ * Set when `status` is `failed`. `queue_unavailable`: the upload could not be queued. `processing_failed`: its rows could not be stored after several retries. Both are on our side.
50446
+ */
50447
+ failureReason: ('queue_unavailable' | 'processing_failed') | null;
50432
50448
  createdAt: string;
50433
50449
  completedAt: (string) | null;
50434
50450
  });
@@ -57624,7 +57640,14 @@ type BoostPostData = {
57624
57640
  }>;
57625
57641
  };
57626
57642
  /**
57627
- * Meta only. Required for housing, employment, credit, or political ads.
57643
+ * Special ad category of the campaign the boost creates. Required for housing, employment, credit, or political ads.
57644
+ *
57645
+ * - Meta: every value.
57646
+ * - TikTok: HOUSING, EMPLOYMENT and CREDIT, sent as the campaign's `special_industries` (TikTok requires one for these ads aimed at the US or Canada). Other values return 400.
57647
+ * - TikTok targeting: a 400 names the field for ZIP codes (`targeting.locations.zips`), gender, ages under 18 (`targeting.ageMin`), interest keywords (`keyword:` ids in `targeting.interests`) and hashtag behaviors.
57648
+ * - TikTok also refuses Smart Targeting (`smartTargeting`) and lookalike audiences (`targeting.audienceInclude` / `targeting.audienceExclude`). Without an age, the ad group targets 18+.
57649
+ * - TikTok sets the category when the campaign is created, so it is a 400 with `smartPlus` or `existingCampaignId`.
57650
+ *
57628
57651
  */
57629
57652
  specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ISSUES_ELECTIONS_POLITICS' | 'ONLINE_GAMBLING_AND_GAMING')>;
57630
57653
  /**
@@ -58916,9 +58939,21 @@ type CreateStandaloneAdData = {
58916
58939
  [key: string]: unknown;
58917
58940
  };
58918
58941
  /**
58919
- * Meta only. Declares the ad's special category, required for housing, employment, credit, or
58920
- * political/social-issue ads (Meta enforces restricted targeting for these). Note: setting a special
58921
- * category disables income/zip targeting on Meta.
58942
+ * Declares the ad's special category, required for housing, employment, credit, or
58943
+ * political/social-issue ads.
58944
+ *
58945
+ * - Meta: every value. Setting a housing, employment or credit category disables income/zip
58946
+ * targeting on Meta.
58947
+ * - TikTok: HOUSING, EMPLOYMENT and CREDIT, sent as the new campaign's `special_industries`
58948
+ * (TikTok requires one for these ads aimed at the US or Canada). Other values return 400.
58949
+ * - TikTok targeting: the create (and `validateOnly`) returns 400 naming the field for ZIP codes
58950
+ * (`targeting.zips`), gender, ages under 18 (`targeting.ageMin`), interest keywords (`keyword:`
58951
+ * ids in `targeting.interests`) and hashtag behaviors.
58952
+ * - TikTok also refuses Smart Targeting (`smartTargeting`) and lookalike audiences
58953
+ * (`targeting.audienceInclude` / `targeting.audienceExclude`). Without an age, the ad group
58954
+ * targets 18+.
58955
+ * - TikTok sets the category when the campaign is created, so it is a 400 with `smartPlus`,
58956
+ * `existingCampaignId` or `adSetId`.
58922
58957
  *
58923
58958
  */
58924
58959
  specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ISSUES_ELECTIONS_POLITICS' | 'ONLINE_GAMBLING_AND_GAMING')>;
package/dist/index.d.ts CHANGED
@@ -2547,6 +2547,10 @@ type Ad = {
2547
2547
  *
2548
2548
  */
2549
2549
  roasAverageFloor?: (number) | null;
2550
+ /**
2551
+ * Special ad categories declared when Zernio created this ad (`specialAdCategories` on POST /v1/ads/create or /v1/ads/boost), e.g. ["HOUSING"]. Empty or absent when none was declared or the ad was created outside Zernio.
2552
+ */
2553
+ specialAdCategories?: Array<(string)>;
2550
2554
  /**
2551
2555
  * Meta promoted object containing conversion event details. Structure varies by objective. Only present for Meta ads.
2552
2556
  */
@@ -3144,6 +3148,10 @@ type AdCampaign = {
3144
3148
  pixel_id?: string;
3145
3149
  page_id?: string;
3146
3150
  } | null;
3151
+ /**
3152
+ * Special ad categories declared when Zernio created the campaign, read from the ad that created it (its earliest ad), e.g. ["HOUSING"]. Absent when none was declared or the campaign was created outside Zernio.
3153
+ */
3154
+ specialAdCategories?: Array<(string)>;
3147
3155
  earliestAd?: string;
3148
3156
  latestAd?: string;
3149
3157
  };
@@ -4716,6 +4724,10 @@ type AdTreeCampaign = {
4716
4724
  pixel_id?: string;
4717
4725
  page_id?: string;
4718
4726
  } | null;
4727
+ /**
4728
+ * Special ad categories declared when Zernio created the campaign, read from the ad that created it (its earliest ad), e.g. ["HOUSING"]. Absent when none was declared or the campaign was created outside Zernio.
4729
+ */
4730
+ specialAdCategories?: Array<(string)>;
4719
4731
  adSets?: Array<AdTreeAdSet>;
4720
4732
  /**
4721
4733
  * Per-day metric series for this campaign. Present only when `GET /v1/ads/tree` is called with `timeIncrement=1` (any `dailyLevel`). This is the per-campaign daily trend. Summing its additive fields reproduces the campaign `metrics` total, except `reach`: on Meta the range total is de-duplicated, so daily reach does not sum to it.
@@ -50429,6 +50441,10 @@ type GetCampaignResultsUploadResponse = ({
50429
50441
  campaign?: string;
50430
50442
  reason?: 'no_campaign' | 'ambiguous';
50431
50443
  }>;
50444
+ /**
50445
+ * Set when `status` is `failed`. `queue_unavailable`: the upload could not be queued. `processing_failed`: its rows could not be stored after several retries. Both are on our side.
50446
+ */
50447
+ failureReason: ('queue_unavailable' | 'processing_failed') | null;
50432
50448
  createdAt: string;
50433
50449
  completedAt: (string) | null;
50434
50450
  });
@@ -57624,7 +57640,14 @@ type BoostPostData = {
57624
57640
  }>;
57625
57641
  };
57626
57642
  /**
57627
- * Meta only. Required for housing, employment, credit, or political ads.
57643
+ * Special ad category of the campaign the boost creates. Required for housing, employment, credit, or political ads.
57644
+ *
57645
+ * - Meta: every value.
57646
+ * - TikTok: HOUSING, EMPLOYMENT and CREDIT, sent as the campaign's `special_industries` (TikTok requires one for these ads aimed at the US or Canada). Other values return 400.
57647
+ * - TikTok targeting: a 400 names the field for ZIP codes (`targeting.locations.zips`), gender, ages under 18 (`targeting.ageMin`), interest keywords (`keyword:` ids in `targeting.interests`) and hashtag behaviors.
57648
+ * - TikTok also refuses Smart Targeting (`smartTargeting`) and lookalike audiences (`targeting.audienceInclude` / `targeting.audienceExclude`). Without an age, the ad group targets 18+.
57649
+ * - TikTok sets the category when the campaign is created, so it is a 400 with `smartPlus` or `existingCampaignId`.
57650
+ *
57628
57651
  */
57629
57652
  specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ISSUES_ELECTIONS_POLITICS' | 'ONLINE_GAMBLING_AND_GAMING')>;
57630
57653
  /**
@@ -58916,9 +58939,21 @@ type CreateStandaloneAdData = {
58916
58939
  [key: string]: unknown;
58917
58940
  };
58918
58941
  /**
58919
- * Meta only. Declares the ad's special category, required for housing, employment, credit, or
58920
- * political/social-issue ads (Meta enforces restricted targeting for these). Note: setting a special
58921
- * category disables income/zip targeting on Meta.
58942
+ * Declares the ad's special category, required for housing, employment, credit, or
58943
+ * political/social-issue ads.
58944
+ *
58945
+ * - Meta: every value. Setting a housing, employment or credit category disables income/zip
58946
+ * targeting on Meta.
58947
+ * - TikTok: HOUSING, EMPLOYMENT and CREDIT, sent as the new campaign's `special_industries`
58948
+ * (TikTok requires one for these ads aimed at the US or Canada). Other values return 400.
58949
+ * - TikTok targeting: the create (and `validateOnly`) returns 400 naming the field for ZIP codes
58950
+ * (`targeting.zips`), gender, ages under 18 (`targeting.ageMin`), interest keywords (`keyword:`
58951
+ * ids in `targeting.interests`) and hashtag behaviors.
58952
+ * - TikTok also refuses Smart Targeting (`smartTargeting`) and lookalike audiences
58953
+ * (`targeting.audienceInclude` / `targeting.audienceExclude`). Without an age, the ad group
58954
+ * targets 18+.
58955
+ * - TikTok sets the category when the campaign is created, so it is a 400 with `smartPlus`,
58956
+ * `existingCampaignId` or `adSetId`.
58922
58957
  *
58923
58958
  */
58924
58959
  specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ISSUES_ELECTIONS_POLITICS' | 'ONLINE_GAMBLING_AND_GAMING')>;
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.1451",
39
+ version: "0.2.1453",
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.1451",
8
+ version: "0.2.1453",
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.1451",
3
+ "version": "0.2.1453",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -12519,6 +12519,8 @@ export const listCampaignResults = <ThrowOnError extends boolean = false>(option
12519
12519
  *
12520
12520
  * `status` turns `done` once every row is processed, usually within seconds. Uploads are kept for 30 days.
12521
12521
  *
12522
+ * A `failed` upload says why in `failureReason`. Send it again: re-sending a day replaces it, so nothing is counted twice.
12523
+ *
12522
12524
  */
12523
12525
  export const getCampaignResultsUpload = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetCampaignResultsUploadData, ThrowOnError>) => {
12524
12526
  return (options?.client ?? client).get<GetCampaignResultsUploadResponse, GetCampaignResultsUploadError, ThrowOnError>({
@@ -287,6 +287,10 @@ export type Ad = {
287
287
  *
288
288
  */
289
289
  roasAverageFloor?: (number) | null;
290
+ /**
291
+ * Special ad categories declared when Zernio created this ad (`specialAdCategories` on POST /v1/ads/create or /v1/ads/boost), e.g. ["HOUSING"]. Empty or absent when none was declared or the ad was created outside Zernio.
292
+ */
293
+ specialAdCategories?: Array<(string)>;
290
294
  /**
291
295
  * Meta promoted object containing conversion event details. Structure varies by objective. Only present for Meta ads.
292
296
  */
@@ -896,6 +900,10 @@ export type AdCampaign = {
896
900
  pixel_id?: string;
897
901
  page_id?: string;
898
902
  } | null;
903
+ /**
904
+ * Special ad categories declared when Zernio created the campaign, read from the ad that created it (its earliest ad), e.g. ["HOUSING"]. Absent when none was declared or the campaign was created outside Zernio.
905
+ */
906
+ specialAdCategories?: Array<(string)>;
899
907
  earliestAd?: string;
900
908
  latestAd?: string;
901
909
  };
@@ -2527,6 +2535,10 @@ export type AdTreeCampaign = {
2527
2535
  pixel_id?: string;
2528
2536
  page_id?: string;
2529
2537
  } | null;
2538
+ /**
2539
+ * Special ad categories declared when Zernio created the campaign, read from the ad that created it (its earliest ad), e.g. ["HOUSING"]. Absent when none was declared or the campaign was created outside Zernio.
2540
+ */
2541
+ specialAdCategories?: Array<(string)>;
2530
2542
  adSets?: Array<AdTreeAdSet>;
2531
2543
  /**
2532
2544
  * Per-day metric series for this campaign. Present only when `GET /v1/ads/tree` is called with `timeIncrement=1` (any `dailyLevel`). This is the per-campaign daily trend. Summing its additive fields reproduces the campaign `metrics` total, except `reach`: on Meta the range total is de-duplicated, so daily reach does not sum to it.
@@ -51180,6 +51192,10 @@ export type GetCampaignResultsUploadResponse = ({
51180
51192
  campaign?: string;
51181
51193
  reason?: 'no_campaign' | 'ambiguous';
51182
51194
  }>;
51195
+ /**
51196
+ * Set when `status` is `failed`. `queue_unavailable`: the upload could not be queued. `processing_failed`: its rows could not be stored after several retries. Both are on our side.
51197
+ */
51198
+ failureReason: ('queue_unavailable' | 'processing_failed') | null;
51183
51199
  createdAt: string;
51184
51200
  completedAt: (string) | null;
51185
51201
  });
@@ -58796,7 +58812,14 @@ export type BoostPostData = {
58796
58812
  }>;
58797
58813
  };
58798
58814
  /**
58799
- * Meta only. Required for housing, employment, credit, or political ads.
58815
+ * Special ad category of the campaign the boost creates. Required for housing, employment, credit, or political ads.
58816
+ *
58817
+ * - Meta: every value.
58818
+ * - TikTok: HOUSING, EMPLOYMENT and CREDIT, sent as the campaign's `special_industries` (TikTok requires one for these ads aimed at the US or Canada). Other values return 400.
58819
+ * - TikTok targeting: a 400 names the field for ZIP codes (`targeting.locations.zips`), gender, ages under 18 (`targeting.ageMin`), interest keywords (`keyword:` ids in `targeting.interests`) and hashtag behaviors.
58820
+ * - TikTok also refuses Smart Targeting (`smartTargeting`) and lookalike audiences (`targeting.audienceInclude` / `targeting.audienceExclude`). Without an age, the ad group targets 18+.
58821
+ * - TikTok sets the category when the campaign is created, so it is a 400 with `smartPlus` or `existingCampaignId`.
58822
+ *
58800
58823
  */
58801
58824
  specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ISSUES_ELECTIONS_POLITICS' | 'ONLINE_GAMBLING_AND_GAMING')>;
58802
58825
  /**
@@ -60112,9 +60135,21 @@ export type CreateStandaloneAdData = {
60112
60135
  [key: string]: unknown;
60113
60136
  };
60114
60137
  /**
60115
- * Meta only. Declares the ad's special category, required for housing, employment, credit, or
60116
- * political/social-issue ads (Meta enforces restricted targeting for these). Note: setting a special
60117
- * category disables income/zip targeting on Meta.
60138
+ * Declares the ad's special category, required for housing, employment, credit, or
60139
+ * political/social-issue ads.
60140
+ *
60141
+ * - Meta: every value. Setting a housing, employment or credit category disables income/zip
60142
+ * targeting on Meta.
60143
+ * - TikTok: HOUSING, EMPLOYMENT and CREDIT, sent as the new campaign's `special_industries`
60144
+ * (TikTok requires one for these ads aimed at the US or Canada). Other values return 400.
60145
+ * - TikTok targeting: the create (and `validateOnly`) returns 400 naming the field for ZIP codes
60146
+ * (`targeting.zips`), gender, ages under 18 (`targeting.ageMin`), interest keywords (`keyword:`
60147
+ * ids in `targeting.interests`) and hashtag behaviors.
60148
+ * - TikTok also refuses Smart Targeting (`smartTargeting`) and lookalike audiences
60149
+ * (`targeting.audienceInclude` / `targeting.audienceExclude`). Without an age, the ad group
60150
+ * targets 18+.
60151
+ * - TikTok sets the category when the campaign is created, so it is a 400 with `smartPlus`,
60152
+ * `existingCampaignId` or `adSetId`.
60118
60153
  *
60119
60154
  */
60120
60155
  specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ISSUES_ELECTIONS_POLITICS' | 'ONLINE_GAMBLING_AND_GAMING')>;