@wix/auto_sdk_blog_posts 1.0.21 → 1.0.22

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-post-posts.context.d.ts +37 -0
  11. package/build/cjs/src/blog-v3-post-posts.context.js +82 -0
  12. package/build/cjs/src/blog-v3-post-posts.context.js.map +1 -0
  13. package/build/cjs/src/blog-v3-post-posts.http.d.ts +61 -0
  14. package/build/cjs/src/blog-v3-post-posts.http.js +894 -0
  15. package/build/cjs/src/blog-v3-post-posts.http.js.map +1 -0
  16. package/build/cjs/src/blog-v3-post-posts.meta.d.ts +25 -0
  17. package/build/cjs/src/blog-v3-post-posts.meta.js +161 -0
  18. package/build/cjs/src/blog-v3-post-posts.meta.js.map +1 -0
  19. package/build/cjs/src/blog-v3-post-posts.public.d.ts +106 -0
  20. package/build/cjs/src/blog-v3-post-posts.public.js +320 -0
  21. package/build/cjs/src/blog-v3-post-posts.public.js.map +1 -0
  22. package/build/cjs/src/blog-v3-post-posts.types.d.ts +3231 -0
  23. package/build/cjs/src/blog-v3-post-posts.types.js +485 -0
  24. package/build/cjs/src/blog-v3-post-posts.types.js.map +1 -0
  25. package/build/{blog-v3-post-posts.universal-CEsWp0Fx.d.mts → cjs/src/blog-v3-post-posts.universal.d.ts} +494 -256
  26. package/build/cjs/src/blog-v3-post-posts.universal.js +962 -0
  27. package/build/cjs/src/blog-v3-post-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-post-posts.context.d.ts +37 -0
  39. package/build/es/src/blog-v3-post-posts.context.js +37 -0
  40. package/build/es/src/blog-v3-post-posts.context.js.map +1 -0
  41. package/build/es/src/blog-v3-post-posts.http.d.ts +61 -0
  42. package/build/es/src/blog-v3-post-posts.http.js +884 -0
  43. package/build/es/src/blog-v3-post-posts.http.js.map +1 -0
  44. package/build/es/src/blog-v3-post-posts.meta.d.ts +25 -0
  45. package/build/es/src/blog-v3-post-posts.meta.js +128 -0
  46. package/build/es/src/blog-v3-post-posts.meta.js.map +1 -0
  47. package/build/es/src/blog-v3-post-posts.public.d.ts +106 -0
  48. package/build/es/src/blog-v3-post-posts.public.js +268 -0
  49. package/build/es/src/blog-v3-post-posts.public.js.map +1 -0
  50. package/build/es/src/blog-v3-post-posts.types.d.ts +3231 -0
  51. package/build/es/src/blog-v3-post-posts.types.js +482 -0
  52. package/build/es/src/blog-v3-post-posts.types.js.map +1 -0
  53. package/build/{blog-v3-post-posts.universal-CEsWp0Fx.d.ts → es/src/blog-v3-post-posts.universal.d.ts} +494 -256
  54. package/build/es/src/blog-v3-post-posts.universal.js +929 -0
  55. package/build/es/src/blog-v3-post-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-post-posts.context.d.ts +37 -0
  66. package/build/internal/cjs/src/blog-v3-post-posts.context.js +82 -0
  67. package/build/internal/cjs/src/blog-v3-post-posts.context.js.map +1 -0
  68. package/build/internal/cjs/src/blog-v3-post-posts.http.d.ts +61 -0
  69. package/build/internal/cjs/src/blog-v3-post-posts.http.js +894 -0
  70. package/build/internal/cjs/src/blog-v3-post-posts.http.js.map +1 -0
  71. package/build/internal/cjs/src/blog-v3-post-posts.meta.d.ts +25 -0
  72. package/build/internal/cjs/src/blog-v3-post-posts.meta.js +161 -0
  73. package/build/internal/cjs/src/blog-v3-post-posts.meta.js.map +1 -0
  74. package/build/internal/cjs/src/blog-v3-post-posts.public.d.ts +106 -0
  75. package/build/internal/cjs/src/blog-v3-post-posts.public.js +320 -0
  76. package/build/internal/cjs/src/blog-v3-post-posts.public.js.map +1 -0
  77. package/build/internal/cjs/src/blog-v3-post-posts.types.d.ts +3231 -0
  78. package/build/internal/cjs/src/blog-v3-post-posts.types.js +485 -0
  79. package/build/internal/cjs/src/blog-v3-post-posts.types.js.map +1 -0
  80. package/build/internal/{blog-v3-post-posts.universal-nU7XoyIE.d.ts → cjs/src/blog-v3-post-posts.universal.d.ts} +494 -256
  81. package/build/internal/cjs/src/blog-v3-post-posts.universal.js +962 -0
  82. package/build/internal/cjs/src/blog-v3-post-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-post-posts.context.d.ts +37 -0
  93. package/build/internal/es/src/blog-v3-post-posts.context.js +37 -0
  94. package/build/internal/es/src/blog-v3-post-posts.context.js.map +1 -0
  95. package/build/internal/es/src/blog-v3-post-posts.http.d.ts +61 -0
  96. package/build/internal/es/src/blog-v3-post-posts.http.js +884 -0
  97. package/build/internal/es/src/blog-v3-post-posts.http.js.map +1 -0
  98. package/build/internal/es/src/blog-v3-post-posts.meta.d.ts +25 -0
  99. package/build/internal/es/src/blog-v3-post-posts.meta.js +128 -0
  100. package/build/internal/es/src/blog-v3-post-posts.meta.js.map +1 -0
  101. package/build/internal/es/src/blog-v3-post-posts.public.d.ts +106 -0
  102. package/build/internal/es/src/blog-v3-post-posts.public.js +268 -0
  103. package/build/internal/es/src/blog-v3-post-posts.public.js.map +1 -0
  104. package/build/internal/es/src/blog-v3-post-posts.types.d.ts +3231 -0
  105. package/build/internal/es/src/blog-v3-post-posts.types.js +482 -0
  106. package/build/internal/es/src/blog-v3-post-posts.types.js.map +1 -0
  107. package/build/internal/{blog-v3-post-posts.universal-nU7XoyIE.d.mts → es/src/blog-v3-post-posts.universal.d.ts} +494 -256
  108. package/build/internal/es/src/blog-v3-post-posts.universal.js +929 -0
  109. package/build/internal/es/src/blog-v3-post-posts.universal.js.map +1 -0
  110. package/package.json +11 -12
  111. package/build/index.d.mts +0 -130
  112. package/build/index.d.ts +0 -130
  113. package/build/index.js +0 -1975
  114. package/build/index.js.map +0 -1
  115. package/build/index.mjs +0 -1899
  116. package/build/index.mjs.map +0 -1
  117. package/build/internal/index.d.mts +0 -130
  118. package/build/internal/index.d.ts +0 -130
  119. package/build/internal/index.js +0 -1975
  120. package/build/internal/index.js.map +0 -1
  121. package/build/internal/index.mjs +0 -1899
  122. package/build/internal/index.mjs.map +0 -1
  123. package/build/internal/meta.d.mts +0 -2094
  124. package/build/internal/meta.d.ts +0 -2094
  125. package/build/internal/meta.js +0 -1002
  126. package/build/internal/meta.js.map +0 -1
  127. package/build/internal/meta.mjs +0 -969
  128. package/build/internal/meta.mjs.map +0 -1
  129. package/build/meta.d.mts +0 -2094
  130. package/build/meta.d.ts +0 -2094
  131. package/build/meta.js +0 -1002
  132. package/build/meta.js.map +0 -1
  133. package/build/meta.mjs +0 -969
  134. package/build/meta.mjs.map +0 -1
