@getlatedev/node 0.2.1218 → 0.2.1220

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
@@ -42272,6 +42272,44 @@ type UpdateAdSetData = {
42272
42272
  */
42273
42273
  interestsBehaviors?: boolean;
42274
42274
  };
42275
+ /**
42276
+ * Meta only (400 elsewhere). Manual placements, same object and enums as `placements` on
42277
+ * POST /v1/ads/create. Sending an object REPLACES the ad set's current placement set
42278
+ * (`publisher_platforms`, every `*_positions` list and `device_platforms`); a position
42279
+ * list you leave out is removed. `null` removes every placement key so Meta returns to
42280
+ * automatic (Advantage+) placements. Omit to leave placements untouched. Meta enforces
42281
+ * co-selection rules (e.g. a position needs its publisher platform) and its error is
42282
+ * returned as is. Meta may also reject `null` or a narrower set when an ad's creative
42283
+ * uses per-placement asset customization (`placementAssets`). An object with no
42284
+ * non-empty list is a 400 (send `null` instead). Cannot be combined with
42285
+ * `targeting.placements` (400).
42286
+ *
42287
+ */
42288
+ placements?: {
42289
+ publisherPlatforms?: Array<('facebook' | 'instagram' | 'threads' | 'messenger' | 'audience_network' | 'whatsapp')>;
42290
+ facebookPositions?: Array<('feed' | 'right_hand_column' | 'marketplace' | 'video_feeds' | 'story' | 'search' | 'instream_video' | 'facebook_reels' | 'facebook_reels_overlay' | 'profile_feed' | 'notification')>;
42291
+ instagramPositions?: Array<('stream' | 'story' | 'explore' | 'explore_home' | 'reels' | 'profile_feed' | 'ig_search' | 'profile_reels')>;
42292
+ messengerPositions?: Array<('messenger_home' | 'sponsored_messages' | 'story')>;
42293
+ audienceNetworkPositions?: Array<('classic' | 'rewarded_video')>;
42294
+ threadsPositions?: Array<('threads_stream')>;
42295
+ whatsappPositions?: Array<('status')>;
42296
+ devicePlatforms?: Array<('mobile' | 'desktop')>;
42297
+ } | null;
42298
+ /**
42299
+ * Meta only (400 elsewhere). Targeting fields to change, same shape as the `targeting`
42300
+ * object on POST /v1/ads/create. Only the keys you send change: Zernio reads the ad set's
42301
+ * live targeting from Meta, merges these keys over it and writes the full spec back, so
42302
+ * everything you do not send (custom audiences, geo, age, interest groups,
42303
+ * `targeting_automation`) is kept. Setting any location replaces every location list.
42304
+ * An empty list or `gender: all` clears that key. `incomeTier` is resolved to Meta's
42305
+ * income segment first (422 when Meta has none). Fields Meta cannot target (LinkedIn
42306
+ * B2B, Google `devices`, Reddit communities and keywords) return 400 with
42307
+ * `param: targeting.<field>`. An empty object is a 400, and so is a
42308
+ * `targeting.placements` object with no non-empty list (`param: targeting.placements`). When the live targeting cannot be
42309
+ * read the request returns 502 and nothing is written.
42310
+ *
42311
+ */
42312
+ targeting?: (TargetingSpec);
42275
42313
  /**
42276
42314
  * Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when
42277
42315
  * bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP. Internally converted to Meta's
@@ -42407,6 +42445,12 @@ type UpdateAdSetResponse = ({
42407
42445
  platformSpecificData?: {
42408
42446
  [key: string]: unknown;
42409
42447
  };
42448
+ /**
42449
+ * Present when `placements` or `targeting` was sent. The ad set's full Meta targeting as written (Meta snake_case). The same snake_case object is stored as the ad set's and its ads' `targeting`.
42450
+ */
42451
+ targeting?: {
42452
+ [key: string]: unknown;
42453
+ };
42410
42454
  });
42411
42455
  type UpdateAdSetError = (unknown | ErrorResponse);
