@getlatedev/node 0.2.1781 → 0.2.1783

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';
@@ -41183,6 +41191,8 @@ type GetConnectUrlData = {
41183
41191
  *
41184
41192
  * - Standard mode: connected={platform}&profileId=X&accountId=Y&username=Z.
41185
41193
  * - X on prepaid-balance billing at a $0 balance: `billingNotice=x_balance_required` is added. The account is connected, but X posts wait or are refused (402 `insufficient_balance`) until the balance is funded.
41194
+ * - The login landed on an account the profile already had connected, on a connect that named none (no `reconnectAccountId`, `expectedUsername` or `expectedPlatformUserId`): `accountNotice=already_connected` is added. No new account was added: `accountId` is that account, with its connection refreshed.
41195
+ * - Platforms sign in whoever is logged in on the device, so to connect a different account the user logs out of the platform first, or uses a private window. On Instagram Login, `forceReauth=true` asks for the credentials of the account to connect instead.
41186
41196
  * - Headless mode: OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId.
41187
41197
  *
41188
41198
  * **Failure params:** the browser goes to the same redirect_url with `error` and `platform` appended (always present). `error_message`, `is_user_fixable`, `reason`, `dashboard_url`, `missing_scopes`, `error_reason` and the `platform_error*` params are conditional: treat them as optional.
@@ -82325,6 +82335,15 @@ type CreateMessagingAdData = {
82325
82335
  *
82326
82336
  */
82327
82337
  destinations?: Array<('whatsapp' | 'messenger' | 'instagram_direct')>;
82338
+ /**
82339
+ * What the ad set optimizes for. Defaults to `CONVERSATIONS`. Cannot be combined with `adSetId` (the existing ad set owns its goal).
82340
+ *
82341
+ * - `LEAD_GENERATION` needs a single `destination: whatsapp` (a 400 with `destinations` or another destination) and runs the campaign under `OUTCOME_LEADS`.
82342
+ * - `objective`, when sent with `LEAD_GENERATION`, must be `OUTCOME_LEADS`.
82343
+ * - With `existingCampaignId` the campaign must be `OUTCOME_LEADS` (a 400 otherwise).
82344
+ *
82345
+ */
82346
+ optimizationGoal?: 'CONVERSATIONS' | 'LEAD_GENERATION';
82328
82347
  /**
82329
82348
  * 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
82349
  *
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';
@@ -41183,6 +41191,8 @@ type GetConnectUrlData = {
41183
41191
  *
41184
41192
  * - Standard mode: connected={platform}&profileId=X&accountId=Y&username=Z.
41185
41193
  * - X on prepaid-balance billing at a $0 balance: `billingNotice=x_balance_required` is added. The account is connected, but X posts wait or are refused (402 `insufficient_balance`) until the balance is funded.
41194
+ * - The login landed on an account the profile already had connected, on a connect that named none (no `reconnectAccountId`, `expectedUsername` or `expectedPlatformUserId`): `accountNotice=already_connected` is added. No new account was added: `accountId` is that account, with its connection refreshed.
41195
+ * - Platforms sign in whoever is logged in on the device, so to connect a different account the user logs out of the platform first, or uses a private window. On Instagram Login, `forceReauth=true` asks for the credentials of the account to connect instead.
41186
41196
  * - Headless mode: OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId.
41187
41197
  *
41188
41198
  * **Failure params:** the browser goes to the same redirect_url with `error` and `platform` appended (always present). `error_message`, `is_user_fixable`, `reason`, `dashboard_url`, `missing_scopes`, `error_reason` and the `platform_error*` params are conditional: treat them as optional.
@@ -82325,6 +82335,15 @@ type CreateMessagingAdData = {
82325
82335
  *
82326
82336
  */
82327
82337
  destinations?: Array<('whatsapp' | 'messenger' | 'instagram_direct')>;
82338
+ /**
82339
+ * What the ad set optimizes for. Defaults to `CONVERSATIONS`. Cannot be combined with `adSetId` (the existing ad set owns its goal).
82340
+ *
82341
+ * - `LEAD_GENERATION` needs a single `destination: whatsapp` (a 400 with `destinations` or another destination) and runs the campaign under `OUTCOME_LEADS`.
82342
+ * - `objective`, when sent with `LEAD_GENERATION`, must be `OUTCOME_LEADS`.
82343
+ * - With `existingCampaignId` the campaign must be `OUTCOME_LEADS` (a 400 otherwise).
82344
+ *
82345
+ */
82346
+ optimizationGoal?: 'CONVERSATIONS' | 'LEAD_GENERATION';
82328
82347
  /**
82329
82348
  * 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
82349
  *
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.1783",
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.1783",
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.1783",
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';
@@ -40427,6 +40435,8 @@ export type GetConnectUrlData = {
40427
40435
  *
40428
40436
  * - Standard mode: connected={platform}&profileId=X&accountId=Y&username=Z.
40429
40437
  * - X on prepaid-balance billing at a $0 balance: `billingNotice=x_balance_required` is added. The account is connected, but X posts wait or are refused (402 `insufficient_balance`) until the balance is funded.
40438
+ * - The login landed on an account the profile already had connected, on a connect that named none (no `reconnectAccountId`, `expectedUsername` or `expectedPlatformUserId`): `accountNotice=already_connected` is added. No new account was added: `accountId` is that account, with its connection refreshed.
40439
+ * - Platforms sign in whoever is logged in on the device, so to connect a different account the user logs out of the platform first, or uses a private window. On Instagram Login, `forceReauth=true` asks for the credentials of the account to connect instead.
40430
40440
  * - Headless mode: OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId.
40431
40441
  *
40432
40442
  * **Failure params:** the browser goes to the same redirect_url with `error` and `platform` appended (always present). `error_message`, `is_user_fixable`, `reason`, `dashboard_url`, `missing_scopes`, `error_reason` and the `platform_error*` params are conditional: treat them as optional.
@@ -84488,6 +84498,15 @@ export type CreateMessagingAdData = {
84488
84498
  *
84489
84499
  */
84490
84500
  destinations?: Array<('whatsapp' | 'messenger' | 'instagram_direct')>;
84501
+ /**
84502
+ * What the ad set optimizes for. Defaults to `CONVERSATIONS`. Cannot be combined with `adSetId` (the existing ad set owns its goal).
84503
+ *
84504
+ * - `LEAD_GENERATION` needs a single `destination: whatsapp` (a 400 with `destinations` or another destination) and runs the campaign under `OUTCOME_LEADS`.
84505
+ * - `objective`, when sent with `LEAD_GENERATION`, must be `OUTCOME_LEADS`.
84506
+ * - With `existingCampaignId` the campaign must be `OUTCOME_LEADS` (a 400 otherwise).
84507
+ *
84508
+ */
84509
+ optimizationGoal?: 'CONVERSATIONS' | 'LEAD_GENERATION';
84491
84510
  /**
84492
84511
  * 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
84512
  *