@getlatedev/node 0.2.1380 → 0.2.1381

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
@@ -49067,9 +49067,21 @@ type DuplicateAdCampaignResponse = ({
49067
49067
  * Platform ID of the new campaign
49068
49068
  */
49069
49069
  copiedCampaignId?: string;
49070
+ /**
49071
+ * Meta only: source ad set ID to copied ad set ID. Empty when `deepCopy` is false.
49072
+ */
49073
+ adSetIdMap?: {
49074
+ [key: string]: (string);
49075
+ };
49076
+ /**
49077
+ * Meta only: source ad ID to copied ad ID, across every copied ad set. Empty when `deepCopy` is false.
49078
+ */
49079
+ adIdMap?: {
49080
+ [key: string]: (string);
49081
+ };
49070
49082
  discovery?: 'triggered' | 'skipped' | 'failed';
49071
49083
  /**
49072
- * Platform-native response from the copy endpoint (Meta includes ad_object_ids for child copies)
49084
+ * Platform-native response from the copy (TikTok and LinkedIn). Absent on Meta, which returns `adSetIdMap` and `adIdMap` instead.
49073
49085
  */
49074
49086
  raw?: {
49075
49087
  [key: string]: unknown;
@@ -49620,9 +49632,19 @@ type DuplicateAdSetResponse = ({
49620
49632
  * Platform ID of the new ad set
49621
49633
  */
49622
49634
  copiedAdSetId?: string;
49635
+ /**
49636
+ * Platform IDs of the copied ads
49637
+ */
49638
+ copiedAdIds?: Array<(string)>;
49639
+ /**
49640
+ * Meta only: source ad ID to copied ad ID. Empty when `deepCopy` is false.
49641
+ */
49642
+ adIdMap?: {
49643
+ [key: string]: (string);
49644
+ };
49623
49645
  discovery?: 'triggered' | 'skipped' | 'failed';
49624
49646
  /**
49625
- * Meta's native copy response (includes ad_object_ids for child copies)
49647
+ * Platform-native response from the copy (TikTok). Absent on Meta, which returns `adIdMap` instead.
49626
49648
  */
49627
49649
  raw?: {
49628
49650
  [key: string]: unknown;
package/dist/index.d.ts CHANGED
@@ -49067,9 +49067,21 @@ type DuplicateAdCampaignResponse = ({
49067
49067
  * Platform ID of the new campaign
49068
49068
  */
49069
49069
  copiedCampaignId?: string;
49070
+ /**
49071
+ * Meta only: source ad set ID to copied ad set ID. Empty when `deepCopy` is false.
49072
+ */
49073
+ adSetIdMap?: {
49074
+ [key: string]: (string);
49075
+ };
49076
+ /**
49077
+ * Meta only: source ad ID to copied ad ID, across every copied ad set. Empty when `deepCopy` is false.
49078
+ */
49079
+ adIdMap?: {
49080
+ [key: string]: (string);
49081
+ };
49070
49082
  discovery?: 'triggered' | 'skipped' | 'failed';
49071
49083
  /**
49072
- * Platform-native response from the copy endpoint (Meta includes ad_object_ids for child copies)
49084
+ * Platform-native response from the copy (TikTok and LinkedIn). Absent on Meta, which returns `adSetIdMap` and `adIdMap` instead.
49073
49085
  */
49074
49086
  raw?: {
49075
49087
  [key: string]: unknown;
@@ -49620,9 +49632,19 @@ type DuplicateAdSetResponse = ({
49620
49632
  * Platform ID of the new ad set
49621
49633
  */
49622
49634
  copiedAdSetId?: string;
49635
+ /**
49636
+ * Platform IDs of the copied ads
49637
+ */
49638
+ copiedAdIds?: Array<(string)>;
49639
+ /**
49640
+ * Meta only: source ad ID to copied ad ID. Empty when `deepCopy` is false.
49641
+ */
49642
+ adIdMap?: {
49643
+ [key: string]: (string);
49644
+ };
49623
49645
  discovery?: 'triggered' | 'skipped' | 'failed';
49624
49646
  /**
49625
- * Meta's native copy response (includes ad_object_ids for child copies)
49647
+ * Platform-native response from the copy (TikTok). Absent on Meta, which returns `adIdMap` instead.
49626
49648
  */
49627
49649
  raw?: {
49628
49650
  [key: string]: unknown;
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.1380",
39
+ version: "0.2.1381",
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.1380",
8
+ version: "0.2.1381",
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.1380",
3
+ "version": "0.2.1381",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -11783,7 +11783,14 @@ export const bulkUpdateAdCampaignStatus = <ThrowOnError extends boolean = false>
11783
11783
  * so callers can review before launching.
11784
11784
  *
11785
11785
  * Per-platform implementation:
11786
- * - **Meta** uses the native `POST /{campaign-id}/copies` endpoint.
11786
+ * - **Meta** copies one level at a time with Meta's `/copies` endpoint:
11787
+ * the campaign, then each of its ad sets (DELETED and ARCHIVED ones
11788
+ * are skipped), then each ad of every ad set, so a campaign of any
11789
+ * size copies (Meta refuses a single deep copy of 3 or more objects).
11790
+ * `statusOption` applies at every level. If any child copy fails,
11791
+ * the partial copy is deleted and the request fails with Meta's error,
11792
+ * so a retry starts clean. Each copied object takes a few seconds,
11793
+ * so a large campaign takes minutes to answer.
11787
11794
  * - **TikTok** has no native copy primitive; Zernio walks the source
11788
11795
  * graph (`/v2/campaign/get/`, `/v2/adgroup/get/`, `/v2/ad/get/`) and
11789
11796
  * recreates each entity via the corresponding `/create/` endpoints,
@@ -12009,9 +12016,12 @@ export const createAdSet = <ThrowOnError extends boolean = false>(options: Optio
12009
12016
  * The copy is created paused so callers can review before launching.
12010
12017
  * `campaignId` retargets the copy into another campaign; omitted = the source's own campaign.
12011
12018
  *
12012
- * Meta: ads and creatives are included by default (`deepCopy: true`) via Meta's native
12013
- * `POST /{adset-id}/copies`; the new hierarchy materializes asynchronously and sync discovery
12014
- * is triggered automatically (`syncAfter: false` to skip).
12019
+ * Meta: ads and creatives are included by default (`deepCopy: true`). The ad set is copied
12020
+ * with Meta's `/copies` endpoint, then each of its ads (DELETED and ARCHIVED ones are skipped)
12021
+ * into the new ad set, so an ad set with any number of ads copies (Meta refuses a single deep
12022
+ * copy of 3 or more objects). `statusOption` applies to the ad set and every ad. If an ad copy
12023
+ * fails, the partial ad set copy is deleted and the request fails with Meta's error. Sync
12024
+ * discovery is triggered automatically (`syncAfter: false` to skip).
12015
12025
  *
12016
12026
  * TikTok: the ad group is read and recreated under the campaign with its targeting, bidding,
12017
12027
  * budget and schedule (start reset to now); `deepCopy: true` recreates its ads too (default
@@ -49836,9 +49836,21 @@ export type DuplicateAdCampaignResponse = ({
49836
49836
  * Platform ID of the new campaign
49837
49837
  */
49838
49838
  copiedCampaignId?: string;
49839
+ /**
49840
+ * Meta only: source ad set ID to copied ad set ID. Empty when `deepCopy` is false.
49841
+ */
49842
+ adSetIdMap?: {
49843
+ [key: string]: (string);
49844
+ };
49845
+ /**
49846
+ * Meta only: source ad ID to copied ad ID, across every copied ad set. Empty when `deepCopy` is false.
49847
+ */
49848
+ adIdMap?: {
49849
+ [key: string]: (string);
49850
+ };
49839
49851
  discovery?: 'triggered' | 'skipped' | 'failed';
49840
49852
  /**
49841
- * Platform-native response from the copy endpoint (Meta includes ad_object_ids for child copies)
49853
+ * Platform-native response from the copy (TikTok and LinkedIn). Absent on Meta, which returns `adSetIdMap` and `adIdMap` instead.
49842
49854
  */
49843
49855
  raw?: {
49844
49856
  [key: string]: unknown;
@@ -50404,9 +50416,19 @@ export type DuplicateAdSetResponse = ({
50404
50416
  * Platform ID of the new ad set
50405
50417
  */
50406
50418
  copiedAdSetId?: string;
50419
+ /**
50420
+ * Platform IDs of the copied ads
50421
+ */
50422
+ copiedAdIds?: Array<(string)>;
50423
+ /**
50424
+ * Meta only: source ad ID to copied ad ID. Empty when `deepCopy` is false.
50425
+ */
50426
+ adIdMap?: {
50427
+ [key: string]: (string);
50428
+ };
50407
50429
  discovery?: 'triggered' | 'skipped' | 'failed';
50408
50430
  /**
50409
- * Meta's native copy response (includes ad_object_ids for child copies)
50431
+ * Platform-native response from the copy (TikTok). Absent on Meta, which returns `adIdMap` instead.
50410
50432
  */
50411
50433
  raw?: {
50412
50434
  [key: string]: unknown;