@konplit-services/common 1.0.34 → 1.0.36

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.
@@ -1,3 +1,8 @@
1
1
  export declare const phoneValidation: (token: string | number) => string;
2
2
  export declare const twoFactor: (token: string | number) => string;
3
3
  export declare const transfer: (token: string | number) => string;
4
+ export declare enum SMSTYPE {
5
+ PHONE_VALIDATION = "PHONE_VALIDATION",
6
+ TWO_FACTOR_VALIDATION = "TWO_FACTOR_VALIDATION",
7
+ TRANSFER = "TRANSFER"
8
+ }
@@ -1,9 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transfer = exports.twoFactor = exports.phoneValidation = void 0;
3
+ exports.SMSTYPE = exports.transfer = exports.twoFactor = exports.phoneValidation = void 0;
4
4
  const phoneValidation = (token) => `Your OTP is ${token}. Use this code to complete your phone verification. This code is valid for 15 minutes. Do not share it with anyone.`;
5
5
  exports.phoneValidation = phoneValidation;
6
6
  const twoFactor = (token) => `Your OTP is ${token}. Use this code to complete your 2fa verification. This code is valid for 15 minutes. Do not share it with anyone.`;
7
7
  exports.twoFactor = twoFactor;
8
8
  const transfer = (token) => `Your OTP is ${token}. Use this code to complete your transfer process. This code is valid for 15 minutes. Do not share it with anyone.`;
9
9
  exports.transfer = transfer;
10
+ var SMSTYPE;
11
+ (function (SMSTYPE) {
12
+ SMSTYPE["PHONE_VALIDATION"] = "PHONE_VALIDATION";
13
+ SMSTYPE["TWO_FACTOR_VALIDATION"] = "TWO_FACTOR_VALIDATION";
14
+ SMSTYPE["TRANSFER"] = "TRANSFER";
15
+ })(SMSTYPE = exports.SMSTYPE || (exports.SMSTYPE = {}));
@@ -0,0 +1 @@
1
+ export declare const formatToNigerianNumber: (value: string) => string;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatToNigerianNumber = void 0;
4
+ const formatToNigerianNumber = (value) => {
5
+ return `234${value.substring(1)}`;
6
+ };
7
+ exports.formatToNigerianNumber = formatToNigerianNumber;
@@ -2,3 +2,4 @@ export * from "./lib/nats/nat-error-codes";
2
2
  export * from "./jwt.validation";
3
3
  export * from "./parse-query-string";
4
4
  export * from "./id";
5
+ export * from "./format-phoneNumber";
@@ -18,3 +18,4 @@ __exportStar(require("./lib/nats/nat-error-codes"), exports);
18
18
  __exportStar(require("./jwt.validation"), exports);
19
19
  __exportStar(require("./parse-query-string"), exports);
20
20
  __exportStar(require("./id"), exports);
21
+ __exportStar(require("./format-phoneNumber"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",