@zernio/node 0.2.762 → 0.2.763
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 +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +19 -5
- package/src/generated/types.gen.ts +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -32722,7 +32722,7 @@ type GetCampaignTargetingResponse = ({
|
|
|
32722
32722
|
device?: 'MOBILE' | 'DESKTOP' | 'TABLET' | 'CONNECTED_TV';
|
|
32723
32723
|
included?: boolean;
|
|
32724
32724
|
/**
|
|
32725
|
-
*
|
|
32725
|
+
* Google's bid adjustment for this device: null when it has none, 0 when the device is switched off, otherwise 0.1 to 10.
|
|
32726
32726
|
*/
|
|
32727
32727
|
bidModifier?: (number) | null;
|
|
32728
32728
|
}>;
|
|
@@ -33485,12 +33485,12 @@ type UpdateAdData = {
|
|
|
33485
33485
|
matchType?: 'exact' | 'phrase' | 'broad';
|
|
33486
33486
|
})>;
|
|
33487
33487
|
/**
|
|
33488
|
-
* Google only. The FULL new set of device
|
|
33488
|
+
* Google only. The FULL new set of device bid modifiers for the campaign. Entries are a device name alone (targeted, bid modifier reset to 1) or { device, bidModifier }. A supported device you leave out is switched off, written as a bid modifier of 0. Google never removes a device criterion, so an excluded device reads back as bidModifier 0 rather than disappearing, and a set that switches every device off returns 422. Which devices a campaign carries depends on its channel: Search campaigns have MOBILE, DESKTOP and TABLET, Display campaigns also have CONNECTED_TV, and sending a device the campaign does not carry returns 422.
|
|
33489
33489
|
*/
|
|
33490
33490
|
devices?: Array<('MOBILE' | 'DESKTOP' | 'TABLET' | 'CONNECTED_TV' | {
|
|
33491
33491
|
device: 'MOBILE' | 'DESKTOP' | 'TABLET' | 'CONNECTED_TV';
|
|
33492
33492
|
/**
|
|
33493
|
-
* Google device bid modifier
|
|
33493
|
+
* Google device bid modifier. 0 switches the device off (minus 100%); otherwise 0.1 to 10 (minus 90% to plus 900%). Google rejects any value between 0 and 0.1.
|
|
33494
33494
|
*/
|
|
33495
33495
|
bidModifier?: number;
|
|
33496
33496
|
})>;
|
|
@@ -36795,11 +36795,11 @@ type CreateStandaloneAdData = {
|
|
|
36795
36795
|
*/
|
|
36796
36796
|
budgetType?: 'daily' | 'lifetime';
|
|
36797
36797
|
/**
|
|
36798
|
-
* Google Performance Max accepts PAUSED only and always creates a paused campaign. Meta, TikTok, and LinkedIn: 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. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
36798
|
+
* Google Performance Max accepts PAUSED only and always creates a paused campaign. Google Search and Display, Meta, TikTok, and LinkedIn: 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`. Google Search and Display follow the same rule, and because Google keeps an independent switch at campaign, ad group and ad level, a PAUSED create leaves the campaign it creates PAUSED at Google. On TikTok the whole campaign > ad group > ad hierarchy stays paused. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
36799
36799
|
*/
|
|
36800
36800
|
status?: 'ACTIVE' | 'PAUSED';
|
|
36801
36801
|
/**
|
|
36802
|
-
* Meta
|
|
36802
|
+
* Meta and Google. Overrides `status` for the campaign level alone, so you can create a live campaign whose ad set and ad stay paused, or the reverse. Omitted, it follows `status`.
|
|
36803
36803
|
*/
|
|
36804
36804
|
campaignStatus?: 'ACTIVE' | 'PAUSED';
|
|
36805
36805
|
/**
|
|
@@ -37802,7 +37802,7 @@ type CreateStandaloneAdResponse = ({
|
|
|
37802
37802
|
node?: 'campaign' | 'adSet' | 'creative' | 'ad' | 'performanceMaxCampaign';
|
|
37803
37803
|
status?: 'validated' | 'skipped';
|
|
37804
37804
|
/**
|
|
37805
|
-
* Why the node could not be validated (
|
|
37805
|
+
* Why the node could not be validated (on skipped), or what the dry run could not check and what the request would do as sent (on validated). A Performance Max validation with no location targeting reports here that the campaign would run worldwide.
|
|
37806
37806
|
*/
|
|
37807
37807
|
reason?: string;
|
|
37808
37808
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -32722,7 +32722,7 @@ type GetCampaignTargetingResponse = ({
|
|
|
32722
32722
|
device?: 'MOBILE' | 'DESKTOP' | 'TABLET' | 'CONNECTED_TV';
|
|
32723
32723
|
included?: boolean;
|
|
32724
32724
|
/**
|
|
32725
|
-
*
|
|
32725
|
+
* Google's bid adjustment for this device: null when it has none, 0 when the device is switched off, otherwise 0.1 to 10.
|
|
32726
32726
|
*/
|
|
32727
32727
|
bidModifier?: (number) | null;
|
|
32728
32728
|
}>;
|
|
@@ -33485,12 +33485,12 @@ type UpdateAdData = {
|
|
|
33485
33485
|
matchType?: 'exact' | 'phrase' | 'broad';
|
|
33486
33486
|
})>;
|
|
33487
33487
|
/**
|
|
33488
|
-
* Google only. The FULL new set of device
|
|
33488
|
+
* Google only. The FULL new set of device bid modifiers for the campaign. Entries are a device name alone (targeted, bid modifier reset to 1) or { device, bidModifier }. A supported device you leave out is switched off, written as a bid modifier of 0. Google never removes a device criterion, so an excluded device reads back as bidModifier 0 rather than disappearing, and a set that switches every device off returns 422. Which devices a campaign carries depends on its channel: Search campaigns have MOBILE, DESKTOP and TABLET, Display campaigns also have CONNECTED_TV, and sending a device the campaign does not carry returns 422.
|
|
33489
33489
|
*/
|
|
33490
33490
|
devices?: Array<('MOBILE' | 'DESKTOP' | 'TABLET' | 'CONNECTED_TV' | {
|
|
33491
33491
|
device: 'MOBILE' | 'DESKTOP' | 'TABLET' | 'CONNECTED_TV';
|
|
33492
33492
|
/**
|
|
33493
|
-
* Google device bid modifier
|
|
33493
|
+
* Google device bid modifier. 0 switches the device off (minus 100%); otherwise 0.1 to 10 (minus 90% to plus 900%). Google rejects any value between 0 and 0.1.
|
|
33494
33494
|
*/
|
|
33495
33495
|
bidModifier?: number;
|
|
33496
33496
|
})>;
|
|
@@ -36795,11 +36795,11 @@ type CreateStandaloneAdData = {
|
|
|
36795
36795
|
*/
|
|
36796
36796
|
budgetType?: 'daily' | 'lifetime';
|
|
36797
36797
|
/**
|
|
36798
|
-
* Google Performance Max accepts PAUSED only and always creates a paused campaign. Meta, TikTok, and LinkedIn: 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. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
36798
|
+
* Google Performance Max accepts PAUSED only and always creates a paused campaign. Google Search and Display, Meta, TikTok, and LinkedIn: 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`. Google Search and Display follow the same rule, and because Google keeps an independent switch at campaign, ad group and ad level, a PAUSED create leaves the campaign it creates PAUSED at Google. On TikTok the whole campaign > ad group > ad hierarchy stays paused. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
36799
36799
|
*/
|
|
36800
36800
|
status?: 'ACTIVE' | 'PAUSED';
|
|
36801
36801
|
/**
|
|
36802
|
-
* Meta
|
|
36802
|
+
* Meta and Google. Overrides `status` for the campaign level alone, so you can create a live campaign whose ad set and ad stay paused, or the reverse. Omitted, it follows `status`.
|
|
36803
36803
|
*/
|
|
36804
36804
|
campaignStatus?: 'ACTIVE' | 'PAUSED';
|
|
36805
36805
|
/**
|
|
@@ -37802,7 +37802,7 @@ type CreateStandaloneAdResponse = ({
|
|
|
37802
37802
|
node?: 'campaign' | 'adSet' | 'creative' | 'ad' | 'performanceMaxCampaign';
|
|
37803
37803
|
status?: 'validated' | 'skipped';
|
|
37804
37804
|
/**
|
|
37805
|
-
* Why the node could not be validated (
|
|
37805
|
+
* Why the node could not be validated (on skipped), or what the dry run could not check and what the request would do as sent (on validated). A Performance Max validation with no location targeting reports here that the campaign would run worldwide.
|
|
37806
37806
|
*/
|
|
37807
37807
|
reason?: string;
|
|
37808
37808
|
}>;
|
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.763",
|
|
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.763",
|
|
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
|
@@ -8177,6 +8177,12 @@ export const createAdCampaign = <ThrowOnError extends boolean = false>(options:
|
|
|
8177
8177
|
* On Meta this flips the campaign only. An ad set paused in its own right stays paused, so pair this with
|
|
8178
8178
|
* PUT /v1/ads/ad-sets/{adSetId}/status when you also need the ad set switched back on.
|
|
8179
8179
|
*
|
|
8180
|
+
* Google keeps an independent on/off switch at campaign, ad group and ad level and the most restrictive
|
|
8181
|
+
* one wins, so `active` switches the campaign on TOGETHER with the ad groups and ads Zernio tracks under
|
|
8182
|
+
* it, in one mutate. Without that the campaign reads ENABLED while a paused ad group or ad keeps it from
|
|
8183
|
+
* serving. `paused` writes the campaign alone, which already stops delivery and leaves each ad's own
|
|
8184
|
+
* switch as you set it.
|
|
8185
|
+
*
|
|
8180
8186
|
*/
|
|
8181
8187
|
export const updateAdCampaignStatus = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAdCampaignStatusData, ThrowOnError>) => {
|
|
8182
8188
|
return (options?.client ?? client).put<UpdateAdCampaignStatusResponse, UpdateAdCampaignStatusError, ThrowOnError>({
|
|
@@ -8374,10 +8380,11 @@ export const duplicateAdCampaign = <ThrowOnError extends boolean = false>(option
|
|
|
8374
8380
|
* (10 minutes fresh, up to 7 days last-good), not always a live read. Google
|
|
8375
8381
|
* only; every other platform returns 501.
|
|
8376
8382
|
*
|
|
8377
|
-
* `devices`
|
|
8378
|
-
*
|
|
8379
|
-
*
|
|
8380
|
-
*
|
|
8383
|
+
* `devices` lists the device criteria the campaign carries, which depends on
|
|
8384
|
+
* its channel: Search campaigns have MOBILE, DESKTOP and TABLET, Display
|
|
8385
|
+
* campaigns also have CONNECTED_TV. `bidModifier` is Google's bid adjustment
|
|
8386
|
+
* for that device, `null` when it has none, and `0` when the device is
|
|
8387
|
+
* switched off; `included` is false for exactly that case.
|
|
8381
8388
|
*
|
|
8382
8389
|
*/
|
|
8383
8390
|
export const getCampaignTargeting = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetCampaignTargetingData, ThrowOnError>) => {
|
|
@@ -8396,6 +8403,11 @@ export const getCampaignTargeting = <ThrowOnError extends boolean = false>(optio
|
|
|
8396
8403
|
* out of the body are untouched. Google only; every other platform returns
|
|
8397
8404
|
* 501.
|
|
8398
8405
|
*
|
|
8406
|
+
* `devices` is the full set of device bid modifiers: a supported device you
|
|
8407
|
+
* leave out is switched off with a bid modifier of 0, since Google cannot
|
|
8408
|
+
* remove a device criterion. A device the campaign's channel does not carry,
|
|
8409
|
+
* and a set that switches every device off, both return 422.
|
|
8410
|
+
*
|
|
8399
8411
|
* `locations` accepts the same shapes as campaign creation: a bare array of
|
|
8400
8412
|
* ISO country codes, or an object with `countries`/`regions`/`cities`/`zips`/`metros`
|
|
8401
8413
|
* key lists (`key` from GET /v1/ads/targeting/search?dimension=geo). Negative
|
|
@@ -8699,7 +8711,9 @@ export const getAd = <ThrowOnError extends boolean = false>(options: OptionsLega
|
|
|
8699
8711
|
* `targeting.countries` / `regions` / `cities` / `zips` / `metros`), and LANGUAGE
|
|
8700
8712
|
* edits via `targeting.languages`.
|
|
8701
8713
|
* Each list you send becomes the FULL new set of its kind (criteria not in the
|
|
8702
|
-
* list are removed
|
|
8714
|
+
* list are removed, except devices, which Google cannot remove and which are
|
|
8715
|
+
* switched off with a bid modifier of 0 instead); a kind left out is untouched.
|
|
8716
|
+
* Any other `targeting` field
|
|
8703
8717
|
* returns 400: Google cannot mutate it post-create without recreating
|
|
8704
8718
|
* the campaign. Creative edits are dispatched on the ad's `advertisingChannelType`,
|
|
8705
8719
|
* and every supported field replaces a whole set; a field you omit is preserved.
|
|
@@ -33059,7 +33059,7 @@ export type GetCampaignTargetingResponse = ({
|
|
|
33059
33059
|
device?: 'MOBILE' | 'DESKTOP' | 'TABLET' | 'CONNECTED_TV';
|
|
33060
33060
|
included?: boolean;
|
|
33061
33061
|
/**
|
|
33062
|
-
*
|
|
33062
|
+
* Google's bid adjustment for this device: null when it has none, 0 when the device is switched off, otherwise 0.1 to 10.
|
|
33063
33063
|
*/
|
|
33064
33064
|
bidModifier?: (number) | null;
|
|
33065
33065
|
}>;
|
|
@@ -33860,12 +33860,12 @@ export type UpdateAdData = {
|
|
|
33860
33860
|
matchType?: 'exact' | 'phrase' | 'broad';
|
|
33861
33861
|
})>;
|
|
33862
33862
|
/**
|
|
33863
|
-
* Google only. The FULL new set of device
|
|
33863
|
+
* Google only. The FULL new set of device bid modifiers for the campaign. Entries are a device name alone (targeted, bid modifier reset to 1) or { device, bidModifier }. A supported device you leave out is switched off, written as a bid modifier of 0. Google never removes a device criterion, so an excluded device reads back as bidModifier 0 rather than disappearing, and a set that switches every device off returns 422. Which devices a campaign carries depends on its channel: Search campaigns have MOBILE, DESKTOP and TABLET, Display campaigns also have CONNECTED_TV, and sending a device the campaign does not carry returns 422.
|
|
33864
33864
|
*/
|
|
33865
33865
|
devices?: Array<('MOBILE' | 'DESKTOP' | 'TABLET' | 'CONNECTED_TV' | {
|
|
33866
33866
|
device: 'MOBILE' | 'DESKTOP' | 'TABLET' | 'CONNECTED_TV';
|
|
33867
33867
|
/**
|
|
33868
|
-
* Google device bid modifier
|
|
33868
|
+
* Google device bid modifier. 0 switches the device off (minus 100%); otherwise 0.1 to 10 (minus 90% to plus 900%). Google rejects any value between 0 and 0.1.
|
|
33869
33869
|
*/
|
|
33870
33870
|
bidModifier?: number;
|
|
33871
33871
|
})>;
|
|
@@ -37407,11 +37407,11 @@ export type CreateStandaloneAdData = {
|
|
|
37407
37407
|
*/
|
|
37408
37408
|
budgetType?: 'daily' | 'lifetime';
|
|
37409
37409
|
/**
|
|
37410
|
-
* Google Performance Max accepts PAUSED only and always creates a paused campaign. Meta, TikTok, and LinkedIn: 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. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
37410
|
+
* Google Performance Max accepts PAUSED only and always creates a paused campaign. Google Search and Display, Meta, TikTok, and LinkedIn: 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`. Google Search and Display follow the same rule, and because Google keeps an independent switch at campaign, ad group and ad level, a PAUSED create leaves the campaign it creates PAUSED at Google. On TikTok the whole campaign > ad group > ad hierarchy stays paused. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
37411
37411
|
*/
|
|
37412
37412
|
status?: 'ACTIVE' | 'PAUSED';
|
|
37413
37413
|
/**
|
|
37414
|
-
* Meta
|
|
37414
|
+
* Meta and Google. Overrides `status` for the campaign level alone, so you can create a live campaign whose ad set and ad stay paused, or the reverse. Omitted, it follows `status`.
|
|
37415
37415
|
*/
|
|
37416
37416
|
campaignStatus?: 'ACTIVE' | 'PAUSED';
|
|
37417
37417
|
/**
|
|
@@ -38415,7 +38415,7 @@ export type CreateStandaloneAdResponse = ({
|
|
|
38415
38415
|
node?: 'campaign' | 'adSet' | 'creative' | 'ad' | 'performanceMaxCampaign';
|
|
38416
38416
|
status?: 'validated' | 'skipped';
|
|
38417
38417
|
/**
|
|
38418
|
-
* Why the node could not be validated (
|
|
38418
|
+
* Why the node could not be validated (on skipped), or what the dry run could not check and what the request would do as sent (on validated). A Performance Max validation with no location targeting reports here that the campaign would run worldwide.
|
|
38419
38419
|
*/
|
|
38420
38420
|
reason?: string;
|
|
38421
38421
|
}>;
|