@wix/auto_sdk_blog_posts 1.0.18 → 1.0.20

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 (129) hide show
  1. package/build/{cjs/src/blog-v3-post-posts.universal.d.ts → blog-v3-post-posts.universal-CEsWp0Fx.d.mts} +256 -485
  2. package/build/{es/src/blog-v3-post-posts.universal.d.ts → blog-v3-post-posts.universal-CEsWp0Fx.d.ts} +256 -485
  3. package/build/index.d.mts +130 -0
  4. package/build/index.d.ts +130 -0
  5. package/build/index.js +1975 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +1899 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/{cjs/src/blog-v3-post-posts.universal.d.ts → blog-v3-post-posts.universal-nU7XoyIE.d.mts} +256 -485
  10. package/build/internal/{es/src/blog-v3-post-posts.universal.d.ts → blog-v3-post-posts.universal-nU7XoyIE.d.ts} +256 -485
  11. package/build/internal/index.d.mts +130 -0
  12. package/build/internal/index.d.ts +130 -0
  13. package/build/internal/index.js +1975 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +1899 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/{es/src/blog-v3-post-posts.types.d.ts → internal/meta.d.mts} +238 -1375
  18. package/build/internal/{cjs/src/blog-v3-post-posts.types.d.ts → meta.d.ts} +238 -1375
  19. package/build/internal/meta.js +1002 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +969 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/{cjs/src/blog-v3-post-posts.types.d.ts → meta.d.mts} +238 -1375
  24. package/build/{internal/es/src/blog-v3-post-posts.types.d.ts → meta.d.ts} +238 -1375
  25. package/build/meta.js +1002 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +969 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/blog-v3-post-posts.context.d.ts +0 -37
  40. package/build/cjs/src/blog-v3-post-posts.context.js +0 -82
  41. package/build/cjs/src/blog-v3-post-posts.context.js.map +0 -1
  42. package/build/cjs/src/blog-v3-post-posts.http.d.ts +0 -59
  43. package/build/cjs/src/blog-v3-post-posts.http.js +0 -892
  44. package/build/cjs/src/blog-v3-post-posts.http.js.map +0 -1
  45. package/build/cjs/src/blog-v3-post-posts.meta.d.ts +0 -25
  46. package/build/cjs/src/blog-v3-post-posts.meta.js +0 -161
  47. package/build/cjs/src/blog-v3-post-posts.meta.js.map +0 -1
  48. package/build/cjs/src/blog-v3-post-posts.public.d.ts +0 -99
  49. package/build/cjs/src/blog-v3-post-posts.public.js +0 -320
  50. package/build/cjs/src/blog-v3-post-posts.public.js.map +0 -1
  51. package/build/cjs/src/blog-v3-post-posts.types.js +0 -485
  52. package/build/cjs/src/blog-v3-post-posts.types.js.map +0 -1
  53. package/build/cjs/src/blog-v3-post-posts.universal.js +0 -966
  54. package/build/cjs/src/blog-v3-post-posts.universal.js.map +0 -1
  55. package/build/es/index.d.ts +0 -1
  56. package/build/es/index.js +0 -2
  57. package/build/es/index.js.map +0 -1
  58. package/build/es/index.typings.d.ts +0 -1
  59. package/build/es/index.typings.js +0 -2
  60. package/build/es/index.typings.js.map +0 -1
  61. package/build/es/meta.d.ts +0 -1
  62. package/build/es/meta.js +0 -2
  63. package/build/es/meta.js.map +0 -1
  64. package/build/es/src/blog-v3-post-posts.context.d.ts +0 -37
  65. package/build/es/src/blog-v3-post-posts.context.js +0 -37
  66. package/build/es/src/blog-v3-post-posts.context.js.map +0 -1
  67. package/build/es/src/blog-v3-post-posts.http.d.ts +0 -59
  68. package/build/es/src/blog-v3-post-posts.http.js +0 -882
  69. package/build/es/src/blog-v3-post-posts.http.js.map +0 -1
  70. package/build/es/src/blog-v3-post-posts.meta.d.ts +0 -25
  71. package/build/es/src/blog-v3-post-posts.meta.js +0 -128
  72. package/build/es/src/blog-v3-post-posts.meta.js.map +0 -1
  73. package/build/es/src/blog-v3-post-posts.public.d.ts +0 -99
  74. package/build/es/src/blog-v3-post-posts.public.js +0 -268
  75. package/build/es/src/blog-v3-post-posts.public.js.map +0 -1
  76. package/build/es/src/blog-v3-post-posts.types.js +0 -482
  77. package/build/es/src/blog-v3-post-posts.types.js.map +0 -1
  78. package/build/es/src/blog-v3-post-posts.universal.js +0 -933
  79. package/build/es/src/blog-v3-post-posts.universal.js.map +0 -1
  80. package/build/internal/cjs/index.d.ts +0 -1
  81. package/build/internal/cjs/index.js +0 -18
  82. package/build/internal/cjs/index.js.map +0 -1
  83. package/build/internal/cjs/index.typings.d.ts +0 -1
  84. package/build/internal/cjs/index.typings.js +0 -18
  85. package/build/internal/cjs/index.typings.js.map +0 -1
  86. package/build/internal/cjs/meta.d.ts +0 -1
  87. package/build/internal/cjs/meta.js +0 -18
  88. package/build/internal/cjs/meta.js.map +0 -1
  89. package/build/internal/cjs/src/blog-v3-post-posts.context.d.ts +0 -37
  90. package/build/internal/cjs/src/blog-v3-post-posts.context.js +0 -82
  91. package/build/internal/cjs/src/blog-v3-post-posts.context.js.map +0 -1
  92. package/build/internal/cjs/src/blog-v3-post-posts.http.d.ts +0 -59
  93. package/build/internal/cjs/src/blog-v3-post-posts.http.js +0 -892
  94. package/build/internal/cjs/src/blog-v3-post-posts.http.js.map +0 -1
  95. package/build/internal/cjs/src/blog-v3-post-posts.meta.d.ts +0 -25
  96. package/build/internal/cjs/src/blog-v3-post-posts.meta.js +0 -161
  97. package/build/internal/cjs/src/blog-v3-post-posts.meta.js.map +0 -1
  98. package/build/internal/cjs/src/blog-v3-post-posts.public.d.ts +0 -99
  99. package/build/internal/cjs/src/blog-v3-post-posts.public.js +0 -320
  100. package/build/internal/cjs/src/blog-v3-post-posts.public.js.map +0 -1
  101. package/build/internal/cjs/src/blog-v3-post-posts.types.js +0 -485
  102. package/build/internal/cjs/src/blog-v3-post-posts.types.js.map +0 -1
  103. package/build/internal/cjs/src/blog-v3-post-posts.universal.js +0 -966
  104. package/build/internal/cjs/src/blog-v3-post-posts.universal.js.map +0 -1
  105. package/build/internal/es/index.d.ts +0 -1
  106. package/build/internal/es/index.js +0 -2
  107. package/build/internal/es/index.js.map +0 -1
  108. package/build/internal/es/index.typings.d.ts +0 -1
  109. package/build/internal/es/index.typings.js +0 -2
  110. package/build/internal/es/index.typings.js.map +0 -1
  111. package/build/internal/es/meta.d.ts +0 -1
  112. package/build/internal/es/meta.js +0 -2
  113. package/build/internal/es/meta.js.map +0 -1
  114. package/build/internal/es/src/blog-v3-post-posts.context.d.ts +0 -37
  115. package/build/internal/es/src/blog-v3-post-posts.context.js +0 -37
  116. package/build/internal/es/src/blog-v3-post-posts.context.js.map +0 -1
  117. package/build/internal/es/src/blog-v3-post-posts.http.d.ts +0 -59
  118. package/build/internal/es/src/blog-v3-post-posts.http.js +0 -882
  119. package/build/internal/es/src/blog-v3-post-posts.http.js.map +0 -1
  120. package/build/internal/es/src/blog-v3-post-posts.meta.d.ts +0 -25
  121. package/build/internal/es/src/blog-v3-post-posts.meta.js +0 -128
  122. package/build/internal/es/src/blog-v3-post-posts.meta.js.map +0 -1
  123. package/build/internal/es/src/blog-v3-post-posts.public.d.ts +0 -99
  124. package/build/internal/es/src/blog-v3-post-posts.public.js +0 -268
  125. package/build/internal/es/src/blog-v3-post-posts.public.js.map +0 -1
  126. package/build/internal/es/src/blog-v3-post-posts.types.js +0 -482
  127. package/build/internal/es/src/blog-v3-post-posts.types.js.map +0 -1
  128. package/build/internal/es/src/blog-v3-post-posts.universal.js +0 -933
  129. package/build/internal/es/src/blog-v3-post-posts.universal.js.map +0 -1
