@wix/auto_sdk_blog_posts 1.0.30 → 1.0.32

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 (130) hide show
  1. package/build/{cjs/src/blog-v3-post-posts.universal.d.ts → blog-v3-post-posts.universal-hTPKKRYx.d.mts} +299 -554
  2. package/build/{es/src/blog-v3-post-posts.universal.d.ts → blog-v3-post-posts.universal-hTPKKRYx.d.ts} +299 -554
  3. package/build/index.d.mts +127 -0
  4. package/build/index.d.ts +127 -0
  5. package/build/index.js +1970 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +1894 -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-D8MomLjA.d.mts} +299 -554
  10. package/build/internal/{es/src/blog-v3-post-posts.universal.d.ts → blog-v3-post-posts.universal-D8MomLjA.d.ts} +299 -554
  11. package/build/internal/index.d.mts +127 -0
  12. package/build/internal/index.d.ts +127 -0
  13. package/build/internal/index.js +1970 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +1894 -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} +259 -1412
  18. package/build/internal/{cjs/src/blog-v3-post-posts.types.d.ts → meta.d.ts} +259 -1412
  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} +259 -1412
  24. package/build/{internal/es/src/blog-v3-post-posts.types.d.ts → meta.d.ts} +259 -1412
  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 +12 -11
  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 -967
  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/package.json +0 -3
  65. package/build/es/src/blog-v3-post-posts.context.d.ts +0 -37
  66. package/build/es/src/blog-v3-post-posts.context.js +0 -37
  67. package/build/es/src/blog-v3-post-posts.context.js.map +0 -1
  68. package/build/es/src/blog-v3-post-posts.http.d.ts +0 -59
  69. package/build/es/src/blog-v3-post-posts.http.js +0 -882
  70. package/build/es/src/blog-v3-post-posts.http.js.map +0 -1
  71. package/build/es/src/blog-v3-post-posts.meta.d.ts +0 -25
  72. package/build/es/src/blog-v3-post-posts.meta.js +0 -128
  73. package/build/es/src/blog-v3-post-posts.meta.js.map +0 -1
  74. package/build/es/src/blog-v3-post-posts.public.d.ts +0 -99
  75. package/build/es/src/blog-v3-post-posts.public.js +0 -268
  76. package/build/es/src/blog-v3-post-posts.public.js.map +0 -1
  77. package/build/es/src/blog-v3-post-posts.types.js +0 -482
  78. package/build/es/src/blog-v3-post-posts.types.js.map +0 -1
  79. package/build/es/src/blog-v3-post-posts.universal.js +0 -934
  80. package/build/es/src/blog-v3-post-posts.universal.js.map +0 -1
  81. package/build/internal/cjs/index.d.ts +0 -1
  82. package/build/internal/cjs/index.js +0 -18
  83. package/build/internal/cjs/index.js.map +0 -1
  84. package/build/internal/cjs/index.typings.d.ts +0 -1
  85. package/build/internal/cjs/index.typings.js +0 -18
  86. package/build/internal/cjs/index.typings.js.map +0 -1
  87. package/build/internal/cjs/meta.d.ts +0 -1
  88. package/build/internal/cjs/meta.js +0 -18
  89. package/build/internal/cjs/meta.js.map +0 -1
  90. package/build/internal/cjs/src/blog-v3-post-posts.context.d.ts +0 -37
  91. package/build/internal/cjs/src/blog-v3-post-posts.context.js +0 -82
  92. package/build/internal/cjs/src/blog-v3-post-posts.context.js.map +0 -1
  93. package/build/internal/cjs/src/blog-v3-post-posts.http.d.ts +0 -59
  94. package/build/internal/cjs/src/blog-v3-post-posts.http.js +0 -892
  95. package/build/internal/cjs/src/blog-v3-post-posts.http.js.map +0 -1
  96. package/build/internal/cjs/src/blog-v3-post-posts.meta.d.ts +0 -25
  97. package/build/internal/cjs/src/blog-v3-post-posts.meta.js +0 -161
  98. package/build/internal/cjs/src/blog-v3-post-posts.meta.js.map +0 -1
  99. package/build/internal/cjs/src/blog-v3-post-posts.public.d.ts +0 -99
  100. package/build/internal/cjs/src/blog-v3-post-posts.public.js +0 -320
  101. package/build/internal/cjs/src/blog-v3-post-posts.public.js.map +0 -1
  102. package/build/internal/cjs/src/blog-v3-post-posts.types.js +0 -485
  103. package/build/internal/cjs/src/blog-v3-post-posts.types.js.map +0 -1
  104. package/build/internal/cjs/src/blog-v3-post-posts.universal.js +0 -967
  105. package/build/internal/cjs/src/blog-v3-post-posts.universal.js.map +0 -1
  106. package/build/internal/es/index.d.ts +0 -1
  107. package/build/internal/es/index.js +0 -2
  108. package/build/internal/es/index.js.map +0 -1
  109. package/build/internal/es/index.typings.d.ts +0 -1
  110. package/build/internal/es/index.typings.js +0 -2
  111. package/build/internal/es/index.typings.js.map +0 -1
  112. package/build/internal/es/meta.d.ts +0 -1
  113. package/build/internal/es/meta.js +0 -2
  114. package/build/internal/es/meta.js.map +0 -1
  115. package/build/internal/es/src/blog-v3-post-posts.context.d.ts +0 -37
  116. package/build/internal/es/src/blog-v3-post-posts.context.js +0 -37
  117. package/build/internal/es/src/blog-v3-post-posts.context.js.map +0 -1
  118. package/build/internal/es/src/blog-v3-post-posts.http.d.ts +0 -59
  119. package/build/internal/es/src/blog-v3-post-posts.http.js +0 -882
  120. package/build/internal/es/src/blog-v3-post-posts.http.js.map +0 -1
  121. package/build/internal/es/src/blog-v3-post-posts.meta.d.ts +0 -25
  122. package/build/internal/es/src/blog-v3-post-posts.meta.js +0 -128
  123. package/build/internal/es/src/blog-v3-post-posts.meta.js.map +0 -1
  124. package/build/internal/es/src/blog-v3-post-posts.public.d.ts +0 -99
  125. package/build/internal/es/src/blog-v3-post-posts.public.js +0 -268
  126. package/build/internal/es/src/blog-v3-post-posts.public.js.map +0 -1
  127. package/build/internal/es/src/blog-v3-post-posts.types.js +0 -482
  128. package/build/internal/es/src/blog-v3-post-posts.types.js.map +0 -1
  129. package/build/internal/es/src/blog-v3-post-posts.universal.js +0 -934
  130. package/build/internal/es/src/blog-v3-post-posts.universal.js.map +0 -1
