@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,1021 +1,119 @@
1
- import z from 'zod';
1
+ import z from 'zod/v4';
2
2
  import { COMMON_REQUEST_HEADERS_SCHEMA } from '../common/commonSchemas.ts';
3
- export declare const REWRITE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
4
- context: z.ZodOptional<z.ZodObject<Omit<{
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<{
39
- term: z.ZodString;
40
- description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
41
- translatable: z.ZodDefault<z.ZodBoolean>;
42
- forbidden: z.ZodDefault<z.ZodBoolean>;
43
- caseSensitive: z.ZodDefault<z.ZodBoolean>;
44
- 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>;
103
- 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
- }, "targetPluralForms">, "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
- }, {
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
- }>>;
166
- assets: z.ZodOptional<z.ZodObject<Omit<{
167
- description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
168
- styleGuide: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
169
- text: z.ZodEffects<z.ZodString, string, string>;
170
- }, "strip", z.ZodTypeAny, {
171
- text: string;
172
- }, {
173
- text: string;
174
- }>, z.ZodEffects<z.ZodObject<{
175
- targetAudience: z.ZodOptional<z.ZodEnum<["general", "technical", "non-technical"]>>;
176
- toneOfVoice: z.ZodOptional<z.ZodEnum<["friendly", "empowering", "informative", "supportive", "elegant"]>>;
177
- levelOfFormality: z.ZodOptional<z.ZodEnum<["informal", "formal", "neutral"]>>;
178
- generalRule: z.ZodOptional<z.ZodEnum<["active-voice", "passive-voice"]>>;
179
- }, "strip", z.ZodTypeAny, {
180
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
181
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
182
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
183
- generalRule?: "active-voice" | "passive-voice" | undefined;
184
- }, {
185
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
186
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
187
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
188
- generalRule?: "active-voice" | "passive-voice" | undefined;
189
- }>, {
190
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
191
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
192
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
193
- generalRule?: "active-voice" | "passive-voice" | undefined;
194
- }, {
195
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
196
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
197
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
198
- generalRule?: "active-voice" | "passive-voice" | undefined;
199
- }>]>>;
200
- glossary: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
201
- term: z.ZodString;
202
- description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
203
- translatable: z.ZodDefault<z.ZodBoolean>;
204
- forbidden: z.ZodDefault<z.ZodBoolean>;
205
- caseSensitive: z.ZodDefault<z.ZodBoolean>;
206
- translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
207
- locale: z.ZodEffects<z.ZodString, string, string>;
208
- translation: z.ZodEffects<z.ZodString, string, string>;
209
- description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
210
- }, "strip", z.ZodTypeAny, {
211
- translation: string;
212
- locale: string;
213
- description?: string | undefined;
214
- }, {
215
- translation: string;
216
- locale: string;
217
- description?: string | undefined;
218
- }>, "many">>;
219
- }, "strip", z.ZodTypeAny, {
220
- term: string;
221
- translatable: boolean;
222
- forbidden: boolean;
223
- caseSensitive: boolean;
224
- description?: string | undefined;
225
- translations?: {
226
- translation: string;
227
- locale: string;
228
- description?: string | undefined;
229
- }[] | undefined;
230
- }, {
231
- term: string;
232
- description?: string | undefined;
233
- translatable?: boolean | undefined;
234
- forbidden?: boolean | undefined;
235
- caseSensitive?: boolean | undefined;
236
- translations?: {
237
- translation: string;
238
- locale: string;
239
- description?: string | undefined;
240
- }[] | undefined;
241
- }>, {
242
- term: string;
243
- translatable: boolean;
244
- forbidden: boolean;
245
- caseSensitive: boolean;
246
- description?: string | undefined;
247
- translations?: {
248
- translation: string;
249
- locale: string;
250
- description?: string | undefined;
251
- }[] | undefined;
252
- }, {
253
- term: string;
254
- description?: string | undefined;
255
- translatable?: boolean | undefined;
256
- forbidden?: boolean | undefined;
257
- caseSensitive?: boolean | undefined;
258
- translations?: {
259
- translation: string;
260
- locale: string;
261
- description?: string | undefined;
262
- }[] | undefined;
263
- }>, "many">>;
264
- 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>;
265
- translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
266
- sourceValue: z.ZodEffects<z.ZodString, string, string>;
267
- translatedValue: z.ZodEffects<z.ZodString, string, string>;
268
- }, "strip", z.ZodTypeAny, {
269
- sourceValue: string;
270
- translatedValue: string;
271
- }, {
272
- sourceValue: string;
273
- translatedValue: string;
274
- }>, "many">>;
275
- }, "targetPluralForms">, "strip", z.ZodTypeAny, {
276
- translationExamples?: {
277
- sourceValue: string;
278
- translatedValue: string;
279
- }[] | undefined;
280
- description?: string | undefined;
281
- styleGuide?: {
282
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
283
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
284
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
285
- generalRule?: "active-voice" | "passive-voice" | undefined;
286
- } | {
287
- text: string;
288
- } | undefined;
289
- glossary?: {
290
- term: string;
291
- translatable: boolean;
292
- forbidden: boolean;
293
- caseSensitive: boolean;
294
- description?: string | undefined;
295
- translations?: {
296
- translation: string;
297
- locale: string;
298
- description?: string | undefined;
299
- }[] | undefined;
300
- }[] | undefined;
301
- }, {
302
- translationExamples?: {
303
- sourceValue: string;
304
- translatedValue: string;
305
- }[] | undefined;
306
- description?: string | undefined;
307
- styleGuide?: {
308
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
309
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
310
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
311
- generalRule?: "active-voice" | "passive-voice" | undefined;
312
- } | {
313
- text: string;
314
- } | undefined;
315
- glossary?: {
316
- term: string;
317
- description?: string | undefined;
318
- translatable?: boolean | undefined;
319
- forbidden?: boolean | undefined;
320
- caseSensitive?: boolean | undefined;
321
- translations?: {
322
- translation: string;
323
- locale: string;
324
- description?: string | undefined;
325
- }[] | undefined;
326
- }[] | undefined;
327
- }>>;
328
- locale: z.ZodEffects<z.ZodString, string, string>;
329
- value: z.ZodString;
330
- integration: z.ZodOptional<z.ZodNativeEnum<{
331
- readonly FINETUNED_OPENAI: "FT-OpenAI";
332
- readonly CLAUDE: "Claude";
333
- readonly GPT: "GPT";
334
- readonly GEMINI: "Gemini";
335
- }>>;
336
- forceIntegration: z.ZodOptional<z.ZodBoolean>;
337
- history: z.ZodOptional<z.ZodArray<z.ZodObject<{
338
- values: z.ZodEffects<z.ZodArray<z.ZodString, "atleastone">, string[], [string, ...string[]]>;
339
- mode: z.ZodPipeline<z.ZodString, z.ZodNativeEnum<{
340
- readonly REPHRASE: "rephrase";
341
- readonly SHORTEN: "shorten";
342
- }>>;
343
- }, "strip", z.ZodTypeAny, {
344
- values: string[];
345
- mode: "rephrase" | "shorten";
346
- }, {
347
- values: [string, ...string[]];
348
- mode: string;
349
- }>, "many">>;
350
- mode: z.ZodPipeline<z.ZodString, z.ZodNativeEnum<{
351
- readonly REPHRASE: "rephrase";
352
- readonly SHORTEN: "shorten";
353
- }>>;
354
- }, "strip", z.ZodTypeAny, {
355
- value: string;
356
- mode: "rephrase" | "shorten";
357
- locale: string;
358
- context?: {
359
- translationExamples?: {
360
- sourceValue: string;
361
- translatedValue: string;
362
- }[] | undefined;
363
- description?: string | undefined;
364
- styleGuide?: {
365
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
366
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
367
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
368
- generalRule?: "active-voice" | "passive-voice" | undefined;
369
- } | {
370
- text: string;
371
- } | undefined;
372
- glossary?: {
373
- term: string;
374
- translatable: boolean;
375
- forbidden: boolean;
376
- caseSensitive: boolean;
377
- description?: string | undefined;
378
- translations?: {
379
- translation: string;
380
- locale: string;
381
- description?: string | undefined;
382
- }[] | undefined;
383
- }[] | undefined;
384
- } | undefined;
385
- integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
386
- assets?: {
387
- translationExamples?: {
388
- sourceValue: string;
389
- translatedValue: string;
390
- }[] | undefined;
391
- description?: string | undefined;
392
- styleGuide?: {
393
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
394
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
395
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
396
- generalRule?: "active-voice" | "passive-voice" | undefined;
397
- } | {
398
- text: string;
399
- } | undefined;
400
- glossary?: {
401
- term: string;
402
- translatable: boolean;
403
- forbidden: boolean;
404
- caseSensitive: boolean;
405
- description?: string | undefined;
406
- translations?: {
407
- translation: string;
408
- locale: string;
409
- description?: string | undefined;
410
- }[] | undefined;
411
- }[] | undefined;
412
- } | undefined;
413
- forceIntegration?: boolean | undefined;
414
- history?: {
415
- values: string[];
416
- mode: "rephrase" | "shorten";
417
- }[] | undefined;
418
- }, {
419
- value: string;
420
- mode: string;
421
- locale: string;
422
- context?: {
423
- translationExamples?: {
424
- sourceValue: string;
425
- translatedValue: string;
426
- }[] | undefined;
427
- description?: string | undefined;
428
- styleGuide?: {
429
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
430
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
431
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
432
- generalRule?: "active-voice" | "passive-voice" | undefined;
433
- } | {
434
- text: string;
435
- } | undefined;
436
- glossary?: {
437
- term: string;
438
- description?: string | undefined;
439
- translatable?: boolean | undefined;
440
- forbidden?: boolean | undefined;
441
- caseSensitive?: boolean | undefined;
442
- translations?: {
443
- translation: string;
444
- locale: string;
445
- description?: string | undefined;
446
- }[] | undefined;
447
- }[] | undefined;
448
- } | undefined;
449
- integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
450
- assets?: {
451
- translationExamples?: {
452
- sourceValue: string;
453
- translatedValue: string;
454
- }[] | undefined;
455
- description?: string | undefined;
456
- styleGuide?: {
457
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
458
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
459
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
460
- generalRule?: "active-voice" | "passive-voice" | undefined;
461
- } | {
462
- text: string;
463
- } | undefined;
464
- glossary?: {
465
- term: string;
466
- description?: string | undefined;
467
- translatable?: boolean | undefined;
468
- forbidden?: boolean | undefined;
469
- caseSensitive?: boolean | undefined;
470
- translations?: {
471
- translation: string;
472
- locale: string;
473
- description?: string | undefined;
474
- }[] | undefined;
475
- }[] | undefined;
476
- } | undefined;
477
- forceIntegration?: boolean | undefined;
478
- history?: {
479
- values: [string, ...string[]];
480
- mode: string;
481
- }[] | undefined;
482
- }>, {
483
- value: string;
484
- mode: "rephrase" | "shorten";
485
- locale: string;
486
- context?: {
487
- translationExamples?: {
488
- sourceValue: string;
489
- translatedValue: string;
490
- }[] | undefined;
491
- description?: string | undefined;
492
- styleGuide?: {
493
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
494
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
495
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
496
- generalRule?: "active-voice" | "passive-voice" | undefined;
497
- } | {
498
- text: string;
499
- } | undefined;
500
- glossary?: {
501
- term: string;
502
- translatable: boolean;
503
- forbidden: boolean;
504
- caseSensitive: boolean;
505
- description?: string | undefined;
506
- translations?: {
507
- translation: string;
508
- locale: string;
509
- description?: string | undefined;
510
- }[] | undefined;
511
- }[] | undefined;
512
- } | undefined;
513
- integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
514
- assets?: {
515
- translationExamples?: {
516
- sourceValue: string;
517
- translatedValue: string;
518
- }[] | undefined;
519
- description?: string | undefined;
520
- styleGuide?: {
521
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
522
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
523
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
524
- generalRule?: "active-voice" | "passive-voice" | undefined;
525
- } | {
526
- text: string;
527
- } | undefined;
528
- glossary?: {
529
- term: string;
530
- translatable: boolean;
531
- forbidden: boolean;
532
- caseSensitive: boolean;
533
- description?: string | undefined;
534
- translations?: {
535
- translation: string;
536
- locale: string;
537
- description?: string | undefined;
538
- }[] | undefined;
539
- }[] | undefined;
540
- } | undefined;
541
- forceIntegration?: boolean | undefined;
542
- history?: {
543
- values: string[];
544
- mode: "rephrase" | "shorten";
545
- }[] | undefined;
546
- }, {
547
- value: string;
548
- mode: string;
549
- locale: string;
550
- context?: {
551
- translationExamples?: {
552
- sourceValue: string;
553
- translatedValue: string;
554
- }[] | undefined;
555
- description?: string | undefined;
556
- styleGuide?: {
557
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
558
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
559
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
560
- generalRule?: "active-voice" | "passive-voice" | undefined;
561
- } | {
562
- text: string;
563
- } | undefined;
564
- glossary?: {
565
- term: string;
566
- description?: string | undefined;
567
- translatable?: boolean | undefined;
568
- forbidden?: boolean | undefined;
569
- caseSensitive?: boolean | undefined;
570
- translations?: {
571
- translation: string;
572
- locale: string;
573
- description?: string | undefined;
574
- }[] | undefined;
575
- }[] | undefined;
576
- } | undefined;
577
- integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
578
- assets?: {
579
- translationExamples?: {
580
- sourceValue: string;
581
- translatedValue: string;
582
- }[] | undefined;
583
- description?: string | undefined;
584
- styleGuide?: {
585
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
586
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
587
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
588
- generalRule?: "active-voice" | "passive-voice" | undefined;
589
- } | {
590
- text: string;
591
- } | undefined;
592
- glossary?: {
593
- term: string;
594
- description?: string | undefined;
595
- translatable?: boolean | undefined;
596
- forbidden?: boolean | undefined;
597
- caseSensitive?: boolean | undefined;
598
- translations?: {
599
- translation: string;
600
- locale: string;
601
- description?: string | undefined;
602
- }[] | undefined;
603
- }[] | undefined;
604
- } | undefined;
605
- forceIntegration?: boolean | undefined;
606
- history?: {
607
- values: [string, ...string[]];
608
- mode: string;
609
- }[] | undefined;
610
- }>, {
611
- value: string;
612
- mode: "rephrase" | "shorten";
613
- locale: string;
614
- context?: {
615
- translationExamples?: {
616
- sourceValue: string;
617
- translatedValue: string;
618
- }[] | undefined;
619
- description?: string | undefined;
620
- styleGuide?: {
621
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
622
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
623
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
624
- generalRule?: "active-voice" | "passive-voice" | undefined;
625
- } | {
626
- text: string;
627
- } | undefined;
628
- glossary?: {
629
- term: string;
630
- translatable: boolean;
631
- forbidden: boolean;
632
- caseSensitive: boolean;
633
- description?: string | undefined;
634
- translations?: {
635
- translation: string;
636
- locale: string;
637
- description?: string | undefined;
638
- }[] | undefined;
639
- }[] | undefined;
640
- } | undefined;
641
- integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
642
- assets?: {
643
- translationExamples?: {
644
- sourceValue: string;
645
- translatedValue: string;
646
- }[] | undefined;
647
- description?: string | undefined;
648
- styleGuide?: {
649
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
650
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
651
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
652
- generalRule?: "active-voice" | "passive-voice" | undefined;
653
- } | {
654
- text: string;
655
- } | undefined;
656
- glossary?: {
657
- term: string;
658
- translatable: boolean;
659
- forbidden: boolean;
660
- caseSensitive: boolean;
661
- description?: string | undefined;
662
- translations?: {
663
- translation: string;
664
- locale: string;
665
- description?: string | undefined;
666
- }[] | undefined;
667
- }[] | undefined;
668
- } | undefined;
669
- forceIntegration?: boolean | undefined;
670
- history?: {
671
- values: string[];
672
- mode: "rephrase" | "shorten";
673
- }[] | undefined;
674
- }, {
675
- value: string;
676
- mode: string;
677
- locale: string;
678
- context?: {
679
- translationExamples?: {
680
- sourceValue: string;
681
- translatedValue: string;
682
- }[] | undefined;
683
- description?: string | undefined;
684
- styleGuide?: {
685
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
686
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
687
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
688
- generalRule?: "active-voice" | "passive-voice" | undefined;
689
- } | {
690
- text: string;
691
- } | undefined;
692
- glossary?: {
693
- term: string;
694
- description?: string | undefined;
695
- translatable?: boolean | undefined;
696
- forbidden?: boolean | undefined;
697
- caseSensitive?: boolean | undefined;
698
- translations?: {
699
- translation: string;
700
- locale: string;
701
- description?: string | undefined;
702
- }[] | undefined;
703
- }[] | undefined;
704
- } | undefined;
705
- integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
706
- assets?: {
707
- translationExamples?: {
708
- sourceValue: string;
709
- translatedValue: string;
710
- }[] | undefined;
711
- description?: string | undefined;
712
- styleGuide?: {
713
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
714
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
715
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
716
- generalRule?: "active-voice" | "passive-voice" | undefined;
717
- } | {
718
- text: string;
719
- } | undefined;
720
- glossary?: {
721
- term: string;
722
- description?: string | undefined;
723
- translatable?: boolean | undefined;
724
- forbidden?: boolean | undefined;
725
- caseSensitive?: boolean | undefined;
726
- translations?: {
727
- translation: string;
728
- locale: string;
729
- description?: string | undefined;
730
- }[] | undefined;
731
- }[] | undefined;
732
- } | undefined;
733
- forceIntegration?: boolean | undefined;
734
- history?: {
735
- values: [string, ...string[]];
736
- mode: string;
737
- }[] | undefined;
738
- }>, {
739
- value: string;
740
- mode: "rephrase" | "shorten";
741
- locale: string;
742
- context?: {
743
- translationExamples?: {
744
- sourceValue: string;
745
- translatedValue: string;
746
- }[] | undefined;
747
- description?: string | undefined;
748
- styleGuide?: {
749
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
750
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
751
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
752
- generalRule?: "active-voice" | "passive-voice" | undefined;
753
- } | {
754
- text: string;
755
- } | undefined;
756
- glossary?: {
757
- term: string;
758
- translatable: boolean;
759
- forbidden: boolean;
760
- caseSensitive: boolean;
761
- description?: string | undefined;
762
- translations?: {
763
- translation: string;
764
- locale: string;
765
- description?: string | undefined;
766
- }[] | undefined;
767
- }[] | undefined;
768
- } | undefined;
769
- integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
770
- assets?: {
771
- translationExamples?: {
772
- sourceValue: string;
773
- translatedValue: string;
774
- }[] | undefined;
775
- description?: string | undefined;
776
- styleGuide?: {
777
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
778
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
779
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
780
- generalRule?: "active-voice" | "passive-voice" | undefined;
781
- } | {
782
- text: string;
783
- } | undefined;
784
- glossary?: {
785
- term: string;
786
- translatable: boolean;
787
- forbidden: boolean;
788
- caseSensitive: boolean;
789
- description?: string | undefined;
790
- translations?: {
791
- translation: string;
792
- locale: string;
793
- description?: string | undefined;
794
- }[] | undefined;
795
- }[] | undefined;
796
- } | undefined;
797
- forceIntegration?: boolean | undefined;
798
- history?: {
799
- values: string[];
800
- mode: "rephrase" | "shorten";
801
- }[] | undefined;
802
- }, {
803
- value: string;
804
- mode: string;
805
- locale: string;
806
- context?: {
807
- translationExamples?: {
808
- sourceValue: string;
809
- translatedValue: string;
810
- }[] | undefined;
811
- description?: string | undefined;
812
- styleGuide?: {
813
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
814
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
815
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
816
- generalRule?: "active-voice" | "passive-voice" | undefined;
817
- } | {
818
- text: string;
819
- } | undefined;
820
- glossary?: {
821
- term: string;
822
- description?: string | undefined;
823
- translatable?: boolean | undefined;
824
- forbidden?: boolean | undefined;
825
- caseSensitive?: boolean | undefined;
826
- translations?: {
827
- translation: string;
828
- locale: string;
829
- description?: string | undefined;
830
- }[] | undefined;
831
- }[] | undefined;
832
- } | undefined;
833
- integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
834
- assets?: {
835
- translationExamples?: {
836
- sourceValue: string;
837
- translatedValue: string;
838
- }[] | undefined;
839
- description?: string | undefined;
840
- styleGuide?: {
841
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
842
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
843
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
844
- generalRule?: "active-voice" | "passive-voice" | undefined;
845
- } | {
846
- text: string;
847
- } | undefined;
848
- glossary?: {
849
- term: string;
850
- description?: string | undefined;
851
- translatable?: boolean | undefined;
852
- forbidden?: boolean | undefined;
853
- caseSensitive?: boolean | undefined;
854
- translations?: {
855
- translation: string;
856
- locale: string;
857
- description?: string | undefined;
858
- }[] | undefined;
859
- }[] | undefined;
860
- } | undefined;
861
- forceIntegration?: boolean | undefined;
862
- history?: {
863
- values: [string, ...string[]];
864
- mode: string;
865
- }[] | undefined;
866
- }>;
867
- export declare const REWRITE_TEXT_SEGMENT_RESPONSE_SCHEMA: z.ZodObject<{
868
- generatedAt: z.ZodString;
869
- variants: z.ZodArray<z.ZodString, "many">;
870
- warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
871
- kind: z.ZodEnum<["EDITED_NON_TRANSLATABLE_CONTENT", "EDITED_ICU_PLURALS"]>;
872
- }, "strip", z.ZodTypeAny, {
873
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
874
- }, {
875
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
876
- }>, "many">>;
877
- integration: z.ZodString;
878
- }, "strip", z.ZodTypeAny, {
879
- integration: string;
880
- generatedAt: string;
881
- variants: string[];
882
- warnings?: {
883
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
884
- }[] | undefined;
885
- }, {
886
- integration: string;
887
- generatedAt: string;
888
- variants: string[];
889
- warnings?: {
890
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
891
- }[] | undefined;
892
- }>;
893
- export type RewriteTextSegmentBody = z.infer<typeof REWRITE_TEXT_SEGMENT_BODY_SCHEMA>;
894
- export type RewriteTextSegmentHeaders = z.infer<typeof COMMON_REQUEST_HEADERS_SCHEMA>;
895
- export type RewriteTextSegmentResponse = z.infer<typeof REWRITE_TEXT_SEGMENT_RESPONSE_SCHEMA>;
896
- export declare const REWRITE_TEXT_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
897
- originCorrelationId: z.ZodString;
898
- ownerId: z.ZodString;
899
- callbackUrl: z.ZodString;
900
- callbackToken: z.ZodString;
901
- } & {
902
- locale: z.ZodEffects<z.ZodString, string, string>;
903
- integration: z.ZodOptional<z.ZodNativeEnum<{
904
- readonly FINETUNED_OPENAI: "FT-OpenAI";
905
- readonly CLAUDE: "Claude";
906
- readonly GPT: "GPT";
907
- readonly GEMINI: "Gemini";
908
- }>>;
909
- context: z.ZodOptional<z.ZodObject<Omit<{
910
- description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
911
- styleGuide: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
912
- text: z.ZodEffects<z.ZodString, string, string>;
913
- }, "strip", z.ZodTypeAny, {
914
- text: string;
915
- }, {
916
- text: string;
917
- }>, z.ZodEffects<z.ZodObject<{
918
- targetAudience: z.ZodOptional<z.ZodEnum<["general", "technical", "non-technical"]>>;
919
- toneOfVoice: z.ZodOptional<z.ZodEnum<["friendly", "empowering", "informative", "supportive", "elegant"]>>;
920
- levelOfFormality: z.ZodOptional<z.ZodEnum<["informal", "formal", "neutral"]>>;
921
- generalRule: z.ZodOptional<z.ZodEnum<["active-voice", "passive-voice"]>>;
922
- }, "strip", z.ZodTypeAny, {
923
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
924
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
925
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
926
- generalRule?: "active-voice" | "passive-voice" | undefined;
927
- }, {
928
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
929
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
930
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
931
- generalRule?: "active-voice" | "passive-voice" | undefined;
932
- }>, {
933
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
934
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
935
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
936
- generalRule?: "active-voice" | "passive-voice" | undefined;
937
- }, {
938
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
939
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
940
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
941
- generalRule?: "active-voice" | "passive-voice" | undefined;
942
- }>]>>;
943
- glossary: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
3
+ export declare const REWRITE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodPipe<z.ZodObject<{
4
+ context: z.ZodOptional<z.ZodObject<{
5
+ translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
6
+ sourceValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
7
+ translatedValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
8
+ }, z.core.$strip>>>;
9
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
10
+ styleGuide: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
11
+ text: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
12
+ }, z.core.$strip>, z.ZodObject<{
13
+ targetAudience: z.ZodOptional<z.ZodEnum<{
14
+ general: "general";
15
+ technical: "technical";
16
+ "non-technical": "non-technical";
17
+ }>>;
18
+ toneOfVoice: z.ZodOptional<z.ZodEnum<{
19
+ friendly: "friendly";
20
+ empowering: "empowering";
21
+ informative: "informative";
22
+ supportive: "supportive";
23
+ elegant: "elegant";
24
+ }>>;
25
+ levelOfFormality: z.ZodOptional<z.ZodEnum<{
26
+ informal: "informal";
27
+ formal: "formal";
28
+ neutral: "neutral";
29
+ }>>;
30
+ generalRule: z.ZodOptional<z.ZodEnum<{
31
+ "active-voice": "active-voice";
32
+ "passive-voice": "passive-voice";
33
+ }>>;
34
+ }, z.core.$strip>]>>;
35
+ glossary: z.ZodOptional<z.ZodArray<z.ZodObject<{
944
36
  term: z.ZodString;
945
- description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
37
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
946
38
  translatable: z.ZodDefault<z.ZodBoolean>;
947
39
  forbidden: z.ZodDefault<z.ZodBoolean>;
948
40
  caseSensitive: z.ZodDefault<z.ZodBoolean>;
949
41
  translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
950
- locale: z.ZodEffects<z.ZodString, string, string>;
951
- translation: z.ZodEffects<z.ZodString, string, string>;
952
- description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
953
- }, "strip", z.ZodTypeAny, {
954
- translation: string;
955
- locale: string;
956
- description?: string | undefined;
957
- }, {
958
- translation: string;
959
- locale: string;
960
- description?: string | undefined;
961
- }>, "many">>;
962
- }, "strip", z.ZodTypeAny, {
963
- term: string;
964
- translatable: boolean;
965
- forbidden: boolean;
966
- caseSensitive: boolean;
967
- description?: string | undefined;
968
- translations?: {
969
- translation: string;
970
- locale: string;
971
- description?: string | undefined;
972
- }[] | undefined;
973
- }, {
974
- term: string;
975
- description?: string | undefined;
976
- translatable?: boolean | undefined;
977
- forbidden?: boolean | undefined;
978
- caseSensitive?: boolean | undefined;
979
- translations?: {
980
- translation: string;
981
- locale: string;
982
- description?: string | undefined;
983
- }[] | undefined;
984
- }>, {
985
- term: string;
986
- translatable: boolean;
987
- forbidden: boolean;
988
- caseSensitive: boolean;
989
- description?: string | undefined;
990
- translations?: {
991
- translation: string;
992
- locale: string;
993
- description?: string | undefined;
994
- }[] | undefined;
995
- }, {
996
- term: string;
997
- description?: string | undefined;
998
- translatable?: boolean | undefined;
999
- forbidden?: boolean | undefined;
1000
- caseSensitive?: boolean | undefined;
1001
- translations?: {
1002
- translation: string;
1003
- locale: string;
1004
- description?: string | undefined;
1005
- }[] | undefined;
1006
- }>, "many">>;
1007
- 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>;
42
+ locale: z.ZodString;
43
+ translation: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
44
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
45
+ }, z.core.$strip>>>;
46
+ }, z.core.$strip>>>;
47
+ }, z.core.$strip>>;
48
+ assets: z.ZodOptional<z.ZodObject<{
1008
49
  translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
1009
- sourceValue: z.ZodEffects<z.ZodString, string, string>;
1010
- translatedValue: z.ZodEffects<z.ZodString, string, string>;
1011
- }, "strip", z.ZodTypeAny, {
1012
- sourceValue: string;
1013
- translatedValue: string;
1014
- }, {
1015
- sourceValue: string;
1016
- translatedValue: string;
1017
- }>, "many">>;
1018
- }, "targetPluralForms">, "strip", z.ZodTypeAny, {
50
+ sourceValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
51
+ translatedValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
52
+ }, z.core.$strip>>>;
53
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
54
+ styleGuide: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
55
+ text: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
56
+ }, z.core.$strip>, z.ZodObject<{
57
+ targetAudience: z.ZodOptional<z.ZodEnum<{
58
+ general: "general";
59
+ technical: "technical";
60
+ "non-technical": "non-technical";
61
+ }>>;
62
+ toneOfVoice: z.ZodOptional<z.ZodEnum<{
63
+ friendly: "friendly";
64
+ empowering: "empowering";
65
+ informative: "informative";
66
+ supportive: "supportive";
67
+ elegant: "elegant";
68
+ }>>;
69
+ levelOfFormality: z.ZodOptional<z.ZodEnum<{
70
+ informal: "informal";
71
+ formal: "formal";
72
+ neutral: "neutral";
73
+ }>>;
74
+ generalRule: z.ZodOptional<z.ZodEnum<{
75
+ "active-voice": "active-voice";
76
+ "passive-voice": "passive-voice";
77
+ }>>;
78
+ }, z.core.$strip>]>>;
79
+ glossary: z.ZodOptional<z.ZodArray<z.ZodObject<{
80
+ term: z.ZodString;
81
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
82
+ translatable: z.ZodDefault<z.ZodBoolean>;
83
+ forbidden: z.ZodDefault<z.ZodBoolean>;
84
+ caseSensitive: z.ZodDefault<z.ZodBoolean>;
85
+ translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
86
+ locale: z.ZodString;
87
+ translation: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
88
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
89
+ }, z.core.$strip>>>;
90
+ }, z.core.$strip>>>;
91
+ }, z.core.$strip>>;
92
+ locale: z.ZodString;
93
+ value: z.ZodString;
94
+ integration: z.ZodOptional<z.ZodEnum<{
95
+ readonly FINETUNED_OPENAI: "FT-OpenAI";
96
+ readonly CLAUDE: "Claude";
97
+ readonly GPT: "GPT";
98
+ readonly GEMINI: "Gemini";
99
+ }>>;
100
+ forceIntegration: z.ZodOptional<z.ZodBoolean>;
101
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
102
+ values: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
103
+ mode: z.ZodPipe<z.ZodString, z.ZodEnum<{
104
+ readonly REPHRASE: "rephrase";
105
+ readonly SHORTEN: "shorten";
106
+ }>>;
107
+ }, z.core.$strip>>>;
108
+ mode: z.ZodPipe<z.ZodString, z.ZodEnum<{
109
+ readonly REPHRASE: "rephrase";
110
+ readonly SHORTEN: "shorten";
111
+ }>>;
112
+ }, z.core.$strip>, z.ZodTransform<{
113
+ locale: string;
114
+ value: string;
115
+ mode: "rephrase" | "shorten";
116
+ context?: {
1019
117
  translationExamples?: {
1020
118
  sourceValue: string;
1021
119
  translatedValue: string;
@@ -1036,183 +134,13 @@ export declare const REWRITE_TEXT_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
1036
134
  caseSensitive: boolean;
1037
135
  description?: string | undefined;
1038
136
  translations?: {
1039
- translation: string;
1040
137
  locale: string;
1041
- description?: string | undefined;
1042
- }[] | undefined;
1043
- }[] | undefined;
1044
- }, {
1045
- translationExamples?: {
1046
- sourceValue: string;
1047
- translatedValue: string;
1048
- }[] | undefined;
1049
- description?: string | undefined;
1050
- styleGuide?: {
1051
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
1052
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
1053
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
1054
- generalRule?: "active-voice" | "passive-voice" | undefined;
1055
- } | {
1056
- text: string;
1057
- } | undefined;
1058
- glossary?: {
1059
- term: string;
1060
- description?: string | undefined;
1061
- translatable?: boolean | undefined;
1062
- forbidden?: boolean | undefined;
1063
- caseSensitive?: boolean | undefined;
1064
- translations?: {
1065
138
  translation: string;
1066
- locale: string;
1067
139
  description?: string | undefined;
1068
140
  }[] | undefined;
1069
141
  }[] | undefined;
1070
- }>>;
1071
- contentUnits: z.ZodEffects<z.ZodArray<z.ZodObject<{
1072
- id: z.ZodString;
1073
- context: z.ZodOptional<z.ZodObject<{
1074
- description: z.ZodEffects<z.ZodString, string, string>;
1075
- }, "strip", z.ZodTypeAny, {
1076
- description: string;
1077
- }, {
1078
- description: string;
1079
- }>>;
1080
- characterLimit: z.ZodOptional<z.ZodNumber>;
1081
- segments: z.ZodEffects<z.ZodArray<z.ZodObject<{
1082
- id: z.ZodString;
1083
- value: z.ZodEffects<z.ZodString, string, string>;
1084
- }, "strip", z.ZodTypeAny, {
1085
- value: string;
1086
- id: string;
1087
- }, {
1088
- value: string;
1089
- id: string;
1090
- }>, "atleastone">, [{
1091
- value: string;
1092
- id: string;
1093
- }, ...{
1094
- value: string;
1095
- id: string;
1096
- }[]], [{
1097
- value: string;
1098
- id: string;
1099
- }, ...{
1100
- value: string;
1101
- id: string;
1102
- }[]]>;
1103
- }, "strip", z.ZodTypeAny, {
1104
- segments: [{
1105
- value: string;
1106
- id: string;
1107
- }, ...{
1108
- value: string;
1109
- id: string;
1110
- }[]];
1111
- id: string;
1112
- context?: {
1113
- description: string;
1114
- } | undefined;
1115
- characterLimit?: number | undefined;
1116
- }, {
1117
- segments: [{
1118
- value: string;
1119
- id: string;
1120
- }, ...{
1121
- value: string;
1122
- id: string;
1123
- }[]];
1124
- id: string;
1125
- context?: {
1126
- description: string;
1127
- } | undefined;
1128
- characterLimit?: number | undefined;
1129
- }>, "atleastone">, [{
1130
- segments: [{
1131
- value: string;
1132
- id: string;
1133
- }, ...{
1134
- value: string;
1135
- id: string;
1136
- }[]];
1137
- id: string;
1138
- context?: {
1139
- description: string;
1140
- } | undefined;
1141
- characterLimit?: number | undefined;
1142
- }, ...{
1143
- segments: [{
1144
- value: string;
1145
- id: string;
1146
- }, ...{
1147
- value: string;
1148
- id: string;
1149
- }[]];
1150
- id: string;
1151
- context?: {
1152
- description: string;
1153
- } | undefined;
1154
- characterLimit?: number | undefined;
1155
- }[]], [{
1156
- segments: [{
1157
- value: string;
1158
- id: string;
1159
- }, ...{
1160
- value: string;
1161
- id: string;
1162
- }[]];
1163
- id: string;
1164
- context?: {
1165
- description: string;
1166
- } | undefined;
1167
- characterLimit?: number | undefined;
1168
- }, ...{
1169
- segments: [{
1170
- value: string;
1171
- id: string;
1172
- }, ...{
1173
- value: string;
1174
- id: string;
1175
- }[]];
1176
- id: string;
1177
- context?: {
1178
- description: string;
1179
- } | undefined;
1180
- characterLimit?: number | undefined;
1181
- }[]]>;
1182
- }, "strip", z.ZodTypeAny, {
1183
- originCorrelationId: string;
1184
- ownerId: string;
1185
- callbackUrl: string;
1186
- callbackToken: string;
1187
- locale: string;
1188
- contentUnits: [{
1189
- segments: [{
1190
- value: string;
1191
- id: string;
1192
- }, ...{
1193
- value: string;
1194
- id: string;
1195
- }[]];
1196
- id: string;
1197
- context?: {
1198
- description: string;
1199
- } | undefined;
1200
- characterLimit?: number | undefined;
1201
- }, ...{
1202
- segments: [{
1203
- value: string;
1204
- id: string;
1205
- }, ...{
1206
- value: string;
1207
- id: string;
1208
- }[]];
1209
- id: string;
1210
- context?: {
1211
- description: string;
1212
- } | undefined;
1213
- characterLimit?: number | undefined;
1214
- }[]];
1215
- context?: {
142
+ } | undefined;
143
+ assets?: {
1216
144
  translationExamples?: {
1217
145
  sourceValue: string;
1218
146
  translatedValue: string;
@@ -1233,46 +161,22 @@ export declare const REWRITE_TEXT_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
1233
161
  caseSensitive: boolean;
1234
162
  description?: string | undefined;
1235
163
  translations?: {
1236
- translation: string;
1237
164
  locale: string;
165
+ translation: string;
1238
166
  description?: string | undefined;
1239
167
  }[] | undefined;
1240
168
  }[] | undefined;
1241
169
  } | undefined;
1242
170
  integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
171
+ forceIntegration?: boolean | undefined;
172
+ history?: {
173
+ values: string[];
174
+ mode: "rephrase" | "shorten";
175
+ }[] | undefined;
1243
176
  }, {
1244
- originCorrelationId: string;
1245
- ownerId: string;
1246
- callbackUrl: string;
1247
- callbackToken: string;
1248
177
  locale: string;
1249
- contentUnits: [{
1250
- segments: [{
1251
- value: string;
1252
- id: string;
1253
- }, ...{
1254
- value: string;
1255
- id: string;
1256
- }[]];
1257
- id: string;
1258
- context?: {
1259
- description: string;
1260
- } | undefined;
1261
- characterLimit?: number | undefined;
1262
- }, ...{
1263
- segments: [{
1264
- value: string;
1265
- id: string;
1266
- }, ...{
1267
- value: string;
1268
- id: string;
1269
- }[]];
1270
- id: string;
1271
- context?: {
1272
- description: string;
1273
- } | undefined;
1274
- characterLimit?: number | undefined;
1275
- }[]];
178
+ value: string;
179
+ mode: "rephrase" | "shorten";
1276
180
  context?: {
1277
181
  translationExamples?: {
1278
182
  sourceValue: string;
@@ -1289,52 +193,18 @@ export declare const REWRITE_TEXT_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
1289
193
  } | undefined;
1290
194
  glossary?: {
1291
195
  term: string;
196
+ translatable: boolean;
197
+ forbidden: boolean;
198
+ caseSensitive: boolean;
1292
199
  description?: string | undefined;
1293
- translatable?: boolean | undefined;
1294
- forbidden?: boolean | undefined;
1295
- caseSensitive?: boolean | undefined;
1296
200
  translations?: {
1297
- translation: string;
1298
201
  locale: string;
202
+ translation: string;
1299
203
  description?: string | undefined;
1300
204
  }[] | undefined;
1301
205
  }[] | undefined;
1302
206
  } | undefined;
1303
- integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
1304
- }>, {
1305
- originCorrelationId: string;
1306
- ownerId: string;
1307
- callbackUrl: string;
1308
- callbackToken: string;
1309
- locale: string;
1310
- contentUnits: [{
1311
- segments: [{
1312
- value: string;
1313
- id: string;
1314
- }, ...{
1315
- value: string;
1316
- id: string;
1317
- }[]];
1318
- id: string;
1319
- context?: {
1320
- description: string;
1321
- } | undefined;
1322
- characterLimit?: number | undefined;
1323
- }, ...{
1324
- segments: [{
1325
- value: string;
1326
- id: string;
1327
- }, ...{
1328
- value: string;
1329
- id: string;
1330
- }[]];
1331
- id: string;
1332
- context?: {
1333
- description: string;
1334
- } | undefined;
1335
- characterLimit?: number | undefined;
1336
- }[]];
1337
- context?: {
207
+ assets?: {
1338
208
  translationExamples?: {
1339
209
  sourceValue: string;
1340
210
  translatedValue: string;
@@ -1355,92 +225,120 @@ export declare const REWRITE_TEXT_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
1355
225
  caseSensitive: boolean;
1356
226
  description?: string | undefined;
1357
227
  translations?: {
1358
- translation: string;
1359
228
  locale: string;
1360
- description?: string | undefined;
1361
- }[] | undefined;
1362
- }[] | undefined;
1363
- } | undefined;
1364
- integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
1365
- }, {
1366
- originCorrelationId: string;
1367
- ownerId: string;
1368
- callbackUrl: string;
1369
- callbackToken: string;
1370
- locale: string;
1371
- contentUnits: [{
1372
- segments: [{
1373
- value: string;
1374
- id: string;
1375
- }, ...{
1376
- value: string;
1377
- id: string;
1378
- }[]];
1379
- id: string;
1380
- context?: {
1381
- description: string;
1382
- } | undefined;
1383
- characterLimit?: number | undefined;
1384
- }, ...{
1385
- segments: [{
1386
- value: string;
1387
- id: string;
1388
- }, ...{
1389
- value: string;
1390
- id: string;
1391
- }[]];
1392
- id: string;
1393
- context?: {
1394
- description: string;
1395
- } | undefined;
1396
- characterLimit?: number | undefined;
1397
- }[]];
1398
- context?: {
1399
- translationExamples?: {
1400
- sourceValue: string;
1401
- translatedValue: string;
1402
- }[] | undefined;
1403
- description?: string | undefined;
1404
- styleGuide?: {
1405
- targetAudience?: "general" | "technical" | "non-technical" | undefined;
1406
- toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
1407
- levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
1408
- generalRule?: "active-voice" | "passive-voice" | undefined;
1409
- } | {
1410
- text: string;
1411
- } | undefined;
1412
- glossary?: {
1413
- term: string;
1414
- description?: string | undefined;
1415
- translatable?: boolean | undefined;
1416
- forbidden?: boolean | undefined;
1417
- caseSensitive?: boolean | undefined;
1418
- translations?: {
1419
229
  translation: string;
1420
- locale: string;
1421
230
  description?: string | undefined;
1422
231
  }[] | undefined;
1423
232
  }[] | undefined;
1424
233
  } | undefined;
1425
234
  integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | undefined;
1426
- }>;
235
+ forceIntegration?: boolean | undefined;
236
+ history?: {
237
+ values: string[];
238
+ mode: "rephrase" | "shorten";
239
+ }[] | undefined;
240
+ }>>;
241
+ export declare const REWRITE_TEXT_SEGMENT_RESPONSE_SCHEMA: z.ZodObject<{
242
+ generatedAt: z.ZodString;
243
+ variants: z.ZodArray<z.ZodString>;
244
+ warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
245
+ kind: z.ZodEnum<{
246
+ EDITED_NON_TRANSLATABLE_CONTENT: "EDITED_NON_TRANSLATABLE_CONTENT";
247
+ EDITED_ICU_PLURALS: "EDITED_ICU_PLURALS";
248
+ }>;
249
+ }, z.core.$strip>>>;
250
+ integration: z.ZodString;
251
+ }, z.core.$strip>;
252
+ export type RewriteTextSegmentBody = z.infer<typeof REWRITE_TEXT_SEGMENT_BODY_SCHEMA>;
253
+ export type RewriteTextSegmentHeaders = z.infer<typeof COMMON_REQUEST_HEADERS_SCHEMA>;
254
+ export type RewriteTextSegmentResponse = z.infer<typeof REWRITE_TEXT_SEGMENT_RESPONSE_SCHEMA>;
255
+ export declare const REWRITE_TEXT_ASYNC_BODY_SCHEMA: z.ZodObject<{
256
+ originCorrelationId: z.ZodString;
257
+ ownerId: z.ZodString;
258
+ callbackUrl: z.ZodURL;
259
+ callbackToken: z.ZodString;
260
+ locale: z.ZodString;
261
+ integration: z.ZodOptional<z.ZodEnum<{
262
+ readonly FINETUNED_OPENAI: "FT-OpenAI";
263
+ readonly CLAUDE: "Claude";
264
+ readonly GPT: "GPT";
265
+ readonly GEMINI: "Gemini";
266
+ }>>;
267
+ context: z.ZodOptional<z.ZodObject<{
268
+ translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
269
+ sourceValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
270
+ translatedValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
271
+ }, z.core.$strip>>>;
272
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
273
+ styleGuide: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
274
+ text: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
275
+ }, z.core.$strip>, z.ZodObject<{
276
+ targetAudience: z.ZodOptional<z.ZodEnum<{
277
+ general: "general";
278
+ technical: "technical";
279
+ "non-technical": "non-technical";
280
+ }>>;
281
+ toneOfVoice: z.ZodOptional<z.ZodEnum<{
282
+ friendly: "friendly";
283
+ empowering: "empowering";
284
+ informative: "informative";
285
+ supportive: "supportive";
286
+ elegant: "elegant";
287
+ }>>;
288
+ levelOfFormality: z.ZodOptional<z.ZodEnum<{
289
+ informal: "informal";
290
+ formal: "formal";
291
+ neutral: "neutral";
292
+ }>>;
293
+ generalRule: z.ZodOptional<z.ZodEnum<{
294
+ "active-voice": "active-voice";
295
+ "passive-voice": "passive-voice";
296
+ }>>;
297
+ }, z.core.$strip>]>>;
298
+ glossary: z.ZodOptional<z.ZodArray<z.ZodObject<{
299
+ term: z.ZodString;
300
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
301
+ translatable: z.ZodDefault<z.ZodBoolean>;
302
+ forbidden: z.ZodDefault<z.ZodBoolean>;
303
+ caseSensitive: z.ZodDefault<z.ZodBoolean>;
304
+ translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
305
+ locale: z.ZodString;
306
+ translation: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
307
+ description: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
308
+ }, z.core.$strip>>>;
309
+ }, z.core.$strip>>>;
310
+ }, z.core.$strip>>;
311
+ contentUnits: z.ZodArray<z.ZodObject<{
312
+ id: z.ZodString;
313
+ type: z.ZodDefault<z.ZodEnum<{
314
+ readonly SEGMENTED: "segmented";
315
+ readonly PLURAL: "plural";
316
+ }>>;
317
+ context: z.ZodOptional<z.ZodObject<{
318
+ description: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
319
+ }, z.core.$strip>>;
320
+ characterLimit: z.ZodOptional<z.ZodNumber>;
321
+ segments: z.ZodArray<z.ZodObject<{
322
+ id: z.ZodString;
323
+ pluralForm: z.ZodOptional<z.ZodEnum<{
324
+ readonly ZERO: "zero";
325
+ readonly ONE: "one";
326
+ readonly TWO: "two";
327
+ readonly FEW: "few";
328
+ readonly MANY: "many";
329
+ readonly OTHER: "other";
330
+ }>>;
331
+ value: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
332
+ }, z.core.$strip>>;
333
+ }, z.core.$strip>>;
334
+ }, z.core.$strip>;
1427
335
  export declare const REWRITE_TEXT_ASYNC_HEADERS_SCHEMA: z.ZodObject<{
1428
- 'x-fake-processing': z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
1429
- }, "strip", z.ZodTypeAny, {
1430
- 'x-fake-processing'?: boolean | undefined;
1431
- }, {
1432
- 'x-fake-processing'?: unknown;
1433
- }>;
336
+ 'x-fake-processing': z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<boolean, string>>, z.ZodBoolean>>;
337
+ }, z.core.$strip>;
1434
338
  export declare const REWRITE_TEXT_ASYNC_RESPONSE_SCHEMA: z.ZodObject<{
1435
339
  requestId: z.ZodString;
1436
340
  expectedAt: z.ZodString;
1437
- }, "strip", z.ZodTypeAny, {
1438
- requestId: string;
1439
- expectedAt: string;
1440
- }, {
1441
- requestId: string;
1442
- expectedAt: string;
1443
- }>;
341
+ }, z.core.$strip>;
1444
342
  export declare const REWRITE_TEXT_ASYNC_SUCCESS_SCHEMA: z.ZodObject<{
1445
343
  status: z.ZodLiteral<"success">;
1446
344
  originCorrelationId: z.ZodString;
@@ -1450,99 +348,23 @@ export declare const REWRITE_TEXT_ASYNC_SUCCESS_SCHEMA: z.ZodObject<{
1450
348
  integration: z.ZodString;
1451
349
  rewritten: z.ZodString;
1452
350
  warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1453
- kind: z.ZodEnum<["EDITED_NON_TRANSLATABLE_CONTENT", "EDITED_ICU_PLURALS"]>;
1454
- }, "strip", z.ZodTypeAny, {
1455
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
1456
- }, {
1457
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
1458
- }>, "many">>;
1459
- }, "strip", z.ZodTypeAny, {
1460
- integration: string;
1461
- contentUnitId: string;
1462
- segmentId: string;
1463
- rewritten: string;
1464
- warnings?: {
1465
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
1466
- }[] | undefined;
1467
- }, {
1468
- integration: string;
1469
- contentUnitId: string;
1470
- segmentId: string;
1471
- rewritten: string;
1472
- warnings?: {
1473
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
1474
- }[] | undefined;
1475
- }>, "many">;
351
+ kind: z.ZodEnum<{
352
+ EDITED_NON_TRANSLATABLE_CONTENT: "EDITED_NON_TRANSLATABLE_CONTENT";
353
+ EDITED_ICU_PLURALS: "EDITED_ICU_PLURALS";
354
+ }>;
355
+ }, z.core.$strip>>>;
356
+ }, z.core.$strip>>;
1476
357
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
1477
358
  message: z.ZodString;
