hh-contracts 0.0.72 → 0.0.73
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/app-menu/get.query.ts +4 -4
- package/build/app-menu/get.query.js +39 -6
- package/build/common/constants/app-statuses.constant.js +25 -0
- package/build/common/constants/icon-keys.constant.js +2 -1
- package/build/common/constants/index.js +5 -2
- package/build/common/constants/kind-of-app.constant.js +8 -0
- package/build/common/constants/slug.constant.js +8 -0
- package/build/common/constants/zod-error-mapping.constant.js +41 -17
- package/build/common/index.js +1 -1
- package/build/common/models/common-query-params.schema.js +4 -1
- package/build/common/models/icon-key.schema.js +35 -2
- package/build/common/models/index.js +2 -1
- package/build/common/models/info.schema.js +37 -4
- package/build/common/models/language-keys.schema.js +35 -2
- package/build/common/models/navigation-item.schemas.js +47 -14
- package/build/common/models/order.schema.js +37 -4
- package/build/common/models/pagination.schema.js +41 -8
- package/build/common/models/search.schema.js +36 -3
- package/build/common/models/slug.schema.js +45 -0
- package/build/common/models/timestamp.schemas.js +38 -5
- package/build/common/models/translations.schemas.js +41 -8
- package/build/common/models/uuid-array.schema.js +38 -0
- package/build/common/transforms/index.js +1 -16
- package/build/common/transforms/navigation-item.transform.js +26 -16
- package/build/common/types/index.js +0 -1
- package/build/companies/company.models.js +45 -0
- package/build/companies/index.js +17 -0
- package/build/hotels/contracts/find-hotel-theme.contract.js +13 -0
- package/build/hotels/contracts/index.js +1 -1
- package/build/hotels/hotel.model.js +49 -0
- package/build/hotels/index.js +1 -0
- package/build/hotels/themes/theme.models.js +40 -7
- package/build/index.js +2 -0
- package/build/permissions/contracts/find-all-permission.contract.js +35 -2
- package/build/permissions/contracts/find-many-permission.contract.js +41 -5
- package/build/permissions/permission.models.js +41 -8
- package/build/roles/contracts/find-many-roles.contract.js +40 -6
- package/build/roles/role.models.js +44 -11
- package/build/tenants/contracts/index.js +17 -0
- package/build/tenants/contracts/resolve-tenant.contract.js +29 -0
- package/build/tenants/index.js +19 -0
- package/build/tenants/tenant.model.js +51 -0
- package/build/tenants/tenants.api.js +11 -0
- package/build/translate/contracts/batch-translate.contract.js +40 -7
- package/common/constants/app-errors.constant.ts +1 -3
- package/common/constants/app-statuses.constant.ts +26 -0
- package/common/constants/icon-keys.constant.ts +1 -1
- package/common/constants/index.ts +5 -2
- package/common/constants/kind-of-app.constant.ts +7 -0
- package/common/constants/slug.constant.ts +7 -0
- package/common/constants/zod-error-mapping.constant.ts +9 -18
- package/common/index.ts +1 -1
- package/common/models/common-query-params.schema.ts +5 -3
- package/common/models/icon-key.schema.ts +3 -3
- package/common/models/index.ts +2 -1
- package/common/models/info.schema.ts +1 -1
- package/common/models/language-keys.schema.ts +1 -1
- package/common/models/navigation-item.schemas.ts +4 -4
- package/common/models/order.schema.ts +3 -3
- package/common/models/pagination.schema.ts +1 -1
- package/common/models/search.schema.ts +1 -1
- package/common/models/slug.schema.ts +10 -0
- package/common/models/timestamp.schemas.ts +1 -1
- package/common/models/translations.schemas.ts +1 -1
- package/common/models/uuid-array.schema.ts +3 -0
- package/common/transforms/index.ts +1 -1
- package/common/transforms/navigation-item.transform.ts +26 -26
- package/common/types/index.ts +0 -1
- package/companies/company.models.ts +11 -0
- package/companies/index.ts +1 -0
- package/hotels/contracts/{find-theme.contract.ts → find-hotel-theme.contract.ts} +2 -2
- package/hotels/contracts/index.ts +1 -1
- package/hotels/hotel.model.ts +15 -0
- package/hotels/index.ts +1 -0
- package/hotels/themes/theme.models.ts +3 -3
- package/index.ts +2 -0
- package/package.json +2 -2
- package/permissions/contracts/create-permission.contract.ts +1 -1
- package/permissions/contracts/delete-permission.contract.ts +1 -1
- package/permissions/contracts/find-all-permission.contract.ts +2 -2
- package/permissions/contracts/find-many-permission.contract.ts +6 -5
- package/permissions/contracts/find-permission.contract.ts +1 -1
- package/permissions/contracts/update-permission.contract.ts +1 -1
- package/permissions/permission.models.ts +5 -5
- package/roles/contracts/create-role.contract.ts +1 -1
- package/roles/contracts/delete-role.contract.ts +1 -1
- package/roles/contracts/find-many-roles.contract.ts +5 -4
- package/roles/contracts/find-role.contract.ts +1 -1
- package/roles/contracts/update-role.contract.ts +1 -1
- package/roles/role.models.ts +5 -5
- package/tenants/contracts/index.ts +1 -0
- package/tenants/contracts/resolve-tenant.contract.ts +32 -0
- package/tenants/index.ts +3 -0
- package/tenants/tenant.model.ts +19 -0
- package/tenants/tenants.api.ts +10 -0
- package/translate/contracts/batch-translate.contract.ts +1 -1
- package/build/common/models/json.schema.js +0 -6
- package/build/common/types/zod.type.js +0 -2
- package/build/hotels/contracts/find-theme.contract.js +0 -13
- package/common/models/json.schema.ts +0 -8
- package/common/types/zod.type.ts +0 -2
package/app-menu/get.query.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import { NavigationItemEntitySchema } from '../common';
|
|
3
3
|
|
|
4
4
|
const GetAppMenuQueryRequestSchema = z.object({
|
|
5
|
-
userUuid: z.
|
|
5
|
+
userUuid: z.uuid(),
|
|
6
6
|
});
|
|
7
7
|
const GetAppMenuQueryResponseSchema = z.object({
|
|
8
|
-
appMenu: z.array(
|
|
8
|
+
appMenu: z.array(NavigationItemEntitySchema),
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
export namespace GetAppMenuQuery {
|
|
@@ -1,13 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.GetAppMenuQuery = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const GetAppMenuQueryRequestSchema =
|
|
7
|
-
userUuid:
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const common_1 = require("../common");
|
|
39
|
+
const GetAppMenuQueryRequestSchema = z.object({
|
|
40
|
+
userUuid: z.uuid(),
|
|
8
41
|
});
|
|
9
|
-
const GetAppMenuQueryResponseSchema =
|
|
10
|
-
appMenu:
|
|
42
|
+
const GetAppMenuQueryResponseSchema = z.object({
|
|
43
|
+
appMenu: z.array(common_1.NavigationItemEntitySchema),
|
|
11
44
|
});
|
|
12
45
|
var GetAppMenuQuery;
|
|
13
46
|
(function (GetAppMenuQuery) {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppStatuses = void 0;
|
|
4
|
+
var AppStatuses;
|
|
5
|
+
(function (AppStatuses) {
|
|
6
|
+
AppStatuses.COMMON = {
|
|
7
|
+
active: 'active',
|
|
8
|
+
disabled: 'disabled',
|
|
9
|
+
};
|
|
10
|
+
AppStatuses.COMMON_VALUES = Object.values(AppStatuses.COMMON);
|
|
11
|
+
AppStatuses.HOTEL = {
|
|
12
|
+
...AppStatuses.COMMON,
|
|
13
|
+
pending: 'pending',
|
|
14
|
+
maintenance: 'maintenance',
|
|
15
|
+
archived: 'archived',
|
|
16
|
+
};
|
|
17
|
+
AppStatuses.HOTEL_VALUES = Object.values(AppStatuses.HOTEL);
|
|
18
|
+
AppStatuses.PAGE = {
|
|
19
|
+
...AppStatuses.COMMON,
|
|
20
|
+
draft: 'draft',
|
|
21
|
+
scheduled: 'scheduled',
|
|
22
|
+
archived: 'archived',
|
|
23
|
+
};
|
|
24
|
+
AppStatuses.PAGE_VALUES = Object.values(AppStatuses.PAGE);
|
|
25
|
+
})(AppStatuses || (exports.AppStatuses = AppStatuses = {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ICON_KEYS = void 0;
|
|
3
|
+
exports.ICON_KEY_VALUES = exports.ICON_KEYS = void 0;
|
|
4
4
|
exports.ICON_KEYS = {
|
|
5
5
|
// eye: 'eye',
|
|
6
6
|
// eyeSlash: 'eyeSlash',
|
|
@@ -30,3 +30,4 @@ exports.ICON_KEYS = {
|
|
|
30
30
|
flagGB: 'flagGB',
|
|
31
31
|
flagRU: 'flagRU',
|
|
32
32
|
};
|
|
33
|
+
exports.ICON_KEY_VALUES = Object.values(exports.ICON_KEYS);
|
|
@@ -16,14 +16,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./app-ability.constant"), exports);
|
|
18
18
|
__exportStar(require("./app-errors.constant"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
19
|
+
__exportStar(require("./app-statuses.constant"), exports);
|
|
20
20
|
__exportStar(require("./default-pagination-config.constant"), exports);
|
|
21
|
+
__exportStar(require("./entity.constant"), exports);
|
|
21
22
|
__exportStar(require("./http-method.constant"), exports);
|
|
22
23
|
__exportStar(require("./icon-keys.constant"), exports);
|
|
23
|
-
__exportStar(require("./
|
|
24
|
+
__exportStar(require("./kind-of-app.constant"), exports);
|
|
25
|
+
__exportStar(require("./locales.constant"), exports);
|
|
24
26
|
__exportStar(require("./navigation-item-type.constant"), exports);
|
|
25
27
|
__exportStar(require("./order-direction.constant"), exports);
|
|
26
28
|
__exportStar(require("./role-types.constant"), exports);
|
|
27
29
|
__exportStar(require("./route-component-key.constants"), exports);
|
|
30
|
+
__exportStar(require("./slug.constant"), exports);
|
|
28
31
|
__exportStar(require("./translatable-field.constant"), exports);
|
|
29
32
|
__exportStar(require("./zod-error-mapping.constant"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KIND_OF_APP_VALUES = exports.KIND_OF_APP = void 0;
|
|
4
|
+
exports.KIND_OF_APP = {
|
|
5
|
+
site: 'site',
|
|
6
|
+
services: 'services',
|
|
7
|
+
};
|
|
8
|
+
exports.KIND_OF_APP_VALUES = Object.values(exports.KIND_OF_APP);
|
|
@@ -1,22 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.ZOD_ERROR_MAPPING = void 0;
|
|
4
|
-
const
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
5
38
|
exports.ZOD_ERROR_MAPPING = {
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[zod_1.ZodIssueCode.invalid_arguments]: 'errors.validation.invalidArguments',
|
|
14
|
-
[zod_1.ZodIssueCode.invalid_return_type]: 'errors.validation.invalidReturnType',
|
|
15
|
-
[zod_1.ZodIssueCode.invalid_date]: 'errors.validation.invalidDate',
|
|
16
|
-
[zod_1.ZodIssueCode.invalid_string]: 'errors.validation.invalidString',
|
|
17
|
-
[zod_1.ZodIssueCode.too_small]: 'errors.validation.tooSmall',
|
|
18
|
-
[zod_1.ZodIssueCode.too_big]: 'errors.validation.tooBig',
|
|
19
|
-
[zod_1.ZodIssueCode.invalid_intersection_types]: 'errors.validation.invalidIntersectionTypes',
|
|
20
|
-
[zod_1.ZodIssueCode.not_multiple_of]: 'errors.validation.notMultipleOf',
|
|
21
|
-
[zod_1.ZodIssueCode.not_finite]: 'errors.validation.notFinite',
|
|
39
|
+
[z.ZodIssueCode.invalid_type]: 'errors.validation.invalidType',
|
|
40
|
+
[z.ZodIssueCode.custom]: 'errors.validation.custom',
|
|
41
|
+
[z.ZodIssueCode.invalid_union]: 'errors.validation.invalidUnion',
|
|
42
|
+
[z.ZodIssueCode.unrecognized_keys]: 'errors.validation.unrecognizedKeys',
|
|
43
|
+
[z.ZodIssueCode.too_small]: 'errors.validation.tooSmall',
|
|
44
|
+
[z.ZodIssueCode.too_big]: 'errors.validation.tooBig',
|
|
45
|
+
[z.ZodIssueCode.not_multiple_of]: 'errors.validation.notMultipleOf',
|
|
22
46
|
};
|
package/build/common/index.js
CHANGED
|
@@ -16,6 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./constants"), exports);
|
|
18
18
|
__exportStar(require("./models"), exports);
|
|
19
|
-
|
|
19
|
+
// export * from './transforms';
|
|
20
20
|
__exportStar(require("./types"), exports);
|
|
21
21
|
__exportStar(require("./utils"), exports);
|
|
@@ -4,4 +4,7 @@ exports.CommonQueryParamsSchema = void 0;
|
|
|
4
4
|
const order_schema_1 = require("./order.schema");
|
|
5
5
|
const pagination_schema_1 = require("./pagination.schema");
|
|
6
6
|
const search_schema_1 = require("./search.schema");
|
|
7
|
-
exports.CommonQueryParamsSchema = order_schema_1.OrderSchema.
|
|
7
|
+
exports.CommonQueryParamsSchema = order_schema_1.OrderSchema.extend({
|
|
8
|
+
...search_schema_1.SearchSchema.shape,
|
|
9
|
+
...pagination_schema_1.PaginationRequestSchema.shape,
|
|
10
|
+
});
|
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.IconKeySchema = void 0;
|
|
4
|
-
const
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
5
38
|
const constants_1 = require("../constants");
|
|
6
|
-
exports.IconKeySchema =
|
|
39
|
+
exports.IconKeySchema = z.enum(constants_1.ICON_KEY_VALUES);
|
|
@@ -17,11 +17,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./common-query-params.schema"), exports);
|
|
18
18
|
__exportStar(require("./icon-key.schema"), exports);
|
|
19
19
|
__exportStar(require("./info.schema"), exports);
|
|
20
|
-
__exportStar(require("./json.schema"), exports);
|
|
21
20
|
__exportStar(require("./navigation-item.schemas"), exports);
|
|
22
21
|
__exportStar(require("./order.schema"), exports);
|
|
23
22
|
__exportStar(require("./pagination.schema"), exports);
|
|
24
23
|
__exportStar(require("./search.schema"), exports);
|
|
24
|
+
__exportStar(require("./slug.schema"), exports);
|
|
25
25
|
__exportStar(require("./timestamp.schemas"), exports);
|
|
26
26
|
__exportStar(require("./language-keys.schema"), exports);
|
|
27
27
|
__exportStar(require("./translations.schemas"), exports);
|
|
28
|
+
__exportStar(require("./uuid-array.schema"), exports);
|
|
@@ -1,10 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.InfoSchema = void 0;
|
|
4
|
-
const
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
5
38
|
const icon_key_schema_1 = require("./icon-key.schema");
|
|
6
|
-
exports.InfoSchema =
|
|
39
|
+
exports.InfoSchema = z.object({
|
|
7
40
|
iconKey: icon_key_schema_1.IconKeySchema.optional(),
|
|
8
|
-
title:
|
|
9
|
-
description:
|
|
41
|
+
title: z.string().min(1),
|
|
42
|
+
description: z.string().min(1),
|
|
10
43
|
});
|
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.LanguageKeysSchema = void 0;
|
|
4
|
-
const
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
5
38
|
const constants_1 = require("../constants");
|
|
6
|
-
exports.LanguageKeysSchema =
|
|
39
|
+
exports.LanguageKeysSchema = z.enum(constants_1.LANGUAGE_KEYS);
|
|
@@ -1,25 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.NavigationItemEntitySchema = exports.NavigationItemEntityBaseSchema = void 0;
|
|
4
|
-
const
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
5
38
|
const constants_1 = require("../constants");
|
|
6
39
|
const constants_2 = require("../constants");
|
|
7
40
|
const icon_key_schema_1 = require("./icon-key.schema");
|
|
8
41
|
const timestamp_schemas_1 = require("./timestamp.schemas");
|
|
9
|
-
exports.NavigationItemEntityBaseSchema =
|
|
42
|
+
exports.NavigationItemEntityBaseSchema = z
|
|
10
43
|
.object({
|
|
11
|
-
id:
|
|
12
|
-
parentId:
|
|
13
|
-
label:
|
|
14
|
-
description:
|
|
15
|
-
iconKey:
|
|
16
|
-
link:
|
|
17
|
-
routeComponentKey:
|
|
18
|
-
type:
|
|
19
|
-
disabled:
|
|
20
|
-
order:
|
|
44
|
+
id: z.number().int().positive(),
|
|
45
|
+
parentId: z.nullable(z.number().int().positive()),
|
|
46
|
+
label: z.string().min(1),
|
|
47
|
+
description: z.nullable(z.string().min(1)),
|
|
48
|
+
iconKey: z.nullable(icon_key_schema_1.IconKeySchema),
|
|
49
|
+
link: z.nullable(z.string().min(1)),
|
|
50
|
+
routeComponentKey: z.nullable(z.enum(constants_1.ROUTE_COMPONENT_KEYS)),
|
|
51
|
+
type: z.enum(constants_2.NAVIGATION_ITEM_TYPES),
|
|
52
|
+
disabled: z.boolean(),
|
|
53
|
+
order: z.number().int().positive(),
|
|
21
54
|
})
|
|
22
|
-
.
|
|
55
|
+
.extend(timestamp_schemas_1.TimestampSchema.shape);
|
|
23
56
|
exports.NavigationItemEntitySchema = exports.NavigationItemEntityBaseSchema.extend({
|
|
24
|
-
children:
|
|
57
|
+
children: z.lazy(() => z.array(exports.NavigationItemEntitySchema).optional()),
|
|
25
58
|
});
|
|
@@ -1,9 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.OrderSchema = void 0;
|
|
4
|
-
const
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
5
38
|
const order_direction_constant_1 = require("../constants/order-direction.constant");
|
|
6
|
-
exports.OrderSchema =
|
|
7
|
-
orderBy:
|
|
8
|
-
orderDir:
|
|
39
|
+
exports.OrderSchema = z.object({
|
|
40
|
+
orderBy: z.string().optional(),
|
|
41
|
+
orderDir: z.enum(order_direction_constant_1.ORDER_DIRECTION_VALUES).optional(),
|
|
9
42
|
});
|
|
@@ -1,16 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.PaginationRequestSchema = exports.PaginationResponseSchema = void 0;
|
|
4
|
-
const
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
5
38
|
const constants_1 = require("../constants");
|
|
6
|
-
exports.PaginationResponseSchema =
|
|
7
|
-
page:
|
|
8
|
-
pageSize:
|
|
9
|
-
total:
|
|
39
|
+
exports.PaginationResponseSchema = z.object({
|
|
40
|
+
page: z.coerce.number().positive(),
|
|
41
|
+
pageSize: z.coerce.number().positive(),
|
|
42
|
+
total: z.coerce.number().nonnegative(),
|
|
10
43
|
});
|
|
11
|
-
exports.PaginationRequestSchema =
|
|
12
|
-
page:
|
|
13
|
-
pageSize:
|
|
44
|
+
exports.PaginationRequestSchema = z.object({
|
|
45
|
+
page: z.coerce.number().positive().optional().default(constants_1.DEFAULT_PAGINATION_CONFIG.page),
|
|
46
|
+
pageSize: z.coerce
|
|
14
47
|
.number()
|
|
15
48
|
.positive()
|
|
16
49
|
.optional()
|
|
@@ -1,7 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.SearchSchema = void 0;
|
|
4
|
-
const
|
|
5
|
-
exports.SearchSchema =
|
|
6
|
-
searchText:
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
exports.SearchSchema = z.object({
|
|
39
|
+
searchText: z.string().min(1).optional(),
|
|
7
40
|
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.SlugSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const constants_1 = require("../constants");
|
|
39
|
+
exports.SlugSchema = z
|
|
40
|
+
.string()
|
|
41
|
+
.trim()
|
|
42
|
+
.min(constants_1.SLUG_CONFIG.minLength)
|
|
43
|
+
.max(constants_1.SLUG_CONFIG.maxLength)
|
|
44
|
+
.regex(constants_1.SLUG_CONFIG.regex)
|
|
45
|
+
.toLowerCase();
|