identity-admin 1.28.6 → 1.28.7
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 +294 -294
- 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 +8 -8
- package/lib/controllers/ActionController.js +96 -96
- package/lib/controllers/AdminNotificationController.d.ts +8 -8
- package/lib/controllers/AdminNotificationController.js +69 -69
- package/lib/controllers/DashboardController.d.ts +44 -44
- package/lib/controllers/DashboardController.js +787 -787
- package/lib/controllers/ResourceController.d.ts +15 -15
- package/lib/controllers/ResourceController.js +135 -135
- package/lib/helpers/ActionsGenerator.d.ts +11 -11
- package/lib/helpers/ActionsGenerator.js +179 -179
- package/lib/helpers/AdminNotifications/AdminNotificationCreation.d.ts +49 -49
- package/lib/helpers/AdminNotifications/AdminNotificationCreation.js +66 -66
- package/lib/helpers/AdminNotifications/AdminNotificationFetcher.d.ts +51 -51
- package/lib/helpers/AdminNotifications/AdminNotificationFetcher.js +39 -39
- 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/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 +74 -74
- 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 +395 -395
- 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 +132 -130
- 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 +53 -53
- 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 +9 -9
- package/lib/models/ModelNames.js +12 -12
- package/lib/models/adminNotification/AdminNotification.d.ts +5 -5
- package/lib/models/adminNotification/AdminNotification.js +53 -53
- package/lib/models/adminNotification/IAdminNotification.d.ts +30 -30
- package/lib/models/adminNotification/IAdminNotification.js +15 -15
- package/lib/models/adminpermission/AdminPermission.d.ts +11 -11
- package/lib/models/adminpermission/AdminPermission.js +23 -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/location/ILocation.d.ts +14 -14
- package/lib/models/location/ILocation.js +2 -2
- package/lib/models/location/Location.d.ts +2 -2
- package/lib/models/location/Location.js +21 -21
- package/lib/models/modelConfiguration/IModelConfigurations.d.ts +29 -29
- package/lib/models/modelConfiguration/IModelConfigurations.js +2 -2
- package/lib/models/modelConfiguration/ModelConfiguration.d.ts +13 -13
- package/lib/models/modelConfiguration/ModelConfiguration.js +95 -95
- package/lib/models/permission/IPermission.d.ts +14 -14
- package/lib/models/permission/IPermission.js +2 -2
- package/lib/models/permission/Permission.d.ts +2 -2
- package/lib/models/permission/Permission.js +21 -21
- 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/DashboardRepository.d.ts +5 -5
- package/lib/repositories/DashboardRepository.js +12 -12
- 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/parents.d.ts +4 -4
- package/lib/resources/parents.js +7 -7
- package/lib/router/index.d.ts +8 -8
- package/lib/router/index.js +104 -104
- package/lib/types/DashbordConfig.d.ts +21 -21
- package/lib/types/DashbordConfig.js +2 -2
- package/lib/types/IConfigurationFile.d.ts +11 -11
- package/lib/types/IConfigurationFile.js +2 -2
- package/lib/types/IResourceFile.d.ts +710 -710
- package/lib/types/IResourceFile.js +2 -2
- package/lib/types/IResourceResponse.d.ts +95 -95
- package/lib/types/IResourceResponse.js +2 -2
- package/lib/types/helpers.d.ts +67 -67
- package/lib/types/helpers.js +82 -82
- 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 +63 -63
|
@@ -1,94 +1,94 @@
|
|
|
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.styles = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const renderer_1 = require("@react-pdf/renderer");
|
|
9
|
-
exports.styles = renderer_1.StyleSheet.create({
|
|
10
|
-
table: {
|
|
11
|
-
display: 'flex',
|
|
12
|
-
width: 'auto',
|
|
13
|
-
borderStyle: 'solid',
|
|
14
|
-
borderWidth: 1,
|
|
15
|
-
borderRightWidth: 0,
|
|
16
|
-
borderBottomWidth: 0,
|
|
17
|
-
},
|
|
18
|
-
tableRow: {
|
|
19
|
-
width: '100%',
|
|
20
|
-
margin: 'auto',
|
|
21
|
-
flexDirection: 'row',
|
|
22
|
-
},
|
|
23
|
-
tableCol: {
|
|
24
|
-
width: '100%',
|
|
25
|
-
borderStyle: 'solid',
|
|
26
|
-
borderWidth: 1,
|
|
27
|
-
borderLeftWidth: 0,
|
|
28
|
-
borderTopWidth: 0,
|
|
29
|
-
},
|
|
30
|
-
tableCell: {
|
|
31
|
-
width: '100%',
|
|
32
|
-
margin: 'auto',
|
|
33
|
-
marginTop: 5,
|
|
34
|
-
fontSize: 18,
|
|
35
|
-
overflow: 'hidden'
|
|
36
|
-
},
|
|
37
|
-
flexRow: {
|
|
38
|
-
display: 'flex',
|
|
39
|
-
flexDirection: 'row',
|
|
40
|
-
alignItems: 'flex-start',
|
|
41
|
-
alignContent: 'flex-start',
|
|
42
|
-
justifyContent: 'flex-start',
|
|
43
|
-
marginTop: '24t',
|
|
44
|
-
},
|
|
45
|
-
detailsTitle: {
|
|
46
|
-
fontSize: '18',
|
|
47
|
-
textAlign: 'left',
|
|
48
|
-
color: '#637381',
|
|
49
|
-
fontWeight: 500,
|
|
50
|
-
marginBottom: '8',
|
|
51
|
-
},
|
|
52
|
-
detailsBody: {
|
|
53
|
-
fontSize: '18',
|
|
54
|
-
textAlign: 'left',
|
|
55
|
-
color: '#000',
|
|
56
|
-
fontWeight: 500,
|
|
57
|
-
marginBottom: '8',
|
|
58
|
-
},
|
|
59
|
-
flexColumn: {
|
|
60
|
-
display: 'flex',
|
|
61
|
-
flexDirection: 'column',
|
|
62
|
-
alignItems: 'flex-start',
|
|
63
|
-
alignContent: 'flex-start',
|
|
64
|
-
justifyContent: 'flex-start',
|
|
65
|
-
},
|
|
66
|
-
flexWrap: {
|
|
67
|
-
flexWrap: 'wrap',
|
|
68
|
-
},
|
|
69
|
-
borderTopBottom: {
|
|
70
|
-
borderTop: '2px solid #000',
|
|
71
|
-
borderBottom: '2px solid #000',
|
|
72
|
-
padding: '10px',
|
|
73
|
-
},
|
|
74
|
-
});
|
|
75
|
-
function ReportTemplate({ columns, rows }) {
|
|
76
|
-
return (react_1.default.createElement(renderer_1.Document, null,
|
|
77
|
-
react_1.default.createElement(renderer_1.Page, { size: "A2", orientation: "landscape", style: {
|
|
78
|
-
padding: '4pt',
|
|
79
|
-
paddingTop: '8pt',
|
|
80
|
-
} },
|
|
81
|
-
react_1.default.createElement(renderer_1.View, { style: [exports.styles.flexRow, { marginTop: '8pt', marginBottom: '16pt', marginLeft: '48pt', marginRight: '64pt', justifyContent: 'space-between', alignItems: 'center' }] },
|
|
82
|
-
react_1.default.createElement(renderer_1.Image, { style: {
|
|
83
|
-
width: 'auto',
|
|
84
|
-
height: '32px',
|
|
85
|
-
}, src: `public/logo.png` })),
|
|
86
|
-
react_1.default.createElement(renderer_1.View, { style: exports.styles.table },
|
|
87
|
-
react_1.default.createElement(renderer_1.View, { style: Object.assign(Object.assign({}, exports.styles.tableRow), { backgroundColor: 'black', color: 'white' }) }, columns.map((column) => (react_1.default.createElement(renderer_1.View, { style: exports.styles.tableCol, key: column },
|
|
88
|
-
react_1.default.createElement(renderer_1.Text, { style: exports.styles.tableCell }, column))))),
|
|
89
|
-
rows.map((row, index) => {
|
|
90
|
-
return (react_1.default.createElement(renderer_1.View, { style: exports.styles.tableRow, key: index }, row.map((cell) => (react_1.default.createElement(renderer_1.View, { style: exports.styles.tableCol, key: index * 10 },
|
|
91
|
-
react_1.default.createElement(renderer_1.Text, { style: [exports.styles.tableCell] }, `${cell}`))))));
|
|
92
|
-
})))));
|
|
93
|
-
}
|
|
94
|
-
exports.default = ReportTemplate;
|
|
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.styles = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const renderer_1 = require("@react-pdf/renderer");
|
|
9
|
+
exports.styles = renderer_1.StyleSheet.create({
|
|
10
|
+
table: {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
width: 'auto',
|
|
13
|
+
borderStyle: 'solid',
|
|
14
|
+
borderWidth: 1,
|
|
15
|
+
borderRightWidth: 0,
|
|
16
|
+
borderBottomWidth: 0,
|
|
17
|
+
},
|
|
18
|
+
tableRow: {
|
|
19
|
+
width: '100%',
|
|
20
|
+
margin: 'auto',
|
|
21
|
+
flexDirection: 'row',
|
|
22
|
+
},
|
|
23
|
+
tableCol: {
|
|
24
|
+
width: '100%',
|
|
25
|
+
borderStyle: 'solid',
|
|
26
|
+
borderWidth: 1,
|
|
27
|
+
borderLeftWidth: 0,
|
|
28
|
+
borderTopWidth: 0,
|
|
29
|
+
},
|
|
30
|
+
tableCell: {
|
|
31
|
+
width: '100%',
|
|
32
|
+
margin: 'auto',
|
|
33
|
+
marginTop: 5,
|
|
34
|
+
fontSize: 18,
|
|
35
|
+
overflow: 'hidden'
|
|
36
|
+
},
|
|
37
|
+
flexRow: {
|
|
38
|
+
display: 'flex',
|
|
39
|
+
flexDirection: 'row',
|
|
40
|
+
alignItems: 'flex-start',
|
|
41
|
+
alignContent: 'flex-start',
|
|
42
|
+
justifyContent: 'flex-start',
|
|
43
|
+
marginTop: '24t',
|
|
44
|
+
},
|
|
45
|
+
detailsTitle: {
|
|
46
|
+
fontSize: '18',
|
|
47
|
+
textAlign: 'left',
|
|
48
|
+
color: '#637381',
|
|
49
|
+
fontWeight: 500,
|
|
50
|
+
marginBottom: '8',
|
|
51
|
+
},
|
|
52
|
+
detailsBody: {
|
|
53
|
+
fontSize: '18',
|
|
54
|
+
textAlign: 'left',
|
|
55
|
+
color: '#000',
|
|
56
|
+
fontWeight: 500,
|
|
57
|
+
marginBottom: '8',
|
|
58
|
+
},
|
|
59
|
+
flexColumn: {
|
|
60
|
+
display: 'flex',
|
|
61
|
+
flexDirection: 'column',
|
|
62
|
+
alignItems: 'flex-start',
|
|
63
|
+
alignContent: 'flex-start',
|
|
64
|
+
justifyContent: 'flex-start',
|
|
65
|
+
},
|
|
66
|
+
flexWrap: {
|
|
67
|
+
flexWrap: 'wrap',
|
|
68
|
+
},
|
|
69
|
+
borderTopBottom: {
|
|
70
|
+
borderTop: '2px solid #000',
|
|
71
|
+
borderBottom: '2px solid #000',
|
|
72
|
+
padding: '10px',
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
function ReportTemplate({ columns, rows }) {
|
|
76
|
+
return (react_1.default.createElement(renderer_1.Document, null,
|
|
77
|
+
react_1.default.createElement(renderer_1.Page, { size: "A2", orientation: "landscape", style: {
|
|
78
|
+
padding: '4pt',
|
|
79
|
+
paddingTop: '8pt',
|
|
80
|
+
} },
|
|
81
|
+
react_1.default.createElement(renderer_1.View, { style: [exports.styles.flexRow, { marginTop: '8pt', marginBottom: '16pt', marginLeft: '48pt', marginRight: '64pt', justifyContent: 'space-between', alignItems: 'center' }] },
|
|
82
|
+
react_1.default.createElement(renderer_1.Image, { style: {
|
|
83
|
+
width: 'auto',
|
|
84
|
+
height: '32px',
|
|
85
|
+
}, src: `public/logo.png` })),
|
|
86
|
+
react_1.default.createElement(renderer_1.View, { style: exports.styles.table },
|
|
87
|
+
react_1.default.createElement(renderer_1.View, { style: Object.assign(Object.assign({}, exports.styles.tableRow), { backgroundColor: 'black', color: 'white' }) }, columns.map((column) => (react_1.default.createElement(renderer_1.View, { style: exports.styles.tableCol, key: column },
|
|
88
|
+
react_1.default.createElement(renderer_1.Text, { style: exports.styles.tableCell }, column))))),
|
|
89
|
+
rows.map((row, index) => {
|
|
90
|
+
return (react_1.default.createElement(renderer_1.View, { style: exports.styles.tableRow, key: index }, row.map((cell) => (react_1.default.createElement(renderer_1.View, { style: exports.styles.tableCol, key: index * 10 },
|
|
91
|
+
react_1.default.createElement(renderer_1.Text, { style: [exports.styles.tableCell] }, `${cell}`))))));
|
|
92
|
+
})))));
|
|
93
|
+
}
|
|
94
|
+
exports.default = ReportTemplate;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import Repository, { IRepository } from './Repository';
|
|
2
|
-
import { IAdminNotificationDocument } from '../models/adminNotification/IAdminNotification';
|
|
3
|
-
export interface IAdminNotificationRepository extends IRepository<IAdminNotificationDocument> {
|
|
4
|
-
}
|
|
5
|
-
export default class AdminNotificationRepository extends Repository<IAdminNotificationDocument> {
|
|
6
|
-
constructor();
|
|
7
|
-
}
|
|
1
|
+
import Repository, { IRepository } from './Repository';
|
|
2
|
+
import { IAdminNotificationDocument } from '../models/adminNotification/IAdminNotification';
|
|
3
|
+
export interface IAdminNotificationRepository extends IRepository<IAdminNotificationDocument> {
|
|
4
|
+
}
|
|
5
|
+
export default class AdminNotificationRepository extends Repository<IAdminNotificationDocument> {
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const inversify_1 = require("inversify");
|
|
13
|
-
const Repository_1 = __importDefault(require("./Repository"));
|
|
14
|
-
const AdminNotification_1 = __importDefault(require("../models/adminNotification/AdminNotification"));
|
|
15
|
-
let AdminNotificationRepository = class AdminNotificationRepository extends Repository_1.default {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(AdminNotification_1.default);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
AdminNotificationRepository = __decorate([
|
|
21
|
-
(0, inversify_1.injectable)()
|
|
22
|
-
], AdminNotificationRepository);
|
|
23
|
-
exports.default = AdminNotificationRepository;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const inversify_1 = require("inversify");
|
|
13
|
+
const Repository_1 = __importDefault(require("./Repository"));
|
|
14
|
+
const AdminNotification_1 = __importDefault(require("../models/adminNotification/AdminNotification"));
|
|
15
|
+
let AdminNotificationRepository = class AdminNotificationRepository extends Repository_1.default {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(AdminNotification_1.default);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
AdminNotificationRepository = __decorate([
|
|
21
|
+
(0, inversify_1.injectable)()
|
|
22
|
+
], AdminNotificationRepository);
|
|
23
|
+
exports.default = AdminNotificationRepository;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Repository from "./Repository";
|
|
2
|
-
import { Document, Model } from "mongoose";
|
|
3
|
-
export default class DashboardRepository extends Repository<Document> {
|
|
4
|
-
constructor(model: Model<Document, Model<Document>>);
|
|
5
|
-
}
|
|
1
|
+
import Repository from "./Repository";
|
|
2
|
+
import { Document, Model } from "mongoose";
|
|
3
|
+
export default class DashboardRepository extends Repository<Document> {
|
|
4
|
+
constructor(model: Model<Document, Model<Document>>);
|
|
5
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
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 Repository_1 = __importDefault(require("./Repository"));
|
|
7
|
-
class DashboardRepository extends Repository_1.default {
|
|
8
|
-
constructor(model) {
|
|
9
|
-
super(model);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.default = DashboardRepository;
|
|
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 Repository_1 = __importDefault(require("./Repository"));
|
|
7
|
+
class DashboardRepository extends Repository_1.default {
|
|
8
|
+
constructor(model) {
|
|
9
|
+
super(model);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.default = DashboardRepository;
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { Aggregate, Document, Model } from 'mongoose';
|
|
2
|
-
import SaveResult from './SaveResult';
|
|
3
|
-
export interface PaginateParams {
|
|
4
|
-
page: number;
|
|
5
|
-
perPage: number;
|
|
6
|
-
}
|
|
7
|
-
interface IQueryOptions {
|
|
8
|
-
filter?: any;
|
|
9
|
-
sort?: any;
|
|
10
|
-
select?: any;
|
|
11
|
-
limit?: number;
|
|
12
|
-
skip?: number;
|
|
13
|
-
paginateParams?: PaginateParams;
|
|
14
|
-
populate?: any;
|
|
15
|
-
}
|
|
16
|
-
export interface PageInfo {
|
|
17
|
-
currentPage: number;
|
|
18
|
-
pagesCount: number;
|
|
19
|
-
nextPage: number;
|
|
20
|
-
recordsCount: number;
|
|
21
|
-
perPage: number;
|
|
22
|
-
}
|
|
23
|
-
export interface Page<T> {
|
|
24
|
-
records: T[];
|
|
25
|
-
pageInfo: PageInfo;
|
|
26
|
-
}
|
|
27
|
-
export interface IDashboardRepository {
|
|
28
|
-
}
|
|
29
|
-
export interface IRepository<T extends Document> {
|
|
30
|
-
findById(id: any): Promise<T | null>;
|
|
31
|
-
findOne(queryOptions?: IQueryOptions): Promise<T | null>;
|
|
32
|
-
findMany(queryOptions?: IQueryOptions): Promise<T[]>;
|
|
33
|
-
count(filterOptions: any): Promise<number>;
|
|
34
|
-
save(props: any): Promise<SaveResult<T>>;
|
|
35
|
-
saveAll(props: any[]): Promise<any>;
|
|
36
|
-
findByIdAndUpdate(id: any, props: any): Promise<T | null>;
|
|
37
|
-
findOneAndUpdate(filter: any, props: any, options?: any): Promise<T | null>;
|
|
38
|
-
remove(filterOptions: any): Promise<T | null>;
|
|
39
|
-
distinct(field: string, filterOptions: any): Promise<T[] | null>;
|
|
40
|
-
paginate(queryOptions: IQueryOptions): Promise<Page<T>>;
|
|
41
|
-
update(instance: T, props: any): Promise<SaveResult<T>>;
|
|
42
|
-
saveInstance(instance: T): Promise<SaveResult<T>>;
|
|
43
|
-
}
|
|
44
|
-
export default class Repository<T extends Document> implements IRepository<T>, IDashboardRepository {
|
|
45
|
-
protected model: Model<T>;
|
|
46
|
-
private static NO_NEXT_PAGE;
|
|
47
|
-
constructor(model: Model<T>);
|
|
48
|
-
findById(id: any): Promise<T | null>;
|
|
49
|
-
findOne(queryOptions?: IQueryOptions): Promise<T | null>;
|
|
50
|
-
findMany(queryOptions: IQueryOptions): Promise<T[]>;
|
|
51
|
-
paginate(queryOptions: IQueryOptions): Promise<Page<T>>;
|
|
52
|
-
private getLimit;
|
|
53
|
-
private getSkip;
|
|
54
|
-
toLimitSkip(paginateParams: PaginateParams): [number, number];
|
|
55
|
-
protected createPageInfo(filter: any, skip: number, limit: number): Promise<PageInfo>;
|
|
56
|
-
protected createPageInfoFromAggregate(aggregate: Aggregate<any[]>, skip: number, limit: number): Promise<PageInfo>;
|
|
57
|
-
count(filter: any): Promise<number>;
|
|
58
|
-
countAggregate(aggregate: Aggregate<any[]>): Promise<number>;
|
|
59
|
-
update(instance: T, props: any): Promise<SaveResult<T>>;
|
|
60
|
-
save(props: any): Promise<SaveResult<T>>;
|
|
61
|
-
saveInstance(instance: T): Promise<SaveResult<T>>;
|
|
62
|
-
saveAll(props: any[]): Promise<any>;
|
|
63
|
-
findByIdAndUpdate(id: any, props: any): Promise<T | null>;
|
|
64
|
-
findOneAndUpdate(filter: any, props: any): Promise<T | null>;
|
|
65
|
-
remove(filter: any): Promise<T | null>;
|
|
66
|
-
distinct(field: string, filter: any): Promise<T[] | null>;
|
|
67
|
-
}
|
|
68
|
-
export {};
|
|
1
|
+
import { Aggregate, Document, Model } from 'mongoose';
|
|
2
|
+
import SaveResult from './SaveResult';
|
|
3
|
+
export interface PaginateParams {
|
|
4
|
+
page: number;
|
|
5
|
+
perPage: number;
|
|
6
|
+
}
|
|
7
|
+
interface IQueryOptions {
|
|
8
|
+
filter?: any;
|
|
9
|
+
sort?: any;
|
|
10
|
+
select?: any;
|
|
11
|
+
limit?: number;
|
|
12
|
+
skip?: number;
|
|
13
|
+
paginateParams?: PaginateParams;
|
|
14
|
+
populate?: any;
|
|
15
|
+
}
|
|
16
|
+
export interface PageInfo {
|
|
17
|
+
currentPage: number;
|
|
18
|
+
pagesCount: number;
|
|
19
|
+
nextPage: number;
|
|
20
|
+
recordsCount: number;
|
|
21
|
+
perPage: number;
|
|
22
|
+
}
|
|
23
|
+
export interface Page<T> {
|
|
24
|
+
records: T[];
|
|
25
|
+
pageInfo: PageInfo;
|
|
26
|
+
}
|
|
27
|
+
export interface IDashboardRepository {
|
|
28
|
+
}
|
|
29
|
+
export interface IRepository<T extends Document> {
|
|
30
|
+
findById(id: any): Promise<T | null>;
|
|
31
|
+
findOne(queryOptions?: IQueryOptions): Promise<T | null>;
|
|
32
|
+
findMany(queryOptions?: IQueryOptions): Promise<T[]>;
|
|
33
|
+
count(filterOptions: any): Promise<number>;
|
|
34
|
+
save(props: any): Promise<SaveResult<T>>;
|
|
35
|
+
saveAll(props: any[]): Promise<any>;
|
|
36
|
+
findByIdAndUpdate(id: any, props: any): Promise<T | null>;
|
|
37
|
+
findOneAndUpdate(filter: any, props: any, options?: any): Promise<T | null>;
|
|
38
|
+
remove(filterOptions: any): Promise<T | null>;
|
|
39
|
+
distinct(field: string, filterOptions: any): Promise<T[] | null>;
|
|
40
|
+
paginate(queryOptions: IQueryOptions): Promise<Page<T>>;
|
|
41
|
+
update(instance: T, props: any): Promise<SaveResult<T>>;
|
|
42
|
+
saveInstance(instance: T): Promise<SaveResult<T>>;
|
|
43
|
+
}
|
|
44
|
+
export default class Repository<T extends Document> implements IRepository<T>, IDashboardRepository {
|
|
45
|
+
protected model: Model<T>;
|
|
46
|
+
private static NO_NEXT_PAGE;
|
|
47
|
+
constructor(model: Model<T>);
|
|
48
|
+
findById(id: any): Promise<T | null>;
|
|
49
|
+
findOne(queryOptions?: IQueryOptions): Promise<T | null>;
|
|
50
|
+
findMany(queryOptions: IQueryOptions): Promise<T[]>;
|
|
51
|
+
paginate(queryOptions: IQueryOptions): Promise<Page<T>>;
|
|
52
|
+
private getLimit;
|
|
53
|
+
private getSkip;
|
|
54
|
+
toLimitSkip(paginateParams: PaginateParams): [number, number];
|
|
55
|
+
protected createPageInfo(filter: any, skip: number, limit: number): Promise<PageInfo>;
|
|
56
|
+
protected createPageInfoFromAggregate(aggregate: Aggregate<any[]>, skip: number, limit: number): Promise<PageInfo>;
|
|
57
|
+
count(filter: any): Promise<number>;
|
|
58
|
+
countAggregate(aggregate: Aggregate<any[]>): Promise<number>;
|
|
59
|
+
update(instance: T, props: any): Promise<SaveResult<T>>;
|
|
60
|
+
save(props: any): Promise<SaveResult<T>>;
|
|
61
|
+
saveInstance(instance: T): Promise<SaveResult<T>>;
|
|
62
|
+
saveAll(props: any[]): Promise<any>;
|
|
63
|
+
findByIdAndUpdate(id: any, props: any): Promise<T | null>;
|
|
64
|
+
findOneAndUpdate(filter: any, props: any): Promise<T | null>;
|
|
65
|
+
remove(filter: any): Promise<T | null>;
|
|
66
|
+
distinct(field: string, filter: any): Promise<T[] | null>;
|
|
67
|
+
}
|
|
68
|
+
export {};
|