@lokalise/polyglot-sdk 7.0.0 → 8.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.
@@ -0,0 +1,1059 @@
1
+ import z from 'zod';
2
+ export declare const TRANSLATE_ASYNC_V2_SEGMENT_SCHEMA: z.ZodObject<{
3
+ id: z.ZodString;
4
+ tmMatch: z.ZodOptional<z.ZodObject<{
5
+ sourceValue: z.ZodString;
6
+ translatedValue: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ sourceValue: string;
9
+ translatedValue: string;
10
+ }, {
11
+ sourceValue: string;
12
+ translatedValue: string;
13
+ }>>;
14
+ value: z.ZodString;
15
+ }, "strip", z.ZodTypeAny, {
16
+ value: string;
17
+ id: string;
18
+ tmMatch?: {
19
+ sourceValue: string;
20
+ translatedValue: string;
21
+ } | undefined;
22
+ }, {
23
+ value: string;
24
+ id: string;
25
+ tmMatch?: {
26
+ sourceValue: string;
27
+ translatedValue: string;
28
+ } | undefined;
29
+ }>;
30
+ export declare const TRANSLATE_ASYNC_V2_CONTENT_UNIT_SCHEMA: z.ZodObject<{
31
+ id: z.ZodString;
32
+ context: z.ZodOptional<z.ZodObject<{
33
+ description: z.ZodString;
34
+ }, "strip", z.ZodTypeAny, {
35
+ description: string;
36
+ }, {
37
+ description: string;
38
+ }>>;
39
+ characterLimit: z.ZodOptional<z.ZodNumber>;
40
+ segments: z.ZodEffects<z.ZodArray<z.ZodObject<{
41
+ id: z.ZodString;
42
+ tmMatch: z.ZodOptional<z.ZodObject<{
43
+ sourceValue: z.ZodString;
44
+ translatedValue: z.ZodString;
45
+ }, "strip", z.ZodTypeAny, {
46
+ sourceValue: string;
47
+ translatedValue: string;
48
+ }, {
49
+ sourceValue: string;
50
+ translatedValue: string;
51
+ }>>;
52
+ value: z.ZodString;
53
+ }, "strip", z.ZodTypeAny, {
54
+ value: string;
55
+ id: string;
56
+ tmMatch?: {
57
+ sourceValue: string;
58
+ translatedValue: string;
59
+ } | undefined;
60
+ }, {
61
+ value: string;
62
+ id: string;
63
+ tmMatch?: {
64
+ sourceValue: string;
65
+ translatedValue: string;
66
+ } | undefined;
67
+ }>, "atleastone">, [{
68
+ value: string;
69
+ id: string;
70
+ tmMatch?: {
71
+ sourceValue: string;
72
+ translatedValue: string;
73
+ } | undefined;
74
+ }, ...{
75
+ value: string;
76
+ id: string;
77
+ tmMatch?: {
78
+ sourceValue: string;
79
+ translatedValue: string;
80
+ } | undefined;
81
+ }[]], [{
82
+ value: string;
83
+ id: string;
84
+ tmMatch?: {
85
+ sourceValue: string;
86
+ translatedValue: string;
87
+ } | undefined;
88
+ }, ...{
89
+ value: string;
90
+ id: string;
91
+ tmMatch?: {
92
+ sourceValue: string;
93
+ translatedValue: string;
94
+ } | undefined;
95
+ }[]]>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ id: string;
98
+ segments: [{
99
+ value: string;
100
+ id: string;
101
+ tmMatch?: {
102
+ sourceValue: string;
103
+ translatedValue: string;
104
+ } | undefined;
105
+ }, ...{
106
+ value: string;
107
+ id: string;
108
+ tmMatch?: {
109
+ sourceValue: string;
110
+ translatedValue: string;
111
+ } | undefined;
112
+ }[]];
113
+ context?: {
114
+ description: string;
115
+ } | undefined;
116
+ characterLimit?: number | undefined;
117
+ }, {
118
+ id: string;
119
+ segments: [{
120
+ value: string;
121
+ id: string;
122
+ tmMatch?: {
123
+ sourceValue: string;
124
+ translatedValue: string;
125
+ } | undefined;
126
+ }, ...{
127
+ value: string;
128
+ id: string;
129
+ tmMatch?: {
130
+ sourceValue: string;
131
+ translatedValue: string;
132
+ } | undefined;
133
+ }[]];
134
+ context?: {
135
+ description: string;
136
+ } | undefined;
137
+ characterLimit?: number | undefined;
138
+ }>;
139
+ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<{
140
+ originCorrelationId: z.ZodString;
141
+ ownerId: z.ZodString;
142
+ tenantId: z.ZodString;
143
+ callbackUrl: z.ZodString;
144
+ callbackToken: z.ZodString;
145
+ }, {
146
+ sourceLocale: z.ZodEffects<z.ZodString, string, string>;
147
+ targetLocale: z.ZodEffects<z.ZodString, string, string>;
148
+ integration: z.ZodOptional<z.ZodNativeEnum<{
149
+ readonly CLAUDE: "Claude";
150
+ readonly CHAT_GPT4: "ChatGPT-4";
151
+ readonly GEMINI: "Gemini";
152
+ readonly DEEPL: "DeepL";
153
+ readonly GOOGLE_TRANSLATE: "GoogleTranslate";
154
+ readonly MICROSOFT_TRANSLATOR: "MicrosoftTranslator";
155
+ }>>;
156
+ pickIntegrationByScore: z.ZodDefault<z.ZodBoolean>;
157
+ context: z.ZodOptional<z.ZodObject<{
158
+ description: z.ZodOptional<z.ZodString>;
159
+ styleGuide: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
160
+ text: z.ZodString;
161
+ }, "strip", z.ZodTypeAny, {
162
+ text: string;
163
+ }, {
164
+ text: string;
165
+ }>, z.ZodEffects<z.ZodObject<{
166
+ targetAudience: z.ZodOptional<z.ZodEnum<["general", "technical", "non-technical"]>>;
167
+ toneOfVoice: z.ZodOptional<z.ZodEnum<["friendly", "empowering", "informative", "supportive", "elegant"]>>;
168
+ levelOfFormality: z.ZodOptional<z.ZodEnum<["informal", "formal", "neutral"]>>;
169
+ generalRule: z.ZodOptional<z.ZodEnum<["active-voice", "passive-voice"]>>;
170
+ }, "strip", z.ZodTypeAny, {
171
+ targetAudience?: "general" | "technical" | "non-technical" | undefined;
172
+ toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
173
+ levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
174
+ generalRule?: "active-voice" | "passive-voice" | undefined;
175
+ }, {
176
+ targetAudience?: "general" | "technical" | "non-technical" | undefined;
177
+ toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
178
+ levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
179
+ generalRule?: "active-voice" | "passive-voice" | undefined;
180
+ }>, {
181
+ targetAudience?: "general" | "technical" | "non-technical" | undefined;
182
+ toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
183
+ levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
184
+ generalRule?: "active-voice" | "passive-voice" | undefined;
185
+ }, {
186
+ targetAudience?: "general" | "technical" | "non-technical" | undefined;
187
+ toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
188
+ levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
189
+ generalRule?: "active-voice" | "passive-voice" | undefined;
190
+ }>]>>;
191
+ glossary: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
192
+ term: z.ZodString;
193
+ description: z.ZodOptional<z.ZodString>;
194
+ translatable: z.ZodDefault<z.ZodBoolean>;
195
+ forbidden: z.ZodDefault<z.ZodBoolean>;
196
+ caseSensitive: z.ZodDefault<z.ZodBoolean>;
197
+ translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
198
+ locale: z.ZodEffects<z.ZodString, string, string>;
199
+ translation: z.ZodString;
200
+ description: z.ZodOptional<z.ZodString>;
201
+ }, "strip", z.ZodTypeAny, {
202
+ locale: string;
203
+ translation: string;
204
+ description?: string | undefined;
205
+ }, {
206
+ locale: string;
207
+ translation: string;
208
+ description?: string | undefined;
209
+ }>, "many">>;
210
+ }, "strip", z.ZodTypeAny, {
211
+ term: string;
212
+ translatable: boolean;
213
+ forbidden: boolean;
214
+ caseSensitive: boolean;
215
+ description?: string | undefined;
216
+ translations?: {
217
+ locale: string;
218
+ translation: string;
219
+ description?: string | undefined;
220
+ }[] | undefined;
221
+ }, {
222
+ term: string;
223
+ description?: string | undefined;
224
+ translatable?: boolean | undefined;
225
+ forbidden?: boolean | undefined;
226
+ caseSensitive?: boolean | undefined;
227
+ translations?: {
228
+ locale: string;
229
+ translation: string;
230
+ description?: string | undefined;
231
+ }[] | undefined;
232
+ }>, {
233
+ term: string;
234
+ translatable: boolean;
235
+ forbidden: boolean;
236
+ caseSensitive: boolean;
237
+ description?: string | undefined;
238
+ translations?: {
239
+ locale: string;
240
+ translation: string;
241
+ description?: string | undefined;
242
+ }[] | undefined;
243
+ }, {
244
+ term: string;
245
+ description?: string | undefined;
246
+ translatable?: boolean | undefined;
247
+ forbidden?: boolean | undefined;
248
+ caseSensitive?: boolean | undefined;
249
+ translations?: {
250
+ locale: string;
251
+ translation: string;
252
+ description?: string | undefined;
253
+ }[] | undefined;
254
+ }>, "many">>;
255
+ }, "strip", z.ZodTypeAny, {
256
+ description?: string | undefined;
257
+ styleGuide?: {
258
+ targetAudience?: "general" | "technical" | "non-technical" | undefined;
259
+ toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
260
+ levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
261
+ generalRule?: "active-voice" | "passive-voice" | undefined;
262
+ } | {
263
+ text: string;
264
+ } | undefined;
265
+ glossary?: {
266
+ term: string;
267
+ translatable: boolean;
268
+ forbidden: boolean;
269
+ caseSensitive: boolean;
270
+ description?: string | undefined;
271
+ translations?: {
272
+ locale: string;
273
+ translation: string;
274
+ description?: string | undefined;
275
+ }[] | undefined;
276
+ }[] | undefined;
277
+ }, {
278
+ description?: string | undefined;
279
+ styleGuide?: {
280
+ targetAudience?: "general" | "technical" | "non-technical" | undefined;
281
+ toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
282
+ levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
283
+ generalRule?: "active-voice" | "passive-voice" | undefined;
284
+ } | {
285
+ text: string;
286
+ } | undefined;
287
+ glossary?: {
288
+ term: string;
289
+ description?: string | undefined;
290
+ translatable?: boolean | undefined;
291
+ forbidden?: boolean | undefined;
292
+ caseSensitive?: boolean | undefined;
293
+ translations?: {
294
+ locale: string;
295
+ translation: string;
296
+ description?: string | undefined;
297
+ }[] | undefined;
298
+ }[] | undefined;
299
+ }>>;
300
+ contentUnits: z.ZodEffects<z.ZodArray<z.ZodObject<{
301
+ id: z.ZodString;
302
+ context: z.ZodOptional<z.ZodObject<{
303
+ description: z.ZodString;
304
+ }, "strip", z.ZodTypeAny, {
305
+ description: string;
306
+ }, {
307
+ description: string;
308
+ }>>;
309
+ characterLimit: z.ZodOptional<z.ZodNumber>;
310
+ segments: z.ZodEffects<z.ZodArray<z.ZodObject<{
311
+ id: z.ZodString;
312
+ tmMatch: z.ZodOptional<z.ZodObject<{
313
+ sourceValue: z.ZodString;
314
+ translatedValue: z.ZodString;
315
+ }, "strip", z.ZodTypeAny, {
316
+ sourceValue: string;
317
+ translatedValue: string;
318
+ }, {
319
+ sourceValue: string;
320
+ translatedValue: string;
321
+ }>>;
322
+ value: z.ZodString;
323
+ }, "strip", z.ZodTypeAny, {
324
+ value: string;
325
+ id: string;
326
+ tmMatch?: {
327
+ sourceValue: string;
328
+ translatedValue: string;
329
+ } | undefined;
330
+ }, {
331
+ value: string;
332
+ id: string;
333
+ tmMatch?: {
334
+ sourceValue: string;
335
+ translatedValue: string;
336
+ } | undefined;
337
+ }>, "atleastone">, [{
338
+ value: string;
339
+ id: string;
340
+ tmMatch?: {
341
+ sourceValue: string;
342
+ translatedValue: string;
343
+ } | undefined;
344
+ }, ...{
345
+ value: string;
346
+ id: string;
347
+ tmMatch?: {
348
+ sourceValue: string;
349
+ translatedValue: string;
350
+ } | undefined;
351
+ }[]], [{
352
+ value: string;
353
+ id: string;
354
+ tmMatch?: {
355
+ sourceValue: string;
356
+ translatedValue: string;
357
+ } | undefined;
358
+ }, ...{
359
+ value: string;
360
+ id: string;
361
+ tmMatch?: {
362
+ sourceValue: string;
363
+ translatedValue: string;
364
+ } | undefined;
365
+ }[]]>;
366
+ }, "strip", z.ZodTypeAny, {
367
+ id: string;
368
+ segments: [{
369
+ value: string;
370
+ id: string;
371
+ tmMatch?: {
372
+ sourceValue: string;
373
+ translatedValue: string;
374
+ } | undefined;
375
+ }, ...{
376
+ value: string;
377
+ id: string;
378
+ tmMatch?: {
379
+ sourceValue: string;
380
+ translatedValue: string;
381
+ } | undefined;
382
+ }[]];
383
+ context?: {
384
+ description: string;
385
+ } | undefined;
386
+ characterLimit?: number | undefined;
387
+ }, {
388
+ id: string;
389
+ segments: [{
390
+ value: string;
391
+ id: string;
392
+ tmMatch?: {
393
+ sourceValue: string;
394
+ translatedValue: string;
395
+ } | undefined;
396
+ }, ...{
397
+ value: string;
398
+ id: string;
399
+ tmMatch?: {
400
+ sourceValue: string;
401
+ translatedValue: string;
402
+ } | undefined;
403
+ }[]];
404
+ context?: {
405
+ description: string;
406
+ } | undefined;
407
+ characterLimit?: number | undefined;
408
+ }>, "atleastone">, [{
409
+ id: string;
410
+ segments: [{
411
+ value: string;
412
+ id: string;
413
+ tmMatch?: {
414
+ sourceValue: string;
415
+ translatedValue: string;
416
+ } | undefined;
417
+ }, ...{
418
+ value: string;
419
+ id: string;
420
+ tmMatch?: {
421
+ sourceValue: string;
422
+ translatedValue: string;
423
+ } | undefined;
424
+ }[]];
425
+ context?: {
426
+ description: string;
427
+ } | undefined;
428
+ characterLimit?: number | undefined;
429
+ }, ...{
430
+ id: string;
431
+ segments: [{
432
+ value: string;
433
+ id: string;
434
+ tmMatch?: {
435
+ sourceValue: string;
436
+ translatedValue: string;
437
+ } | undefined;
438
+ }, ...{
439
+ value: string;
440
+ id: string;
441
+ tmMatch?: {
442
+ sourceValue: string;
443
+ translatedValue: string;
444
+ } | undefined;
445
+ }[]];
446
+ context?: {
447
+ description: string;
448
+ } | undefined;
449
+ characterLimit?: number | undefined;
450
+ }[]], [{
451
+ id: string;
452
+ segments: [{
453
+ value: string;
454
+ id: string;
455
+ tmMatch?: {
456
+ sourceValue: string;
457
+ translatedValue: string;
458
+ } | undefined;
459
+ }, ...{
460
+ value: string;
461
+ id: string;
462
+ tmMatch?: {
463
+ sourceValue: string;
464
+ translatedValue: string;
465
+ } | undefined;
466
+ }[]];
467
+ context?: {
468
+ description: string;
469
+ } | undefined;
470
+ characterLimit?: number | undefined;
471
+ }, ...{
472
+ id: string;
473
+ segments: [{
474
+ value: string;
475
+ id: string;
476
+ tmMatch?: {
477
+ sourceValue: string;
478
+ translatedValue: string;
479
+ } | undefined;
480
+ }, ...{
481
+ value: string;
482
+ id: string;
483
+ tmMatch?: {
484
+ sourceValue: string;
485
+ translatedValue: string;
486
+ } | undefined;
487
+ }[]];
488
+ context?: {
489
+ description: string;
490
+ } | undefined;
491
+ characterLimit?: number | undefined;
492
+ }[]]>;
493
+ }>, "strip", z.ZodTypeAny, {
494
+ originCorrelationId: string;
495
+ ownerId: string;
496
+ tenantId: string;
497
+ callbackUrl: string;
498
+ callbackToken: string;
499
+ sourceLocale: string;
500
+ targetLocale: string;
501
+ pickIntegrationByScore: boolean;
502
+ contentUnits: [{
503
+ id: string;
504
+ segments: [{
505
+ value: string;
506
+ id: string;
507
+ tmMatch?: {
508
+ sourceValue: string;
509
+ translatedValue: string;
510
+ } | undefined;
511
+ }, ...{
512
+ value: string;
513
+ id: string;
514
+ tmMatch?: {
515
+ sourceValue: string;
516
+ translatedValue: string;
517
+ } | undefined;
518
+ }[]];
519
+ context?: {
520
+ description: string;
521
+ } | undefined;
522
+ characterLimit?: number | undefined;
523
+ }, ...{
524
+ id: string;
525
+ segments: [{
526
+ value: string;
527
+ id: string;
528
+ tmMatch?: {
529
+ sourceValue: string;
530
+ translatedValue: string;
531
+ } | undefined;
532
+ }, ...{
533
+ value: string;
534
+ id: string;
535
+ tmMatch?: {
536
+ sourceValue: string;
537
+ translatedValue: string;
538
+ } | undefined;
539
+ }[]];
540
+ context?: {
541
+ description: string;
542
+ } | undefined;
543
+ characterLimit?: number | undefined;
544
+ }[]];
545
+ context?: {
546
+ description?: string | undefined;
547
+ styleGuide?: {
548
+ targetAudience?: "general" | "technical" | "non-technical" | undefined;
549
+ toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
550
+ levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
551
+ generalRule?: "active-voice" | "passive-voice" | undefined;
552
+ } | {
553
+ text: string;
554
+ } | undefined;
555
+ glossary?: {
556
+ term: string;
557
+ translatable: boolean;
558
+ forbidden: boolean;
559
+ caseSensitive: boolean;
560
+ description?: string | undefined;
561
+ translations?: {
562
+ locale: string;
563
+ translation: string;
564
+ description?: string | undefined;
565
+ }[] | undefined;
566
+ }[] | undefined;
567
+ } | undefined;
568
+ integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
569
+ }, {
570
+ originCorrelationId: string;
571
+ ownerId: string;
572
+ tenantId: string;
573
+ callbackUrl: string;
574
+ callbackToken: string;
575
+ sourceLocale: string;
576
+ targetLocale: string;
577
+ contentUnits: [{
578
+ id: string;
579
+ segments: [{
580
+ value: string;
581
+ id: string;
582
+ tmMatch?: {
583
+ sourceValue: string;
584
+ translatedValue: string;
585
+ } | undefined;
586
+ }, ...{
587
+ value: string;
588
+ id: string;
589
+ tmMatch?: {
590
+ sourceValue: string;
591
+ translatedValue: string;
592
+ } | undefined;
593
+ }[]];
594
+ context?: {
595
+ description: string;
596
+ } | undefined;
597
+ characterLimit?: number | undefined;
598
+ }, ...{
599
+ id: string;
600
+ segments: [{
601
+ value: string;
602
+ id: string;
603
+ tmMatch?: {
604
+ sourceValue: string;
605
+ translatedValue: string;
606
+ } | undefined;
607
+ }, ...{
608
+ value: string;
609
+ id: string;
610
+ tmMatch?: {
611
+ sourceValue: string;
612
+ translatedValue: string;
613
+ } | undefined;
614
+ }[]];
615
+ context?: {
616
+ description: string;
617
+ } | undefined;
618
+ characterLimit?: number | undefined;
619
+ }[]];
620
+ context?: {
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
+ locale: string;
638
+ translation: string;
639
+ description?: string | undefined;
640
+ }[] | undefined;
641
+ }[] | undefined;
642
+ } | undefined;
643
+ integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
644
+ pickIntegrationByScore?: boolean | undefined;
645
+ }>, {
646
+ originCorrelationId: string;
647
+ ownerId: string;
648
+ tenantId: string;
649
+ callbackUrl: string;
650
+ callbackToken: string;
651
+ sourceLocale: string;
652
+ targetLocale: string;
653
+ pickIntegrationByScore: boolean;
654
+ contentUnits: [{
655
+ id: string;
656
+ segments: [{
657
+ value: string;
658
+ id: string;
659
+ tmMatch?: {
660
+ sourceValue: string;
661
+ translatedValue: string;
662
+ } | undefined;
663
+ }, ...{
664
+ value: string;
665
+ id: string;
666
+ tmMatch?: {
667
+ sourceValue: string;
668
+ translatedValue: string;
669
+ } | undefined;
670
+ }[]];
671
+ context?: {
672
+ description: string;
673
+ } | undefined;
674
+ characterLimit?: number | undefined;
675
+ }, ...{
676
+ id: string;
677
+ segments: [{
678
+ value: string;
679
+ id: string;
680
+ tmMatch?: {
681
+ sourceValue: string;
682
+ translatedValue: string;
683
+ } | undefined;
684
+ }, ...{
685
+ value: string;
686
+ id: string;
687
+ tmMatch?: {
688
+ sourceValue: string;
689
+ translatedValue: string;
690
+ } | undefined;
691
+ }[]];
692
+ context?: {
693
+ description: string;
694
+ } | undefined;
695
+ characterLimit?: number | undefined;
696
+ }[]];
697
+ context?: {
698
+ description?: string | undefined;
699
+ styleGuide?: {
700
+ targetAudience?: "general" | "technical" | "non-technical" | undefined;
701
+ toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
702
+ levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
703
+ generalRule?: "active-voice" | "passive-voice" | undefined;
704
+ } | {
705
+ text: string;
706
+ } | undefined;
707
+ glossary?: {
708
+ term: string;
709
+ translatable: boolean;
710
+ forbidden: boolean;
711
+ caseSensitive: boolean;
712
+ description?: string | undefined;
713
+ translations?: {
714
+ locale: string;
715
+ translation: string;
716
+ description?: string | undefined;
717
+ }[] | undefined;
718
+ }[] | undefined;
719
+ } | undefined;
720
+ integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
721
+ }, {
722
+ originCorrelationId: string;
723
+ ownerId: string;
724
+ tenantId: string;
725
+ callbackUrl: string;
726
+ callbackToken: string;
727
+ sourceLocale: string;
728
+ targetLocale: string;
729
+ contentUnits: [{
730
+ id: string;
731
+ segments: [{
732
+ value: string;
733
+ id: string;
734
+ tmMatch?: {
735
+ sourceValue: string;
736
+ translatedValue: string;
737
+ } | undefined;
738
+ }, ...{
739
+ value: string;
740
+ id: string;
741
+ tmMatch?: {
742
+ sourceValue: string;
743
+ translatedValue: string;
744
+ } | undefined;
745
+ }[]];
746
+ context?: {
747
+ description: string;
748
+ } | undefined;
749
+ characterLimit?: number | undefined;
750
+ }, ...{
751
+ id: string;
752
+ segments: [{
753
+ value: string;
754
+ id: string;
755
+ tmMatch?: {
756
+ sourceValue: string;
757
+ translatedValue: string;
758
+ } | undefined;
759
+ }, ...{
760
+ value: string;
761
+ id: string;
762
+ tmMatch?: {
763
+ sourceValue: string;
764
+ translatedValue: string;
765
+ } | undefined;
766
+ }[]];
767
+ context?: {
768
+ description: string;
769
+ } | undefined;
770
+ characterLimit?: number | undefined;
771
+ }[]];
772
+ context?: {
773
+ description?: string | undefined;
774
+ styleGuide?: {
775
+ targetAudience?: "general" | "technical" | "non-technical" | undefined;
776
+ toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
777
+ levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
778
+ generalRule?: "active-voice" | "passive-voice" | undefined;
779
+ } | {
780
+ text: string;
781
+ } | undefined;
782
+ glossary?: {
783
+ term: string;
784
+ description?: string | undefined;
785
+ translatable?: boolean | undefined;
786
+ forbidden?: boolean | undefined;
787
+ caseSensitive?: boolean | undefined;
788
+ translations?: {
789
+ locale: string;
790
+ translation: string;
791
+ description?: string | undefined;
792
+ }[] | undefined;
793
+ }[] | undefined;
794
+ } | undefined;
795
+ integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
796
+ pickIntegrationByScore?: boolean | undefined;
797
+ }>, {
798
+ originCorrelationId: string;
799
+ ownerId: string;
800
+ tenantId: string;
801
+ callbackUrl: string;
802
+ callbackToken: string;
803
+ sourceLocale: string;
804
+ targetLocale: string;
805
+ pickIntegrationByScore: boolean;
806
+ contentUnits: [{
807
+ id: string;
808
+ segments: [{
809
+ value: string;
810
+ id: string;
811
+ tmMatch?: {
812
+ sourceValue: string;
813
+ translatedValue: string;
814
+ } | undefined;
815
+ }, ...{
816
+ value: string;
817
+ id: string;
818
+ tmMatch?: {
819
+ sourceValue: string;
820
+ translatedValue: string;
821
+ } | undefined;
822
+ }[]];
823
+ context?: {
824
+ description: string;
825
+ } | undefined;
826
+ characterLimit?: number | undefined;
827
+ }, ...{
828
+ id: string;
829
+ segments: [{
830
+ value: string;
831
+ id: string;
832
+ tmMatch?: {
833
+ sourceValue: string;
834
+ translatedValue: string;
835
+ } | undefined;
836
+ }, ...{
837
+ value: string;
838
+ id: string;
839
+ tmMatch?: {
840
+ sourceValue: string;
841
+ translatedValue: string;
842
+ } | undefined;
843
+ }[]];
844
+ context?: {
845
+ description: string;
846
+ } | undefined;
847
+ characterLimit?: number | undefined;
848
+ }[]];
849
+ context?: {
850
+ description?: string | undefined;
851
+ styleGuide?: {
852
+ targetAudience?: "general" | "technical" | "non-technical" | undefined;
853
+ toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
854
+ levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
855
+ generalRule?: "active-voice" | "passive-voice" | undefined;
856
+ } | {
857
+ text: string;
858
+ } | undefined;
859
+ glossary?: {
860
+ term: string;
861
+ translatable: boolean;
862
+ forbidden: boolean;
863
+ caseSensitive: boolean;
864
+ description?: string | undefined;
865
+ translations?: {
866
+ locale: string;
867
+ translation: string;
868
+ description?: string | undefined;
869
+ }[] | undefined;
870
+ }[] | undefined;
871
+ } | undefined;
872
+ integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
873
+ }, {
874
+ originCorrelationId: string;
875
+ ownerId: string;
876
+ tenantId: string;
877
+ callbackUrl: string;
878
+ callbackToken: string;
879
+ sourceLocale: string;
880
+ targetLocale: string;
881
+ contentUnits: [{
882
+ id: string;
883
+ segments: [{
884
+ value: string;
885
+ id: string;
886
+ tmMatch?: {
887
+ sourceValue: string;
888
+ translatedValue: string;
889
+ } | undefined;
890
+ }, ...{
891
+ value: string;
892
+ id: string;
893
+ tmMatch?: {
894
+ sourceValue: string;
895
+ translatedValue: string;
896
+ } | undefined;
897
+ }[]];
898
+ context?: {
899
+ description: string;
900
+ } | undefined;
901
+ characterLimit?: number | undefined;
902
+ }, ...{
903
+ id: string;
904
+ segments: [{
905
+ value: string;
906
+ id: string;
907
+ tmMatch?: {
908
+ sourceValue: string;
909
+ translatedValue: string;
910
+ } | undefined;
911
+ }, ...{
912
+ value: string;
913
+ id: string;
914
+ tmMatch?: {
915
+ sourceValue: string;
916
+ translatedValue: string;
917
+ } | undefined;
918
+ }[]];
919
+ context?: {
920
+ description: string;
921
+ } | undefined;
922
+ characterLimit?: number | undefined;
923
+ }[]];
924
+ context?: {
925
+ description?: string | undefined;
926
+ styleGuide?: {
927
+ targetAudience?: "general" | "technical" | "non-technical" | undefined;
928
+ toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
929
+ levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
930
+ generalRule?: "active-voice" | "passive-voice" | undefined;
931
+ } | {
932
+ text: string;
933
+ } | undefined;
934
+ glossary?: {
935
+ term: string;
936
+ description?: string | undefined;
937
+ translatable?: boolean | undefined;
938
+ forbidden?: boolean | undefined;
939
+ caseSensitive?: boolean | undefined;
940
+ translations?: {
941
+ locale: string;
942
+ translation: string;
943
+ description?: string | undefined;
944
+ }[] | undefined;
945
+ }[] | undefined;
946
+ } | undefined;
947
+ integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
948
+ pickIntegrationByScore?: boolean | undefined;
949
+ }>;
950
+ export declare const TRANSLATE_ASYNC_V2_HEADERS_SCHEMA: z.ZodObject<{
951
+ 'x-fake-processing': z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
952
+ }, "strip", z.ZodTypeAny, {
953
+ 'x-fake-processing'?: boolean | undefined;
954
+ }, {
955
+ 'x-fake-processing'?: unknown;
956
+ }>;
957
+ export declare const TRANSLATE_ASYNC_V2_RESPONSE_SCHEMA: z.ZodObject<{
958
+ requestId: z.ZodString;
959
+ expectedAt: z.ZodString;
960
+ }, "strip", z.ZodTypeAny, {
961
+ requestId: string;
962
+ expectedAt: string;
963
+ }, {
964
+ requestId: string;
965
+ expectedAt: string;
966
+ }>;
967
+ export declare const TRANSLATE_ASYNC_V2_CALLBACK_SCHEMA: z.ZodObject<{
968
+ originCorrelationId: z.ZodString;
969
+ data: z.ZodArray<z.ZodObject<{
970
+ contentUnitId: z.ZodString;
971
+ segmentId: z.ZodString;
972
+ polyglotRefId: z.ZodString;
973
+ integration: z.ZodString;
974
+ translation: z.ZodString;
975
+ score: z.ZodNullable<z.ZodNumber>;
976
+ }, "strip", z.ZodTypeAny, {
977
+ translation: string;
978
+ integration: string;
979
+ contentUnitId: string;
980
+ segmentId: string;
981
+ polyglotRefId: string;
982
+ score: number | null;
983
+ }, {
984
+ translation: string;
985
+ integration: string;
986
+ contentUnitId: string;
987
+ segmentId: string;
988
+ polyglotRefId: string;
989
+ score: number | null;
990
+ }>, "many">;
991
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
992
+ message: z.ZodString;
993
+ errorCode: z.ZodString;
994
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
995
+ }, {
996
+ contentUnitId: z.ZodString;
997
+ segmentId: z.ZodString;
998
+ polyglotRefId: z.ZodString;
999
+ integration: z.ZodString;
1000
+ }>, "strip", z.ZodTypeAny, {
1001
+ message: string;
1002
+ errorCode: string;
1003
+ integration: string;
1004
+ contentUnitId: string;
1005
+ segmentId: string;
1006
+ polyglotRefId: string;
1007
+ details?: Record<string, unknown> | undefined;
1008
+ }, {
1009
+ message: string;
1010
+ errorCode: string;
1011
+ integration: string;
1012
+ contentUnitId: string;
1013
+ segmentId: string;
1014
+ polyglotRefId: string;
1015
+ details?: Record<string, unknown> | undefined;
1016
+ }>, "many">>;
1017
+ }, "strip", z.ZodTypeAny, {
1018
+ originCorrelationId: string;
1019
+ data: {
1020
+ translation: string;
1021
+ integration: string;
1022
+ contentUnitId: string;
1023
+ segmentId: string;
1024
+ polyglotRefId: string;
1025
+ score: number | null;
1026
+ }[];
1027
+ errors?: {
1028
+ message: string;
1029
+ errorCode: string;
1030
+ integration: string;
1031
+ contentUnitId: string;
1032
+ segmentId: string;
1033
+ polyglotRefId: string;
1034
+ details?: Record<string, unknown> | undefined;
1035
+ }[] | undefined;
1036
+ }, {
1037
+ originCorrelationId: string;
1038
+ data: {
1039
+ translation: string;
1040
+ integration: string;
1041
+ contentUnitId: string;
1042
+ segmentId: string;
1043
+ polyglotRefId: string;
1044
+ score: number | null;
1045
+ }[];
1046
+ errors?: {
1047
+ message: string;
1048
+ errorCode: string;
1049
+ integration: string;
1050
+ contentUnitId: string;
1051
+ segmentId: string;
1052
+ polyglotRefId: string;
1053
+ details?: Record<string, unknown> | undefined;
1054
+ }[] | undefined;
1055
+ }>;
1056
+ export type TranslateAsyncV2Body = z.infer<typeof TRANSLATE_ASYNC_V2_BODY_SCHEMA>;
1057
+ export type TranslateAsyncV2Headers = z.infer<typeof TRANSLATE_ASYNC_V2_HEADERS_SCHEMA>;
1058
+ export type TranslateAsyncV2Response = z.infer<typeof TRANSLATE_ASYNC_V2_RESPONSE_SCHEMA>;
1059
+ export type TranslateAsyncV2Callback = z.infer<typeof TRANSLATE_ASYNC_V2_CALLBACK_SCHEMA>;