@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
@@ -1,1899 +0,0 @@
1
- // src/blog-v3-post-posts.public.ts
2
- import { renameKeysFromRESTResponseToSDKResponse as renameKeysFromRESTResponseToSDKResponse2 } from "@wix/sdk-runtime/rename-all-nested-keys";
3
- import { transformRESTBytesToSDKBytes as transformRESTBytesToSDKBytes2 } from "@wix/sdk-runtime/transformations/bytes";
4
- import { transformRESTFloatToSDKFloat as transformRESTFloatToSDKFloat2 } from "@wix/sdk-runtime/transformations/float";
5
- import { transformRESTImageToSDKImage as transformRESTImageToSDKImage2 } from "@wix/sdk-runtime/transformations/image";
6
- import { transformRESTPageURLToSDKPageURL as transformRESTPageURLToSDKPageURL2 } from "@wix/sdk-runtime/transformations/page-url";
7
- import { transformRESTTimestampToSDKTimestamp as transformRESTTimestampToSDKTimestamp2 } from "@wix/sdk-runtime/transformations/timestamp";
8
- import { transformPaths as transformPaths3 } from "@wix/sdk-runtime/transformations/transform-paths";
9
- import { transformRESTVideoToSDKVideo as transformRESTVideoToSDKVideo2 } from "@wix/sdk-runtime/transformations/video";
10
- import { transformRESTVideoV2ToSDKVideoV2 as transformRESTVideoV2ToSDKVideoV22 } from "@wix/sdk-runtime/transformations/video-v2";
11
- import { EventDefinition } from "@wix/sdk-types";
12
-
13
- // src/blog-v3-post-posts.universal.ts
14
- import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
15
- import { queryBuilder } from "@wix/sdk-runtime/query-builder";
16
- import {
17
- renameKeysFromSDKRequestToRESTRequest,
18
- renameKeysFromRESTResponseToSDKResponse
19
- } from "@wix/sdk-runtime/rename-all-nested-keys";
20
-
21
- // src/blog-v3-post-posts.http.ts
22
- import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
23
- import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
24
- import { transformRESTBytesToSDKBytes } from "@wix/sdk-runtime/transformations/bytes";
25
- import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
26
- import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
27
- import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
28
- import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
29
- function resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl(opts) {
30
- const domainToMappings = {
31
- "api._api_base_domain_": [
32
- {
33
- srcPath: "/communities-blog-node-api",
34
- destPath: ""
35
- }
36
- ],
37
- "www._base_domain_": [
38
- {
39
- srcPath: "/_api/communities-blog-node-api",
40
- destPath: ""
41
- },
42
- {
43
- srcPath: "/_api/communities-blog-node-api/v3/posts",
44
- destPath: "/v3/posts"
45
- },
46
- {
47
- srcPath: "/_api/communities-blog-node-api/v2/stats",
48
- destPath: "/v2/stats"
49
- }
50
- ],
51
- "apps._base_domain_": [
52
- {
53
- srcPath: "/_api/communities-blog-node-api",
54
- destPath: ""
55
- },
56
- {
57
- srcPath: "/_api/communities-blog-node-api/v3/posts",
58
- destPath: "/v3/posts"
59
- },
60
- {
61
- srcPath: "/_api/communities-blog-node-api/v2/stats",
62
- destPath: "/v2/stats"
63
- }
64
- ],
65
- _: [
66
- {
67
- srcPath: "/_api/communities-blog-node-api",
68
- destPath: ""
69
- },
70
- {
71
- srcPath: "/_api/communities-blog-node-api/_api/blogs/this",
72
- destPath: "/_api/blogs/this"
73
- },
74
- {
75
- srcPath: "/_api/communities-blog-node-api/_api/categories",
76
- destPath: "/_api/categories"
77
- },
78
- {
79
- srcPath: "/_api/communities-blog-node-api/_api/site-properties",
80
- destPath: "/_api/site-properties"
81
- },
82
- {
83
- srcPath: "/_api/communities-blog-node-api/_api/posts/content",
84
- destPath: "/_api/posts/content"
85
- },
86
- {
87
- srcPath: "/_api/communities-blog-node-api/v3/posts",
88
- destPath: "/v3/posts"
89
- },
90
- {
91
- srcPath: "/_api/communities-blog-node-api/v2/stats",
92
- destPath: "/v2/stats"
93
- }
94
- ],
95
- "editor._base_domain_": [
96
- {
97
- srcPath: "/_api/communities-blog-node-api",
98
- destPath: ""
99
- }
100
- ],
101
- "blocks._base_domain_": [
102
- {
103
- srcPath: "/_api/communities-blog-node-api",
104
- destPath: ""
105
- }
106
- ],
107
- "create.editorx": [
108
- {
109
- srcPath: "/_api/communities-blog-node-api",
110
- destPath: ""
111
- }
112
- ],
113
- "*.dev.wix-code.com": [
114
- {
115
- srcPath: "/_api/communities-blog-node-api",
116
- destPath: ""
117
- }
118
- ],
119
- "*.pub.wix-code.com": [
120
- {
121
- srcPath: "/_api/communities-blog-node-api",
122
- destPath: ""
123
- }
124
- ],
125
- "bo._base_domain_": [
126
- {
127
- srcPath: "/_api/communities-blog-node-api",
128
- destPath: ""
129
- },
130
- {
131
- srcPath: "/_api/communities-blog-node-api",
132
- destPath: ""
133
- }
134
- ],
135
- "wixbo.ai": [
136
- {
137
- srcPath: "/_api/communities-blog-node-api",
138
- destPath: ""
139
- },
140
- {
141
- srcPath: "/_api/communities-blog-node-api",
142
- destPath: ""
143
- }
144
- ],
145
- "wix-bo.com": [
146
- {
147
- srcPath: "/_api/communities-blog-node-api",
148
- destPath: ""
149
- },
150
- {
151
- srcPath: "/_api/communities-blog-node-api",
152
- destPath: ""
153
- }
154
- ],
155
- "manage._base_domain_": [
156
- {
157
- srcPath: "/_api/communities-blog-node-api",
158
- destPath: ""
159
- }
160
- ],
161
- "social-blog._base_domain_": [
162
- {
163
- srcPath: "/_api/communities-blog-node-api",
164
- destPath: ""
165
- }
166
- ],
167
- "editor.wixapps.net": [
168
- {
169
- srcPath: "/_api/communities-blog-node-api",
170
- destPath: ""
171
- }
172
- ],
173
- "dev._base_domain_": [
174
- {
175
- srcPath: "/_api/communities-blog-node-api",
176
- destPath: ""
177
- }
178
- ],
179
- "www.wixapis.com": [
180
- {
181
- srcPath: "/blog/v2",
182
- destPath: "/v2"
183
- },
184
- {
185
- srcPath: "/blog/v3",
186
- destPath: "/v3"
187
- },
188
- {
189
- srcPath: "/v2/stats",
190
- destPath: "/v2/stats"
191
- },
192
- {
193
- srcPath: "/v3/posts",
194
- destPath: "/v3/posts"
195
- },
196
- {
197
- srcPath: "/blog/v3/posts",
198
- destPath: "/v3/posts"
199
- },
200
- {
201
- srcPath: "/blog/v2/stats",
202
- destPath: "/v2/stats"
203
- },
204
- {
205
- srcPath: "/_api/v3/posts",
206
- destPath: "/v3/posts"
207
- }
208
- ]
209
- };
210
- return resolveUrl(Object.assign(opts, { domainToMappings }));
211
- }
212
- function resolveComWixpressNpmCommunitiesPlatformizedBlogBlogStatsServiceUrl(opts) {
213
- const domainToMappings = {
214
- "api._api_base_domain_": [
215
- {
216
- srcPath: "/communities-blog-node-api",
217
- destPath: ""
218
- }
219
- ],
220
- "www._base_domain_": [
221
- {
222
- srcPath: "/_api/communities-blog-node-api",
223
- destPath: ""
224
- },
225
- {
226
- srcPath: "/_api/communities-blog-node-api/v3/posts",
227
- destPath: "/v3/posts"
228
- },
229
- {
230
- srcPath: "/_api/communities-blog-node-api/v2/stats",
231
- destPath: "/v2/stats"
232
- }
233
- ],
234
- "apps._base_domain_": [
235
- {
236
- srcPath: "/_api/communities-blog-node-api",
237
- destPath: ""
238
- },
239
- {
240
- srcPath: "/_api/communities-blog-node-api/v3/posts",
241
- destPath: "/v3/posts"
242
- },
243
- {
244
- srcPath: "/_api/communities-blog-node-api/v2/stats",
245
- destPath: "/v2/stats"
246
- }
247
- ],
248
- _: [
249
- {
250
- srcPath: "/_api/communities-blog-node-api",
251
- destPath: ""
252
- },
253
- {
254
- srcPath: "/_api/communities-blog-node-api/_api/blogs/this",
255
- destPath: "/_api/blogs/this"
256
- },
257
- {
258
- srcPath: "/_api/communities-blog-node-api/_api/categories",
259
- destPath: "/_api/categories"
260
- },
261
- {
262
- srcPath: "/_api/communities-blog-node-api/_api/site-properties",
263
- destPath: "/_api/site-properties"
264
- },
265
- {
266
- srcPath: "/_api/communities-blog-node-api/_api/posts/content",
267
- destPath: "/_api/posts/content"
268
- },
269
- {
270
- srcPath: "/_api/communities-blog-node-api/v3/posts",
271
- destPath: "/v3/posts"
272
- },
273
- {
274
- srcPath: "/_api/communities-blog-node-api/v2/stats",
275
- destPath: "/v2/stats"
276
- }
277
- ],
278
- "editor._base_domain_": [
279
- {
280
- srcPath: "/_api/communities-blog-node-api",
281
- destPath: ""
282
- }
283
- ],
284
- "blocks._base_domain_": [
285
- {
286
- srcPath: "/_api/communities-blog-node-api",
287
- destPath: ""
288
- }
289
- ],
290
- "create.editorx": [
291
- {
292
- srcPath: "/_api/communities-blog-node-api",
293
- destPath: ""
294
- }
295
- ],
296
- "*.dev.wix-code.com": [
297
- {
298
- srcPath: "/_api/communities-blog-node-api",
299
- destPath: ""
300
- }
301
- ],
302
- "*.pub.wix-code.com": [
303
- {
304
- srcPath: "/_api/communities-blog-node-api",
305
- destPath: ""
306
- }
307
- ],
308
- "bo._base_domain_": [
309
- {
310
- srcPath: "/_api/communities-blog-node-api",
311
- destPath: ""
312
- },
313
- {
314
- srcPath: "/_api/communities-blog-node-api",
315
- destPath: ""
316
- }
317
- ],
318
- "wixbo.ai": [
319
- {
320
- srcPath: "/_api/communities-blog-node-api",
321
- destPath: ""
322
- },
323
- {
324
- srcPath: "/_api/communities-blog-node-api",
325
- destPath: ""
326
- }
327
- ],
328
- "wix-bo.com": [
329
- {
330
- srcPath: "/_api/communities-blog-node-api",
331
- destPath: ""
332
- },
333
- {
334
- srcPath: "/_api/communities-blog-node-api",
335
- destPath: ""
336
- }
337
- ],
338
- "manage._base_domain_": [
339
- {
340
- srcPath: "/_api/communities-blog-node-api",
341
- destPath: ""
342
- }
343
- ],
344
- "social-blog._base_domain_": [
345
- {
346
- srcPath: "/_api/communities-blog-node-api",
347
- destPath: ""
348
- }
349
- ],
350
- "editor.wixapps.net": [
351
- {
352
- srcPath: "/_api/communities-blog-node-api",
353
- destPath: ""
354
- }
355
- ],
356
- "dev._base_domain_": [
357
- {
358
- srcPath: "/_api/communities-blog-node-api",
359
- destPath: ""
360
- }
361
- ],
362
- "www.wixapis.com": [
363
- {
364
- srcPath: "/blog/v2",
365
- destPath: "/v2"
366
- },
367
- {
368
- srcPath: "/blog/v3",
369
- destPath: "/v3"
370
- },
371
- {
372
- srcPath: "/v2/stats",
373
- destPath: "/v2/stats"
374
- },
375
- {
376
- srcPath: "/v3/posts",
377
- destPath: "/v3/posts"
378
- },
379
- {
380
- srcPath: "/blog/v3/posts",
381
- destPath: "/v3/posts"
382
- },
383
- {
384
- srcPath: "/blog/v2/stats",
385
- destPath: "/v2/stats"
386
- },
387
- {
388
- srcPath: "/_api/v3/posts",
389
- destPath: "/v3/posts"
390
- }
391
- ]
392
- };
393
- return resolveUrl(Object.assign(opts, { domainToMappings }));
394
- }
395
- var PACKAGE_NAME = "@wix/auto_sdk_blog_posts";
396
- function queryPostCountStats(payload) {
397
- function __queryPostCountStats({ host }) {
398
- const serializedData = transformPaths(payload, [
399
- {
400
- transformFn: transformSDKTimestampToRESTTimestamp,
401
- paths: [{ path: "rangeStart" }, { path: "rangeEnd" }]
402
- }
403
- ]);
404
- const metadata = {
405
- entityFqdn: "wix.blog.v3.post",
406
- method: "GET",
407
- methodFqn: "com.wixpress.npm.communities.platformized.blog.BlogStatsService.QueryPostCountStats",
408
- packageName: PACKAGE_NAME,
409
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogBlogStatsServiceUrl({
410
- protoPath: "/v2/stats/post/count",
411
- data: serializedData,
412
- host
413
- }),
414
- params: toURLSearchParams(serializedData),
415
- transformResponse: (payload2) => transformPaths(payload2, [
416
- {
417
- transformFn: transformRESTTimestampToSDKTimestamp,
418
- paths: [{ path: "stats.periodStart" }]
419
- }
420
- ])
421
- };
422
- return metadata;
423
- }
424
- return __queryPostCountStats;
425
- }
426
- function getTotalPosts(payload) {
427
- function __getTotalPosts({ host }) {
428
- const metadata = {
429
- entityFqdn: "wix.blog.v3.post",
430
- method: "GET",
431
- methodFqn: "com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts",
432
- packageName: PACKAGE_NAME,
433
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogBlogStatsServiceUrl({
434
- protoPath: "/v2/stats/posts/total",
435
- data: payload,
436
- host
437
- }),
438
- params: toURLSearchParams(payload)
439
- };
440
- return metadata;
441
- }
442
- return __getTotalPosts;
443
- }
444
- function getPost(payload) {
445
- function __getPost({ host }) {
446
- const metadata = {
447
- entityFqdn: "wix.blog.v3.post",
448
- method: "GET",
449
- methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost",
450
- packageName: PACKAGE_NAME,
451
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
452
- protoPath: "/v3/posts/{postId}",
453
- data: payload,
454
- host
455
- }),
456
- params: toURLSearchParams(payload),
457
- transformResponse: (payload2) => transformPaths(payload2, [
458
- {
459
- transformFn: transformRESTTimestampToSDKTimestamp,
460
- paths: [
461
- { path: "post.firstPublishedDate" },
462
- { path: "post.lastPublishedDate" },
463
- { path: "post.coverMedia.image.urlExpirationDate" },
464
- { path: "post.coverMedia.video.thumbnail.urlExpirationDate" },
465
- { path: "post.heroImage.urlExpirationDate" },
466
- { path: "post.richContent.metadata.createdTimestamp" },
467
- { path: "post.richContent.metadata.updatedTimestamp" },
468
- { path: "post.moderationDetails.submittedDate" },
469
- { path: "post.moderationDetails.moderationDate" },
470
- { path: "post.media.wixMedia.image.urlExpirationDate" },
471
- { path: "post.media.wixMedia.videoV2.urlExpirationDate" },
472
- {
473
- path: "post.media.wixMedia.videoV2.resolutions.urlExpirationDate"
474
- },
475
- {
476
- path: "post.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
477
- },
478
- { path: "post.media.wixMedia.videoV2.posters.urlExpirationDate" }
479
- ]
480
- },
481
- {
482
- transformFn: transformRESTBytesToSDKBytes,
483
- paths: [{ path: "post.richContentCompressed" }]
484
- },
485
- {
486
- transformFn: transformRESTFloatToSDKFloat,
487
- paths: [
488
- { path: "post.coverMedia.image.focalPoint.x" },
489
- { path: "post.coverMedia.image.focalPoint.y" },
490
- { path: "post.coverMedia.video.thumbnail.focalPoint.x" },
491
- { path: "post.coverMedia.video.thumbnail.focalPoint.y" },
492
- { path: "post.heroImage.focalPoint.x" },
493
- { path: "post.heroImage.focalPoint.y" },
494
- { path: "post.media.wixMedia.image.focalPoint.x" },
495
- { path: "post.media.wixMedia.image.focalPoint.y" },
496
- {
497
- path: "post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
498
- },
499
- {
500
- path: "post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
501
- },
502
- { path: "post.media.wixMedia.videoV2.posters.focalPoint.x" },
503
- { path: "post.media.wixMedia.videoV2.posters.focalPoint.y" },
504
- { path: "post.metrics.averageRating" },
505
- {
506
- path: "post.richContent.nodes.galleryData.items.image.media.duration"
507
- },
508
- {
509
- path: "post.richContent.nodes.galleryData.items.video.media.duration"
510
- },
511
- {
512
- path: "post.richContent.nodes.galleryData.items.video.thumbnail.duration"
513
- },
514
- { path: "post.richContent.nodes.galleryData.options.item.ratio" },
515
- { path: "post.richContent.nodes.imageData.image.duration" },
516
- { path: "post.richContent.nodes.mapData.mapSettings.lat" },
517
- { path: "post.richContent.nodes.mapData.mapSettings.lng" },
518
- { path: "post.richContent.nodes.pollData.poll.image.duration" },
519
- {
520
- path: "post.richContent.nodes.pollData.poll.options.image.duration"
521
- },
522
- {
523
- path: "post.richContent.nodes.pollData.design.poll.background.image.duration"
524
- },
525
- { path: "post.richContent.nodes.appEmbedData.image.duration" },
526
- { path: "post.richContent.nodes.videoData.video.duration" },
527
- { path: "post.richContent.nodes.videoData.thumbnail.duration" },
528
- { path: "post.richContent.nodes.audioData.audio.duration" },
529
- { path: "post.richContent.nodes.audioData.coverImage.duration" }
530
- ]
531
- }
532
- ])
533
- };
534
- return metadata;
535
- }
536
- return __getPost;
537
- }
538
- function getPostBySlug(payload) {
539
- function __getPostBySlug({ host }) {
540
- const metadata = {
541
- entityFqdn: "wix.blog.v3.post",
542
- method: "GET",
543
- methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug",
544
- packageName: PACKAGE_NAME,
545
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
546
- protoPath: "/v3/posts/slugs/{slug}",
547
- data: payload,
548
- host
549
- }),
550
- params: toURLSearchParams(payload),
551
- transformResponse: (payload2) => transformPaths(payload2, [
552
- {
553
- transformFn: transformRESTTimestampToSDKTimestamp,
554
- paths: [
555
- { path: "post.firstPublishedDate" },
556
- { path: "post.lastPublishedDate" },
557
- { path: "post.coverMedia.image.urlExpirationDate" },
558
- { path: "post.coverMedia.video.thumbnail.urlExpirationDate" },
559
- { path: "post.heroImage.urlExpirationDate" },
560
- { path: "post.richContent.metadata.createdTimestamp" },
561
- { path: "post.richContent.metadata.updatedTimestamp" },
562
- { path: "post.moderationDetails.submittedDate" },
563
- { path: "post.moderationDetails.moderationDate" },
564
- { path: "post.media.wixMedia.image.urlExpirationDate" },
565
- { path: "post.media.wixMedia.videoV2.urlExpirationDate" },
566
- {
567
- path: "post.media.wixMedia.videoV2.resolutions.urlExpirationDate"
568
- },
569
- {
570
- path: "post.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
571
- },
572
- { path: "post.media.wixMedia.videoV2.posters.urlExpirationDate" }
573
- ]
574
- },
575
- {
576
- transformFn: transformRESTBytesToSDKBytes,
577
- paths: [{ path: "post.richContentCompressed" }]
578
- },
579
- {
580
- transformFn: transformRESTFloatToSDKFloat,
581
- paths: [
582
- { path: "post.coverMedia.image.focalPoint.x" },
583
- { path: "post.coverMedia.image.focalPoint.y" },
584
- { path: "post.coverMedia.video.thumbnail.focalPoint.x" },
585
- { path: "post.coverMedia.video.thumbnail.focalPoint.y" },
586
- { path: "post.heroImage.focalPoint.x" },
587
- { path: "post.heroImage.focalPoint.y" },
588
- { path: "post.media.wixMedia.image.focalPoint.x" },
589
- { path: "post.media.wixMedia.image.focalPoint.y" },
590
- {
591
- path: "post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
592
- },
593
- {
594
- path: "post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
595
- },
596
- { path: "post.media.wixMedia.videoV2.posters.focalPoint.x" },
597
- { path: "post.media.wixMedia.videoV2.posters.focalPoint.y" },
598
- { path: "post.metrics.averageRating" },
599
- {
600
- path: "post.richContent.nodes.galleryData.items.image.media.duration"
601
- },
602
- {
603
- path: "post.richContent.nodes.galleryData.items.video.media.duration"
604
- },
605
- {
606
- path: "post.richContent.nodes.galleryData.items.video.thumbnail.duration"
607
- },
608
- { path: "post.richContent.nodes.galleryData.options.item.ratio" },
609
- { path: "post.richContent.nodes.imageData.image.duration" },
610
- { path: "post.richContent.nodes.mapData.mapSettings.lat" },
611
- { path: "post.richContent.nodes.mapData.mapSettings.lng" },
612
- { path: "post.richContent.nodes.pollData.poll.image.duration" },
613
- {
614
- path: "post.richContent.nodes.pollData.poll.options.image.duration"
615
- },
616
- {
617
- path: "post.richContent.nodes.pollData.design.poll.background.image.duration"
618
- },
619
- { path: "post.richContent.nodes.appEmbedData.image.duration" },
620
- { path: "post.richContent.nodes.videoData.video.duration" },
621
- { path: "post.richContent.nodes.videoData.thumbnail.duration" },
622
- { path: "post.richContent.nodes.audioData.audio.duration" },
623
- { path: "post.richContent.nodes.audioData.coverImage.duration" }
624
- ]
625
- }
626
- ])
627
- };
628
- return metadata;
629
- }
630
- return __getPostBySlug;
631
- }
632
- function listPosts(payload) {
633
- function __listPosts({ host }) {
634
- const metadata = {
635
- entityFqdn: "wix.blog.v3.post",
636
- method: "GET",
637
- methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts",
638
- packageName: PACKAGE_NAME,
639
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
640
- protoPath: "/v3/posts",
641
- data: payload,
642
- host
643
- }),
644
- params: toURLSearchParams(payload),
645
- transformResponse: (payload2) => transformPaths(payload2, [
646
- {
647
- transformFn: transformRESTTimestampToSDKTimestamp,
648
- paths: [
649
- { path: "posts.firstPublishedDate" },
650
- { path: "posts.lastPublishedDate" },
651
- { path: "posts.coverMedia.image.urlExpirationDate" },
652
- { path: "posts.coverMedia.video.thumbnail.urlExpirationDate" },
653
- { path: "posts.heroImage.urlExpirationDate" },
654
- { path: "posts.richContent.metadata.createdTimestamp" },
655
- { path: "posts.richContent.metadata.updatedTimestamp" },
656
- { path: "posts.moderationDetails.submittedDate" },
657
- { path: "posts.moderationDetails.moderationDate" },
658
- { path: "posts.media.wixMedia.image.urlExpirationDate" },
659
- { path: "posts.media.wixMedia.videoV2.urlExpirationDate" },
660
- {
661
- path: "posts.media.wixMedia.videoV2.resolutions.urlExpirationDate"
662
- },
663
- {
664
- path: "posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
665
- },
666
- {
667
- path: "posts.media.wixMedia.videoV2.posters.urlExpirationDate"
668
- }
669
- ]
670
- },
671
- {
672
- transformFn: transformRESTBytesToSDKBytes,
673
- paths: [{ path: "posts.richContentCompressed" }]
674
- },
675
- {
676
- transformFn: transformRESTFloatToSDKFloat,
677
- paths: [
678
- { path: "posts.coverMedia.image.focalPoint.x" },
679
- { path: "posts.coverMedia.image.focalPoint.y" },
680
- { path: "posts.coverMedia.video.thumbnail.focalPoint.x" },
681
- { path: "posts.coverMedia.video.thumbnail.focalPoint.y" },
682
- { path: "posts.heroImage.focalPoint.x" },
683
- { path: "posts.heroImage.focalPoint.y" },
684
- { path: "posts.media.wixMedia.image.focalPoint.x" },
685
- { path: "posts.media.wixMedia.image.focalPoint.y" },
686
- {
687
- path: "posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
688
- },
689
- {
690
- path: "posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
691
- },
692
- { path: "posts.media.wixMedia.videoV2.posters.focalPoint.x" },
693
- { path: "posts.media.wixMedia.videoV2.posters.focalPoint.y" },
694
- { path: "posts.metrics.averageRating" },
695
- {
696
- path: "posts.richContent.nodes.galleryData.items.image.media.duration"
697
- },
698
- {
699
- path: "posts.richContent.nodes.galleryData.items.video.media.duration"
700
- },
701
- {
702
- path: "posts.richContent.nodes.galleryData.items.video.thumbnail.duration"
703
- },
704
- {
705
- path: "posts.richContent.nodes.galleryData.options.item.ratio"
706
- },
707
- { path: "posts.richContent.nodes.imageData.image.duration" },
708
- { path: "posts.richContent.nodes.mapData.mapSettings.lat" },
709
- { path: "posts.richContent.nodes.mapData.mapSettings.lng" },
710
- { path: "posts.richContent.nodes.pollData.poll.image.duration" },
711
- {
712
- path: "posts.richContent.nodes.pollData.poll.options.image.duration"
713
- },
714
- {
715
- path: "posts.richContent.nodes.pollData.design.poll.background.image.duration"
716
- },
717
- { path: "posts.richContent.nodes.appEmbedData.image.duration" },
718
- { path: "posts.richContent.nodes.videoData.video.duration" },
719
- { path: "posts.richContent.nodes.videoData.thumbnail.duration" },
720
- { path: "posts.richContent.nodes.audioData.audio.duration" },
721
- { path: "posts.richContent.nodes.audioData.coverImage.duration" }
722
- ]
723
- }
724
- ])
725
- };
726
- return metadata;
727
- }
728
- return __listPosts;
729
- }
730
- function queryPosts(payload) {
731
- function __queryPosts({ host }) {
732
- const metadata = {
733
- entityFqdn: "wix.blog.v3.post",
734
- method: "POST",
735
- methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts",
736
- packageName: PACKAGE_NAME,
737
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
738
- protoPath: "/v3/posts/query",
739
- data: payload,
740
- host
741
- }),
742
- data: payload,
743
- transformResponse: (payload2) => transformPaths(payload2, [
744
- {
745
- transformFn: transformRESTTimestampToSDKTimestamp,
746
- paths: [
747
- { path: "posts.firstPublishedDate" },
748
- { path: "posts.lastPublishedDate" },
749
- { path: "posts.coverMedia.image.urlExpirationDate" },
750
- { path: "posts.coverMedia.video.thumbnail.urlExpirationDate" },
751
- { path: "posts.heroImage.urlExpirationDate" },
752
- { path: "posts.richContent.metadata.createdTimestamp" },
753
- { path: "posts.richContent.metadata.updatedTimestamp" },
754
- { path: "posts.moderationDetails.submittedDate" },
755
- { path: "posts.moderationDetails.moderationDate" },
756
- { path: "posts.media.wixMedia.image.urlExpirationDate" },
757
- { path: "posts.media.wixMedia.videoV2.urlExpirationDate" },
758
- {
759
- path: "posts.media.wixMedia.videoV2.resolutions.urlExpirationDate"
760
- },
761
- {
762
- path: "posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate"
763
- },
764
- {
765
- path: "posts.media.wixMedia.videoV2.posters.urlExpirationDate"
766
- }
767
- ]
768
- },
769
- {
770
- transformFn: transformRESTBytesToSDKBytes,
771
- paths: [{ path: "posts.richContentCompressed" }]
772
- },
773
- {
774
- transformFn: transformRESTFloatToSDKFloat,
775
- paths: [
776
- { path: "posts.coverMedia.image.focalPoint.x" },
777
- { path: "posts.coverMedia.image.focalPoint.y" },
778
- { path: "posts.coverMedia.video.thumbnail.focalPoint.x" },
779
- { path: "posts.coverMedia.video.thumbnail.focalPoint.y" },
780
- { path: "posts.heroImage.focalPoint.x" },
781
- { path: "posts.heroImage.focalPoint.y" },
782
- { path: "posts.media.wixMedia.image.focalPoint.x" },
783
- { path: "posts.media.wixMedia.image.focalPoint.y" },
784
- {
785
- path: "posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x"
786
- },
787
- {
788
- path: "posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y"
789
- },
790
- { path: "posts.media.wixMedia.videoV2.posters.focalPoint.x" },
791
- { path: "posts.media.wixMedia.videoV2.posters.focalPoint.y" },
792
- { path: "posts.metrics.averageRating" },
793
- {
794
- path: "posts.richContent.nodes.galleryData.items.image.media.duration"
795
- },
796
- {
797
- path: "posts.richContent.nodes.galleryData.items.video.media.duration"
798
- },
799
- {
800
- path: "posts.richContent.nodes.galleryData.items.video.thumbnail.duration"
801
- },
802
- {
803
- path: "posts.richContent.nodes.galleryData.options.item.ratio"
804
- },
805
- { path: "posts.richContent.nodes.imageData.image.duration" },
806
- { path: "posts.richContent.nodes.mapData.mapSettings.lat" },
807
- { path: "posts.richContent.nodes.mapData.mapSettings.lng" },
808
- { path: "posts.richContent.nodes.pollData.poll.image.duration" },
809
- {
810
- path: "posts.richContent.nodes.pollData.poll.options.image.duration"
811
- },
812
- {
813
- path: "posts.richContent.nodes.pollData.design.poll.background.image.duration"
814
- },
815
- { path: "posts.richContent.nodes.appEmbedData.image.duration" },
816
- { path: "posts.richContent.nodes.videoData.video.duration" },
817
- { path: "posts.richContent.nodes.videoData.thumbnail.duration" },
818
- { path: "posts.richContent.nodes.audioData.audio.duration" },
819
- { path: "posts.richContent.nodes.audioData.coverImage.duration" }
820
- ]
821
- }
822
- ])
823
- };
824
- return metadata;
825
- }
826
- return __queryPosts;
827
- }
828
- function getPostMetrics(payload) {
829
- function __getPostMetrics({ host }) {
830
- const metadata = {
831
- entityFqdn: "wix.blog.v3.post",
832
- method: "GET",
833
- methodFqn: "com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics",
834
- packageName: PACKAGE_NAME,
835
- url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
836
- protoPath: "/v3/posts/{postId}/metrics",
837
- data: payload,
838
- host
839
- }),
840
- params: toURLSearchParams(payload),
841
- transformResponse: (payload2) => transformPaths(payload2, [
842
- {
843
- transformFn: transformRESTFloatToSDKFloat,
844
- paths: [{ path: "metrics.averageRating" }]
845
- }
846
- ])
847
- };
848
- return metadata;
849
- }
850
- return __getPostMetrics;
851
- }
852
-
853
- // src/blog-v3-post-posts.universal.ts
854
- import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/image";
855
- import { transformRESTVideoV2ToSDKVideoV2 } from "@wix/sdk-runtime/transformations/video-v2";
856
- import { transformRESTVideoToSDKVideo } from "@wix/sdk-runtime/transformations/video";
857
- import { transformRESTPageURLToSDKPageURL } from "@wix/sdk-runtime/transformations/page-url";
858
- import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
859
- var NodeType = /* @__PURE__ */ ((NodeType2) => {
860
- NodeType2["PARAGRAPH"] = "PARAGRAPH";
861
- NodeType2["TEXT"] = "TEXT";
862
- NodeType2["HEADING"] = "HEADING";
863
- NodeType2["BULLETED_LIST"] = "BULLETED_LIST";
864
- NodeType2["ORDERED_LIST"] = "ORDERED_LIST";
865
- NodeType2["LIST_ITEM"] = "LIST_ITEM";
866
- NodeType2["BLOCKQUOTE"] = "BLOCKQUOTE";
867
- NodeType2["CODE_BLOCK"] = "CODE_BLOCK";
868
- NodeType2["VIDEO"] = "VIDEO";
869
- NodeType2["DIVIDER"] = "DIVIDER";
870
- NodeType2["FILE"] = "FILE";
871
- NodeType2["GALLERY"] = "GALLERY";
872
- NodeType2["GIF"] = "GIF";
873
- NodeType2["HTML"] = "HTML";
874
- NodeType2["IMAGE"] = "IMAGE";
875
- NodeType2["LINK_PREVIEW"] = "LINK_PREVIEW";
876
- NodeType2["MAP"] = "MAP";
877
- NodeType2["POLL"] = "POLL";
878
- NodeType2["APP_EMBED"] = "APP_EMBED";
879
- NodeType2["BUTTON"] = "BUTTON";
880
- NodeType2["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
881
- NodeType2["TABLE"] = "TABLE";
882
- NodeType2["EMBED"] = "EMBED";
883
- NodeType2["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
884
- NodeType2["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
885
- NodeType2["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
886
- NodeType2["TABLE_CELL"] = "TABLE_CELL";
887
- NodeType2["TABLE_ROW"] = "TABLE_ROW";
888
- NodeType2["EXTERNAL"] = "EXTERNAL";
889
- NodeType2["AUDIO"] = "AUDIO";
890
- NodeType2["CAPTION"] = "CAPTION";
891
- NodeType2["LAYOUT"] = "LAYOUT";
892
- NodeType2["LAYOUT_CELL"] = "LAYOUT_CELL";
893
- return NodeType2;
894
- })(NodeType || {});
895
- var WidthType = /* @__PURE__ */ ((WidthType2) => {
896
- WidthType2["CONTENT"] = "CONTENT";
897
- WidthType2["SMALL"] = "SMALL";
898
- WidthType2["ORIGINAL"] = "ORIGINAL";
899
- WidthType2["FULL_WIDTH"] = "FULL_WIDTH";
900
- return WidthType2;
901
- })(WidthType || {});
902
- var PluginContainerDataAlignment = /* @__PURE__ */ ((PluginContainerDataAlignment2) => {
903
- PluginContainerDataAlignment2["CENTER"] = "CENTER";
904
- PluginContainerDataAlignment2["LEFT"] = "LEFT";
905
- PluginContainerDataAlignment2["RIGHT"] = "RIGHT";
906
- return PluginContainerDataAlignment2;
907
- })(PluginContainerDataAlignment || {});
908
- var Type = /* @__PURE__ */ ((Type2) => {
909
- Type2["LINK"] = "LINK";
910
- Type2["ACTION"] = "ACTION";
911
- return Type2;
912
- })(Type || {});
913
- var Target = /* @__PURE__ */ ((Target2) => {
914
- Target2["SELF"] = "SELF";
915
- Target2["BLANK"] = "BLANK";
916
- Target2["PARENT"] = "PARENT";
917
- Target2["TOP"] = "TOP";
918
- return Target2;
919
- })(Target || {});
920
- var TextAlignment = /* @__PURE__ */ ((TextAlignment2) => {
921
- TextAlignment2["AUTO"] = "AUTO";
922
- TextAlignment2["LEFT"] = "LEFT";
923
- TextAlignment2["RIGHT"] = "RIGHT";
924
- TextAlignment2["CENTER"] = "CENTER";
925
- TextAlignment2["JUSTIFY"] = "JUSTIFY";
926
- return TextAlignment2;
927
- })(TextAlignment || {});
928
- var LineStyle = /* @__PURE__ */ ((LineStyle2) => {
929
- LineStyle2["SINGLE"] = "SINGLE";
930
- LineStyle2["DOUBLE"] = "DOUBLE";
931
- LineStyle2["DASHED"] = "DASHED";
932
- LineStyle2["DOTTED"] = "DOTTED";
933
- return LineStyle2;
934
- })(LineStyle || {});
935
- var Width = /* @__PURE__ */ ((Width2) => {
936
- Width2["LARGE"] = "LARGE";
937
- Width2["MEDIUM"] = "MEDIUM";
938
- Width2["SMALL"] = "SMALL";
939
- return Width2;
940
- })(Width || {});
941
- var Alignment = /* @__PURE__ */ ((Alignment2) => {
942
- Alignment2["CENTER"] = "CENTER";
943
- Alignment2["LEFT"] = "LEFT";
944
- Alignment2["RIGHT"] = "RIGHT";
945
- return Alignment2;
946
- })(Alignment || {});
947
- var ViewMode = /* @__PURE__ */ ((ViewMode2) => {
948
- ViewMode2["NONE"] = "NONE";
949
- ViewMode2["FULL"] = "FULL";
950
- ViewMode2["MINI"] = "MINI";
951
- return ViewMode2;
952
- })(ViewMode || {});
953
- var LayoutType = /* @__PURE__ */ ((LayoutType2) => {
954
- LayoutType2["COLLAGE"] = "COLLAGE";
955
- LayoutType2["MASONRY"] = "MASONRY";
956
- LayoutType2["GRID"] = "GRID";
957
- LayoutType2["THUMBNAIL"] = "THUMBNAIL";
958
- LayoutType2["SLIDER"] = "SLIDER";
959
- LayoutType2["SLIDESHOW"] = "SLIDESHOW";
960
- LayoutType2["PANORAMA"] = "PANORAMA";
961
- LayoutType2["COLUMN"] = "COLUMN";
962
- LayoutType2["MAGIC"] = "MAGIC";
963
- LayoutType2["FULLSIZE"] = "FULLSIZE";
964
- return LayoutType2;
965
- })(LayoutType || {});
966
- var Orientation = /* @__PURE__ */ ((Orientation2) => {
967
- Orientation2["ROWS"] = "ROWS";
968
- Orientation2["COLUMNS"] = "COLUMNS";
969
- return Orientation2;
970
- })(Orientation || {});
971
- var Crop = /* @__PURE__ */ ((Crop2) => {
972
- Crop2["FILL"] = "FILL";
973
- Crop2["FIT"] = "FIT";
974
- return Crop2;
975
- })(Crop || {});
976
- var ThumbnailsAlignment = /* @__PURE__ */ ((ThumbnailsAlignment2) => {
977
- ThumbnailsAlignment2["TOP"] = "TOP";
978
- ThumbnailsAlignment2["RIGHT"] = "RIGHT";
979
- ThumbnailsAlignment2["BOTTOM"] = "BOTTOM";
980
- ThumbnailsAlignment2["LEFT"] = "LEFT";
981
- ThumbnailsAlignment2["NONE"] = "NONE";
982
- return ThumbnailsAlignment2;
983
- })(ThumbnailsAlignment || {});
984
- var GIFType = /* @__PURE__ */ ((GIFType2) => {
985
- GIFType2["GIF"] = "GIF";
986
- GIFType2["STICKER"] = "STICKER";
987
- return GIFType2;
988
- })(GIFType || {});
989
- var Source = /* @__PURE__ */ ((Source2) => {
990
- Source2["HTML"] = "HTML";
991
- Source2["ADSENSE"] = "ADSENSE";
992
- return Source2;
993
- })(Source || {});
994
- var Position = /* @__PURE__ */ ((Position2) => {
995
- Position2["START"] = "START";
996
- Position2["END"] = "END";
997
- Position2["TOP"] = "TOP";
998
- Position2["HIDDEN"] = "HIDDEN";
999
- return Position2;
1000
- })(Position || {});
1001
- var MapType = /* @__PURE__ */ ((MapType2) => {
1002
- MapType2["ROADMAP"] = "ROADMAP";
1003
- MapType2["SATELITE"] = "SATELITE";
1004
- MapType2["HYBRID"] = "HYBRID";
1005
- MapType2["TERRAIN"] = "TERRAIN";
1006
- return MapType2;
1007
- })(MapType || {});
1008
- var ViewRole = /* @__PURE__ */ ((ViewRole2) => {
1009
- ViewRole2["CREATOR"] = "CREATOR";
1010
- ViewRole2["VOTERS"] = "VOTERS";
1011
- ViewRole2["EVERYONE"] = "EVERYONE";
1012
- return ViewRole2;
1013
- })(ViewRole || {});
1014
- var VoteRole = /* @__PURE__ */ ((VoteRole2) => {
1015
- VoteRole2["SITE_MEMBERS"] = "SITE_MEMBERS";
1016
- VoteRole2["ALL"] = "ALL";
1017
- return VoteRole2;
1018
- })(VoteRole || {});
1019
- var PollLayoutType = /* @__PURE__ */ ((PollLayoutType2) => {
1020
- PollLayoutType2["LIST"] = "LIST";
1021
- PollLayoutType2["GRID"] = "GRID";
1022
- return PollLayoutType2;
1023
- })(PollLayoutType || {});
1024
- var PollLayoutDirection = /* @__PURE__ */ ((PollLayoutDirection2) => {
1025
- PollLayoutDirection2["LTR"] = "LTR";
1026
- PollLayoutDirection2["RTL"] = "RTL";
1027
- return PollLayoutDirection2;
1028
- })(PollLayoutDirection || {});
1029
- var BackgroundType = /* @__PURE__ */ ((BackgroundType2) => {
1030
- BackgroundType2["COLOR"] = "COLOR";
1031
- BackgroundType2["IMAGE"] = "IMAGE";
1032
- BackgroundType2["GRADIENT"] = "GRADIENT";
1033
- return BackgroundType2;
1034
- })(BackgroundType || {});
1035
- var DecorationType = /* @__PURE__ */ ((DecorationType2) => {
1036
- DecorationType2["BOLD"] = "BOLD";
1037
- DecorationType2["ITALIC"] = "ITALIC";
1038
- DecorationType2["UNDERLINE"] = "UNDERLINE";
1039
- DecorationType2["SPOILER"] = "SPOILER";
1040
- DecorationType2["ANCHOR"] = "ANCHOR";
1041
- DecorationType2["MENTION"] = "MENTION";
1042
- DecorationType2["LINK"] = "LINK";
1043
- DecorationType2["COLOR"] = "COLOR";
1044
- DecorationType2["FONT_SIZE"] = "FONT_SIZE";
1045
- DecorationType2["EXTERNAL"] = "EXTERNAL";
1046
- return DecorationType2;
1047
- })(DecorationType || {});
1048
- var FontType = /* @__PURE__ */ ((FontType2) => {
1049
- FontType2["PX"] = "PX";
1050
- FontType2["EM"] = "EM";
1051
- return FontType2;
1052
- })(FontType || {});
1053
- var AppType = /* @__PURE__ */ ((AppType2) => {
1054
- AppType2["PRODUCT"] = "PRODUCT";
1055
- AppType2["EVENT"] = "EVENT";
1056
- AppType2["BOOKING"] = "BOOKING";
1057
- return AppType2;
1058
- })(AppType || {});
1059
- var InitialExpandedItems = /* @__PURE__ */ ((InitialExpandedItems2) => {
1060
- InitialExpandedItems2["FIRST"] = "FIRST";
1061
- InitialExpandedItems2["ALL"] = "ALL";
1062
- InitialExpandedItems2["NONE"] = "NONE";
1063
- return InitialExpandedItems2;
1064
- })(InitialExpandedItems || {});
1065
- var Direction = /* @__PURE__ */ ((Direction2) => {
1066
- Direction2["LTR"] = "LTR";
1067
- Direction2["RTL"] = "RTL";
1068
- return Direction2;
1069
- })(Direction || {});
1070
- var VerticalAlignment = /* @__PURE__ */ ((VerticalAlignment2) => {
1071
- VerticalAlignment2["TOP"] = "TOP";
1072
- VerticalAlignment2["MIDDLE"] = "MIDDLE";
1073
- VerticalAlignment2["BOTTOM"] = "BOTTOM";
1074
- return VerticalAlignment2;
1075
- })(VerticalAlignment || {});
1076
- var NullValue = /* @__PURE__ */ ((NullValue2) => {
1077
- NullValue2["NULL_VALUE"] = "NULL_VALUE";
1078
- return NullValue2;
1079
- })(NullValue || {});
1080
- var ModerationStatusStatus = /* @__PURE__ */ ((ModerationStatusStatus2) => {
1081
- ModerationStatusStatus2["UNKNOWN"] = "UNKNOWN";
1082
- ModerationStatusStatus2["APPROVED"] = "APPROVED";
1083
- ModerationStatusStatus2["REJECTED"] = "REJECTED";
1084
- return ModerationStatusStatus2;
1085
- })(ModerationStatusStatus || {});
1086
- var QueryPublicationsCountStatsRequestOrder = /* @__PURE__ */ ((QueryPublicationsCountStatsRequestOrder2) => {
1087
- QueryPublicationsCountStatsRequestOrder2["UNKNOWN"] = "UNKNOWN";
1088
- QueryPublicationsCountStatsRequestOrder2["OLDEST"] = "OLDEST";
1089
- QueryPublicationsCountStatsRequestOrder2["NEWEST"] = "NEWEST";
1090
- return QueryPublicationsCountStatsRequestOrder2;
1091
- })(QueryPublicationsCountStatsRequestOrder || {});
1092
- var Order = /* @__PURE__ */ ((Order2) => {
1093
- Order2["UNKNOWN"] = "UNKNOWN";
1094
- Order2["OLDEST"] = "OLDEST";
1095
- Order2["NEWEST"] = "NEWEST";
1096
- return Order2;
1097
- })(Order || {});
1098
- var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
1099
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
1100
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
1101
- WebhookIdentityType2["MEMBER"] = "MEMBER";
1102
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
1103
- WebhookIdentityType2["APP"] = "APP";
1104
- return WebhookIdentityType2;
1105
- })(WebhookIdentityType || {});
1106
- var GetPostTemplatesSort = /* @__PURE__ */ ((GetPostTemplatesSort2) => {
1107
- GetPostTemplatesSort2["PUBLISHED_DATE_ASC"] = "PUBLISHED_DATE_ASC";
1108
- GetPostTemplatesSort2["PUBLISHED_DATE_DESC"] = "PUBLISHED_DATE_DESC";
1109
- return GetPostTemplatesSort2;
1110
- })(GetPostTemplatesSort || {});
1111
- var Origin = /* @__PURE__ */ ((Origin2) => {
1112
- Origin2["UNKNOWN"] = "UNKNOWN";
1113
- Origin2["ADMIN"] = "ADMIN";
1114
- Origin2["ADD_CATEGORIES"] = "ADD_CATEGORIES";
1115
- Origin2["AUTO_SAVE"] = "AUTO_SAVE";
1116
- Origin2["COPY_TEMPLATE"] = "COPY_TEMPLATE";
1117
- Origin2["IMPORT"] = "IMPORT";
1118
- Origin2["IMPORT_BULK"] = "IMPORT_BULK";
1119
- Origin2["IMPORT_HTML"] = "IMPORT_HTML";
1120
- Origin2["IMPORT_PATCH"] = "IMPORT_PATCH";
1121
- Origin2["LANGUAGE_CHANGE"] = "LANGUAGE_CHANGE";
1122
- Origin2["MANUAL_SAVE"] = "MANUAL_SAVE";
1123
- Origin2["MIGRATION"] = "MIGRATION";
1124
- Origin2["MODERATION"] = "MODERATION";
1125
- Origin2["MOVE_TO_TRASH"] = "MOVE_TO_TRASH";
1126
- Origin2["PRICING_PLANS_CHANGE"] = "PRICING_PLANS_CHANGE";
1127
- Origin2["PROVISION"] = "PROVISION";
1128
- Origin2["PUBLISH"] = "PUBLISH";
1129
- Origin2["REASSIGN_OWNER"] = "REASSIGN_OWNER";
1130
- Origin2["REBLOG"] = "REBLOG";
1131
- Origin2["RESTORE"] = "RESTORE";
1132
- Origin2["REVERT_TO_DRAFT"] = "REVERT_TO_DRAFT";
1133
- Origin2["TRANSLATION"] = "TRANSLATION";
1134
- Origin2["UNPUBLISH"] = "UNPUBLISH";
1135
- Origin2["UNSCHEDULE"] = "UNSCHEDULE";
1136
- Origin2["NEW_EDIT_SESSION"] = "NEW_EDIT_SESSION";
1137
- Origin2["SCHEDULING_SERVICE_SCHEDULE"] = "SCHEDULING_SERVICE_SCHEDULE";
1138
- Origin2["SCHEDULING_SERVICE_UNSCHEDULE"] = "SCHEDULING_SERVICE_UNSCHEDULE";
1139
- Origin2["SCHEDULING_SERVICE_PUBLISH"] = "SCHEDULING_SERVICE_PUBLISH";
1140
- Origin2["SCHEDULE"] = "SCHEDULE";
1141
- Origin2["REMOVE_FROM_MODERATION"] = "REMOVE_FROM_MODERATION";
1142
- Origin2["REJECT_FROM_MODERATION"] = "REJECT_FROM_MODERATION";
1143
- Origin2["APPROVE_IN_MODERATION"] = "APPROVE_IN_MODERATION";
1144
- Origin2["DELETE_TAG"] = "DELETE_TAG";
1145
- Origin2["PIN"] = "PIN";
1146
- Origin2["UNPIN"] = "UNPIN";
1147
- Origin2["AI_AUTO_SAVE"] = "AI_AUTO_SAVE";
1148
- return Origin2;
1149
- })(Origin || {});
1150
- var Status = /* @__PURE__ */ ((Status2) => {
1151
- Status2["UNKNOWN"] = "UNKNOWN";
1152
- Status2["PUBLISHED"] = "PUBLISHED";
1153
- Status2["UNPUBLISHED"] = "UNPUBLISHED";
1154
- Status2["SCHEDULED"] = "SCHEDULED";
1155
- Status2["DELETED"] = "DELETED";
1156
- Status2["IN_REVIEW"] = "IN_REVIEW";
1157
- return Status2;
1158
- })(Status || {});
1159
- var Field = /* @__PURE__ */ ((Field2) => {
1160
- Field2["UNKNOWN"] = "UNKNOWN";
1161
- Field2["TOTAL_COMMENTS"] = "TOTAL_COMMENTS";
1162
- Field2["LIKE_COUNT"] = "LIKE_COUNT";
1163
- Field2["VIEW_COUNT"] = "VIEW_COUNT";
1164
- Field2["RATING_COUNT"] = "RATING_COUNT";
1165
- return Field2;
1166
- })(Field || {});
1167
- var PostFieldField = /* @__PURE__ */ ((PostFieldField2) => {
1168
- PostFieldField2["UNKNOWN"] = "UNKNOWN";
1169
- PostFieldField2["URL"] = "URL";
1170
- PostFieldField2["CONTENT_TEXT"] = "CONTENT_TEXT";
1171
- PostFieldField2["METRICS"] = "METRICS";
1172
- PostFieldField2["SEO"] = "SEO";
1173
- PostFieldField2["CONTACT_ID"] = "CONTACT_ID";
1174
- PostFieldField2["RICH_CONTENT"] = "RICH_CONTENT";
1175
- PostFieldField2["REFERENCE_ID"] = "REFERENCE_ID";
1176
- return PostFieldField2;
1177
- })(PostFieldField || {});
1178
- var GetPostsSort = /* @__PURE__ */ ((GetPostsSort2) => {
1179
- GetPostsSort2["FEED"] = "FEED";
1180
- GetPostsSort2["PUBLISHED_DATE_ASC"] = "PUBLISHED_DATE_ASC";
1181
- GetPostsSort2["PUBLISHED_DATE_DESC"] = "PUBLISHED_DATE_DESC";
1182
- GetPostsSort2["VIEW_COUNT"] = "VIEW_COUNT";
1183
- GetPostsSort2["LIKE_COUNT"] = "LIKE_COUNT";
1184
- GetPostsSort2["TITLE_ASC"] = "TITLE_ASC";
1185
- GetPostsSort2["TITLE_DESC"] = "TITLE_DESC";
1186
- return GetPostsSort2;
1187
- })(GetPostsSort || {});
1188
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
1189
- SortOrder2["ASC"] = "ASC";
1190
- SortOrder2["DESC"] = "DESC";
1191
- return SortOrder2;
1192
- })(SortOrder || {});
1193
- async function queryPostCountStats2(options) {
1194
- const { httpClient, sideEffects } = arguments[1];
1195
- const payload = renameKeysFromSDKRequestToRESTRequest(
1196
- {
1197
- rangeStart: options?.rangeStart,
1198
- order: options?.order,
1199
- months: options?.months,
1200
- language: options?.language,
1201
- timeZone: options?.timeZone
1202
- },
1203
- []
1204
- );
1205
- const reqOpts = queryPostCountStats(payload);
1206
- sideEffects?.onSiteCall?.();
1207
- try {
1208
- const result = await httpClient.request(reqOpts);
1209
- sideEffects?.onSuccess?.(result);
1210
- return renameKeysFromRESTResponseToSDKResponse(result.data, []);
1211
- } catch (err) {
1212
- const transformedError = sdkTransformError(
1213
- err,
1214
- {
1215
- spreadPathsToArguments: {},
1216
- explicitPathsToArguments: {
1217
- rangeStart: "$[0].rangeStart",
1218
- order: "$[0].order",
1219
- months: "$[0].months",
1220
- language: "$[0].language",
1221
- timeZone: "$[0].timeZone"
1222
- },
1223
- singleArgumentUnchanged: false
1224
- },
1225
- ["options"]
1226
- );
1227
- sideEffects?.onError?.(err);
1228
- throw transformedError;
1229
- }
1230
- }
1231
- async function getTotalPosts2(options) {
1232
- const { httpClient, sideEffects } = arguments[1];
1233
- const payload = renameKeysFromSDKRequestToRESTRequest(
1234
- { language: options?.language },
1235
- []
1236
- );
1237
- const reqOpts = getTotalPosts(payload);
1238
- sideEffects?.onSiteCall?.();
1239
- try {
1240
- const result = await httpClient.request(reqOpts);
1241
- sideEffects?.onSuccess?.(result);
1242
- return renameKeysFromRESTResponseToSDKResponse(result.data, []);
1243
- } catch (err) {
1244
- const transformedError = sdkTransformError(
1245
- err,
1246
- {
1247
- spreadPathsToArguments: {},
1248
- explicitPathsToArguments: { language: "$[0].language" },
1249
- singleArgumentUnchanged: false
1250
- },
1251
- ["options"]
1252
- );
1253
- sideEffects?.onError?.(err);
1254
- throw transformedError;
1255
- }
1256
- }
1257
- async function getPost2(postId, options) {
1258
- const { httpClient, sideEffects } = arguments[2];
1259
- const payload = renameKeysFromSDKRequestToRESTRequest(
1260
- { postId, fieldsets: options?.fieldsets },
1261
- []
1262
- );
1263
- const reqOpts = getPost(payload);
1264
- sideEffects?.onSiteCall?.();
1265
- try {
1266
- const result = await httpClient.request(reqOpts);
1267
- sideEffects?.onSuccess?.(result);
1268
- return renameKeysFromRESTResponseToSDKResponse(
1269
- transformPaths2(result.data, [
1270
- {
1271
- transformFn: transformRESTPageURLToSDKPageURL,
1272
- paths: [{ path: "post.url" }, { path: "post.translations.url" }]
1273
- },
1274
- {
1275
- transformFn: transformRESTImageToSDKImage,
1276
- paths: [
1277
- { path: "post.heroImage" },
1278
- { path: "post.coverMedia.image" },
1279
- { path: "post.media.wixMedia.image" }
1280
- ]
1281
- },
1282
- {
1283
- transformFn: transformRESTVideoToSDKVideo,
1284
- paths: [{ path: "post.coverMedia.video" }]
1285
- },
1286
- {
1287
- transformFn: transformRESTVideoV2ToSDKVideoV2,
1288
- paths: [{ path: "post.media.wixMedia.videoV2" }]
1289
- }
1290
- ]),
1291
- ["post.rich_content"]
1292
- );
1293
- } catch (err) {
1294
- const transformedError = sdkTransformError(
1295
- err,
1296
- {
1297
- spreadPathsToArguments: {},
1298
- explicitPathsToArguments: {
1299
- postId: "$[0]",
1300
- fieldsets: "$[1].fieldsets"
1301
- },
1302
- singleArgumentUnchanged: false
1303
- },
1304
- ["postId", "options"]
1305
- );
1306
- sideEffects?.onError?.(err);
1307
- throw transformedError;
1308
- }
1309
- }
1310
- async function getPostBySlug2(slug, options) {
1311
- const { httpClient, sideEffects } = arguments[2];
1312
- const payload = renameKeysFromSDKRequestToRESTRequest(
1313
- { slug, fieldsets: options?.fieldsets },
1314
- []
1315
- );
1316
- const reqOpts = getPostBySlug(payload);
1317
- sideEffects?.onSiteCall?.();
1318
- try {
1319
- const result = await httpClient.request(reqOpts);
1320
- sideEffects?.onSuccess?.(result);
1321
- return renameKeysFromRESTResponseToSDKResponse(
1322
- transformPaths2(result.data, [
1323
- {
1324
- transformFn: transformRESTPageURLToSDKPageURL,
1325
- paths: [{ path: "post.url" }, { path: "post.translations.url" }]
1326
- },
1327
- {
1328
- transformFn: transformRESTImageToSDKImage,
1329
- paths: [
1330
- { path: "post.heroImage" },
1331
- { path: "post.coverMedia.image" },
1332
- { path: "post.media.wixMedia.image" }
1333
- ]
1334
- },
1335
- {
1336
- transformFn: transformRESTVideoToSDKVideo,
1337
- paths: [{ path: "post.coverMedia.video" }]
1338
- },
1339
- {
1340
- transformFn: transformRESTVideoV2ToSDKVideoV2,
1341
- paths: [{ path: "post.media.wixMedia.videoV2" }]
1342
- }
1343
- ]),
1344
- ["post.rich_content"]
1345
- );
1346
- } catch (err) {
1347
- const transformedError = sdkTransformError(
1348
- err,
1349
- {
1350
- spreadPathsToArguments: {},
1351
- explicitPathsToArguments: { slug: "$[0]", fieldsets: "$[1].fieldsets" },
1352
- singleArgumentUnchanged: false
1353
- },
1354
- ["slug", "options"]
1355
- );
1356
- sideEffects?.onError?.(err);
1357
- throw transformedError;
1358
- }
1359
- }
1360
- async function listPosts2(options) {
1361
- const { httpClient, sideEffects } = arguments[1];
1362
- const payload = renameKeysFromSDKRequestToRESTRequest(
1363
- {
1364
- featured: options?.featured,
1365
- hashtags: options?.hashtags,
1366
- categoryIds: options?.categoryIds,
1367
- tagIds: options?.tagIds,
1368
- sort: options?.sort,
1369
- paging: options?.paging,
1370
- language: options?.language,
1371
- memberId: options?.memberId,
1372
- fieldsets: options?.fieldsets
1373
- },
1374
- []
1375
- );
1376
- const reqOpts = listPosts(payload);
1377
- sideEffects?.onSiteCall?.();
1378
- try {
1379
- const result = await httpClient.request(reqOpts);
1380
- sideEffects?.onSuccess?.(result);
1381
- return renameKeysFromRESTResponseToSDKResponse(
1382
- transformPaths2(result.data, [
1383
- {
1384
- transformFn: transformRESTPageURLToSDKPageURL,
1385
- paths: [{ path: "posts.url" }, { path: "posts.translations.url" }]
1386
- },
1387
- {
1388
- transformFn: transformRESTImageToSDKImage,
1389
- paths: [
1390
- { path: "posts.heroImage" },
1391
- { path: "posts.coverMedia.image" },
1392
- { path: "posts.media.wixMedia.image" }
1393
- ]
1394
- },
1395
- {
1396
- transformFn: transformRESTVideoToSDKVideo,
1397
- paths: [{ path: "posts.coverMedia.video" }]
1398
- },
1399
- {
1400
- transformFn: transformRESTVideoV2ToSDKVideoV2,
1401
- paths: [{ path: "posts.media.wixMedia.videoV2" }]
1402
- }
1403
- ]),
1404
- ["posts.rich_content"]
1405
- );
1406
- } catch (err) {
1407
- const transformedError = sdkTransformError(
1408
- err,
1409
- {
1410
- spreadPathsToArguments: {},
1411
- explicitPathsToArguments: {
1412
- featured: "$[0].featured",
1413
- hashtags: "$[0].hashtags",
1414
- categoryIds: "$[0].categoryIds",
1415
- tagIds: "$[0].tagIds",
1416
- sort: "$[0].sort",
1417
- paging: "$[0].paging",
1418
- language: "$[0].language",
1419
- memberId: "$[0].memberId",
1420
- fieldsets: "$[0].fieldsets"
1421
- },
1422
- singleArgumentUnchanged: false
1423
- },
1424
- ["options"]
1425
- );
1426
- sideEffects?.onError?.(err);
1427
- throw transformedError;
1428
- }
1429
- }
1430
- function queryPosts2(options) {
1431
- const { httpClient, sideEffects } = arguments[1];
1432
- return queryBuilder({
1433
- func: async (payload) => {
1434
- const reqOpts = queryPosts({
1435
- ...payload,
1436
- ...options ?? {}
1437
- });
1438
- sideEffects?.onSiteCall?.();
1439
- try {
1440
- const result = await httpClient.request(reqOpts);
1441
- sideEffects?.onSuccess?.(result);
1442
- return result;
1443
- } catch (err) {
1444
- sideEffects?.onError?.(err);
1445
- throw err;
1446
- }
1447
- },
1448
- requestTransformer: (query) => {
1449
- const args = [query, options];
1450
- return renameKeysFromSDKRequestToRESTRequest(
1451
- { ...args?.[1], query: args?.[0] },
1452
- []
1453
- );
1454
- },
1455
- responseTransformer: ({ data }) => {
1456
- const transformedData = renameKeysFromRESTResponseToSDKResponse(
1457
- transformPaths2(data, [
1458
- {
1459
- transformFn: transformRESTPageURLToSDKPageURL,
1460
- paths: [{ path: "posts.url" }, { path: "posts.translations.url" }]
1461
- },
1462
- {
1463
- transformFn: transformRESTImageToSDKImage,
1464
- paths: [
1465
- { path: "posts.heroImage" },
1466
- { path: "posts.coverMedia.image" },
1467
- { path: "posts.media.wixMedia.image" }
1468
- ]
1469
- },
1470
- {
1471
- transformFn: transformRESTVideoToSDKVideo,
1472
- paths: [{ path: "posts.coverMedia.video" }]
1473
- },
1474
- {
1475
- transformFn: transformRESTVideoV2ToSDKVideoV2,
1476
- paths: [{ path: "posts.media.wixMedia.videoV2" }]
1477
- }
1478
- ]),
1479
- ["posts.rich_content"]
1480
- );
1481
- return {
1482
- items: transformedData?.posts,
1483
- pagingMetadata: transformedData?.pagingMetadata
1484
- };
1485
- },
1486
- errorTransformer: (err) => {
1487
- const transformedError = sdkTransformError(err, {
1488
- spreadPathsToArguments: {},
1489
- explicitPathsToArguments: { query: "$[0]" },
1490
- singleArgumentUnchanged: false
1491
- });
1492
- throw transformedError;
1493
- },
1494
- pagingMethod: "CURSOR",
1495
- transformationPaths: {}
1496
- });
1497
- }
1498
- async function getPostMetrics2(postId) {
1499
- const { httpClient, sideEffects } = arguments[1];
1500
- const payload = renameKeysFromSDKRequestToRESTRequest({ postId }, []);
1501
- const reqOpts = getPostMetrics(payload);
1502
- sideEffects?.onSiteCall?.();
1503
- try {
1504
- const result = await httpClient.request(reqOpts);
1505
- sideEffects?.onSuccess?.(result);
1506
- return renameKeysFromRESTResponseToSDKResponse(result.data, []);
1507
- } catch (err) {
1508
- const transformedError = sdkTransformError(
1509
- err,
1510
- {
1511
- spreadPathsToArguments: {},
1512
- explicitPathsToArguments: { postId: "$[0]" },
1513
- singleArgumentUnchanged: false
1514
- },
1515
- ["postId"]
1516
- );
1517
- sideEffects?.onError?.(err);
1518
- throw transformedError;
1519
- }
1520
- }
1521
-
1522
- // src/blog-v3-post-posts.public.ts
1523
- function queryPostCountStats3(httpClient) {
1524
- return (options) => queryPostCountStats2(
1525
- options,
1526
- // @ts-ignore
1527
- { httpClient }
1528
- );
1529
- }
1530
- function getTotalPosts3(httpClient) {
1531
- return (options) => getTotalPosts2(
1532
- options,
1533
- // @ts-ignore
1534
- { httpClient }
1535
- );
1536
- }
1537
- function getPost3(httpClient) {
1538
- return (postId, options) => getPost2(
1539
- postId,
1540
- options,
1541
- // @ts-ignore
1542
- { httpClient }
1543
- );
1544
- }
1545
- function getPostBySlug3(httpClient) {
1546
- return (slug, options) => getPostBySlug2(
1547
- slug,
1548
- options,
1549
- // @ts-ignore
1550
- { httpClient }
1551
- );
1552
- }
1553
- function listPosts3(httpClient) {
1554
- return (options) => listPosts2(
1555
- options,
1556
- // @ts-ignore
1557
- { httpClient }
1558
- );
1559
- }
1560
- function queryPosts3(httpClient) {
1561
- return (options) => queryPosts2(
1562
- options,
1563
- // @ts-ignore
1564
- { httpClient }
1565
- );
1566
- }
1567
- function getPostMetrics3(httpClient) {
1568
- return (postId) => getPostMetrics2(
1569
- postId,
1570
- // @ts-ignore
1571
- { httpClient }
1572
- );
1573
- }
1574
- var onPostCreated = EventDefinition(
1575
- "wix.blog.v3.post_created",
1576
- true,
1577
- (event) => renameKeysFromRESTResponseToSDKResponse2(
1578
- transformPaths3(event, [
1579
- {
1580
- transformFn: transformRESTTimestampToSDKTimestamp2,
1581
- paths: [
1582
- { path: "entity.firstPublishedDate" },
1583
- { path: "entity.lastPublishedDate" },
1584
- { path: "entity.richContent.metadata.createdTimestamp" },
1585
- { path: "entity.richContent.metadata.updatedTimestamp" },
1586
- { path: "entity.moderationDetails.submittedDate" },
1587
- { path: "entity.moderationDetails.moderationDate" },
1588
- { path: "metadata.eventTime" }
1589
- ]
1590
- },
1591
- {
1592
- transformFn: transformRESTPageURLToSDKPageURL2,
1593
- paths: [{ path: "entity.url" }, { path: "entity.translations.url" }]
1594
- },
1595
- {
1596
- transformFn: transformRESTImageToSDKImage2,
1597
- paths: [
1598
- { path: "entity.heroImage" },
1599
- { path: "entity.coverMedia.image" },
1600
- { path: "entity.media.wixMedia.image" }
1601
- ]
1602
- },
1603
- {
1604
- transformFn: transformRESTBytesToSDKBytes2,
1605
- paths: [{ path: "entity.richContentCompressed" }]
1606
- },
1607
- {
1608
- transformFn: transformRESTVideoToSDKVideo2,
1609
- paths: [{ path: "entity.coverMedia.video" }]
1610
- },
1611
- {
1612
- transformFn: transformRESTFloatToSDKFloat2,
1613
- paths: [
1614
- { path: "entity.metrics.averageRating" },
1615
- {
1616
- path: "entity.richContent.nodes.galleryData.items.image.media.duration"
1617
- },
1618
- {
1619
- path: "entity.richContent.nodes.galleryData.items.video.media.duration"
1620
- },
1621
- {
1622
- path: "entity.richContent.nodes.galleryData.items.video.thumbnail.duration"
1623
- },
1624
- { path: "entity.richContent.nodes.galleryData.options.item.ratio" },
1625
- { path: "entity.richContent.nodes.imageData.image.duration" },
1626
- { path: "entity.richContent.nodes.mapData.mapSettings.lat" },
1627
- { path: "entity.richContent.nodes.mapData.mapSettings.lng" },
1628
- { path: "entity.richContent.nodes.pollData.poll.image.duration" },
1629
- {
1630
- path: "entity.richContent.nodes.pollData.poll.options.image.duration"
1631
- },
1632
- {
1633
- path: "entity.richContent.nodes.pollData.design.poll.background.image.duration"
1634
- },
1635
- { path: "entity.richContent.nodes.appEmbedData.image.duration" },
1636
- { path: "entity.richContent.nodes.videoData.video.duration" },
1637
- { path: "entity.richContent.nodes.videoData.thumbnail.duration" },
1638
- { path: "entity.richContent.nodes.audioData.audio.duration" },
1639
- { path: "entity.richContent.nodes.audioData.coverImage.duration" }
1640
- ]
1641
- },
1642
- {
1643
- transformFn: transformRESTVideoV2ToSDKVideoV22,
1644
- paths: [{ path: "entity.media.wixMedia.videoV2" }]
1645
- }
1646
- ]),
1647
- ["entity.rich_content"]
1648
- )
1649
- )();
1650
- var onPostDeleted = EventDefinition(
1651
- "wix.blog.v3.post_deleted",
1652
- true,
1653
- (event) => renameKeysFromRESTResponseToSDKResponse2(
1654
- transformPaths3(event, [
1655
- {
1656
- transformFn: transformRESTTimestampToSDKTimestamp2,
1657
- paths: [
1658
- { path: "entity.firstPublishedDate" },
1659
- { path: "entity.lastPublishedDate" },
1660
- { path: "entity.richContent.metadata.createdTimestamp" },
1661
- { path: "entity.richContent.metadata.updatedTimestamp" },
1662
- { path: "entity.moderationDetails.submittedDate" },
1663
- { path: "entity.moderationDetails.moderationDate" },
1664
- { path: "metadata.eventTime" }
1665
- ]
1666
- },
1667
- {
1668
- transformFn: transformRESTPageURLToSDKPageURL2,
1669
- paths: [{ path: "entity.url" }, { path: "entity.translations.url" }]
1670
- },
1671
- {
1672
- transformFn: transformRESTImageToSDKImage2,
1673
- paths: [
1674
- { path: "entity.heroImage" },
1675
- { path: "entity.coverMedia.image" },
1676
- { path: "entity.media.wixMedia.image" }
1677
- ]
1678
- },
1679
- {
1680
- transformFn: transformRESTBytesToSDKBytes2,
1681
- paths: [{ path: "entity.richContentCompressed" }]
1682
- },
1683
- {
1684
- transformFn: transformRESTVideoToSDKVideo2,
1685
- paths: [{ path: "entity.coverMedia.video" }]
1686
- },
1687
- {
1688
- transformFn: transformRESTFloatToSDKFloat2,
1689
- paths: [
1690
- { path: "entity.metrics.averageRating" },
1691
- {
1692
- path: "entity.richContent.nodes.galleryData.items.image.media.duration"
1693
- },
1694
- {
1695
- path: "entity.richContent.nodes.galleryData.items.video.media.duration"
1696
- },
1697
- {
1698
- path: "entity.richContent.nodes.galleryData.items.video.thumbnail.duration"
1699
- },
1700
- { path: "entity.richContent.nodes.galleryData.options.item.ratio" },
1701
- { path: "entity.richContent.nodes.imageData.image.duration" },
1702
- { path: "entity.richContent.nodes.mapData.mapSettings.lat" },
1703
- { path: "entity.richContent.nodes.mapData.mapSettings.lng" },
1704
- { path: "entity.richContent.nodes.pollData.poll.image.duration" },
1705
- {
1706
- path: "entity.richContent.nodes.pollData.poll.options.image.duration"
1707
- },
1708
- {
1709
- path: "entity.richContent.nodes.pollData.design.poll.background.image.duration"
1710
- },
1711
- { path: "entity.richContent.nodes.appEmbedData.image.duration" },
1712
- { path: "entity.richContent.nodes.videoData.video.duration" },
1713
- { path: "entity.richContent.nodes.videoData.thumbnail.duration" },
1714
- { path: "entity.richContent.nodes.audioData.audio.duration" },
1715
- { path: "entity.richContent.nodes.audioData.coverImage.duration" }
1716
- ]
1717
- },
1718
- {
1719
- transformFn: transformRESTVideoV2ToSDKVideoV22,
1720
- paths: [{ path: "entity.media.wixMedia.videoV2" }]
1721
- }
1722
- ]),
1723
- ["entity.rich_content"]
1724
- )
1725
- )();
1726
- var onPostLiked = EventDefinition(
1727
- "wix.blog.v3.post_liked",
1728
- true,
1729
- (event) => renameKeysFromRESTResponseToSDKResponse2(
1730
- transformPaths3(event, [
1731
- {
1732
- transformFn: transformRESTTimestampToSDKTimestamp2,
1733
- paths: [{ path: "metadata.eventTime" }]
1734
- }
1735
- ]),
1736
- ["entity.rich_content"]
1737
- )
1738
- )();
1739
- var onPostUnliked = EventDefinition(
1740
- "wix.blog.v3.post_unliked",
1741
- true,
1742
- (event) => renameKeysFromRESTResponseToSDKResponse2(
1743
- transformPaths3(event, [
1744
- {
1745
- transformFn: transformRESTTimestampToSDKTimestamp2,
1746
- paths: [{ path: "metadata.eventTime" }]
1747
- }
1748
- ]),
1749
- ["entity.rich_content"]
1750
- )
1751
- )();
1752
- var onPostUpdated = EventDefinition(
1753
- "wix.blog.v3.post_updated",
1754
- true,
1755
- (event) => renameKeysFromRESTResponseToSDKResponse2(
1756
- transformPaths3(event, [
1757
- {
1758
- transformFn: transformRESTTimestampToSDKTimestamp2,
1759
- paths: [
1760
- { path: "entity.firstPublishedDate" },
1761
- { path: "entity.lastPublishedDate" },
1762
- { path: "entity.richContent.metadata.createdTimestamp" },
1763
- { path: "entity.richContent.metadata.updatedTimestamp" },
1764
- { path: "entity.moderationDetails.submittedDate" },
1765
- { path: "entity.moderationDetails.moderationDate" },
1766
- { path: "metadata.eventTime" }
1767
- ]
1768
- },
1769
- {
1770
- transformFn: transformRESTPageURLToSDKPageURL2,
1771
- paths: [{ path: "entity.url" }, { path: "entity.translations.url" }]
1772
- },
1773
- {
1774
- transformFn: transformRESTImageToSDKImage2,
1775
- paths: [
1776
- { path: "entity.heroImage" },
1777
- { path: "entity.coverMedia.image" },
1778
- { path: "entity.media.wixMedia.image" }
1779
- ]
1780
- },
1781
- {
1782
- transformFn: transformRESTBytesToSDKBytes2,
1783
- paths: [{ path: "entity.richContentCompressed" }]
1784
- },
1785
- {
1786
- transformFn: transformRESTVideoToSDKVideo2,
1787
- paths: [{ path: "entity.coverMedia.video" }]
1788
- },
1789
- {
1790
- transformFn: transformRESTFloatToSDKFloat2,
1791
- paths: [
1792
- { path: "entity.metrics.averageRating" },
1793
- {
1794
- path: "entity.richContent.nodes.galleryData.items.image.media.duration"
1795
- },
1796
- {
1797
- path: "entity.richContent.nodes.galleryData.items.video.media.duration"
1798
- },
1799
- {
1800
- path: "entity.richContent.nodes.galleryData.items.video.thumbnail.duration"
1801
- },
1802
- { path: "entity.richContent.nodes.galleryData.options.item.ratio" },
1803
- { path: "entity.richContent.nodes.imageData.image.duration" },
1804
- { path: "entity.richContent.nodes.mapData.mapSettings.lat" },
1805
- { path: "entity.richContent.nodes.mapData.mapSettings.lng" },
1806
- { path: "entity.richContent.nodes.pollData.poll.image.duration" },
1807
- {
1808
- path: "entity.richContent.nodes.pollData.poll.options.image.duration"
1809
- },
1810
- {
1811
- path: "entity.richContent.nodes.pollData.design.poll.background.image.duration"
1812
- },
1813
- { path: "entity.richContent.nodes.appEmbedData.image.duration" },
1814
- { path: "entity.richContent.nodes.videoData.video.duration" },
1815
- { path: "entity.richContent.nodes.videoData.thumbnail.duration" },
1816
- { path: "entity.richContent.nodes.audioData.audio.duration" },
1817
- { path: "entity.richContent.nodes.audioData.coverImage.duration" }
1818
- ]
1819
- },
1820
- {
1821
- transformFn: transformRESTVideoV2ToSDKVideoV22,
1822
- paths: [{ path: "entity.media.wixMedia.videoV2" }]
1823
- }
1824
- ]),
1825
- ["entity.rich_content"]
1826
- )
1827
- )();
1828
-
1829
- // src/blog-v3-post-posts.context.ts
1830
- import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
1831
- import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
1832
- var queryPostCountStats4 = /* @__PURE__ */ createRESTModule(queryPostCountStats3);
1833
- var getTotalPosts4 = /* @__PURE__ */ createRESTModule(getTotalPosts3);
1834
- var getPost4 = /* @__PURE__ */ createRESTModule(getPost3);
1835
- var getPostBySlug4 = /* @__PURE__ */ createRESTModule(getPostBySlug3);
1836
- var listPosts4 = /* @__PURE__ */ createRESTModule(listPosts3);
1837
- var queryPosts4 = /* @__PURE__ */ createRESTModule(queryPosts3);
1838
- var getPostMetrics4 = /* @__PURE__ */ createRESTModule(getPostMetrics3);
1839
- var onPostCreated2 = createEventModule(onPostCreated);
1840
- var onPostDeleted2 = createEventModule(onPostDeleted);
1841
- var onPostLiked2 = createEventModule(onPostLiked);
1842
- var onPostUnliked2 = createEventModule(onPostUnliked);
1843
- var onPostUpdated2 = createEventModule(onPostUpdated);
1844
- export {
1845
- Alignment,
1846
- AppType,
1847
- BackgroundType,
1848
- Crop,
1849
- DecorationType,
1850
- Direction,
1851
- Field,
1852
- FontType,
1853
- GIFType,
1854
- GetPostTemplatesSort,
1855
- GetPostsSort,
1856
- InitialExpandedItems,
1857
- LayoutType,
1858
- LineStyle,
1859
- MapType,
1860
- ModerationStatusStatus,
1861
- NodeType,
1862
- NullValue,
1863
- Order,
1864
- Orientation,
1865
- Origin,
1866
- PluginContainerDataAlignment,
1867
- PollLayoutDirection,
1868
- PollLayoutType,
1869
- Position,
1870
- PostFieldField,
1871
- QueryPublicationsCountStatsRequestOrder,
1872
- SortOrder,
1873
- Source,
1874
- Status,
1875
- Target,
1876
- TextAlignment,
1877
- ThumbnailsAlignment,
1878
- Type,
1879
- VerticalAlignment,
1880
- ViewMode,
1881
- ViewRole,
1882
- VoteRole,
1883
- WebhookIdentityType,
1884
- Width,
1885
- WidthType,
1886
- getPost4 as getPost,
1887
- getPostBySlug4 as getPostBySlug,
1888
- getPostMetrics4 as getPostMetrics,
1889
- getTotalPosts4 as getTotalPosts,
1890
- listPosts4 as listPosts,
1891
- onPostCreated2 as onPostCreated,
1892
- onPostDeleted2 as onPostDeleted,
1893
- onPostLiked2 as onPostLiked,
1894
- onPostUnliked2 as onPostUnliked,
1895
- onPostUpdated2 as onPostUpdated,
1896
- queryPostCountStats4 as queryPostCountStats,
1897
- queryPosts4 as queryPosts
1898
- };
1899
- //# sourceMappingURL=index.mjs.map