@getlatedev/node 0.2.1177 → 0.2.1179

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
@@ -6233,7 +6233,9 @@ type CtwaAdRequestBody = {
6233
6233
  whatsappPhoneNumber?: string;
6234
6234
  /**
6235
6235
  * Single-creative shape only. Mutually exclusive with
6236
- * `creatives[]`.
6236
+ * `creatives[]`. Required on a single image or video ad (including
6237
+ * one built with `placementAssets`); not used by a `carouselCards`
6238
+ * ad and not accepted with an existing post reference.
6237
6239
  *
6238
6240
  */
6239
6241
  headline?: string;
@@ -6323,7 +6325,9 @@ type CtwaAdRequestBody = {
6323
6325
  };
6324
6326
  /**
6325
6327
  * Messaging and CTWA only (a 400 on POST /v1/ads/call). A hand-built carousel
6326
- * of 2-10 image cards, sent to Meta as `link_data.child_attachments`; every
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
6327
6331
  * card (and the carousel itself) carries the destination's messaging call to
6328
6332
  * action (WHATSAPP_MESSAGE, MESSAGE_PAGE or INSTAGRAM_MESSAGE), so a tap on any
6329
6333
  * card opens the conversation. Replaces `imageUrl` / `video` (sending either is
@@ -6400,7 +6404,7 @@ type CtwaAdRequestBody = {
6400
6404
  thumbnailUrl?: string;
6401
6405
  };
6402
6406
  /**
6403
- * Custom chat welcome message for this entry. See the top-level `welcomeMessage` for the single-creative shape.
6407
+ * Custom chat welcome message for this entry: `text` plus exactly one of `prefillText` or `quickReplies` (400 otherwise). Same shape as the top-level `welcomeMessage` of the single-creative shape.
6404
6408
  */
6405
6409
  welcomeMessage?: {
6406
6410
  /**
@@ -6408,9 +6412,22 @@ type CtwaAdRequestBody = {
6408
6412
  */
6409
6413
  text: string;
6410
6414
  /**
6411
- * Message put into the user's text input, ready to send. Replaces Meta's default.
6415
+ * Message put into the user's text input, ready to send. Replaces Meta's default. Exactly one of prefillText or quickReplies.
6412
6416
  */
6413
- prefillText: string;
6417
+ prefillText?: string;
6418
+ /**
6419
+ * Tappable chips under the greeting instead of a prefilled message. Exactly one of prefillText or quickReplies.
6420
+ */
6421
+ quickReplies?: Array<{
6422
+ /**
6423
+ * Chip label the person taps.
6424
+ */
6425
+ title: string;
6426
+ /**
6427
+ * Opaque string you choose; delivered on the message.received webhook as interactiveMetadata.quickReplyPayload when the chip is tapped.
6428
+ */
6429
+ payload: string;
6430
+ }>;
6414
6431
  };
6415
6432
  /**
6416
6433
  * A 2-10 card carousel for this entry instead of `imageUrl` / `video`; `body` is required. Same rules as the top-level `carouselCards`. Carousel and single-media entries can be mixed on one ad set.
@@ -10717,7 +10734,7 @@ type ParameterCatalogProductId = string;
10717
10734
  */
10718
10735
  type ParameterCatalogTokenAccountId = string;
10719
10736
  /**
10720
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
10737
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
10721
10738
  */
10722
10739
  type ParameterIdempotencyKeyHeader = string;
10723
10740
  /**
@@ -15919,9 +15936,12 @@ type WebhookPayloadMessageSent = {
15919
15936
  * on the inbox analytics endpoints, and the same value a later
15920
15937
  * GET on this message returns.
15921
15938
  *
15922
- * Always present, and `null` whenever the lineage is unknown: a
15923
- * message sent from the platform's own app, and every message
15924
- * stored before this field shipped (2026-08). Existing messages
15939
+ * Always present, and `null` whenever the lineage is unknown: any
15940
+ * outgoing message not sent through Zernio (one typed in the
15941
+ * platform's own app, a Meta automated reply such as an instant
15942
+ * reply or away message, the echo of a click-to-message ad's
15943
+ * greeting), and every message stored before this field shipped
15944
+ * (2026-08). Existing messages
15925
15945
  * are NOT backfilled, so treat `null` as "unknown", never as
15926
15946
  * "sent by a human".
15927
15947
  *
@@ -20540,7 +20560,7 @@ type CreateProfileData = {
20540
20560
  };
20541
20561
  headers?: {
20542
20562
  /**
20543
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
20563
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
20544
20564
  */
20545
20565
  'Idempotency-Key'?: string;
20546
20566
  };
