identity-admin 1.28.25 → 1.28.26
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.
- package/README.md +148 -295
- package/lib/Dashboard.d.ts +14 -14
- package/lib/Dashboard.js +95 -95
- package/lib/container/helpers/HelperInversify.d.ts +6 -6
- package/lib/container/helpers/HelperInversify.js +10 -10
- package/lib/container/helpers/HelperTypes.d.ts +5 -5
- package/lib/container/helpers/HelperTypes.js +7 -7
- package/lib/container/index.d.ts +1 -1
- package/lib/container/index.js +14 -14
- package/lib/container/repositories/RepositoryInversify.d.ts +4 -4
- package/lib/container/repositories/RepositoryInversify.js +13 -13
- package/lib/container/repositories/RepositoryTypes.d.ts +4 -4
- package/lib/container/repositories/RepositoryTypes.js +6 -6
- package/lib/container/types.d.ts +8 -8
- package/lib/container/types.js +9 -9
- package/lib/controllers/ActionController.d.ts +9 -9
- package/lib/controllers/ActionController.js +141 -141
- package/lib/controllers/AdminNotificationController.d.ts +8 -8
- package/lib/controllers/AdminNotificationController.js +69 -69
- package/lib/controllers/DashboardController.d.ts +45 -45
- package/lib/controllers/DashboardController.js +827 -827
- package/lib/controllers/PermissionController.d.ts +6 -0
- package/lib/controllers/PermissionController.js +52 -0
- package/lib/controllers/ResourceController.d.ts +15 -15
- package/lib/controllers/ResourceController.js +128 -126
- package/lib/helpers/ActionsGenerator.d.ts +11 -11
- package/lib/helpers/ActionsGenerator.js +168 -168
- package/lib/helpers/AdminNotifications/AdminNotificationCreation.d.ts +54 -54
- package/lib/helpers/AdminNotifications/AdminNotificationCreation.js +66 -66
- package/lib/helpers/AdminNotifications/AdminNotificationFetcher.d.ts +63 -63
- package/lib/helpers/AdminNotifications/AdminNotificationFetcher.js +45 -45
- package/lib/helpers/FilterQueryHelper.d.ts +9 -9
- package/lib/helpers/FilterQueryHelper.js +83 -83
- package/lib/helpers/FiltersHelper.d.ts +9 -9
- package/lib/helpers/FiltersHelper.js +126 -126
- package/lib/helpers/JsonRichText/DraftRawToUniversalConverter.d.ts +3 -3
- package/lib/helpers/JsonRichText/DraftRawToUniversalConverter.js +144 -144
- package/lib/helpers/JsonRichText/IDraftRawType.d.ts +18 -18
- package/lib/helpers/JsonRichText/IDraftRawType.js +2 -2
- package/lib/helpers/JsonRichText/IUniversalJsonType.d.ts +24 -24
- package/lib/helpers/JsonRichText/IUniversalJsonType.js +10 -10
- package/lib/helpers/LocalesHelper.d.ts +4 -4
- package/lib/helpers/LocalesHelper.js +73 -73
- package/lib/helpers/LocalizedStringHelper.d.ts +11 -11
- package/lib/helpers/LocalizedStringHelper.js +76 -76
- package/lib/helpers/Permissions/PermissionFetcher.d.ts +8 -8
- package/lib/helpers/Permissions/PermissionFetcher.js +95 -95
- package/lib/helpers/Permissions/PermissionLabel.d.ts +2 -2
- package/lib/helpers/Permissions/PermissionLabel.js +42 -42
- package/lib/helpers/Permissions/PermissionMapper.d.ts +13 -13
- package/lib/helpers/Permissions/PermissionMapper.js +35 -35
- package/lib/helpers/Permissions/PermissionResource.d.ts +6 -6
- package/lib/helpers/Permissions/PermissionResource.js +62 -62
- package/lib/helpers/Permissions/PermissionSavingService.d.ts +13 -13
- package/lib/helpers/Permissions/PermissionSavingService.js +32 -32
- package/lib/helpers/Permissions/SavePermissionGroup.d.ts +6 -6
- package/lib/helpers/Permissions/SavePermissionGroup.js +32 -32
- package/lib/helpers/Permissions/UpdatePermissionGroup.d.ts +6 -6
- package/lib/helpers/Permissions/UpdatePermissionGroup.js +50 -50
- package/lib/helpers/Permissions/types.d.ts +17 -17
- package/lib/helpers/Permissions/types.js +2 -2
- package/lib/helpers/PopulationHelper.d.ts +12 -12
- package/lib/helpers/PopulationHelper.js +50 -50
- package/lib/helpers/RecordsCounter.d.ts +10 -10
- package/lib/helpers/RecordsCounter.js +33 -33
- package/lib/helpers/ReportsGenerator.d.ts +26 -26
- package/lib/helpers/ReportsGenerator.js +162 -162
- package/lib/helpers/ResourceGenerator.d.ts +9 -9
- package/lib/helpers/ResourceGenerator.js +172 -172
- package/lib/helpers/ResourceHelper.d.ts +28 -28
- package/lib/helpers/ResourceHelper.js +397 -397
- package/lib/helpers/RportsGenerator.d.ts +10 -10
- package/lib/helpers/RportsGenerator.js +21 -21
- package/lib/helpers/SchemaGenerator.d.ts +7 -7
- package/lib/helpers/SchemaGenerator.js +137 -137
- package/lib/helpers/SchemaHelper.d.ts +5 -5
- package/lib/helpers/SchemaHelper.js +21 -21
- package/lib/helpers/UserActionsLog/UserActionsLogHelper.d.ts +2 -2
- package/lib/helpers/UserActionsLog/UserActionsLogHelper.js +49 -49
- package/lib/locales/en.json +54 -54
- package/lib/middlewares/cache/decorator.d.ts +3 -3
- package/lib/middlewares/cache/decorator.js +60 -60
- package/lib/middlewares/cache/deletionMethods.d.ts +3 -3
- package/lib/middlewares/cache/deletionMethods.js +23 -23
- package/lib/middlewares/isAuth.d.ts +13 -13
- package/lib/middlewares/isAuth.js +43 -43
- package/lib/models/ModelNames.d.ts +10 -10
- package/lib/models/ModelNames.js +13 -13
- package/lib/models/adminNotification/AdminNotification.d.ts +5 -5
- package/lib/models/adminNotification/AdminNotification.js +70 -70
- package/lib/models/adminNotification/IAdminNotification.d.ts +35 -35
- package/lib/models/adminNotification/IAdminNotification.js +15 -15
- package/lib/models/adminpermission/AdminPermission.d.ts +6 -11
- package/lib/models/adminpermission/AdminPermission.js +27 -23
- package/lib/models/adminpermission/IAdminPermission.d.ts +13 -13
- package/lib/models/adminpermission/IAdminPermission.js +2 -2
- package/lib/models/customPage/CustomPage.d.ts +2 -2
- package/lib/models/customPage/CustomPage.js +38 -38
- package/lib/models/customPage/ICustomPage.d.ts +17 -17
- package/lib/models/customPage/ICustomPage.js +2 -2
- package/lib/models/file/File.d.ts +2 -2
- package/lib/models/file/File.js +23 -23
- package/lib/models/file/IFile.d.ts +15 -15
- package/lib/models/file/IFile.js +2 -2
- package/lib/models/language/ILanguage.d.ts +8 -0
- package/lib/models/language/ILanguage.js +8 -0
- package/lib/models/language/LanguageSchema.d.ts +9 -0
- package/lib/models/language/LanguageSchema.js +17 -0
- package/lib/models/location/ILocation.d.ts +16 -16
- package/lib/models/location/ILocation.js +2 -2
- package/lib/models/location/Location.d.ts +2 -2
- package/lib/models/location/Location.js +29 -29
- package/lib/models/mailLog/IMailLog.d.ts +14 -14
- package/lib/models/mailLog/IMailLog.js +2 -2
- package/lib/models/mailLog/MailLog.d.ts +3 -3
- package/lib/models/mailLog/MailLog.js +23 -23
- package/lib/models/modelConfiguration/IModelConfigurations.d.ts +31 -31
- package/lib/models/modelConfiguration/IModelConfigurations.js +2 -2
- package/lib/models/modelConfiguration/ModelConfiguration.d.ts +13 -13
- package/lib/models/modelConfiguration/ModelConfiguration.js +103 -103
- package/lib/models/permission/IPermission.d.ts +14 -14
- package/lib/models/permission/IPermission.js +2 -2
- package/lib/models/permission/Permission.d.ts +6 -2
- package/lib/models/permission/Permission.js +28 -21
- package/lib/models/permissiongroup/IPermissionGroup.d.ts +13 -0
- package/lib/models/permissiongroup/IPermissionGroup.js +2 -0
- package/lib/models/permissiongroup/PermissionGroup.d.ts +6 -0
- package/lib/models/permissiongroup/PermissionGroup.js +16 -0
- package/lib/models/request-log/IRequestLog.d.ts +22 -22
- package/lib/models/request-log/IRequestLog.js +2 -2
- package/lib/models/request-log/RequestLog.d.ts +3 -3
- package/lib/models/request-log/RequestLog.js +51 -51
- package/lib/models/userActionsLog/IUserActionsLog.d.ts +26 -26
- package/lib/models/userActionsLog/IUserActionsLog.js +11 -11
- package/lib/models/userActionsLog/UserActionsLog.d.ts +3 -3
- package/lib/models/userActionsLog/UserActionsLog.js +41 -41
- package/lib/pdf/ReportTemplate.d.ts +71 -71
- package/lib/pdf/ReportTemplate.js +94 -94
- package/lib/repositories/AdminNotificationRepository.d.ts +7 -7
- package/lib/repositories/AdminNotificationRepository.js +23 -23
- package/lib/repositories/AdminPermissionRepository.d.ts +7 -0
- package/lib/repositories/AdminPermissionRepository.js +23 -0
- package/lib/repositories/DashboardRepository.d.ts +5 -5
- package/lib/repositories/DashboardRepository.js +12 -12
- package/lib/repositories/PermissionGroupRepository.d.ts +7 -0
- package/lib/repositories/PermissionGroupRepository.js +23 -0
- package/lib/repositories/PermissionRepository.d.ts +7 -0
- package/lib/repositories/PermissionRepository.js +23 -0
- package/lib/repositories/Repository.d.ts +68 -68
- package/lib/repositories/Repository.js +215 -215
- package/lib/repositories/RequestLogRepository.d.ts +10 -10
- package/lib/repositories/RequestLogRepository.js +54 -54
- package/lib/repositories/SaveResult.d.ts +14 -14
- package/lib/repositories/SaveResult.js +18 -18
- package/lib/resources/AdminNotificationsResource.d.ts +3 -3
- package/lib/resources/AdminNotificationsResource.js +23 -23
- package/lib/resources/AdminPermissionResource.d.ts +5 -0
- package/lib/resources/AdminPermissionResource.js +36 -0
- package/lib/resources/PermissionGroupResource.d.ts +5 -0
- package/lib/resources/PermissionGroupResource.js +53 -0
- package/lib/resources/PermissionsResource.d.ts +5 -0
- package/lib/resources/PermissionsResource.js +23 -0
- package/lib/resources/parents.d.ts +12 -4
- package/lib/resources/parents.js +15 -7
- package/lib/router/index.d.ts +8 -8
- package/lib/router/index.js +104 -104
- package/lib/seeds/PermissionSeeder.d.ts +4 -0
- package/lib/seeds/PermissionSeeder.js +56 -0
- package/lib/types/DashbordConfig.d.ts +21 -21
- package/lib/types/DashbordConfig.js +2 -2
- package/lib/types/IConfigurationFile.d.ts +14 -13
- package/lib/types/IConfigurationFile.js +2 -2
- package/lib/types/IResourceFile.d.ts +736 -736
- package/lib/types/IResourceFile.js +2 -2
- package/lib/types/IResourceResponse.d.ts +96 -96
- package/lib/types/IResourceResponse.js +2 -2
- package/lib/types/helpers.d.ts +71 -68
- package/lib/types/helpers.js +83 -83
- package/lib/utils/DateUtils.d.ts +7 -7
- package/lib/utils/DateUtils.js +45 -45
- package/lib/utils/ResourceUtils.d.ts +2 -2
- package/lib/utils/ResourceUtils.js +7 -7
- package/lib/utils/ResponseUtils.d.ts +11 -11
- package/lib/utils/ResponseUtils.js +41 -41
- package/lib/utils/StringUtils.d.ts +9 -9
- package/lib/utils/StringUtils.js +46 -46
- package/lib/view/asset-manifest.json +18 -18
- package/lib/view/assets/icons/delete_icon.svg +3 -3
- package/lib/view/assets/icons/flags/ic_flag_cn.svg +9 -9
- package/lib/view/assets/icons/flags/ic_flag_sa.svg +9 -9
- package/lib/view/assets/icons/flags/ic_flag_vn.svg +9 -9
- package/lib/view/assets/icons/info_icon.svg +3 -3
- package/lib/view/assets/icons/navbar/ic_banking.svg +5 -5
- package/lib/view/assets/icons/navbar/ic_invoice.svg +4 -4
- package/lib/view/assets/icons/navbar/ic_kanban.svg +7 -7
- package/lib/view/assets/icons/navbar/ic_menu_item.svg +8 -8
- package/lib/view/assets/icons/small_info_icon.svg +3 -3
- package/lib/view/assets/illustrations/Group 16.svg +4 -4
- package/lib/view/assets/illustrations/logo.svg +5 -5
- package/lib/view/favicon/browserconfig.xml +9 -9
- package/lib/view/favicon/safari-pinned-tab.svg +182 -182
- package/lib/view/favicon/site.webmanifest +19 -19
- package/lib/view/fonts/index.css +18 -18
- package/lib/view/index.html +52 -52
- package/lib/view/manifest.json +20 -20
- package/lib/view/robots.txt +3 -3
- package/lib/view/static/css/main.54de06ef.css +1 -1
- package/lib/view/static/js/574.778b5963.chunk.js +1 -1
- package/lib/view/static/js/678.521704a3.chunk.js +1 -1
- package/lib/view/static/js/798.54856416.chunk.js +1 -1
- package/lib/view/static/js/main.4687f255.js +2 -2
- package/lib/view/static/js/main.4687f255.js.LICENSE.txt +214 -214
- package/package.json +64 -64
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getModelConfiguartionSchema = exports.RowsPerPageOptions = exports.RowArrangeType = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
var RowArrangeType;
|
|
6
|
-
(function (RowArrangeType) {
|
|
7
|
-
RowArrangeType["ASCENDING"] = "asc";
|
|
8
|
-
RowArrangeType["DESCENDING"] = "desc";
|
|
9
|
-
})(RowArrangeType = exports.RowArrangeType || (exports.RowArrangeType = {}));
|
|
10
|
-
var RowsPerPageOptions;
|
|
11
|
-
(function (RowsPerPageOptions) {
|
|
12
|
-
RowsPerPageOptions["FIVE"] = "5";
|
|
13
|
-
RowsPerPageOptions["TEN"] = "10";
|
|
14
|
-
RowsPerPageOptions["TWENTY_FIVE"] = "25";
|
|
15
|
-
RowsPerPageOptions["FIFTY"] = "50";
|
|
16
|
-
RowsPerPageOptions["ONE_HUNDRED"] = "100";
|
|
17
|
-
})(RowsPerPageOptions = exports.RowsPerPageOptions || (exports.RowsPerPageOptions = {}));
|
|
18
|
-
const ActionSchema = new mongoose_1.Schema({
|
|
19
|
-
new: {
|
|
20
|
-
type: Boolean,
|
|
21
|
-
required: true,
|
|
22
|
-
},
|
|
23
|
-
edit: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
show: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
required: false,
|
|
30
|
-
},
|
|
31
|
-
delete: {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
required: false,
|
|
34
|
-
},
|
|
35
|
-
import: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
required: false,
|
|
38
|
-
},
|
|
39
|
-
bulkDelete: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
required: false,
|
|
42
|
-
},
|
|
43
|
-
duplicate: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
required: false,
|
|
46
|
-
},
|
|
47
|
-
}, { _id: false });
|
|
48
|
-
function getModelConfiguartionSchema(schemaOptions) {
|
|
49
|
-
return new mongoose_1.Schema({
|
|
50
|
-
modelName: {
|
|
51
|
-
type: String,
|
|
52
|
-
required: true,
|
|
53
|
-
},
|
|
54
|
-
title: {
|
|
55
|
-
type: String,
|
|
56
|
-
required: false,
|
|
57
|
-
},
|
|
58
|
-
defaultOrderBy: {
|
|
59
|
-
type: String,
|
|
60
|
-
required: false,
|
|
61
|
-
},
|
|
62
|
-
defaultOrder: {
|
|
63
|
-
type: String,
|
|
64
|
-
enum: Object.values(RowArrangeType),
|
|
65
|
-
default: RowArrangeType.DESCENDING,
|
|
66
|
-
required: false,
|
|
67
|
-
},
|
|
68
|
-
defaultrowsPerPage: {
|
|
69
|
-
type: String,
|
|
70
|
-
enum: Object.values(RowsPerPageOptions),
|
|
71
|
-
required: false,
|
|
72
|
-
},
|
|
73
|
-
actions: {
|
|
74
|
-
type: ActionSchema,
|
|
75
|
-
required: false,
|
|
76
|
-
},
|
|
77
|
-
listProperties: [
|
|
78
|
-
{
|
|
79
|
-
type: String,
|
|
80
|
-
required: false,
|
|
81
|
-
},
|
|
82
|
-
],
|
|
83
|
-
showProperties: [
|
|
84
|
-
{
|
|
85
|
-
type: String,
|
|
86
|
-
required: false,
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
filterProperties: [
|
|
90
|
-
{
|
|
91
|
-
type: String,
|
|
92
|
-
required: false,
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
quickFilterProperties: [
|
|
96
|
-
{
|
|
97
|
-
type: String,
|
|
98
|
-
required: false,
|
|
99
|
-
},
|
|
100
|
-
],
|
|
101
|
-
}, schemaOptions);
|
|
102
|
-
}
|
|
103
|
-
exports.getModelConfiguartionSchema = getModelConfiguartionSchema;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getModelConfiguartionSchema = exports.RowsPerPageOptions = exports.RowArrangeType = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
var RowArrangeType;
|
|
6
|
+
(function (RowArrangeType) {
|
|
7
|
+
RowArrangeType["ASCENDING"] = "asc";
|
|
8
|
+
RowArrangeType["DESCENDING"] = "desc";
|
|
9
|
+
})(RowArrangeType = exports.RowArrangeType || (exports.RowArrangeType = {}));
|
|
10
|
+
var RowsPerPageOptions;
|
|
11
|
+
(function (RowsPerPageOptions) {
|
|
12
|
+
RowsPerPageOptions["FIVE"] = "5";
|
|
13
|
+
RowsPerPageOptions["TEN"] = "10";
|
|
14
|
+
RowsPerPageOptions["TWENTY_FIVE"] = "25";
|
|
15
|
+
RowsPerPageOptions["FIFTY"] = "50";
|
|
16
|
+
RowsPerPageOptions["ONE_HUNDRED"] = "100";
|
|
17
|
+
})(RowsPerPageOptions = exports.RowsPerPageOptions || (exports.RowsPerPageOptions = {}));
|
|
18
|
+
const ActionSchema = new mongoose_1.Schema({
|
|
19
|
+
new: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
edit: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
show: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
required: false,
|
|
30
|
+
},
|
|
31
|
+
delete: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
required: false,
|
|
34
|
+
},
|
|
35
|
+
import: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
required: false,
|
|
38
|
+
},
|
|
39
|
+
bulkDelete: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
required: false,
|
|
42
|
+
},
|
|
43
|
+
duplicate: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
required: false,
|
|
46
|
+
},
|
|
47
|
+
}, { _id: false });
|
|
48
|
+
function getModelConfiguartionSchema(schemaOptions) {
|
|
49
|
+
return new mongoose_1.Schema({
|
|
50
|
+
modelName: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: true,
|
|
53
|
+
},
|
|
54
|
+
title: {
|
|
55
|
+
type: String,
|
|
56
|
+
required: false,
|
|
57
|
+
},
|
|
58
|
+
defaultOrderBy: {
|
|
59
|
+
type: String,
|
|
60
|
+
required: false,
|
|
61
|
+
},
|
|
62
|
+
defaultOrder: {
|
|
63
|
+
type: String,
|
|
64
|
+
enum: Object.values(RowArrangeType),
|
|
65
|
+
default: RowArrangeType.DESCENDING,
|
|
66
|
+
required: false,
|
|
67
|
+
},
|
|
68
|
+
defaultrowsPerPage: {
|
|
69
|
+
type: String,
|
|
70
|
+
enum: Object.values(RowsPerPageOptions),
|
|
71
|
+
required: false,
|
|
72
|
+
},
|
|
73
|
+
actions: {
|
|
74
|
+
type: ActionSchema,
|
|
75
|
+
required: false,
|
|
76
|
+
},
|
|
77
|
+
listProperties: [
|
|
78
|
+
{
|
|
79
|
+
type: String,
|
|
80
|
+
required: false,
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
showProperties: [
|
|
84
|
+
{
|
|
85
|
+
type: String,
|
|
86
|
+
required: false,
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
filterProperties: [
|
|
90
|
+
{
|
|
91
|
+
type: String,
|
|
92
|
+
required: false,
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
quickFilterProperties: [
|
|
96
|
+
{
|
|
97
|
+
type: String,
|
|
98
|
+
required: false,
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
}, schemaOptions);
|
|
102
|
+
}
|
|
103
|
+
exports.getModelConfiguartionSchema = getModelConfiguartionSchema;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Document, Model, Types } from 'mongoose';
|
|
2
|
-
export interface IPermissionProps {
|
|
3
|
-
_id?: Types.ObjectId;
|
|
4
|
-
name: string;
|
|
5
|
-
modelName: string;
|
|
6
|
-
order: number;
|
|
7
|
-
}
|
|
8
|
-
export interface IPermissionDocument extends IPermissionProps, Document {
|
|
9
|
-
_id: Types.ObjectId;
|
|
10
|
-
createdAt: Date;
|
|
11
|
-
updatedAt: Date;
|
|
12
|
-
}
|
|
13
|
-
export default interface IPermissionModel extends Model<IPermissionDocument> {
|
|
14
|
-
}
|
|
1
|
+
import { Document, Model, Types } from 'mongoose';
|
|
2
|
+
export interface IPermissionProps {
|
|
3
|
+
_id?: Types.ObjectId;
|
|
4
|
+
name: string;
|
|
5
|
+
modelName: string;
|
|
6
|
+
order: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IPermissionDocument extends IPermissionProps, Document {
|
|
9
|
+
_id: Types.ObjectId;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
}
|
|
13
|
+
export default interface IPermissionModel extends Model<IPermissionDocument> {
|
|
14
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import { Schema } from
|
|
2
|
-
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
import IPermissionModel from './IPermission';
|
|
3
|
+
export declare const PermissionSchema: Schema;
|
|
4
|
+
declare const Permission: IPermissionModel;
|
|
5
|
+
export default Permission;
|
|
6
|
+
export declare function getPermissionSchema(): Schema;
|
|
@@ -1,21 +1,28 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getPermissionSchema = exports.PermissionSchema = void 0;
|
|
7
|
+
const mongoose_1 = require("mongoose");
|
|
8
|
+
const ModelNames_1 = __importDefault(require("../ModelNames"));
|
|
9
|
+
exports.PermissionSchema = new mongoose_1.Schema({
|
|
10
|
+
name: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
modelName: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
order: {
|
|
19
|
+
type: Number,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
}, { timestamps: true });
|
|
23
|
+
const Permission = (mongoose_1.models[ModelNames_1.default.Permission] || (0, mongoose_1.model)(ModelNames_1.default.Permission, exports.PermissionSchema));
|
|
24
|
+
exports.default = Permission;
|
|
25
|
+
function getPermissionSchema() {
|
|
26
|
+
return exports.PermissionSchema;
|
|
27
|
+
}
|
|
28
|
+
exports.getPermissionSchema = getPermissionSchema;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Document, Model, Types } from 'mongoose';
|
|
2
|
+
import { ILanguage } from '../language/ILanguage';
|
|
3
|
+
export interface IPermissionGroupProps {
|
|
4
|
+
_id?: Types.ObjectId;
|
|
5
|
+
name: ILanguage[] | string;
|
|
6
|
+
}
|
|
7
|
+
export interface IPermissionGroupDocument extends IPermissionGroupProps, Document {
|
|
8
|
+
_id: Types.ObjectId;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
updatedAt: Date;
|
|
11
|
+
}
|
|
12
|
+
export default interface IPermissionGroupModel extends Model<IPermissionGroupDocument> {
|
|
13
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import IPermissionGroupModel from './IPermissionGroup';
|
|
2
|
+
export interface PermissionGroupOptions {
|
|
3
|
+
localized?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function createPermissionGroupModel(options?: PermissionGroupOptions): IPermissionGroupModel;
|
|
6
|
+
export declare const PermissionGroup: IPermissionGroupModel;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PermissionGroup = exports.createPermissionGroupModel = void 0;
|
|
7
|
+
const mongoose_1 = require("mongoose");
|
|
8
|
+
const ModelNames_1 = __importDefault(require("../ModelNames"));
|
|
9
|
+
const LanguageSchema_1 = require("../language/LanguageSchema");
|
|
10
|
+
function createPermissionGroupModel(options = {}) {
|
|
11
|
+
const nameField = options.localized ? { name: [{ type: LanguageSchema_1.LanguageSchema }] } : { name: { type: String, required: true } };
|
|
12
|
+
const PermissionGroupSchema = new mongoose_1.Schema(nameField, { timestamps: true });
|
|
13
|
+
return (mongoose_1.models[ModelNames_1.default.PermissionGroup] || (0, mongoose_1.model)(ModelNames_1.default.PermissionGroup, PermissionGroupSchema));
|
|
14
|
+
}
|
|
15
|
+
exports.createPermissionGroupModel = createPermissionGroupModel;
|
|
16
|
+
exports.PermissionGroup = createPermissionGroupModel({ localized: false });
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Document, Model, Types } from 'mongoose';
|
|
2
|
-
export interface IRequestLogProps {
|
|
3
|
-
_id?: Types.ObjectId;
|
|
4
|
-
method: string;
|
|
5
|
-
endpoint: string;
|
|
6
|
-
url: string;
|
|
7
|
-
startTime: Date;
|
|
8
|
-
durationInMilliseconds: number;
|
|
9
|
-
query: string;
|
|
10
|
-
body: string;
|
|
11
|
-
userAgent?: string;
|
|
12
|
-
headers?: string;
|
|
13
|
-
status?: number;
|
|
14
|
-
message?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface IRequestLogDocument extends IRequestLogProps, Document {
|
|
17
|
-
_id: Types.ObjectId;
|
|
18
|
-
createdAt: Date;
|
|
19
|
-
updatedAt: Date;
|
|
20
|
-
}
|
|
21
|
-
export default interface IRequestLogModel extends Model<IRequestLogDocument> {
|
|
22
|
-
}
|
|
1
|
+
import { Document, Model, Types } from 'mongoose';
|
|
2
|
+
export interface IRequestLogProps {
|
|
3
|
+
_id?: Types.ObjectId;
|
|
4
|
+
method: string;
|
|
5
|
+
endpoint: string;
|
|
6
|
+
url: string;
|
|
7
|
+
startTime: Date;
|
|
8
|
+
durationInMilliseconds: number;
|
|
9
|
+
query: string;
|
|
10
|
+
body: string;
|
|
11
|
+
userAgent?: string;
|
|
12
|
+
headers?: string;
|
|
13
|
+
status?: number;
|
|
14
|
+
message?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IRequestLogDocument extends IRequestLogProps, Document {
|
|
17
|
+
_id: Types.ObjectId;
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
updatedAt: Date;
|
|
20
|
+
}
|
|
21
|
+
export default interface IRequestLogModel extends Model<IRequestLogDocument> {
|
|
22
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import IRequestLogModel from './IRequestLog';
|
|
2
|
-
declare const RequestLog: IRequestLogModel;
|
|
3
|
-
export default RequestLog;
|
|
1
|
+
import IRequestLogModel from './IRequestLog';
|
|
2
|
+
declare const RequestLog: IRequestLogModel;
|
|
3
|
+
export default RequestLog;
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const SchemaHelper_1 = __importDefault(require("../../helpers/SchemaHelper"));
|
|
7
|
-
const mongoose_1 = require("mongoose");
|
|
8
|
-
const ModelNames_1 = __importDefault(require("../ModelNames"));
|
|
9
|
-
// belongs_to User
|
|
10
|
-
const RequestLogSchema = new mongoose_1.Schema({
|
|
11
|
-
method: {
|
|
12
|
-
type: String
|
|
13
|
-
},
|
|
14
|
-
endpoint: {
|
|
15
|
-
type: String
|
|
16
|
-
},
|
|
17
|
-
url: {
|
|
18
|
-
type: String
|
|
19
|
-
},
|
|
20
|
-
startTime: {
|
|
21
|
-
type: Date
|
|
22
|
-
},
|
|
23
|
-
durationInMilliseconds: {
|
|
24
|
-
type: Number
|
|
25
|
-
},
|
|
26
|
-
userId: {
|
|
27
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
28
|
-
default: null
|
|
29
|
-
},
|
|
30
|
-
query: {
|
|
31
|
-
type: String
|
|
32
|
-
},
|
|
33
|
-
body: {
|
|
34
|
-
type: String
|
|
35
|
-
},
|
|
36
|
-
userAgent: {
|
|
37
|
-
type: String
|
|
38
|
-
},
|
|
39
|
-
headers: {
|
|
40
|
-
type: String
|
|
41
|
-
},
|
|
42
|
-
message: {
|
|
43
|
-
type: String
|
|
44
|
-
},
|
|
45
|
-
status: {
|
|
46
|
-
type: Number
|
|
47
|
-
}
|
|
48
|
-
}, { timestamps: true });
|
|
49
|
-
SchemaHelper_1.default.belongsTo(RequestLogSchema, ModelNames_1.default.User);
|
|
50
|
-
const RequestLog = (0, mongoose_1.model)(ModelNames_1.default.RequestLog, RequestLogSchema);
|
|
51
|
-
exports.default = RequestLog;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const SchemaHelper_1 = __importDefault(require("../../helpers/SchemaHelper"));
|
|
7
|
+
const mongoose_1 = require("mongoose");
|
|
8
|
+
const ModelNames_1 = __importDefault(require("../ModelNames"));
|
|
9
|
+
// belongs_to User
|
|
10
|
+
const RequestLogSchema = new mongoose_1.Schema({
|
|
11
|
+
method: {
|
|
12
|
+
type: String
|
|
13
|
+
},
|
|
14
|
+
endpoint: {
|
|
15
|
+
type: String
|
|
16
|
+
},
|
|
17
|
+
url: {
|
|
18
|
+
type: String
|
|
19
|
+
},
|
|
20
|
+
startTime: {
|
|
21
|
+
type: Date
|
|
22
|
+
},
|
|
23
|
+
durationInMilliseconds: {
|
|
24
|
+
type: Number
|
|
25
|
+
},
|
|
26
|
+
userId: {
|
|
27
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
28
|
+
default: null
|
|
29
|
+
},
|
|
30
|
+
query: {
|
|
31
|
+
type: String
|
|
32
|
+
},
|
|
33
|
+
body: {
|
|
34
|
+
type: String
|
|
35
|
+
},
|
|
36
|
+
userAgent: {
|
|
37
|
+
type: String
|
|
38
|
+
},
|
|
39
|
+
headers: {
|
|
40
|
+
type: String
|
|
41
|
+
},
|
|
42
|
+
message: {
|
|
43
|
+
type: String
|
|
44
|
+
},
|
|
45
|
+
status: {
|
|
46
|
+
type: Number
|
|
47
|
+
}
|
|
48
|
+
}, { timestamps: true });
|
|
49
|
+
SchemaHelper_1.default.belongsTo(RequestLogSchema, ModelNames_1.default.User);
|
|
50
|
+
const RequestLog = (0, mongoose_1.model)(ModelNames_1.default.RequestLog, RequestLogSchema);
|
|
51
|
+
exports.default = RequestLog;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { Document, Model, Types } from 'mongoose';
|
|
2
|
-
export declare enum UserActions {
|
|
3
|
-
CREATE = "create",
|
|
4
|
-
EDIT = "edit",
|
|
5
|
-
DELETE = "delete",
|
|
6
|
-
LOGIN = "login",
|
|
7
|
-
LOGOUT = "logout"
|
|
8
|
-
}
|
|
9
|
-
export interface IUserActionsLogProps {
|
|
10
|
-
_id?: Types.ObjectId;
|
|
11
|
-
userId: Types.ObjectId;
|
|
12
|
-
action: string;
|
|
13
|
-
modelName: string;
|
|
14
|
-
dataBefore?: string;
|
|
15
|
-
dataAfter?: string;
|
|
16
|
-
resourceId?: Types.ObjectId;
|
|
17
|
-
changes?: string;
|
|
18
|
-
user?: any;
|
|
19
|
-
}
|
|
20
|
-
export interface IUserActionsLogDocument extends IUserActionsLogProps, Document {
|
|
21
|
-
_id: Types.ObjectId;
|
|
22
|
-
createdAt: Date;
|
|
23
|
-
updatedAt: Date;
|
|
24
|
-
}
|
|
25
|
-
export default interface IUserActionsLogModel extends Model<IUserActionsLogDocument> {
|
|
26
|
-
}
|
|
1
|
+
import { Document, Model, Types } from 'mongoose';
|
|
2
|
+
export declare enum UserActions {
|
|
3
|
+
CREATE = "create",
|
|
4
|
+
EDIT = "edit",
|
|
5
|
+
DELETE = "delete",
|
|
6
|
+
LOGIN = "login",
|
|
7
|
+
LOGOUT = "logout"
|
|
8
|
+
}
|
|
9
|
+
export interface IUserActionsLogProps {
|
|
10
|
+
_id?: Types.ObjectId;
|
|
11
|
+
userId: Types.ObjectId;
|
|
12
|
+
action: string;
|
|
13
|
+
modelName: string;
|
|
14
|
+
dataBefore?: string;
|
|
15
|
+
dataAfter?: string;
|
|
16
|
+
resourceId?: Types.ObjectId;
|
|
17
|
+
changes?: string;
|
|
18
|
+
user?: any;
|
|
19
|
+
}
|
|
20
|
+
export interface IUserActionsLogDocument extends IUserActionsLogProps, Document {
|
|
21
|
+
_id: Types.ObjectId;
|
|
22
|
+
createdAt: Date;
|
|
23
|
+
updatedAt: Date;
|
|
24
|
+
}
|
|
25
|
+
export default interface IUserActionsLogModel extends Model<IUserActionsLogDocument> {
|
|
26
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserActions = void 0;
|
|
4
|
-
var UserActions;
|
|
5
|
-
(function (UserActions) {
|
|
6
|
-
UserActions["CREATE"] = "create";
|
|
7
|
-
UserActions["EDIT"] = "edit";
|
|
8
|
-
UserActions["DELETE"] = "delete";
|
|
9
|
-
UserActions["LOGIN"] = "login";
|
|
10
|
-
UserActions["LOGOUT"] = "logout";
|
|
11
|
-
})(UserActions = exports.UserActions || (exports.UserActions = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserActions = void 0;
|
|
4
|
+
var UserActions;
|
|
5
|
+
(function (UserActions) {
|
|
6
|
+
UserActions["CREATE"] = "create";
|
|
7
|
+
UserActions["EDIT"] = "edit";
|
|
8
|
+
UserActions["DELETE"] = "delete";
|
|
9
|
+
UserActions["LOGIN"] = "login";
|
|
10
|
+
UserActions["LOGOUT"] = "logout";
|
|
11
|
+
})(UserActions = exports.UserActions || (exports.UserActions = {}));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import IUserActionsLogModel from "./IUserActionsLog";
|
|
2
|
-
declare const UserActionsLog: IUserActionsLogModel;
|
|
3
|
-
export default UserActionsLog;
|
|
1
|
+
import IUserActionsLogModel from "./IUserActionsLog";
|
|
2
|
+
declare const UserActionsLog: IUserActionsLogModel;
|
|
3
|
+
export default UserActionsLog;
|