@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.
Files changed (44) hide show
  1. package/dist/index.d.ts +10 -10
  2. package/dist/index.js +8 -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/translationContextSchemas.d.ts +142 -438
  15. package/dist/sdk/schemas/common/translationContextSchemas.js +1 -1
  16. package/dist/sdk/schemas/common/translationContextSchemas.js.map +1 -1
  17. package/dist/sdk/schemas/lqa/commonSchemas.d.ts +38 -264
  18. package/dist/sdk/schemas/lqa/commonSchemas.js +1 -1
  19. package/dist/sdk/schemas/lqa/commonSchemas.js.map +1 -1
  20. package/dist/sdk/schemas/lqa/lqaAsyncSchemas.d.ts +87 -817
  21. package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js +4 -4
  22. package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js.map +1 -1
  23. package/dist/sdk/schemas/lqa/lqaSyncSchemas.d.ts +76 -685
  24. package/dist/sdk/schemas/lqa/lqaSyncSchemas.js +2 -2
  25. package/dist/sdk/schemas/lqa/lqaSyncSchemas.js.map +1 -1
  26. package/dist/sdk/schemas/translation/generateVariants.d.ts +67 -524
  27. package/dist/sdk/schemas/translation/generateVariants.js +16 -6
  28. package/dist/sdk/schemas/translation/generateVariants.js.map +1 -1
  29. package/dist/sdk/schemas/translation/rewriteTextSchemas.d.ts +233 -1512
  30. package/dist/sdk/schemas/translation/rewriteTextSchemas.js +22 -4
  31. package/dist/sdk/schemas/translation/rewriteTextSchemas.js.map +1 -1
  32. package/dist/sdk/schemas/translation/sharedSchemas.d.ts +70 -451
  33. package/dist/sdk/schemas/translation/sharedSchemas.js +5 -12
  34. package/dist/sdk/schemas/translation/sharedSchemas.js.map +1 -1
  35. package/dist/sdk/schemas/translation/translateAsyncSchemas.d.ts +117 -2123
  36. package/dist/sdk/schemas/translation/translateAsyncSchemas.js +15 -6
  37. package/dist/sdk/schemas/translation/translateAsyncSchemas.js.map +1 -1
  38. package/dist/sdk/schemas/translation/translateSyncSchemas.d.ts +111 -1683
  39. package/dist/sdk/schemas/translation/translateSyncSchemas.js +16 -6
  40. package/dist/sdk/schemas/translation/translateSyncSchemas.js.map +1 -1
  41. package/dist/sdk/schemas/translation/translateTextSegmentSchemas.d.ts +87 -1079
  42. package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js +4 -4
  43. package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js.map +1 -1
  44. package/package.json +9 -11
@@ -1,237 +1,96 @@
1
- import z from 'zod';
1
+ import z from 'zod/v4';
2
2
  export declare const LQA_CONTENT_UNITS_MAX_LENGTH = 50;
