@wix/auto_sdk_multilingual_machine-translation 1.0.21 → 1.0.23

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 (25) hide show
  1. package/build/cjs/index.d.ts +14 -5
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/{multilingual-machine-v3-translatable-content-machine-translation.universal-Crv8uhBN.d.ts → index.typings.d.ts} +104 -1
  4. package/build/cjs/index.typings.js +886 -0
  5. package/build/cjs/index.typings.js.map +1 -0
  6. package/build/cjs/meta.d.ts +2 -1
  7. package/build/es/index.d.mts +14 -5
  8. package/build/es/index.mjs.map +1 -1
  9. package/build/es/{multilingual-machine-v3-translatable-content-machine-translation.universal-Crv8uhBN.d.mts → index.typings.d.mts} +104 -1
  10. package/build/es/index.typings.mjs +829 -0
  11. package/build/es/index.typings.mjs.map +1 -0
  12. package/build/es/meta.d.mts +2 -1
  13. package/build/internal/cjs/index.d.ts +14 -5
  14. package/build/internal/cjs/index.js.map +1 -1
  15. package/build/internal/cjs/{multilingual-machine-v3-translatable-content-machine-translation.universal-Crv8uhBN.d.ts → index.typings.d.ts} +104 -1
  16. package/build/internal/cjs/index.typings.js +886 -0
  17. package/build/internal/cjs/index.typings.js.map +1 -0
  18. package/build/internal/cjs/meta.d.ts +2 -1
  19. package/build/internal/es/index.d.mts +14 -5
  20. package/build/internal/es/index.mjs.map +1 -1
  21. package/build/internal/es/{multilingual-machine-v3-translatable-content-machine-translation.universal-Crv8uhBN.d.mts → index.typings.d.mts} +104 -1
  22. package/build/internal/es/index.typings.mjs +829 -0
  23. package/build/internal/es/index.typings.mjs.map +1 -0
  24. package/build/internal/es/meta.d.mts +2 -1
  25. package/package.json +2 -2
