@getlatedev/node 0.2.1349 → 0.2.1350
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 +42 -7
- package/dist/index.d.ts +42 -7
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +1 -1
- package/src/generated/types.gen.ts +43 -6
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.1350",
|
|
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.1350",
|
|
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
|
@@ -13855,7 +13855,7 @@ export const replaceGoogleListingGroupFilters = <ThrowOnError extends boolean =
|
|
|
13855
13855
|
*
|
|
13856
13856
|
* **Meta required fields per shape** (a missing one is a 400 naming it in `param`):
|
|
13857
13857
|
*
|
|
13858
|
-
* - Every shape that builds a new ad set (no `adSetId`, `existingCampaignId` or `buyingType: "RESERVED"`): `budgetAmount` and
|
|
13858
|
+
* - Every shape that builds a new ad set (no `adSetId`, `existingCampaignId` or `buyingType: "RESERVED"`): `budgetAmount`. `budgetType` defaults to daily, and a lifetime budget without `endDate` ends 7 days after it starts (see `appliedDefaults`).
|
|
13859
13859
|
* - Single image or video (the default), also with `adSetId`: `headline` (max 255), `body`, `callToAction`, exactly one of `imageUrl` / `video` (none for a catalog template creative, which ignores and does not upload any sent), and `linkUrl` unless the goal is `lead_generation` or `page_visits` or `leadGenFormId` is set.
|
|
13860
13860
|
* - `bodies[]` / `headlines[]` text variations: `body`, one list with 2+ items, `callToAction`, `imageUrl` or `video`, and `linkUrl` unless the goal is `lead_generation` or `leadGenFormId` is set. `headline` is not required.
|
|
13861
13861
|
* - `placementAssets`: `headline`, `body`, `callToAction`, and `linkUrl` with the same exemptions as the single shape; the media comes from `placementAssets`.
|
|
@@ -659,6 +659,37 @@ export type AdAnalyticsResponse = {
|
|
|
659
659
|
};
|
|
660
660
|
};
|
|
661
661
|
|
|
662
|
+
/**
|
|
663
|
+
* What the create filled in for fields the request left out. Empty when every field was sent. A passing validateOnly returns it too, so a dry run previews these values before anything is created.
|
|
664
|
+
*/
|
|
665
|
+
export type AdAppliedDefaults = {
|
|
666
|
+
/**
|
|
667
|
+
* Sent when `name` was omitted: `Ad <YYYY-MM-DD HH:MM:SS>` in UTC.
|
|
668
|
+
*/
|
|
669
|
+
name?: string;
|
|
670
|
+
/**
|
|
671
|
+
* Sent when `goal` was omitted. `lead_generation` with a `leadGenFormId`; `app_promotion` when `promotedObject` names an app; `conversions` with `promotedObject.pixelId` and `customEventType`; `traffic` when the ad has a link (`linkUrl`, a carousel card, `creatives[].linkUrl`, `dynamicCreative.linkUrls` or a LinkedIn carousel card); otherwise `engagement`. Each only when the platform offers it, falling back to `engagement`, then `awareness`, then the platform's first goal. Never inferred with `existingCampaignId`, `smartPlus` or the LinkedIn spotlight, follower and jobs formats: those still return 400 without `goal`.
|
|
672
|
+
*/
|
|
673
|
+
goal?: string;
|
|
674
|
+
/**
|
|
675
|
+
* Sent when `budgetAmount` came without `budgetType`.
|
|
676
|
+
*/
|
|
677
|
+
budgetType?: 'daily';
|
|
678
|
+
/**
|
|
679
|
+
* Sent when a lifetime budget had no `endDate`: 7 days after the start. A start with an offset (or no start) gets a UTC instant; an offset-less start gets an offset-less end, read in the ad account timezone like the start; a date-only start gets the date 6 days later, which runs to 23:59:59. A daily budget never gets one and runs until paused.
|
|
680
|
+
*/
|
|
681
|
+
endDate?: string;
|
|
682
|
+
/**
|
|
683
|
+
* Sent when the request sent no countries and the ad gets the long-standing United States default. Not sent on attach, Google Performance Max or Demand Gen, or a Google ad group joining `existingCampaignId`, which keep their own geo.
|
|
684
|
+
*/
|
|
685
|
+
countries?: Array<(string)>;
|
|
686
|
+
};
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Sent when `budgetAmount` came without `budgetType`.
|
|
690
|
+
*/
|
|
691
|
+
export type budgetType = 'daily';
|
|
692
|
+
|
|
662
693
|
/**
|
|
663
694
|
* Budget amount in the ad account's native currency (see the campaign's `currency` field for the code).
|
|
664
695
|
*/
|
|
@@ -6106,7 +6137,7 @@ export type CtwaAdRequestBody = {
|
|
|
6106
6137
|
/**
|
|
6107
6138
|
* Required unless `adSetId` is set or `existingCampaignId` names a campaign with a campaign budget. `lifetime` requires `endDate`.
|
|
6108
6139
|
*/
|
|
6109
|
-
export type
|
|
6140
|
+
export type budgetType2 = 'daily' | 'lifetime';
|
|
6110
6141
|
|
|
6111
6142
|
/**
|
|
6112
6143
|
* Restrict the audience by gender (Meta `genders`). Omit or send all for everyone; all is ignored in adSetId attach mode. Stored on the ad and read back in `targeting.gender`.
|
|
@@ -52281,7 +52312,10 @@ export type CreateStandaloneAdData = {
|
|
|
52281
52312
|
body: {
|
|
52282
52313
|
accountId: string;
|
|
52283
52314
|
adAccountId: string;
|
|
52284
|
-
|
|
52315
|
+
/**
|
|
52316
|
+
* Omitted, the ad is named `Ad <YYYY-MM-DD HH:MM:SS>` (UTC) and the response reports it in `appliedDefaults.name`.
|
|
52317
|
+
*/
|
|
52318
|
+
name?: string;
|
|
52285
52319
|
/**
|
|
52286
52320
|
* Meta, Reddit and Google. Exact campaign name. Overrides the default `<name> - Campaign`. Ignored when the request joins an existing campaign or ad set. Google: no line breaks and at most 255 characters, checked before calling Google; names are unique in the Google Ads account, and on Search and Display a taken name is a 400 naming this field.
|
|
52287
52321
|
*/
|
|
@@ -52296,7 +52330,7 @@ export type CreateStandaloneAdData = {
|
|
|
52296
52330
|
adName?: string;
|
|
52297
52331
|
tracking?: AdTracking;
|
|
52298
52332
|
/**
|
|
52299
|
-
*
|
|
52333
|
+
* Available goals vary by platform. Omitted, it is inferred from the ad (see `appliedDefaults.goal` in the response); the attach shape inherits it from the ad set.
|
|
52300
52334
|
*
|
|
52301
52335
|
* **Meta**
|
|
52302
52336
|
* - `conversions`: OUTCOME_SALES. Requires `promotedObject.pixelId` and `promotedObject.customEventType` with a commerce event such as PURCHASE or START_TRIAL, or `promotedObject.customConversionId` to optimise against a Custom Conversion, or `customEventType: OTHER` + `customEventStr` to optimise against a pixel custom event.
|
|
@@ -52393,7 +52427,7 @@ export type CreateStandaloneAdData = {
|
|
|
52393
52427
|
*/
|
|
52394
52428
|
budgetAmount?: number;
|
|
52395
52429
|
/**
|
|
52396
|
-
*
|
|
52430
|
+
* Defaults to daily when `budgetAmount` is sent without it (reported in `appliedDefaults.budgetType`). Inherited on attach. OpenAI Ads accepts both as the campaign's single spend cap. A lifetime cap can later switch to daily with PUT /v1/ads/campaigns/{campaignId}, but OpenAI never switches a daily cap back to lifetime (422). Automatic bidding (Maximize Results) needs a daily budget. Reddit Ads: the ad group's daily or lifetime spend goal.
|
|
52397
52431
|
*/
|
|
52398
52432
|
budgetType?: 'daily' | 'lifetime';
|
|
52399
52433
|
/**
|
|
@@ -52920,7 +52954,7 @@ export type CreateStandaloneAdData = {
|
|
|
52920
52954
|
[key: string]: (string | number);
|
|
52921
52955
|
};
|
|
52922
52956
|
/**
|
|
52923
|
-
*
|
|
52957
|
+
* Omitted on a lifetime budget, the ad ends 7 days after it starts (reported in `appliedDefaults.endDate`); a daily budget without one runs until paused. Read like `startDate` (account timezone on Meta, TikTok, X, Pinterest, OpenAI and Reddit; whole account-local days on Google; UTC on LinkedIn), and a date-only end runs to 23:59:59 local.
|
|
52924
52958
|
*/
|
|
52925
52959
|
endDate?: string;
|
|
52926
52960
|
/**
|
|
@@ -53448,7 +53482,7 @@ export type CreateStandaloneAdData = {
|
|
|
53448
53482
|
* Targeting works like on any TikTok ad (defaults to `countries: ["US"]` when
|
|
53449
53483
|
* omitted); TikTok automates delivery within it.
|
|
53450
53484
|
* The budget lives on the Smart+ campaign (Campaign Budget Optimization); a `lifetime`
|
|
53451
|
-
* budget
|
|
53485
|
+
* budget without `endDate` ends 7 days after it starts. Smart+ needs `goal` sent, it is never inferred. Cannot be combined with `adSetId`.
|
|
53452
53486
|
*
|
|
53453
53487
|
*/
|
|
53454
53488
|
smartPlus?: boolean;
|
|
@@ -53483,6 +53517,7 @@ export type CreateStandaloneAdResponse = ({
|
|
|
53483
53517
|
* Always true in a validate-only response.
|
|
53484
53518
|
*/
|
|
53485
53519
|
validateOnly?: boolean;
|
|
53520
|
+
appliedDefaults?: AdAppliedDefaults;
|
|
53486
53521
|
results?: Array<{
|
|
53487
53522
|
node?: 'campaign' | 'adSet' | 'creative' | 'ad' | 'performanceMaxCampaign';
|
|
53488
53523
|
status?: 'validated' | 'skipped' | 'unverified';
|
|
@@ -53494,11 +53529,13 @@ export type CreateStandaloneAdResponse = ({
|
|
|
53494
53529
|
message?: string;
|
|
53495
53530
|
} | ({
|
|
53496
53531
|
ad?: Ad;
|
|
53532
|
+
appliedDefaults?: AdAppliedDefaults;
|
|
53497
53533
|
message?: string;
|
|
53498
53534
|
} | {
|
|
53499
53535
|
ads?: Array<Ad>;
|
|
53500
53536
|
platformCampaignId?: string;
|
|
53501
53537
|
platformAdSetId?: string;
|
|
53538
|
+
appliedDefaults?: AdAppliedDefaults;
|
|
53502
53539
|
message?: string;
|
|
53503
53540
|
}));
|
|
53504
53541
|
|