42412
42456
  type DeleteAdSetData = {
@@ -48182,10 +48226,16 @@ type CreateStandaloneAdData = {
48182
48226
  pageId?: string;
48183
48227
  /**
48184
48228
  * Meta only. Override the Instagram account the ad is delivered as. Pass an Instagram
48185
- * Business Account ID (e.g. 17841...), mapped to the creative's `instagram_user_id`.
48186
- * When omitted we use the Instagram actor Meta already runs the Page's other ads as,
48187
- * falling back to the Page's page-backed Instagram account. Useful when a Page has more
48188
- * than one eligible IG account.
48229
+ * Business Account ID (e.g. 17841...), mapped to the creative's `instagram_user_id`; it
48230
+ * is sent as-is and never replaced. When omitted we use the Instagram account linked to
48231
+ * the Page; formats that need an Instagram actor without one use the actor the Page's
48232
+ * other ads already run as, then the Page's page-backed Instagram account. If Meta
48233
+ * refuses that default because the ad account has no access to it (200/1815199), the
48234
+ * creative is retried once with an Instagram account the ad account is authorized for;
48235
+ * with none, the request fails with a 422 on `instagramAccountId` (list the usable
48236
+ * accounts with GET /v1/ads/instagram-accounts). A creative replaced later through
48237
+ * /v1/ads/{adId} follows the same rule. Useful when a Page has more than one eligible IG
48238
+ * account.
48189
48239
  *
48190
48240
  */
48191
48241
  instagramAccountId?: string;
package/dist/index.d.ts CHANGED
@@ -42272,6 +42272,44 @@ type UpdateAdSetData = {
42272
42272
  */
42273
42273
  interestsBehaviors?: boolean;
42274
42274
  };
42275
+ /**
42276
+ * Meta only (400 elsewhere). Manual placements, same object and enums as `placements` on
42277
+ * POST /v1/ads/create. Sending an object REPLACES the ad set's current placement set
42278
+ * (`publisher_platforms`, every `*_positions` list and `device_platforms`); a position
42279
+ * list you leave out is removed. `null` removes every placement key so Meta returns to
42280
+ * automatic (Advantage+) placements. Omit to leave placements untouched. Meta enforces
42281
+ * co-selection rules (e.g. a position needs its publisher platform) and its error is
42282
+ * returned as is. Meta may also reject `null` or a narrower set when an ad's creative
42283
+ * uses per-placement asset customization (`placementAssets`). An object with no
42284
+ * non-empty list is a 400 (send `null` instead). Cannot be combined with
42285
+ * `targeting.placements` (400).
42286
+ *
42287
+ */
42288
+ placements?: {
42289
+ publisherPlatforms?: Array<('facebook' | 'instagram' | 'threads' | 'messenger' | 'audience_network' | 'whatsapp')>;
42290
+ facebookPositions?: Array<('feed' | 'right_hand_column' | 'marketplace' | 'video_feeds' | 'story' | 'search' | 'instream_video' | 'facebook_reels' | 'facebook_reels_overlay' | 'profile_feed' | 'notification')>;
42291
+ instagramPositions?: Array<('stream' | 'story' | 'explore' | 'explore_home' | 'reels' | 'profile_feed' | 'ig_search' | 'profile_reels')>;
42292
+ messengerPositions?: Array<('messenger_home' | 'sponsored_messages' | 'story')>;
42293
+ audienceNetworkPositions?: Array<('classic' | 'rewarded_video')>;
42294
+ threadsPositions?: Array<('threads_stream')>;
42295
+ whatsappPositions?: Array<('status')>;
42296
+ devicePlatforms?: Array<('mobile' | 'desktop')>;
42297
+ } | null;
42298
+ /**
42299
+ * Meta only (400 elsewhere). Targeting fields to change, same shape as the `targeting`
42300
+ * object on POST /v1/ads/create. Only the keys you send change: Zernio reads the ad set's
42301
+ * live targeting from Meta, merges these keys over it and writes the full spec back, so
42302
+ * everything you do not send (custom audiences, geo, age, interest groups,
42303
+ * `targeting_automation`) is kept. Setting any location replaces every location list.
42304
+ * An empty list or `gender: all` clears that key. `incomeTier` is resolved to Meta's
42305
+ * income segment first (422 when Meta has none). Fields Meta cannot target (LinkedIn
42306
+ * B2B, Google `devices`, Reddit communities and keywords) return 400 with
42307
+ * `param: targeting.<field>`. An empty object is a 400, and so is a
42308
+ * `targeting.placements` object with no non-empty list (`param: targeting.placements`). When the live targeting cannot be
42309
+ * read the request returns 502 and nothing is written.
42310
+ *
42311
+ */
42312
+ targeting?: (TargetingSpec);
42275
42313
  /**
42276
42314
  * Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when
42277
42315
  * bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP. Internally converted to Meta's
@@ -42407,6 +42445,12 @@ type UpdateAdSetResponse = ({
42407
42445
  platformSpecificData?: {
42408
42446
  [key: string]: unknown;
42409
42447
  };
42448
+ /**
42449
+ * Present when `placements` or `targeting` was sent. The ad set's full Meta targeting as written (Meta snake_case). The same snake_case object is stored as the ad set's and its ads' `targeting`.
42450
+ */
42451
+ targeting?: {
42452
+ [key: string]: unknown;
42453
+ };
42410
42454
  });
