@lokalise/polyglot-sdk 21.0.2 → 22.1.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.
Files changed (47) hide show
  1. package/dist/index.d.ts +11 -10
  2. package/dist/index.js +9 -8
  3. package/dist/index.js.map +1 -1
  4. package/dist/sdk/PolyglotClient.js.map +1 -1
  5. package/dist/sdk/schemas/common/asyncRequestSchemas.d.ts +4 -14
  6. package/dist/sdk/schemas/common/asyncRequestSchemas.js +1 -2
  7. package/dist/sdk/schemas/common/asyncRequestSchemas.js.map +1 -1
  8. package/dist/sdk/schemas/common/commonSchemas.d.ts +19 -68
  9. package/dist/sdk/schemas/common/commonSchemas.js +6 -9
  10. package/dist/sdk/schemas/common/commonSchemas.js.map +1 -1
  11. package/dist/sdk/schemas/common/errorSchemas.d.ts +6 -51
  12. package/dist/sdk/schemas/common/errorSchemas.js +1 -1
  13. package/dist/sdk/schemas/common/errorSchemas.js.map +1 -1
  14. package/dist/sdk/schemas/common/pluralFormSchemas.d.ts +28 -0
  15. package/dist/sdk/schemas/common/pluralFormSchemas.js +48 -0
  16. package/dist/sdk/schemas/common/pluralFormSchemas.js.map +1 -0
  17. package/dist/sdk/schemas/common/translationContextSchemas.d.ts +142 -438
  18. package/dist/sdk/schemas/common/translationContextSchemas.js +4 -3
  19. package/dist/sdk/schemas/common/translationContextSchemas.js.map +1 -1
  20. package/dist/sdk/schemas/lqa/commonSchemas.d.ts +62 -264
  21. package/dist/sdk/schemas/lqa/commonSchemas.js +12 -3
  22. package/dist/sdk/schemas/lqa/commonSchemas.js.map +1 -1
  23. package/dist/sdk/schemas/lqa/lqaAsyncSchemas.d.ts +133 -817
  24. package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js +7 -4
  25. package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js.map +1 -1
  26. package/dist/sdk/schemas/lqa/lqaSyncSchemas.d.ts +106 -685
  27. package/dist/sdk/schemas/lqa/lqaSyncSchemas.js +5 -2
  28. package/dist/sdk/schemas/lqa/lqaSyncSchemas.js.map +1 -1
  29. package/dist/sdk/schemas/translation/generateVariants.d.ts +67 -524
  30. package/dist/sdk/schemas/translation/generateVariants.js +16 -6
  31. package/dist/sdk/schemas/translation/generateVariants.js.map +1 -1
  32. package/dist/sdk/schemas/translation/rewriteTextSchemas.d.ts +245 -1512
  33. package/dist/sdk/schemas/translation/rewriteTextSchemas.js +22 -4
  34. package/dist/sdk/schemas/translation/rewriteTextSchemas.js.map +1 -1
  35. package/dist/sdk/schemas/translation/sharedSchemas.d.ts +114 -451
  36. package/dist/sdk/schemas/translation/sharedSchemas.js +27 -25
  37. package/dist/sdk/schemas/translation/sharedSchemas.js.map +1 -1
  38. package/dist/sdk/schemas/translation/translateAsyncSchemas.d.ts +179 -2123
  39. package/dist/sdk/schemas/translation/translateAsyncSchemas.js +18 -6
  40. package/dist/sdk/schemas/translation/translateAsyncSchemas.js.map +1 -1
  41. package/dist/sdk/schemas/translation/translateSyncSchemas.d.ts +142 -1680
  42. package/dist/sdk/schemas/translation/translateSyncSchemas.js +19 -6
  43. package/dist/sdk/schemas/translation/translateSyncSchemas.js.map +1 -1
  44. package/dist/sdk/schemas/translation/translateTextSegmentSchemas.d.ts +87 -1079
  45. package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js +4 -4
  46. package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js.map +1 -1
  47. package/package.json +9 -11
