@zernio/node 0.2.580 → 0.2.581
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 +45 -7
- package/dist/index.d.ts +45 -7
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +31 -2
- package/src/generated/types.gen.ts +45 -7
package/dist/index.d.mts
CHANGED
|
@@ -27453,18 +27453,21 @@ type UpdateAdCampaignStatusData = {
|
|
|
27453
27453
|
};
|
|
27454
27454
|
type UpdateAdCampaignStatusResponse = ({
|
|
27455
27455
|
/**
|
|
27456
|
-
*
|
|
27456
|
+
* The status written to the campaign
|
|
27457
|
+
*/
|
|
27458
|
+
status?: 'active' | 'paused';
|
|
27459
|
+
/**
|
|
27460
|
+
* Number of ads whose own stored status changed too. 0 is normal on a resume whose ads are all awaiting the platform.
|
|
27457
27461
|
*/
|
|
27458
27462
|
updated?: number;
|
|
27459
27463
|
/**
|
|
27460
|
-
* Number of ads
|
|
27464
|
+
* Number of ads whose own status was left as it was
|
|
27461
27465
|
*/
|
|
27462
27466
|
skipped?: number;
|
|
27463
|
-
skippedReasons?: Array<(string)>;
|
|
27464
27467
|
/**
|
|
27465
|
-
*
|
|
27468
|
+
* Why each group of ads was skipped
|
|
27466
27469
|
*/
|
|
27467
|
-
|
|
27470
|
+
skippedReasons?: Array<(string)>;
|
|
27468
27471
|
});
|
|
27469
27472
|
type UpdateAdCampaignStatusError = (unknown | {
|
|
27470
27473
|
error?: string;
|
|
@@ -27774,7 +27777,7 @@ type UpdateAdSetData = {
|
|
|
27774
27777
|
type?: 'daily' | 'lifetime';
|
|
27775
27778
|
};
|
|
27776
27779
|
/**
|
|
27777
|
-
* Omit if not toggling delivery state
|
|
27780
|
+
* Writes the ad set's own on/off switch (Meta: `configured_status`) on Meta and LinkedIn, whatever delivery status its ads report. Omit if not toggling delivery state.
|
|
27778
27781
|
*/
|
|
27779
27782
|
status?: 'active' | 'paused';
|
|
27780
27783
|
/**
|
|
@@ -27879,9 +27882,26 @@ type UpdateAdSetData = {
|
|
|
27879
27882
|
type UpdateAdSetResponse = ({
|
|
27880
27883
|
budget?: AdBudget;
|
|
27881
27884
|
budgetLevel?: 'adset';
|
|
27885
|
+
/**
|
|
27886
|
+
* The status written to the ad set. Absent when nothing was written (see statusMessage).
|
|
27887
|
+
*/
|
|
27882
27888
|
status?: 'active' | 'paused';
|
|
27889
|
+
/**
|
|
27890
|
+
* Number of ads whose own stored status changed alongside the ad set switch
|
|
27891
|
+
*/
|
|
27883
27892
|
statusUpdated?: number;
|
|
27893
|
+
/**
|
|
27894
|
+
* Number of ads whose own status was left as it was
|
|
27895
|
+
*/
|
|
27884
27896
|
statusSkipped?: number;
|
|
27897
|
+
/**
|
|
27898
|
+
* Why each group of ads was skipped
|
|
27899
|
+
*/
|
|
27900
|
+
statusSkippedReasons?: Array<(string)>;
|
|
27901
|
+
/**
|
|
27902
|
+
* Present only where the platform has no ad-set switch and no child ad was actionable; `status` is then absent because nothing was written
|
|
27903
|
+
*/
|
|
27904
|
+
statusMessage?: string;
|
|
27885
27905
|
bidStrategy?: BidStrategy;
|
|
27886
27906
|
bidAmount?: (number) | null;
|
|
27887
27907
|
roasAverageFloor?: (number) | null;
|
|
@@ -27905,8 +27925,26 @@ type UpdateAdSetStatusData = {
|
|
|
27905
27925
|
};
|
|
27906
27926
|
};
|
|
27907
27927
|
type UpdateAdSetStatusResponse = ({
|
|
27928
|
+
/**
|
|
27929
|
+
* The status written to the ad set. Absent when nothing was written (see message).
|
|
27930
|
+
*/
|
|
27931
|
+
status?: 'active' | 'paused';
|
|
27932
|
+
/**
|
|
27933
|
+
* Number of ads whose own stored status changed too. 0 is normal on a resume whose ads are all awaiting the platform.
|
|
27934
|
+
*/
|
|
27908
27935
|
updated?: number;
|
|
27936
|
+
/**
|
|
27937
|
+
* Number of ads whose own status was left as it was
|
|
27938
|
+
*/
|
|
27909
27939
|
skipped?: number;
|
|
27940
|
+
/**
|
|
27941
|
+
* Why each group of ads was skipped
|
|
27942
|
+
*/
|
|
27943
|
+
skippedReasons?: Array<(string)>;
|
|
27944
|
+
/**
|
|
27945
|
+
* Present only where the platform has no ad-set switch and no child ad was actionable
|
|
27946
|
+
*/
|
|
27947
|
+
message?: string;
|
|
27910
27948
|
});
|
|
27911
27949
|
type UpdateAdSetStatusError = (unknown | {
|
|
27912
27950
|
error?: string;
|
|
@@ -30031,7 +30069,7 @@ type CreateStandaloneAdData = {
|
|
|
30031
30069
|
*/
|
|
30032
30070
|
budgetType?: 'daily' | 'lifetime';
|
|
30033
30071
|
/**
|
|
30034
|
-
* Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused
|
|
30072
|
+
* Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused so you can review before they spend. On Meta the pause is held on the campaign this call creates, leaving the ad set and ad switched on, so a single PUT /v1/ads/campaigns/{campaignId}/status with `active` brings the whole thing live. It is held at every level instead when the pause cannot rely on the campaign: `existingCampaignId` (that campaign may be running and is never touched) or `campaignStatus: ACTIVE`. On TikTok the whole campaign > ad group > ad hierarchy stays paused.
|
|
30035
30073
|
*/
|
|
30036
30074
|
status?: 'ACTIVE' | 'PAUSED';
|
|
30037
30075
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -27453,18 +27453,21 @@ type UpdateAdCampaignStatusData = {
|
|
|
27453
27453
|
};
|
|
27454
27454
|
type UpdateAdCampaignStatusResponse = ({
|
|
27455
27455
|
/**
|
|
27456
|
-
*
|
|
27456
|
+
* The status written to the campaign
|
|
27457
|
+
*/
|
|
27458
|
+
status?: 'active' | 'paused';
|
|
27459
|
+
/**
|
|
27460
|
+
* Number of ads whose own stored status changed too. 0 is normal on a resume whose ads are all awaiting the platform.
|
|
27457
27461
|
*/
|
|
27458
27462
|
updated?: number;
|
|
27459
27463
|
/**
|
|
27460
|
-
* Number of ads
|
|
27464
|
+
* Number of ads whose own status was left as it was
|
|
27461
27465
|
*/
|
|
27462
27466
|
skipped?: number;
|
|
27463
|
-
skippedReasons?: Array<(string)>;
|
|
27464
27467
|
/**
|
|
27465
|
-
*
|
|
27468
|
+
* Why each group of ads was skipped
|
|
27466
27469
|
*/
|
|
27467
|
-
|
|
27470
|
+
skippedReasons?: Array<(string)>;
|
|
27468
27471
|
});
|
|
27469
27472
|
type UpdateAdCampaignStatusError = (unknown | {
|
|
27470
27473
|
error?: string;
|
|
@@ -27774,7 +27777,7 @@ type UpdateAdSetData = {
|
|
|
27774
27777
|
type?: 'daily' | 'lifetime';
|
|
27775
27778
|
};
|
|
27776
27779
|
/**
|
|
27777
|
-
* Omit if not toggling delivery state
|
|
27780
|
+
* Writes the ad set's own on/off switch (Meta: `configured_status`) on Meta and LinkedIn, whatever delivery status its ads report. Omit if not toggling delivery state.
|
|
27778
27781
|
*/
|
|
27779
27782
|
status?: 'active' | 'paused';
|
|
27780
27783
|
/**
|
|
@@ -27879,9 +27882,26 @@ type UpdateAdSetData = {
|
|
|
27879
27882
|
type UpdateAdSetResponse = ({
|
|
27880
27883
|
budget?: AdBudget;
|
|
27881
27884
|
budgetLevel?: 'adset';
|
|
27885
|
+
/**
|
|
27886
|
+
* The status written to the ad set. Absent when nothing was written (see statusMessage).
|
|
27887
|
+
*/
|
|
27882
27888
|
status?: 'active' | 'paused';
|
|
27889
|
+
/**
|
|
27890
|
+
* Number of ads whose own stored status changed alongside the ad set switch
|
|
27891
|
+
*/
|
|
27883
27892
|
statusUpdated?: number;
|
|
27893
|
+
/**
|
|
27894
|
+
* Number of ads whose own status was left as it was
|
|
27895
|
+
*/
|
|
27884
27896
|
statusSkipped?: number;
|
|
27897
|
+
/**
|
|
27898
|
+
* Why each group of ads was skipped
|
|
27899
|
+
*/
|
|
27900
|
+
statusSkippedReasons?: Array<(string)>;
|
|
27901
|
+
/**
|
|
27902
|
+
* Present only where the platform has no ad-set switch and no child ad was actionable; `status` is then absent because nothing was written
|
|
27903
|
+
*/
|
|
27904
|
+
statusMessage?: string;
|
|
27885
27905
|
bidStrategy?: BidStrategy;
|
|
27886
27906
|
bidAmount?: (number) | null;
|
|
27887
27907
|
roasAverageFloor?: (number) | null;
|
|
@@ -27905,8 +27925,26 @@ type UpdateAdSetStatusData = {
|
|
|
27905
27925
|
};
|
|
27906
27926
|
};
|
|
27907
27927
|
type UpdateAdSetStatusResponse = ({
|
|
27928
|
+
/**
|
|
27929
|
+
* The status written to the ad set. Absent when nothing was written (see message).
|
|
27930
|
+
*/
|
|
27931
|
+
status?: 'active' | 'paused';
|
|
27932
|
+
/**
|
|
27933
|
+
* Number of ads whose own stored status changed too. 0 is normal on a resume whose ads are all awaiting the platform.
|
|
27934
|
+
*/
|
|
27908
27935
|
updated?: number;
|
|
27936
|
+
/**
|
|
27937
|
+
* Number of ads whose own status was left as it was
|
|
27938
|
+
*/
|
|
27909
27939
|
skipped?: number;
|
|
27940
|
+
/**
|
|
27941
|
+
* Why each group of ads was skipped
|
|
27942
|
+
*/
|
|
27943
|
+
skippedReasons?: Array<(string)>;
|
|
27944
|
+
/**
|
|
27945
|
+
* Present only where the platform has no ad-set switch and no child ad was actionable
|
|
27946
|
+
*/
|
|
27947
|
+
message?: string;
|
|
27910
27948
|
});
|
|
27911
27949
|
type UpdateAdSetStatusError = (unknown | {
|
|
27912
27950
|
error?: string;
|
|
@@ -30031,7 +30069,7 @@ type CreateStandaloneAdData = {
|
|
|
30031
30069
|
*/
|
|
30032
30070
|
budgetType?: 'daily' | 'lifetime';
|
|
30033
30071
|
/**
|
|
30034
|
-
* Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused
|
|
30072
|
+
* Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused so you can review before they spend. On Meta the pause is held on the campaign this call creates, leaving the ad set and ad switched on, so a single PUT /v1/ads/campaigns/{campaignId}/status with `active` brings the whole thing live. It is held at every level instead when the pause cannot rely on the campaign: `existingCampaignId` (that campaign may be running and is never touched) or `campaignStatus: ACTIVE`. On TikTok the whole campaign > ad group > ad hierarchy stays paused.
|
|
30035
30073
|
*/
|
|
30036
30074
|
status?: 'ACTIVE' | 'PAUSED';
|
|
30037
30075
|
/**
|
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.581",
|
|
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.581",
|
|
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
|
@@ -7109,8 +7109,20 @@ export const createAdCampaign = <ThrowOnError extends boolean = false>(options:
|
|
|
7109
7109
|
|
|
7110
7110
|
/**
|
|
7111
7111
|
* Pause or resume a campaign
|
|
7112
|
-
*
|
|
7113
|
-
*
|
|
7112
|
+
* Writes the campaign's own on/off switch, then lets the platform cascade delivery to its ad sets and ads.
|
|
7113
|
+
* Makes one platform API call, not one per ad.
|
|
7114
|
+
*
|
|
7115
|
+
* The switch is always written, whatever delivery status the ads underneath report: an ad still in review
|
|
7116
|
+
* does not block resuming its campaign. The echoed `status` is the confirmation that it landed.
|
|
7117
|
+
*
|
|
7118
|
+
* `updated` / `skipped` describe only the ads whose own stored status CHANGED alongside it, so
|
|
7119
|
+
* `updated: 0` is a normal successful response, not a no-op. Ads are skipped when they are in a terminal
|
|
7120
|
+
* status (rejected, completed, cancelled), already in the target state, or switched on but not yet
|
|
7121
|
+
* delivering — the last group keeps its `pending_review` / `error` status until the platform reports what
|
|
7122
|
+
* it became. `skippedReasons` names which case applies.
|
|
7123
|
+
*
|
|
7124
|
+
* On Meta this flips the campaign only. An ad set paused in its own right stays paused, so pair this with
|
|
7125
|
+
* PUT /v1/ads/ad-sets/{adSetId}/status when you also need the ad set switched back on.
|
|
7114
7126
|
*
|
|
7115
7127
|
*/
|
|
7116
7128
|
export const updateAdCampaignStatus = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAdCampaignStatusData, ThrowOnError>) => {
|
|
@@ -7328,6 +7340,23 @@ export const updateAdSet = <ThrowOnError extends boolean = false>(options: Optio
|
|
|
7328
7340
|
* status toggle and prefer a symmetric URL to
|
|
7329
7341
|
* /v1/ads/campaigns/{campaignId}/status.
|
|
7330
7342
|
*
|
|
7343
|
+
* On Meta and LinkedIn this writes the ad set's own on/off switch
|
|
7344
|
+
* (Meta: `configured_status`), whatever delivery status its ads report —
|
|
7345
|
+
* an ad still in review does not block resuming its ad set. The echoed
|
|
7346
|
+
* `status` is the confirmation that it landed. Where the platform has no
|
|
7347
|
+
* ad-set switch (TikTok and others) the toggle is emulated by flipping the
|
|
7348
|
+
* child ads; a call with no actionable ad then writes nothing and returns a
|
|
7349
|
+
* `message` with no `status`.
|
|
7350
|
+
*
|
|
7351
|
+
* `updated` / `skipped` describe only the ads whose own stored status
|
|
7352
|
+
* CHANGED alongside the switch, so `updated: 0` is a normal successful
|
|
7353
|
+
* response. See `skippedReasons` for which of the three cases applies
|
|
7354
|
+
* (terminal, already in the target state, or switched on but not yet
|
|
7355
|
+
* delivering).
|
|
7356
|
+
*
|
|
7357
|
+
* A campaign created paused needs its campaign resumed as well: pair this
|
|
7358
|
+
* with PUT /v1/ads/campaigns/{campaignId}/status.
|
|
7359
|
+
*
|
|
7331
7360
|
*/
|
|
7332
7361
|
export const updateAdSetStatus = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAdSetStatusData, ThrowOnError>) => {
|
|
7333
7362
|
return (options?.client ?? client).put<UpdateAdSetStatusResponse, UpdateAdSetStatusError, ThrowOnError>({
|
|
@@ -27826,18 +27826,21 @@ export type UpdateAdCampaignStatusData = {
|
|
|
27826
27826
|
|
|
27827
27827
|
export type UpdateAdCampaignStatusResponse = ({
|
|
27828
27828
|
/**
|
|
27829
|
-
*
|
|
27829
|
+
* The status written to the campaign
|
|
27830
|
+
*/
|
|
27831
|
+
status?: 'active' | 'paused';
|
|
27832
|
+
/**
|
|
27833
|
+
* Number of ads whose own stored status changed too. 0 is normal on a resume whose ads are all awaiting the platform.
|
|
27830
27834
|
*/
|
|
27831
27835
|
updated?: number;
|
|
27832
27836
|
/**
|
|
27833
|
-
* Number of ads
|
|
27837
|
+
* Number of ads whose own status was left as it was
|
|
27834
27838
|
*/
|
|
27835
27839
|
skipped?: number;
|
|
27836
|
-
skippedReasons?: Array<(string)>;
|
|
27837
27840
|
/**
|
|
27838
|
-
*
|
|
27841
|
+
* Why each group of ads was skipped
|
|
27839
27842
|
*/
|
|
27840
|
-
|
|
27843
|
+
skippedReasons?: Array<(string)>;
|
|
27841
27844
|
});
|
|
27842
27845
|
|
|
27843
27846
|
export type UpdateAdCampaignStatusError = (unknown | {
|
|
@@ -28170,7 +28173,7 @@ export type UpdateAdSetData = {
|
|
|
28170
28173
|
type?: 'daily' | 'lifetime';
|
|
28171
28174
|
};
|
|
28172
28175
|
/**
|
|
28173
|
-
* Omit if not toggling delivery state
|
|
28176
|
+
* Writes the ad set's own on/off switch (Meta: `configured_status`) on Meta and LinkedIn, whatever delivery status its ads report. Omit if not toggling delivery state.
|
|
28174
28177
|
*/
|
|
28175
28178
|
status?: 'active' | 'paused';
|
|
28176
28179
|
/**
|
|
@@ -28276,9 +28279,26 @@ export type UpdateAdSetData = {
|
|
|
28276
28279
|
export type UpdateAdSetResponse = ({
|
|
28277
28280
|
budget?: AdBudget;
|
|
28278
28281
|
budgetLevel?: 'adset';
|
|
28282
|
+
/**
|
|
28283
|
+
* The status written to the ad set. Absent when nothing was written (see statusMessage).
|
|
28284
|
+
*/
|
|
28279
28285
|
status?: 'active' | 'paused';
|
|
28286
|
+
/**
|
|
28287
|
+
* Number of ads whose own stored status changed alongside the ad set switch
|
|
28288
|
+
*/
|
|
28280
28289
|
statusUpdated?: number;
|
|
28290
|
+
/**
|
|
28291
|
+
* Number of ads whose own status was left as it was
|
|
28292
|
+
*/
|
|
28281
28293
|
statusSkipped?: number;
|
|
28294
|
+
/**
|
|
28295
|
+
* Why each group of ads was skipped
|
|
28296
|
+
*/
|
|
28297
|
+
statusSkippedReasons?: Array<(string)>;
|
|
28298
|
+
/**
|
|
28299
|
+
* Present only where the platform has no ad-set switch and no child ad was actionable; `status` is then absent because nothing was written
|
|
28300
|
+
*/
|
|
28301
|
+
statusMessage?: string;
|
|
28282
28302
|
bidStrategy?: BidStrategy;
|
|
28283
28303
|
bidAmount?: (number) | null;
|
|
28284
28304
|
roasAverageFloor?: (number) | null;
|
|
@@ -28305,8 +28325,26 @@ export type UpdateAdSetStatusData = {
|
|
|
28305
28325
|
};
|
|
28306
28326
|
|
|
28307
28327
|
export type UpdateAdSetStatusResponse = ({
|
|
28328
|
+
/**
|
|
28329
|
+
* The status written to the ad set. Absent when nothing was written (see message).
|
|
28330
|
+
*/
|
|
28331
|
+
status?: 'active' | 'paused';
|
|
28332
|
+
/**
|
|
28333
|
+
* Number of ads whose own stored status changed too. 0 is normal on a resume whose ads are all awaiting the platform.
|
|
28334
|
+
*/
|
|
28308
28335
|
updated?: number;
|
|
28336
|
+
/**
|
|
28337
|
+
* Number of ads whose own status was left as it was
|
|
28338
|
+
*/
|
|
28309
28339
|
skipped?: number;
|
|
28340
|
+
/**
|
|
28341
|
+
* Why each group of ads was skipped
|
|
28342
|
+
*/
|
|
28343
|
+
skippedReasons?: Array<(string)>;
|
|
28344
|
+
/**
|
|
28345
|
+
* Present only where the platform has no ad-set switch and no child ad was actionable
|
|
28346
|
+
*/
|
|
28347
|
+
message?: string;
|
|
28310
28348
|
});
|
|
28311
28349
|
|
|
28312
28350
|
export type UpdateAdSetStatusError = (unknown | {
|
|
@@ -30568,7 +30606,7 @@ export type CreateStandaloneAdData = {
|
|
|
30568
30606
|
*/
|
|
30569
30607
|
budgetType?: 'daily' | 'lifetime';
|
|
30570
30608
|
/**
|
|
30571
|
-
* Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused
|
|
30609
|
+
* Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused so you can review before they spend. On Meta the pause is held on the campaign this call creates, leaving the ad set and ad switched on, so a single PUT /v1/ads/campaigns/{campaignId}/status with `active` brings the whole thing live. It is held at every level instead when the pause cannot rely on the campaign: `existingCampaignId` (that campaign may be running and is never touched) or `campaignStatus: ACTIVE`. On TikTok the whole campaign > ad group > ad hierarchy stays paused.
|
|
30572
30610
|
*/
|
|
30573
30611
|
status?: 'ACTIVE' | 'PAUSED';
|
|
30574
30612
|
/**
|