@@ -0,0 +1,829 @@
1
+ // src/multilingual-machine-v3-translatable-content-machine-translation.universal.ts
2
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
+ import {
4
+ renameKeysFromSDKRequestToRESTRequest,
5
+ renameKeysFromRESTResponseToSDKResponse
6
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
7
+
8
+ // src/multilingual-machine-v3-translatable-content-machine-translation.http.ts
9
+ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
10
+ import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
11
+ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
12
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
13
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
14
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
15
+ function resolveWixMultilingualMachineV3MachineTranslationUrl(opts) {
16
+ const domainToMappings = {
17
+ "manage._base_domain_": [
18
+ {
19
+ srcPath: "/_api/machine-translation/v3",
20
+ destPath: "/v3"
21
+ }
22
+ ],
23
+ "api._api_base_domain_": [
24
+ {
25
+ srcPath: "/machine-translation/v3",
26
+ destPath: "/v3"
27
+ }
28
+ ],
29
+ "*.dev.wix-code.com": [
30
+ {
31
+ srcPath: "/_api/machine-translation/v3",
32
+ destPath: "/v3"
33
+ }
34
+ ],
35
+ "www.wixapis.com": [
36
+ {
37
+ srcPath: "/machine-translation/v3",
38
+ destPath: "/v3"
39
+ }
40
+ ],
41
+ _: [
42
+ {
43
+ srcPath: "/_api/machine-translation/v3",
44
+ destPath: "/v3"
45
+ }
46
+ ],
47
+ "editor._base_domain_": [
48
+ {
49
+ srcPath: "/_api/machine-translation/v3",
50
+ destPath: "/v3"
51
+ }
52
+ ],
53
+ "blocks._base_domain_": [
54
+ {
55
+ srcPath: "/_api/machine-translation/v3",
56
+ destPath: "/v3"
57
+ }
58
+ ],
59
+ "create.editorx": [
60
+ {
61
+ srcPath: "/_api/machine-translation/v3",
62
+ destPath: "/v3"
63
+ }
64
+ ]
65
+ };
66
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
67
+ }
68
+ var PACKAGE_NAME = "@wix/auto_sdk_multilingual_machine-translation";
69
+ function machineTranslate(payload) {
70
+ function __machineTranslate({ host }) {
71
+ const serializedData = transformPaths(payload, [
72
+ {
73
+ transformFn: transformSDKFloatToRESTFloat,
74
+ paths: [
75
+ {
76
+ path: "contentToTranslate.richContent.nodes.galleryData.items.image.media.duration"
77
+ },
78
+ {
79
+ path: "contentToTranslate.richContent.nodes.galleryData.items.video.media.duration"
80
+ },
81
+ {
82
+ path: "contentToTranslate.richContent.nodes.galleryData.items.video.thumbnail.duration"
83
+ },
84
+ {
85
+ path: "contentToTranslate.richContent.nodes.galleryData.options.item.ratio"
86
+ },
87
+ {
88
+ path: "contentToTranslate.richContent.nodes.imageData.image.duration"
89
+ },
90
+ {
91
+ path: "contentToTranslate.richContent.nodes.mapData.mapSettings.lat"
92
+ },
93
+ {
94
+ path: "contentToTranslate.richContent.nodes.mapData.mapSettings.lng"
95
+ },
96
+ {
97
+ path: "contentToTranslate.richContent.nodes.pollData.poll.image.duration"
98
+ },
99
+ {
100
+ path: "contentToTranslate.richContent.nodes.pollData.poll.options.image.duration"
101
+ },
102
+ {
103
+ path: "contentToTranslate.richContent.nodes.pollData.design.poll.background.image.duration"
104
+ },
105
+ {
106
+ path: "contentToTranslate.richContent.nodes.appEmbedData.image.duration"
107
+ },
108
+ {
109
+ path: "contentToTranslate.richContent.nodes.videoData.video.duration"
110
+ },
111
+ {
112
+ path: "contentToTranslate.richContent.nodes.videoData.thumbnail.duration"
113
+ },
114
+ {
115
+ path: "contentToTranslate.richContent.nodes.audioData.audio.duration"
116
+ },
117
+ {
118
+ path: "contentToTranslate.richContent.nodes.audioData.coverImage.duration"
119
+ }
120
+ ]
121
+ },
122
+ {
123
+ transformFn: transformSDKTimestampToRESTTimestamp,
124
+ paths: [
125
+ { path: "contentToTranslate.richContent.metadata.createdTimestamp" },
126
+ { path: "contentToTranslate.richContent.metadata.updatedTimestamp" }
127
+ ]
128
+ }
129
+ ]);
130
+ const metadata = {
131
+ entityFqdn: "wix.multilingual.machine.v3.translatable_content",
132
+ method: "POST",
133
+ methodFqn: "wix.multilingual.machine.v3.MachineTranslation.MachineTranslate",
134
+ packageName: PACKAGE_NAME,
135
+ url: resolveWixMultilingualMachineV3MachineTranslationUrl({
136
+ protoPath: "/v3/machine-translate",
137
+ data: serializedData,
138
+ host
139
+ }),
140
+ data: serializedData,
141
+ transformResponse: (payload2) => transformPaths(payload2, [
142
+ {
143
+ transformFn: transformRESTFloatToSDKFloat,
144
+ paths: [
145
+ {
146
+ path: "translatedContent.richContent.nodes.galleryData.items.image.media.duration"
147
+ },
148
+ {
149
+ path: "translatedContent.richContent.nodes.galleryData.items.video.media.duration"
150
+ },
151
+ {
152
+ path: "translatedContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
153
+ },
154
+ {
155
+ path: "translatedContent.richContent.nodes.galleryData.options.item.ratio"
156
+ },
157
+ {
158
+ path: "translatedContent.richContent.nodes.imageData.image.duration"
159
+ },
160
+ {
161
+ path: "translatedContent.richContent.nodes.mapData.mapSettings.lat"
162
+ },
163
+ {
164
+ path: "translatedContent.richContent.nodes.mapData.mapSettings.lng"
165
+ },
166
+ {
167
+ path: "translatedContent.richContent.nodes.pollData.poll.image.duration"
168
+ },
169
+ {
170
+ path: "translatedContent.richContent.nodes.pollData.poll.options.image.duration"
171
+ },
172
+ {
173
+ path: "translatedContent.richContent.nodes.pollData.design.poll.background.image.duration"
174
+ },
175
+ {
176
+ path: "translatedContent.richContent.nodes.appEmbedData.image.duration"
177
+ },
178
+ {
179
+ path: "translatedContent.richContent.nodes.videoData.video.duration"
180
+ },
181
+ {
182
+ path: "translatedContent.richContent.nodes.videoData.thumbnail.duration"
183
+ },
184
+ {
185
+ path: "translatedContent.richContent.nodes.audioData.audio.duration"
186
+ },
187
+ {
188
+ path: "translatedContent.richContent.nodes.audioData.coverImage.duration"
189
+ }
190
+ ]
191
+ },
192
+ {
193
+ transformFn: transformRESTTimestampToSDKTimestamp,
194
+ paths: [
195
+ {
196
+ path: "translatedContent.richContent.metadata.createdTimestamp"
197
+ },
198
+ {
199
+ path: "translatedContent.richContent.metadata.updatedTimestamp"
200
+ }
201
+ ]
202
+ }
203
+ ])
204
+ };
205
+ return metadata;
206
+ }
207
+ return __machineTranslate;
208
+ }
209
+ function bulkMachineTranslate(payload) {
210
+ function __bulkMachineTranslate({ host }) {
211
+ const serializedData = transformPaths(payload, [
212
+ {
213
+ transformFn: transformSDKFloatToRESTFloat,
214
+ paths: [
215
+ {
216
+ path: "contentToTranslate.richContent.nodes.galleryData.items.image.media.duration"
217
+ },
218
+ {
219
+ path: "contentToTranslate.richContent.nodes.galleryData.items.video.media.duration"
220
+ },
221
+ {
222
+ path: "contentToTranslate.richContent.nodes.galleryData.items.video.thumbnail.duration"
223
+ },
224
+ {
225
+ path: "contentToTranslate.richContent.nodes.galleryData.options.item.ratio"
226
+ },
227
+ {
228
+ path: "contentToTranslate.richContent.nodes.imageData.image.duration"
229
+ },
230
+ {
231
+ path: "contentToTranslate.richContent.nodes.mapData.mapSettings.lat"
232
+ },
233
+ {
234
+ path: "contentToTranslate.richContent.nodes.mapData.mapSettings.lng"
235
+ },
236
+ {
237
+ path: "contentToTranslate.richContent.nodes.pollData.poll.image.duration"
238
+ },
239
+ {
240
+ path: "contentToTranslate.richContent.nodes.pollData.poll.options.image.duration"
241
+ },
242
+ {
243
+ path: "contentToTranslate.richContent.nodes.pollData.design.poll.background.image.duration"
244
+ },
245
+ {
246
+ path: "contentToTranslate.richContent.nodes.appEmbedData.image.duration"
247
+ },
248
+ {
249
+ path: "contentToTranslate.richContent.nodes.videoData.video.duration"
250
+ },
251
+ {
252
+ path: "contentToTranslate.richContent.nodes.videoData.thumbnail.duration"
253
+ },
254
+ {
255
+ path: "contentToTranslate.richContent.nodes.audioData.audio.duration"
256
+ },
257
+ {
258
+ path: "contentToTranslate.richContent.nodes.audioData.coverImage.duration"
259
+ }
260
+ ]
261
+ },
262
+ {
263
+ transformFn: transformSDKTimestampToRESTTimestamp,
264
+ paths: [
265
+ { path: "contentToTranslate.richContent.metadata.createdTimestamp" },
266
+ { path: "contentToTranslate.richContent.metadata.updatedTimestamp" }
267
+ ]
268
+ }
269
+ ]);
270
+ const metadata = {
271
+ entityFqdn: "wix.multilingual.machine.v3.translatable_content",
272
+ method: "POST",
273
+ methodFqn: "wix.multilingual.machine.v3.MachineTranslation.BulkMachineTranslate",
274
+ packageName: PACKAGE_NAME,
275
+ url: resolveWixMultilingualMachineV3MachineTranslationUrl({
276
+ protoPath: "/v3/bulk-machine-translate",
277
+ data: serializedData,
278
+ host
279
+ }),
280
+ data: serializedData,
281
+ transformResponse: (payload2) => transformPaths(payload2, [
282
+ {
283
+ transformFn: transformRESTFloatToSDKFloat,
284
+ paths: [
285
+ {
286
+ path: "results.item.richContent.nodes.galleryData.items.image.media.duration"
287
+ },
288
+ {
289
+ path: "results.item.richContent.nodes.galleryData.items.video.media.duration"
290
+ },
291
+ {
292
+ path: "results.item.richContent.nodes.galleryData.items.video.thumbnail.duration"
293
+ },
294
+ {
295
+ path: "results.item.richContent.nodes.galleryData.options.item.ratio"
296
+ },
297
+ {
298
+ path: "results.item.richContent.nodes.imageData.image.duration"
299
+ },
300
+ {
301
+ path: "results.item.richContent.nodes.mapData.mapSettings.lat"
302
+ },
303
+ {
304
+ path: "results.item.richContent.nodes.mapData.mapSettings.lng"
305
+ },
306
+ {
307
+ path: "results.item.richContent.nodes.pollData.poll.image.duration"
308
+ },
309
+ {
310
+ path: "results.item.richContent.nodes.pollData.poll.options.image.duration"
311
+ },
312
+ {
313
+ path: "results.item.richContent.nodes.pollData.design.poll.background.image.duration"
314
+ },
315
+ {
316
+ path: "results.item.richContent.nodes.appEmbedData.image.duration"
317
+ },
318
+ {
319
+ path: "results.item.richContent.nodes.videoData.video.duration"
320
+ },
321
+ {
322
+ path: "results.item.richContent.nodes.videoData.thumbnail.duration"
323
+ },
324
+ {
325
+ path: "results.item.richContent.nodes.audioData.audio.duration"
326
+ },
327
+ {
328
+ path: "results.item.richContent.nodes.audioData.coverImage.duration"
329
+ }
330
+ ]
331
+ },
332
+ {
333
+ transformFn: transformRESTTimestampToSDKTimestamp,
334
+ paths: [
335
+ { path: "results.item.richContent.metadata.createdTimestamp" },
336
+ { path: "results.item.richContent.metadata.updatedTimestamp" }
337
+ ]
338
+ }
339
+ ])
340
+ };
341
+ return metadata;
342
+ }
343
+ return __bulkMachineTranslate;
344
+ }
345
+
346
+ // src/multilingual-machine-v3-translatable-content-machine-translation.universal.ts
347
+ var Format = /* @__PURE__ */ ((Format2) => {
348
+ Format2["UNKNOWN_FORMAT"] = "UNKNOWN_FORMAT";
349
+ Format2["PLAIN_TEXT"] = "PLAIN_TEXT";
350
+ Format2["HTML"] = "HTML";
351
+ Format2["RICH"] = "RICH";
352
+ return Format2;
353
+ })(Format || {});
354
+ var NodeType = /* @__PURE__ */ ((NodeType2) => {
355
+ NodeType2["PARAGRAPH"] = "PARAGRAPH";
356
+ NodeType2["TEXT"] = "TEXT";
357
+ NodeType2["HEADING"] = "HEADING";
358
+ NodeType2["BULLETED_LIST"] = "BULLETED_LIST";
359
+ NodeType2["ORDERED_LIST"] = "ORDERED_LIST";
360
+ NodeType2["LIST_ITEM"] = "LIST_ITEM";
361
+ NodeType2["BLOCKQUOTE"] = "BLOCKQUOTE";
362
+ NodeType2["CODE_BLOCK"] = "CODE_BLOCK";
363
+ NodeType2["VIDEO"] = "VIDEO";
364
+ NodeType2["DIVIDER"] = "DIVIDER";
365
+ NodeType2["FILE"] = "FILE";
366
+ NodeType2["GALLERY"] = "GALLERY";
367
+ NodeType2["GIF"] = "GIF";
368
+ NodeType2["HTML"] = "HTML";
369
+ NodeType2["IMAGE"] = "IMAGE";
370
+ NodeType2["LINK_PREVIEW"] = "LINK_PREVIEW";
371
+ NodeType2["MAP"] = "MAP";
372
+ NodeType2["POLL"] = "POLL";
373
+ NodeType2["APP_EMBED"] = "APP_EMBED";
374
+ NodeType2["BUTTON"] = "BUTTON";
375
+ NodeType2["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
376
+ NodeType2["TABLE"] = "TABLE";
377
+ NodeType2["EMBED"] = "EMBED";
378
+ NodeType2["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
379
+ NodeType2["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
380
+ NodeType2["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
381
+ NodeType2["TABLE_CELL"] = "TABLE_CELL";
382
+ NodeType2["TABLE_ROW"] = "TABLE_ROW";
383
+ NodeType2["EXTERNAL"] = "EXTERNAL";
384
+ NodeType2["AUDIO"] = "AUDIO";
385
+ NodeType2["CAPTION"] = "CAPTION";
386
+ NodeType2["LAYOUT"] = "LAYOUT";
387
+ NodeType2["LAYOUT_CELL"] = "LAYOUT_CELL";
388
+ return NodeType2;
389
+ })(NodeType || {});
390
+ var WidthType = /* @__PURE__ */ ((WidthType2) => {
391
+ WidthType2["CONTENT"] = "CONTENT";
392
+ WidthType2["SMALL"] = "SMALL";
393
+ WidthType2["ORIGINAL"] = "ORIGINAL";
394
+ WidthType2["FULL_WIDTH"] = "FULL_WIDTH";
395
+ return WidthType2;
396
+ })(WidthType || {});
397
+ var PluginContainerDataAlignment = /* @__PURE__ */ ((PluginContainerDataAlignment2) => {
398
+ PluginContainerDataAlignment2["CENTER"] = "CENTER";
399
+ PluginContainerDataAlignment2["LEFT"] = "LEFT";
400
+ PluginContainerDataAlignment2["RIGHT"] = "RIGHT";
401
+ return PluginContainerDataAlignment2;
402
+ })(PluginContainerDataAlignment || {});
403
+ var Type = /* @__PURE__ */ ((Type2) => {
404
+ Type2["LINK"] = "LINK";
405
+ Type2["ACTION"] = "ACTION";
406
+ return Type2;
407
+ })(Type || {});
408
+ var Target = /* @__PURE__ */ ((Target2) => {
409
+ Target2["SELF"] = "SELF";
410
+ Target2["BLANK"] = "BLANK";
411
+ Target2["PARENT"] = "PARENT";
412
+ Target2["TOP"] = "TOP";
413
+ return Target2;
414
+ })(Target || {});
415
+ var TextAlignment = /* @__PURE__ */ ((TextAlignment2) => {
416
+ TextAlignment2["AUTO"] = "AUTO";
417
+ TextAlignment2["LEFT"] = "LEFT";
418
+ TextAlignment2["RIGHT"] = "RIGHT";
419
+ TextAlignment2["CENTER"] = "CENTER";
420
+ TextAlignment2["JUSTIFY"] = "JUSTIFY";
421
+ return TextAlignment2;
422
+ })(TextAlignment || {});
423
+ var LineStyle = /* @__PURE__ */ ((LineStyle2) => {
424
+ LineStyle2["SINGLE"] = "SINGLE";
425
+ LineStyle2["DOUBLE"] = "DOUBLE";
426
+ LineStyle2["DASHED"] = "DASHED";
427
+ LineStyle2["DOTTED"] = "DOTTED";
428
+ return LineStyle2;
429
+ })(LineStyle || {});
430
+ var Width = /* @__PURE__ */ ((Width2) => {
431
+ Width2["LARGE"] = "LARGE";
432
+ Width2["MEDIUM"] = "MEDIUM";
433
+ Width2["SMALL"] = "SMALL";
434
+ return Width2;
435
+ })(Width || {});
436
+ var Alignment = /* @__PURE__ */ ((Alignment2) => {
437
+ Alignment2["CENTER"] = "CENTER";
438
+ Alignment2["LEFT"] = "LEFT";
439
+ Alignment2["RIGHT"] = "RIGHT";
440
+ return Alignment2;
441
+ })(Alignment || {});
442
+ var ViewMode = /* @__PURE__ */ ((ViewMode2) => {
443
+ ViewMode2["NONE"] = "NONE";
444
+ ViewMode2["FULL"] = "FULL";
445
+ ViewMode2["MINI"] = "MINI";
446
+ return ViewMode2;
447
+ })(ViewMode || {});
448
+ var LayoutType = /* @__PURE__ */ ((LayoutType2) => {
449
+ LayoutType2["COLLAGE"] = "COLLAGE";
450
+ LayoutType2["MASONRY"] = "MASONRY";
451
+ LayoutType2["GRID"] = "GRID";
452
+ LayoutType2["THUMBNAIL"] = "THUMBNAIL";
453
+ LayoutType2["SLIDER"] = "SLIDER";
454
+ LayoutType2["SLIDESHOW"] = "SLIDESHOW";
455
+ LayoutType2["PANORAMA"] = "PANORAMA";
456
+ LayoutType2["COLUMN"] = "COLUMN";
457
+ LayoutType2["MAGIC"] = "MAGIC";
458
+ LayoutType2["FULLSIZE"] = "FULLSIZE";
459
+ return LayoutType2;
460
+ })(LayoutType || {});
461
+ var Orientation = /* @__PURE__ */ ((Orientation2) => {
462
+ Orientation2["ROWS"] = "ROWS";
463
+ Orientation2["COLUMNS"] = "COLUMNS";
464
+ return Orientation2;
465
+ })(Orientation || {});
466
+ var Crop = /* @__PURE__ */ ((Crop2) => {
467
+ Crop2["FILL"] = "FILL";
468
+ Crop2["FIT"] = "FIT";
469
+ return Crop2;
470
+ })(Crop || {});
471
+ var ThumbnailsAlignment = /* @__PURE__ */ ((ThumbnailsAlignment2) => {
472
+ ThumbnailsAlignment2["TOP"] = "TOP";
473
+ ThumbnailsAlignment2["RIGHT"] = "RIGHT";
474
+ ThumbnailsAlignment2["BOTTOM"] = "BOTTOM";
475
+ ThumbnailsAlignment2["LEFT"] = "LEFT";
476
+ ThumbnailsAlignment2["NONE"] = "NONE";
477
+ return ThumbnailsAlignment2;
478
+ })(ThumbnailsAlignment || {});
479
+ var GIFType = /* @__PURE__ */ ((GIFType2) => {
480
+ GIFType2["NORMAL"] = "NORMAL";
481
+ GIFType2["STICKER"] = "STICKER";
482
+ return GIFType2;
483
+ })(GIFType || {});
484
+ var Source = /* @__PURE__ */ ((Source2) => {
485
+ Source2["HTML"] = "HTML";
486
+ Source2["ADSENSE"] = "ADSENSE";
487
+ return Source2;
488
+ })(Source || {});
489
+ var Position = /* @__PURE__ */ ((Position2) => {
490
+ Position2["START"] = "START";
491
+ Position2["END"] = "END";
492
+ Position2["TOP"] = "TOP";
493
+ Position2["HIDDEN"] = "HIDDEN";
494
+ return Position2;
495
+ })(Position || {});
496
+ var MapType = /* @__PURE__ */ ((MapType2) => {
497
+ MapType2["ROADMAP"] = "ROADMAP";
498
+ MapType2["SATELITE"] = "SATELITE";
499
+ MapType2["HYBRID"] = "HYBRID";
500
+ MapType2["TERRAIN"] = "TERRAIN";
501
+ return MapType2;
502
+ })(MapType || {});
503
+ var ViewRole = /* @__PURE__ */ ((ViewRole2) => {
504
+ ViewRole2["CREATOR"] = "CREATOR";
505
+ ViewRole2["VOTERS"] = "VOTERS";
506
+ ViewRole2["EVERYONE"] = "EVERYONE";
507
+ return ViewRole2;
508
+ })(ViewRole || {});
509
+ var VoteRole = /* @__PURE__ */ ((VoteRole2) => {
510
+ VoteRole2["SITE_MEMBERS"] = "SITE_MEMBERS";
511
+ VoteRole2["ALL"] = "ALL";
512
+ return VoteRole2;
513
+ })(VoteRole || {});
514
+ var PollLayoutType = /* @__PURE__ */ ((PollLayoutType2) => {
515
+ PollLayoutType2["LIST"] = "LIST";
516
+ PollLayoutType2["GRID"] = "GRID";
517
+ return PollLayoutType2;
518
+ })(PollLayoutType || {});
519
+ var PollLayoutDirection = /* @__PURE__ */ ((PollLayoutDirection2) => {
520
+ PollLayoutDirection2["LTR"] = "LTR";
521
+ PollLayoutDirection2["RTL"] = "RTL";
522
+ return PollLayoutDirection2;
523
+ })(PollLayoutDirection || {});
524
+ var BackgroundType = /* @__PURE__ */ ((BackgroundType2) => {
525
+ BackgroundType2["COLOR"] = "COLOR";
526
+ BackgroundType2["IMAGE"] = "IMAGE";
527
+ BackgroundType2["GRADIENT"] = "GRADIENT";
528
+ return BackgroundType2;
529
+ })(BackgroundType || {});
530
+ var DecorationType = /* @__PURE__ */ ((DecorationType2) => {
531
+ DecorationType2["BOLD"] = "BOLD";
532
+ DecorationType2["ITALIC"] = "ITALIC";
533
+ DecorationType2["UNDERLINE"] = "UNDERLINE";
534
+ DecorationType2["SPOILER"] = "SPOILER";
535
+ DecorationType2["ANCHOR"] = "ANCHOR";
536
+ DecorationType2["MENTION"] = "MENTION";
537
+ DecorationType2["LINK"] = "LINK";
538
+ DecorationType2["COLOR"] = "COLOR";
539
+ DecorationType2["FONT_SIZE"] = "FONT_SIZE";
540
+ DecorationType2["EXTERNAL"] = "EXTERNAL";
541
+ DecorationType2["STRIKETHROUGH"] = "STRIKETHROUGH";
542
+ DecorationType2["SUPERSCRIPT"] = "SUPERSCRIPT";
543
+ DecorationType2["SUBSCRIPT"] = "SUBSCRIPT";
544
+ return DecorationType2;
545
+ })(DecorationType || {});
546
+ var FontType = /* @__PURE__ */ ((FontType2) => {
547
+ FontType2["PX"] = "PX";
548
+ FontType2["EM"] = "EM";
549
+ return FontType2;
550
+ })(FontType || {});
551
+ var AppType = /* @__PURE__ */ ((AppType2) => {
552
+ AppType2["PRODUCT"] = "PRODUCT";
553
+ AppType2["EVENT"] = "EVENT";
554
+ AppType2["BOOKING"] = "BOOKING";
555
+ return AppType2;
556
+ })(AppType || {});
557
+ var InitialExpandedItems = /* @__PURE__ */ ((InitialExpandedItems2) => {
558
+ InitialExpandedItems2["FIRST"] = "FIRST";
559
+ InitialExpandedItems2["ALL"] = "ALL";
560
+ InitialExpandedItems2["NONE"] = "NONE";
561
+ return InitialExpandedItems2;
562
+ })(InitialExpandedItems || {});
563
+ var Direction = /* @__PURE__ */ ((Direction2) => {
564
+ Direction2["LTR"] = "LTR";
565
+ Direction2["RTL"] = "RTL";
566
+ return Direction2;
567
+ })(Direction || {});
568
+ var VerticalAlignment = /* @__PURE__ */ ((VerticalAlignment2) => {
569
+ VerticalAlignment2["TOP"] = "TOP";
570
+ VerticalAlignment2["MIDDLE"] = "MIDDLE";
571
+ VerticalAlignment2["BOTTOM"] = "BOTTOM";
572
+ return VerticalAlignment2;
573
+ })(VerticalAlignment || {});
574
+ var NullValue = /* @__PURE__ */ ((NullValue2) => {
575
+ NullValue2["NULL_VALUE"] = "NULL_VALUE";
576
+ return NullValue2;
577
+ })(NullValue || {});
578
+ var SupportedLanguage = /* @__PURE__ */ ((SupportedLanguage2) => {
579
+ SupportedLanguage2["UNDEFINED_SUPPORTED_LANGUAGE"] = "UNDEFINED_SUPPORTED_LANGUAGE";
580
+ SupportedLanguage2["AF"] = "AF";
581
+ SupportedLanguage2["SQ"] = "SQ";
582
+ SupportedLanguage2["AM"] = "AM";
583
+ SupportedLanguage2["AR"] = "AR";
584
+ SupportedLanguage2["HY"] = "HY";
585
+ SupportedLanguage2["AS"] = "AS";
586
+ SupportedLanguage2["AY"] = "AY";
587
+ SupportedLanguage2["AZ"] = "AZ";
588
+ SupportedLanguage2["BM"] = "BM";
589
+ SupportedLanguage2["EU"] = "EU";
590
+ SupportedLanguage2["BE"] = "BE";
591
+ SupportedLanguage2["BN"] = "BN";
592
+ SupportedLanguage2["BHO"] = "BHO";
593
+ SupportedLanguage2["BS"] = "BS";
594
+ SupportedLanguage2["BG"] = "BG";
595
+ SupportedLanguage2["CA"] = "CA";
596
+ SupportedLanguage2["CEB"] = "CEB";
597
+ SupportedLanguage2["ZH_CN"] = "ZH_CN";
598
+ SupportedLanguage2["ZH_TW"] = "ZH_TW";
599
+ SupportedLanguage2["ZH"] = "ZH";
600
+ SupportedLanguage2["CO"] = "CO";
601
+ SupportedLanguage2["HR"] = "HR";
602
+ SupportedLanguage2["CS"] = "CS";
603
+ SupportedLanguage2["DA"] = "DA";
604
+ SupportedLanguage2["DV"] = "DV";
605
+ SupportedLanguage2["DOI"] = "DOI";
606
+ SupportedLanguage2["NL"] = "NL";
607
+ SupportedLanguage2["EN"] = "EN";
608
+ SupportedLanguage2["EO"] = "EO";
609
+ SupportedLanguage2["ET"] = "ET";
610
+ SupportedLanguage2["EE"] = "EE";
611
+ SupportedLanguage2["FIL"] = "FIL";
612
+ SupportedLanguage2["FI"] = "FI";
613
+ SupportedLanguage2["FR"] = "FR";
614
+ SupportedLanguage2["FY"] = "FY";
615
+ SupportedLanguage2["GL"] = "GL";
616
+ SupportedLanguage2["KA"] = "KA";
617
+ SupportedLanguage2["DE"] = "DE";
618
+ SupportedLanguage2["EL"] = "EL";
619
+ SupportedLanguage2["GN"] = "GN";
620
+ SupportedLanguage2["GU"] = "GU";
621
+ SupportedLanguage2["HT"] = "HT";
622
+ SupportedLanguage2["HA"] = "HA";
623
+ SupportedLanguage2["HAW"] = "HAW";
624
+ SupportedLanguage2["HE"] = "HE";
625
+ SupportedLanguage2["HI"] = "HI";
626
+ SupportedLanguage2["HMN"] = "HMN";
627
+ SupportedLanguage2["HU"] = "HU";
628
+ SupportedLanguage2["IS"] = "IS";
629
+ SupportedLanguage2["IG"] = "IG";
630
+ SupportedLanguage2["ILO"] = "ILO";
631
+ SupportedLanguage2["ID"] = "ID";
632
+ SupportedLanguage2["GA"] = "GA";
633
+ SupportedLanguage2["IT"] = "IT";
634
+ SupportedLanguage2["JA"] = "JA";
635
+ SupportedLanguage2["JW"] = "JW";
636
+ SupportedLanguage2["KN"] = "KN";
637
+ SupportedLanguage2["KK"] = "KK";
638
+ SupportedLanguage2["KM"] = "KM";
639
+ SupportedLanguage2["RW"] = "RW";
640
+ SupportedLanguage2["GOM"] = "GOM";
641
+ SupportedLanguage2["KO"] = "KO";
642
+ SupportedLanguage2["KRI"] = "KRI";
643
+ SupportedLanguage2["KU"] = "KU";
644
+ SupportedLanguage2["CKB"] = "CKB";
645
+ SupportedLanguage2["KY"] = "KY";
646
+ SupportedLanguage2["LO"] = "LO";
647
+ SupportedLanguage2["LA"] = "LA";
648
+ SupportedLanguage2["LV"] = "LV";
649
+ SupportedLanguage2["LN"] = "LN";
650
+ SupportedLanguage2["LT"] = "LT";
651
+ SupportedLanguage2["LG"] = "LG";
652
+ SupportedLanguage2["LB"] = "LB";
653
+ SupportedLanguage2["MK"] = "MK";
654
+ SupportedLanguage2["MAI"] = "MAI";
655
+ SupportedLanguage2["MG"] = "MG";
656
+ SupportedLanguage2["MS"] = "MS";
657
+ SupportedLanguage2["ML"] = "ML";
658
+ SupportedLanguage2["MT"] = "MT";
659
+ SupportedLanguage2["MI"] = "MI";
660
+ SupportedLanguage2["MR"] = "MR";
661
+ SupportedLanguage2["MNI_MTEI"] = "MNI_MTEI";
662
+ SupportedLanguage2["LUS"] = "LUS";
663
+ SupportedLanguage2["MN"] = "MN";
664
+ SupportedLanguage2["MY"] = "MY";
665
+ SupportedLanguage2["NE"] = "NE";
666
+ SupportedLanguage2["NO"] = "NO";
667
+ SupportedLanguage2["NY"] = "NY";
668
+ SupportedLanguage2["OR"] = "OR";
669
+ SupportedLanguage2["OM"] = "OM";
670
+ SupportedLanguage2["PS"] = "PS";
671
+ SupportedLanguage2["FA"] = "FA";
672
+ SupportedLanguage2["PL"] = "PL";
673
+ SupportedLanguage2["PT"] = "PT";
674
+ SupportedLanguage2["PA"] = "PA";
675
+ SupportedLanguage2["QU"] = "QU";
676
+ SupportedLanguage2["RO"] = "RO";
677
+ SupportedLanguage2["RU"] = "RU";
678
+ SupportedLanguage2["SM"] = "SM";
679
+ SupportedLanguage2["SA"] = "SA";
680
+ SupportedLanguage2["GD"] = "GD";
681
+ SupportedLanguage2["NSO"] = "NSO";
682
+ SupportedLanguage2["SR"] = "SR";
683
+ SupportedLanguage2["ST"] = "ST";
684
+ SupportedLanguage2["SN"] = "SN";
685
+ SupportedLanguage2["SD"] = "SD";
686
+ SupportedLanguage2["SI"] = "SI";
687
+ SupportedLanguage2["SK"] = "SK";
688
+ SupportedLanguage2["SL"] = "SL";
689
+ SupportedLanguage2["SO"] = "SO";
690
+ SupportedLanguage2["ES"] = "ES";
691
+ SupportedLanguage2["SU"] = "SU";
692
+ SupportedLanguage2["SW"] = "SW";
693
+ SupportedLanguage2["SV"] = "SV";
694
+ SupportedLanguage2["TL"] = "TL";
695
+ SupportedLanguage2["TG"] = "TG";
696
+ SupportedLanguage2["TA"] = "TA";
697
+ SupportedLanguage2["TT"] = "TT";
698
+ SupportedLanguage2["TE"] = "TE";
699
+ SupportedLanguage2["TH"] = "TH";
700
+ SupportedLanguage2["TI"] = "TI";
701
+ SupportedLanguage2["TS"] = "TS";
702
+ SupportedLanguage2["TR"] = "TR";
703
+ SupportedLanguage2["TK"] = "TK";
704
+ SupportedLanguage2["AK"] = "AK";
705
+ SupportedLanguage2["UK"] = "UK";
706
+ SupportedLanguage2["UR"] = "UR";
707
+ SupportedLanguage2["UG"] = "UG";
708
+ SupportedLanguage2["UZ"] = "UZ";
709
+ SupportedLanguage2["VI"] = "VI";
710
+ SupportedLanguage2["CY"] = "CY";
711
+ SupportedLanguage2["XH"] = "XH";
712
+ SupportedLanguage2["YI"] = "YI";
713
+ SupportedLanguage2["YO"] = "YO";
714
+ SupportedLanguage2["ZU"] = "ZU";
715
+ return SupportedLanguage2;
716
+ })(SupportedLanguage || {});
717
+ async function machineTranslate2(sourceLanguage, options) {
718
+ const { httpClient, sideEffects } = arguments[2];
719
+ const payload = renameKeysFromSDKRequestToRESTRequest(
720
+ {
721
+ sourceLanguage,
722
+ targetLanguage: options?.targetLanguage,
723
+ contentToTranslate: options?.contentToTranslate
724
+ },
725
+ ["contentToTranslate.richContent"]
726
+ );
727
+ const reqOpts = machineTranslate(
728
+ payload
729
+ );
730
+ sideEffects?.onSiteCall?.();
731
+ try {
732
+ const result = await httpClient.request(reqOpts);
733
+ sideEffects?.onSuccess?.(result);
734
+ return renameKeysFromRESTResponseToSDKResponse(result.data, [
735
+ "translatedContent.richContent"
736
+ ]);
737
+ } catch (err) {
738
+ const transformedError = sdkTransformError(
739
+ err,
740
+ {
741
+ spreadPathsToArguments: {},
742
+ explicitPathsToArguments: {
743
+ sourceLanguage: "$[0]",
744
+ targetLanguage: "$[1].targetLanguage",
745
+ contentToTranslate: "$[1].contentToTranslate"
746
+ },
747
+ singleArgumentUnchanged: false
748
+ },
749
+ ["sourceLanguage", "options"]
750
+ );
751
+ sideEffects?.onError?.(err);
752
+ throw transformedError;
753
+ }
754
+ }
755
+ async function bulkMachineTranslate2(sourceLanguage, options) {
756
+ const { httpClient, sideEffects } = arguments[2];
757
+ const payload = renameKeysFromSDKRequestToRESTRequest(
758
+ {
759
+ sourceLanguage,
760
+ targetLanguage: options?.targetLanguage,
761
+ contentToTranslate: options?.contentToTranslate
762
+ },
763
+ ["contentToTranslate.richContent"]
764
+ );
765
+ const reqOpts = bulkMachineTranslate(
766
+ payload
767
+ );
768
+ sideEffects?.onSiteCall?.();
769
+ try {
770
+ const result = await httpClient.request(reqOpts);
771
+ sideEffects?.onSuccess?.(result);
772
+ return renameKeysFromRESTResponseToSDKResponse(result.data, [
773
+ "results.item.richContent"
774
+ ]);
775
+ } catch (err) {
776
+ const transformedError = sdkTransformError(
777
+ err,
778
+ {
779
+ spreadPathsToArguments: {},
780
+ explicitPathsToArguments: {
781
+ sourceLanguage: "$[0]",
782
+ targetLanguage: "$[1].targetLanguage",
783
+ contentToTranslate: "$[1].contentToTranslate"
784
+ },
785
+ singleArgumentUnchanged: false
786
+ },
787
+ ["sourceLanguage", "options"]
788
+ );
789
+ sideEffects?.onError?.(err);
790
+ throw transformedError;
791
+ }
792
+ }
793
+ export {
794
+ Alignment,
795
+ AppType,
796
+ BackgroundType,
797
+ Crop,
798
+ DecorationType,
799
+ Direction,
800
+ FontType,
801
+ Format,
802
+ GIFType,
803
+ InitialExpandedItems,
804
+ LayoutType,
805
+ LineStyle,
806
+ MapType,
807
+ NodeType,
808
+ NullValue,
809
+ Orientation,
810
+ PluginContainerDataAlignment,
811
+ PollLayoutDirection,
812
+ PollLayoutType,
813
+ Position,
814
+ Source,
815
+ SupportedLanguage,
816
+ Target,
817
+ TextAlignment,
818
+ ThumbnailsAlignment,
819
+ Type,
820
+ VerticalAlignment,
821
+ ViewMode,
822
+ ViewRole,
823
+ VoteRole,
824
+ Width,
825
+ WidthType,
826
+ bulkMachineTranslate2 as bulkMachineTranslate,
827
+ machineTranslate2 as machineTranslate
828
+ };
829
+ //# sourceMappingURL=index.typings.mjs.map