@zernio/node 0.2.734 → 0.2.736
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 +96 -2
- package/dist/index.d.ts +96 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +3 -3
- package/src/generated/types.gen.ts +96 -2
package/dist/index.d.mts
CHANGED
|
@@ -10262,6 +10262,30 @@ type WebhookPayloadMessage = {
|
|
|
10262
10262
|
*/
|
|
10263
10263
|
product_retailer_id?: string;
|
|
10264
10264
|
};
|
|
10265
|
+
/**
|
|
10266
|
+
* WhatsApp only. The location pin the user shared, forwarded
|
|
10267
|
+
* verbatim from Meta. The message `text` is only the emoji preview
|
|
10268
|
+
* (`📍 <name>`); the coordinates live here.
|
|
10269
|
+
*
|
|
10270
|
+
*/
|
|
10271
|
+
location?: {
|
|
10272
|
+
/**
|
|
10273
|
+
* Latitude in decimal degrees.
|
|
10274
|
+
*/
|
|
10275
|
+
latitude?: number;
|
|
10276
|
+
/**
|
|
10277
|
+
* Longitude in decimal degrees.
|
|
10278
|
+
*/
|
|
10279
|
+
longitude?: number;
|
|
10280
|
+
/**
|
|
10281
|
+
* Location name, when the user shared a named place.
|
|
10282
|
+
*/
|
|
10283
|
+
name?: string;
|
|
10284
|
+
/**
|
|
10285
|
+
* Street address, when Meta sends one.
|
|
10286
|
+
*/
|
|
10287
|
+
address?: string;
|
|
10288
|
+
};
|
|
10265
10289
|
/**
|
|
10266
10290
|
* WhatsApp only. Contact cards the user shared, forwarded verbatim
|
|
10267
10291
|
* from Meta. Read `contactsOrigin` before treating any number here
|
|
@@ -10688,9 +10712,48 @@ type WebhookPayloadMessageSent = {
|
|
|
10688
10712
|
conversation: InboxWebhookConversation;
|
|
10689
10713
|
account: InboxWebhookAccount;
|
|
10690
10714
|
/**
|
|
10691
|
-
* Platform-specific context for the sent message. The key is present only when the send carried some context, and absent otherwise: it is never null and never an empty object.
|
|
10715
|
+
* Platform-specific context for the sent message: a quote-reply reference, a WhatsApp location pin or WhatsApp contact cards. The key is present only when the send carried some context, and absent otherwise: it is never null and never an empty object. Read it to tell a location or contact-card message from a text one without a GET on the message.
|
|
10692
10716
|
*/
|
|
10693
10717
|
metadata?: {
|
|
10718
|
+
/**
|
|
10719
|
+
* WhatsApp only. The location pin this message carries, in the same
|
|
10720
|
+
* shape the inbox send API accepts. Present on API sends that passed
|
|
10721
|
+
* `location`, and on Coexistence echoes of a pin shared from the
|
|
10722
|
+
* WhatsApp Business app. The message `text` is only the emoji
|
|
10723
|
+
* preview (`📍 <name>`); the pin itself lives here.
|
|
10724
|
+
*
|
|
10725
|
+
*/
|
|
10726
|
+
location?: {
|
|
10727
|
+
/**
|
|
10728
|
+
* Latitude in decimal degrees.
|
|
10729
|
+
*/
|
|
10730
|
+
latitude?: number;
|
|
10731
|
+
/**
|
|
10732
|
+
* Longitude in decimal degrees.
|
|
10733
|
+
*/
|
|
10734
|
+
longitude?: number;
|
|
10735
|
+
/**
|
|
10736
|
+
* Location name, when one was given.
|
|
10737
|
+
*/
|
|
10738
|
+
name?: string;
|
|
10739
|
+
/**
|
|
10740
|
+
* Street address, when one was given.
|
|
10741
|
+
*/
|
|
10742
|
+
address?: string;
|
|
10743
|
+
};
|
|
10744
|
+
/**
|
|
10745
|
+
* WhatsApp only. The contact cards this message carries. On API
|
|
10746
|
+
* sends this is the `contacts` array exactly as given to the inbox
|
|
10747
|
+
* send API (`name`, `phones[].phone` / `type`, `emails[]`); on
|
|
10748
|
+
* Coexistence echoes of a card shared from the WhatsApp Business
|
|
10749
|
+
* app it is Meta's shape (`phones[].wa_id`, `vcard`). The message
|
|
10750
|
+
* `text` is only the emoji preview (`👤 <name>`); the cards live
|
|
10751
|
+
* here.
|
|
10752
|
+
*
|
|
10753
|
+
*/
|
|
10754
|
+
contacts?: Array<{
|
|
10755
|
+
[key: string]: unknown;
|
|
10756
|
+
}>;
|
|
10694
10757
|
/**
|
|
10695
10758
|
* `platformMessageId` of the message this send is a quote-reply to.
|
|
10696
10759
|
*
|
|
@@ -26316,13 +26379,20 @@ type ListPhoneNumberCountriesResponse = ({
|
|
|
26316
26379
|
* Live carrier-stock snapshot (refreshed every 6h + on availability checks): false when NO offered type currently has deliverable inventory, so a purchase would fail. Treat as advisory; the purchase itself re-checks.
|
|
26317
26380
|
*/
|
|
26318
26381
|
inStock?: boolean;
|
|
26382
|
+
/**
|
|
26383
|
+
* At least one out-of-stock type here can be pre-ordered (see `types[].preOrderable`).
|
|
26384
|
+
*/
|
|
26385
|
+
preOrderable?: boolean;
|
|
26319
26386
|
/**
|
|
26320
26387
|
* Every number type offered in this country (default first). Capabilities, KYC tier, monthly price, and stock are per type. The country-level fields above mirror the first (default) entry. Pass the chosen `numberType` to POST /v1/phone-numbers/purchase.
|
|
26321
26388
|
*
|
|
26322
26389
|
*/
|
|
26323
26390
|
types?: Array<{
|
|
26324
26391
|
numberType?: 'local' | 'mobile' | 'national' | 'toll_free';
|
|
26325
|
-
|
|
26392
|
+
/**
|
|
26393
|
+
* Null on a `fulfilment: request` type, whose document tier is only known once its requirements are read.
|
|
26394
|
+
*/
|
|
26395
|
+
tier?: (1 | 2 | 3 | 4) | null;
|
|
26326
26396
|
needsKyc?: boolean;
|
|
26327
26397
|
/**
|
|
26328
26398
|
* Price a NEW number of this type costs per month, in cents.
|
|
@@ -26335,6 +26405,14 @@ type ListPhoneNumberCountriesResponse = ({
|
|
|
26335
26405
|
smsAvailable?: boolean;
|
|
26336
26406
|
callsAvailable?: boolean;
|
|
26337
26407
|
inStock?: boolean;
|
|
26408
|
+
/**
|
|
26409
|
+
* `request`: the carrier stocks this type nowhere and only sources it to order, so it is always a pre-order.
|
|
26410
|
+
*/
|
|
26411
|
+
fulfilment?: 'instant' | 'request';
|
|
26412
|
+
/**
|
|
26413
|
+
* Out of stock but orderable anyway. Submit KYC as usual (POST /v1/phone-numbers/kyc) and the carrier sources the number after review, usually about 3 weeks and never guaranteed. Only document tiers (3/4) qualify, and nothing is billed until the number is active.
|
|
26414
|
+
*/
|
|
26415
|
+
preOrderable?: boolean;
|
|
26338
26416
|
}>;
|
|
26339
26417
|
}>;
|
|
26340
26418
|
});
|
|
@@ -26408,6 +26486,10 @@ type CheckPhoneNumberAvailabilityResponse = ({
|
|
|
26408
26486
|
* Whether deliverable voice inventory exists right now.
|
|
26409
26487
|
*/
|
|
26410
26488
|
available?: boolean;
|
|
26489
|
+
/**
|
|
26490
|
+
* Nothing deliverable now, but this pair can be pre-ordered: submit KYC as usual and the carrier sources the number after review (usually about 3 weeks, never guaranteed). Only document tiers (3/4) qualify.
|
|
26491
|
+
*/
|
|
26492
|
+
preOrderable?: boolean;
|
|
26411
26493
|
addressConstraint?: 'geo' | 'country' | 'none';
|
|
26412
26494
|
/**
|
|
26413
26495
|
* For `geo` only: the area(s) the registered address must be in.
|
|
@@ -26672,6 +26754,10 @@ type CheckWhatsAppNumberAvailabilityResponse = ({
|
|
|
26672
26754
|
* Whether deliverable voice inventory exists right now.
|
|
26673
26755
|
*/
|
|
26674
26756
|
available?: boolean;
|
|
26757
|
+
/**
|
|
26758
|
+
* Nothing deliverable now, but this pair can be pre-ordered: submit KYC as usual and the carrier sources the number after review (usually about 3 weeks, never guaranteed). Only document tiers (3/4) qualify.
|
|
26759
|
+
*/
|
|
26760
|
+
preOrderable?: boolean;
|
|
26675
26761
|
addressConstraint?: 'geo' | 'country' | 'none';
|
|
26676
26762
|
/**
|
|
26677
26763
|
* For `geo` only: the area(s) the registered address must be in.
|
|
@@ -26853,6 +26939,10 @@ type SubmitPhoneNumberKycData = {
|
|
|
26853
26939
|
};
|
|
26854
26940
|
type SubmitPhoneNumberKycResponse = ({
|
|
26855
26941
|
status?: 'kyc_submitted' | 'kyc_reused' | 'kyc_already_submitted';
|
|
26942
|
+
/**
|
|
26943
|
+
* True when nothing was in stock and this submission placed a pre-order. The number stays `pending_regulatory` until the carrier sources it (usually about 3 weeks) and is not billed until active. A pre-order is one number: `quantity` above 1 is rejected with 400.
|
|
26944
|
+
*/
|
|
26945
|
+
preOrder?: boolean;
|
|
26856
26946
|
/**
|
|
26857
26947
|
* The first/primary number, kept at the top level for backward compatibility. See `numbers` for the full set when `quantity` > 1.
|
|
26858
26948
|
*/
|
|
@@ -27613,6 +27703,10 @@ type SubmitWhatsAppNumberKycData = {
|
|
|
27613
27703
|
};
|
|
27614
27704
|
type SubmitWhatsAppNumberKycResponse = ({
|
|
27615
27705
|
status?: 'kyc_submitted' | 'kyc_reused' | 'kyc_already_submitted';
|
|
27706
|
+
/**
|
|
27707
|
+
* True when nothing was in stock and this submission placed a pre-order. The number stays `pending_regulatory` until the carrier sources it (usually about 3 weeks) and is not billed until active. A pre-order is one number: `quantity` above 1 is rejected with 400.
|
|
27708
|
+
*/
|
|
27709
|
+
preOrder?: boolean;
|
|
27616
27710
|
/**
|
|
27617
27711
|
* The first/primary number, kept at the top level for backward compatibility. See `numbers` for the full set when `quantity` > 1.
|
|
27618
27712
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -10262,6 +10262,30 @@ type WebhookPayloadMessage = {
|
|
|
10262
10262
|
*/
|
|
10263
10263
|
product_retailer_id?: string;
|
|
10264
10264
|
};
|
|
10265
|
+
/**
|
|
10266
|
+
* WhatsApp only. The location pin the user shared, forwarded
|
|
10267
|
+
* verbatim from Meta. The message `text` is only the emoji preview
|
|
10268
|
+
* (`📍 <name>`); the coordinates live here.
|
|
10269
|
+
*
|
|
10270
|
+
*/
|
|
10271
|
+
location?: {
|
|
10272
|
+
/**
|
|
10273
|
+
* Latitude in decimal degrees.
|
|
10274
|
+
*/
|
|
10275
|
+
latitude?: number;
|
|
10276
|
+
/**
|
|
10277
|
+
* Longitude in decimal degrees.
|
|
10278
|
+
*/
|
|
10279
|
+
longitude?: number;
|
|
10280
|
+
/**
|
|
10281
|
+
* Location name, when the user shared a named place.
|
|
10282
|
+
*/
|
|
10283
|
+
name?: string;
|
|
10284
|
+
/**
|
|
10285
|
+
* Street address, when Meta sends one.
|
|
10286
|
+
*/
|
|
10287
|
+
address?: string;
|
|
10288
|
+
};
|
|
10265
10289
|
/**
|
|
10266
10290
|
* WhatsApp only. Contact cards the user shared, forwarded verbatim
|
|
10267
10291
|
* from Meta. Read `contactsOrigin` before treating any number here
|
|
@@ -10688,9 +10712,48 @@ type WebhookPayloadMessageSent = {
|
|
|
10688
10712
|
conversation: InboxWebhookConversation;
|
|
10689
10713
|
account: InboxWebhookAccount;
|
|
10690
10714
|
/**
|
|
10691
|
-
* Platform-specific context for the sent message. The key is present only when the send carried some context, and absent otherwise: it is never null and never an empty object.
|
|
10715
|
+
* Platform-specific context for the sent message: a quote-reply reference, a WhatsApp location pin or WhatsApp contact cards. The key is present only when the send carried some context, and absent otherwise: it is never null and never an empty object. Read it to tell a location or contact-card message from a text one without a GET on the message.
|
|
10692
10716
|
*/
|
|
10693
10717
|
metadata?: {
|
|
10718
|
+
/**
|
|
10719
|
+
* WhatsApp only. The location pin this message carries, in the same
|
|
10720
|
+
* shape the inbox send API accepts. Present on API sends that passed
|
|
10721
|
+
* `location`, and on Coexistence echoes of a pin shared from the
|
|
10722
|
+
* WhatsApp Business app. The message `text` is only the emoji
|
|
10723
|
+
* preview (`📍 <name>`); the pin itself lives here.
|
|
10724
|
+
*
|
|
10725
|
+
*/
|
|
10726
|
+
location?: {
|
|
10727
|
+
/**
|
|
10728
|
+
* Latitude in decimal degrees.
|
|
10729
|
+
*/
|
|
10730
|
+
latitude?: number;
|
|
10731
|
+
/**
|
|
10732
|
+
* Longitude in decimal degrees.
|
|
10733
|
+
*/
|
|
10734
|
+
longitude?: number;
|
|
10735
|
+
/**
|
|
10736
|
+
* Location name, when one was given.
|
|
10737
|
+
*/
|
|
10738
|
+
name?: string;
|
|
10739
|
+
/**
|
|
10740
|
+
* Street address, when one was given.
|
|
10741
|
+
*/
|
|
10742
|
+
address?: string;
|
|
10743
|
+
};
|
|
10744
|
+
/**
|
|
10745
|
+
* WhatsApp only. The contact cards this message carries. On API
|
|
10746
|
+
* sends this is the `contacts` array exactly as given to the inbox
|
|
10747
|
+
* send API (`name`, `phones[].phone` / `type`, `emails[]`); on
|
|
10748
|
+
* Coexistence echoes of a card shared from the WhatsApp Business
|
|
10749
|
+
* app it is Meta's shape (`phones[].wa_id`, `vcard`). The message
|
|
10750
|
+
* `text` is only the emoji preview (`👤 <name>`); the cards live
|
|
10751
|
+
* here.
|
|
10752
|
+
*
|
|
10753
|
+
*/
|
|
10754
|
+
contacts?: Array<{
|
|
10755
|
+
[key: string]: unknown;
|
|
10756
|
+
}>;
|
|
10694
10757
|
/**
|
|
10695
10758
|
* `platformMessageId` of the message this send is a quote-reply to.
|
|
10696
10759
|
*
|
|
@@ -26316,13 +26379,20 @@ type ListPhoneNumberCountriesResponse = ({
|
|
|
26316
26379
|
* Live carrier-stock snapshot (refreshed every 6h + on availability checks): false when NO offered type currently has deliverable inventory, so a purchase would fail. Treat as advisory; the purchase itself re-checks.
|
|
26317
26380
|
*/
|
|
26318
26381
|
inStock?: boolean;
|
|
26382
|
+
/**
|
|
26383
|
+
* At least one out-of-stock type here can be pre-ordered (see `types[].preOrderable`).
|
|
26384
|
+
*/
|
|
26385
|
+
preOrderable?: boolean;
|
|
26319
26386
|
/**
|
|
26320
26387
|
* Every number type offered in this country (default first). Capabilities, KYC tier, monthly price, and stock are per type. The country-level fields above mirror the first (default) entry. Pass the chosen `numberType` to POST /v1/phone-numbers/purchase.
|
|
26321
26388
|
*
|
|
26322
26389
|
*/
|
|
26323
26390
|
types?: Array<{
|
|
26324
26391
|
numberType?: 'local' | 'mobile' | 'national' | 'toll_free';
|
|
26325
|
-
|
|
26392
|
+
/**
|
|
26393
|
+
* Null on a `fulfilment: request` type, whose document tier is only known once its requirements are read.
|
|
26394
|
+
*/
|
|
26395
|
+
tier?: (1 | 2 | 3 | 4) | null;
|
|
26326
26396
|
needsKyc?: boolean;
|
|
26327
26397
|
/**
|
|
26328
26398
|
* Price a NEW number of this type costs per month, in cents.
|
|
@@ -26335,6 +26405,14 @@ type ListPhoneNumberCountriesResponse = ({
|
|
|
26335
26405
|
smsAvailable?: boolean;
|
|
26336
26406
|
callsAvailable?: boolean;
|
|
26337
26407
|
inStock?: boolean;
|
|
26408
|
+
/**
|
|
26409
|
+
* `request`: the carrier stocks this type nowhere and only sources it to order, so it is always a pre-order.
|
|
26410
|
+
*/
|
|
26411
|
+
fulfilment?: 'instant' | 'request';
|
|
26412
|
+
/**
|
|
26413
|
+
* Out of stock but orderable anyway. Submit KYC as usual (POST /v1/phone-numbers/kyc) and the carrier sources the number after review, usually about 3 weeks and never guaranteed. Only document tiers (3/4) qualify, and nothing is billed until the number is active.
|
|
26414
|
+
*/
|
|
26415
|
+
preOrderable?: boolean;
|
|
26338
26416
|
}>;
|
|
26339
26417
|
}>;
|
|
26340
26418
|
});
|
|
@@ -26408,6 +26486,10 @@ type CheckPhoneNumberAvailabilityResponse = ({
|
|
|
26408
26486
|
* Whether deliverable voice inventory exists right now.
|
|
26409
26487
|
*/
|
|
26410
26488
|
available?: boolean;
|
|
26489
|
+
/**
|
|
26490
|
+
* Nothing deliverable now, but this pair can be pre-ordered: submit KYC as usual and the carrier sources the number after review (usually about 3 weeks, never guaranteed). Only document tiers (3/4) qualify.
|
|
26491
|
+
*/
|
|
26492
|
+
preOrderable?: boolean;
|
|
26411
26493
|
addressConstraint?: 'geo' | 'country' | 'none';
|
|
26412
26494
|
/**
|
|
26413
26495
|
* For `geo` only: the area(s) the registered address must be in.
|
|
@@ -26672,6 +26754,10 @@ type CheckWhatsAppNumberAvailabilityResponse = ({
|
|
|
26672
26754
|
* Whether deliverable voice inventory exists right now.
|
|
26673
26755
|
*/
|
|
26674
26756
|
available?: boolean;
|
|
26757
|
+
/**
|
|
26758
|
+
* Nothing deliverable now, but this pair can be pre-ordered: submit KYC as usual and the carrier sources the number after review (usually about 3 weeks, never guaranteed). Only document tiers (3/4) qualify.
|
|
26759
|
+
*/
|
|
26760
|
+
preOrderable?: boolean;
|
|
26675
26761
|
addressConstraint?: 'geo' | 'country' | 'none';
|
|
26676
26762
|
/**
|
|
26677
26763
|
* For `geo` only: the area(s) the registered address must be in.
|
|
@@ -26853,6 +26939,10 @@ type SubmitPhoneNumberKycData = {
|
|
|
26853
26939
|
};
|
|
26854
26940
|
type SubmitPhoneNumberKycResponse = ({
|
|
26855
26941
|
status?: 'kyc_submitted' | 'kyc_reused' | 'kyc_already_submitted';
|
|
26942
|
+
/**
|
|
26943
|
+
* True when nothing was in stock and this submission placed a pre-order. The number stays `pending_regulatory` until the carrier sources it (usually about 3 weeks) and is not billed until active. A pre-order is one number: `quantity` above 1 is rejected with 400.
|
|
26944
|
+
*/
|
|
26945
|
+
preOrder?: boolean;
|
|
26856
26946
|
/**
|
|
26857
26947
|
* The first/primary number, kept at the top level for backward compatibility. See `numbers` for the full set when `quantity` > 1.
|
|
26858
26948
|
*/
|
|
@@ -27613,6 +27703,10 @@ type SubmitWhatsAppNumberKycData = {
|
|
|
27613
27703
|
};
|
|
27614
27704
|
type SubmitWhatsAppNumberKycResponse = ({
|
|
27615
27705
|
status?: 'kyc_submitted' | 'kyc_reused' | 'kyc_already_submitted';
|
|
27706
|
+
/**
|
|
27707
|
+
* True when nothing was in stock and this submission placed a pre-order. The number stays `pending_regulatory` until the carrier sources it (usually about 3 weeks) and is not billed until active. A pre-order is one number: `quantity` above 1 is rejected with 400.
|
|
27708
|
+
*/
|
|
27709
|
+
preOrder?: boolean;
|
|
27616
27710
|
/**
|
|
27617
27711
|
* The first/primary number, kept at the top level for backward compatibility. See `numbers` for the full set when `quantity` > 1.
|
|
27618
27712
|
*/
|
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.736",
|
|
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.736",
|
|
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
|
@@ -6483,9 +6483,9 @@ export const disableVoiceOnNumber = <ThrowOnError extends boolean = false>(optio
|
|
|
6483
6483
|
* it if you miss the stock. Up to 20 watches at once.
|
|
6484
6484
|
*
|
|
6485
6485
|
* Countries and types marked `fulfilment: request` by
|
|
6486
|
-
* GET /v1/phone-numbers/countries can also be watched
|
|
6487
|
-
*
|
|
6488
|
-
*
|
|
6486
|
+
* GET /v1/phone-numbers/countries can also be watched, but anything with
|
|
6487
|
+
* `preOrderable: true` does not need a watch: submit KYC and the carrier
|
|
6488
|
+
* sources the number to order.
|
|
6489
6489
|
*
|
|
6490
6490
|
*/
|
|
6491
6491
|
export const createPhoneNumberStockWatch = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreatePhoneNumberStockWatchData, ThrowOnError>) => {
|
|
@@ -9061,6 +9061,30 @@ export type WebhookPayloadMessage = {
|
|
|
9061
9061
|
*/
|
|
9062
9062
|
product_retailer_id?: string;
|
|
9063
9063
|
};
|
|
9064
|
+
/**
|
|
9065
|
+
* WhatsApp only. The location pin the user shared, forwarded
|
|
9066
|
+
* verbatim from Meta. The message `text` is only the emoji preview
|
|
9067
|
+
* (`📍 <name>`); the coordinates live here.
|
|
9068
|
+
*
|
|
9069
|
+
*/
|
|
9070
|
+
location?: {
|
|
9071
|
+
/**
|
|
9072
|
+
* Latitude in decimal degrees.
|
|
9073
|
+
*/
|
|
9074
|
+
latitude?: number;
|
|
9075
|
+
/**
|
|
9076
|
+
* Longitude in decimal degrees.
|
|
9077
|
+
*/
|
|
9078
|
+
longitude?: number;
|
|
9079
|
+
/**
|
|
9080
|
+
* Location name, when the user shared a named place.
|
|
9081
|
+
*/
|
|
9082
|
+
name?: string;
|
|
9083
|
+
/**
|
|
9084
|
+
* Street address, when Meta sends one.
|
|
9085
|
+
*/
|
|
9086
|
+
address?: string;
|
|
9087
|
+
};
|
|
9064
9088
|
/**
|
|
9065
9089
|
* WhatsApp only. Contact cards the user shared, forwarded verbatim
|
|
9066
9090
|
* from Meta. Read `contactsOrigin` before treating any number here
|
|
@@ -9498,9 +9522,48 @@ export type WebhookPayloadMessageSent = {
|
|
|
9498
9522
|
conversation: InboxWebhookConversation;
|
|
9499
9523
|
account: InboxWebhookAccount;
|
|
9500
9524
|
/**
|
|
9501
|
-
* Platform-specific context for the sent message. The key is present only when the send carried some context, and absent otherwise: it is never null and never an empty object.
|
|
9525
|
+
* Platform-specific context for the sent message: a quote-reply reference, a WhatsApp location pin or WhatsApp contact cards. The key is present only when the send carried some context, and absent otherwise: it is never null and never an empty object. Read it to tell a location or contact-card message from a text one without a GET on the message.
|
|
9502
9526
|
*/
|
|
9503
9527
|
metadata?: {
|
|
9528
|
+
/**
|
|
9529
|
+
* WhatsApp only. The location pin this message carries, in the same
|
|
9530
|
+
* shape the inbox send API accepts. Present on API sends that passed
|
|
9531
|
+
* `location`, and on Coexistence echoes of a pin shared from the
|
|
9532
|
+
* WhatsApp Business app. The message `text` is only the emoji
|
|
9533
|
+
* preview (`📍 <name>`); the pin itself lives here.
|
|
9534
|
+
*
|
|
9535
|
+
*/
|
|
9536
|
+
location?: {
|
|
9537
|
+
/**
|
|
9538
|
+
* Latitude in decimal degrees.
|
|
9539
|
+
*/
|
|
9540
|
+
latitude?: number;
|
|
9541
|
+
/**
|
|
9542
|
+
* Longitude in decimal degrees.
|
|
9543
|
+
*/
|
|
9544
|
+
longitude?: number;
|
|
9545
|
+
/**
|
|
9546
|
+
* Location name, when one was given.
|
|
9547
|
+
*/
|
|
9548
|
+
name?: string;
|
|
9549
|
+
/**
|
|
9550
|
+
* Street address, when one was given.
|
|
9551
|
+
*/
|
|
9552
|
+
address?: string;
|
|
9553
|
+
};
|
|
9554
|
+
/**
|
|
9555
|
+
* WhatsApp only. The contact cards this message carries. On API
|
|
9556
|
+
* sends this is the `contacts` array exactly as given to the inbox
|
|
9557
|
+
* send API (`name`, `phones[].phone` / `type`, `emails[]`); on
|
|
9558
|
+
* Coexistence echoes of a card shared from the WhatsApp Business
|
|
9559
|
+
* app it is Meta's shape (`phones[].wa_id`, `vcard`). The message
|
|
9560
|
+
* `text` is only the emoji preview (`👤 <name>`); the cards live
|
|
9561
|
+
* here.
|
|
9562
|
+
*
|
|
9563
|
+
*/
|
|
9564
|
+
contacts?: Array<{
|
|
9565
|
+
[key: string]: unknown;
|
|
9566
|
+
}>;
|
|
9504
9567
|
/**
|
|
9505
9568
|
* `platformMessageId` of the message this send is a quote-reply to.
|
|
9506
9569
|
*
|
|
@@ -26193,13 +26256,20 @@ export type ListPhoneNumberCountriesResponse = ({
|
|
|
26193
26256
|
* Live carrier-stock snapshot (refreshed every 6h + on availability checks): false when NO offered type currently has deliverable inventory, so a purchase would fail. Treat as advisory; the purchase itself re-checks.
|
|
26194
26257
|
*/
|
|
26195
26258
|
inStock?: boolean;
|
|
26259
|
+
/**
|
|
26260
|
+
* At least one out-of-stock type here can be pre-ordered (see `types[].preOrderable`).
|
|
26261
|
+
*/
|
|
26262
|
+
preOrderable?: boolean;
|
|
26196
26263
|
/**
|
|
26197
26264
|
* Every number type offered in this country (default first). Capabilities, KYC tier, monthly price, and stock are per type. The country-level fields above mirror the first (default) entry. Pass the chosen `numberType` to POST /v1/phone-numbers/purchase.
|
|
26198
26265
|
*
|
|
26199
26266
|
*/
|
|
26200
26267
|
types?: Array<{
|
|
26201
26268
|
numberType?: 'local' | 'mobile' | 'national' | 'toll_free';
|
|
26202
|
-
|
|
26269
|
+
/**
|
|
26270
|
+
* Null on a `fulfilment: request` type, whose document tier is only known once its requirements are read.
|
|
26271
|
+
*/
|
|
26272
|
+
tier?: (1 | 2 | 3 | 4) | null;
|
|
26203
26273
|
needsKyc?: boolean;
|
|
26204
26274
|
/**
|
|
26205
26275
|
* Price a NEW number of this type costs per month, in cents.
|
|
@@ -26212,6 +26282,14 @@ export type ListPhoneNumberCountriesResponse = ({
|
|
|
26212
26282
|
smsAvailable?: boolean;
|
|
26213
26283
|
callsAvailable?: boolean;
|
|
26214
26284
|
inStock?: boolean;
|
|
26285
|
+
/**
|
|
26286
|
+
* `request`: the carrier stocks this type nowhere and only sources it to order, so it is always a pre-order.
|
|
26287
|
+
*/
|
|
26288
|
+
fulfilment?: 'instant' | 'request';
|
|
26289
|
+
/**
|
|
26290
|
+
* Out of stock but orderable anyway. Submit KYC as usual (POST /v1/phone-numbers/kyc) and the carrier sources the number after review, usually about 3 weeks and never guaranteed. Only document tiers (3/4) qualify, and nothing is billed until the number is active.
|
|
26291
|
+
*/
|
|
26292
|
+
preOrderable?: boolean;
|
|
26215
26293
|
}>;
|
|
26216
26294
|
}>;
|
|
26217
26295
|
});
|
|
@@ -26291,6 +26369,10 @@ export type CheckPhoneNumberAvailabilityResponse = ({
|
|
|
26291
26369
|
* Whether deliverable voice inventory exists right now.
|
|
26292
26370
|
*/
|
|
26293
26371
|
available?: boolean;
|
|
26372
|
+
/**
|
|
26373
|
+
* Nothing deliverable now, but this pair can be pre-ordered: submit KYC as usual and the carrier sources the number after review (usually about 3 weeks, never guaranteed). Only document tiers (3/4) qualify.
|
|
26374
|
+
*/
|
|
26375
|
+
preOrderable?: boolean;
|
|
26294
26376
|
addressConstraint?: 'geo' | 'country' | 'none';
|
|
26295
26377
|
/**
|
|
26296
26378
|
* For `geo` only: the area(s) the registered address must be in.
|
|
@@ -26569,6 +26651,10 @@ export type CheckWhatsAppNumberAvailabilityResponse = ({
|
|
|
26569
26651
|
* Whether deliverable voice inventory exists right now.
|
|
26570
26652
|
*/
|
|
26571
26653
|
available?: boolean;
|
|
26654
|
+
/**
|
|
26655
|
+
* Nothing deliverable now, but this pair can be pre-ordered: submit KYC as usual and the carrier sources the number after review (usually about 3 weeks, never guaranteed). Only document tiers (3/4) qualify.
|
|
26656
|
+
*/
|
|
26657
|
+
preOrderable?: boolean;
|
|
26572
26658
|
addressConstraint?: 'geo' | 'country' | 'none';
|
|
26573
26659
|
/**
|
|
26574
26660
|
* For `geo` only: the area(s) the registered address must be in.
|
|
@@ -26756,6 +26842,10 @@ export type SubmitPhoneNumberKycData = {
|
|
|
26756
26842
|
|
|
26757
26843
|
export type SubmitPhoneNumberKycResponse = ({
|
|
26758
26844
|
status?: 'kyc_submitted' | 'kyc_reused' | 'kyc_already_submitted';
|
|
26845
|
+
/**
|
|
26846
|
+
* True when nothing was in stock and this submission placed a pre-order. The number stays `pending_regulatory` until the carrier sources it (usually about 3 weeks) and is not billed until active. A pre-order is one number: `quantity` above 1 is rejected with 400.
|
|
26847
|
+
*/
|
|
26848
|
+
preOrder?: boolean;
|
|
26759
26849
|
/**
|
|
26760
26850
|
* The first/primary number, kept at the top level for backward compatibility. See `numbers` for the full set when `quantity` > 1.
|
|
26761
26851
|
*/
|
|
@@ -27569,6 +27659,10 @@ export type SubmitWhatsAppNumberKycData = {
|
|
|
27569
27659
|
|
|
27570
27660
|
export type SubmitWhatsAppNumberKycResponse = ({
|
|
27571
27661
|
status?: 'kyc_submitted' | 'kyc_reused' | 'kyc_already_submitted';
|
|
27662
|
+
/**
|
|
27663
|
+
* True when nothing was in stock and this submission placed a pre-order. The number stays `pending_regulatory` until the carrier sources it (usually about 3 weeks) and is not billed until active. A pre-order is one number: `quantity` above 1 is rejected with 400.
|
|
27664
|
+
*/
|
|
27665
|
+
preOrder?: boolean;
|
|
27572
27666
|
/**
|
|
27573
27667
|
* The first/primary number, kept at the top level for backward compatibility. See `numbers` for the full set when `quantity` > 1.
|
|
27574
27668
|
*/
|