3
3
  export declare const LQA_ASYNC_BODY_SCHEMA: z.ZodObject<{
4
4
  originCorrelationId: z.ZodString;
5
5
  ownerId: z.ZodString;
6
- callbackUrl: z.ZodString;
6
+ callbackUrl: z.ZodURL;
7
7
  callbackToken: z.ZodString;
8
- } & {
9
- sourceLocale: z.ZodEffects<z.ZodString, string, string>;
10
- integration: z.ZodOptional<z.ZodNativeEnum<{
8
+ sourceLocale: z.ZodString;
9
+ integration: z.ZodOptional<z.ZodEnum<{
11
10
  readonly FINETUNED_OPENAI: "FT-OpenAI";
12
11
  readonly CLAUDE: "Claude";
13
12
  readonly GPT: "GPT";
14
13
  readonly GEMINI: "Gemini";
15
14
  }>>;
16
15
  context: z.ZodOptional<z.ZodObject<{
17
- description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
18
- styleGuide: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
19
- text: z.ZodEffects<z.ZodString, string, string>;
20
- }, "strip", z.ZodTypeAny, {
21
- text: string;
22
- }, {
23
- text: string;
24
- }>, z.ZodEffects<z.ZodObject<{
25
- targetAudience: z.ZodOptional<z.ZodEnum<["general", "technical", "non-technical"]>>;
26
- toneOfVoice: z.ZodOptional<z.ZodEnum<["friendly", "empowering", "informative", "supportive", "elegant"]>>;
27
- levelOfFormality: z.ZodOptional<z.ZodEnum<["informal", "formal", "neutral"]>>;
28
- generalRule: z.ZodOptional<z.ZodEnum<["active-voice", "passive-voice"]>>;
29
- }, "strip", z.ZodTypeAny, {
30
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
31
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
32
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
33
- generalRule?: "active-voice" | "passive-voice" | undefined;
34
- }, {
35
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
36
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
37
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
38
- generalRule?: "active-voice" | "passive-voice" | undefined;
39
- }>, {
40
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
41
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
42
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
43
- generalRule?: "active-voice" | "passive-voice" | undefined;
44
- }, {
45
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
46
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
47
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
48
- generalRule?: "active-voice" | "passive-voice" | undefined;
49
- }>]>>;
50
- glossary: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
16
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
17
+ styleGuide: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
18
+ text: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
19
+ }, z.core.$strip>, z.ZodObject<{
20
+ targetAudience: z.ZodOptional<z.ZodEnum<{
21
+ general: "general";
22
+ technical: "technical";
23
+ "non-technical": "non-technical";
24
+ }>>;
25
+ toneOfVoice: z.ZodOptional<z.ZodEnum<{
26
+ friendly: "friendly";
27
+ empowering: "empowering";
28
+ informative: "informative";
29
+ supportive: "supportive";
30
+ elegant: "elegant";
31
+ }>>;
32
+ levelOfFormality: z.ZodOptional<z.ZodEnum<{
33
+ informal: "informal";
34
+ formal: "formal";
35
+ neutral: "neutral";
36
+ }>>;
37
+ generalRule: z.ZodOptional<z.ZodEnum<{
38
+ "active-voice": "active-voice";
39
+ "passive-voice": "passive-voice";
40
+ }>>;
41
+ }, z.core.$strip>]>>;
42
+ glossary: z.ZodOptional<z.ZodArray<z.ZodObject<{
51
43
  term: z.ZodString;
52
- description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
44
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
53
45
  translatable: z.ZodDefault<z.ZodBoolean>;
54
46
  forbidden: z.ZodDefault<z.ZodBoolean>;
55
47
  caseSensitive: z.ZodDefault<z.ZodBoolean>;
56
48
  translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
57
- locale: z.ZodEffects<z.ZodString, string, string>;
58
- translation: z.ZodEffects<z.ZodString, string, string>;
59
- description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
60
- }, "strip", z.ZodTypeAny, {
61
- translation: string;
62
- locale: string;
63
- description?: string | undefined;
64
- }, {
65
- translation: string;
66
- locale: string;
67
- description?: string | undefined;
68
- }>, "many">>;
69
- }, "strip", z.ZodTypeAny, {
70
- term: string;
71
- translatable: boolean;
72
- forbidden: boolean;
73
- caseSensitive: boolean;
74
- description?: string | undefined;
75
- translations?: {
76
- translation: string;
77
- locale: string;
78
- description?: string | undefined;
79
- }[] | undefined;
80
- }, {
81
- term: string;
82
- description?: string | undefined;
83
- translatable?: boolean | undefined;
84
- forbidden?: boolean | undefined;
85
- caseSensitive?: boolean | undefined;
86
- translations?: {
87
- translation: string;
88
- locale: string;
89
- description?: string | undefined;
90
- }[] | undefined;
91
- }>, {
92
- term: string;
93
- translatable: boolean;
94
- forbidden: boolean;
95
- caseSensitive: boolean;
96
- description?: string | undefined;
97
- translations?: {
98
- translation: string;
99
- locale: string;
100
- description?: string | undefined;
101
- }[] | undefined;
102
- }, {
103
- term: string;
104
- description?: string | undefined;
105
- translatable?: boolean | undefined;
106
- forbidden?: boolean | undefined;
107
- caseSensitive?: boolean | undefined;
108
- translations?: {
109
- translation: string;
110
- locale: string;
111
- description?: string | undefined;
112
- }[] | undefined;
113
- }>, "many">>;
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>;
49
+ locale: z.ZodString;
50
+ translation: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
51
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
52
+ }, z.core.$strip>>>;
53
+ }, z.core.$strip>>>;
54
+ targetPluralForms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
55
+ zero: "zero";
56
+ one: "one";
57
+ two: "two";
58
+ few: "few";
59
+ many: "many";
60
+ other: "other";
61
+ }>>>;
115
62
  translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
