@konplit-services/common 1.0.33 → 1.0.35

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.
@@ -43,6 +43,22 @@ export declare const error_codes: {
43
43
  error_code: string;
44
44
  code: number;
45
45
  };
46
+ EMAIL_NOT_VERIFIED: {
47
+ error_code: string;
48
+ code: number;
49
+ };
50
+ EMAIL_ALREADY_EXIST: {
51
+ error_code: string;
52
+ code: number;
53
+ };
54
+ PHONE_NOT_VERIFIED: {
55
+ error_code: string;
56
+ code: number;
57
+ };
58
+ PHONE_ALREADY_EXIST: {
59
+ error_code: string;
60
+ code: number;
61
+ };
46
62
  ACCOUNT_NOT_FOUND: {
47
63
  error_code: string;
48
64
  code: number;
@@ -51,9 +67,6 @@ export declare const error_codes: {
51
67
  error_code: string;
52
68
  code: number;
53
69
  };
54
- EMAIL_NOT_VERIFIED: string;
55
- EMAIL_ALREADY_EXIST: string;
56
- PHONE_ALREADY_EXIST: string;
57
70
  BUSINESS_ACCOUNT_NOT_FOUND: string;
58
71
  PERMISSIONS_DENIED: string;
59
72
  INVALID_STATUS_VALUE: string;
@@ -47,6 +47,22 @@ exports.error_codes = {
47
47
  error_code: "USER_BLOCKED",
48
48
  code: 310003,
49
49
  },
50
+ EMAIL_NOT_VERIFIED: {
51
+ error_code: "EMAIL_NOT_VERIFIED",
52
+ code: 310004,
53
+ },
54
+ EMAIL_ALREADY_EXIST: {
55
+ error_code: "EMAIL_ALREADY_EXIST",
56
+ code: 310005,
57
+ },
58
+ PHONE_NOT_VERIFIED: {
59
+ error_code: "PHONE_NOT_VERIFIED",
60
+ code: 310006,
61
+ },
62
+ PHONE_ALREADY_EXIST: {
63
+ error_code: "PHONE_ALREADY_EXIST",
64
+ code: 310007,
65
+ },
50
66
  // ACCOUNT BLOCKED
51
67
  ACCOUNT_NOT_FOUND: {
52
68
  error_code: "ACCOUNT_NOT_FOUND",
@@ -56,9 +72,6 @@ exports.error_codes = {
56
72
  error_code: "ACCOUNT_BLOCKED",
57
73
  code: 320001,
58
74
  },
59
- EMAIL_NOT_VERIFIED: "EMAIL_NOT_VERIFIED",
60
- EMAIL_ALREADY_EXIST: "EMAIL_ALREADY_EXIST",
61
- PHONE_ALREADY_EXIST: "PHONE_ALREADY_EXIST",
62
75
  BUSINESS_ACCOUNT_NOT_FOUND: "BUSINESS_ACCOUNT_NOT_FOUND",
63
76
  PERMISSIONS_DENIED: "PERMISSIONS_DENIED",
64
77
  INVALID_STATUS_VALUE: "INVALID_STATUS_VALUE",
@@ -3,6 +3,8 @@ export declare const lang: {
3
3
  user_not_found: string;
4
4
  invalid_user: string;
5
5
  user_exist: string;
6
+ user_email_not_verfied: string;
7
+ user_phone_not_verfied: string;
6
8
  invalid_key: string;
7
9
  invalid_code: string;
8
10
  server_error: string;
@@ -5,8 +5,11 @@ exports.email_lang = exports.merchant_dev_lang = exports.cus_support_lang = expo
5
5
  exports.lang = {
6
6
  verify_account: "Verify account",
7
7
  user_not_found: "user not found",
8
+ //user
8
9
  invalid_user: "invalid email or password",
9
10
  user_exist: "user already exists",
11
+ user_email_not_verfied: "user email not verified",
12
+ user_phone_not_verfied: "user phone not verified",
10
13
  invalid_key: "invalid key",
11
14
  invalid_code: "invalid code",
12
15
  // SERVICE DOWN
@@ -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 = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",