@konplit-services/common 1.0.21 → 1.0.24

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.
@@ -106,7 +106,7 @@ class Listener {
106
106
  console.log(`Stream '${streamName}' created`);
107
107
  }
108
108
  catch (addErr) {
109
- console.error("Error creating stream:", addErr);
109
+ console.error("Error creating stream:");
110
110
  throw addErr;
111
111
  }
112
112
  }
@@ -96,7 +96,7 @@ class Publisher {
96
96
  console.log(`Stream '${streamName}' created`);
97
97
  }
98
98
  catch (addErr) {
99
- console.error("Error creating stream:", addErr);
99
+ console.error("Error creating stream:");
100
100
  throw addErr;
101
101
  }
102
102
  }
@@ -43,6 +43,10 @@ export declare const error_codes: {
43
43
  error_code: string;
44
44
  code: number;
45
45
  };
46
+ ACCOUNT_NOT_FOUND: {
47
+ error_code: string;
48
+ code: number;
49
+ };
46
50
  ACCOUNT_BLOCKED: {
47
51
  error_code: string;
48
52
  code: number;
@@ -48,9 +48,13 @@ exports.error_codes = {
48
48
  code: 310003,
49
49
  },
50
50
  // ACCOUNT BLOCKED
51
+ ACCOUNT_NOT_FOUND: {
52
+ error_code: "ACCOUNT_NOT_FOUND",
53
+ code: 320000,
54
+ },
51
55
  ACCOUNT_BLOCKED: {
52
56
  error_code: "ACCOUNT_BLOCKED",
53
- code: 320000,
57
+ code: 320001,
54
58
  },
55
59
  EMAIL_NOT_VERIFIED: "EMAIL_NOT_VERIFIED",
56
60
  EMAIL_ALREADY_EXIST: "EMAIL_ALREADY_EXIST",
@@ -3,13 +3,15 @@ export declare const lang: {
3
3
  user_not_found: string;
4
4
  invalid_user: string;
5
5
  user_exist: string;
6
- user_blocked: string;
7
- account_bloced: string;
8
6
  invalid_key: string;
9
7
  invalid_code: string;
10
8
  server_error: string;
11
9
  not_authorized: string;
12
10
  forbidden: string;
11
+ account_blocked: string;
12
+ account_not_found: string;
13
+ permission_not_found: string;
14
+ user_blocked: string;
13
15
  is_suspended: string;
14
16
  change_password: string;
15
17
  invalid_input: string;
@@ -7,8 +7,6 @@ exports.lang = {
7
7
  user_not_found: "user not found",
8
8
  invalid_user: "invalid email or password",
9
9
  user_exist: "user already exists",
10
- user_blocked: "user is blocked",
11
- account_bloced: "This account is blocked",
12
10
  invalid_key: "invalid key",
13
11
  invalid_code: "invalid code",
14
12
  // SERVICE DOWN
@@ -16,6 +14,10 @@ exports.lang = {
16
14
  //Authorization
17
15
  not_authorized: "you are not authorized. authenticate and try again",
18
16
  forbidden: "You don't have permission to access this resource",
17
+ account_blocked: "This account has been blocked",
18
+ account_not_found: "Account not found",
19
+ permission_not_found: "permssion not found",
20
+ user_blocked: "this user has been blocked",
19
21
  // account_already_verified:"account already verified",
20
22
  // account_not_verified:"account not verified",
21
23
  is_suspended: "account is suspended",
@@ -13,3 +13,20 @@ export declare enum Roles {
13
13
  MODERATOR = "MODERATOR",
14
14
  ADMIN_SPECIAL = "ADMIN_SPECIAL"
15
15
  }
16
+ export declare enum AdminRoles {
17
+ SUPER_ADMIN = "SUPER_ADMIN",
18
+ ADMIN = "ADMIN",
19
+ FINANCE = "FINANCE",
20
+ ADMIN_CUSTOMER_SERVICE = "ADMIN_CUSTOMER_SERVICE",
21
+ ADMIN_DEVELOPER = "ADMIN_DEVELOPER",
22
+ ADMIN_COMPLIANCE = "ADMIN_COMPLIANCE",
23
+ MODERATOR = "MODERATOR",
24
+ ADMIN_SPECIAL = "ADMIN_SPECIAL"
25
+ }
26
+ export declare enum MerchantRoles {
27
+ MERCHANT_OWNER = "MERCHANT_OWNER",
28
+ MERCHANT_ADMIN = "MERCHANT_ADMIN",
29
+ MERCHANT_CUSTOMER_SERVICE = "MERCHANT_CUSTOMER_SERVICE",
30
+ MERCHANT_SPECIAL = "MERCHANT_SPECIAL",
31
+ MERCHANT_DEVELOPER = "MERCHANT_DEVELOPER"
32
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Roles = void 0;
3
+ exports.MerchantRoles = exports.AdminRoles = exports.Roles = void 0;
4
4
  var Roles;
5
5
  (function (Roles) {
6
6
  Roles["MERCHANT_OWNER"] = "MERCHANT_OWNER";
@@ -17,3 +17,22 @@ var Roles;
17
17
  Roles["MODERATOR"] = "MODERATOR";
18
18
  Roles["ADMIN_SPECIAL"] = "ADMIN_SPECIAL";
19
19
  })(Roles = exports.Roles || (exports.Roles = {}));
20
+ var AdminRoles;
21
+ (function (AdminRoles) {
22
+ AdminRoles["SUPER_ADMIN"] = "SUPER_ADMIN";
23
+ AdminRoles["ADMIN"] = "ADMIN";
24
+ AdminRoles["FINANCE"] = "FINANCE";
25
+ AdminRoles["ADMIN_CUSTOMER_SERVICE"] = "ADMIN_CUSTOMER_SERVICE";
26
+ AdminRoles["ADMIN_DEVELOPER"] = "ADMIN_DEVELOPER";
27
+ AdminRoles["ADMIN_COMPLIANCE"] = "ADMIN_COMPLIANCE";
28
+ AdminRoles["MODERATOR"] = "MODERATOR";
29
+ AdminRoles["ADMIN_SPECIAL"] = "ADMIN_SPECIAL";
30
+ })(AdminRoles = exports.AdminRoles || (exports.AdminRoles = {}));
31
+ var MerchantRoles;
32
+ (function (MerchantRoles) {
33
+ MerchantRoles["MERCHANT_OWNER"] = "MERCHANT_OWNER";
34
+ MerchantRoles["MERCHANT_ADMIN"] = "MERCHANT_ADMIN";
35
+ MerchantRoles["MERCHANT_CUSTOMER_SERVICE"] = "MERCHANT_CUSTOMER_SERVICE";
36
+ MerchantRoles["MERCHANT_SPECIAL"] = "MERCHANT_SPECIAL";
37
+ MerchantRoles["MERCHANT_DEVELOPER"] = "MERCHANT_DEVELOPER";
38
+ })(MerchantRoles = exports.MerchantRoles || (exports.MerchantRoles = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.21",
3
+ "version": "1.0.24",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",