hh-contracts 0.0.0 → 0.0.1
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/constants/navigation-item-type.constant.js +1 -1
- package/build/dto/app-menu/get.query.js +1 -1
- package/build/models/index.js +1 -1
- package/build/models/{app-menu-item.schema.js → navigation-item.schemas.js} +4 -4
- package/constants/navigation-item-type.constant.ts +1 -1
- package/dto/app-menu/get.query.ts +2 -2
- package/models/index.ts +1 -1
- package/models/{app-menu-item.schema.ts → navigation-item.schemas.ts} +4 -5
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ 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(models_1.
|
|
10
|
+
appMenu: zod_1.z.array(models_1.NavigationItemSchema),
|
|
11
11
|
});
|
|
12
12
|
var GetAppMenuQuery;
|
|
13
13
|
(function (GetAppMenuQuery) {
|
package/build/models/index.js
CHANGED
|
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./navigation-item.schemas"), exports);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.NavigationItemSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const constants_2 = require("../constants");
|
|
7
|
-
|
|
7
|
+
const NavigationItemBaseSchema = zod_1.z.object({
|
|
8
8
|
id: zod_1.z.number().int().positive(),
|
|
9
9
|
label: zod_1.z.string().min(1),
|
|
10
10
|
icon: zod_1.z.nullable(zod_1.z.nativeEnum(constants_1.IconKeys)),
|
|
@@ -14,6 +14,6 @@ exports.AppMenuItemSchema = zod_1.z.object({
|
|
|
14
14
|
disabled: zod_1.z.boolean().default(false),
|
|
15
15
|
tooltip: zod_1.z.nullable(zod_1.z.string().min(1)),
|
|
16
16
|
});
|
|
17
|
-
exports.
|
|
18
|
-
children: zod_1.z.array(
|
|
17
|
+
exports.NavigationItemSchema = NavigationItemBaseSchema.extend({
|
|
18
|
+
children: zod_1.z.array(NavigationItemBaseSchema).optional(),
|
|
19
19
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { NavigationItemSchema } 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(NavigationItemSchema),
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
export namespace GetAppMenuQuery {
|
package/models/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './navigation-item.schemas';
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { IconKeys, RouteComponentKeys } from '../constants';
|
|
3
3
|
import { NavigationItemType } from '../constants';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const NavigationItemBaseSchema = z.object({
|
|
6
6
|
id: z.number().int().positive(),
|
|
7
7
|
label: z.string().min(1),
|
|
8
8
|
icon: z.nullable(z.nativeEnum(IconKeys)),
|
|
@@ -13,9 +13,8 @@ export const AppMenuItemSchema = z.object({
|
|
|
13
13
|
tooltip: z.nullable(z.string().min(1)),
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
export const
|
|
17
|
-
children: z.array(
|
|
16
|
+
export const NavigationItemSchema = NavigationItemBaseSchema.extend({
|
|
17
|
+
children: z.array(NavigationItemBaseSchema).optional(),
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
export type
|
|
21
|
-
export type TAppMenuItemWithChildren = z.infer<typeof AppMenuItemWithChildrenSchema>;
|
|
20
|
+
export type TNavigationItem = z.infer<typeof NavigationItemSchema>;
|