@lokalise/polyglot-sdk 21.0.2 → 22.0.0
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 +10 -10
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/sdk/PolyglotClient.js.map +1 -1
- package/dist/sdk/schemas/common/asyncRequestSchemas.d.ts +4 -14
- package/dist/sdk/schemas/common/asyncRequestSchemas.js +1 -2
- package/dist/sdk/schemas/common/asyncRequestSchemas.js.map +1 -1
- package/dist/sdk/schemas/common/commonSchemas.d.ts +19 -68
- package/dist/sdk/schemas/common/commonSchemas.js +6 -9
- package/dist/sdk/schemas/common/commonSchemas.js.map +1 -1
- package/dist/sdk/schemas/common/errorSchemas.d.ts +6 -51
- package/dist/sdk/schemas/common/errorSchemas.js +1 -1
- package/dist/sdk/schemas/common/errorSchemas.js.map +1 -1
- package/dist/sdk/schemas/common/translationContextSchemas.d.ts +142 -438
- package/dist/sdk/schemas/common/translationContextSchemas.js +1 -1
- package/dist/sdk/schemas/common/translationContextSchemas.js.map +1 -1
- package/dist/sdk/schemas/lqa/commonSchemas.d.ts +38 -264
- package/dist/sdk/schemas/lqa/commonSchemas.js +1 -1
- package/dist/sdk/schemas/lqa/commonSchemas.js.map +1 -1
- package/dist/sdk/schemas/lqa/lqaAsyncSchemas.d.ts +87 -817
- package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js +4 -4
- package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js.map +1 -1
- package/dist/sdk/schemas/lqa/lqaSyncSchemas.d.ts +76 -685
- package/dist/sdk/schemas/lqa/lqaSyncSchemas.js +2 -2
- package/dist/sdk/schemas/lqa/lqaSyncSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/generateVariants.d.ts +67 -524
- package/dist/sdk/schemas/translation/generateVariants.js +16 -6
- package/dist/sdk/schemas/translation/generateVariants.js.map +1 -1
- package/dist/sdk/schemas/translation/rewriteTextSchemas.d.ts +233 -1512
- package/dist/sdk/schemas/translation/rewriteTextSchemas.js +22 -4
- package/dist/sdk/schemas/translation/rewriteTextSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/sharedSchemas.d.ts +70 -451
- package/dist/sdk/schemas/translation/sharedSchemas.js +5 -12
- package/dist/sdk/schemas/translation/sharedSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/translateAsyncSchemas.d.ts +117 -2123
- package/dist/sdk/schemas/translation/translateAsyncSchemas.js +15 -6
- package/dist/sdk/schemas/translation/translateAsyncSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/translateSyncSchemas.d.ts +111 -1683
- package/dist/sdk/schemas/translation/translateSyncSchemas.js +16 -6
- package/dist/sdk/schemas/translation/translateSyncSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/translateTextSegmentSchemas.d.ts +87 -1079
- package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js +4 -4
- package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js.map +1 -1
- package/package.json +9 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import z from 'zod';
|
|
1
|
+
import z from 'zod/v4';
|
|
2
2
|
import { AI_INTEGRATION_ENGINE_SCHEMA, COMMON_ERROR_RESPONSE_SCHEMA, COMMON_REQUEST_HEADERS_SCHEMA, LOCALE_SCHEMA, } from "../common/commonSchemas.js";
|
|
3
3
|
import { TRANSLATION_CONTEXT_SCHEMA } from "../common/translationContextSchemas.js";
|
|
4
4
|
import { LQA_CONTENT_UNIT_ID_SCHEMA, LQA_CONTENT_UNIT_SCHEMA, LQA_TRANSLATION_ID_SCHEMA, LqaIssueSeverityEnum, } from "./commonSchemas.js";
|
|
@@ -24,7 +24,7 @@ export const LQA_SYNC_RESPONSE_SCHEMA = z
|
|
|
24
24
|
suggestion: z.string().nullable(),
|
|
25
25
|
issues: z.array(z.object({
|
|
26
26
|
category: z.string(),
|
|
27
|
-
severity: z.
|
|
27
|
+
severity: z.enum(LqaIssueSeverityEnum),
|
|
28
28
|
comment: z.string().nullable(),
|
|
29
29
|
})),
|
|
30
30
|
score: z.number(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lqaSyncSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/lqa/lqaSyncSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"lqaSyncSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/lqa/lqaSyncSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,QAAQ,CAAA;AAEtB,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,6BAA6B,EAC7B,aAAa,GACd,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAA;AACnF,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,oBAAoB,CAAA;AAE3B,MAAM,4BAA4B,GAAG,CAAC,CAAA;AAEtC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,YAAY,EAAE,aAAa;IAC3B,OAAO,EAAE,0BAA0B,CAAC,QAAQ,EAAE;IAC9C,WAAW,EAAE,4BAA4B,CAAC,QAAQ,EAAE;IACpD,YAAY,EAAE,CAAC;SACZ,KAAK,CAAC,uBAAuB,CAAC;SAC9B,QAAQ,EAAE;SACV,GAAG,CAAC,4BAA4B,CAAC;SACjC,QAAQ,CACP,4KAA4K,CAC7K;CACJ,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,6BAA6B,CAAA;AAEpE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC;KACtC,MAAM,CAAC;IACN,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,IAAI,EAAE,CAAC,CAAC,KAAK,CACX,CAAC,CAAC,MAAM,CAAC;QACP,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;QACzB,aAAa,EAAE,0BAA0B;QACzC,aAAa,EAAE,yBAAyB;QACxC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACjC,MAAM,EAAE,CAAC,CAAC,KAAK,CACb,CAAC,CAAC,MAAM,CAAC;YACP,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;YACpB,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC;YACtC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC/B,CAAC,CACH;QACD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KAClB,CAAC,CACH;IACD,MAAM,EAAE,CAAC;SACN,KAAK,CACJ,4BAA4B,CAAC,MAAM,CAAC;QAClC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;QACzB,aAAa,EAAE,0BAA0B;QACzC,aAAa,EAAE,yBAAyB;KACzC,CAAC,CACH;SACA,QAAQ,EAAE;CACd,CAAC;KACD,QAAQ,CAAC,mCAAmC,CAAC,CAAA"}
|
|
@@ -1,174 +1,62 @@
|
|
|
1
|
-
import z from 'zod';
|
|
2
|
-
export declare const GENERATE_VARIANTS_BODY_SCHEMA: z.
|
|
1
|
+
import z from 'zod/v4';
|
|
2
|
+
export declare const GENERATE_VARIANTS_BODY_SCHEMA: z.ZodObject<{
|
|
3
3
|
assets: z.ZodOptional<z.ZodObject<{
|
|
4
|
-
description: z.ZodOptional<z.
|
|
5
|
-
styleGuide: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
6
|
-
text: z.
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
toneOfVoice: z.ZodOptional<z.ZodEnum<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
generalRule
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}, {
|
|
32
|
-
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
33
|
-
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
34
|
-
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
35
|
-
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
36
|
-
}>]>>;
|
|
37
|
-
glossary: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
4
|
+
description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
5
|
+
styleGuide: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
6
|
+
text: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
7
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8
|
+
targetAudience: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
general: "general";
|
|
10
|
+
technical: "technical";
|
|
11
|
+
"non-technical": "non-technical";
|
|
12
|
+
}>>;
|
|
13
|
+
toneOfVoice: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
friendly: "friendly";
|
|
15
|
+
empowering: "empowering";
|
|
16
|
+
informative: "informative";
|
|
17
|
+
supportive: "supportive";
|
|
18
|
+
elegant: "elegant";
|
|
19
|
+
}>>;
|
|
20
|
+
levelOfFormality: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
informal: "informal";
|
|
22
|
+
formal: "formal";
|
|
23
|
+
neutral: "neutral";
|
|
24
|
+
}>>;
|
|
25
|
+
generalRule: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
"active-voice": "active-voice";
|
|
27
|
+
"passive-voice": "passive-voice";
|
|
28
|
+
}>>;
|
|
29
|
+
}, z.core.$strip>]>>;
|
|
30
|
+
glossary: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
38
31
|
term: z.ZodString;
|
|
39
|
-
description: z.ZodOptional<z.
|
|
32
|
+
description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
40
33
|
translatable: z.ZodDefault<z.ZodBoolean>;
|
|
41
34
|
forbidden: z.ZodDefault<z.ZodBoolean>;
|
|
42
35
|
caseSensitive: z.ZodDefault<z.ZodBoolean>;
|
|
43
36
|
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
44
|
-
locale: z.
|
|
45
|
-
translation: z.
|
|
46
|
-
description: z.ZodOptional<z.
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
term: string;
|
|
58
|
-
translatable: boolean;
|
|
59
|
-
forbidden: boolean;
|
|
60
|
-
caseSensitive: boolean;
|
|
61
|
-
description?: string | undefined;
|
|
62
|
-
translations?: {
|
|
63
|
-
translation: string;
|
|
64
|
-
locale: string;
|
|
65
|
-
description?: string | undefined;
|
|
66
|
-
}[] | undefined;
|
|
67
|
-
}, {
|
|
68
|
-
term: string;
|
|
69
|
-
description?: string | undefined;
|
|
70
|
-
translatable?: boolean | undefined;
|
|
71
|
-
forbidden?: boolean | undefined;
|
|
72
|
-
caseSensitive?: boolean | undefined;
|
|
73
|
-
translations?: {
|
|
74
|
-
translation: string;
|
|
75
|
-
locale: string;
|
|
76
|
-
description?: string | undefined;
|
|
77
|
-
}[] | undefined;
|
|
78
|
-
}>, {
|
|
79
|
-
term: string;
|
|
80
|
-
translatable: boolean;
|
|
81
|
-
forbidden: boolean;
|
|
82
|
-
caseSensitive: boolean;
|
|
83
|
-
description?: string | undefined;
|
|
84
|
-
translations?: {
|
|
85
|
-
translation: string;
|
|
86
|
-
locale: string;
|
|
87
|
-
description?: string | undefined;
|
|
88
|
-
}[] | undefined;
|
|
89
|
-
}, {
|
|
90
|
-
term: string;
|
|
91
|
-
description?: string | undefined;
|
|
92
|
-
translatable?: boolean | undefined;
|
|
93
|
-
forbidden?: boolean | undefined;
|
|
94
|
-
caseSensitive?: boolean | undefined;
|
|
95
|
-
translations?: {
|
|
96
|
-
translation: string;
|
|
97
|
-
locale: string;
|
|
98
|
-
description?: string | undefined;
|
|
99
|
-
}[] | undefined;
|
|
100
|
-
}>, "many">>;
|
|
101
|
-
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>;
|
|
37
|
+
locale: z.ZodString;
|
|
38
|
+
translation: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
39
|
+
description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
40
|
+
}, z.core.$strip>>>;
|
|
41
|
+
}, z.core.$strip>>>;
|
|
42
|
+
targetPluralForms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
43
|
+
zero: "zero";
|
|
44
|
+
one: "one";
|
|
45
|
+
two: "two";
|
|
46
|
+
few: "few";
|
|
47
|
+
many: "many";
|
|
48
|
+
other: "other";
|
|
49
|
+
}>>>;
|
|
102
50
|
translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
103
|
-
sourceValue: z.
|
|
104
|
-
translatedValue: z.
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}, "strip", z.ZodTypeAny, {
|
|
113
|
-
translationExamples?: {
|
|
114
|
-
sourceValue: string;
|
|
115
|
-
translatedValue: string;
|
|
116
|
-
}[] | undefined;
|
|
117
|
-
description?: string | undefined;
|
|
118
|
-
styleGuide?: {
|
|
119
|
-
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
120
|
-
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
121
|
-
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
122
|
-
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
123
|
-
} | {
|
|
124
|
-
text: string;
|
|
125
|
-
} | undefined;
|
|
126
|
-
glossary?: {
|
|
127
|
-
term: string;
|
|
128
|
-
translatable: boolean;
|
|
129
|
-
forbidden: boolean;
|
|
130
|
-
caseSensitive: boolean;
|
|
131
|
-
description?: string | undefined;
|
|
132
|
-
translations?: {
|
|
133
|
-
translation: string;
|
|
134
|
-
locale: string;
|
|
135
|
-
description?: string | undefined;
|
|
136
|
-
}[] | undefined;
|
|
137
|
-
}[] | undefined;
|
|
138
|
-
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
139
|
-
}, {
|
|
140
|
-
translationExamples?: {
|
|
141
|
-
sourceValue: string;
|
|
142
|
-
translatedValue: string;
|
|
143
|
-
}[] | undefined;
|
|
144
|
-
description?: string | undefined;
|
|
145
|
-
styleGuide?: {
|
|
146
|
-
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
147
|
-
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
148
|
-
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
149
|
-
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
150
|
-
} | {
|
|
151
|
-
text: string;
|
|
152
|
-
} | undefined;
|
|
153
|
-
glossary?: {
|
|
154
|
-
term: string;
|
|
155
|
-
description?: string | undefined;
|
|
156
|
-
translatable?: boolean | undefined;
|
|
157
|
-
forbidden?: boolean | undefined;
|
|
158
|
-
caseSensitive?: boolean | undefined;
|
|
159
|
-
translations?: {
|
|
160
|
-
translation: string;
|
|
161
|
-
locale: string;
|
|
162
|
-
description?: string | undefined;
|
|
163
|
-
}[] | undefined;
|
|
164
|
-
}[] | undefined;
|
|
165
|
-
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
166
|
-
}>>;
|
|
167
|
-
sourceLocale: z.ZodEffects<z.ZodString, string, string>;
|
|
168
|
-
sourceValue: z.ZodEffects<z.ZodString, string, string>;
|
|
169
|
-
targetLocale: z.ZodEffects<z.ZodString, string, string>;
|
|
170
|
-
targetValue: z.ZodEffects<z.ZodString, string, string>;
|
|
171
|
-
integration: z.ZodOptional<z.ZodNativeEnum<{
|
|
51
|
+
sourceValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
52
|
+
translatedValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
53
|
+
}, z.core.$strip>>>;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
sourceLocale: z.ZodString;
|
|
56
|
+
sourceValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
57
|
+
targetLocale: z.ZodString;
|
|
58
|
+
targetValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
59
|
+
integration: z.ZodOptional<z.ZodEnum<{
|
|
172
60
|
readonly FINETUNED_OPENAI: "FT-OpenAI";
|
|
173
61
|
readonly CLAUDE: "Claude";
|
|
174
62
|
readonly GPT: "GPT";
|
|
@@ -176,376 +64,31 @@ export declare const GENERATE_VARIANTS_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.
|
|
|
176
64
|
}>>;
|
|
177
65
|
forceIntegration: z.ZodOptional<z.ZodBoolean>;
|
|
178
66
|
history: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
179
|
-
values: z.
|
|
180
|
-
mode: z.
|
|
67
|
+
values: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
|
|
68
|
+
mode: z.ZodPipe<z.ZodString, z.ZodEnum<{
|
|
181
69
|
readonly REPHRASE: "rephrase";
|
|
182
70
|
readonly SHORTEN: "shorten";
|
|
183
71
|
}>>;
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
mode: "rephrase" | "shorten";
|
|
187
|
-
}, {
|
|
188
|
-
values: [string, ...string[]];
|
|
189
|
-
mode: string;
|
|
190
|
-
}>, "many">>;
|
|
191
|
-
mode: z.ZodPipeline<z.ZodString, z.ZodNativeEnum<{
|
|
72
|
+
}, z.core.$strip>>>;
|
|
73
|
+
mode: z.ZodPipe<z.ZodString, z.ZodEnum<{
|
|
192
74
|
readonly REPHRASE: "rephrase";
|
|
193
75
|
readonly SHORTEN: "shorten";
|
|
194
76
|
}>>;
|
|
195
|
-
},
|
|
196
|
-
sourceValue: string;
|
|
197
|
-
mode: "rephrase" | "shorten";
|
|
198
|
-
sourceLocale: string;
|
|
199
|
-
targetLocale: string;
|
|
200
|
-
targetValue: string;
|
|
201
|
-
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
|
|
202
|
-
assets?: {
|
|
203
|
-
translationExamples?: {
|
|
204
|
-
sourceValue: string;
|
|
205
|
-
translatedValue: string;
|
|
206
|
-
}[] | undefined;
|
|
207
|
-
description?: string | undefined;
|
|
208
|
-
styleGuide?: {
|
|
209
|
-
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
210
|
-
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
211
|
-
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
212
|
-
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
213
|
-
} | {
|
|
214
|
-
text: string;
|
|
215
|
-
} | undefined;
|
|
216
|
-
glossary?: {
|
|
217
|
-
term: string;
|
|
218
|
-
translatable: boolean;
|
|
219
|
-
forbidden: boolean;
|
|
220
|
-
caseSensitive: boolean;
|
|
221
|
-
description?: string | undefined;
|
|
222
|
-
translations?: {
|
|
223
|
-
translation: string;
|
|
224
|
-
locale: string;
|
|
225
|
-
description?: string | undefined;
|
|
226
|
-
}[] | undefined;
|
|
227
|
-
}[] | undefined;
|
|
228
|
-
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
229
|
-
} | undefined;
|
|
230
|
-
forceIntegration?: boolean | undefined;
|
|
231
|
-
history?: {
|
|
232
|
-
values: string[];
|
|
233
|
-
mode: "rephrase" | "shorten";
|
|
234
|
-
}[] | undefined;
|
|
235
|
-
}, {
|
|
236
|
-
sourceValue: string;
|
|
237
|
-
mode: string;
|
|
238
|
-
sourceLocale: string;
|
|
239
|
-
targetLocale: string;
|
|
240
|
-
targetValue: string;
|
|
241
|
-
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
|
|
242
|
-
assets?: {
|
|
243
|
-
translationExamples?: {
|
|
244
|
-
sourceValue: string;
|
|
245
|
-
translatedValue: string;
|
|
246
|
-
}[] | undefined;
|
|
247
|
-
description?: string | undefined;
|
|
248
|
-
styleGuide?: {
|
|
249
|
-
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
250
|
-
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
251
|
-
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
252
|
-
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
253
|
-
} | {
|
|
254
|
-
text: string;
|
|
255
|
-
} | undefined;
|
|
256
|
-
glossary?: {
|
|
257
|
-
term: string;
|
|
258
|
-
description?: string | undefined;
|
|
259
|
-
translatable?: boolean | undefined;
|
|
260
|
-
forbidden?: boolean | undefined;
|
|
261
|
-
caseSensitive?: boolean | undefined;
|
|
262
|
-
translations?: {
|
|
263
|
-
translation: string;
|
|
264
|
-
locale: string;
|
|
265
|
-
description?: string | undefined;
|
|
266
|
-
}[] | undefined;
|
|
267
|
-
}[] | undefined;
|
|
268
|
-
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
269
|
-
} | undefined;
|
|
270
|
-
forceIntegration?: boolean | undefined;
|
|
271
|
-
history?: {
|
|
272
|
-
values: [string, ...string[]];
|
|
273
|
-
mode: string;
|
|
274
|
-
}[] | undefined;
|
|
275
|
-
}>, {
|
|
276
|
-
sourceValue: string;
|
|
277
|
-
mode: "rephrase" | "shorten";
|
|
278
|
-
sourceLocale: string;
|
|
279
|
-
targetLocale: string;
|
|
280
|
-
targetValue: string;
|
|
281
|
-
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
|
|
282
|
-
assets?: {
|
|
283
|
-
translationExamples?: {
|
|
284
|
-
sourceValue: string;
|
|
285
|
-
translatedValue: string;
|
|
286
|
-
}[] | undefined;
|
|
287
|
-
description?: string | undefined;
|
|
288
|
-
styleGuide?: {
|
|
289
|
-
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
290
|
-
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
291
|
-
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
292
|
-
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
293
|
-
} | {
|
|
294
|
-
text: string;
|
|
295
|
-
} | undefined;
|
|
296
|
-
glossary?: {
|
|
297
|
-
term: string;
|
|
298
|
-
translatable: boolean;
|
|
299
|
-
forbidden: boolean;
|
|
300
|
-
caseSensitive: boolean;
|
|
301
|
-
description?: string | undefined;
|
|
302
|
-
translations?: {
|
|
303
|
-
translation: string;
|
|
304
|
-
locale: string;
|
|
305
|
-
description?: string | undefined;
|
|
306
|
-
}[] | undefined;
|
|
307
|
-
}[] | undefined;
|
|
308
|
-
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
309
|
-
} | undefined;
|
|
310
|
-
forceIntegration?: boolean | undefined;
|
|
311
|
-
history?: {
|
|
312
|
-
values: string[];
|
|
313
|
-
mode: "rephrase" | "shorten";
|
|
314
|
-
}[] | undefined;
|
|
315
|
-
}, {
|
|
316
|
-
sourceValue: string;
|
|
317
|
-
mode: string;
|
|
318
|
-
sourceLocale: string;
|
|
319
|
-
targetLocale: string;
|
|
320
|
-
targetValue: string;
|
|
321
|
-
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
|
|
322
|
-
assets?: {
|
|
323
|
-
translationExamples?: {
|
|
324
|
-
sourceValue: string;
|
|
325
|
-
translatedValue: string;
|
|
326
|
-
}[] | undefined;
|
|
327
|
-
description?: string | undefined;
|
|
328
|
-
styleGuide?: {
|
|
329
|
-
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
330
|
-
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
331
|
-
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
332
|
-
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
333
|
-
} | {
|
|
334
|
-
text: string;
|
|
335
|
-
} | undefined;
|
|
336
|
-
glossary?: {
|
|
337
|
-
term: string;
|
|
338
|
-
description?: string | undefined;
|
|
339
|
-
translatable?: boolean | undefined;
|
|
340
|
-
forbidden?: boolean | undefined;
|
|
341
|
-
caseSensitive?: boolean | undefined;
|
|
342
|
-
translations?: {
|
|
343
|
-
translation: string;
|
|
344
|
-
locale: string;
|
|
345
|
-
description?: string | undefined;
|
|
346
|
-
}[] | undefined;
|
|
347
|
-
}[] | undefined;
|
|
348
|
-
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
349
|
-
} | undefined;
|
|
350
|
-
forceIntegration?: boolean | undefined;
|
|
351
|
-
history?: {
|
|
352
|
-
values: [string, ...string[]];
|
|
353
|
-
mode: string;
|
|
354
|
-
}[] | undefined;
|
|
355
|
-
}>, {
|
|
356
|
-
sourceValue: string;
|
|
357
|
-
mode: "rephrase" | "shorten";
|
|
358
|
-
sourceLocale: string;
|
|
359
|
-
targetLocale: string;
|
|
360
|
-
targetValue: string;
|
|
361
|
-
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
|
|
362
|
-
assets?: {
|
|
363
|
-
translationExamples?: {
|
|
364
|
-
sourceValue: string;
|
|
365
|
-
translatedValue: string;
|
|
366
|
-
}[] | undefined;
|
|
367
|
-
description?: string | undefined;
|
|
368
|
-
styleGuide?: {
|
|
369
|
-
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
370
|
-
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
371
|
-
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
372
|
-
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
373
|
-
} | {
|
|
374
|
-
text: string;
|
|
375
|
-
} | undefined;
|
|
376
|
-
glossary?: {
|
|
377
|
-
term: string;
|
|
378
|
-
translatable: boolean;
|
|
379
|
-
forbidden: boolean;
|
|
380
|
-
caseSensitive: boolean;
|
|
381
|
-
description?: string | undefined;
|
|
382
|
-
translations?: {
|
|
383
|
-
translation: string;
|
|
384
|
-
locale: string;
|
|
385
|
-
description?: string | undefined;
|
|
386
|
-
}[] | undefined;
|
|
387
|
-
}[] | undefined;
|
|
388
|
-
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
389
|
-
} | undefined;
|
|
390
|
-
forceIntegration?: boolean | undefined;
|
|
391
|
-
history?: {
|
|
392
|
-
values: string[];
|
|
393
|
-
mode: "rephrase" | "shorten";
|
|
394
|
-
}[] | undefined;
|
|
395
|
-
}, {
|
|
396
|
-
sourceValue: string;
|
|
397
|
-
mode: string;
|
|
398
|
-
sourceLocale: string;
|
|
399
|
-
targetLocale: string;
|
|
400
|
-
targetValue: string;
|
|
401
|
-
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
|
|
402
|
-
assets?: {
|
|
403
|
-
translationExamples?: {
|
|
404
|
-
sourceValue: string;
|
|
405
|
-
translatedValue: string;
|
|
406
|
-
}[] | undefined;
|
|
407
|
-
description?: string | undefined;
|
|
408
|
-
styleGuide?: {
|
|
409
|
-
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
410
|
-
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
411
|
-
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
412
|
-
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
413
|
-
} | {
|
|
414
|
-
text: string;
|
|
415
|
-
} | undefined;
|
|
416
|
-
glossary?: {
|
|
417
|
-
term: string;
|
|
418
|
-
description?: string | undefined;
|
|
419
|
-
translatable?: boolean | undefined;
|
|
420
|
-
forbidden?: boolean | undefined;
|
|
421
|
-
caseSensitive?: boolean | undefined;
|
|
422
|
-
translations?: {
|
|
423
|
-
translation: string;
|
|
424
|
-
locale: string;
|
|
425
|
-
description?: string | undefined;
|
|
426
|
-
}[] | undefined;
|
|
427
|
-
}[] | undefined;
|
|
428
|
-
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
429
|
-
} | undefined;
|
|
430
|
-
forceIntegration?: boolean | undefined;
|
|
431
|
-
history?: {
|
|
432
|
-
values: [string, ...string[]];
|
|
433
|
-
mode: string;
|
|
434
|
-
}[] | undefined;
|
|
435
|
-
}>, {
|
|
436
|
-
sourceValue: string;
|
|
437
|
-
mode: "rephrase" | "shorten";
|
|
438
|
-
sourceLocale: string;
|
|
439
|
-
targetLocale: string;
|
|
440
|
-
targetValue: string;
|
|
441
|
-
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
|
|
442
|
-
assets?: {
|
|
443
|
-
translationExamples?: {
|
|
444
|
-
sourceValue: string;
|
|
445
|
-
translatedValue: string;
|
|
446
|
-
}[] | undefined;
|
|
447
|
-
description?: string | undefined;
|
|
448
|
-
styleGuide?: {
|
|
449
|
-
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
450
|
-
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
451
|
-
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
452
|
-
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
453
|
-
} | {
|
|
454
|
-
text: string;
|
|
455
|
-
} | undefined;
|
|
456
|
-
glossary?: {
|
|
457
|
-
term: string;
|
|
458
|
-
translatable: boolean;
|
|
459
|
-
forbidden: boolean;
|
|
460
|
-
caseSensitive: boolean;
|
|
461
|
-
description?: string | undefined;
|
|
462
|
-
translations?: {
|
|
463
|
-
translation: string;
|
|
464
|
-
locale: string;
|
|
465
|
-
description?: string | undefined;
|
|
466
|
-
}[] | undefined;
|
|
467
|
-
}[] | undefined;
|
|
468
|
-
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
469
|
-
} | undefined;
|
|
470
|
-
forceIntegration?: boolean | undefined;
|
|
471
|
-
history?: {
|
|
472
|
-
values: string[];
|
|
473
|
-
mode: "rephrase" | "shorten";
|
|
474
|
-
}[] | undefined;
|
|
475
|
-
}, {
|
|
476
|
-
sourceValue: string;
|
|
477
|
-
mode: string;
|
|
478
|
-
sourceLocale: string;
|
|
479
|
-
targetLocale: string;
|
|
480
|
-
targetValue: string;
|
|
481
|
-
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
|
|
482
|
-
assets?: {
|
|
483
|
-
translationExamples?: {
|
|
484
|
-
sourceValue: string;
|
|
485
|
-
translatedValue: string;
|
|
486
|
-
}[] | undefined;
|
|
487
|
-
description?: string | undefined;
|
|
488
|
-
styleGuide?: {
|
|
489
|
-
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
490
|
-
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
491
|
-
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
492
|
-
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
493
|
-
} | {
|
|
494
|
-
text: string;
|
|
495
|
-
} | undefined;
|
|
496
|
-
glossary?: {
|
|
497
|
-
term: string;
|
|
498
|
-
description?: string | undefined;
|
|
499
|
-
translatable?: boolean | undefined;
|
|
500
|
-
forbidden?: boolean | undefined;
|
|
501
|
-
caseSensitive?: boolean | undefined;
|
|
502
|
-
translations?: {
|
|
503
|
-
translation: string;
|
|
504
|
-
locale: string;
|
|
505
|
-
description?: string | undefined;
|
|
506
|
-
}[] | undefined;
|
|
507
|
-
}[] | undefined;
|
|
508
|
-
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
509
|
-
} | undefined;
|
|
510
|
-
forceIntegration?: boolean | undefined;
|
|
511
|
-
history?: {
|
|
512
|
-
values: [string, ...string[]];
|
|
513
|
-
mode: string;
|
|
514
|
-
}[] | undefined;
|
|
515
|
-
}>;
|
|
77
|
+
}, z.core.$strip>;
|
|
516
78
|
export declare const GENERATE_VARIANTS_HEADERS_SCHEMA: z.ZodObject<{
|
|
517
|
-
'x-fake-processing': z.ZodOptional<z.
|
|
518
|
-
},
|
|
519
|
-
'x-fake-processing'?: boolean | undefined;
|
|
520
|
-
}, {
|
|
521
|
-
'x-fake-processing'?: unknown;
|
|
522
|
-
}>;
|
|
79
|
+
'x-fake-processing': z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<boolean, string>>, z.ZodBoolean>>;
|
|
80
|
+
}, z.core.$strip>;
|
|
523
81
|
export declare const GENERATE_VARIANTS_RESPONSE_SCHEMA: z.ZodObject<{
|
|
524
|
-
generatedAt: z.
|
|
525
|
-
variants: z.ZodArray<z.ZodString
|
|
82
|
+
generatedAt: z.ZodISODateTime;
|
|
83
|
+
variants: z.ZodArray<z.ZodString>;
|
|
526
84
|
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
527
|
-
kind: z.ZodEnum<
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
}>, "many">>;
|
|
85
|
+
kind: z.ZodEnum<{
|
|
86
|
+
EDITED_NON_TRANSLATABLE_CONTENT: "EDITED_NON_TRANSLATABLE_CONTENT";
|
|
87
|
+
EDITED_ICU_PLURALS: "EDITED_ICU_PLURALS";
|
|
88
|
+
}>;
|
|
89
|
+
}, z.core.$strip>>>;
|
|
533
90
|
integration: z.ZodString;
|
|
534
|
-
},
|
|
535
|
-
integration: string;
|
|
536
|
-
generatedAt: string;
|
|
537
|
-
variants: string[];
|
|
538
|
-
warnings?: {
|
|
539
|
-
kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
|
|
540
|
-
}[] | undefined;
|
|
541
|
-
}, {
|
|
542
|
-
integration: string;
|
|
543
|
-
generatedAt: string;
|
|
544
|
-
variants: string[];
|
|
545
|
-
warnings?: {
|
|
546
|
-
kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
|
|
547
|
-
}[] | undefined;
|
|
548
|
-
}>;
|
|
91
|
+
}, z.core.$strip>;
|
|
549
92
|
export type GenerateVariantsBody = z.infer<typeof GENERATE_VARIANTS_BODY_SCHEMA>;
|
|
550
93
|
export type GenerateVariantsHeaders = z.infer<typeof GENERATE_VARIANTS_HEADERS_SCHEMA>;
|
|
551
94
|
export type GenerateVariantsResponse = z.infer<typeof GENERATE_VARIANTS_RESPONSE_SCHEMA>;
|