@wix/auto_sdk_blog_draft-posts 1.0.106 → 1.0.107

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.
@@ -109,7 +109,9 @@ __export(index_exports, {
109
109
  queryDraftPosts: () => queryDraftPosts4,
110
110
  removeFromTrashBin: () => removeFromTrashBin4,
111
111
  restoreFromTrashBin: () => restoreFromTrashBin4,
112
+ translateDraft: () => translateDraft4,
112
113
  updateDraftPost: () => updateDraftPost4,
114
+ updateDraftPostLanguage: () => updateDraftPostLanguage4,
113
115
  utils: () => utils
114
116
  });
115
117
  module.exports = __toCommonJS(index_exports);
@@ -138,6 +140,165 @@ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
138
140
  var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
139
141
  var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
140
142
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
143
+ function resolveComWixpressNpmCommunitiesPlatformizedBlogV3BlogMultilingualServiceUrl(opts) {
144
+ const domainToMappings = {
145
+ "api._api_base_domain_": [
146
+ {
147
+ srcPath: "/communities-blog-node-api",
148
+ destPath: ""
149
+ }
150
+ ],
151
+ "www._base_domain_": [
152
+ {
153
+ srcPath: "/_api/communities-blog-node-api",
154
+ destPath: ""
155
+ },
156
+ {
157
+ srcPath: "/_api/communities-blog-node-api/v2/stats",
158
+ destPath: "/v2/stats"
159
+ }
160
+ ],
161
+ "apps._base_domain_": [
162
+ {
163
+ srcPath: "/_api/communities-blog-node-api",
164
+ destPath: ""
165
+ },
166
+ {
167
+ srcPath: "/_api/communities-blog-node-api/v2/stats",
168
+ destPath: "/v2/stats"
169
+ }
170
+ ],
171
+ _: [
172
+ {
173
+ srcPath: "/_api/communities-blog-node-api",
174
+ destPath: ""
175
+ },
176
+ {
177
+ srcPath: "/_api/communities-blog-node-api/_api/blogs/this",
178
+ destPath: "/_api/blogs/this"
179
+ },
180
+ {
181
+ srcPath: "/_api/communities-blog-node-api/_api/categories",
182
+ destPath: "/_api/categories"
183
+ },
184
+ {
185
+ srcPath: "/_api/communities-blog-node-api/_api/site-properties",
186
+ destPath: "/_api/site-properties"
187
+ },
188
+ {
189
+ srcPath: "/_api/communities-blog-node-api/_api/posts/content",
190
+ destPath: "/_api/posts/content"
191
+ },
192
+ {
193
+ srcPath: "/_api/communities-blog-node-api/v2/stats",
194
+ destPath: "/v2/stats"
195
+ }
196
+ ],
197
+ "editor._base_domain_": [
198
+ {
199
+ srcPath: "/_api/communities-blog-node-api",
200
+ destPath: ""
201
+ }
202
+ ],
203
+ "blocks._base_domain_": [
204
+ {
205
+ srcPath: "/_api/communities-blog-node-api",
206
+ destPath: ""
207
+ }
208
+ ],
209
+ "create.editorx": [
210
+ {
211
+ srcPath: "/_api/communities-blog-node-api",
212
+ destPath: ""
213
+ }
214
+ ],
215
+ "*.dev.wix-code.com": [
216
+ {
217
+ srcPath: "/_api/communities-blog-node-api",
218
+ destPath: ""
219
+ }
220
+ ],
221
+ "*.pub.wix-code.com": [
222
+ {
223
+ srcPath: "/_api/communities-blog-node-api",
224
+ destPath: ""
225
+ }
226
+ ],
227
+ "bo._base_domain_": [
228
+ {
229
+ srcPath: "/_api/communities-blog-node-api",
230
+ destPath: ""
231
+ },
232
+ {
233
+ srcPath: "/_api/communities-blog-node-api",
234
+ destPath: ""
235
+ }
236
+ ],
237
+ "wixbo.ai": [
238
+ {
239
+ srcPath: "/_api/communities-blog-node-api",
240
+ destPath: ""
241
+ },
242
+ {
243
+ srcPath: "/_api/communities-blog-node-api",
244
+ destPath: ""
245
+ }
246
+ ],
247
+ "wix-bo.com": [
248
+ {
249
+ srcPath: "/_api/communities-blog-node-api",
250
+ destPath: ""
251
+ },
252
+ {
253
+ srcPath: "/_api/communities-blog-node-api",
254
+ destPath: ""
255
+ }
256
+ ],
257
+ "manage._base_domain_": [
258
+ {
259
+ srcPath: "/_api/communities-blog-node-api",
260
+ destPath: ""
261
+ }
262
+ ],
263
+ "social-blog._base_domain_": [
264
+ {
265
+ srcPath: "/_api/communities-blog-node-api",
266
+ destPath: ""
267
+ }
268
+ ],
269
+ "editor.wixapps.net": [
270
+ {
271
+ srcPath: "/_api/communities-blog-node-api",
272
+ destPath: ""
273
+ }
274
+ ],
275
+ "dev._base_domain_": [
276
+ {
277
+ srcPath: "/_api/communities-blog-node-api",
278
+ destPath: ""
279
+ }
280
+ ],
281
+ "www.wixapis.com": [
282
+ {
283
+ srcPath: "/blog/v2",
284
+ destPath: "/v2"
285
+ },
286
+ {
287
+ srcPath: "/blog/v3",
288
+ destPath: "/v3"
289
+ },
290
+ {
291
+ srcPath: "/v2/stats",
292
+ destPath: "/v2/stats"
293
+ },
294
+ {
295
+ srcPath: "/blog/v2/stats",
296
+ destPath: "/v2/stats"
297
+ }
298
+ ]
299
+ };
300
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
301
+ }
141
302
  function resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(opts) {
142
303
  const domainToMappings = {
143
304
  _api_base_domain_: [
@@ -3219,147 +3380,529 @@ function publishDraftPost(payload) {
3219
3380
  }
3220
3381
  return __publishDraftPost;
3221
3382
  }
3222
-
3223
- // src/blog-v3-draft-draft-posts.universal.ts
3224
- var import_image = require("@wix/sdk-runtime/transformations/image");
3225
- var import_image2 = require("@wix/sdk-runtime/transformations/image");
3226
- var import_video_v2 = require("@wix/sdk-runtime/transformations/video-v2");
3227
- var import_video_v22 = require("@wix/sdk-runtime/transformations/video-v2");
3228
- var import_page_url = require("@wix/sdk-runtime/transformations/page-url");
3229
- var import_page_url2 = require("@wix/sdk-runtime/transformations/page-url");
3230
- var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
3231
- var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
3232
- var Origin = /* @__PURE__ */ ((Origin2) => {
3233
- Origin2["UNKNOWN"] = "UNKNOWN";
3234
- Origin2["ADMIN"] = "ADMIN";
3235
- Origin2["ADD_CATEGORIES"] = "ADD_CATEGORIES";
3236
- Origin2["AUTO_SAVE"] = "AUTO_SAVE";
3237
- Origin2["COPY_TEMPLATE"] = "COPY_TEMPLATE";
3238
- Origin2["IMPORT"] = "IMPORT";
3239
- Origin2["IMPORT_BULK"] = "IMPORT_BULK";
3240
- Origin2["IMPORT_HTML"] = "IMPORT_HTML";
3241
- Origin2["IMPORT_PATCH"] = "IMPORT_PATCH";
3242
- Origin2["LANGUAGE_CHANGE"] = "LANGUAGE_CHANGE";
3243
- Origin2["MANUAL_SAVE"] = "MANUAL_SAVE";
3244
- Origin2["MIGRATION"] = "MIGRATION";
3245
- Origin2["MODERATION"] = "MODERATION";
3246
- Origin2["MOVE_TO_TRASH"] = "MOVE_TO_TRASH";
3247
- Origin2["PRICING_PLANS_CHANGE"] = "PRICING_PLANS_CHANGE";
3248
- Origin2["PROVISION"] = "PROVISION";
3249
- Origin2["PUBLISH"] = "PUBLISH";
3250
- Origin2["REASSIGN_OWNER"] = "REASSIGN_OWNER";
3251
- Origin2["REBLOG"] = "REBLOG";
3252
- Origin2["RESTORE"] = "RESTORE";
3253
- Origin2["REVERT_TO_DRAFT"] = "REVERT_TO_DRAFT";
3254
- Origin2["TRANSLATION"] = "TRANSLATION";
3255
- Origin2["UNPUBLISH"] = "UNPUBLISH";
3256
- Origin2["UNSCHEDULE"] = "UNSCHEDULE";
3257
- Origin2["NEW_EDIT_SESSION"] = "NEW_EDIT_SESSION";
3258
- Origin2["SCHEDULING_SERVICE_SCHEDULE"] = "SCHEDULING_SERVICE_SCHEDULE";
3259
- Origin2["SCHEDULING_SERVICE_UNSCHEDULE"] = "SCHEDULING_SERVICE_UNSCHEDULE";
3260
- Origin2["SCHEDULING_SERVICE_PUBLISH"] = "SCHEDULING_SERVICE_PUBLISH";
3261
- Origin2["SCHEDULE"] = "SCHEDULE";
3262
- Origin2["REMOVE_FROM_MODERATION"] = "REMOVE_FROM_MODERATION";
3263
- Origin2["REJECT_FROM_MODERATION"] = "REJECT_FROM_MODERATION";
3264
- Origin2["APPROVE_IN_MODERATION"] = "APPROVE_IN_MODERATION";
3265
- Origin2["DELETE_TAG"] = "DELETE_TAG";
3266
- Origin2["PIN"] = "PIN";
3267
- Origin2["UNPIN"] = "UNPIN";
3268
- Origin2["AI_AUTO_SAVE"] = "AI_AUTO_SAVE";
3269
- return Origin2;
3270
- })(Origin || {});
3271
- var NodeType = /* @__PURE__ */ ((NodeType2) => {
3272
- NodeType2["PARAGRAPH"] = "PARAGRAPH";
3273
- NodeType2["TEXT"] = "TEXT";
3274
- NodeType2["HEADING"] = "HEADING";
3275
- NodeType2["BULLETED_LIST"] = "BULLETED_LIST";
3276
- NodeType2["ORDERED_LIST"] = "ORDERED_LIST";
3277
- NodeType2["LIST_ITEM"] = "LIST_ITEM";
3278
- NodeType2["BLOCKQUOTE"] = "BLOCKQUOTE";
3279
- NodeType2["CODE_BLOCK"] = "CODE_BLOCK";
3280
- NodeType2["VIDEO"] = "VIDEO";
3281
- NodeType2["DIVIDER"] = "DIVIDER";
3282
- NodeType2["FILE"] = "FILE";
3283
- NodeType2["GALLERY"] = "GALLERY";
3284
- NodeType2["GIF"] = "GIF";
3285
- NodeType2["HTML"] = "HTML";
3286
- NodeType2["IMAGE"] = "IMAGE";
3287
- NodeType2["LINK_PREVIEW"] = "LINK_PREVIEW";
3288
- NodeType2["MAP"] = "MAP";
3289
- NodeType2["POLL"] = "POLL";
3290
- NodeType2["APP_EMBED"] = "APP_EMBED";
3291
- NodeType2["BUTTON"] = "BUTTON";
3292
- NodeType2["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
3293
- NodeType2["TABLE"] = "TABLE";
3294
- NodeType2["EMBED"] = "EMBED";
3295
- NodeType2["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
3296
- NodeType2["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
3297
- NodeType2["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
3298
- NodeType2["TABLE_CELL"] = "TABLE_CELL";
3299
- NodeType2["TABLE_ROW"] = "TABLE_ROW";
3300
- NodeType2["EXTERNAL"] = "EXTERNAL";
3301
- NodeType2["AUDIO"] = "AUDIO";
3302
- NodeType2["CAPTION"] = "CAPTION";
3303
- NodeType2["LAYOUT"] = "LAYOUT";
3304
- NodeType2["LAYOUT_CELL"] = "LAYOUT_CELL";
3305
- NodeType2["SHAPE"] = "SHAPE";
3306
- NodeType2["CARD"] = "CARD";
3307
- NodeType2["TOC"] = "TOC";
3308
- NodeType2["SMART_BLOCK"] = "SMART_BLOCK";
3309
- NodeType2["SMART_BLOCK_CELL"] = "SMART_BLOCK_CELL";
3310
- NodeType2["CHECKBOX_LIST"] = "CHECKBOX_LIST";
3311
- return NodeType2;
3312
- })(NodeType || {});
3313
- var BackgroundType = /* @__PURE__ */ ((BackgroundType2) => {
3314
- BackgroundType2["COLOR"] = "COLOR";
3315
- BackgroundType2["GRADIENT"] = "GRADIENT";
3316
- return BackgroundType2;
3317
- })(BackgroundType || {});
3318
- var GradientType = /* @__PURE__ */ ((GradientType2) => {
3319
- GradientType2["LINEAR"] = "LINEAR";
3320
- GradientType2["RADIAL"] = "RADIAL";
3321
- return GradientType2;
3322
- })(GradientType || {});
3323
- var WidthType = /* @__PURE__ */ ((WidthType2) => {
3324
- WidthType2["CONTENT"] = "CONTENT";
3325
- WidthType2["SMALL"] = "SMALL";
3326
- WidthType2["ORIGINAL"] = "ORIGINAL";
3327
- WidthType2["FULL_WIDTH"] = "FULL_WIDTH";
3328
- return WidthType2;
3329
- })(WidthType || {});
3330
- var PluginContainerDataAlignment = /* @__PURE__ */ ((PluginContainerDataAlignment2) => {
3331
- PluginContainerDataAlignment2["CENTER"] = "CENTER";
3332
- PluginContainerDataAlignment2["LEFT"] = "LEFT";
3333
- PluginContainerDataAlignment2["RIGHT"] = "RIGHT";
3334
- return PluginContainerDataAlignment2;
3335
- })(PluginContainerDataAlignment || {});
3336
- var ButtonDataType = /* @__PURE__ */ ((ButtonDataType2) => {
3337
- ButtonDataType2["LINK"] = "LINK";
3338
- ButtonDataType2["ACTION"] = "ACTION";
3339
- return ButtonDataType2;
3340
- })(ButtonDataType || {});
3341
- var Target = /* @__PURE__ */ ((Target2) => {
3342
- Target2["SELF"] = "SELF";
3343
- Target2["BLANK"] = "BLANK";
3344
- Target2["PARENT"] = "PARENT";
3345
- Target2["TOP"] = "TOP";
3346
- return Target2;
3347
- })(Target || {});
3348
- var AnimationType = /* @__PURE__ */ ((AnimationType2) => {
3349
- AnimationType2["VIEW"] = "VIEW";
3350
- AnimationType2["POINTER"] = "POINTER";
3351
- return AnimationType2;
3352
- })(AnimationType || {});
3353
- var EntranceEffectType = /* @__PURE__ */ ((EntranceEffectType2) => {
3354
- EntranceEffectType2["FADE"] = "FADE";
3355
- EntranceEffectType2["ARC"] = "ARC";
3356
- EntranceEffectType2["BLUR"] = "BLUR";
3357
- EntranceEffectType2["BOUNCE"] = "BOUNCE";
3358
- EntranceEffectType2["DROP"] = "DROP";
3359
- EntranceEffectType2["EXPAND"] = "EXPAND";
3360
- EntranceEffectType2["FLIP"] = "FLIP";
3361
- EntranceEffectType2["FLOAT"] = "FLOAT";
3362
- EntranceEffectType2["FOLD"] = "FOLD";
3383
+ function translateDraft(payload) {
3384
+ function __translateDraft({ host }) {
3385
+ const metadata = {
3386
+ entityFqdn: "wix.blog.v3.draft",
3387
+ method: "POST",
3388
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.BlogMultilingualService.TranslateDraft",
3389
+ packageName: PACKAGE_NAME,
3390
+ migrationOptions: {
3391
+ optInTransformResponse: true
3392
+ },
3393
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3BlogMultilingualServiceUrl(
3394
+ { protoPath: "/v3/multilingual/draft/{postId}", data: payload, host }
3395
+ ),
3396
+ data: payload,
3397
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
3398
+ {
3399
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
3400
+ paths: [
3401
+ { path: "draftPost.editedDate" },
3402
+ { path: "draftPost.scheduledPublishDate" },
3403
+ { path: "draftPost.firstPublishedDate" },
3404
+ { path: "draftPost.createdDate" },
3405
+ { path: "draftPost.heroImage.urlExpirationDate" },
3406
+ { path: "draftPost.richContent.metadata.createdTimestamp" },
3407
+ { path: "draftPost.richContent.metadata.updatedTimestamp" },
3408
+ { path: "draftPost.moderationDetails.submittedDate" },
3409
+ { path: "draftPost.moderationDetails.moderationDate" },
3410
+ { path: "draftPost.media.wixMedia.image.urlExpirationDate" },
3411
+ { path: "draftPost.media.wixMedia.videoV2.urlExpirationDate" },
3412
+ {
3413
+ path: "draftPost.media.wixMedia.videoV2.resolutions.urlExpirationDate"
3414
+ },
3415
+ {
3416
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
3417
+ },
3418
+ {
3419
+ path: "draftPost.media.wixMedia.videoV2.posters.urlExpirationDate"
3420
+ }
3421
+ ]
3422
+ },
3423
+ {
3424
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
3425
+ paths: [
3426
+ { path: "draftPost.heroImage.focalPoint.x" },
3427
+ { path: "draftPost.heroImage.focalPoint.y" },
3428
+ { path: "draftPost.media.wixMedia.image.focalPoint.x" },
3429
+ { path: "draftPost.media.wixMedia.image.focalPoint.y" },
3430
+ {
3431
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
3432
+ },
3433
+ {
3434
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
3435
+ },
3436
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.x" },
3437
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.y" },
3438
+ {
3439
+ path: "draftPost.richContent.nodes.buttonData.styles.background.gradient.centerX"
3440
+ },
3441
+ {
3442
+ path: "draftPost.richContent.nodes.buttonData.styles.background.gradient.centerY"
3443
+ },
3444
+ {
3445
+ path: "draftPost.richContent.nodes.buttonData.styles.background.gradient.stops.position"
3446
+ },
3447
+ {
3448
+ path: "draftPost.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX"
3449
+ },
3450
+ {
3451
+ path: "draftPost.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY"
3452
+ },
3453
+ {
3454
+ path: "draftPost.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position"
3455
+ },
3456
+ {
3457
+ path: "draftPost.richContent.nodes.galleryData.items.image.media.duration"
3458
+ },
3459
+ {
3460
+ path: "draftPost.richContent.nodes.galleryData.items.video.media.duration"
3461
+ },
3462
+ {
3463
+ path: "draftPost.richContent.nodes.galleryData.items.video.thumbnail.duration"
3464
+ },
3465
+ {
3466
+ path: "draftPost.richContent.nodes.galleryData.options.item.ratio"
3467
+ },
3468
+ { path: "draftPost.richContent.nodes.imageData.image.duration" },
3469
+ { path: "draftPost.richContent.nodes.imageData.crop.x" },
3470
+ { path: "draftPost.richContent.nodes.imageData.crop.y" },
3471
+ { path: "draftPost.richContent.nodes.imageData.crop.width" },
3472
+ { path: "draftPost.richContent.nodes.imageData.crop.height" },
3473
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lat" },
3474
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lng" },
3475
+ {
3476
+ path: "draftPost.richContent.nodes.pollData.poll.image.duration"
3477
+ },
3478
+ {
3479
+ path: "draftPost.richContent.nodes.pollData.poll.options.image.duration"
3480
+ },
3481
+ {
3482
+ path: "draftPost.richContent.nodes.pollData.design.poll.background.image.duration"
3483
+ },
3484
+ {
3485
+ path: "draftPost.richContent.nodes.appEmbedData.image.duration"
3486
+ },
3487
+ { path: "draftPost.richContent.nodes.videoData.video.duration" },
3488
+ {
3489
+ path: "draftPost.richContent.nodes.videoData.thumbnail.duration"
3490
+ },
3491
+ { path: "draftPost.richContent.nodes.audioData.audio.duration" },
3492
+ {
3493
+ path: "draftPost.richContent.nodes.audioData.coverImage.duration"
3494
+ },
3495
+ {
3496
+ path: "draftPost.richContent.nodes.layoutData.backgroundImage.media.duration"
3497
+ },
3498
+ {
3499
+ path: "draftPost.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX"
3500
+ },
3501
+ {
3502
+ path: "draftPost.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY"
3503
+ },
3504
+ {
3505
+ path: "draftPost.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position"
3506
+ },
3507
+ {
3508
+ path: "draftPost.richContent.nodes.layoutData.backdropImage.media.duration"
3509
+ },
3510
+ {
3511
+ path: "draftPost.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX"
3512
+ },
3513
+ {
3514
+ path: "draftPost.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY"
3515
+ },
3516
+ {
3517
+ path: "draftPost.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position"
3518
+ },
3519
+ {
3520
+ path: "draftPost.richContent.nodes.layoutData.background.gradient.centerX"
3521
+ },
3522
+ {
3523
+ path: "draftPost.richContent.nodes.layoutData.background.gradient.centerY"
3524
+ },
3525
+ {
3526
+ path: "draftPost.richContent.nodes.layoutData.background.gradient.stops.position"
3527
+ },
3528
+ {
3529
+ path: "draftPost.richContent.nodes.layoutData.backdrop.gradient.centerX"
3530
+ },
3531
+ {
3532
+ path: "draftPost.richContent.nodes.layoutData.backdrop.gradient.centerY"
3533
+ },
3534
+ {
3535
+ path: "draftPost.richContent.nodes.layoutData.backdrop.gradient.stops.position"
3536
+ },
3537
+ { path: "draftPost.richContent.nodes.shapeData.shape.duration" },
3538
+ {
3539
+ path: "draftPost.richContent.nodes.cardData.background.gradient.centerX"
3540
+ },
3541
+ {
3542
+ path: "draftPost.richContent.nodes.cardData.background.gradient.centerY"
3543
+ },
3544
+ {
3545
+ path: "draftPost.richContent.nodes.cardData.background.gradient.stops.position"
3546
+ },
3547
+ {
3548
+ path: "draftPost.richContent.nodes.cardData.backgroundImage.media.duration"
3549
+ },
3550
+ {
3551
+ path: "draftPost.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX"
3552
+ },
3553
+ {
3554
+ path: "draftPost.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY"
3555
+ },
3556
+ {
3557
+ path: "draftPost.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position"
3558
+ },
3559
+ { path: "draftPost.richContent.nodes.tocData.fontSize" },
3560
+ { path: "draftPost.richContent.nodes.tocData.itemSpacing" },
3561
+ {
3562
+ path: "draftPost.richContent.nodes.smartBlockCellData.shape.duration"
3563
+ }
3564
+ ]
3565
+ }
3566
+ ])
3567
+ };
3568
+ return metadata;
3569
+ }
3570
+ return __translateDraft;
3571
+ }
3572
+ function updateDraftPostLanguage(payload) {
3573
+ function __updateDraftPostLanguage({ host }) {
3574
+ const metadata = {
3575
+ entityFqdn: "wix.blog.v3.draft",
3576
+ method: "POST",
3577
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.BlogMultilingualService.UpdateDraftPostLanguage",
3578
+ packageName: PACKAGE_NAME,
3579
+ migrationOptions: {
3580
+ optInTransformResponse: true
3581
+ },
3582
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3BlogMultilingualServiceUrl(
3583
+ {
3584
+ protoPath: "/v3/multilingual/update-draft-post-language/{postId}",
3585
+ data: payload,
3586
+ host
3587
+ }
3588
+ ),
3589
+ data: payload,
3590
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
3591
+ {
3592
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
3593
+ paths: [
3594
+ { path: "draftPost.editedDate" },
3595
+ { path: "draftPost.scheduledPublishDate" },
3596
+ { path: "draftPost.firstPublishedDate" },
3597
+ { path: "draftPost.createdDate" },
3598
+ { path: "draftPost.heroImage.urlExpirationDate" },
3599
+ { path: "draftPost.richContent.metadata.createdTimestamp" },
3600
+ { path: "draftPost.richContent.metadata.updatedTimestamp" },
3601
+ { path: "draftPost.moderationDetails.submittedDate" },
3602
+ { path: "draftPost.moderationDetails.moderationDate" },
3603
+ { path: "draftPost.media.wixMedia.image.urlExpirationDate" },
3604
+ { path: "draftPost.media.wixMedia.videoV2.urlExpirationDate" },
3605
+ {
3606
+ path: "draftPost.media.wixMedia.videoV2.resolutions.urlExpirationDate"
3607
+ },
3608
+ {
3609
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
3610
+ },
3611
+ {
3612
+ path: "draftPost.media.wixMedia.videoV2.posters.urlExpirationDate"
3613
+ }
3614
+ ]
3615
+ },
3616
+ {
3617
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
3618
+ paths: [
3619
+ { path: "draftPost.heroImage.focalPoint.x" },
3620
+ { path: "draftPost.heroImage.focalPoint.y" },
3621
+ { path: "draftPost.media.wixMedia.image.focalPoint.x" },
3622
+ { path: "draftPost.media.wixMedia.image.focalPoint.y" },
3623
+ {
3624
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
3625
+ },
3626
+ {
3627
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
3628
+ },
3629
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.x" },
3630
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.y" },
3631
+ {
3632
+ path: "draftPost.richContent.nodes.buttonData.styles.background.gradient.centerX"
3633
+ },
3634
+ {
3635
+ path: "draftPost.richContent.nodes.buttonData.styles.background.gradient.centerY"
3636
+ },
3637
+ {
3638
+ path: "draftPost.richContent.nodes.buttonData.styles.background.gradient.stops.position"
3639
+ },
3640
+ {
3641
+ path: "draftPost.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX"
3642
+ },
3643
+ {
3644
+ path: "draftPost.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY"
3645
+ },
3646
+ {
3647
+ path: "draftPost.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position"
3648
+ },
3649
+ {
3650
+ path: "draftPost.richContent.nodes.galleryData.items.image.media.duration"
3651
+ },
3652
+ {
3653
+ path: "draftPost.richContent.nodes.galleryData.items.video.media.duration"
3654
+ },
3655
+ {
3656
+ path: "draftPost.richContent.nodes.galleryData.items.video.thumbnail.duration"
3657
+ },
3658
+ {
3659
+ path: "draftPost.richContent.nodes.galleryData.options.item.ratio"
3660
+ },
3661
+ { path: "draftPost.richContent.nodes.imageData.image.duration" },
3662
+ { path: "draftPost.richContent.nodes.imageData.crop.x" },
3663
+ { path: "draftPost.richContent.nodes.imageData.crop.y" },
3664
+ { path: "draftPost.richContent.nodes.imageData.crop.width" },
3665
+ { path: "draftPost.richContent.nodes.imageData.crop.height" },
3666
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lat" },
3667
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lng" },
3668
+ {
3669
+ path: "draftPost.richContent.nodes.pollData.poll.image.duration"
3670
+ },
3671
+ {
3672
+ path: "draftPost.richContent.nodes.pollData.poll.options.image.duration"
3673
+ },
3674
+ {
3675
+ path: "draftPost.richContent.nodes.pollData.design.poll.background.image.duration"
3676
+ },
3677
+ {
3678
+ path: "draftPost.richContent.nodes.appEmbedData.image.duration"
3679
+ },
3680
+ { path: "draftPost.richContent.nodes.videoData.video.duration" },
3681
+ {
3682
+ path: "draftPost.richContent.nodes.videoData.thumbnail.duration"
3683
+ },
3684
+ { path: "draftPost.richContent.nodes.audioData.audio.duration" },
3685
+ {
3686
+ path: "draftPost.richContent.nodes.audioData.coverImage.duration"
3687
+ },
3688
+ {
3689
+ path: "draftPost.richContent.nodes.layoutData.backgroundImage.media.duration"
3690
+ },
3691
+ {
3692
+ path: "draftPost.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX"
3693
+ },
3694
+ {
3695
+ path: "draftPost.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY"
3696
+ },
3697
+ {
3698
+ path: "draftPost.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position"
3699
+ },
3700
+ {
3701
+ path: "draftPost.richContent.nodes.layoutData.backdropImage.media.duration"
3702
+ },
3703
+ {
3704
+ path: "draftPost.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX"
3705
+ },
3706
+ {
3707
+ path: "draftPost.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY"
3708
+ },
3709
+ {
3710
+ path: "draftPost.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position"
3711
+ },
3712
+ {
3713
+ path: "draftPost.richContent.nodes.layoutData.background.gradient.centerX"
3714
+ },
3715
+ {
3716
+ path: "draftPost.richContent.nodes.layoutData.background.gradient.centerY"
3717
+ },
3718
+ {
3719
+ path: "draftPost.richContent.nodes.layoutData.background.gradient.stops.position"
3720
+ },
3721
+ {
3722
+ path: "draftPost.richContent.nodes.layoutData.backdrop.gradient.centerX"
3723
+ },
3724
+ {
3725
+ path: "draftPost.richContent.nodes.layoutData.backdrop.gradient.centerY"
3726
+ },
3727
+ {
3728
+ path: "draftPost.richContent.nodes.layoutData.backdrop.gradient.stops.position"
3729
+ },
3730
+ { path: "draftPost.richContent.nodes.shapeData.shape.duration" },
3731
+ {
3732
+ path: "draftPost.richContent.nodes.cardData.background.gradient.centerX"
3733
+ },
3734
+ {
3735
+ path: "draftPost.richContent.nodes.cardData.background.gradient.centerY"
3736
+ },
3737
+ {
3738
+ path: "draftPost.richContent.nodes.cardData.background.gradient.stops.position"
3739
+ },
3740
+ {
3741
+ path: "draftPost.richContent.nodes.cardData.backgroundImage.media.duration"
3742
+ },
3743
+ {
3744
+ path: "draftPost.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX"
3745
+ },
3746
+ {
3747
+ path: "draftPost.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY"
3748
+ },
3749
+ {
3750
+ path: "draftPost.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position"
3751
+ },
3752
+ { path: "draftPost.richContent.nodes.tocData.fontSize" },
3753
+ { path: "draftPost.richContent.nodes.tocData.itemSpacing" },
3754
+ {
3755
+ path: "draftPost.richContent.nodes.smartBlockCellData.shape.duration"
3756
+ }
3757
+ ]
3758
+ }
3759
+ ])
3760
+ };
3761
+ return metadata;
3762
+ }
3763
+ return __updateDraftPostLanguage;
3764
+ }
3765
+
3766
+ // src/blog-v3-draft-draft-posts.universal.ts
3767
+ var import_image = require("@wix/sdk-runtime/transformations/image");
3768
+ var import_image2 = require("@wix/sdk-runtime/transformations/image");
3769
+ var import_video_v2 = require("@wix/sdk-runtime/transformations/video-v2");
3770
+ var import_video_v22 = require("@wix/sdk-runtime/transformations/video-v2");
3771
+ var import_page_url = require("@wix/sdk-runtime/transformations/page-url");
3772
+ var import_page_url2 = require("@wix/sdk-runtime/transformations/page-url");
3773
+ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
3774
+ var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
3775
+ var Origin = /* @__PURE__ */ ((Origin2) => {
3776
+ Origin2["UNKNOWN"] = "UNKNOWN";
3777
+ Origin2["ADMIN"] = "ADMIN";
3778
+ Origin2["ADD_CATEGORIES"] = "ADD_CATEGORIES";
3779
+ Origin2["AUTO_SAVE"] = "AUTO_SAVE";
3780
+ Origin2["COPY_TEMPLATE"] = "COPY_TEMPLATE";
3781
+ Origin2["IMPORT"] = "IMPORT";
3782
+ Origin2["IMPORT_BULK"] = "IMPORT_BULK";
3783
+ Origin2["IMPORT_HTML"] = "IMPORT_HTML";
3784
+ Origin2["IMPORT_PATCH"] = "IMPORT_PATCH";
3785
+ Origin2["LANGUAGE_CHANGE"] = "LANGUAGE_CHANGE";
3786
+ Origin2["MANUAL_SAVE"] = "MANUAL_SAVE";
3787
+ Origin2["MIGRATION"] = "MIGRATION";
3788
+ Origin2["MODERATION"] = "MODERATION";
3789
+ Origin2["MOVE_TO_TRASH"] = "MOVE_TO_TRASH";
3790
+ Origin2["PRICING_PLANS_CHANGE"] = "PRICING_PLANS_CHANGE";
3791
+ Origin2["PROVISION"] = "PROVISION";
3792
+ Origin2["PUBLISH"] = "PUBLISH";
3793
+ Origin2["REASSIGN_OWNER"] = "REASSIGN_OWNER";
3794
+ Origin2["REBLOG"] = "REBLOG";
3795
+ Origin2["RESTORE"] = "RESTORE";
3796
+ Origin2["REVERT_TO_DRAFT"] = "REVERT_TO_DRAFT";
3797
+ Origin2["TRANSLATION"] = "TRANSLATION";
3798
+ Origin2["UNPUBLISH"] = "UNPUBLISH";
3799
+ Origin2["UNSCHEDULE"] = "UNSCHEDULE";
3800
+ Origin2["NEW_EDIT_SESSION"] = "NEW_EDIT_SESSION";
3801
+ Origin2["SCHEDULING_SERVICE_SCHEDULE"] = "SCHEDULING_SERVICE_SCHEDULE";
3802
+ Origin2["SCHEDULING_SERVICE_UNSCHEDULE"] = "SCHEDULING_SERVICE_UNSCHEDULE";
3803
+ Origin2["SCHEDULING_SERVICE_PUBLISH"] = "SCHEDULING_SERVICE_PUBLISH";
3804
+ Origin2["SCHEDULE"] = "SCHEDULE";
3805
+ Origin2["REMOVE_FROM_MODERATION"] = "REMOVE_FROM_MODERATION";
3806
+ Origin2["REJECT_FROM_MODERATION"] = "REJECT_FROM_MODERATION";
3807
+ Origin2["APPROVE_IN_MODERATION"] = "APPROVE_IN_MODERATION";
3808
+ Origin2["DELETE_TAG"] = "DELETE_TAG";
3809
+ Origin2["PIN"] = "PIN";
3810
+ Origin2["UNPIN"] = "UNPIN";
3811
+ Origin2["AI_AUTO_SAVE"] = "AI_AUTO_SAVE";
3812
+ return Origin2;
3813
+ })(Origin || {});
3814
+ var NodeType = /* @__PURE__ */ ((NodeType2) => {
3815
+ NodeType2["PARAGRAPH"] = "PARAGRAPH";
3816
+ NodeType2["TEXT"] = "TEXT";
3817
+ NodeType2["HEADING"] = "HEADING";
3818
+ NodeType2["BULLETED_LIST"] = "BULLETED_LIST";
3819
+ NodeType2["ORDERED_LIST"] = "ORDERED_LIST";
3820
+ NodeType2["LIST_ITEM"] = "LIST_ITEM";
3821
+ NodeType2["BLOCKQUOTE"] = "BLOCKQUOTE";
3822
+ NodeType2["CODE_BLOCK"] = "CODE_BLOCK";
3823
+ NodeType2["VIDEO"] = "VIDEO";
3824
+ NodeType2["DIVIDER"] = "DIVIDER";
3825
+ NodeType2["FILE"] = "FILE";
3826
+ NodeType2["GALLERY"] = "GALLERY";
3827
+ NodeType2["GIF"] = "GIF";
3828
+ NodeType2["HTML"] = "HTML";
3829
+ NodeType2["IMAGE"] = "IMAGE";
3830
+ NodeType2["LINK_PREVIEW"] = "LINK_PREVIEW";
3831
+ NodeType2["MAP"] = "MAP";
3832
+ NodeType2["POLL"] = "POLL";
3833
+ NodeType2["APP_EMBED"] = "APP_EMBED";
3834
+ NodeType2["BUTTON"] = "BUTTON";
3835
+ NodeType2["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
3836
+ NodeType2["TABLE"] = "TABLE";
3837
+ NodeType2["EMBED"] = "EMBED";
3838
+ NodeType2["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
3839
+ NodeType2["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
3840
+ NodeType2["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
3841
+ NodeType2["TABLE_CELL"] = "TABLE_CELL";
3842
+ NodeType2["TABLE_ROW"] = "TABLE_ROW";
3843
+ NodeType2["EXTERNAL"] = "EXTERNAL";
3844
+ NodeType2["AUDIO"] = "AUDIO";
3845
+ NodeType2["CAPTION"] = "CAPTION";
3846
+ NodeType2["LAYOUT"] = "LAYOUT";
3847
+ NodeType2["LAYOUT_CELL"] = "LAYOUT_CELL";
3848
+ NodeType2["SHAPE"] = "SHAPE";
3849
+ NodeType2["CARD"] = "CARD";
3850
+ NodeType2["TOC"] = "TOC";
3851
+ NodeType2["SMART_BLOCK"] = "SMART_BLOCK";
3852
+ NodeType2["SMART_BLOCK_CELL"] = "SMART_BLOCK_CELL";
3853
+ NodeType2["CHECKBOX_LIST"] = "CHECKBOX_LIST";
3854
+ return NodeType2;
3855
+ })(NodeType || {});
3856
+ var BackgroundType = /* @__PURE__ */ ((BackgroundType2) => {
3857
+ BackgroundType2["COLOR"] = "COLOR";
3858
+ BackgroundType2["GRADIENT"] = "GRADIENT";
3859
+ return BackgroundType2;
3860
+ })(BackgroundType || {});
3861
+ var GradientType = /* @__PURE__ */ ((GradientType2) => {
3862
+ GradientType2["LINEAR"] = "LINEAR";
3863
+ GradientType2["RADIAL"] = "RADIAL";
3864
+ return GradientType2;
3865
+ })(GradientType || {});
3866
+ var WidthType = /* @__PURE__ */ ((WidthType2) => {
3867
+ WidthType2["CONTENT"] = "CONTENT";
3868
+ WidthType2["SMALL"] = "SMALL";
3869
+ WidthType2["ORIGINAL"] = "ORIGINAL";
3870
+ WidthType2["FULL_WIDTH"] = "FULL_WIDTH";
3871
+ return WidthType2;
3872
+ })(WidthType || {});
3873
+ var PluginContainerDataAlignment = /* @__PURE__ */ ((PluginContainerDataAlignment2) => {
3874
+ PluginContainerDataAlignment2["CENTER"] = "CENTER";
3875
+ PluginContainerDataAlignment2["LEFT"] = "LEFT";
3876
+ PluginContainerDataAlignment2["RIGHT"] = "RIGHT";
3877
+ return PluginContainerDataAlignment2;
3878
+ })(PluginContainerDataAlignment || {});
3879
+ var ButtonDataType = /* @__PURE__ */ ((ButtonDataType2) => {
3880
+ ButtonDataType2["LINK"] = "LINK";
3881
+ ButtonDataType2["ACTION"] = "ACTION";
3882
+ return ButtonDataType2;
3883
+ })(ButtonDataType || {});
3884
+ var Target = /* @__PURE__ */ ((Target2) => {
3885
+ Target2["SELF"] = "SELF";
3886
+ Target2["BLANK"] = "BLANK";
3887
+ Target2["PARENT"] = "PARENT";
3888
+ Target2["TOP"] = "TOP";
3889
+ return Target2;
3890
+ })(Target || {});
3891
+ var AnimationType = /* @__PURE__ */ ((AnimationType2) => {
3892
+ AnimationType2["VIEW"] = "VIEW";
3893
+ AnimationType2["POINTER"] = "POINTER";
3894
+ return AnimationType2;
3895
+ })(AnimationType || {});
3896
+ var EntranceEffectType = /* @__PURE__ */ ((EntranceEffectType2) => {
3897
+ EntranceEffectType2["FADE"] = "FADE";
3898
+ EntranceEffectType2["ARC"] = "ARC";
3899
+ EntranceEffectType2["BLUR"] = "BLUR";
3900
+ EntranceEffectType2["BOUNCE"] = "BOUNCE";
3901
+ EntranceEffectType2["DROP"] = "DROP";
3902
+ EntranceEffectType2["EXPAND"] = "EXPAND";
3903
+ EntranceEffectType2["FLIP"] = "FLIP";
3904
+ EntranceEffectType2["FLOAT"] = "FLOAT";
3905
+ EntranceEffectType2["FOLD"] = "FOLD";
3363
3906
  EntranceEffectType2["GLIDE"] = "GLIDE";
3364
3907
  EntranceEffectType2["REVEAL"] = "REVEAL";
3365
3908
  EntranceEffectType2["SHAPE"] = "SHAPE";
@@ -4677,6 +5220,110 @@ async function publishDraftPost2(draftPostId) {
4677
5220
  throw transformedError;
4678
5221
  }
4679
5222
  }
5223
+ async function translateDraft2(postId, language, options) {
5224
+ const { httpClient, sideEffects } = arguments[3];
5225
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
5226
+ { postId, language, fieldsets: options?.fieldsets },
5227
+ []
5228
+ );
5229
+ const reqOpts = translateDraft(payload);
5230
+ sideEffects?.onSiteCall?.();
5231
+ try {
5232
+ const result = await httpClient.request(reqOpts);
5233
+ sideEffects?.onSuccess?.(result);
5234
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
5235
+ (0, import_transform_paths2.transformPaths)(result.data, [
5236
+ {
5237
+ transformFn: import_image2.transformRESTImageToSDKImage,
5238
+ paths: [
5239
+ { path: "draftPost.heroImage" },
5240
+ { path: "draftPost.media.wixMedia.image" }
5241
+ ]
5242
+ },
5243
+ {
5244
+ transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
5245
+ paths: [
5246
+ { path: "draftPost.url" },
5247
+ { path: "draftPost.translations.url" }
5248
+ ]
5249
+ },
5250
+ {
5251
+ transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
5252
+ paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
5253
+ }
5254
+ ]),
5255
+ ["draftPost.richContent"]
5256
+ );
5257
+ } catch (err) {
5258
+ const transformedError = (0, import_transform_error.transformError)(
5259
+ err,
5260
+ {
5261
+ spreadPathsToArguments: {},
5262
+ explicitPathsToArguments: {
5263
+ postId: "$[0]",
5264
+ language: "$[1]",
5265
+ fieldsets: "$[2].fieldsets"
5266
+ },
5267
+ singleArgumentUnchanged: false
5268
+ },
5269
+ ["postId", "language", "options"]
5270
+ );
5271
+ sideEffects?.onError?.(err);
5272
+ throw transformedError;
5273
+ }
5274
+ }
5275
+ async function updateDraftPostLanguage2(postId, language, options) {
5276
+ const { httpClient, sideEffects } = arguments[3];
5277
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
5278
+ { postId, language, fieldsets: options?.fieldsets },
5279
+ []
5280
+ );
5281
+ const reqOpts = updateDraftPostLanguage(payload);
5282
+ sideEffects?.onSiteCall?.();
5283
+ try {
5284
+ const result = await httpClient.request(reqOpts);
5285
+ sideEffects?.onSuccess?.(result);
5286
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
5287
+ (0, import_transform_paths2.transformPaths)(result.data, [
5288
+ {
5289
+ transformFn: import_image2.transformRESTImageToSDKImage,
5290
+ paths: [
5291
+ { path: "draftPost.heroImage" },
5292
+ { path: "draftPost.media.wixMedia.image" }
5293
+ ]
5294
+ },
5295
+ {
5296
+ transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
5297
+ paths: [
5298
+ { path: "draftPost.url" },
5299
+ { path: "draftPost.translations.url" }
5300
+ ]
5301
+ },
5302
+ {
5303
+ transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
5304
+ paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
5305
+ }
5306
+ ]),
5307
+ ["draftPost.richContent"]
5308
+ );
5309
+ } catch (err) {
5310
+ const transformedError = (0, import_transform_error.transformError)(
5311
+ err,
5312
+ {
5313
+ spreadPathsToArguments: {},
5314
+ explicitPathsToArguments: {
5315
+ postId: "$[0]",
5316
+ language: "$[1]",
5317
+ fieldsets: "$[2].fieldsets"
5318
+ },
5319
+ singleArgumentUnchanged: false
5320
+ },
5321
+ ["postId", "language", "options"]
5322
+ );
5323
+ sideEffects?.onError?.(err);
5324
+ throw transformedError;
5325
+ }
5326
+ }
4680
5327
 
4681
5328
  // src/blog-v3-draft-draft-posts.public.ts
4682
5329
  function createDraftPost3(httpClient) {
@@ -4792,6 +5439,24 @@ function publishDraftPost3(httpClient) {
4792
5439
  { httpClient }
4793
5440
  );
4794
5441
  }
5442
+ function translateDraft3(httpClient) {
5443
+ return (postId, language, options) => translateDraft2(
5444
+ postId,
5445
+ language,
5446
+ options,
5447
+ // @ts-ignore
5448
+ { httpClient }
5449
+ );
5450
+ }
5451
+ function updateDraftPostLanguage3(httpClient) {
5452
+ return (postId, language, options) => updateDraftPostLanguage2(
5453
+ postId,
5454
+ language,
5455
+ options,
5456
+ // @ts-ignore
5457
+ { httpClient }
5458
+ );
5459
+ }
4795
5460
  var onDraftCreated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
4796
5461
  "wix.blog.v3.draft_created",
4797
5462
  true,
@@ -5295,6 +5960,8 @@ var listDraftPosts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)
5295
5960
  var getDeletedDraftPost4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getDeletedDraftPost3);
5296
5961
  var restoreFromTrashBin4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(restoreFromTrashBin3);
5297
5962
  var publishDraftPost4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(publishDraftPost3);
5963
+ var translateDraft4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(translateDraft3);
5964
+ var updateDraftPostLanguage4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateDraftPostLanguage3);
5298
5965
  var queryDraftPosts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryDraftPosts);
5299
5966
  var onDraftCreated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(onDraftCreated);
5300
5967
  var onDraftDeleted2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(onDraftDeleted);
@@ -5390,7 +6057,9 @@ var onDraftUpdated2 = /* @__PURE__ */ (0, import_event_definition_modules.create
5390
6057
  queryDraftPosts,
5391
6058
  removeFromTrashBin,
5392
6059
  restoreFromTrashBin,
6060
+ translateDraft,
5393
6061
  updateDraftPost,
6062
+ updateDraftPostLanguage,
5394
6063
  utils
5395
6064
  });
5396
6065
  //# sourceMappingURL=index.js.map