@getlatedev/node 0.2.1781 → 0.2.1782

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
@@ -14276,7 +14276,10 @@ type CtwaAdRequestBody = {
14276
14276
  */
14277
14277
  advantageAudience?: 0 | 1;
14278
14278
  /**
14279
- * Defaults to `OUTCOME_ENGAGEMENT`. `OUTCOME_SALES` and `OUTCOME_LEADS` require
14279
+ * Defaults to `OUTCOME_ENGAGEMENT` on POST /v1/ads/ctwa and POST /v1/ads/messaging,
14280
+ * and to `OUTCOME_LEADS` on POST /v1/ads/call and on POST /v1/ads/messaging with
14281
+ * `optimizationGoal: LEAD_GENERATION` (which accepts only `OUTCOME_LEADS`).
14282
+ * `OUTCOME_SALES` and `OUTCOME_LEADS` require
14280
14283
  * additional account configuration (Dataset linked to the WABA
14281
14284
  * for sales) and may be rejected by Meta if missing.
14282
14285
  *
@@ -14321,8 +14324,9 @@ type CtwaAdRequestBody = {
14321
14324
  * `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted.
14322
14325
  * `LOWEST_COST_WITH_BID_CAP` and `COST_CAP` require
14323
14326
  * `bidAmount`. `LOWEST_COST_WITH_MIN_ROAS` requires
14324
- * `roasAverageFloor`. CTWA's `optimization_goal` is fixed to
14325
- * `CONVERSATIONS`, but the bid strategy is independent.
14327
+ * `roasAverageFloor`. The ad set `optimization_goal` comes from the endpoint
14328
+ * (`CONVERSATIONS` on POST /v1/ads/ctwa, `QUALITY_CALL` on POST /v1/ads/call, the
14329
+ * `optimizationGoal` field on POST /v1/ads/messaging); the bid strategy is independent.
14326
14330
  *
14327
14331
  */
14328
14332
  bidStrategy?: 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
@@ -14407,7 +14411,10 @@ type incomeTier = 'top_5' | 'top_10' | 'top_10_25' | 'top_25_50';
14407
14411
  */
14408
14412
  type advantageAudience = 0 | 1;
14409
14413
  /**
14410
- * Defaults to `OUTCOME_ENGAGEMENT`. `OUTCOME_SALES` and `OUTCOME_LEADS` require
14414
+ * Defaults to `OUTCOME_ENGAGEMENT` on POST /v1/ads/ctwa and POST /v1/ads/messaging,
14415
+ * and to `OUTCOME_LEADS` on POST /v1/ads/call and on POST /v1/ads/messaging with
14416
+ * `optimizationGoal: LEAD_GENERATION` (which accepts only `OUTCOME_LEADS`).
14417
+ * `OUTCOME_SALES` and `OUTCOME_LEADS` require
14411
14418
  * additional account configuration (Dataset linked to the WABA
14412
14419
  * for sales) and may be rejected by Meta if missing.
14413
14420
  *
@@ -14444,8 +14451,9 @@ type adSetStatus = 'ACTIVE' | 'PAUSED';
14444
14451
  * `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted.
14445
14452
  * `LOWEST_COST_WITH_BID_CAP` and `COST_CAP` require
14446
14453
  * `bidAmount`. `LOWEST_COST_WITH_MIN_ROAS` requires
14447
- * `roasAverageFloor`. CTWA's `optimization_goal` is fixed to
14448
- * `CONVERSATIONS`, but the bid strategy is independent.
14454
+ * `roasAverageFloor`. The ad set `optimization_goal` comes from the endpoint
14455
+ * (`CONVERSATIONS` on POST /v1/ads/ctwa, `QUALITY_CALL` on POST /v1/ads/call, the
14456
+ * `optimizationGoal` field on POST /v1/ads/messaging); the bid strategy is independent.
14449
14457
  *
14450
14458
  */
14451
14459
  type bidStrategy = 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
@@ -82325,6 +82333,15 @@ type CreateMessagingAdData = {
82325
82333
  *
82326
82334
  */
82327
82335
  destinations?: Array<('whatsapp' | 'messenger' | 'instagram_direct')>;
82336
+ /**
82337
+ * What the ad set optimizes for. Defaults to `CONVERSATIONS`. Cannot be combined with `adSetId` (the existing ad set owns its goal).
82338
+ *
82339
+ * - `LEAD_GENERATION` needs a single `destination: whatsapp` (a 400 with `destinations` or another destination) and runs the campaign under `OUTCOME_LEADS`.
82340
+ * - `objective`, when sent with `LEAD_GENERATION`, must be `OUTCOME_LEADS`.
82341
+ * - With `existingCampaignId` the campaign must be `OUTCOME_LEADS` (a 400 otherwise).
82342
+ *
82343
+ */
82344
+ optimizationGoal?: 'CONVERSATIONS' | 'LEAD_GENERATION';
82328
82345
  /**
82329
82346
  * A different image or video per placement on one messaging ad, e.g. a 4:5 image on Feed and a 9:16 image on Stories/Reels. Works on the single-creative shape and on attach (`adSetId`).
82330
82347
  *
package/dist/index.d.ts CHANGED
@@ -14276,7 +14276,10 @@ type CtwaAdRequestBody = {
14276
14276
  */
14277
14277
  advantageAudience?: 0 | 1;
14278
14278
  /**
14279
- * Defaults to `OUTCOME_ENGAGEMENT`. `OUTCOME_SALES` and `OUTCOME_LEADS` require
14279
+ * Defaults to `OUTCOME_ENGAGEMENT` on POST /v1/ads/ctwa and POST /v1/ads/messaging,
14280
+ * and to `OUTCOME_LEADS` on POST /v1/ads/call and on POST /v1/ads/messaging with
14281
+ * `optimizationGoal: LEAD_GENERATION` (which accepts only `OUTCOME_LEADS`).
14282
+ * `OUTCOME_SALES` and `OUTCOME_LEADS` require
14280
14283
  * additional account configuration (Dataset linked to the WABA
14281
14284
  * for sales) and may be rejected by Meta if missing.
14282
14285
  *
@@ -14321,8 +14324,9 @@ type CtwaAdRequestBody = {
14321
14324
  * `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted.
14322
14325
  * `LOWEST_COST_WITH_BID_CAP` and `COST_CAP` require
14323
14326
  * `bidAmount`. `LOWEST_COST_WITH_MIN_ROAS` requires
14324
- * `roasAverageFloor`. CTWA's `optimization_goal` is fixed to
14325
- * `CONVERSATIONS`, but the bid strategy is independent.
14327
+ * `roasAverageFloor`. The ad set `optimization_goal` comes from the endpoint
14328
+ * (`CONVERSATIONS` on POST /v1/ads/ctwa, `QUALITY_CALL` on POST /v1/ads/call, the
14329
+ * `optimizationGoal` field on POST /v1/ads/messaging); the bid strategy is independent.
14326
14330
  *
14327
14331
  */
14328
14332
  bidStrategy?: 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
@@ -14407,7 +14411,10 @@ type incomeTier = 'top_5' | 'top_10' | 'top_10_25' | 'top_25_50';
14407
14411
  */
14408
14412
  type advantageAudience = 0 | 1;
14409
14413
  /**
14410
- * Defaults to `OUTCOME_ENGAGEMENT`. `OUTCOME_SALES` and `OUTCOME_LEADS` require
14414
+ * Defaults to `OUTCOME_ENGAGEMENT` on POST /v1/ads/ctwa and POST /v1/ads/messaging,
14415
+ * and to `OUTCOME_LEADS` on POST /v1/ads/call and on POST /v1/ads/messaging with
14416
+ * `optimizationGoal: LEAD_GENERATION` (which accepts only `OUTCOME_LEADS`).
14417
+ * `OUTCOME_SALES` and `OUTCOME_LEADS` require
14411
14418
  * additional account configuration (Dataset linked to the WABA
14412
14419
  * for sales) and may be rejected by Meta if missing.
14413
14420
  *
@@ -14444,8 +14451,9 @@ type adSetStatus = 'ACTIVE' | 'PAUSED';
14444
14451
  * `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted.
14445
14452
  * `LOWEST_COST_WITH_BID_CAP` and `COST_CAP` require
14446
14453
  * `bidAmount`. `LOWEST_COST_WITH_MIN_ROAS` requires
14447
- * `roasAverageFloor`. CTWA's `optimization_goal` is fixed to
14448
- * `CONVERSATIONS`, but the bid strategy is independent.
14454
+ * `roasAverageFloor`. The ad set `optimization_goal` comes from the endpoint
14455
+ * (`CONVERSATIONS` on POST /v1/ads/ctwa, `QUALITY_CALL` on POST /v1/ads/call, the
14456
+ * `optimizationGoal` field on POST /v1/ads/messaging); the bid strategy is independent.
14449
14457
  *
14450
14458
  */
14451
14459
  type bidStrategy = 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
@@ -82325,6 +82333,15 @@ type CreateMessagingAdData = {
82325
82333
  *
82326
82334
  */
82327
82335
  destinations?: Array<('whatsapp' | 'messenger' | 'instagram_direct')>;
82336
+ /**
82337
+ * What the ad set optimizes for. Defaults to `CONVERSATIONS`. Cannot be combined with `adSetId` (the existing ad set owns its goal).
82338
+ *
82339
+ * - `LEAD_GENERATION` needs a single `destination: whatsapp` (a 400 with `destinations` or another destination) and runs the campaign under `OUTCOME_LEADS`.
82340
+ * - `objective`, when sent with `LEAD_GENERATION`, must be `OUTCOME_LEADS`.
82341
+ * - With `existingCampaignId` the campaign must be `OUTCOME_LEADS` (a 400 otherwise).
82342
+ *
82343
+ */
82344
+ optimizationGoal?: 'CONVERSATIONS' | 'LEAD_GENERATION';
82328
82345
  /**
82329
82346
  * A different image or video per placement on one messaging ad, e.g. a 4:5 image on Feed and a 9:16 image on Stories/Reels. Works on the single-creative shape and on attach (`adSetId`).
82330
82347
  *
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.1781",
39
+ version: "0.2.1782",
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.1781",
8
+ version: "0.2.1782",
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.1781",
3
+ "version": "0.2.1782",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -22475,7 +22475,7 @@ export const sendWhatsAppConversion = <ThrowOnError extends boolean = false>(opt
22475
22475
  *
22476
22476
  * `destinations` puts two or three of them on one ad set and lets Meta pick the app per viewer.
22477
22477
  *
22478
- * The ad set is created with the matching destination_type and CONVERSATIONS optimization. The campaign objective defaults to OUTCOME_ENGAGEMENT.
22478
+ * The ad set is created with the matching destination_type and CONVERSATIONS optimization by default (see `optimizationGoal` for LEAD_GENERATION). The campaign objective defaults to OUTCOME_ENGAGEMENT (OUTCOME_LEADS with LEAD_GENERATION).
22479
22479
  *
22480
22480
  * This endpoint supersedes POST /v1/ads/ctwa (deprecated, equivalent to `destination: whatsapp`).
22481
22481
  *
@@ -12134,7 +12134,10 @@ export type CtwaAdRequestBody = {
12134
12134
  */
12135
12135
  advantageAudience?: 0 | 1;
12136
12136
  /**
12137
- * Defaults to `OUTCOME_ENGAGEMENT`. `OUTCOME_SALES` and `OUTCOME_LEADS` require
12137
+ * Defaults to `OUTCOME_ENGAGEMENT` on POST /v1/ads/ctwa and POST /v1/ads/messaging,
12138
+ * and to `OUTCOME_LEADS` on POST /v1/ads/call and on POST /v1/ads/messaging with
12139
+ * `optimizationGoal: LEAD_GENERATION` (which accepts only `OUTCOME_LEADS`).
12140
+ * `OUTCOME_SALES` and `OUTCOME_LEADS` require
12138
12141
  * additional account configuration (Dataset linked to the WABA
12139
12142
  * for sales) and may be rejected by Meta if missing.
12140
12143
  *
@@ -12179,8 +12182,9 @@ export type CtwaAdRequestBody = {
12179
12182
  * `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted.
12180
12183
  * `LOWEST_COST_WITH_BID_CAP` and `COST_CAP` require
12181
12184
  * `bidAmount`. `LOWEST_COST_WITH_MIN_ROAS` requires
12182
- * `roasAverageFloor`. CTWA's `optimization_goal` is fixed to
12183
- * `CONVERSATIONS`, but the bid strategy is independent.
12185
+ * `roasAverageFloor`. The ad set `optimization_goal` comes from the endpoint
12186
+ * (`CONVERSATIONS` on POST /v1/ads/ctwa, `QUALITY_CALL` on POST /v1/ads/call, the
12187
+ * `optimizationGoal` field on POST /v1/ads/messaging); the bid strategy is independent.
12184
12188
  *
12185
12189
  */
12186
12190
  bidStrategy?: 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
@@ -12270,7 +12274,10 @@ export type incomeTier = 'top_5' | 'top_10' | 'top_10_25' | 'top_25_50';
12270
12274
  export type advantageAudience = 0 | 1;
12271
12275
 
12272
12276
  /**
12273
- * Defaults to `OUTCOME_ENGAGEMENT`. `OUTCOME_SALES` and `OUTCOME_LEADS` require
12277
+ * Defaults to `OUTCOME_ENGAGEMENT` on POST /v1/ads/ctwa and POST /v1/ads/messaging,
12278
+ * and to `OUTCOME_LEADS` on POST /v1/ads/call and on POST /v1/ads/messaging with
12279
+ * `optimizationGoal: LEAD_GENERATION` (which accepts only `OUTCOME_LEADS`).
12280
+ * `OUTCOME_SALES` and `OUTCOME_LEADS` require
12274
12281
  * additional account configuration (Dataset linked to the WABA
12275
12282
  * for sales) and may be rejected by Meta if missing.
12276
12283
  *
@@ -12311,8 +12318,9 @@ export type adSetStatus = 'ACTIVE' | 'PAUSED';
12311
12318
  * `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted.
12312
12319
  * `LOWEST_COST_WITH_BID_CAP` and `COST_CAP` require
12313
12320
  * `bidAmount`. `LOWEST_COST_WITH_MIN_ROAS` requires
12314
- * `roasAverageFloor`. CTWA's `optimization_goal` is fixed to
12315
- * `CONVERSATIONS`, but the bid strategy is independent.
12321
+ * `roasAverageFloor`. The ad set `optimization_goal` comes from the endpoint
12322
+ * (`CONVERSATIONS` on POST /v1/ads/ctwa, `QUALITY_CALL` on POST /v1/ads/call, the
12323
+ * `optimizationGoal` field on POST /v1/ads/messaging); the bid strategy is independent.
12316
12324
  *
12317
12325
  */
12318
12326
  export type bidStrategy = 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
@@ -84488,6 +84496,15 @@ export type CreateMessagingAdData = {
84488
84496
  *
84489
84497
  */
84490
84498
  destinations?: Array<('whatsapp' | 'messenger' | 'instagram_direct')>;
84499
+ /**
84500
+ * What the ad set optimizes for. Defaults to `CONVERSATIONS`. Cannot be combined with `adSetId` (the existing ad set owns its goal).
84501
+ *
84502
+ * - `LEAD_GENERATION` needs a single `destination: whatsapp` (a 400 with `destinations` or another destination) and runs the campaign under `OUTCOME_LEADS`.
84503
+ * - `objective`, when sent with `LEAD_GENERATION`, must be `OUTCOME_LEADS`.
84504
+ * - With `existingCampaignId` the campaign must be `OUTCOME_LEADS` (a 400 otherwise).
84505
+ *
84506
+ */
84507
+ optimizationGoal?: 'CONVERSATIONS' | 'LEAD_GENERATION';
84491
84508
  /**
84492
84509
  * A different image or video per placement on one messaging ad, e.g. a 4:5 image on Feed and a 9:16 image on Stories/Reels. Works on the single-creative shape and on attach (`adSetId`).
84493
84510
  *