@zernio/node 0.2.854 → 0.2.855
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 +16 -6
- package/dist/index.d.ts +16 -6
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +5 -5
- package/src/generated/types.gen.ts +16 -6
package/dist/index.d.mts
CHANGED
|
@@ -4734,7 +4734,7 @@ type actionSource = 'web' | 'app' | 'offline' | 'crm' | 'phone_call' | 'system_g
|
|
|
4734
4734
|
* EXACTLY ONE of the two shapes:
|
|
4735
4735
|
*
|
|
4736
4736
|
* - Single-creative: `headline`, `body`, and one of `imageUrl` / `video`,
|
|
4737
|
-
* OR `
|
|
4737
|
+
* OR `platformPostId` / `objectStoryId` to reuse an organic post.
|
|
4738
4738
|
* - Multi-creative: a non-empty `creatives[]` array. Top-level
|
|
4739
4739
|
* creative fields must NOT be set on this shape.
|
|
4740
4740
|
*
|
|
@@ -4778,11 +4778,16 @@ type CtwaAdRequestBody = {
|
|
|
4778
4778
|
*/
|
|
4779
4779
|
adSetName?: string;
|
|
4780
4780
|
/**
|
|
4781
|
-
* Messaging and CTWA only. Platform post or reel ID,
|
|
4781
|
+
* Messaging and CTWA only. Platform post or reel ID, the same input boostPost takes as platformPostId. Facebook IDs become object_story_id; Instagram IDs become source_instagram_media_id using the connected Instagram identity. Mutually exclusive with objectStoryId and fresh creative fields.
|
|
4782
|
+
*/
|
|
4783
|
+
platformPostId?: string;
|
|
4784
|
+
/**
|
|
4785
|
+
* Alias of platformPostId, kept for existing callers. Sending both with different values is a 400.
|
|
4786
|
+
* @deprecated
|
|
4782
4787
|
*/
|
|
4783
4788
|
existingPostId?: string;
|
|
4784
4789
|
/**
|
|
4785
|
-
* Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with
|
|
4790
|
+
* Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with platformPostId and fresh creative fields.
|
|
4786
4791
|
*/
|
|
4787
4792
|
objectStoryId?: string;
|
|
4788
4793
|
/**
|
|
@@ -4879,17 +4884,22 @@ type CtwaAdRequestBody = {
|
|
|
4879
4884
|
* `body` / `imageUrl` / `video`): setting both is a 400,
|
|
4880
4885
|
* unlike `POST /v1/ads/create` where the top-level fields
|
|
4881
4886
|
* are silently ignored in multi-creative mode. Each entry
|
|
4882
|
-
* supplies headline, body, and image/video, or
|
|
4887
|
+
* supplies headline, body, and image/video, or a platformPostId or
|
|
4883
4888
|
* objectStoryId reference. Fresh and existing creatives can be mixed.
|
|
4884
4889
|
*
|
|
4885
4890
|
*/
|
|
4886
4891
|
creatives?: Array<{
|
|
4887
4892
|
/**
|
|
4888
|
-
* Messaging and CTWA only. Platform post or reel ID,
|
|
4893
|
+
* Messaging and CTWA only. Platform post or reel ID, the same input boostPost takes as platformPostId. Facebook IDs become object_story_id; Instagram IDs become source_instagram_media_id using the connected Instagram identity. Mutually exclusive with objectStoryId and fresh creative fields.
|
|
4894
|
+
*/
|
|
4895
|
+
platformPostId?: string;
|
|
4896
|
+
/**
|
|
4897
|
+
* Alias of platformPostId, kept for existing callers. Sending both with different values is a 400.
|
|
4898
|
+
* @deprecated
|
|
4889
4899
|
*/
|
|
4890
4900
|
existingPostId?: string;
|
|
4891
4901
|
/**
|
|
4892
|
-
* Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with
|
|
4902
|
+
* Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with platformPostId and fresh creative fields.
|
|
4893
4903
|
*/
|
|
4894
4904
|
objectStoryId?: string;
|
|
4895
4905
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -4734,7 +4734,7 @@ type actionSource = 'web' | 'app' | 'offline' | 'crm' | 'phone_call' | 'system_g
|
|
|
4734
4734
|
* EXACTLY ONE of the two shapes:
|
|
4735
4735
|
*
|
|
4736
4736
|
* - Single-creative: `headline`, `body`, and one of `imageUrl` / `video`,
|
|
4737
|
-
* OR `
|
|
4737
|
+
* OR `platformPostId` / `objectStoryId` to reuse an organic post.
|
|
4738
4738
|
* - Multi-creative: a non-empty `creatives[]` array. Top-level
|
|
4739
4739
|
* creative fields must NOT be set on this shape.
|
|
4740
4740
|
*
|
|
@@ -4778,11 +4778,16 @@ type CtwaAdRequestBody = {
|
|
|
4778
4778
|
*/
|
|
4779
4779
|
adSetName?: string;
|
|
4780
4780
|
/**
|
|
4781
|
-
* Messaging and CTWA only. Platform post or reel ID,
|
|
4781
|
+
* Messaging and CTWA only. Platform post or reel ID, the same input boostPost takes as platformPostId. Facebook IDs become object_story_id; Instagram IDs become source_instagram_media_id using the connected Instagram identity. Mutually exclusive with objectStoryId and fresh creative fields.
|
|
4782
|
+
*/
|
|
4783
|
+
platformPostId?: string;
|
|
4784
|
+
/**
|
|
4785
|
+
* Alias of platformPostId, kept for existing callers. Sending both with different values is a 400.
|
|
4786
|
+
* @deprecated
|
|
4782
4787
|
*/
|
|
4783
4788
|
existingPostId?: string;
|
|
4784
4789
|
/**
|
|
4785
|
-
* Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with
|
|
4790
|
+
* Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with platformPostId and fresh creative fields.
|
|
4786
4791
|
*/
|
|
4787
4792
|
objectStoryId?: string;
|
|
4788
4793
|
/**
|
|
@@ -4879,17 +4884,22 @@ type CtwaAdRequestBody = {
|
|
|
4879
4884
|
* `body` / `imageUrl` / `video`): setting both is a 400,
|
|
4880
4885
|
* unlike `POST /v1/ads/create` where the top-level fields
|
|
4881
4886
|
* are silently ignored in multi-creative mode. Each entry
|
|
4882
|
-
* supplies headline, body, and image/video, or
|
|
4887
|
+
* supplies headline, body, and image/video, or a platformPostId or
|
|
4883
4888
|
* objectStoryId reference. Fresh and existing creatives can be mixed.
|
|
4884
4889
|
*
|
|
4885
4890
|
*/
|
|
4886
4891
|
creatives?: Array<{
|
|
4887
4892
|
/**
|
|
4888
|
-
* Messaging and CTWA only. Platform post or reel ID,
|
|
4893
|
+
* Messaging and CTWA only. Platform post or reel ID, the same input boostPost takes as platformPostId. Facebook IDs become object_story_id; Instagram IDs become source_instagram_media_id using the connected Instagram identity. Mutually exclusive with objectStoryId and fresh creative fields.
|
|
4894
|
+
*/
|
|
4895
|
+
platformPostId?: string;
|
|
4896
|
+
/**
|
|
4897
|
+
* Alias of platformPostId, kept for existing callers. Sending both with different values is a 400.
|
|
4898
|
+
* @deprecated
|
|
4889
4899
|
*/
|
|
4890
4900
|
existingPostId?: string;
|
|
4891
4901
|
/**
|
|
4892
|
-
* Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with
|
|
4902
|
+
* Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with platformPostId and fresh creative fields.
|
|
4893
4903
|
*/
|
|
4894
4904
|
objectStoryId?: string;
|
|
4895
4905
|
/**
|
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.
|
|
39
|
+
version: "0.2.855",
|
|
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.
|
|
8
|
+
version: "0.2.855",
|
|
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
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -11747,8 +11747,8 @@ export const sendWhatsAppConversion = <ThrowOnError extends boolean = false>(opt
|
|
|
11747
11747
|
* CONVERSATIONS optimization; the campaign objective defaults to OUTCOME_ENGAGEMENT.
|
|
11748
11748
|
* Supports single-creative and multi-creative shapes. Supersedes POST /v1/ads/ctwa
|
|
11749
11749
|
* (deprecated, equivalent to `destination: whatsapp`).
|
|
11750
|
-
* Existing posts and reels are supported through `
|
|
11751
|
-
* `objectStoryId`, either per creative or at the top level. Omit fresh
|
|
11750
|
+
* Existing posts and reels are supported through `platformPostId` (alias
|
|
11751
|
+
* `existingPostId`) or `objectStoryId`, either per creative or at the top level. Omit fresh
|
|
11752
11752
|
* media and copy for that creative. Optional `whatsappPhoneNumber` selects
|
|
11753
11753
|
* a number already paired with the Page (WhatsApp destination only).
|
|
11754
11754
|
* `accountId` is a Facebook, Instagram or Meta ads (business login) connection;
|
|
@@ -11784,15 +11784,15 @@ export const createCallAd = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
11784
11784
|
*
|
|
11785
11785
|
* Supports two mutually-exclusive shapes:
|
|
11786
11786
|
*
|
|
11787
|
-
* - **Single-creative**: supply top-level `headline`, `body`, and one of `imageUrl` / `video`, or
|
|
11787
|
+
* - **Single-creative**: supply top-level `headline`, `body`, and one of `imageUrl` / `video`, or a `platformPostId` / `objectStoryId` reference. Creates 1 campaign + 1 ad set + 1 ad.
|
|
11788
11788
|
*
|
|
11789
11789
|
* - **Multi-creative**: supply a `creatives[]` array with N entries (each carrying fresh media and copy or an existing post reference). Creates 1 campaign + 1 ad set + N ads sharing budget and targeting so Meta A/Bs the creatives inside a single auction instead of fragmenting budget across N parallel campaigns. Recommended when launching multiple creative variants for the same campaign.
|
|
11790
11790
|
*
|
|
11791
11791
|
* **Attach shape.** Send `adSetId` (with either creative shape) to add the ads to an EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase, the way to refresh a CTWA creative without resetting delivery. The ad set then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `audienceId` are rejected with a 400 alongside it rather than silently dropped. The target ad set's `destination_type` must match the ad's destination (a WhatsApp ad needs a `WHATSAPP` ad set), otherwise Meta would accept an ad that never delivers.
|
|
11792
11792
|
*
|
|
11793
11793
|
* Prerequisites enforced by Meta (surfaced as platform_error on failure): the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.
|
|
11794
|
-
* Existing posts and reels are supported through `
|
|
11795
|
-
* `objectStoryId`, either per creative or at the top level. Omit fresh
|
|
11794
|
+
* Existing posts and reels are supported through `platformPostId` (alias
|
|
11795
|
+
* `existingPostId`) or `objectStoryId`, either per creative or at the top level. Omit fresh
|
|
11796
11796
|
* media and copy for that creative. Optional `whatsappPhoneNumber` selects
|
|
11797
11797
|
* a number already paired with the Page (WhatsApp destination only).
|
|
11798
11798
|
*/
|
|
@@ -3174,7 +3174,7 @@ export type actionSource = 'web' | 'app' | 'offline' | 'crm' | 'phone_call' | 's
|
|
|
3174
3174
|
* EXACTLY ONE of the two shapes:
|
|
3175
3175
|
*
|
|
3176
3176
|
* - Single-creative: `headline`, `body`, and one of `imageUrl` / `video`,
|
|
3177
|
-
* OR `
|
|
3177
|
+
* OR `platformPostId` / `objectStoryId` to reuse an organic post.
|
|
3178
3178
|
* - Multi-creative: a non-empty `creatives[]` array. Top-level
|
|
3179
3179
|
* creative fields must NOT be set on this shape.
|
|
3180
3180
|
*
|
|
@@ -3218,11 +3218,16 @@ export type CtwaAdRequestBody = {
|
|
|
3218
3218
|
*/
|
|
3219
3219
|
adSetName?: string;
|
|
3220
3220
|
/**
|
|
3221
|
-
* Messaging and CTWA only. Platform post or reel ID,
|
|
3221
|
+
* Messaging and CTWA only. Platform post or reel ID, the same input boostPost takes as platformPostId. Facebook IDs become object_story_id; Instagram IDs become source_instagram_media_id using the connected Instagram identity. Mutually exclusive with objectStoryId and fresh creative fields.
|
|
3222
|
+
*/
|
|
3223
|
+
platformPostId?: string;
|
|
3224
|
+
/**
|
|
3225
|
+
* Alias of platformPostId, kept for existing callers. Sending both with different values is a 400.
|
|
3226
|
+
* @deprecated
|
|
3222
3227
|
*/
|
|
3223
3228
|
existingPostId?: string;
|
|
3224
3229
|
/**
|
|
3225
|
-
* Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with
|
|
3230
|
+
* Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with platformPostId and fresh creative fields.
|
|
3226
3231
|
*/
|
|
3227
3232
|
objectStoryId?: string;
|
|
3228
3233
|
/**
|
|
@@ -3319,17 +3324,22 @@ export type CtwaAdRequestBody = {
|
|
|
3319
3324
|
* `body` / `imageUrl` / `video`): setting both is a 400,
|
|
3320
3325
|
* unlike `POST /v1/ads/create` where the top-level fields
|
|
3321
3326
|
* are silently ignored in multi-creative mode. Each entry
|
|
3322
|
-
* supplies headline, body, and image/video, or
|
|
3327
|
+
* supplies headline, body, and image/video, or a platformPostId or
|
|
3323
3328
|
* objectStoryId reference. Fresh and existing creatives can be mixed.
|
|
3324
3329
|
*
|
|
3325
3330
|
*/
|
|
3326
3331
|
creatives?: Array<{
|
|
3327
3332
|
/**
|
|
3328
|
-
* Messaging and CTWA only. Platform post or reel ID,
|
|
3333
|
+
* Messaging and CTWA only. Platform post or reel ID, the same input boostPost takes as platformPostId. Facebook IDs become object_story_id; Instagram IDs become source_instagram_media_id using the connected Instagram identity. Mutually exclusive with objectStoryId and fresh creative fields.
|
|
3334
|
+
*/
|
|
3335
|
+
platformPostId?: string;
|
|
3336
|
+
/**
|
|
3337
|
+
* Alias of platformPostId, kept for existing callers. Sending both with different values is a 400.
|
|
3338
|
+
* @deprecated
|
|
3329
3339
|
*/
|
|
3330
3340
|
existingPostId?: string;
|
|
3331
3341
|
/**
|
|
3332
|
-
* Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with
|
|
3342
|
+
* Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with platformPostId and fresh creative fields.
|
|
3333
3343
|
*/
|
|
3334
3344
|
objectStoryId?: string;
|
|
3335
3345
|
/**
|