42411
42455
  type UpdateAdSetError = (unknown | ErrorResponse);
42412
42456
  type DeleteAdSetData = {
@@ -48182,10 +48226,16 @@ type CreateStandaloneAdData = {
48182
48226
  pageId?: string;
48183
48227
  /**
48184
48228
  * Meta only. Override the Instagram account the ad is delivered as. Pass an Instagram
48185
- * Business Account ID (e.g. 17841...), mapped to the creative's `instagram_user_id`.
48186
- * When omitted we use the Instagram actor Meta already runs the Page's other ads as,
48187
- * falling back to the Page's page-backed Instagram account. Useful when a Page has more
48188
- * than one eligible IG account.
48229
+ * Business Account ID (e.g. 17841...), mapped to the creative's `instagram_user_id`; it
48230
+ * is sent as-is and never replaced. When omitted we use the Instagram account linked to
48231
+ * the Page; formats that need an Instagram actor without one use the actor the Page's
48232
+ * other ads already run as, then the Page's page-backed Instagram account. If Meta
48233
+ * refuses that default because the ad account has no access to it (200/1815199), the
48234
+ * creative is retried once with an Instagram account the ad account is authorized for;
48235
+ * with none, the request fails with a 422 on `instagramAccountId` (list the usable
48236
+ * accounts with GET /v1/ads/instagram-accounts). A creative replaced later through
48237
+ * /v1/ads/{adId} follows the same rule. Useful when a Page has more than one eligible IG
48238
+ * account.
48189
48239
  *
48190
48240
  */
48191
48241
  instagramAccountId?: string;
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
36
36
  // package.json
37
37
  var package_default = {
38
38
  name: "@getlatedev/node",
39
- version: "0.2.1218",
39
+ version: "0.2.1220",
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.1218",
8
+ version: "0.2.1220",
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.1218",
3
+ "version": "0.2.1220",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -10540,6 +10540,17 @@ export const getAdSetDetails = <ThrowOnError extends boolean = false>(options: O
10540
10540
  * theirs, and `statusUpdated` / `statusSkipped` report whether that switch
10541
10541
  * was written or a live read showed it already in place.
10542
10542
  *
10543
+ * Placements and targeting (Meta only): `placements` and `targeting` take the same shapes
10544
+ * as POST /v1/ads/create. Meta replaces an ad set's targeting wholesale, so Zernio reads
10545
+ * the live targeting first, changes only what the request names and writes the merged
10546
+ * spec back: custom audiences, geo, age, interest groups and `targeting_automation` you do
10547
+ * not send are kept. `placements` replaces the whole placement set, `placements: null`
10548
+ * returns the ad set to automatic placements, and omitting it leaves placements as they
10549
+ * are. Other platforms return 400 for either field before anything in the request is
10550
+ * written (use PUT /v1/ads/{adId} with `targeting` where that platform supports it). The
10551
+ * live read and the `incomeTier` lookup run before any other field is written, so a 502
10552
+ * or 422 from them leaves the ad set unchanged.
10553
+ *
10543
10554
  */
10544
10555
  export const updateAdSet = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAdSetData, ThrowOnError>) => {
10545
10556
  return (options?.client ?? client).put<UpdateAdSetResponse, UpdateAdSetError, ThrowOnError>({
@@ -42757,6 +42757,44 @@ export type UpdateAdSetData = {
42757
42757
  */
42758
42758
  interestsBehaviors?: boolean;
42759
42759
  };
42760
+ /**
42761
+ * Meta only (400 elsewhere). Manual placements, same object and enums as `placements` on
42762
+ * POST /v1/ads/create. Sending an object REPLACES the ad set's current placement set
42763
+ * (`publisher_platforms`, every `*_positions` list and `device_platforms`); a position
42764
+ * list you leave out is removed. `null` removes every placement key so Meta returns to
42765
+ * automatic (Advantage+) placements. Omit to leave placements untouched. Meta enforces
42766
+ * co-selection rules (e.g. a position needs its publisher platform) and its error is
42767
+ * returned as is. Meta may also reject `null` or a narrower set when an ad's creative
42768
+ * uses per-placement asset customization (`placementAssets`). An object with no
42769
+ * non-empty list is a 400 (send `null` instead). Cannot be combined with
42770
+ * `targeting.placements` (400).
42771
+ *
42772
+ */
42773
+ placements?: {
42774
+ publisherPlatforms?: Array<('facebook' | 'instagram' | 'threads' | 'messenger' | 'audience_network' | 'whatsapp')>;
42775
+ facebookPositions?: Array<('feed' | 'right_hand_column' | 'marketplace' | 'video_feeds' | 'story' | 'search' | 'instream_video' | 'facebook_reels' | 'facebook_reels_overlay' | 'profile_feed' | 'notification')>;
42776
+ instagramPositions?: Array<('stream' | 'story' | 'explore' | 'explore_home' | 'reels' | 'profile_feed' | 'ig_search' | 'profile_reels')>;
42777
+ messengerPositions?: Array<('messenger_home' | 'sponsored_messages' | 'story')>;
42778
+ audienceNetworkPositions?: Array<('classic' | 'rewarded_video')>;
42779
+ threadsPositions?: Array<('threads_stream')>;
42780
+ whatsappPositions?: Array<('status')>;
42781
+ devicePlatforms?: Array<('mobile' | 'desktop')>;
42782
+ } | null;
42783
+ /**
42784
+ * Meta only (400 elsewhere). Targeting fields to change, same shape as the `targeting`
42785
+ * object on POST /v1/ads/create. Only the keys you send change: Zernio reads the ad set's
42786
+ * live targeting from Meta, merges these keys over it and writes the full spec back, so
42787
+ * everything you do not send (custom audiences, geo, age, interest groups,
42788
+ * `targeting_automation`) is kept. Setting any location replaces every location list.
42789
+ * An empty list or `gender: all` clears that key. `incomeTier` is resolved to Meta's
42790
+ * income segment first (422 when Meta has none). Fields Meta cannot target (LinkedIn
42791
+ * B2B, Google `devices`, Reddit communities and keywords) return 400 with
42792
+ * `param: targeting.<field>`. An empty object is a 400, and so is a
42793
+ * `targeting.placements` object with no non-empty list (`param: targeting.placements`). When the live targeting cannot be
42794
+ * read the request returns 502 and nothing is written.
42795
+ *
42796
+ */
42797
+ targeting?: (TargetingSpec);
42760
42798
  /**
42761
42799
  * Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when
42762
42800
  * bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP. Internally converted to Meta's
@@ -42893,6 +42931,12 @@ export type UpdateAdSetResponse = ({
42893
42931
  platformSpecificData?: {
42894
42932
  [key: string]: unknown;
42895
42933
  };
42934
+ /**
42935
+ * Present when `placements` or `targeting` was sent. The ad set's full Meta targeting as written (Meta snake_case). The same snake_case object is stored as the ad set's and its ads' `targeting`.
42936
+ */
42937
+ targeting?: {
42938
+ [key: string]: unknown;
42939
+ };
42896
42940
  });
42897
42941
 
42898
42942
  export type UpdateAdSetError = (unknown | ErrorResponse);
@@ -49000,10 +49044,16 @@ export type CreateStandaloneAdData = {
49000
49044
  pageId?: string;
49001
49045
  /**
49002
49046
  * Meta only. Override the Instagram account the ad is delivered as. Pass an Instagram
49003
- * Business Account ID (e.g. 17841...), mapped to the creative's `instagram_user_id`.
49004
- * When omitted we use the Instagram actor Meta already runs the Page's other ads as,
49005
- * falling back to the Page's page-backed Instagram account. Useful when a Page has more
49006
- * than one eligible IG account.
49047
+ * Business Account ID (e.g. 17841...), mapped to the creative's `instagram_user_id`; it
49048
+ * is sent as-is and never replaced. When omitted we use the Instagram account linked to
49049
+ * the Page; formats that need an Instagram actor without one use the actor the Page's
49050
+ * other ads already run as, then the Page's page-backed Instagram account. If Meta
49051
+ * refuses that default because the ad account has no access to it (200/1815199), the
49052
+ * creative is retried once with an Instagram account the ad account is authorized for;
49053
+ * with none, the request fails with a 422 on `instagramAccountId` (list the usable
49054
+ * accounts with GET /v1/ads/instagram-accounts). A creative replaced later through
49055
+ * /v1/ads/{adId} follows the same rule. Useful when a Page has more than one eligible IG
49056
+ * account.
49007
49057
  *
49008
49058
  */
49009
49059
  instagramAccountId?: string;