@@ -21670,7 +21690,7 @@ type GetConnectUrlData = {
21670
21690
  *
21671
21691
  * `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`.
21672
21692
  *
21673
- * `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.
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`, `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.
21674
21694
  *
21675
21695
  */
21676
21696
  loginMethod?: 'instagram_login' | 'facebook_login';
@@ -21729,7 +21749,8 @@ type GetConnectUrlData = {
21729
21749
  * - `granted_pages_not_listed`: Pages were ticked but Meta listed none the user can manage, and a
21730
21750
  * direct read of each ticked Page returned no access token.
21731
21751
  *
21732
- * Headless Facebook success (`step=select_page`): `userProfile` is JSON that was
21752
+ * Headless Facebook success (`step=select_page`) and headless Instagram `facebook_login` success
21753
+ * (`step=select_account`): `userProfile` is JSON that was
21733
21754
  * percent-encoded once before being set as a query param, so it is encoded twice on the wire.
21734
21755
  * After your framework decodes the query string once, run one more decodeURIComponent (or
21735
21756
  * equivalent) and then JSON.parse it. `tempToken` and `connect_token` are plain values.
@@ -29367,7 +29388,7 @@ type SendInboxMessageData = {
29367
29388
  };
29368
29389
  headers?: {
29369
29390
  /**
29370
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
29391
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
29371
29392
  */
29372
29393
  'Idempotency-Key'?: string;
29373
29394
  };
@@ -29728,7 +29749,7 @@ type RemoveMessageReactionError = (unknown | ErrorResponse);
29728
29749
  type UploadMediaDirectData = {
29729
29750
  body: {
29730
29751
  /**
29731
- * The file to upload (max 25MB)
29752
+ * The file to upload (about 4.5 MB at most in practice; use POST /v1/media/presign for larger files)
29732
29753
  */
29733
29754
  file: (Blob | File);
29734
29755
  /**
@@ -30395,7 +30416,7 @@ type ReplyToInboxPostData = {
30395
30416
  };
30396
30417
  headers?: {
30397
30418
  /**
30398
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
30419
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
30399
30420
  */
30400
30421
  'Idempotency-Key'?: string;
30401
30422
  };
@@ -31230,7 +31251,7 @@ type ReplyToInboxReviewData = {
31230
31251
  };
31231
31252
  headers?: {
31232
31253
  /**
31233
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
31254
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
31234
31255
  */
31235
31256
  'Idempotency-Key'?: string;
31236
31257
  };
@@ -31811,7 +31832,7 @@ type InitiateWhatsAppCallData = {
31811
31832
  };
31812
31833
  headers?: {
31813
31834
  /**
31814
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
31835
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
31815
31836
  */
31816
31837
  'Idempotency-Key'?: string;
31817
31838
  };
@@ -32050,7 +32071,7 @@ type CreateVoiceCallData = {
32050
32071
  };
32051
32072
  headers?: {
32052
32073
  /**
32053
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
32074
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
32054
32075
  */
32055
32076
  'Idempotency-Key'?: string;
32056
32077
  };
@@ -32644,7 +32665,7 @@ type SendSmsData = {
32644
32665
  };
32645
32666
  headers?: {
32646
32667
  /**
32647
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
32668
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
32648
32669
  */
32649
32670
  'Idempotency-Key'?: string;
32650
32671
  };
@@ -32695,7 +32716,7 @@ type CreateRcsAgentData = {
32695
32716
  };
32696
32717
  headers?: {
32697
32718
  /**
32698
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
32719
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
32699
32720
  */
32700
32721
  'Idempotency-Key'?: string;
32701
32722
  };
@@ -32812,7 +32833,7 @@ type SendRcsMessageData = {
32812
32833
  };
32813
32834
  headers?: {
32814
32835
  /**
32815
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
32836
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
32816
32837
  */
32817
32838
  'Idempotency-Key'?: string;
32818
32839
  };
@@ -32993,7 +33014,7 @@ type CreateBrandedCallingEnterpriseData = {
32993
33014
  };
32994
33015
  headers?: {
32995
33016
  /**
32996
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
33017
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
32997
33018
  */
32998
33019
  'Idempotency-Key'?: string;
32999
33020
  };
@@ -33073,7 +33094,7 @@ type CreateBrandedCallingIdentityData = {
33073
33094
  };
33074
33095
  headers?: {
33075
33096
  /**
33076
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
33097
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
33077
33098
  */
33078
33099
  'Idempotency-Key'?: string;
33079
33100
  };
@@ -38693,7 +38714,7 @@ type AskSupportQuestionData = {
38693
38714
  };
38694
38715
  headers?: {
38695
38716
  /**
38696
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
38717
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
38697
38718
  */
38698
38719
  'Idempotency-Key'?: string;
38699
38720
  };
@@ -46987,7 +47008,7 @@ type BoostPostData = {
46987
47008
  };
46988
47009
  headers?: {
46989
47010
  /**
46990
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
47011
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
46991
47012
  */
46992
47013
  'Idempotency-Key'?: string;
46993
47014
  };
@@ -47885,9 +47906,11 @@ type CreateStandaloneAdData = {
47885
47906
  * (card `callToAction`, falling back to the top-level one) and caption (card
47886
47907
  * `headline`, else `description`). `headline` is still required.
47887
47908
  *
47888
- * Meta only. Hand-built carousel: 2-10 authored cards in DETERMINISTIC order, mapped to
47909
+ * Meta only. Hand-built carousel: 2-10 authored cards, sent in the order given as
47889
47910
  * the creative's `link_data.child_attachments`. Unlike `dynamicCreative`,
47890
- * you control the card order and per-card copy/link. Requires top-level `body`
47911
+ * you author every card's copy and link, but Meta may still reorder the cards
47912
+ * for performance (`multi_share_optimized` defaults to true and Zernio does not
47913
+ * send it), and no field fixes the order today. Requires top-level `body`
47891
47914
  * and `callToAction`; `linkUrl` is also required UNLESS `leadGenFormId` is set. Those
47892
47915
  * become the ad's own Destination and button (`link_data.link` / `link_data.call_to_action`),
47893
47916
  * and double as the per-card fallback when a card omits its own.
@@ -48330,7 +48353,7 @@ type CreateStandaloneAdData = {
48330
48353
  };
48331
48354
  headers?: {
48332
48355
  /**
48333
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
48356
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
48334
48357
  */
48335
48358
  'Idempotency-Key'?: string;
48336
48359
  };
@@ -51370,7 +51393,7 @@ type CreateMessagingAdData = {
51370
51393
  });
51371
51394
  headers?: {
51372
51395
  /**
51373
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
51396
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
51374
51397
  */
51375
51398
  'Idempotency-Key'?: string;
51376
51399
  };
@@ -51401,7 +51424,7 @@ type CreateCallAdData = {
51401
51424
  });
51402
51425
  headers?: {
51403
51426
  /**
51404
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
51427
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
51405
51428
  */
51406
51429
  'Idempotency-Key'?: string;
51407
51430
  };
@@ -51412,7 +51435,7 @@ type CreateCtwaAdData = {
51412
51435
  body: CtwaAdRequestBody;
51413
51436
  headers?: {
51414
51437
  /**
51415
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
51438
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
51416
51439
  */
51417
51440
  'Idempotency-Key'?: string;
51418
51441
  };
package/dist/index.d.ts CHANGED
@@ -6233,7 +6233,9 @@ type CtwaAdRequestBody = {
6233
6233
  whatsappPhoneNumber?: string;
6234
6234
  /**
6235
6235
  * Single-creative shape only. Mutually exclusive with
6236
- * `creatives[]`.
6236
+ * `creatives[]`. Required on a single image or video ad (including
6237
+ * one built with `placementAssets`); not used by a `carouselCards`
6238
+ * ad and not accepted with an existing post reference.
6237
6239
  *
6238
6240
  */
6239
6241
  headline?: string;
@@ -6323,7 +6325,9 @@ type CtwaAdRequestBody = {
6323
6325
  };
6324
6326
  /**
6325
6327
  * Messaging and CTWA only (a 400 on POST /v1/ads/call). A hand-built carousel
6326
- * of 2-10 image cards, sent to Meta as `link_data.child_attachments`; every
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
6327
6331
  * card (and the carousel itself) carries the destination's messaging call to
6328
6332
  * action (WHATSAPP_MESSAGE, MESSAGE_PAGE or INSTAGRAM_MESSAGE), so a tap on any
6329
6333
  * card opens the conversation. Replaces `imageUrl` / `video` (sending either is
@@ -6400,7 +6404,7 @@ type CtwaAdRequestBody = {
6400
6404
  thumbnailUrl?: string;
6401
6405
  };
6402
6406
  /**
6403
- * Custom chat welcome message for this entry. See the top-level `welcomeMessage` for the single-creative shape.
6407
+ * Custom chat welcome message for this entry: `text` plus exactly one of `prefillText` or `quickReplies` (400 otherwise). Same shape as the top-level `welcomeMessage` of the single-creative shape.
6404
6408
  */
6405
6409
  welcomeMessage?: {
6406
6410
  /**
@@ -6408,9 +6412,22 @@ type CtwaAdRequestBody = {
6408
6412
  */
6409
6413
  text: string;
6410
6414
  /**
6411
- * Message put into the user's text input, ready to send. Replaces Meta's default.
6415
+ * Message put into the user's text input, ready to send. Replaces Meta's default. Exactly one of prefillText or quickReplies.
6412
6416
  */
6413
- prefillText: string;
6417
+ prefillText?: string;
6418
+ /**
6419
+ * Tappable chips under the greeting instead of a prefilled message. Exactly one of prefillText or quickReplies.
6420
+ */
6421
+ quickReplies?: Array<{
6422
+ /**
6423
+ * Chip label the person taps.
6424
+ */
6425
+ title: string;
6426
+ /**
6427
+ * Opaque string you choose; delivered on the message.received webhook as interactiveMetadata.quickReplyPayload when the chip is tapped.
6428
+ */
6429
+ payload: string;
6430
+ }>;
6414
6431
  };
6415
6432
  /**
6416
6433
  * A 2-10 card carousel for this entry instead of `imageUrl` / `video`; `body` is required. Same rules as the top-level `carouselCards`. Carousel and single-media entries can be mixed on one ad set.
@@ -10717,7 +10734,7 @@ type ParameterCatalogProductId = string;
10717
10734
  */
10718
10735
  type ParameterCatalogTokenAccountId = string;
10719
10736
  /**
10720
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
10737
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
10721
10738
  */
10722
10739
  type ParameterIdempotencyKeyHeader = string;
10723
10740
  /**
@@ -15919,9 +15936,12 @@ type WebhookPayloadMessageSent = {
15919
15936
  * on the inbox analytics endpoints, and the same value a later
15920
15937
  * GET on this message returns.
15921
15938
  *
15922
- * Always present, and `null` whenever the lineage is unknown: a
15923
- * message sent from the platform's own app, and every message
15924
- * stored before this field shipped (2026-08). Existing messages
15939
+ * Always present, and `null` whenever the lineage is unknown: any
15940
+ * outgoing message not sent through Zernio (one typed in the
15941
+ * platform's own app, a Meta automated reply such as an instant
15942
+ * reply or away message, the echo of a click-to-message ad's
15943
+ * greeting), and every message stored before this field shipped
15944
+ * (2026-08). Existing messages
15925
15945
  * are NOT backfilled, so treat `null` as "unknown", never as
15926
15946
  * "sent by a human".
15927
15947
  *
@@ -20540,7 +20560,7 @@ type CreateProfileData = {
20540
20560
  };
20541
20561
  headers?: {
20542
20562
  /**
20543
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
20563
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
20544
20564
  */
20545
20565
  'Idempotency-Key'?: string;
20546
20566
  };
@@ -21670,7 +21690,7 @@ type GetConnectUrlData = {
21670
21690
  *
21671
21691
  * `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`.
21672
21692
  *
21673
- * `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.
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`, `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.
21674
21694
  *
21675
21695
  */
21676
21696
  loginMethod?: 'instagram_login' | 'facebook_login';
@@ -21729,7 +21749,8 @@ type GetConnectUrlData = {
21729
21749
  * - `granted_pages_not_listed`: Pages were ticked but Meta listed none the user can manage, and a
21730
21750
  * direct read of each ticked Page returned no access token.
21731
21751
  *
21732
- * Headless Facebook success (`step=select_page`): `userProfile` is JSON that was
21752
+ * Headless Facebook success (`step=select_page`) and headless Instagram `facebook_login` success
21753
+ * (`step=select_account`): `userProfile` is JSON that was
21733
21754
  * percent-encoded once before being set as a query param, so it is encoded twice on the wire.
21734
21755
  * After your framework decodes the query string once, run one more decodeURIComponent (or
21735
21756
  * equivalent) and then JSON.parse it. `tempToken` and `connect_token` are plain values.
@@ -29367,7 +29388,7 @@ type SendInboxMessageData = {
29367
29388
  };
29368
29389
  headers?: {
29369
29390
  /**
29370
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
29391
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
29371
29392
  */
29372
29393
  'Idempotency-Key'?: string;
29373
29394
  };
@@ -29728,7 +29749,7 @@ type RemoveMessageReactionError = (unknown | ErrorResponse);
29728
29749
  type UploadMediaDirectData = {
29729
29750
  body: {
29730
29751
  /**
29731
- * The file to upload (max 25MB)
29752
+ * The file to upload (about 4.5 MB at most in practice; use POST /v1/media/presign for larger files)
29732
29753
  */
29733
29754
  file: (Blob | File);
29734
29755
  /**
@@ -30395,7 +30416,7 @@ type ReplyToInboxPostData = {
30395
30416
  };
30396
30417
  headers?: {
30397
30418
  /**
30398
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
30419
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
30399
30420
  */
30400
30421
  'Idempotency-Key'?: string;
30401
30422
  };
@@ -31230,7 +31251,7 @@ type ReplyToInboxReviewData = {
31230
31251
  };
31231
31252
  headers?: {
31232
31253
  /**
31233
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
31254
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
31234
31255
  */
31235
31256
  'Idempotency-Key'?: string;
31236
31257
  };
@@ -31811,7 +31832,7 @@ type InitiateWhatsAppCallData = {
31811
31832
  };
31812
31833
  headers?: {
31813
31834
  /**
31814
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
31835
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
31815
31836
  */
31816
31837
  'Idempotency-Key'?: string;
31817
31838
  };
@@ -32050,7 +32071,7 @@ type CreateVoiceCallData = {
32050
32071
  };
32051
32072
  headers?: {
32052
32073
  /**
32053
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
32074
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
32054
32075
  */
32055
32076
  'Idempotency-Key'?: string;
32056
32077
  };
@@ -32644,7 +32665,7 @@ type SendSmsData = {
32644
32665
  };
32645
32666
  headers?: {
32646
32667
  /**
32647
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
32668
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
32648
32669
  */
32649
32670
  'Idempotency-Key'?: string;
32650
32671
  };
@@ -32695,7 +32716,7 @@ type CreateRcsAgentData = {
32695
32716
  };
32696
32717
  headers?: {
32697
32718
  /**
32698
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
32719
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
32699
32720
  */
32700
32721
  'Idempotency-Key'?: string;
32701
32722
  };
@@ -32812,7 +32833,7 @@ type SendRcsMessageData = {
32812
32833
  };
32813
32834
  headers?: {
32814
32835
  /**
32815
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
32836
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
32816
32837
  */
32817
32838
  'Idempotency-Key'?: string;
32818
32839
  };
@@ -32993,7 +33014,7 @@ type CreateBrandedCallingEnterpriseData = {
32993
33014
  };
32994
33015
  headers?: {
32995
33016
  /**
32996
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
33017
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
32997
33018
  */
32998
33019
  'Idempotency-Key'?: string;
32999
33020
  };
@@ -33073,7 +33094,7 @@ type CreateBrandedCallingIdentityData = {
33073
33094
  };
33074
33095
  headers?: {
33075
33096
  /**
33076
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
33097
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
33077
33098
  */
33078
33099
  'Idempotency-Key'?: string;
33079
33100
  };
@@ -38693,7 +38714,7 @@ type AskSupportQuestionData = {
38693
38714
  };
38694
38715
  headers?: {
38695
38716
  /**
38696
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
38717
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
38697
38718
  */
38698
38719
  'Idempotency-Key'?: string;
38699
38720
  };
@@ -46987,7 +47008,7 @@ type BoostPostData = {
46987
47008
  };
46988
47009
  headers?: {
46989
47010
  /**
46990
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
47011
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
46991
47012
  */
46992
47013
  'Idempotency-Key'?: string;
46993
47014
  };
@@ -47885,9 +47906,11 @@ type CreateStandaloneAdData = {
47885
47906
  * (card `callToAction`, falling back to the top-level one) and caption (card
47886
47907
  * `headline`, else `description`). `headline` is still required.
47887
47908
  *
47888
- * Meta only. Hand-built carousel: 2-10 authored cards in DETERMINISTIC order, mapped to
47909
+ * Meta only. Hand-built carousel: 2-10 authored cards, sent in the order given as
47889
47910
  * the creative's `link_data.child_attachments`. Unlike `dynamicCreative`,
47890
- * you control the card order and per-card copy/link. Requires top-level `body`
47911
+ * you author every card's copy and link, but Meta may still reorder the cards
47912
+ * for performance (`multi_share_optimized` defaults to true and Zernio does not
47913
+ * send it), and no field fixes the order today. Requires top-level `body`
47891
47914
  * and `callToAction`; `linkUrl` is also required UNLESS `leadGenFormId` is set. Those
47892
47915
  * become the ad's own Destination and button (`link_data.link` / `link_data.call_to_action`),
47893
47916
  * and double as the per-card fallback when a card omits its own.
@@ -48330,7 +48353,7 @@ type CreateStandaloneAdData = {
48330
48353
  };
48331
48354
  headers?: {
48332
48355
  /**
48333
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
48356
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
48334
48357
  */
48335
48358
  'Idempotency-Key'?: string;
48336
48359
  };
@@ -51370,7 +51393,7 @@ type CreateMessagingAdData = {
51370
51393
  });
51371
51394
  headers?: {
51372
51395
  /**
51373
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
51396
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
51374
51397
  */
51375
51398
  'Idempotency-Key'?: string;
51376
51399
  };
@@ -51401,7 +51424,7 @@ type CreateCallAdData = {
51401
51424
  });
51402
51425
  headers?: {
51403
51426
  /**
51404
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
51427
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
51405
51428
  */
51406
51429
  'Idempotency-Key'?: string;
51407
51430
  };
@@ -51412,7 +51435,7 @@ type CreateCtwaAdData = {
51412
51435
  body: CtwaAdRequestBody;
51413
51436
  headers?: {
51414
51437
  /**
51415
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
51438
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
51416
51439
  */
51417
51440
  'Idempotency-Key'?: string;
51418
51441
  };
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.1177",
39
+ version: "0.2.1179",
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.1177",
8
+ version: "0.2.1179",
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.1177",
3
+ "version": "0.2.1179",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -4379,7 +4379,10 @@ export const removeMessageReaction = <ThrowOnError extends boolean = false>(opti
4379
4379
  * The URL can be used as attachmentUrl when sending inbox messages.
4380
4380
  *
4381
4381
  * Files are stored in temporary storage and auto-delete after 7 days.
4382
- * Maximum file size is 25MB.
4382
+ * The effective maximum is about 4.5 MB: the multipart body goes through
4383
+ * the hosting platform's request body limit, which answers 413 before the
4384
+ * endpoint's own 25 MB check is reached. For larger files use
4385
+ * POST /v1/media/presign and upload straight to storage.
4383
4386
  *
4384
4387
  * Unlike /v1/media/upload (which uses upload tokens for end-user flows),
4385
4388
  * this endpoint takes your API key in the Authorization header, for programmatic use.
@@ -12810,11 +12813,23 @@ export const replaceGoogleListingGroupFilters = <ThrowOnError extends boolean =
12810
12813
  *
12811
12814
  * Per-platform required fields, budget minimums, and video-ad rules are documented on each property below.
12812
12815
  *
12816
+ * **Meta required fields per shape** (a missing one is a 400 naming it in `param`):
12817
+ *
12818
+ * - Every shape that builds a new ad set (no `adSetId`, `existingCampaignId` or `buyingType: "RESERVED"`): `budgetAmount` and `budgetType`, plus `endDate` for a lifetime budget.
12819
+ * - Single image or video (the default), also with `adSetId`: `headline` (max 255), `body`, `callToAction`, exactly one of `imageUrl` / `video` (none for goal `catalog_sales`), and `linkUrl` unless the goal is `lead_generation` or `page_visits` or `leadGenFormId` is set.
12820
+ * - `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.
12821
+ * - `placementAssets`: `headline`, `body`, `callToAction`, and `linkUrl` with the same exemptions as the single shape; the media comes from `placementAssets`.
12822
+ * - `carouselCards`: `body`, `callToAction`, and `linkUrl` unless the goal is `lead_generation` or `leadGenFormId` is set. `headline` is not required.
12823
+ * - `creatives[]`: per entry `headline`, `body`, `callToAction`, `imageUrl` or `video`, and `linkUrl` unless the goal is `lead_generation`. Top-level `body` is not required.
12824
+ * - `dynamicCreative`: `imageUrls` or `videoUrls`, `callToActionTypes`, and `linkUrls` unless the goal is `lead_generation`. Top-level `body` is not required.
12825
+ * - `existingCreativeId`: no creative fields. Goal `page_likes`: `body` only.
12826
+ * - Goal `lead_generation` always needs `leadGenFormId`, except with `existingCreativeId`.
12827
+ *
12813
12828
  * LinkedIn creates a Single Image or Single Video Ad backed by a Direct Sponsored Content "dark post" authored by a Company Page (see `organizationId`). Supported goals are engagement, traffic, awareness, and video_views (video ads use the `video` field; video_views requires a video), and traffic ads require `linkUrl`.
12814
12829
  *
12815
12830
  * Reddit Ads (`accountId` of a `redditads` connection, `adAccountId` like `a2_abc123`) creates a campaign, an ad group carrying the budget, schedule, targeting and pixel, and an ad running a new promoted post authored by the ad account's first profile (422 when it has none). The creative format follows the body: `carouselCards` builds a carousel, `video` a video ad, `imageUrl` an image ad, and none of them a text ad, which cannot link out (`linkUrl` is a 400 there; `body` is required). Only the legacy single-creative shape is available: `creatives[]`, `adSetId`, `existingCampaignId` and `validateOnly` are refused. Reddit throttling surfaces as 429 `rate_limited` with `platform: reddit`; retry after a delay. To promote an existing Reddit post use POST /v1/ads/boost.
12816
12831
  *
12817
- * **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
12832
+ * **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). If the first request is cut off mid-create (for example by a function timeout), its key can stay in progress and keep returning 409 until it expires; use a new key to retry sooner, after checking whether the ad was created. Keys are scoped to your credential and expire after 24h.
12818
12833
  *
12819
12834
  */
12820
12835
  export const createStandaloneAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateStandaloneAdData, ThrowOnError>) => {
@@ -14429,9 +14444,19 @@ export const sendWhatsAppConversion = <ThrowOnError extends boolean = false>(opt
14429
14444
  * `accountId` is a Facebook, Instagram or Meta ads (business login) connection;
14430
14445
  * `pageId` picks the Page when that connection was granted several.
14431
14446
  *
14447
+ * **Required fields per shape** (a missing one is a 400 naming it in `param`):
14448
+ *
14449
+ * - Always `accountId`, `adAccountId`, `name`, and exactly one of `destination` / `destinations`.
14450
+ * - `budgetAmount` and `budgetType` unless `adSetId` or `existingCampaignId` is set, plus `endDate` for a lifetime budget.
14451
+ * - Single image or video: `headline`, `body`, and exactly one of `imageUrl` / `video`. With `placementAssets`, `headline` and `body` only (the media comes from `placementAssets`).
14452
+ * - `carouselCards`: `body` and the 2-10 cards; `headline` is optional, `imageUrl` / `video` / top-level `description` are a 400.
14453
+ * - Existing post (`platformPostId` or `objectStoryId`): no copy or media fields.
14454
+ * - `creatives[]`: the same rules per entry, with no top-level creative fields.
14455
+ * - `welcomeMessage`, when sent: `text` plus exactly one of `prefillText` / `quickReplies`.
14456
+ *
14432
14457
  * **WhatsApp number prerequisite.** For the WhatsApp destination, link the WhatsApp number to the Facebook Page used for the ad before creating it: Meta checks the pairing at creation. Link it from the WhatsApp Business app (Settings > Business tools > Facebook & Instagram) or from the Page settings (Linked accounts > WhatsApp). Linking does not affect the number's WhatsApp connection in Zernio (Cloud API or coexistence), so no reconnect or re-sync is needed. If Meta creates a new ad set without the requested `whatsappPhoneNumber`, the 201 response carries a `warnings` entry. This can happen even when the number is linked (Meta can drop a Page's second linked number).
14433
14458
  *
14434
- * **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
14459
+ * **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). If the first request is cut off mid-create (for example by a function timeout), its key can stay in progress and keep returning 409 until it expires; use a new key to retry sooner, after checking whether the ad was created. Keys are scoped to your credential and expire after 24h.
14435
14460
  */
14436
14461
  export const createMessagingAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateMessagingAdData, ThrowOnError>) => {
14437
14462
  return (options?.client ?? client).post<CreateMessagingAdResponse, CreateMessagingAdError, ThrowOnError>({
@@ -14449,7 +14474,7 @@ export const createMessagingAd = <ThrowOnError extends boolean = false>(options:
14449
14474
  * and the campaign objective defaults to OUTCOME_LEADS.
14450
14475
  * Supports the same single-creative and multi-creative shapes as CTWA.
14451
14476
  *
14452
- * **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
14477
+ * **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). If the first request is cut off mid-create (for example by a function timeout), its key can stay in progress and keep returning 409 until it expires; use a new key to retry sooner, after checking whether the ad was created. Keys are scoped to your credential and expire after 24h.
14453
14478
  */
14454
14479
  export const createCallAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateCallAdData, ThrowOnError>) => {
14455
14480
  return (options?.client ?? client).post<CreateCallAdResponse, CreateCallAdError, ThrowOnError>({
@@ -14481,7 +14506,7 @@ export const createCallAd = <ThrowOnError extends boolean = false>(options: Opti
14481
14506
  *
14482
14507
  * **WhatsApp number prerequisite.** Link the WhatsApp number to the Facebook Page used for the ad before creating it: Meta checks the pairing at creation. Link it from the WhatsApp Business app (Settings > Business tools > Facebook & Instagram) or from the Page settings (Linked accounts > WhatsApp). Linking does not affect the number's WhatsApp connection in Zernio (Cloud API or coexistence), so no reconnect or re-sync is needed. If Meta creates a new ad set without the requested `whatsappPhoneNumber`, the 201 response carries a `warnings` entry. This can happen even when the number is linked (Meta can drop a Page's second linked number).
14483
14508
  *
14484
- * **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
14509
+ * **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). If the first request is cut off mid-create (for example by a function timeout), its key can stay in progress and keep returning 409 until it expires; use a new key to retry sooner, after checking whether the ad was created. Keys are scoped to your credential and expire after 24h.
14485
14510
  */
14486
14511
  export const createCtwaAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateCtwaAdData, ThrowOnError>) => {
14487
14512
  return (options?.client ?? client).post<CreateCtwaAdResponse, CreateCtwaAdError, ThrowOnError>({
@@ -4412,7 +4412,9 @@ export type CtwaAdRequestBody = {
4412
4412
  whatsappPhoneNumber?: string;
4413
4413
  /**
4414
4414
  * Single-creative shape only. Mutually exclusive with
4415
- * `creatives[]`.
4415
+ * `creatives[]`. Required on a single image or video ad (including
4416
+ * one built with `placementAssets`); not used by a `carouselCards`
4417
+ * ad and not accepted with an existing post reference.
4416
4418
  *
4417
4419
  */
4418
4420
  headline?: string;
@@ -4502,7 +4504,9 @@ export type CtwaAdRequestBody = {
4502
4504
  };
4503
4505
  /**
4504
4506
  * Messaging and CTWA only (a 400 on POST /v1/ads/call). A hand-built carousel
4505
- * of 2-10 image cards, sent to Meta as `link_data.child_attachments`; every
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
4506
4510
  * card (and the carousel itself) carries the destination's messaging call to
4507
4511
  * action (WHATSAPP_MESSAGE, MESSAGE_PAGE or INSTAGRAM_MESSAGE), so a tap on any
4508
4512
  * card opens the conversation. Replaces `imageUrl` / `video` (sending either is
@@ -4579,7 +4583,7 @@ export type CtwaAdRequestBody = {
4579
4583
  thumbnailUrl?: string;
4580
4584
  };
4581
4585
  /**
4582
- * Custom chat welcome message for this entry. See the top-level `welcomeMessage` for the single-creative shape.
4586
+ * Custom chat welcome message for this entry: `text` plus exactly one of `prefillText` or `quickReplies` (400 otherwise). Same shape as the top-level `welcomeMessage` of the single-creative shape.
4583
4587
  */
4584
4588
  welcomeMessage?: {
4585
4589
  /**
@@ -4587,9 +4591,22 @@ export type CtwaAdRequestBody = {
4587
4591
  */
4588
4592
  text: string;
4589
4593
  /**
4590
- * Message put into the user's text input, ready to send. Replaces Meta's default.
4594
+ * Message put into the user's text input, ready to send. Replaces Meta's default. Exactly one of prefillText or quickReplies.
4591
4595
  */
4592
- prefillText: string;
4596
+ prefillText?: string;
4597
+ /**
4598
+ * Tappable chips under the greeting instead of a prefilled message. Exactly one of prefillText or quickReplies.
4599
+ */
4600
+ quickReplies?: Array<{
4601
+ /**
4602
+ * Chip label the person taps.
4603
+ */
4604
+ title: string;
4605
+ /**
4606
+ * Opaque string you choose; delivered on the message.received webhook as interactiveMetadata.quickReplyPayload when the chip is tapped.
4607
+ */
4608
+ payload: string;
4609
+ }>;
4593
4610
  };
4594
4611
  /**
4595
4612
  * A 2-10 card carousel for this entry instead of `imageUrl` / `video`; `body` is required. Same rules as the top-level `carouselCards`. Carousel and single-media entries can be mixed on one ad set.
@@ -9087,7 +9104,7 @@ export type ParameterCatalogProductId = string;
9087
9104
  export type ParameterCatalogTokenAccountId = string;
9088
9105
 
9089
9106
  /**
9090
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
9107
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
9091
9108
  */
9092
9109
  export type ParameterIdempotencyKeyHeader = string;
9093
9110
 
@@ -14507,9 +14524,12 @@ export type WebhookPayloadMessageSent = {
14507
14524
  * on the inbox analytics endpoints, and the same value a later
14508
14525
  * GET on this message returns.
14509
14526
  *
14510
- * Always present, and `null` whenever the lineage is unknown: a
14511
- * message sent from the platform's own app, and every message
14512
- * stored before this field shipped (2026-08). Existing messages
14527
+ * Always present, and `null` whenever the lineage is unknown: any
14528
+ * outgoing message not sent through Zernio (one typed in the
14529
+ * platform's own app, a Meta automated reply such as an instant
14530
+ * reply or away message, the echo of a click-to-message ad's
14531
+ * greeting), and every message stored before this field shipped
14532
+ * (2026-08). Existing messages
14513
14533
  * are NOT backfilled, so treat `null` as "unknown", never as
14514
14534
  * "sent by a human".
14515
14535
  *
@@ -19413,7 +19433,7 @@ export type CreateProfileData = {
19413
19433
  };
19414
19434
  headers?: {
19415
19435
  /**
19416
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
19436
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
19417
19437
  */
19418
19438
  'Idempotency-Key'?: string;
19419
19439
  };
@@ -20621,7 +20641,7 @@ export type GetConnectUrlData = {
20621
20641
  *
20622
20642
  * `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`.
20623
20643
  *
20624
- * `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.
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`, `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.
20625
20645
  *
20626
20646
  */
20627
20647
  loginMethod?: 'instagram_login' | 'facebook_login';
@@ -20680,7 +20700,8 @@ export type GetConnectUrlData = {
20680
20700
  * - `granted_pages_not_listed`: Pages were ticked but Meta listed none the user can manage, and a
20681
20701
  * direct read of each ticked Page returned no access token.
20682
20702
  *
20683
- * Headless Facebook success (`step=select_page`): `userProfile` is JSON that was
20703
+ * Headless Facebook success (`step=select_page`) and headless Instagram `facebook_login` success
20704
+ * (`step=select_account`): `userProfile` is JSON that was
20684
20705
  * percent-encoded once before being set as a query param, so it is encoded twice on the wire.
20685
20706
  * After your framework decodes the query string once, run one more decodeURIComponent (or
20686
20707
  * equivalent) and then JSON.parse it. `tempToken` and `connect_token` are plain values.
@@ -28753,7 +28774,7 @@ export type SendInboxMessageData = {
28753
28774
  };
28754
28775
  headers?: {
28755
28776
  /**
28756
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
28777
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
28757
28778
  */
28758
28779
  'Idempotency-Key'?: string;
28759
28780
  };
@@ -29144,7 +29165,7 @@ export type RemoveMessageReactionError = (unknown | ErrorResponse);
29144
29165
  export type UploadMediaDirectData = {
29145
29166
  body: {
29146
29167
  /**
29147
- * The file to upload (max 25MB)
29168
+ * The file to upload (about 4.5 MB at most in practice; use POST /v1/media/presign for larger files)
29148
29169
  */
29149
29170
  file: (Blob | File);
29150
29171
  /**
@@ -29877,7 +29898,7 @@ export type ReplyToInboxPostData = {
29877
29898
  };
29878
29899
  headers?: {
29879
29900
  /**
29880
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
29901
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
29881
29902
  */
29882
29903
  'Idempotency-Key'?: string;
29883
29904
  };
@@ -30784,7 +30805,7 @@ export type ReplyToInboxReviewData = {
30784
30805
  };
30785
30806
  headers?: {
30786
30807
  /**
30787
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
30808
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
30788
30809
  */
30789
30810
  'Idempotency-Key'?: string;
30790
30811
  };
@@ -31410,7 +31431,7 @@ export type InitiateWhatsAppCallData = {
31410
31431
  };
31411
31432
  headers?: {
31412
31433
  /**
31413
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
31434
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
31414
31435
  */
31415
31436
  'Idempotency-Key'?: string;
31416
31437
  };
@@ -31673,7 +31694,7 @@ export type CreateVoiceCallData = {
31673
31694
  };
31674
31695
  headers?: {
31675
31696
  /**
31676
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
31697
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
31677
31698
  */
31678
31699
  'Idempotency-Key'?: string;
31679
31700
  };
@@ -32351,7 +32372,7 @@ export type SendSmsData = {
32351
32372
  };
32352
32373
  headers?: {
32353
32374
  /**
32354
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
32375
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
32355
32376
  */
32356
32377
  'Idempotency-Key'?: string;
32357
32378
  };
@@ -32410,7 +32431,7 @@ export type CreateRcsAgentData = {
32410
32431
  };
32411
32432
  headers?: {
32412
32433
  /**
32413
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
32434
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
32414
32435
  */
32415
32436
  'Idempotency-Key'?: string;
32416
32437
  };
@@ -32554,7 +32575,7 @@ export type SendRcsMessageData = {
32554
32575
  };
32555
32576
  headers?: {
32556
32577
  /**
32557
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
32578
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
32558
32579
  */
32559
32580
  'Idempotency-Key'?: string;
32560
32581
  };
@@ -32758,7 +32779,7 @@ export type CreateBrandedCallingEnterpriseData = {
32758
32779
  };
32759
32780
  headers?: {
32760
32781
  /**
32761
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
32782
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
32762
32783
  */
32763
32784
  'Idempotency-Key'?: string;
32764
32785
  };
@@ -32854,7 +32875,7 @@ export type CreateBrandedCallingIdentityData = {
32854
32875
  };
32855
32876
  headers?: {
32856
32877
  /**
32857
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
32878
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
32858
32879
  */
32859
32880
  'Idempotency-Key'?: string;
32860
32881
  };
@@ -38968,7 +38989,7 @@ export type AskSupportQuestionData = {
38968
38989
  };
38969
38990
  headers?: {
38970
38991
  /**
38971
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
38992
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
38972
38993
  */
38973
38994
  'Idempotency-Key'?: string;
38974
38995
  };
@@ -47778,7 +47799,7 @@ export type BoostPostData = {
47778
47799
  };
47779
47800
  headers?: {
47780
47801
  /**
47781
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
47802
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
47782
47803
  */
47783
47804
  'Idempotency-Key'?: string;
47784
47805
  };
@@ -48700,9 +48721,11 @@ export type CreateStandaloneAdData = {
48700
48721
  * (card `callToAction`, falling back to the top-level one) and caption (card
48701
48722
  * `headline`, else `description`). `headline` is still required.
48702
48723
  *
48703
- * Meta only. Hand-built carousel: 2-10 authored cards in DETERMINISTIC order, mapped to
48724
+ * Meta only. Hand-built carousel: 2-10 authored cards, sent in the order given as
48704
48725
  * the creative's `link_data.child_attachments`. Unlike `dynamicCreative`,
48705
- * you control the card order and per-card copy/link. Requires top-level `body`
48726
+ * you author every card's copy and link, but Meta may still reorder the cards
48727
+ * for performance (`multi_share_optimized` defaults to true and Zernio does not
48728
+ * send it), and no field fixes the order today. Requires top-level `body`
48706
48729
  * and `callToAction`; `linkUrl` is also required UNLESS `leadGenFormId` is set. Those
48707
48730
  * become the ad's own Destination and button (`link_data.link` / `link_data.call_to_action`),
48708
48731
  * and double as the per-card fallback when a card omits its own.
@@ -49145,7 +49168,7 @@ export type CreateStandaloneAdData = {
49145
49168
  };
49146
49169
  headers?: {
49147
49170
  /**
49148
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
49171
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
49149
49172
  */
49150
49173
  'Idempotency-Key'?: string;
49151
49174
  };
@@ -52404,7 +52427,7 @@ export type CreateMessagingAdData = {
52404
52427
  });
52405
52428
  headers?: {
52406
52429
  /**
52407
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
52430
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
52408
52431
  */
52409
52432
  'Idempotency-Key'?: string;
52410
52433
  };
@@ -52438,7 +52461,7 @@ export type CreateCallAdData = {
52438
52461
  });
52439
52462
  headers?: {
52440
52463
  /**
52441
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
52464
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
52442
52465
  */
52443
52466
  'Idempotency-Key'?: string;
52444
52467
  };
@@ -52452,7 +52475,7 @@ export type CreateCtwaAdData = {
52452
52475
  body: CtwaAdRequestBody;
52453
52476
  headers?: {
52454
52477
  /**
52455
- * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
52478
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
52456
52479
  */
52457
52480
  'Idempotency-Key'?: string;
52458
52481
  };