hh-contracts 0.0.61 → 0.0.63
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.
|
@@ -127,6 +127,13 @@ exports.APP_ERRORS = {
|
|
|
127
127
|
messageKey: 'errors.translation.required',
|
|
128
128
|
},
|
|
129
129
|
},
|
|
130
|
+
translate: {
|
|
131
|
+
failed: {
|
|
132
|
+
statusCode: 500, // HttpStatus.INTERNAL_SERVER_ERROR,
|
|
133
|
+
code: 'TRANSLATE-01',
|
|
134
|
+
messageKey: 'errors.translation.failed',
|
|
135
|
+
},
|
|
136
|
+
},
|
|
130
137
|
user: {
|
|
131
138
|
notFound: {
|
|
132
139
|
statusCode: 404, // HttpStatus.NOT_FOUND,
|
|
@@ -10,7 +10,7 @@ const BatchTranslateContractRequestSchema = zod_1.z.object({
|
|
|
10
10
|
toLangs: zod_1.z.array(common_1.LanguageKeysSchema),
|
|
11
11
|
});
|
|
12
12
|
const TranslationsSchema = zod_1.z
|
|
13
|
-
.object(Object.fromEntries(common_1.LANGUAGE_KEYS.map(l => [l, zod_1.z.string().min(1)])))
|
|
13
|
+
.object(Object.fromEntries(common_1.LANGUAGE_KEYS.map(l => [l, zod_1.z.string().min(1).nullable()])))
|
|
14
14
|
.partial();
|
|
15
15
|
const BatchTranslateContractResponseSchema = zod_1.z.object({
|
|
16
16
|
translations: TranslationsSchema,
|
|
@@ -127,6 +127,13 @@ export const APP_ERRORS = {
|
|
|
127
127
|
messageKey: 'errors.translation.required',
|
|
128
128
|
},
|
|
129
129
|
},
|
|
130
|
+
translate: {
|
|
131
|
+
failed: {
|
|
132
|
+
statusCode: 500, // HttpStatus.INTERNAL_SERVER_ERROR,
|
|
133
|
+
code: 'TRANSLATE-01',
|
|
134
|
+
messageKey: 'errors.translation.failed',
|
|
135
|
+
},
|
|
136
|
+
},
|
|
130
137
|
user: {
|
|
131
138
|
notFound: {
|
|
132
139
|
statusCode: 404, // HttpStatus.NOT_FOUND,
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ const BatchTranslateContractRequestSchema = z.object({
|
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
const TranslationsSchema = z
|
|
12
|
-
.object(Object.fromEntries(LANGUAGE_KEYS.map(l => [l, z.string().min(1)])))
|
|
12
|
+
.object(Object.fromEntries(LANGUAGE_KEYS.map(l => [l, z.string().min(1).nullable()])))
|
|
13
13
|
.partial();
|
|
14
14
|
|
|
15
15
|
const BatchTranslateContractResponseSchema = z.object({
|