@zernio/node 0.2.749 → 0.2.751
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 +50 -11
- package/dist/index.d.ts +50 -11
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +9 -5
- package/src/generated/types.gen.ts +50 -11
package/dist/index.d.mts
CHANGED
|
@@ -26548,6 +26548,11 @@ type PurchasePhoneNumberData = {
|
|
|
26548
26548
|
*
|
|
26549
26549
|
*/
|
|
26550
26550
|
areaCode?: string;
|
|
26551
|
+
/**
|
|
26552
|
+
* One exact number to buy, in E.164, taken from GET /v1/phone-numbers/available. Hard constraint: when it is no longer available (bought by someone else, or WhatsApp's buy-time check rejects it) the purchase fails with 409 code PHONE_NUMBER_UNAVAILABLE instead of assigning another number; search again and pick another. Only for countries and types that activate instantly: a regulated one (202 kyc_required) returns 400 when phoneNumber is set.
|
|
26553
|
+
*
|
|
26554
|
+
*/
|
|
26555
|
+
phoneNumber?: string;
|
|
26551
26556
|
/**
|
|
26552
26557
|
* A phone number is the unit; WhatsApp is one optional feature. Pass false to buy a STANDALONE number (Calls/SMS only): provisioning skips the Meta pre-verify/OTP steps and the number activates immediately. Omitted defaults to the WhatsApp provisioning path. WhatsApp can be connected to a standalone number later from the connect flow.
|
|
26553
26558
|
*
|
|
@@ -26614,7 +26619,7 @@ type PurchasePhoneNumberError = (unknown | {
|
|
|
26614
26619
|
error?: string;
|
|
26615
26620
|
} | {
|
|
26616
26621
|
error?: string;
|
|
26617
|
-
code?: 'PURCHASE_VELOCITY' | 'AREA_CODE_UNAVAILABLE';
|
|
26622
|
+
code?: 'PURCHASE_VELOCITY' | 'AREA_CODE_UNAVAILABLE' | 'PHONE_NUMBER_UNAVAILABLE';
|
|
26618
26623
|
});
|
|
26619
26624
|
type ListPhoneNumberCountriesResponse = ({
|
|
26620
26625
|
countries?: Array<{
|
|
@@ -26722,11 +26727,22 @@ type SearchAvailablePhoneNumbersResponse = ({
|
|
|
26722
26727
|
*/
|
|
26723
26728
|
requireSms?: boolean;
|
|
26724
26729
|
numbers?: Array<{
|
|
26730
|
+
/**
|
|
26731
|
+
* E.164. Pass it as `phoneNumber` on POST /v1/phone-numbers/purchase to buy this exact number.
|
|
26732
|
+
*/
|
|
26725
26733
|
phoneNumber?: string;
|
|
26726
26734
|
/**
|
|
26727
26735
|
* Provider capability list for this number (e.g. voice, sms, mms).
|
|
26728
26736
|
*/
|
|
26729
26737
|
features?: Array<(string)>;
|
|
26738
|
+
/**
|
|
26739
|
+
* Town or rate center the number belongs to, as the carrier names it (e.g. WACO).
|
|
26740
|
+
*/
|
|
26741
|
+
locality?: string;
|
|
26742
|
+
/**
|
|
26743
|
+
* true when the carrier added this number because too few matched your filters, so it may be outside the requested prefix or locality.
|
|
26744
|
+
*/
|
|
26745
|
+
bestEffort?: boolean;
|
|
26730
26746
|
}>;
|
|
26731
26747
|
});
|
|
26732
26748
|
type SearchAvailablePhoneNumbersError = (unknown | {
|
|
@@ -26905,6 +26921,11 @@ type PurchaseWhatsAppPhoneNumberData = {
|
|
|
26905
26921
|
*
|
|
26906
26922
|
*/
|
|
26907
26923
|
country?: string;
|
|
26924
|
+
/**
|
|
26925
|
+
* One exact number to buy, in E.164, taken from GET /v1/phone-numbers/available. Fails with 409 code PHONE_NUMBER_UNAVAILABLE when it is no longer available.
|
|
26926
|
+
*
|
|
26927
|
+
*/
|
|
26928
|
+
phoneNumber?: string;
|
|
26908
26929
|
/**
|
|
26909
26930
|
* Optional idempotency key. Send the same value when retrying a purchase: if a number was already bought under this key, the API returns { status: "already_purchased", numberId, phoneNumber } instead of provisioning a second number. Generate a fresh key for each genuinely new purchase.
|
|
26910
26931
|
*
|
|
@@ -26948,7 +26969,7 @@ type PurchaseWhatsAppPhoneNumberError = (unknown | {
|
|
|
26948
26969
|
error?: string;
|
|
26949
26970
|
} | {
|
|
26950
26971
|
error?: string;
|
|
26951
|
-
code?: 'PURCHASE_VELOCITY' | 'AREA_CODE_UNAVAILABLE';
|
|
26972
|
+
code?: 'PURCHASE_VELOCITY' | 'AREA_CODE_UNAVAILABLE' | 'PHONE_NUMBER_UNAVAILABLE';
|
|
26952
26973
|
});
|
|
26953
26974
|
type ListWhatsAppNumberCountriesResponse = ({
|
|
26954
26975
|
countries?: Array<{
|
|
@@ -26995,6 +27016,8 @@ type SearchAvailableWhatsAppNumbersResponse = ({
|
|
|
26995
27016
|
numberType?: string;
|
|
26996
27017
|
numbers?: Array<{
|
|
26997
27018
|
phoneNumber?: string;
|
|
27019
|
+
locality?: string;
|
|
27020
|
+
bestEffort?: boolean;
|
|
26998
27021
|
}>;
|
|
26999
27022
|
});
|
|
27000
27023
|
type SearchAvailableWhatsAppNumbersError = (unknown | {
|
|
@@ -36650,7 +36673,7 @@ type CreateStandaloneAdData = {
|
|
|
36650
36673
|
*/
|
|
36651
36674
|
multiAdvertiser?: 'OPT_IN' | 'OPT_OUT';
|
|
36652
36675
|
/**
|
|
36653
|
-
* Google Performance Max validates the complete atomic campaign and asset group with no resource creation or local persistence. Google validation still downloads image URLs and consumes quota. On Meta, validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, existing video.id or existingCreativeId; media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error.
|
|
36676
|
+
* Google Performance Max validates the complete atomic campaign and asset group with no resource creation or local persistence. Google validation still downloads image URLs and consumes quota. On Meta, validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, all-image placementAssets with per-rule copy, existing video.id or existingCreativeId; other media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Placement validation uses existing Instagram identities only. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error.
|
|
36654
36677
|
*/
|
|
36655
36678
|
validateOnly?: boolean;
|
|
36656
36679
|
/**
|
|
@@ -36710,7 +36733,7 @@ type CreateStandaloneAdData = {
|
|
|
36710
36733
|
* `body` field is used as the `object_story_spec.link_data.message` (the preview text) and
|
|
36711
36734
|
* `headlines` must also be present. On a video creative the copy lands in
|
|
36712
36735
|
* `video_data.message` / `video_data.title` instead of `link_data`. Mutually exclusive
|
|
36713
|
-
* with `dynamicCreative`, `placementAssets`, `carouselCards`, and `creatives[]`.
|
|
36736
|
+
* with `dynamicCreative`, `placementAssets`, `carouselCards`, and `creatives[]`. For placement-specific copy, use the singular `placementAssets.rules[].body` and `headline` fields instead.
|
|
36714
36737
|
*
|
|
36715
36738
|
*/
|
|
36716
36739
|
bodies?: Array<(string)>;
|
|
@@ -37293,15 +37316,19 @@ type CreateStandaloneAdData = {
|
|
|
37293
37316
|
* on the legacy single shape AND the attach shape (`adSetId` + placementAssets adds one
|
|
37294
37317
|
* placement-customized ad to an existing ad set, the way to build N per-placement ads
|
|
37295
37318
|
* sharing one ad set: create the first normally, attach the rest). Cannot be combined
|
|
37296
|
-
* with `creatives[]
|
|
37297
|
-
*
|
|
37298
|
-
*
|
|
37319
|
+
* with `creatives[]` or top-level `bodies`/`headlines`/`descriptions` arrays. Each rule
|
|
37320
|
+
* can override `headline`, `body` and `description` with one string per field. Omitted
|
|
37321
|
+
* fields and unmatched placements use the top-level copy; `linkUrl` and `callToAction`
|
|
37322
|
+
* remain shared. Zernio emits labelled text with `optimization_type: PLACEMENT`.
|
|
37323
|
+
* Multiple text options rotating within a placement are not supported by this input. Each rule's `placements` accepts the same fields as the top-level
|
|
37299
37324
|
* `placements` object; Meta enforces co-selection rules and returns an actionable error.
|
|
37300
37325
|
*
|
|
37301
|
-
*
|
|
37302
|
-
*
|
|
37303
|
-
*
|
|
37304
|
-
*
|
|
37326
|
+
* Meta controls text rendering by placement and format. Validation accepts these fields
|
|
37327
|
+
* but does not prove that every field appears in delivery. Preview the ad; put copy that
|
|
37328
|
+
* must always be visible into the image or video itself.
|
|
37329
|
+
*
|
|
37330
|
+
* `validateOnly: true` supports all-image placementAssets without uploading or creating
|
|
37331
|
+
* anything. Video placement validation remains unsupported because it requires uploads.
|
|
37305
37332
|
*
|
|
37306
37333
|
* A block is all-image OR all-video, never mixed (Meta's asset_feed_spec carries one ad
|
|
37307
37334
|
* format). Image mode: `defaultImageUrl` + `rules[].imageUrl`. Video mode:
|
|
@@ -37338,6 +37365,18 @@ type CreateStandaloneAdData = {
|
|
|
37338
37365
|
* Video mode (optional). Poster image for this rule's video; auto-generated when omitted.
|
|
37339
37366
|
*/
|
|
37340
37367
|
thumbnailUrl?: string;
|
|
37368
|
+
/**
|
|
37369
|
+
* One headline pinned to this rule. Omit to inherit the top-level headline.
|
|
37370
|
+
*/
|
|
37371
|
+
headline?: string;
|
|
37372
|
+
/**
|
|
37373
|
+
* One primary text pinned to this rule. Omit to inherit the top-level body.
|
|
37374
|
+
*/
|
|
37375
|
+
body?: string;
|
|
37376
|
+
/**
|
|
37377
|
+
* One link description pinned to this rule. Omit to inherit the top-level description.
|
|
37378
|
+
*/
|
|
37379
|
+
description?: string;
|
|
37341
37380
|
/**
|
|
37342
37381
|
* 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.
|
|
37343
37382
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -26548,6 +26548,11 @@ type PurchasePhoneNumberData = {
|
|
|
26548
26548
|
*
|
|
26549
26549
|
*/
|
|
26550
26550
|
areaCode?: string;
|
|
26551
|
+
/**
|
|
26552
|
+
* One exact number to buy, in E.164, taken from GET /v1/phone-numbers/available. Hard constraint: when it is no longer available (bought by someone else, or WhatsApp's buy-time check rejects it) the purchase fails with 409 code PHONE_NUMBER_UNAVAILABLE instead of assigning another number; search again and pick another. Only for countries and types that activate instantly: a regulated one (202 kyc_required) returns 400 when phoneNumber is set.
|
|
26553
|
+
*
|
|
26554
|
+
*/
|
|
26555
|
+
phoneNumber?: string;
|
|
26551
26556
|
/**
|
|
26552
26557
|
* A phone number is the unit; WhatsApp is one optional feature. Pass false to buy a STANDALONE number (Calls/SMS only): provisioning skips the Meta pre-verify/OTP steps and the number activates immediately. Omitted defaults to the WhatsApp provisioning path. WhatsApp can be connected to a standalone number later from the connect flow.
|
|
26553
26558
|
*
|
|
@@ -26614,7 +26619,7 @@ type PurchasePhoneNumberError = (unknown | {
|
|
|
26614
26619
|
error?: string;
|
|
26615
26620
|
} | {
|
|
26616
26621
|
error?: string;
|
|
26617
|
-
code?: 'PURCHASE_VELOCITY' | 'AREA_CODE_UNAVAILABLE';
|
|
26622
|
+
code?: 'PURCHASE_VELOCITY' | 'AREA_CODE_UNAVAILABLE' | 'PHONE_NUMBER_UNAVAILABLE';
|
|
26618
26623
|
});
|
|
26619
26624
|
type ListPhoneNumberCountriesResponse = ({
|
|
26620
26625
|
countries?: Array<{
|
|
@@ -26722,11 +26727,22 @@ type SearchAvailablePhoneNumbersResponse = ({
|
|
|
26722
26727
|
*/
|
|
26723
26728
|
requireSms?: boolean;
|
|
26724
26729
|
numbers?: Array<{
|
|
26730
|
+
/**
|
|
26731
|
+
* E.164. Pass it as `phoneNumber` on POST /v1/phone-numbers/purchase to buy this exact number.
|
|
26732
|
+
*/
|
|
26725
26733
|
phoneNumber?: string;
|
|
26726
26734
|
/**
|
|
26727
26735
|
* Provider capability list for this number (e.g. voice, sms, mms).
|
|
26728
26736
|
*/
|
|
26729
26737
|
features?: Array<(string)>;
|
|
26738
|
+
/**
|
|
26739
|
+
* Town or rate center the number belongs to, as the carrier names it (e.g. WACO).
|
|
26740
|
+
*/
|
|
26741
|
+
locality?: string;
|
|
26742
|
+
/**
|
|
26743
|
+
* true when the carrier added this number because too few matched your filters, so it may be outside the requested prefix or locality.
|
|
26744
|
+
*/
|
|
26745
|
+
bestEffort?: boolean;
|
|
26730
26746
|
}>;
|
|
26731
26747
|
});
|
|
26732
26748
|
type SearchAvailablePhoneNumbersError = (unknown | {
|
|
@@ -26905,6 +26921,11 @@ type PurchaseWhatsAppPhoneNumberData = {
|
|
|
26905
26921
|
*
|
|
26906
26922
|
*/
|
|
26907
26923
|
country?: string;
|
|
26924
|
+
/**
|
|
26925
|
+
* One exact number to buy, in E.164, taken from GET /v1/phone-numbers/available. Fails with 409 code PHONE_NUMBER_UNAVAILABLE when it is no longer available.
|
|
26926
|
+
*
|
|
26927
|
+
*/
|
|
26928
|
+
phoneNumber?: string;
|
|
26908
26929
|
/**
|
|
26909
26930
|
* Optional idempotency key. Send the same value when retrying a purchase: if a number was already bought under this key, the API returns { status: "already_purchased", numberId, phoneNumber } instead of provisioning a second number. Generate a fresh key for each genuinely new purchase.
|
|
26910
26931
|
*
|
|
@@ -26948,7 +26969,7 @@ type PurchaseWhatsAppPhoneNumberError = (unknown | {
|
|
|
26948
26969
|
error?: string;
|
|
26949
26970
|
} | {
|
|
26950
26971
|
error?: string;
|
|
26951
|
-
code?: 'PURCHASE_VELOCITY' | 'AREA_CODE_UNAVAILABLE';
|
|
26972
|
+
code?: 'PURCHASE_VELOCITY' | 'AREA_CODE_UNAVAILABLE' | 'PHONE_NUMBER_UNAVAILABLE';
|
|
26952
26973
|
});
|
|
26953
26974
|
type ListWhatsAppNumberCountriesResponse = ({
|
|
26954
26975
|
countries?: Array<{
|
|
@@ -26995,6 +27016,8 @@ type SearchAvailableWhatsAppNumbersResponse = ({
|
|
|
26995
27016
|
numberType?: string;
|
|
26996
27017
|
numbers?: Array<{
|
|
26997
27018
|
phoneNumber?: string;
|
|
27019
|
+
locality?: string;
|
|
27020
|
+
bestEffort?: boolean;
|
|
26998
27021
|
}>;
|
|
26999
27022
|
});
|
|
27000
27023
|
type SearchAvailableWhatsAppNumbersError = (unknown | {
|
|
@@ -36650,7 +36673,7 @@ type CreateStandaloneAdData = {
|
|
|
36650
36673
|
*/
|
|
36651
36674
|
multiAdvertiser?: 'OPT_IN' | 'OPT_OUT';
|
|
36652
36675
|
/**
|
|
36653
|
-
* Google Performance Max validates the complete atomic campaign and asset group with no resource creation or local persistence. Google validation still downloads image URLs and consumes quota. On Meta, validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, existing video.id or existingCreativeId; media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error.
|
|
36676
|
+
* Google Performance Max validates the complete atomic campaign and asset group with no resource creation or local persistence. Google validation still downloads image URLs and consumes quota. On Meta, validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, all-image placementAssets with per-rule copy, existing video.id or existingCreativeId; other media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Placement validation uses existing Instagram identities only. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error.
|
|
36654
36677
|
*/
|
|
36655
36678
|
validateOnly?: boolean;
|
|
36656
36679
|
/**
|
|
@@ -36710,7 +36733,7 @@ type CreateStandaloneAdData = {
|
|
|
36710
36733
|
* `body` field is used as the `object_story_spec.link_data.message` (the preview text) and
|
|
36711
36734
|
* `headlines` must also be present. On a video creative the copy lands in
|
|
36712
36735
|
* `video_data.message` / `video_data.title` instead of `link_data`. Mutually exclusive
|
|
36713
|
-
* with `dynamicCreative`, `placementAssets`, `carouselCards`, and `creatives[]`.
|
|
36736
|
+
* with `dynamicCreative`, `placementAssets`, `carouselCards`, and `creatives[]`. For placement-specific copy, use the singular `placementAssets.rules[].body` and `headline` fields instead.
|
|
36714
36737
|
*
|
|
36715
36738
|
*/
|
|
36716
36739
|
bodies?: Array<(string)>;
|
|
@@ -37293,15 +37316,19 @@ type CreateStandaloneAdData = {
|
|
|
37293
37316
|
* on the legacy single shape AND the attach shape (`adSetId` + placementAssets adds one
|
|
37294
37317
|
* placement-customized ad to an existing ad set, the way to build N per-placement ads
|
|
37295
37318
|
* sharing one ad set: create the first normally, attach the rest). Cannot be combined
|
|
37296
|
-
* with `creatives[]
|
|
37297
|
-
*
|
|
37298
|
-
*
|
|
37319
|
+
* with `creatives[]` or top-level `bodies`/`headlines`/`descriptions` arrays. Each rule
|
|
37320
|
+
* can override `headline`, `body` and `description` with one string per field. Omitted
|
|
37321
|
+
* fields and unmatched placements use the top-level copy; `linkUrl` and `callToAction`
|
|
37322
|
+
* remain shared. Zernio emits labelled text with `optimization_type: PLACEMENT`.
|
|
37323
|
+
* Multiple text options rotating within a placement are not supported by this input. Each rule's `placements` accepts the same fields as the top-level
|
|
37299
37324
|
* `placements` object; Meta enforces co-selection rules and returns an actionable error.
|
|
37300
37325
|
*
|
|
37301
|
-
*
|
|
37302
|
-
*
|
|
37303
|
-
*
|
|
37304
|
-
*
|
|
37326
|
+
* Meta controls text rendering by placement and format. Validation accepts these fields
|
|
37327
|
+
* but does not prove that every field appears in delivery. Preview the ad; put copy that
|
|
37328
|
+
* must always be visible into the image or video itself.
|
|
37329
|
+
*
|
|
37330
|
+
* `validateOnly: true` supports all-image placementAssets without uploading or creating
|
|
37331
|
+
* anything. Video placement validation remains unsupported because it requires uploads.
|
|
37305
37332
|
*
|
|
37306
37333
|
* A block is all-image OR all-video, never mixed (Meta's asset_feed_spec carries one ad
|
|
37307
37334
|
* format). Image mode: `defaultImageUrl` + `rules[].imageUrl`. Video mode:
|
|
@@ -37338,6 +37365,18 @@ type CreateStandaloneAdData = {
|
|
|
37338
37365
|
* Video mode (optional). Poster image for this rule's video; auto-generated when omitted.
|
|
37339
37366
|
*/
|
|
37340
37367
|
thumbnailUrl?: string;
|
|
37368
|
+
/**
|
|
37369
|
+
* One headline pinned to this rule. Omit to inherit the top-level headline.
|
|
37370
|
+
*/
|
|
37371
|
+
headline?: string;
|
|
37372
|
+
/**
|
|
37373
|
+
* One primary text pinned to this rule. Omit to inherit the top-level body.
|
|
37374
|
+
*/
|
|
37375
|
+
body?: string;
|
|
37376
|
+
/**
|
|
37377
|
+
* One link description pinned to this rule. Omit to inherit the top-level description.
|
|
37378
|
+
*/
|
|
37379
|
+
description?: string;
|
|
37341
37380
|
/**
|
|
37342
37381
|
* 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.
|
|
37343
37382
|
*/
|
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.751",
|
|
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.751",
|
|
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
|
@@ -5797,8 +5797,9 @@ export const releasePhoneNumber = <ThrowOnError extends boolean = false>(options
|
|
|
5797
5797
|
|
|
5798
5798
|
/**
|
|
5799
5799
|
* Purchase phone number
|
|
5800
|
-
* Payment-first:
|
|
5801
|
-
*
|
|
5800
|
+
* Payment-first: the system provisions a number and auto-assigns it, unless you pass
|
|
5801
|
+
* `phoneNumber` to buy one exact number from `GET /v1/phone-numbers/available`. With
|
|
5802
|
+
* usage-based billing active and a payment method on file, the
|
|
5802
5803
|
* number provisions inline and bills per month on your usage-based invoice (there is
|
|
5803
5804
|
* no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`;
|
|
5804
5805
|
* a regulated country returns `202` with `status: "kyc_required"` and a `kycUrl`.
|
|
@@ -5840,7 +5841,9 @@ export const listPhoneNumberCountries = <ThrowOnError extends boolean = false>(o
|
|
|
5840
5841
|
* country (default US). Optional filters narrow the results. The country
|
|
5841
5842
|
* must be offerable (see GET /v1/phone-numbers/countries). Voice
|
|
5842
5843
|
* capability is always required; pass `sms=true` to only see numbers that
|
|
5843
|
-
* can also text (SMS support is per-number, not per-country).
|
|
5844
|
+
* can also text (SMS support is per-number, not per-country). Numbers a
|
|
5845
|
+
* purchase would refuse are left out, and any result's `phoneNumber` can
|
|
5846
|
+
* be bought exactly by passing it to POST /v1/phone-numbers/purchase.
|
|
5844
5847
|
*
|
|
5845
5848
|
*/
|
|
5846
5849
|
export const searchAvailablePhoneNumbers = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<SearchAvailablePhoneNumbersData, ThrowOnError>) => {
|
|
@@ -5895,8 +5898,9 @@ export const getWhatsAppPhoneNumbers = <ThrowOnError extends boolean = false>(op
|
|
|
5895
5898
|
* Deprecated alias of `/v1/phone-numbers/purchase`; same contract. New
|
|
5896
5899
|
* integrations should use that path.
|
|
5897
5900
|
*
|
|
5898
|
-
* Payment-first:
|
|
5899
|
-
*
|
|
5901
|
+
* Payment-first: the system provisions a number and auto-assigns it, unless you pass
|
|
5902
|
+
* `phoneNumber` to buy one exact number from `GET /v1/phone-numbers/available`. With
|
|
5903
|
+
* usage-based billing active and a payment method on file, the
|
|
5900
5904
|
* number provisions inline and bills per month on your usage-based invoice (there is
|
|
5901
5905
|
* no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`;
|
|
5902
5906
|
* a regulated country returns `202` with `status: "kyc_required"` and a `kycUrl`.
|
|
@@ -26404,6 +26404,11 @@ export type PurchasePhoneNumberData = {
|
|
|
26404
26404
|
*
|
|
26405
26405
|
*/
|
|
26406
26406
|
areaCode?: string;
|
|
26407
|
+
/**
|
|
26408
|
+
* One exact number to buy, in E.164, taken from GET /v1/phone-numbers/available. Hard constraint: when it is no longer available (bought by someone else, or WhatsApp's buy-time check rejects it) the purchase fails with 409 code PHONE_NUMBER_UNAVAILABLE instead of assigning another number; search again and pick another. Only for countries and types that activate instantly: a regulated one (202 kyc_required) returns 400 when phoneNumber is set.
|
|
26409
|
+
*
|
|
26410
|
+
*/
|
|
26411
|
+
phoneNumber?: string;
|
|
26407
26412
|
/**
|
|
26408
26413
|
* A phone number is the unit; WhatsApp is one optional feature. Pass false to buy a STANDALONE number (Calls/SMS only): provisioning skips the Meta pre-verify/OTP steps and the number activates immediately. Omitted defaults to the WhatsApp provisioning path. WhatsApp can be connected to a standalone number later from the connect flow.
|
|
26409
26414
|
*
|
|
@@ -26472,7 +26477,7 @@ export type PurchasePhoneNumberError = (unknown | {
|
|
|
26472
26477
|
error?: string;
|
|
26473
26478
|
} | {
|
|
26474
26479
|
error?: string;
|
|
26475
|
-
code?: 'PURCHASE_VELOCITY' | 'AREA_CODE_UNAVAILABLE';
|
|
26480
|
+
code?: 'PURCHASE_VELOCITY' | 'AREA_CODE_UNAVAILABLE' | 'PHONE_NUMBER_UNAVAILABLE';
|
|
26476
26481
|
});
|
|
26477
26482
|
|
|
26478
26483
|
export type ListPhoneNumberCountriesResponse = ({
|
|
@@ -26584,11 +26589,22 @@ export type SearchAvailablePhoneNumbersResponse = ({
|
|
|
26584
26589
|
*/
|
|
26585
26590
|
requireSms?: boolean;
|
|
26586
26591
|
numbers?: Array<{
|
|
26592
|
+
/**
|
|
26593
|
+
* E.164. Pass it as `phoneNumber` on POST /v1/phone-numbers/purchase to buy this exact number.
|
|
26594
|
+
*/
|
|
26587
26595
|
phoneNumber?: string;
|
|
26588
26596
|
/**
|
|
26589
26597
|
* Provider capability list for this number (e.g. voice, sms, mms).
|
|
26590
26598
|
*/
|
|
26591
26599
|
features?: Array<(string)>;
|
|
26600
|
+
/**
|
|
26601
|
+
* Town or rate center the number belongs to, as the carrier names it (e.g. WACO).
|
|
26602
|
+
*/
|
|
26603
|
+
locality?: string;
|
|
26604
|
+
/**
|
|
26605
|
+
* true when the carrier added this number because too few matched your filters, so it may be outside the requested prefix or locality.
|
|
26606
|
+
*/
|
|
26607
|
+
bestEffort?: boolean;
|
|
26592
26608
|
}>;
|
|
26593
26609
|
});
|
|
26594
26610
|
|
|
@@ -26775,6 +26791,11 @@ export type PurchaseWhatsAppPhoneNumberData = {
|
|
|
26775
26791
|
*
|
|
26776
26792
|
*/
|
|
26777
26793
|
country?: string;
|
|
26794
|
+
/**
|
|
26795
|
+
* One exact number to buy, in E.164, taken from GET /v1/phone-numbers/available. Fails with 409 code PHONE_NUMBER_UNAVAILABLE when it is no longer available.
|
|
26796
|
+
*
|
|
26797
|
+
*/
|
|
26798
|
+
phoneNumber?: string;
|
|
26778
26799
|
/**
|
|
26779
26800
|
* Optional idempotency key. Send the same value when retrying a purchase: if a number was already bought under this key, the API returns { status: "already_purchased", numberId, phoneNumber } instead of provisioning a second number. Generate a fresh key for each genuinely new purchase.
|
|
26780
26801
|
*
|
|
@@ -26820,7 +26841,7 @@ export type PurchaseWhatsAppPhoneNumberError = (unknown | {
|
|
|
26820
26841
|
error?: string;
|
|
26821
26842
|
} | {
|
|
26822
26843
|
error?: string;
|
|
26823
|
-
code?: 'PURCHASE_VELOCITY' | 'AREA_CODE_UNAVAILABLE';
|
|
26844
|
+
code?: 'PURCHASE_VELOCITY' | 'AREA_CODE_UNAVAILABLE' | 'PHONE_NUMBER_UNAVAILABLE';
|
|
26824
26845
|
});
|
|
26825
26846
|
|
|
26826
26847
|
export type ListWhatsAppNumberCountriesResponse = ({
|
|
@@ -26871,6 +26892,8 @@ export type SearchAvailableWhatsAppNumbersResponse = ({
|
|
|
26871
26892
|
numberType?: string;
|
|
26872
26893
|
numbers?: Array<{
|
|
26873
26894
|
phoneNumber?: string;
|
|
26895
|
+
locality?: string;
|
|
26896
|
+
bestEffort?: boolean;
|
|
26874
26897
|
}>;
|
|
26875
26898
|
});
|
|
26876
26899
|
|
|
@@ -37259,7 +37282,7 @@ export type CreateStandaloneAdData = {
|
|
|
37259
37282
|
*/
|
|
37260
37283
|
multiAdvertiser?: 'OPT_IN' | 'OPT_OUT';
|
|
37261
37284
|
/**
|
|
37262
|
-
* Google Performance Max validates the complete atomic campaign and asset group with no resource creation or local persistence. Google validation still downloads image URLs and consumes quota. On Meta, validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, existing video.id or existingCreativeId; media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error.
|
|
37285
|
+
* Google Performance Max validates the complete atomic campaign and asset group with no resource creation or local persistence. Google validation still downloads image URLs and consumes quota. On Meta, validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, all-image placementAssets with per-rule copy, existing video.id or existingCreativeId; other media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Placement validation uses existing Instagram identities only. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error.
|
|
37263
37286
|
*/
|
|
37264
37287
|
validateOnly?: boolean;
|
|
37265
37288
|
/**
|
|
@@ -37319,7 +37342,7 @@ export type CreateStandaloneAdData = {
|
|
|
37319
37342
|
* `body` field is used as the `object_story_spec.link_data.message` (the preview text) and
|
|
37320
37343
|
* `headlines` must also be present. On a video creative the copy lands in
|
|
37321
37344
|
* `video_data.message` / `video_data.title` instead of `link_data`. Mutually exclusive
|
|
37322
|
-
* with `dynamicCreative`, `placementAssets`, `carouselCards`, and `creatives[]`.
|
|
37345
|
+
* with `dynamicCreative`, `placementAssets`, `carouselCards`, and `creatives[]`. For placement-specific copy, use the singular `placementAssets.rules[].body` and `headline` fields instead.
|
|
37323
37346
|
*
|
|
37324
37347
|
*/
|
|
37325
37348
|
bodies?: Array<(string)>;
|
|
@@ -37902,15 +37925,19 @@ export type CreateStandaloneAdData = {
|
|
|
37902
37925
|
* on the legacy single shape AND the attach shape (`adSetId` + placementAssets adds one
|
|
37903
37926
|
* placement-customized ad to an existing ad set, the way to build N per-placement ads
|
|
37904
37927
|
* sharing one ad set: create the first normally, attach the rest). Cannot be combined
|
|
37905
|
-
* with `creatives[]
|
|
37906
|
-
*
|
|
37907
|
-
*
|
|
37928
|
+
* with `creatives[]` or top-level `bodies`/`headlines`/`descriptions` arrays. Each rule
|
|
37929
|
+
* can override `headline`, `body` and `description` with one string per field. Omitted
|
|
37930
|
+
* fields and unmatched placements use the top-level copy; `linkUrl` and `callToAction`
|
|
37931
|
+
* remain shared. Zernio emits labelled text with `optimization_type: PLACEMENT`.
|
|
37932
|
+
* Multiple text options rotating within a placement are not supported by this input. Each rule's `placements` accepts the same fields as the top-level
|
|
37908
37933
|
* `placements` object; Meta enforces co-selection rules and returns an actionable error.
|
|
37909
37934
|
*
|
|
37910
|
-
*
|
|
37911
|
-
*
|
|
37912
|
-
*
|
|
37913
|
-
*
|
|
37935
|
+
* Meta controls text rendering by placement and format. Validation accepts these fields
|
|
37936
|
+
* but does not prove that every field appears in delivery. Preview the ad; put copy that
|
|
37937
|
+
* must always be visible into the image or video itself.
|
|
37938
|
+
*
|
|
37939
|
+
* `validateOnly: true` supports all-image placementAssets without uploading or creating
|
|
37940
|
+
* anything. Video placement validation remains unsupported because it requires uploads.
|
|
37914
37941
|
*
|
|
37915
37942
|
* A block is all-image OR all-video, never mixed (Meta's asset_feed_spec carries one ad
|
|
37916
37943
|
* format). Image mode: `defaultImageUrl` + `rules[].imageUrl`. Video mode:
|
|
@@ -37947,6 +37974,18 @@ export type CreateStandaloneAdData = {
|
|
|
37947
37974
|
* Video mode (optional). Poster image for this rule's video; auto-generated when omitted.
|
|
37948
37975
|
*/
|
|
37949
37976
|
thumbnailUrl?: string;
|
|
37977
|
+
/**
|
|
37978
|
+
* One headline pinned to this rule. Omit to inherit the top-level headline.
|
|
37979
|
+
*/
|
|
37980
|
+
headline?: string;
|
|
37981
|
+
/**
|
|
37982
|
+
* One primary text pinned to this rule. Omit to inherit the top-level body.
|
|
37983
|
+
*/
|
|
37984
|
+
body?: string;
|
|
37985
|
+
/**
|
|
37986
|
+
* One link description pinned to this rule. Omit to inherit the top-level description.
|
|
37987
|
+
*/
|
|
37988
|
+
description?: string;
|
|
37950
37989
|
/**
|
|
37951
37990
|
* 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.
|
|
37952
37991
|
*/
|