hh-contracts 0.0.2 → 0.0.4

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.
@@ -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 app_menu_base_schema_1 = require("./app-menu-base.schema");
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(app_menu_base_schema_1.AppMenuBaseSchema),
10
+ appMenu: zod_1.z.array(models_1.NavigationItemSchema),
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.NavigationItemSchema = 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.NavigationItemSchema = 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 { AppMenuBaseSchema } from './app-menu-base.schema';
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(AppMenuBaseSchema),
8
+ appMenu: z.array(NavigationItemSchema),
9
9
  });
10
10
 
11
11
  export namespace GetAppMenuQuery {
@@ -19,5 +19,13 @@ export const NavigationItemEntityWithChildrenSchema = NavigationItemEntitySchema
19
19
  children: z.array(NavigationItemEntitySchema).optional(),
20
20
  });
21
21
 
22
+ export const NavigationItemSchema = 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
- export type TNavigationItemWithChildren = z.infer<typeof NavigationItemEntityWithChildrenSchema>;
28
+ export type TNavigationItemEntityWithChildren = z.infer<
29
+ typeof NavigationItemEntityWithChildrenSchema
30
+ >;
31
+ export type TNavigationItem = z.infer<typeof NavigationItemSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hh-contracts",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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>;