@chopkola/common 1.0.29 → 1.0.30

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,4 +1,4 @@
1
- export declare enum UserRoleEnum {
1
+ export declare enum UserAccountTypeEnum {
2
2
  CUSTOMER = "customer",
3
3
  VENDOR = "vendor",
4
4
  ADMINISTRATOR = "administrator"
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BusinessTypeEnum = exports.DietryPreferencesEnum = exports.UserGenderEnum = exports.AdministratorRoleEnum = exports.UserRoleEnum = void 0;
4
- var UserRoleEnum;
5
- (function (UserRoleEnum) {
6
- UserRoleEnum["CUSTOMER"] = "customer";
7
- UserRoleEnum["VENDOR"] = "vendor";
8
- UserRoleEnum["ADMINISTRATOR"] = "administrator";
9
- })(UserRoleEnum = exports.UserRoleEnum || (exports.UserRoleEnum = {}));
3
+ exports.BusinessTypeEnum = exports.DietryPreferencesEnum = exports.UserGenderEnum = exports.AdministratorRoleEnum = exports.UserAccountTypeEnum = void 0;
4
+ var UserAccountTypeEnum;
5
+ (function (UserAccountTypeEnum) {
6
+ UserAccountTypeEnum["CUSTOMER"] = "customer";
7
+ UserAccountTypeEnum["VENDOR"] = "vendor";
8
+ UserAccountTypeEnum["ADMINISTRATOR"] = "administrator";
9
+ })(UserAccountTypeEnum = exports.UserAccountTypeEnum || (exports.UserAccountTypeEnum = {}));
10
10
  var AdministratorRoleEnum;
11
11
  (function (AdministratorRoleEnum) {
12
12
  AdministratorRoleEnum["SUPER_ADMINISTRATOR"] = "super_administrator";
@@ -1,5 +1,5 @@
1
1
  import { StatusEnum } from "./enum/global";
2
- import { BusinessTypeEnum, UserGenderEnum, UserRoleEnum } from "./enum/user";
2
+ import { BusinessTypeEnum, UserGenderEnum, UserAccountTypeEnum } from "./enum/user";
3
3
  export interface PermissionI {
4
4
  id: string;
5
5
  resource: string;
@@ -24,7 +24,7 @@ export interface UserI {
24
24
  email: string;
25
25
  password?: string;
26
26
  phone_number: string;
27
- account_type: UserRoleEnum;
27
+ account_type: UserAccountTypeEnum;
28
28
  gender: UserGenderEnum;
29
29
  otp: string;
30
30
  otp_for: string;
@@ -24,14 +24,14 @@ const checkIsEmailOrPhoneValid = (account_ref) => {
24
24
  };
25
25
  exports.checkIsEmailOrPhoneValid = checkIsEmailOrPhoneValid;
26
26
  const handleAdministratorValidation = (user) => {
27
- return user.account_type === user_1.UserRoleEnum.ADMINISTRATOR;
27
+ return user.account_type === user_1.UserAccountTypeEnum.ADMINISTRATOR;
28
28
  };
29
29
  exports.handleAdministratorValidation = handleAdministratorValidation;
30
30
  const handleVendorValidation = (user) => {
31
- return user.account_type === user_1.UserRoleEnum.ADMINISTRATOR;
31
+ return user.account_type === user_1.UserAccountTypeEnum.ADMINISTRATOR;
32
32
  };
33
33
  exports.handleVendorValidation = handleVendorValidation;
34
34
  const handleCustomerValidation = (user) => {
35
- return user.account_type === user_1.UserRoleEnum.ADMINISTRATOR;
35
+ return user.account_type === user_1.UserAccountTypeEnum.ADMINISTRATOR;
36
36
  };
37
37
  exports.handleCustomerValidation = handleCustomerValidation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chopkola/common",
3
- "version": "1.0.29",
3
+ "version": "1.0.30",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "akrosoft technology ltd",