@getlatedev/node 0.2.1791 → 0.2.1793
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 +47 -9
- package/dist/index.d.ts +47 -9
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +5 -1
- package/src/generated/types.gen.ts +47 -9
package/dist/index.d.mts
CHANGED
|
@@ -23824,9 +23824,9 @@ type StagedAdChange = {
|
|
|
23824
23824
|
*/
|
|
23825
23825
|
id: string;
|
|
23826
23826
|
/**
|
|
23827
|
-
* Which write was staged.
|
|
23827
|
+
* Which write was staged: a status route, or the update route of a campaign, an ad set or an ad.
|
|
23828
23828
|
*/
|
|
23829
|
-
type: 'campaign_status' | 'ad_set_status' | 'ad_status';
|
|
23829
|
+
type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update';
|
|
23830
23830
|
/**
|
|
23831
23831
|
* The ad platform of the object, as the write route names it.
|
|
23832
23832
|
*/
|
|
@@ -23852,22 +23852,39 @@ type StagedAdChange = {
|
|
|
23852
23852
|
*/
|
|
23853
23853
|
status: 'staged' | 'confirming' | 'confirmed' | 'failed';
|
|
23854
23854
|
/**
|
|
23855
|
-
* One entry per
|
|
23855
|
+
* One entry per value of the staged request that the write would change.
|
|
23856
|
+
*
|
|
23857
|
+
* - A nested field is flattened: each leaf is one entry under its dotted path (`budget.amount`, `targeting.ageMin`, `creative.headline`).
|
|
23858
|
+
* - A list is one entry.
|
|
23859
|
+
* - A leaf whose value on the ad network already equals the requested value is left out, so the list can be empty.
|
|
23860
|
+
* - `stage` and other flags that only steer the write are never listed.
|
|
23861
|
+
*
|
|
23856
23862
|
*/
|
|
23857
23863
|
diff: Array<{
|
|
23864
|
+
/**
|
|
23865
|
+
* The dotted path of the value in the request body.
|
|
23866
|
+
*/
|
|
23858
23867
|
field: string;
|
|
23859
23868
|
/**
|
|
23860
|
-
* The value on the ad network when the change was staged. Null when `beforeAvailable` is false.
|
|
23869
|
+
* The value on the ad network when the change was staged, in the units and shape of the request body. Null when `beforeAvailable` is false, and also when the object holds no value there.
|
|
23861
23870
|
*/
|
|
23862
23871
|
before: unknown;
|
|
23863
23872
|
/**
|
|
23864
|
-
* The value the change will write.
|
|
23873
|
+
* The value the change will write. Null or an empty string clears the field where the write route allows that.
|
|
23865
23874
|
*/
|
|
23866
23875
|
after: unknown;
|
|
23867
23876
|
/**
|
|
23868
|
-
* False when the live read of the object does not return this field, so `before` is unknown.
|
|
23877
|
+
* False when the live read of the object does not return this field, so `before` is unknown. The field is still staged.
|
|
23869
23878
|
*/
|
|
23870
23879
|
beforeAvailable: boolean;
|
|
23880
|
+
/**
|
|
23881
|
+
* Only on a list of plain values (strings or numbers) with `beforeAvailable` true: the values in `after` that are not in `before`. Order is ignored.
|
|
23882
|
+
*/
|
|
23883
|
+
added?: Array<unknown>;
|
|
23884
|
+
/**
|
|
23885
|
+
* Only on a list of plain values (strings or numbers) with `beforeAvailable` true: the values in `before` that are not in `after`. Order is ignored.
|
|
23886
|
+
*/
|
|
23887
|
+
removed?: Array<unknown>;
|
|
23871
23888
|
}>;
|
|
23872
23889
|
/**
|
|
23873
23890
|
* The user who staged the change.
|
|
@@ -23896,9 +23913,9 @@ type StagedAdChange = {
|
|
|
23896
23913
|
};
|
|
23897
23914
|
};
|
|
23898
23915
|
/**
|
|
23899
|
-
* Which write was staged.
|
|
23916
|
+
* Which write was staged: a status route, or the update route of a campaign, an ad set or an ad.
|
|
23900
23917
|
*/
|
|
23901
|
-
type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status';
|
|
23918
|
+
type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update';
|
|
23902
23919
|
/**
|
|
23903
23920
|
* - `staged`: waiting to be confirmed or discarded.
|
|
23904
23921
|
* - `confirming`: a confirm is running. A change that stays here has an unknown outcome and is never applied again automatically.
|
|
@@ -68129,6 +68146,10 @@ type GetAdCampaignDetailsResponse = ({
|
|
|
68129
68146
|
type GetAdCampaignDetailsError = (ErrorResponse | unknown);
|
|
68130
68147
|
type UpdateAdCampaignData = {
|
|
68131
68148
|
body: {
|
|
68149
|
+
/**
|
|
68150
|
+
* Send true to stage this change instead of applying it. Nothing is written to the ad network; the response is `202` with the staged change and its diff. Apply it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; cannot be combined with `validateOnly` or `dryRun`.
|
|
68151
|
+
*/
|
|
68152
|
+
stage?: boolean;
|
|
68132
68153
|
/**
|
|
68133
68154
|
* Required: platform campaign IDs are not globally unique.
|
|
68134
68155
|
*/
|
|
@@ -68255,6 +68276,8 @@ type UpdateAdCampaignResponse = ({
|
|
|
68255
68276
|
platformSpecificData?: {
|
|
68256
68277
|
[key: string]: unknown;
|
|
68257
68278
|
};
|
|
68279
|
+
} | {
|
|
68280
|
+
change: StagedAdChange;
|
|
68258
68281
|
});
|
|
68259
68282
|
type UpdateAdCampaignError = (unknown | ErrorResponse);
|
|
68260
68283
|
type DeleteAdCampaignData = {
|
|
@@ -69292,6 +69315,10 @@ type GetAdSetDetailsResponse = ({
|
|
|
69292
69315
|
type GetAdSetDetailsError = (unknown | ErrorResponse);
|
|
69293
69316
|
type UpdateAdSetData = {
|
|
69294
69317
|
body: {
|
|
69318
|
+
/**
|
|
69319
|
+
* Send true to stage this change instead of applying it. Nothing is written to the ad network; the response is `202` with the staged change and its diff. Apply it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; cannot be combined with `validateOnly` or `dryRun`.
|
|
69320
|
+
*/
|
|
69321
|
+
stage?: boolean;
|
|
69295
69322
|
platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'snapchat';
|
|
69296
69323
|
/**
|
|
69297
69324
|
* Omit if not updating budget
|
|
@@ -69624,6 +69651,8 @@ type UpdateAdSetResponse = ({
|
|
|
69624
69651
|
* Reddit: the end_time written, a UTC instant, or null when the end date was removed. Present when `endDate` was sent.
|
|
69625
69652
|
*/
|
|
69626
69653
|
endDate?: (string) | null;
|
|
69654
|
+
} | {
|
|
69655
|
+
change: StagedAdChange;
|
|
69627
69656
|
});
|
|
69628
69657
|
type UpdateAdSetError = (unknown | ErrorResponse);
|
|
69629
69658
|
type DeleteAdSetData = {
|
|
@@ -70072,6 +70101,10 @@ type GetAdError = (ErrorResponse | {
|
|
|
70072
70101
|
} | unknown);
|
|
70073
70102
|
type UpdateAdData = {
|
|
70074
70103
|
body: {
|
|
70104
|
+
/**
|
|
70105
|
+
* Send true to stage this change instead of applying it. Nothing is written to the ad network; the response is `202` with the staged change and its diff. Apply it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; cannot be combined with `validateOnly` or `dryRun`.
|
|
70106
|
+
*/
|
|
70107
|
+
stage?: boolean;
|
|
70075
70108
|
/**
|
|
70076
70109
|
* Google Search and Display only. Replaces the complete headline list. Search takes 3-15, Display 1-5 and rejects pinnedField; the count is checked once the ad's channel is known. No padding or truncation on update.
|
|
70077
70110
|
*/
|
|
@@ -70362,6 +70395,8 @@ type UpdateAdData = {
|
|
|
70362
70395
|
type UpdateAdResponse = ({
|
|
70363
70396
|
ad?: Ad;
|
|
70364
70397
|
message?: string;
|
|
70398
|
+
} | {
|
|
70399
|
+
change: StagedAdChange;
|
|
70365
70400
|
});
|
|
70366
70401
|
type UpdateAdError = (unknown | ErrorResponse);
|
|
70367
70402
|
type DeleteAdData = {
|
|
@@ -80281,10 +80316,13 @@ type SendEventsData = {
|
|
|
80281
80316
|
events: Array<ConversionEvent>;
|
|
80282
80317
|
/**
|
|
80283
80318
|
* Send to these destinations instead of the saved ones (every event goes to each).
|
|
80319
|
+
*
|
|
80320
|
+
* A Google Analytics stream is sent to with the Measurement Protocol API secret saved on a forwarding rule for the same account and stream: the rule of this `profileId`, else the most recently changed one in your other profiles. With none saved, the destination's `error` says how to save one.
|
|
80321
|
+
*
|
|
80284
80322
|
*/
|
|
80285
80323
|
destinations?: Array<{
|
|
80286
80324
|
/**
|
|
80287
|
-
*
|
|
80325
|
+
* ID of the connected account that owns the destination (metaads, googleads, googleanalytics or any other account POST /v1/events sends to).
|
|
80288
80326
|
*/
|
|
80289
80327
|
accountId: string;
|
|
80290
80328
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -23824,9 +23824,9 @@ type StagedAdChange = {
|
|
|
23824
23824
|
*/
|
|
23825
23825
|
id: string;
|
|
23826
23826
|
/**
|
|
23827
|
-
* Which write was staged.
|
|
23827
|
+
* Which write was staged: a status route, or the update route of a campaign, an ad set or an ad.
|
|
23828
23828
|
*/
|
|
23829
|
-
type: 'campaign_status' | 'ad_set_status' | 'ad_status';
|
|
23829
|
+
type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update';
|
|
23830
23830
|
/**
|
|
23831
23831
|
* The ad platform of the object, as the write route names it.
|
|
23832
23832
|
*/
|
|
@@ -23852,22 +23852,39 @@ type StagedAdChange = {
|
|
|
23852
23852
|
*/
|
|
23853
23853
|
status: 'staged' | 'confirming' | 'confirmed' | 'failed';
|
|
23854
23854
|
/**
|
|
23855
|
-
* One entry per
|
|
23855
|
+
* One entry per value of the staged request that the write would change.
|
|
23856
|
+
*
|
|
23857
|
+
* - A nested field is flattened: each leaf is one entry under its dotted path (`budget.amount`, `targeting.ageMin`, `creative.headline`).
|
|
23858
|
+
* - A list is one entry.
|
|
23859
|
+
* - A leaf whose value on the ad network already equals the requested value is left out, so the list can be empty.
|
|
23860
|
+
* - `stage` and other flags that only steer the write are never listed.
|
|
23861
|
+
*
|
|
23856
23862
|
*/
|
|
23857
23863
|
diff: Array<{
|
|
23864
|
+
/**
|
|
23865
|
+
* The dotted path of the value in the request body.
|
|
23866
|
+
*/
|
|
23858
23867
|
field: string;
|
|
23859
23868
|
/**
|
|
23860
|
-
* The value on the ad network when the change was staged. Null when `beforeAvailable` is false.
|
|
23869
|
+
* The value on the ad network when the change was staged, in the units and shape of the request body. Null when `beforeAvailable` is false, and also when the object holds no value there.
|
|
23861
23870
|
*/
|
|
23862
23871
|
before: unknown;
|
|
23863
23872
|
/**
|
|
23864
|
-
* The value the change will write.
|
|
23873
|
+
* The value the change will write. Null or an empty string clears the field where the write route allows that.
|
|
23865
23874
|
*/
|
|
23866
23875
|
after: unknown;
|
|
23867
23876
|
/**
|
|
23868
|
-
* False when the live read of the object does not return this field, so `before` is unknown.
|
|
23877
|
+
* False when the live read of the object does not return this field, so `before` is unknown. The field is still staged.
|
|
23869
23878
|
*/
|
|
23870
23879
|
beforeAvailable: boolean;
|
|
23880
|
+
/**
|
|
23881
|
+
* Only on a list of plain values (strings or numbers) with `beforeAvailable` true: the values in `after` that are not in `before`. Order is ignored.
|
|
23882
|
+
*/
|
|
23883
|
+
added?: Array<unknown>;
|
|
23884
|
+
/**
|
|
23885
|
+
* Only on a list of plain values (strings or numbers) with `beforeAvailable` true: the values in `before` that are not in `after`. Order is ignored.
|
|
23886
|
+
*/
|
|
23887
|
+
removed?: Array<unknown>;
|
|
23871
23888
|
}>;
|
|
23872
23889
|
/**
|
|
23873
23890
|
* The user who staged the change.
|
|
@@ -23896,9 +23913,9 @@ type StagedAdChange = {
|
|
|
23896
23913
|
};
|
|
23897
23914
|
};
|
|
23898
23915
|
/**
|
|
23899
|
-
* Which write was staged.
|
|
23916
|
+
* Which write was staged: a status route, or the update route of a campaign, an ad set or an ad.
|
|
23900
23917
|
*/
|
|
23901
|
-
type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status';
|
|
23918
|
+
type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update';
|
|
23902
23919
|
/**
|
|
23903
23920
|
* - `staged`: waiting to be confirmed or discarded.
|
|
23904
23921
|
* - `confirming`: a confirm is running. A change that stays here has an unknown outcome and is never applied again automatically.
|
|
@@ -68129,6 +68146,10 @@ type GetAdCampaignDetailsResponse = ({
|
|
|
68129
68146
|
type GetAdCampaignDetailsError = (ErrorResponse | unknown);
|
|
68130
68147
|
type UpdateAdCampaignData = {
|
|
68131
68148
|
body: {
|
|
68149
|
+
/**
|
|
68150
|
+
* Send true to stage this change instead of applying it. Nothing is written to the ad network; the response is `202` with the staged change and its diff. Apply it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; cannot be combined with `validateOnly` or `dryRun`.
|
|
68151
|
+
*/
|
|
68152
|
+
stage?: boolean;
|
|
68132
68153
|
/**
|
|
68133
68154
|
* Required: platform campaign IDs are not globally unique.
|
|
68134
68155
|
*/
|
|
@@ -68255,6 +68276,8 @@ type UpdateAdCampaignResponse = ({
|
|
|
68255
68276
|
platformSpecificData?: {
|
|
68256
68277
|
[key: string]: unknown;
|
|
68257
68278
|
};
|
|
68279
|
+
} | {
|
|
68280
|
+
change: StagedAdChange;
|
|
68258
68281
|
});
|
|
68259
68282
|
type UpdateAdCampaignError = (unknown | ErrorResponse);
|
|
68260
68283
|
type DeleteAdCampaignData = {
|
|
@@ -69292,6 +69315,10 @@ type GetAdSetDetailsResponse = ({
|
|
|
69292
69315
|
type GetAdSetDetailsError = (unknown | ErrorResponse);
|
|
69293
69316
|
type UpdateAdSetData = {
|
|
69294
69317
|
body: {
|
|
69318
|
+
/**
|
|
69319
|
+
* Send true to stage this change instead of applying it. Nothing is written to the ad network; the response is `202` with the staged change and its diff. Apply it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; cannot be combined with `validateOnly` or `dryRun`.
|
|
69320
|
+
*/
|
|
69321
|
+
stage?: boolean;
|
|
69295
69322
|
platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'snapchat';
|
|
69296
69323
|
/**
|
|
69297
69324
|
* Omit if not updating budget
|
|
@@ -69624,6 +69651,8 @@ type UpdateAdSetResponse = ({
|
|
|
69624
69651
|
* Reddit: the end_time written, a UTC instant, or null when the end date was removed. Present when `endDate` was sent.
|
|
69625
69652
|
*/
|
|
69626
69653
|
endDate?: (string) | null;
|
|
69654
|
+
} | {
|
|
69655
|
+
change: StagedAdChange;
|
|
69627
69656
|
});
|
|
69628
69657
|
type UpdateAdSetError = (unknown | ErrorResponse);
|
|
69629
69658
|
type DeleteAdSetData = {
|
|
@@ -70072,6 +70101,10 @@ type GetAdError = (ErrorResponse | {
|
|
|
70072
70101
|
} | unknown);
|
|
70073
70102
|
type UpdateAdData = {
|
|
70074
70103
|
body: {
|
|
70104
|
+
/**
|
|
70105
|
+
* Send true to stage this change instead of applying it. Nothing is written to the ad network; the response is `202` with the staged change and its diff. Apply it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; cannot be combined with `validateOnly` or `dryRun`.
|
|
70106
|
+
*/
|
|
70107
|
+
stage?: boolean;
|
|
70075
70108
|
/**
|
|
70076
70109
|
* Google Search and Display only. Replaces the complete headline list. Search takes 3-15, Display 1-5 and rejects pinnedField; the count is checked once the ad's channel is known. No padding or truncation on update.
|
|
70077
70110
|
*/
|
|
@@ -70362,6 +70395,8 @@ type UpdateAdData = {
|
|
|
70362
70395
|
type UpdateAdResponse = ({
|
|
70363
70396
|
ad?: Ad;
|
|
70364
70397
|
message?: string;
|
|
70398
|
+
} | {
|
|
70399
|
+
change: StagedAdChange;
|
|
70365
70400
|
});
|
|
70366
70401
|
type UpdateAdError = (unknown | ErrorResponse);
|
|
70367
70402
|
type DeleteAdData = {
|
|
@@ -80281,10 +80316,13 @@ type SendEventsData = {
|
|
|
80281
80316
|
events: Array<ConversionEvent>;
|
|
80282
80317
|
/**
|
|
80283
80318
|
* Send to these destinations instead of the saved ones (every event goes to each).
|
|
80319
|
+
*
|
|
80320
|
+
* A Google Analytics stream is sent to with the Measurement Protocol API secret saved on a forwarding rule for the same account and stream: the rule of this `profileId`, else the most recently changed one in your other profiles. With none saved, the destination's `error` says how to save one.
|
|
80321
|
+
*
|
|
80284
80322
|
*/
|
|
80285
80323
|
destinations?: Array<{
|
|
80286
80324
|
/**
|
|
80287
|
-
*
|
|
80325
|
+
* ID of the connected account that owns the destination (metaads, googleads, googleanalytics or any other account POST /v1/events sends to).
|
|
80288
80326
|
*/
|
|
80289
80327
|
accountId: string;
|
|
80290
80328
|
/**
|
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.1793",
|
|
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.1793",
|
|
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
|
@@ -15441,6 +15441,8 @@ export const discardAdChange = <ThrowOnError extends boolean = false>(options: O
|
|
|
15441
15441
|
*
|
|
15442
15442
|
* A change is applied at most once. Confirming a change that is already `confirmed` returns its stored result again. A change that failed answers `409` `change_not_staged`: stage a new one.
|
|
15443
15443
|
*
|
|
15444
|
+
* 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`.
|
|
15445
|
+
*
|
|
15444
15446
|
*/
|
|
15445
15447
|
export const confirmAdChange = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ConfirmAdChangeData, ThrowOnError>) => {
|
|
15446
15448
|
return (options?.client ?? client).post<ConfirmAdChangeResponse, ConfirmAdChangeError, ThrowOnError>({
|
|
@@ -21849,7 +21851,9 @@ export const createForwardingRule = <ThrowOnError extends boolean = false>(optio
|
|
|
21849
21851
|
* Update a forwarding rule
|
|
21850
21852
|
* Changes the fields you send and keeps the others. Send `eventNameMap: null` to stop renaming, `valueOverride: { "mode": "original" }` to send the event's own value again, and `valueCondition: null` to forward whatever the value. `eventValues` replaces the whole map; `null` or `{}` clears it.
|
|
21851
21853
|
*
|
|
21852
|
-
* `apiSecret` replaces the secret of a rule whose destination needs one, such as a Google Analytics data stream's Measurement Protocol API secret.
|
|
21854
|
+
* `apiSecret` replaces the secret of a rule whose destination needs one, such as a Google Analytics data stream's Measurement Protocol API secret. Events that name the stream in `destinations` on `POST /v1/events` use it too.
|
|
21855
|
+
*
|
|
21856
|
+
* Before saving, Zernio sends one hit to Google's validation server; Google does not confirm the secret itself, so check GA4 Realtime after the next events.
|
|
21853
21857
|
*
|
|
21854
21858
|
*/
|
|
21855
21859
|
export const updateForwardingRule = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateForwardingRuleData, ThrowOnError>) => {
|
|
@@ -22148,9 +22148,9 @@ export type StagedAdChange = {
|
|
|
22148
22148
|
*/
|
|
22149
22149
|
id: string;
|
|
22150
22150
|
/**
|
|
22151
|
-
* Which write was staged.
|
|
22151
|
+
* Which write was staged: a status route, or the update route of a campaign, an ad set or an ad.
|
|
22152
22152
|
*/
|
|
22153
|
-
type: 'campaign_status' | 'ad_set_status' | 'ad_status';
|
|
22153
|
+
type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update';
|
|
22154
22154
|
/**
|
|
22155
22155
|
* The ad platform of the object, as the write route names it.
|
|
22156
22156
|
*/
|
|
@@ -22176,22 +22176,39 @@ export type StagedAdChange = {
|
|
|
22176
22176
|
*/
|
|
22177
22177
|
status: 'staged' | 'confirming' | 'confirmed' | 'failed';
|
|
22178
22178
|
/**
|
|
22179
|
-
* One entry per
|
|
22179
|
+
* One entry per value of the staged request that the write would change.
|
|
22180
|
+
*
|
|
22181
|
+
* - A nested field is flattened: each leaf is one entry under its dotted path (`budget.amount`, `targeting.ageMin`, `creative.headline`).
|
|
22182
|
+
* - A list is one entry.
|
|
22183
|
+
* - A leaf whose value on the ad network already equals the requested value is left out, so the list can be empty.
|
|
22184
|
+
* - `stage` and other flags that only steer the write are never listed.
|
|
22185
|
+
*
|
|
22180
22186
|
*/
|
|
22181
22187
|
diff: Array<{
|
|
22188
|
+
/**
|
|
22189
|
+
* The dotted path of the value in the request body.
|
|
22190
|
+
*/
|
|
22182
22191
|
field: string;
|
|
22183
22192
|
/**
|
|
22184
|
-
* The value on the ad network when the change was staged. Null when `beforeAvailable` is false.
|
|
22193
|
+
* The value on the ad network when the change was staged, in the units and shape of the request body. Null when `beforeAvailable` is false, and also when the object holds no value there.
|
|
22185
22194
|
*/
|
|
22186
22195
|
before: unknown;
|
|
22187
22196
|
/**
|
|
22188
|
-
* The value the change will write.
|
|
22197
|
+
* The value the change will write. Null or an empty string clears the field where the write route allows that.
|
|
22189
22198
|
*/
|
|
22190
22199
|
after: unknown;
|
|
22191
22200
|
/**
|
|
22192
|
-
* False when the live read of the object does not return this field, so `before` is unknown.
|
|
22201
|
+
* False when the live read of the object does not return this field, so `before` is unknown. The field is still staged.
|
|
22193
22202
|
*/
|
|
22194
22203
|
beforeAvailable: boolean;
|
|
22204
|
+
/**
|
|
22205
|
+
* Only on a list of plain values (strings or numbers) with `beforeAvailable` true: the values in `after` that are not in `before`. Order is ignored.
|
|
22206
|
+
*/
|
|
22207
|
+
added?: Array<unknown>;
|
|
22208
|
+
/**
|
|
22209
|
+
* Only on a list of plain values (strings or numbers) with `beforeAvailable` true: the values in `before` that are not in `after`. Order is ignored.
|
|
22210
|
+
*/
|
|
22211
|
+
removed?: Array<unknown>;
|
|
22195
22212
|
}>;
|
|
22196
22213
|
/**
|
|
22197
22214
|
* The user who staged the change.
|
|
@@ -22221,9 +22238,9 @@ export type StagedAdChange = {
|
|
|
22221
22238
|
};
|
|
22222
22239
|
|
|
22223
22240
|
/**
|
|
22224
|
-
* Which write was staged.
|
|
22241
|
+
* Which write was staged: a status route, or the update route of a campaign, an ad set or an ad.
|
|
22225
22242
|
*/
|
|
22226
|
-
export type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status';
|
|
22243
|
+
export type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update';
|
|
22227
22244
|
|
|
22228
22245
|
/**
|
|
22229
22246
|
* - `staged`: waiting to be confirmed or discarded.
|
|
@@ -69512,6 +69529,10 @@ export type GetAdCampaignDetailsError = (ErrorResponse | unknown);
|
|
|
69512
69529
|
|
|
69513
69530
|
export type UpdateAdCampaignData = {
|
|
69514
69531
|
body: {
|
|
69532
|
+
/**
|
|
69533
|
+
* Send true to stage this change instead of applying it. Nothing is written to the ad network; the response is `202` with the staged change and its diff. Apply it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; cannot be combined with `validateOnly` or `dryRun`.
|
|
69534
|
+
*/
|
|
69535
|
+
stage?: boolean;
|
|
69515
69536
|
/**
|
|
69516
69537
|
* Required: platform campaign IDs are not globally unique.
|
|
69517
69538
|
*/
|
|
@@ -69639,6 +69660,8 @@ export type UpdateAdCampaignResponse = ({
|
|
|
69639
69660
|
platformSpecificData?: {
|
|
69640
69661
|
[key: string]: unknown;
|
|
69641
69662
|
};
|
|
69663
|
+
} | {
|
|
69664
|
+
change: StagedAdChange;
|
|
69642
69665
|
});
|
|
69643
69666
|
|
|
69644
69667
|
export type UpdateAdCampaignError = (unknown | ErrorResponse);
|
|
@@ -70717,6 +70740,10 @@ export type GetAdSetDetailsError = (unknown | ErrorResponse);
|
|
|
70717
70740
|
|
|
70718
70741
|
export type UpdateAdSetData = {
|
|
70719
70742
|
body: {
|
|
70743
|
+
/**
|
|
70744
|
+
* Send true to stage this change instead of applying it. Nothing is written to the ad network; the response is `202` with the staged change and its diff. Apply it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; cannot be combined with `validateOnly` or `dryRun`.
|
|
70745
|
+
*/
|
|
70746
|
+
stage?: boolean;
|
|
70720
70747
|
platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'snapchat';
|
|
70721
70748
|
/**
|
|
70722
70749
|
* Omit if not updating budget
|
|
@@ -71050,6 +71077,8 @@ export type UpdateAdSetResponse = ({
|
|
|
71050
71077
|
* Reddit: the end_time written, a UTC instant, or null when the end date was removed. Present when `endDate` was sent.
|
|
71051
71078
|
*/
|
|
71052
71079
|
endDate?: (string) | null;
|
|
71080
|
+
} | {
|
|
71081
|
+
change: StagedAdChange;
|
|
71053
71082
|
});
|
|
71054
71083
|
|
|
71055
71084
|
export type UpdateAdSetError = (unknown | ErrorResponse);
|
|
@@ -71521,6 +71550,10 @@ export type GetAdError = (ErrorResponse | {
|
|
|
71521
71550
|
|
|
71522
71551
|
export type UpdateAdData = {
|
|
71523
71552
|
body: {
|
|
71553
|
+
/**
|
|
71554
|
+
* Send true to stage this change instead of applying it. Nothing is written to the ad network; the response is `202` with the staged change and its diff. Apply it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; cannot be combined with `validateOnly` or `dryRun`.
|
|
71555
|
+
*/
|
|
71556
|
+
stage?: boolean;
|
|
71524
71557
|
/**
|
|
71525
71558
|
* Google Search and Display only. Replaces the complete headline list. Search takes 3-15, Display 1-5 and rejects pinnedField; the count is checked once the ad's channel is known. No padding or truncation on update.
|
|
71526
71559
|
*/
|
|
@@ -71812,6 +71845,8 @@ export type UpdateAdData = {
|
|
|
71812
71845
|
export type UpdateAdResponse = ({
|
|
71813
71846
|
ad?: Ad;
|
|
71814
71847
|
message?: string;
|
|
71848
|
+
} | {
|
|
71849
|
+
change: StagedAdChange;
|
|
71815
71850
|
});
|
|
71816
71851
|
|
|
71817
71852
|
export type UpdateAdError = (unknown | ErrorResponse);
|
|
@@ -82282,10 +82317,13 @@ export type SendEventsData = {
|
|
|
82282
82317
|
events: Array<ConversionEvent>;
|
|
82283
82318
|
/**
|
|
82284
82319
|
* Send to these destinations instead of the saved ones (every event goes to each).
|
|
82320
|
+
*
|
|
82321
|
+
* A Google Analytics stream is sent to with the Measurement Protocol API secret saved on a forwarding rule for the same account and stream: the rule of this `profileId`, else the most recently changed one in your other profiles. With none saved, the destination's `error` says how to save one.
|
|
82322
|
+
*
|
|
82285
82323
|
*/
|
|
82286
82324
|
destinations?: Array<{
|
|
82287
82325
|
/**
|
|
82288
|
-
*
|
|
82326
|
+
* ID of the connected account that owns the destination (metaads, googleads, googleanalytics or any other account POST /v1/events sends to).
|
|
82289
82327
|
*/
|
|
82290
82328
|
accountId: string;
|
|
82291
82329
|
/**
|