@@ -1,171 +1,59 @@
1
- import z from 'zod';
1
+ import z from 'zod/v4';
2
2
  export declare const LQA_SYNC_BODY_SCHEMA: z.ZodObject<{
3
- sourceLocale: z.ZodEffects<z.ZodString, string, string>;
3
+ sourceLocale: z.ZodString;
4
4
  context: z.ZodOptional<z.ZodObject<{
5
- description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6
- styleGuide: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
7
- text: z.ZodEffects<z.ZodString, string, string>;
8
- }, "strip", z.ZodTypeAny, {
9
- text: string;
10
- }, {
11
- text: string;
12
- }>, z.ZodEffects<z.ZodObject<{
13
- targetAudience: z.ZodOptional<z.ZodEnum<["general", "technical", "non-technical"]>>;
14
- toneOfVoice: z.ZodOptional<z.ZodEnum<["friendly", "empowering", "informative", "supportive", "elegant"]>>;
15
- levelOfFormality: z.ZodOptional<z.ZodEnum<["informal", "formal", "neutral"]>>;
16
- generalRule: z.ZodOptional<z.ZodEnum<["active-voice", "passive-voice"]>>;
17
- }, "strip", z.ZodTypeAny, {
18
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
19
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
20
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
21
- generalRule?: "active-voice" | "passive-voice" | undefined;
22
- }, {
23
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
24
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
25
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
26
- generalRule?: "active-voice" | "passive-voice" | undefined;
27
- }>, {
28
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
29
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
30
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
31
- generalRule?: "active-voice" | "passive-voice" | undefined;
32
- }, {
33
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
34
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
35
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
36
- generalRule?: "active-voice" | "passive-voice" | undefined;
37
- }>]>>;
38
- glossary: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
5
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
6
+ styleGuide: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
7
+ text: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ targetAudience: z.ZodOptional<z.ZodEnum<{
10
+ general: "general";
11
+ technical: "technical";
12
+ "non-technical": "non-technical";
13
+ }>>;
14
+ toneOfVoice: z.ZodOptional<z.ZodEnum<{
15
+ friendly: "friendly";
16
+ empowering: "empowering";
17
+ informative: "informative";
18
+ supportive: "supportive";
19
+ elegant: "elegant";
20
+ }>>;
21
+ levelOfFormality: z.ZodOptional<z.ZodEnum<{
22
+ informal: "informal";
23
+ formal: "formal";
24
+ neutral: "neutral";
25
+ }>>;
26
+ generalRule: z.ZodOptional<z.ZodEnum<{
27
+ "active-voice": "active-voice";
28
+ "passive-voice": "passive-voice";
29
+ }>>;
30
+ }, z.core.$strip>]>>;
31
+ glossary: z.ZodOptional<z.ZodArray<z.ZodObject<{
39
32
  term: z.ZodString;
40
- description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
33
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
41
34
  translatable: z.ZodDefault<z.ZodBoolean>;
42
35
  forbidden: z.ZodDefault<z.ZodBoolean>;
43
36
  caseSensitive: z.ZodDefault<z.ZodBoolean>;
44
37
  translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
45
- locale: z.ZodEffects<z.ZodString, string, string>;
46
- translation: z.ZodEffects<z.ZodString, string, string>;
47
- description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
48
- }, "strip", z.ZodTypeAny, {
49
- translation: string;
50
- locale: string;
51
- description?: string | undefined;
52
- }, {
53
- translation: string;
54
- locale: string;
55
- description?: string | undefined;
56
- }>, "many">>;
57
- }, "strip", z.ZodTypeAny, {
58
- term: string;
59
- translatable: boolean;
60
- forbidden: boolean;
61
- caseSensitive: boolean;
62
- description?: string | undefined;
63
- translations?: {
64
- translation: string;
65
- locale: string;
66
- description?: string | undefined;
67
- }[] | undefined;
68
- }, {
69
- term: string;
70
- description?: string | undefined;
71
- translatable?: boolean | undefined;
72
- forbidden?: boolean | undefined;
73
- caseSensitive?: boolean | undefined;
74
- translations?: {
75
- translation: string;
76
- locale: string;
77
- description?: string | undefined;
78
- }[] | undefined;
79
- }>, {
80
- term: string;
81
- translatable: boolean;
82
- forbidden: boolean;
83
- caseSensitive: boolean;
84
- description?: string | undefined;
85
- translations?: {
86
- translation: string;
87
- locale: string;
88
- description?: string | undefined;
89
- }[] | undefined;
90
- }, {
91
- term: string;
92
- description?: string | undefined;
93
- translatable?: boolean | undefined;
94
- forbidden?: boolean | undefined;
95
- caseSensitive?: boolean | undefined;
96
- translations?: {
97
- translation: string;
98
- locale: string;
99
- description?: string | undefined;
100
- }[] | undefined;
101
- }>, "many">>;
102
- 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>;
38
+ locale: z.ZodString;
39
+ translation: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
40
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
41
+ }, z.core.$strip>>>;
42
+ }, z.core.$strip>>>;
43
+ targetPluralForms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
44
+ readonly ZERO: "zero";
45
+ readonly ONE: "one";
46
+ readonly TWO: "two";
47
+ readonly FEW: "few";
48
+ readonly MANY: "many";
49
+ readonly OTHER: "other";
50
+ }>>>;
103
51
  translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
