@getlatedev/node 0.2.1380 → 0.2.1382

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
@@ -31443,6 +31443,10 @@ type ConnectWhatsAppCredentialsData = {
31443
31443
  * The 6-digit two-step verification PIN set on the number. Required if you enabled two-step verification for it, otherwise Meta rejects the Cloud API registration with error 133005 and the number cannot send messages.
31444
31444
  */
31445
31445
  pin?: string;
31446
+ /**
31447
+ * Your own WhatsApp OAuth app (see /v1/connect/oauth-apps) holding the Meta app the access token belongs to. The WABA's webhooks then go to that app's own callback URL and every delivery is checked against its app secret. Without it, deliveries come to Zernio's shared Meta webhook.
31448
+ */
31449
+ oauthAppId?: string;
31446
31450
  };
31447
31451
  };
31448
31452
  type ConnectWhatsAppCredentialsResponse = ({
@@ -49067,9 +49071,21 @@ type DuplicateAdCampaignResponse = ({
49067
49071
  * Platform ID of the new campaign
49068
49072
  */
49069
49073
  copiedCampaignId?: string;
49074
+ /**
49075
+ * Meta only: source ad set ID to copied ad set ID. Empty when `deepCopy` is false.
49076
+ */
49077
+ adSetIdMap?: {
49078
+ [key: string]: (string);
49079
+ };
49080
+ /**
49081
+ * Meta only: source ad ID to copied ad ID, across every copied ad set. Empty when `deepCopy` is false.
49082
+ */
49083
+ adIdMap?: {
49084
+ [key: string]: (string);
49085
+ };
49070
49086
  discovery?: 'triggered' | 'skipped' | 'failed';
49071
49087
  /**
49072
- * Platform-native response from the copy endpoint (Meta includes ad_object_ids for child copies)
49088
+ * Platform-native response from the copy (TikTok and LinkedIn). Absent on Meta, which returns `adSetIdMap` and `adIdMap` instead.
49073
49089
  */
49074
49090
  raw?: {
49075
49091
  [key: string]: unknown;
@@ -49620,9 +49636,19 @@ type DuplicateAdSetResponse = ({
49620
49636
  * Platform ID of the new ad set
49621
49637
  */
49622
49638
  copiedAdSetId?: string;
49639
+ /**
49640
+ * Platform IDs of the copied ads
49641
+ */
49642
+ copiedAdIds?: Array<(string)>;
49643
+ /**
49644
+ * Meta only: source ad ID to copied ad ID. Empty when `deepCopy` is false.
49645
+ */
49646
+ adIdMap?: {
49647
+ [key: string]: (string);
49648
+ };
49623
49649
  discovery?: 'triggered' | 'skipped' | 'failed';
49624
49650
  /**
49625
- * Meta's native copy response (includes ad_object_ids for child copies)
49651
+ * Platform-native response from the copy (TikTok). Absent on Meta, which returns `adIdMap` instead.
49626
49652
  */
49627
49653
  raw?: {
49628
49654
  [key: string]: unknown;
package/dist/index.d.ts CHANGED
@@ -31443,6 +31443,10 @@ type ConnectWhatsAppCredentialsData = {
31443
31443
  * The 6-digit two-step verification PIN set on the number. Required if you enabled two-step verification for it, otherwise Meta rejects the Cloud API registration with error 133005 and the number cannot send messages.
31444
31444
  */
31445
31445
  pin?: string;
31446
+ /**
31447
+ * Your own WhatsApp OAuth app (see /v1/connect/oauth-apps) holding the Meta app the access token belongs to. The WABA's webhooks then go to that app's own callback URL and every delivery is checked against its app secret. Without it, deliveries come to Zernio's shared Meta webhook.
31448
+ */
31449
+ oauthAppId?: string;
31446
31450
  };
31447
31451
  };
31448
31452
  type ConnectWhatsAppCredentialsResponse = ({
@@ -49067,9 +49071,21 @@ type DuplicateAdCampaignResponse = ({
49067
49071
  * Platform ID of the new campaign
49068
49072
  */
49069
49073
  copiedCampaignId?: string;
49074
+ /**
49075
+ * Meta only: source ad set ID to copied ad set ID. Empty when `deepCopy` is false.
49076
+ */
49077
+ adSetIdMap?: {
49078
+ [key: string]: (string);
49079
+ };
49080
+ /**
49081
+ * Meta only: source ad ID to copied ad ID, across every copied ad set. Empty when `deepCopy` is false.
49082
+ */
49083
+ adIdMap?: {
49084
+ [key: string]: (string);
49085
+ };
49070
49086
  discovery?: 'triggered' | 'skipped' | 'failed';
49071
49087
  /**
49072
- * Platform-native response from the copy endpoint (Meta includes ad_object_ids for child copies)
49088
+ * Platform-native response from the copy (TikTok and LinkedIn). Absent on Meta, which returns `adSetIdMap` and `adIdMap` instead.
49073
49089
  */
49074
49090
  raw?: {
49075
49091
  [key: string]: unknown;
@@ -49620,9 +49636,19 @@ type DuplicateAdSetResponse = ({
49620
49636
  * Platform ID of the new ad set
49621
49637
  */
49622
49638
  copiedAdSetId?: string;
49639
+ /**
49640
+ * Platform IDs of the copied ads
49641
+ */
49642
+ copiedAdIds?: Array<(string)>;
49643
+ /**
49644
+ * Meta only: source ad ID to copied ad ID. Empty when `deepCopy` is false.
49645
+ */
49646
+ adIdMap?: {
49647
+ [key: string]: (string);
49648
+ };
49623
49649
  discovery?: 'triggered' | 'skipped' | 'failed';
49624
49650
  /**
49625
- * Meta's native copy response (includes ad_object_ids for child copies)
49651
+ * Platform-native response from the copy (TikTok). Absent on Meta, which returns `adIdMap` instead.
49626
49652
  */
49627
49653
  raw?: {
49628
49654
  [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.1382",
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.1382",
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.1382",
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
@@ -30684,6 +30684,10 @@ export type ConnectWhatsAppCredentialsData = {
30684
30684
  * The 6-digit two-step verification PIN set on the number. Required if you enabled two-step verification for it, otherwise Meta rejects the Cloud API registration with error 133005 and the number cannot send messages.
30685
30685
  */
30686
30686
  pin?: string;
30687
+ /**
30688
+ * Your own WhatsApp OAuth app (see /v1/connect/oauth-apps) holding the Meta app the access token belongs to. The WABA's webhooks then go to that app's own callback URL and every delivery is checked against its app secret. Without it, deliveries come to Zernio's shared Meta webhook.
30689
+ */
30690
+ oauthAppId?: string;
30687
30691
  };
30688
30692
  };
30689
30693
 
@@ -49836,9 +49840,21 @@ export type DuplicateAdCampaignResponse = ({
49836
49840
  * Platform ID of the new campaign
49837
49841
  */
49838
49842
  copiedCampaignId?: string;
49843
+ /**
49844
+ * Meta only: source ad set ID to copied ad set ID. Empty when `deepCopy` is false.
49845
+ */
49846
+ adSetIdMap?: {
49847
+ [key: string]: (string);
49848
+ };
49849
+ /**
49850
+ * Meta only: source ad ID to copied ad ID, across every copied ad set. Empty when `deepCopy` is false.
49851
+ */
49852
+ adIdMap?: {
49853
+ [key: string]: (string);
49854
+ };
49839
49855
  discovery?: 'triggered' | 'skipped' | 'failed';
49840
49856
  /**
49841
- * Platform-native response from the copy endpoint (Meta includes ad_object_ids for child copies)
49857
+ * Platform-native response from the copy (TikTok and LinkedIn). Absent on Meta, which returns `adSetIdMap` and `adIdMap` instead.
49842
49858
  */
49843
49859
  raw?: {
49844
49860
  [key: string]: unknown;
@@ -50404,9 +50420,19 @@ export type DuplicateAdSetResponse = ({
50404
50420
  * Platform ID of the new ad set
50405
50421
  */
50406
50422
  copiedAdSetId?: string;
50423
+ /**
50424
+ * Platform IDs of the copied ads
50425
+ */
50426
+ copiedAdIds?: Array<(string)>;
50427
+ /**
50428
+ * Meta only: source ad ID to copied ad ID. Empty when `deepCopy` is false.
50429
+ */
50430
+ adIdMap?: {
50431
+ [key: string]: (string);
50432
+ };
50407
50433
  discovery?: 'triggered' | 'skipped' | 'failed';
50408
50434
  /**
50409
- * Meta's native copy response (includes ad_object_ids for child copies)
50435
+ * Platform-native response from the copy (TikTok). Absent on Meta, which returns `adIdMap` instead.
50410
50436
  */
50411
50437
  raw?: {
50412
50438
  [key: string]: unknown;