hh-contracts 0.0.64 → 0.0.66

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.
@@ -130,7 +130,7 @@ exports.APP_ERRORS = {
130
130
  failed: {
131
131
  statusCode: 500, // HttpStatus.INTERNAL_SERVER_ERROR,
132
132
  code: 'TRANSLATE-01',
133
- messageKey: 'errors.translation.failed',
133
+ messageKey: 'errors.translate.failed',
134
134
  },
135
135
  },
136
136
  user: {
@@ -22,6 +22,7 @@ exports.ICON_KEYS = {
22
22
  delete: 'delete',
23
23
  search: 'search',
24
24
  language: 'language',
25
+ magic: 'magic',
25
26
  // close: 'close',
26
27
  // check: 'check',
27
28
  // closeFilled: 'closeFilled',
@@ -7,7 +7,7 @@ const translate_api_1 = require("../translate.api");
7
7
  const BatchTranslateContractRequestSchema = zod_1.z.object({
8
8
  text: zod_1.z.string().min(1),
9
9
  fromLang: common_1.LanguageKeysSchema,
10
- toLangs: zod_1.z.array(common_1.LanguageKeysSchema),
10
+ toLangs: zod_1.z.array(common_1.LanguageKeysSchema).min(1),
11
11
  });
12
12
  const TranslationsSchema = zod_1.z
13
13
  .object(Object.fromEntries(common_1.LANGUAGE_KEYS.map(l => [l, zod_1.z.string().min(1).nullable()])))
@@ -129,7 +129,7 @@ export const APP_ERRORS = {
129
129
  failed: {
130
130
  statusCode: 500, // HttpStatus.INTERNAL_SERVER_ERROR,
131
131
  code: 'TRANSLATE-01',
132
- messageKey: 'errors.translation.failed',
132
+ messageKey: 'errors.translate.failed',
133
133
  },
134
134
  },
135
135
  user: {
@@ -207,7 +207,7 @@ interface IError {
207
207
  messageKey: string;
208
208
  }
209
209
 
210
- type TMappedErrors<T extends Record<string, unknown>> = {
210
+ export type TMappedErrors<T extends Record<string, unknown>> = {
211
211
  [k in keyof T]: T[k] extends Record<string, unknown>
212
212
  ? T[k] extends IError
213
213
  ? T[k]
@@ -19,6 +19,7 @@ export const ICON_KEYS = {
19
19
  delete: 'delete',
20
20
  search: 'search',
21
21
  language: 'language',
22
+ magic: 'magic',
22
23
  // close: 'close',
23
24
  // check: 'check',
24
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hh-contracts",
3
- "version": "0.0.64",
3
+ "version": "0.0.66",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {
@@ -5,7 +5,7 @@ import { TRANSLATE_API, TRANSLATE_CONTROLLER } from '../translate.api';
5
5
  const BatchTranslateContractRequestSchema = z.object({
6
6
  text: z.string().min(1),
7
7
  fromLang: LanguageKeysSchema,
8
- toLangs: z.array(LanguageKeysSchema),
8
+ toLangs: z.array(LanguageKeysSchema).min(1),
9
9
  });
10
10
 
11
11
  const TranslationsSchema = z