@getlatedev/node 0.2.1811 → 0.2.1812

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 CHANGED
@@ -23884,9 +23884,9 @@ type StagedAdChange = {
23884
23884
  */
23885
23885
  id: string;
23886
23886
  /**
23887
- * 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).
23887
+ * Which write was staged: a status route, the update route of a campaign, an ad set or an ad, the campaign targeting route, or one of the create routes (POST /v1/ads/create, POST /v1/ads/campaigns, POST /v1/ads/ad-sets).
23888
23888
  */
23889
- type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'ad_create' | 'campaign_create' | 'ad_set_create';
23889
+ type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'campaign_targeting' | 'ad_create' | 'campaign_create' | 'ad_set_create';
23890
23890
  /**
23891
23891
  * The ad platform of the object, as the write route names it.
23892
23892
  */
@@ -23983,9 +23983,9 @@ type StagedAdChange = {
23983
23983
  };
23984
23984
  };
23985
23985
  /**
23986
- * 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).
23986
+ * Which write was staged: a status route, the update route of a campaign, an ad set or an ad, the campaign targeting route, or one of the create routes (POST /v1/ads/create, POST /v1/ads/campaigns, POST /v1/ads/ad-sets).
23987
23987
  */
23988
- type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'ad_create' | 'campaign_create' | 'ad_set_create';
23988
+ type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'campaign_targeting' | 'ad_create' | 'campaign_create' | 'ad_set_create';
23989
23989
  /**
23990
23990
  * - `staged`: waiting to be confirmed or discarded.
23991
23991
  * - `confirming`: a confirm is running. A change that stays here has an unknown outcome and is never applied again automatically.
@@ -24005,7 +24005,7 @@ type StagedAdChangeSummary = {
24005
24005
  /**
24006
24006
  * Which write was staged.
24007
24007
  */
24008
- type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'ad_create' | 'campaign_create' | 'ad_set_create';
24008
+ type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'campaign_targeting' | 'ad_create' | 'campaign_create' | 'ad_set_create';
24009
24009
  /**
24010
24010
  * The ad platform of the object, as the write route names it.
24011
24011
  */
