@wix/auto_sdk_blog_draft-posts 1.0.29 → 1.0.31

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 (37) hide show
  1. package/build/cjs/index.d.ts +2 -2
  2. package/build/cjs/index.js +0 -8
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/{blog-v3-draft-draft-posts.universal-DE4EwIQq.d.ts → index.typings.d.ts} +289 -17
  5. package/build/cjs/index.typings.js +3077 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +2 -1
  8. package/build/cjs/meta.js +0 -8
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +2 -2
  11. package/build/es/index.mjs +0 -8
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/{blog-v3-draft-draft-posts.universal-DE4EwIQq.d.mts → index.typings.d.mts} +289 -17
  14. package/build/es/index.typings.mjs +3000 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +2 -1
  17. package/build/es/meta.mjs +0 -8
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +2 -2
  20. package/build/internal/cjs/index.js +0 -8
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/{blog-v3-draft-draft-posts.universal-DE4EwIQq.d.ts → index.typings.d.ts} +289 -17
  23. package/build/internal/cjs/index.typings.js +3077 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -0
  25. package/build/internal/cjs/meta.d.ts +2 -1
  26. package/build/internal/cjs/meta.js +0 -8
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +2 -2
  29. package/build/internal/es/index.mjs +0 -8
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/{blog-v3-draft-draft-posts.universal-DE4EwIQq.d.mts → index.typings.d.mts} +289 -17
  32. package/build/internal/es/index.typings.mjs +3000 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -0
  34. package/build/internal/es/meta.d.mts +2 -1
  35. package/build/internal/es/meta.mjs +0 -8
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
@@ -0,0 +1,3000 @@
1
+ // src/blog-v3-draft-draft-posts.universal.ts
2
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
+ import { queryBuilder } from "@wix/sdk-runtime/query-builder";
4
+ import {
5
+ renameKeysFromSDKRequestToRESTRequest,
6
+ renameKeysFromRESTResponseToSDKResponse
7
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
8
+
9
+ // src/blog-v3-draft-draft-posts.http.ts
10
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
11
+ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
12
+ import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
13
+ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
14
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
15
+ import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
16
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
17
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
18
+ function resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(opts) {
19
+ const domainToMappings = {
20
+ _api_base_domain_: [
21
+ {
22
+ srcPath: "/draft-post-service-api-proxy",
23
+ destPath: ""
24
+ }
25
+ ],
26
+ "*.dev.wix-code.com": [
27
+ {
28
+ srcPath: "/_api/communities-blog-node-api/v3/draft-posts",
29
+ destPath: "/v3/draft-posts"
30
+ }
31
+ ],
32
+ "*.pub.wix-code.com": [
33
+ {
34
+ srcPath: "/_api/communities-blog-node-api/v3/draft-posts",
35
+ destPath: "/v3/draft-posts"
36
+ }
37
+ ],
38
+ _: [
39
+ {
40
+ srcPath: "/_api/communities-blog-node-api/v3/draft-posts",
41
+ destPath: "/v3/draft-posts"
42
+ }
43
+ ],
44
+ "apps._base_domain_": [
45
+ {
46
+ srcPath: "/_api/communities-blog-node-api/v3/draft-posts",
47
+ destPath: "/v3/draft-posts"
48
+ }
49
+ ],
50
+ "bo._base_domain_": [
51
+ {
52
+ srcPath: "/_api/communities-blog-node-api/v3/draft-posts",
53
+ destPath: "/v3/draft-posts"
54
+ }
55
+ ],
56
+ "wixbo.ai": [
57
+ {
58
+ srcPath: "/_api/communities-blog-node-api/v3/draft-posts",
59
+ destPath: "/v3/draft-posts"
60
+ }
61
+ ],
62
+ "wix-bo.com": [
63
+ {
64
+ srcPath: "/_api/communities-blog-node-api/v3/draft-posts",
65
+ destPath: "/v3/draft-posts"
66
+ }
67
+ ],
68
+ "editor._base_domain_": [
69
+ {
70
+ srcPath: "/_api/communities-blog-node-api/v3/draft-posts",
71
+ destPath: "/v3/draft-posts"
72
+ }
73
+ ],
74
+ "blocks._base_domain_": [
75
+ {
76
+ srcPath: "/_api/communities-blog-node-api/v3/draft-posts",
77
+ destPath: "/v3/draft-posts"
78
+ }
79
+ ],
80
+ "create.editorx": [
81
+ {
82
+ srcPath: "/_api/communities-blog-node-api/v3/draft-posts",
83
+ destPath: "/v3/draft-posts"
84
+ }
85
+ ],
86
+ "editor.wixapps.net": [
87
+ {
88
+ srcPath: "/_api/communities-blog-node-api/v3/draft-posts",
89
+ destPath: "/v3/draft-posts"
90
+ }
91
+ ],
92
+ "manage._base_domain_": [
93
+ {
94
+ srcPath: "/_api/communities-blog-node-api/v3/draft-posts",
95
+ destPath: "/v3/draft-posts"
96
+ },
97
+ {
98
+ srcPath: "/_api/draft-post-service-api-proxy/v3/bulk/draft-posts",
99
+ destPath: "/v3/bulk/draft-posts"
100
+ }
101
+ ],
102
+ "social-blog._base_domain_": [
103
+ {
104
+ srcPath: "/_api/communities-blog-node-api/v3/draft-posts",
105
+ destPath: "/v3/draft-posts"
106
+ }
107
+ ],
108
+ "www.wixapis.com": [
109
+ {
110
+ srcPath: "/blog/v3/draft-posts",
111
+ destPath: "/v3/draft-posts"
112
+ },
113
+ {
114
+ srcPath: "/blog/v3/bulk/draft-posts/create",
115
+ destPath: "/v3/bulk/draft-posts/create"
116
+ },
117
+ {
118
+ srcPath: "/blog/v3/draft-posts/",
119
+ destPath: "/v3/draft-posts"
120
+ },
121
+ {
122
+ srcPath: "/blog/v3/bulk/draft-posts",
123
+ destPath: "/v3/bulk/draft-posts"
124
+ }
125
+ ],
126
+ "www._base_domain_": [
127
+ {
128
+ srcPath: "/_api/communities-blog-node-api/v3/draft-posts",
129
+ destPath: "/v3/draft-posts"
130
+ }
131
+ ]
132
+ };
133
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
134
+ }
135
+ var PACKAGE_NAME = "@wix/auto_sdk_blog_draft-posts";
136
+ function createDraftPost(payload) {
137
+ function __createDraftPost({ host }) {
138
+ const serializedData = transformPaths(payload, [
139
+ {
140
+ transformFn: transformSDKTimestampToRESTTimestamp,
141
+ paths: [
142
+ { path: "draftPost.editedDate" },
143
+ { path: "draftPost.scheduledPublishDate" },
144
+ { path: "draftPost.firstPublishedDate" },
145
+ { path: "draftPost.createdDate" },
146
+ { path: "draftPost.coverMedia.image.urlExpirationDate" },
147
+ { path: "draftPost.coverMedia.video.thumbnail.urlExpirationDate" },
148
+ { path: "draftPost.heroImage.urlExpirationDate" },
149
+ { path: "draftPost.richContent.metadata.createdTimestamp" },
150
+ { path: "draftPost.richContent.metadata.updatedTimestamp" },
151
+ { path: "draftPost.moderationDetails.submittedDate" },
152
+ { path: "draftPost.moderationDetails.moderationDate" },
153
+ { path: "draftPost.media.wixMedia.image.urlExpirationDate" },
154
+ { path: "draftPost.media.wixMedia.videoV2.urlExpirationDate" },
155
+ {
156
+ path: "draftPost.media.wixMedia.videoV2.resolutions.urlExpirationDate"
157
+ },
158
+ {
159
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
160
+ },
161
+ {
162
+ path: "draftPost.media.wixMedia.videoV2.posters.urlExpirationDate"
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ transformFn: transformSDKFloatToRESTFloat,
168
+ paths: [
169
+ { path: "draftPost.coverMedia.image.focalPoint.x" },
170
+ { path: "draftPost.coverMedia.image.focalPoint.y" },
171
+ { path: "draftPost.coverMedia.video.thumbnail.focalPoint.x" },
172
+ { path: "draftPost.coverMedia.video.thumbnail.focalPoint.y" },
173
+ { path: "draftPost.heroImage.focalPoint.x" },
174
+ { path: "draftPost.heroImage.focalPoint.y" },
175
+ { path: "draftPost.media.wixMedia.image.focalPoint.x" },
176
+ { path: "draftPost.media.wixMedia.image.focalPoint.y" },
177
+ {
178
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
179
+ },
180
+ {
181
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
182
+ },
183
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.x" },
184
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.y" },
185
+ {
186
+ path: "draftPost.richContent.nodes.galleryData.items.image.media.duration"
187
+ },
188
+ {
189
+ path: "draftPost.richContent.nodes.galleryData.items.video.media.duration"
190
+ },
191
+ {
192
+ path: "draftPost.richContent.nodes.galleryData.items.video.thumbnail.duration"
193
+ },
194
+ {
195
+ path: "draftPost.richContent.nodes.galleryData.options.item.ratio"
196
+ },
197
+ { path: "draftPost.richContent.nodes.imageData.image.duration" },
198
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lat" },
199
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lng" },
200
+ { path: "draftPost.richContent.nodes.pollData.poll.image.duration" },
201
+ {
202
+ path: "draftPost.richContent.nodes.pollData.poll.options.image.duration"
203
+ },
204
+ {
205
+ path: "draftPost.richContent.nodes.pollData.design.poll.background.image.duration"
206
+ },
207
+ { path: "draftPost.richContent.nodes.appEmbedData.image.duration" },
208
+ { path: "draftPost.richContent.nodes.videoData.video.duration" },
209
+ { path: "draftPost.richContent.nodes.videoData.thumbnail.duration" },
210
+ { path: "draftPost.richContent.nodes.audioData.audio.duration" },
211
+ { path: "draftPost.richContent.nodes.audioData.coverImage.duration" }
212
+ ]
213
+ }
214
+ ]);
215
+ const metadata = {
216
+ entityFqdn: "wix.blog.v3.draft",
217
+ method: "POST",
218
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.CreateDraftPost",
219
+ packageName: PACKAGE_NAME,
220
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(
221
+ { protoPath: "/v3/draft-posts", data: serializedData, host }
222
+ ),
223
+ data: serializedData,
224
+ transformResponse: (payload2) => transformPaths(payload2, [
225
+ {
226
+ transformFn: transformRESTTimestampToSDKTimestamp,
227
+ paths: [
228
+ { path: "draftPost.editedDate" },
229
+ { path: "draftPost.scheduledPublishDate" },
230
+ { path: "draftPost.firstPublishedDate" },
231
+ { path: "draftPost.createdDate" },
232
+ { path: "draftPost.coverMedia.image.urlExpirationDate" },
233
+ {
234
+ path: "draftPost.coverMedia.video.thumbnail.urlExpirationDate"
235
+ },
236
+ { path: "draftPost.heroImage.urlExpirationDate" },
237
+ { path: "draftPost.richContent.metadata.createdTimestamp" },
238
+ { path: "draftPost.richContent.metadata.updatedTimestamp" },
239
+ { path: "draftPost.moderationDetails.submittedDate" },
240
+ { path: "draftPost.moderationDetails.moderationDate" },
241
+ { path: "draftPost.media.wixMedia.image.urlExpirationDate" },
242
+ { path: "draftPost.media.wixMedia.videoV2.urlExpirationDate" },
243
+ {
244
+ path: "draftPost.media.wixMedia.videoV2.resolutions.urlExpirationDate"
245
+ },
246
+ {
247
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
248
+ },
249
+ {
250
+ path: "draftPost.media.wixMedia.videoV2.posters.urlExpirationDate"
251
+ }
252
+ ]
253
+ },
254
+ {
255
+ transformFn: transformRESTFloatToSDKFloat,
256
+ paths: [
257
+ { path: "draftPost.coverMedia.image.focalPoint.x" },
258
+ { path: "draftPost.coverMedia.image.focalPoint.y" },
259
+ { path: "draftPost.coverMedia.video.thumbnail.focalPoint.x" },
260
+ { path: "draftPost.coverMedia.video.thumbnail.focalPoint.y" },
261
+ { path: "draftPost.heroImage.focalPoint.x" },
262
+ { path: "draftPost.heroImage.focalPoint.y" },
263
+ { path: "draftPost.media.wixMedia.image.focalPoint.x" },
264
+ { path: "draftPost.media.wixMedia.image.focalPoint.y" },
265
+ {
266
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
267
+ },
268
+ {
269
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
270
+ },
271
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.x" },
272
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.y" },
273
+ {
274
+ path: "draftPost.richContent.nodes.galleryData.items.image.media.duration"
275
+ },
276
+ {
277
+ path: "draftPost.richContent.nodes.galleryData.items.video.media.duration"
278
+ },
279
+ {
280
+ path: "draftPost.richContent.nodes.galleryData.items.video.thumbnail.duration"
281
+ },
282
+ {
283
+ path: "draftPost.richContent.nodes.galleryData.options.item.ratio"
284
+ },
285
+ { path: "draftPost.richContent.nodes.imageData.image.duration" },
286
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lat" },
287
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lng" },
288
+ {
289
+ path: "draftPost.richContent.nodes.pollData.poll.image.duration"
290
+ },
291
+ {
292
+ path: "draftPost.richContent.nodes.pollData.poll.options.image.duration"
293
+ },
294
+ {
295
+ path: "draftPost.richContent.nodes.pollData.design.poll.background.image.duration"
296
+ },
297
+ {
298
+ path: "draftPost.richContent.nodes.appEmbedData.image.duration"
299
+ },
300
+ { path: "draftPost.richContent.nodes.videoData.video.duration" },
301
+ {
302
+ path: "draftPost.richContent.nodes.videoData.thumbnail.duration"
303
+ },
304
+ { path: "draftPost.richContent.nodes.audioData.audio.duration" },
305
+ {
306
+ path: "draftPost.richContent.nodes.audioData.coverImage.duration"
307
+ }
308
+ ]
309
+ }
310
+ ])
311
+ };
312
+ return metadata;
313
+ }
314
+ return __createDraftPost;
315
+ }
316
+ function bulkCreateDraftPosts(payload) {
317
+ function __bulkCreateDraftPosts({ host }) {
318
+ const serializedData = transformPaths(payload, [
319
+ {
320
+ transformFn: transformSDKTimestampToRESTTimestamp,
321
+ paths: [
322
+ { path: "draftPosts.editedDate" },
323
+ { path: "draftPosts.scheduledPublishDate" },
324
+ { path: "draftPosts.firstPublishedDate" },
325
+ { path: "draftPosts.createdDate" },
326
+ { path: "draftPosts.coverMedia.image.urlExpirationDate" },
327
+ { path: "draftPosts.coverMedia.video.thumbnail.urlExpirationDate" },
328
+ { path: "draftPosts.heroImage.urlExpirationDate" },
329
+ { path: "draftPosts.richContent.metadata.createdTimestamp" },
330
+ { path: "draftPosts.richContent.metadata.updatedTimestamp" },
331
+ { path: "draftPosts.moderationDetails.submittedDate" },
332
+ { path: "draftPosts.moderationDetails.moderationDate" },
333
+ { path: "draftPosts.media.wixMedia.image.urlExpirationDate" },
334
+ { path: "draftPosts.media.wixMedia.videoV2.urlExpirationDate" },
335
+ {
336
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.urlExpirationDate"
337
+ },
338
+ {
339
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
340
+ },
341
+ {
342
+ path: "draftPosts.media.wixMedia.videoV2.posters.urlExpirationDate"
343
+ }
344
+ ]
345
+ },
346
+ {
347
+ transformFn: transformSDKFloatToRESTFloat,
348
+ paths: [
349
+ { path: "draftPosts.coverMedia.image.focalPoint.x" },
350
+ { path: "draftPosts.coverMedia.image.focalPoint.y" },
351
+ { path: "draftPosts.coverMedia.video.thumbnail.focalPoint.x" },
352
+ { path: "draftPosts.coverMedia.video.thumbnail.focalPoint.y" },
353
+ { path: "draftPosts.heroImage.focalPoint.x" },
354
+ { path: "draftPosts.heroImage.focalPoint.y" },
355
+ { path: "draftPosts.media.wixMedia.image.focalPoint.x" },
356
+ { path: "draftPosts.media.wixMedia.image.focalPoint.y" },
357
+ {
358
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
359
+ },
360
+ {
361
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
362
+ },
363
+ { path: "draftPosts.media.wixMedia.videoV2.posters.focalPoint.x" },
364
+ { path: "draftPosts.media.wixMedia.videoV2.posters.focalPoint.y" },
365
+ {
366
+ path: "draftPosts.richContent.nodes.galleryData.items.image.media.duration"
367
+ },
368
+ {
369
+ path: "draftPosts.richContent.nodes.galleryData.items.video.media.duration"
370
+ },
371
+ {
372
+ path: "draftPosts.richContent.nodes.galleryData.items.video.thumbnail.duration"
373
+ },
374
+ {
375
+ path: "draftPosts.richContent.nodes.galleryData.options.item.ratio"
376
+ },
377
+ { path: "draftPosts.richContent.nodes.imageData.image.duration" },
378
+ { path: "draftPosts.richContent.nodes.mapData.mapSettings.lat" },
379
+ { path: "draftPosts.richContent.nodes.mapData.mapSettings.lng" },
380
+ { path: "draftPosts.richContent.nodes.pollData.poll.image.duration" },
381
+ {
382
+ path: "draftPosts.richContent.nodes.pollData.poll.options.image.duration"
383
+ },
384
+ {
385
+ path: "draftPosts.richContent.nodes.pollData.design.poll.background.image.duration"
386
+ },
387
+ { path: "draftPosts.richContent.nodes.appEmbedData.image.duration" },
388
+ { path: "draftPosts.richContent.nodes.videoData.video.duration" },
389
+ { path: "draftPosts.richContent.nodes.videoData.thumbnail.duration" },
390
+ { path: "draftPosts.richContent.nodes.audioData.audio.duration" },
391
+ {
392
+ path: "draftPosts.richContent.nodes.audioData.coverImage.duration"
393
+ }
394
+ ]
395
+ }
396
+ ]);
397
+ const metadata = {
398
+ entityFqdn: "wix.blog.v3.draft",
399
+ method: "POST",
400
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.BulkCreateDraftPosts",
401
+ packageName: PACKAGE_NAME,
402
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(
403
+ { protoPath: "/v3/bulk/draft-posts/create", data: serializedData, host }
404
+ ),
405
+ data: serializedData,
406
+ transformResponse: (payload2) => transformPaths(payload2, [
407
+ {
408
+ transformFn: transformRESTTimestampToSDKTimestamp,
409
+ paths: [
410
+ { path: "results.item.editedDate" },
411
+ { path: "results.item.scheduledPublishDate" },
412
+ { path: "results.item.firstPublishedDate" },
413
+ { path: "results.item.createdDate" },
414
+ { path: "results.item.coverMedia.image.urlExpirationDate" },
415
+ {
416
+ path: "results.item.coverMedia.video.thumbnail.urlExpirationDate"
417
+ },
418
+ { path: "results.item.heroImage.urlExpirationDate" },
419
+ { path: "results.item.richContent.metadata.createdTimestamp" },
420
+ { path: "results.item.richContent.metadata.updatedTimestamp" },
421
+ { path: "results.item.moderationDetails.submittedDate" },
422
+ { path: "results.item.moderationDetails.moderationDate" },
423
+ { path: "results.item.media.wixMedia.image.urlExpirationDate" },
424
+ { path: "results.item.media.wixMedia.videoV2.urlExpirationDate" },
425
+ {
426
+ path: "results.item.media.wixMedia.videoV2.resolutions.urlExpirationDate"
427
+ },
428
+ {
429
+ path: "results.item.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
430
+ },
431
+ {
432
+ path: "results.item.media.wixMedia.videoV2.posters.urlExpirationDate"
433
+ }
434
+ ]
435
+ },
436
+ {
437
+ transformFn: transformRESTFloatToSDKFloat,
438
+ paths: [
439
+ { path: "results.item.coverMedia.image.focalPoint.x" },
440
+ { path: "results.item.coverMedia.image.focalPoint.y" },
441
+ { path: "results.item.coverMedia.video.thumbnail.focalPoint.x" },
442
+ { path: "results.item.coverMedia.video.thumbnail.focalPoint.y" },
443
+ { path: "results.item.heroImage.focalPoint.x" },
444
+ { path: "results.item.heroImage.focalPoint.y" },
445
+ { path: "results.item.media.wixMedia.image.focalPoint.x" },
446
+ { path: "results.item.media.wixMedia.image.focalPoint.y" },
447
+ {
448
+ path: "results.item.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
449
+ },
450
+ {
451
+ path: "results.item.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
452
+ },
453
+ {
454
+ path: "results.item.media.wixMedia.videoV2.posters.focalPoint.x"
455
+ },
456
+ {
457
+ path: "results.item.media.wixMedia.videoV2.posters.focalPoint.y"
458
+ },
459
+ {
460
+ path: "results.item.richContent.nodes.galleryData.items.image.media.duration"
461
+ },
462
+ {
463
+ path: "results.item.richContent.nodes.galleryData.items.video.media.duration"
464
+ },
465
+ {
466
+ path: "results.item.richContent.nodes.galleryData.items.video.thumbnail.duration"
467
+ },
468
+ {
469
+ path: "results.item.richContent.nodes.galleryData.options.item.ratio"
470
+ },
471
+ {
472
+ path: "results.item.richContent.nodes.imageData.image.duration"
473
+ },
474
+ {
475
+ path: "results.item.richContent.nodes.mapData.mapSettings.lat"
476
+ },
477
+ {
478
+ path: "results.item.richContent.nodes.mapData.mapSettings.lng"
479
+ },
480
+ {
481
+ path: "results.item.richContent.nodes.pollData.poll.image.duration"
482
+ },
483
+ {
484
+ path: "results.item.richContent.nodes.pollData.poll.options.image.duration"
485
+ },
486
+ {
487
+ path: "results.item.richContent.nodes.pollData.design.poll.background.image.duration"
488
+ },
489
+ {
490
+ path: "results.item.richContent.nodes.appEmbedData.image.duration"
491
+ },
492
+ {
493
+ path: "results.item.richContent.nodes.videoData.video.duration"
494
+ },
495
+ {
496
+ path: "results.item.richContent.nodes.videoData.thumbnail.duration"
497
+ },
498
+ {
499
+ path: "results.item.richContent.nodes.audioData.audio.duration"
500
+ },
501
+ {
502
+ path: "results.item.richContent.nodes.audioData.coverImage.duration"
503
+ }
504
+ ]
505
+ }
506
+ ])
507
+ };
508
+ return metadata;
509
+ }
510
+ return __bulkCreateDraftPosts;
511
+ }
512
+ function bulkUpdateDraftPosts(payload) {
513
+ function __bulkUpdateDraftPosts({ host }) {
514
+ const serializedData = transformPaths(payload, [
515
+ {
516
+ transformFn: transformSDKTimestampToRESTTimestamp,
517
+ paths: [
518
+ { path: "scheduledPublishDate" },
519
+ { path: "draftPosts.draftPost.editedDate" },
520
+ { path: "draftPosts.draftPost.scheduledPublishDate" },
521
+ { path: "draftPosts.draftPost.firstPublishedDate" },
522
+ { path: "draftPosts.draftPost.createdDate" },
523
+ { path: "draftPosts.draftPost.coverMedia.image.urlExpirationDate" },
524
+ {
525
+ path: "draftPosts.draftPost.coverMedia.video.thumbnail.urlExpirationDate"
526
+ },
527
+ { path: "draftPosts.draftPost.heroImage.urlExpirationDate" },
528
+ {
529
+ path: "draftPosts.draftPost.richContent.metadata.createdTimestamp"
530
+ },
531
+ {
532
+ path: "draftPosts.draftPost.richContent.metadata.updatedTimestamp"
533
+ },
534
+ { path: "draftPosts.draftPost.moderationDetails.submittedDate" },
535
+ { path: "draftPosts.draftPost.moderationDetails.moderationDate" },
536
+ {
537
+ path: "draftPosts.draftPost.media.wixMedia.image.urlExpirationDate"
538
+ },
539
+ {
540
+ path: "draftPosts.draftPost.media.wixMedia.videoV2.urlExpirationDate"
541
+ },
542
+ {
543
+ path: "draftPosts.draftPost.media.wixMedia.videoV2.resolutions.urlExpirationDate"
544
+ },
545
+ {
546
+ path: "draftPosts.draftPost.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
547
+ },
548
+ {
549
+ path: "draftPosts.draftPost.media.wixMedia.videoV2.posters.urlExpirationDate"
550
+ }
551
+ ]
552
+ },
553
+ {
554
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
555
+ paths: [{ path: "draftPosts.fieldMask" }]
556
+ },
557
+ {
558
+ transformFn: transformSDKFloatToRESTFloat,
559
+ paths: [
560
+ { path: "draftPosts.draftPost.coverMedia.image.focalPoint.x" },
561
+ { path: "draftPosts.draftPost.coverMedia.image.focalPoint.y" },
562
+ {
563
+ path: "draftPosts.draftPost.coverMedia.video.thumbnail.focalPoint.x"
564
+ },
565
+ {
566
+ path: "draftPosts.draftPost.coverMedia.video.thumbnail.focalPoint.y"
567
+ },
568
+ { path: "draftPosts.draftPost.heroImage.focalPoint.x" },
569
+ { path: "draftPosts.draftPost.heroImage.focalPoint.y" },
570
+ { path: "draftPosts.draftPost.media.wixMedia.image.focalPoint.x" },
571
+ { path: "draftPosts.draftPost.media.wixMedia.image.focalPoint.y" },
572
+ {
573
+ path: "draftPosts.draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
574
+ },
575
+ {
576
+ path: "draftPosts.draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
577
+ },
578
+ {
579
+ path: "draftPosts.draftPost.media.wixMedia.videoV2.posters.focalPoint.x"
580
+ },
581
+ {
582
+ path: "draftPosts.draftPost.media.wixMedia.videoV2.posters.focalPoint.y"
583
+ },
584
+ {
585
+ path: "draftPosts.draftPost.richContent.nodes.galleryData.items.image.media.duration"
586
+ },
587
+ {
588
+ path: "draftPosts.draftPost.richContent.nodes.galleryData.items.video.media.duration"
589
+ },
590
+ {
591
+ path: "draftPosts.draftPost.richContent.nodes.galleryData.items.video.thumbnail.duration"
592
+ },
593
+ {
594
+ path: "draftPosts.draftPost.richContent.nodes.galleryData.options.item.ratio"
595
+ },
596
+ {
597
+ path: "draftPosts.draftPost.richContent.nodes.imageData.image.duration"
598
+ },
599
+ {
600
+ path: "draftPosts.draftPost.richContent.nodes.mapData.mapSettings.lat"
601
+ },
602
+ {
603
+ path: "draftPosts.draftPost.richContent.nodes.mapData.mapSettings.lng"
604
+ },
605
+ {
606
+ path: "draftPosts.draftPost.richContent.nodes.pollData.poll.image.duration"
607
+ },
608
+ {
609
+ path: "draftPosts.draftPost.richContent.nodes.pollData.poll.options.image.duration"
610
+ },
611
+ {
612
+ path: "draftPosts.draftPost.richContent.nodes.pollData.design.poll.background.image.duration"
613
+ },
614
+ {
615
+ path: "draftPosts.draftPost.richContent.nodes.appEmbedData.image.duration"
616
+ },
617
+ {
618
+ path: "draftPosts.draftPost.richContent.nodes.videoData.video.duration"
619
+ },
620
+ {
621
+ path: "draftPosts.draftPost.richContent.nodes.videoData.thumbnail.duration"
622
+ },
623
+ {
624
+ path: "draftPosts.draftPost.richContent.nodes.audioData.audio.duration"
625
+ },
626
+ {
627
+ path: "draftPosts.draftPost.richContent.nodes.audioData.coverImage.duration"
628
+ }
629
+ ]
630
+ }
631
+ ]);
632
+ const metadata = {
633
+ entityFqdn: "wix.blog.v3.draft",
634
+ method: "PATCH",
635
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.BulkUpdateDraftPosts",
636
+ packageName: PACKAGE_NAME,
637
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(
638
+ { protoPath: "/v3/draft-posts/update", data: serializedData, host }
639
+ ),
640
+ data: serializedData,
641
+ transformResponse: (payload2) => transformPaths(payload2, [
642
+ {
643
+ transformFn: transformRESTTimestampToSDKTimestamp,
644
+ paths: [
645
+ { path: "results.item.editedDate" },
646
+ { path: "results.item.scheduledPublishDate" },
647
+ { path: "results.item.firstPublishedDate" },
648
+ { path: "results.item.createdDate" },
649
+ { path: "results.item.coverMedia.image.urlExpirationDate" },
650
+ {
651
+ path: "results.item.coverMedia.video.thumbnail.urlExpirationDate"
652
+ },
653
+ { path: "results.item.heroImage.urlExpirationDate" },
654
+ { path: "results.item.richContent.metadata.createdTimestamp" },
655
+ { path: "results.item.richContent.metadata.updatedTimestamp" },
656
+ { path: "results.item.moderationDetails.submittedDate" },
657
+ { path: "results.item.moderationDetails.moderationDate" },
658
+ { path: "results.item.media.wixMedia.image.urlExpirationDate" },
659
+ { path: "results.item.media.wixMedia.videoV2.urlExpirationDate" },
660
+ {
661
+ path: "results.item.media.wixMedia.videoV2.resolutions.urlExpirationDate"
662
+ },
663
+ {
664
+ path: "results.item.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
665
+ },
666
+ {
667
+ path: "results.item.media.wixMedia.videoV2.posters.urlExpirationDate"
668
+ }
669
+ ]
670
+ },
671
+ {
672
+ transformFn: transformRESTFloatToSDKFloat,
673
+ paths: [
674
+ { path: "results.item.coverMedia.image.focalPoint.x" },
675
+ { path: "results.item.coverMedia.image.focalPoint.y" },
676
+ { path: "results.item.coverMedia.video.thumbnail.focalPoint.x" },
677
+ { path: "results.item.coverMedia.video.thumbnail.focalPoint.y" },
678
+ { path: "results.item.heroImage.focalPoint.x" },
679
+ { path: "results.item.heroImage.focalPoint.y" },
680
+ { path: "results.item.media.wixMedia.image.focalPoint.x" },
681
+ { path: "results.item.media.wixMedia.image.focalPoint.y" },
682
+ {
683
+ path: "results.item.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
684
+ },
685
+ {
686
+ path: "results.item.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
687
+ },
688
+ {
689
+ path: "results.item.media.wixMedia.videoV2.posters.focalPoint.x"
690
+ },
691
+ {
692
+ path: "results.item.media.wixMedia.videoV2.posters.focalPoint.y"
693
+ },
694
+ {
695
+ path: "results.item.richContent.nodes.galleryData.items.image.media.duration"
696
+ },
697
+ {
698
+ path: "results.item.richContent.nodes.galleryData.items.video.media.duration"
699
+ },
700
+ {
701
+ path: "results.item.richContent.nodes.galleryData.items.video.thumbnail.duration"
702
+ },
703
+ {
704
+ path: "results.item.richContent.nodes.galleryData.options.item.ratio"
705
+ },
706
+ {
707
+ path: "results.item.richContent.nodes.imageData.image.duration"
708
+ },
709
+ {
710
+ path: "results.item.richContent.nodes.mapData.mapSettings.lat"
711
+ },
712
+ {
713
+ path: "results.item.richContent.nodes.mapData.mapSettings.lng"
714
+ },
715
+ {
716
+ path: "results.item.richContent.nodes.pollData.poll.image.duration"
717
+ },
718
+ {
719
+ path: "results.item.richContent.nodes.pollData.poll.options.image.duration"
720
+ },
721
+ {
722
+ path: "results.item.richContent.nodes.pollData.design.poll.background.image.duration"
723
+ },
724
+ {
725
+ path: "results.item.richContent.nodes.appEmbedData.image.duration"
726
+ },
727
+ {
728
+ path: "results.item.richContent.nodes.videoData.video.duration"
729
+ },
730
+ {
731
+ path: "results.item.richContent.nodes.videoData.thumbnail.duration"
732
+ },
733
+ {
734
+ path: "results.item.richContent.nodes.audioData.audio.duration"
735
+ },
736
+ {
737
+ path: "results.item.richContent.nodes.audioData.coverImage.duration"
738
+ }
739
+ ]
740
+ }
741
+ ])
742
+ };
743
+ return metadata;
744
+ }
745
+ return __bulkUpdateDraftPosts;
746
+ }
747
+ function listDeletedDraftPosts(payload) {
748
+ function __listDeletedDraftPosts({ host }) {
749
+ const metadata = {
750
+ entityFqdn: "wix.blog.v3.draft",
751
+ method: "GET",
752
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.ListDeletedDraftPosts",
753
+ packageName: PACKAGE_NAME,
754
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(
755
+ { protoPath: "/v3/draft-posts/trash-bin", data: payload, host }
756
+ ),
757
+ params: toURLSearchParams(payload),
758
+ transformResponse: (payload2) => transformPaths(payload2, [
759
+ {
760
+ transformFn: transformRESTTimestampToSDKTimestamp,
761
+ paths: [
762
+ { path: "draftPosts.editedDate" },
763
+ { path: "draftPosts.scheduledPublishDate" },
764
+ { path: "draftPosts.firstPublishedDate" },
765
+ { path: "draftPosts.createdDate" },
766
+ { path: "draftPosts.coverMedia.image.urlExpirationDate" },
767
+ {
768
+ path: "draftPosts.coverMedia.video.thumbnail.urlExpirationDate"
769
+ },
770
+ { path: "draftPosts.heroImage.urlExpirationDate" },
771
+ { path: "draftPosts.richContent.metadata.createdTimestamp" },
772
+ { path: "draftPosts.richContent.metadata.updatedTimestamp" },
773
+ { path: "draftPosts.moderationDetails.submittedDate" },
774
+ { path: "draftPosts.moderationDetails.moderationDate" },
775
+ { path: "draftPosts.media.wixMedia.image.urlExpirationDate" },
776
+ { path: "draftPosts.media.wixMedia.videoV2.urlExpirationDate" },
777
+ {
778
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.urlExpirationDate"
779
+ },
780
+ {
781
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
782
+ },
783
+ {
784
+ path: "draftPosts.media.wixMedia.videoV2.posters.urlExpirationDate"
785
+ }
786
+ ]
787
+ },
788
+ {
789
+ transformFn: transformRESTFloatToSDKFloat,
790
+ paths: [
791
+ { path: "draftPosts.coverMedia.image.focalPoint.x" },
792
+ { path: "draftPosts.coverMedia.image.focalPoint.y" },
793
+ { path: "draftPosts.coverMedia.video.thumbnail.focalPoint.x" },
794
+ { path: "draftPosts.coverMedia.video.thumbnail.focalPoint.y" },
795
+ { path: "draftPosts.heroImage.focalPoint.x" },
796
+ { path: "draftPosts.heroImage.focalPoint.y" },
797
+ { path: "draftPosts.media.wixMedia.image.focalPoint.x" },
798
+ { path: "draftPosts.media.wixMedia.image.focalPoint.y" },
799
+ {
800
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
801
+ },
802
+ {
803
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
804
+ },
805
+ {
806
+ path: "draftPosts.media.wixMedia.videoV2.posters.focalPoint.x"
807
+ },
808
+ {
809
+ path: "draftPosts.media.wixMedia.videoV2.posters.focalPoint.y"
810
+ },
811
+ {
812
+ path: "draftPosts.richContent.nodes.galleryData.items.image.media.duration"
813
+ },
814
+ {
815
+ path: "draftPosts.richContent.nodes.galleryData.items.video.media.duration"
816
+ },
817
+ {
818
+ path: "draftPosts.richContent.nodes.galleryData.items.video.thumbnail.duration"
819
+ },
820
+ {
821
+ path: "draftPosts.richContent.nodes.galleryData.options.item.ratio"
822
+ },
823
+ { path: "draftPosts.richContent.nodes.imageData.image.duration" },
824
+ { path: "draftPosts.richContent.nodes.mapData.mapSettings.lat" },
825
+ { path: "draftPosts.richContent.nodes.mapData.mapSettings.lng" },
826
+ {
827
+ path: "draftPosts.richContent.nodes.pollData.poll.image.duration"
828
+ },
829
+ {
830
+ path: "draftPosts.richContent.nodes.pollData.poll.options.image.duration"
831
+ },
832
+ {
833
+ path: "draftPosts.richContent.nodes.pollData.design.poll.background.image.duration"
834
+ },
835
+ {
836
+ path: "draftPosts.richContent.nodes.appEmbedData.image.duration"
837
+ },
838
+ { path: "draftPosts.richContent.nodes.videoData.video.duration" },
839
+ {
840
+ path: "draftPosts.richContent.nodes.videoData.thumbnail.duration"
841
+ },
842
+ { path: "draftPosts.richContent.nodes.audioData.audio.duration" },
843
+ {
844
+ path: "draftPosts.richContent.nodes.audioData.coverImage.duration"
845
+ }
846
+ ]
847
+ }
848
+ ])
849
+ };
850
+ return metadata;
851
+ }
852
+ return __listDeletedDraftPosts;
853
+ }
854
+ function getDraftPost(payload) {
855
+ function __getDraftPost({ host }) {
856
+ const metadata = {
857
+ entityFqdn: "wix.blog.v3.draft",
858
+ method: "GET",
859
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.GetDraftPost",
860
+ packageName: PACKAGE_NAME,
861
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(
862
+ { protoPath: "/v3/draft-posts/{draftPostId}", data: payload, host }
863
+ ),
864
+ params: toURLSearchParams(payload),
865
+ transformResponse: (payload2) => transformPaths(payload2, [
866
+ {
867
+ transformFn: transformRESTTimestampToSDKTimestamp,
868
+ paths: [
869
+ { path: "draftPost.editedDate" },
870
+ { path: "draftPost.scheduledPublishDate" },
871
+ { path: "draftPost.firstPublishedDate" },
872
+ { path: "draftPost.createdDate" },
873
+ { path: "draftPost.coverMedia.image.urlExpirationDate" },
874
+ {
875
+ path: "draftPost.coverMedia.video.thumbnail.urlExpirationDate"
876
+ },
877
+ { path: "draftPost.heroImage.urlExpirationDate" },
878
+ { path: "draftPost.richContent.metadata.createdTimestamp" },
879
+ { path: "draftPost.richContent.metadata.updatedTimestamp" },
880
+ { path: "draftPost.moderationDetails.submittedDate" },
881
+ { path: "draftPost.moderationDetails.moderationDate" },
882
+ { path: "draftPost.media.wixMedia.image.urlExpirationDate" },
883
+ { path: "draftPost.media.wixMedia.videoV2.urlExpirationDate" },
884
+ {
885
+ path: "draftPost.media.wixMedia.videoV2.resolutions.urlExpirationDate"
886
+ },
887
+ {
888
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
889
+ },
890
+ {
891
+ path: "draftPost.media.wixMedia.videoV2.posters.urlExpirationDate"
892
+ }
893
+ ]
894
+ },
895
+ {
896
+ transformFn: transformRESTFloatToSDKFloat,
897
+ paths: [
898
+ { path: "draftPost.coverMedia.image.focalPoint.x" },
899
+ { path: "draftPost.coverMedia.image.focalPoint.y" },
900
+ { path: "draftPost.coverMedia.video.thumbnail.focalPoint.x" },
901
+ { path: "draftPost.coverMedia.video.thumbnail.focalPoint.y" },
902
+ { path: "draftPost.heroImage.focalPoint.x" },
903
+ { path: "draftPost.heroImage.focalPoint.y" },
904
+ { path: "draftPost.media.wixMedia.image.focalPoint.x" },
905
+ { path: "draftPost.media.wixMedia.image.focalPoint.y" },
906
+ {
907
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
908
+ },
909
+ {
910
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
911
+ },
912
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.x" },
913
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.y" },
914
+ {
915
+ path: "draftPost.richContent.nodes.galleryData.items.image.media.duration"
916
+ },
917
+ {
918
+ path: "draftPost.richContent.nodes.galleryData.items.video.media.duration"
919
+ },
920
+ {
921
+ path: "draftPost.richContent.nodes.galleryData.items.video.thumbnail.duration"
922
+ },
923
+ {
924
+ path: "draftPost.richContent.nodes.galleryData.options.item.ratio"
925
+ },
926
+ { path: "draftPost.richContent.nodes.imageData.image.duration" },
927
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lat" },
928
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lng" },
929
+ {
930
+ path: "draftPost.richContent.nodes.pollData.poll.image.duration"
931
+ },
932
+ {
933
+ path: "draftPost.richContent.nodes.pollData.poll.options.image.duration"
934
+ },
935
+ {
936
+ path: "draftPost.richContent.nodes.pollData.design.poll.background.image.duration"
937
+ },
938
+ {
939
+ path: "draftPost.richContent.nodes.appEmbedData.image.duration"
940
+ },
941
+ { path: "draftPost.richContent.nodes.videoData.video.duration" },
942
+ {
943
+ path: "draftPost.richContent.nodes.videoData.thumbnail.duration"
944
+ },
945
+ { path: "draftPost.richContent.nodes.audioData.audio.duration" },
946
+ {
947
+ path: "draftPost.richContent.nodes.audioData.coverImage.duration"
948
+ }
949
+ ]
950
+ }
951
+ ])
952
+ };
953
+ return metadata;
954
+ }
955
+ return __getDraftPost;
956
+ }
957
+ function updateDraftPost(payload) {
958
+ function __updateDraftPost({ host }) {
959
+ const serializedData = transformPaths(payload, [
960
+ {
961
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
962
+ paths: [{ path: "fieldMask" }]
963
+ },
964
+ {
965
+ transformFn: transformSDKTimestampToRESTTimestamp,
966
+ paths: [
967
+ { path: "scheduledPublishDate" },
968
+ { path: "draftPost.editedDate" },
969
+ { path: "draftPost.scheduledPublishDate" },
970
+ { path: "draftPost.firstPublishedDate" },
971
+ { path: "draftPost.createdDate" },
972
+ { path: "draftPost.coverMedia.image.urlExpirationDate" },
973
+ { path: "draftPost.coverMedia.video.thumbnail.urlExpirationDate" },
974
+ { path: "draftPost.heroImage.urlExpirationDate" },
975
+ { path: "draftPost.richContent.metadata.createdTimestamp" },
976
+ { path: "draftPost.richContent.metadata.updatedTimestamp" },
977
+ { path: "draftPost.moderationDetails.submittedDate" },
978
+ { path: "draftPost.moderationDetails.moderationDate" },
979
+ { path: "draftPost.media.wixMedia.image.urlExpirationDate" },
980
+ { path: "draftPost.media.wixMedia.videoV2.urlExpirationDate" },
981
+ {
982
+ path: "draftPost.media.wixMedia.videoV2.resolutions.urlExpirationDate"
983
+ },
984
+ {
985
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
986
+ },
987
+ {
988
+ path: "draftPost.media.wixMedia.videoV2.posters.urlExpirationDate"
989
+ }
990
+ ]
991
+ },
992
+ {
993
+ transformFn: transformSDKFloatToRESTFloat,
994
+ paths: [
995
+ { path: "draftPost.coverMedia.image.focalPoint.x" },
996
+ { path: "draftPost.coverMedia.image.focalPoint.y" },
997
+ { path: "draftPost.coverMedia.video.thumbnail.focalPoint.x" },
998
+ { path: "draftPost.coverMedia.video.thumbnail.focalPoint.y" },
999
+ { path: "draftPost.heroImage.focalPoint.x" },
1000
+ { path: "draftPost.heroImage.focalPoint.y" },
1001
+ { path: "draftPost.media.wixMedia.image.focalPoint.x" },
1002
+ { path: "draftPost.media.wixMedia.image.focalPoint.y" },
1003
+ {
1004
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
1005
+ },
1006
+ {
1007
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
1008
+ },
1009
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.x" },
1010
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.y" },
1011
+ {
1012
+ path: "draftPost.richContent.nodes.galleryData.items.image.media.duration"
1013
+ },
1014
+ {
1015
+ path: "draftPost.richContent.nodes.galleryData.items.video.media.duration"
1016
+ },
1017
+ {
1018
+ path: "draftPost.richContent.nodes.galleryData.items.video.thumbnail.duration"
1019
+ },
1020
+ {
1021
+ path: "draftPost.richContent.nodes.galleryData.options.item.ratio"
1022
+ },
1023
+ { path: "draftPost.richContent.nodes.imageData.image.duration" },
1024
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lat" },
1025
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lng" },
1026
+ { path: "draftPost.richContent.nodes.pollData.poll.image.duration" },
1027
+ {
1028
+ path: "draftPost.richContent.nodes.pollData.poll.options.image.duration"
1029
+ },
1030
+ {
1031
+ path: "draftPost.richContent.nodes.pollData.design.poll.background.image.duration"
1032
+ },
1033
+ { path: "draftPost.richContent.nodes.appEmbedData.image.duration" },
1034
+ { path: "draftPost.richContent.nodes.videoData.video.duration" },
1035
+ { path: "draftPost.richContent.nodes.videoData.thumbnail.duration" },
1036
+ { path: "draftPost.richContent.nodes.audioData.audio.duration" },
1037
+ { path: "draftPost.richContent.nodes.audioData.coverImage.duration" }
1038
+ ]
1039
+ }
1040
+ ]);
1041
+ const metadata = {
1042
+ entityFqdn: "wix.blog.v3.draft",
1043
+ method: "PATCH",
1044
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.UpdateDraftPost",
1045
+ packageName: PACKAGE_NAME,
1046
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(
1047
+ {
1048
+ protoPath: "/v3/draft-posts/{draftPost.id}",
1049
+ data: serializedData,
1050
+ host
1051
+ }
1052
+ ),
1053
+ data: serializedData,
1054
+ transformResponse: (payload2) => transformPaths(payload2, [
1055
+ {
1056
+ transformFn: transformRESTTimestampToSDKTimestamp,
1057
+ paths: [
1058
+ { path: "draftPost.editedDate" },
1059
+ { path: "draftPost.scheduledPublishDate" },
1060
+ { path: "draftPost.firstPublishedDate" },
1061
+ { path: "draftPost.createdDate" },
1062
+ { path: "draftPost.coverMedia.image.urlExpirationDate" },
1063
+ {
1064
+ path: "draftPost.coverMedia.video.thumbnail.urlExpirationDate"
1065
+ },
1066
+ { path: "draftPost.heroImage.urlExpirationDate" },
1067
+ { path: "draftPost.richContent.metadata.createdTimestamp" },
1068
+ { path: "draftPost.richContent.metadata.updatedTimestamp" },
1069
+ { path: "draftPost.moderationDetails.submittedDate" },
1070
+ { path: "draftPost.moderationDetails.moderationDate" },
1071
+ { path: "draftPost.media.wixMedia.image.urlExpirationDate" },
1072
+ { path: "draftPost.media.wixMedia.videoV2.urlExpirationDate" },
1073
+ {
1074
+ path: "draftPost.media.wixMedia.videoV2.resolutions.urlExpirationDate"
1075
+ },
1076
+ {
1077
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
1078
+ },
1079
+ {
1080
+ path: "draftPost.media.wixMedia.videoV2.posters.urlExpirationDate"
1081
+ }
1082
+ ]
1083
+ },
1084
+ {
1085
+ transformFn: transformRESTFloatToSDKFloat,
1086
+ paths: [
1087
+ { path: "draftPost.coverMedia.image.focalPoint.x" },
1088
+ { path: "draftPost.coverMedia.image.focalPoint.y" },
1089
+ { path: "draftPost.coverMedia.video.thumbnail.focalPoint.x" },
1090
+ { path: "draftPost.coverMedia.video.thumbnail.focalPoint.y" },
1091
+ { path: "draftPost.heroImage.focalPoint.x" },
1092
+ { path: "draftPost.heroImage.focalPoint.y" },
1093
+ { path: "draftPost.media.wixMedia.image.focalPoint.x" },
1094
+ { path: "draftPost.media.wixMedia.image.focalPoint.y" },
1095
+ {
1096
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
1097
+ },
1098
+ {
1099
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
1100
+ },
1101
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.x" },
1102
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.y" },
1103
+ {
1104
+ path: "draftPost.richContent.nodes.galleryData.items.image.media.duration"
1105
+ },
1106
+ {
1107
+ path: "draftPost.richContent.nodes.galleryData.items.video.media.duration"
1108
+ },
1109
+ {
1110
+ path: "draftPost.richContent.nodes.galleryData.items.video.thumbnail.duration"
1111
+ },
1112
+ {
1113
+ path: "draftPost.richContent.nodes.galleryData.options.item.ratio"
1114
+ },
1115
+ { path: "draftPost.richContent.nodes.imageData.image.duration" },
1116
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lat" },
1117
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lng" },
1118
+ {
1119
+ path: "draftPost.richContent.nodes.pollData.poll.image.duration"
1120
+ },
1121
+ {
1122
+ path: "draftPost.richContent.nodes.pollData.poll.options.image.duration"
1123
+ },
1124
+ {
1125
+ path: "draftPost.richContent.nodes.pollData.design.poll.background.image.duration"
1126
+ },
1127
+ {
1128
+ path: "draftPost.richContent.nodes.appEmbedData.image.duration"
1129
+ },
1130
+ { path: "draftPost.richContent.nodes.videoData.video.duration" },
1131
+ {
1132
+ path: "draftPost.richContent.nodes.videoData.thumbnail.duration"
1133
+ },
1134
+ { path: "draftPost.richContent.nodes.audioData.audio.duration" },
1135
+ {
1136
+ path: "draftPost.richContent.nodes.audioData.coverImage.duration"
1137
+ }
1138
+ ]
1139
+ }
1140
+ ])
1141
+ };
1142
+ return metadata;
1143
+ }
1144
+ return __updateDraftPost;
1145
+ }
1146
+ function deleteDraftPost(payload) {
1147
+ function __deleteDraftPost({ host }) {
1148
+ const metadata = {
1149
+ entityFqdn: "wix.blog.v3.draft",
1150
+ method: "DELETE",
1151
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.DeleteDraftPost",
1152
+ packageName: PACKAGE_NAME,
1153
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(
1154
+ { protoPath: "/v3/draft-posts/{draftPostId}", data: payload, host }
1155
+ ),
1156
+ params: toURLSearchParams(payload)
1157
+ };
1158
+ return metadata;
1159
+ }
1160
+ return __deleteDraftPost;
1161
+ }
1162
+ function removeFromTrashBin(payload) {
1163
+ function __removeFromTrashBin({ host }) {
1164
+ const metadata = {
1165
+ entityFqdn: "wix.blog.v3.draft",
1166
+ method: "DELETE",
1167
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.RemoveFromTrashBin",
1168
+ packageName: PACKAGE_NAME,
1169
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(
1170
+ {
1171
+ protoPath: "/v3/draft-posts/trash-bin/{draftPostId}",
1172
+ data: payload,
1173
+ host
1174
+ }
1175
+ ),
1176
+ params: toURLSearchParams(payload)
1177
+ };
1178
+ return metadata;
1179
+ }
1180
+ return __removeFromTrashBin;
1181
+ }
1182
+ function bulkDeleteDraftPosts(payload) {
1183
+ function __bulkDeleteDraftPosts({ host }) {
1184
+ const metadata = {
1185
+ entityFqdn: "wix.blog.v3.draft",
1186
+ method: "DELETE",
1187
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.BulkDeleteDraftPosts",
1188
+ packageName: PACKAGE_NAME,
1189
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(
1190
+ { protoPath: "/v3/bulk/draft-posts", data: payload, host }
1191
+ ),
1192
+ params: toURLSearchParams(payload),
1193
+ transformResponse: (payload2) => transformPaths(payload2, [
1194
+ {
1195
+ transformFn: transformRESTTimestampToSDKTimestamp,
1196
+ paths: [
1197
+ { path: "results.item.editedDate" },
1198
+ { path: "results.item.scheduledPublishDate" },
1199
+ { path: "results.item.firstPublishedDate" },
1200
+ { path: "results.item.createdDate" },
1201
+ { path: "results.item.coverMedia.image.urlExpirationDate" },
1202
+ {
1203
+ path: "results.item.coverMedia.video.thumbnail.urlExpirationDate"
1204
+ },
1205
+ { path: "results.item.heroImage.urlExpirationDate" },
1206
+ { path: "results.item.richContent.metadata.createdTimestamp" },
1207
+ { path: "results.item.richContent.metadata.updatedTimestamp" },
1208
+ { path: "results.item.moderationDetails.submittedDate" },
1209
+ { path: "results.item.moderationDetails.moderationDate" },
1210
+ { path: "results.item.media.wixMedia.image.urlExpirationDate" },
1211
+ { path: "results.item.media.wixMedia.videoV2.urlExpirationDate" },
1212
+ {
1213
+ path: "results.item.media.wixMedia.videoV2.resolutions.urlExpirationDate"
1214
+ },
1215
+ {
1216
+ path: "results.item.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
1217
+ },
1218
+ {
1219
+ path: "results.item.media.wixMedia.videoV2.posters.urlExpirationDate"
1220
+ }
1221
+ ]
1222
+ },
1223
+ {
1224
+ transformFn: transformRESTFloatToSDKFloat,
1225
+ paths: [
1226
+ { path: "results.item.coverMedia.image.focalPoint.x" },
1227
+ { path: "results.item.coverMedia.image.focalPoint.y" },
1228
+ { path: "results.item.coverMedia.video.thumbnail.focalPoint.x" },
1229
+ { path: "results.item.coverMedia.video.thumbnail.focalPoint.y" },
1230
+ { path: "results.item.heroImage.focalPoint.x" },
1231
+ { path: "results.item.heroImage.focalPoint.y" },
1232
+ { path: "results.item.media.wixMedia.image.focalPoint.x" },
1233
+ { path: "results.item.media.wixMedia.image.focalPoint.y" },
1234
+ {
1235
+ path: "results.item.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
1236
+ },
1237
+ {
1238
+ path: "results.item.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
1239
+ },
1240
+ {
1241
+ path: "results.item.media.wixMedia.videoV2.posters.focalPoint.x"
1242
+ },
1243
+ {
1244
+ path: "results.item.media.wixMedia.videoV2.posters.focalPoint.y"
1245
+ },
1246
+ {
1247
+ path: "results.item.richContent.nodes.galleryData.items.image.media.duration"
1248
+ },
1249
+ {
1250
+ path: "results.item.richContent.nodes.galleryData.items.video.media.duration"
1251
+ },
1252
+ {
1253
+ path: "results.item.richContent.nodes.galleryData.items.video.thumbnail.duration"
1254
+ },
1255
+ {
1256
+ path: "results.item.richContent.nodes.galleryData.options.item.ratio"
1257
+ },
1258
+ {
1259
+ path: "results.item.richContent.nodes.imageData.image.duration"
1260
+ },
1261
+ {
1262
+ path: "results.item.richContent.nodes.mapData.mapSettings.lat"
1263
+ },
1264
+ {
1265
+ path: "results.item.richContent.nodes.mapData.mapSettings.lng"
1266
+ },
1267
+ {
1268
+ path: "results.item.richContent.nodes.pollData.poll.image.duration"
1269
+ },
1270
+ {
1271
+ path: "results.item.richContent.nodes.pollData.poll.options.image.duration"
1272
+ },
1273
+ {
1274
+ path: "results.item.richContent.nodes.pollData.design.poll.background.image.duration"
1275
+ },
1276
+ {
1277
+ path: "results.item.richContent.nodes.appEmbedData.image.duration"
1278
+ },
1279
+ {
1280
+ path: "results.item.richContent.nodes.videoData.video.duration"
1281
+ },
1282
+ {
1283
+ path: "results.item.richContent.nodes.videoData.thumbnail.duration"
1284
+ },
1285
+ {
1286
+ path: "results.item.richContent.nodes.audioData.audio.duration"
1287
+ },
1288
+ {
1289
+ path: "results.item.richContent.nodes.audioData.coverImage.duration"
1290
+ }
1291
+ ]
1292
+ }
1293
+ ])
1294
+ };
1295
+ return metadata;
1296
+ }
1297
+ return __bulkDeleteDraftPosts;
1298
+ }
1299
+ function listDraftPosts(payload) {
1300
+ function __listDraftPosts({ host }) {
1301
+ const metadata = {
1302
+ entityFqdn: "wix.blog.v3.draft",
1303
+ method: "GET",
1304
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.ListDraftPosts",
1305
+ packageName: PACKAGE_NAME,
1306
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(
1307
+ { protoPath: "/v3/draft-posts", data: payload, host }
1308
+ ),
1309
+ params: toURLSearchParams(payload),
1310
+ transformResponse: (payload2) => transformPaths(payload2, [
1311
+ {
1312
+ transformFn: transformRESTTimestampToSDKTimestamp,
1313
+ paths: [
1314
+ { path: "draftPosts.editedDate" },
1315
+ { path: "draftPosts.scheduledPublishDate" },
1316
+ { path: "draftPosts.firstPublishedDate" },
1317
+ { path: "draftPosts.createdDate" },
1318
+ { path: "draftPosts.coverMedia.image.urlExpirationDate" },
1319
+ {
1320
+ path: "draftPosts.coverMedia.video.thumbnail.urlExpirationDate"
1321
+ },
1322
+ { path: "draftPosts.heroImage.urlExpirationDate" },
1323
+ { path: "draftPosts.richContent.metadata.createdTimestamp" },
1324
+ { path: "draftPosts.richContent.metadata.updatedTimestamp" },
1325
+ { path: "draftPosts.moderationDetails.submittedDate" },
1326
+ { path: "draftPosts.moderationDetails.moderationDate" },
1327
+ { path: "draftPosts.media.wixMedia.image.urlExpirationDate" },
1328
+ { path: "draftPosts.media.wixMedia.videoV2.urlExpirationDate" },
1329
+ {
1330
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.urlExpirationDate"
1331
+ },
1332
+ {
1333
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
1334
+ },
1335
+ {
1336
+ path: "draftPosts.media.wixMedia.videoV2.posters.urlExpirationDate"
1337
+ }
1338
+ ]
1339
+ },
1340
+ {
1341
+ transformFn: transformRESTFloatToSDKFloat,
1342
+ paths: [
1343
+ { path: "draftPosts.coverMedia.image.focalPoint.x" },
1344
+ { path: "draftPosts.coverMedia.image.focalPoint.y" },
1345
+ { path: "draftPosts.coverMedia.video.thumbnail.focalPoint.x" },
1346
+ { path: "draftPosts.coverMedia.video.thumbnail.focalPoint.y" },
1347
+ { path: "draftPosts.heroImage.focalPoint.x" },
1348
+ { path: "draftPosts.heroImage.focalPoint.y" },
1349
+ { path: "draftPosts.media.wixMedia.image.focalPoint.x" },
1350
+ { path: "draftPosts.media.wixMedia.image.focalPoint.y" },
1351
+ {
1352
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
1353
+ },
1354
+ {
1355
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
1356
+ },
1357
+ {
1358
+ path: "draftPosts.media.wixMedia.videoV2.posters.focalPoint.x"
1359
+ },
1360
+ {
1361
+ path: "draftPosts.media.wixMedia.videoV2.posters.focalPoint.y"
1362
+ },
1363
+ {
1364
+ path: "draftPosts.richContent.nodes.galleryData.items.image.media.duration"
1365
+ },
1366
+ {
1367
+ path: "draftPosts.richContent.nodes.galleryData.items.video.media.duration"
1368
+ },
1369
+ {
1370
+ path: "draftPosts.richContent.nodes.galleryData.items.video.thumbnail.duration"
1371
+ },
1372
+ {
1373
+ path: "draftPosts.richContent.nodes.galleryData.options.item.ratio"
1374
+ },
1375
+ { path: "draftPosts.richContent.nodes.imageData.image.duration" },
1376
+ { path: "draftPosts.richContent.nodes.mapData.mapSettings.lat" },
1377
+ { path: "draftPosts.richContent.nodes.mapData.mapSettings.lng" },
1378
+ {
1379
+ path: "draftPosts.richContent.nodes.pollData.poll.image.duration"
1380
+ },
1381
+ {
1382
+ path: "draftPosts.richContent.nodes.pollData.poll.options.image.duration"
1383
+ },
1384
+ {
1385
+ path: "draftPosts.richContent.nodes.pollData.design.poll.background.image.duration"
1386
+ },
1387
+ {
1388
+ path: "draftPosts.richContent.nodes.appEmbedData.image.duration"
1389
+ },
1390
+ { path: "draftPosts.richContent.nodes.videoData.video.duration" },
1391
+ {
1392
+ path: "draftPosts.richContent.nodes.videoData.thumbnail.duration"
1393
+ },
1394
+ { path: "draftPosts.richContent.nodes.audioData.audio.duration" },
1395
+ {
1396
+ path: "draftPosts.richContent.nodes.audioData.coverImage.duration"
1397
+ }
1398
+ ]
1399
+ }
1400
+ ])
1401
+ };
1402
+ return metadata;
1403
+ }
1404
+ return __listDraftPosts;
1405
+ }
1406
+ function getDeletedDraftPost(payload) {
1407
+ function __getDeletedDraftPost({ host }) {
1408
+ const metadata = {
1409
+ entityFqdn: "wix.blog.v3.draft",
1410
+ method: "GET",
1411
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.GetDeletedDraftPost",
1412
+ packageName: PACKAGE_NAME,
1413
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(
1414
+ {
1415
+ protoPath: "/v3/draft-posts/trash-bin/{draftPostId}",
1416
+ data: payload,
1417
+ host
1418
+ }
1419
+ ),
1420
+ params: toURLSearchParams(payload),
1421
+ transformResponse: (payload2) => transformPaths(payload2, [
1422
+ {
1423
+ transformFn: transformRESTTimestampToSDKTimestamp,
1424
+ paths: [
1425
+ { path: "draftPost.editedDate" },
1426
+ { path: "draftPost.scheduledPublishDate" },
1427
+ { path: "draftPost.firstPublishedDate" },
1428
+ { path: "draftPost.createdDate" },
1429
+ { path: "draftPost.coverMedia.image.urlExpirationDate" },
1430
+ {
1431
+ path: "draftPost.coverMedia.video.thumbnail.urlExpirationDate"
1432
+ },
1433
+ { path: "draftPost.heroImage.urlExpirationDate" },
1434
+ { path: "draftPost.richContent.metadata.createdTimestamp" },
1435
+ { path: "draftPost.richContent.metadata.updatedTimestamp" },
1436
+ { path: "draftPost.moderationDetails.submittedDate" },
1437
+ { path: "draftPost.moderationDetails.moderationDate" },
1438
+ { path: "draftPost.media.wixMedia.image.urlExpirationDate" },
1439
+ { path: "draftPost.media.wixMedia.videoV2.urlExpirationDate" },
1440
+ {
1441
+ path: "draftPost.media.wixMedia.videoV2.resolutions.urlExpirationDate"
1442
+ },
1443
+ {
1444
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
1445
+ },
1446
+ {
1447
+ path: "draftPost.media.wixMedia.videoV2.posters.urlExpirationDate"
1448
+ }
1449
+ ]
1450
+ },
1451
+ {
1452
+ transformFn: transformRESTFloatToSDKFloat,
1453
+ paths: [
1454
+ { path: "draftPost.coverMedia.image.focalPoint.x" },
1455
+ { path: "draftPost.coverMedia.image.focalPoint.y" },
1456
+ { path: "draftPost.coverMedia.video.thumbnail.focalPoint.x" },
1457
+ { path: "draftPost.coverMedia.video.thumbnail.focalPoint.y" },
1458
+ { path: "draftPost.heroImage.focalPoint.x" },
1459
+ { path: "draftPost.heroImage.focalPoint.y" },
1460
+ { path: "draftPost.media.wixMedia.image.focalPoint.x" },
1461
+ { path: "draftPost.media.wixMedia.image.focalPoint.y" },
1462
+ {
1463
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
1464
+ },
1465
+ {
1466
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
1467
+ },
1468
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.x" },
1469
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.y" },
1470
+ {
1471
+ path: "draftPost.richContent.nodes.galleryData.items.image.media.duration"
1472
+ },
1473
+ {
1474
+ path: "draftPost.richContent.nodes.galleryData.items.video.media.duration"
1475
+ },
1476
+ {
1477
+ path: "draftPost.richContent.nodes.galleryData.items.video.thumbnail.duration"
1478
+ },
1479
+ {
1480
+ path: "draftPost.richContent.nodes.galleryData.options.item.ratio"
1481
+ },
1482
+ { path: "draftPost.richContent.nodes.imageData.image.duration" },
1483
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lat" },
1484
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lng" },
1485
+ {
1486
+ path: "draftPost.richContent.nodes.pollData.poll.image.duration"
1487
+ },
1488
+ {
1489
+ path: "draftPost.richContent.nodes.pollData.poll.options.image.duration"
1490
+ },
1491
+ {
1492
+ path: "draftPost.richContent.nodes.pollData.design.poll.background.image.duration"
1493
+ },
1494
+ {
1495
+ path: "draftPost.richContent.nodes.appEmbedData.image.duration"
1496
+ },
1497
+ { path: "draftPost.richContent.nodes.videoData.video.duration" },
1498
+ {
1499
+ path: "draftPost.richContent.nodes.videoData.thumbnail.duration"
1500
+ },
1501
+ { path: "draftPost.richContent.nodes.audioData.audio.duration" },
1502
+ {
1503
+ path: "draftPost.richContent.nodes.audioData.coverImage.duration"
1504
+ }
1505
+ ]
1506
+ }
1507
+ ])
1508
+ };
1509
+ return metadata;
1510
+ }
1511
+ return __getDeletedDraftPost;
1512
+ }
1513
+ function restoreFromTrashBin(payload) {
1514
+ function __restoreFromTrashBin({ host }) {
1515
+ const metadata = {
1516
+ entityFqdn: "wix.blog.v3.draft",
1517
+ method: "POST",
1518
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.RestoreFromTrashBin",
1519
+ packageName: PACKAGE_NAME,
1520
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(
1521
+ {
1522
+ protoPath: "/v3/draft-posts/trash-bin/{draftPostId}/restore",
1523
+ data: payload,
1524
+ host
1525
+ }
1526
+ ),
1527
+ data: payload,
1528
+ transformResponse: (payload2) => transformPaths(payload2, [
1529
+ {
1530
+ transformFn: transformRESTTimestampToSDKTimestamp,
1531
+ paths: [
1532
+ { path: "draftPost.editedDate" },
1533
+ { path: "draftPost.scheduledPublishDate" },
1534
+ { path: "draftPost.firstPublishedDate" },
1535
+ { path: "draftPost.createdDate" },
1536
+ { path: "draftPost.coverMedia.image.urlExpirationDate" },
1537
+ {
1538
+ path: "draftPost.coverMedia.video.thumbnail.urlExpirationDate"
1539
+ },
1540
+ { path: "draftPost.heroImage.urlExpirationDate" },
1541
+ { path: "draftPost.richContent.metadata.createdTimestamp" },
1542
+ { path: "draftPost.richContent.metadata.updatedTimestamp" },
1543
+ { path: "draftPost.moderationDetails.submittedDate" },
1544
+ { path: "draftPost.moderationDetails.moderationDate" },
1545
+ { path: "draftPost.media.wixMedia.image.urlExpirationDate" },
1546
+ { path: "draftPost.media.wixMedia.videoV2.urlExpirationDate" },
1547
+ {
1548
+ path: "draftPost.media.wixMedia.videoV2.resolutions.urlExpirationDate"
1549
+ },
1550
+ {
1551
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
1552
+ },
1553
+ {
1554
+ path: "draftPost.media.wixMedia.videoV2.posters.urlExpirationDate"
1555
+ }
1556
+ ]
1557
+ },
1558
+ {
1559
+ transformFn: transformRESTFloatToSDKFloat,
1560
+ paths: [
1561
+ { path: "draftPost.coverMedia.image.focalPoint.x" },
1562
+ { path: "draftPost.coverMedia.image.focalPoint.y" },
1563
+ { path: "draftPost.coverMedia.video.thumbnail.focalPoint.x" },
1564
+ { path: "draftPost.coverMedia.video.thumbnail.focalPoint.y" },
1565
+ { path: "draftPost.heroImage.focalPoint.x" },
1566
+ { path: "draftPost.heroImage.focalPoint.y" },
1567
+ { path: "draftPost.media.wixMedia.image.focalPoint.x" },
1568
+ { path: "draftPost.media.wixMedia.image.focalPoint.y" },
1569
+ {
1570
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
1571
+ },
1572
+ {
1573
+ path: "draftPost.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
1574
+ },
1575
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.x" },
1576
+ { path: "draftPost.media.wixMedia.videoV2.posters.focalPoint.y" },
1577
+ {
1578
+ path: "draftPost.richContent.nodes.galleryData.items.image.media.duration"
1579
+ },
1580
+ {
1581
+ path: "draftPost.richContent.nodes.galleryData.items.video.media.duration"
1582
+ },
1583
+ {
1584
+ path: "draftPost.richContent.nodes.galleryData.items.video.thumbnail.duration"
1585
+ },
1586
+ {
1587
+ path: "draftPost.richContent.nodes.galleryData.options.item.ratio"
1588
+ },
1589
+ { path: "draftPost.richContent.nodes.imageData.image.duration" },
1590
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lat" },
1591
+ { path: "draftPost.richContent.nodes.mapData.mapSettings.lng" },
1592
+ {
1593
+ path: "draftPost.richContent.nodes.pollData.poll.image.duration"
1594
+ },
1595
+ {
1596
+ path: "draftPost.richContent.nodes.pollData.poll.options.image.duration"
1597
+ },
1598
+ {
1599
+ path: "draftPost.richContent.nodes.pollData.design.poll.background.image.duration"
1600
+ },
1601
+ {
1602
+ path: "draftPost.richContent.nodes.appEmbedData.image.duration"
1603
+ },
1604
+ { path: "draftPost.richContent.nodes.videoData.video.duration" },
1605
+ {
1606
+ path: "draftPost.richContent.nodes.videoData.thumbnail.duration"
1607
+ },
1608
+ { path: "draftPost.richContent.nodes.audioData.audio.duration" },
1609
+ {
1610
+ path: "draftPost.richContent.nodes.audioData.coverImage.duration"
1611
+ }
1612
+ ]
1613
+ }
1614
+ ])
1615
+ };
1616
+ return metadata;
1617
+ }
1618
+ return __restoreFromTrashBin;
1619
+ }
1620
+ function queryDraftPosts(payload) {
1621
+ function __queryDraftPosts({ host }) {
1622
+ const metadata = {
1623
+ entityFqdn: "wix.blog.v3.draft",
1624
+ method: "POST",
1625
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.QueryDraftPosts",
1626
+ packageName: PACKAGE_NAME,
1627
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(
1628
+ { protoPath: "/v3/draft-posts/query", data: payload, host }
1629
+ ),
1630
+ data: payload,
1631
+ transformResponse: (payload2) => transformPaths(payload2, [
1632
+ {
1633
+ transformFn: transformRESTTimestampToSDKTimestamp,
1634
+ paths: [
1635
+ { path: "draftPosts.editedDate" },
1636
+ { path: "draftPosts.scheduledPublishDate" },
1637
+ { path: "draftPosts.firstPublishedDate" },
1638
+ { path: "draftPosts.createdDate" },
1639
+ { path: "draftPosts.coverMedia.image.urlExpirationDate" },
1640
+ {
1641
+ path: "draftPosts.coverMedia.video.thumbnail.urlExpirationDate"
1642
+ },
1643
+ { path: "draftPosts.heroImage.urlExpirationDate" },
1644
+ { path: "draftPosts.richContent.metadata.createdTimestamp" },
1645
+ { path: "draftPosts.richContent.metadata.updatedTimestamp" },
1646
+ { path: "draftPosts.moderationDetails.submittedDate" },
1647
+ { path: "draftPosts.moderationDetails.moderationDate" },
1648
+ { path: "draftPosts.media.wixMedia.image.urlExpirationDate" },
1649
+ { path: "draftPosts.media.wixMedia.videoV2.urlExpirationDate" },
1650
+ {
1651
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.urlExpirationDate"
1652
+ },
1653
+ {
1654
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
1655
+ },
1656
+ {
1657
+ path: "draftPosts.media.wixMedia.videoV2.posters.urlExpirationDate"
1658
+ }
1659
+ ]
1660
+ },
1661
+ {
1662
+ transformFn: transformRESTFloatToSDKFloat,
1663
+ paths: [
1664
+ { path: "draftPosts.coverMedia.image.focalPoint.x" },
1665
+ { path: "draftPosts.coverMedia.image.focalPoint.y" },
1666
+ { path: "draftPosts.coverMedia.video.thumbnail.focalPoint.x" },
1667
+ { path: "draftPosts.coverMedia.video.thumbnail.focalPoint.y" },
1668
+ { path: "draftPosts.heroImage.focalPoint.x" },
1669
+ { path: "draftPosts.heroImage.focalPoint.y" },
1670
+ { path: "draftPosts.media.wixMedia.image.focalPoint.x" },
1671
+ { path: "draftPosts.media.wixMedia.image.focalPoint.y" },
1672
+ {
1673
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
1674
+ },
1675
+ {
1676
+ path: "draftPosts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
1677
+ },
1678
+ {
1679
+ path: "draftPosts.media.wixMedia.videoV2.posters.focalPoint.x"
1680
+ },
1681
+ {
1682
+ path: "draftPosts.media.wixMedia.videoV2.posters.focalPoint.y"
1683
+ },
1684
+ {
1685
+ path: "draftPosts.richContent.nodes.galleryData.items.image.media.duration"
1686
+ },
1687
+ {
1688
+ path: "draftPosts.richContent.nodes.galleryData.items.video.media.duration"
1689
+ },
1690
+ {
1691
+ path: "draftPosts.richContent.nodes.galleryData.items.video.thumbnail.duration"
1692
+ },
1693
+ {
1694
+ path: "draftPosts.richContent.nodes.galleryData.options.item.ratio"
1695
+ },
1696
+ { path: "draftPosts.richContent.nodes.imageData.image.duration" },
1697
+ { path: "draftPosts.richContent.nodes.mapData.mapSettings.lat" },
1698
+ { path: "draftPosts.richContent.nodes.mapData.mapSettings.lng" },
1699
+ {
1700
+ path: "draftPosts.richContent.nodes.pollData.poll.image.duration"
1701
+ },
1702
+ {
1703
+ path: "draftPosts.richContent.nodes.pollData.poll.options.image.duration"
1704
+ },
1705
+ {
1706
+ path: "draftPosts.richContent.nodes.pollData.design.poll.background.image.duration"
1707
+ },
1708
+ {
1709
+ path: "draftPosts.richContent.nodes.appEmbedData.image.duration"
1710
+ },
1711
+ { path: "draftPosts.richContent.nodes.videoData.video.duration" },
1712
+ {
1713
+ path: "draftPosts.richContent.nodes.videoData.thumbnail.duration"
1714
+ },
1715
+ { path: "draftPosts.richContent.nodes.audioData.audio.duration" },
1716
+ {
1717
+ path: "draftPosts.richContent.nodes.audioData.coverImage.duration"
1718
+ }
1719
+ ]
1720
+ }
1721
+ ])
1722
+ };
1723
+ return metadata;
1724
+ }
1725
+ return __queryDraftPosts;
1726
+ }
1727
+ function publishDraftPost(payload) {
1728
+ function __publishDraftPost({ host }) {
1729
+ const metadata = {
1730
+ entityFqdn: "wix.blog.v3.draft",
1731
+ method: "POST",
1732
+ methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.PublishDraftPost",
1733
+ packageName: PACKAGE_NAME,
1734
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(
1735
+ {
1736
+ protoPath: "/v3/draft-posts/{draftPostId}/publish",
1737
+ data: payload,
1738
+ host
1739
+ }
1740
+ ),
1741
+ data: payload
1742
+ };
1743
+ return metadata;
1744
+ }
1745
+ return __publishDraftPost;
1746
+ }
1747
+
1748
+ // src/blog-v3-draft-draft-posts.universal.ts
1749
+ import { transformSDKImageToRESTImage } from "@wix/sdk-runtime/transformations/image";
1750
+ import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/image";
1751
+ import { transformSDKVideoV2ToRESTVideoV2 } from "@wix/sdk-runtime/transformations/video-v2";
1752
+ import { transformRESTVideoV2ToSDKVideoV2 } from "@wix/sdk-runtime/transformations/video-v2";
1753
+ import { transformSDKVideoToRESTVideo } from "@wix/sdk-runtime/transformations/video";
1754
+ import { transformRESTVideoToSDKVideo } from "@wix/sdk-runtime/transformations/video";
1755
+ import { transformSDKPageURLToRESTPageURL } from "@wix/sdk-runtime/transformations/page-url";
1756
+ import { transformRESTPageURLToSDKPageURL } from "@wix/sdk-runtime/transformations/page-url";
1757
+ import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
1758
+ var Origin = /* @__PURE__ */ ((Origin2) => {
1759
+ Origin2["UNKNOWN"] = "UNKNOWN";
1760
+ Origin2["ADMIN"] = "ADMIN";
1761
+ Origin2["ADD_CATEGORIES"] = "ADD_CATEGORIES";
1762
+ Origin2["AUTO_SAVE"] = "AUTO_SAVE";
1763
+ Origin2["COPY_TEMPLATE"] = "COPY_TEMPLATE";
1764
+ Origin2["IMPORT"] = "IMPORT";
1765
+ Origin2["IMPORT_BULK"] = "IMPORT_BULK";
1766
+ Origin2["IMPORT_HTML"] = "IMPORT_HTML";
1767
+ Origin2["IMPORT_PATCH"] = "IMPORT_PATCH";
1768
+ Origin2["LANGUAGE_CHANGE"] = "LANGUAGE_CHANGE";
1769
+ Origin2["MANUAL_SAVE"] = "MANUAL_SAVE";
1770
+ Origin2["MIGRATION"] = "MIGRATION";
1771
+ Origin2["MODERATION"] = "MODERATION";
1772
+ Origin2["MOVE_TO_TRASH"] = "MOVE_TO_TRASH";
1773
+ Origin2["PRICING_PLANS_CHANGE"] = "PRICING_PLANS_CHANGE";
1774
+ Origin2["PROVISION"] = "PROVISION";
1775
+ Origin2["PUBLISH"] = "PUBLISH";
1776
+ Origin2["REASSIGN_OWNER"] = "REASSIGN_OWNER";
1777
+ Origin2["REBLOG"] = "REBLOG";
1778
+ Origin2["RESTORE"] = "RESTORE";
1779
+ Origin2["REVERT_TO_DRAFT"] = "REVERT_TO_DRAFT";
1780
+ Origin2["TRANSLATION"] = "TRANSLATION";
1781
+ Origin2["UNPUBLISH"] = "UNPUBLISH";
1782
+ Origin2["UNSCHEDULE"] = "UNSCHEDULE";
1783
+ Origin2["NEW_EDIT_SESSION"] = "NEW_EDIT_SESSION";
1784
+ Origin2["SCHEDULING_SERVICE_SCHEDULE"] = "SCHEDULING_SERVICE_SCHEDULE";
1785
+ Origin2["SCHEDULING_SERVICE_UNSCHEDULE"] = "SCHEDULING_SERVICE_UNSCHEDULE";
1786
+ Origin2["SCHEDULING_SERVICE_PUBLISH"] = "SCHEDULING_SERVICE_PUBLISH";
1787
+ Origin2["SCHEDULE"] = "SCHEDULE";
1788
+ Origin2["REMOVE_FROM_MODERATION"] = "REMOVE_FROM_MODERATION";
1789
+ Origin2["REJECT_FROM_MODERATION"] = "REJECT_FROM_MODERATION";
1790
+ Origin2["APPROVE_IN_MODERATION"] = "APPROVE_IN_MODERATION";
1791
+ Origin2["DELETE_TAG"] = "DELETE_TAG";
1792
+ Origin2["PIN"] = "PIN";
1793
+ Origin2["UNPIN"] = "UNPIN";
1794
+ Origin2["AI_AUTO_SAVE"] = "AI_AUTO_SAVE";
1795
+ return Origin2;
1796
+ })(Origin || {});
1797
+ var NodeType = /* @__PURE__ */ ((NodeType2) => {
1798
+ NodeType2["PARAGRAPH"] = "PARAGRAPH";
1799
+ NodeType2["TEXT"] = "TEXT";
1800
+ NodeType2["HEADING"] = "HEADING";
1801
+ NodeType2["BULLETED_LIST"] = "BULLETED_LIST";
1802
+ NodeType2["ORDERED_LIST"] = "ORDERED_LIST";
1803
+ NodeType2["LIST_ITEM"] = "LIST_ITEM";
1804
+ NodeType2["BLOCKQUOTE"] = "BLOCKQUOTE";
1805
+ NodeType2["CODE_BLOCK"] = "CODE_BLOCK";
1806
+ NodeType2["VIDEO"] = "VIDEO";
1807
+ NodeType2["DIVIDER"] = "DIVIDER";
1808
+ NodeType2["FILE"] = "FILE";
1809
+ NodeType2["GALLERY"] = "GALLERY";
1810
+ NodeType2["GIF"] = "GIF";
1811
+ NodeType2["HTML"] = "HTML";
1812
+ NodeType2["IMAGE"] = "IMAGE";
1813
+ NodeType2["LINK_PREVIEW"] = "LINK_PREVIEW";
1814
+ NodeType2["MAP"] = "MAP";
1815
+ NodeType2["POLL"] = "POLL";
1816
+ NodeType2["APP_EMBED"] = "APP_EMBED";
1817
+ NodeType2["BUTTON"] = "BUTTON";
1818
+ NodeType2["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
1819
+ NodeType2["TABLE"] = "TABLE";
1820
+ NodeType2["EMBED"] = "EMBED";
1821
+ NodeType2["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
1822
+ NodeType2["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
1823
+ NodeType2["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
1824
+ NodeType2["TABLE_CELL"] = "TABLE_CELL";
1825
+ NodeType2["TABLE_ROW"] = "TABLE_ROW";
1826
+ NodeType2["EXTERNAL"] = "EXTERNAL";
1827
+ NodeType2["AUDIO"] = "AUDIO";
1828
+ NodeType2["CAPTION"] = "CAPTION";
1829
+ NodeType2["LAYOUT"] = "LAYOUT";
1830
+ NodeType2["LAYOUT_CELL"] = "LAYOUT_CELL";
1831
+ return NodeType2;
1832
+ })(NodeType || {});
1833
+ var WidthType = /* @__PURE__ */ ((WidthType2) => {
1834
+ WidthType2["CONTENT"] = "CONTENT";
1835
+ WidthType2["SMALL"] = "SMALL";
1836
+ WidthType2["ORIGINAL"] = "ORIGINAL";
1837
+ WidthType2["FULL_WIDTH"] = "FULL_WIDTH";
1838
+ return WidthType2;
1839
+ })(WidthType || {});
1840
+ var PluginContainerDataAlignment = /* @__PURE__ */ ((PluginContainerDataAlignment2) => {
1841
+ PluginContainerDataAlignment2["CENTER"] = "CENTER";
1842
+ PluginContainerDataAlignment2["LEFT"] = "LEFT";
1843
+ PluginContainerDataAlignment2["RIGHT"] = "RIGHT";
1844
+ return PluginContainerDataAlignment2;
1845
+ })(PluginContainerDataAlignment || {});
1846
+ var ButtonDataType = /* @__PURE__ */ ((ButtonDataType2) => {
1847
+ ButtonDataType2["LINK"] = "LINK";
1848
+ ButtonDataType2["ACTION"] = "ACTION";
1849
+ return ButtonDataType2;
1850
+ })(ButtonDataType || {});
1851
+ var Target = /* @__PURE__ */ ((Target2) => {
1852
+ Target2["SELF"] = "SELF";
1853
+ Target2["BLANK"] = "BLANK";
1854
+ Target2["PARENT"] = "PARENT";
1855
+ Target2["TOP"] = "TOP";
1856
+ return Target2;
1857
+ })(Target || {});
1858
+ var TextAlignment = /* @__PURE__ */ ((TextAlignment2) => {
1859
+ TextAlignment2["AUTO"] = "AUTO";
1860
+ TextAlignment2["LEFT"] = "LEFT";
1861
+ TextAlignment2["RIGHT"] = "RIGHT";
1862
+ TextAlignment2["CENTER"] = "CENTER";
1863
+ TextAlignment2["JUSTIFY"] = "JUSTIFY";
1864
+ return TextAlignment2;
1865
+ })(TextAlignment || {});
1866
+ var LineStyle = /* @__PURE__ */ ((LineStyle2) => {
1867
+ LineStyle2["SINGLE"] = "SINGLE";
1868
+ LineStyle2["DOUBLE"] = "DOUBLE";
1869
+ LineStyle2["DASHED"] = "DASHED";
1870
+ LineStyle2["DOTTED"] = "DOTTED";
1871
+ return LineStyle2;
1872
+ })(LineStyle || {});
1873
+ var Width = /* @__PURE__ */ ((Width2) => {
1874
+ Width2["LARGE"] = "LARGE";
1875
+ Width2["MEDIUM"] = "MEDIUM";
1876
+ Width2["SMALL"] = "SMALL";
1877
+ return Width2;
1878
+ })(Width || {});
1879
+ var Alignment = /* @__PURE__ */ ((Alignment2) => {
1880
+ Alignment2["CENTER"] = "CENTER";
1881
+ Alignment2["LEFT"] = "LEFT";
1882
+ Alignment2["RIGHT"] = "RIGHT";
1883
+ return Alignment2;
1884
+ })(Alignment || {});
1885
+ var ViewMode = /* @__PURE__ */ ((ViewMode2) => {
1886
+ ViewMode2["NONE"] = "NONE";
1887
+ ViewMode2["FULL"] = "FULL";
1888
+ ViewMode2["MINI"] = "MINI";
1889
+ return ViewMode2;
1890
+ })(ViewMode || {});
1891
+ var LayoutType = /* @__PURE__ */ ((LayoutType2) => {
1892
+ LayoutType2["COLLAGE"] = "COLLAGE";
1893
+ LayoutType2["MASONRY"] = "MASONRY";
1894
+ LayoutType2["GRID"] = "GRID";
1895
+ LayoutType2["THUMBNAIL"] = "THUMBNAIL";
1896
+ LayoutType2["SLIDER"] = "SLIDER";
1897
+ LayoutType2["SLIDESHOW"] = "SLIDESHOW";
1898
+ LayoutType2["PANORAMA"] = "PANORAMA";
1899
+ LayoutType2["COLUMN"] = "COLUMN";
1900
+ LayoutType2["MAGIC"] = "MAGIC";
1901
+ LayoutType2["FULLSIZE"] = "FULLSIZE";
1902
+ return LayoutType2;
1903
+ })(LayoutType || {});
1904
+ var Orientation = /* @__PURE__ */ ((Orientation2) => {
1905
+ Orientation2["ROWS"] = "ROWS";
1906
+ Orientation2["COLUMNS"] = "COLUMNS";
1907
+ return Orientation2;
1908
+ })(Orientation || {});
1909
+ var Crop = /* @__PURE__ */ ((Crop2) => {
1910
+ Crop2["FILL"] = "FILL";
1911
+ Crop2["FIT"] = "FIT";
1912
+ return Crop2;
1913
+ })(Crop || {});
1914
+ var ThumbnailsAlignment = /* @__PURE__ */ ((ThumbnailsAlignment2) => {
1915
+ ThumbnailsAlignment2["TOP"] = "TOP";
1916
+ ThumbnailsAlignment2["RIGHT"] = "RIGHT";
1917
+ ThumbnailsAlignment2["BOTTOM"] = "BOTTOM";
1918
+ ThumbnailsAlignment2["LEFT"] = "LEFT";
1919
+ ThumbnailsAlignment2["NONE"] = "NONE";
1920
+ return ThumbnailsAlignment2;
1921
+ })(ThumbnailsAlignment || {});
1922
+ var GIFType = /* @__PURE__ */ ((GIFType2) => {
1923
+ GIFType2["NORMAL"] = "NORMAL";
1924
+ GIFType2["STICKER"] = "STICKER";
1925
+ return GIFType2;
1926
+ })(GIFType || {});
1927
+ var Source = /* @__PURE__ */ ((Source2) => {
1928
+ Source2["HTML"] = "HTML";
1929
+ Source2["ADSENSE"] = "ADSENSE";
1930
+ return Source2;
1931
+ })(Source || {});
1932
+ var Position = /* @__PURE__ */ ((Position2) => {
1933
+ Position2["START"] = "START";
1934
+ Position2["END"] = "END";
1935
+ Position2["TOP"] = "TOP";
1936
+ Position2["HIDDEN"] = "HIDDEN";
1937
+ return Position2;
1938
+ })(Position || {});
1939
+ var MapType = /* @__PURE__ */ ((MapType2) => {
1940
+ MapType2["ROADMAP"] = "ROADMAP";
1941
+ MapType2["SATELITE"] = "SATELITE";
1942
+ MapType2["HYBRID"] = "HYBRID";
1943
+ MapType2["TERRAIN"] = "TERRAIN";
1944
+ return MapType2;
1945
+ })(MapType || {});
1946
+ var ViewRole = /* @__PURE__ */ ((ViewRole2) => {
1947
+ ViewRole2["CREATOR"] = "CREATOR";
1948
+ ViewRole2["VOTERS"] = "VOTERS";
1949
+ ViewRole2["EVERYONE"] = "EVERYONE";
1950
+ return ViewRole2;
1951
+ })(ViewRole || {});
1952
+ var VoteRole = /* @__PURE__ */ ((VoteRole2) => {
1953
+ VoteRole2["SITE_MEMBERS"] = "SITE_MEMBERS";
1954
+ VoteRole2["ALL"] = "ALL";
1955
+ return VoteRole2;
1956
+ })(VoteRole || {});
1957
+ var PollLayoutType = /* @__PURE__ */ ((PollLayoutType2) => {
1958
+ PollLayoutType2["LIST"] = "LIST";
1959
+ PollLayoutType2["GRID"] = "GRID";
1960
+ return PollLayoutType2;
1961
+ })(PollLayoutType || {});
1962
+ var PollLayoutDirection = /* @__PURE__ */ ((PollLayoutDirection2) => {
1963
+ PollLayoutDirection2["LTR"] = "LTR";
1964
+ PollLayoutDirection2["RTL"] = "RTL";
1965
+ return PollLayoutDirection2;
1966
+ })(PollLayoutDirection || {});
1967
+ var BackgroundType = /* @__PURE__ */ ((BackgroundType2) => {
1968
+ BackgroundType2["COLOR"] = "COLOR";
1969
+ BackgroundType2["IMAGE"] = "IMAGE";
1970
+ BackgroundType2["GRADIENT"] = "GRADIENT";
1971
+ return BackgroundType2;
1972
+ })(BackgroundType || {});
1973
+ var DecorationType = /* @__PURE__ */ ((DecorationType2) => {
1974
+ DecorationType2["BOLD"] = "BOLD";
1975
+ DecorationType2["ITALIC"] = "ITALIC";
1976
+ DecorationType2["UNDERLINE"] = "UNDERLINE";
1977
+ DecorationType2["SPOILER"] = "SPOILER";
1978
+ DecorationType2["ANCHOR"] = "ANCHOR";
1979
+ DecorationType2["MENTION"] = "MENTION";
1980
+ DecorationType2["LINK"] = "LINK";
1981
+ DecorationType2["COLOR"] = "COLOR";
1982
+ DecorationType2["FONT_SIZE"] = "FONT_SIZE";
1983
+ DecorationType2["EXTERNAL"] = "EXTERNAL";
1984
+ DecorationType2["STRIKETHROUGH"] = "STRIKETHROUGH";
1985
+ DecorationType2["SUPERSCRIPT"] = "SUPERSCRIPT";
1986
+ DecorationType2["SUBSCRIPT"] = "SUBSCRIPT";
1987
+ return DecorationType2;
1988
+ })(DecorationType || {});
1989
+ var FontType = /* @__PURE__ */ ((FontType2) => {
1990
+ FontType2["PX"] = "PX";
1991
+ FontType2["EM"] = "EM";
1992
+ return FontType2;
1993
+ })(FontType || {});
1994
+ var AppType = /* @__PURE__ */ ((AppType2) => {
1995
+ AppType2["PRODUCT"] = "PRODUCT";
1996
+ AppType2["EVENT"] = "EVENT";
1997
+ AppType2["BOOKING"] = "BOOKING";
1998
+ return AppType2;
1999
+ })(AppType || {});
2000
+ var InitialExpandedItems = /* @__PURE__ */ ((InitialExpandedItems2) => {
2001
+ InitialExpandedItems2["FIRST"] = "FIRST";
2002
+ InitialExpandedItems2["ALL"] = "ALL";
2003
+ InitialExpandedItems2["NONE"] = "NONE";
2004
+ return InitialExpandedItems2;
2005
+ })(InitialExpandedItems || {});
2006
+ var Direction = /* @__PURE__ */ ((Direction2) => {
2007
+ Direction2["LTR"] = "LTR";
2008
+ Direction2["RTL"] = "RTL";
2009
+ return Direction2;
2010
+ })(Direction || {});
2011
+ var VerticalAlignment = /* @__PURE__ */ ((VerticalAlignment2) => {
2012
+ VerticalAlignment2["TOP"] = "TOP";
2013
+ VerticalAlignment2["MIDDLE"] = "MIDDLE";
2014
+ VerticalAlignment2["BOTTOM"] = "BOTTOM";
2015
+ return VerticalAlignment2;
2016
+ })(VerticalAlignment || {});
2017
+ var NullValue = /* @__PURE__ */ ((NullValue2) => {
2018
+ NullValue2["NULL_VALUE"] = "NULL_VALUE";
2019
+ return NullValue2;
2020
+ })(NullValue || {});
2021
+ var Status = /* @__PURE__ */ ((Status2) => {
2022
+ Status2["UNKNOWN"] = "UNKNOWN";
2023
+ Status2["PUBLISHED"] = "PUBLISHED";
2024
+ Status2["UNPUBLISHED"] = "UNPUBLISHED";
2025
+ Status2["SCHEDULED"] = "SCHEDULED";
2026
+ Status2["DELETED"] = "DELETED";
2027
+ Status2["IN_REVIEW"] = "IN_REVIEW";
2028
+ return Status2;
2029
+ })(Status || {});
2030
+ var ModerationStatusStatus = /* @__PURE__ */ ((ModerationStatusStatus2) => {
2031
+ ModerationStatusStatus2["UNKNOWN"] = "UNKNOWN";
2032
+ ModerationStatusStatus2["APPROVED"] = "APPROVED";
2033
+ ModerationStatusStatus2["REJECTED"] = "REJECTED";
2034
+ return ModerationStatusStatus2;
2035
+ })(ModerationStatusStatus || {});
2036
+ var TotalDraftPostsGroupingField = /* @__PURE__ */ ((TotalDraftPostsGroupingField2) => {
2037
+ TotalDraftPostsGroupingField2["STATUS"] = "STATUS";
2038
+ TotalDraftPostsGroupingField2["LANGUAGE"] = "LANGUAGE";
2039
+ return TotalDraftPostsGroupingField2;
2040
+ })(TotalDraftPostsGroupingField || {});
2041
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
2042
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
2043
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
2044
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
2045
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
2046
+ WebhookIdentityType2["APP"] = "APP";
2047
+ return WebhookIdentityType2;
2048
+ })(WebhookIdentityType || {});
2049
+ var Type = /* @__PURE__ */ ((Type2) => {
2050
+ Type2["UNKNOWN"] = "UNKNOWN";
2051
+ Type2["MANUAL"] = "MANUAL";
2052
+ Type2["AUTO_SAVE"] = "AUTO_SAVE";
2053
+ Type2["PROVISIONING"] = "PROVISIONING";
2054
+ Type2["IMPORT"] = "IMPORT";
2055
+ Type2["AI_AUTO_SAVE"] = "AI_AUTO_SAVE";
2056
+ return Type2;
2057
+ })(Type || {});
2058
+ var Field = /* @__PURE__ */ ((Field2) => {
2059
+ Field2["UNKNOWN"] = "UNKNOWN";
2060
+ Field2["URL"] = "URL";
2061
+ Field2["CONTENT"] = "CONTENT";
2062
+ Field2["RICH_CONTENT"] = "RICH_CONTENT";
2063
+ Field2["GENERATED_EXCERPT"] = "GENERATED_EXCERPT";
2064
+ return Field2;
2065
+ })(Field || {});
2066
+ var Action = /* @__PURE__ */ ((Action2) => {
2067
+ Action2["UPDATE"] = "UPDATE";
2068
+ Action2["UPDATE_PUBLISH"] = "UPDATE_PUBLISH";
2069
+ Action2["UPDATE_SCHEDULE"] = "UPDATE_SCHEDULE";
2070
+ Action2["UPDATE_REVERT_TO_DRAFT"] = "UPDATE_REVERT_TO_DRAFT";
2071
+ Action2["UPDATE_CANCEL_SCHEDULE"] = "UPDATE_CANCEL_SCHEDULE";
2072
+ Action2["UPDATE_REJECT"] = "UPDATE_REJECT";
2073
+ Action2["UPDATE_PUBLICATION"] = "UPDATE_PUBLICATION";
2074
+ return Action2;
2075
+ })(Action || {});
2076
+ var GetDraftPostsSort = /* @__PURE__ */ ((GetDraftPostsSort2) => {
2077
+ GetDraftPostsSort2["EDITING_DATE_DESC"] = "EDITING_DATE_DESC";
2078
+ GetDraftPostsSort2["EDITING_DATE_ASC"] = "EDITING_DATE_ASC";
2079
+ return GetDraftPostsSort2;
2080
+ })(GetDraftPostsSort || {});
2081
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
2082
+ SortOrder2["ASC"] = "ASC";
2083
+ SortOrder2["DESC"] = "DESC";
2084
+ return SortOrder2;
2085
+ })(SortOrder || {});
2086
+ async function createDraftPost2(draftPost, options) {
2087
+ const { httpClient, sideEffects } = arguments[2];
2088
+ const payload = transformPaths2(
2089
+ renameKeysFromSDKRequestToRESTRequest(
2090
+ {
2091
+ draftPost,
2092
+ publish: options?.publish,
2093
+ fieldsets: options?.fieldsets
2094
+ },
2095
+ ["draftPost.richContent"]
2096
+ ),
2097
+ [
2098
+ {
2099
+ transformFn: transformSDKImageToRESTImage,
2100
+ paths: [
2101
+ { path: "draftPost.heroImage" },
2102
+ { path: "draftPost.coverMedia.image" },
2103
+ { path: "draftPost.media.wixMedia.image" }
2104
+ ]
2105
+ },
2106
+ {
2107
+ transformFn: transformSDKPageURLToRESTPageURL,
2108
+ paths: [
2109
+ { path: "draftPost.url" },
2110
+ { path: "draftPost.translations.url" }
2111
+ ]
2112
+ },
2113
+ {
2114
+ transformFn: transformSDKVideoToRESTVideo,
2115
+ paths: [{ path: "draftPost.coverMedia.video" }]
2116
+ },
2117
+ {
2118
+ transformFn: transformSDKVideoV2ToRESTVideoV2,
2119
+ paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
2120
+ }
2121
+ ]
2122
+ );
2123
+ const reqOpts = createDraftPost(payload);
2124
+ sideEffects?.onSiteCall?.();
2125
+ try {
2126
+ const result = await httpClient.request(reqOpts);
2127
+ sideEffects?.onSuccess?.(result);
2128
+ return renameKeysFromRESTResponseToSDKResponse(
2129
+ transformPaths2(result.data, [
2130
+ {
2131
+ transformFn: transformRESTImageToSDKImage,
2132
+ paths: [
2133
+ { path: "draftPost.heroImage" },
2134
+ { path: "draftPost.coverMedia.image" },
2135
+ { path: "draftPost.media.wixMedia.image" }
2136
+ ]
2137
+ },
2138
+ {
2139
+ transformFn: transformRESTPageURLToSDKPageURL,
2140
+ paths: [
2141
+ { path: "draftPost.url" },
2142
+ { path: "draftPost.translations.url" }
2143
+ ]
2144
+ },
2145
+ {
2146
+ transformFn: transformRESTVideoToSDKVideo,
2147
+ paths: [{ path: "draftPost.coverMedia.video" }]
2148
+ },
2149
+ {
2150
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
2151
+ paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
2152
+ }
2153
+ ]),
2154
+ ["draftPost.richContent"]
2155
+ );
2156
+ } catch (err) {
2157
+ const transformedError = sdkTransformError(
2158
+ err,
2159
+ {
2160
+ spreadPathsToArguments: {},
2161
+ explicitPathsToArguments: {
2162
+ draftPost: "$[0]",
2163
+ publish: "$[1].publish",
2164
+ fieldsets: "$[1].fieldsets"
2165
+ },
2166
+ singleArgumentUnchanged: false
2167
+ },
2168
+ ["draftPost", "options"]
2169
+ );
2170
+ sideEffects?.onError?.(err);
2171
+ throw transformedError;
2172
+ }
2173
+ }
2174
+ async function bulkCreateDraftPosts2(draftPosts, options) {
2175
+ const { httpClient, sideEffects } = arguments[2];
2176
+ const payload = transformPaths2(
2177
+ renameKeysFromSDKRequestToRESTRequest(
2178
+ {
2179
+ draftPosts,
2180
+ publish: options?.publish,
2181
+ returnFullEntity: options?.returnFullEntity,
2182
+ fieldsets: options?.fieldsets
2183
+ },
2184
+ ["draftPosts.richContent"]
2185
+ ),
2186
+ [
2187
+ {
2188
+ transformFn: transformSDKImageToRESTImage,
2189
+ paths: [
2190
+ { path: "draftPosts.heroImage" },
2191
+ { path: "draftPosts.coverMedia.image" },
2192
+ { path: "draftPosts.media.wixMedia.image" }
2193
+ ]
2194
+ },
2195
+ {
2196
+ transformFn: transformSDKPageURLToRESTPageURL,
2197
+ paths: [
2198
+ { path: "draftPosts.url" },
2199
+ { path: "draftPosts.translations.url" }
2200
+ ]
2201
+ },
2202
+ {
2203
+ transformFn: transformSDKVideoToRESTVideo,
2204
+ paths: [{ path: "draftPosts.coverMedia.video" }]
2205
+ },
2206
+ {
2207
+ transformFn: transformSDKVideoV2ToRESTVideoV2,
2208
+ paths: [{ path: "draftPosts.media.wixMedia.videoV2" }]
2209
+ }
2210
+ ]
2211
+ );
2212
+ const reqOpts = bulkCreateDraftPosts(payload);
2213
+ sideEffects?.onSiteCall?.();
2214
+ try {
2215
+ const result = await httpClient.request(reqOpts);
2216
+ sideEffects?.onSuccess?.(result);
2217
+ return renameKeysFromRESTResponseToSDKResponse(
2218
+ transformPaths2(result.data, [
2219
+ {
2220
+ transformFn: transformRESTImageToSDKImage,
2221
+ paths: [
2222
+ { path: "results.item.heroImage" },
2223
+ { path: "results.item.coverMedia.image" },
2224
+ { path: "results.item.media.wixMedia.image" }
2225
+ ]
2226
+ },
2227
+ {
2228
+ transformFn: transformRESTPageURLToSDKPageURL,
2229
+ paths: [
2230
+ { path: "results.item.url" },
2231
+ { path: "results.item.translations.url" }
2232
+ ]
2233
+ },
2234
+ {
2235
+ transformFn: transformRESTVideoToSDKVideo,
2236
+ paths: [{ path: "results.item.coverMedia.video" }]
2237
+ },
2238
+ {
2239
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
2240
+ paths: [{ path: "results.item.media.wixMedia.videoV2" }]
2241
+ }
2242
+ ]),
2243
+ ["results.item.richContent"]
2244
+ );
2245
+ } catch (err) {
2246
+ const transformedError = sdkTransformError(
2247
+ err,
2248
+ {
2249
+ spreadPathsToArguments: {},
2250
+ explicitPathsToArguments: {
2251
+ draftPosts: "$[0]",
2252
+ publish: "$[1].publish",
2253
+ returnFullEntity: "$[1].returnFullEntity",
2254
+ fieldsets: "$[1].fieldsets"
2255
+ },
2256
+ singleArgumentUnchanged: false
2257
+ },
2258
+ ["draftPosts", "options"]
2259
+ );
2260
+ sideEffects?.onError?.(err);
2261
+ throw transformedError;
2262
+ }
2263
+ }
2264
+ async function bulkUpdateDraftPosts2(options) {
2265
+ const { httpClient, sideEffects } = arguments[1];
2266
+ const payload = transformPaths2(
2267
+ renameKeysFromSDKRequestToRESTRequest(
2268
+ {
2269
+ draftPosts: options?.draftPosts,
2270
+ action: options?.action,
2271
+ scheduledPublishDate: options?.scheduledPublishDate,
2272
+ returnFullEntity: options?.returnFullEntity,
2273
+ fieldsets: options?.fieldsets
2274
+ },
2275
+ ["draftPosts.draftPost.richContent"]
2276
+ ),
2277
+ [
2278
+ {
2279
+ transformFn: transformSDKImageToRESTImage,
2280
+ paths: [
2281
+ { path: "draftPosts.draftPost.heroImage" },
2282
+ { path: "draftPosts.draftPost.coverMedia.image" },
2283
+ { path: "draftPosts.draftPost.media.wixMedia.image" }
2284
+ ]
2285
+ },
2286
+ {
2287
+ transformFn: transformSDKPageURLToRESTPageURL,
2288
+ paths: [
2289
+ { path: "draftPosts.draftPost.url" },
2290
+ { path: "draftPosts.draftPost.translations.url" }
2291
+ ]
2292
+ },
2293
+ {
2294
+ transformFn: transformSDKVideoToRESTVideo,
2295
+ paths: [{ path: "draftPosts.draftPost.coverMedia.video" }]
2296
+ },
2297
+ {
2298
+ transformFn: transformSDKVideoV2ToRESTVideoV2,
2299
+ paths: [{ path: "draftPosts.draftPost.media.wixMedia.videoV2" }]
2300
+ }
2301
+ ]
2302
+ );
2303
+ const reqOpts = bulkUpdateDraftPosts(payload);
2304
+ sideEffects?.onSiteCall?.();
2305
+ try {
2306
+ const result = await httpClient.request(reqOpts);
2307
+ sideEffects?.onSuccess?.(result);
2308
+ return renameKeysFromRESTResponseToSDKResponse(
2309
+ transformPaths2(result.data, [
2310
+ {
2311
+ transformFn: transformRESTImageToSDKImage,
2312
+ paths: [
2313
+ { path: "results.item.heroImage" },
2314
+ { path: "results.item.coverMedia.image" },
2315
+ { path: "results.item.media.wixMedia.image" }
2316
+ ]
2317
+ },
2318
+ {
2319
+ transformFn: transformRESTPageURLToSDKPageURL,
2320
+ paths: [
2321
+ { path: "results.item.url" },
2322
+ { path: "results.item.translations.url" }
2323
+ ]
2324
+ },
2325
+ {
2326
+ transformFn: transformRESTVideoToSDKVideo,
2327
+ paths: [{ path: "results.item.coverMedia.video" }]
2328
+ },
2329
+ {
2330
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
2331
+ paths: [{ path: "results.item.media.wixMedia.videoV2" }]
2332
+ }
2333
+ ]),
2334
+ ["results.item.richContent"]
2335
+ );
2336
+ } catch (err) {
2337
+ const transformedError = sdkTransformError(
2338
+ err,
2339
+ {
2340
+ spreadPathsToArguments: {},
2341
+ explicitPathsToArguments: {
2342
+ draftPosts: "$[0].draftPosts",
2343
+ action: "$[0].action",
2344
+ scheduledPublishDate: "$[0].scheduledPublishDate",
2345
+ returnFullEntity: "$[0].returnFullEntity",
2346
+ fieldsets: "$[0].fieldsets"
2347
+ },
2348
+ singleArgumentUnchanged: false
2349
+ },
2350
+ ["options"]
2351
+ );
2352
+ sideEffects?.onError?.(err);
2353
+ throw transformedError;
2354
+ }
2355
+ }
2356
+ async function listDeletedDraftPosts2(options) {
2357
+ const { httpClient, sideEffects } = arguments[1];
2358
+ const payload = renameKeysFromSDKRequestToRESTRequest(
2359
+ {
2360
+ language: options?.language,
2361
+ sort: options?.sort,
2362
+ paging: options?.paging,
2363
+ fieldsets: options?.fieldsets,
2364
+ draftPostIds: options?.draftPostIds
2365
+ },
2366
+ []
2367
+ );
2368
+ const reqOpts = listDeletedDraftPosts(payload);
2369
+ sideEffects?.onSiteCall?.();
2370
+ try {
2371
+ const result = await httpClient.request(reqOpts);
2372
+ sideEffects?.onSuccess?.(result);
2373
+ return renameKeysFromRESTResponseToSDKResponse(
2374
+ transformPaths2(result.data, [
2375
+ {
2376
+ transformFn: transformRESTImageToSDKImage,
2377
+ paths: [
2378
+ { path: "draftPosts.heroImage" },
2379
+ { path: "draftPosts.coverMedia.image" },
2380
+ { path: "draftPosts.media.wixMedia.image" }
2381
+ ]
2382
+ },
2383
+ {
2384
+ transformFn: transformRESTPageURLToSDKPageURL,
2385
+ paths: [
2386
+ { path: "draftPosts.url" },
2387
+ { path: "draftPosts.translations.url" }
2388
+ ]
2389
+ },
2390
+ {
2391
+ transformFn: transformRESTVideoToSDKVideo,
2392
+ paths: [{ path: "draftPosts.coverMedia.video" }]
2393
+ },
2394
+ {
2395
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
2396
+ paths: [{ path: "draftPosts.media.wixMedia.videoV2" }]
2397
+ }
2398
+ ]),
2399
+ ["draftPosts.richContent"]
2400
+ );
2401
+ } catch (err) {
2402
+ const transformedError = sdkTransformError(
2403
+ err,
2404
+ {
2405
+ spreadPathsToArguments: {},
2406
+ explicitPathsToArguments: {
2407
+ language: "$[0].language",
2408
+ sort: "$[0].sort",
2409
+ paging: "$[0].paging",
2410
+ fieldsets: "$[0].fieldsets",
2411
+ draftPostIds: "$[0].draftPostIds"
2412
+ },
2413
+ singleArgumentUnchanged: false
2414
+ },
2415
+ ["options"]
2416
+ );
2417
+ sideEffects?.onError?.(err);
2418
+ throw transformedError;
2419
+ }
2420
+ }
2421
+ async function getDraftPost2(draftPostId, options) {
2422
+ const { httpClient, sideEffects } = arguments[2];
2423
+ const payload = renameKeysFromSDKRequestToRESTRequest(
2424
+ { draftPostId, fieldsets: options?.fieldsets },
2425
+ []
2426
+ );
2427
+ const reqOpts = getDraftPost(payload);
2428
+ sideEffects?.onSiteCall?.();
2429
+ try {
2430
+ const result = await httpClient.request(reqOpts);
2431
+ sideEffects?.onSuccess?.(result);
2432
+ return renameKeysFromRESTResponseToSDKResponse(
2433
+ transformPaths2(result.data, [
2434
+ {
2435
+ transformFn: transformRESTImageToSDKImage,
2436
+ paths: [
2437
+ { path: "draftPost.heroImage" },
2438
+ { path: "draftPost.coverMedia.image" },
2439
+ { path: "draftPost.media.wixMedia.image" }
2440
+ ]
2441
+ },
2442
+ {
2443
+ transformFn: transformRESTPageURLToSDKPageURL,
2444
+ paths: [
2445
+ { path: "draftPost.url" },
2446
+ { path: "draftPost.translations.url" }
2447
+ ]
2448
+ },
2449
+ {
2450
+ transformFn: transformRESTVideoToSDKVideo,
2451
+ paths: [{ path: "draftPost.coverMedia.video" }]
2452
+ },
2453
+ {
2454
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
2455
+ paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
2456
+ }
2457
+ ]),
2458
+ ["draftPost.richContent"]
2459
+ );
2460
+ } catch (err) {
2461
+ const transformedError = sdkTransformError(
2462
+ err,
2463
+ {
2464
+ spreadPathsToArguments: {},
2465
+ explicitPathsToArguments: {
2466
+ draftPostId: "$[0]",
2467
+ fieldsets: "$[1].fieldsets"
2468
+ },
2469
+ singleArgumentUnchanged: false
2470
+ },
2471
+ ["draftPostId", "options"]
2472
+ );
2473
+ sideEffects?.onError?.(err);
2474
+ throw transformedError;
2475
+ }
2476
+ }
2477
+ async function updateDraftPost2(_id, draftPost, options) {
2478
+ const { httpClient, sideEffects } = arguments[3];
2479
+ const payload = transformPaths2(
2480
+ renameKeysFromSDKRequestToRESTRequest(
2481
+ {
2482
+ draftPost: { ...draftPost, id: _id },
2483
+ action: options?.action,
2484
+ scheduledPublishDate: options?.scheduledPublishDate,
2485
+ fieldsets: options?.fieldsets
2486
+ },
2487
+ ["draftPost.richContent"]
2488
+ ),
2489
+ [
2490
+ {
2491
+ transformFn: transformSDKImageToRESTImage,
2492
+ paths: [
2493
+ { path: "draftPost.heroImage" },
2494
+ { path: "draftPost.coverMedia.image" },
2495
+ { path: "draftPost.media.wixMedia.image" }
2496
+ ]
2497
+ },
2498
+ {
2499
+ transformFn: transformSDKPageURLToRESTPageURL,
2500
+ paths: [
2501
+ { path: "draftPost.url" },
2502
+ { path: "draftPost.translations.url" }
2503
+ ]
2504
+ },
2505
+ {
2506
+ transformFn: transformSDKVideoToRESTVideo,
2507
+ paths: [{ path: "draftPost.coverMedia.video" }]
2508
+ },
2509
+ {
2510
+ transformFn: transformSDKVideoV2ToRESTVideoV2,
2511
+ paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
2512
+ }
2513
+ ]
2514
+ );
2515
+ const reqOpts = updateDraftPost(payload);
2516
+ sideEffects?.onSiteCall?.();
2517
+ try {
2518
+ const result = await httpClient.request(reqOpts);
2519
+ sideEffects?.onSuccess?.(result);
2520
+ return renameKeysFromRESTResponseToSDKResponse(
2521
+ transformPaths2(result.data, [
2522
+ {
2523
+ transformFn: transformRESTImageToSDKImage,
2524
+ paths: [
2525
+ { path: "draftPost.heroImage" },
2526
+ { path: "draftPost.coverMedia.image" },
2527
+ { path: "draftPost.media.wixMedia.image" }
2528
+ ]
2529
+ },
2530
+ {
2531
+ transformFn: transformRESTPageURLToSDKPageURL,
2532
+ paths: [
2533
+ { path: "draftPost.url" },
2534
+ { path: "draftPost.translations.url" }
2535
+ ]
2536
+ },
2537
+ {
2538
+ transformFn: transformRESTVideoToSDKVideo,
2539
+ paths: [{ path: "draftPost.coverMedia.video" }]
2540
+ },
2541
+ {
2542
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
2543
+ paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
2544
+ }
2545
+ ]),
2546
+ ["draftPost.richContent"]
2547
+ );
2548
+ } catch (err) {
2549
+ const transformedError = sdkTransformError(
2550
+ err,
2551
+ {
2552
+ spreadPathsToArguments: { draftPost: "$[1]" },
2553
+ explicitPathsToArguments: {
2554
+ "draftPost.id": "$[0]",
2555
+ action: "$[2].action",
2556
+ scheduledPublishDate: "$[2].scheduledPublishDate",
2557
+ fieldsets: "$[2].fieldsets"
2558
+ },
2559
+ singleArgumentUnchanged: false
2560
+ },
2561
+ ["_id", "draftPost", "options"]
2562
+ );
2563
+ sideEffects?.onError?.(err);
2564
+ throw transformedError;
2565
+ }
2566
+ }
2567
+ async function deleteDraftPost2(draftPostId, options) {
2568
+ const { httpClient, sideEffects } = arguments[2];
2569
+ const payload = renameKeysFromSDKRequestToRESTRequest(
2570
+ { draftPostId, permanent: options?.permanent },
2571
+ []
2572
+ );
2573
+ const reqOpts = deleteDraftPost(payload);
2574
+ sideEffects?.onSiteCall?.();
2575
+ try {
2576
+ const result = await httpClient.request(reqOpts);
2577
+ sideEffects?.onSuccess?.(result);
2578
+ } catch (err) {
2579
+ const transformedError = sdkTransformError(
2580
+ err,
2581
+ {
2582
+ spreadPathsToArguments: {},
2583
+ explicitPathsToArguments: {
2584
+ draftPostId: "$[0]",
2585
+ permanent: "$[1].permanent"
2586
+ },
2587
+ singleArgumentUnchanged: false
2588
+ },
2589
+ ["draftPostId", "options"]
2590
+ );
2591
+ sideEffects?.onError?.(err);
2592
+ throw transformedError;
2593
+ }
2594
+ }
2595
+ async function removeFromTrashBin2(draftPostId) {
2596
+ const { httpClient, sideEffects } = arguments[1];
2597
+ const payload = renameKeysFromSDKRequestToRESTRequest(
2598
+ { draftPostId },
2599
+ []
2600
+ );
2601
+ const reqOpts = removeFromTrashBin(payload);
2602
+ sideEffects?.onSiteCall?.();
2603
+ try {
2604
+ const result = await httpClient.request(reqOpts);
2605
+ sideEffects?.onSuccess?.(result);
2606
+ } catch (err) {
2607
+ const transformedError = sdkTransformError(
2608
+ err,
2609
+ {
2610
+ spreadPathsToArguments: {},
2611
+ explicitPathsToArguments: { draftPostId: "$[0]" },
2612
+ singleArgumentUnchanged: false
2613
+ },
2614
+ ["draftPostId"]
2615
+ );
2616
+ sideEffects?.onError?.(err);
2617
+ throw transformedError;
2618
+ }
2619
+ }
2620
+ async function bulkDeleteDraftPosts2(postIds, options) {
2621
+ const { httpClient, sideEffects } = arguments[2];
2622
+ const payload = renameKeysFromSDKRequestToRESTRequest(
2623
+ { postIds, permanent: options?.permanent },
2624
+ []
2625
+ );
2626
+ const reqOpts = bulkDeleteDraftPosts(payload);
2627
+ sideEffects?.onSiteCall?.();
2628
+ try {
2629
+ const result = await httpClient.request(reqOpts);
2630
+ sideEffects?.onSuccess?.(result);
2631
+ return renameKeysFromRESTResponseToSDKResponse(
2632
+ transformPaths2(result.data, [
2633
+ {
2634
+ transformFn: transformRESTImageToSDKImage,
2635
+ paths: [
2636
+ { path: "results.item.heroImage" },
2637
+ { path: "results.item.coverMedia.image" },
2638
+ { path: "results.item.media.wixMedia.image" }
2639
+ ]
2640
+ },
2641
+ {
2642
+ transformFn: transformRESTPageURLToSDKPageURL,
2643
+ paths: [
2644
+ { path: "results.item.url" },
2645
+ { path: "results.item.translations.url" }
2646
+ ]
2647
+ },
2648
+ {
2649
+ transformFn: transformRESTVideoToSDKVideo,
2650
+ paths: [{ path: "results.item.coverMedia.video" }]
2651
+ },
2652
+ {
2653
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
2654
+ paths: [{ path: "results.item.media.wixMedia.videoV2" }]
2655
+ }
2656
+ ]),
2657
+ ["results.item.richContent"]
2658
+ );
2659
+ } catch (err) {
2660
+ const transformedError = sdkTransformError(
2661
+ err,
2662
+ {
2663
+ spreadPathsToArguments: {},
2664
+ explicitPathsToArguments: {
2665
+ postIds: "$[0]",
2666
+ permanent: "$[1].permanent"
2667
+ },
2668
+ singleArgumentUnchanged: false
2669
+ },
2670
+ ["postIds", "options"]
2671
+ );
2672
+ sideEffects?.onError?.(err);
2673
+ throw transformedError;
2674
+ }
2675
+ }
2676
+ async function listDraftPosts2(options) {
2677
+ const { httpClient, sideEffects } = arguments[1];
2678
+ const payload = renameKeysFromSDKRequestToRESTRequest(
2679
+ {
2680
+ status: options?.status,
2681
+ language: options?.language,
2682
+ sort: options?.sort,
2683
+ paging: options?.paging,
2684
+ fieldsets: options?.fieldsets
2685
+ },
2686
+ []
2687
+ );
2688
+ const reqOpts = listDraftPosts(payload);
2689
+ sideEffects?.onSiteCall?.();
2690
+ try {
2691
+ const result = await httpClient.request(reqOpts);
2692
+ sideEffects?.onSuccess?.(result);
2693
+ return renameKeysFromRESTResponseToSDKResponse(
2694
+ transformPaths2(result.data, [
2695
+ {
2696
+ transformFn: transformRESTImageToSDKImage,
2697
+ paths: [
2698
+ { path: "draftPosts.heroImage" },
2699
+ { path: "draftPosts.coverMedia.image" },
2700
+ { path: "draftPosts.media.wixMedia.image" }
2701
+ ]
2702
+ },
2703
+ {
2704
+ transformFn: transformRESTPageURLToSDKPageURL,
2705
+ paths: [
2706
+ { path: "draftPosts.url" },
2707
+ { path: "draftPosts.translations.url" }
2708
+ ]
2709
+ },
2710
+ {
2711
+ transformFn: transformRESTVideoToSDKVideo,
2712
+ paths: [{ path: "draftPosts.coverMedia.video" }]
2713
+ },
2714
+ {
2715
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
2716
+ paths: [{ path: "draftPosts.media.wixMedia.videoV2" }]
2717
+ }
2718
+ ]),
2719
+ ["draftPosts.richContent"]
2720
+ );
2721
+ } catch (err) {
2722
+ const transformedError = sdkTransformError(
2723
+ err,
2724
+ {
2725
+ spreadPathsToArguments: {},
2726
+ explicitPathsToArguments: {
2727
+ status: "$[0].status",
2728
+ language: "$[0].language",
2729
+ sort: "$[0].sort",
2730
+ paging: "$[0].paging",
2731
+ fieldsets: "$[0].fieldsets"
2732
+ },
2733
+ singleArgumentUnchanged: false
2734
+ },
2735
+ ["options"]
2736
+ );
2737
+ sideEffects?.onError?.(err);
2738
+ throw transformedError;
2739
+ }
2740
+ }
2741
+ async function getDeletedDraftPost2(draftPostId) {
2742
+ const { httpClient, sideEffects } = arguments[1];
2743
+ const payload = renameKeysFromSDKRequestToRESTRequest(
2744
+ { draftPostId },
2745
+ []
2746
+ );
2747
+ const reqOpts = getDeletedDraftPost(payload);
2748
+ sideEffects?.onSiteCall?.();
2749
+ try {
2750
+ const result = await httpClient.request(reqOpts);
2751
+ sideEffects?.onSuccess?.(result);
2752
+ return renameKeysFromRESTResponseToSDKResponse(
2753
+ transformPaths2(result.data, [
2754
+ {
2755
+ transformFn: transformRESTImageToSDKImage,
2756
+ paths: [
2757
+ { path: "draftPost.heroImage" },
2758
+ { path: "draftPost.coverMedia.image" },
2759
+ { path: "draftPost.media.wixMedia.image" }
2760
+ ]
2761
+ },
2762
+ {
2763
+ transformFn: transformRESTPageURLToSDKPageURL,
2764
+ paths: [
2765
+ { path: "draftPost.url" },
2766
+ { path: "draftPost.translations.url" }
2767
+ ]
2768
+ },
2769
+ {
2770
+ transformFn: transformRESTVideoToSDKVideo,
2771
+ paths: [{ path: "draftPost.coverMedia.video" }]
2772
+ },
2773
+ {
2774
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
2775
+ paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
2776
+ }
2777
+ ]),
2778
+ ["draftPost.richContent"]
2779
+ );
2780
+ } catch (err) {
2781
+ const transformedError = sdkTransformError(
2782
+ err,
2783
+ {
2784
+ spreadPathsToArguments: {},
2785
+ explicitPathsToArguments: { draftPostId: "$[0]" },
2786
+ singleArgumentUnchanged: false
2787
+ },
2788
+ ["draftPostId"]
2789
+ );
2790
+ sideEffects?.onError?.(err);
2791
+ throw transformedError;
2792
+ }
2793
+ }
2794
+ async function restoreFromTrashBin2(draftPostId) {
2795
+ const { httpClient, sideEffects } = arguments[1];
2796
+ const payload = renameKeysFromSDKRequestToRESTRequest(
2797
+ { draftPostId },
2798
+ []
2799
+ );
2800
+ const reqOpts = restoreFromTrashBin(payload);
2801
+ sideEffects?.onSiteCall?.();
2802
+ try {
2803
+ const result = await httpClient.request(reqOpts);
2804
+ sideEffects?.onSuccess?.(result);
2805
+ return renameKeysFromRESTResponseToSDKResponse(
2806
+ transformPaths2(result.data, [
2807
+ {
2808
+ transformFn: transformRESTImageToSDKImage,
2809
+ paths: [
2810
+ { path: "draftPost.heroImage" },
2811
+ { path: "draftPost.coverMedia.image" },
2812
+ { path: "draftPost.media.wixMedia.image" }
2813
+ ]
2814
+ },
2815
+ {
2816
+ transformFn: transformRESTPageURLToSDKPageURL,
2817
+ paths: [
2818
+ { path: "draftPost.url" },
2819
+ { path: "draftPost.translations.url" }
2820
+ ]
2821
+ },
2822
+ {
2823
+ transformFn: transformRESTVideoToSDKVideo,
2824
+ paths: [{ path: "draftPost.coverMedia.video" }]
2825
+ },
2826
+ {
2827
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
2828
+ paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
2829
+ }
2830
+ ]),
2831
+ ["draftPost.richContent"]
2832
+ );
2833
+ } catch (err) {
2834
+ const transformedError = sdkTransformError(
2835
+ err,
2836
+ {
2837
+ spreadPathsToArguments: {},
2838
+ explicitPathsToArguments: { draftPostId: "$[0]" },
2839
+ singleArgumentUnchanged: false
2840
+ },
2841
+ ["draftPostId"]
2842
+ );
2843
+ sideEffects?.onError?.(err);
2844
+ throw transformedError;
2845
+ }
2846
+ }
2847
+ function queryDraftPosts2(options) {
2848
+ const { httpClient, sideEffects } = arguments[1];
2849
+ return queryBuilder({
2850
+ func: async (payload) => {
2851
+ const reqOpts = queryDraftPosts({
2852
+ ...payload,
2853
+ ...options ?? {}
2854
+ });
2855
+ sideEffects?.onSiteCall?.();
2856
+ try {
2857
+ const result = await httpClient.request(reqOpts);
2858
+ sideEffects?.onSuccess?.(result);
2859
+ return result;
2860
+ } catch (err) {
2861
+ sideEffects?.onError?.(err);
2862
+ throw err;
2863
+ }
2864
+ },
2865
+ requestTransformer: (query) => {
2866
+ const args = [query, options];
2867
+ return renameKeysFromSDKRequestToRESTRequest(
2868
+ { ...args?.[1], query: args?.[0] },
2869
+ []
2870
+ );
2871
+ },
2872
+ responseTransformer: ({ data }) => {
2873
+ const transformedData = renameKeysFromRESTResponseToSDKResponse(
2874
+ transformPaths2(data, [
2875
+ {
2876
+ transformFn: transformRESTImageToSDKImage,
2877
+ paths: [
2878
+ { path: "draftPosts.heroImage" },
2879
+ { path: "draftPosts.coverMedia.image" },
2880
+ { path: "draftPosts.media.wixMedia.image" }
2881
+ ]
2882
+ },
2883
+ {
2884
+ transformFn: transformRESTPageURLToSDKPageURL,
2885
+ paths: [
2886
+ { path: "draftPosts.url" },
2887
+ { path: "draftPosts.translations.url" }
2888
+ ]
2889
+ },
2890
+ {
2891
+ transformFn: transformRESTVideoToSDKVideo,
2892
+ paths: [{ path: "draftPosts.coverMedia.video" }]
2893
+ },
2894
+ {
2895
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
2896
+ paths: [{ path: "draftPosts.media.wixMedia.videoV2" }]
2897
+ }
2898
+ ]),
2899
+ ["draftPosts.richContent"]
2900
+ );
2901
+ return {
2902
+ items: transformedData?.draftPosts,
2903
+ pagingMetadata: transformedData?.pagingMetadata
2904
+ };
2905
+ },
2906
+ errorTransformer: (err) => {
2907
+ const transformedError = sdkTransformError(err, {
2908
+ spreadPathsToArguments: {},
2909
+ explicitPathsToArguments: { query: "$[0]" },
2910
+ singleArgumentUnchanged: false
2911
+ });
2912
+ throw transformedError;
2913
+ },
2914
+ pagingMethod: "CURSOR",
2915
+ transformationPaths: {}
2916
+ });
2917
+ }
2918
+ async function publishDraftPost2(draftPostId) {
2919
+ const { httpClient, sideEffects } = arguments[1];
2920
+ const payload = renameKeysFromSDKRequestToRESTRequest(
2921
+ { draftPostId },
2922
+ []
2923
+ );
2924
+ const reqOpts = publishDraftPost(payload);
2925
+ sideEffects?.onSiteCall?.();
2926
+ try {
2927
+ const result = await httpClient.request(reqOpts);
2928
+ sideEffects?.onSuccess?.(result);
2929
+ return renameKeysFromRESTResponseToSDKResponse(result.data, []);
2930
+ } catch (err) {
2931
+ const transformedError = sdkTransformError(
2932
+ err,
2933
+ {
2934
+ spreadPathsToArguments: {},
2935
+ explicitPathsToArguments: { draftPostId: "$[0]" },
2936
+ singleArgumentUnchanged: false
2937
+ },
2938
+ ["draftPostId"]
2939
+ );
2940
+ sideEffects?.onError?.(err);
2941
+ throw transformedError;
2942
+ }
2943
+ }
2944
+ export {
2945
+ Action,
2946
+ Alignment,
2947
+ AppType,
2948
+ BackgroundType,
2949
+ ButtonDataType,
2950
+ Crop,
2951
+ DecorationType,
2952
+ Direction,
2953
+ Field,
2954
+ FontType,
2955
+ GIFType,
2956
+ GetDraftPostsSort,
2957
+ InitialExpandedItems,
2958
+ LayoutType,
2959
+ LineStyle,
2960
+ MapType,
2961
+ ModerationStatusStatus,
2962
+ NodeType,
2963
+ NullValue,
2964
+ Orientation,
2965
+ Origin,
2966
+ PluginContainerDataAlignment,
2967
+ PollLayoutDirection,
2968
+ PollLayoutType,
2969
+ Position,
2970
+ SortOrder,
2971
+ Source,
2972
+ Status,
2973
+ Target,
2974
+ TextAlignment,
2975
+ ThumbnailsAlignment,
2976
+ TotalDraftPostsGroupingField,
2977
+ Type,
2978
+ VerticalAlignment,
2979
+ ViewMode,
2980
+ ViewRole,
2981
+ VoteRole,
2982
+ WebhookIdentityType,
2983
+ Width,
2984
+ WidthType,
2985
+ bulkCreateDraftPosts2 as bulkCreateDraftPosts,
2986
+ bulkDeleteDraftPosts2 as bulkDeleteDraftPosts,
2987
+ bulkUpdateDraftPosts2 as bulkUpdateDraftPosts,
2988
+ createDraftPost2 as createDraftPost,
2989
+ deleteDraftPost2 as deleteDraftPost,
2990
+ getDeletedDraftPost2 as getDeletedDraftPost,
2991
+ getDraftPost2 as getDraftPost,
2992
+ listDeletedDraftPosts2 as listDeletedDraftPosts,
2993
+ listDraftPosts2 as listDraftPosts,
2994
+ publishDraftPost2 as publishDraftPost,
2995
+ queryDraftPosts2 as queryDraftPosts,
2996
+ removeFromTrashBin2 as removeFromTrashBin,
2997
+ restoreFromTrashBin2 as restoreFromTrashBin,
2998
+ updateDraftPost2 as updateDraftPost
2999
+ };
3000
+ //# sourceMappingURL=index.typings.mjs.map