104
- sourceValue: z.ZodEffects<z.ZodString, string, string>;
105
- translatedValue: z.ZodEffects<z.ZodString, string, string>;
106
- }, "strip", z.ZodTypeAny, {
107
- sourceValue: string;
108
- translatedValue: string;
109
- }, {
110
- sourceValue: string;
111
- translatedValue: string;
112
- }>, "many">>;
113
- }, "strip", z.ZodTypeAny, {
114
- translationExamples?: {
115
- sourceValue: string;
116
- translatedValue: string;
117
- }[] | undefined;
118
- description?: string | undefined;
119
- styleGuide?: {
120
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
121
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
122
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
123
- generalRule?: "active-voice" | "passive-voice" | undefined;
124
- } | {
125
- text: string;
126
- } | undefined;
127
- glossary?: {
128
- term: string;
129
- translatable: boolean;
130
- forbidden: boolean;
131
- caseSensitive: boolean;
132
- description?: string | undefined;
133
- translations?: {
134
- translation: string;
135
- locale: string;
136
- description?: string | undefined;
137
- }[] | undefined;
138
- }[] | undefined;
139
- targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
140
- }, {
141
- translationExamples?: {
142
- sourceValue: string;
143
- translatedValue: string;
144
- }[] | undefined;
145
- description?: string | undefined;
146
- styleGuide?: {
147
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
148
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
149
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
150
- generalRule?: "active-voice" | "passive-voice" | undefined;
151
- } | {
152
- text: string;
153
- } | undefined;
154
- glossary?: {
155
- term: string;
156
- description?: string | undefined;
157
- translatable?: boolean | undefined;
158
- forbidden?: boolean | undefined;
159
- caseSensitive?: boolean | undefined;
160
- translations?: {
161
- translation: string;
162
- locale: string;
163
- description?: string | undefined;
164
- }[] | undefined;
165
- }[] | undefined;
166
- targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
167
- }>>;
168
- integration: z.ZodOptional<z.ZodNativeEnum<{
52
+ sourceValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
53
+ translatedValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
54
+ }, z.core.$strip>>>;
55
+ }, z.core.$strip>>;
56
+ integration: z.ZodOptional<z.ZodEnum<{
169
57
  readonly FINETUNED_OPENAI: "FT-OpenAI";
170
58
  readonly CLAUDE: "Claude";
171
59
  readonly GPT: "GPT";
@@ -173,59 +61,44 @@ export declare const LQA_SYNC_BODY_SCHEMA: z.ZodObject<{
173
61
  }>>;
174
62
  contentUnits: z.ZodArray<z.ZodObject<{
175
63
  id: z.ZodString;
176
- context: z.ZodOptional<z.ZodObject<{
177
- description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
178
- }, "strip", z.ZodTypeAny, {
179
- description?: string | undefined;
180
- }, {
181
- description?: string | undefined;
64
+ type: z.ZodDefault<z.ZodEnum<{
65
+ readonly SEGMENTED: "segmented";
66
+ readonly PLURAL: "plural";
182
67
  }>>;
183
- segments: z.ZodArray<z.ZodEffects<z.ZodObject<{
184
- sourceValue: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
68
+ context: z.ZodOptional<z.ZodObject<{
69
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
70
+ }, z.core.$strip>>;
71
+ segments: z.ZodArray<z.ZodPipe<z.ZodObject<{
72
+ sourceValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
73
+ pluralForm: z.ZodOptional<z.ZodEnum<{
74
+ readonly ZERO: "zero";
75
+ readonly ONE: "one";
76
+ readonly TWO: "two";
77
+ readonly FEW: "few";
78
+ readonly MANY: "many";
79
+ readonly OTHER: "other";
80
+ }>>;
185
81
  translations: z.ZodArray<z.ZodObject<{
186
82
  id: z.ZodString;
187
- locale: z.ZodEffects<z.ZodString, string, string>;
188
- value: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
189
- }, "strip", z.ZodTypeAny, {
190
- value: string;
191
- id: string;
192
- locale: string;
193
- }, {
194
- value: string;
195
- id: string;
196
- locale: string;
197
- }>, "atleastone">;
83
+ locale: z.ZodString;
84
+ value: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
85
+ }, z.core.$strip>>;
198
86
  tmMatch: z.ZodOptional<z.ZodObject<{
199
- sourceValue: z.ZodEffects<z.ZodString, string, string>;
200
- translatedValue: z.ZodEffects<z.ZodString, string, string>;
201
- }, "strip", z.ZodTypeAny, {
202
- sourceValue: string;
203
- translatedValue: string;
204
- }, {
205
- sourceValue: string;
206
- translatedValue: string;
207
- }>>;
87
+ sourceValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
88
+ translatedValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
89
+ }, z.core.$strip>>;
208
90
  translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
209
- sourceValue: z.ZodEffects<z.ZodString, string, string>;
210
- translatedValue: z.ZodEffects<z.ZodString, string, string>;
211
- }, "strip", z.ZodTypeAny, {
212
- sourceValue: string;
213
- translatedValue: string;
214
- }, {
215
- sourceValue: string;
216
- translatedValue: string;
217
- }>, "many">>;
218
- }, "strip", z.ZodTypeAny, {
91
+ sourceValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
92
+ translatedValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
93
+ }, z.core.$strip>>>;
94
+ }, z.core.$strip>, z.ZodTransform<{
219
95
  sourceValue: string;
220
- translations: [{
221
- value: string;
96
+ translations: {
222
97
  id: string;
223
98
  locale: string;
224
- }, ...{
225
99
  value: string;
226
- id: string;
227
- locale: string;
228
- }[]];
100
+ }[];
101
+ pluralForm?: "zero" | "one" | "two" | "few" | "many" | "other" | undefined;
229
102
  tmMatch?: {
230
103
  sourceValue: string;
231
104
  translatedValue: string;
@@ -236,34 +109,12 @@ export declare const LQA_SYNC_BODY_SCHEMA: z.ZodObject<{
236
109
  }[] | undefined;
237
110
  }, {
238
111
  sourceValue: string;
239
- translations: [{
240
- value: string;
241
- id: string;
242
- locale: string;
243
- }, ...{
244
- value: string;
245
- id: string;
246
- locale: string;
247
- }[]];
248
- tmMatch?: {
249
- sourceValue: string;
250
- translatedValue: string;
251
- } | undefined;
252
- translationExamples?: {
253
- sourceValue: string;
254
- translatedValue: string;
255
- }[] | undefined;
256
- }>, {
257
- sourceValue: string;
258
- translations: [{
259
- value: string;
112
+ translations: {
260
113
  id: string;
261
114
  locale: string;
262
- }, ...{
263
115
  value: string;
264
- id: string;
265
- locale: string;
266
- }[]];
116
+ }[];
117
+ pluralForm?: "zero" | "one" | "two" | "few" | "many" | "other" | undefined;
267
118
  tmMatch?: {
268
119
  sourceValue: string;
269
120
  translatedValue: string;
@@ -272,487 +123,57 @@ export declare const LQA_SYNC_BODY_SCHEMA: z.ZodObject<{
272
123
  sourceValue: string;
273
124
  translatedValue: string;
274
125
  }[] | undefined;
275
- }, {
276
- sourceValue: string;
277
- translations: [{
278
- value: string;
279
- id: string;
280
- locale: string;
281
- }, ...{
282
- value: string;
283
- id: string;
284
- locale: string;
285
- }[]];
286
- tmMatch?: {
287
- sourceValue: string;
288
- translatedValue: string;
289
- } | undefined;
290
- translationExamples?: {
291
- sourceValue: string;
292
- translatedValue: string;
293
- }[] | undefined;
294
- }>, "atleastone">;
126
+ }>>>;
295
127
  characterLimit: z.ZodOptional<z.ZodNumber>;
296
- }, "strip", z.ZodTypeAny, {
297
- segments: [{
298
- sourceValue: string;
299
- translations: [{
300
- value: string;
301
- id: string;
302
- locale: string;
303
- }, ...{
304
- value: string;
305
- id: string;
306
- locale: string;
307
- }[]];
308
- tmMatch?: {
309
- sourceValue: string;
310
- translatedValue: string;
311
- } | undefined;
312
- translationExamples?: {
313
- sourceValue: string;
314
- translatedValue: string;
315
- }[] | undefined;
316
- }, ...{
317
- sourceValue: string;
318
- translations: [{
319
- value: string;
320
- id: string;
321
- locale: string;
322
- }, ...{
323
- value: string;
324
- id: string;
325
- locale: string;
326
- }[]];
327
- tmMatch?: {
328
- sourceValue: string;
329
- translatedValue: string;
330
- } | undefined;
331
- translationExamples?: {
332
- sourceValue: string;
333
- translatedValue: string;
334
- }[] | undefined;
335
- }[]];
336
- id: string;
337
- context?: {
338
- description?: string | undefined;
339
- } | undefined;
340
- characterLimit?: number | undefined;
341
- }, {
342
- segments: [{
343
- sourceValue: string;
344
- translations: [{
345
- value: string;
346
- id: string;
347
- locale: string;
348
- }, ...{
349
- value: string;
350
- id: string;
351
- locale: string;
352
- }[]];
353
- tmMatch?: {
354
- sourceValue: string;
355
- translatedValue: string;
356
- } | undefined;
357
- translationExamples?: {
358
- sourceValue: string;
359
- translatedValue: string;
360
- }[] | undefined;
361
- }, ...{
362
- sourceValue: string;
363
- translations: [{
364
- value: string;
365
- id: string;
366
- locale: string;
367
- }, ...{
368
- value: string;
369
- id: string;
370
- locale: string;
371
- }[]];
372
- tmMatch?: {
373
- sourceValue: string;
374
- translatedValue: string;
375
- } | undefined;
376
- translationExamples?: {
377
- sourceValue: string;
378
- translatedValue: string;
379
- }[] | undefined;
380
- }[]];
381
- id: string;
382
- context?: {
383
- description?: string | undefined;
384
- } | undefined;
385
- characterLimit?: number | undefined;
386
- }>, "atleastone">;
387
- }, "strip", z.ZodTypeAny, {
388
- sourceLocale: string;
389
- contentUnits: [{
390
- segments: [{
391
- sourceValue: string;
392
- translations: [{
393
- value: string;
394
- id: string;
395
- locale: string;
396
- }, ...{
397
- value: string;
398
- id: string;
399
- locale: string;
400
- }[]];
401
- tmMatch?: {
402
- sourceValue: string;
403
- translatedValue: string;
404
- } | undefined;
405
- translationExamples?: {
406
- sourceValue: string;
407
- translatedValue: string;
408
- }[] | undefined;
409
- }, ...{
410
- sourceValue: string;
411
- translations: [{
412
- value: string;
413
- id: string;
414
- locale: string;
415
- }, ...{
416
- value: string;
417
- id: string;
418
- locale: string;
419
- }[]];
420
- tmMatch?: {
421
- sourceValue: string;
422
- translatedValue: string;
423
- } | undefined;
424
- translationExamples?: {
425
- sourceValue: string;
426
- translatedValue: string;
427
- }[] | undefined;
428
- }[]];
429
- id: string;
430
- context?: {
431
- description?: string | undefined;
432
- } | undefined;
433
- characterLimit?: number | undefined;
434
- }, ...{
435
- segments: [{
436
- sourceValue: string;
437
- translations: [{
438
- value: string;
439
- id: string;
440
- locale: string;
441
- }, ...{
442
- value: string;
443
- id: string;
444
- locale: string;
445
- }[]];
446
- tmMatch?: {
447
- sourceValue: string;
448
- translatedValue: string;
449
- } | undefined;
450
- translationExamples?: {
451
- sourceValue: string;
452
- translatedValue: string;
453
- }[] | undefined;
454
- }, ...{
455
- sourceValue: string;
456
- translations: [{
457
- value: string;
458
- id: string;
459
- locale: string;
460
- }, ...{
461
- value: string;
462
- id: string;
463
- locale: string;
464
- }[]];
465
- tmMatch?: {
466
- sourceValue: string;
467
- translatedValue: string;
468
- } | undefined;
469
- translationExamples?: {
470
- sourceValue: string;
471
- translatedValue: string;
472
- }[] | undefined;
473
- }[]];
474
- id: string;
475
- context?: {
476
- description?: string | undefined;
477
- } | undefined;
478
- characterLimit?: number | undefined;
479
- }[]];
480
- context?: {
481
- translationExamples?: {
482
- sourceValue: string;
483
- translatedValue: string;
484
- }[] | undefined;
485
- description?: string | undefined;
486
- styleGuide?: {
487
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
488
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
489
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
490
- generalRule?: "active-voice" | "passive-voice" | undefined;
491
- } | {
492
- text: string;
493
- } | undefined;
494
- glossary?: {
495
- term: string;
496
- translatable: boolean;
497
- forbidden: boolean;
498
- caseSensitive: boolean;
499
- description?: string | undefined;
500
- translations?: {
501
- translation: string;
502
- locale: string;
503
- description?: string | undefined;
504
- }[] | undefined;
505
- }[] | undefined;
506
- targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
507
- } | undefined;
508
- integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
509
- }, {
510
- sourceLocale: string;
511
- contentUnits: [{
512
- segments: [{
513
- sourceValue: string;
514
- translations: [{
515
- value: string;
516
- id: string;
517
- locale: string;
518
- }, ...{
519
- value: string;
520
- id: string;
521
- locale: string;
522
- }[]];
523
- tmMatch?: {
524
- sourceValue: string;
525
- translatedValue: string;
526
- } | undefined;
527
- translationExamples?: {
528
- sourceValue: string;
529
- translatedValue: string;
530
- }[] | undefined;
531
- }, ...{
532
- sourceValue: string;
533
- translations: [{
534
- value: string;
535
- id: string;
536
- locale: string;
537
- }, ...{
538
- value: string;
539
- id: string;
540
- locale: string;
541
- }[]];
542
- tmMatch?: {
543
- sourceValue: string;
544
- translatedValue: string;
545
- } | undefined;
546
- translationExamples?: {
547
- sourceValue: string;
548
- translatedValue: string;
549
- }[] | undefined;
550
- }[]];
551
- id: string;
552
- context?: {
553
- description?: string | undefined;
554
- } | undefined;
555
- characterLimit?: number | undefined;
556
- }, ...{
557
- segments: [{
558
- sourceValue: string;
559
- translations: [{
560
- value: string;
561
- id: string;
562
- locale: string;
563
- }, ...{
564
- value: string;
565
- id: string;
566
- locale: string;
567
- }[]];
568
- tmMatch?: {
569
- sourceValue: string;
570
- translatedValue: string;
571
- } | undefined;
572
- translationExamples?: {
573
- sourceValue: string;
574
- translatedValue: string;
575
- }[] | undefined;
576
- }, ...{
577
- sourceValue: string;
578
- translations: [{
579
- value: string;
580
- id: string;
581
- locale: string;
582
- }, ...{
583
- value: string;
584
- id: string;
585
- locale: string;
586
- }[]];
587
- tmMatch?: {
588
- sourceValue: string;
589
- translatedValue: string;
590
- } | undefined;
591
- translationExamples?: {
592
- sourceValue: string;
593
- translatedValue: string;
594
- }[] | undefined;
595
- }[]];
596
- id: string;
597
- context?: {
598
- description?: string | undefined;
599
- } | undefined;
600
- characterLimit?: number | undefined;
601
- }[]];
602
- context?: {
603
- translationExamples?: {
604
- sourceValue: string;
605
- translatedValue: string;
606
- }[] | undefined;
607
- description?: string | undefined;
608
- styleGuide?: {
609
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
610
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
611
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
612
- generalRule?: "active-voice" | "passive-voice" | undefined;
613
- } | {
614
- text: string;
615
- } | undefined;
616
- glossary?: {
617
- term: string;
618
- description?: string | undefined;
619
- translatable?: boolean | undefined;
620
- forbidden?: boolean | undefined;
621
- caseSensitive?: boolean | undefined;
622
- translations?: {
623
- translation: string;
624
- locale: string;
625
- description?: string | undefined;
626
- }[] | undefined;
627
- }[] | undefined;
628
- targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
629
- } | undefined;
630
- integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
631
- }>;
128
+ }, z.core.$strip>>;
129
+ }, z.core.$strip>;
632
130
  export declare const LQA_SYNC_HEADERS_SCHEMA: z.ZodObject<{
633
- 'x-fake-processing': z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
634
- }, "strip", z.ZodTypeAny, {
635
- 'x-fake-processing'?: boolean | undefined;
636
- }, {
637
- 'x-fake-processing'?: unknown;
638
- }>;
131
+ 'x-fake-processing': z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<boolean, string>>, z.ZodBoolean>>;
132
+ }, z.core.$strip>;
639
133
  export declare const LQA_SYNC_RESPONSE_SCHEMA: z.ZodObject<{
640
134
  integration: z.ZodString;
641
135
  data: z.ZodArray<z.ZodObject<{
642
136
  polyglotRefId: z.ZodString;
643
137
  contentUnitId: z.ZodString;
644
138
  translationId: z.ZodString;
139
+ pluralForm: z.ZodOptional<z.ZodEnum<{
140
+ readonly ZERO: "zero";
141
+ readonly ONE: "one";
142
+ readonly TWO: "two";
143
+ readonly FEW: "few";
144
+ readonly MANY: "many";
145
+ readonly OTHER: "other";
146
+ }>>;
645
147
  suggestion: z.ZodNullable<z.ZodString>;
646
148
  issues: z.ZodArray<z.ZodObject<{
647
149
  category: z.ZodString;
648
- severity: z.ZodNativeEnum<{
150
+ severity: z.ZodEnum<{
649
151
  readonly NEUTRAL: "neutral";
650
152
  readonly MINOR: "minor";
651
153
  readonly MAJOR: "major";
652
154
  readonly CRITICAL: "critical";
653
155
  }>;
654
156
  comment: z.ZodNullable<z.ZodString>;
655
- }, "strip", z.ZodTypeAny, {
656
- category: string;
657
- severity: "neutral" | "minor" | "major" | "critical";
658
- comment: string | null;
659
- }, {
660
- category: string;
661
- severity: "neutral" | "minor" | "major" | "critical";
662
- comment: string | null;
663
- }>, "many">;
157
+ }, z.core.$strip>>;
664
158
  score: z.ZodNumber;
665
- }, "strip", z.ZodTypeAny, {
666
- issues: {
667
- category: string;
668
- severity: "neutral" | "minor" | "major" | "critical";
669
- comment: string | null;
670
- }[];
671
- polyglotRefId: string;
672
- contentUnitId: string;
673
- translationId: string;
674
- suggestion: string | null;
675
- score: number;
676
- }, {
677
- issues: {
678
- category: string;
679
- severity: "neutral" | "minor" | "major" | "critical";
680
- comment: string | null;
681
- }[];
682
- polyglotRefId: string;
683
- contentUnitId: string;
684
- translationId: string;
685
- suggestion: string | null;
686
- score: number;
687
- }>, "many">;
159
+ }, z.core.$strip>>;
688
160
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
689
161
  message: z.ZodString;