1478
359
  errorCode: z.ZodString;
1479
360
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1480
- } & {
1481
361
  contentUnitId: z.ZodString;
1482
362
  segmentId: z.ZodString;
1483
363
  polyglotRefId: z.ZodString;
1484
364
  integration: z.ZodString;
1485
- }, "strip", z.ZodTypeAny, {
1486
- message: string;
1487
- errorCode: string;
1488
- integration: string;
1489
- polyglotRefId: string;
1490
- contentUnitId: string;
1491
- segmentId: string;
1492
- details?: Record<string, unknown> | undefined;
1493
- }, {
1494
- message: string;
1495
- errorCode: string;
1496
- integration: string;
1497
- polyglotRefId: string;
1498
- contentUnitId: string;
1499
- segmentId: string;
1500
- details?: Record<string, unknown> | undefined;
1501
- }>, "many">>;
1502
- }, "strip", z.ZodTypeAny, {
1503
- originCorrelationId: string;
1504
- status: "success";
1505
- data: {
1506
- integration: string;
1507
- contentUnitId: string;
1508
- segmentId: string;
1509
- rewritten: string;
1510
- warnings?: {
1511
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
1512
- }[] | undefined;
1513
- }[];
1514
- errors?: {
1515
- message: string;
1516
- errorCode: string;
1517
- integration: string;
1518
- polyglotRefId: string;
1519
- contentUnitId: string;
1520
- segmentId: string;
1521
- details?: Record<string, unknown> | undefined;
1522
- }[] | undefined;
1523
- }, {
1524
- originCorrelationId: string;
1525
- status: "success";
1526
- data: {
1527
- integration: string;
1528
- contentUnitId: string;
1529
- segmentId: string;
1530
- rewritten: string;
1531
- warnings?: {
1532
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
1533
- }[] | undefined;
1534
- }[];
1535
- errors?: {
1536
- message: string;
1537
- errorCode: string;
1538
- integration: string;
1539
- polyglotRefId: string;
1540
- contentUnitId: string;
1541
- segmentId: string;
1542
- details?: Record<string, unknown> | undefined;
1543
- }[] | undefined;
1544
- }>;
1545
- export declare const REWRITE_TEXT_ASYNC_CALLBACK_SCHEMA: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
365
+ }, z.core.$strip>>>;
366
+ }, z.core.$strip>;
367
+ export declare const REWRITE_TEXT_ASYNC_CALLBACK_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
1546
368
  status: z.ZodLiteral<"success">;