116
- sourceValue: z.ZodEffects<z.ZodString, string, string>;
117
- translatedValue: z.ZodEffects<z.ZodString, string, string>;
118
- }, "strip", z.ZodTypeAny, {
119
- sourceValue: string;
120
- translatedValue: string;
121
- }, {
122
- sourceValue: string;
123
- translatedValue: string;
124
- }>, "many">>;
125
- }, "strip", z.ZodTypeAny, {
126
- translationExamples?: {
127
- sourceValue: string;
128
- translatedValue: string;
129
- }[] | undefined;
130
- description?: string | undefined;
131
- styleGuide?: {
132
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
133
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
134
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
135
- generalRule?: "active-voice" | "passive-voice" | undefined;
136
- } | {
137
- text: string;
138
- } | undefined;
139
- glossary?: {
140
- term: string;
141
- translatable: boolean;
142
- forbidden: boolean;
143
- caseSensitive: boolean;
144
- description?: string | undefined;
145
- translations?: {
146
- translation: string;
147
- locale: string;
148
- description?: string | undefined;
149
- }[] | undefined;
150
- }[] | undefined;
151
- targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
152
- }, {
153
- translationExamples?: {
154
- sourceValue: string;
155
- translatedValue: string;
156
- }[] | undefined;
157
- description?: string | undefined;
158
- styleGuide?: {
159
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
160
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
161
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
162
- generalRule?: "active-voice" | "passive-voice" | undefined;
163
- } | {
164
- text: string;
165
- } | undefined;
166
- glossary?: {
167
- term: string;
168
- description?: string | undefined;
169
- translatable?: boolean | undefined;
170
- forbidden?: boolean | undefined;
171
- caseSensitive?: boolean | undefined;
172
- translations?: {
173
- translation: string;
174
- locale: string;
175
- description?: string | undefined;
176
- }[] | undefined;
177
- }[] | undefined;
178
- targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
179
- }>>;
63
+ sourceValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
64
+ translatedValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
65
+ }, z.core.$strip>>>;
66
+ }, z.core.$strip>>;
180
67
  contentUnits: z.ZodArray<z.ZodObject<{
181
68
  id: z.ZodString;
182
69
  context: z.ZodOptional<z.ZodObject<{
183
- description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
184
- }, "strip", z.ZodTypeAny, {
185
- description?: string | undefined;
186
- }, {
187
- description?: string | undefined;
188
- }>>;
189
- segments: z.ZodArray<z.ZodEffects<z.ZodObject<{
190
- sourceValue: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
70
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
71
+ }, z.core.$strip>>;
72
+ segments: z.ZodArray<z.ZodPipe<z.ZodObject<{
73
+ sourceValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
191
74
  translations: z.ZodArray<z.ZodObject<{
192
75
  id: z.ZodString;
193
- locale: z.ZodEffects<z.ZodString, string, string>;
194
- value: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
195
- }, "strip", z.ZodTypeAny, {
196
- value: string;
197
- id: string;
198
- locale: string;
199
- }, {
200
- value: string;
201
- id: string;
202
- locale: string;
203
- }>, "atleastone">;
76
+ locale: z.ZodString;
77
+ value: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
78
+ }, z.core.$strip>>;
204
79
  tmMatch: z.ZodOptional<z.ZodObject<{
205
- sourceValue: z.ZodEffects<z.ZodString, string, string>;
206
- translatedValue: z.ZodEffects<z.ZodString, string, string>;
207
- }, "strip", z.ZodTypeAny, {
208
- sourceValue: string;
209
- translatedValue: string;
210
- }, {
211
- sourceValue: string;
212
- translatedValue: string;
213
- }>>;
80
+ sourceValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
81
+ translatedValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
82
+ }, z.core.$strip>>;
214
83
  translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
