@getlatedev/node 0.2.1094 → 0.2.1096

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
36
36
  // package.json
37
37
  var package_default = {
38
38
  name: "@getlatedev/node",
39
- version: "0.2.1094",
39
+ version: "0.2.1096",
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.1094",
8
+ version: "0.2.1096",
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.1094",
3
+ "version": "0.2.1096",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -4006,6 +4006,8 @@ export type actionSource = 'web' | 'app' | 'offline' | 'crm' | 'phone_call' | 's
4006
4006
  * - Single-creative: `headline`, `body`, and one of `imageUrl` / `video`,
4007
4007
  * OR `platformPostId` / `objectStoryId` to reuse an organic post.
4008
4008
  * On POST /v1/ads/messaging, `placementAssets` can replace `imageUrl` / `video`.
4009
+ * - Carousel (messaging and CTWA): `body` and `carouselCards` (2-10 image
4010
+ * cards) instead of `imageUrl` / `video`, top level or per `creatives[]` entry.
4009
4011
  * - Multi-creative: a non-empty `creatives[]` array. Top-level
4010
4012
  * creative fields must NOT be set on this shape.
4011
4013
  *
@@ -4166,6 +4168,21 @@ export type CtwaAdRequestBody = {
4166
4168
  payload: string;
4167
4169
  }>;
4168
4170
  };
4171
+ /**
4172
+ * Messaging and CTWA only (a 400 on POST /v1/ads/call). A hand-built carousel
4173
+ * of 2-10 image cards, sent to Meta as `link_data.child_attachments`; every
4174
+ * card (and the carousel itself) carries the destination's messaging call to
4175
+ * action (WHATSAPP_MESSAGE, MESSAGE_PAGE or INSTAGRAM_MESSAGE), so a tap on any
4176
+ * card opens the conversation. Replaces `imageUrl` / `video` (sending either is
4177
+ * a 400). `body` is required as the primary text; `headline` is optional and
4178
+ * only names the creative (each card has its own `headline`); a top-level
4179
+ * `description` is a 400 (set it per card). `welcomeMessage`,
4180
+ * `whatsappPhoneNumber` and `destinations` apply as on a single-image ad. Also a
4181
+ * 400 with `placementAssets`, `platformPostId`, `existingPostId` or
4182
+ * `objectStoryId`. Single-creative shape; for `creatives[]` set it per entry.
4183
+ *
4184
+ */
4185
+ carouselCards?: Array<MessagingCarouselCard>;
4169
4186
  /**
4170
4187
  * Multi-creative shape: N CTWA ads under one campaign + one
4171
4188
  * ad set, sharing budget and targeting. Mutually exclusive
@@ -4242,6 +4259,10 @@ export type CtwaAdRequestBody = {
4242
4259
  */
4243
4260
  prefillText: string;
4244
4261
  };
4262
+ /**
4263
+ * 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.
4264
+ */
4265
+ carouselCards?: Array<MessagingCarouselCard>;
4245
4266
  }>;
4246
4267
  /**
4247
4268
  * Attach the creatives to this EXISTING messaging ad set instead of
@@ -5162,6 +5183,16 @@ export type ErrorResponse = {
5162
5183
  * create with a 5xx or dropped the connection and Zernio could not confirm
5163
5184
  * whether the object exists: check that parent before creating it again.
5164
5185
  *
5186
+ * When Meta refuses a write because the ad account's status is ineligible to manage
5187
+ * ads (Meta subcode 2490592 or 4841021, on the write itself or on a cleanup delete),
5188
+ * any Meta ads write (create, boost, CTWA, campaign / ad set / ad updates and status
5189
+ * changes) answers 422 `ad_account_unusable`. The message names the ad account when
5190
+ * known, links Meta's fix (https://www.facebook.com/business/help/422289316306981),
5191
+ * lists the objects left behind and ends with Meta's original error, which also stays
5192
+ * verbatim in `platformError`. Meta often reports the first failure under an
5193
+ * unrelated code (e.g. 1487194 on the creative), so branch on `code`, not on
5194
+ * `platformError`.
5195
+ *
5165
5196
  */
5166
5197
  details?: {
5167
5198
  /**
@@ -7878,6 +7909,32 @@ export type MediaUploadResponse = {
7878
7909
  files?: Array<UploadedFile>;
7879
7910
  };
7880
7911
 
7912
+ /**
7913
+ * One card of a messaging ad carousel (Meta link_data.child_attachments). Every card opens the same conversation, so a card has no link of its own.
7914
+ */
7915
+ export type MessagingCarouselCard = {
7916
+ /**
7917
+ * Card image. Uploaded to the ad account and sent as the card image_hash (by URL on validateOnly).
7918
+ */
7919
+ imageUrl: string;
7920
+ /**
7921
+ * Card title (Meta name).
7922
+ */
7923
+ headline?: string;
7924
+ /**
7925
+ * Card description, under the title.
7926
+ */
7927
+ description?: string;
7928
+ /**
7929
+ * Optional. Must equal the destination's messaging call to action (WHATSAPP_MESSAGE for whatsapp, MESSAGE_PAGE for messenger, INSTAGRAM_MESSAGE for instagram_direct; with `destinations` the first one listed). Any other value is a 400 naming the card, because Meta refuses a carousel whose cards do not all open the destination.
7930
+ */
7931
+ callToAction?: string;
7932
+ /**
7933
+ * Not accepted: a 400. The card tap opens the conversation, not a website.
7934
+ */
7935
+ linkUrl?: string;
7936
+ };
7937
+
7881
7938
  /**
7882
7939
  * Meta (facebook/instagram) options for platformSpecificData on POST /v1/ads/boost and /v1/ads/create. Unknown keys are rejected, not dropped.
7883
7940
  */
@@ -49970,7 +50027,7 @@ export type CreateMessagingAdData = {
49970
50027
  */
49971
50028
  placementAssets?: (MetaPlacementAssets);
49972
50029
  /**
49973
- * Dry-runs the ad on Meta with execution_options validate_only as ONE inline campaign + ad set + creative + ad (or creative + ad on the existing ad set with `adSetId`). Nothing is uploaded or created and nothing is stored; media is checked by URL. Supports one creative with `imageUrl`, image `placementAssets`, an existing `video.id`, or an existing post. Several creatives, a new `video.url` and video `placementAssets` need uploads first and return 400. Success returns 200 with per-node results; a Meta rejection returns the Meta error.
50030
+ * Dry-runs the ad on Meta with execution_options validate_only as ONE inline campaign + ad set + creative + ad (or creative + ad on the existing ad set with `adSetId`). Nothing is uploaded or created and nothing is stored; media is checked by URL. Supports one creative with `imageUrl`, image `placementAssets`, `carouselCards`, an existing `video.id`, or an existing post. Several creatives, a new `video.url` and video `placementAssets` need uploads first and return 400. Success returns 200 with per-node results; a Meta rejection returns the Meta error.
49974
50031
  */
49975
50032
  validateOnly?: boolean;
49976
50033
  });