@zernio/node 0.2.1505 → 0.2.1507
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 +50 -3
- package/dist/index.d.ts +50 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/types.gen.ts +50 -2
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.1507",
|
|
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.1507",
|
|
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
|
@@ -7292,6 +7292,13 @@ export type CreatorPortalSubmission = {
|
|
|
7292
7292
|
*
|
|
7293
7293
|
*/
|
|
7294
7294
|
export type CtwaAdRequestBody = {
|
|
7295
|
+
/**
|
|
7296
|
+
* When Meta answers a create with a 5xx and reading the parent back by name finds no such object, Zernio sends the create again (at most 3 POSTs per object, never for an object created ACTIVE) and reports it in `recoveredWrites`.
|
|
7297
|
+
*
|
|
7298
|
+
* `false` never sends it again: the request fails with 502 and `details.unconfirmedWrite`, so you can check the parent yourself. One object found by name is still reused.
|
|
7299
|
+
*
|
|
7300
|
+
*/
|
|
7301
|
+
retryOnServerError?: boolean;
|
|
7295
7302
|
/**
|
|
7296
7303
|
* Meta enhancement settings for single or attached ads, and defaults for creatives[]. An item replaces the entire map, including with an empty object.
|
|
7297
7304
|
*/
|
|
@@ -8024,6 +8031,7 @@ export type CtwaMultiResponse = {
|
|
|
8024
8031
|
platformCampaignId: string;
|
|
8025
8032
|
platformAdSetId: string;
|
|
8026
8033
|
message: string;
|
|
8034
|
+
recoveredWrites?: MetaRecoveredWrites;
|
|
8027
8035
|
/**
|
|
8028
8036
|
* Present when Meta created the ad set differently from the request:
|
|
8029
8037
|
*
|
|
@@ -8052,6 +8060,7 @@ export type CtwaSingleResponse = {
|
|
|
8052
8060
|
[key: string]: unknown;
|
|
8053
8061
|
};
|
|
8054
8062
|
message: string;
|
|
8063
|
+
recoveredWrites?: MetaRecoveredWrites;
|
|
8055
8064
|
/**
|
|
8056
8065
|
* Present when Meta created the ad set differently from the request:
|
|
8057
8066
|
*
|
|
@@ -8648,12 +8657,12 @@ export type ErrorResponse = {
|
|
|
8648
8657
|
*/
|
|
8649
8658
|
id?: string;
|
|
8650
8659
|
/**
|
|
8651
|
-
* `deleted`: Zernio deleted it. `left_behind`: cleanup could not delete it (Meta refused the delete, or the delete hit a network error), so it still exists. `kept`: deliberately not deleted
|
|
8660
|
+
* `deleted`: Zernio deleted it. `left_behind`: cleanup could not delete it (Meta refused the delete, or the delete hit a network error), so it still exists. `kept`: deliberately not deleted: an image (hashes are shared by every upload of the same file), or an object Zernio found by name after Meta lost its answer to the create, which may belong to another request with the same name.
|
|
8652
8661
|
*/
|
|
8653
8662
|
cleanup?: 'deleted' | 'left_behind' | 'kept';
|
|
8654
8663
|
}>;
|
|
8655
8664
|
/**
|
|
8656
|
-
* Meta ad create failures only, when Meta answered a create with a 5xx or dropped the connection and the
|
|
8665
|
+
* Meta ad create failures only, when Meta answered a create with a 5xx or a non-JSON body, or dropped the connection after the request was sent, and reading the parent back by name did not settle it: several objects of the same name, a parent that could not be read, or (after a dropped connection, a non-JSON body, or a 5xx with `retryOnServerError: false`) no such object. Zernio did not retry it.
|
|
8657
8666
|
*/
|
|
8658
8667
|
unconfirmedWrite?: {
|
|
8659
8668
|
type?: 'campaign' | 'adset' | 'creative' | 'ad';
|
|
@@ -12846,6 +12855,28 @@ export type MetaPromotion = {
|
|
|
12846
12855
|
[key: string]: unknown;
|
|
12847
12856
|
} | null;
|
|
12848
12857
|
|
|
12858
|
+
/**
|
|
12859
|
+
* Meta only, present only when needed. Every object this request did not get confirmed by its first POST: found by name after Meta lost or failed its answer (`adopted`), or created by a second POST after a Meta 5xx (`repostedAfter`).
|
|
12860
|
+
*
|
|
12861
|
+
* A re-POSTed object may have a twin from the first POST that Meta wrote late: check its parent for a duplicate name. Send `retryOnServerError: false` to never re-POST.
|
|
12862
|
+
*
|
|
12863
|
+
*/
|
|
12864
|
+
export type MetaRecoveredWrites = Array<{
|
|
12865
|
+
type: 'campaign' | 'adset' | 'ad';
|
|
12866
|
+
/**
|
|
12867
|
+
* The Meta object id this response uses.
|
|
12868
|
+
*/
|
|
12869
|
+
id: string;
|
|
12870
|
+
/**
|
|
12871
|
+
* Always true when present. Zernio found this object by name under its parent and reused it instead of creating it again.
|
|
12872
|
+
*/
|
|
12873
|
+
adopted?: boolean;
|
|
12874
|
+
/**
|
|
12875
|
+
* Zernio sent the create again after Meta answered a 5xx and the read-back found no such object.
|
|
12876
|
+
*/
|
|
12877
|
+
repostedAfter?: 'server_error';
|
|
12878
|
+
}>;
|
|
12879
|
+
|
|
12849
12880
|
export type Money = {
|
|
12850
12881
|
/**
|
|
12851
12882
|
* ISO 4217 currency code (e.g. USD, EUR)
|
|
@@ -60688,6 +60719,13 @@ export type BoostPostData = {
|
|
|
60688
60719
|
*
|
|
60689
60720
|
*/
|
|
60690
60721
|
bodies?: Array<(string)>;
|
|
60722
|
+
/**
|
|
60723
|
+
* Meta only (a 400 elsewhere). When Meta answers a create with a 5xx and reading the parent back by name finds no such object, Zernio sends the create again (at most 3 POSTs per object, never for an object created ACTIVE) and reports it in `recoveredWrites`.
|
|
60724
|
+
*
|
|
60725
|
+
* `false` never sends it again: the request fails with 502 and `details.unconfirmedWrite`, so you can check the parent yourself. One object found by name is still reused.
|
|
60726
|
+
*
|
|
60727
|
+
*/
|
|
60728
|
+
retryOnServerError?: boolean;
|
|
60691
60729
|
/**
|
|
60692
60730
|
* Meta only (a 400 elsewhere). Controls the fallback when Meta refuses an existing Instagram video as the ad (subcode 1815279).
|
|
60693
60731
|
*
|
|
@@ -60797,6 +60835,7 @@ export type BoostPostResponse = ({
|
|
|
60797
60835
|
ad?: Ad;
|
|
60798
60836
|
message?: string;
|
|
60799
60837
|
instagramVideoFallback?: InstagramVideoFallback;
|
|
60838
|
+
recoveredWrites?: MetaRecoveredWrites;
|
|
60800
60839
|
/**
|
|
60801
60840
|
* Human-readable notes about the boost.
|
|
60802
60841
|
*
|
|
@@ -61170,6 +61209,13 @@ export type CreateStandaloneAdData = {
|
|
|
61170
61209
|
*
|
|
61171
61210
|
*/
|
|
61172
61211
|
aiDisclosure?: 'OPT_IN' | 'OPT_OUT';
|
|
61212
|
+
/**
|
|
61213
|
+
* Meta only (a 400 elsewhere). When Meta answers a create with a 5xx and reading the parent back by name finds no such object, Zernio sends the create again (at most 3 POSTs per object, never for an object created ACTIVE) and reports it in `recoveredWrites`.
|
|
61214
|
+
*
|
|
61215
|
+
* `false` never sends it again: the request fails with 502 and `details.unconfirmedWrite`, so you can check the parent yourself. One object found by name is still reused.
|
|
61216
|
+
*
|
|
61217
|
+
*/
|
|
61218
|
+
retryOnServerError?: boolean;
|
|
61173
61219
|
/**
|
|
61174
61220
|
* Validate the request without creating anything. Supported on Meta, TikTok, ChatGPT (OpenAI) and Google Performance Max / Demand Gen. Any other platform, or a Google campaignType other than pmax or demand_gen, returns 501 `feature_not_available`.
|
|
61175
61221
|
*
|
|
@@ -62360,6 +62406,7 @@ export type CreateStandaloneAdResponse = ({
|
|
|
62360
62406
|
ad?: Ad;
|
|
62361
62407
|
appliedDefaults?: AdAppliedDefaults;
|
|
62362
62408
|
message?: string;
|
|
62409
|
+
recoveredWrites?: MetaRecoveredWrites;
|
|
62363
62410
|
/**
|
|
62364
62411
|
* Meta only, present only when needed.
|
|
62365
62412
|
*
|
|
@@ -62373,6 +62420,7 @@ export type CreateStandaloneAdResponse = ({
|
|
|
62373
62420
|
platformAdSetId?: string;
|
|
62374
62421
|
appliedDefaults?: AdAppliedDefaults;
|
|
62375
62422
|
message?: string;
|
|
62423
|
+
recoveredWrites?: MetaRecoveredWrites;
|
|
62376
62424
|
/**
|
|
62377
62425
|
* Meta only, present only when needed.
|
|
62378
62426
|
*
|