@zernio/node 0.2.209 → 0.2.210

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
@@ -18349,6 +18349,12 @@ type CreateStandaloneAdData = {
18349
18349
  productSetId?: string;
18350
18350
  };
18351
18351
  };
18352
+ headers?: {
18353
+ /**
18354
+ * Optional client-generated unique key (e.g. a UUID) that makes create retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
18355
+ */
18356
+ 'Idempotency-Key'?: string;
18357
+ };
18352
18358
  };
18353
18359
  type CreateStandaloneAdResponse = (({
18354
18360
  ad?: Ad;
package/dist/index.d.ts CHANGED
@@ -18349,6 +18349,12 @@ type CreateStandaloneAdData = {
18349
18349
  productSetId?: string;
18350
18350
  };
18351
18351
  };
18352
+ headers?: {
18353
+ /**
18354
+ * Optional client-generated unique key (e.g. a UUID) that makes create retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
18355
+ */
18356
+ 'Idempotency-Key'?: string;
18357
+ };
18352
18358
  };
18353
18359
  type CreateStandaloneAdResponse = (({
18354
18360
  ad?: Ad;
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.209",
39
+ version: "0.2.210",
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.209",
8
+ version: "0.2.210",
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.209",
3
+ "version": "0.2.210",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -4584,6 +4584,8 @@ export const boostPost = <ThrowOnError extends boolean = false>(options: Options
4584
4584
  /**
4585
4585
  * Create standalone ad
4586
4586
  * Creates a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X/Twitter, and LinkedIn. Supports three mutually-exclusive request shapes selected by the body, a legacy single-creative shape (all platforms, default), a Meta-only multi-creative shape via the creatives array (one ad set with N ads sharing budget and targeting), and a Meta-only attach shape via adSetId (adds one new ad to an existing ad set). Per-platform required fields, budget minimums, and video-ad rules are documented on each property below. LinkedIn creates a Single Image or Single Video Ad backed by a Direct Sponsored Content "dark post" authored by a Company Page (see `organizationId`); supported goals are engagement, traffic, awareness, and video_views (video ads use the `video` field; video_views requires a video), and traffic ads require `linkUrl`.
4587
+ *
4588
+ * **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
4587
4589
  */
4588
4590
  export const createStandaloneAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateStandaloneAdData, ThrowOnError>) => {
4589
4591
  return (options?.client ?? client).post<CreateStandaloneAdResponse, CreateStandaloneAdError, ThrowOnError>({
@@ -18814,6 +18814,12 @@ export type CreateStandaloneAdData = {
18814
18814
  productSetId?: string;
18815
18815
  };
18816
18816
  };
18817
+ headers?: {
18818
+ /**
18819
+ * Optional client-generated unique key (e.g. a UUID) that makes create retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
18820
+ */
18821
+ 'Idempotency-Key'?: string;
18822
+ };
18817
18823
  };
18818
18824
 
18819
18825
  export type CreateStandaloneAdResponse = (({