sea-platform-helpers 1.0.0

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.
Files changed (87) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/constants/account/index.d.ts +3 -0
  4. package/dist/constants/account/index.d.ts.map +1 -0
  5. package/dist/constants/account/index.js +10 -0
  6. package/dist/constants/application/index.d.ts +16 -0
  7. package/dist/constants/application/index.d.ts.map +1 -0
  8. package/dist/constants/application/index.js +28 -0
  9. package/dist/constants/index.d.ts +6 -0
  10. package/dist/constants/index.d.ts.map +1 -0
  11. package/dist/constants/index.js +41 -0
  12. package/dist/constants/otp/index.d.ts +3 -0
  13. package/dist/constants/otp/index.d.ts.map +1 -0
  14. package/dist/constants/otp/index.js +5 -0
  15. package/dist/constants/permission/index.d.ts +45 -0
  16. package/dist/constants/permission/index.d.ts.map +1 -0
  17. package/dist/constants/permission/index.js +306 -0
  18. package/dist/constants/server/index.d.ts +7 -0
  19. package/dist/constants/server/index.d.ts.map +1 -0
  20. package/dist/constants/server/index.js +10 -0
  21. package/dist/dto/account/index.d.ts +27 -0
  22. package/dist/dto/account/index.d.ts.map +1 -0
  23. package/dist/dto/account/index.js +2 -0
  24. package/dist/dto/application/index.d.ts +16 -0
  25. package/dist/dto/application/index.d.ts.map +1 -0
  26. package/dist/dto/application/index.js +2 -0
  27. package/dist/dto/application copy/index.d.ts +15 -0
  28. package/dist/dto/application copy/index.d.ts.map +1 -0
  29. package/dist/dto/application copy/index.js +2 -0
  30. package/dist/dto/department/index.d.ts +12 -0
  31. package/dist/dto/department/index.d.ts.map +1 -0
  32. package/dist/dto/department/index.js +2 -0
  33. package/dist/dto/file/index.d.ts +8 -0
  34. package/dist/dto/file/index.d.ts.map +1 -0
  35. package/dist/dto/file/index.js +2 -0
  36. package/dist/dto/global/index.d.ts +8 -0
  37. package/dist/dto/global/index.d.ts.map +1 -0
  38. package/dist/dto/global/index.js +2 -0
  39. package/dist/dto/index.d.ts +9 -0
  40. package/dist/dto/index.d.ts.map +1 -0
  41. package/dist/dto/index.js +44 -0
  42. package/dist/dto/organization/index.d.ts +10 -0
  43. package/dist/dto/organization/index.d.ts.map +1 -0
  44. package/dist/dto/organization/index.js +2 -0
  45. package/dist/dto/organization copy/index.d.ts +9 -0
  46. package/dist/dto/organization copy/index.d.ts.map +1 -0
  47. package/dist/dto/organization copy/index.js +2 -0
  48. package/dist/dto/permission/index.d.ts +10 -0
  49. package/dist/dto/permission/index.d.ts.map +1 -0
  50. package/dist/dto/permission/index.js +2 -0
  51. package/dist/dto/request/index.d.ts +11 -0
  52. package/dist/dto/request/index.d.ts.map +1 -0
  53. package/dist/dto/request/index.js +6 -0
  54. package/dist/dto/role/index.d.ts +23 -0
  55. package/dist/dto/role/index.d.ts.map +1 -0
  56. package/dist/dto/role/index.js +2 -0
  57. package/dist/index.d.ts +4 -0
  58. package/dist/index.d.ts.map +1 -0
  59. package/dist/index.js +42 -0
  60. package/dist/utils/array/index.d.ts +4 -0
  61. package/dist/utils/array/index.d.ts.map +1 -0
  62. package/dist/utils/array/index.js +28 -0
  63. package/dist/utils/bcrypt/index.d.ts +3 -0
  64. package/dist/utils/bcrypt/index.d.ts.map +1 -0
  65. package/dist/utils/bcrypt/index.js +53 -0
  66. package/dist/utils/dfs/index.d.ts +4 -0
  67. package/dist/utils/dfs/index.d.ts.map +1 -0
  68. package/dist/utils/dfs/index.js +53 -0
  69. package/dist/utils/index.d.ts +8 -0
  70. package/dist/utils/index.d.ts.map +1 -0
  71. package/dist/utils/index.js +44 -0
  72. package/dist/utils/moment/index.d.ts +9 -0
  73. package/dist/utils/moment/index.d.ts.map +1 -0
  74. package/dist/utils/moment/index.js +39 -0
  75. package/dist/utils/numbers/index.d.ts +3 -0
  76. package/dist/utils/numbers/index.d.ts.map +1 -0
  77. package/dist/utils/numbers/index.js +38 -0
  78. package/dist/utils/phone-number/index.d.ts +2 -0
  79. package/dist/utils/phone-number/index.d.ts.map +1 -0
  80. package/dist/utils/phone-number/index.js +9 -0
  81. package/dist/utils/string/index.d.ts +7 -0
  82. package/dist/utils/string/index.d.ts.map +1 -0
  83. package/dist/utils/string/index.js +29 -0
  84. package/dist/utils/tree/index.d.ts +6 -0
  85. package/dist/utils/tree/index.d.ts.map +1 -0
  86. package/dist/utils/tree/index.js +69 -0
  87. package/package.json +36 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Mohammed Masri
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # sea-platform-helpers
@@ -0,0 +1,3 @@
1
+ export declare enum One {
2
+ }
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/account/index.ts"],"names":[],"mappings":"AAKA,oBAAY,GAAG;CAAG"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ // export enum AccountTypes {
3
+ // User = "User",
4
+ // Admin = "Admin",
5
+ // }
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.One = void 0;
8
+ var One;
9
+ (function (One) {
10
+ })(One || (exports.One = One = {}));
@@ -0,0 +1,16 @@
1
+ export declare enum ApplicationStatuses {
2
+ Unavailable = "Unavailable",
3
+ UnderRepair = "Under-Repair",
4
+ Available = "Available"
5
+ }
6
+ export declare enum ApplicationKeys {
7
+ PlatformAdministrationApplication = "Platform-Administration-Application",
8
+ StrategyApplication = "Strategy-Application"
9
+ }
10
+ export declare const Applications: {
11
+ name: string;
12
+ key: ApplicationKeys;
13
+ status: ApplicationStatuses;
14
+ description: string;
15
+ }[];
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/application/index.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB;IAC7B,WAAW,gBAAgB;IAC3B,WAAW,iBAAiB;IAC5B,SAAS,cAAc;CACxB;AAED,oBAAY,eAAe;IACzB,iCAAiC,wCAAwC;IACzE,mBAAmB,yBAAyB;CAC7C;AAED,eAAO,MAAM,YAAY;;;;;GAexB,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Applications = exports.ApplicationKeys = exports.ApplicationStatuses = void 0;
4
+ var ApplicationStatuses;
5
+ (function (ApplicationStatuses) {
6
+ ApplicationStatuses["Unavailable"] = "Unavailable";
7
+ ApplicationStatuses["UnderRepair"] = "Under-Repair";
8
+ ApplicationStatuses["Available"] = "Available";
9
+ })(ApplicationStatuses || (exports.ApplicationStatuses = ApplicationStatuses = {}));
10
+ var ApplicationKeys;
11
+ (function (ApplicationKeys) {
12
+ ApplicationKeys["PlatformAdministrationApplication"] = "Platform-Administration-Application";
13
+ ApplicationKeys["StrategyApplication"] = "Strategy-Application";
14
+ })(ApplicationKeys || (exports.ApplicationKeys = ApplicationKeys = {}));
15
+ exports.Applications = [
16
+ {
17
+ name: "Platform Administration Application",
18
+ key: ApplicationKeys.PlatformAdministrationApplication,
19
+ status: ApplicationStatuses.Available,
20
+ description: "The main application for managing the platform, including user accounts, roles, and permissions.",
21
+ },
22
+ {
23
+ name: "Strategy Application",
24
+ key: ApplicationKeys.StrategyApplication,
25
+ status: ApplicationStatuses.Unavailable,
26
+ description: "An application for managing and executing strategies within the platform.",
27
+ },
28
+ ];
@@ -0,0 +1,6 @@
1
+ export * as Permission from "./permission";
2
+ export * as Server from "./server";
3
+ export * as Account from "./account";
4
+ export * as Application from "./application";
5
+ export * as OTP from "./otp";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.OTP = exports.Application = exports.Account = exports.Server = exports.Permission = void 0;
37
+ exports.Permission = __importStar(require("./permission"));
38
+ exports.Server = __importStar(require("./server"));
39
+ exports.Account = __importStar(require("./account"));
40
+ exports.Application = __importStar(require("./application"));
41
+ exports.OTP = __importStar(require("./otp"));
@@ -0,0 +1,3 @@
1
+ export declare const OTPExpiresAfterXMinutes = 5;
2
+ export declare const NumberOfTries = 3;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/otp/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,eAAO,MAAM,aAAa,IAAI,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NumberOfTries = exports.OTPExpiresAfterXMinutes = void 0;
4
+ exports.OTPExpiresAfterXMinutes = 5;
5
+ exports.NumberOfTries = 3;
@@ -0,0 +1,45 @@
1
+ import { IPermission } from "../../dto/permission";
2
+ export type ValidationStrategy = "all" | "some" | "one";
3
+ export declare enum PermissionKeys {
4
+ PlatformAdministration = "platform-administration",
5
+ ManageAccounts = "manage-accounts",
6
+ ManageAccountsRead = "manage-accounts-read",
7
+ ManageAccountsCreate = "manage-accounts-create",
8
+ ManageAccountsChangePassword = "manage-accounts-change-password",
9
+ ManageAccountsUpdateDetails = "manage-accounts-update-details",
10
+ ManageAccountsDelete = "manage-accounts-delete",
11
+ ManageAccountsSoftDelete = "manage-accounts-soft-delete",
12
+ ManageAccountsForceDelete = "manage-accounts-force-delete",
13
+ ManageAccountsRestore = "manage-accounts-restore",
14
+ ManageRoles = "manage-roles",
15
+ ManageRolesRead = "manage-roles-read",
16
+ ManageRolesCreate = "manage-roles-create",
17
+ ManageRolesUpdateDetails = "manage-roles-update-details",
18
+ ManageRolesDelete = "manage-roles-delete",
19
+ ManageApplication = "manage-applications",
20
+ ManageApplicationRead = "manage-applications-read",
21
+ ManageApplicationUpdateDetails = "manage-applications-update-details",
22
+ ManageOrganization = "manage-organization",
23
+ ManageOrganizationCreate = "manage-organization-create",
24
+ ManageOrganizationRead = "manage-organization-read",
25
+ ManageOrganizationUpdateDetails = "manage-organization-update-details",
26
+ ManageOrganizationDelete = "manage-organization-delete",
27
+ ManageDepartment = "manage-department",
28
+ ManageDepartmentCreate = "manage-department-create",
29
+ ManageDepartmentRead = "manage-department-read",
30
+ ManageDepartmentUpdateDetails = "manage-department-update-details",
31
+ ManageDepartmentDelete = "manage-department-delete",
32
+ StrategyApp = "strategy-app",
33
+ ManageGoals = "manage-goals",
34
+ ManageGoalsCreate = "manage-goals-create",
35
+ ManageGoalsRead = "manage-goals-read",
36
+ ManageGoalsUpdateDetails = "manage-goals-update-details",
37
+ ManageGoalsDelete = "manage-goals-delete",
38
+ ManageInitiatives = "manage-initiatives",
39
+ ManageInitiativesCreate = "manage-initiatives-create",
40
+ ManageInitiativesRead = "manage-initiatives-read",
41
+ ManageInitiativesUpdateDetails = "manage-initiatives-update-details",
42
+ ManageInitiativesDelete = "manage-initiatives-delete"
43
+ }
44
+ export declare const PERMISSIONS: IPermission[];
45
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/permission/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC;AAExD,oBAAY,cAAc;IAExB,sBAAsB,4BAA4B;IAClD,cAAc,oBAAoB;IAClC,kBAAkB,yBAAyB;IAC3C,oBAAoB,2BAA2B;IAC/C,4BAA4B,oCAAoC;IAChE,2BAA2B,mCAAmC;IAC9D,oBAAoB,2BAA2B;IAC/C,wBAAwB,gCAAgC;IACxD,yBAAyB,iCAAiC;IAC1D,qBAAqB,4BAA4B;IACjD,WAAW,iBAAiB;IAC5B,eAAe,sBAAsB;IACrC,iBAAiB,wBAAwB;IACzC,wBAAwB,gCAAgC;IACxD,iBAAiB,wBAAwB;IACzC,iBAAiB,wBAAwB;IACzC,qBAAqB,6BAA6B;IAClD,8BAA8B,uCAAuC;IACrE,kBAAkB,wBAAwB;IAC1C,wBAAwB,+BAA+B;IACvD,sBAAsB,6BAA6B;IACnD,+BAA+B,uCAAuC;IACtE,wBAAwB,+BAA+B;IACvD,gBAAgB,sBAAsB;IACtC,sBAAsB,6BAA6B;IACnD,oBAAoB,2BAA2B;IAC/C,6BAA6B,qCAAqC;IAClE,sBAAsB,6BAA6B;IAGnD,WAAW,iBAAiB;IAC5B,WAAW,iBAAiB;IAC5B,iBAAiB,wBAAwB;IACzC,eAAe,sBAAsB;IACrC,wBAAwB,gCAAgC;IACxD,iBAAiB,wBAAwB;IACzC,iBAAiB,uBAAuB;IACxC,uBAAuB,8BAA8B;IACrD,qBAAqB,4BAA4B;IACjD,8BAA8B,sCAAsC;IACpE,uBAAuB,8BAA8B;CACtD;AAED,eAAO,MAAM,WAAW,EAAE,WAAW,EAoQpC,CAAC"}
@@ -0,0 +1,306 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PERMISSIONS = exports.PermissionKeys = void 0;
4
+ const application_1 = require("../application");
5
+ var PermissionKeys;
6
+ (function (PermissionKeys) {
7
+ // Admin
8
+ PermissionKeys["PlatformAdministration"] = "platform-administration";
9
+ PermissionKeys["ManageAccounts"] = "manage-accounts";
10
+ PermissionKeys["ManageAccountsRead"] = "manage-accounts-read";
11
+ PermissionKeys["ManageAccountsCreate"] = "manage-accounts-create";
12
+ PermissionKeys["ManageAccountsChangePassword"] = "manage-accounts-change-password";
13
+ PermissionKeys["ManageAccountsUpdateDetails"] = "manage-accounts-update-details";
14
+ PermissionKeys["ManageAccountsDelete"] = "manage-accounts-delete";
15
+ PermissionKeys["ManageAccountsSoftDelete"] = "manage-accounts-soft-delete";
16
+ PermissionKeys["ManageAccountsForceDelete"] = "manage-accounts-force-delete";
17
+ PermissionKeys["ManageAccountsRestore"] = "manage-accounts-restore";
18
+ PermissionKeys["ManageRoles"] = "manage-roles";
19
+ PermissionKeys["ManageRolesRead"] = "manage-roles-read";
20
+ PermissionKeys["ManageRolesCreate"] = "manage-roles-create";
21
+ PermissionKeys["ManageRolesUpdateDetails"] = "manage-roles-update-details";
22
+ PermissionKeys["ManageRolesDelete"] = "manage-roles-delete";
23
+ PermissionKeys["ManageApplication"] = "manage-applications";
24
+ PermissionKeys["ManageApplicationRead"] = "manage-applications-read";
25
+ PermissionKeys["ManageApplicationUpdateDetails"] = "manage-applications-update-details";
26
+ PermissionKeys["ManageOrganization"] = "manage-organization";
27
+ PermissionKeys["ManageOrganizationCreate"] = "manage-organization-create";
28
+ PermissionKeys["ManageOrganizationRead"] = "manage-organization-read";
29
+ PermissionKeys["ManageOrganizationUpdateDetails"] = "manage-organization-update-details";
30
+ PermissionKeys["ManageOrganizationDelete"] = "manage-organization-delete";
31
+ PermissionKeys["ManageDepartment"] = "manage-department";
32
+ PermissionKeys["ManageDepartmentCreate"] = "manage-department-create";
33
+ PermissionKeys["ManageDepartmentRead"] = "manage-department-read";
34
+ PermissionKeys["ManageDepartmentUpdateDetails"] = "manage-department-update-details";
35
+ PermissionKeys["ManageDepartmentDelete"] = "manage-department-delete";
36
+ // User
37
+ PermissionKeys["StrategyApp"] = "strategy-app";
38
+ PermissionKeys["ManageGoals"] = "manage-goals";
39
+ PermissionKeys["ManageGoalsCreate"] = "manage-goals-create";
40
+ PermissionKeys["ManageGoalsRead"] = "manage-goals-read";
41
+ PermissionKeys["ManageGoalsUpdateDetails"] = "manage-goals-update-details";
42
+ PermissionKeys["ManageGoalsDelete"] = "manage-goals-delete";
43
+ PermissionKeys["ManageInitiatives"] = "manage-initiatives";
44
+ PermissionKeys["ManageInitiativesCreate"] = "manage-initiatives-create";
45
+ PermissionKeys["ManageInitiativesRead"] = "manage-initiatives-read";
46
+ PermissionKeys["ManageInitiativesUpdateDetails"] = "manage-initiatives-update-details";
47
+ PermissionKeys["ManageInitiativesDelete"] = "manage-initiatives-delete";
48
+ })(PermissionKeys || (exports.PermissionKeys = PermissionKeys = {}));
49
+ exports.PERMISSIONS = [
50
+ // Administration Application
51
+ {
52
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
53
+ key: PermissionKeys.PlatformAdministration,
54
+ name: "Platform Administration",
55
+ isLeaf: false,
56
+ children: [
57
+ {
58
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
59
+ key: PermissionKeys.ManageOrganization,
60
+ name: "Manage Organization",
61
+ isLeaf: false,
62
+ children: [
63
+ {
64
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
65
+ key: PermissionKeys.ManageOrganizationCreate,
66
+ name: "Create Organization",
67
+ isLeaf: true,
68
+ },
69
+ {
70
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
71
+ key: PermissionKeys.ManageOrganizationRead,
72
+ name: "Read Organization",
73
+ isLeaf: true,
74
+ },
75
+ {
76
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
77
+ key: PermissionKeys.ManageOrganizationUpdateDetails,
78
+ name: "Update Organization Details",
79
+ isLeaf: true,
80
+ },
81
+ {
82
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
83
+ key: PermissionKeys.ManageOrganizationDelete,
84
+ name: "Delete Organization",
85
+ isLeaf: true,
86
+ },
87
+ ],
88
+ },
89
+ {
90
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
91
+ key: PermissionKeys.ManageDepartment,
92
+ name: "Manage Department",
93
+ isLeaf: false,
94
+ children: [
95
+ {
96
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
97
+ key: PermissionKeys.ManageDepartmentCreate,
98
+ name: "Create Department",
99
+ isLeaf: true,
100
+ },
101
+ {
102
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
103
+ key: PermissionKeys.ManageDepartmentRead,
104
+ name: "Read Department",
105
+ isLeaf: true,
106
+ },
107
+ {
108
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
109
+ key: PermissionKeys.ManageDepartmentUpdateDetails,
110
+ name: "Update Department Details",
111
+ isLeaf: true,
112
+ },
113
+ {
114
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
115
+ key: PermissionKeys.ManageDepartmentDelete,
116
+ name: "Delete Department",
117
+ isLeaf: true,
118
+ },
119
+ ],
120
+ },
121
+ {
122
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
123
+ key: PermissionKeys.ManageAccounts,
124
+ name: "Manage Account",
125
+ isLeaf: false,
126
+ children: [
127
+ {
128
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
129
+ key: PermissionKeys.ManageAccountsRead,
130
+ name: "Read Accounts",
131
+ isLeaf: true,
132
+ },
133
+ {
134
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
135
+ key: PermissionKeys.ManageAccountsCreate,
136
+ name: "Create Account",
137
+ isLeaf: true,
138
+ },
139
+ {
140
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
141
+ key: PermissionKeys.ManageAccountsUpdateDetails,
142
+ name: "Update Account Details",
143
+ isLeaf: true,
144
+ },
145
+ {
146
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
147
+ key: PermissionKeys.ManageAccountsChangePassword,
148
+ name: "Change Account Password",
149
+ isLeaf: true,
150
+ },
151
+ {
152
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
153
+ key: PermissionKeys.ManageAccountsDelete,
154
+ name: "Delete Account",
155
+ isLeaf: false,
156
+ children: [
157
+ {
158
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
159
+ key: PermissionKeys.ManageAccountsSoftDelete,
160
+ name: "Soft Delete Account",
161
+ isLeaf: true,
162
+ },
163
+ {
164
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
165
+ key: PermissionKeys.ManageAccountsForceDelete,
166
+ name: "Force Delete Account",
167
+ isLeaf: true,
168
+ },
169
+ ],
170
+ },
171
+ {
172
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
173
+ key: PermissionKeys.ManageAccountsRestore,
174
+ name: "Restore Account",
175
+ isLeaf: true,
176
+ },
177
+ ],
178
+ },
179
+ {
180
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
181
+ key: PermissionKeys.ManageRoles,
182
+ name: "Manage Roles",
183
+ isLeaf: false,
184
+ children: [
185
+ {
186
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
187
+ key: PermissionKeys.ManageRolesRead,
188
+ name: "Read Roles",
189
+ isLeaf: true,
190
+ },
191
+ {
192
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
193
+ key: PermissionKeys.ManageRolesCreate,
194
+ name: "Create Roles",
195
+ isLeaf: true,
196
+ },
197
+ {
198
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
199
+ key: PermissionKeys.ManageRolesUpdateDetails,
200
+ name: "Update Role Details",
201
+ isLeaf: true,
202
+ },
203
+ {
204
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
205
+ key: PermissionKeys.ManageRolesDelete,
206
+ name: "Delete Role",
207
+ isLeaf: true,
208
+ },
209
+ ],
210
+ },
211
+ {
212
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
213
+ key: PermissionKeys.ManageApplication,
214
+ name: "Manage Applications",
215
+ isLeaf: false,
216
+ children: [
217
+ {
218
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
219
+ key: PermissionKeys.ManageApplicationRead,
220
+ name: "Read Applications",
221
+ isLeaf: true,
222
+ },
223
+ {
224
+ applicationKey: application_1.ApplicationKeys.PlatformAdministrationApplication,
225
+ key: PermissionKeys.ManageApplicationUpdateDetails,
226
+ name: "Update Application Details",
227
+ isLeaf: true,
228
+ },
229
+ ],
230
+ },
231
+ ],
232
+ },
233
+ // Strategy Application
234
+ {
235
+ applicationKey: application_1.ApplicationKeys.StrategyApplication,
236
+ key: PermissionKeys.StrategyApp,
237
+ name: "Strategy",
238
+ isLeaf: false,
239
+ children: [
240
+ {
241
+ applicationKey: application_1.ApplicationKeys.StrategyApplication,
242
+ key: PermissionKeys.ManageGoals,
243
+ name: "Manage Goals",
244
+ isLeaf: false,
245
+ children: [
246
+ {
247
+ applicationKey: application_1.ApplicationKeys.StrategyApplication,
248
+ key: PermissionKeys.ManageGoalsCreate,
249
+ name: "Create Goal",
250
+ isLeaf: true,
251
+ },
252
+ {
253
+ applicationKey: application_1.ApplicationKeys.StrategyApplication,
254
+ key: PermissionKeys.ManageGoalsRead,
255
+ name: "Read Goals",
256
+ isLeaf: true,
257
+ },
258
+ {
259
+ applicationKey: application_1.ApplicationKeys.StrategyApplication,
260
+ key: PermissionKeys.ManageGoalsUpdateDetails,
261
+ name: "Update Goal Details",
262
+ isLeaf: true,
263
+ },
264
+ {
265
+ applicationKey: application_1.ApplicationKeys.StrategyApplication,
266
+ key: PermissionKeys.ManageGoalsDelete,
267
+ name: "Delete Goal",
268
+ isLeaf: true,
269
+ },
270
+ ],
271
+ },
272
+ {
273
+ applicationKey: application_1.ApplicationKeys.StrategyApplication,
274
+ key: PermissionKeys.ManageInitiatives,
275
+ name: "Manage Initiatives",
276
+ isLeaf: false,
277
+ children: [
278
+ {
279
+ applicationKey: application_1.ApplicationKeys.StrategyApplication,
280
+ key: PermissionKeys.ManageInitiativesCreate,
281
+ name: "Create Initiative",
282
+ isLeaf: true,
283
+ },
284
+ {
285
+ applicationKey: application_1.ApplicationKeys.StrategyApplication,
286
+ key: PermissionKeys.ManageInitiativesRead,
287
+ name: "Read Initiatives",
288
+ isLeaf: true,
289
+ },
290
+ {
291
+ applicationKey: application_1.ApplicationKeys.StrategyApplication,
292
+ key: PermissionKeys.ManageInitiativesUpdateDetails,
293
+ name: "Update Initiative Details",
294
+ isLeaf: true,
295
+ },
296
+ {
297
+ applicationKey: application_1.ApplicationKeys.StrategyApplication,
298
+ key: PermissionKeys.ManageInitiativesDelete,
299
+ name: "Delete Initiative",
300
+ isLeaf: true,
301
+ },
302
+ ],
303
+ },
304
+ ],
305
+ },
306
+ ];
@@ -0,0 +1,7 @@
1
+ export declare enum Environments {
2
+ Development = "development",
3
+ Testing = "testing",
4
+ Staging = "staging",
5
+ Production = "production"
6
+ }
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/server/index.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,UAAU,eAAe;CAC1B"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Environments = void 0;
4
+ var Environments;
5
+ (function (Environments) {
6
+ Environments["Development"] = "development";
7
+ Environments["Testing"] = "testing";
8
+ Environments["Staging"] = "staging";
9
+ Environments["Production"] = "production";
10
+ })(Environments || (exports.Environments = Environments = {}));
@@ -0,0 +1,27 @@
1
+ import { ApplicationKeys } from "../../constants/application";
2
+ import { PermissionKeys } from "../../constants/permission";
3
+ import { IDepartment } from "../department";
4
+ import { IArrayDataResponse } from "../global";
5
+ import { IOrganization } from "../organization";
6
+ import { IRoleShort } from "../role";
7
+ export interface IAccount {
8
+ id: string;
9
+ name: string;
10
+ email: string;
11
+ phoneNumber: string;
12
+ birthDate: string;
13
+ isLocked: boolean;
14
+ roles: IRoleShort[];
15
+ organization: IOrganization | undefined;
16
+ department: IDepartment | undefined;
17
+ permissionKeys: PermissionKeys[] | undefined;
18
+ applicationKeys: ApplicationKeys[] | undefined;
19
+ }
20
+ export interface IAccountArrayDataResponse extends IArrayDataResponse<IAccount> {
21
+ data: IAccount[];
22
+ }
23
+ export interface ILoginResponse {
24
+ accessToken: string;
25
+ account: IAccount;
26
+ }
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dto/account/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,YAAY,EAAE,aAAa,GAAG,SAAS,CAAC;IACxC,UAAU,EAAE,WAAW,GAAG,SAAS,CAAC;IACpC,cAAc,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;IAC7C,eAAe,EAAE,eAAe,EAAE,GAAG,SAAS,CAAC;CAChD;AAED,MAAM,WAAW,yBACf,SAAQ,kBAAkB,CAAC,QAAQ,CAAC;IACpC,IAAI,EAAE,QAAQ,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,QAAQ,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ import { ApplicationKeys, ApplicationStatuses } from "../../constants/application";
2
+ import { IFile } from "../file";
3
+ import { IArrayDataResponse } from "../global";
4
+ export interface IApplication {
5
+ id: string;
6
+ key: ApplicationKeys;
7
+ name: string;
8
+ description: string | undefined;
9
+ status: ApplicationStatuses;
10
+ iconFile: IFile | undefined;
11
+ URL: string;
12
+ }
13
+ export interface IApplicationArrayDataResponse extends IArrayDataResponse<IApplication> {
14
+ data: IApplication[];
15
+ }
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dto/application/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,eAAe,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,KAAK,GAAG,SAAS,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,6BACf,SAAQ,kBAAkB,CAAC,YAAY,CAAC;IACxC,IAAI,EAAE,YAAY,EAAE,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import { ApplicationStatuses } from "../../constants/application";
2
+ import { IFile } from "../file";
3
+ import { IArrayDataResponse } from "../global";
4
+ export interface IApplication {
5
+ id: string;
6
+ name: string;
7
+ description: string | undefined;
8
+ status: ApplicationStatuses;
9
+ iconFile: IFile | undefined;
10
+ URL: string;
11
+ }
12
+ export interface IApplicationArrayDataResponse extends IArrayDataResponse<IApplication> {
13
+ data: IApplication[];
14
+ }
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dto/application copy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,KAAK,GAAG,SAAS,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,6BACf,SAAQ,kBAAkB,CAAC,YAAY,CAAC;IACxC,IAAI,EAAE,YAAY,EAAE,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { IArrayDataResponse } from "../global";
2
+ import { IOrganization } from "../organization";
3
+ export interface IDepartment {
4
+ id: string;
5
+ name: string;
6
+ organization: IOrganization | undefined;
7
+ accountsCount: number;
8
+ }
9
+ export interface IDepartmentArrayDataResponse extends IArrayDataResponse<IDepartment> {
10
+ data: IDepartment[];
11
+ }
12
+ //# sourceMappingURL=index.d.ts.map