1547
369
  originCorrelationId: z.ZodString;
1548
370
  data: z.ZodArray<z.ZodObject<{
@@ -1551,117 +373,28 @@ export declare const REWRITE_TEXT_ASYNC_CALLBACK_SCHEMA: z.ZodDiscriminatedUnion
1551
373
  integration: z.ZodString;
1552
374
  rewritten: z.ZodString;
1553
375
  warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1554
- kind: z.ZodEnum<["EDITED_NON_TRANSLATABLE_CONTENT", "EDITED_ICU_PLURALS"]>;
1555
- }, "strip", z.ZodTypeAny, {
1556
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
1557
- }, {
1558
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
1559
- }>, "many">>;
1560
- }, "strip", z.ZodTypeAny, {
1561
- integration: string;
1562
- contentUnitId: string;
1563
- segmentId: string;
1564
- rewritten: string;
1565
- warnings?: {
1566
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
1567
- }[] | undefined;
1568
- }, {
1569
- integration: string;
1570
- contentUnitId: string;
1571
- segmentId: string;
1572
- rewritten: string;
1573
- warnings?: {
1574
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
1575
- }[] | undefined;
1576
- }>, "many">;
376
+ kind: z.ZodEnum<{
377
+ EDITED_NON_TRANSLATABLE_CONTENT: "EDITED_NON_TRANSLATABLE_CONTENT";
378
+ EDITED_ICU_PLURALS: "EDITED_ICU_PLURALS";
379
+ }>;
380
+ }, z.core.$strip>>>;
381
+ }, z.core.$strip>>;
1577
382
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
1578
383
  message: z.ZodString;