@@ -1,892 +0,0 @@
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
- * The time range is set using the `rangeStart` and `months` properties.
382
- * The time range always starts on the 1st day of the month set in `rangeStart` and
383
- * includes the number of `months` following `rangeStart`.
384
- * For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
385
- * 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.
386
- * > 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.
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
- * Retrieves a list of up to 100 posts, given the provided paging, filtering, and sorting.
747
- *
748
- * Query Posts runs with these defaults, which you can override:
749
- * - `firstPublishedDate` is sorted in descending order, with pinned posts first.
750
- * - `paging.limit` is `50`.
751
- * - `paging.offset` is `0`.
752
- *
753
- * For field support for filters and sorting, see
754
- * [Field Support for Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/filter-and-sort).
755
- *
756
- * To learn about working with _Query_ endpoints, see
757
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
758
- * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
759
- * [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
760
- * For a detailed list of supported filters and sortable fields, see
761
- * [Field Support for Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/filter-and-sort).
762
- */
763
- function queryPosts(payload) {
764
- function __queryPosts({ host }) {
765
- const metadata = {
766
- entityFqdn: 'wix.blog.v3.post',
767
- method: 'POST',
768
- methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts',
769
- packageName: PACKAGE_NAME,
770
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
771
- protoPath: '/v3/posts/query',
772
- data: payload,
773
- host,
774
- }),
775
- data: payload,
776
- transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
777
- {
778
- transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
779
- paths: [
780
- { path: 'posts.firstPublishedDate' },
781
- { path: 'posts.lastPublishedDate' },
782
- { path: 'posts.coverMedia.image.urlExpirationDate' },
783
- { path: 'posts.coverMedia.video.thumbnail.urlExpirationDate' },
784
- { path: 'posts.heroImage.urlExpirationDate' },
785
- { path: 'posts.richContent.metadata.createdTimestamp' },
786
- { path: 'posts.richContent.metadata.updatedTimestamp' },
787
- { path: 'posts.moderationDetails.submittedDate' },
788
- { path: 'posts.moderationDetails.moderationDate' },
789
- { path: 'posts.media.wixMedia.image.urlExpirationDate' },
790
- { path: 'posts.media.wixMedia.videoV2.urlExpirationDate' },
791
- {
792
- path: 'posts.media.wixMedia.videoV2.resolutions.urlExpirationDate',
793
- },
794
- {
795
- path: 'posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate',
796
- },
797
- {
798
- path: 'posts.media.wixMedia.videoV2.posters.urlExpirationDate',
799
- },
800
- ],
801
- },
802
- {
803
- transformFn: bytes_1.transformRESTBytesToSDKBytes,
804
- paths: [{ path: 'posts.richContentCompressed' }],
805
- },
806
- {
807
- transformFn: float_1.transformRESTFloatToSDKFloat,
808
- paths: [
809
- { path: 'posts.coverMedia.image.focalPoint.x' },
810
- { path: 'posts.coverMedia.image.focalPoint.y' },
811
- { path: 'posts.coverMedia.video.thumbnail.focalPoint.x' },
812
- { path: 'posts.coverMedia.video.thumbnail.focalPoint.y' },
813
- { path: 'posts.heroImage.focalPoint.x' },
814
- { path: 'posts.heroImage.focalPoint.y' },
815
- { path: 'posts.media.wixMedia.image.focalPoint.x' },
816
- { path: 'posts.media.wixMedia.image.focalPoint.y' },
817
- {
818
- path: 'posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x',
819
- },
820
- {
821
- path: 'posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y',
822
- },
823
- { path: 'posts.media.wixMedia.videoV2.posters.focalPoint.x' },
824
- { path: 'posts.media.wixMedia.videoV2.posters.focalPoint.y' },
825
- { path: 'posts.metrics.averageRating' },
826
- {
827
- path: 'posts.richContent.nodes.galleryData.items.image.media.duration',
828
- },
829
- {
830
- path: 'posts.richContent.nodes.galleryData.items.video.media.duration',
831
- },
832
- {
833
- path: 'posts.richContent.nodes.galleryData.items.video.thumbnail.duration',
834
- },
835
- {
836
- path: 'posts.richContent.nodes.galleryData.options.item.ratio',
837
- },
838
- { path: 'posts.richContent.nodes.imageData.image.duration' },
839
- { path: 'posts.richContent.nodes.mapData.mapSettings.lat' },
840
- { path: 'posts.richContent.nodes.mapData.mapSettings.lng' },
841
- { path: 'posts.richContent.nodes.pollData.poll.image.duration' },
842
- {
843
- path: 'posts.richContent.nodes.pollData.poll.options.image.duration',
844
- },
845
- {
846
- path: 'posts.richContent.nodes.pollData.design.poll.background.image.duration',
847
- },
848
- { path: 'posts.richContent.nodes.appEmbedData.image.duration' },
849
- { path: 'posts.richContent.nodes.videoData.video.duration' },
850
- { path: 'posts.richContent.nodes.videoData.thumbnail.duration' },
851
- { path: 'posts.richContent.nodes.audioData.audio.duration' },
852
- { path: 'posts.richContent.nodes.audioData.coverImage.duration' },
853
- ],
854
- },
855
- ]),
856
- };
857
- return metadata;
858
- }
859
- return __queryPosts;
860
- }
861
- exports.queryPosts = queryPosts;
862
- /**
863
- * Retrieves a post's metrics.
864
- *
865
- * A post's metrics include the comments, likes, and views the post receives.
866
- */
867
- function getPostMetrics(payload) {
868
- function __getPostMetrics({ host }) {
869
- const metadata = {
870
- entityFqdn: 'wix.blog.v3.post',
871
- method: 'GET',
872
- methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics',
873
- packageName: PACKAGE_NAME,
874
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
875
- protoPath: '/v3/posts/{postId}/metrics',
876
- data: payload,
877
- host,
878
- }),
879
- params: (0, rest_modules_1.toURLSearchParams)(payload),
880
- transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
881
- {
882
- transformFn: float_1.transformRESTFloatToSDKFloat,
883
- paths: [{ path: 'metrics.averageRating' }],
884
- },
885
- ]),
886
- };
887
- return metadata;
888
- }
889
- return __getPostMetrics;
890
- }
891
- exports.getPostMetrics = getPostMetrics;
892
- //# sourceMappingURL=blog-v3-post-posts.http.js.map