215
- sourceValue: z.ZodEffects<z.ZodString, string, string>;
216
- translatedValue: z.ZodEffects<z.ZodString, string, string>;
217
- }, "strip", z.ZodTypeAny, {
218
- sourceValue: string;
219
- translatedValue: string;
220
- }, {
221
- sourceValue: string;
222
- translatedValue: string;
223
- }>, "many">>;
224
- }, "strip", z.ZodTypeAny, {
84
+ sourceValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
85
+ translatedValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
86
+ }, z.core.$strip>>>;
87
+ }, z.core.$strip>, z.ZodTransform<{
225
88
  sourceValue: string;
226
- translations: [{
227
- value: string;
89
+ translations: {
228
90
  id: string;
229
91
  locale: string;
230
- }, ...{
231
92
  value: string;
232
- id: string;
233
- locale: string;
234
- }[]];
93
+ }[];
235
94
  tmMatch?: {
236
95
  sourceValue: string;
237
96
  translatedValue: string;
@@ -242,34 +101,11 @@ export declare const LQA_ASYNC_BODY_SCHEMA: z.ZodObject<{
242
101
  }[] | undefined;
243
102
  }, {
244
103
  sourceValue: string;
245
- translations: [{
246
- value: string;
247
- id: string;
248
- locale: string;
249
- }, ...{
250
- value: string;
251
- id: string;
252
- locale: string;
253
- }[]];
254
- tmMatch?: {
255
- sourceValue: string;
256
- translatedValue: string;
257
- } | undefined;
258
- translationExamples?: {
259
- sourceValue: string;
260
- translatedValue: string;
261
- }[] | undefined;
262
- }>, {
263
- sourceValue: string;
264
- translations: [{
265
- value: string;
104
+ translations: {
266
105
  id: string;
267
106
  locale: string;
268
- }, ...{
269
107
  value: string;
270
- id: string;
271
- locale: string;
272
- }[]];
108
+ }[];
273
109
  tmMatch?: {
274
110
  sourceValue: string;
275
111
  translatedValue: string;
@@ -278,388 +114,17 @@ export declare const LQA_ASYNC_BODY_SCHEMA: z.ZodObject<{
278
114
  sourceValue: string;
279
115
  translatedValue: string;
280
116
  }[] | undefined;
281
- }, {
282
- sourceValue: string;
283
- translations: [{
284
- value: string;
285
- id: string;
286
- locale: string;
287
- }, ...{
288
- value: string;
289
- id: string;
290
- locale: string;
291
- }[]];
292
- tmMatch?: {
293
- sourceValue: string;
294
- translatedValue: string;
295
- } | undefined;
296
- translationExamples?: {
297
- sourceValue: string;
298
- translatedValue: string;
299
- }[] | undefined;
300
- }>, "atleastone">;
117
+ }>>>;
301
118
  characterLimit: z.ZodOptional<z.ZodNumber>;
302
- }, "strip", z.ZodTypeAny, {
303
- segments: [{
304
- sourceValue: string;
305
- translations: [{
306
- value: string;
307
- id: string;
308
- locale: string;
309
- }, ...{
310
- value: string;
311
- id: string;
312
- locale: string;
313
- }[]];
314
- tmMatch?: {
315
- sourceValue: string;
316
- translatedValue: string;
317
- } | undefined;
318
- translationExamples?: {
319
- sourceValue: string;
320
- translatedValue: string;
321
- }[] | undefined;
322
- }, ...{
323
- sourceValue: string;
324
- translations: [{
325
- value: string;
326
- id: string;
327
- locale: string;
328
- }, ...{
329
- value: string;
330
- id: string;
331
- locale: string;
332
- }[]];
333
- tmMatch?: {
334
- sourceValue: string;
335
- translatedValue: string;
336
- } | undefined;
337
- translationExamples?: {
338
- sourceValue: string;
339
- translatedValue: string;
340
- }[] | undefined;
341
- }[]];
342
- id: string;
343
- context?: {
344
- description?: string | undefined;
345
- } | undefined;
346
- characterLimit?: number | undefined;
347
- }, {
348
- segments: [{
349
- sourceValue: string;
350
- translations: [{
351
- value: string;
352
- id: string;
353
- locale: string;
354
- }, ...{
355
- value: string;
356
- id: string;
357
- locale: string;
358
- }[]];
359
- tmMatch?: {
360
- sourceValue: string;
361
- translatedValue: string;
362
- } | undefined;
363
- translationExamples?: {
364
- sourceValue: string;
365
- translatedValue: string;
366
- }[] | undefined;
367
- }, ...{
368
- sourceValue: string;
369
- translations: [{
370
- value: string;
371
- id: string;
372
- locale: string;
373
- }, ...{
374
- value: string;
375
- id: string;
376
- locale: string;
377
- }[]];
378
- tmMatch?: {
379
- sourceValue: string;
380
- translatedValue: string;
381
- } | undefined;
382
- translationExamples?: {
383
- sourceValue: string;
384
- translatedValue: string;
385
- }[] | undefined;
386
- }[]];
387
- id: string;
388
- context?: {
389
- description?: string | undefined;
390
- } | undefined;
391
- characterLimit?: number | undefined;
392
- }>, "atleastone">;
393
- }, "strip", z.ZodTypeAny, {
394
- originCorrelationId: string;
395
- ownerId: string;
396
- callbackUrl: string;
397
- callbackToken: string;
398
- sourceLocale: string;
399
- contentUnits: [{
400
- segments: [{
401
- sourceValue: string;
402
- translations: [{
403
- value: string;
404
- id: string;
405
- locale: string;
406
- }, ...{
407
- value: string;
408
- id: string;
409
- locale: string;
410
- }[]];
411
- tmMatch?: {
412
- sourceValue: string;
413
- translatedValue: string;
414
- } | undefined;
415
- translationExamples?: {
416
- sourceValue: string;
417
- translatedValue: string;
418
- }[] | undefined;
419
- }, ...{
420
- sourceValue: string;
421
- translations: [{
422
- value: string;
423
- id: string;
424
- locale: string;
425
- }, ...{
426
- value: string;
427
- id: string;
428
- locale: string;
429
- }[]];
430
- tmMatch?: {
431
- sourceValue: string;
432
- translatedValue: string;
433
- } | undefined;
434
- translationExamples?: {
435
- sourceValue: string;
436
- translatedValue: string;
437
- }[] | undefined;
438
- }[]];
439
- id: string;
440
- context?: {
441
- description?: string | undefined;
442
- } | undefined;
443
- characterLimit?: number | undefined;
444
- }, ...{
445
- segments: [{
446
- sourceValue: string;
447
- translations: [{
448
- value: string;
449
- id: string;
450
- locale: string;
451
- }, ...{
452
- value: string;
453
- id: string;
454
- locale: string;
455
- }[]];
456
- tmMatch?: {
457
- sourceValue: string;
458
- translatedValue: string;
459
- } | undefined;
460
- translationExamples?: {
461
- sourceValue: string;
462
- translatedValue: string;
463
- }[] | undefined;
464
- }, ...{
465
- sourceValue: string;
466
- translations: [{
467
- value: string;
468
- id: string;
469
- locale: string;
470
- }, ...{
471
- value: string;
472
- id: string;
473
- locale: string;
474
- }[]];
475
- tmMatch?: {
476
- sourceValue: string;
477
- translatedValue: string;
478
- } | undefined;
479
- translationExamples?: {
480
- sourceValue: string;
481
- translatedValue: string;
482
- }[] | undefined;
483
- }[]];
484
- id: string;
485
- context?: {
486
- description?: string | undefined;
487
- } | undefined;
488
- characterLimit?: number | undefined;
489
- }[]];
490
- context?: {
491
- translationExamples?: {
492
- sourceValue: string;
493
- translatedValue: string;
494
- }[] | undefined;
495
- description?: string | undefined;
496
- styleGuide?: {
497
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
498
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
499
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
500
- generalRule?: "active-voice" | "passive-voice" | undefined;
501
- } | {
502
- text: string;
503
- } | undefined;
504
- glossary?: {
505
- term: string;
506
- translatable: boolean;
507
- forbidden: boolean;
508
- caseSensitive: boolean;
509
- description?: string | undefined;
510
- translations?: {
511
- translation: string;
512
- locale: string;
513
- description?: string | undefined;
514
- }[] | undefined;
515
- }[] | undefined;
516
- targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
517
- } | undefined;
518
- integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
519
- }, {
520
- originCorrelationId: string;
521
- ownerId: string;
522
- callbackUrl: string;
523
- callbackToken: string;
524
- sourceLocale: string;
525
- contentUnits: [{
526
- segments: [{
527
- sourceValue: string;
528
- translations: [{
529
- value: string;
530
- id: string;
531
- locale: string;
532
- }, ...{
533
- value: string;
534
- id: string;
535
- locale: string;
536
- }[]];
537
- tmMatch?: {
538
- sourceValue: string;
539
- translatedValue: string;
540
- } | undefined;
541
- translationExamples?: {
542
- sourceValue: string;
543
- translatedValue: string;
544
- }[] | undefined;
545
- }, ...{
546
- sourceValue: string;
547
- translations: [{
548
- value: string;
549
- id: string;
550
- locale: string;
551
- }, ...{
552
- value: string;
553
- id: string;
554
- locale: string;
555
- }[]];
556
- tmMatch?: {
557
- sourceValue: string;
558
- translatedValue: string;
559
- } | undefined;
560
- translationExamples?: {
561
- sourceValue: string;
562
- translatedValue: string;
563
- }[] | undefined;
564
- }[]];
565
- id: string;
566
- context?: {
567
- description?: string | undefined;
568
- } | undefined;
569
- characterLimit?: number | undefined;
570
- }, ...{
571
- segments: [{
572
- sourceValue: string;
573
- translations: [{
574
- value: string;
575
- id: string;
576
- locale: string;
577
- }, ...{
578
- value: string;
579
- id: string;
580
- locale: string;
581
- }[]];
582
- tmMatch?: {
583
- sourceValue: string;
584
- translatedValue: string;
585
- } | undefined;
586
- translationExamples?: {
587
- sourceValue: string;
588
- translatedValue: string;
589
- }[] | undefined;
590
- }, ...{
591
- sourceValue: string;
592
- translations: [{
593
- value: string;
594
- id: string;
595
- locale: string;
596
- }, ...{
597
- value: string;
598
- id: string;
599
- locale: string;
600
- }[]];
601
- tmMatch?: {
602
- sourceValue: string;
603
- translatedValue: string;
604
- } | undefined;
605
- translationExamples?: {
606
- sourceValue: string;
607
- translatedValue: string;
608
- }[] | undefined;
609
- }[]];
610
- id: string;
611
- context?: {
612
- description?: string | undefined;
613
- } | undefined;
614
- characterLimit?: number | undefined;
615
- }[]];
616
- context?: {
617
- translationExamples?: {
618
- sourceValue: string;
619
- translatedValue: string;
620
- }[] | undefined;
621
- description?: string | undefined;
622
- styleGuide?: {
623
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
624
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
625
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
626
- generalRule?: "active-voice" | "passive-voice" | undefined;
627
- } | {
628
- text: string;
629
- } | undefined;
630
- glossary?: {
631
- term: string;
632
- description?: string | undefined;
633
- translatable?: boolean | undefined;
634
- forbidden?: boolean | undefined;
635
- caseSensitive?: boolean | undefined;
636
- translations?: {
637
- translation: string;
638
- locale: string;
639
- description?: string | undefined;
640
- }[] | undefined;
641
- }[] | undefined;
642
- targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
643
- } | undefined;
644
- integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
645
- }>;
119
+ }, z.core.$strip>>;
120
+ }, z.core.$strip>;
646
121
  export declare const LQA_ASYNC_HEADERS_SCHEMA: z.ZodObject<{
647
- 'x-fake-processing': z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
648
- }, "strip", z.ZodTypeAny, {
649
- 'x-fake-processing'?: boolean | undefined;
650
- }, {
651
- 'x-fake-processing'?: unknown;
652
- }>;
122
+ 'x-fake-processing': z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<boolean, string>>, z.ZodBoolean>>;
123
+ }, z.core.$strip>;
653
124
  export declare const LQA_ASYNC_RESPONSE_SCHEMA: z.ZodObject<{
654
- requestId: z.ZodString;
655
- expectedAt: z.ZodString;
656
- }, "strip", z.ZodTypeAny, {
657
- requestId: string;
658
- expectedAt: string;
659
- }, {
660
- requestId: string;
661
- expectedAt: string;
662
- }>;
125
+ requestId: z.ZodUUID;
126
+ expectedAt: z.ZodISODateTime;
127
+ }, z.core.$strip>;
663
128
  export declare const LQA_ASYNC_SUCCESS_SCHEMA: z.ZodObject<{
664
129
  status: z.ZodLiteral<"success">;
665
130
  originCorrelationId: z.ZodString;
@@ -670,117 +135,26 @@ export declare const LQA_ASYNC_SUCCESS_SCHEMA: z.ZodObject<{
670
135
  suggestion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
671
136
  issues: z.ZodArray<z.ZodObject<{
672
137
  category: z.ZodString;
673
- severity: z.ZodNativeEnum<{
138
+ severity: z.ZodEnum<{
674
139
  readonly NEUTRAL: "neutral";
675
140
  readonly MINOR: "minor";
676
141
  readonly MAJOR: "major";
677
142
  readonly CRITICAL: "critical";
678
143
  }>;
679
144
  comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
680
- }, "strip", z.ZodTypeAny, {
681
- category: string;
682
- severity: "neutral" | "minor" | "major" | "critical";
683
- comment?: string | null | undefined;
684
- }, {
685
- category: string;
686
- severity: "neutral" | "minor" | "major" | "critical";
687
- comment?: string | null | undefined;
688
- }>, "many">;
145
+ }, z.core.$strip>>;
689
146
  score: z.ZodNumber;
690
- }, "strip", z.ZodTypeAny, {
691
- issues: {
692
- category: string;
693
- severity: "neutral" | "minor" | "major" | "critical";
694
- comment?: string | null | undefined;
695
- }[];
696
- polyglotRefId: string;
697
- contentUnitId: string;
698
- translationId: string;
699
- score: number;
700
- suggestion?: string | null | undefined;
701
- }, {
702
- issues: {
703
- category: string;
704
- severity: "neutral" | "minor" | "major" | "critical";
705
- comment?: string | null | undefined;
706
- }[];
707
- polyglotRefId: string;
708
- contentUnitId: string;
709
- translationId: string;
710
- score: number;
711
- suggestion?: string | null | undefined;
712
- }>, "many">;
147
+ }, z.core.$strip>>;
713
148
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
714
149
  message: z.ZodString;
