@getlatedev/node 0.2.1796 → 0.2.1798
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 +35 -7
- package/dist/index.d.ts +35 -7
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +20 -0
- package/src/generated/types.gen.ts +35 -7
package/dist/index.d.mts
CHANGED
|
@@ -23871,9 +23871,9 @@ type StagedAdChange = {
|
|
|
23871
23871
|
*/
|
|
23872
23872
|
id: string;
|
|
23873
23873
|
/**
|
|
23874
|
-
* Which write was staged: a status route,
|
|
23874
|
+
* Which write was staged: a status route, the update route of a campaign, an ad set or an ad, or one of the create routes (POST /v1/ads/create, POST /v1/ads/campaigns, POST /v1/ads/ad-sets).
|
|
23875
23875
|
*/
|
|
23876
|
-
type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update';
|
|
23876
|
+
type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'ad_create' | 'campaign_create' | 'ad_set_create';
|
|
23877
23877
|
/**
|
|
23878
23878
|
* The ad platform of the object, as the write route names it.
|
|
23879
23879
|
*/
|
|
@@ -23887,9 +23887,13 @@ type StagedAdChange = {
|
|
|
23887
23887
|
*/
|
|
23888
23888
|
adAccountId: string;
|
|
23889
23889
|
/**
|
|
23890
|
-
* The object the change applies to: the platform campaign id, the platform ad set id, or the Zernio ad id.
|
|
23890
|
+
* The object the change applies to: the platform campaign id, the platform ad set id, or the Zernio ad id. Null for a create, whose object does not exist yet.
|
|
23891
23891
|
*/
|
|
23892
23892
|
targetId: (string) | null;
|
|
23893
|
+
/**
|
|
23894
|
+
* Present and true when the change creates a new object. Every diff entry then has `before: null` and `beforeAvailable: false`.
|
|
23895
|
+
*/
|
|
23896
|
+
creates?: boolean;
|
|
23893
23897
|
/**
|
|
23894
23898
|
* - `staged`: waiting to be confirmed or discarded.
|
|
23895
23899
|
* - `confirming`: a confirm is running. A change that stays here has an unknown outcome and is never applied again automatically.
|
|
@@ -23921,7 +23925,7 @@ type StagedAdChange = {
|
|
|
23921
23925
|
*/
|
|
23922
23926
|
after: unknown;
|
|
23923
23927
|
/**
|
|
23924
|
-
* False when the live read of the object does not return this field,
|
|
23928
|
+
* False when `before` is unknown: the live read of the object does not return this field, or the change creates the object. The field is still staged.
|
|
23925
23929
|
*/
|
|
23926
23930
|
beforeAvailable: boolean;
|
|
23927
23931
|
/**
|
|
@@ -23957,12 +23961,18 @@ type StagedAdChange = {
|
|
|
23957
23961
|
*/
|
|
23958
23962
|
code?: string;
|
|
23959
23963
|
message?: (string) | null;
|
|
23964
|
+
/**
|
|
23965
|
+
* Creates only. What the failed create reported, such as objects it had already made on the ad network.
|
|
23966
|
+
*/
|
|
23967
|
+
details?: {
|
|
23968
|
+
[key: string]: unknown;
|
|
23969
|
+
};
|
|
23960
23970
|
};
|
|
23961
23971
|
};
|
|
23962
23972
|
/**
|
|
23963
|
-
* Which write was staged: a status route,
|
|
23973
|
+
* Which write was staged: a status route, the update route of a campaign, an ad set or an ad, or one of the create routes (POST /v1/ads/create, POST /v1/ads/campaigns, POST /v1/ads/ad-sets).
|
|
23964
23974
|
*/
|
|
23965
|
-
type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update';
|
|
23975
|
+
type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'ad_create' | 'campaign_create' | 'ad_set_create';
|
|
23966
23976
|
/**
|
|
23967
23977
|
* - `staged`: waiting to be confirmed or discarded.
|
|
23968
23978
|
* - `confirming`: a confirm is running. A change that stays here has an unknown outcome and is never applied again automatically.
|
|
@@ -67831,6 +67841,10 @@ type ListAdCampaignsError = (ErrorResponse | unknown | {
|
|
|
67831
67841
|
});
|
|
67832
67842
|
type CreateAdCampaignData = {
|
|
67833
67843
|
body: {
|
|
67844
|
+
/**
|
|
67845
|
+
* Send true to stage this create instead of sending it. Nothing is created on the ad network; the response is `202` with the staged change. Create it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; cannot be combined with `validateOnly`.
|
|
67846
|
+
*/
|
|
67847
|
+
stage?: boolean;
|
|
67834
67848
|
/**
|
|
67835
67849
|
* Zernio SocialAccount id (posting or ads variant); its platform decides where the campaign is created.
|
|
67836
67850
|
*/
|
|
@@ -67975,6 +67989,8 @@ type CreateAdCampaignResponse = ({
|
|
|
67975
67989
|
*/
|
|
67976
67990
|
objective?: string;
|
|
67977
67991
|
status?: 'ACTIVE' | 'PAUSED';
|
|
67992
|
+
} | {
|
|
67993
|
+
change: StagedAdChange;
|
|
67978
67994
|
});
|
|
67979
67995
|
type CreateAdCampaignError = (unknown | ErrorResponse);
|
|
67980
67996
|
type UpdateAdCampaignStatusData = {
|
|
@@ -69093,6 +69109,10 @@ type ListAdSetsResponse = ({
|
|
|
69093
69109
|
type ListAdSetsError = (ErrorResponse | unknown);
|
|
69094
69110
|
type CreateAdSetData = {
|
|
69095
69111
|
body: {
|
|
69112
|
+
/**
|
|
69113
|
+
* Send true to stage this create instead of sending it. Nothing is created on the ad network; the response is `202` with the staged change. Create it with POST /v1/ads/changes/{changeId}/confirm. Google only: `platform: reddit` or `snapchat` returns 400 `staging_not_supported`.
|
|
69114
|
+
*/
|
|
69115
|
+
stage?: boolean;
|
|
69096
69116
|
/**
|
|
69097
69117
|
* Zernio SocialAccount id owning the Google Ads or Reddit Ads connection.
|
|
69098
69118
|
*/
|
|
@@ -69186,6 +69206,8 @@ type CreateAdSetResponse = ({
|
|
|
69186
69206
|
*/
|
|
69187
69207
|
adSetId?: string;
|
|
69188
69208
|
campaignId?: string;
|
|
69209
|
+
} | {
|
|
69210
|
+
change: StagedAdChange;
|
|
69189
69211
|
});
|
|
69190
69212
|
type CreateAdSetError = (ErrorResponse | unknown);
|
|
69191
69213
|
type DuplicateAdSetData = {
|
|
@@ -76067,6 +76089,10 @@ type ReplaceGoogleListingGroupFiltersError = (ErrorResponse | {
|
|
|
76067
76089
|
} | unknown);
|
|
76068
76090
|
type CreateStandaloneAdData = {
|
|
76069
76091
|
body: {
|
|
76092
|
+
/**
|
|
76093
|
+
* Send true to stage this create instead of sending it. Nothing is created on the ad network; the response is `202` with the staged change. Create it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; not with `validateOnly` or a presigned media URL.
|
|
76094
|
+
*/
|
|
76095
|
+
stage?: boolean;
|
|
76070
76096
|
accountId: string;
|
|
76071
76097
|
adAccountId: string;
|
|
76072
76098
|
/**
|
|
@@ -77555,7 +77581,9 @@ type CreateStandaloneAdResponse = ({
|
|
|
77555
77581
|
*
|
|
77556
77582
|
*/
|
|
77557
77583
|
warnings?: Array<(string)>;
|
|
77558
|
-
})
|
|
77584
|
+
}) | {
|
|
77585
|
+
change: StagedAdChange;
|
|
77586
|
+
});
|
|
77559
77587
|
type CreateStandaloneAdError = (unknown | ErrorResponse);
|
|
77560
77588
|
type ListLeadsData = {
|
|
77561
77589
|
query?: {
|
package/dist/index.d.ts
CHANGED
|
@@ -23871,9 +23871,9 @@ type StagedAdChange = {
|
|
|
23871
23871
|
*/
|
|
23872
23872
|
id: string;
|
|
23873
23873
|
/**
|
|
23874
|
-
* Which write was staged: a status route,
|
|
23874
|
+
* Which write was staged: a status route, the update route of a campaign, an ad set or an ad, or one of the create routes (POST /v1/ads/create, POST /v1/ads/campaigns, POST /v1/ads/ad-sets).
|
|
23875
23875
|
*/
|
|
23876
|
-
type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update';
|
|
23876
|
+
type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'ad_create' | 'campaign_create' | 'ad_set_create';
|
|
23877
23877
|
/**
|
|
23878
23878
|
* The ad platform of the object, as the write route names it.
|
|
23879
23879
|
*/
|
|
@@ -23887,9 +23887,13 @@ type StagedAdChange = {
|
|
|
23887
23887
|
*/
|
|
23888
23888
|
adAccountId: string;
|
|
23889
23889
|
/**
|
|
23890
|
-
* The object the change applies to: the platform campaign id, the platform ad set id, or the Zernio ad id.
|
|
23890
|
+
* The object the change applies to: the platform campaign id, the platform ad set id, or the Zernio ad id. Null for a create, whose object does not exist yet.
|
|
23891
23891
|
*/
|
|
23892
23892
|
targetId: (string) | null;
|
|
23893
|
+
/**
|
|
23894
|
+
* Present and true when the change creates a new object. Every diff entry then has `before: null` and `beforeAvailable: false`.
|
|
23895
|
+
*/
|
|
23896
|
+
creates?: boolean;
|
|
23893
23897
|
/**
|
|
23894
23898
|
* - `staged`: waiting to be confirmed or discarded.
|
|
23895
23899
|
* - `confirming`: a confirm is running. A change that stays here has an unknown outcome and is never applied again automatically.
|
|
@@ -23921,7 +23925,7 @@ type StagedAdChange = {
|
|
|
23921
23925
|
*/
|
|
23922
23926
|
after: unknown;
|
|
23923
23927
|
/**
|
|
23924
|
-
* False when the live read of the object does not return this field,
|
|
23928
|
+
* False when `before` is unknown: the live read of the object does not return this field, or the change creates the object. The field is still staged.
|
|
23925
23929
|
*/
|
|
23926
23930
|
beforeAvailable: boolean;
|
|
23927
23931
|
/**
|
|
@@ -23957,12 +23961,18 @@ type StagedAdChange = {
|
|
|
23957
23961
|
*/
|
|
23958
23962
|
code?: string;
|
|
23959
23963
|
message?: (string) | null;
|
|
23964
|
+
/**
|
|
23965
|
+
* Creates only. What the failed create reported, such as objects it had already made on the ad network.
|
|
23966
|
+
*/
|
|
23967
|
+
details?: {
|
|
23968
|
+
[key: string]: unknown;
|
|
23969
|
+
};
|
|
23960
23970
|
};
|
|
23961
23971
|
};
|
|
23962
23972
|
/**
|
|
23963
|
-
* Which write was staged: a status route,
|
|
23973
|
+
* Which write was staged: a status route, the update route of a campaign, an ad set or an ad, or one of the create routes (POST /v1/ads/create, POST /v1/ads/campaigns, POST /v1/ads/ad-sets).
|
|
23964
23974
|
*/
|
|
23965
|
-
type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update';
|
|
23975
|
+
type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'ad_create' | 'campaign_create' | 'ad_set_create';
|
|
23966
23976
|
/**
|
|
23967
23977
|
* - `staged`: waiting to be confirmed or discarded.
|
|
23968
23978
|
* - `confirming`: a confirm is running. A change that stays here has an unknown outcome and is never applied again automatically.
|
|
@@ -67831,6 +67841,10 @@ type ListAdCampaignsError = (ErrorResponse | unknown | {
|
|
|
67831
67841
|
});
|
|
67832
67842
|
type CreateAdCampaignData = {
|
|
67833
67843
|
body: {
|
|
67844
|
+
/**
|
|
67845
|
+
* Send true to stage this create instead of sending it. Nothing is created on the ad network; the response is `202` with the staged change. Create it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; cannot be combined with `validateOnly`.
|
|
67846
|
+
*/
|
|
67847
|
+
stage?: boolean;
|
|
67834
67848
|
/**
|
|
67835
67849
|
* Zernio SocialAccount id (posting or ads variant); its platform decides where the campaign is created.
|
|
67836
67850
|
*/
|
|
@@ -67975,6 +67989,8 @@ type CreateAdCampaignResponse = ({
|
|
|
67975
67989
|
*/
|
|
67976
67990
|
objective?: string;
|
|
67977
67991
|
status?: 'ACTIVE' | 'PAUSED';
|
|
67992
|
+
} | {
|
|
67993
|
+
change: StagedAdChange;
|
|
67978
67994
|
});
|
|
67979
67995
|
type CreateAdCampaignError = (unknown | ErrorResponse);
|
|
67980
67996
|
type UpdateAdCampaignStatusData = {
|
|
@@ -69093,6 +69109,10 @@ type ListAdSetsResponse = ({
|
|
|
69093
69109
|
type ListAdSetsError = (ErrorResponse | unknown);
|
|
69094
69110
|
type CreateAdSetData = {
|
|
69095
69111
|
body: {
|
|
69112
|
+
/**
|
|
69113
|
+
* Send true to stage this create instead of sending it. Nothing is created on the ad network; the response is `202` with the staged change. Create it with POST /v1/ads/changes/{changeId}/confirm. Google only: `platform: reddit` or `snapchat` returns 400 `staging_not_supported`.
|
|
69114
|
+
*/
|
|
69115
|
+
stage?: boolean;
|
|
69096
69116
|
/**
|
|
69097
69117
|
* Zernio SocialAccount id owning the Google Ads or Reddit Ads connection.
|
|
69098
69118
|
*/
|
|
@@ -69186,6 +69206,8 @@ type CreateAdSetResponse = ({
|
|
|
69186
69206
|
*/
|
|
69187
69207
|
adSetId?: string;
|
|
69188
69208
|
campaignId?: string;
|
|
69209
|
+
} | {
|
|
69210
|
+
change: StagedAdChange;
|
|
69189
69211
|
});
|
|
69190
69212
|
type CreateAdSetError = (ErrorResponse | unknown);
|
|
69191
69213
|
type DuplicateAdSetData = {
|
|
@@ -76067,6 +76089,10 @@ type ReplaceGoogleListingGroupFiltersError = (ErrorResponse | {
|
|
|
76067
76089
|
} | unknown);
|
|
76068
76090
|
type CreateStandaloneAdData = {
|
|
76069
76091
|
body: {
|
|
76092
|
+
/**
|
|
76093
|
+
* Send true to stage this create instead of sending it. Nothing is created on the ad network; the response is `202` with the staged change. Create it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; not with `validateOnly` or a presigned media URL.
|
|
76094
|
+
*/
|
|
76095
|
+
stage?: boolean;
|
|
76070
76096
|
accountId: string;
|
|
76071
76097
|
adAccountId: string;
|
|
76072
76098
|
/**
|
|
@@ -77555,7 +77581,9 @@ type CreateStandaloneAdResponse = ({
|
|
|
77555
77581
|
*
|
|
77556
77582
|
*/
|
|
77557
77583
|
warnings?: Array<(string)>;
|
|
77558
|
-
})
|
|
77584
|
+
}) | {
|
|
77585
|
+
change: StagedAdChange;
|
|
77586
|
+
});
|
|
77559
77587
|
type CreateStandaloneAdError = (unknown | ErrorResponse);
|
|
77560
77588
|
type ListLeadsData = {
|
|
77561
77589
|
query?: {
|
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: "@getlatedev/node",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.1798",
|
|
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: "@getlatedev/node",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.1798",
|
|
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
|
@@ -3579,6 +3579,10 @@ export const handleOAuthCallback = <ThrowOnError extends boolean = false>(option
|
|
|
3579
3579
|
*
|
|
3580
3580
|
* Subsequent classic requests can change the ad-account scope using the business token. force=true (or disconnecting the business connection first) switches the profile to the standard Facebook login; the ads account is then held by the user token.
|
|
3581
3581
|
*
|
|
3582
|
+
* When the profile's accounts are already one per ad account of a single business login, `adAccountIds` adds an account per new entry. Existing accounts are never de-scoped: disconnect an account to remove its ad account.
|
|
3583
|
+
*
|
|
3584
|
+
* With several of those accounts, disconnect each of them instead of passing force=true to switch to the standard Facebook login.
|
|
3585
|
+
*
|
|
3582
3586
|
* ### Same-token platforms (facebook, instagram, linkedin, pinterest)
|
|
3583
3587
|
*
|
|
3584
3588
|
* The ads SocialAccount (metaads, linkedinads, pinterestads) reuses the OAuth token of the parent posting account, but only when:
|
|
@@ -15456,6 +15460,10 @@ export const discardAdChange = <ThrowOnError extends boolean = false>(options: O
|
|
|
15456
15460
|
*
|
|
15457
15461
|
* A refusal before anything is written leaves the change `staged`, so the confirm can be sent again: `403` `ads_allowance_exceeded`, or on a one-field change a `429` from Zernio's own limits. Any other failed write ends the change as `failed`.
|
|
15458
15462
|
*
|
|
15463
|
+
* ### Creates
|
|
15464
|
+
*
|
|
15465
|
+
* A staged create is sent once. The ad network checks at confirm whatever it did not check at staging, and media is fetched here. A create that fails ends as `failed` and is not retried: `error.details` keeps what the create reported about objects it had already made.
|
|
15466
|
+
*
|
|
15459
15467
|
*/
|
|
15460
15468
|
export const confirmAdChange = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ConfirmAdChangeData, ThrowOnError>) => {
|
|
15461
15469
|
return (options?.client ?? client).post<ConfirmAdChangeResponse, ConfirmAdChangeError, ThrowOnError>({
|
|
@@ -15781,6 +15789,8 @@ export const listAdCampaigns = <ThrowOnError extends boolean = false>(options?:
|
|
|
15781
15789
|
*
|
|
15782
15790
|
* **Idempotency:** send an `Idempotency-Key` header to make retries safe.
|
|
15783
15791
|
*
|
|
15792
|
+
* **Staging:** send `stage: true` to store the create as an ad change instead of sending it. The response is `202`, and POST /v1/ads/changes/{changeId}/confirm creates the campaign later. Meta and Google only. The network is not called at staging and checks the campaign at confirm.
|
|
15793
|
+
*
|
|
15784
15794
|
* ### Field support
|
|
15785
15795
|
*
|
|
15786
15796
|
* - `specialAdCategories`: Meta-only (400 elsewhere).
|
|
@@ -16459,6 +16469,8 @@ export const listAdSets = <ThrowOnError extends boolean = false>(options?: Optio
|
|
|
16459
16469
|
*
|
|
16460
16470
|
* **Idempotency:** send an `Idempotency-Key` header to make retries safe.
|
|
16461
16471
|
*
|
|
16472
|
+
* **Staging:** send `stage: true` to store the create as an ad change instead of sending it. The response is `202`, and POST /v1/ads/changes/{changeId}/confirm creates the ad group later. Google only: Reddit and Snapchat return 400. Google checks the ad group at confirm.
|
|
16473
|
+
*
|
|
16462
16474
|
*/
|
|
16463
16475
|
export const createAdSet = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateAdSetData, ThrowOnError>) => {
|
|
16464
16476
|
return (options?.client ?? client).post<CreateAdSetResponse, CreateAdSetError, ThrowOnError>({
|
|
@@ -19982,6 +19994,14 @@ export const replaceGoogleListingGroupFilters = <ThrowOnError extends boolean =
|
|
|
19982
19994
|
*
|
|
19983
19995
|
* Without `status`, every level is switched on: send `status: PAUSED` to create it paused. A failed step deletes what the call created.
|
|
19984
19996
|
*
|
|
19997
|
+
* ### Staging
|
|
19998
|
+
*
|
|
19999
|
+
* Send `stage: true` to store the create as an ad change instead of sending it. The response is `202` with the change, and POST /v1/ads/changes/{changeId}/confirm creates the ad later. Meta and Google only.
|
|
20000
|
+
*
|
|
20001
|
+
* Google validates a staged Performance Max or Demand Gen create. Meta is not called at staging, and neither is Google for a search or display ad: the network checks those at confirm.
|
|
20002
|
+
*
|
|
20003
|
+
* Media is fetched at confirm. An upload in Zernio's temporary storage is copied to permanent storage at staging, and the staged change points at the copy. A presigned URL returns 400 with `stage`.
|
|
20004
|
+
*
|
|
19985
20005
|
* ### Idempotency
|
|
19986
20006
|
*
|
|
19987
20007
|
* 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.
|
|
@@ -22198,9 +22198,9 @@ export type StagedAdChange = {
|
|
|
22198
22198
|
*/
|
|
22199
22199
|
id: string;
|
|
22200
22200
|
/**
|
|
22201
|
-
* Which write was staged: a status route,
|
|
22201
|
+
* Which write was staged: a status route, the update route of a campaign, an ad set or an ad, or one of the create routes (POST /v1/ads/create, POST /v1/ads/campaigns, POST /v1/ads/ad-sets).
|
|
22202
22202
|
*/
|
|
22203
|
-
type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update';
|
|
22203
|
+
type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'ad_create' | 'campaign_create' | 'ad_set_create';
|
|
22204
22204
|
/**
|
|
22205
22205
|
* The ad platform of the object, as the write route names it.
|
|
22206
22206
|
*/
|
|
@@ -22214,9 +22214,13 @@ export type StagedAdChange = {
|
|
|
22214
22214
|
*/
|
|
22215
22215
|
adAccountId: string;
|
|
22216
22216
|
/**
|
|
22217
|
-
* The object the change applies to: the platform campaign id, the platform ad set id, or the Zernio ad id.
|
|
22217
|
+
* The object the change applies to: the platform campaign id, the platform ad set id, or the Zernio ad id. Null for a create, whose object does not exist yet.
|
|
22218
22218
|
*/
|
|
22219
22219
|
targetId: (string) | null;
|
|
22220
|
+
/**
|
|
22221
|
+
* Present and true when the change creates a new object. Every diff entry then has `before: null` and `beforeAvailable: false`.
|
|
22222
|
+
*/
|
|
22223
|
+
creates?: boolean;
|
|
22220
22224
|
/**
|
|
22221
22225
|
* - `staged`: waiting to be confirmed or discarded.
|
|
22222
22226
|
* - `confirming`: a confirm is running. A change that stays here has an unknown outcome and is never applied again automatically.
|
|
@@ -22248,7 +22252,7 @@ export type StagedAdChange = {
|
|
|
22248
22252
|
*/
|
|
22249
22253
|
after: unknown;
|
|
22250
22254
|
/**
|
|
22251
|
-
* False when the live read of the object does not return this field,
|
|
22255
|
+
* False when `before` is unknown: the live read of the object does not return this field, or the change creates the object. The field is still staged.
|
|
22252
22256
|
*/
|
|
22253
22257
|
beforeAvailable: boolean;
|
|
22254
22258
|
/**
|
|
@@ -22284,13 +22288,19 @@ export type StagedAdChange = {
|
|
|
22284
22288
|
*/
|
|
22285
22289
|
code?: string;
|
|
22286
22290
|
message?: (string) | null;
|
|
22291
|
+
/**
|
|
22292
|
+
* Creates only. What the failed create reported, such as objects it had already made on the ad network.
|
|
22293
|
+
*/
|
|
22294
|
+
details?: {
|
|
22295
|
+
[key: string]: unknown;
|
|
22296
|
+
};
|
|
22287
22297
|
};
|
|
22288
22298
|
};
|
|
22289
22299
|
|
|
22290
22300
|
/**
|
|
22291
|
-
* Which write was staged: a status route,
|
|
22301
|
+
* Which write was staged: a status route, the update route of a campaign, an ad set or an ad, or one of the create routes (POST /v1/ads/create, POST /v1/ads/campaigns, POST /v1/ads/ad-sets).
|
|
22292
22302
|
*/
|
|
22293
|
-
export type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update';
|
|
22303
|
+
export type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'ad_create' | 'campaign_create' | 'ad_set_create';
|
|
22294
22304
|
|
|
22295
22305
|
/**
|
|
22296
22306
|
* - `staged`: waiting to be confirmed or discarded.
|
|
@@ -69199,6 +69209,10 @@ export type ListAdCampaignsError = (ErrorResponse | unknown | {
|
|
|
69199
69209
|
|
|
69200
69210
|
export type CreateAdCampaignData = {
|
|
69201
69211
|
body: {
|
|
69212
|
+
/**
|
|
69213
|
+
* Send true to stage this create instead of sending it. Nothing is created on the ad network; the response is `202` with the staged change. Create it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; cannot be combined with `validateOnly`.
|
|
69214
|
+
*/
|
|
69215
|
+
stage?: boolean;
|
|
69202
69216
|
/**
|
|
69203
69217
|
* Zernio SocialAccount id (posting or ads variant); its platform decides where the campaign is created.
|
|
69204
69218
|
*/
|
|
@@ -69344,6 +69358,8 @@ export type CreateAdCampaignResponse = ({
|
|
|
69344
69358
|
*/
|
|
69345
69359
|
objective?: string;
|
|
69346
69360
|
status?: 'ACTIVE' | 'PAUSED';
|
|
69361
|
+
} | {
|
|
69362
|
+
change: StagedAdChange;
|
|
69347
69363
|
});
|
|
69348
69364
|
|
|
69349
69365
|
export type CreateAdCampaignError = (unknown | ErrorResponse);
|
|
@@ -70509,6 +70525,10 @@ export type ListAdSetsError = (ErrorResponse | unknown);
|
|
|
70509
70525
|
|
|
70510
70526
|
export type CreateAdSetData = {
|
|
70511
70527
|
body: {
|
|
70528
|
+
/**
|
|
70529
|
+
* Send true to stage this create instead of sending it. Nothing is created on the ad network; the response is `202` with the staged change. Create it with POST /v1/ads/changes/{changeId}/confirm. Google only: `platform: reddit` or `snapchat` returns 400 `staging_not_supported`.
|
|
70530
|
+
*/
|
|
70531
|
+
stage?: boolean;
|
|
70512
70532
|
/**
|
|
70513
70533
|
* Zernio SocialAccount id owning the Google Ads or Reddit Ads connection.
|
|
70514
70534
|
*/
|
|
@@ -70603,6 +70623,8 @@ export type CreateAdSetResponse = ({
|
|
|
70603
70623
|
*/
|
|
70604
70624
|
adSetId?: string;
|
|
70605
70625
|
campaignId?: string;
|
|
70626
|
+
} | {
|
|
70627
|
+
change: StagedAdChange;
|
|
70606
70628
|
});
|
|
70607
70629
|
|
|
70608
70630
|
export type CreateAdSetError = (ErrorResponse | unknown);
|
|
@@ -77876,6 +77898,10 @@ export type ReplaceGoogleListingGroupFiltersError = (ErrorResponse | {
|
|
|
77876
77898
|
|
|
77877
77899
|
export type CreateStandaloneAdData = {
|
|
77878
77900
|
body: {
|
|
77901
|
+
/**
|
|
77902
|
+
* Send true to stage this create instead of sending it. Nothing is created on the ad network; the response is `202` with the staged change. Create it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; not with `validateOnly` or a presigned media URL.
|
|
77903
|
+
*/
|
|
77904
|
+
stage?: boolean;
|
|
77879
77905
|
accountId: string;
|
|
77880
77906
|
adAccountId: string;
|
|
77881
77907
|
/**
|
|
@@ -79365,7 +79391,9 @@ export type CreateStandaloneAdResponse = ({
|
|
|
79365
79391
|
*
|
|
79366
79392
|
*/
|
|
79367
79393
|
warnings?: Array<(string)>;
|
|
79368
|
-
})
|
|
79394
|
+
}) | {
|
|
79395
|
+
change: StagedAdChange;
|
|
79396
|
+
});
|
|
79369
79397
|
|
|
79370
79398
|
export type CreateStandaloneAdError = (unknown | ErrorResponse);
|
|
79371
79399
|
|