hh-contracts 0.0.2 → 0.0.3
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/build/dto/app-menu/get.query.js +2 -2
- package/build/models/navigation-item.schemas.js +5 -1
- package/dto/app-menu/get.query.ts +2 -2
- package/models/navigation-item.schemas.ts +6 -0
- package/package.json +1 -1
- package/build/dto/app-menu/app-menu-base.schema.js +0 -8
- package/dto/app-menu/app-menu-base.schema.ts +0 -8
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetAppMenuQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
6
|
const GetAppMenuQueryRequestSchema = zod_1.z.object({
|
|
7
7
|
userUuid: zod_1.z.string().uuid(),
|
|
8
8
|
});
|
|
9
9
|
const GetAppMenuQueryResponseSchema = zod_1.z.object({
|
|
10
|
-
appMenu: zod_1.z.array(
|
|
10
|
+
appMenu: zod_1.z.array(models_1.NavigationBaseSchema),
|
|
11
11
|
});
|
|
12
12
|
var GetAppMenuQuery;
|
|
13
13
|
(function (GetAppMenuQuery) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NavigationItemEntityWithChildrenSchema = void 0;
|
|
3
|
+
exports.NavigationBaseSchema = exports.NavigationItemEntityWithChildrenSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const constants_2 = require("../constants");
|
|
@@ -19,3 +19,7 @@ const NavigationItemEntitySchema = zod_1.z.object({
|
|
|
19
19
|
exports.NavigationItemEntityWithChildrenSchema = NavigationItemEntitySchema.extend({
|
|
20
20
|
children: zod_1.z.array(NavigationItemEntitySchema).optional(),
|
|
21
21
|
});
|
|
22
|
+
exports.NavigationBaseSchema = exports.NavigationItemEntityWithChildrenSchema.omit({
|
|
23
|
+
parentId: true,
|
|
24
|
+
order: true,
|
|
25
|
+
}).partial({ description: true, link: true, iconKey: true, routeComponentKey: true });
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { NavigationBaseSchema } from '../../models';
|
|
3
3
|
|
|
4
4
|
const GetAppMenuQueryRequestSchema = z.object({
|
|
5
5
|
userUuid: z.string().uuid(),
|
|
6
6
|
});
|
|
7
7
|
const GetAppMenuQueryResponseSchema = z.object({
|
|
8
|
-
appMenu: z.array(
|
|
8
|
+
appMenu: z.array(NavigationBaseSchema),
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
export namespace GetAppMenuQuery {
|
|
@@ -19,5 +19,11 @@ export const NavigationItemEntityWithChildrenSchema = NavigationItemEntitySchema
|
|
|
19
19
|
children: z.array(NavigationItemEntitySchema).optional(),
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
+
export const NavigationBaseSchema = NavigationItemEntityWithChildrenSchema.omit({
|
|
23
|
+
parentId: true,
|
|
24
|
+
order: true,
|
|
25
|
+
}).partial({ description: true, link: true, iconKey: true, routeComponentKey: true });
|
|
26
|
+
|
|
22
27
|
export type TNavigationItemEntity = z.infer<typeof NavigationItemEntitySchema>;
|
|
23
28
|
export type TNavigationItemWithChildren = z.infer<typeof NavigationItemEntityWithChildrenSchema>;
|
|
29
|
+
export type TNavigationBase = z.infer<typeof NavigationBaseSchema>;
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppMenuBaseSchema = void 0;
|
|
4
|
-
const models_1 = require("../../models");
|
|
5
|
-
exports.AppMenuBaseSchema = models_1.NavigationItemEntityWithChildrenSchema.omit({
|
|
6
|
-
parentId: true,
|
|
7
|
-
order: true,
|
|
8
|
-
}).partial({ description: true, link: true, iconKey: true, routeComponentKey: true });
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { NavigationItemEntityWithChildrenSchema } from '../../models';
|
|
3
|
-
|
|
4
|
-
export const AppMenuBaseSchema = NavigationItemEntityWithChildrenSchema.omit({
|
|
5
|
-
parentId: true,
|
|
6
|
-
order: true,
|
|
7
|
-
}).partial({ description: true, link: true, iconKey: true, routeComponentKey: true });
|
|
8
|
-
export type TAppMenuBase = z.infer<typeof AppMenuBaseSchema>;
|