@wix/auto_sdk_blog_draft-posts 1.0.24 → 1.0.25

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