@@ -1,882 +0,0 @@
1
- import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';
2
- import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';
3
- import { transformRESTBytesToSDKBytes } from '@wix/sdk-runtime/transformations/bytes';
4
- import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
5
- import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
6
- import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
7
- import { resolveUrl } from '@wix/sdk-runtime/rest-modules';
8
- function resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl(opts) {
9
- const domainToMappings = {
10
- 'api._api_base_domain_': [
11
- {
12
- srcPath: '/communities-blog-node-api',
13
- destPath: '',
14
- },
15
- ],
16
- 'www._base_domain_': [
17
- {
18
- srcPath: '/_api/communities-blog-node-api',
19
- destPath: '',
20
- },
21
- {
22
- srcPath: '/_api/communities-blog-node-api/v3/posts',
23
- destPath: '/v3/posts',
24
- },
25
- {
26
- srcPath: '/_api/communities-blog-node-api/v2/stats',
27
- destPath: '/v2/stats',
28
- },
29
- ],
30
- 'apps._base_domain_': [
31
- {
32
- srcPath: '/_api/communities-blog-node-api',
33
- destPath: '',
34
- },
35
- {
36
- srcPath: '/_api/communities-blog-node-api/v3/posts',
37
- destPath: '/v3/posts',
38
- },
39
- {
40
- srcPath: '/_api/communities-blog-node-api/v2/stats',
41
- destPath: '/v2/stats',
42
- },
43
- ],
44
- _: [
45
- {
46
- srcPath: '/_api/communities-blog-node-api',
47
- destPath: '',
48
- },
49
- {
50
- srcPath: '/_api/communities-blog-node-api/_api/blogs/this',
51
- destPath: '/_api/blogs/this',
52
- },
53
- {
54
- srcPath: '/_api/communities-blog-node-api/_api/categories',
55
- destPath: '/_api/categories',
56
- },
57
- {
58
- srcPath: '/_api/communities-blog-node-api/_api/site-properties',
59
- destPath: '/_api/site-properties',
60
- },
61
- {
62
- srcPath: '/_api/communities-blog-node-api/_api/posts/content',
63
- destPath: '/_api/posts/content',
64
- },
65
- {
66
- srcPath: '/_api/communities-blog-node-api/v3/posts',
67
- destPath: '/v3/posts',
68
- },
69
- {
70
- srcPath: '/_api/communities-blog-node-api/v2/stats',
71
- destPath: '/v2/stats',
72
- },
73
- ],
74
- 'editor._base_domain_': [
75
- {
76
- srcPath: '/_api/communities-blog-node-api',
77
- destPath: '',
78
- },
79
- ],
80
- 'blocks._base_domain_': [
81
- {
82
- srcPath: '/_api/communities-blog-node-api',
83
- destPath: '',
84
- },
85
- ],
86
- 'create.editorx': [
87
- {
88
- srcPath: '/_api/communities-blog-node-api',
89
- destPath: '',
90
- },
91
- ],
92
- '*.dev.wix-code.com': [
93
- {
94
- srcPath: '/_api/communities-blog-node-api',
95
- destPath: '',
96
- },
97
- ],
98
- '*.pub.wix-code.com': [
99
- {
100
- srcPath: '/_api/communities-blog-node-api',
101
- destPath: '',
102
- },
103
- ],
104
- 'bo._base_domain_': [
105
- {
106
- srcPath: '/_api/communities-blog-node-api',
107
- destPath: '',
108
- },
109
- {
110
- srcPath: '/_api/communities-blog-node-api',
111
- destPath: '',
112
- },
113
- ],
114
- 'wixbo.ai': [
115
- {
116
- srcPath: '/_api/communities-blog-node-api',
117
- destPath: '',
118
- },
119
- {
120
- srcPath: '/_api/communities-blog-node-api',
121
- destPath: '',
122
- },
123
- ],
124
- 'wix-bo.com': [
125
- {
126
- srcPath: '/_api/communities-blog-node-api',
127
- destPath: '',
128
- },
129
- {
130
- srcPath: '/_api/communities-blog-node-api',
131
- destPath: '',
132
- },
133
- ],
134
- 'manage._base_domain_': [
135
- {
136
- srcPath: '/_api/communities-blog-node-api',
137
- destPath: '',
138
- },
139
- ],
140
- 'social-blog._base_domain_': [
141
- {
142
- srcPath: '/_api/communities-blog-node-api',
143
- destPath: '',
144
- },
145
- ],
146
- 'editor.wixapps.net': [
147
- {
148
- srcPath: '/_api/communities-blog-node-api',
149
- destPath: '',
150
- },
151
- ],
152
- 'dev._base_domain_': [
153
- {
154
- srcPath: '/_api/communities-blog-node-api',
155
- destPath: '',
156
- },
157
- ],
158
- 'www.wixapis.com': [
159
- {
160
- srcPath: '/blog/v2',
161
- destPath: '/v2',
162
- },
163
- {
164
- srcPath: '/blog/v3',
165
- destPath: '/v3',
166
- },
167
- {
168
- srcPath: '/v2/stats',
169
- destPath: '/v2/stats',
170
- },
171
- {
172
- srcPath: '/v3/posts',
173
- destPath: '/v3/posts',
174
- },
175
- {
176
- srcPath: '/blog/v3/posts',
177
- destPath: '/v3/posts',
178
- },
179
- {
180
- srcPath: '/blog/v2/stats',
181
- destPath: '/v2/stats',
182
- },
183
- {
184
- srcPath: '/_api/v3/posts',
185
- destPath: '/v3/posts',
186
- },
187
- ],
188
- };
189
- return resolveUrl(Object.assign(opts, { domainToMappings }));
190
- }
191
- function resolveComWixpressNpmCommunitiesPlatformizedBlogBlogStatsServiceUrl(opts) {
192
- const domainToMappings = {
193
- 'api._api_base_domain_': [
194
- {
195
- srcPath: '/communities-blog-node-api',
196
- destPath: '',
197
- },
198
- ],
199
- 'www._base_domain_': [
200
- {
201
- srcPath: '/_api/communities-blog-node-api',
202
- destPath: '',
203
- },
204
- {
205
- srcPath: '/_api/communities-blog-node-api/v3/posts',
206
- destPath: '/v3/posts',
207
- },
208
- {
209
- srcPath: '/_api/communities-blog-node-api/v2/stats',
210
- destPath: '/v2/stats',
211
- },
212
- ],
213
- 'apps._base_domain_': [
214
- {
215
- srcPath: '/_api/communities-blog-node-api',
216
- destPath: '',
217
- },
218
- {
219
- srcPath: '/_api/communities-blog-node-api/v3/posts',
220
- destPath: '/v3/posts',
221
- },
222
- {
223
- srcPath: '/_api/communities-blog-node-api/v2/stats',
224
- destPath: '/v2/stats',
225
- },
226
- ],
227
- _: [
228
- {
229
- srcPath: '/_api/communities-blog-node-api',
230
- destPath: '',
231
- },
232
- {
233
- srcPath: '/_api/communities-blog-node-api/_api/blogs/this',
234
- destPath: '/_api/blogs/this',
235
- },
236
- {
237
- srcPath: '/_api/communities-blog-node-api/_api/categories',
238
- destPath: '/_api/categories',
239
- },
240
- {
241
- srcPath: '/_api/communities-blog-node-api/_api/site-properties',
242
- destPath: '/_api/site-properties',
243
- },
244
- {
245
- srcPath: '/_api/communities-blog-node-api/_api/posts/content',
246
- destPath: '/_api/posts/content',
247
- },
248
- {
249
- srcPath: '/_api/communities-blog-node-api/v3/posts',
250
- destPath: '/v3/posts',
251
- },
252
- {
253
- srcPath: '/_api/communities-blog-node-api/v2/stats',
254
- destPath: '/v2/stats',
255
- },
256
- ],
257
- 'editor._base_domain_': [
258
- {
259
- srcPath: '/_api/communities-blog-node-api',
260
- destPath: '',
261
- },
262
- ],
263
- 'blocks._base_domain_': [
264
- {
265
- srcPath: '/_api/communities-blog-node-api',
266
- destPath: '',
267
- },
268
- ],
269
- 'create.editorx': [
270
- {
271
- srcPath: '/_api/communities-blog-node-api',
272
- destPath: '',
273
- },
274
- ],
275
- '*.dev.wix-code.com': [
276
- {
277
- srcPath: '/_api/communities-blog-node-api',
278
- destPath: '',
279
- },
280
- ],
281
- '*.pub.wix-code.com': [
282
- {
283
- srcPath: '/_api/communities-blog-node-api',
284
- destPath: '',
285
- },
286
- ],
287
- 'bo._base_domain_': [
288
- {
289
- srcPath: '/_api/communities-blog-node-api',
290
- destPath: '',
291
- },
292
- {
293
- srcPath: '/_api/communities-blog-node-api',
294
- destPath: '',
295
- },
296
- ],
297
- 'wixbo.ai': [
298
- {
299
- srcPath: '/_api/communities-blog-node-api',
300
- destPath: '',
301
- },
302
- {
303
- srcPath: '/_api/communities-blog-node-api',
304
- destPath: '',
305
- },
306
- ],
307
- 'wix-bo.com': [
308
- {
309
- srcPath: '/_api/communities-blog-node-api',
310
- destPath: '',
311
- },
312
- {
313
- srcPath: '/_api/communities-blog-node-api',
314
- destPath: '',
315
- },
316
- ],
317
- 'manage._base_domain_': [
318
- {
319
- srcPath: '/_api/communities-blog-node-api',
320
- destPath: '',
321
- },
322
- ],
323
- 'social-blog._base_domain_': [
324
- {
325
- srcPath: '/_api/communities-blog-node-api',
326
- destPath: '',
327
- },
328
- ],
329
- 'editor.wixapps.net': [
330
- {
331
- srcPath: '/_api/communities-blog-node-api',
332
- destPath: '',
333
- },
334
- ],
335
- 'dev._base_domain_': [
336
- {
337
- srcPath: '/_api/communities-blog-node-api',
338
- destPath: '',
339
- },
340
- ],
341
- 'www.wixapis.com': [
342
- {
343
- srcPath: '/blog/v2',
344
- destPath: '/v2',
345
- },
346
- {
347
- srcPath: '/blog/v3',
348
- destPath: '/v3',
349
- },
350
- {
351
- srcPath: '/v2/stats',
352
- destPath: '/v2/stats',
353
- },
354
- {
355
- srcPath: '/v3/posts',
356
- destPath: '/v3/posts',
357
- },
358
- {
359
- srcPath: '/blog/v3/posts',
360
- destPath: '/v3/posts',
361
- },
362
- {
363
- srcPath: '/blog/v2/stats',
364
- destPath: '/v2/stats',
365
- },
366
- {
367
- srcPath: '/_api/v3/posts',
368
- destPath: '/v3/posts',
369
- },
370
- ],
371
- };
372
- return resolveUrl(Object.assign(opts, { domainToMappings }));
373
- }
374
- const PACKAGE_NAME = '@wix/auto_sdk_blog_posts';
375
- /**
376
- * Retrieves the number of published posts per month within a specified time range.
377
- *
378
- * The time range is set using the `rangeStart` and `months` properties.
379
- * The time range always starts on the 1st day of the month set in `rangeStart` and
380
- * includes the number of `months` following `rangeStart`.
381
- * For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
382
- * the time range will be from `'2022-03-01'` until `'2022-06-30'`. The time range always ends on the last day of the month.
383
- * > Note: If there are no published posts in a month within the time range, that month is not included in the response. For example, let's say a blog has `0` posts dated in February 2022. If `rangeStart` is set to `'2022-01-01'` and `months` is set to `3`, the response includes `postCount` values for January and March, but not February.
384
- */
385
- export function queryPostCountStats(payload) {
386
- function __queryPostCountStats({ host }) {
387
- const serializedData = transformPaths(payload, [
388
- {
389
- transformFn: transformSDKTimestampToRESTTimestamp,
390
- paths: [{ path: 'rangeStart' }, { path: 'rangeEnd' }],
391
- },
392
- ]);
393
- const metadata = {
394
- entityFqdn: 'wix.blog.v3.post',
395
- method: 'GET',
396
- methodFqn: 'com.wixpress.npm.communities.platformized.blog.BlogStatsService.QueryPostCountStats',
397
- packageName: PACKAGE_NAME,
398
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogBlogStatsServiceUrl({
399
- protoPath: '/v2/stats/post/count',
400
- data: serializedData,
401
- host,
402
- }),
403
- params: toURLSearchParams(serializedData),
404
- transformResponse: (payload) => transformPaths(payload, [
405
- {
406
- transformFn: transformRESTTimestampToSDKTimestamp,
407
- paths: [{ path: 'stats.periodStart' }],
408
- },
409
- ]),
410
- };
411
- return metadata;
412
- }
413
- return __queryPostCountStats;
414
- }
415
- /** Retrieves the total amount of published posts of the blog. */
416
- export function getTotalPosts(payload) {
417
- function __getTotalPosts({ host }) {
418
- const metadata = {
419
- entityFqdn: 'wix.blog.v3.post',
420
- method: 'GET',
421
- methodFqn: 'com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts',
422
- packageName: PACKAGE_NAME,
423
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogBlogStatsServiceUrl({
424
- protoPath: '/v2/stats/posts/total',
425
- data: payload,
426
- host,
427
- }),
428
- params: toURLSearchParams(payload),
429
- };
430
- return metadata;
431
- }
432
- return __getTotalPosts;
433
- }
434
- /** Retrieves a post by the specified ID. */
435
- export function getPost(payload) {
436
- function __getPost({ host }) {
437
- const metadata = {
438
- entityFqdn: 'wix.blog.v3.post',
439
- method: 'GET',
440
- methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost',
441
- packageName: PACKAGE_NAME,
442
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
443
- protoPath: '/v3/posts/{postId}',
444
- data: payload,
445
- host,
446
- }),
447
- params: toURLSearchParams(payload),
448
- transformResponse: (payload) => transformPaths(payload, [
449
- {
450
- transformFn: transformRESTTimestampToSDKTimestamp,
451
- paths: [
452
- { path: 'post.firstPublishedDate' },
453
- { path: 'post.lastPublishedDate' },
454
- { path: 'post.coverMedia.image.urlExpirationDate' },
455
- { path: 'post.coverMedia.video.thumbnail.urlExpirationDate' },
456
- { path: 'post.heroImage.urlExpirationDate' },
457
- { path: 'post.richContent.metadata.createdTimestamp' },
458
- { path: 'post.richContent.metadata.updatedTimestamp' },
459
- { path: 'post.moderationDetails.submittedDate' },
460
- { path: 'post.moderationDetails.moderationDate' },
461
- { path: 'post.media.wixMedia.image.urlExpirationDate' },
462
- { path: 'post.media.wixMedia.videoV2.urlExpirationDate' },
463
- {
464
- path: 'post.media.wixMedia.videoV2.resolutions.urlExpirationDate',
465
- },
466
- {
467
- path: 'post.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate',
468
- },
469
- { path: 'post.media.wixMedia.videoV2.posters.urlExpirationDate' },
470
- ],
471
- },
472
- {
473
- transformFn: transformRESTBytesToSDKBytes,
474
- paths: [{ path: 'post.richContentCompressed' }],
475
- },
476
- {
477
- transformFn: transformRESTFloatToSDKFloat,
478
- paths: [
479
- { path: 'post.coverMedia.image.focalPoint.x' },
480
- { path: 'post.coverMedia.image.focalPoint.y' },
481
- { path: 'post.coverMedia.video.thumbnail.focalPoint.x' },
482
- { path: 'post.coverMedia.video.thumbnail.focalPoint.y' },
483
- { path: 'post.heroImage.focalPoint.x' },
484
- { path: 'post.heroImage.focalPoint.y' },
485
- { path: 'post.media.wixMedia.image.focalPoint.x' },
486
- { path: 'post.media.wixMedia.image.focalPoint.y' },
487
- {
488
- path: 'post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x',
489
- },
490
- {
491
- path: 'post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y',
492
- },
493
- { path: 'post.media.wixMedia.videoV2.posters.focalPoint.x' },
494
- { path: 'post.media.wixMedia.videoV2.posters.focalPoint.y' },
495
- { path: 'post.metrics.averageRating' },
496
- {
497
- path: 'post.richContent.nodes.galleryData.items.image.media.duration',
498
- },
499
- {
500
- path: 'post.richContent.nodes.galleryData.items.video.media.duration',
501
- },
502
- {
503
- path: 'post.richContent.nodes.galleryData.items.video.thumbnail.duration',
504
- },
505
- { path: 'post.richContent.nodes.galleryData.options.item.ratio' },
506
- { path: 'post.richContent.nodes.imageData.image.duration' },
507
- { path: 'post.richContent.nodes.mapData.mapSettings.lat' },
508
- { path: 'post.richContent.nodes.mapData.mapSettings.lng' },
509
- { path: 'post.richContent.nodes.pollData.poll.image.duration' },
510
- {
511
- path: 'post.richContent.nodes.pollData.poll.options.image.duration',
512
- },
513
- {
514
- path: 'post.richContent.nodes.pollData.design.poll.background.image.duration',
515
- },
516
- { path: 'post.richContent.nodes.appEmbedData.image.duration' },
517
- { path: 'post.richContent.nodes.videoData.video.duration' },
518
- { path: 'post.richContent.nodes.videoData.thumbnail.duration' },
519
- { path: 'post.richContent.nodes.audioData.audio.duration' },
520
- { path: 'post.richContent.nodes.audioData.coverImage.duration' },
521
- ],
522
- },
523
- ]),
524
- };
525
- return metadata;
526
- }
527
- return __getPost;
528
- }
529
- /**
530
- * Retrieves a post with the provided slug.
531
- *
532
- * The slug is the end of a post's URL that refers to a specific post.
533
- * For example, if a post's URL is `https:/example.com/blog/post/my-post-slug`,
534
- * the slug is `my-post-slug`. The slug is case-sensitive, and is generally derived from the post title,
535
- * unless specified otherwise.
536
- */
537
- export function getPostBySlug(payload) {
538
- function __getPostBySlug({ host }) {
539
- const metadata = {
540
- entityFqdn: 'wix.blog.v3.post',
541
- method: 'GET',
542
- methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug',
543
- packageName: PACKAGE_NAME,
544
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
545
- protoPath: '/v3/posts/slugs/{slug}',
546
- data: payload,
547
- host,
548
- }),
549
- params: toURLSearchParams(payload),
550
- transformResponse: (payload) => transformPaths(payload, [
551
- {
552
- transformFn: transformRESTTimestampToSDKTimestamp,
553
- paths: [
554
- { path: 'post.firstPublishedDate' },
555
- { path: 'post.lastPublishedDate' },
556
- { path: 'post.coverMedia.image.urlExpirationDate' },
557
- { path: 'post.coverMedia.video.thumbnail.urlExpirationDate' },
558
- { path: 'post.heroImage.urlExpirationDate' },
559
- { path: 'post.richContent.metadata.createdTimestamp' },
560
- { path: 'post.richContent.metadata.updatedTimestamp' },
561
- { path: 'post.moderationDetails.submittedDate' },
562
- { path: 'post.moderationDetails.moderationDate' },
563
- { path: 'post.media.wixMedia.image.urlExpirationDate' },
564
- { path: 'post.media.wixMedia.videoV2.urlExpirationDate' },
565
- {
566
- path: 'post.media.wixMedia.videoV2.resolutions.urlExpirationDate',
567
- },
568
- {
569
- path: 'post.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate',
570
- },
571
- { path: 'post.media.wixMedia.videoV2.posters.urlExpirationDate' },
572
- ],
573
- },
574
- {
575
- transformFn: transformRESTBytesToSDKBytes,
576
- paths: [{ path: 'post.richContentCompressed' }],
577
- },
578
- {
579
- transformFn: transformRESTFloatToSDKFloat,
580
- paths: [
581
- { path: 'post.coverMedia.image.focalPoint.x' },
582
- { path: 'post.coverMedia.image.focalPoint.y' },
583
- { path: 'post.coverMedia.video.thumbnail.focalPoint.x' },
584
- { path: 'post.coverMedia.video.thumbnail.focalPoint.y' },
585
- { path: 'post.heroImage.focalPoint.x' },
586
- { path: 'post.heroImage.focalPoint.y' },
587
- { path: 'post.media.wixMedia.image.focalPoint.x' },
588
- { path: 'post.media.wixMedia.image.focalPoint.y' },
589
- {
590
- path: 'post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x',
591
- },
592
- {
593
- path: 'post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y',
594
- },
595
- { path: 'post.media.wixMedia.videoV2.posters.focalPoint.x' },
596
- { path: 'post.media.wixMedia.videoV2.posters.focalPoint.y' },
597
- { path: 'post.metrics.averageRating' },
598
- {
599
- path: 'post.richContent.nodes.galleryData.items.image.media.duration',
600
- },
601
- {
602
- path: 'post.richContent.nodes.galleryData.items.video.media.duration',
603
- },
604
- {
605
- path: 'post.richContent.nodes.galleryData.items.video.thumbnail.duration',
606
- },
607
- { path: 'post.richContent.nodes.galleryData.options.item.ratio' },
608
- { path: 'post.richContent.nodes.imageData.image.duration' },
609
- { path: 'post.richContent.nodes.mapData.mapSettings.lat' },
610
- { path: 'post.richContent.nodes.mapData.mapSettings.lng' },
611
- { path: 'post.richContent.nodes.pollData.poll.image.duration' },
612
- {
613
- path: 'post.richContent.nodes.pollData.poll.options.image.duration',
614
- },
615
- {
616
- path: 'post.richContent.nodes.pollData.design.poll.background.image.duration',
617
- },
618
- { path: 'post.richContent.nodes.appEmbedData.image.duration' },
619
- { path: 'post.richContent.nodes.videoData.video.duration' },
620
- { path: 'post.richContent.nodes.videoData.thumbnail.duration' },
621
- { path: 'post.richContent.nodes.audioData.audio.duration' },
622
- { path: 'post.richContent.nodes.audioData.coverImage.duration' },
623
- ],
624
- },
625
- ]),
626
- };
627
- return metadata;
628
- }
629
- return __getPostBySlug;
630
- }
631
- /**
632
- * Retrieves a list of up to 100 published posts per request.
633
- *
634
- * List Posts runs with these defaults, which you can override:
635
- * - `firstPublishedDate` is sorted in descending order, with pinned posts first.
636
- * - `paging.limit` is `50`.
637
- * - `paging.offset` is `0`.
638
- */
639
- export function listPosts(payload) {
640
- function __listPosts({ host }) {
641
- const metadata = {
642
- entityFqdn: 'wix.blog.v3.post',
643
- method: 'GET',
644
- methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts',
645
- packageName: PACKAGE_NAME,
646
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
647
- protoPath: '/v3/posts',
648
- data: payload,
649
- host,
650
- }),
651
- params: toURLSearchParams(payload),
652
- transformResponse: (payload) => transformPaths(payload, [
653
- {
654
- transformFn: transformRESTTimestampToSDKTimestamp,
655
- paths: [
656
- { path: 'posts.firstPublishedDate' },
657
- { path: 'posts.lastPublishedDate' },
658
- { path: 'posts.coverMedia.image.urlExpirationDate' },
659
- { path: 'posts.coverMedia.video.thumbnail.urlExpirationDate' },
660
- { path: 'posts.heroImage.urlExpirationDate' },
661
- { path: 'posts.richContent.metadata.createdTimestamp' },
662
- { path: 'posts.richContent.metadata.updatedTimestamp' },
663
- { path: 'posts.moderationDetails.submittedDate' },
664
- { path: 'posts.moderationDetails.moderationDate' },
665
- { path: 'posts.media.wixMedia.image.urlExpirationDate' },
666
- { path: 'posts.media.wixMedia.videoV2.urlExpirationDate' },
667
- {
668
- path: 'posts.media.wixMedia.videoV2.resolutions.urlExpirationDate',
669
- },
670
- {
671
- path: 'posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate',
672
- },
673
- {
674
- path: 'posts.media.wixMedia.videoV2.posters.urlExpirationDate',
675
- },
676
- ],
677
- },
678
- {
679
- transformFn: transformRESTBytesToSDKBytes,
680
- paths: [{ path: 'posts.richContentCompressed' }],
681
- },
682
- {
683
- transformFn: transformRESTFloatToSDKFloat,
684
- paths: [
685
- { path: 'posts.coverMedia.image.focalPoint.x' },
686
- { path: 'posts.coverMedia.image.focalPoint.y' },
687
- { path: 'posts.coverMedia.video.thumbnail.focalPoint.x' },
688
- { path: 'posts.coverMedia.video.thumbnail.focalPoint.y' },
689
- { path: 'posts.heroImage.focalPoint.x' },
690
- { path: 'posts.heroImage.focalPoint.y' },
691
- { path: 'posts.media.wixMedia.image.focalPoint.x' },
692
- { path: 'posts.media.wixMedia.image.focalPoint.y' },
693
- {
694
- path: 'posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x',
695
- },
696
- {
697
- path: 'posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y',
698
- },
699
- { path: 'posts.media.wixMedia.videoV2.posters.focalPoint.x' },
700
- { path: 'posts.media.wixMedia.videoV2.posters.focalPoint.y' },
701
- { path: 'posts.metrics.averageRating' },
702
- {
703
- path: 'posts.richContent.nodes.galleryData.items.image.media.duration',
704
- },
705
- {
706
- path: 'posts.richContent.nodes.galleryData.items.video.media.duration',
707
- },
708
- {
709
- path: 'posts.richContent.nodes.galleryData.items.video.thumbnail.duration',
710
- },
711
- {
712
- path: 'posts.richContent.nodes.galleryData.options.item.ratio',
713
- },
714
- { path: 'posts.richContent.nodes.imageData.image.duration' },
715
- { path: 'posts.richContent.nodes.mapData.mapSettings.lat' },
716
- { path: 'posts.richContent.nodes.mapData.mapSettings.lng' },
717
- { path: 'posts.richContent.nodes.pollData.poll.image.duration' },
718
- {
719
- path: 'posts.richContent.nodes.pollData.poll.options.image.duration',
720
- },
721
- {
722
- path: 'posts.richContent.nodes.pollData.design.poll.background.image.duration',
723
- },
724
- { path: 'posts.richContent.nodes.appEmbedData.image.duration' },
725
- { path: 'posts.richContent.nodes.videoData.video.duration' },
726
- { path: 'posts.richContent.nodes.videoData.thumbnail.duration' },
727
- { path: 'posts.richContent.nodes.audioData.audio.duration' },
728
- { path: 'posts.richContent.nodes.audioData.coverImage.duration' },
729
- ],
730
- },
731
- ]),
732
- };
733
- return metadata;
734
- }
735
- return __listPosts;
736
- }
737
- /**
738
- * Retrieves a list of up to 100 posts, given the provided paging, filtering, and sorting.
739
- *
740
- * Query Posts runs with these defaults, which you can override:
741
- * - `firstPublishedDate` is sorted in descending order, with pinned posts first.
742
- * - `paging.limit` is `50`.
743
- * - `paging.offset` is `0`.
744
- *
745
- * For field support for filters and sorting, see
746
- * [Field Support for Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/filter-and-sort).
747
- *
748
- * To learn about working with _Query_ endpoints, see
749
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
750
- * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
751
- * [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
752
- * For a detailed list of supported filters and sortable fields, see
753
- * [Field Support for Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/filter-and-sort).
754
- */
755
- export function queryPosts(payload) {
756
- function __queryPosts({ host }) {
757
- const metadata = {
758
- entityFqdn: 'wix.blog.v3.post',
759
- method: 'POST',
760
- methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts',
761
- packageName: PACKAGE_NAME,
762
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
763
- protoPath: '/v3/posts/query',
764
- data: payload,
765
- host,
766
- }),
767
- data: payload,
768
- transformResponse: (payload) => transformPaths(payload, [
769
- {
770
- transformFn: transformRESTTimestampToSDKTimestamp,
771
- paths: [
772
- { path: 'posts.firstPublishedDate' },
773
- { path: 'posts.lastPublishedDate' },
774
- { path: 'posts.coverMedia.image.urlExpirationDate' },
775
- { path: 'posts.coverMedia.video.thumbnail.urlExpirationDate' },
776
- { path: 'posts.heroImage.urlExpirationDate' },
777
- { path: 'posts.richContent.metadata.createdTimestamp' },
778
- { path: 'posts.richContent.metadata.updatedTimestamp' },
779
- { path: 'posts.moderationDetails.submittedDate' },
780
- { path: 'posts.moderationDetails.moderationDate' },
781
- { path: 'posts.media.wixMedia.image.urlExpirationDate' },
782
- { path: 'posts.media.wixMedia.videoV2.urlExpirationDate' },
783
- {
784
- path: 'posts.media.wixMedia.videoV2.resolutions.urlExpirationDate',
785
- },
786
- {
787
- path: 'posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate',
788
- },
789
- {
790
- path: 'posts.media.wixMedia.videoV2.posters.urlExpirationDate',
791
- },
792
- ],
793
- },
794
- {
795
- transformFn: transformRESTBytesToSDKBytes,
796
- paths: [{ path: 'posts.richContentCompressed' }],
797
- },
798
- {
799
- transformFn: transformRESTFloatToSDKFloat,
800
- paths: [
801
- { path: 'posts.coverMedia.image.focalPoint.x' },
802
- { path: 'posts.coverMedia.image.focalPoint.y' },
803
- { path: 'posts.coverMedia.video.thumbnail.focalPoint.x' },
804
- { path: 'posts.coverMedia.video.thumbnail.focalPoint.y' },
805
- { path: 'posts.heroImage.focalPoint.x' },
806
- { path: 'posts.heroImage.focalPoint.y' },
807
- { path: 'posts.media.wixMedia.image.focalPoint.x' },
808
- { path: 'posts.media.wixMedia.image.focalPoint.y' },
809
- {
810
- path: 'posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x',
811
- },
812
- {
813
- path: 'posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y',
814
- },
815
- { path: 'posts.media.wixMedia.videoV2.posters.focalPoint.x' },
816
- { path: 'posts.media.wixMedia.videoV2.posters.focalPoint.y' },
817
- { path: 'posts.metrics.averageRating' },
818
- {
819
- path: 'posts.richContent.nodes.galleryData.items.image.media.duration',
820
- },
821
- {
822
- path: 'posts.richContent.nodes.galleryData.items.video.media.duration',
823
- },
824
- {
825
- path: 'posts.richContent.nodes.galleryData.items.video.thumbnail.duration',
826
- },
827
- {
828
- path: 'posts.richContent.nodes.galleryData.options.item.ratio',
829
- },
830
- { path: 'posts.richContent.nodes.imageData.image.duration' },
831
- { path: 'posts.richContent.nodes.mapData.mapSettings.lat' },
832
- { path: 'posts.richContent.nodes.mapData.mapSettings.lng' },
833
- { path: 'posts.richContent.nodes.pollData.poll.image.duration' },
834
- {
835
- path: 'posts.richContent.nodes.pollData.poll.options.image.duration',
836
- },
837
- {
838
- path: 'posts.richContent.nodes.pollData.design.poll.background.image.duration',
839
- },
840
- { path: 'posts.richContent.nodes.appEmbedData.image.duration' },
841
- { path: 'posts.richContent.nodes.videoData.video.duration' },
842
- { path: 'posts.richContent.nodes.videoData.thumbnail.duration' },
843
- { path: 'posts.richContent.nodes.audioData.audio.duration' },
844
- { path: 'posts.richContent.nodes.audioData.coverImage.duration' },
845
- ],
846
- },
847
- ]),
848
- };
849
- return metadata;
850
- }
851
- return __queryPosts;
852
- }
853
- /**
854
- * Retrieves a post's metrics.
855
- *
856
- * A post's metrics include the comments, likes, and views the post receives.
857
- */
858
- export function getPostMetrics(payload) {
859
- function __getPostMetrics({ host }) {
860
- const metadata = {
861
- entityFqdn: 'wix.blog.v3.post',
862
- method: 'GET',
863
- methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics',
864
- packageName: PACKAGE_NAME,
865
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
866
- protoPath: '/v3/posts/{postId}/metrics',
867
- data: payload,
868
- host,
869
- }),
870
- params: toURLSearchParams(payload),
871
- transformResponse: (payload) => transformPaths(payload, [
872
- {
873
- transformFn: transformRESTFloatToSDKFloat,
874
- paths: [{ path: 'metrics.averageRating' }],
875
- },
876
- ]),
877
- };
878
- return metadata;
879
- }
880
- return __getPostMetrics;
881
- }
882
- //# sourceMappingURL=blog-v3-post-posts.http.js.map