@wix/auto_sdk_blog_draft-posts 1.0.16 → 1.0.17

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 (134) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/blog-v3-draft-draft-posts.context.d.ts +34 -0
  11. package/build/cjs/src/blog-v3-draft-draft-posts.context.js +78 -0
  12. package/build/cjs/src/blog-v3-draft-draft-posts.context.js.map +1 -0
  13. package/build/cjs/src/blog-v3-draft-draft-posts.http.d.ts +83 -0
  14. package/build/cjs/src/blog-v3-draft-draft-posts.http.js +1803 -0
  15. package/build/cjs/src/blog-v3-draft-draft-posts.http.js.map +1 -0
  16. package/build/cjs/src/blog-v3-draft-draft-posts.meta.d.ts +40 -0
  17. package/build/cjs/src/blog-v3-draft-draft-posts.meta.js +294 -0
  18. package/build/cjs/src/blog-v3-draft-draft-posts.meta.js.map +1 -0
  19. package/build/cjs/src/blog-v3-draft-draft-posts.public.d.ts +168 -0
  20. package/build/cjs/src/blog-v3-draft-draft-posts.public.js +339 -0
  21. package/build/cjs/src/blog-v3-draft-draft-posts.public.js.map +1 -0
  22. package/build/cjs/src/blog-v3-draft-draft-posts.types.d.ts +3049 -0
  23. package/build/cjs/src/blog-v3-draft-draft-posts.types.js +477 -0
  24. package/build/cjs/src/blog-v3-draft-draft-posts.types.js.map +1 -0
  25. package/build/{blog-v3-draft-draft-posts.universal-vVP72XfS.d.mts → cjs/src/blog-v3-draft-draft-posts.universal.d.ts} +558 -261
  26. package/build/cjs/src/blog-v3-draft-draft-posts.universal.js +1498 -0
  27. package/build/cjs/src/blog-v3-draft-draft-posts.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/blog-v3-draft-draft-posts.context.d.ts +34 -0
  39. package/build/es/src/blog-v3-draft-draft-posts.context.js +34 -0
  40. package/build/es/src/blog-v3-draft-draft-posts.context.js.map +1 -0
  41. package/build/es/src/blog-v3-draft-draft-posts.http.d.ts +83 -0
  42. package/build/es/src/blog-v3-draft-draft-posts.http.js +1786 -0
  43. package/build/es/src/blog-v3-draft-draft-posts.http.js.map +1 -0
  44. package/build/es/src/blog-v3-draft-draft-posts.meta.d.ts +40 -0
  45. package/build/es/src/blog-v3-draft-draft-posts.meta.js +254 -0
  46. package/build/es/src/blog-v3-draft-draft-posts.meta.js.map +1 -0
  47. package/build/es/src/blog-v3-draft-draft-posts.public.d.ts +168 -0
  48. package/build/es/src/blog-v3-draft-draft-posts.public.js +281 -0
  49. package/build/es/src/blog-v3-draft-draft-posts.public.js.map +1 -0
  50. package/build/es/src/blog-v3-draft-draft-posts.types.d.ts +3049 -0
  51. package/build/es/src/blog-v3-draft-draft-posts.types.js +474 -0
  52. package/build/es/src/blog-v3-draft-draft-posts.types.js.map +1 -0
  53. package/build/{blog-v3-draft-draft-posts.universal-vVP72XfS.d.ts → es/src/blog-v3-draft-draft-posts.universal.d.ts} +558 -261
  54. package/build/es/src/blog-v3-draft-draft-posts.universal.js +1457 -0
  55. package/build/es/src/blog-v3-draft-draft-posts.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/blog-v3-draft-draft-posts.context.d.ts +34 -0
  66. package/build/internal/cjs/src/blog-v3-draft-draft-posts.context.js +78 -0
  67. package/build/internal/cjs/src/blog-v3-draft-draft-posts.context.js.map +1 -0
  68. package/build/internal/cjs/src/blog-v3-draft-draft-posts.http.d.ts +83 -0
  69. package/build/internal/cjs/src/blog-v3-draft-draft-posts.http.js +1803 -0
  70. package/build/internal/cjs/src/blog-v3-draft-draft-posts.http.js.map +1 -0
  71. package/build/internal/cjs/src/blog-v3-draft-draft-posts.meta.d.ts +40 -0
  72. package/build/internal/cjs/src/blog-v3-draft-draft-posts.meta.js +294 -0
  73. package/build/internal/cjs/src/blog-v3-draft-draft-posts.meta.js.map +1 -0
  74. package/build/internal/cjs/src/blog-v3-draft-draft-posts.public.d.ts +168 -0
  75. package/build/internal/cjs/src/blog-v3-draft-draft-posts.public.js +339 -0
  76. package/build/internal/cjs/src/blog-v3-draft-draft-posts.public.js.map +1 -0
  77. package/build/internal/cjs/src/blog-v3-draft-draft-posts.types.d.ts +3049 -0
  78. package/build/internal/cjs/src/blog-v3-draft-draft-posts.types.js +477 -0
  79. package/build/internal/cjs/src/blog-v3-draft-draft-posts.types.js.map +1 -0
  80. package/build/internal/{blog-v3-draft-draft-posts.universal-vVP72XfS.d.ts → cjs/src/blog-v3-draft-draft-posts.universal.d.ts} +558 -261
  81. package/build/internal/cjs/src/blog-v3-draft-draft-posts.universal.js +1498 -0
  82. package/build/internal/cjs/src/blog-v3-draft-draft-posts.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/blog-v3-draft-draft-posts.context.d.ts +34 -0
  93. package/build/internal/es/src/blog-v3-draft-draft-posts.context.js +34 -0
  94. package/build/internal/es/src/blog-v3-draft-draft-posts.context.js.map +1 -0
  95. package/build/internal/es/src/blog-v3-draft-draft-posts.http.d.ts +83 -0
  96. package/build/internal/es/src/blog-v3-draft-draft-posts.http.js +1786 -0
  97. package/build/internal/es/src/blog-v3-draft-draft-posts.http.js.map +1 -0
  98. package/build/internal/es/src/blog-v3-draft-draft-posts.meta.d.ts +40 -0
  99. package/build/internal/es/src/blog-v3-draft-draft-posts.meta.js +254 -0
  100. package/build/internal/es/src/blog-v3-draft-draft-posts.meta.js.map +1 -0
  101. package/build/internal/es/src/blog-v3-draft-draft-posts.public.d.ts +168 -0
  102. package/build/internal/es/src/blog-v3-draft-draft-posts.public.js +281 -0
  103. package/build/internal/es/src/blog-v3-draft-draft-posts.public.js.map +1 -0
  104. package/build/internal/es/src/blog-v3-draft-draft-posts.types.d.ts +3049 -0
  105. package/build/internal/es/src/blog-v3-draft-draft-posts.types.js +474 -0
  106. package/build/internal/es/src/blog-v3-draft-draft-posts.types.js.map +1 -0
  107. package/build/internal/{blog-v3-draft-draft-posts.universal-vVP72XfS.d.mts → es/src/blog-v3-draft-draft-posts.universal.d.ts} +558 -261
  108. package/build/internal/es/src/blog-v3-draft-draft-posts.universal.js +1457 -0
  109. package/build/internal/es/src/blog-v3-draft-draft-posts.universal.js.map +1 -0
  110. package/package.json +11 -12
  111. package/build/index.d.mts +0 -193
  112. package/build/index.d.ts +0 -193
  113. package/build/index.js +0 -3411
  114. package/build/index.js.map +0 -1
  115. package/build/index.mjs +0 -3331
  116. package/build/index.mjs.map +0 -1
  117. package/build/internal/index.d.mts +0 -193
  118. package/build/internal/index.d.ts +0 -193
  119. package/build/internal/index.js +0 -3411
  120. package/build/internal/index.js.map +0 -1
  121. package/build/internal/index.mjs +0 -3331
  122. package/build/internal/index.mjs.map +0 -1
  123. package/build/internal/meta.d.mts +0 -2289
  124. package/build/internal/meta.d.ts +0 -2289
  125. package/build/internal/meta.js +0 -2057
  126. package/build/internal/meta.js.map +0 -1
  127. package/build/internal/meta.mjs +0 -2017
  128. package/build/internal/meta.mjs.map +0 -1
  129. package/build/meta.d.mts +0 -2289
  130. package/build/meta.d.ts +0 -2289
  131. package/build/meta.js +0 -2057
  132. package/build/meta.js.map +0 -1
  133. package/build/meta.mjs +0 -2017
  134. package/build/meta.mjs.map +0 -1
