identity-admin 1.27.8 → 1.27.9
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 +113 -113
- 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 +130 -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 +690 -690
- 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 +66 -66
- package/lib/types/helpers.js +77 -77
- 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,10 +1,10 @@
|
|
|
1
|
-
import { FieldTypes } from "../types/helpers";
|
|
2
|
-
interface Columns {
|
|
3
|
-
label: string;
|
|
4
|
-
value: string;
|
|
5
|
-
type: FieldTypes;
|
|
6
|
-
}
|
|
7
|
-
export default class ReportsGenerator {
|
|
8
|
-
static CreateXlsxFile(columns: Columns[], data: any[], name: string): void;
|
|
9
|
-
}
|
|
10
|
-
export {};
|
|
1
|
+
import { FieldTypes } from "../types/helpers";
|
|
2
|
+
interface Columns {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
type: FieldTypes;
|
|
6
|
+
}
|
|
7
|
+
export default class ReportsGenerator {
|
|
8
|
+
static CreateXlsxFile(columns: Columns[], data: any[], name: string): void;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -1,21 +1,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
|
-
const node_xlsx_1 = __importDefault(require("node-xlsx"));
|
|
7
|
-
const lodash_1 = require("lodash");
|
|
8
|
-
const helpers_1 = require("../types/helpers");
|
|
9
|
-
class ReportsGenerator {
|
|
10
|
-
static CreateXlsxFile(columns, data, name) {
|
|
11
|
-
const header = columns.map(field => field.label);
|
|
12
|
-
const rows = data.map(row => columns.map(field => field.type === helpers_1.FieldTypes.OBJECTID ? (0, lodash_1.get)(row, field.value).toString() : (0, lodash_1.get)(row, field.value)));
|
|
13
|
-
const sheets = [{
|
|
14
|
-
name,
|
|
15
|
-
data: [header, ...rows],
|
|
16
|
-
options: {}
|
|
17
|
-
}];
|
|
18
|
-
const buffer = node_xlsx_1.default.build(sheets);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.default = ReportsGenerator;
|
|
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 node_xlsx_1 = __importDefault(require("node-xlsx"));
|
|
7
|
+
const lodash_1 = require("lodash");
|
|
8
|
+
const helpers_1 = require("../types/helpers");
|
|
9
|
+
class ReportsGenerator {
|
|
10
|
+
static CreateXlsxFile(columns, data, name) {
|
|
11
|
+
const header = columns.map(field => field.label);
|
|
12
|
+
const rows = data.map(row => columns.map(field => field.type === helpers_1.FieldTypes.OBJECTID ? (0, lodash_1.get)(row, field.value).toString() : (0, lodash_1.get)(row, field.value)));
|
|
13
|
+
const sheets = [{
|
|
14
|
+
name,
|
|
15
|
+
data: [header, ...rows],
|
|
16
|
+
options: {}
|
|
17
|
+
}];
|
|
18
|
+
const buffer = node_xlsx_1.default.build(sheets);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = ReportsGenerator;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IResourceFile } from '../types/IResourceFile';
|
|
2
|
-
import { IConfiguartionFile } from '../types/IConfigurationFile';
|
|
3
|
-
export default class SchemaGenerator {
|
|
4
|
-
static generateSchema(schema: any, model: any, modelName: string, resource: IResourceFile, configurations?: IConfiguartionFile): any[];
|
|
5
|
-
private static setNestedSchema;
|
|
6
|
-
private static getRefPath;
|
|
7
|
-
}
|
|
1
|
+
import { IResourceFile } from '../types/IResourceFile';
|
|
2
|
+
import { IConfiguartionFile } from '../types/IConfigurationFile';
|
|
3
|
+
export default class SchemaGenerator {
|
|
4
|
+
static generateSchema(schema: any, model: any, modelName: string, resource: IResourceFile, configurations?: IConfiguartionFile): any[];
|
|
5
|
+
private static setNestedSchema;
|
|
6
|
+
private static getRefPath;
|
|
7
|
+
}
|
|
@@ -1,130 +1,130 @@
|
|
|
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 StringUtils_1 = __importDefault(require("../utils/StringUtils"));
|
|
7
|
-
const ResourceHelper_1 = __importDefault(require("./ResourceHelper"));
|
|
8
|
-
const helpers_1 = require("../types/helpers");
|
|
9
|
-
var pluralize = require('pluralize');
|
|
10
|
-
class SchemaGenerator {
|
|
11
|
-
static generateSchema(schema, model, modelName, resource, configurations) {
|
|
12
|
-
const schemaFields = Object.keys(schema);
|
|
13
|
-
var populatedString = '';
|
|
14
|
-
if (!model) {
|
|
15
|
-
model = {};
|
|
16
|
-
}
|
|
17
|
-
schemaFields.forEach((field) => {
|
|
18
|
-
const schemaField = schema[field];
|
|
19
|
-
const refCheck = schemaField.options.ref;
|
|
20
|
-
const translation = ResourceHelper_1.default.checkResourceTranslation(resource, field);
|
|
21
|
-
const fieldType = ResourceHelper_1.default.getFieldType(schemaField);
|
|
22
|
-
model[field] = model[field] ? model[field] : {};
|
|
23
|
-
if (fieldType === helpers_1.FieldTypes.REFERENCE) {
|
|
24
|
-
populatedString = StringUtils_1.default.getPopulatedString(populatedString, field);
|
|
25
|
-
model[field].path = StringUtils_1.default.lowerCaseFirstLetter(refCheck);
|
|
26
|
-
const resourceModel = resource.properties.model;
|
|
27
|
-
if (resourceModel && resourceModel[field] && resourceModel[field].mediaUploader) {
|
|
28
|
-
model[field].mediaUploader = true;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
if (fieldType === helpers_1.FieldTypes.NESTEDSCHEMA) {
|
|
32
|
-
const modelAndPopulatedString = this.setNestedSchema(schema[field].schema.paths, modelName, model, field, populatedString, resource);
|
|
33
|
-
model = modelAndPopulatedString[0];
|
|
34
|
-
populatedString = modelAndPopulatedString[1];
|
|
35
|
-
}
|
|
36
|
-
if (fieldType === helpers_1.FieldTypes.DATE) {
|
|
37
|
-
var defaultWithTime = false;
|
|
38
|
-
if (model[field].withTime === undefined && (field === 'createdAt' || field === 'updatedAt')) {
|
|
39
|
-
defaultWithTime = true;
|
|
40
|
-
}
|
|
41
|
-
model[field].withTime = model[field].withTime ? model[field].withTime : defaultWithTime;
|
|
42
|
-
}
|
|
43
|
-
else if (fieldType === helpers_1.FieldTypes.ARRAY) {
|
|
44
|
-
model[field].required = schema[field].caster.isRequired;
|
|
45
|
-
if (schema[field].schema) {
|
|
46
|
-
const modelAndPopulatedString = this.setNestedSchema(schema[field].schema.paths, modelName, model, field, populatedString, resource);
|
|
47
|
-
model = modelAndPopulatedString[0];
|
|
48
|
-
populatedString = modelAndPopulatedString[1];
|
|
49
|
-
model[field].arrayType = model[field].arrayType ? model[field].arrayType : helpers_1.FieldTypes.NESTEDSCHEMA;
|
|
50
|
-
}
|
|
51
|
-
else if (schema[field].caster.options.ref) {
|
|
52
|
-
populatedString = StringUtils_1.default.getPopulatedString(populatedString, field);
|
|
53
|
-
model[field].path = StringUtils_1.default.lowerCaseFirstLetter(schema[field].caster.options.ref);
|
|
54
|
-
model[field].apiRoute = model[field].apiRoute ? model[field].apiRoute : this.getRefPath(schema[field].caster.options.ref, configurations);
|
|
55
|
-
model[field].arrayType = model[field].arrayType ? model[field].arrayType : helpers_1.FieldTypes.REFERENCE;
|
|
56
|
-
}
|
|
57
|
-
else if (schema[field].caster.enumValues && schema[field].caster.enumValues.length > 0) {
|
|
58
|
-
model[field].arrayType = model[field].arrayType ? model[field].arrayType : helpers_1.FieldTypes.ENUM;
|
|
59
|
-
model[field].enumValues = model[field].enumValues ? model[field].enumValues : schema[field].caster.enumValues;
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
model[field].arrayType = model[field].arrayType ? model[field].arrayType : schema[field].caster.instance;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
model[field].type = model[field].type ? model[field].type : fieldType;
|
|
66
|
-
model[field].defaultValue = schema[field].defaultValue ? schema[field].defaultValue : undefined;
|
|
67
|
-
model[field].required = model[field].required ? model[field].required : schemaField.isRequired ? schemaField.isRequired : false;
|
|
68
|
-
model[field].apiRoute = model[field].apiRoute ? model[field].apiRoute : schemaField.options.ref ? this.getRefPath(schemaField.options.ref, configurations) : undefined;
|
|
69
|
-
model[field].enumValues =
|
|
70
|
-
model[field].type === helpers_1.FieldTypes.ENUM || model[field].arrayType === helpers_1.FieldTypes.ENUM
|
|
71
|
-
? model[field].enumValues
|
|
72
|
-
? model[field].enumValues
|
|
73
|
-
: schemaField.enumValues
|
|
74
|
-
: undefined;
|
|
75
|
-
model[field].value = model[field].value
|
|
76
|
-
? model[field].value
|
|
77
|
-
: translation
|
|
78
|
-
? translation
|
|
79
|
-
: refCheck
|
|
80
|
-
? StringUtils_1.default.checkRefId(field)
|
|
81
|
-
? StringUtils_1.default.convertCamelCaseToWord(field.slice(0, -2))
|
|
82
|
-
: StringUtils_1.default.convertCamelCaseToWord(field)
|
|
83
|
-
: StringUtils_1.default.convertCamelCaseToWord(field);
|
|
84
|
-
model[field].isDraggable = model[field].isDraggable === false ? false : true;
|
|
85
|
-
});
|
|
86
|
-
if (model.virtuals) {
|
|
87
|
-
for (const extraField in model.virtuals) {
|
|
88
|
-
model[extraField] = model[extraField] ? model[extraField] : {};
|
|
89
|
-
model[extraField].type = model.virtuals[extraField].type;
|
|
90
|
-
model[extraField].arrayType = model.virtuals[extraField].arrayType ? model.virtuals[extraField].arrayType : undefined;
|
|
91
|
-
model[extraField].required = model.virtuals[extraField].required;
|
|
92
|
-
model[extraField].value = ResourceHelper_1.default.checkResourceTranslation(resource, extraField)
|
|
93
|
-
? ResourceHelper_1.default.checkResourceTranslation(resource, extraField)
|
|
94
|
-
: StringUtils_1.default.convertCamelCaseToWord(extraField);
|
|
95
|
-
model[extraField].path = StringUtils_1.default.getRefPath(extraField);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return [model, populatedString];
|
|
99
|
-
}
|
|
100
|
-
static setNestedSchema(paths, modelName, model, field, populatedString, resource) {
|
|
101
|
-
var _a, _b;
|
|
102
|
-
var nestedSchema = (_b = (_a = model[field]) === null || _a === void 0 ? void 0 : _a.schema) !== null && _b !== void 0 ? _b : {};
|
|
103
|
-
var nestedSchemaKeys = [];
|
|
104
|
-
const nestedModelodelAndPopulatedString = this.generateSchema(paths, nestedSchema, modelName, resource);
|
|
105
|
-
model[field].schema = nestedModelodelAndPopulatedString[0];
|
|
106
|
-
model[field].populatedString = nestedModelodelAndPopulatedString[1];
|
|
107
|
-
const populatedStringArray = nestedModelodelAndPopulatedString[1].split(' ');
|
|
108
|
-
populatedStringArray.forEach((nestedSchemaPopulatedString) => {
|
|
109
|
-
if (nestedSchemaPopulatedString) {
|
|
110
|
-
populatedString = StringUtils_1.default.getPopulatedString(populatedString, field + '.' + nestedSchemaPopulatedString);
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
for (const key in model[field].schema) {
|
|
114
|
-
nestedSchemaKeys.push(key);
|
|
115
|
-
}
|
|
116
|
-
model[field].keys = nestedSchemaKeys;
|
|
117
|
-
return [model, populatedString];
|
|
118
|
-
}
|
|
119
|
-
static getRefPath(refField, configurations) {
|
|
120
|
-
var baseApiUrl = 'admin/';
|
|
121
|
-
if (configurations && configurations.baseApiUrl) {
|
|
122
|
-
baseApiUrl = configurations.baseApiUrl;
|
|
123
|
-
if (!baseApiUrl.endsWith('/')) {
|
|
124
|
-
baseApiUrl += '/';
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return baseApiUrl + StringUtils_1.default.lowerCaseFirstLetter(pluralize(refField));
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
exports.default = SchemaGenerator;
|
|
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 StringUtils_1 = __importDefault(require("../utils/StringUtils"));
|
|
7
|
+
const ResourceHelper_1 = __importDefault(require("./ResourceHelper"));
|
|
8
|
+
const helpers_1 = require("../types/helpers");
|
|
9
|
+
var pluralize = require('pluralize');
|
|
10
|
+
class SchemaGenerator {
|
|
11
|
+
static generateSchema(schema, model, modelName, resource, configurations) {
|
|
12
|
+
const schemaFields = Object.keys(schema);
|
|
13
|
+
var populatedString = '';
|
|
14
|
+
if (!model) {
|
|
15
|
+
model = {};
|
|
16
|
+
}
|
|
17
|
+
schemaFields.forEach((field) => {
|
|
18
|
+
const schemaField = schema[field];
|
|
19
|
+
const refCheck = schemaField.options.ref;
|
|
20
|
+
const translation = ResourceHelper_1.default.checkResourceTranslation(resource, field);
|
|
21
|
+
const fieldType = ResourceHelper_1.default.getFieldType(schemaField);
|
|
22
|
+
model[field] = model[field] ? model[field] : {};
|
|
23
|
+
if (fieldType === helpers_1.FieldTypes.REFERENCE) {
|
|
24
|
+
populatedString = StringUtils_1.default.getPopulatedString(populatedString, field);
|
|
25
|
+
model[field].path = StringUtils_1.default.lowerCaseFirstLetter(refCheck);
|
|
26
|
+
const resourceModel = resource.properties.model;
|
|
27
|
+
if (resourceModel && resourceModel[field] && resourceModel[field].mediaUploader) {
|
|
28
|
+
model[field].mediaUploader = true;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (fieldType === helpers_1.FieldTypes.NESTEDSCHEMA) {
|
|
32
|
+
const modelAndPopulatedString = this.setNestedSchema(schema[field].schema.paths, modelName, model, field, populatedString, resource);
|
|
33
|
+
model = modelAndPopulatedString[0];
|
|
34
|
+
populatedString = modelAndPopulatedString[1];
|
|
35
|
+
}
|
|
36
|
+
if (fieldType === helpers_1.FieldTypes.DATE) {
|
|
37
|
+
var defaultWithTime = false;
|
|
38
|
+
if (model[field].withTime === undefined && (field === 'createdAt' || field === 'updatedAt')) {
|
|
39
|
+
defaultWithTime = true;
|
|
40
|
+
}
|
|
41
|
+
model[field].withTime = model[field].withTime ? model[field].withTime : defaultWithTime;
|
|
42
|
+
}
|
|
43
|
+
else if (fieldType === helpers_1.FieldTypes.ARRAY) {
|
|
44
|
+
model[field].required = schema[field].caster.isRequired;
|
|
45
|
+
if (schema[field].schema) {
|
|
46
|
+
const modelAndPopulatedString = this.setNestedSchema(schema[field].schema.paths, modelName, model, field, populatedString, resource);
|
|
47
|
+
model = modelAndPopulatedString[0];
|
|
48
|
+
populatedString = modelAndPopulatedString[1];
|
|
49
|
+
model[field].arrayType = model[field].arrayType ? model[field].arrayType : helpers_1.FieldTypes.NESTEDSCHEMA;
|
|
50
|
+
}
|
|
51
|
+
else if (schema[field].caster.options.ref) {
|
|
52
|
+
populatedString = StringUtils_1.default.getPopulatedString(populatedString, field);
|
|
53
|
+
model[field].path = StringUtils_1.default.lowerCaseFirstLetter(schema[field].caster.options.ref);
|
|
54
|
+
model[field].apiRoute = model[field].apiRoute ? model[field].apiRoute : this.getRefPath(schema[field].caster.options.ref, configurations);
|
|
55
|
+
model[field].arrayType = model[field].arrayType ? model[field].arrayType : helpers_1.FieldTypes.REFERENCE;
|
|
56
|
+
}
|
|
57
|
+
else if (schema[field].caster.enumValues && schema[field].caster.enumValues.length > 0) {
|
|
58
|
+
model[field].arrayType = model[field].arrayType ? model[field].arrayType : helpers_1.FieldTypes.ENUM;
|
|
59
|
+
model[field].enumValues = model[field].enumValues ? model[field].enumValues : schema[field].caster.enumValues;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
model[field].arrayType = model[field].arrayType ? model[field].arrayType : schema[field].caster.instance;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
model[field].type = model[field].type ? model[field].type : fieldType;
|
|
66
|
+
model[field].defaultValue = schema[field].defaultValue ? schema[field].defaultValue : undefined;
|
|
67
|
+
model[field].required = model[field].required ? model[field].required : schemaField.isRequired ? schemaField.isRequired : false;
|
|
68
|
+
model[field].apiRoute = model[field].apiRoute ? model[field].apiRoute : schemaField.options.ref ? this.getRefPath(schemaField.options.ref, configurations) : undefined;
|
|
69
|
+
model[field].enumValues =
|
|
70
|
+
model[field].type === helpers_1.FieldTypes.ENUM || model[field].arrayType === helpers_1.FieldTypes.ENUM
|
|
71
|
+
? model[field].enumValues
|
|
72
|
+
? model[field].enumValues
|
|
73
|
+
: schemaField.enumValues
|
|
74
|
+
: undefined;
|
|
75
|
+
model[field].value = model[field].value
|
|
76
|
+
? model[field].value
|
|
77
|
+
: translation
|
|
78
|
+
? translation
|
|
79
|
+
: refCheck
|
|
80
|
+
? StringUtils_1.default.checkRefId(field)
|
|
81
|
+
? StringUtils_1.default.convertCamelCaseToWord(field.slice(0, -2))
|
|
82
|
+
: StringUtils_1.default.convertCamelCaseToWord(field)
|
|
83
|
+
: StringUtils_1.default.convertCamelCaseToWord(field);
|
|
84
|
+
model[field].isDraggable = model[field].isDraggable === false ? false : true;
|
|
85
|
+
});
|
|
86
|
+
if (model.virtuals) {
|
|
87
|
+
for (const extraField in model.virtuals) {
|
|
88
|
+
model[extraField] = model[extraField] ? model[extraField] : {};
|
|
89
|
+
model[extraField].type = model.virtuals[extraField].type;
|
|
90
|
+
model[extraField].arrayType = model.virtuals[extraField].arrayType ? model.virtuals[extraField].arrayType : undefined;
|
|
91
|
+
model[extraField].required = model.virtuals[extraField].required;
|
|
92
|
+
model[extraField].value = ResourceHelper_1.default.checkResourceTranslation(resource, extraField)
|
|
93
|
+
? ResourceHelper_1.default.checkResourceTranslation(resource, extraField)
|
|
94
|
+
: StringUtils_1.default.convertCamelCaseToWord(extraField);
|
|
95
|
+
model[extraField].path = StringUtils_1.default.getRefPath(extraField);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return [model, populatedString];
|
|
99
|
+
}
|
|
100
|
+
static setNestedSchema(paths, modelName, model, field, populatedString, resource) {
|
|
101
|
+
var _a, _b;
|
|
102
|
+
var nestedSchema = (_b = (_a = model[field]) === null || _a === void 0 ? void 0 : _a.schema) !== null && _b !== void 0 ? _b : {};
|
|
103
|
+
var nestedSchemaKeys = [];
|
|
104
|
+
const nestedModelodelAndPopulatedString = this.generateSchema(paths, nestedSchema, modelName, resource);
|
|
105
|
+
model[field].schema = nestedModelodelAndPopulatedString[0];
|
|
106
|
+
model[field].populatedString = nestedModelodelAndPopulatedString[1];
|
|
107
|
+
const populatedStringArray = nestedModelodelAndPopulatedString[1].split(' ');
|
|
108
|
+
populatedStringArray.forEach((nestedSchemaPopulatedString) => {
|
|
109
|
+
if (nestedSchemaPopulatedString) {
|
|
110
|
+
populatedString = StringUtils_1.default.getPopulatedString(populatedString, field + '.' + nestedSchemaPopulatedString);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
for (const key in model[field].schema) {
|
|
114
|
+
nestedSchemaKeys.push(key);
|
|
115
|
+
}
|
|
116
|
+
model[field].keys = nestedSchemaKeys;
|
|
117
|
+
return [model, populatedString];
|
|
118
|
+
}
|
|
119
|
+
static getRefPath(refField, configurations) {
|
|
120
|
+
var baseApiUrl = 'admin/';
|
|
121
|
+
if (configurations && configurations.baseApiUrl) {
|
|
122
|
+
baseApiUrl = configurations.baseApiUrl;
|
|
123
|
+
if (!baseApiUrl.endsWith('/')) {
|
|
124
|
+
baseApiUrl += '/';
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return baseApiUrl + StringUtils_1.default.lowerCaseFirstLetter(pluralize(refField));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
exports.default = SchemaGenerator;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Schema } from 'mongoose';
|
|
2
|
-
export default class SchemaHelper {
|
|
3
|
-
static belongsTo(schema: Schema, modelName: string): void;
|
|
4
|
-
private static lowerFirstLetter;
|
|
5
|
-
}
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export default class SchemaHelper {
|
|
3
|
+
static belongsTo(schema: Schema, modelName: string): void;
|
|
4
|
+
private static lowerFirstLetter;
|
|
5
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class SchemaHelper {
|
|
4
|
-
static belongsTo(schema, modelName) {
|
|
5
|
-
const fieldName = this.lowerFirstLetter(modelName);
|
|
6
|
-
const localFieldName = fieldName + 'Id';
|
|
7
|
-
schema.virtual(fieldName, {
|
|
8
|
-
ref: modelName,
|
|
9
|
-
localField: localFieldName,
|
|
10
|
-
foreignField: '_id',
|
|
11
|
-
justOne: true
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
static lowerFirstLetter(value) {
|
|
15
|
-
if (value.length == 0) {
|
|
16
|
-
return '';
|
|
17
|
-
}
|
|
18
|
-
return value.charAt(0).toLowerCase() + value.slice(1);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.default = SchemaHelper;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class SchemaHelper {
|
|
4
|
+
static belongsTo(schema, modelName) {
|
|
5
|
+
const fieldName = this.lowerFirstLetter(modelName);
|
|
6
|
+
const localFieldName = fieldName + 'Id';
|
|
7
|
+
schema.virtual(fieldName, {
|
|
8
|
+
ref: modelName,
|
|
9
|
+
localField: localFieldName,
|
|
10
|
+
foreignField: '_id',
|
|
11
|
+
justOne: true
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
static lowerFirstLetter(value) {
|
|
15
|
+
if (value.length == 0) {
|
|
16
|
+
return '';
|
|
17
|
+
}
|
|
18
|
+
return value.charAt(0).toLowerCase() + value.slice(1);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = SchemaHelper;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function renderDiff(diff: any): string | null;
|
|
2
|
-
export declare function isRelevant(diff: any): boolean;
|
|
1
|
+
export declare function renderDiff(diff: any): string | null;
|
|
2
|
+
export declare function isRelevant(diff: any): boolean;
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isRelevant = exports.renderDiff = void 0;
|
|
4
|
-
function renderDiff(diff) {
|
|
5
|
-
var _a;
|
|
6
|
-
const path = (_a = diff.path) === null || _a === void 0 ? void 0 : _a.join('.');
|
|
7
|
-
const oldValue = formatValue(diff.lhs);
|
|
8
|
-
const newValue = formatValue(diff.rhs);
|
|
9
|
-
switch (diff.kind) {
|
|
10
|
-
case 'N':
|
|
11
|
-
return `${path}: Added - ${newValue}`;
|
|
12
|
-
case 'D':
|
|
13
|
-
return `${path}: Removed - ${oldValue}`;
|
|
14
|
-
case 'E':
|
|
15
|
-
return `${path}: Modified - ${oldValue} => ${newValue}`;
|
|
16
|
-
case 'A':
|
|
17
|
-
return renderArrayChange(diff, path);
|
|
18
|
-
default:
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.renderDiff = renderDiff;
|
|
23
|
-
function formatValue(value) {
|
|
24
|
-
if (typeof value === 'object') {
|
|
25
|
-
return JSON.stringify(value);
|
|
26
|
-
}
|
|
27
|
-
if (typeof value === 'boolean') {
|
|
28
|
-
return `${value}`;
|
|
29
|
-
}
|
|
30
|
-
return value;
|
|
31
|
-
}
|
|
32
|
-
function renderArrayChange(diff, path) {
|
|
33
|
-
const { index, item } = diff;
|
|
34
|
-
const { kind, rhs, lhs } = item;
|
|
35
|
-
const changeText = kind === 'N' ? 'Added' : 'Removed';
|
|
36
|
-
const value = formatValue(kind === 'N' ? rhs : lhs);
|
|
37
|
-
if (typeof index !== 'undefined') {
|
|
38
|
-
return `${path}[${index}]: ${changeText} - ${value}`;
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
return `${path}: Array Change - ${changeText} ${value}`;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function isRelevant(diff) {
|
|
45
|
-
var _a;
|
|
46
|
-
const lastElement = (_a = diff.path) === null || _a === void 0 ? void 0 : _a.slice(-1)[0];
|
|
47
|
-
return !['__v', 'createdAt', 'updatedAt', '_id', 'id'].includes(lastElement);
|
|
48
|
-
}
|
|
49
|
-
exports.isRelevant = isRelevant;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isRelevant = exports.renderDiff = void 0;
|
|
4
|
+
function renderDiff(diff) {
|
|
5
|
+
var _a;
|
|
6
|
+
const path = (_a = diff.path) === null || _a === void 0 ? void 0 : _a.join('.');
|
|
7
|
+
const oldValue = formatValue(diff.lhs);
|
|
8
|
+
const newValue = formatValue(diff.rhs);
|
|
9
|
+
switch (diff.kind) {
|
|
10
|
+
case 'N':
|
|
11
|
+
return `${path}: Added - ${newValue}`;
|
|
12
|
+
case 'D':
|
|
13
|
+
return `${path}: Removed - ${oldValue}`;
|
|
14
|
+
case 'E':
|
|
15
|
+
return `${path}: Modified - ${oldValue} => ${newValue}`;
|
|
16
|
+
case 'A':
|
|
17
|
+
return renderArrayChange(diff, path);
|
|
18
|
+
default:
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.renderDiff = renderDiff;
|
|
23
|
+
function formatValue(value) {
|
|
24
|
+
if (typeof value === 'object') {
|
|
25
|
+
return JSON.stringify(value);
|
|
26
|
+
}
|
|
27
|
+
if (typeof value === 'boolean') {
|
|
28
|
+
return `${value}`;
|
|
29
|
+
}
|
|
30
|
+
return value;
|
|
31
|
+
}
|
|
32
|
+
function renderArrayChange(diff, path) {
|
|
33
|
+
const { index, item } = diff;
|
|
34
|
+
const { kind, rhs, lhs } = item;
|
|
35
|
+
const changeText = kind === 'N' ? 'Added' : 'Removed';
|
|
36
|
+
const value = formatValue(kind === 'N' ? rhs : lhs);
|
|
37
|
+
if (typeof index !== 'undefined') {
|
|
38
|
+
return `${path}[${index}]: ${changeText} - ${value}`;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return `${path}: Array Change - ${changeText} ${value}`;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function isRelevant(diff) {
|
|
45
|
+
var _a;
|
|
46
|
+
const lastElement = (_a = diff.path) === null || _a === void 0 ? void 0 : _a.slice(-1)[0];
|
|
47
|
+
return !['__v', 'createdAt', 'updatedAt', '_id', 'id'].includes(lastElement);
|
|
48
|
+
}
|
|
49
|
+
exports.isRelevant = isRelevant;
|
package/lib/locales/en.json
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
{
|
|
2
|
-
"actions_edit": "Edit",
|
|
3
|
-
"actions_delete": "Delete",
|
|
4
|
-
"actions_delete_confirmMessage_title": "Do you really want to delete this record?",
|
|
5
|
-
"actions_delete_confirmMessage_body": "If you clicked yes, this record will be permanently deleted.",
|
|
6
|
-
"actions_bulkDelete_confirmMessage_title": "Do you really want to delete these records?",
|
|
7
|
-
"actions_bulkDelete_confirmMessage_body": "If you clicked yes, these records will be permanently deleted.",
|
|
8
|
-
"actions_delete_options_yes": "Delete",
|
|
9
|
-
"actions_delete_options_no": "No",
|
|
10
|
-
"ana": "ana",
|
|
11
|
-
"Admin": "Admin",
|
|
12
|
-
"User": "User",
|
|
13
|
-
"ALL": "ALL",
|
|
14
|
-
"EMAIL": "EMAIL",
|
|
15
|
-
"GOOGLE": "GOOGLE",
|
|
16
|
-
"APPLE": "APPLE",
|
|
17
|
-
"GUEST": "GUEST",
|
|
18
|
-
"Recipient": "Recipient",
|
|
19
|
-
"Home View Section": "Home View Section",
|
|
20
|
-
"Options": "Options",
|
|
21
|
-
"Product": "Product",
|
|
22
|
-
"Active": "Active",
|
|
23
|
-
"Draft": "Draft",
|
|
24
|
-
"Cart": "Cart",
|
|
25
|
-
"ACTIVE": "ACTIVE",
|
|
26
|
-
"EXPIRED": "EXPIRED",
|
|
27
|
-
"Inventory Item": "Inventory Item",
|
|
28
|
-
"Collection": "Collection",
|
|
29
|
-
"SMART": "SMART",
|
|
30
|
-
"MANUAL": "MANUAL",
|
|
31
|
-
"Image": "Image",
|
|
32
|
-
"Banner": "Banner",
|
|
33
|
-
"Brand": "Brand",
|
|
34
|
-
"Color": "Color",
|
|
35
|
-
"Location": "Location",
|
|
36
|
-
"Product Option": "Product Option",
|
|
37
|
-
"Product Variant": "Product Variant",
|
|
38
|
-
"Flower Type": "Flower Type",
|
|
39
|
-
"Collection Product": "Collection Product",
|
|
40
|
-
"Device": "Device",
|
|
41
|
-
"Favorite Product": "Favorite Product",
|
|
42
|
-
"Settings": "Settings",
|
|
43
|
-
"Delivery Slot": "Delivery Slot",
|
|
44
|
-
"Push Notification": "Push Notification",
|
|
45
|
-
"Request Log": "Request Log",
|
|
46
|
-
"Success": "Success",
|
|
47
|
-
"Unauthorized": "Unauthorized",
|
|
48
|
-
"unprocessable": "unprocessable",
|
|
49
|
-
"Server Error": "Server Error",
|
|
50
|
-
"actions_new": "actions_new",
|
|
51
|
-
"Setup": "Setup",
|
|
52
|
-
"Country": "Country",
|
|
53
|
-
"Country User": "Country User"
|
|
1
|
+
{
|
|
2
|
+
"actions_edit": "Edit",
|
|
3
|
+
"actions_delete": "Delete",
|
|
4
|
+
"actions_delete_confirmMessage_title": "Do you really want to delete this record?",
|
|
5
|
+
"actions_delete_confirmMessage_body": "If you clicked yes, this record will be permanently deleted.",
|
|
6
|
+
"actions_bulkDelete_confirmMessage_title": "Do you really want to delete these records?",
|
|
7
|
+
"actions_bulkDelete_confirmMessage_body": "If you clicked yes, these records will be permanently deleted.",
|
|
8
|
+
"actions_delete_options_yes": "Delete",
|
|
9
|
+
"actions_delete_options_no": "No",
|
|
10
|
+
"ana": "ana",
|
|
11
|
+
"Admin": "Admin",
|
|
12
|
+
"User": "User",
|
|
13
|
+
"ALL": "ALL",
|
|
14
|
+
"EMAIL": "EMAIL",
|
|
15
|
+
"GOOGLE": "GOOGLE",
|
|
16
|
+
"APPLE": "APPLE",
|
|
17
|
+
"GUEST": "GUEST",
|
|
18
|
+
"Recipient": "Recipient",
|
|
19
|
+
"Home View Section": "Home View Section",
|
|
20
|
+
"Options": "Options",
|
|
21
|
+
"Product": "Product",
|
|
22
|
+
"Active": "Active",
|
|
23
|
+
"Draft": "Draft",
|
|
24
|
+
"Cart": "Cart",
|
|
25
|
+
"ACTIVE": "ACTIVE",
|
|
26
|
+
"EXPIRED": "EXPIRED",
|
|
27
|
+
"Inventory Item": "Inventory Item",
|
|
28
|
+
"Collection": "Collection",
|
|
29
|
+
"SMART": "SMART",
|
|
30
|
+
"MANUAL": "MANUAL",
|
|
31
|
+
"Image": "Image",
|
|
32
|
+
"Banner": "Banner",
|
|
33
|
+
"Brand": "Brand",
|
|
34
|
+
"Color": "Color",
|
|
35
|
+
"Location": "Location",
|
|
36
|
+
"Product Option": "Product Option",
|
|
37
|
+
"Product Variant": "Product Variant",
|
|
38
|
+
"Flower Type": "Flower Type",
|
|
39
|
+
"Collection Product": "Collection Product",
|
|
40
|
+
"Device": "Device",
|
|
41
|
+
"Favorite Product": "Favorite Product",
|
|
42
|
+
"Settings": "Settings",
|
|
43
|
+
"Delivery Slot": "Delivery Slot",
|
|
44
|
+
"Push Notification": "Push Notification",
|
|
45
|
+
"Request Log": "Request Log",
|
|
46
|
+
"Success": "Success",
|
|
47
|
+
"Unauthorized": "Unauthorized",
|
|
48
|
+
"unprocessable": "unprocessable",
|
|
49
|
+
"Server Error": "Server Error",
|
|
50
|
+
"actions_new": "actions_new",
|
|
51
|
+
"Setup": "Setup",
|
|
52
|
+
"Country": "Country",
|
|
53
|
+
"Country User": "Country User"
|
|
54
54
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Request } from 'express';
|
|
2
|
-
import 'reflect-metadata';
|
|
3
|
-
export declare function cached(duration?: number, cachedResponseModifier?: (cachedData: any, req: Request) => Promise<any>): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
1
|
+
import { Request } from 'express';
|
|
2
|
+
import 'reflect-metadata';
|
|
3
|
+
export declare function cached(duration?: number, cachedResponseModifier?: (cachedData: any, req: Request) => Promise<any>): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|