@@ -68907,6 +68907,10 @@ type GetCampaignTargetingResponse = ({
68907
68907
  type GetCampaignTargetingError = (ErrorResponse | unknown);
68908
68908
  type UpdateCampaignTargetingData = {
68909
68909
  body: {
68910
+ /**
68911
+ * 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. Cannot be combined with `validateOnly` or `dryRun`.
68912
+ */
68913
+ stage?: boolean;
68910
68914
  platform: 'google';
68911
68915
  targeting: {
68912
68916
  /**
@@ -69041,6 +69045,8 @@ type UpdateCampaignTargetingResponse = ({
69041
69045
  id?: string;
69042
69046
  name?: string;
69043
69047
  }>;
69048
+ } | {
69049
+ change: StagedAdChange;
69044
69050
  });
69045
69051
  type UpdateCampaignTargetingError = (ErrorResponse | unknown);
69046
69052
  type ListAdSetsData = {
package/dist/index.d.ts CHANGED
@@ -23884,9 +23884,9 @@ type StagedAdChange = {
23884
23884
  */
23885
23885
  id: string;
23886
23886
  /**
23887
- * 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).
23887
+ * Which write was staged: a status route, the update route of a campaign, an ad set or an ad, the campaign targeting route, or one of the create routes (POST /v1/ads/create, POST /v1/ads/campaigns, POST /v1/ads/ad-sets).
23888
23888
  */
23889
- type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'ad_create' | 'campaign_create' | 'ad_set_create';
23889
+ type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'campaign_targeting' | 'ad_create' | 'campaign_create' | 'ad_set_create';
23890
23890
  /**
23891
23891
  * The ad platform of the object, as the write route names it.
23892
23892
  */
@@ -23983,9 +23983,9 @@ type StagedAdChange = {
23983
23983
  };
23984
23984
  };
23985
23985
  /**
23986
- * 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).
23986
+ * Which write was staged: a status route, the update route of a campaign, an ad set or an ad, the campaign targeting route, or one of the create routes (POST /v1/ads/create, POST /v1/ads/campaigns, POST /v1/ads/ad-sets).
23987
23987
  */
23988
- type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'ad_create' | 'campaign_create' | 'ad_set_create';
23988
+ type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'campaign_targeting' | 'ad_create' | 'campaign_create' | 'ad_set_create';
23989
23989
  /**
23990
23990
  * - `staged`: waiting to be confirmed or discarded.
23991
23991
  * - `confirming`: a confirm is running. A change that stays here has an unknown outcome and is never applied again automatically.
@@ -24005,7 +24005,7 @@ type StagedAdChangeSummary = {
24005
24005
  /**
24006
24006
  * Which write was staged.
24007
24007
  */
24008
- type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'ad_create' | 'campaign_create' | 'ad_set_create';
24008
+ type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'campaign_targeting' | 'ad_create' | 'campaign_create' | 'ad_set_create';
24009
24009
  /**
24010
24010
  * The ad platform of the object, as the write route names it.
24011
24011
  */
@@ -68907,6 +68907,10 @@ type GetCampaignTargetingResponse = ({
68907
68907
  type GetCampaignTargetingError = (ErrorResponse | unknown);
68908
68908
  type UpdateCampaignTargetingData = {
68909
68909
  body: {
68910
+ /**
68911
+ * 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. Cannot be combined with `validateOnly` or `dryRun`.
68912
+ */
68913
+ stage?: boolean;
68910
68914
  platform: 'google';
68911
68915
  targeting: {
68912
68916
  /**
@@ -69041,6 +69045,8 @@ type UpdateCampaignTargetingResponse = ({
69041
69045
  id?: string;
69042
69046
  name?: string;
69043
69047
  }>;
69048
+ } | {
69049
+ change: StagedAdChange;
69044
69050
  });
69045
69051
  type UpdateCampaignTargetingError = (ErrorResponse | unknown);
69046
69052
  type ListAdSetsData = {
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.1811",
39
+ version: "0.2.1812",
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.1811",
8
+ version: "0.2.1812",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.2.1811",
3
+ "version": "0.2.1812",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -16392,6 +16392,16 @@ export const getCampaignTargeting = <ThrowOnError extends boolean = false>(optio
16392
16392
  * - `devices` and `locationTargetingType` stay campaign-level.
16393
16393
  * - `excludedLocations` is not available on Demand Gen yet and returns 400.
16394
16394
  *
16395
+ * ### Staging
16396
+ *
16397
+ * Send `stage: true` to store the edit as an ad change of type `campaign_targeting` instead of applying it. The answer is `202` with the change.
16398
+ *
16399
+ * Its diff has one entry per value under `targeting`. `before` comes from the campaign's devices, locations, excluded locations, languages and location targeting type, read live from Google.
16400
+ *
16401
+ * Confirm reads them again and answers `409` if any of them changed.
16402
+ *
16403
+ * A Demand Gen campaign's targeting cannot be staged yet: its locations and languages live on its ad groups, which that read does not cover. `stage: true` on one returns `400` with code `staging_not_supported` before anything is stored.
16404
+ *
16395
16405
  */
16396
16406
  export const updateCampaignTargeting = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateCampaignTargetingData, ThrowOnError>) => {
16397
16407
  return (options?.client ?? client).put<UpdateCampaignTargetingResponse, UpdateCampaignTargetingError, ThrowOnError>({
@@ -22211,9 +22211,9 @@ export type StagedAdChange = {
22211
22211
  */
22212
22212
  id: string;
22213
22213
  /**
22214
- * 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).
22214
+ * Which write was staged: a status route, the update route of a campaign, an ad set or an ad, the campaign targeting route, or one of the create routes (POST /v1/ads/create, POST /v1/ads/campaigns, POST /v1/ads/ad-sets).
22215
22215
  */
22216
- type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'ad_create' | 'campaign_create' | 'ad_set_create';
22216
+ type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'campaign_targeting' | 'ad_create' | 'campaign_create' | 'ad_set_create';
22217
22217
  /**
22218
22218
  * The ad platform of the object, as the write route names it.
22219
22219
  */
@@ -22311,9 +22311,9 @@ export type StagedAdChange = {
22311
22311
  };
22312
22312
 
22313
22313
  /**
22314
- * 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).
22314
+ * Which write was staged: a status route, the update route of a campaign, an ad set or an ad, the campaign targeting route, or one of the create routes (POST /v1/ads/create, POST /v1/ads/campaigns, POST /v1/ads/ad-sets).
22315
22315
  */
22316
- export type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'ad_create' | 'campaign_create' | 'ad_set_create';
22316
+ export type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'campaign_targeting' | 'ad_create' | 'campaign_create' | 'ad_set_create';
22317
22317
 
22318
22318
  /**
22319
22319
  * - `staged`: waiting to be confirmed or discarded.
@@ -22335,7 +22335,7 @@ export type StagedAdChangeSummary = {
22335
22335
  /**
22336
22336
  * Which write was staged.
22337
22337
  */
22338
- type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'ad_create' | 'campaign_create' | 'ad_set_create';
22338
+ type: 'campaign_status' | 'ad_set_status' | 'ad_status' | 'campaign_update' | 'ad_set_update' | 'ad_update' | 'campaign_targeting' | 'ad_create' | 'campaign_create' | 'ad_set_create';
22339
22339
  /**
22340
22340
  * The ad platform of the object, as the write route names it.
22341
22341
  */
@@ -70322,6 +70322,10 @@ export type GetCampaignTargetingError = (ErrorResponse | unknown);
70322
70322
 
70323
70323
  export type UpdateCampaignTargetingData = {
70324
70324
  body: {
70325
+ /**
70326
+ * 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. Cannot be combined with `validateOnly` or `dryRun`.
70327
+ */
70328
+ stage?: boolean;
70325
70329
  platform: 'google';
70326
70330
  targeting: {
70327
70331
  /**
@@ -70457,6 +70461,8 @@ export type UpdateCampaignTargetingResponse = ({
70457
70461
  id?: string;
70458
70462
  name?: string;
70459
70463
  }>;
70464
+ } | {
70465
+ change: StagedAdChange;
70460
70466
  });
70461
70467
 
70462
70468
  export type UpdateCampaignTargetingError = (ErrorResponse | unknown);