hh-contracts 0.0.36 → 0.0.37

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LANGUAGE_KYES = exports.LANGUAGE = void 0;
3
+ exports.LANGUAGE_KEYS = exports.LANGUAGE = void 0;
4
4
  const icon_key_constant_1 = require("./icon-key.constant");
5
5
  exports.LANGUAGE = {
6
6
  en: {
@@ -18,4 +18,4 @@ exports.LANGUAGE = {
18
18
  postgressLocale: 'ru_RU',
19
19
  },
20
20
  };
21
- exports.LANGUAGE_KYES = Object.keys(exports.LANGUAGE);
21
+ exports.LANGUAGE_KEYS = Object.keys(exports.LANGUAGE);
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LanguageKeysSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const constants_1 = require("../constants");
6
- exports.LanguageKeysSchema = zod_1.z.enum(constants_1.LANGUAGE_KYES, {
6
+ exports.LanguageKeysSchema = zod_1.z.enum(constants_1.LANGUAGE_KEYS, {
7
7
  invalid_type_error: 'languageInvalid',
8
8
  required_error: 'languageRequired',
9
9
  });
@@ -10,7 +10,7 @@ const BaseQuerySchema = permission_models_1.PermissionListItemSchema.pick({
10
10
  action: true,
11
11
  }).partial();
12
12
  const OrderBySchema = permission_models_1.PermissionListItemSchema.keyof().optional();
13
- const FindManyPermissionsContractRequestSchema = BaseQuerySchema.merge(common_1.CommonQueryParamsSchema).extend({ orderBy: OrderBySchema, lang: zod_1.z.enum(common_1.LANGUAGE_KYES).optional() });
13
+ const FindManyPermissionsContractRequestSchema = BaseQuerySchema.merge(common_1.CommonQueryParamsSchema).extend({ orderBy: OrderBySchema, lang: zod_1.z.enum(common_1.LANGUAGE_KEYS).optional() });
14
14
  const FindManyPermissionsContractResponseSchema = zod_1.z
15
15
  .object({
16
16
  permissions: zod_1.z.array(permission_models_1.PermissionListItemSchema),
@@ -22,4 +22,4 @@ export type TLanguage = keyof typeof LANGUAGE;
22
22
  export type TLocale = (typeof LANGUAGE)[TLanguage]['locale'];
23
23
  export type TPostgresLocale = (typeof LANGUAGE)[TLanguage]['postgressLocale'];
24
24
 
25
- export const LANGUAGE_KYES = Object.keys(LANGUAGE) as [TLanguage, ...TLanguage[]];
25
+ export const LANGUAGE_KEYS = Object.keys(LANGUAGE) as [TLanguage, ...TLanguage[]];
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
- import { LANGUAGE_KYES } from '../constants';
2
+ import { LANGUAGE_KEYS } from '../constants';
3
3
 
4
- export const LanguageKeysSchema = z.enum(LANGUAGE_KYES, {
4
+ export const LanguageKeysSchema = z.enum(LANGUAGE_KEYS, {
5
5
  invalid_type_error: 'languageInvalid',
6
6
  required_error: 'languageRequired',
7
7
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hh-contracts",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {
@@ -3,7 +3,7 @@ import {
3
3
  HTTP_METHOD,
4
4
  CommonQueryParamsSchema,
5
5
  PaginationResponseSchema,
6
- LANGUAGE_KYES,
6
+ LANGUAGE_KEYS,
7
7
  } from '../../common';
8
8
  import { PermissionListItemSchema } from '../permission.models';
9
9
  import { PERMISSIONS_API, PERMISSIONS_CONTROLLER } from '../permissions.api';
@@ -17,7 +17,7 @@ const OrderBySchema = PermissionListItemSchema.keyof().optional();
17
17
 
18
18
  const FindManyPermissionsContractRequestSchema = BaseQuerySchema.merge(
19
19
  CommonQueryParamsSchema,
20
- ).extend({ orderBy: OrderBySchema, lang: z.enum(LANGUAGE_KYES).optional() });
20
+ ).extend({ orderBy: OrderBySchema, lang: z.enum(LANGUAGE_KEYS).optional() });
21
21
 
22
22
  const FindManyPermissionsContractResponseSchema = z
23
23
  .object({