@zernio/node 0.2.1003 → 0.2.1004

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 CHANGED
@@ -12472,7 +12472,7 @@ type ValueRuleSet = {
12472
12472
  type Verification = {
12473
12473
  id?: string;
12474
12474
  status?: 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
12475
- channel?: 'sms';
12475
+ channel?: 'sms' | 'whatsapp';
12476
12476
  to?: string;
12477
12477
  expiresAt?: string;
12478
12478
  attempts?: number;
@@ -12489,7 +12489,7 @@ type Verification = {
12489
12489
  resend?: boolean;
12490
12490
  };
12491
12491
  type status29 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
12492
- type channel4 = 'sms';
12492
+ type channel4 = 'sms' | 'whatsapp';
12493
12493
  /**
12494
12494
  * Individual webhook configuration for receiving real-time notifications
12495
12495
  */
@@ -51741,20 +51741,17 @@ type RunCommerceCatalogSyncError = (ErrorResponse | {
51741
51741
  } | unknown);
51742
51742
  type CreateVerificationData = {
51743
51743
  body: {
51744
+ channel: 'sms' | 'whatsapp';
51744
51745
  /**
51745
- * SMS-only for now.
51746
- */
51747
- channel: 'sms';
51748
- /**
51749
- * E.164 phone number.
51746
+ * E.164 phone number. WhatsApp only delivers to a phone number, never to a username.
51750
51747
  */
51751
51748
  to: string;
51752
51749
  /**
51753
- * The SMS-enabled number on your account to send from. Defaults to your only SMS number.
51750
+ * The number on your account to send from: an SMS-enabled number for `sms`, a connected WhatsApp number for `whatsapp`. Defaults to your only number on that channel.
51754
51751
  */
51755
51752
  from?: string;
51756
51753
  /**
51757
- * Your app or business name, rendered in the message. Defaults to your account name. Letters, numbers, and basic punctuation only.
51754
+ * Your app or business name, rendered in the SMS message. Defaults to your account name. Not shown on WhatsApp, where Meta fixes the message and shows your WhatsApp display name. Letters, numbers, and basic punctuation only.
51758
51755
  */
51759
51756
  brandName?: string;
51760
51757
  codeLength?: number;
package/dist/index.d.ts CHANGED
@@ -12472,7 +12472,7 @@ type ValueRuleSet = {
12472
12472
  type Verification = {
12473
12473
  id?: string;
12474
12474
  status?: 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
12475
- channel?: 'sms';
12475
+ channel?: 'sms' | 'whatsapp';
12476
12476
  to?: string;
12477
12477
  expiresAt?: string;
12478
12478
  attempts?: number;
@@ -12489,7 +12489,7 @@ type Verification = {
12489
12489
  resend?: boolean;
12490
12490
  };
12491
12491
  type status29 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
12492
- type channel4 = 'sms';
12492
+ type channel4 = 'sms' | 'whatsapp';
12493
12493
  /**
12494
12494
  * Individual webhook configuration for receiving real-time notifications
12495
12495
  */
@@ -51741,20 +51741,17 @@ type RunCommerceCatalogSyncError = (ErrorResponse | {
51741
51741
  } | unknown);
51742
51742
  type CreateVerificationData = {
51743
51743
  body: {
51744
+ channel: 'sms' | 'whatsapp';
51744
51745
  /**
51745
- * SMS-only for now.
51746
- */
51747
- channel: 'sms';
51748
- /**
51749
- * E.164 phone number.
51746
+ * E.164 phone number. WhatsApp only delivers to a phone number, never to a username.
51750
51747
  */
51751
51748
  to: string;
51752
51749
  /**
51753
- * The SMS-enabled number on your account to send from. Defaults to your only SMS number.
51750
+ * The number on your account to send from: an SMS-enabled number for `sms`, a connected WhatsApp number for `whatsapp`. Defaults to your only number on that channel.
51754
51751
  */
51755
51752
  from?: string;
51756
51753
  /**
51757
- * Your app or business name, rendered in the message. Defaults to your account name. Letters, numbers, and basic punctuation only.
51754
+ * Your app or business name, rendered in the SMS message. Defaults to your account name. Not shown on WhatsApp, where Meta fixes the message and shows your WhatsApp display name. Letters, numbers, and basic punctuation only.
51758
51755
  */
51759
51756
  brandName?: string;
51760
51757
  codeLength?: number;
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.1003",
39
+ version: "0.2.1004",
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.1003",
8
+ version: "0.2.1004",
9
9
  description: "The official Node.js library for the Zernio API",
10
10
  main: "dist/index.js",
11
11
  module: "dist/index.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zernio/node",
3
- "version": "0.2.1003",
3
+ "version": "0.2.1004",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -15638,10 +15638,22 @@ export const runCommerceCatalogSync = <ThrowOnError extends boolean = false>(opt
15638
15638
  * one per 60 seconds (429 with `retryAfterSeconds` inside the cooldown).
15639
15639
  * The stored brandName/codeLength/ttlMinutes win on a resend.
15640
15640
  *
15641
- * Codes deliver by SMS from a phone number on your account (`from`
15642
- * optional when you own exactly one SMS-enabled number) and the message
15643
- * uses a fixed template. Each accepted send bills one verification fee
15644
- * plus the standard message rate.
15641
+ * Codes deliver from a number on your account (`from` optional when
15642
+ * you own exactly one number on the channel), always with a fixed
15643
+ * template:
15644
+ *
15645
+ * - `sms`: from an SMS-enabled number. Each accepted send bills one
15646
+ * verification fee plus the standard message rate.
15647
+ * - `whatsapp`: from a connected WhatsApp number, as a Meta
15648
+ * AUTHENTICATION template with a copy-code button. The first
15649
+ * WhatsApp verification on a WhatsApp Business Account creates the
15650
+ * `zernio_verify_code` template there and answers 422
15651
+ * `template_pending` until Meta approves it (usually minutes; retry
15652
+ * after `retryAfterSeconds`). Meta fixes the message text, so
15653
+ * `brandName` is not shown and the code's validity is not stated in
15654
+ * the message (`ttlMinutes` is still enforced). Each accepted send
15655
+ * bills one verification fee; Meta bills its authentication rate to
15656
+ * your WhatsApp Business Account.
15645
15657
  *
15646
15658
  */
15647
15659
  export const createVerification = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateVerificationData, ThrowOnError>) => {
@@ -10993,7 +10993,7 @@ export type ValueRuleSet = {
10993
10993
  export type Verification = {
10994
10994
  id?: string;
10995
10995
  status?: 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
10996
- channel?: 'sms';
10996
+ channel?: 'sms' | 'whatsapp';
10997
10997
  to?: string;
10998
10998
  expiresAt?: string;
10999
10999
  attempts?: number;
@@ -11012,7 +11012,7 @@ export type Verification = {
11012
11012
 
11013
11013
  export type status29 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
11014
11014
 
11015
- export type channel4 = 'sms';
11015
+ export type channel4 = 'sms' | 'whatsapp';
11016
11016
 
11017
11017
  /**
11018
11018
  * Individual webhook configuration for receiving real-time notifications
@@ -53165,20 +53165,17 @@ export type RunCommerceCatalogSyncError = (ErrorResponse | {
53165
53165
 
53166
53166
  export type CreateVerificationData = {
53167
53167
  body: {
53168
+ channel: 'sms' | 'whatsapp';
53168
53169
  /**
53169
- * SMS-only for now.
53170
- */
53171
- channel: 'sms';
53172
- /**
53173
- * E.164 phone number.
53170
+ * E.164 phone number. WhatsApp only delivers to a phone number, never to a username.
53174
53171
  */
53175
53172
  to: string;
53176
53173
  /**
53177
- * The SMS-enabled number on your account to send from. Defaults to your only SMS number.
53174
+ * The number on your account to send from: an SMS-enabled number for `sms`, a connected WhatsApp number for `whatsapp`. Defaults to your only number on that channel.
53178
53175
  */
53179
53176
  from?: string;
53180
53177
  /**
53181
- * Your app or business name, rendered in the message. Defaults to your account name. Letters, numbers, and basic punctuation only.
53178
+ * Your app or business name, rendered in the SMS message. Defaults to your account name. Not shown on WhatsApp, where Meta fixes the message and shows your WhatsApp display name. Letters, numbers, and basic punctuation only.
53182
53179
  */
53183
53180
  brandName?: string;
53184
53181
  codeLength?: number;