@wix/blog 1.0.216 → 1.0.218
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.
- package/build/cjs/index.js +5 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +5 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +5 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/src/blog-v3-category.http.js +54 -61
- package/build/cjs/src/blog-v3-category.http.js.map +1 -1
- package/build/cjs/src/blog-v3-category.meta.d.ts +1 -1
- package/build/cjs/src/blog-v3-category.meta.js +5 -1
- package/build/cjs/src/blog-v3-category.meta.js.map +1 -1
- package/build/cjs/src/blog-v3-category.public.d.ts +5 -5
- package/build/cjs/src/blog-v3-category.types.d.ts +41 -5
- package/build/cjs/src/blog-v3-category.types.js +4 -2
- package/build/cjs/src/blog-v3-category.types.js.map +1 -1
- package/build/cjs/src/blog-v3-category.universal.d.ts +16 -8
- package/build/cjs/src/blog-v3-category.universal.js +15 -7
- package/build/cjs/src/blog-v3-category.universal.js.map +1 -1
- package/build/cjs/src/blog-v3-draft.http.js +898 -578
- package/build/cjs/src/blog-v3-draft.http.js.map +1 -1
- package/build/cjs/src/blog-v3-draft.meta.d.ts +1 -1
- package/build/cjs/src/blog-v3-draft.meta.js +5 -1
- package/build/cjs/src/blog-v3-draft.meta.js.map +1 -1
- package/build/cjs/src/blog-v3-draft.public.d.ts +8 -8
- package/build/cjs/src/blog-v3-draft.types.d.ts +1 -3
- package/build/cjs/src/blog-v3-draft.types.js +38 -38
- package/build/cjs/src/blog-v3-draft.types.js.map +1 -1
- package/build/cjs/src/blog-v3-draft.universal.d.ts +1 -3
- package/build/cjs/src/blog-v3-draft.universal.js +43 -39
- package/build/cjs/src/blog-v3-draft.universal.js.map +1 -1
- package/build/cjs/src/blog-v3-post.http.js +283 -269
- package/build/cjs/src/blog-v3-post.http.js.map +1 -1
- package/build/cjs/src/blog-v3-post.meta.d.ts +1 -1
- package/build/cjs/src/blog-v3-post.meta.js +5 -1
- package/build/cjs/src/blog-v3-post.meta.js.map +1 -1
- package/build/cjs/src/blog-v3-post.public.d.ts +7 -7
- package/build/cjs/src/blog-v3-post.types.d.ts +11 -6
- package/build/cjs/src/blog-v3-post.types.js +39 -39
- package/build/cjs/src/blog-v3-post.types.js.map +1 -1
- package/build/cjs/src/blog-v3-post.universal.d.ts +11 -6
- package/build/cjs/src/blog-v3-post.universal.js +44 -40
- package/build/cjs/src/blog-v3-post.universal.js.map +1 -1
- package/build/cjs/src/blog-v3-tag.http.js +34 -41
- package/build/cjs/src/blog-v3-tag.http.js.map +1 -1
- package/build/cjs/src/blog-v3-tag.meta.d.ts +1 -1
- package/build/cjs/src/blog-v3-tag.meta.js +5 -1
- package/build/cjs/src/blog-v3-tag.meta.js.map +1 -1
- package/build/cjs/src/blog-v3-tag.public.d.ts +4 -4
- package/build/cjs/src/blog-v3-tag.types.d.ts +0 -2
- package/build/cjs/src/blog-v3-tag.types.js +2 -2
- package/build/cjs/src/blog-v3-tag.types.js.map +1 -1
- package/build/cjs/src/blog-v3-tag.universal.d.ts +3 -5
- package/build/cjs/src/blog-v3-tag.universal.js +7 -3
- package/build/cjs/src/blog-v3-tag.universal.js.map +1 -1
- package/build/es/src/blog-v3-category.http.js +54 -61
- package/build/es/src/blog-v3-category.http.js.map +1 -1
- package/build/es/src/blog-v3-category.meta.d.ts +1 -1
- package/build/es/src/blog-v3-category.public.d.ts +5 -5
- package/build/es/src/blog-v3-category.types.d.ts +41 -5
- package/build/es/src/blog-v3-category.types.js +2 -0
- package/build/es/src/blog-v3-category.types.js.map +1 -1
- package/build/es/src/blog-v3-category.universal.d.ts +16 -8
- package/build/es/src/blog-v3-category.universal.js +8 -4
- package/build/es/src/blog-v3-category.universal.js.map +1 -1
- package/build/es/src/blog-v3-draft.http.js +898 -578
- package/build/es/src/blog-v3-draft.http.js.map +1 -1
- package/build/es/src/blog-v3-draft.meta.d.ts +1 -1
- package/build/es/src/blog-v3-draft.public.d.ts +8 -8
- package/build/es/src/blog-v3-draft.types.d.ts +1 -3
- package/build/es/src/blog-v3-draft.types.js +1 -1
- package/build/es/src/blog-v3-draft.types.js.map +1 -1
- package/build/es/src/blog-v3-draft.universal.d.ts +1 -3
- package/build/es/src/blog-v3-draft.universal.js +1 -1
- package/build/es/src/blog-v3-draft.universal.js.map +1 -1
- package/build/es/src/blog-v3-post.http.js +283 -269
- package/build/es/src/blog-v3-post.http.js.map +1 -1
- package/build/es/src/blog-v3-post.meta.d.ts +1 -1
- package/build/es/src/blog-v3-post.public.d.ts +7 -7
- package/build/es/src/blog-v3-post.types.d.ts +11 -6
- package/build/es/src/blog-v3-post.types.js +1 -1
- package/build/es/src/blog-v3-post.types.js.map +1 -1
- package/build/es/src/blog-v3-post.universal.d.ts +11 -6
- package/build/es/src/blog-v3-post.universal.js +1 -1
- package/build/es/src/blog-v3-post.universal.js.map +1 -1
- package/build/es/src/blog-v3-tag.http.js +34 -41
- package/build/es/src/blog-v3-tag.http.js.map +1 -1
- package/build/es/src/blog-v3-tag.meta.d.ts +1 -1
- package/build/es/src/blog-v3-tag.public.d.ts +4 -4
- package/build/es/src/blog-v3-tag.types.d.ts +0 -2
- package/build/es/src/blog-v3-tag.types.js.map +1 -1
- package/build/es/src/blog-v3-tag.universal.d.ts +3 -5
- package/build/es/src/blog-v3-tag.universal.js.map +1 -1
- package/package.json +9 -5
|
@@ -2,93 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getTotalPosts = exports.queryPostCountStats = exports.getPostMetrics = exports.queryPosts = exports.listPosts = exports.getPostBySlug = exports.getPost = void 0;
|
|
4
4
|
const metro_runtime_1 = require("@wix/metro-runtime");
|
|
5
|
-
const
|
|
5
|
+
const float_1 = require("@wix/sdk-runtime/transformations/float");
|
|
6
|
+
const bytes_1 = require("@wix/sdk-runtime/transformations/bytes");
|
|
7
|
+
const timestamp_1 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
8
|
+
const timestamp_2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
9
|
+
const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
6
10
|
const metro_runtime_2 = require("@wix/metro-runtime");
|
|
7
|
-
const _appEmbedData = { image: '_v1Media' };
|
|
8
|
-
const _audioData = { audio: '_v1Media', coverImage: '_v1Media' };
|
|
9
|
-
const _background = { image: '_v1Media' };
|
|
10
|
-
const _commonImage = { urlExpirationDate: 'google.protobuf.Timestamp' };
|
|
11
|
-
const _commonVideo = { thumbnail: '_commonImage' };
|
|
12
|
-
const _coverMedia = { image: '_commonImage', video: '_commonVideo' };
|
|
13
|
-
const _design = { poll: '_pollDesign' };
|
|
14
|
-
const _galleryData = { items: '_item', options: '_galleryOptions' };
|
|
15
|
-
const _galleryOptions = { item: '_itemStyle' };
|
|
16
|
-
const _getPostBySlugRequest = {};
|
|
17
|
-
const _getPostBySlugResponse = { post: '_post' };
|
|
18
|
-
const _getPostMetricsRequest = {};
|
|
19
|
-
const _getPostMetricsResponse = { metrics: '_metrics' };
|
|
20
|
-
const _getPostRequest = {};
|
|
21
|
-
const _getPostResponse = { post: '_post' };
|
|
22
|
-
const _getTotalPostsRequest = {};
|
|
23
|
-
const _getTotalPostsResponse = {};
|
|
24
|
-
const _image = { media: '_v1Media' };
|
|
25
|
-
const _imageData = { image: '_v1Media' };
|
|
26
|
-
const _item = { image: '_image', video: '_video' };
|
|
27
|
-
const _itemStyle = { ratio: 'google.protobuf.DoubleValue' };
|
|
28
|
-
const _listPostsRequest = {};
|
|
29
|
-
const _listPostsResponse = { posts: '_post' };
|
|
30
|
-
const _mapData = { mapSettings: '_mapSettings' };
|
|
31
|
-
const _mapSettings = {
|
|
32
|
-
lat: 'google.protobuf.DoubleValue',
|
|
33
|
-
lng: 'google.protobuf.DoubleValue',
|
|
34
|
-
};
|
|
35
|
-
const _media = { wixMedia: '_wixMedia' };
|
|
36
|
-
const _metadata = {
|
|
37
|
-
createdTimestamp: 'google.protobuf.Timestamp',
|
|
38
|
-
updatedTimestamp: 'google.protobuf.Timestamp',
|
|
39
|
-
};
|
|
40
|
-
const _metrics = { averageRating: 'FLOAT' };
|
|
41
|
-
const _moderationDetails = {
|
|
42
|
-
submittedDate: 'google.protobuf.Timestamp',
|
|
43
|
-
moderationDate: 'google.protobuf.Timestamp',
|
|
44
|
-
};
|
|
45
|
-
const _node = {
|
|
46
|
-
galleryData: '_galleryData',
|
|
47
|
-
imageData: '_imageData',
|
|
48
|
-
mapData: '_mapData',
|
|
49
|
-
pollData: '_pollData',
|
|
50
|
-
appEmbedData: '_appEmbedData',
|
|
51
|
-
videoData: '_videoData',
|
|
52
|
-
audioData: '_audioData',
|
|
53
|
-
nodes: '_node',
|
|
54
|
-
};
|
|
55
|
-
const _option = { image: '_v1Media' };
|
|
56
|
-
const _periodPostCount = { periodStart: 'google.protobuf.Timestamp' };
|
|
57
|
-
const _poll = { image: '_v1Media', options: '_option' };
|
|
58
|
-
const _pollData = { poll: '_poll', design: '_design' };
|
|
59
|
-
const _pollDesign = { background: '_background' };
|
|
60
|
-
const _post = {
|
|
61
|
-
firstPublishedDate: 'google.protobuf.Timestamp',
|
|
62
|
-
lastPublishedDate: 'google.protobuf.Timestamp',
|
|
63
|
-
richContentCompressed: 'google.protobuf.BytesValue',
|
|
64
|
-
coverMedia: '_coverMedia',
|
|
65
|
-
heroImage: '_commonImage',
|
|
66
|
-
metrics: '_metrics',
|
|
67
|
-
richContent: '_richContent',
|
|
68
|
-
moderationDetails: '_moderationDetails',
|
|
69
|
-
media: '_media',
|
|
70
|
-
};
|
|
71
|
-
const _queryPostCountStatsRequest = {
|
|
72
|
-
rangeStart: 'google.protobuf.Timestamp',
|
|
73
|
-
rangeEnd: 'google.protobuf.Timestamp',
|
|
74
|
-
};
|
|
75
|
-
const _queryPostCountStatsResponse = { stats: '_periodPostCount' };
|
|
76
|
-
const _queryPostsRequest = {};
|
|
77
|
-
const _queryPostsResponse = { posts: '_post' };
|
|
78
|
-
const _richContent = { nodes: '_node', metadata: '_metadata' };
|
|
79
|
-
const _v1Media = { duration: 'google.protobuf.DoubleValue' };
|
|
80
|
-
const _video = { media: '_v1Media', thumbnail: '_v1Media' };
|
|
81
|
-
const _videoData = { video: '_v1Media', thumbnail: '_v1Media' };
|
|
82
|
-
const _videoResolution = {
|
|
83
|
-
urlExpirationDate: 'google.protobuf.Timestamp',
|
|
84
|
-
poster: '_commonImage',
|
|
85
|
-
};
|
|
86
|
-
const _videoV2 = {
|
|
87
|
-
urlExpirationDate: 'google.protobuf.Timestamp',
|
|
88
|
-
resolutions: '_videoResolution',
|
|
89
|
-
posters: '_commonImage',
|
|
90
|
-
};
|
|
91
|
-
const _wixMedia = { image: '_commonImage', videoV2: '_videoV2' };
|
|
92
11
|
function resolveComWixpressNpmCommunitiesPlatformizedBlogBlogStatsServiceUrl(opts) {
|
|
93
12
|
const domainToMappings = {
|
|
94
13
|
'api._api_base_domain_': [
|
|
@@ -495,58 +414,80 @@ function resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl(opts)
|
|
|
495
414
|
*
|
|
496
415
|
*/
|
|
497
416
|
function getPost(payload) {
|
|
498
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getPostRequest, {});
|
|
499
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getPostResponse, {
|
|
500
|
-
_appEmbedData,
|
|
501
|
-
_audioData,
|
|
502
|
-
_background,
|
|
503
|
-
_commonImage,
|
|
504
|
-
_commonVideo,
|
|
505
|
-
_coverMedia,
|
|
506
|
-
_design,
|
|
507
|
-
_galleryData,
|
|
508
|
-
_galleryOptions,
|
|
509
|
-
_image,
|
|
510
|
-
_imageData,
|
|
511
|
-
_item,
|
|
512
|
-
_itemStyle,
|
|
513
|
-
_mapData,
|
|
514
|
-
_mapSettings,
|
|
515
|
-
_media,
|
|
516
|
-
_metadata,
|
|
517
|
-
_metrics,
|
|
518
|
-
_moderationDetails,
|
|
519
|
-
_node,
|
|
520
|
-
_option,
|
|
521
|
-
_poll,
|
|
522
|
-
_pollData,
|
|
523
|
-
_pollDesign,
|
|
524
|
-
_post,
|
|
525
|
-
_richContent,
|
|
526
|
-
_v1Media,
|
|
527
|
-
_video,
|
|
528
|
-
_videoData,
|
|
529
|
-
_videoResolution,
|
|
530
|
-
_videoV2,
|
|
531
|
-
_wixMedia,
|
|
532
|
-
});
|
|
533
417
|
function __getPost({ host }) {
|
|
534
|
-
const serializedData = toReq(payload);
|
|
535
418
|
const metadata = {
|
|
536
419
|
entityFqdn: 'wix.blog.v3.post',
|
|
537
420
|
method: 'GET',
|
|
538
421
|
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost',
|
|
539
422
|
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
|
|
540
423
|
protoPath: '/v3/posts/{postId}',
|
|
541
|
-
data:
|
|
424
|
+
data: payload,
|
|
542
425
|
host,
|
|
543
426
|
}),
|
|
544
|
-
params: (0, metro_runtime_1.toURLSearchParams)(
|
|
545
|
-
transformResponse:
|
|
427
|
+
params: (0, metro_runtime_1.toURLSearchParams)(payload),
|
|
428
|
+
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
429
|
+
{
|
|
430
|
+
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
|
431
|
+
paths: [
|
|
432
|
+
{ path: 'post.firstPublishedDate' },
|
|
433
|
+
{ path: 'post.lastPublishedDate' },
|
|
434
|
+
{ path: 'post.coverMedia.image.urlExpirationDate' },
|
|
435
|
+
{ path: 'post.coverMedia.video.thumbnail.urlExpirationDate' },
|
|
436
|
+
{ path: 'post.heroImage.urlExpirationDate' },
|
|
437
|
+
{ path: 'post.richContent.metadata.createdTimestamp' },
|
|
438
|
+
{ path: 'post.richContent.metadata.updatedTimestamp' },
|
|
439
|
+
{ path: 'post.moderationDetails.submittedDate' },
|
|
440
|
+
{ path: 'post.moderationDetails.moderationDate' },
|
|
441
|
+
{ path: 'post.media.wixMedia.image.urlExpirationDate' },
|
|
442
|
+
{ path: 'post.media.wixMedia.videoV2.urlExpirationDate' },
|
|
443
|
+
{
|
|
444
|
+
path: 'post.media.wixMedia.videoV2.resolutions.urlExpirationDate',
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
path: 'post.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate',
|
|
448
|
+
},
|
|
449
|
+
{ path: 'post.media.wixMedia.videoV2.posters.urlExpirationDate' },
|
|
450
|
+
],
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
transformFn: bytes_1.transformRESTBytesToSDKBytes,
|
|
454
|
+
paths: [{ path: 'post.richContentCompressed' }],
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
transformFn: float_1.transformRESTFloatToSDKFloat,
|
|
458
|
+
paths: [
|
|
459
|
+
{ path: 'post.metrics.averageRating' },
|
|
460
|
+
{
|
|
461
|
+
path: 'post.richContent.nodes.galleryData.items.image.media.duration',
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
path: 'post.richContent.nodes.galleryData.items.video.media.duration',
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
path: 'post.richContent.nodes.galleryData.items.video.thumbnail.duration',
|
|
468
|
+
},
|
|
469
|
+
{ path: 'post.richContent.nodes.galleryData.options.item.ratio' },
|
|
470
|
+
{ path: 'post.richContent.nodes.imageData.image.duration' },
|
|
471
|
+
{ path: 'post.richContent.nodes.mapData.mapSettings.lat' },
|
|
472
|
+
{ path: 'post.richContent.nodes.mapData.mapSettings.lng' },
|
|
473
|
+
{ path: 'post.richContent.nodes.pollData.poll.image.duration' },
|
|
474
|
+
{
|
|
475
|
+
path: 'post.richContent.nodes.pollData.poll.options.image.duration',
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
path: 'post.richContent.nodes.pollData.design.poll.background.image.duration',
|
|
479
|
+
},
|
|
480
|
+
{ path: 'post.richContent.nodes.appEmbedData.image.duration' },
|
|
481
|
+
{ path: 'post.richContent.nodes.videoData.video.duration' },
|
|
482
|
+
{ path: 'post.richContent.nodes.videoData.thumbnail.duration' },
|
|
483
|
+
{ path: 'post.richContent.nodes.audioData.audio.duration' },
|
|
484
|
+
{ path: 'post.richContent.nodes.audioData.coverImage.duration' },
|
|
485
|
+
],
|
|
486
|
+
},
|
|
487
|
+
]),
|
|
546
488
|
};
|
|
547
489
|
return metadata;
|
|
548
490
|
}
|
|
549
|
-
__getPost.fromReq = fromReq;
|
|
550
491
|
return __getPost;
|
|
551
492
|
}
|
|
552
493
|
exports.getPost = getPost;
|
|
@@ -559,58 +500,80 @@ exports.getPost = getPost;
|
|
|
559
500
|
* The `slug` is the end of a post's URL that refers to a specific post. For example, if a post's URL is `https:/example.com/blog/post/my-post-slug`, the slug is `my-post-slug`. The slug is case-sensitive, and is generally derived from the post title, unless specified otherwise.
|
|
560
501
|
*/
|
|
561
502
|
function getPostBySlug(payload) {
|
|
562
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getPostBySlugRequest, {});
|
|
563
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getPostBySlugResponse, {
|
|
564
|
-
_appEmbedData,
|
|
565
|
-
_audioData,
|
|
566
|
-
_background,
|
|
567
|
-
_commonImage,
|
|
568
|
-
_commonVideo,
|
|
569
|
-
_coverMedia,
|
|
570
|
-
_design,
|
|
571
|
-
_galleryData,
|
|
572
|
-
_galleryOptions,
|
|
573
|
-
_image,
|
|
574
|
-
_imageData,
|
|
575
|
-
_item,
|
|
576
|
-
_itemStyle,
|
|
577
|
-
_mapData,
|
|
578
|
-
_mapSettings,
|
|
579
|
-
_media,
|
|
580
|
-
_metadata,
|
|
581
|
-
_metrics,
|
|
582
|
-
_moderationDetails,
|
|
583
|
-
_node,
|
|
584
|
-
_option,
|
|
585
|
-
_poll,
|
|
586
|
-
_pollData,
|
|
587
|
-
_pollDesign,
|
|
588
|
-
_post,
|
|
589
|
-
_richContent,
|
|
590
|
-
_v1Media,
|
|
591
|
-
_video,
|
|
592
|
-
_videoData,
|
|
593
|
-
_videoResolution,
|
|
594
|
-
_videoV2,
|
|
595
|
-
_wixMedia,
|
|
596
|
-
});
|
|
597
503
|
function __getPostBySlug({ host }) {
|
|
598
|
-
const serializedData = toReq(payload);
|
|
599
504
|
const metadata = {
|
|
600
505
|
entityFqdn: 'wix.blog.v3.post',
|
|
601
506
|
method: 'GET',
|
|
602
507
|
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug',
|
|
603
508
|
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
|
|
604
509
|
protoPath: '/v3/posts/slugs/{slug}',
|
|
605
|
-
data:
|
|
510
|
+
data: payload,
|
|
606
511
|
host,
|
|
607
512
|
}),
|
|
608
|
-
params: (0, metro_runtime_1.toURLSearchParams)(
|
|
609
|
-
transformResponse:
|
|
513
|
+
params: (0, metro_runtime_1.toURLSearchParams)(payload),
|
|
514
|
+
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
515
|
+
{
|
|
516
|
+
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
|
517
|
+
paths: [
|
|
518
|
+
{ path: 'post.firstPublishedDate' },
|
|
519
|
+
{ path: 'post.lastPublishedDate' },
|
|
520
|
+
{ path: 'post.coverMedia.image.urlExpirationDate' },
|
|
521
|
+
{ path: 'post.coverMedia.video.thumbnail.urlExpirationDate' },
|
|
522
|
+
{ path: 'post.heroImage.urlExpirationDate' },
|
|
523
|
+
{ path: 'post.richContent.metadata.createdTimestamp' },
|
|
524
|
+
{ path: 'post.richContent.metadata.updatedTimestamp' },
|
|
525
|
+
{ path: 'post.moderationDetails.submittedDate' },
|
|
526
|
+
{ path: 'post.moderationDetails.moderationDate' },
|
|
527
|
+
{ path: 'post.media.wixMedia.image.urlExpirationDate' },
|
|
528
|
+
{ path: 'post.media.wixMedia.videoV2.urlExpirationDate' },
|
|
529
|
+
{
|
|
530
|
+
path: 'post.media.wixMedia.videoV2.resolutions.urlExpirationDate',
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
path: 'post.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate',
|
|
534
|
+
},
|
|
535
|
+
{ path: 'post.media.wixMedia.videoV2.posters.urlExpirationDate' },
|
|
536
|
+
],
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
transformFn: bytes_1.transformRESTBytesToSDKBytes,
|
|
540
|
+
paths: [{ path: 'post.richContentCompressed' }],
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
transformFn: float_1.transformRESTFloatToSDKFloat,
|
|
544
|
+
paths: [
|
|
545
|
+
{ path: 'post.metrics.averageRating' },
|
|
546
|
+
{
|
|
547
|
+
path: 'post.richContent.nodes.galleryData.items.image.media.duration',
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
path: 'post.richContent.nodes.galleryData.items.video.media.duration',
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
path: 'post.richContent.nodes.galleryData.items.video.thumbnail.duration',
|
|
554
|
+
},
|
|
555
|
+
{ path: 'post.richContent.nodes.galleryData.options.item.ratio' },
|
|
556
|
+
{ path: 'post.richContent.nodes.imageData.image.duration' },
|
|
557
|
+
{ path: 'post.richContent.nodes.mapData.mapSettings.lat' },
|
|
558
|
+
{ path: 'post.richContent.nodes.mapData.mapSettings.lng' },
|
|
559
|
+
{ path: 'post.richContent.nodes.pollData.poll.image.duration' },
|
|
560
|
+
{
|
|
561
|
+
path: 'post.richContent.nodes.pollData.poll.options.image.duration',
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
path: 'post.richContent.nodes.pollData.design.poll.background.image.duration',
|
|
565
|
+
},
|
|
566
|
+
{ path: 'post.richContent.nodes.appEmbedData.image.duration' },
|
|
567
|
+
{ path: 'post.richContent.nodes.videoData.video.duration' },
|
|
568
|
+
{ path: 'post.richContent.nodes.videoData.thumbnail.duration' },
|
|
569
|
+
{ path: 'post.richContent.nodes.audioData.audio.duration' },
|
|
570
|
+
{ path: 'post.richContent.nodes.audioData.coverImage.duration' },
|
|
571
|
+
],
|
|
572
|
+
},
|
|
573
|
+
]),
|
|
610
574
|
};
|
|
611
575
|
return metadata;
|
|
612
576
|
}
|
|
613
|
-
__getPostBySlug.fromReq = fromReq;
|
|
614
577
|
return __getPostBySlug;
|
|
615
578
|
}
|
|
616
579
|
exports.getPostBySlug = getPostBySlug;
|
|
@@ -625,58 +588,84 @@ exports.getPostBySlug = getPostBySlug;
|
|
|
625
588
|
* By default, the list is sorted by `firstPublishedDate` in descending order, and the amount of posts returned is 50.
|
|
626
589
|
*/
|
|
627
590
|
function listPosts(payload) {
|
|
628
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_listPostsRequest, {});
|
|
629
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_listPostsResponse, {
|
|
630
|
-
_appEmbedData,
|
|
631
|
-
_audioData,
|
|
632
|
-
_background,
|
|
633
|
-
_commonImage,
|
|
634
|
-
_commonVideo,
|
|
635
|
-
_coverMedia,
|
|
636
|
-
_design,
|
|
637
|
-
_galleryData,
|
|
638
|
-
_galleryOptions,
|
|
639
|
-
_image,
|
|
640
|
-
_imageData,
|
|
641
|
-
_item,
|
|
642
|
-
_itemStyle,
|
|
643
|
-
_mapData,
|
|
644
|
-
_mapSettings,
|
|
645
|
-
_media,
|
|
646
|
-
_metadata,
|
|
647
|
-
_metrics,
|
|
648
|
-
_moderationDetails,
|
|
649
|
-
_node,
|
|
650
|
-
_option,
|
|
651
|
-
_poll,
|
|
652
|
-
_pollData,
|
|
653
|
-
_pollDesign,
|
|
654
|
-
_post,
|
|
655
|
-
_richContent,
|
|
656
|
-
_v1Media,
|
|
657
|
-
_video,
|
|
658
|
-
_videoData,
|
|
659
|
-
_videoResolution,
|
|
660
|
-
_videoV2,
|
|
661
|
-
_wixMedia,
|
|
662
|
-
});
|
|
663
591
|
function __listPosts({ host }) {
|
|
664
|
-
const serializedData = toReq(payload);
|
|
665
592
|
const metadata = {
|
|
666
593
|
entityFqdn: 'wix.blog.v3.post',
|
|
667
594
|
method: 'GET',
|
|
668
595
|
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts',
|
|
669
596
|
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
|
|
670
597
|
protoPath: '/v3/posts',
|
|
671
|
-
data:
|
|
598
|
+
data: payload,
|
|
672
599
|
host,
|
|
673
600
|
}),
|
|
674
|
-
params: (0, metro_runtime_1.toURLSearchParams)(
|
|
675
|
-
transformResponse:
|
|
601
|
+
params: (0, metro_runtime_1.toURLSearchParams)(payload),
|
|
602
|
+
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
603
|
+
{
|
|
604
|
+
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
|
605
|
+
paths: [
|
|
606
|
+
{ path: 'posts.firstPublishedDate' },
|
|
607
|
+
{ path: 'posts.lastPublishedDate' },
|
|
608
|
+
{ path: 'posts.coverMedia.image.urlExpirationDate' },
|
|
609
|
+
{ path: 'posts.coverMedia.video.thumbnail.urlExpirationDate' },
|
|
610
|
+
{ path: 'posts.heroImage.urlExpirationDate' },
|
|
611
|
+
{ path: 'posts.richContent.metadata.createdTimestamp' },
|
|
612
|
+
{ path: 'posts.richContent.metadata.updatedTimestamp' },
|
|
613
|
+
{ path: 'posts.moderationDetails.submittedDate' },
|
|
614
|
+
{ path: 'posts.moderationDetails.moderationDate' },
|
|
615
|
+
{ path: 'posts.media.wixMedia.image.urlExpirationDate' },
|
|
616
|
+
{ path: 'posts.media.wixMedia.videoV2.urlExpirationDate' },
|
|
617
|
+
{
|
|
618
|
+
path: 'posts.media.wixMedia.videoV2.resolutions.urlExpirationDate',
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
path: 'posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate',
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
path: 'posts.media.wixMedia.videoV2.posters.urlExpirationDate',
|
|
625
|
+
},
|
|
626
|
+
],
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
transformFn: bytes_1.transformRESTBytesToSDKBytes,
|
|
630
|
+
paths: [{ path: 'posts.richContentCompressed' }],
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
transformFn: float_1.transformRESTFloatToSDKFloat,
|
|
634
|
+
paths: [
|
|
635
|
+
{ path: 'posts.metrics.averageRating' },
|
|
636
|
+
{
|
|
637
|
+
path: 'posts.richContent.nodes.galleryData.items.image.media.duration',
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
path: 'posts.richContent.nodes.galleryData.items.video.media.duration',
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
path: 'posts.richContent.nodes.galleryData.items.video.thumbnail.duration',
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
path: 'posts.richContent.nodes.galleryData.options.item.ratio',
|
|
647
|
+
},
|
|
648
|
+
{ path: 'posts.richContent.nodes.imageData.image.duration' },
|
|
649
|
+
{ path: 'posts.richContent.nodes.mapData.mapSettings.lat' },
|
|
650
|
+
{ path: 'posts.richContent.nodes.mapData.mapSettings.lng' },
|
|
651
|
+
{ path: 'posts.richContent.nodes.pollData.poll.image.duration' },
|
|
652
|
+
{
|
|
653
|
+
path: 'posts.richContent.nodes.pollData.poll.options.image.duration',
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
path: 'posts.richContent.nodes.pollData.design.poll.background.image.duration',
|
|
657
|
+
},
|
|
658
|
+
{ path: 'posts.richContent.nodes.appEmbedData.image.duration' },
|
|
659
|
+
{ path: 'posts.richContent.nodes.videoData.video.duration' },
|
|
660
|
+
{ path: 'posts.richContent.nodes.videoData.thumbnail.duration' },
|
|
661
|
+
{ path: 'posts.richContent.nodes.audioData.audio.duration' },
|
|
662
|
+
{ path: 'posts.richContent.nodes.audioData.coverImage.duration' },
|
|
663
|
+
],
|
|
664
|
+
},
|
|
665
|
+
]),
|
|
676
666
|
};
|
|
677
667
|
return metadata;
|
|
678
668
|
}
|
|
679
|
-
__listPosts.fromReq = fromReq;
|
|
680
669
|
return __listPosts;
|
|
681
670
|
}
|
|
682
671
|
exports.listPosts = listPosts;
|
|
@@ -701,58 +690,84 @@ exports.listPosts = listPosts;
|
|
|
701
690
|
* The following `PostsQueryBuilder` functions are supported for the `queryPosts()` function. For a full description of the Posts object, see the object returned for the [`items`](https://www.wix.com/velo/reference/wix-blog-backend/posts/postsqueryresult/items) property in [`PostsQueryResult`](https://www.wix.com/velo/reference/wix-blog-backend/posts/postsqueryresult).
|
|
702
691
|
*/
|
|
703
692
|
function queryPosts(payload) {
|
|
704
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryPostsRequest, {});
|
|
705
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_queryPostsResponse, {
|
|
706
|
-
_appEmbedData,
|
|
707
|
-
_audioData,
|
|
708
|
-
_background,
|
|
709
|
-
_commonImage,
|
|
710
|
-
_commonVideo,
|
|
711
|
-
_coverMedia,
|
|
712
|
-
_design,
|
|
713
|
-
_galleryData,
|
|
714
|
-
_galleryOptions,
|
|
715
|
-
_image,
|
|
716
|
-
_imageData,
|
|
717
|
-
_item,
|
|
718
|
-
_itemStyle,
|
|
719
|
-
_mapData,
|
|
720
|
-
_mapSettings,
|
|
721
|
-
_media,
|
|
722
|
-
_metadata,
|
|
723
|
-
_metrics,
|
|
724
|
-
_moderationDetails,
|
|
725
|
-
_node,
|
|
726
|
-
_option,
|
|
727
|
-
_poll,
|
|
728
|
-
_pollData,
|
|
729
|
-
_pollDesign,
|
|
730
|
-
_post,
|
|
731
|
-
_richContent,
|
|
732
|
-
_v1Media,
|
|
733
|
-
_video,
|
|
734
|
-
_videoData,
|
|
735
|
-
_videoResolution,
|
|
736
|
-
_videoV2,
|
|
737
|
-
_wixMedia,
|
|
738
|
-
});
|
|
739
693
|
function __queryPosts({ host }) {
|
|
740
|
-
const serializedData = toReq(payload);
|
|
741
694
|
const metadata = {
|
|
742
695
|
entityFqdn: 'wix.blog.v3.post',
|
|
743
696
|
method: 'POST',
|
|
744
697
|
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts',
|
|
745
698
|
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
|
|
746
699
|
protoPath: '/v3/posts/query',
|
|
747
|
-
data:
|
|
700
|
+
data: payload,
|
|
748
701
|
host,
|
|
749
702
|
}),
|
|
750
|
-
data:
|
|
751
|
-
transformResponse:
|
|
703
|
+
data: payload,
|
|
704
|
+
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
705
|
+
{
|
|
706
|
+
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
|
707
|
+
paths: [
|
|
708
|
+
{ path: 'posts.firstPublishedDate' },
|
|
709
|
+
{ path: 'posts.lastPublishedDate' },
|
|
710
|
+
{ path: 'posts.coverMedia.image.urlExpirationDate' },
|
|
711
|
+
{ path: 'posts.coverMedia.video.thumbnail.urlExpirationDate' },
|
|
712
|
+
{ path: 'posts.heroImage.urlExpirationDate' },
|
|
713
|
+
{ path: 'posts.richContent.metadata.createdTimestamp' },
|
|
714
|
+
{ path: 'posts.richContent.metadata.updatedTimestamp' },
|
|
715
|
+
{ path: 'posts.moderationDetails.submittedDate' },
|
|
716
|
+
{ path: 'posts.moderationDetails.moderationDate' },
|
|
717
|
+
{ path: 'posts.media.wixMedia.image.urlExpirationDate' },
|
|
718
|
+
{ path: 'posts.media.wixMedia.videoV2.urlExpirationDate' },
|
|
719
|
+
{
|
|
720
|
+
path: 'posts.media.wixMedia.videoV2.resolutions.urlExpirationDate',
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
path: 'posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate',
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
path: 'posts.media.wixMedia.videoV2.posters.urlExpirationDate',
|
|
727
|
+
},
|
|
728
|
+
],
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
transformFn: bytes_1.transformRESTBytesToSDKBytes,
|
|
732
|
+
paths: [{ path: 'posts.richContentCompressed' }],
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
transformFn: float_1.transformRESTFloatToSDKFloat,
|
|
736
|
+
paths: [
|
|
737
|
+
{ path: 'posts.metrics.averageRating' },
|
|
738
|
+
{
|
|
739
|
+
path: 'posts.richContent.nodes.galleryData.items.image.media.duration',
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
path: 'posts.richContent.nodes.galleryData.items.video.media.duration',
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
path: 'posts.richContent.nodes.galleryData.items.video.thumbnail.duration',
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
path: 'posts.richContent.nodes.galleryData.options.item.ratio',
|
|
749
|
+
},
|
|
750
|
+
{ path: 'posts.richContent.nodes.imageData.image.duration' },
|
|
751
|
+
{ path: 'posts.richContent.nodes.mapData.mapSettings.lat' },
|
|
752
|
+
{ path: 'posts.richContent.nodes.mapData.mapSettings.lng' },
|
|
753
|
+
{ path: 'posts.richContent.nodes.pollData.poll.image.duration' },
|
|
754
|
+
{
|
|
755
|
+
path: 'posts.richContent.nodes.pollData.poll.options.image.duration',
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
path: 'posts.richContent.nodes.pollData.design.poll.background.image.duration',
|
|
759
|
+
},
|
|
760
|
+
{ path: 'posts.richContent.nodes.appEmbedData.image.duration' },
|
|
761
|
+
{ path: 'posts.richContent.nodes.videoData.video.duration' },
|
|
762
|
+
{ path: 'posts.richContent.nodes.videoData.thumbnail.duration' },
|
|
763
|
+
{ path: 'posts.richContent.nodes.audioData.audio.duration' },
|
|
764
|
+
{ path: 'posts.richContent.nodes.audioData.coverImage.duration' },
|
|
765
|
+
],
|
|
766
|
+
},
|
|
767
|
+
]),
|
|
752
768
|
};
|
|
753
769
|
return metadata;
|
|
754
770
|
}
|
|
755
|
-
__queryPosts.fromReq = fromReq;
|
|
756
771
|
return __queryPosts;
|
|
757
772
|
}
|
|
758
773
|
exports.queryPosts = queryPosts;
|
|
@@ -765,27 +780,26 @@ exports.queryPosts = queryPosts;
|
|
|
765
780
|
* A post's metrics include the comments, likes, and views the post receives.
|
|
766
781
|
*/
|
|
767
782
|
function getPostMetrics(payload) {
|
|
768
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getPostMetricsRequest, {});
|
|
769
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getPostMetricsResponse, {
|
|
770
|
-
_metrics,
|
|
771
|
-
});
|
|
772
783
|
function __getPostMetrics({ host }) {
|
|
773
|
-
const serializedData = toReq(payload);
|
|
774
784
|
const metadata = {
|
|
775
785
|
entityFqdn: 'wix.blog.v3.post',
|
|
776
786
|
method: 'GET',
|
|
777
787
|
methodFqn: 'com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics',
|
|
778
788
|
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl({
|
|
779
789
|
protoPath: '/v3/posts/{postId}/metrics',
|
|
780
|
-
data:
|
|
790
|
+
data: payload,
|
|
781
791
|
host,
|
|
782
792
|
}),
|
|
783
|
-
params: (0, metro_runtime_1.toURLSearchParams)(
|
|
784
|
-
transformResponse:
|
|
793
|
+
params: (0, metro_runtime_1.toURLSearchParams)(payload),
|
|
794
|
+
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
795
|
+
{
|
|
796
|
+
transformFn: float_1.transformRESTFloatToSDKFloat,
|
|
797
|
+
paths: [{ path: 'metrics.averageRating' }],
|
|
798
|
+
},
|
|
799
|
+
]),
|
|
785
800
|
};
|
|
786
801
|
return metadata;
|
|
787
802
|
}
|
|
788
|
-
__getPostMetrics.fromReq = fromReq;
|
|
789
803
|
return __getPostMetrics;
|
|
790
804
|
}
|
|
791
805
|
exports.getPostMetrics = getPostMetrics;
|
|
@@ -800,12 +814,13 @@ exports.getPostMetrics = getPostMetrics;
|
|
|
800
814
|
* >**Note:** If there are no published posts in a specific month, that month is not included in the response. For example, let's say a blog has `0` posts dated in February 2022. If `rangeStart` is set to `'2022-01-01'` and `months` is set to `3`, the response includes `postCount` values for January and March, but not February.
|
|
801
815
|
*/
|
|
802
816
|
function queryPostCountStats(payload) {
|
|
803
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryPostCountStatsRequest, {});
|
|
804
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_queryPostCountStatsResponse, {
|
|
805
|
-
_periodPostCount,
|
|
806
|
-
});
|
|
807
817
|
function __queryPostCountStats({ host }) {
|
|
808
|
-
const serializedData =
|
|
818
|
+
const serializedData = (0, transform_paths_1.transformPaths)(payload, [
|
|
819
|
+
{
|
|
820
|
+
transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
|
|
821
|
+
paths: [{ path: 'rangeStart' }, { path: 'rangeEnd' }],
|
|
822
|
+
},
|
|
823
|
+
]);
|
|
809
824
|
const metadata = {
|
|
810
825
|
entityFqdn: 'wix.blog.v3.post',
|
|
811
826
|
method: 'GET',
|
|
@@ -816,11 +831,15 @@ function queryPostCountStats(payload) {
|
|
|
816
831
|
host,
|
|
817
832
|
}),
|
|
818
833
|
params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
|
|
819
|
-
transformResponse:
|
|
834
|
+
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
835
|
+
{
|
|
836
|
+
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
|
837
|
+
paths: [{ path: 'stats.periodStart' }],
|
|
838
|
+
},
|
|
839
|
+
]),
|
|
820
840
|
};
|
|
821
841
|
return metadata;
|
|
822
842
|
}
|
|
823
|
-
__queryPostCountStats.fromReq = fromReq;
|
|
824
843
|
return __queryPostCountStats;
|
|
825
844
|
}
|
|
826
845
|
exports.queryPostCountStats = queryPostCountStats;
|
|
@@ -834,25 +853,20 @@ exports.queryPostCountStats = queryPostCountStats;
|
|
|
834
853
|
* You can use the `language` option to filter posts for a specified language.
|
|
835
854
|
*/
|
|
836
855
|
function getTotalPosts(payload) {
|
|
837
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getTotalPostsRequest, {});
|
|
838
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getTotalPostsResponse, {});
|
|
839
856
|
function __getTotalPosts({ host }) {
|
|
840
|
-
const serializedData = toReq(payload);
|
|
841
857
|
const metadata = {
|
|
842
858
|
entityFqdn: 'wix.blog.v3.post',
|
|
843
859
|
method: 'GET',
|
|
844
860
|
methodFqn: 'com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts',
|
|
845
861
|
url: resolveComWixpressNpmCommunitiesPlatformizedBlogBlogStatsServiceUrl({
|
|
846
862
|
protoPath: '/v2/stats/posts/total',
|
|
847
|
-
data:
|
|
863
|
+
data: payload,
|
|
848
864
|
host,
|
|
849
865
|
}),
|
|
850
|
-
params: (0, metro_runtime_1.toURLSearchParams)(
|
|
851
|
-
transformResponse: fromRes,
|
|
866
|
+
params: (0, metro_runtime_1.toURLSearchParams)(payload),
|
|
852
867
|
};
|
|
853
868
|
return metadata;
|
|
854
869
|
}
|
|
855
|
-
__getTotalPosts.fromReq = fromReq;
|
|
856
870
|
return __getTotalPosts;
|
|
857
871
|
}
|
|
858
872
|
exports.getTotalPosts = getTotalPosts;
|