@zernio/node 0.2.719 → 0.2.721
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 +95 -4
- package/dist/index.d.ts +95 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +47 -26
- package/src/generated/types.gen.ts +94 -3
package/dist/index.d.mts
CHANGED
|
@@ -980,7 +980,7 @@ declare class Zernio {
|
|
|
980
980
|
* adlibrary API
|
|
981
981
|
*/
|
|
982
982
|
adlibrary: {
|
|
983
|
-
searchAdLibrary: <ThrowOnError extends boolean = false>(options
|
|
983
|
+
searchAdLibrary: <ThrowOnError extends boolean = false>(options?: _hey_api_client_fetch.OptionsLegacyParser<SearchAdLibraryData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SearchAdLibraryResponse, unknown, ThrowOnError>;
|
|
984
984
|
};
|
|
985
985
|
/**
|
|
986
986
|
* adaudiences API
|
|
@@ -3236,6 +3236,14 @@ type CampaignBidding = {
|
|
|
3236
3236
|
id?: string;
|
|
3237
3237
|
name?: string;
|
|
3238
3238
|
} | null;
|
|
3239
|
+
/**
|
|
3240
|
+
* When this data was fetched from Google. Null when it was never served from cache.
|
|
3241
|
+
*/
|
|
3242
|
+
cachedAt?: (string) | null;
|
|
3243
|
+
/**
|
|
3244
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
3245
|
+
*/
|
|
3246
|
+
stale?: boolean;
|
|
3239
3247
|
};
|
|
3240
3248
|
/**
|
|
3241
3249
|
* campaign.advertising_channel_type. COST_CAP's underlying Google field differs by channel; see bidStrategy on PUT.
|
|
@@ -30138,6 +30146,14 @@ type GetAdsSearchTermsResponse = ({
|
|
|
30138
30146
|
*/
|
|
30139
30147
|
nextPageToken?: (string) | null;
|
|
30140
30148
|
};
|
|
30149
|
+
/**
|
|
30150
|
+
* When this data was fetched from Google. Null when it was never served from cache.
|
|
30151
|
+
*/
|
|
30152
|
+
cachedAt?: (string) | null;
|
|
30153
|
+
/**
|
|
30154
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
30155
|
+
*/
|
|
30156
|
+
stale?: boolean;
|
|
30141
30157
|
});
|
|
30142
30158
|
type GetAdsSearchTermsError = (ErrorResponse | {
|
|
30143
30159
|
error?: string;
|
|
@@ -30169,6 +30185,14 @@ type ListBidStrategiesResponse = ({
|
|
|
30169
30185
|
*/
|
|
30170
30186
|
currency?: string;
|
|
30171
30187
|
strategies?: Array<PortfolioBidStrategy>;
|
|
30188
|
+
/**
|
|
30189
|
+
* When this data was fetched from Google. Null when it was never served from cache.
|
|
30190
|
+
*/
|
|
30191
|
+
cachedAt?: (string) | null;
|
|
30192
|
+
/**
|
|
30193
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
30194
|
+
*/
|
|
30195
|
+
stale?: boolean;
|
|
30172
30196
|
});
|
|
30173
30197
|
type ListBidStrategiesError = (ErrorResponse | {
|
|
30174
30198
|
error?: string;
|
|
@@ -30788,6 +30812,14 @@ type ListCampaignNegativeKeywordsResponse = ({
|
|
|
30788
30812
|
text?: string;
|
|
30789
30813
|
matchType?: 'exact' | 'phrase' | 'broad';
|
|
30790
30814
|
}>;
|
|
30815
|
+
/**
|
|
30816
|
+
* When this list was fetched from Google. Null when it was never served from cache.
|
|
30817
|
+
*/
|
|
30818
|
+
cachedAt?: (string) | null;
|
|
30819
|
+
/**
|
|
30820
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
30821
|
+
*/
|
|
30822
|
+
stale?: boolean;
|
|
30791
30823
|
});
|
|
30792
30824
|
type ListCampaignNegativeKeywordsError = ({
|
|
30793
30825
|
error?: string;
|
|
@@ -30953,6 +30985,14 @@ type GetCampaignTargetingResponse = ({
|
|
|
30953
30985
|
id?: string;
|
|
30954
30986
|
name?: string;
|
|
30955
30987
|
}>;
|
|
30988
|
+
/**
|
|
30989
|
+
* When this targeting was fetched from Google. Null when it was never served from cache.
|
|
30990
|
+
*/
|
|
30991
|
+
cachedAt?: (string) | null;
|
|
30992
|
+
/**
|
|
30993
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
30994
|
+
*/
|
|
30995
|
+
stale?: boolean;
|
|
30956
30996
|
});
|
|
30957
30997
|
type GetCampaignTargetingError = (ErrorResponse | {
|
|
30958
30998
|
error?: string;
|
|
@@ -31012,6 +31052,29 @@ type UpdateCampaignTargetingResponse = ({
|
|
|
31012
31052
|
* Which targeting fields were applied.
|
|
31013
31053
|
*/
|
|
31014
31054
|
updated?: Array<('devices' | 'locations' | 'languages')>;
|
|
31055
|
+
devices?: Array<{
|
|
31056
|
+
device?: 'MOBILE' | 'DESKTOP' | 'TABLET' | 'CONNECTED_TV';
|
|
31057
|
+
included?: boolean;
|
|
31058
|
+
/**
|
|
31059
|
+
* Always null on this read; see GET's description.
|
|
31060
|
+
*/
|
|
31061
|
+
bidModifier?: (number) | null;
|
|
31062
|
+
}>;
|
|
31063
|
+
locations?: Array<{
|
|
31064
|
+
/**
|
|
31065
|
+
* Numeric id from Google's geoTargetConstants/{id}.
|
|
31066
|
+
*/
|
|
31067
|
+
geoTargetId?: string;
|
|
31068
|
+
/**
|
|
31069
|
+
* true = excluded location.
|
|
31070
|
+
*/
|
|
31071
|
+
negative?: boolean;
|
|
31072
|
+
}>;
|
|
31073
|
+
languages?: Array<{
|
|
31074
|
+
code?: string;
|
|
31075
|
+
id?: string;
|
|
31076
|
+
name?: string;
|
|
31077
|
+
}>;
|
|
31015
31078
|
});
|
|
31016
31079
|
type UpdateCampaignTargetingError = (ErrorResponse | {
|
|
31017
31080
|
error?: string;
|
|
@@ -33097,6 +33160,14 @@ type ListAccountCalloutsResponse = ({
|
|
|
33097
33160
|
*/
|
|
33098
33161
|
status?: string;
|
|
33099
33162
|
}>;
|
|
33163
|
+
/**
|
|
33164
|
+
* When this list was fetched from Google. Null when it was never served from cache.
|
|
33165
|
+
*/
|
|
33166
|
+
cachedAt?: (string) | null;
|
|
33167
|
+
/**
|
|
33168
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
33169
|
+
*/
|
|
33170
|
+
stale?: boolean;
|
|
33100
33171
|
});
|
|
33101
33172
|
type ListAccountCalloutsError = (ErrorResponse | {
|
|
33102
33173
|
error?: string;
|
|
@@ -33276,6 +33347,14 @@ type ListAdAccountsResponse = ({
|
|
|
33276
33347
|
*/
|
|
33277
33348
|
unusableReason?: (string) | null;
|
|
33278
33349
|
}>;
|
|
33350
|
+
/**
|
|
33351
|
+
* Google only. When this list was fetched from Google. Null when it was never served from cache, or on other platforms.
|
|
33352
|
+
*/
|
|
33353
|
+
cachedAt?: (string) | null;
|
|
33354
|
+
/**
|
|
33355
|
+
* Google only. True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read. Absent on other platforms.
|
|
33356
|
+
*/
|
|
33357
|
+
stale?: boolean;
|
|
33279
33358
|
});
|
|
33280
33359
|
type ListAdAccountsError = ({
|
|
33281
33360
|
error?: string;
|
|
@@ -35484,11 +35563,11 @@ type SearchAdTargetingError = (unknown | {
|
|
|
35484
35563
|
error?: string;
|
|
35485
35564
|
});
|
|
35486
35565
|
type SearchAdLibraryData = {
|
|
35487
|
-
query
|
|
35566
|
+
query?: {
|
|
35488
35567
|
/**
|
|
35489
|
-
* Zernio SocialAccount id (
|
|
35568
|
+
* Zernio SocialAccount id. Required for LinkedIn (linkedin / linkedinads: its token searches). Optional for Meta, where any facebook / instagram / metaads account just selects the platform.
|
|
35490
35569
|
*/
|
|
35491
|
-
accountId
|
|
35570
|
+
accountId?: string;
|
|
35492
35571
|
/**
|
|
35493
35572
|
* Meta only.
|
|
35494
35573
|
*/
|
|
@@ -35525,6 +35604,10 @@ type SearchAdLibraryData = {
|
|
|
35525
35604
|
* Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list.
|
|
35526
35605
|
*/
|
|
35527
35606
|
pageIds?: string;
|
|
35607
|
+
/**
|
|
35608
|
+
* Which archive to search. `meta` needs no accountId. Required unless accountId is given.
|
|
35609
|
+
*/
|
|
35610
|
+
platform?: 'meta' | 'linkedin';
|
|
35528
35611
|
/**
|
|
35529
35612
|
* Meta only. Comma-separated publisher platforms: FACEBOOK, INSTAGRAM, AUDIENCE_NETWORK, MESSENGER, WHATSAPP, OCULUS, THREADS, STREAMING_SERVICES.
|
|
35530
35613
|
*/
|
|
@@ -36316,6 +36399,14 @@ type ListConversionActionsResponse = ({
|
|
|
36316
36399
|
*/
|
|
36317
36400
|
customerId?: string;
|
|
36318
36401
|
actions?: Array<ConversionAction>;
|
|
36402
|
+
/**
|
|
36403
|
+
* When this list was fetched from Google. Null when it was never served from cache.
|
|
36404
|
+
*/
|
|
36405
|
+
cachedAt?: (string) | null;
|
|
36406
|
+
/**
|
|
36407
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
36408
|
+
*/
|
|
36409
|
+
stale?: boolean;
|
|
36319
36410
|
});
|
|
36320
36411
|
type ListConversionActionsError = (ErrorResponse | {
|
|
36321
36412
|
error?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -980,7 +980,7 @@ declare class Zernio {
|
|
|
980
980
|
* adlibrary API
|
|
981
981
|
*/
|
|
982
982
|
adlibrary: {
|
|
983
|
-
searchAdLibrary: <ThrowOnError extends boolean = false>(options
|
|
983
|
+
searchAdLibrary: <ThrowOnError extends boolean = false>(options?: _hey_api_client_fetch.OptionsLegacyParser<SearchAdLibraryData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SearchAdLibraryResponse, unknown, ThrowOnError>;
|
|
984
984
|
};
|
|
985
985
|
/**
|
|
986
986
|
* adaudiences API
|
|
@@ -3236,6 +3236,14 @@ type CampaignBidding = {
|
|
|
3236
3236
|
id?: string;
|
|
3237
3237
|
name?: string;
|
|
3238
3238
|
} | null;
|
|
3239
|
+
/**
|
|
3240
|
+
* When this data was fetched from Google. Null when it was never served from cache.
|
|
3241
|
+
*/
|
|
3242
|
+
cachedAt?: (string) | null;
|
|
3243
|
+
/**
|
|
3244
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
3245
|
+
*/
|
|
3246
|
+
stale?: boolean;
|
|
3239
3247
|
};
|
|
3240
3248
|
/**
|
|
3241
3249
|
* campaign.advertising_channel_type. COST_CAP's underlying Google field differs by channel; see bidStrategy on PUT.
|
|
@@ -30138,6 +30146,14 @@ type GetAdsSearchTermsResponse = ({
|
|
|
30138
30146
|
*/
|
|
30139
30147
|
nextPageToken?: (string) | null;
|
|
30140
30148
|
};
|
|
30149
|
+
/**
|
|
30150
|
+
* When this data was fetched from Google. Null when it was never served from cache.
|
|
30151
|
+
*/
|
|
30152
|
+
cachedAt?: (string) | null;
|
|
30153
|
+
/**
|
|
30154
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
30155
|
+
*/
|
|
30156
|
+
stale?: boolean;
|
|
30141
30157
|
});
|
|
30142
30158
|
type GetAdsSearchTermsError = (ErrorResponse | {
|
|
30143
30159
|
error?: string;
|
|
@@ -30169,6 +30185,14 @@ type ListBidStrategiesResponse = ({
|
|
|
30169
30185
|
*/
|
|
30170
30186
|
currency?: string;
|
|
30171
30187
|
strategies?: Array<PortfolioBidStrategy>;
|
|
30188
|
+
/**
|
|
30189
|
+
* When this data was fetched from Google. Null when it was never served from cache.
|
|
30190
|
+
*/
|
|
30191
|
+
cachedAt?: (string) | null;
|
|
30192
|
+
/**
|
|
30193
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
30194
|
+
*/
|
|
30195
|
+
stale?: boolean;
|
|
30172
30196
|
});
|
|
30173
30197
|
type ListBidStrategiesError = (ErrorResponse | {
|
|
30174
30198
|
error?: string;
|
|
@@ -30788,6 +30812,14 @@ type ListCampaignNegativeKeywordsResponse = ({
|
|
|
30788
30812
|
text?: string;
|
|
30789
30813
|
matchType?: 'exact' | 'phrase' | 'broad';
|
|
30790
30814
|
}>;
|
|
30815
|
+
/**
|
|
30816
|
+
* When this list was fetched from Google. Null when it was never served from cache.
|
|
30817
|
+
*/
|
|
30818
|
+
cachedAt?: (string) | null;
|
|
30819
|
+
/**
|
|
30820
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
30821
|
+
*/
|
|
30822
|
+
stale?: boolean;
|
|
30791
30823
|
});
|
|
30792
30824
|
type ListCampaignNegativeKeywordsError = ({
|
|
30793
30825
|
error?: string;
|
|
@@ -30953,6 +30985,14 @@ type GetCampaignTargetingResponse = ({
|
|
|
30953
30985
|
id?: string;
|
|
30954
30986
|
name?: string;
|
|
30955
30987
|
}>;
|
|
30988
|
+
/**
|
|
30989
|
+
* When this targeting was fetched from Google. Null when it was never served from cache.
|
|
30990
|
+
*/
|
|
30991
|
+
cachedAt?: (string) | null;
|
|
30992
|
+
/**
|
|
30993
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
30994
|
+
*/
|
|
30995
|
+
stale?: boolean;
|
|
30956
30996
|
});
|
|
30957
30997
|
type GetCampaignTargetingError = (ErrorResponse | {
|
|
30958
30998
|
error?: string;
|
|
@@ -31012,6 +31052,29 @@ type UpdateCampaignTargetingResponse = ({
|
|
|
31012
31052
|
* Which targeting fields were applied.
|
|
31013
31053
|
*/
|
|
31014
31054
|
updated?: Array<('devices' | 'locations' | 'languages')>;
|
|
31055
|
+
devices?: Array<{
|
|
31056
|
+
device?: 'MOBILE' | 'DESKTOP' | 'TABLET' | 'CONNECTED_TV';
|
|
31057
|
+
included?: boolean;
|
|
31058
|
+
/**
|
|
31059
|
+
* Always null on this read; see GET's description.
|
|
31060
|
+
*/
|
|
31061
|
+
bidModifier?: (number) | null;
|
|
31062
|
+
}>;
|
|
31063
|
+
locations?: Array<{
|
|
31064
|
+
/**
|
|
31065
|
+
* Numeric id from Google's geoTargetConstants/{id}.
|
|
31066
|
+
*/
|
|
31067
|
+
geoTargetId?: string;
|
|
31068
|
+
/**
|
|
31069
|
+
* true = excluded location.
|
|
31070
|
+
*/
|
|
31071
|
+
negative?: boolean;
|
|
31072
|
+
}>;
|
|
31073
|
+
languages?: Array<{
|
|
31074
|
+
code?: string;
|
|
31075
|
+
id?: string;
|
|
31076
|
+
name?: string;
|
|
31077
|
+
}>;
|
|
31015
31078
|
});
|
|
31016
31079
|
type UpdateCampaignTargetingError = (ErrorResponse | {
|
|
31017
31080
|
error?: string;
|
|
@@ -33097,6 +33160,14 @@ type ListAccountCalloutsResponse = ({
|
|
|
33097
33160
|
*/
|
|
33098
33161
|
status?: string;
|
|
33099
33162
|
}>;
|
|
33163
|
+
/**
|
|
33164
|
+
* When this list was fetched from Google. Null when it was never served from cache.
|
|
33165
|
+
*/
|
|
33166
|
+
cachedAt?: (string) | null;
|
|
33167
|
+
/**
|
|
33168
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
33169
|
+
*/
|
|
33170
|
+
stale?: boolean;
|
|
33100
33171
|
});
|
|
33101
33172
|
type ListAccountCalloutsError = (ErrorResponse | {
|
|
33102
33173
|
error?: string;
|
|
@@ -33276,6 +33347,14 @@ type ListAdAccountsResponse = ({
|
|
|
33276
33347
|
*/
|
|
33277
33348
|
unusableReason?: (string) | null;
|
|
33278
33349
|
}>;
|
|
33350
|
+
/**
|
|
33351
|
+
* Google only. When this list was fetched from Google. Null when it was never served from cache, or on other platforms.
|
|
33352
|
+
*/
|
|
33353
|
+
cachedAt?: (string) | null;
|
|
33354
|
+
/**
|
|
33355
|
+
* Google only. True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read. Absent on other platforms.
|
|
33356
|
+
*/
|
|
33357
|
+
stale?: boolean;
|
|
33279
33358
|
});
|
|
33280
33359
|
type ListAdAccountsError = ({
|
|
33281
33360
|
error?: string;
|
|
@@ -35484,11 +35563,11 @@ type SearchAdTargetingError = (unknown | {
|
|
|
35484
35563
|
error?: string;
|
|
35485
35564
|
});
|
|
35486
35565
|
type SearchAdLibraryData = {
|
|
35487
|
-
query
|
|
35566
|
+
query?: {
|
|
35488
35567
|
/**
|
|
35489
|
-
* Zernio SocialAccount id (
|
|
35568
|
+
* Zernio SocialAccount id. Required for LinkedIn (linkedin / linkedinads: its token searches). Optional for Meta, where any facebook / instagram / metaads account just selects the platform.
|
|
35490
35569
|
*/
|
|
35491
|
-
accountId
|
|
35570
|
+
accountId?: string;
|
|
35492
35571
|
/**
|
|
35493
35572
|
* Meta only.
|
|
35494
35573
|
*/
|
|
@@ -35525,6 +35604,10 @@ type SearchAdLibraryData = {
|
|
|
35525
35604
|
* Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list.
|
|
35526
35605
|
*/
|
|
35527
35606
|
pageIds?: string;
|
|
35607
|
+
/**
|
|
35608
|
+
* Which archive to search. `meta` needs no accountId. Required unless accountId is given.
|
|
35609
|
+
*/
|
|
35610
|
+
platform?: 'meta' | 'linkedin';
|
|
35528
35611
|
/**
|
|
35529
35612
|
* Meta only. Comma-separated publisher platforms: FACEBOOK, INSTAGRAM, AUDIENCE_NETWORK, MESSENGER, WHATSAPP, OCULUS, THREADS, STREAMING_SERVICES.
|
|
35530
35613
|
*/
|
|
@@ -36316,6 +36399,14 @@ type ListConversionActionsResponse = ({
|
|
|
36316
36399
|
*/
|
|
36317
36400
|
customerId?: string;
|
|
36318
36401
|
actions?: Array<ConversionAction>;
|
|
36402
|
+
/**
|
|
36403
|
+
* When this list was fetched from Google. Null when it was never served from cache.
|
|
36404
|
+
*/
|
|
36405
|
+
cachedAt?: (string) | null;
|
|
36406
|
+
/**
|
|
36407
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
36408
|
+
*/
|
|
36409
|
+
stale?: boolean;
|
|
36319
36410
|
});
|
|
36320
36411
|
type ListConversionActionsError = (ErrorResponse | {
|
|
36321
36412
|
error?: string;
|
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.721",
|
|
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.721",
|
|
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
|
@@ -7765,9 +7765,11 @@ export const listAds = <ThrowOnError extends boolean = false>(options?: OptionsL
|
|
|
7765
7765
|
* Google Ads search terms report
|
|
7766
7766
|
* The actual search queries that triggered your ads, with matched-keyword
|
|
7767
7767
|
* status and spend metrics — the raw material for wasted-spend analysis and
|
|
7768
|
-
* negative-keyword lists. Reads Google's `search_term_view
|
|
7769
|
-
* to the last 30 days. Rows are ordered by
|
|
7770
|
-
* shared Google Ads operations budget.
|
|
7768
|
+
* negative-keyword lists. Reads Google's `search_term_view`, cached for
|
|
7769
|
+
* the quota window; defaults to the last 30 days. Rows are ordered by
|
|
7770
|
+
* cost, descending. Draws on the shared Google Ads operations budget.
|
|
7771
|
+
* The response carries `cachedAt` and `stale`, set when a quota-exhausted
|
|
7772
|
+
* call falls back to the last-good copy instead of a live read.
|
|
7771
7773
|
*/
|
|
7772
7774
|
export const getAdsSearchTerms = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAdsSearchTermsData, ThrowOnError>) => {
|
|
7773
7775
|
return (options?.client ?? client).get<GetAdsSearchTermsResponse, GetAdsSearchTermsError, ThrowOnError>({
|
|
@@ -7778,7 +7780,7 @@ export const getAdsSearchTerms = <ThrowOnError extends boolean = false>(options:
|
|
|
7778
7780
|
|
|
7779
7781
|
/**
|
|
7780
7782
|
* List Google Ads portfolio bid strategies
|
|
7781
|
-
* Bidding strategy report: type, status, campaign count, clicks, cost, cost per conversion, impressions, average CPC and conversions over the date range (default last 30 days). Reads Google's `bidding_strategy` resource
|
|
7783
|
+
* Bidding strategy report: type, status, campaign count, clicks, cost, cost per conversion, impressions, average CPC and conversions over the date range (default last 30 days). Reads Google's `bidding_strategy` resource, cached for the quota window. Draws on the shared Google Ads operations budget. The response carries `cachedAt` and `stale`, set when a quota-exhausted call falls back to the last-good copy instead of a live read.
|
|
7782
7784
|
*/
|
|
7783
7785
|
export const listBidStrategies = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListBidStrategiesData, ThrowOnError>) => {
|
|
7784
7786
|
return (options?.client ?? client).get<ListBidStrategiesResponse, ListBidStrategiesError, ThrowOnError>({
|
|
@@ -7966,9 +7968,12 @@ export const updateAdCampaignStatus = <ThrowOnError extends boolean = false>(opt
|
|
|
7966
7968
|
|
|
7967
7969
|
/**
|
|
7968
7970
|
* Read a campaign's current bidding
|
|
7969
|
-
*
|
|
7970
|
-
* block before a PUT to /v1/ads/campaigns/{campaignId}.
|
|
7971
|
-
* and rejected when it is anything else, since
|
|
7971
|
+
* Read of the campaign's bidding strategy on Google, cached for the quota window, for
|
|
7972
|
+
* pre-filling the bid strategy block before a PUT to /v1/ads/campaigns/{campaignId}.
|
|
7973
|
+
* Google Ads only; `platform` is required and rejected when it is anything else, since
|
|
7974
|
+
* a `campaignId` is not globally unique. The response carries `cachedAt` and `stale`,
|
|
7975
|
+
* set when a quota-exhausted call falls back to the last-good copy instead of a live
|
|
7976
|
+
* read.
|
|
7972
7977
|
*
|
|
7973
7978
|
* Maps Google's bidding strategy onto the same triplet PUT accepts: `LOWEST_COST_WITHOUT_CAP`
|
|
7974
7979
|
* (Maximize Conversions, no target), `COST_CAP` + `bidAmount` (Target CPA), `LOWEST_COST_WITH_MIN_ROAS`
|
|
@@ -8045,9 +8050,11 @@ export const deleteAdCampaign = <ThrowOnError extends boolean = false>(options:
|
|
|
8045
8050
|
/**
|
|
8046
8051
|
* List campaign-level negative keywords
|
|
8047
8052
|
* Returns the campaign-level negative keywords (`campaign_criterion.negative`),
|
|
8048
|
-
* distinct from the ad-group-level negatives under `GET /v1/ads/keywords`.
|
|
8049
|
-
*
|
|
8050
|
-
*
|
|
8053
|
+
* distinct from the ad-group-level negatives under `GET /v1/ads/keywords`. Cached
|
|
8054
|
+
* for the quota window (not synced to Postgres), and gated by the shared Google
|
|
8055
|
+
* Ads operations budget like every other on-demand Google surface. The response
|
|
8056
|
+
* carries `cachedAt` and `stale`, set when a quota-exhausted call falls back to
|
|
8057
|
+
* the last-good copy instead of a live read.
|
|
8051
8058
|
*
|
|
8052
8059
|
* The platform is always discovered from the campaign itself; a non-Google
|
|
8053
8060
|
* campaign returns 501 rather than 404, whether or not `platform` was passed.
|
|
@@ -8135,9 +8142,10 @@ export const duplicateAdCampaign = <ThrowOnError extends boolean = false>(option
|
|
|
8135
8142
|
/**
|
|
8136
8143
|
* Read a Google campaign's device, location, and language targeting
|
|
8137
8144
|
* Google Ads compliance requires geo, language, budget, and bidding targeting
|
|
8138
|
-
* set at creation to stay editable afterwards; this reads the
|
|
8139
|
-
*
|
|
8140
|
-
*
|
|
8145
|
+
* set at creation to stay editable afterwards; this reads the campaign state
|
|
8146
|
+
* so an integrator can build an editor around it. Cached for the quota window
|
|
8147
|
+
* (10 minutes fresh, up to 7 days last-good), not always a live read. Google
|
|
8148
|
+
* only; every other platform returns 501.
|
|
8141
8149
|
*
|
|
8142
8150
|
* `devices` always lists all four device types with `included` reflecting
|
|
8143
8151
|
* Google's negative device criteria (a device absent from any negative
|
|
@@ -8169,6 +8177,10 @@ export const getCampaignTargeting = <ThrowOnError extends boolean = false>(optio
|
|
|
8169
8177
|
* `languages` is an array of Google's language codes (ISO 639-1, plus variants
|
|
8170
8178
|
* such as `zh_CN`); an unknown code returns 400.
|
|
8171
8179
|
*
|
|
8180
|
+
* The response includes the refreshed `devices`/`locations`/`languages` state
|
|
8181
|
+
* read back from Google after the edit, and invalidates the cached copy
|
|
8182
|
+
* `GET` on this campaign would otherwise keep serving.
|
|
8183
|
+
*
|
|
8172
8184
|
*/
|
|
8173
8185
|
export const updateCampaignTargeting = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateCampaignTargetingData, ThrowOnError>) => {
|
|
8174
8186
|
return (options?.client ?? client).put<UpdateCampaignTargetingResponse, UpdateCampaignTargetingError, ThrowOnError>({
|
|
@@ -9111,7 +9123,11 @@ export const deleteValueRuleSet = <ThrowOnError extends boolean = false>(options
|
|
|
9111
9123
|
* Google Ads compliance row C.75: callout assets linked at the CUSTOMER
|
|
9112
9124
|
* level via `customer_asset` (not a campaign or ad group), so they serve
|
|
9113
9125
|
* fleet-wide across the account. Google only; every other platform
|
|
9114
|
-
* returns 501.
|
|
9126
|
+
* returns 501. Cached for the quota window (10 minutes fresh, up to 7
|
|
9127
|
+
* days last-good), and gated by the shared Google Ads operations budget
|
|
9128
|
+
* on a cache miss. The response carries `cachedAt` and `stale`, set when
|
|
9129
|
+
* a quota-exhausted call falls back to the last-good copy instead of a
|
|
9130
|
+
* live read.
|
|
9115
9131
|
*/
|
|
9116
9132
|
export const listAccountCallouts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListAccountCalloutsData, ThrowOnError>) => {
|
|
9117
9133
|
return (options?.client ?? client).get<ListAccountCalloutsResponse, ListAccountCalloutsError, ThrowOnError>({
|
|
@@ -9547,19 +9563,18 @@ export const searchAdTargeting = <ThrowOnError extends boolean = false>(options:
|
|
|
9547
9563
|
|
|
9548
9564
|
/**
|
|
9549
9565
|
* Search the public Ad Library
|
|
9550
|
-
* Competitor and market research over the
|
|
9551
|
-
*
|
|
9552
|
-
*
|
|
9553
|
-
*
|
|
9554
|
-
*
|
|
9566
|
+
* Competitor and market research over the public ad archives. Meta's Ad Library
|
|
9567
|
+
* (`GET /ads_archive`) is searched with Zernio's own developer access, so `platform=meta` needs
|
|
9568
|
+
* no connected account at all. LinkedIn's Ad Library (`GET /rest/adLibrary`) runs on a connected
|
|
9569
|
+
* `linkedin` / `linkedinads` account, passed as `accountId`. Passing a Meta account as `accountId`
|
|
9570
|
+
* also selects Meta. Rows are returned in the platform's raw shape under `data`; `paging.after`
|
|
9571
|
+
* is an opaque cursor on both (`null` when exhausted).
|
|
9555
9572
|
*
|
|
9556
9573
|
* **Meta coverage.** Political and social-issue ads are searchable worldwide. Every other ad is
|
|
9557
9574
|
* in the archive only if it was delivered to the EU or UK within the last year, so a US-only
|
|
9558
9575
|
* commercial advertiser is invisible. Spend, impressions and demographics are political-only
|
|
9559
|
-
* fields and are left out of the default projection; request them via `fields`.
|
|
9560
|
-
*
|
|
9561
|
-
* Facebook user behind the connection has done so, the call fails with
|
|
9562
|
-
* `meta_identity_confirmation_required` (403).
|
|
9576
|
+
* fields and are left out of the default projection; request them via `fields`. All customers
|
|
9577
|
+
* share Zernio's Meta quota, so a `429` means back off for a minute.
|
|
9563
9578
|
*
|
|
9564
9579
|
* **LinkedIn coverage.** Ads served after June 1 2023, worldwide, kept for a year after their
|
|
9565
9580
|
* last impression. EU-delivered ads carry impression ranges and the disclosed targeting facets.
|
|
@@ -9570,7 +9585,7 @@ export const searchAdTargeting = <ThrowOnError extends boolean = false>(options:
|
|
|
9570
9585
|
* `advertiser` is LinkedIn-only. Passing a param the account's platform does not support is a 400
|
|
9571
9586
|
* naming the param.
|
|
9572
9587
|
*/
|
|
9573
|
-
export const searchAdLibrary = <ThrowOnError extends boolean = false>(options
|
|
9588
|
+
export const searchAdLibrary = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<SearchAdLibraryData, ThrowOnError>) => {
|
|
9574
9589
|
return (options?.client ?? client).get<SearchAdLibraryResponse, SearchAdLibraryError, ThrowOnError>({
|
|
9575
9590
|
...options,
|
|
9576
9591
|
url: '/v1/ads/library'
|
|
@@ -9907,6 +9922,11 @@ export const adjustConversions = <ThrowOnError extends boolean = false>(options:
|
|
|
9907
9922
|
* accessible Google Ads customers, and the call fails with `400` when more than
|
|
9908
9923
|
* one is accessible (pass `customerId` to disambiguate).
|
|
9909
9924
|
*
|
|
9925
|
+
* The list itself is cached for the quota window (1 hour fresh, up to 7 days
|
|
9926
|
+
* last-good; the cache key does not vary on `type`). The response carries
|
|
9927
|
+
* `cachedAt` and `stale`, set when a quota-exhausted call falls back to the
|
|
9928
|
+
* last-good copy instead of a live read.
|
|
9929
|
+
*
|
|
9910
9930
|
*/
|
|
9911
9931
|
export const listConversionActions = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListConversionActionsData, ThrowOnError>) => {
|
|
9912
9932
|
return (options?.client ?? client).get<ListConversionActionsResponse, ListConversionActionsError, ThrowOnError>({
|
|
@@ -9919,8 +9939,9 @@ export const listConversionActions = <ThrowOnError extends boolean = false>(opti
|
|
|
9919
9939
|
* Create a website conversion action
|
|
9920
9940
|
* Creates a `WEBPAGE` conversion action (category `DEFAULT`) and returns it with
|
|
9921
9941
|
* its tag snippets, read back after creation since Google never returns them on
|
|
9922
|
-
* the create response itself.
|
|
9923
|
-
*
|
|
9942
|
+
* the create response itself. Invalidates the cached list `GET` on this resource
|
|
9943
|
+
* would otherwise keep serving. Google-only; other platforms return `501`.
|
|
9944
|
+
* Requires the Ads add-on.
|
|
9924
9945
|
*
|
|
9925
9946
|
*/
|
|
9926
9947
|
export const createConversionAction = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateConversionActionData, ThrowOnError>) => {
|
|
@@ -1895,6 +1895,14 @@ export type CampaignBidding = {
|
|
|
1895
1895
|
id?: string;
|
|
1896
1896
|
name?: string;
|
|
1897
1897
|
} | null;
|
|
1898
|
+
/**
|
|
1899
|
+
* When this data was fetched from Google. Null when it was never served from cache.
|
|
1900
|
+
*/
|
|
1901
|
+
cachedAt?: (string) | null;
|
|
1902
|
+
/**
|
|
1903
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
1904
|
+
*/
|
|
1905
|
+
stale?: boolean;
|
|
1898
1906
|
};
|
|
1899
1907
|
|
|
1900
1908
|
/**
|
|
@@ -30511,6 +30519,14 @@ export type GetAdsSearchTermsResponse = ({
|
|
|
30511
30519
|
*/
|
|
30512
30520
|
nextPageToken?: (string) | null;
|
|
30513
30521
|
};
|
|
30522
|
+
/**
|
|
30523
|
+
* When this data was fetched from Google. Null when it was never served from cache.
|
|
30524
|
+
*/
|
|
30525
|
+
cachedAt?: (string) | null;
|
|
30526
|
+
/**
|
|
30527
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
30528
|
+
*/
|
|
30529
|
+
stale?: boolean;
|
|
30514
30530
|
});
|
|
30515
30531
|
|
|
30516
30532
|
export type GetAdsSearchTermsError = (ErrorResponse | {
|
|
@@ -30545,6 +30561,14 @@ export type ListBidStrategiesResponse = ({
|
|
|
30545
30561
|
*/
|
|
30546
30562
|
currency?: string;
|
|
30547
30563
|
strategies?: Array<PortfolioBidStrategy>;
|
|
30564
|
+
/**
|
|
30565
|
+
* When this data was fetched from Google. Null when it was never served from cache.
|
|
30566
|
+
*/
|
|
30567
|
+
cachedAt?: (string) | null;
|
|
30568
|
+
/**
|
|
30569
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
30570
|
+
*/
|
|
30571
|
+
stale?: boolean;
|
|
30548
30572
|
});
|
|
30549
30573
|
|
|
30550
30574
|
export type ListBidStrategiesError = (ErrorResponse | {
|
|
@@ -31209,6 +31233,14 @@ export type ListCampaignNegativeKeywordsResponse = ({
|
|
|
31209
31233
|
text?: string;
|
|
31210
31234
|
matchType?: 'exact' | 'phrase' | 'broad';
|
|
31211
31235
|
}>;
|
|
31236
|
+
/**
|
|
31237
|
+
* When this list was fetched from Google. Null when it was never served from cache.
|
|
31238
|
+
*/
|
|
31239
|
+
cachedAt?: (string) | null;
|
|
31240
|
+
/**
|
|
31241
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
31242
|
+
*/
|
|
31243
|
+
stale?: boolean;
|
|
31212
31244
|
});
|
|
31213
31245
|
|
|
31214
31246
|
export type ListCampaignNegativeKeywordsError = ({
|
|
@@ -31386,6 +31418,14 @@ export type GetCampaignTargetingResponse = ({
|
|
|
31386
31418
|
id?: string;
|
|
31387
31419
|
name?: string;
|
|
31388
31420
|
}>;
|
|
31421
|
+
/**
|
|
31422
|
+
* When this targeting was fetched from Google. Null when it was never served from cache.
|
|
31423
|
+
*/
|
|
31424
|
+
cachedAt?: (string) | null;
|
|
31425
|
+
/**
|
|
31426
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
31427
|
+
*/
|
|
31428
|
+
stale?: boolean;
|
|
31389
31429
|
});
|
|
31390
31430
|
|
|
31391
31431
|
export type GetCampaignTargetingError = (ErrorResponse | {
|
|
@@ -31448,6 +31488,29 @@ export type UpdateCampaignTargetingResponse = ({
|
|
|
31448
31488
|
* Which targeting fields were applied.
|
|
31449
31489
|
*/
|
|
31450
31490
|
updated?: Array<('devices' | 'locations' | 'languages')>;
|
|
31491
|
+
devices?: Array<{
|
|
31492
|
+
device?: 'MOBILE' | 'DESKTOP' | 'TABLET' | 'CONNECTED_TV';
|
|
31493
|
+
included?: boolean;
|
|
31494
|
+
/**
|
|
31495
|
+
* Always null on this read; see GET's description.
|
|
31496
|
+
*/
|
|
31497
|
+
bidModifier?: (number) | null;
|
|
31498
|
+
}>;
|
|
31499
|
+
locations?: Array<{
|
|
31500
|
+
/**
|
|
31501
|
+
* Numeric id from Google's geoTargetConstants/{id}.
|
|
31502
|
+
*/
|
|
31503
|
+
geoTargetId?: string;
|
|
31504
|
+
/**
|
|
31505
|
+
* true = excluded location.
|
|
31506
|
+
*/
|
|
31507
|
+
negative?: boolean;
|
|
31508
|
+
}>;
|
|
31509
|
+
languages?: Array<{
|
|
31510
|
+
code?: string;
|
|
31511
|
+
id?: string;
|
|
31512
|
+
name?: string;
|
|
31513
|
+
}>;
|
|
31451
31514
|
});
|
|
31452
31515
|
|
|
31453
31516
|
export type UpdateCampaignTargetingError = (ErrorResponse | {
|
|
@@ -33683,6 +33746,14 @@ export type ListAccountCalloutsResponse = ({
|
|
|
33683
33746
|
*/
|
|
33684
33747
|
status?: string;
|
|
33685
33748
|
}>;
|
|
33749
|
+
/**
|
|
33750
|
+
* When this list was fetched from Google. Null when it was never served from cache.
|
|
33751
|
+
*/
|
|
33752
|
+
cachedAt?: (string) | null;
|
|
33753
|
+
/**
|
|
33754
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
33755
|
+
*/
|
|
33756
|
+
stale?: boolean;
|
|
33686
33757
|
});
|
|
33687
33758
|
|
|
33688
33759
|
export type ListAccountCalloutsError = (ErrorResponse | {
|
|
@@ -33874,6 +33945,14 @@ export type ListAdAccountsResponse = ({
|
|
|
33874
33945
|
*/
|
|
33875
33946
|
unusableReason?: (string) | null;
|
|
33876
33947
|
}>;
|
|
33948
|
+
/**
|
|
33949
|
+
* Google only. When this list was fetched from Google. Null when it was never served from cache, or on other platforms.
|
|
33950
|
+
*/
|
|
33951
|
+
cachedAt?: (string) | null;
|
|
33952
|
+
/**
|
|
33953
|
+
* Google only. True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read. Absent on other platforms.
|
|
33954
|
+
*/
|
|
33955
|
+
stale?: boolean;
|
|
33877
33956
|
});
|
|
33878
33957
|
|
|
33879
33958
|
export type ListAdAccountsError = ({
|
|
@@ -36141,11 +36220,11 @@ export type SearchAdTargetingError = (unknown | {
|
|
|
36141
36220
|
});
|
|
36142
36221
|
|
|
36143
36222
|
export type SearchAdLibraryData = {
|
|
36144
|
-
query
|
|
36223
|
+
query?: {
|
|
36145
36224
|
/**
|
|
36146
|
-
* Zernio SocialAccount id (
|
|
36225
|
+
* Zernio SocialAccount id. Required for LinkedIn (linkedin / linkedinads: its token searches). Optional for Meta, where any facebook / instagram / metaads account just selects the platform.
|
|
36147
36226
|
*/
|
|
36148
|
-
accountId
|
|
36227
|
+
accountId?: string;
|
|
36149
36228
|
/**
|
|
36150
36229
|
* Meta only.
|
|
36151
36230
|
*/
|
|
@@ -36182,6 +36261,10 @@ export type SearchAdLibraryData = {
|
|
|
36182
36261
|
* Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list.
|
|
36183
36262
|
*/
|
|
36184
36263
|
pageIds?: string;
|
|
36264
|
+
/**
|
|
36265
|
+
* Which archive to search. `meta` needs no accountId. Required unless accountId is given.
|
|
36266
|
+
*/
|
|
36267
|
+
platform?: 'meta' | 'linkedin';
|
|
36185
36268
|
/**
|
|
36186
36269
|
* Meta only. Comma-separated publisher platforms: FACEBOOK, INSTAGRAM, AUDIENCE_NETWORK, MESSENGER, WHATSAPP, OCULUS, THREADS, STREAMING_SERVICES.
|
|
36187
36270
|
*/
|
|
@@ -37022,6 +37105,14 @@ export type ListConversionActionsResponse = ({
|
|
|
37022
37105
|
*/
|
|
37023
37106
|
customerId?: string;
|
|
37024
37107
|
actions?: Array<ConversionAction>;
|
|
37108
|
+
/**
|
|
37109
|
+
* When this list was fetched from Google. Null when it was never served from cache.
|
|
37110
|
+
*/
|
|
37111
|
+
cachedAt?: (string) | null;
|
|
37112
|
+
/**
|
|
37113
|
+
* True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
37114
|
+
*/
|
|
37115
|
+
stale?: boolean;
|
|
37025
37116
|
});
|
|
37026
37117
|
|
|
37027
37118
|
export type ListConversionActionsError = (ErrorResponse | {
|