@getlatedev/node 0.2.1337 → 0.2.1339

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.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.1337",
39
+ version: "0.2.1339",
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.1337",
8
+ version: "0.2.1339",
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.1337",
3
+ "version": "0.2.1339",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -10638,7 +10638,10 @@ export const createAdCampaign = <ThrowOnError extends boolean = false>(options:
10638
10638
  *
10639
10639
  * **Live read, then write.** The campaign's switch is read from the platform first. When that
10640
10640
  * live read shows it already in the requested state nothing is written (`updated: 0`,
10641
- * `skipped: 1`, with the reason). Otherwise the switch is written (`updated: 1`), read back and
10641
+ * `skipped: 1`, with the reason), and when the campaign delivers in that state but some of its
10642
+ * ads are stored in the other state (for example ads switched on in the platform's own UI and
10643
+ * still stored `paused`), those ads (up to 20, at most once every 10 minutes per campaign) are
10644
+ * re-read and stored. Otherwise the switch is written (`updated: 1`), read back and
10642
10645
  * stored, and the delivery status of the ads under it (up to 20) is re-read and stored, so an
10643
10646
  * immediate GET returns what the platform now reports. A stored switch never skips a write, and
10644
10647
  * when the platform cannot be read the write always goes out. On Meta the check reads the
@@ -11202,8 +11205,8 @@ export const duplicateAd = <ThrowOnError extends boolean = false>(options: Optio
11202
11205
  *
11203
11206
  * Reads the ad set live from Meta, returned verbatim. The default projection includes
11204
11207
  * `learning_stage_info` (learning-phase status: LEARNING / SUCCESS / FAIL / WAIVING; Meta
11205
- * omits its `status` key on paused ad sets), delivery settings, budgets, schedule and
11206
- * targeting. `fields` is a raw-passthrough override; unknown fields return Meta's 400
11208
+ * omits its `status` key on paused ad sets), delivery settings, budgets, schedule, dayparting
11209
+ * (`adset_schedule`, `pacing_type`) and targeting. `fields` is a raw-passthrough override; unknown fields return Meta's 400
11207
11210
  * verbatim.
11208
11211
  */