715
150
  errorCode: z.ZodString;
716
151
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
717
- } & {
718
152
  polyglotRefId: z.ZodString;
719
153
  contentUnitId: z.ZodString;
720
154
  translationId: z.ZodString;
721
- }, "strip", z.ZodTypeAny, {
722
- message: string;
723
- errorCode: string;
724
- polyglotRefId: string;
725
- contentUnitId: string;
726
- translationId: string;
727
- details?: Record<string, unknown> | undefined;
728
- }, {
729
- message: string;
730
- errorCode: string;
731
- polyglotRefId: string;
732
- contentUnitId: string;
733
- translationId: string;
734
- details?: Record<string, unknown> | undefined;
735
- }>, "many">>;
736
- }, "strip", z.ZodTypeAny, {
737
- originCorrelationId: string;
738
- status: "success";
739
- data: {
740
- issues: {
741
- category: string;
742
- severity: "neutral" | "minor" | "major" | "critical";
743
- comment?: string | null | undefined;
744
- }[];
745
- polyglotRefId: string;
746
- contentUnitId: string;
747
- translationId: string;
748
- score: number;
749
- suggestion?: string | null | undefined;
750
- }[];
751
- errors?: {
752
- message: string;
753
- errorCode: string;
754
- polyglotRefId: string;
755
- contentUnitId: string;
756
- translationId: string;
757
- details?: Record<string, unknown> | undefined;
758
- }[] | undefined;
759
- }, {
760
- originCorrelationId: string;
761
- status: "success";
762
- data: {
763
- issues: {
764
- category: string;
765
- severity: "neutral" | "minor" | "major" | "critical";
766
- comment?: string | null | undefined;
767
- }[];
768
- polyglotRefId: string;
769
- contentUnitId: string;
770
- translationId: string;
771
- score: number;
772
- suggestion?: string | null | undefined;
773
- }[];
774
- errors?: {
775
- message: string;
776
- errorCode: string;
777
- polyglotRefId: string;
778
- contentUnitId: string;
779
- translationId: string;
780
- details?: Record<string, unknown> | undefined;
781
- }[] | undefined;
782
- }>;
783
- export declare const LQA_ASYNC_CALLBACK_SCHEMA: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
155
+ }, z.core.$strip>>>;
156
+ }, z.core.$strip>;
157
+ export declare const LQA_ASYNC_CALLBACK_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
784
158
  status: z.ZodLiteral<"success">;