690
162
  errorCode: z.ZodString;
691
163
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
692
- } & {
693
164
  polyglotRefId: z.ZodString;
694
165
  contentUnitId: z.ZodString;
166
+ pluralForm: z.ZodOptional<z.ZodEnum<{
167
+ readonly ZERO: "zero";
168
+ readonly ONE: "one";
169
+ readonly TWO: "two";
170
+ readonly FEW: "few";
171
+ readonly MANY: "many";
172
+ readonly OTHER: "other";
173
+ }>>;
695
174
  translationId: z.ZodString;
696
- }, "strip", z.ZodTypeAny, {
697
- message: string;
698
- errorCode: string;
699
- polyglotRefId: string;
700
- contentUnitId: string;
701
- translationId: string;
702
- details?: Record<string, unknown> | undefined;
703
- }, {
704
- message: string;
705
- errorCode: string;
706
- polyglotRefId: string;
707
- contentUnitId: string;
708
- translationId: string;
709
- details?: Record<string, unknown> | undefined;
710
- }>, "many">>;
711
- }, "strip", z.ZodTypeAny, {
712
- data: {
713
- issues: {
714
- category: string;
715
- severity: "neutral" | "minor" | "major" | "critical";
716
- comment: string | null;
717
- }[];
718
- polyglotRefId: string;
719
- contentUnitId: string;
720
- translationId: string;
721
- suggestion: string | null;
722
- score: number;
723
- }[];
724
- integration: string;
725
- errors?: {
726
- message: string;
727
- errorCode: string;
728
- polyglotRefId: string;
729
- contentUnitId: string;
730
- translationId: string;
731
- details?: Record<string, unknown> | undefined;
732
- }[] | undefined;
733
- }, {
734
- data: {
735
- issues: {
736
- category: string;
737
- severity: "neutral" | "minor" | "major" | "critical";
738
- comment: string | null;
739
- }[];
740
- polyglotRefId: string;
741
- contentUnitId: string;
742
- translationId: string;
743
- suggestion: string | null;
744
- score: number;
745
- }[];
746
- integration: string;
747
- errors?: {
748
- message: string;
749
- errorCode: string;
750
- polyglotRefId: string;
751
- contentUnitId: string;
752
- translationId: string;
753
- details?: Record<string, unknown> | undefined;
754
- }[] | undefined;
755
- }>;
175
+ }, z.core.$strip>>>;
176
+ }, z.core.$strip>;
756
177
  export type LqaSyncBody = z.infer<typeof LQA_SYNC_BODY_SCHEMA>;
757
178
  export type LqaSyncHeaders = z.infer<typeof LQA_SYNC_HEADERS_SCHEMA>;
758
179
  export type LqaSyncResponse = z.infer<typeof LQA_SYNC_RESPONSE_SCHEMA>;