11209
11212
  export const getAdSetDetails = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAdSetDetailsData, ThrowOnError>) => {
@@ -11332,7 +11335,10 @@ export const deleteAdSet = <ThrowOnError extends boolean = false>(options: Optio
11332
11335
  *
11333
11336
  * **Live read, then write.** The ad set's switch is read from the platform
11334
11337
  * first. When that live read shows it already in the requested state
11335
- * nothing is written (`updated: 0`, `skipped: 1`, with the reason).
11338
+ * nothing is written (`updated: 0`, `skipped: 1`, with the reason), and
11339
+ * when the ad set delivers in that state but some of its ads are stored in
11340
+ * the other state, those ads (up to 20, at most once every 10 minutes per
11341
+ * ad set) are re-read and stored.
11336
11342
  * Otherwise the switch is written (`updated: 1`), read back and stored, and
11337
11343
  * the delivery status of its ads (up to 20) is re-read and stored, so an
11338
11344
  * immediate GET returns what the platform now reports. A stored switch
@@ -10088,6 +10088,27 @@ export type MessengerIceBreakerLocale = {
10088
10088
  }>;
10089
10089
  };
10090
10090
 
10091
+ /**
10092
+ * Meta ad set dayparting: the hours the ad set delivers, in whole hours. Same `dayOfWeek` /
10093
+ * `startHour` / `endHour` naming as the Google `PUT /v1/ads/campaigns/{campaignId}/ad-schedule`,
10094
+ * but Meta has no minutes and no bid modifiers. Windows on one day must not overlap (adjacent is
10095
+ * fine) and every window must use the same `timezoneType`. Invalid windows are a 400 on
10096
+ * `platformSpecificData.adSchedule`.
10097
+ *
10098
+ */
10099
+ export type MetaAdSchedule = Array<{
10100
+ dayOfWeek: 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY';
10101
+ startHour: number;
10102
+ /**
10103
+ * Must be after startHour. 24 is midnight at the end of the day.
10104
+ */
10105
+ endHour: number;
10106
+ /**
10107
+ * Meta `timezone_type`: USER runs the hours in each viewer's time zone, ADVERTISER in the ad account time zone.
10108
+ */
10109
+ timezoneType?: 'USER' | 'ADVERTISER';
10110
+ }>;
10111
+
10091
10112
  /**
10092
10113
  * Meta (facebook/instagram) options for platformSpecificData on POST /v1/ads/boost and /v1/ads/create. Unknown keys are rejected, not dropped.
10093
10114
  */
@@ -10110,6 +10131,15 @@ export type MetaAdsPlatformData = {
10110
10131
  */
10111
10132
  lifetimeMinSpendTarget?: number;
10112
10133
  customerLifecycle?: MetaCustomerLifecycle;
10134
+ /**
10135
+ * Dayparting on the ad set being created (Meta `adset_schedule` with `pacing_type: ["day_parting"]`).
10136
+ * Meta runs a schedule only on a LIFETIME budget, so a daily budget (on the ad set, or on the
10137
+ * campaign joined with `existingCampaignId`) is a 400 with `param: platformSpecificData.adSchedule`.
10138
+ * Also a 400 when empty, in adSetId attach mode and with `buyingType: RESERVED`. Change it later with
10139
+ * `PUT /v1/ads/ad-sets/{adSetId}`.
10140
+ *
10141
+ */
10142
+ adSchedule?: (MetaAdSchedule);
10113
10143
  };
10114
10144
 
10115
10145
  export type MetaAssignedUser = {
@@ -46197,6 +46227,17 @@ export type UpdateAdSetData = {
46197
46227
  */
46198
46228
  lifetimeMinSpendTarget?: number;
46199
46229
  customerLifecycle?: MetaCustomerLifecycle;
46230
+ /**
46231
+ * Replaces the ad set's dayparting (Meta `adset_schedule`, `pacing_type: ["day_parting"]`).
46232
+ * Meta runs a schedule only on a lifetime budget. Before anything in the request is written,
46233
+ * Zernio takes `budget.type` from the same request or reads the ad set's budget (or its
46234
+ * campaign's under Advantage campaign budget), and a daily one is a 400 with
46235
+ * `param: platformSpecificData.adSchedule`. An empty array removes the schedule
46236
+ * (`pacing_type: ["standard"]`). Read it back with `GET /v1/ads/ad-sets/{adSetId}`
46237
+ * (`adset_schedule`, `pacing_type`) or as `adSchedule` on `GET /v1/ads/accounts/live`.
46238
+ *
46239
+ */
46240
+ adSchedule?: (MetaAdSchedule);
46200
46241
  /**
46201
46242
  * Meta ad-set promoted_object (same shape as /v1/ads/create). Meta makes promoted_object immutable once the ad set exists, so only `pixelId`, `customEventType`, `customEventStr` (with `customEventType` OTHER), `applicationId` and `productCatalogId` can be sent here. Any other key (`pageId`, `whatsappPhoneNumber`, `customConversionId`, `objectStoreUrl`, `productSetId`, `offlineConversionDataSetId`) is a 400 with `param: platformSpecificData.promotedObject` and nothing is written; changing them needs a new ad set (POST /v1/ads/create). Unknown keys are rejected with 400.
46202
46243
  */
@@ -51003,6 +51044,10 @@ export type GetAdAccountLiveEntitiesResponse = ({
51003
51044
  */
51004
51045
  endDate?: string;
51005
51046
  } | null;
51047
+ /**
51048
+ * Meta only. The ad set's dayparting (`adset_schedule`) in the `platformSpecificData.adSchedule` shape, one window per day (a window Meta stores off the hour is widened to whole hours). Null when the ad set runs around the clock. Absent on TikTok.
51049
+ */
51050
+ adSchedule?: (MetaAdSchedule | null);
51006
51051
  }>;
51007
51052
  /**
51008
51053
  * One entry per level read. `after` is null on the last page.