@wix/blog 1.0.191 → 1.0.192
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.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +2 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +2 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +2 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/src/blog-v3-draft.http.d.ts +68 -0
- package/build/cjs/src/blog-v3-draft.http.js +905 -0
- package/build/cjs/src/blog-v3-draft.http.js.map +1 -0
- package/build/cjs/src/blog-v3-draft.meta.d.ts +38 -0
- package/build/cjs/src/blog-v3-draft.meta.js +252 -0
- package/build/cjs/src/blog-v3-draft.meta.js.map +1 -0
- package/build/cjs/src/blog-v3-draft.public.d.ts +1579 -0
- package/build/cjs/src/blog-v3-draft.public.js +116 -0
- package/build/cjs/src/blog-v3-draft.public.js.map +1 -0
- package/build/cjs/src/blog-v3-draft.types.d.ts +7869 -0
- package/build/cjs/src/blog-v3-draft.types.js +456 -0
- package/build/cjs/src/blog-v3-draft.types.js.map +1 -0
- package/build/cjs/src/blog-v3-draft.universal.d.ts +7608 -0
- package/build/cjs/src/blog-v3-draft.universal.js +1358 -0
- package/build/cjs/src/blog-v3-draft.universal.js.map +1 -0
- package/build/cjs/src/blog-v3-post.types.d.ts +4 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +1 -0
- package/build/es/index.js.map +1 -1
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +1 -0
- package/build/es/index.typings.js.map +1 -1
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +1 -0
- package/build/es/meta.js.map +1 -1
- package/build/es/src/blog-v3-draft.http.d.ts +68 -0
- package/build/es/src/blog-v3-draft.http.js +890 -0
- package/build/es/src/blog-v3-draft.http.js.map +1 -0
- package/build/es/src/blog-v3-draft.meta.d.ts +38 -0
- package/build/es/src/blog-v3-draft.meta.js +218 -0
- package/build/es/src/blog-v3-draft.meta.js.map +1 -0
- package/build/es/src/blog-v3-draft.public.d.ts +1579 -0
- package/build/es/src/blog-v3-draft.public.js +64 -0
- package/build/es/src/blog-v3-draft.public.js.map +1 -0
- package/build/es/src/blog-v3-draft.types.d.ts +7869 -0
- package/build/es/src/blog-v3-draft.types.js +453 -0
- package/build/es/src/blog-v3-draft.types.js.map +1 -0
- package/build/es/src/blog-v3-draft.universal.d.ts +7608 -0
- package/build/es/src/blog-v3-draft.universal.js +1324 -0
- package/build/es/src/blog-v3-draft.universal.js.map +1 -0
- package/build/es/src/blog-v3-post.types.d.ts +4 -0
- package/package.json +2 -2
|
@@ -0,0 +1,890 @@
|
|
|
1
|
+
import { toURLSearchParams } from '@wix/metro-runtime';
|
|
2
|
+
import { serializer } from '@wix/metro-runtime/ambassador';
|
|
3
|
+
import { resolveUrl } from '@wix/metro-runtime';
|
|
4
|
+
const _appEmbedData = { image: '_v1Media' };
|
|
5
|
+
const _audioData = { audio: '_v1Media', coverImage: '_v1Media' };
|
|
6
|
+
const _background = { image: '_v1Media' };
|
|
7
|
+
const _bulkDraftPostResult = { item: '_draftPost' };
|
|
8
|
+
const _bulkUpdateDraftPostsRequest = {
|
|
9
|
+
scheduledPublishDate: 'google.protobuf.Timestamp',
|
|
10
|
+
draftPosts: '_maskedDraftPosts',
|
|
11
|
+
};
|
|
12
|
+
const _bulkUpdateDraftPostsResponse = { results: '_bulkDraftPostResult' };
|
|
13
|
+
const _coverMedia = { image: '_image', video: '_video' };
|
|
14
|
+
const _createDraftPostRequest = {
|
|
15
|
+
fieldMask: 'google.protobuf.FieldMask',
|
|
16
|
+
draftPost: '_draftPost',
|
|
17
|
+
};
|
|
18
|
+
const _createDraftPostResponse = { draftPost: '_draftPost' };
|
|
19
|
+
const _deleteDraftPostRequest = {};
|
|
20
|
+
const _deleteDraftPostResponse = {};
|
|
21
|
+
const _design = { poll: '_pollDesign' };
|
|
22
|
+
const _draftPost = {
|
|
23
|
+
editedDate: 'google.protobuf.Timestamp',
|
|
24
|
+
scheduledPublishDate: 'google.protobuf.Timestamp',
|
|
25
|
+
firstPublishedDate: 'google.protobuf.Timestamp',
|
|
26
|
+
createdDate: 'google.protobuf.Timestamp',
|
|
27
|
+
coverMedia: '_coverMedia',
|
|
28
|
+
heroImage: '_image',
|
|
29
|
+
richContent: '_richContent',
|
|
30
|
+
moderationDetails: '_moderationDetails',
|
|
31
|
+
media: '_media',
|
|
32
|
+
};
|
|
33
|
+
const _galleryData = { items: '_item', options: '_galleryOptions' };
|
|
34
|
+
const _galleryOptions = { item: '_itemStyle' };
|
|
35
|
+
const _getDeletedDraftPostRequest = {};
|
|
36
|
+
const _getDeletedDraftPostResponse = { draftPost: '_draftPost' };
|
|
37
|
+
const _getDraftPostRequest = {};
|
|
38
|
+
const _getDraftPostResponse = { draftPost: '_draftPost' };
|
|
39
|
+
const _image = { urlExpirationDate: 'google.protobuf.Timestamp' };
|
|
40
|
+
const _imageData = { image: '_v1Media' };
|
|
41
|
+
const _item = { image: '_itemImage', video: '_itemVideo' };
|
|
42
|
+
const _itemImage = { media: '_v1Media' };
|
|
43
|
+
const _itemStyle = { ratio: 'google.protobuf.DoubleValue' };
|
|
44
|
+
const _itemVideo = { media: '_v1Media', thumbnail: '_v1Media' };
|
|
45
|
+
const _listDeletedDraftPostsRequest = {};
|
|
46
|
+
const _listDeletedDraftPostsResponse = { draftPosts: '_draftPost' };
|
|
47
|
+
const _listDraftPostsRequest = {};
|
|
48
|
+
const _listDraftPostsResponse = { draftPosts: '_draftPost' };
|
|
49
|
+
const _mapData = { mapSettings: '_mapSettings' };
|
|
50
|
+
const _mapSettings = {
|
|
51
|
+
lat: 'google.protobuf.DoubleValue',
|
|
52
|
+
lng: 'google.protobuf.DoubleValue',
|
|
53
|
+
};
|
|
54
|
+
const _maskedDraftPosts = {
|
|
55
|
+
fieldMask: 'google.protobuf.FieldMask',
|
|
56
|
+
draftPost: '_draftPost',
|
|
57
|
+
};
|
|
58
|
+
const _media = { wixMedia: '_wixMedia' };
|
|
59
|
+
const _metadata = {
|
|
60
|
+
createdTimestamp: 'google.protobuf.Timestamp',
|
|
61
|
+
updatedTimestamp: 'google.protobuf.Timestamp',
|
|
62
|
+
};
|
|
63
|
+
const _moderationDetails = {
|
|
64
|
+
submittedDate: 'google.protobuf.Timestamp',
|
|
65
|
+
moderationDate: 'google.protobuf.Timestamp',
|
|
66
|
+
};
|
|
67
|
+
const _node = {
|
|
68
|
+
galleryData: '_galleryData',
|
|
69
|
+
imageData: '_imageData',
|
|
70
|
+
mapData: '_mapData',
|
|
71
|
+
pollData: '_pollData',
|
|
72
|
+
appEmbedData: '_appEmbedData',
|
|
73
|
+
videoData: '_videoData',
|
|
74
|
+
audioData: '_audioData',
|
|
75
|
+
nodes: '_node',
|
|
76
|
+
};
|
|
77
|
+
const _option = { image: '_v1Media' };
|
|
78
|
+
const _poll = { image: '_v1Media', options: '_option' };
|
|
79
|
+
const _pollData = { poll: '_poll', design: '_design' };
|
|
80
|
+
const _pollDesign = { background: '_background' };
|
|
81
|
+
const _publishDraftPostRequest = {};
|
|
82
|
+
const _publishDraftPostResponse = {};
|
|
83
|
+
const _queryDraftPostsRequest = {};
|
|
84
|
+
const _queryDraftPostsResponse = { draftPosts: '_draftPost' };
|
|
85
|
+
const _removeFromTrashBinRequest = {};
|
|
86
|
+
const _removeFromTrashBinResponse = {};
|
|
87
|
+
const _restoreFromTrashBinRequest = {};
|
|
88
|
+
const _restoreFromTrashBinResponse = { draftPost: '_draftPost' };
|
|
89
|
+
const _richContent = { nodes: '_node', metadata: '_metadata' };
|
|
90
|
+
const _updateDraftPostRequest = {
|
|
91
|
+
fieldMask: 'google.protobuf.FieldMask',
|
|
92
|
+
scheduledPublishDate: 'google.protobuf.Timestamp',
|
|
93
|
+
draftPost: '_draftPost',
|
|
94
|
+
};
|
|
95
|
+
const _updateDraftPostResponse = { draftPost: '_draftPost' };
|
|
96
|
+
const _v1Media = { duration: 'google.protobuf.DoubleValue' };
|
|
97
|
+
const _video = { thumbnail: '_image' };
|
|
98
|
+
const _videoData = { video: '_v1Media', thumbnail: '_v1Media' };
|
|
99
|
+
const _videoResolution = {
|
|
100
|
+
urlExpirationDate: 'google.protobuf.Timestamp',
|
|
101
|
+
poster: '_image',
|
|
102
|
+
};
|
|
103
|
+
const _videoV2 = {
|
|
104
|
+
urlExpirationDate: 'google.protobuf.Timestamp',
|
|
105
|
+
resolutions: '_videoResolution',
|
|
106
|
+
posters: '_image',
|
|
107
|
+
};
|
|
108
|
+
const _wixMedia = { image: '_image', videoV2: '_videoV2' };
|
|
109
|
+
function resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl(opts) {
|
|
110
|
+
const domainToMappings = {
|
|
111
|
+
_api_base_domain_: [
|
|
112
|
+
{
|
|
113
|
+
srcPath: '/draft-post-service-api-proxy',
|
|
114
|
+
destPath: '',
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
'*.dev.wix-code.com': [
|
|
118
|
+
{
|
|
119
|
+
srcPath: '/_api/communities-blog-node-api/v3/draft-posts',
|
|
120
|
+
destPath: '/v3/draft-posts',
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
'*.pub.wix-code.com': [
|
|
124
|
+
{
|
|
125
|
+
srcPath: '/_api/communities-blog-node-api/v3/draft-posts',
|
|
126
|
+
destPath: '/v3/draft-posts',
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
_: [
|
|
130
|
+
{
|
|
131
|
+
srcPath: '/_api/communities-blog-node-api/v3/draft-posts',
|
|
132
|
+
destPath: '/v3/draft-posts',
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
'apps._base_domain_': [
|
|
136
|
+
{
|
|
137
|
+
srcPath: '/_api/communities-blog-node-api/v3/draft-posts',
|
|
138
|
+
destPath: '/v3/draft-posts',
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
'bo._base_domain_': [
|
|
142
|
+
{
|
|
143
|
+
srcPath: '/_api/communities-blog-node-api/v3/draft-posts',
|
|
144
|
+
destPath: '/v3/draft-posts',
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
'editor._base_domain_': [
|
|
148
|
+
{
|
|
149
|
+
srcPath: '/_api/communities-blog-node-api/v3/draft-posts',
|
|
150
|
+
destPath: '/v3/draft-posts',
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
'blocks._base_domain_': [
|
|
154
|
+
{
|
|
155
|
+
srcPath: '/_api/communities-blog-node-api/v3/draft-posts',
|
|
156
|
+
destPath: '/v3/draft-posts',
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
'create.editorx': [
|
|
160
|
+
{
|
|
161
|
+
srcPath: '/_api/communities-blog-node-api/v3/draft-posts',
|
|
162
|
+
destPath: '/v3/draft-posts',
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
'editor.wixapps.net': [
|
|
166
|
+
{
|
|
167
|
+
srcPath: '/_api/communities-blog-node-api/v3/draft-posts',
|
|
168
|
+
destPath: '/v3/draft-posts',
|
|
169
|
+
},
|
|
170
|
+
],
|
|
171
|
+
'manage._base_domain_': [
|
|
172
|
+
{
|
|
173
|
+
srcPath: '/_api/communities-blog-node-api/v3/draft-posts',
|
|
174
|
+
destPath: '/v3/draft-posts',
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
'social-blog._base_domain_': [
|
|
178
|
+
{
|
|
179
|
+
srcPath: '/_api/communities-blog-node-api/v3/draft-posts',
|
|
180
|
+
destPath: '/v3/draft-posts',
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
'www.wixapis.com': [
|
|
184
|
+
{
|
|
185
|
+
srcPath: '/blog/v3/draft-posts',
|
|
186
|
+
destPath: '/v3/draft-posts',
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
srcPath: '/blog/v3/bulk/draft-posts/create',
|
|
190
|
+
destPath: '/v3/bulk/draft-posts/create',
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
srcPath: '/blog/v3/draft-posts/',
|
|
194
|
+
destPath: '/v3/draft-posts',
|
|
195
|
+
},
|
|
196
|
+
],
|
|
197
|
+
'www._base_domain_': [
|
|
198
|
+
{
|
|
199
|
+
srcPath: '/_api/communities-blog-node-api/v3/draft-posts',
|
|
200
|
+
destPath: '/v3/draft-posts',
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
};
|
|
204
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Creates a draft post.
|
|
208
|
+
*
|
|
209
|
+
* The draft post's [memberId](https://dev.wix.com/api/rest/members/members) is required for third-party apps.
|
|
210
|
+
*/
|
|
211
|
+
export function createDraftPost(payload) {
|
|
212
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_createDraftPostRequest, {
|
|
213
|
+
_appEmbedData,
|
|
214
|
+
_audioData,
|
|
215
|
+
_background,
|
|
216
|
+
_coverMedia,
|
|
217
|
+
_design,
|
|
218
|
+
_draftPost,
|
|
219
|
+
_galleryData,
|
|
220
|
+
_galleryOptions,
|
|
221
|
+
_image,
|
|
222
|
+
_imageData,
|
|
223
|
+
_item,
|
|
224
|
+
_itemImage,
|
|
225
|
+
_itemStyle,
|
|
226
|
+
_itemVideo,
|
|
227
|
+
_mapData,
|
|
228
|
+
_mapSettings,
|
|
229
|
+
_media,
|
|
230
|
+
_metadata,
|
|
231
|
+
_moderationDetails,
|
|
232
|
+
_node,
|
|
233
|
+
_option,
|
|
234
|
+
_poll,
|
|
235
|
+
_pollData,
|
|
236
|
+
_pollDesign,
|
|
237
|
+
_richContent,
|
|
238
|
+
_v1Media,
|
|
239
|
+
_video,
|
|
240
|
+
_videoData,
|
|
241
|
+
_videoResolution,
|
|
242
|
+
_videoV2,
|
|
243
|
+
_wixMedia,
|
|
244
|
+
});
|
|
245
|
+
const { fromJSON: fromRes } = serializer(_createDraftPostResponse, {
|
|
246
|
+
_appEmbedData,
|
|
247
|
+
_audioData,
|
|
248
|
+
_background,
|
|
249
|
+
_coverMedia,
|
|
250
|
+
_design,
|
|
251
|
+
_draftPost,
|
|
252
|
+
_galleryData,
|
|
253
|
+
_galleryOptions,
|
|
254
|
+
_image,
|
|
255
|
+
_imageData,
|
|
256
|
+
_item,
|
|
257
|
+
_itemImage,
|
|
258
|
+
_itemStyle,
|
|
259
|
+
_itemVideo,
|
|
260
|
+
_mapData,
|
|
261
|
+
_mapSettings,
|
|
262
|
+
_media,
|
|
263
|
+
_metadata,
|
|
264
|
+
_moderationDetails,
|
|
265
|
+
_node,
|
|
266
|
+
_option,
|
|
267
|
+
_poll,
|
|
268
|
+
_pollData,
|
|
269
|
+
_pollDesign,
|
|
270
|
+
_richContent,
|
|
271
|
+
_v1Media,
|
|
272
|
+
_video,
|
|
273
|
+
_videoData,
|
|
274
|
+
_videoResolution,
|
|
275
|
+
_videoV2,
|
|
276
|
+
_wixMedia,
|
|
277
|
+
});
|
|
278
|
+
function __createDraftPost({ host }) {
|
|
279
|
+
const serializedData = toReq(payload);
|
|
280
|
+
const metadata = {
|
|
281
|
+
entityFqdn: 'wix.blog.v3.draft',
|
|
282
|
+
method: 'POST',
|
|
283
|
+
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.CreateDraftPost',
|
|
284
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl({ protoPath: '/v3/draft-posts', data: serializedData, host }),
|
|
285
|
+
data: serializedData,
|
|
286
|
+
transformResponse: fromRes,
|
|
287
|
+
};
|
|
288
|
+
return metadata;
|
|
289
|
+
}
|
|
290
|
+
__createDraftPost.fromReq = fromReq;
|
|
291
|
+
return __createDraftPost;
|
|
292
|
+
}
|
|
293
|
+
/** Updates multiple draft posts. */
|
|
294
|
+
export function bulkUpdateDraftPosts(payload) {
|
|
295
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_bulkUpdateDraftPostsRequest, {
|
|
296
|
+
_appEmbedData,
|
|
297
|
+
_audioData,
|
|
298
|
+
_background,
|
|
299
|
+
_coverMedia,
|
|
300
|
+
_design,
|
|
301
|
+
_draftPost,
|
|
302
|
+
_galleryData,
|
|
303
|
+
_galleryOptions,
|
|
304
|
+
_image,
|
|
305
|
+
_imageData,
|
|
306
|
+
_item,
|
|
307
|
+
_itemImage,
|
|
308
|
+
_itemStyle,
|
|
309
|
+
_itemVideo,
|
|
310
|
+
_mapData,
|
|
311
|
+
_mapSettings,
|
|
312
|
+
_maskedDraftPosts,
|
|
313
|
+
_media,
|
|
314
|
+
_metadata,
|
|
315
|
+
_moderationDetails,
|
|
316
|
+
_node,
|
|
317
|
+
_option,
|
|
318
|
+
_poll,
|
|
319
|
+
_pollData,
|
|
320
|
+
_pollDesign,
|
|
321
|
+
_richContent,
|
|
322
|
+
_v1Media,
|
|
323
|
+
_video,
|
|
324
|
+
_videoData,
|
|
325
|
+
_videoResolution,
|
|
326
|
+
_videoV2,
|
|
327
|
+
_wixMedia,
|
|
328
|
+
});
|
|
329
|
+
const { fromJSON: fromRes } = serializer(_bulkUpdateDraftPostsResponse, {
|
|
330
|
+
_appEmbedData,
|
|
331
|
+
_audioData,
|
|
332
|
+
_background,
|
|
333
|
+
_bulkDraftPostResult,
|
|
334
|
+
_coverMedia,
|
|
335
|
+
_design,
|
|
336
|
+
_draftPost,
|
|
337
|
+
_galleryData,
|
|
338
|
+
_galleryOptions,
|
|
339
|
+
_image,
|
|
340
|
+
_imageData,
|
|
341
|
+
_item,
|
|
342
|
+
_itemImage,
|
|
343
|
+
_itemStyle,
|
|
344
|
+
_itemVideo,
|
|
345
|
+
_mapData,
|
|
346
|
+
_mapSettings,
|
|
347
|
+
_media,
|
|
348
|
+
_metadata,
|
|
349
|
+
_moderationDetails,
|
|
350
|
+
_node,
|
|
351
|
+
_option,
|
|
352
|
+
_poll,
|
|
353
|
+
_pollData,
|
|
354
|
+
_pollDesign,
|
|
355
|
+
_richContent,
|
|
356
|
+
_v1Media,
|
|
357
|
+
_video,
|
|
358
|
+
_videoData,
|
|
359
|
+
_videoResolution,
|
|
360
|
+
_videoV2,
|
|
361
|
+
_wixMedia,
|
|
362
|
+
});
|
|
363
|
+
function __bulkUpdateDraftPosts({ host }) {
|
|
364
|
+
const serializedData = toReq(payload);
|
|
365
|
+
const metadata = {
|
|
366
|
+
entityFqdn: 'wix.blog.v3.draft',
|
|
367
|
+
method: 'PATCH',
|
|
368
|
+
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.BulkUpdateDraftPosts',
|
|
369
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl({ protoPath: '/v3/draft-posts/update', data: serializedData, host }),
|
|
370
|
+
data: serializedData,
|
|
371
|
+
transformResponse: fromRes,
|
|
372
|
+
};
|
|
373
|
+
return metadata;
|
|
374
|
+
}
|
|
375
|
+
__bulkUpdateDraftPosts.fromReq = fromReq;
|
|
376
|
+
return __bulkUpdateDraftPosts;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Retrieves a list of up to 100 deleted draft posts.
|
|
380
|
+
*
|
|
381
|
+
* List Draft Posts runs with these defaults, which you can override:
|
|
382
|
+
* - `editedDate` is sorted in descending order. In this case,`editedDate` implies the date the post was deleted.
|
|
383
|
+
* - `paging.limit` is `50`.
|
|
384
|
+
* - `paging.offset` is `0`.
|
|
385
|
+
*/
|
|
386
|
+
export function listDeletedDraftPosts(payload) {
|
|
387
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_listDeletedDraftPostsRequest, {});
|
|
388
|
+
const { fromJSON: fromRes } = serializer(_listDeletedDraftPostsResponse, {
|
|
389
|
+
_appEmbedData,
|
|
390
|
+
_audioData,
|
|
391
|
+
_background,
|
|
392
|
+
_coverMedia,
|
|
393
|
+
_design,
|
|
394
|
+
_draftPost,
|
|
395
|
+
_galleryData,
|
|
396
|
+
_galleryOptions,
|
|
397
|
+
_image,
|
|
398
|
+
_imageData,
|
|
399
|
+
_item,
|
|
400
|
+
_itemImage,
|
|
401
|
+
_itemStyle,
|
|
402
|
+
_itemVideo,
|
|
403
|
+
_mapData,
|
|
404
|
+
_mapSettings,
|
|
405
|
+
_media,
|
|
406
|
+
_metadata,
|
|
407
|
+
_moderationDetails,
|
|
408
|
+
_node,
|
|
409
|
+
_option,
|
|
410
|
+
_poll,
|
|
411
|
+
_pollData,
|
|
412
|
+
_pollDesign,
|
|
413
|
+
_richContent,
|
|
414
|
+
_v1Media,
|
|
415
|
+
_video,
|
|
416
|
+
_videoData,
|
|
417
|
+
_videoResolution,
|
|
418
|
+
_videoV2,
|
|
419
|
+
_wixMedia,
|
|
420
|
+
});
|
|
421
|
+
function __listDeletedDraftPosts({ host }) {
|
|
422
|
+
const serializedData = toReq(payload);
|
|
423
|
+
const metadata = {
|
|
424
|
+
entityFqdn: 'wix.blog.v3.draft',
|
|
425
|
+
method: 'GET',
|
|
426
|
+
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.ListDeletedDraftPosts',
|
|
427
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl({ protoPath: '/v3/draft-posts/trash-bin', data: serializedData, host }),
|
|
428
|
+
params: toURLSearchParams(serializedData),
|
|
429
|
+
transformResponse: fromRes,
|
|
430
|
+
};
|
|
431
|
+
return metadata;
|
|
432
|
+
}
|
|
433
|
+
__listDeletedDraftPosts.fromReq = fromReq;
|
|
434
|
+
return __listDeletedDraftPosts;
|
|
435
|
+
}
|
|
436
|
+
/** Gets a draft post by the provided ID. */
|
|
437
|
+
export function getDraftPost(payload) {
|
|
438
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_getDraftPostRequest, {});
|
|
439
|
+
const { fromJSON: fromRes } = serializer(_getDraftPostResponse, {
|
|
440
|
+
_appEmbedData,
|
|
441
|
+
_audioData,
|
|
442
|
+
_background,
|
|
443
|
+
_coverMedia,
|
|
444
|
+
_design,
|
|
445
|
+
_draftPost,
|
|
446
|
+
_galleryData,
|
|
447
|
+
_galleryOptions,
|
|
448
|
+
_image,
|
|
449
|
+
_imageData,
|
|
450
|
+
_item,
|
|
451
|
+
_itemImage,
|
|
452
|
+
_itemStyle,
|
|
453
|
+
_itemVideo,
|
|
454
|
+
_mapData,
|
|
455
|
+
_mapSettings,
|
|
456
|
+
_media,
|
|
457
|
+
_metadata,
|
|
458
|
+
_moderationDetails,
|
|
459
|
+
_node,
|
|
460
|
+
_option,
|
|
461
|
+
_poll,
|
|
462
|
+
_pollData,
|
|
463
|
+
_pollDesign,
|
|
464
|
+
_richContent,
|
|
465
|
+
_v1Media,
|
|
466
|
+
_video,
|
|
467
|
+
_videoData,
|
|
468
|
+
_videoResolution,
|
|
469
|
+
_videoV2,
|
|
470
|
+
_wixMedia,
|
|
471
|
+
});
|
|
472
|
+
function __getDraftPost({ host }) {
|
|
473
|
+
const serializedData = toReq(payload);
|
|
474
|
+
const metadata = {
|
|
475
|
+
entityFqdn: 'wix.blog.v3.draft',
|
|
476
|
+
method: 'GET',
|
|
477
|
+
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.GetDraftPost',
|
|
478
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl({
|
|
479
|
+
protoPath: '/v3/draft-posts/{draftPostId}',
|
|
480
|
+
data: serializedData,
|
|
481
|
+
host,
|
|
482
|
+
}),
|
|
483
|
+
params: toURLSearchParams(serializedData),
|
|
484
|
+
transformResponse: fromRes,
|
|
485
|
+
};
|
|
486
|
+
return metadata;
|
|
487
|
+
}
|
|
488
|
+
__getDraftPost.fromReq = fromReq;
|
|
489
|
+
return __getDraftPost;
|
|
490
|
+
}
|
|
491
|
+
/** Updates a specified draft post. */
|
|
492
|
+
export function updateDraftPost(payload) {
|
|
493
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_updateDraftPostRequest, {
|
|
494
|
+
_appEmbedData,
|
|
495
|
+
_audioData,
|
|
496
|
+
_background,
|
|
497
|
+
_coverMedia,
|
|
498
|
+
_design,
|
|
499
|
+
_draftPost,
|
|
500
|
+
_galleryData,
|
|
501
|
+
_galleryOptions,
|
|
502
|
+
_image,
|
|
503
|
+
_imageData,
|
|
504
|
+
_item,
|
|
505
|
+
_itemImage,
|
|
506
|
+
_itemStyle,
|
|
507
|
+
_itemVideo,
|
|
508
|
+
_mapData,
|
|
509
|
+
_mapSettings,
|
|
510
|
+
_media,
|
|
511
|
+
_metadata,
|
|
512
|
+
_moderationDetails,
|
|
513
|
+
_node,
|
|
514
|
+
_option,
|
|
515
|
+
_poll,
|
|
516
|
+
_pollData,
|
|
517
|
+
_pollDesign,
|
|
518
|
+
_richContent,
|
|
519
|
+
_v1Media,
|
|
520
|
+
_video,
|
|
521
|
+
_videoData,
|
|
522
|
+
_videoResolution,
|
|
523
|
+
_videoV2,
|
|
524
|
+
_wixMedia,
|
|
525
|
+
});
|
|
526
|
+
const { fromJSON: fromRes } = serializer(_updateDraftPostResponse, {
|
|
527
|
+
_appEmbedData,
|
|
528
|
+
_audioData,
|
|
529
|
+
_background,
|
|
530
|
+
_coverMedia,
|
|
531
|
+
_design,
|
|
532
|
+
_draftPost,
|
|
533
|
+
_galleryData,
|
|
534
|
+
_galleryOptions,
|
|
535
|
+
_image,
|
|
536
|
+
_imageData,
|
|
537
|
+
_item,
|
|
538
|
+
_itemImage,
|
|
539
|
+
_itemStyle,
|
|
540
|
+
_itemVideo,
|
|
541
|
+
_mapData,
|
|
542
|
+
_mapSettings,
|
|
543
|
+
_media,
|
|
544
|
+
_metadata,
|
|
545
|
+
_moderationDetails,
|
|
546
|
+
_node,
|
|
547
|
+
_option,
|
|
548
|
+
_poll,
|
|
549
|
+
_pollData,
|
|
550
|
+
_pollDesign,
|
|
551
|
+
_richContent,
|
|
552
|
+
_v1Media,
|
|
553
|
+
_video,
|
|
554
|
+
_videoData,
|
|
555
|
+
_videoResolution,
|
|
556
|
+
_videoV2,
|
|
557
|
+
_wixMedia,
|
|
558
|
+
});
|
|
559
|
+
function __updateDraftPost({ host }) {
|
|
560
|
+
const serializedData = toReq(payload);
|
|
561
|
+
const metadata = {
|
|
562
|
+
entityFqdn: 'wix.blog.v3.draft',
|
|
563
|
+
method: 'PATCH',
|
|
564
|
+
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.UpdateDraftPost',
|
|
565
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl({
|
|
566
|
+
protoPath: '/v3/draft-posts/{draftPost.id}',
|
|
567
|
+
data: serializedData,
|
|
568
|
+
host,
|
|
569
|
+
}),
|
|
570
|
+
data: serializedData,
|
|
571
|
+
transformResponse: fromRes,
|
|
572
|
+
};
|
|
573
|
+
return metadata;
|
|
574
|
+
}
|
|
575
|
+
__updateDraftPost.fromReq = fromReq;
|
|
576
|
+
return __updateDraftPost;
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* Moves a draft post with the provided ID to the trash bin.
|
|
580
|
+
* A published posts can also be deleted by its provided [post `ID`](https://dev.wix.com/api/rest/wix-blog/blog/posts).
|
|
581
|
+
*
|
|
582
|
+
* The optional `permanent` field enables you to delete a post permanently, bypassing the trash bin. When a draft post is deleted this way, it can't be restored.
|
|
583
|
+
*/
|
|
584
|
+
export function deleteDraftPost(payload) {
|
|
585
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_deleteDraftPostRequest, {});
|
|
586
|
+
const { fromJSON: fromRes } = serializer(_deleteDraftPostResponse, {});
|
|
587
|
+
function __deleteDraftPost({ host }) {
|
|
588
|
+
const serializedData = toReq(payload);
|
|
589
|
+
const metadata = {
|
|
590
|
+
entityFqdn: 'wix.blog.v3.draft',
|
|
591
|
+
method: 'DELETE',
|
|
592
|
+
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.DeleteDraftPost',
|
|
593
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl({
|
|
594
|
+
protoPath: '/v3/draft-posts/{draftPostId}',
|
|
595
|
+
data: serializedData,
|
|
596
|
+
host,
|
|
597
|
+
}),
|
|
598
|
+
params: toURLSearchParams(serializedData),
|
|
599
|
+
transformResponse: fromRes,
|
|
600
|
+
};
|
|
601
|
+
return metadata;
|
|
602
|
+
}
|
|
603
|
+
__deleteDraftPost.fromReq = fromReq;
|
|
604
|
+
return __deleteDraftPost;
|
|
605
|
+
}
|
|
606
|
+
/** Permanently deletes a draft post by the provided ID from the trash bin. */
|
|
607
|
+
export function removeFromTrashBin(payload) {
|
|
608
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_removeFromTrashBinRequest, {});
|
|
609
|
+
const { fromJSON: fromRes } = serializer(_removeFromTrashBinResponse, {});
|
|
610
|
+
function __removeFromTrashBin({ host }) {
|
|
611
|
+
const serializedData = toReq(payload);
|
|
612
|
+
const metadata = {
|
|
613
|
+
entityFqdn: 'wix.blog.v3.draft',
|
|
614
|
+
method: 'DELETE',
|
|
615
|
+
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.RemoveFromTrashBin',
|
|
616
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl({
|
|
617
|
+
protoPath: '/v3/draft-posts/trash-bin/{draftPostId}',
|
|
618
|
+
data: serializedData,
|
|
619
|
+
host,
|
|
620
|
+
}),
|
|
621
|
+
params: toURLSearchParams(serializedData),
|
|
622
|
+
transformResponse: fromRes,
|
|
623
|
+
};
|
|
624
|
+
return metadata;
|
|
625
|
+
}
|
|
626
|
+
__removeFromTrashBin.fromReq = fromReq;
|
|
627
|
+
return __removeFromTrashBin;
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* Retrieves a list of up to 100 draft posts per request.
|
|
631
|
+
*
|
|
632
|
+
* List Draft Posts runs with these defaults, which you can override:
|
|
633
|
+
* - `editedDate` is sorted in descending order.
|
|
634
|
+
* - `paging.limit` is `50`.
|
|
635
|
+
* - `paging.offset` is `0`.
|
|
636
|
+
*/
|
|
637
|
+
export function listDraftPosts(payload) {
|
|
638
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_listDraftPostsRequest, {});
|
|
639
|
+
const { fromJSON: fromRes } = serializer(_listDraftPostsResponse, {
|
|
640
|
+
_appEmbedData,
|
|
641
|
+
_audioData,
|
|
642
|
+
_background,
|
|
643
|
+
_coverMedia,
|
|
644
|
+
_design,
|
|
645
|
+
_draftPost,
|
|
646
|
+
_galleryData,
|
|
647
|
+
_galleryOptions,
|
|
648
|
+
_image,
|
|
649
|
+
_imageData,
|
|
650
|
+
_item,
|
|
651
|
+
_itemImage,
|
|
652
|
+
_itemStyle,
|
|
653
|
+
_itemVideo,
|
|
654
|
+
_mapData,
|
|
655
|
+
_mapSettings,
|
|
656
|
+
_media,
|
|
657
|
+
_metadata,
|
|
658
|
+
_moderationDetails,
|
|
659
|
+
_node,
|
|
660
|
+
_option,
|
|
661
|
+
_poll,
|
|
662
|
+
_pollData,
|
|
663
|
+
_pollDesign,
|
|
664
|
+
_richContent,
|
|
665
|
+
_v1Media,
|
|
666
|
+
_video,
|
|
667
|
+
_videoData,
|
|
668
|
+
_videoResolution,
|
|
669
|
+
_videoV2,
|
|
670
|
+
_wixMedia,
|
|
671
|
+
});
|
|
672
|
+
function __listDraftPosts({ host }) {
|
|
673
|
+
const serializedData = toReq(payload);
|
|
674
|
+
const metadata = {
|
|
675
|
+
entityFqdn: 'wix.blog.v3.draft',
|
|
676
|
+
method: 'GET',
|
|
677
|
+
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.ListDraftPosts',
|
|
678
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl({ protoPath: '/v3/draft-posts', data: serializedData, host }),
|
|
679
|
+
params: toURLSearchParams(serializedData),
|
|
680
|
+
transformResponse: fromRes,
|
|
681
|
+
};
|
|
682
|
+
return metadata;
|
|
683
|
+
}
|
|
684
|
+
__listDraftPosts.fromReq = fromReq;
|
|
685
|
+
return __listDraftPosts;
|
|
686
|
+
}
|
|
687
|
+
/** Gets a deleted draft post from the trash bin by the provided ID. */
|
|
688
|
+
export function getDeletedDraftPost(payload) {
|
|
689
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_getDeletedDraftPostRequest, {});
|
|
690
|
+
const { fromJSON: fromRes } = serializer(_getDeletedDraftPostResponse, {
|
|
691
|
+
_appEmbedData,
|
|
692
|
+
_audioData,
|
|
693
|
+
_background,
|
|
694
|
+
_coverMedia,
|
|
695
|
+
_design,
|
|
696
|
+
_draftPost,
|
|
697
|
+
_galleryData,
|
|
698
|
+
_galleryOptions,
|
|
699
|
+
_image,
|
|
700
|
+
_imageData,
|
|
701
|
+
_item,
|
|
702
|
+
_itemImage,
|
|
703
|
+
_itemStyle,
|
|
704
|
+
_itemVideo,
|
|
705
|
+
_mapData,
|
|
706
|
+
_mapSettings,
|
|
707
|
+
_media,
|
|
708
|
+
_metadata,
|
|
709
|
+
_moderationDetails,
|
|
710
|
+
_node,
|
|
711
|
+
_option,
|
|
712
|
+
_poll,
|
|
713
|
+
_pollData,
|
|
714
|
+
_pollDesign,
|
|
715
|
+
_richContent,
|
|
716
|
+
_v1Media,
|
|
717
|
+
_video,
|
|
718
|
+
_videoData,
|
|
719
|
+
_videoResolution,
|
|
720
|
+
_videoV2,
|
|
721
|
+
_wixMedia,
|
|
722
|
+
});
|
|
723
|
+
function __getDeletedDraftPost({ host }) {
|
|
724
|
+
const serializedData = toReq(payload);
|
|
725
|
+
const metadata = {
|
|
726
|
+
entityFqdn: 'wix.blog.v3.draft',
|
|
727
|
+
method: 'GET',
|
|
728
|
+
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.GetDeletedDraftPost',
|
|
729
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl({
|
|
730
|
+
protoPath: '/v3/draft-posts/trash-bin/{draftPostId}',
|
|
731
|
+
data: serializedData,
|
|
732
|
+
host,
|
|
733
|
+
}),
|
|
734
|
+
params: toURLSearchParams(serializedData),
|
|
735
|
+
transformResponse: fromRes,
|
|
736
|
+
};
|
|
737
|
+
return metadata;
|
|
738
|
+
}
|
|
739
|
+
__getDeletedDraftPost.fromReq = fromReq;
|
|
740
|
+
return __getDeletedDraftPost;
|
|
741
|
+
}
|
|
742
|
+
/** Restores a deleted draft post from the trash-bin by the provided ID. */
|
|
743
|
+
export function restoreFromTrashBin(payload) {
|
|
744
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_restoreFromTrashBinRequest, {});
|
|
745
|
+
const { fromJSON: fromRes } = serializer(_restoreFromTrashBinResponse, {
|
|
746
|
+
_appEmbedData,
|
|
747
|
+
_audioData,
|
|
748
|
+
_background,
|
|
749
|
+
_coverMedia,
|
|
750
|
+
_design,
|
|
751
|
+
_draftPost,
|
|
752
|
+
_galleryData,
|
|
753
|
+
_galleryOptions,
|
|
754
|
+
_image,
|
|
755
|
+
_imageData,
|
|
756
|
+
_item,
|
|
757
|
+
_itemImage,
|
|
758
|
+
_itemStyle,
|
|
759
|
+
_itemVideo,
|
|
760
|
+
_mapData,
|
|
761
|
+
_mapSettings,
|
|
762
|
+
_media,
|
|
763
|
+
_metadata,
|
|
764
|
+
_moderationDetails,
|
|
765
|
+
_node,
|
|
766
|
+
_option,
|
|
767
|
+
_poll,
|
|
768
|
+
_pollData,
|
|
769
|
+
_pollDesign,
|
|
770
|
+
_richContent,
|
|
771
|
+
_v1Media,
|
|
772
|
+
_video,
|
|
773
|
+
_videoData,
|
|
774
|
+
_videoResolution,
|
|
775
|
+
_videoV2,
|
|
776
|
+
_wixMedia,
|
|
777
|
+
});
|
|
778
|
+
function __restoreFromTrashBin({ host }) {
|
|
779
|
+
const serializedData = toReq(payload);
|
|
780
|
+
const metadata = {
|
|
781
|
+
entityFqdn: 'wix.blog.v3.draft',
|
|
782
|
+
method: 'POST',
|
|
783
|
+
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.RestoreFromTrashBin',
|
|
784
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl({
|
|
785
|
+
protoPath: '/v3/draft-posts/trash-bin/{draftPostId}/restore',
|
|
786
|
+
data: serializedData,
|
|
787
|
+
host,
|
|
788
|
+
}),
|
|
789
|
+
data: serializedData,
|
|
790
|
+
transformResponse: fromRes,
|
|
791
|
+
};
|
|
792
|
+
return metadata;
|
|
793
|
+
}
|
|
794
|
+
__restoreFromTrashBin.fromReq = fromReq;
|
|
795
|
+
return __restoreFromTrashBin;
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Retrieves a list of up to 100 draft posts, given the provided paging, filtering, and sorting.
|
|
799
|
+
*
|
|
800
|
+
* Query Draft Posts runs with these defaults, which you can override:
|
|
801
|
+
* - `editedDate` is sorted in `DESC` order.
|
|
802
|
+
* - `paging.limit` is `50`.
|
|
803
|
+
* - `paging.offset` is `0`.
|
|
804
|
+
*
|
|
805
|
+
* For field support for filters and sorting, see
|
|
806
|
+
* [Field Support for Filtering and Sorting](https://dev.wix.com/api/rest/wix-blog/blog/draft-posts/supported-filters-and-sorting).
|
|
807
|
+
*
|
|
808
|
+
* To learn about working with _Query_ endpoints, see
|
|
809
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
|
|
810
|
+
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
|
|
811
|
+
* [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
812
|
+
*/
|
|
813
|
+
export function queryDraftPosts(payload) {
|
|
814
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_queryDraftPostsRequest, {});
|
|
815
|
+
const { fromJSON: fromRes } = serializer(_queryDraftPostsResponse, {
|
|
816
|
+
_appEmbedData,
|
|
817
|
+
_audioData,
|
|
818
|
+
_background,
|
|
819
|
+
_coverMedia,
|
|
820
|
+
_design,
|
|
821
|
+
_draftPost,
|
|
822
|
+
_galleryData,
|
|
823
|
+
_galleryOptions,
|
|
824
|
+
_image,
|
|
825
|
+
_imageData,
|
|
826
|
+
_item,
|
|
827
|
+
_itemImage,
|
|
828
|
+
_itemStyle,
|
|
829
|
+
_itemVideo,
|
|
830
|
+
_mapData,
|
|
831
|
+
_mapSettings,
|
|
832
|
+
_media,
|
|
833
|
+
_metadata,
|
|
834
|
+
_moderationDetails,
|
|
835
|
+
_node,
|
|
836
|
+
_option,
|
|
837
|
+
_poll,
|
|
838
|
+
_pollData,
|
|
839
|
+
_pollDesign,
|
|
840
|
+
_richContent,
|
|
841
|
+
_v1Media,
|
|
842
|
+
_video,
|
|
843
|
+
_videoData,
|
|
844
|
+
_videoResolution,
|
|
845
|
+
_videoV2,
|
|
846
|
+
_wixMedia,
|
|
847
|
+
});
|
|
848
|
+
function __queryDraftPosts({ host }) {
|
|
849
|
+
const serializedData = toReq(payload);
|
|
850
|
+
const metadata = {
|
|
851
|
+
entityFqdn: 'wix.blog.v3.draft',
|
|
852
|
+
method: 'POST',
|
|
853
|
+
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.QueryDraftPosts',
|
|
854
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl({ protoPath: '/v3/draft-posts/query', data: serializedData, host }),
|
|
855
|
+
data: serializedData,
|
|
856
|
+
transformResponse: fromRes,
|
|
857
|
+
};
|
|
858
|
+
return metadata;
|
|
859
|
+
}
|
|
860
|
+
__queryDraftPosts.fromReq = fromReq;
|
|
861
|
+
return __queryDraftPosts;
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* Publishes a specified draft post by ID. This creates a new [post](https://dev.wix.com/api/rest/wix-blog/blog/posts) entity with the data from the draft post.
|
|
865
|
+
* If the specified draft post was already published, the published post will be updated with the latest values
|
|
866
|
+
* from the draft post entity.
|
|
867
|
+
*/
|
|
868
|
+
export function publishDraftPost(payload) {
|
|
869
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_publishDraftPostRequest, {});
|
|
870
|
+
const { fromJSON: fromRes } = serializer(_publishDraftPostResponse, {});
|
|
871
|
+
function __publishDraftPost({ host }) {
|
|
872
|
+
const serializedData = toReq(payload);
|
|
873
|
+
const metadata = {
|
|
874
|
+
entityFqdn: 'wix.blog.v3.draft',
|
|
875
|
+
method: 'POST',
|
|
876
|
+
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.PublishDraftPost',
|
|
877
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3DraftPostServiceUrl({
|
|
878
|
+
protoPath: '/v3/draft-posts/{draftPostId}/publish',
|
|
879
|
+
data: serializedData,
|
|
880
|
+
host,
|
|
881
|
+
}),
|
|
882
|
+
data: serializedData,
|
|
883
|
+
transformResponse: fromRes,
|
|
884
|
+
};
|
|
885
|
+
return metadata;
|
|
886
|
+
}
|
|
887
|
+
__publishDraftPost.fromReq = fromReq;
|
|
888
|
+
return __publishDraftPost;
|
|
889
|
+
}
|
|
890
|
+
//# sourceMappingURL=blog-v3-draft.http.js.map
|