@@ -1,3331 +0,0 @@
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
- draftPost,
2108
- publish: options?.publish,
2109
- fieldsets: options?.fieldsets
2110
- }),
2111
- [
2112
- {
2113
- transformFn: transformSDKImageToRESTImage,
2114
- paths: [
2115
- { path: "draftPost.heroImage" },
2116
- { path: "draftPost.coverMedia.image" },
2117
- { path: "draftPost.media.wixMedia.image" }
2118
- ]
2119
- },
2120
- {
2121
- transformFn: transformSDKPageURLToRESTPageURL,
2122
- paths: [
2123
- { path: "draftPost.url" },
2124
- { path: "draftPost.translations.url" }
2125
- ]
2126
- },
2127
- {
2128
- transformFn: transformSDKVideoToRESTVideo,
2129
- paths: [{ path: "draftPost.coverMedia.video" }]
2130
- },
2131
- {
2132
- transformFn: transformSDKVideoV2ToRESTVideoV2,
2133
- paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
2134
- }
2135
- ]
2136
- );
2137
- const reqOpts = createDraftPost(payload);
2138
- sideEffects?.onSiteCall?.();
2139
- try {
2140
- const result = await httpClient.request(reqOpts);
2141
- sideEffects?.onSuccess?.(result);
2142
- return renameKeysFromRESTResponseToSDKResponse(
2143
- transformPaths2(result.data, [
2144
- {
2145
- transformFn: transformRESTImageToSDKImage,
2146
- paths: [
2147
- { path: "draftPost.heroImage" },
2148
- { path: "draftPost.coverMedia.image" },
2149
- { path: "draftPost.media.wixMedia.image" }
2150
- ]
2151
- },
2152
- {
2153
- transformFn: transformRESTPageURLToSDKPageURL,
2154
- paths: [
2155
- { path: "draftPost.url" },
2156
- { path: "draftPost.translations.url" }
2157
- ]
2158
- },
2159
- {
2160
- transformFn: transformRESTVideoToSDKVideo,
2161
- paths: [{ path: "draftPost.coverMedia.video" }]
2162
- },
2163
- {
2164
- transformFn: transformRESTVideoV2ToSDKVideoV2,
2165
- paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
2166
- }
2167
- ])
2168
- );
2169
- } catch (err) {
2170
- const transformedError = sdkTransformError(
2171
- err,
2172
- {
2173
- spreadPathsToArguments: {},
2174
- explicitPathsToArguments: {
2175
- draftPost: "$[0]",
2176
- publish: "$[1].publish",
2177
- fieldsets: "$[1].fieldsets"
2178
- },
2179
- singleArgumentUnchanged: false
2180
- },
2181
- ["draftPost", "options"]
2182
- );
2183
- sideEffects?.onError?.(err);
2184
- throw transformedError;
2185
- }
2186
- }
2187
- async function bulkCreateDraftPosts2(draftPosts, options) {
2188
- const { httpClient, sideEffects } = arguments[2];
2189
- const payload = transformPaths2(
2190
- renameKeysFromSDKRequestToRESTRequest({
2191
- draftPosts,
2192
- publish: options?.publish,
2193
- returnFullEntity: options?.returnFullEntity,
2194
- fieldsets: options?.fieldsets
2195
- }),
2196
- [
2197
- {
2198
- transformFn: transformSDKImageToRESTImage,
2199
- paths: [
2200
- { path: "draftPosts.heroImage" },
2201
- { path: "draftPosts.coverMedia.image" },
2202
- { path: "draftPosts.media.wixMedia.image" }
2203
- ]
2204
- },
2205
- {
2206
- transformFn: transformSDKPageURLToRESTPageURL,
2207
- paths: [
2208
- { path: "draftPosts.url" },
2209
- { path: "draftPosts.translations.url" }
2210
- ]
2211
- },
2212
- {
2213
- transformFn: transformSDKVideoToRESTVideo,
2214
- paths: [{ path: "draftPosts.coverMedia.video" }]
2215
- },
2216
- {
2217
- transformFn: transformSDKVideoV2ToRESTVideoV2,
2218
- paths: [{ path: "draftPosts.media.wixMedia.videoV2" }]
2219
- }
2220
- ]
2221
- );
2222
- const reqOpts = bulkCreateDraftPosts(payload);
2223
- sideEffects?.onSiteCall?.();
2224
- try {
2225
- const result = await httpClient.request(reqOpts);
2226
- sideEffects?.onSuccess?.(result);
2227
- return renameKeysFromRESTResponseToSDKResponse(
2228
- transformPaths2(result.data, [
2229
- {
2230
- transformFn: transformRESTImageToSDKImage,
2231
- paths: [
2232
- { path: "results.item.heroImage" },
2233
- { path: "results.item.coverMedia.image" },
2234
- { path: "results.item.media.wixMedia.image" }
2235
- ]
2236
- },
2237
- {
2238
- transformFn: transformRESTPageURLToSDKPageURL,
2239
- paths: [
2240
- { path: "results.item.url" },
2241
- { path: "results.item.translations.url" }
2242
- ]
2243
- },
2244
- {
2245
- transformFn: transformRESTVideoToSDKVideo,
2246
- paths: [{ path: "results.item.coverMedia.video" }]
2247
- },
2248
- {
2249
- transformFn: transformRESTVideoV2ToSDKVideoV2,
2250
- paths: [{ path: "results.item.media.wixMedia.videoV2" }]
2251
- }
2252
- ])
2253
- );
2254
- } catch (err) {
2255
- const transformedError = sdkTransformError(
2256
- err,
2257
- {
2258
- spreadPathsToArguments: {},
2259
- explicitPathsToArguments: {
2260
- draftPosts: "$[0]",
2261
- publish: "$[1].publish",
2262
- returnFullEntity: "$[1].returnFullEntity",
2263
- fieldsets: "$[1].fieldsets"
2264
- },
2265
- singleArgumentUnchanged: false
2266
- },
2267
- ["draftPosts", "options"]
2268
- );
2269
- sideEffects?.onError?.(err);
2270
- throw transformedError;
2271
- }
2272
- }
2273
- async function bulkUpdateDraftPosts2(options) {
2274
- const { httpClient, sideEffects } = arguments[1];
2275
- const payload = transformPaths2(
2276
- renameKeysFromSDKRequestToRESTRequest({
2277
- draftPosts: options?.draftPosts,
2278
- action: options?.action,
2279
- scheduledPublishDate: options?.scheduledPublishDate,
2280
- returnFullEntity: options?.returnFullEntity,
2281
- fieldsets: options?.fieldsets
2282
- }),
2283
- [
2284
- {
2285
- transformFn: transformSDKImageToRESTImage,
2286
- paths: [
2287
- { path: "draftPosts.draftPost.heroImage" },
2288
- { path: "draftPosts.draftPost.coverMedia.image" },
2289
- { path: "draftPosts.draftPost.media.wixMedia.image" }
2290
- ]
2291
- },
2292
- {
2293
- transformFn: transformSDKPageURLToRESTPageURL,
2294
- paths: [
2295
- { path: "draftPosts.draftPost.url" },
2296
- { path: "draftPosts.draftPost.translations.url" }
2297
- ]
2298
- },
2299
- {
2300
- transformFn: transformSDKVideoToRESTVideo,
2301
- paths: [{ path: "draftPosts.draftPost.coverMedia.video" }]
2302
- },
2303
- {
2304
- transformFn: transformSDKVideoV2ToRESTVideoV2,
2305
- paths: [{ path: "draftPosts.draftPost.media.wixMedia.videoV2" }]
2306
- }
2307
- ]
2308
- );
2309
- const reqOpts = bulkUpdateDraftPosts(payload);
2310
- sideEffects?.onSiteCall?.();
2311
- try {
2312
- const result = await httpClient.request(reqOpts);
2313
- sideEffects?.onSuccess?.(result);
2314
- return renameKeysFromRESTResponseToSDKResponse(
2315
- transformPaths2(result.data, [
2316
- {
2317
- transformFn: transformRESTImageToSDKImage,
2318
- paths: [
2319
- { path: "results.item.heroImage" },
2320
- { path: "results.item.coverMedia.image" },
2321
- { path: "results.item.media.wixMedia.image" }
2322
- ]
2323
- },
2324
- {
2325
- transformFn: transformRESTPageURLToSDKPageURL,
2326
- paths: [
2327
- { path: "results.item.url" },
2328
- { path: "results.item.translations.url" }
2329
- ]
2330
- },
2331
- {
2332
- transformFn: transformRESTVideoToSDKVideo,
2333
- paths: [{ path: "results.item.coverMedia.video" }]
2334
- },
2335
- {
2336
- transformFn: transformRESTVideoV2ToSDKVideoV2,
2337
- paths: [{ path: "results.item.media.wixMedia.videoV2" }]
2338
- }
2339
- ])
2340
- );
2341
- } catch (err) {
2342
- const transformedError = sdkTransformError(
2343
- err,
2344
- {
2345
- spreadPathsToArguments: {},
2346
- explicitPathsToArguments: {
2347
- draftPosts: "$[0].draftPosts",
2348
- action: "$[0].action",
2349
- scheduledPublishDate: "$[0].scheduledPublishDate",
2350
- returnFullEntity: "$[0].returnFullEntity",
2351
- fieldsets: "$[0].fieldsets"
2352
- },
2353
- singleArgumentUnchanged: false
2354
- },
2355
- ["options"]
2356
- );
2357
- sideEffects?.onError?.(err);
2358
- throw transformedError;
2359
- }
2360
- }
2361
- async function listDeletedDraftPosts2(options) {
2362
- const { httpClient, sideEffects } = arguments[1];
2363
- const payload = renameKeysFromSDKRequestToRESTRequest({
2364
- language: options?.language,
2365
- sort: options?.sort,
2366
- paging: options?.paging,
2367
- fieldsets: options?.fieldsets,
2368
- draftPostIds: options?.draftPostIds
2369
- });
2370
- const reqOpts = listDeletedDraftPosts(payload);
2371
- sideEffects?.onSiteCall?.();
2372
- try {
2373
- const result = await httpClient.request(reqOpts);
2374
- sideEffects?.onSuccess?.(result);
2375
- return renameKeysFromRESTResponseToSDKResponse(
2376
- transformPaths2(result.data, [
2377
- {
2378
- transformFn: transformRESTImageToSDKImage,
2379
- paths: [
2380
- { path: "draftPosts.heroImage" },
2381
- { path: "draftPosts.coverMedia.image" },
2382
- { path: "draftPosts.media.wixMedia.image" }
2383
- ]
2384
- },
2385
- {
2386
- transformFn: transformRESTPageURLToSDKPageURL,
2387
- paths: [
2388
- { path: "draftPosts.url" },
2389
- { path: "draftPosts.translations.url" }
2390
- ]
2391
- },
2392
- {
2393
- transformFn: transformRESTVideoToSDKVideo,
2394
- paths: [{ path: "draftPosts.coverMedia.video" }]
2395
- },
2396
- {
2397
- transformFn: transformRESTVideoV2ToSDKVideoV2,
2398
- paths: [{ path: "draftPosts.media.wixMedia.videoV2" }]
2399
- }
2400
- ])
2401
- );
2402
- } catch (err) {
2403
- const transformedError = sdkTransformError(
2404
- err,
2405
- {
2406
- spreadPathsToArguments: {},
2407
- explicitPathsToArguments: {
2408
- language: "$[0].language",
2409
- sort: "$[0].sort",
2410
- paging: "$[0].paging",
2411
- fieldsets: "$[0].fieldsets",
2412
- draftPostIds: "$[0].draftPostIds"
2413
- },
2414
- singleArgumentUnchanged: false
2415
- },
2416
- ["options"]
2417
- );
2418
- sideEffects?.onError?.(err);
2419
- throw transformedError;
2420
- }
2421
- }
2422
- async function getDraftPost2(draftPostId, options) {
2423
- const { httpClient, sideEffects } = arguments[2];
2424
- const payload = renameKeysFromSDKRequestToRESTRequest({
2425
- draftPostId,
2426
- fieldsets: options?.fieldsets
2427
- });
2428
- const reqOpts = getDraftPost(payload);
2429
- sideEffects?.onSiteCall?.();
2430
- try {
2431
- const result = await httpClient.request(reqOpts);
2432
- sideEffects?.onSuccess?.(result);
2433
- return renameKeysFromRESTResponseToSDKResponse(
2434
- transformPaths2(result.data, [
2435
- {
2436
- transformFn: transformRESTImageToSDKImage,
2437
- paths: [
2438
- { path: "draftPost.heroImage" },
2439
- { path: "draftPost.coverMedia.image" },
2440
- { path: "draftPost.media.wixMedia.image" }
2441
- ]
2442
- },
2443
- {
2444
- transformFn: transformRESTPageURLToSDKPageURL,
2445
- paths: [
2446
- { path: "draftPost.url" },
2447
- { path: "draftPost.translations.url" }
2448
- ]
2449
- },
2450
- {
2451
- transformFn: transformRESTVideoToSDKVideo,
2452
- paths: [{ path: "draftPost.coverMedia.video" }]
2453
- },
2454
- {
2455
- transformFn: transformRESTVideoV2ToSDKVideoV2,
2456
- paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
2457
- }
2458
- ])
2459
- );
2460
- } catch (err) {
2461
- const transformedError = sdkTransformError(
2462
- err,
2463
- {
2464
- spreadPathsToArguments: {},
2465
- explicitPathsToArguments: {
2466
- draftPostId: "$[0]",
2467
- fieldsets: "$[1].fieldsets"
2468
- },
2469
- singleArgumentUnchanged: false
2470
- },
2471
- ["draftPostId", "options"]
2472
- );
2473
- sideEffects?.onError?.(err);
2474
- throw transformedError;
2475
- }
2476
- }
2477
- async function updateDraftPost2(_id, draftPost, options) {
2478
- const { httpClient, sideEffects } = arguments[3];
2479
- const payload = transformPaths2(
2480
- renameKeysFromSDKRequestToRESTRequest({
2481
- draftPost: { ...draftPost, id: _id },
2482
- action: options?.action,
2483
- scheduledPublishDate: options?.scheduledPublishDate,
2484
- fieldsets: options?.fieldsets
2485
- }),
2486
- [
2487
- {
2488
- transformFn: transformSDKImageToRESTImage,
2489
- paths: [
2490
- { path: "draftPost.heroImage" },
2491
- { path: "draftPost.coverMedia.image" },
2492
- { path: "draftPost.media.wixMedia.image" }
2493
- ]
2494
- },
2495
- {
2496
- transformFn: transformSDKPageURLToRESTPageURL,
2497
- paths: [
2498
- { path: "draftPost.url" },
2499
- { path: "draftPost.translations.url" }
2500
- ]
2501
- },
2502
- {
2503
- transformFn: transformSDKVideoToRESTVideo,
2504
- paths: [{ path: "draftPost.coverMedia.video" }]
2505
- },
2506
- {
2507
- transformFn: transformSDKVideoV2ToRESTVideoV2,
2508
- paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
2509
- }
2510
- ]
2511
- );
2512
- const reqOpts = updateDraftPost(payload);
2513
- sideEffects?.onSiteCall?.();
2514
- try {
2515
- const result = await httpClient.request(reqOpts);
2516
- sideEffects?.onSuccess?.(result);
2517
- return renameKeysFromRESTResponseToSDKResponse(
2518
- transformPaths2(result.data, [
2519
- {
2520
- transformFn: transformRESTImageToSDKImage,
2521
- paths: [
2522
- { path: "draftPost.heroImage" },
2523
- { path: "draftPost.coverMedia.image" },
2524
- { path: "draftPost.media.wixMedia.image" }
2525
- ]
2526
- },
2527
- {
2528
- transformFn: transformRESTPageURLToSDKPageURL,
2529
- paths: [
2530
- { path: "draftPost.url" },
2531
- { path: "draftPost.translations.url" }
2532
- ]
2533
- },
2534
- {
2535
- transformFn: transformRESTVideoToSDKVideo,
2536
- paths: [{ path: "draftPost.coverMedia.video" }]
2537
- },
2538
- {
2539
- transformFn: transformRESTVideoV2ToSDKVideoV2,
2540
- paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
2541
- }
2542
- ])
2543
- );
2544
- } catch (err) {
2545
- const transformedError = sdkTransformError(
2546
- err,
2547
- {
2548
- spreadPathsToArguments: { draftPost: "$[1]" },
2549
- explicitPathsToArguments: {
2550
- "draftPost.id": "$[0]",
2551
- action: "$[2].action",
2552
- scheduledPublishDate: "$[2].scheduledPublishDate",
2553
- fieldsets: "$[2].fieldsets"
2554
- },
2555
- singleArgumentUnchanged: false
2556
- },
2557
- ["_id", "draftPost", "options"]
2558
- );
2559
- sideEffects?.onError?.(err);
2560
- throw transformedError;
2561
- }
2562
- }
2563
- async function deleteDraftPost2(draftPostId, options) {
2564
- const { httpClient, sideEffects } = arguments[2];
2565
- const payload = renameKeysFromSDKRequestToRESTRequest({
2566
- draftPostId,
2567
- permanent: options?.permanent
2568
- });
2569
- const reqOpts = deleteDraftPost(payload);
2570
- sideEffects?.onSiteCall?.();
2571
- try {
2572
- const result = await httpClient.request(reqOpts);
2573
- sideEffects?.onSuccess?.(result);
2574
- } catch (err) {
2575
- const transformedError = sdkTransformError(
2576
- err,
2577
- {
2578
- spreadPathsToArguments: {},
2579
- explicitPathsToArguments: {
2580
- draftPostId: "$[0]",
2581
- permanent: "$[1].permanent"
2582
- },
2583
- singleArgumentUnchanged: false
2584
- },
2585
- ["draftPostId", "options"]
2586
- );
2587
- sideEffects?.onError?.(err);
2588
- throw transformedError;
2589
- }
2590
- }
2591
- async function removeFromTrashBin2(draftPostId) {
2592
- const { httpClient, sideEffects } = arguments[1];
2593
- const payload = renameKeysFromSDKRequestToRESTRequest({
2594
- draftPostId
2595
- });
2596
- const reqOpts = removeFromTrashBin(payload);
2597
- sideEffects?.onSiteCall?.();
2598
- try {
2599
- const result = await httpClient.request(reqOpts);
2600
- sideEffects?.onSuccess?.(result);
2601
- } catch (err) {
2602
- const transformedError = sdkTransformError(
2603
- err,
2604
- {
2605
- spreadPathsToArguments: {},
2606
- explicitPathsToArguments: { draftPostId: "$[0]" },
2607
- singleArgumentUnchanged: false
2608
- },
2609
- ["draftPostId"]
2610
- );
2611
- sideEffects?.onError?.(err);
2612
- throw transformedError;
2613
- }
2614
- }
2615
- async function bulkDeleteDraftPosts2(postIds, options) {
2616
- const { httpClient, sideEffects } = arguments[2];
2617
- const payload = renameKeysFromSDKRequestToRESTRequest({
2618
- postIds,
2619
- permanent: options?.permanent
2620
- });
2621
- const reqOpts = bulkDeleteDraftPosts(payload);
2622
- sideEffects?.onSiteCall?.();
2623
- try {
2624
- const result = await httpClient.request(reqOpts);
2625
- sideEffects?.onSuccess?.(result);
2626
- return renameKeysFromRESTResponseToSDKResponse(
2627
- transformPaths2(result.data, [
2628
- {
2629
- transformFn: transformRESTImageToSDKImage,
2630
- paths: [
2631
- { path: "results.item.heroImage" },
2632
- { path: "results.item.coverMedia.image" },
2633
- { path: "results.item.media.wixMedia.image" }
2634
- ]
2635
- },
2636
- {
2637
- transformFn: transformRESTPageURLToSDKPageURL,
2638
- paths: [
2639
- { path: "results.item.url" },
2640
- { path: "results.item.translations.url" }
2641
- ]
2642
- },
2643
- {
2644
- transformFn: transformRESTVideoToSDKVideo,
2645
- paths: [{ path: "results.item.coverMedia.video" }]
2646
- },
2647
- {
2648
- transformFn: transformRESTVideoV2ToSDKVideoV2,
2649
- paths: [{ path: "results.item.media.wixMedia.videoV2" }]
2650
- }
2651
- ])
2652
- );
2653
- } catch (err) {
2654
- const transformedError = sdkTransformError(
2655
- err,
2656
- {
2657
- spreadPathsToArguments: {},
2658
- explicitPathsToArguments: {
2659
- postIds: "$[0]",
2660
- permanent: "$[1].permanent"
2661
- },
2662
- singleArgumentUnchanged: false
2663
- },
2664
- ["postIds", "options"]
2665
- );
2666
- sideEffects?.onError?.(err);
2667
- throw transformedError;
2668
- }
2669
- }
2670
- async function listDraftPosts2(options) {
2671
- const { httpClient, sideEffects } = arguments[1];
2672
- const payload = renameKeysFromSDKRequestToRESTRequest({
2673
- status: options?.status,
2674
- language: options?.language,
2675
- sort: options?.sort,
2676
- paging: options?.paging,
2677
- fieldsets: options?.fieldsets
2678
- });
2679
- const reqOpts = listDraftPosts(payload);
2680
- sideEffects?.onSiteCall?.();
2681
- try {
2682
- const result = await httpClient.request(reqOpts);
2683
- sideEffects?.onSuccess?.(result);
2684
- return renameKeysFromRESTResponseToSDKResponse(
2685
- transformPaths2(result.data, [
2686
- {
2687
- transformFn: transformRESTImageToSDKImage,
2688
- paths: [
2689
- { path: "draftPosts.heroImage" },
2690
- { path: "draftPosts.coverMedia.image" },
2691
- { path: "draftPosts.media.wixMedia.image" }
2692
- ]
2693
- },
2694
- {
2695
- transformFn: transformRESTPageURLToSDKPageURL,
2696
- paths: [
2697
- { path: "draftPosts.url" },
2698
- { path: "draftPosts.translations.url" }
2699
- ]
2700
- },
2701
- {
2702
- transformFn: transformRESTVideoToSDKVideo,
2703
- paths: [{ path: "draftPosts.coverMedia.video" }]
2704
- },
2705
- {
2706
- transformFn: transformRESTVideoV2ToSDKVideoV2,
2707
- paths: [{ path: "draftPosts.media.wixMedia.videoV2" }]
2708
- }
2709
- ])
2710
- );
2711
- } catch (err) {
2712
- const transformedError = sdkTransformError(
2713
- err,
2714
- {
2715
- spreadPathsToArguments: {},
2716
- explicitPathsToArguments: {
2717
- status: "$[0].status",
2718
- language: "$[0].language",
2719
- sort: "$[0].sort",
2720
- paging: "$[0].paging",
2721
- fieldsets: "$[0].fieldsets"
2722
- },
2723
- singleArgumentUnchanged: false
2724
- },
2725
- ["options"]
2726
- );
2727
- sideEffects?.onError?.(err);
2728
- throw transformedError;
2729
- }
2730
- }
2731
- async function getDeletedDraftPost2(draftPostId) {
2732
- const { httpClient, sideEffects } = arguments[1];
2733
- const payload = renameKeysFromSDKRequestToRESTRequest({
2734
- draftPostId
2735
- });
2736
- const reqOpts = getDeletedDraftPost(payload);
2737
- sideEffects?.onSiteCall?.();
2738
- try {
2739
- const result = await httpClient.request(reqOpts);
2740
- sideEffects?.onSuccess?.(result);
2741
- return renameKeysFromRESTResponseToSDKResponse(
2742
- transformPaths2(result.data, [
2743
- {
2744
- transformFn: transformRESTImageToSDKImage,
2745
- paths: [
2746
- { path: "draftPost.heroImage" },
2747
- { path: "draftPost.coverMedia.image" },
2748
- { path: "draftPost.media.wixMedia.image" }
2749
- ]
2750
- },
2751
- {
2752
- transformFn: transformRESTPageURLToSDKPageURL,
2753
- paths: [
2754
- { path: "draftPost.url" },
2755
- { path: "draftPost.translations.url" }
2756
- ]
2757
- },
2758
- {
2759
- transformFn: transformRESTVideoToSDKVideo,
2760
- paths: [{ path: "draftPost.coverMedia.video" }]
2761
- },
2762
- {
2763
- transformFn: transformRESTVideoV2ToSDKVideoV2,
2764
- paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
2765
- }
2766
- ])
2767
- );
2768
- } catch (err) {
2769
- const transformedError = sdkTransformError(
2770
- err,
2771
- {
2772
- spreadPathsToArguments: {},
2773
- explicitPathsToArguments: { draftPostId: "$[0]" },
2774
- singleArgumentUnchanged: false
2775
- },
2776
- ["draftPostId"]
2777
- );
2778
- sideEffects?.onError?.(err);
2779
- throw transformedError;
2780
- }
2781
- }
2782
- async function restoreFromTrashBin2(draftPostId) {
2783
- const { httpClient, sideEffects } = arguments[1];
2784
- const payload = renameKeysFromSDKRequestToRESTRequest({
2785
- draftPostId
2786
- });
2787
- const reqOpts = restoreFromTrashBin(payload);
2788
- sideEffects?.onSiteCall?.();
2789
- try {
2790
- const result = await httpClient.request(reqOpts);
2791
- sideEffects?.onSuccess?.(result);
2792
- return renameKeysFromRESTResponseToSDKResponse(
2793
- transformPaths2(result.data, [
2794
- {
2795
- transformFn: transformRESTImageToSDKImage,
2796
- paths: [
2797
- { path: "draftPost.heroImage" },
2798
- { path: "draftPost.coverMedia.image" },
2799
- { path: "draftPost.media.wixMedia.image" }
2800
- ]
2801
- },
2802
- {
2803
- transformFn: transformRESTPageURLToSDKPageURL,
2804
- paths: [
2805
- { path: "draftPost.url" },
2806
- { path: "draftPost.translations.url" }
2807
- ]
2808
- },
2809
- {
2810
- transformFn: transformRESTVideoToSDKVideo,
2811
- paths: [{ path: "draftPost.coverMedia.video" }]
2812
- },
2813
- {
2814
- transformFn: transformRESTVideoV2ToSDKVideoV2,
2815
- paths: [{ path: "draftPost.media.wixMedia.videoV2" }]
2816
- }
2817
- ])
2818
- );
2819
- } catch (err) {
2820
- const transformedError = sdkTransformError(
2821
- err,
2822
- {
2823
- spreadPathsToArguments: {},
2824
- explicitPathsToArguments: { draftPostId: "$[0]" },
2825
- singleArgumentUnchanged: false
2826
- },
2827
- ["draftPostId"]
2828
- );
2829
- sideEffects?.onError?.(err);
2830
- throw transformedError;
2831
- }
2832
- }
2833
- function queryDraftPosts2(options) {
2834
- const { httpClient, sideEffects } = arguments[1];
2835
- return queryBuilder({
2836
- func: async (payload) => {
2837
- const reqOpts = queryDraftPosts({
2838
- ...payload,
2839
- ...options ?? {}
2840
- });
2841
- sideEffects?.onSiteCall?.();
2842
- try {
2843
- const result = await httpClient.request(reqOpts);
2844
- sideEffects?.onSuccess?.(result);
2845
- return result;
2846
- } catch (err) {
2847
- sideEffects?.onError?.(err);
2848
- throw err;
2849
- }
2850
- },
2851
- requestTransformer: (query) => {
2852
- const args = [query, options];
2853
- return renameKeysFromSDKRequestToRESTRequest({
2854
- ...args?.[1],
2855
- query: args?.[0]
2856
- });
2857
- },
2858
- responseTransformer: ({ data }) => {
2859
- const transformedData = renameKeysFromRESTResponseToSDKResponse(
2860
- transformPaths2(data, [
2861
- {
2862
- transformFn: transformRESTImageToSDKImage,
2863
- paths: [
2864
- { path: "draftPosts.heroImage" },
2865
- { path: "draftPosts.coverMedia.image" },
2866
- { path: "draftPosts.media.wixMedia.image" }
2867
- ]
2868
- },
2869
- {
2870
- transformFn: transformRESTPageURLToSDKPageURL,
2871
- paths: [
2872
- { path: "draftPosts.url" },
2873
- { path: "draftPosts.translations.url" }
2874
- ]
2875
- },
2876
- {
2877
- transformFn: transformRESTVideoToSDKVideo,
2878
- paths: [{ path: "draftPosts.coverMedia.video" }]
2879
- },
2880
- {
2881
- transformFn: transformRESTVideoV2ToSDKVideoV2,
2882
- paths: [{ path: "draftPosts.media.wixMedia.videoV2" }]
2883
- }
2884
- ])
2885
- );
2886
- return {
2887
- items: transformedData?.draftPosts,
2888
- pagingMetadata: transformedData?.pagingMetadata
2889
- };
2890
- },
2891
- errorTransformer: (err) => {
2892
- const transformedError = sdkTransformError(err, {
2893
- spreadPathsToArguments: {},
2894
- explicitPathsToArguments: { query: "$[0]" },
2895
- singleArgumentUnchanged: false
2896
- });
2897
- throw transformedError;
2898
- },
2899
- pagingMethod: "CURSOR",
2900
- transformationPaths: {}
2901
- });
2902
- }
2903
- async function publishDraftPost2(draftPostId) {
2904
- const { httpClient, sideEffects } = arguments[1];
2905
- const payload = renameKeysFromSDKRequestToRESTRequest({
2906
- draftPostId
2907
- });
2908
- const reqOpts = publishDraftPost(payload);
2909
- sideEffects?.onSiteCall?.();
2910
- try {
2911
- const result = await httpClient.request(reqOpts);
2912
- sideEffects?.onSuccess?.(result);
2913
- return renameKeysFromRESTResponseToSDKResponse(result.data);
2914
- } catch (err) {
2915
- const transformedError = sdkTransformError(
2916
- err,
2917
- {
2918
- spreadPathsToArguments: {},
2919
- explicitPathsToArguments: { draftPostId: "$[0]" },
2920
- singleArgumentUnchanged: false
2921
- },
2922
- ["draftPostId"]
2923
- );
2924
- sideEffects?.onError?.(err);
2925
- throw transformedError;
2926
- }
2927
- }
2928
-
2929
- // src/blog-v3-draft-draft-posts.public.ts
2930
- function createDraftPost3(httpClient) {
2931
- return (draftPost, options) => createDraftPost2(
2932
- draftPost,
2933
- options,
2934
- // @ts-ignore
2935
- { httpClient }
2936
- );
2937
- }
2938
- function bulkCreateDraftPosts3(httpClient) {
2939
- return (draftPosts, options) => bulkCreateDraftPosts2(
2940
- draftPosts,
2941
- options,
2942
- // @ts-ignore
2943
- { httpClient }
2944
- );
2945
- }
2946
- function bulkUpdateDraftPosts3(httpClient) {
2947
- return (options) => bulkUpdateDraftPosts2(
2948
- options,
2949
- // @ts-ignore
2950
- { httpClient }
2951
- );
2952
- }
2953
- function listDeletedDraftPosts3(httpClient) {
2954
- return (options) => listDeletedDraftPosts2(
2955
- options,
2956
- // @ts-ignore
2957
- { httpClient }
2958
- );
2959
- }
2960
- function getDraftPost3(httpClient) {
2961
- return (draftPostId, options) => getDraftPost2(
2962
- draftPostId,
2963
- options,
2964
- // @ts-ignore
2965
- { httpClient }
2966
- );
2967
- }
2968
- function updateDraftPost3(httpClient) {
2969
- return (_id, draftPost, options) => updateDraftPost2(
2970
- _id,
2971
- draftPost,
2972
- options,
2973
- // @ts-ignore
2974
- { httpClient }
2975
- );
2976
- }
2977
- function deleteDraftPost3(httpClient) {
2978
- return (draftPostId, options) => deleteDraftPost2(
2979
- draftPostId,
2980
- options,
2981
- // @ts-ignore
2982
- { httpClient }
2983
- );
2984
- }
2985
- function removeFromTrashBin3(httpClient) {
2986
- return (draftPostId) => removeFromTrashBin2(
2987
- draftPostId,
2988
- // @ts-ignore
2989
- { httpClient }
2990
- );
2991
- }
2992
- function bulkDeleteDraftPosts3(httpClient) {
2993
- return (postIds, options) => bulkDeleteDraftPosts2(
2994
- postIds,
2995
- options,
2996
- // @ts-ignore
2997
- { httpClient }
2998
- );
2999
- }
3000
- function listDraftPosts3(httpClient) {
3001
- return (options) => listDraftPosts2(
3002
- options,
3003
- // @ts-ignore
3004
- { httpClient }
3005
- );
3006
- }
3007
- function getDeletedDraftPost3(httpClient) {
3008
- return (draftPostId) => getDeletedDraftPost2(
3009
- draftPostId,
3010
- // @ts-ignore
3011
- { httpClient }
3012
- );
3013
- }
3014
- function restoreFromTrashBin3(httpClient) {
3015
- return (draftPostId) => restoreFromTrashBin2(
3016
- draftPostId,
3017
- // @ts-ignore
3018
- { httpClient }
3019
- );
3020
- }
3021
- function queryDraftPosts3(httpClient) {
3022
- return (options) => queryDraftPosts2(
3023
- options,
3024
- // @ts-ignore
3025
- { httpClient }
3026
- );
3027
- }
3028
- function publishDraftPost3(httpClient) {
3029
- return (draftPostId) => publishDraftPost2(
3030
- draftPostId,
3031
- // @ts-ignore
3032
- { httpClient }
3033
- );
3034
- }
3035
- var onDraftCreated = EventDefinition(
3036
- "wix.blog.v3.draft_created",
3037
- true,
3038
- (event) => renameKeysFromRESTResponseToSDKResponse2(
3039
- transformPaths3(event, [
3040
- {
3041
- transformFn: transformRESTImageToSDKImage2,
3042
- paths: [
3043
- { path: "entity.heroImage" },
3044
- { path: "entity.coverMedia.image" },
3045
- { path: "entity.media.wixMedia.image" }
3046
- ]
3047
- },
3048
- {
3049
- transformFn: transformRESTTimestampToSDKTimestamp2,
3050
- paths: [
3051
- { path: "entity.editedDate" },
3052
- { path: "entity.scheduledPublishDate" },
3053
- { path: "entity.firstPublishedDate" },
3054
- { path: "entity.createdDate" },
3055
- { path: "entity.richContent.metadata.createdTimestamp" },
3056
- { path: "entity.richContent.metadata.updatedTimestamp" },
3057
- { path: "entity.moderationDetails.submittedDate" },
3058
- { path: "entity.moderationDetails.moderationDate" },
3059
- { path: "metadata.eventTime" }
3060
- ]
3061
- },
3062
- {
3063
- transformFn: transformRESTPageURLToSDKPageURL2,
3064
- paths: [{ path: "entity.url" }, { path: "entity.translations.url" }]
3065
- },
3066
- {
3067
- transformFn: transformRESTVideoToSDKVideo2,
3068
- paths: [{ path: "entity.coverMedia.video" }]
3069
- },
3070
- {
3071
- transformFn: transformRESTFloatToSDKFloat2,
3072
- paths: [
3073
- {
3074
- path: "entity.richContent.nodes.galleryData.items.image.media.duration"
3075
- },
3076
- {
3077
- path: "entity.richContent.nodes.galleryData.items.video.media.duration"
3078
- },
3079
- {
3080
- path: "entity.richContent.nodes.galleryData.items.video.thumbnail.duration"
3081
- },
3082
- { path: "entity.richContent.nodes.galleryData.options.item.ratio" },
3083
- { path: "entity.richContent.nodes.imageData.image.duration" },
3084
- { path: "entity.richContent.nodes.mapData.mapSettings.lat" },
3085
- { path: "entity.richContent.nodes.mapData.mapSettings.lng" },
3086
- { path: "entity.richContent.nodes.pollData.poll.image.duration" },
3087
- {
3088
- path: "entity.richContent.nodes.pollData.poll.options.image.duration"
3089
- },
3090
- {
3091
- path: "entity.richContent.nodes.pollData.design.poll.background.image.duration"
3092
- },
3093
- { path: "entity.richContent.nodes.appEmbedData.image.duration" },
3094
- { path: "entity.richContent.nodes.videoData.video.duration" },
3095
- { path: "entity.richContent.nodes.videoData.thumbnail.duration" },
3096
- { path: "entity.richContent.nodes.audioData.audio.duration" },
3097
- { path: "entity.richContent.nodes.audioData.coverImage.duration" }
3098
- ]
3099
- },
3100
- {
3101
- transformFn: transformRESTVideoV2ToSDKVideoV22,
3102
- paths: [{ path: "entity.media.wixMedia.videoV2" }]
3103
- }
3104
- ])
3105
- )
3106
- )();
3107
- var onDraftDeleted = EventDefinition(
3108
- "wix.blog.v3.draft_deleted",
3109
- true,
3110
- (event) => renameKeysFromRESTResponseToSDKResponse2(
3111
- transformPaths3(event, [
3112
- {
3113
- transformFn: transformRESTImageToSDKImage2,
3114
- paths: [
3115
- { path: "entity.heroImage" },
3116
- { path: "entity.coverMedia.image" },
3117
- { path: "entity.media.wixMedia.image" }
3118
- ]
3119
- },
3120
- {
3121
- transformFn: transformRESTTimestampToSDKTimestamp2,
3122
- paths: [
3123
- { path: "entity.editedDate" },
3124
- { path: "entity.scheduledPublishDate" },
3125
- { path: "entity.firstPublishedDate" },
3126
- { path: "entity.createdDate" },
3127
- { path: "entity.richContent.metadata.createdTimestamp" },
3128
- { path: "entity.richContent.metadata.updatedTimestamp" },
3129
- { path: "entity.moderationDetails.submittedDate" },
3130
- { path: "entity.moderationDetails.moderationDate" },
3131
- { path: "metadata.eventTime" }
3132
- ]
3133
- },
3134
- {
3135
- transformFn: transformRESTPageURLToSDKPageURL2,
3136
- paths: [{ path: "entity.url" }, { path: "entity.translations.url" }]
3137
- },
3138
- {
3139
- transformFn: transformRESTVideoToSDKVideo2,
3140
- paths: [{ path: "entity.coverMedia.video" }]
3141
- },
3142
- {
3143
- transformFn: transformRESTFloatToSDKFloat2,
3144
- paths: [
3145
- {
3146
- path: "entity.richContent.nodes.galleryData.items.image.media.duration"
3147
- },
3148
- {
3149
- path: "entity.richContent.nodes.galleryData.items.video.media.duration"
3150
- },
3151
- {
3152
- path: "entity.richContent.nodes.galleryData.items.video.thumbnail.duration"
3153
- },
3154
- { path: "entity.richContent.nodes.galleryData.options.item.ratio" },
3155
- { path: "entity.richContent.nodes.imageData.image.duration" },
3156
- { path: "entity.richContent.nodes.mapData.mapSettings.lat" },
3157
- { path: "entity.richContent.nodes.mapData.mapSettings.lng" },
3158
- { path: "entity.richContent.nodes.pollData.poll.image.duration" },
3159
- {
3160
- path: "entity.richContent.nodes.pollData.poll.options.image.duration"
3161
- },
3162
- {
3163
- path: "entity.richContent.nodes.pollData.design.poll.background.image.duration"
3164
- },
3165
- { path: "entity.richContent.nodes.appEmbedData.image.duration" },
3166
- { path: "entity.richContent.nodes.videoData.video.duration" },
3167
- { path: "entity.richContent.nodes.videoData.thumbnail.duration" },
3168
- { path: "entity.richContent.nodes.audioData.audio.duration" },
3169
- { path: "entity.richContent.nodes.audioData.coverImage.duration" }
3170
- ]
3171
- },
3172
- {
3173
- transformFn: transformRESTVideoV2ToSDKVideoV22,
3174
- paths: [{ path: "entity.media.wixMedia.videoV2" }]
3175
- }
3176
- ])
3177
- )
3178
- )();
3179
- var onDraftUpdated = EventDefinition(
3180
- "wix.blog.v3.draft_updated",
3181
- true,
3182
- (event) => renameKeysFromRESTResponseToSDKResponse2(
3183
- transformPaths3(event, [
3184
- {
3185
- transformFn: transformRESTImageToSDKImage2,
3186
- paths: [
3187
- { path: "entity.heroImage" },
3188
- { path: "entity.coverMedia.image" },
3189
- { path: "entity.media.wixMedia.image" }
3190
- ]
3191
- },
3192
- {
3193
- transformFn: transformRESTTimestampToSDKTimestamp2,
3194
- paths: [
3195
- { path: "entity.editedDate" },
3196
- { path: "entity.scheduledPublishDate" },
3197
- { path: "entity.firstPublishedDate" },
3198
- { path: "entity.createdDate" },
3199
- { path: "entity.richContent.metadata.createdTimestamp" },
3200
- { path: "entity.richContent.metadata.updatedTimestamp" },
3201
- { path: "entity.moderationDetails.submittedDate" },
3202
- { path: "entity.moderationDetails.moderationDate" },
3203
- { path: "metadata.eventTime" }
3204
- ]
3205
- },
3206
- {
3207
- transformFn: transformRESTPageURLToSDKPageURL2,
3208
- paths: [{ path: "entity.url" }, { path: "entity.translations.url" }]
3209
- },
3210
- {
3211
- transformFn: transformRESTVideoToSDKVideo2,
3212
- paths: [{ path: "entity.coverMedia.video" }]
3213
- },
3214
- {
3215
- transformFn: transformRESTFloatToSDKFloat2,
3216
- paths: [
3217
- {
3218
- path: "entity.richContent.nodes.galleryData.items.image.media.duration"
3219
- },
3220
- {
3221
- path: "entity.richContent.nodes.galleryData.items.video.media.duration"
3222
- },
3223
- {
3224
- path: "entity.richContent.nodes.galleryData.items.video.thumbnail.duration"
3225
- },
3226
- { path: "entity.richContent.nodes.galleryData.options.item.ratio" },
3227
- { path: "entity.richContent.nodes.imageData.image.duration" },
3228
- { path: "entity.richContent.nodes.mapData.mapSettings.lat" },
3229
- { path: "entity.richContent.nodes.mapData.mapSettings.lng" },
3230
- { path: "entity.richContent.nodes.pollData.poll.image.duration" },
3231
- {
3232
- path: "entity.richContent.nodes.pollData.poll.options.image.duration"
3233
- },
3234
- {
3235
- path: "entity.richContent.nodes.pollData.design.poll.background.image.duration"
3236
- },
3237
- { path: "entity.richContent.nodes.appEmbedData.image.duration" },
3238
- { path: "entity.richContent.nodes.videoData.video.duration" },
3239
- { path: "entity.richContent.nodes.videoData.thumbnail.duration" },
3240
- { path: "entity.richContent.nodes.audioData.audio.duration" },
3241
- { path: "entity.richContent.nodes.audioData.coverImage.duration" }
3242
- ]
3243
- },
3244
- {
3245
- transformFn: transformRESTVideoV2ToSDKVideoV22,
3246
- paths: [{ path: "entity.media.wixMedia.videoV2" }]
3247
- }
3248
- ])
3249
- )
3250
- )();
3251
-
3252
- // src/blog-v3-draft-draft-posts.context.ts
3253
- import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
3254
- import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
3255
- var createDraftPost4 = /* @__PURE__ */ createRESTModule(createDraftPost3);
3256
- var bulkCreateDraftPosts4 = /* @__PURE__ */ createRESTModule(bulkCreateDraftPosts3);
3257
- var bulkUpdateDraftPosts4 = /* @__PURE__ */ createRESTModule(bulkUpdateDraftPosts3);
3258
- var listDeletedDraftPosts4 = /* @__PURE__ */ createRESTModule(listDeletedDraftPosts3);
3259
- var getDraftPost4 = /* @__PURE__ */ createRESTModule(getDraftPost3);
3260
- var updateDraftPost4 = /* @__PURE__ */ createRESTModule(updateDraftPost3);
3261
- var deleteDraftPost4 = /* @__PURE__ */ createRESTModule(deleteDraftPost3);
3262
- var removeFromTrashBin4 = /* @__PURE__ */ createRESTModule(removeFromTrashBin3);
3263
- var bulkDeleteDraftPosts4 = /* @__PURE__ */ createRESTModule(bulkDeleteDraftPosts3);
3264
- var listDraftPosts4 = /* @__PURE__ */ createRESTModule(listDraftPosts3);
3265
- var getDeletedDraftPost4 = /* @__PURE__ */ createRESTModule(getDeletedDraftPost3);
3266
- var restoreFromTrashBin4 = /* @__PURE__ */ createRESTModule(restoreFromTrashBin3);
3267
- var queryDraftPosts4 = /* @__PURE__ */ createRESTModule(queryDraftPosts3);
3268
- var publishDraftPost4 = /* @__PURE__ */ createRESTModule(publishDraftPost3);
3269
- var onDraftCreated2 = createEventModule(onDraftCreated);
3270
- var onDraftDeleted2 = createEventModule(onDraftDeleted);
3271
- var onDraftUpdated2 = createEventModule(onDraftUpdated);
3272
- export {
3273
- Action,
3274
- Alignment,
3275
- AppType,
3276
- BackgroundType,
3277
- ButtonDataType,
3278
- Crop,
3279
- DecorationType,
3280
- Direction,
3281
- Field,
3282
- FontType,
3283
- GIFType,
3284
- GetDraftPostsSort,
3285
- InitialExpandedItems,
3286
- LayoutType,
3287
- LineStyle,
3288
- MapType,
3289
- ModerationStatusStatus,
3290
- NodeType,
3291
- NullValue,
3292
- Orientation,
3293
- Origin,
3294
- PluginContainerDataAlignment,
3295
- PollLayoutDirection,
3296
- PollLayoutType,
3297
- Position,
3298
- SortOrder,
3299
- Source,
3300
- Status,
3301
- Target,
3302
- TextAlignment,
3303
- ThumbnailsAlignment,
3304
- TotalDraftPostsGroupingField,
3305
- Type,
3306
- VerticalAlignment,
3307
- ViewMode,
3308
- ViewRole,
3309
- VoteRole,
3310
- WebhookIdentityType,
3311
- Width,
3312
- WidthType,
3313
- bulkCreateDraftPosts4 as bulkCreateDraftPosts,
3314
- bulkDeleteDraftPosts4 as bulkDeleteDraftPosts,
3315
- bulkUpdateDraftPosts4 as bulkUpdateDraftPosts,
3316
- createDraftPost4 as createDraftPost,
3317
- deleteDraftPost4 as deleteDraftPost,
3318
- getDeletedDraftPost4 as getDeletedDraftPost,
3319
- getDraftPost4 as getDraftPost,
3320
- listDeletedDraftPosts4 as listDeletedDraftPosts,
3321
- listDraftPosts4 as listDraftPosts,
3322
- onDraftCreated2 as onDraftCreated,
3323
- onDraftDeleted2 as onDraftDeleted,
3324
- onDraftUpdated2 as onDraftUpdated,
3325
- publishDraftPost4 as publishDraftPost,
3326
- queryDraftPosts4 as queryDraftPosts,
3327
- removeFromTrashBin4 as removeFromTrashBin,
3328
- restoreFromTrashBin4 as restoreFromTrashBin,
3329
- updateDraftPost4 as updateDraftPost
3330
- };
3331
- //# sourceMappingURL=index.mjs.map