1579
384
  errorCode: z.ZodString;
1580
385
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1581
- } & {
1582
386
  contentUnitId: z.ZodString;
1583
387
  segmentId: z.ZodString;
1584
388
  polyglotRefId: z.ZodString;
1585
389
  integration: z.ZodString;
1586
- }, "strip", z.ZodTypeAny, {
1587
- message: string;
1588
- errorCode: string;
1589
- integration: string;
1590
- polyglotRefId: string;
1591
- contentUnitId: string;
1592
- segmentId: string;
1593
- details?: Record<string, unknown> | undefined;
1594
- }, {
1595
- message: string;
1596
- errorCode: string;
1597
- integration: string;
1598
- polyglotRefId: string;
1599
- contentUnitId: string;
1600
- segmentId: string;
1601
- details?: Record<string, unknown> | undefined;
1602
- }>, "many">>;
1603
- }, "strip", z.ZodTypeAny, {
1604
- originCorrelationId: string;
1605
- status: "success";
1606
- data: {
1607
- integration: string;
1608
- contentUnitId: string;
1609
- segmentId: string;
1610
- rewritten: string;
1611
- warnings?: {
1612
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
1613
- }[] | undefined;
1614
- }[];
1615
- errors?: {
1616
- message: string;
1617
- errorCode: string;
1618
- integration: string;
1619
- polyglotRefId: string;
1620
- contentUnitId: string;
1621
- segmentId: string;
1622
- details?: Record<string, unknown> | undefined;
1623
- }[] | undefined;
1624
- }, {
1625
- originCorrelationId: string;
1626
- status: "success";
1627
- data: {
1628
- integration: string;
1629
- contentUnitId: string;
1630
- segmentId: string;
1631
- rewritten: string;
1632
- warnings?: {
1633
- kind: "EDITED_NON_TRANSLATABLE_CONTENT" | "EDITED_ICU_PLURALS";
1634
- }[] | undefined;
1635
- }[];
1636
- errors?: {
1637
- message: string;
1638
- errorCode: string;
1639
- integration: string;
1640
- polyglotRefId: string;
1641
- contentUnitId: string;
1642
- segmentId: string;
1643
- details?: Record<string, unknown> | undefined;
1644
- }[] | undefined;
1645
- }>, z.ZodObject<{
390
+ }, z.core.$strip>>>;
391
+ }, z.core.$strip>, z.ZodObject<{
1646
392
  message: z.ZodString;
1647
393
  errorCode: z.ZodString;
1648
394
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1649
- } & {
1650
395
  status: z.ZodLiteral<"error">;
1651
396
  originCorrelationId: z.ZodString;
1652
- }, "strip", z.ZodTypeAny, {
1653
- originCorrelationId: string;
1654
- message: string;
1655
- status: "error";
1656
- errorCode: string;
1657
- details?: Record<string, unknown> | undefined;
1658
- }, {
1659
- originCorrelationId: string;
1660
- message: string;
1661
- status: "error";
1662
- errorCode: string;
1663
- details?: Record<string, unknown> | undefined;
1664
- }>]>;
397
+ }, z.core.$strip>]>;
1665
398
  export type RewriteTextAsyncBody = z.infer<typeof REWRITE_TEXT_ASYNC_BODY_SCHEMA>;
1666
399
  export type RewriteTextAsyncHeaders = z.infer<typeof COMMON_REQUEST_HEADERS_SCHEMA>;
1667
400
  export type RewriteTextAsyncResponse = z.infer<typeof REWRITE_TEXT_ASYNC_RESPONSE_SCHEMA>;