@zernio/node 0.2.956 → 0.2.958

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: "@zernio/node",
39
- version: "0.2.956",
39
+ version: "0.2.958",
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: "@zernio/node",
8
- version: "0.2.956",
8
+ version: "0.2.958",
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": "@zernio/node",
3
- "version": "0.2.956",
3
+ "version": "0.2.958",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -5811,7 +5811,11 @@ export const listBrandedCallingCallReasons = <ThrowOnError extends boolean = fal
5811
5811
  *
5812
5812
  * Billing: $100 per identity per month, the first month charged when the
5813
5813
  * identity is filed with the carrier and not refunded if the carrier rejects it,
5814
- * then monthly while the identity exists. Branded calls add $0.10 each.
5814
+ * then monthly while the identity exists. Branded calls add $0.10 each, counted
5815
+ * on every outbound call from a verified branded number to a US destination
5816
+ * (whether or not the callee's carrier displayed the branding); the surcharge
5817
+ * shows as `brandedCallUSD` on the call's billing and in
5818
+ * `GET /v1/voice/calls/estimate` when you pass `from`.
5815
5819
  *
5816
5820
  */
5817
5821
  export const createBrandedCallingIdentity = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateBrandedCallingIdentityData, ThrowOnError>) => {
@@ -3390,6 +3390,7 @@ export type actionSource = 'web' | 'app' | 'offline' | 'crm' | 'phone_call' | 's
3390
3390
  *
3391
3391
  * - Single-creative: `headline`, `body`, and one of `imageUrl` / `video`,
3392
3392
  * OR `platformPostId` / `objectStoryId` to reuse an organic post.
3393
+ * On POST /v1/ads/messaging, `placementAssets` can replace `imageUrl` / `video`.
3393
3394
  * - Multi-creative: a non-empty `creatives[]` array. Top-level
3394
3395
  * creative fields must NOT be set on this shape.
3395
3396
  *
@@ -7268,6 +7269,83 @@ export type MetaLeadForm = {
7268
7269
 
7269
7270
  export type style = 'LIST_STYLE' | 'PARAGRAPH_STYLE';
7270
7271
 
7272
+ /**
7273
+ * Meta placement asset customization: pin a SPECIFIC asset (image OR video) to each
7274
+ * placement group on a SINGLE ad (e.g. a 4:5 image on Feed and a 9:16 image on
7275
+ * Stories/Reels), the same thing Meta Ads Manager produces with "different creative per
7276
+ * placement". Mapped to the creative's `asset_feed_spec` (`optimization_type: PLACEMENT`)
7277
+ * + `asset_customization_rules`. Each rule can pin one `headline`, `body` and `description`;
7278
+ * omitted fields and unmatched placements use the request's top-level copy. Each rule's
7279
+ * `placements` accepts the same fields as the top-level `placements` object; Meta enforces
7280
+ * co-selection rules and returns an actionable error.
7281
+ *
7282
+ * A block is all-image OR all-video, never mixed (Meta's asset_feed_spec carries one ad
7283
+ * format). Image mode: `defaultImageUrl` + `rules[].imageUrl`. Video mode:
7284
+ * `defaultVideoUrl` + `rules[].videoUrl` (optional `thumbnailUrl`/`defaultThumbnailUrl`
7285
+ * posters; Meta auto-generates when omitted). Exactly one catch-all default is required.
7286
+ *
7287
+ * Meta controls text rendering by placement and format. Validation accepts these fields
7288
+ * but does not prove that every field appears in delivery. Preview the ad; put copy that
7289
+ * must always be visible into the image or video itself.
7290
+ *
7291
+ */
7292
+ export type MetaPlacementAssets = {
7293
+ /**
7294
+ * Image mode. Catch-all image for any placement no rule matches. Required in image mode (Meta mandates a default rule).
7295
+ */
7296
+ defaultImageUrl?: string;
7297
+ /**
7298
+ * Video mode. Catch-all video for any placement no rule matches. Required in video mode.
7299
+ */
7300
+ defaultVideoUrl?: string;
7301
+ /**
7302
+ * Video mode (optional). Poster image for the default video; Meta auto-generates one when omitted.
7303
+ */
7304
+ defaultThumbnailUrl?: string;
7305
+ /**
7306
+ * One entry per placement group you want to pin a specific asset to.
7307
+ */
7308
+ rules: Array<{
7309
+ /**
7310
+ * Image mode. The image to deliver for this rule's placements.
7311
+ */
7312
+ imageUrl?: string;
7313
+ /**
7314
+ * Video mode. The video to deliver for this rule's placements.
7315
+ */
7316
+ videoUrl?: string;
7317
+ /**
7318
+ * Video mode (optional). Poster image for this rule's video; auto-generated when omitted.
7319
+ */
7320
+ thumbnailUrl?: string;
7321
+ /**
7322
+ * One headline pinned to this rule. Omit to inherit the top-level headline.
7323
+ */
7324
+ headline?: string;
7325
+ /**
7326
+ * One primary text pinned to this rule. Omit to inherit the top-level body.
7327
+ */
7328
+ body?: string;
7329
+ /**
7330
+ * One link description pinned to this rule. Omit to inherit the top-level description.
7331
+ */
7332
+ description?: string;
7333
+ /**
7334
+ * Placements this asset is pinned to. At least one field must be set (an empty rule is invalid; that role is served by the default asset). Same enums as the top-level `placements` object.
7335
+ */
7336
+ placements: {
7337
+ publisherPlatforms?: Array<('facebook' | 'instagram' | 'threads' | 'messenger' | 'audience_network' | 'whatsapp')>;
7338
+ facebookPositions?: Array<('feed' | 'right_hand_column' | 'marketplace' | 'video_feeds' | 'story' | 'search' | 'instream_video' | 'facebook_reels' | 'facebook_reels_overlay' | 'profile_feed' | 'notification')>;
7339
+ instagramPositions?: Array<('stream' | 'story' | 'explore' | 'explore_home' | 'reels' | 'profile_feed' | 'ig_search' | 'profile_reels')>;
7340
+ messengerPositions?: Array<('messenger_home' | 'sponsored_messages' | 'story')>;
7341
+ audienceNetworkPositions?: Array<('classic' | 'rewarded_video')>;
7342
+ threadsPositions?: Array<('threads_stream')>;
7343
+ whatsappPositions?: Array<('status')>;
7344
+ devicePlatforms?: Array<('mobile' | 'desktop')>;
7345
+ };
7346
+ }>;
7347
+ };
7348
+
7271
7349
  export type MetaProductCatalog = {
7272
7350
  id?: string;
7273
7351
  name?: string;
@@ -27946,6 +28024,10 @@ export type TransferVoiceCallError = ({
27946
28024
 
27947
28025
  export type GetVoiceCallEstimateData = {
27948
28026
  query: {
28027
+ /**
28028
+ * The number the call would dial from, E.164. When it is verified on a Branded Calling identity and `to` is a US number, the estimate includes the per-call Branded Calling surcharge.
28029
+ */
28030
+ from?: string;
27949
28031
  minutes?: number;
27950
28032
  recording?: boolean;
27951
28033
  /**
@@ -27967,6 +28049,10 @@ export type GetVoiceCallEstimateResponse = ({
27967
28049
  telnyxCostUSD?: number;
27968
28050
  recordingCostUSD?: number;
27969
28051
  transcriptionCostUSD?: number;
28052
+ /**
28053
+ * Branded Calling surcharge, 0 unless `from` is a verified branded number calling a US destination.
28054
+ */
28055
+ brandedCallUSD?: number;
27970
28056
  /**
27971
28057
  * What Zernio bills for the call.
27972
28058
  */
@@ -43641,62 +43727,7 @@ export type CreateStandaloneAdData = {
43641
43727
  * posters; Meta auto-generates when omitted). Exactly one catch-all default is required.
43642
43728
  *
43643
43729
  */
43644
- placementAssets?: {
43645
- /**
43646
- * Image mode. Catch-all image for any placement no rule matches. Required in image mode (Meta mandates a default rule).
43647
- */
43648
- defaultImageUrl?: string;
43649
- /**
43650
- * Video mode. Catch-all video for any placement no rule matches. Required in video mode.
43651
- */
43652
- defaultVideoUrl?: string;
43653
- /**
43654
- * Video mode (optional). Poster image for the default video; Meta auto-generates one when omitted.
43655
- */
43656
- defaultThumbnailUrl?: string;
43657
- /**
43658
- * One entry per placement group you want to pin a specific asset to.
43659
- */
43660
- rules: Array<{
43661
- /**
43662
- * Image mode. The image to deliver for this rule's placements.
43663
- */
43664
- imageUrl?: string;
43665
- /**
43666
- * Video mode. The video to deliver for this rule's placements.
43667
- */
43668
- videoUrl?: string;
43669
- /**
43670
- * Video mode (optional). Poster image for this rule's video; auto-generated when omitted.
43671
- */
43672
- thumbnailUrl?: string;
43673
- /**
43674
- * One headline pinned to this rule. Omit to inherit the top-level headline.
43675
- */
43676
- headline?: string;
43677
- /**
43678
- * One primary text pinned to this rule. Omit to inherit the top-level body.
43679
- */
43680
- body?: string;
43681
- /**
43682
- * One link description pinned to this rule. Omit to inherit the top-level description.
43683
- */
43684
- description?: string;
43685
- /**
43686
- * Placements this asset is pinned to. At least one field must be set (an empty rule is invalid; that role is served by the default asset). Same enums as the top-level `placements` object.
43687
- */
43688
- placements: {
43689
- publisherPlatforms?: Array<('facebook' | 'instagram' | 'threads' | 'messenger' | 'audience_network' | 'whatsapp')>;
43690
- facebookPositions?: Array<('feed' | 'right_hand_column' | 'marketplace' | 'video_feeds' | 'story' | 'search' | 'instream_video' | 'facebook_reels' | 'facebook_reels_overlay' | 'profile_feed' | 'notification')>;
43691
- instagramPositions?: Array<('stream' | 'story' | 'explore' | 'explore_home' | 'reels' | 'profile_feed' | 'ig_search' | 'profile_reels')>;
43692
- messengerPositions?: Array<('messenger_home' | 'sponsored_messages' | 'story')>;
43693
- audienceNetworkPositions?: Array<('classic' | 'rewarded_video')>;
43694
- threadsPositions?: Array<('threads_stream')>;
43695
- whatsappPositions?: Array<('status')>;
43696
- devicePlatforms?: Array<('mobile' | 'desktop')>;
43697
- };
43698
- }>;
43699
- };
43730
+ placementAssets?: (MetaPlacementAssets);
43700
43731
  /**
43701
43732
  * Custom audience ID for targeting
43702
43733
  */
@@ -47048,6 +47079,25 @@ export type CreateMessagingAdData = {
47048
47079
  * Two or three messaging apps on ONE ad set, like Ads Manager's "all messaging apps": the ad set gets Meta's combined destination_type (e.g. MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP) and the creative one CTA per app, so Meta opens the app each viewer is likeliest to answer from. WhatsApp in the list still needs the Page paired with a WhatsApp Business number. With `adSetId`, the existing ad set must already use that combined destination_type. Set this OR `destination`, not both.
47049
47080
  */
47050
47081
  destinations?: Array<('whatsapp' | 'messenger' | 'instagram_direct')>;
47082
+ /**
47083
+ * A different image or video per placement on one messaging ad, e.g. a 4:5 image on
47084
+ * Feed and a 9:16 image on Stories/Reels. Replaces top-level `imageUrl` / `video`
47085
+ * (sending either alongside is a 400); `headline` and `body` stay required as the
47086
+ * default copy. The CTA, `welcomeMessage` and `whatsappPhoneNumber` apply to every
47087
+ * placement. Works on the single-creative shape and on attach (`adSetId`).
47088
+ *
47089
+ * Single `destination` only: Meta cannot combine per-placement media with
47090
+ * `destinations` (it drops the placement rules from a multi-destination creative, or
47091
+ * refuses more than one call to action per placement rule with error 1885878), so
47092
+ * that combination is a 400. Also a 400 with `creatives[]`, `platformPostId`,
47093
+ * `existingPostId` or `objectStoryId`, and on POST /v1/ads/call.
47094
+ *
47095
+ */
47096
+ placementAssets?: (MetaPlacementAssets);
47097
+ /**
47098
+ * 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.
47099
+ */
47100
+ validateOnly?: boolean;
47051
47101
  });
47052
47102
  headers?: {
47053
47103
  /**
@@ -47057,7 +47107,18 @@ export type CreateMessagingAdData = {
47057
47107
  };
47058
47108
  };
47059
47109
 
47060
- export type CreateMessagingAdResponse = ((CtwaSingleResponse | CtwaMultiResponse));
47110
+ export type CreateMessagingAdResponse = ({
47111
+ /**
47112
+ * Always true.
47113
+ */
47114
+ validateOnly: boolean;
47115
+ results: Array<{
47116
+ node: 'campaign' | 'adSet' | 'creative' | 'ad';
47117
+ status: 'validated' | 'skipped';
47118
+ reason?: string;
47119
+ }>;
47120
+ message: string;
47121
+ } | (CtwaSingleResponse | CtwaMultiResponse));
47061
47122
 
47062
47123
  export type CreateMessagingAdError = (unknown | {
47063
47124
  error?: string;