@wix/auto_sdk_blog_posts 1.0.33 → 1.0.35

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