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