@zernio/node 0.2.556 → 0.2.557

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
@@ -29374,6 +29374,12 @@ type BoostPostData = {
29374
29374
  */
29375
29375
  optimizationGoal?: string;
29376
29376
  };
29377
+ headers?: {
29378
+ /**
29379
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
29380
+ */
29381
+ 'Idempotency-Key'?: string;
29382
+ };
29377
29383
  };
29378
29384
  type BoostPostResponse = ({
29379
29385
  ad?: Ad;
package/dist/index.d.ts CHANGED
@@ -29374,6 +29374,12 @@ type BoostPostData = {
29374
29374
  */
29375
29375
  optimizationGoal?: string;
29376
29376
  };
29377
+ headers?: {
29378
+ /**
29379
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
29380
+ */
29381
+ 'Idempotency-Key'?: string;
29382
+ };
29377
29383
  };
29378
29384
  type BoostPostResponse = ({
29379
29385
  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.556",
39
+ version: "0.2.557",
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.556",
8
+ version: "0.2.557",
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.556",
3
+ "version": "0.2.557",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -8098,6 +8098,16 @@ export const getDsaRecommendations = <ThrowOnError extends boolean = false>(opti
8098
8098
  * `instagramAccountId`, `destinationType` and `adSetId` are Meta-only and
8099
8099
  * return 400 on other platforms.
8100
8100
  *
8101
+ * **Retries.** Boosts are NOT idempotent and can take minutes when Meta requires re-hosting an
8102
+ * Instagram video, so do not retry on client timeout. Send an
8103
+ * Idempotency-Key header to make retries safe: same key and body replays
8104
+ * the original 201, and distinct keys always create distinct ads.
8105
+ * Without the header, an identical request is treated as a retry: while
8106
+ * one is in flight it returns 409, and within 10 minutes of a completed
8107
+ * boost it returns the already-created ad instead of creating another.
8108
+ * To intentionally duplicate an ad, send distinct Idempotency-Keys (or
8109
+ * vary the body, e.g. the name).
8110
+ *
8101
8111
  */
8102
8112
  export const boostPost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<BoostPostData, ThrowOnError>) => {
8103
8113
  return (options?.client ?? client).post<BoostPostResponse, BoostPostError, ThrowOnError>({
@@ -29907,6 +29907,12 @@ export type BoostPostData = {
29907
29907
  */
29908
29908
  optimizationGoal?: string;
29909
29909
  };
29910
+ headers?: {
29911
+ /**
29912
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
29913
+ */
29914
+ 'Idempotency-Key'?: string;
29915
+ };
29910
29916
  };
29911
29917
 
29912
29918
  export type BoostPostResponse = ({