@getlatedev/node 0.2.1178 → 0.2.1180

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
@@ -6326,8 +6326,9 @@ type CtwaAdRequestBody = {
6326
6326
  /**
6327
6327
  * Messaging and CTWA only (a 400 on POST /v1/ads/call). A hand-built carousel
6328
6328
  * of 2-10 image cards, sent to Meta in the order given as
6329
- * `link_data.child_attachments` (Meta may reorder them for performance, since
6330
- * `multi_share_optimized` defaults to true and no field fixes the order today); every
6329
+ * `link_data.child_attachments` (by default Meta may reorder them for performance,
6330
+ * since `multi_share_optimized` defaults to true; `optimizeCardOrder: false` keeps
6331
+ * the order given); every
6331
6332
  * card (and the carousel itself) carries the destination's messaging call to
6332
6333
  * action (WHATSAPP_MESSAGE, MESSAGE_PAGE or INSTAGRAM_MESSAGE), so a tap on any
6333
6334
  * card opens the conversation. Replaces `imageUrl` / `video` (sending either is
@@ -6340,6 +6341,16 @@ type CtwaAdRequestBody = {
6340
6341
  *
6341
6342
  */
6342
6343
  carouselCards?: Array<MessagingCarouselCard>;
6344
+ /**
6345
+ * Only with `carouselCards` (a 400 without them). Sets the creative's
6346
+ * `link_data.multi_share_optimized`. `false` keeps the cards in the order given;
6347
+ * Meta then takes at most 5 cards, so `false` with more than 5 `carouselCards` is a
6348
+ * 400. `true` lets Meta pick and reorder the cards for performance (up to 10).
6349
+ * Omitted, nothing is sent and Meta's default (`true`) applies. Single-creative
6350
+ * shape; for `creatives[]` set it per entry.
6351
+ *
6352
+ */
6353
+ optimizeCardOrder?: boolean;
6343
6354
  /**
6344
6355
  * Multi-creative shape: N CTWA ads under one campaign + one
6345
6356
  * ad set, sharing budget and targeting. Mutually exclusive
@@ -21690,7 +21701,7 @@ type GetConnectUrlData = {
21690
21701
  *
21691
21702
  * `facebook_login`: the Facebook Login dialog, i.e. "Instagram API with Facebook Login". The user authorizes a Facebook Page that has a linked Instagram professional account, and every API call for that account then runs through the Page. Use this when the customer manages Instagram through a Page and expects the Facebook consent screen. Because the user has to pick which Page to connect, the callback continues at the account-selection step, `/v1/connect/instagram/select-account`.
21692
21703
  *
21693
- * `facebook_login` supports `headless=true` like the other selection platforms: the callback redirects to your `redirect_url` with `profileId`, `tempToken`, `platform=instagram`, `step=select_account` and `connect_token`, which you pass into the select-account endpoints to finish. The default `instagram_login` has no selection step, so it connects the account directly.
21704
+ * `facebook_login` supports `headless=true` like the other selection platforms: the callback redirects to your `redirect_url` with `profileId`, `tempToken`, `platform=instagram`, `step=select_account`, `userProfile` (the Facebook user's profile, same shape and encoding as the Facebook `step=select_page` redirect) and `connect_token`. Pass `profileId`, `tempToken` and `connect_token` into the select-account endpoints to finish. The default `instagram_login` has no selection step, so it connects the account directly.
21694
21705
  *
21695
21706
  */
21696
21707
  loginMethod?: 'instagram_login' | 'facebook_login';
@@ -21749,7 +21760,8 @@ type GetConnectUrlData = {
21749
21760
  * - `granted_pages_not_listed`: Pages were ticked but Meta listed none the user can manage, and a
21750
21761
  * direct read of each ticked Page returned no access token.
21751
21762
  *
21752
- * Headless Facebook success (`step=select_page`): `userProfile` is JSON that was
21763
+ * Headless Facebook success (`step=select_page`) and headless Instagram `facebook_login` success
21764
+ * (`step=select_account`): `userProfile` is JSON that was
21753
21765
  * percent-encoded once before being set as a query param, so it is encoded twice on the wire.
21754
21766
  * After your framework decodes the query string once, run one more decodeURIComponent (or
21755
21767
  * equivalent) and then JSON.parse it. `tempToken` and `connect_token` are plain values.
@@ -44850,6 +44862,10 @@ type CreateAdCreativeData = {
44850
44862
  description?: string;
44851
44863
  callToAction?: string;
44852
44864
  }>;
44865
+ /**
44866
+ * Only with `carouselCards` (a 400 without them). Sets `link_data.multi_share_optimized`: `false` keeps the cards in the order given, and Meta then takes at most 5 cards, so `false` with more than 5 cards is a 400; `true` lets Meta reorder them for performance. Omitted, nothing is sent and Meta's default (`true`) applies.
44867
+ */
44868
+ optimizeCardOrder?: boolean;
44853
44869
  /**
44854
44870
  * Appended to every outbound URL (e.g. utm_source=fb).
44855
44871
  */
@@ -47907,9 +47923,9 @@ type CreateStandaloneAdData = {
47907
47923
  *
47908
47924
  * Meta only. Hand-built carousel: 2-10 authored cards, sent in the order given as
47909
47925
  * the creative's `link_data.child_attachments`. Unlike `dynamicCreative`,
47910
- * you author every card's copy and link, but Meta may still reorder the cards
47911
- * for performance (`multi_share_optimized` defaults to true and Zernio does not
47912
- * send it), and no field fixes the order today. Requires top-level `body`
47926
+ * you author every card's copy and link, but by default Meta may still reorder the
47927
+ * cards for performance (`multi_share_optimized` defaults to true); send
47928
+ * `optimizeCardOrder: false` to keep the order given. Requires top-level `body`
47913
47929
  * and `callToAction`; `linkUrl` is also required UNLESS `leadGenFormId` is set. Those
47914
47930
  * become the ad's own Destination and button (`link_data.link` / `link_data.call_to_action`),
47915
47931
  * and double as the per-card fallback when a card omits its own.
@@ -47943,6 +47959,16 @@ type CreateStandaloneAdData = {
47943
47959
  */
47944
47960
  callToAction?: string;
47945
47961
  }>;
47962
+ /**
47963
+ * Meta only (a 400 on any other platform), and only with `carouselCards` (a 400
47964
+ * without them). Sets the creative's `link_data.multi_share_optimized`. `false`
47965
+ * keeps the cards in the order given; Meta then takes at most 5 cards, so `false`
47966
+ * with more than 5 `carouselCards` is a 400. `true` lets Meta pick and reorder the
47967
+ * cards for performance (up to 10). Omitted, nothing is sent and Meta's default
47968
+ * (`true`) applies.
47969
+ *
47970
+ */
47971
+ optimizeCardOrder?: boolean;
47946
47972
  /**
47947
47973
  * Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own. Must NOT also appear as an entry in `translations`.
47948
47974
  */
package/dist/index.d.ts CHANGED
@@ -6326,8 +6326,9 @@ type CtwaAdRequestBody = {
6326
6326
  /**
6327
6327
  * Messaging and CTWA only (a 400 on POST /v1/ads/call). A hand-built carousel
6328
6328
  * of 2-10 image cards, sent to Meta in the order given as
6329
- * `link_data.child_attachments` (Meta may reorder them for performance, since
6330
- * `multi_share_optimized` defaults to true and no field fixes the order today); every
6329
+ * `link_data.child_attachments` (by default Meta may reorder them for performance,
6330
+ * since `multi_share_optimized` defaults to true; `optimizeCardOrder: false` keeps
6331
+ * the order given); every
6331
6332
  * card (and the carousel itself) carries the destination's messaging call to
6332
6333
  * action (WHATSAPP_MESSAGE, MESSAGE_PAGE or INSTAGRAM_MESSAGE), so a tap on any
6333
6334
  * card opens the conversation. Replaces `imageUrl` / `video` (sending either is
@@ -6340,6 +6341,16 @@ type CtwaAdRequestBody = {
6340
6341
  *
6341
6342
  */
6342
6343
  carouselCards?: Array<MessagingCarouselCard>;
6344
+ /**
6345
+ * Only with `carouselCards` (a 400 without them). Sets the creative's
6346
+ * `link_data.multi_share_optimized`. `false` keeps the cards in the order given;
6347
+ * Meta then takes at most 5 cards, so `false` with more than 5 `carouselCards` is a
6348
+ * 400. `true` lets Meta pick and reorder the cards for performance (up to 10).
6349
+ * Omitted, nothing is sent and Meta's default (`true`) applies. Single-creative
6350
+ * shape; for `creatives[]` set it per entry.
6351
+ *
6352
+ */
6353
+ optimizeCardOrder?: boolean;
6343
6354
  /**
6344
6355
  * Multi-creative shape: N CTWA ads under one campaign + one
6345
6356
  * ad set, sharing budget and targeting. Mutually exclusive
@@ -21690,7 +21701,7 @@ type GetConnectUrlData = {
21690
21701
  *
21691
21702
  * `facebook_login`: the Facebook Login dialog, i.e. "Instagram API with Facebook Login". The user authorizes a Facebook Page that has a linked Instagram professional account, and every API call for that account then runs through the Page. Use this when the customer manages Instagram through a Page and expects the Facebook consent screen. Because the user has to pick which Page to connect, the callback continues at the account-selection step, `/v1/connect/instagram/select-account`.
21692
21703
  *
21693
- * `facebook_login` supports `headless=true` like the other selection platforms: the callback redirects to your `redirect_url` with `profileId`, `tempToken`, `platform=instagram`, `step=select_account` and `connect_token`, which you pass into the select-account endpoints to finish. The default `instagram_login` has no selection step, so it connects the account directly.
21704
+ * `facebook_login` supports `headless=true` like the other selection platforms: the callback redirects to your `redirect_url` with `profileId`, `tempToken`, `platform=instagram`, `step=select_account`, `userProfile` (the Facebook user's profile, same shape and encoding as the Facebook `step=select_page` redirect) and `connect_token`. Pass `profileId`, `tempToken` and `connect_token` into the select-account endpoints to finish. The default `instagram_login` has no selection step, so it connects the account directly.
21694
21705
  *
21695
21706
  */
21696
21707
  loginMethod?: 'instagram_login' | 'facebook_login';
@@ -21749,7 +21760,8 @@ type GetConnectUrlData = {
21749
21760
  * - `granted_pages_not_listed`: Pages were ticked but Meta listed none the user can manage, and a
21750
21761
  * direct read of each ticked Page returned no access token.
21751
21762
  *
21752
- * Headless Facebook success (`step=select_page`): `userProfile` is JSON that was
21763
+ * Headless Facebook success (`step=select_page`) and headless Instagram `facebook_login` success
21764
+ * (`step=select_account`): `userProfile` is JSON that was
21753
21765
  * percent-encoded once before being set as a query param, so it is encoded twice on the wire.
21754
21766
  * After your framework decodes the query string once, run one more decodeURIComponent (or
21755
21767
  * equivalent) and then JSON.parse it. `tempToken` and `connect_token` are plain values.
@@ -44850,6 +44862,10 @@ type CreateAdCreativeData = {
44850
44862
  description?: string;
44851
44863
  callToAction?: string;
44852
44864
  }>;
44865
+ /**
44866
+ * Only with `carouselCards` (a 400 without them). Sets `link_data.multi_share_optimized`: `false` keeps the cards in the order given, and Meta then takes at most 5 cards, so `false` with more than 5 cards is a 400; `true` lets Meta reorder them for performance. Omitted, nothing is sent and Meta's default (`true`) applies.
44867
+ */
44868
+ optimizeCardOrder?: boolean;
44853
44869
  /**
44854
44870
  * Appended to every outbound URL (e.g. utm_source=fb).
44855
44871
  */
@@ -47907,9 +47923,9 @@ type CreateStandaloneAdData = {
47907
47923
  *
47908
47924
  * Meta only. Hand-built carousel: 2-10 authored cards, sent in the order given as
47909
47925
  * the creative's `link_data.child_attachments`. Unlike `dynamicCreative`,
47910
- * you author every card's copy and link, but Meta may still reorder the cards
47911
- * for performance (`multi_share_optimized` defaults to true and Zernio does not
47912
- * send it), and no field fixes the order today. Requires top-level `body`
47926
+ * you author every card's copy and link, but by default Meta may still reorder the
47927
+ * cards for performance (`multi_share_optimized` defaults to true); send
47928
+ * `optimizeCardOrder: false` to keep the order given. Requires top-level `body`
47913
47929
  * and `callToAction`; `linkUrl` is also required UNLESS `leadGenFormId` is set. Those
47914
47930
  * become the ad's own Destination and button (`link_data.link` / `link_data.call_to_action`),
47915
47931
  * and double as the per-card fallback when a card omits its own.
@@ -47943,6 +47959,16 @@ type CreateStandaloneAdData = {
47943
47959
  */
47944
47960
  callToAction?: string;
47945
47961
  }>;
47962
+ /**
47963
+ * Meta only (a 400 on any other platform), and only with `carouselCards` (a 400
47964
+ * without them). Sets the creative's `link_data.multi_share_optimized`. `false`
47965
+ * keeps the cards in the order given; Meta then takes at most 5 cards, so `false`
47966
+ * with more than 5 `carouselCards` is a 400. `true` lets Meta pick and reorder the
47967
+ * cards for performance (up to 10). Omitted, nothing is sent and Meta's default
47968
+ * (`true`) applies.
47969
+ *
47970
+ */
47971
+ optimizeCardOrder?: boolean;
47946
47972
  /**
47947
47973
  * Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own. Must NOT also appear as an entry in `translations`.
47948
47974
  */
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.1178",
39
+ version: "0.2.1180",
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.1178",
8
+ version: "0.2.1180",
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.1178",
3
+ "version": "0.2.1180",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -4505,8 +4505,9 @@ export type CtwaAdRequestBody = {
4505
4505
  /**
4506
4506
  * Messaging and CTWA only (a 400 on POST /v1/ads/call). A hand-built carousel
4507
4507
  * of 2-10 image cards, sent to Meta in the order given as
4508
- * `link_data.child_attachments` (Meta may reorder them for performance, since
4509
- * `multi_share_optimized` defaults to true and no field fixes the order today); every
4508
+ * `link_data.child_attachments` (by default Meta may reorder them for performance,
4509
+ * since `multi_share_optimized` defaults to true; `optimizeCardOrder: false` keeps
4510
+ * the order given); every
4510
4511
  * card (and the carousel itself) carries the destination's messaging call to
4511
4512
  * action (WHATSAPP_MESSAGE, MESSAGE_PAGE or INSTAGRAM_MESSAGE), so a tap on any
4512
4513
  * card opens the conversation. Replaces `imageUrl` / `video` (sending either is
@@ -4519,6 +4520,16 @@ export type CtwaAdRequestBody = {
4519
4520
  *
4520
4521
  */
4521
4522
  carouselCards?: Array<MessagingCarouselCard>;
4523
+ /**
4524
+ * Only with `carouselCards` (a 400 without them). Sets the creative's
4525
+ * `link_data.multi_share_optimized`. `false` keeps the cards in the order given;
4526
+ * Meta then takes at most 5 cards, so `false` with more than 5 `carouselCards` is a
4527
+ * 400. `true` lets Meta pick and reorder the cards for performance (up to 10).
4528
+ * Omitted, nothing is sent and Meta's default (`true`) applies. Single-creative
4529
+ * shape; for `creatives[]` set it per entry.
4530
+ *
4531
+ */
4532
+ optimizeCardOrder?: boolean;
4522
4533
  /**
4523
4534
  * Multi-creative shape: N CTWA ads under one campaign + one
4524
4535
  * ad set, sharing budget and targeting. Mutually exclusive
@@ -20641,7 +20652,7 @@ export type GetConnectUrlData = {
20641
20652
  *
20642
20653
  * `facebook_login`: the Facebook Login dialog, i.e. "Instagram API with Facebook Login". The user authorizes a Facebook Page that has a linked Instagram professional account, and every API call for that account then runs through the Page. Use this when the customer manages Instagram through a Page and expects the Facebook consent screen. Because the user has to pick which Page to connect, the callback continues at the account-selection step, `/v1/connect/instagram/select-account`.
20643
20654
  *
20644
- * `facebook_login` supports `headless=true` like the other selection platforms: the callback redirects to your `redirect_url` with `profileId`, `tempToken`, `platform=instagram`, `step=select_account` and `connect_token`, which you pass into the select-account endpoints to finish. The default `instagram_login` has no selection step, so it connects the account directly.
20655
+ * `facebook_login` supports `headless=true` like the other selection platforms: the callback redirects to your `redirect_url` with `profileId`, `tempToken`, `platform=instagram`, `step=select_account`, `userProfile` (the Facebook user's profile, same shape and encoding as the Facebook `step=select_page` redirect) and `connect_token`. Pass `profileId`, `tempToken` and `connect_token` into the select-account endpoints to finish. The default `instagram_login` has no selection step, so it connects the account directly.
20645
20656
  *
20646
20657
  */
20647
20658
  loginMethod?: 'instagram_login' | 'facebook_login';
@@ -20700,7 +20711,8 @@ export type GetConnectUrlData = {
20700
20711
  * - `granted_pages_not_listed`: Pages were ticked but Meta listed none the user can manage, and a
20701
20712
  * direct read of each ticked Page returned no access token.
20702
20713
  *
20703
- * Headless Facebook success (`step=select_page`): `userProfile` is JSON that was
20714
+ * Headless Facebook success (`step=select_page`) and headless Instagram `facebook_login` success
20715
+ * (`step=select_account`): `userProfile` is JSON that was
20704
20716
  * percent-encoded once before being set as a query param, so it is encoded twice on the wire.
20705
20717
  * After your framework decodes the query string once, run one more decodeURIComponent (or
20706
20718
  * equivalent) and then JSON.parse it. `tempToken` and `connect_token` are plain values.
@@ -45515,6 +45527,10 @@ export type CreateAdCreativeData = {
45515
45527
  description?: string;
45516
45528
  callToAction?: string;
45517
45529
  }>;
45530
+ /**
45531
+ * Only with `carouselCards` (a 400 without them). Sets `link_data.multi_share_optimized`: `false` keeps the cards in the order given, and Meta then takes at most 5 cards, so `false` with more than 5 cards is a 400; `true` lets Meta reorder them for performance. Omitted, nothing is sent and Meta's default (`true`) applies.
45532
+ */
45533
+ optimizeCardOrder?: boolean;
45518
45534
  /**
45519
45535
  * Appended to every outbound URL (e.g. utm_source=fb).
45520
45536
  */
@@ -48722,9 +48738,9 @@ export type CreateStandaloneAdData = {
48722
48738
  *
48723
48739
  * Meta only. Hand-built carousel: 2-10 authored cards, sent in the order given as
48724
48740
  * the creative's `link_data.child_attachments`. Unlike `dynamicCreative`,
48725
- * you author every card's copy and link, but Meta may still reorder the cards
48726
- * for performance (`multi_share_optimized` defaults to true and Zernio does not
48727
- * send it), and no field fixes the order today. Requires top-level `body`
48741
+ * you author every card's copy and link, but by default Meta may still reorder the
48742
+ * cards for performance (`multi_share_optimized` defaults to true); send
48743
+ * `optimizeCardOrder: false` to keep the order given. Requires top-level `body`
48728
48744
  * and `callToAction`; `linkUrl` is also required UNLESS `leadGenFormId` is set. Those
48729
48745
  * become the ad's own Destination and button (`link_data.link` / `link_data.call_to_action`),
48730
48746
  * and double as the per-card fallback when a card omits its own.
@@ -48758,6 +48774,16 @@ export type CreateStandaloneAdData = {
48758
48774
  */
48759
48775
  callToAction?: string;
48760
48776
  }>;
48777
+ /**
48778
+ * Meta only (a 400 on any other platform), and only with `carouselCards` (a 400
48779
+ * without them). Sets the creative's `link_data.multi_share_optimized`. `false`
48780
+ * keeps the cards in the order given; Meta then takes at most 5 cards, so `false`
48781
+ * with more than 5 `carouselCards` is a 400. `true` lets Meta pick and reorder the
48782
+ * cards for performance (up to 10). Omitted, nothing is sent and Meta's default
48783
+ * (`true`) applies.
48784
+ *
48785
+ */
48786
+ optimizeCardOrder?: boolean;
48761
48787
  /**
48762
48788
  * Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own. Must NOT also appear as an entry in `translations`.
48763
48789
  */