@zernio/node 0.2.785 → 0.2.786
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 +60 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +5 -0
- package/src/generated/types.gen.ts +60 -0
package/dist/index.d.mts
CHANGED
|
@@ -7444,6 +7444,10 @@ type PhoneNumberStockWatch = {
|
|
|
7444
7444
|
* The watched number type, or null when the watch covers every type in the country.
|
|
7445
7445
|
*/
|
|
7446
7446
|
numberType: ('local' | 'mobile' | 'national' | 'toll_free') | null;
|
|
7447
|
+
/**
|
|
7448
|
+
* The watched area code (NDC), or null when the watch covers every area.
|
|
7449
|
+
*/
|
|
7450
|
+
areaCode?: (string) | null;
|
|
7447
7451
|
createdAt: string;
|
|
7448
7452
|
};
|
|
7449
7453
|
/**
|
|
@@ -11281,6 +11285,14 @@ type WebhookPayloadPhoneNumberStockAvailable = {
|
|
|
11281
11285
|
*/
|
|
11282
11286
|
availableCount: number;
|
|
11283
11287
|
}>;
|
|
11288
|
+
/**
|
|
11289
|
+
* Set when the watch named an area: the area code (NDC) that is back in stock.
|
|
11290
|
+
*/
|
|
11291
|
+
areaCode?: string;
|
|
11292
|
+
/**
|
|
11293
|
+
* The name of that area, when known.
|
|
11294
|
+
*/
|
|
11295
|
+
areaName?: string;
|
|
11284
11296
|
};
|
|
11285
11297
|
/**
|
|
11286
11298
|
* UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
|
|
@@ -27323,6 +27335,24 @@ type CheckPhoneNumberAvailabilityResponse = ({
|
|
|
27323
27335
|
*/
|
|
27324
27336
|
count?: number;
|
|
27325
27337
|
}>;
|
|
27338
|
+
/**
|
|
27339
|
+
* Areas that had stock in the last 90 days and have none now. Pass one as `areaCode` with `preOrder: true` on the KYC submit when `preOrderable` is true, or watch it with POST /v1/phone-numbers/stock-watches.
|
|
27340
|
+
*
|
|
27341
|
+
*/
|
|
27342
|
+
soldOutAreas?: Array<{
|
|
27343
|
+
/**
|
|
27344
|
+
* Area code (national destination code).
|
|
27345
|
+
*/
|
|
27346
|
+
ndc?: string;
|
|
27347
|
+
/**
|
|
27348
|
+
* Area name.
|
|
27349
|
+
*/
|
|
27350
|
+
name?: string;
|
|
27351
|
+
/**
|
|
27352
|
+
* Whether this area can be pre-ordered: the carrier sources a number in it (usually 2 to 4 weeks, never guaranteed).
|
|
27353
|
+
*/
|
|
27354
|
+
preOrderable?: boolean;
|
|
27355
|
+
}>;
|
|
27326
27356
|
});
|
|
27327
27357
|
type CheckPhoneNumberAvailabilityError = (unknown | {
|
|
27328
27358
|
error?: string;
|
|
@@ -27598,6 +27628,24 @@ type CheckWhatsAppNumberAvailabilityResponse = ({
|
|
|
27598
27628
|
*/
|
|
27599
27629
|
count?: number;
|
|
27600
27630
|
}>;
|
|
27631
|
+
/**
|
|
27632
|
+
* Areas that had stock in the last 90 days and have none now. Pass one as `areaCode` with `preOrder: true` on the KYC submit when `preOrderable` is true, or watch it with POST /v1/phone-numbers/stock-watches.
|
|
27633
|
+
*
|
|
27634
|
+
*/
|
|
27635
|
+
soldOutAreas?: Array<{
|
|
27636
|
+
/**
|
|
27637
|
+
* Area code (national destination code).
|
|
27638
|
+
*/
|
|
27639
|
+
ndc?: string;
|
|
27640
|
+
/**
|
|
27641
|
+
* Area name.
|
|
27642
|
+
*/
|
|
27643
|
+
name?: string;
|
|
27644
|
+
/**
|
|
27645
|
+
* Whether this area can be pre-ordered: the carrier sources a number in it (usually 2 to 4 weeks, never guaranteed).
|
|
27646
|
+
*/
|
|
27647
|
+
preOrderable?: boolean;
|
|
27648
|
+
}>;
|
|
27601
27649
|
});
|
|
27602
27650
|
type CheckWhatsAppNumberAvailabilityError = (unknown | {
|
|
27603
27651
|
error?: string;
|
|
@@ -27709,6 +27757,10 @@ type SubmitPhoneNumberKycData = {
|
|
|
27709
27757
|
* Area code (NDC) the number must be in. Hard constraint: an empty area pool fails with 409 code AREA_CODE_UNAVAILABLE instead of ordering from another area. Omit for any area. Options come from GET /v1/phone-numbers/availability (areaOptions); the purchase 202 kycUrl echoes the areaCode picked at purchase time so it can be passed here.
|
|
27710
27758
|
*/
|
|
27711
27759
|
areaCode?: string;
|
|
27760
|
+
/**
|
|
27761
|
+
* With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area.
|
|
27762
|
+
*/
|
|
27763
|
+
preOrder?: boolean;
|
|
27712
27764
|
/**
|
|
27713
27765
|
* End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
|
|
27714
27766
|
*/
|
|
@@ -28473,6 +28525,10 @@ type SubmitWhatsAppNumberKycData = {
|
|
|
28473
28525
|
* Area code (NDC) the number must be in. Hard constraint: an empty area pool fails with 409 code AREA_CODE_UNAVAILABLE instead of ordering from another area. Omit for any area. Options come from GET /v1/phone-numbers/availability (areaOptions); the purchase 202 kycUrl echoes the areaCode picked at purchase time so it can be passed here.
|
|
28474
28526
|
*/
|
|
28475
28527
|
areaCode?: string;
|
|
28528
|
+
/**
|
|
28529
|
+
* With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area.
|
|
28530
|
+
*/
|
|
28531
|
+
preOrder?: boolean;
|
|
28476
28532
|
/**
|
|
28477
28533
|
* End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
|
|
28478
28534
|
*/
|
|
@@ -28859,6 +28915,10 @@ type CreatePhoneNumberStockWatchData = {
|
|
|
28859
28915
|
* Narrow the watch to one number type. Omit to be notified when any type in the country is back.
|
|
28860
28916
|
*/
|
|
28861
28917
|
numberType?: 'local' | 'mobile' | 'national' | 'toll_free';
|
|
28918
|
+
/**
|
|
28919
|
+
* Narrow the watch to one area code (NDC). Requires numberType.
|
|
28920
|
+
*/
|
|
28921
|
+
areaCode?: string;
|
|
28862
28922
|
};
|
|
28863
28923
|
};
|
|
28864
28924
|
type CreatePhoneNumberStockWatchResponse = (PhoneNumberStockWatch);
|
package/dist/index.d.ts
CHANGED
|
@@ -7444,6 +7444,10 @@ type PhoneNumberStockWatch = {
|
|
|
7444
7444
|
* The watched number type, or null when the watch covers every type in the country.
|
|
7445
7445
|
*/
|
|
7446
7446
|
numberType: ('local' | 'mobile' | 'national' | 'toll_free') | null;
|
|
7447
|
+
/**
|
|
7448
|
+
* The watched area code (NDC), or null when the watch covers every area.
|
|
7449
|
+
*/
|
|
7450
|
+
areaCode?: (string) | null;
|
|
7447
7451
|
createdAt: string;
|
|
7448
7452
|
};
|
|
7449
7453
|
/**
|
|
@@ -11281,6 +11285,14 @@ type WebhookPayloadPhoneNumberStockAvailable = {
|
|
|
11281
11285
|
*/
|
|
11282
11286
|
availableCount: number;
|
|
11283
11287
|
}>;
|
|
11288
|
+
/**
|
|
11289
|
+
* Set when the watch named an area: the area code (NDC) that is back in stock.
|
|
11290
|
+
*/
|
|
11291
|
+
areaCode?: string;
|
|
11292
|
+
/**
|
|
11293
|
+
* The name of that area, when known.
|
|
11294
|
+
*/
|
|
11295
|
+
areaName?: string;
|
|
11284
11296
|
};
|
|
11285
11297
|
/**
|
|
11286
11298
|
* UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
|
|
@@ -27323,6 +27335,24 @@ type CheckPhoneNumberAvailabilityResponse = ({
|
|
|
27323
27335
|
*/
|
|
27324
27336
|
count?: number;
|
|
27325
27337
|
}>;
|
|
27338
|
+
/**
|
|
27339
|
+
* Areas that had stock in the last 90 days and have none now. Pass one as `areaCode` with `preOrder: true` on the KYC submit when `preOrderable` is true, or watch it with POST /v1/phone-numbers/stock-watches.
|
|
27340
|
+
*
|
|
27341
|
+
*/
|
|
27342
|
+
soldOutAreas?: Array<{
|
|
27343
|
+
/**
|
|
27344
|
+
* Area code (national destination code).
|
|
27345
|
+
*/
|
|
27346
|
+
ndc?: string;
|
|
27347
|
+
/**
|
|
27348
|
+
* Area name.
|
|
27349
|
+
*/
|
|
27350
|
+
name?: string;
|
|
27351
|
+
/**
|
|
27352
|
+
* Whether this area can be pre-ordered: the carrier sources a number in it (usually 2 to 4 weeks, never guaranteed).
|
|
27353
|
+
*/
|
|
27354
|
+
preOrderable?: boolean;
|
|
27355
|
+
}>;
|
|
27326
27356
|
});
|
|
27327
27357
|
type CheckPhoneNumberAvailabilityError = (unknown | {
|
|
27328
27358
|
error?: string;
|
|
@@ -27598,6 +27628,24 @@ type CheckWhatsAppNumberAvailabilityResponse = ({
|
|
|
27598
27628
|
*/
|
|
27599
27629
|
count?: number;
|
|
27600
27630
|
}>;
|
|
27631
|
+
/**
|
|
27632
|
+
* Areas that had stock in the last 90 days and have none now. Pass one as `areaCode` with `preOrder: true` on the KYC submit when `preOrderable` is true, or watch it with POST /v1/phone-numbers/stock-watches.
|
|
27633
|
+
*
|
|
27634
|
+
*/
|
|
27635
|
+
soldOutAreas?: Array<{
|
|
27636
|
+
/**
|
|
27637
|
+
* Area code (national destination code).
|
|
27638
|
+
*/
|
|
27639
|
+
ndc?: string;
|
|
27640
|
+
/**
|
|
27641
|
+
* Area name.
|
|
27642
|
+
*/
|
|
27643
|
+
name?: string;
|
|
27644
|
+
/**
|
|
27645
|
+
* Whether this area can be pre-ordered: the carrier sources a number in it (usually 2 to 4 weeks, never guaranteed).
|
|
27646
|
+
*/
|
|
27647
|
+
preOrderable?: boolean;
|
|
27648
|
+
}>;
|
|
27601
27649
|
});
|
|
27602
27650
|
type CheckWhatsAppNumberAvailabilityError = (unknown | {
|
|
27603
27651
|
error?: string;
|
|
@@ -27709,6 +27757,10 @@ type SubmitPhoneNumberKycData = {
|
|
|
27709
27757
|
* Area code (NDC) the number must be in. Hard constraint: an empty area pool fails with 409 code AREA_CODE_UNAVAILABLE instead of ordering from another area. Omit for any area. Options come from GET /v1/phone-numbers/availability (areaOptions); the purchase 202 kycUrl echoes the areaCode picked at purchase time so it can be passed here.
|
|
27710
27758
|
*/
|
|
27711
27759
|
areaCode?: string;
|
|
27760
|
+
/**
|
|
27761
|
+
* With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area.
|
|
27762
|
+
*/
|
|
27763
|
+
preOrder?: boolean;
|
|
27712
27764
|
/**
|
|
27713
27765
|
* End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
|
|
27714
27766
|
*/
|
|
@@ -28473,6 +28525,10 @@ type SubmitWhatsAppNumberKycData = {
|
|
|
28473
28525
|
* Area code (NDC) the number must be in. Hard constraint: an empty area pool fails with 409 code AREA_CODE_UNAVAILABLE instead of ordering from another area. Omit for any area. Options come from GET /v1/phone-numbers/availability (areaOptions); the purchase 202 kycUrl echoes the areaCode picked at purchase time so it can be passed here.
|
|
28474
28526
|
*/
|
|
28475
28527
|
areaCode?: string;
|
|
28528
|
+
/**
|
|
28529
|
+
* With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area.
|
|
28530
|
+
*/
|
|
28531
|
+
preOrder?: boolean;
|
|
28476
28532
|
/**
|
|
28477
28533
|
* End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
|
|
28478
28534
|
*/
|
|
@@ -28859,6 +28915,10 @@ type CreatePhoneNumberStockWatchData = {
|
|
|
28859
28915
|
* Narrow the watch to one number type. Omit to be notified when any type in the country is back.
|
|
28860
28916
|
*/
|
|
28861
28917
|
numberType?: 'local' | 'mobile' | 'national' | 'toll_free';
|
|
28918
|
+
/**
|
|
28919
|
+
* Narrow the watch to one area code (NDC). Requires numberType.
|
|
28920
|
+
*/
|
|
28921
|
+
areaCode?: string;
|
|
28862
28922
|
};
|
|
28863
28923
|
};
|
|
28864
28924
|
type CreatePhoneNumberStockWatchResponse = (PhoneNumberStockWatch);
|
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.786",
|
|
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.786",
|
|
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
|
@@ -6642,6 +6642,11 @@ export const disableVoiceOnNumber = <ThrowOnError extends boolean = false>(optio
|
|
|
6642
6642
|
* `preOrderable: true` does not need a watch: submit KYC and the carrier
|
|
6643
6643
|
* sources the number to order.
|
|
6644
6644
|
*
|
|
6645
|
+
* Pass `areaCode` (with `numberType`) to watch one sold-out area, for
|
|
6646
|
+
* example an entry of `soldOutAreas` from
|
|
6647
|
+
* GET /v1/phone-numbers/availability. Area stock is checked live on the
|
|
6648
|
+
* same 6h cadence.
|
|
6649
|
+
*
|
|
6645
6650
|
*/
|
|
6646
6651
|
export const createPhoneNumberStockWatch = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreatePhoneNumberStockWatchData, ThrowOnError>) => {
|
|
6647
6652
|
return (options?.client ?? client).post<CreatePhoneNumberStockWatchResponse, CreatePhoneNumberStockWatchError, ThrowOnError>({
|
|
@@ -6059,6 +6059,10 @@ export type PhoneNumberStockWatch = {
|
|
|
6059
6059
|
* The watched number type, or null when the watch covers every type in the country.
|
|
6060
6060
|
*/
|
|
6061
6061
|
numberType: ('local' | 'mobile' | 'national' | 'toll_free') | null;
|
|
6062
|
+
/**
|
|
6063
|
+
* The watched area code (NDC), or null when the watch covers every area.
|
|
6064
|
+
*/
|
|
6065
|
+
areaCode?: (string) | null;
|
|
6062
6066
|
createdAt: string;
|
|
6063
6067
|
};
|
|
6064
6068
|
|
|
@@ -10042,6 +10046,14 @@ export type WebhookPayloadPhoneNumberStockAvailable = {
|
|
|
10042
10046
|
*/
|
|
10043
10047
|
availableCount: number;
|
|
10044
10048
|
}>;
|
|
10049
|
+
/**
|
|
10050
|
+
* Set when the watch named an area: the area code (NDC) that is back in stock.
|
|
10051
|
+
*/
|
|
10052
|
+
areaCode?: string;
|
|
10053
|
+
/**
|
|
10054
|
+
* The name of that area, when known.
|
|
10055
|
+
*/
|
|
10056
|
+
areaName?: string;
|
|
10045
10057
|
};
|
|
10046
10058
|
/**
|
|
10047
10059
|
* UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
|
|
@@ -27179,6 +27191,24 @@ export type CheckPhoneNumberAvailabilityResponse = ({
|
|
|
27179
27191
|
*/
|
|
27180
27192
|
count?: number;
|
|
27181
27193
|
}>;
|
|
27194
|
+
/**
|
|
27195
|
+
* Areas that had stock in the last 90 days and have none now. Pass one as `areaCode` with `preOrder: true` on the KYC submit when `preOrderable` is true, or watch it with POST /v1/phone-numbers/stock-watches.
|
|
27196
|
+
*
|
|
27197
|
+
*/
|
|
27198
|
+
soldOutAreas?: Array<{
|
|
27199
|
+
/**
|
|
27200
|
+
* Area code (national destination code).
|
|
27201
|
+
*/
|
|
27202
|
+
ndc?: string;
|
|
27203
|
+
/**
|
|
27204
|
+
* Area name.
|
|
27205
|
+
*/
|
|
27206
|
+
name?: string;
|
|
27207
|
+
/**
|
|
27208
|
+
* Whether this area can be pre-ordered: the carrier sources a number in it (usually 2 to 4 weeks, never guaranteed).
|
|
27209
|
+
*/
|
|
27210
|
+
preOrderable?: boolean;
|
|
27211
|
+
}>;
|
|
27182
27212
|
});
|
|
27183
27213
|
|
|
27184
27214
|
export type CheckPhoneNumberAvailabilityError = (unknown | {
|
|
@@ -27468,6 +27498,24 @@ export type CheckWhatsAppNumberAvailabilityResponse = ({
|
|
|
27468
27498
|
*/
|
|
27469
27499
|
count?: number;
|
|
27470
27500
|
}>;
|
|
27501
|
+
/**
|
|
27502
|
+
* Areas that had stock in the last 90 days and have none now. Pass one as `areaCode` with `preOrder: true` on the KYC submit when `preOrderable` is true, or watch it with POST /v1/phone-numbers/stock-watches.
|
|
27503
|
+
*
|
|
27504
|
+
*/
|
|
27505
|
+
soldOutAreas?: Array<{
|
|
27506
|
+
/**
|
|
27507
|
+
* Area code (national destination code).
|
|
27508
|
+
*/
|
|
27509
|
+
ndc?: string;
|
|
27510
|
+
/**
|
|
27511
|
+
* Area name.
|
|
27512
|
+
*/
|
|
27513
|
+
name?: string;
|
|
27514
|
+
/**
|
|
27515
|
+
* Whether this area can be pre-ordered: the carrier sources a number in it (usually 2 to 4 weeks, never guaranteed).
|
|
27516
|
+
*/
|
|
27517
|
+
preOrderable?: boolean;
|
|
27518
|
+
}>;
|
|
27471
27519
|
});
|
|
27472
27520
|
|
|
27473
27521
|
export type CheckWhatsAppNumberAvailabilityError = (unknown | {
|
|
@@ -27584,6 +27632,10 @@ export type SubmitPhoneNumberKycData = {
|
|
|
27584
27632
|
* Area code (NDC) the number must be in. Hard constraint: an empty area pool fails with 409 code AREA_CODE_UNAVAILABLE instead of ordering from another area. Omit for any area. Options come from GET /v1/phone-numbers/availability (areaOptions); the purchase 202 kycUrl echoes the areaCode picked at purchase time so it can be passed here.
|
|
27585
27633
|
*/
|
|
27586
27634
|
areaCode?: string;
|
|
27635
|
+
/**
|
|
27636
|
+
* With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area.
|
|
27637
|
+
*/
|
|
27638
|
+
preOrder?: boolean;
|
|
27587
27639
|
/**
|
|
27588
27640
|
* End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
|
|
27589
27641
|
*/
|
|
@@ -28401,6 +28453,10 @@ export type SubmitWhatsAppNumberKycData = {
|
|
|
28401
28453
|
* Area code (NDC) the number must be in. Hard constraint: an empty area pool fails with 409 code AREA_CODE_UNAVAILABLE instead of ordering from another area. Omit for any area. Options come from GET /v1/phone-numbers/availability (areaOptions); the purchase 202 kycUrl echoes the areaCode picked at purchase time so it can be passed here.
|
|
28402
28454
|
*/
|
|
28403
28455
|
areaCode?: string;
|
|
28456
|
+
/**
|
|
28457
|
+
* With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area.
|
|
28458
|
+
*/
|
|
28459
|
+
preOrder?: boolean;
|
|
28404
28460
|
/**
|
|
28405
28461
|
* End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
|
|
28406
28462
|
*/
|
|
@@ -28814,6 +28870,10 @@ export type CreatePhoneNumberStockWatchData = {
|
|
|
28814
28870
|
* Narrow the watch to one number type. Omit to be notified when any type in the country is back.
|
|
28815
28871
|
*/
|
|
28816
28872
|
numberType?: 'local' | 'mobile' | 'national' | 'toll_free';
|
|
28873
|
+
/**
|
|
28874
|
+
* Narrow the watch to one area code (NDC). Requires numberType.
|
|
28875
|
+
*/
|
|
28876
|
+
areaCode?: string;
|
|
28817
28877
|
};
|
|
28818
28878
|
};
|
|
28819
28879
|
|