785
159
  originCorrelationId: z.ZodString;
786
160
  data: z.ZodArray<z.ZodObject<{
@@ -790,135 +164,31 @@ export declare const LQA_ASYNC_CALLBACK_SCHEMA: z.ZodDiscriminatedUnion<"status"
790
164
  suggestion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
791
165
  issues: z.ZodArray<z.ZodObject<{
792
166
  category: z.ZodString;
793
- severity: z.ZodNativeEnum<{
167
+ severity: z.ZodEnum<{
794
168
  readonly NEUTRAL: "neutral";
795
169
  readonly MINOR: "minor";
796
170
  readonly MAJOR: "major";
797
171
  readonly CRITICAL: "critical";
798
172
  }>;
799
173
  comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
800
- }, "strip", z.ZodTypeAny, {
801
- category: string;
802
- severity: "neutral" | "minor" | "major" | "critical";
803
- comment?: string | null | undefined;
804
- }, {
805
- category: string;
806
- severity: "neutral" | "minor" | "major" | "critical";
807
- comment?: string | null | undefined;
808
- }>, "many">;
174
+ }, z.core.$strip>>;
809
175
  score: z.ZodNumber;
810
- }, "strip", z.ZodTypeAny, {
811
- issues: {
812
- category: string;
813
- severity: "neutral" | "minor" | "major" | "critical";
814
- comment?: string | null | undefined;
815
- }[];
816
- polyglotRefId: string;
817
- contentUnitId: string;
818
- translationId: string;
819
- score: number;
820
- suggestion?: string | null | undefined;
821
- }, {
822
- issues: {
823
- category: string;
824
- severity: "neutral" | "minor" | "major" | "critical";
825
- comment?: string | null | undefined;
826
- }[];
827
- polyglotRefId: string;
828
- contentUnitId: string;
829
- translationId: string;
830
- score: number;
831
- suggestion?: string | null | undefined;
832
- }>, "many">;
176
+ }, z.core.$strip>>;
833
177
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
834
178
  message: z.ZodString;
