@lokalise/polyglot-sdk 21.0.0 → 21.0.2
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/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/sdk/helpers/removeUnicodeNullCharacters.d.ts +1 -0
- package/dist/sdk/helpers/removeUnicodeNullCharacters.js +4 -0
- package/dist/sdk/helpers/removeUnicodeNullCharacters.js.map +1 -0
- package/dist/sdk/schemas/common/commonSchemas.d.ts +19 -4
- package/dist/sdk/schemas/common/commonSchemas.js +23 -5
- package/dist/sdk/schemas/common/commonSchemas.js.map +1 -1
- package/dist/sdk/schemas/common/translationContextSchemas.d.ts +19 -19
- package/dist/sdk/schemas/common/translationContextSchemas.js +16 -8
- package/dist/sdk/schemas/common/translationContextSchemas.js.map +1 -1
- package/dist/sdk/schemas/lqa/commonSchemas.d.ts +330 -0
- package/dist/sdk/schemas/lqa/commonSchemas.js +69 -0
- package/dist/sdk/schemas/lqa/commonSchemas.js.map +1 -1
- package/dist/sdk/schemas/lqa/lqaAsyncSchemas.d.ts +118 -213
- package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js +3 -51
- package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js.map +1 -1
- package/dist/sdk/schemas/lqa/lqaSyncSchemas.d.ts +118 -214
- package/dist/sdk/schemas/lqa/lqaSyncSchemas.js +3 -51
- package/dist/sdk/schemas/lqa/lqaSyncSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/generateVariants.d.ts +15 -15
- package/dist/sdk/schemas/translation/generateVariants.js +7 -1
- package/dist/sdk/schemas/translation/generateVariants.js.map +1 -1
- package/dist/sdk/schemas/translation/rewriteTextSchemas.d.ts +156 -28
- package/dist/sdk/schemas/translation/rewriteTextSchemas.js +10 -3
- package/dist/sdk/schemas/translation/rewriteTextSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/sharedSchemas.d.ts +17 -18
- package/dist/sdk/schemas/translation/sharedSchemas.js +23 -24
- package/dist/sdk/schemas/translation/sharedSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/translateAsyncSchemas.d.ts +13 -13
- package/dist/sdk/schemas/translation/translateAsyncSchemas.js +2 -2
- package/dist/sdk/schemas/translation/translateAsyncSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/translateSyncSchemas.d.ts +252 -14
- package/dist/sdk/schemas/translation/translateSyncSchemas.js +11 -3
- package/dist/sdk/schemas/translation/translateSyncSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/translateTextSegmentSchemas.d.ts +11 -11
- package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js +8 -7
- package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js.map +1 -1
- package/package.json +6 -7
|
@@ -20,9 +20,9 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
20
20
|
pickIntegrationByScore: z.ZodDefault<z.ZodBoolean>;
|
|
21
21
|
includeScore: z.ZodDefault<z.ZodBoolean>;
|
|
22
22
|
context: z.ZodOptional<z.ZodObject<{
|
|
23
|
-
description: z.ZodOptional<z.ZodString
|
|
23
|
+
description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
24
24
|
styleGuide: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
25
|
-
text: z.ZodString
|
|
25
|
+
text: z.ZodEffects<z.ZodString, string, string>;
|
|
26
26
|
}, "strip", z.ZodTypeAny, {
|
|
27
27
|
text: string;
|
|
28
28
|
}, {
|
|
@@ -55,14 +55,14 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
55
55
|
}>]>>;
|
|
56
56
|
glossary: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
57
57
|
term: z.ZodString;
|
|
58
|
-
description: z.ZodOptional<z.ZodString
|
|
58
|
+
description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
59
59
|
translatable: z.ZodDefault<z.ZodBoolean>;
|
|
60
60
|
forbidden: z.ZodDefault<z.ZodBoolean>;
|
|
61
61
|
caseSensitive: z.ZodDefault<z.ZodBoolean>;
|
|
62
62
|
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
63
63
|
locale: z.ZodEffects<z.ZodString, string, string>;
|
|
64
|
-
translation: z.ZodString
|
|
65
|
-
description: z.ZodOptional<z.ZodString
|
|
64
|
+
translation: z.ZodEffects<z.ZodString, string, string>;
|
|
65
|
+
description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
66
66
|
}, "strip", z.ZodTypeAny, {
|
|
67
67
|
translation: string;
|
|
68
68
|
locale: string;
|
|
@@ -119,8 +119,8 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
119
119
|
}>, "many">>;
|
|
120
120
|
targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
|
|
121
121
|
translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
122
|
-
sourceValue: z.ZodString
|
|
123
|
-
translatedValue: z.ZodString
|
|
122
|
+
sourceValue: z.ZodEffects<z.ZodString, string, string>;
|
|
123
|
+
translatedValue: z.ZodEffects<z.ZodString, string, string>;
|
|
124
124
|
}, "strip", z.ZodTypeAny, {
|
|
125
125
|
sourceValue: string;
|
|
126
126
|
translatedValue: string;
|
|
@@ -235,7 +235,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
235
235
|
contentUnits: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
236
236
|
id: z.ZodString;
|
|
237
237
|
context: z.ZodOptional<z.ZodObject<{
|
|
238
|
-
description: z.ZodString
|
|
238
|
+
description: z.ZodEffects<z.ZodString, string, string>;
|
|
239
239
|
}, "strip", z.ZodTypeAny, {
|
|
240
240
|
description: string;
|
|
241
241
|
}, {
|
|
@@ -245,8 +245,8 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
245
245
|
segments: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
246
246
|
id: z.ZodString;
|
|
247
247
|
tmMatch: z.ZodOptional<z.ZodObject<{
|
|
248
|
-
sourceValue: z.ZodString
|
|
249
|
-
translatedValue: z.ZodString
|
|
248
|
+
sourceValue: z.ZodEffects<z.ZodString, string, string>;
|
|
249
|
+
translatedValue: z.ZodEffects<z.ZodString, string, string>;
|
|
250
250
|
}, "strip", z.ZodTypeAny, {
|
|
251
251
|
sourceValue: string;
|
|
252
252
|
translatedValue: string;
|
|
@@ -255,8 +255,8 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
255
255
|
translatedValue: string;
|
|
256
256
|
}>>;
|
|
257
257
|
translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
258
|
-
sourceValue: z.ZodString
|
|
259
|
-
translatedValue: z.ZodString
|
|
258
|
+
sourceValue: z.ZodEffects<z.ZodString, string, string>;
|
|
259
|
+
translatedValue: z.ZodEffects<z.ZodString, string, string>;
|
|
260
260
|
}, "strip", z.ZodTypeAny, {
|
|
261
261
|
sourceValue: string;
|
|
262
262
|
translatedValue: string;
|
|
@@ -264,7 +264,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
264
264
|
sourceValue: string;
|
|
265
265
|
translatedValue: string;
|
|
266
266
|
}>, "many">>;
|
|
267
|
-
value: z.ZodString
|
|
267
|
+
value: z.ZodEffects<z.ZodString, string, string>;
|
|
268
268
|
}, "strip", z.ZodTypeAny, {
|
|
269
269
|
value: string;
|
|
270
270
|
id: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
2
|
import { ASYNC_REQUEST_SCHEMA, AsyncRequestCallbackStatusEnum, } from "../common/asyncRequestSchemas.js";
|
|
3
|
-
import { COMMON_ERROR_RESPONSE_SCHEMA, COMMON_FAILED_OPERATION_CALLBACK_SCHEMA, COMMON_REQUEST_HEADERS_SCHEMA, FORCE_INTEGRATION_SCHEMA, LOCALE_SCHEMA, METADATA_SCHEMA, REAL_INTEGRATION_ENGINE_SCHEMA, refineIntegrationIsPresent, } from "../common/commonSchemas.js";
|
|
3
|
+
import { COMMON_ERROR_RESPONSE_SCHEMA, COMMON_FAILED_OPERATION_CALLBACK_SCHEMA, COMMON_REQUEST_HEADERS_SCHEMA, CONTENT_ID_PROP_SCHEMA, FORCE_INTEGRATION_SCHEMA, LOCALE_SCHEMA, METADATA_SCHEMA, REAL_INTEGRATION_ENGINE_SCHEMA, refineIntegrationIsPresent, } from "../common/commonSchemas.js";
|
|
4
4
|
import { TRANSLATION_CONTEXT_SCHEMA } from "../common/translationContextSchemas.js";
|
|
5
5
|
import { LqaIssueSeverityEnum } from "../lqa/commonSchemas.js";
|
|
6
|
-
import {
|
|
6
|
+
import { SEGMENT_WARNINGS_SCHEMA, TRANSLATE_CONTENT_UNIT_SCHEMA, refineDifferentSourceAndTargetLang, refineRequestSizeLimit, refineUniqueIds, } from "./sharedSchemas.js";
|
|
7
7
|
const CONTENT_UNITS_MAX_LENGTH = 50;
|
|
8
8
|
export const TRANSLATE_ASYNC_BODY_SCHEMA = ASYNC_REQUEST_SCHEMA.extend({
|
|
9
9
|
sourceLocale: LOCALE_SCHEMA,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translateAsyncSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/translateAsyncSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AACnB,OAAO,EACL,oBAAoB,EACpB,8BAA8B,GAC/B,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,4BAA4B,EAC5B,uCAAuC,EACvC,6BAA6B,EAC7B,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAA;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"translateAsyncSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/translateAsyncSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AACnB,OAAO,EACL,oBAAoB,EACpB,8BAA8B,GAC/B,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,4BAA4B,EAC5B,uCAAuC,EACvC,6BAA6B,EAC7B,sBAAsB,EACtB,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAA;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,kCAAkC,EAClC,sBAAsB,EACtB,eAAe,GAChB,MAAM,oBAAoB,CAAA;AAE3B,MAAM,wBAAwB,GAAG,EAAE,CAAA;AAE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G,CAAC;KAC7C,kBAAkB,CAAC,QAAQ,EAAE;IAC5B,8BAA8B;IAC9B,uCAAuC;CACxC,CAAC;KACD,QAAQ,CAAC,wBAAwB,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
-
export declare const TRANSLATE_SYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
2
|
+
export declare const TRANSLATE_SYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
3
3
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
4
4
|
ownerId: z.ZodOptional<z.ZodString>;
|
|
5
5
|
sourceLocale: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -15,9 +15,9 @@ export declare const TRANSLATE_SYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zod
|
|
|
15
15
|
}>>;
|
|
16
16
|
forceIntegration: z.ZodOptional<z.ZodBoolean>;
|
|
17
17
|
context: z.ZodOptional<z.ZodObject<{
|
|
18
|
-
description: z.ZodOptional<z.ZodString
|
|
18
|
+
description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
19
19
|
styleGuide: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
20
|
-
text: z.ZodString
|
|
20
|
+
text: z.ZodEffects<z.ZodString, string, string>;
|
|
21
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
22
|
text: string;
|
|
23
23
|
}, {
|
|
@@ -50,14 +50,14 @@ export declare const TRANSLATE_SYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zod
|
|
|
50
50
|
}>]>>;
|
|
51
51
|
glossary: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
52
52
|
term: z.ZodString;
|
|
53
|
-
description: z.ZodOptional<z.ZodString
|
|
53
|
+
description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
54
54
|
translatable: z.ZodDefault<z.ZodBoolean>;
|
|
55
55
|
forbidden: z.ZodDefault<z.ZodBoolean>;
|
|
56
56
|
caseSensitive: z.ZodDefault<z.ZodBoolean>;
|
|
57
57
|
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
58
58
|
locale: z.ZodEffects<z.ZodString, string, string>;
|
|
59
|
-
translation: z.ZodString
|
|
60
|
-
description: z.ZodOptional<z.ZodString
|
|
59
|
+
translation: z.ZodEffects<z.ZodString, string, string>;
|
|
60
|
+
description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
61
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
62
|
translation: string;
|
|
63
63
|
locale: string;
|
|
@@ -114,8 +114,8 @@ export declare const TRANSLATE_SYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zod
|
|
|
114
114
|
}>, "many">>;
|
|
115
115
|
targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
|
|
116
116
|
translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
117
|
-
sourceValue: z.ZodString
|
|
118
|
-
translatedValue: z.ZodString
|
|
117
|
+
sourceValue: z.ZodEffects<z.ZodString, string, string>;
|
|
118
|
+
translatedValue: z.ZodEffects<z.ZodString, string, string>;
|
|
119
119
|
}, "strip", z.ZodTypeAny, {
|
|
120
120
|
sourceValue: string;
|
|
121
121
|
translatedValue: string;
|
|
@@ -230,7 +230,7 @@ export declare const TRANSLATE_SYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zod
|
|
|
230
230
|
contentUnits: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
231
231
|
id: z.ZodString;
|
|
232
232
|
context: z.ZodOptional<z.ZodObject<{
|
|
233
|
-
description: z.ZodString
|
|
233
|
+
description: z.ZodEffects<z.ZodString, string, string>;
|
|
234
234
|
}, "strip", z.ZodTypeAny, {
|
|
235
235
|
description: string;
|
|
236
236
|
}, {
|
|
@@ -240,8 +240,8 @@ export declare const TRANSLATE_SYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zod
|
|
|
240
240
|
segments: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
241
241
|
id: z.ZodString;
|
|
242
242
|
tmMatch: z.ZodOptional<z.ZodObject<{
|
|
243
|
-
sourceValue: z.ZodString
|
|
244
|
-
translatedValue: z.ZodString
|
|
243
|
+
sourceValue: z.ZodEffects<z.ZodString, string, string>;
|
|
244
|
+
translatedValue: z.ZodEffects<z.ZodString, string, string>;
|
|
245
245
|
}, "strip", z.ZodTypeAny, {
|
|
246
246
|
sourceValue: string;
|
|
247
247
|
translatedValue: string;
|
|
@@ -250,8 +250,8 @@ export declare const TRANSLATE_SYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zod
|
|
|
250
250
|
translatedValue: string;
|
|
251
251
|
}>>;
|
|
252
252
|
translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
253
|
-
sourceValue: z.ZodString
|
|
254
|
-
translatedValue: z.ZodString
|
|
253
|
+
sourceValue: z.ZodEffects<z.ZodString, string, string>;
|
|
254
|
+
translatedValue: z.ZodEffects<z.ZodString, string, string>;
|
|
255
255
|
}, "strip", z.ZodTypeAny, {
|
|
256
256
|
sourceValue: string;
|
|
257
257
|
translatedValue: string;
|
|
@@ -259,7 +259,7 @@ export declare const TRANSLATE_SYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zod
|
|
|
259
259
|
sourceValue: string;
|
|
260
260
|
translatedValue: string;
|
|
261
261
|
}>, "many">>;
|
|
262
|
-
value: z.ZodString
|
|
262
|
+
value: z.ZodEffects<z.ZodString, string, string>;
|
|
263
263
|
}, "strip", z.ZodTypeAny, {
|
|
264
264
|
value: string;
|
|
265
265
|
id: string;
|
|
@@ -1476,6 +1476,244 @@ export declare const TRANSLATE_SYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zod
|
|
|
1476
1476
|
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1477
1477
|
} | null> | undefined;
|
|
1478
1478
|
tenantId?: string | undefined;
|
|
1479
|
+
}>, {
|
|
1480
|
+
sourceLocale: string;
|
|
1481
|
+
contentUnits: [{
|
|
1482
|
+
segments: [{
|
|
1483
|
+
value: string;
|
|
1484
|
+
id: string;
|
|
1485
|
+
tmMatch?: {
|
|
1486
|
+
sourceValue: string;
|
|
1487
|
+
translatedValue: string;
|
|
1488
|
+
} | undefined;
|
|
1489
|
+
translationExamples?: {
|
|
1490
|
+
sourceValue: string;
|
|
1491
|
+
translatedValue: string;
|
|
1492
|
+
}[] | undefined;
|
|
1493
|
+
}, ...{
|
|
1494
|
+
value: string;
|
|
1495
|
+
id: string;
|
|
1496
|
+
tmMatch?: {
|
|
1497
|
+
sourceValue: string;
|
|
1498
|
+
translatedValue: string;
|
|
1499
|
+
} | undefined;
|
|
1500
|
+
translationExamples?: {
|
|
1501
|
+
sourceValue: string;
|
|
1502
|
+
translatedValue: string;
|
|
1503
|
+
}[] | undefined;
|
|
1504
|
+
}[]];
|
|
1505
|
+
id: string;
|
|
1506
|
+
context?: {
|
|
1507
|
+
description: string;
|
|
1508
|
+
} | undefined;
|
|
1509
|
+
characterLimit?: number | undefined;
|
|
1510
|
+
}, ...{
|
|
1511
|
+
segments: [{
|
|
1512
|
+
value: string;
|
|
1513
|
+
id: string;
|
|
1514
|
+
tmMatch?: {
|
|
1515
|
+
sourceValue: string;
|
|
1516
|
+
translatedValue: string;
|
|
1517
|
+
} | undefined;
|
|
1518
|
+
translationExamples?: {
|
|
1519
|
+
sourceValue: string;
|
|
1520
|
+
translatedValue: string;
|
|
1521
|
+
}[] | undefined;
|
|
1522
|
+
}, ...{
|
|
1523
|
+
value: string;
|
|
1524
|
+
id: string;
|
|
1525
|
+
tmMatch?: {
|
|
1526
|
+
sourceValue: string;
|
|
1527
|
+
translatedValue: string;
|
|
1528
|
+
} | undefined;
|
|
1529
|
+
translationExamples?: {
|
|
1530
|
+
sourceValue: string;
|
|
1531
|
+
translatedValue: string;
|
|
1532
|
+
}[] | undefined;
|
|
1533
|
+
}[]];
|
|
1534
|
+
id: string;
|
|
1535
|
+
context?: {
|
|
1536
|
+
description: string;
|
|
1537
|
+
} | undefined;
|
|
1538
|
+
characterLimit?: number | undefined;
|
|
1539
|
+
}[]];
|
|
1540
|
+
targetLocale: string;
|
|
1541
|
+
ownerId?: string | undefined;
|
|
1542
|
+
context?: {
|
|
1543
|
+
translationExamples?: {
|
|
1544
|
+
sourceValue: string;
|
|
1545
|
+
translatedValue: string;
|
|
1546
|
+
}[] | undefined;
|
|
1547
|
+
description?: string | undefined;
|
|
1548
|
+
styleGuide?: {
|
|
1549
|
+
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
1550
|
+
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
1551
|
+
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
1552
|
+
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
1553
|
+
} | {
|
|
1554
|
+
text: string;
|
|
1555
|
+
} | undefined;
|
|
1556
|
+
glossary?: {
|
|
1557
|
+
term: string;
|
|
1558
|
+
translatable: boolean;
|
|
1559
|
+
forbidden: boolean;
|
|
1560
|
+
caseSensitive: boolean;
|
|
1561
|
+
description?: string | undefined;
|
|
1562
|
+
translations?: {
|
|
1563
|
+
translation: string;
|
|
1564
|
+
locale: string;
|
|
1565
|
+
description?: string | undefined;
|
|
1566
|
+
}[] | undefined;
|
|
1567
|
+
}[] | undefined;
|
|
1568
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
1569
|
+
} | undefined;
|
|
1570
|
+
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
1571
|
+
forceIntegration?: boolean | undefined;
|
|
1572
|
+
metadata?: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
1573
|
+
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
1574
|
+
} | null)[] | {
|
|
1575
|
+
[key: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1576
|
+
} | null)[] | {
|
|
1577
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1578
|
+
} | null)[] | {
|
|
1579
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1580
|
+
} | null)[] | {
|
|
1581
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1582
|
+
} | null)[] | {
|
|
1583
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1584
|
+
} | null)[] | {
|
|
1585
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1586
|
+
} | null)[] | {
|
|
1587
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1588
|
+
} | null)[] | {
|
|
1589
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1590
|
+
} | null)[] | {
|
|
1591
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1592
|
+
} | null)[] | {
|
|
1593
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1594
|
+
} | null)[] | {
|
|
1595
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1596
|
+
} | null> | undefined;
|
|
1597
|
+
tenantId?: string | undefined;
|
|
1598
|
+
}, {
|
|
1599
|
+
sourceLocale: string;
|
|
1600
|
+
contentUnits: [{
|
|
1601
|
+
segments: [{
|
|
1602
|
+
value: string;
|
|
1603
|
+
id: string;
|
|
1604
|
+
tmMatch?: {
|
|
1605
|
+
sourceValue: string;
|
|
1606
|
+
translatedValue: string;
|
|
1607
|
+
} | undefined;
|
|
1608
|
+
translationExamples?: {
|
|
1609
|
+
sourceValue: string;
|
|
1610
|
+
translatedValue: string;
|
|
1611
|
+
}[] | undefined;
|
|
1612
|
+
}, ...{
|
|
1613
|
+
value: string;
|
|
1614
|
+
id: string;
|
|
1615
|
+
tmMatch?: {
|
|
1616
|
+
sourceValue: string;
|
|
1617
|
+
translatedValue: string;
|
|
1618
|
+
} | undefined;
|
|
1619
|
+
translationExamples?: {
|
|
1620
|
+
sourceValue: string;
|
|
1621
|
+
translatedValue: string;
|
|
1622
|
+
}[] | undefined;
|
|
1623
|
+
}[]];
|
|
1624
|
+
id: string;
|
|
1625
|
+
context?: {
|
|
1626
|
+
description: string;
|
|
1627
|
+
} | undefined;
|
|
1628
|
+
characterLimit?: number | undefined;
|
|
1629
|
+
}, ...{
|
|
1630
|
+
segments: [{
|
|
1631
|
+
value: string;
|
|
1632
|
+
id: string;
|
|
1633
|
+
tmMatch?: {
|
|
1634
|
+
sourceValue: string;
|
|
1635
|
+
translatedValue: string;
|
|
1636
|
+
} | undefined;
|
|
1637
|
+
translationExamples?: {
|
|
1638
|
+
sourceValue: string;
|
|
1639
|
+
translatedValue: string;
|
|
1640
|
+
}[] | undefined;
|
|
1641
|
+
}, ...{
|
|
1642
|
+
value: string;
|
|
1643
|
+
id: string;
|
|
1644
|
+
tmMatch?: {
|
|
1645
|
+
sourceValue: string;
|
|
1646
|
+
translatedValue: string;
|
|
1647
|
+
} | undefined;
|
|
1648
|
+
translationExamples?: {
|
|
1649
|
+
sourceValue: string;
|
|
1650
|
+
translatedValue: string;
|
|
1651
|
+
}[] | undefined;
|
|
1652
|
+
}[]];
|
|
1653
|
+
id: string;
|
|
1654
|
+
context?: {
|
|
1655
|
+
description: string;
|
|
1656
|
+
} | undefined;
|
|
1657
|
+
characterLimit?: number | undefined;
|
|
1658
|
+
}[]];
|
|
1659
|
+
targetLocale: string;
|
|
1660
|
+
ownerId?: string | undefined;
|
|
1661
|
+
context?: {
|
|
1662
|
+
translationExamples?: {
|
|
1663
|
+
sourceValue: string;
|
|
1664
|
+
translatedValue: string;
|
|
1665
|
+
}[] | undefined;
|
|
1666
|
+
description?: string | undefined;
|
|
1667
|
+
styleGuide?: {
|
|
1668
|
+
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
1669
|
+
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
1670
|
+
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
1671
|
+
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
1672
|
+
} | {
|
|
1673
|
+
text: string;
|
|
1674
|
+
} | undefined;
|
|
1675
|
+
glossary?: {
|
|
1676
|
+
term: string;
|
|
1677
|
+
description?: string | undefined;
|
|
1678
|
+
translatable?: boolean | undefined;
|
|
1679
|
+
forbidden?: boolean | undefined;
|
|
1680
|
+
caseSensitive?: boolean | undefined;
|
|
1681
|
+
translations?: {
|
|
1682
|
+
translation: string;
|
|
1683
|
+
locale: string;
|
|
1684
|
+
description?: string | undefined;
|
|
1685
|
+
}[] | undefined;
|
|
1686
|
+
}[] | undefined;
|
|
1687
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
1688
|
+
} | undefined;
|
|
1689
|
+
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
1690
|
+
forceIntegration?: boolean | undefined;
|
|
1691
|
+
metadata?: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
1692
|
+
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
1693
|
+
} | null)[] | {
|
|
1694
|
+
[key: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1695
|
+
} | null)[] | {
|
|
1696
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1697
|
+
} | null)[] | {
|
|
1698
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1699
|
+
} | null)[] | {
|
|
1700
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1701
|
+
} | null)[] | {
|
|
1702
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1703
|
+
} | null)[] | {
|
|
1704
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1705
|
+
} | null)[] | {
|
|
1706
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1707
|
+
} | null)[] | {
|
|
1708
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1709
|
+
} | null)[] | {
|
|
1710
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1711
|
+
} | null)[] | {
|
|
1712
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1713
|
+
} | null)[] | {
|
|
1714
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1715
|
+
} | null> | undefined;
|
|
1716
|
+
tenantId?: string | undefined;
|
|
1479
1717
|
}>;
|
|
1480
1718
|
export declare const TRANSLATE_SYNC_HEADERS_SCHEMA: z.ZodObject<{
|
|
1481
1719
|
'x-fake-processing': z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
2
|
import { OWNER_ID_SCHEMA, TENANT_ID_SCHEMA } from "../common/asyncRequestSchemas.js";
|
|
3
|
-
import { COMMON_ERROR_RESPONSE_SCHEMA, COMMON_REQUEST_HEADERS_SCHEMA, FORCE_INTEGRATION_SCHEMA, LOCALE_SCHEMA, METADATA_SCHEMA, REAL_INTEGRATION_ENGINE_SCHEMA, refineIntegrationIsPresent, } from "../common/commonSchemas.js";
|
|
3
|
+
import { COMMON_ERROR_RESPONSE_SCHEMA, COMMON_REQUEST_HEADERS_SCHEMA, CONTENT_ID_PROP_SCHEMA, FORCE_INTEGRATION_SCHEMA, LOCALE_SCHEMA, METADATA_SCHEMA, REAL_INTEGRATION_ENGINE_SCHEMA, refineIntegrationIsPresent, } from "../common/commonSchemas.js";
|
|
4
4
|
import { TRANSLATION_CONTEXT_SCHEMA } from "../common/translationContextSchemas.js";
|
|
5
|
-
import {
|
|
5
|
+
import { SEGMENT_WARNINGS_SCHEMA, TRANSLATE_CONTENT_UNIT_SCHEMA, refineDifferentSourceAndTargetLang, refineRequestSizeLimit, refineUniqueIds, } from "./sharedSchemas.js";
|
|
6
6
|
// See https://lokalise.slack.com/archives/C05FLMT3GQK/p1730293588636539 for context
|
|
7
7
|
const CONTENT_UNITS_MAX_LENGTH = 50;
|
|
8
8
|
export const TRANSLATE_SYNC_BODY_SCHEMA = z
|
|
@@ -23,7 +23,15 @@ export const TRANSLATE_SYNC_BODY_SCHEMA = z
|
|
|
23
23
|
})
|
|
24
24
|
.refine(...refineDifferentSourceAndTargetLang)
|
|
25
25
|
.refine(...refineRequestSizeLimit)
|
|
26
|
-
.refine(...refineIntegrationIsPresent)
|
|
26
|
+
.refine(...refineIntegrationIsPresent)
|
|
27
|
+
// Copy deprecated `translationExamples` from `context` to first `segment`
|
|
28
|
+
.transform((body) => {
|
|
29
|
+
if (body.context?.translationExamples &&
|
|
30
|
+
!body.contentUnits[0].segments[0].translationExamples) {
|
|
31
|
+
body.contentUnits[0].segments[0].translationExamples = body.context?.translationExamples;
|
|
32
|
+
}
|
|
33
|
+
return body;
|
|
34
|
+
});
|
|
27
35
|
export const TRANSLATE_SYNC_HEADERS_SCHEMA = COMMON_REQUEST_HEADERS_SCHEMA;
|
|
28
36
|
export const TRANSLATE_SYNC_RESPONSE_SCHEMA = z
|
|
29
37
|
.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translateSyncSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/translateSyncSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACpF,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAA;AACnF,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"translateSyncSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/translateSyncSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACpF,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,sBAAsB,EACtB,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAA;AACnF,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,kCAAkC,EAClC,sBAAsB,EACtB,eAAe,GAChB,MAAM,oBAAoB,CAAA;AAE3B,oFAAoF;AACpF,MAAM,wBAAwB,GAAG,EAAE,CAAA;AAEnC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACxC,MAAM,CAAC;IACN,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,EAAE;IACrC,OAAO,EAAE,eAAe,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,aAAa;IAC3B,YAAY,EAAE,aAAa;IAC3B,WAAW,EAAE,8BAA8B,CAAC,QAAQ,EAAE;IACtD,gBAAgB,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IACrD,OAAO,EAAE,0BAA0B,CAAC,QAAQ,EAAE;IAC9C,QAAQ,EAAE,eAAe;IACzB,YAAY,EAAE,CAAC;SACZ,KAAK,CAAC,6BAA6B,CAAC;SACpC,QAAQ,EAAE;SACV,GAAG,CAAC,wBAAwB,CAAC;SAC7B,MAAM,CAAC,GAAG,eAAe,CAAC;CAC9B,CAAC;KACD,MAAM,CAAC,GAAG,kCAAkC,CAAC;KAC7C,MAAM,CAAC,GAAG,sBAAsB,CAAC;KACjC,MAAM,CAAC,GAAG,0BAA0B,CAAC;IACtC,0EAA0E;K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16
16
|
context: z.ZodOptional<z.ZodObject<{
|
|
17
|
-
description: z.ZodOptional<z.ZodString
|
|
17
|
+
description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
18
18
|
styleGuide: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
19
|
-
text: z.ZodString
|
|
19
|
+
text: z.ZodEffects<z.ZodString, string, string>;
|
|
20
20
|
}, "strip", z.ZodTypeAny, {
|
|
21
21
|
text: string;
|
|
22
22
|
}, {
|
|
@@ -49,14 +49,14 @@ export declare const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffec
|
|
|
49
49
|
}>]>>;
|
|
50
50
|
glossary: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
51
51
|
term: z.ZodString;
|
|
52
|
-
description: z.ZodOptional<z.ZodString
|
|
52
|
+
description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
53
53
|
translatable: z.ZodDefault<z.ZodBoolean>;
|
|
54
54
|
forbidden: z.ZodDefault<z.ZodBoolean>;
|
|
55
55
|
caseSensitive: z.ZodDefault<z.ZodBoolean>;
|
|
56
56
|
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
57
57
|
locale: z.ZodEffects<z.ZodString, string, string>;
|
|
58
|
-
translation: z.ZodString
|
|
59
|
-
description: z.ZodOptional<z.ZodString
|
|
58
|
+
translation: z.ZodEffects<z.ZodString, string, string>;
|
|
59
|
+
description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
60
60
|
}, "strip", z.ZodTypeAny, {
|
|
61
61
|
translation: string;
|
|
62
62
|
locale: string;
|
|
@@ -113,8 +113,8 @@ export declare const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffec
|
|
|
113
113
|
}>, "many">>;
|
|
114
114
|
targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
|
|
115
115
|
translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
116
|
-
sourceValue: z.ZodString
|
|
117
|
-
translatedValue: z.ZodString
|
|
116
|
+
sourceValue: z.ZodEffects<z.ZodString, string, string>;
|
|
117
|
+
translatedValue: z.ZodEffects<z.ZodString, string, string>;
|
|
118
118
|
}, "strip", z.ZodTypeAny, {
|
|
119
119
|
sourceValue: string;
|
|
120
120
|
translatedValue: string;
|
|
@@ -235,11 +235,11 @@ export declare const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffec
|
|
|
235
235
|
text: z.ZodObject<{
|
|
236
236
|
contentUnitId: z.ZodString;
|
|
237
237
|
segmentId: z.ZodOptional<z.ZodString>;
|
|
238
|
-
value: z.ZodString
|
|
238
|
+
value: z.ZodEffects<z.ZodString, string, string>;
|
|
239
239
|
characterLimit: z.ZodOptional<z.ZodNumber>;
|
|
240
240
|
translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
241
|
-
sourceValue: z.ZodString
|
|
242
|
-
translatedValue: z.ZodString
|
|
241
|
+
sourceValue: z.ZodEffects<z.ZodString, string, string>;
|
|
242
|
+
translatedValue: z.ZodEffects<z.ZodString, string, string>;
|
|
243
243
|
}, "strip", z.ZodTypeAny, {
|
|
244
244
|
sourceValue: string;
|
|
245
245
|
translatedValue: string;
|
|
@@ -272,7 +272,7 @@ export declare const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffec
|
|
|
272
272
|
readonly SHORTEN: "shorten";
|
|
273
273
|
readonly TRANSLATE: "translate";
|
|
274
274
|
}>;
|
|
275
|
-
value: z.ZodString
|
|
275
|
+
value: z.ZodEffects<z.ZodString, string, string>;
|
|
276
276
|
}, "strip", z.ZodTypeAny, {
|
|
277
277
|
value: string;
|
|
278
278
|
mode: "rephrase" | "shorten" | "translate";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
+
import { removeUnicodeNullCharacters } from "../../helpers/removeUnicodeNullCharacters.js";
|
|
2
3
|
import { OWNER_ID_SCHEMA } from "../common/asyncRequestSchemas.js";
|
|
3
|
-
import { COMMON_REQUEST_HEADERS_SCHEMA, FORCE_INTEGRATION_SCHEMA, LOCALE_SCHEMA, METADATA_SCHEMA, REAL_INTEGRATION_ENGINE_SCHEMA,
|
|
4
|
+
import { COMMON_REQUEST_HEADERS_SCHEMA, CONTENT_ID_PROP_SCHEMA, FORCE_INTEGRATION_SCHEMA, LOCALE_SCHEMA, METADATA_SCHEMA, REAL_INTEGRATION_ENGINE_SCHEMA, TRANSLATION_EXAMPLES_SCHEMA, refineIntegrationIsPresent, } from "../common/commonSchemas.js";
|
|
4
5
|
import { TRANSLATION_CONTEXT_SCHEMA } from "../common/translationContextSchemas.js";
|
|
5
|
-
import {
|
|
6
|
+
import { HISTORY_ENTRY_SCHEMA, TranslateModeEnum, refineDifferentSourceAndTargetLang, refineHistoryIsPresent, } from "./sharedSchemas.js";
|
|
6
7
|
export const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA = z
|
|
7
8
|
.object({
|
|
8
9
|
ownerId: OWNER_ID_SCHEMA.optional(),
|
|
@@ -25,12 +26,12 @@ export const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA = z
|
|
|
25
26
|
text: z.object({
|
|
26
27
|
contentUnitId: CONTENT_ID_PROP_SCHEMA,
|
|
27
28
|
segmentId: CONTENT_ID_PROP_SCHEMA.optional(),
|
|
28
|
-
value: z
|
|
29
|
+
value: z
|
|
30
|
+
.string()
|
|
31
|
+
.min(1)
|
|
32
|
+
.transform((value) => removeUnicodeNullCharacters(value)),
|
|
29
33
|
characterLimit: z.number().optional(),
|
|
30
|
-
translationExamples:
|
|
31
|
-
.array(TRANSLATION_EXAMPLE_SCHEMA)
|
|
32
|
-
.optional()
|
|
33
|
-
.describe('When defined, the translation will attempt to follow the provided translation examples'),
|
|
34
|
+
translationExamples: TRANSLATION_EXAMPLES_SCHEMA,
|
|
34
35
|
}),
|
|
35
36
|
history: z
|
|
36
37
|
.array(HISTORY_ENTRY_SCHEMA)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translateTextSegmentSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/translateTextSegmentSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,8BAA8B,EAC9B,
|
|
1
|
+
{"version":3,"file":"translateTextSegmentSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/translateTextSegmentSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AACnB,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,EACL,6BAA6B,EAC7B,sBAAsB,EACtB,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,8BAA8B,EAC9B,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAA;AACnF,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,kCAAkC,EAClC,sBAAsB,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