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