@wix/auto_sdk_multilingual_machine-translation 1.0.44 → 1.0.45

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,720 @@
1
+ // src/multilingual-machine-v3-translatable-content-machine-translation.schemas.ts
2
+ import * as z from "zod";
3
+ var MachineTranslateRequest = z.object({
4
+ sourceLanguage: z.enum([
5
+ "AF",
6
+ "SQ",
7
+ "AM",
8
+ "AR",
9
+ "HY",
10
+ "AS",
11
+ "AY",
12
+ "AZ",
13
+ "BM",
14
+ "EU",
15
+ "BE",
16
+ "BN",
17
+ "BHO",
18
+ "BS",
19
+ "BG",
20
+ "CA",
21
+ "CEB",
22
+ "ZH_CN",
23
+ "ZH_TW",
24
+ "ZH",
25
+ "CO",
26
+ "HR",
27
+ "CS",
28
+ "DA",
29
+ "DV",
30
+ "DOI",
31
+ "NL",
32
+ "EN",
33
+ "EO",
34
+ "ET",
35
+ "EE",
36
+ "FIL",
37
+ "FI",
38
+ "FR",
39
+ "FY",
40
+ "GL",
41
+ "KA",
42
+ "DE",
43
+ "EL",
44
+ "GN",
45
+ "GU",
46
+ "HT",
47
+ "HA",
48
+ "HAW",
49
+ "HE",
50
+ "HI",
51
+ "HMN",
52
+ "HU",
53
+ "IS",
54
+ "IG",
55
+ "ILO",
56
+ "ID",
57
+ "GA",
58
+ "IT",
59
+ "JA",
60
+ "JW",
61
+ "KN",
62
+ "KK",
63
+ "KM",
64
+ "RW",
65
+ "GOM",
66
+ "KO",
67
+ "KRI",
68
+ "KU",
69
+ "CKB",
70
+ "KY",
71
+ "LO",
72
+ "LA",
73
+ "LV",
74
+ "LN",
75
+ "LT",
76
+ "LG",
77
+ "LB",
78
+ "MK",
79
+ "MAI",
80
+ "MG",
81
+ "MS",
82
+ "ML",
83
+ "MT",
84
+ "MI",
85
+ "MR",
86
+ "MNI_MTEI",
87
+ "LUS",
88
+ "MN",
89
+ "MY",
90
+ "NE",
91
+ "NO",
92
+ "NY",
93
+ "OR",
94
+ "OM",
95
+ "PS",
96
+ "FA",
97
+ "PL",
98
+ "PT",
99
+ "PA",
100
+ "QU",
101
+ "RO",
102
+ "RU",
103
+ "SM",
104
+ "SA",
105
+ "GD",
106
+ "NSO",
107
+ "SR",
108
+ "ST",
109
+ "SN",
110
+ "SD",
111
+ "SI",
112
+ "SK",
113
+ "SL",
114
+ "SO",
115
+ "ES",
116
+ "SU",
117
+ "SW",
118
+ "SV",
119
+ "TL",
120
+ "TG",
121
+ "TA",
122
+ "TT",
123
+ "TE",
124
+ "TH",
125
+ "TI",
126
+ "TS",
127
+ "TR",
128
+ "TK",
129
+ "AK",
130
+ "UK",
131
+ "UR",
132
+ "UG",
133
+ "UZ",
134
+ "VI",
135
+ "CY",
136
+ "XH",
137
+ "YI",
138
+ "YO",
139
+ "ZU"
140
+ ]),
141
+ options: z.object({
142
+ targetLanguage: z.enum([
143
+ "AF",
144
+ "SQ",
145
+ "AM",
146
+ "AR",
147
+ "HY",
148
+ "AS",
149
+ "AY",
150
+ "AZ",
151
+ "BM",
152
+ "EU",
153
+ "BE",
154
+ "BN",
155
+ "BHO",
156
+ "BS",
157
+ "BG",
158
+ "CA",
159
+ "CEB",
160
+ "ZH_CN",
161
+ "ZH_TW",
162
+ "ZH",
163
+ "CO",
164
+ "HR",
165
+ "CS",
166
+ "DA",
167
+ "DV",
168
+ "DOI",
169
+ "NL",
170
+ "EN",
171
+ "EO",
172
+ "ET",
173
+ "EE",
174
+ "FIL",
175
+ "FI",
176
+ "FR",
177
+ "FY",
178
+ "GL",
179
+ "KA",
180
+ "DE",
181
+ "EL",
182
+ "GN",
183
+ "GU",
184
+ "HT",
185
+ "HA",
186
+ "HAW",
187
+ "HE",
188
+ "HI",
189
+ "HMN",
190
+ "HU",
191
+ "IS",
192
+ "IG",
193
+ "ILO",
194
+ "ID",
195
+ "GA",
196
+ "IT",
197
+ "JA",
198
+ "JW",
199
+ "KN",
200
+ "KK",
201
+ "KM",
202
+ "RW",
203
+ "GOM",
204
+ "KO",
205
+ "KRI",
206
+ "KU",
207
+ "CKB",
208
+ "KY",
209
+ "LO",
210
+ "LA",
211
+ "LV",
212
+ "LN",
213
+ "LT",
214
+ "LG",
215
+ "LB",
216
+ "MK",
217
+ "MAI",
218
+ "MG",
219
+ "MS",
220
+ "ML",
221
+ "MT",
222
+ "MI",
223
+ "MR",
224
+ "MNI_MTEI",
225
+ "LUS",
226
+ "MN",
227
+ "MY",
228
+ "NE",
229
+ "NO",
230
+ "NY",
231
+ "OR",
232
+ "OM",
233
+ "PS",
234
+ "FA",
235
+ "PL",
236
+ "PT",
237
+ "PA",
238
+ "QU",
239
+ "RO",
240
+ "RU",
241
+ "SM",
242
+ "SA",
243
+ "GD",
244
+ "NSO",
245
+ "SR",
246
+ "ST",
247
+ "SN",
248
+ "SD",
249
+ "SI",
250
+ "SK",
251
+ "SL",
252
+ "SO",
253
+ "ES",
254
+ "SU",
255
+ "SW",
256
+ "SV",
257
+ "TL",
258
+ "TG",
259
+ "TA",
260
+ "TT",
261
+ "TE",
262
+ "TH",
263
+ "TI",
264
+ "TS",
265
+ "TR",
266
+ "TK",
267
+ "AK",
268
+ "UK",
269
+ "UR",
270
+ "UG",
271
+ "UZ",
272
+ "VI",
273
+ "CY",
274
+ "XH",
275
+ "YI",
276
+ "YO",
277
+ "ZU"
278
+ ]),
279
+ contentToTranslate: z.intersection(
280
+ z.object({
281
+ _id: z.string().describe(
282
+ "Translatable content ID. The ID should be unique to this content and doesn't need to match the ID used by any other service."
283
+ ).max(512).optional().nullable(),
284
+ format: z.enum(["PLAIN_TEXT", "HTML", "RICH"]).optional()
285
+ }),
286
+ z.xor([
287
+ z.object({
288
+ plainTextContent: z.never().optional(),
289
+ htmlContent: z.never().optional(),
290
+ richContent: z.never().optional()
291
+ }),
292
+ z.object({
293
+ htmlContent: z.never().optional(),
294
+ richContent: z.never().optional(),
295
+ plainTextContent: z.string().describe("Plain text.").min(1).max(1e4)
296
+ }),
297
+ z.object({
298
+ plainTextContent: z.never().optional(),
299
+ richContent: z.never().optional(),
300
+ htmlContent: z.string().describe("HTML-encoded.").min(1).max(1e4)
301
+ }),
302
+ z.object({
303
+ plainTextContent: z.never().optional(),
304
+ htmlContent: z.never().optional(),
305
+ richContent: z.any().describe("Rich content.")
306
+ })
307
+ ])
308
+ ).describe("The content to translate.")
309
+ })
310
+ });
311
+ var MachineTranslateResponse = z.object({
312
+ translatedContent: z.intersection(
313
+ z.object({
314
+ _id: z.string().describe(
315
+ "Translatable content ID. The ID should be unique to this content and doesn't need to match the ID used by any other service."
316
+ ).max(512).optional().nullable(),
317
+ format: z.enum(["PLAIN_TEXT", "HTML", "RICH"]).describe("Format of the translatable content.").optional()
318
+ }),
319
+ z.xor([
320
+ z.object({
321
+ plainTextContent: z.never().optional(),
322
+ htmlContent: z.never().optional(),
323
+ richContent: z.never().optional()
324
+ }),
325
+ z.object({
326
+ htmlContent: z.never().optional(),
327
+ richContent: z.never().optional(),
328
+ plainTextContent: z.string().describe("Plain text.").min(1).max(1e4)
329
+ }),
330
+ z.object({
331
+ plainTextContent: z.never().optional(),
332
+ richContent: z.never().optional(),
333
+ htmlContent: z.string().describe("HTML-encoded.").min(1).max(1e4)
334
+ }),
335
+ z.object({
336
+ plainTextContent: z.never().optional(),
337
+ htmlContent: z.never().optional(),
338
+ richContent: z.any().describe("Rich content.")
339
+ })
340
+ ])
341
+ ).describe("The translated content.").optional()
342
+ });
343
+ var BulkMachineTranslateRequest = z.object({
344
+ sourceLanguage: z.enum([
345
+ "AF",
346
+ "SQ",
347
+ "AM",
348
+ "AR",
349
+ "HY",
350
+ "AS",
351
+ "AY",
352
+ "AZ",
353
+ "BM",
354
+ "EU",
355
+ "BE",
356
+ "BN",
357
+ "BHO",
358
+ "BS",
359
+ "BG",
360
+ "CA",
361
+ "CEB",
362
+ "ZH_CN",
363
+ "ZH_TW",
364
+ "ZH",
365
+ "CO",
366
+ "HR",
367
+ "CS",
368
+ "DA",
369
+ "DV",
370
+ "DOI",
371
+ "NL",
372
+ "EN",
373
+ "EO",
374
+ "ET",
375
+ "EE",
376
+ "FIL",
377
+ "FI",
378
+ "FR",
379
+ "FY",
380
+ "GL",
381
+ "KA",
382
+ "DE",
383
+ "EL",
384
+ "GN",
385
+ "GU",
386
+ "HT",
387
+ "HA",
388
+ "HAW",
389
+ "HE",
390
+ "HI",
391
+ "HMN",
392
+ "HU",
393
+ "IS",
394
+ "IG",
395
+ "ILO",
396
+ "ID",
397
+ "GA",
398
+ "IT",
399
+ "JA",
400
+ "JW",
401
+ "KN",
402
+ "KK",
403
+ "KM",
404
+ "RW",
405
+ "GOM",
406
+ "KO",
407
+ "KRI",
408
+ "KU",
409
+ "CKB",
410
+ "KY",
411
+ "LO",
412
+ "LA",
413
+ "LV",
414
+ "LN",
415
+ "LT",
416
+ "LG",
417
+ "LB",
418
+ "MK",
419
+ "MAI",
420
+ "MG",
421
+ "MS",
422
+ "ML",
423
+ "MT",
424
+ "MI",
425
+ "MR",
426
+ "MNI_MTEI",
427
+ "LUS",
428
+ "MN",
429
+ "MY",
430
+ "NE",
431
+ "NO",
432
+ "NY",
433
+ "OR",
434
+ "OM",
435
+ "PS",
436
+ "FA",
437
+ "PL",
438
+ "PT",
439
+ "PA",
440
+ "QU",
441
+ "RO",
442
+ "RU",
443
+ "SM",
444
+ "SA",
445
+ "GD",
446
+ "NSO",
447
+ "SR",
448
+ "ST",
449
+ "SN",
450
+ "SD",
451
+ "SI",
452
+ "SK",
453
+ "SL",
454
+ "SO",
455
+ "ES",
456
+ "SU",
457
+ "SW",
458
+ "SV",
459
+ "TL",
460
+ "TG",
461
+ "TA",
462
+ "TT",
463
+ "TE",
464
+ "TH",
465
+ "TI",
466
+ "TS",
467
+ "TR",
468
+ "TK",
469
+ "AK",
470
+ "UK",
471
+ "UR",
472
+ "UG",
473
+ "UZ",
474
+ "VI",
475
+ "CY",
476
+ "XH",
477
+ "YI",
478
+ "YO",
479
+ "ZU"
480
+ ]),
481
+ options: z.object({
482
+ targetLanguage: z.enum([
483
+ "AF",
484
+ "SQ",
485
+ "AM",
486
+ "AR",
487
+ "HY",
488
+ "AS",
489
+ "AY",
490
+ "AZ",
491
+ "BM",
492
+ "EU",
493
+ "BE",
494
+ "BN",
495
+ "BHO",
496
+ "BS",
497
+ "BG",
498
+ "CA",
499
+ "CEB",
500
+ "ZH_CN",
501
+ "ZH_TW",
502
+ "ZH",
503
+ "CO",
504
+ "HR",
505
+ "CS",
506
+ "DA",
507
+ "DV",
508
+ "DOI",
509
+ "NL",
510
+ "EN",
511
+ "EO",
512
+ "ET",
513
+ "EE",
514
+ "FIL",
515
+ "FI",
516
+ "FR",
517
+ "FY",
518
+ "GL",
519
+ "KA",
520
+ "DE",
521
+ "EL",
522
+ "GN",
523
+ "GU",
524
+ "HT",
525
+ "HA",
526
+ "HAW",
527
+ "HE",
528
+ "HI",
529
+ "HMN",
530
+ "HU",
531
+ "IS",
532
+ "IG",
533
+ "ILO",
534
+ "ID",
535
+ "GA",
536
+ "IT",
537
+ "JA",
538
+ "JW",
539
+ "KN",
540
+ "KK",
541
+ "KM",
542
+ "RW",
543
+ "GOM",
544
+ "KO",
545
+ "KRI",
546
+ "KU",
547
+ "CKB",
548
+ "KY",
549
+ "LO",
550
+ "LA",
551
+ "LV",
552
+ "LN",
553
+ "LT",
554
+ "LG",
555
+ "LB",
556
+ "MK",
557
+ "MAI",
558
+ "MG",
559
+ "MS",
560
+ "ML",
561
+ "MT",
562
+ "MI",
563
+ "MR",
564
+ "MNI_MTEI",
565
+ "LUS",
566
+ "MN",
567
+ "MY",
568
+ "NE",
569
+ "NO",
570
+ "NY",
571
+ "OR",
572
+ "OM",
573
+ "PS",
574
+ "FA",
575
+ "PL",
576
+ "PT",
577
+ "PA",
578
+ "QU",
579
+ "RO",
580
+ "RU",
581
+ "SM",
582
+ "SA",
583
+ "GD",
584
+ "NSO",
585
+ "SR",
586
+ "ST",
587
+ "SN",
588
+ "SD",
589
+ "SI",
590
+ "SK",
591
+ "SL",
592
+ "SO",
593
+ "ES",
594
+ "SU",
595
+ "SW",
596
+ "SV",
597
+ "TL",
598
+ "TG",
599
+ "TA",
600
+ "TT",
601
+ "TE",
602
+ "TH",
603
+ "TI",
604
+ "TS",
605
+ "TR",
606
+ "TK",
607
+ "AK",
608
+ "UK",
609
+ "UR",
610
+ "UG",
611
+ "UZ",
612
+ "VI",
613
+ "CY",
614
+ "XH",
615
+ "YI",
616
+ "YO",
617
+ "ZU"
618
+ ]),
619
+ contentToTranslate: z.array(
620
+ z.intersection(
621
+ z.object({
622
+ _id: z.string().describe(
623
+ "Translatable content ID. The ID should be unique to this content and doesn't need to match the ID used by any other service."
624
+ ).max(512).optional().nullable(),
625
+ format: z.enum(["PLAIN_TEXT", "HTML", "RICH"]).optional()
626
+ }),
627
+ z.xor([
628
+ z.object({
629
+ plainTextContent: z.never().optional(),
630
+ htmlContent: z.never().optional(),
631
+ richContent: z.never().optional()
632
+ }),
633
+ z.object({
634
+ htmlContent: z.never().optional(),
635
+ richContent: z.never().optional(),
636
+ plainTextContent: z.string().describe("Plain text.").min(1).max(1e4)
637
+ }),
638
+ z.object({
639
+ plainTextContent: z.never().optional(),
640
+ richContent: z.never().optional(),
641
+ htmlContent: z.string().describe("HTML-encoded.").min(1).max(1e4)
642
+ }),
643
+ z.object({
644
+ plainTextContent: z.never().optional(),
645
+ htmlContent: z.never().optional(),
646
+ richContent: z.any().describe("Rich content.")
647
+ })
648
+ ])
649
+ )
650
+ ).min(1).max(1e3).optional()
651
+ })
652
+ });
653
+ var BulkMachineTranslateResponse = z.object({
654
+ results: z.array(
655
+ z.object({
656
+ itemMetadata: z.object({
657
+ _id: z.string().describe(
658
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
659
+ ).optional().nullable(),
660
+ originalIndex: z.number().int().describe(
661
+ "Index of the item within the request array. Allows for correlation between request and response items."
662
+ ).optional(),
663
+ success: z.boolean().describe(
664
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
665
+ ).optional(),
666
+ error: z.object({
667
+ code: z.string().describe("Error code.").optional(),
668
+ description: z.string().describe("Description of the error.").optional(),
669
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
670
+ }).describe("Details about the error in case of failure.").optional()
671
+ }).describe("Metadata for the individual item in the request.").optional(),
672
+ item: z.intersection(
673
+ z.object({
674
+ _id: z.string().describe(
675
+ "Translatable content ID. The ID should be unique to this content and doesn't need to match the ID used by any other service."
676
+ ).max(512).optional().nullable(),
677
+ format: z.enum(["PLAIN_TEXT", "HTML", "RICH"]).describe("Format of the translatable content.").optional()
678
+ }),
679
+ z.xor([
680
+ z.object({
681
+ plainTextContent: z.never().optional(),
682
+ htmlContent: z.never().optional(),
683
+ richContent: z.never().optional()
684
+ }),
685
+ z.object({
686
+ htmlContent: z.never().optional(),
687
+ richContent: z.never().optional(),
688
+ plainTextContent: z.string().describe("Plain text.").min(1).max(1e4)
689
+ }),
690
+ z.object({
691
+ plainTextContent: z.never().optional(),
692
+ richContent: z.never().optional(),
693
+ htmlContent: z.string().describe("HTML-encoded.").min(1).max(1e4)
694
+ }),
695
+ z.object({
696
+ plainTextContent: z.never().optional(),
697
+ htmlContent: z.never().optional(),
698
+ richContent: z.any().describe("Rich content.")
699
+ })
700
+ ])
701
+ ).describe("The translated content.").optional()
702
+ })
703
+ ).min(1).max(1e3).optional(),
704
+ bulkActionMetadata: z.object({
705
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
706
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
707
+ undetailedFailures: z.number().int().describe(
708
+ "Number of failures without details because detailed failure threshold was exceeded."
709
+ ).optional()
710
+ }).describe(
711
+ "Metadata for the overall bulk action, including success and failure counts."
712
+ ).optional()
713
+ });
714
+ export {
715
+ BulkMachineTranslateRequest,
716
+ BulkMachineTranslateResponse,
717
+ MachineTranslateRequest,
718
+ MachineTranslateResponse
719
+ };
720
+ //# sourceMappingURL=schemas.mjs.map