835
179
  errorCode: z.ZodString;
836
180
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
837
- } & {
838
181
  polyglotRefId: z.ZodString;
839
182
  contentUnitId: z.ZodString;
840
183
  translationId: z.ZodString;
841
- }, "strip", z.ZodTypeAny, {
842
- message: string;
843
- errorCode: string;
844
- polyglotRefId: string;
845
- contentUnitId: string;
846
- translationId: string;
847
- details?: Record<string, unknown> | undefined;
848
- }, {
849
- message: string;
850
- errorCode: string;
851
- polyglotRefId: string;
852
- contentUnitId: string;
853
- translationId: string;
854
- details?: Record<string, unknown> | undefined;
855
- }>, "many">>;
856
- }, "strip", z.ZodTypeAny, {
857
- originCorrelationId: string;
858
- status: "success";
859
- data: {
860
- issues: {
861
- category: string;
862
- severity: "neutral" | "minor" | "major" | "critical";
863
- comment?: string | null | undefined;
864
- }[];
865
- polyglotRefId: string;
866
- contentUnitId: string;
867
- translationId: string;
868
- score: number;
869
- suggestion?: string | null | undefined;
870
- }[];
871
- errors?: {
872
- message: string;
873
- errorCode: string;
874
- polyglotRefId: string;
875
- contentUnitId: string;
876
- translationId: string;
877
- details?: Record<string, unknown> | undefined;
878
- }[] | undefined;
879
- }, {
880
- originCorrelationId: string;
881
- status: "success";
882
- data: {
883
- issues: {
884
- category: string;
885
- severity: "neutral" | "minor" | "major" | "critical";
886
- comment?: string | null | undefined;
887
- }[];
888
- polyglotRefId: string;
889
- contentUnitId: string;
890
- translationId: string;
891
- score: number;
892
- suggestion?: string | null | undefined;
893
- }[];
894
- errors?: {
895
- message: string;
896
- errorCode: string;
897
- polyglotRefId: string;
898
- contentUnitId: string;
899
- translationId: string;
900
- details?: Record<string, unknown> | undefined;
901
- }[] | undefined;
902
- }>, z.ZodObject<{
184
+ }, z.core.$strip>>>;
185
+ }, z.core.$strip>, z.ZodObject<{
903
186
  message: z.ZodString;
904
187
  errorCode: z.ZodString;
905
188
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
906
- } & {
907
189
  status: z.ZodLiteral<"error">;
908
190
  originCorrelationId: z.ZodString;
909
- }, "strip", z.ZodTypeAny, {
910
- originCorrelationId: string;
911
- message: string;
912
- status: "error";
913
- errorCode: string;
914
- details?: Record<string, unknown> | undefined;
915
- }, {
916
- originCorrelationId: string;
917
- message: string;
918
- status: "error";
919
- errorCode: string;
920
- details?: Record<string, unknown> | undefined;
921
- }>]>;
191
+ }, z.core.$strip>]>;
922
192
  export type LqaAsyncBody = z.infer<typeof LQA_ASYNC_BODY_SCHEMA>;
923
193
  export type LqaAsyncHeaders = z.infer<typeof LQA_ASYNC_HEADERS_SCHEMA>;
924
194
  export type LqaAsyncResponse = z.infer<typeof LQA_ASYNC_RESPONSE_SCHEMA>;