@@ -0,0 +1,884 @@
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
+ *
379
+ * The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
380
+ *
381
+ * You can set the time range using the `rangeStart` and `months` properties. The time range always starts on the 1st day of the month set in `rangeStart` and includes the number of `months` following `rangeStart`. For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`, the time range will be from `'2022-03-01'` until `'2022-06-30'`. The time range ends on the last day of the month.
382
+ *
383
+ * >**Note:** If there are no published posts in a specific month, 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
+ * Creates a query to retrieve a list of posts.
739
+ *
740
+ *
741
+ * The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
742
+ *
743
+ * The returned object contains the query definition which is typically used to run the query using the `find()` function.
744
+ *
745
+ * You can refine the query by chaining `PostsQueryBuilder` functions onto the query. `PostsQueryBuilder` functions enable you to sort, filter, and control the results that `queryPosts()` returns.
746
+ *
747
+ * `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
748
+ * + `limit(50)`
749
+ * + `descending('firstPublishedDate')`
750
+ *
751
+ * Note that the default limit is `'50'`, but the max limit is `'100'`.
752
+ *
753
+ * To learn how to query posts, refer to the table below.
754
+ *
755
+ * The following `PostsQueryBuilder` functions are supported for the `queryPosts()` function. For a full description of the Posts object, see the object returned for the `items` property in `PostsQueryResult`.
756
+ */
757
+ export function queryPosts(payload) {
758
+ function __queryPosts({ host }) {
759
+ const metadata = {
760
+ entityFqdn: 'wix.blog.v3.post',
761
+ method: 'POST',
762
+ methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts',
763
+ packageName: PACKAGE_NAME,
764
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
765
+ protoPath: '/v3/posts/query',
766
+ data: payload,
767
+ host,
768
+ }),
769
+ data: payload,
770
+ transformResponse: (payload) => transformPaths(payload, [
771
+ {
772
+ transformFn: transformRESTTimestampToSDKTimestamp,
773
+ paths: [
774
+ { path: 'posts.firstPublishedDate' },
775
+ { path: 'posts.lastPublishedDate' },
776
+ { path: 'posts.coverMedia.image.urlExpirationDate' },
777
+ { path: 'posts.coverMedia.video.thumbnail.urlExpirationDate' },
778
+ { path: 'posts.heroImage.urlExpirationDate' },
779
+ { path: 'posts.richContent.metadata.createdTimestamp' },
780
+ { path: 'posts.richContent.metadata.updatedTimestamp' },
781
+ { path: 'posts.moderationDetails.submittedDate' },
782
+ { path: 'posts.moderationDetails.moderationDate' },
783
+ { path: 'posts.media.wixMedia.image.urlExpirationDate' },
784
+ { path: 'posts.media.wixMedia.videoV2.urlExpirationDate' },
785
+ {
786
+ path: 'posts.media.wixMedia.videoV2.resolutions.urlExpirationDate',
787
+ },
788
+ {
789
+ path: 'posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate',
790
+ },
791
+ {
792
+ path: 'posts.media.wixMedia.videoV2.posters.urlExpirationDate',
793
+ },
794
+ ],
795
+ },
796
+ {
797
+ transformFn: transformRESTBytesToSDKBytes,
798
+ paths: [{ path: 'posts.richContentCompressed' }],
799
+ },
800
+ {
801
+ transformFn: transformRESTFloatToSDKFloat,
802
+ paths: [
803
+ { path: 'posts.coverMedia.image.focalPoint.x' },
804
+ { path: 'posts.coverMedia.image.focalPoint.y' },
805
+ { path: 'posts.coverMedia.video.thumbnail.focalPoint.x' },
806
+ { path: 'posts.coverMedia.video.thumbnail.focalPoint.y' },
807
+ { path: 'posts.heroImage.focalPoint.x' },
808
+ { path: 'posts.heroImage.focalPoint.y' },
809
+ { path: 'posts.media.wixMedia.image.focalPoint.x' },
810
+ { path: 'posts.media.wixMedia.image.focalPoint.y' },
811
+ {
812
+ path: 'posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x',
813
+ },
814
+ {
815
+ path: 'posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y',
816
+ },
817
+ { path: 'posts.media.wixMedia.videoV2.posters.focalPoint.x' },
818
+ { path: 'posts.media.wixMedia.videoV2.posters.focalPoint.y' },
819
+ { path: 'posts.metrics.averageRating' },
820
+ {
821
+ path: 'posts.richContent.nodes.galleryData.items.image.media.duration',
822
+ },
823
+ {
824
+ path: 'posts.richContent.nodes.galleryData.items.video.media.duration',
825
+ },
826
+ {
827
+ path: 'posts.richContent.nodes.galleryData.items.video.thumbnail.duration',
828
+ },
829
+ {
830
+ path: 'posts.richContent.nodes.galleryData.options.item.ratio',
831
+ },
832
+ { path: 'posts.richContent.nodes.imageData.image.duration' },
833
+ { path: 'posts.richContent.nodes.mapData.mapSettings.lat' },
834
+ { path: 'posts.richContent.nodes.mapData.mapSettings.lng' },
835
+ { path: 'posts.richContent.nodes.pollData.poll.image.duration' },
836
+ {
837
+ path: 'posts.richContent.nodes.pollData.poll.options.image.duration',
838
+ },
839
+ {
840
+ path: 'posts.richContent.nodes.pollData.design.poll.background.image.duration',
841
+ },
842
+ { path: 'posts.richContent.nodes.appEmbedData.image.duration' },
843
+ { path: 'posts.richContent.nodes.videoData.video.duration' },
844
+ { path: 'posts.richContent.nodes.videoData.thumbnail.duration' },
845
+ { path: 'posts.richContent.nodes.audioData.audio.duration' },
846
+ { path: 'posts.richContent.nodes.audioData.coverImage.duration' },
847
+ ],
848
+ },
849
+ ]),
850
+ };
851
+ return metadata;
852
+ }
853
+ return __queryPosts;
854
+ }
855
+ /**
856
+ * Retrieves a post's metrics.
857
+ *
858
+ * A post's metrics include the comments, likes, and views the post receives.
859
+ */
860
+ export function getPostMetrics(payload) {
861
+ function __getPostMetrics({ host }) {
862
+ const metadata = {
863
+ entityFqdn: 'wix.blog.v3.post',
864
+ method: 'GET',
865
+ methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics',
866
+ packageName: PACKAGE_NAME,
867
+ url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
868
+ protoPath: '/v3/posts/{postId}/metrics',
869
+ data: payload,
870
+ host,
871
+ }),
872
+ params: toURLSearchParams(payload),
873
+ transformResponse: (payload) => transformPaths(payload, [
874
+ {
875
+ transformFn: transformRESTFloatToSDKFloat,
876
+ paths: [{ path: 'metrics.averageRating' }],
877
+ },
878
+ ]),
879
+ };
880
+ return metadata;
881
+ }
882
+ return __getPostMetrics;
883
+ }
884
+ //# sourceMappingURL=blog-v3-post-posts.http.js.map