@zernio/node 0.2.208 → 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 +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +2 -0
- package/src/generated/types.gen.ts +15 -0
package/dist/index.d.mts
CHANGED
|
@@ -992,6 +992,15 @@ type Ad = {
|
|
|
992
992
|
pinterestTitle?: string;
|
|
993
993
|
pinterestDescription?: string;
|
|
994
994
|
} | null;
|
|
995
|
+
/**
|
|
996
|
+
* The ad set's targeting (age, gender, geo, interests, placements, audience inclusions/exclusions).
|
|
997
|
+
* For ads created through Zernio this is the spec you supplied. For external ads (synced from
|
|
998
|
+
* Meta Ads Manager, `isExternal: true`) targeting lives at the ad set and isn't stored at ingest,
|
|
999
|
+
* so on the first `GET /v1/ads/{adId}` Zernio resolves it live from Meta and caches it on the ad;
|
|
1000
|
+
* the value is then Meta's raw `targeting` shape (snake_case, e.g. `geo_locations`, `age_min`),
|
|
1001
|
+
* the same object Ads Manager shows. May be absent if the ad set exposes no targeting or the lookup fails.
|
|
1002
|
+
*
|
|
1003
|
+
*/
|
|
995
1004
|
targeting?: {
|
|
996
1005
|
[key: string]: unknown;
|
|
997
1006
|
};
|
|
@@ -18340,6 +18349,12 @@ type CreateStandaloneAdData = {
|
|
|
18340
18349
|
productSetId?: string;
|
|
18341
18350
|
};
|
|
18342
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
|
+
};
|
|
18343
18358
|
};
|
|
18344
18359
|
type CreateStandaloneAdResponse = (({
|
|
18345
18360
|
ad?: Ad;
|
package/dist/index.d.ts
CHANGED
|
@@ -992,6 +992,15 @@ type Ad = {
|
|
|
992
992
|
pinterestTitle?: string;
|
|
993
993
|
pinterestDescription?: string;
|
|
994
994
|
} | null;
|
|
995
|
+
/**
|
|
996
|
+
* The ad set's targeting (age, gender, geo, interests, placements, audience inclusions/exclusions).
|
|
997
|
+
* For ads created through Zernio this is the spec you supplied. For external ads (synced from
|
|
998
|
+
* Meta Ads Manager, `isExternal: true`) targeting lives at the ad set and isn't stored at ingest,
|
|
999
|
+
* so on the first `GET /v1/ads/{adId}` Zernio resolves it live from Meta and caches it on the ad;
|
|
1000
|
+
* the value is then Meta's raw `targeting` shape (snake_case, e.g. `geo_locations`, `age_min`),
|
|
1001
|
+
* the same object Ads Manager shows. May be absent if the ad set exposes no targeting or the lookup fails.
|
|
1002
|
+
*
|
|
1003
|
+
*/
|
|
995
1004
|
targeting?: {
|
|
996
1005
|
[key: string]: unknown;
|
|
997
1006
|
};
|
|
@@ -18340,6 +18349,12 @@ type CreateStandaloneAdData = {
|
|
|
18340
18349
|
productSetId?: string;
|
|
18341
18350
|
};
|
|
18342
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
|
+
};
|
|
18343
18358
|
};
|
|
18344
18359
|
type CreateStandaloneAdResponse = (({
|
|
18345
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.
|
|
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.
|
|
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
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -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>({
|
|
@@ -260,6 +260,15 @@ export type Ad = {
|
|
|
260
260
|
pinterestTitle?: string;
|
|
261
261
|
pinterestDescription?: string;
|
|
262
262
|
} | null;
|
|
263
|
+
/**
|
|
264
|
+
* The ad set's targeting (age, gender, geo, interests, placements, audience inclusions/exclusions).
|
|
265
|
+
* For ads created through Zernio this is the spec you supplied. For external ads (synced from
|
|
266
|
+
* Meta Ads Manager, `isExternal: true`) targeting lives at the ad set and isn't stored at ingest,
|
|
267
|
+
* so on the first `GET /v1/ads/{adId}` Zernio resolves it live from Meta and caches it on the ad;
|
|
268
|
+
* the value is then Meta's raw `targeting` shape (snake_case, e.g. `geo_locations`, `age_min`),
|
|
269
|
+
* the same object Ads Manager shows. May be absent if the ad set exposes no targeting or the lookup fails.
|
|
270
|
+
*
|
|
271
|
+
*/
|
|
263
272
|
targeting?: {
|
|
264
273
|
[key: string]: unknown;
|
|
265
274
|
};
|
|
@@ -18805,6 +18814,12 @@ export type CreateStandaloneAdData = {
|
|
|
18805
18814
|
productSetId?: string;
|
|
18806
18815
|
};
|
|
18807
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
|
+
};
|
|
18808
18823
|
};
|
|
18809
18824
|
|
|
18810
18825
|
export type CreateStandaloneAdResponse = (({
|