@wix/auto_sdk_blog_posts 1.0.9 → 1.0.10
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/src/blog-v3-post-posts.http.d.ts +19 -38
- package/build/cjs/src/blog-v3-post-posts.http.js +19 -38
- package/build/cjs/src/blog-v3-post-posts.http.js.map +1 -1
- package/build/cjs/src/blog-v3-post-posts.public.d.ts +21 -43
- package/build/cjs/src/blog-v3-post-posts.public.js.map +1 -1
- package/build/cjs/src/blog-v3-post-posts.universal.d.ts +107 -135
- package/build/cjs/src/blog-v3-post-posts.universal.js +21 -43
- package/build/cjs/src/blog-v3-post-posts.universal.js.map +1 -1
- package/build/es/src/blog-v3-post-posts.http.d.ts +19 -38
- package/build/es/src/blog-v3-post-posts.http.js +19 -38
- package/build/es/src/blog-v3-post-posts.http.js.map +1 -1
- package/build/es/src/blog-v3-post-posts.public.d.ts +21 -43
- package/build/es/src/blog-v3-post-posts.public.js.map +1 -1
- package/build/es/src/blog-v3-post-posts.universal.d.ts +107 -135
- package/build/es/src/blog-v3-post-posts.universal.js +21 -43
- package/build/es/src/blog-v3-post-posts.universal.js.map +1 -1
- package/build/internal/cjs/src/blog-v3-post-posts.http.d.ts +19 -38
- package/build/internal/cjs/src/blog-v3-post-posts.http.js +19 -38
- package/build/internal/cjs/src/blog-v3-post-posts.http.js.map +1 -1
- package/build/internal/cjs/src/blog-v3-post-posts.public.d.ts +21 -43
- package/build/internal/cjs/src/blog-v3-post-posts.public.js.map +1 -1
- package/build/internal/cjs/src/blog-v3-post-posts.universal.d.ts +107 -135
- package/build/internal/cjs/src/blog-v3-post-posts.universal.js +21 -43
- package/build/internal/cjs/src/blog-v3-post-posts.universal.js.map +1 -1
- package/build/internal/es/src/blog-v3-post-posts.http.d.ts +19 -38
- package/build/internal/es/src/blog-v3-post-posts.http.js +19 -38
- package/build/internal/es/src/blog-v3-post-posts.http.js.map +1 -1
- package/build/internal/es/src/blog-v3-post-posts.public.d.ts +21 -43
- package/build/internal/es/src/blog-v3-post-posts.public.js.map +1 -1
- package/build/internal/es/src/blog-v3-post-posts.universal.d.ts +107 -135
- package/build/internal/es/src/blog-v3-post-posts.universal.js +21 -43
- package/build/internal/es/src/blog-v3-post-posts.universal.js.map +1 -1
- package/package.json +2 -2
@@ -34,11 +34,7 @@ export interface Post {
|
|
34
34
|
/** Post URL. */
|
35
35
|
url?: string;
|
36
36
|
/**
|
37
|
-
*
|
38
|
-
*
|
39
|
-
*
|
40
|
-
* For example, `'https:/example.com/posts/my-post-slug'`.
|
41
|
-
*
|
37
|
+
* Post slug. For example, `'post-slug'`.
|
42
38
|
* @maxLength 100
|
43
39
|
*/
|
44
40
|
slug?: string;
|
@@ -47,22 +43,23 @@ export interface Post {
|
|
47
43
|
/** Whether the post is pinned. If `true`, the post is placed at the top of the post list. */
|
48
44
|
pinned?: boolean;
|
49
45
|
/**
|
50
|
-
* [Category IDs](https://
|
51
|
-
*
|
46
|
+
* [Category IDs](https://dev.wix.com/docs/rest/business-solutions/blog/category/introduction) of the post.
|
52
47
|
* @maxSize 10
|
53
48
|
* @format GUID
|
54
49
|
*/
|
55
50
|
categoryIds?: string[];
|
56
51
|
/**
|
57
|
-
*
|
52
|
+
* __Deprecated.__ Use `media` instead.
|
53
|
+
* This property will be removed on June 30, 2023.
|
54
|
+
*
|
55
|
+
* Post cover media.
|
58
56
|
* @deprecated
|
59
57
|
* @replacedBy media
|
60
58
|
* @targetRemovalDate 2024-06-30
|
61
59
|
*/
|
62
60
|
coverMedia?: CoverMedia;
|
63
61
|
/**
|
64
|
-
* Post owner's [member ID](https://
|
65
|
-
*
|
62
|
+
* Post owner's [member ID](https://dev.wix.com/api/rest/members).
|
66
63
|
* @format GUID
|
67
64
|
*/
|
68
65
|
memberId?: string;
|
@@ -75,13 +72,12 @@ export interface Post {
|
|
75
72
|
hashtags?: string[];
|
76
73
|
/** Whether commenting on the post is enabled. */
|
77
74
|
commentingEnabled?: boolean;
|
78
|
-
/** Estimated reading time. */
|
75
|
+
/** Estimated reading time (calculated automatically). */
|
79
76
|
minutesToRead?: number;
|
80
|
-
/** Image placed at the top of the blog page.
|
77
|
+
/** Image placed at the top of the blog page. */
|
81
78
|
heroImage?: string;
|
82
79
|
/**
|
83
|
-
* IDs of [tags](https://
|
84
|
-
*
|
80
|
+
* IDs of [tags](https://dev.wix.com/docs/rest/business-solutions/blog/tags) the post is tagged with.
|
85
81
|
* @readonly
|
86
82
|
* @maxSize 30
|
87
83
|
* @format GUID
|
@@ -95,17 +91,14 @@ export interface Post {
|
|
95
91
|
*/
|
96
92
|
relatedPostIds?: string[];
|
97
93
|
/**
|
98
|
-
* Pricing plan IDs.
|
99
|
-
*
|
100
|
-
*
|
101
|
-
* If a post is assigned to a specific pricing plan.
|
94
|
+
* [Pricing plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans). Only relevant if a post is assigned to a specific pricing plan.
|
102
95
|
* @readonly
|
103
96
|
* @maxSize 100
|
104
97
|
* @format GUID
|
105
98
|
*/
|
106
99
|
pricingPlanIds?: string[];
|
107
100
|
/**
|
108
|
-
* ID of the
|
101
|
+
* ID of the translations of this post. All translations of a single post share the same `translationId`.
|
109
102
|
* @format GUID
|
110
103
|
*/
|
111
104
|
translationId?: string | null;
|
@@ -125,8 +118,7 @@ export interface Post {
|
|
125
118
|
*/
|
126
119
|
content?: string | null;
|
127
120
|
/**
|
128
|
-
* Post owner's [contact ID](https://
|
129
|
-
*
|
121
|
+
* Post owner's [contact ID](https://dev.wix.com/api/rest/contacts).
|
130
122
|
* @format GUID
|
131
123
|
*/
|
132
124
|
contactId?: string | null;
|
@@ -157,10 +149,7 @@ export interface Post {
|
|
157
149
|
*/
|
158
150
|
mostRecentContributorId?: string | null;
|
159
151
|
/**
|
160
|
-
* Post moderation details.
|
161
|
-
*
|
162
|
-
*
|
163
|
-
* Only relevant to posts submitted by [guest writers](https://support.wix.com/en/article/wix-blog-moderating-blog-posts-from-your-guest-writers). Guest writers have the ability to write posts but not publish them. These posts can be rejected or approved for publishing by a blog editor or site owner.
|
152
|
+
* Post moderation details. Only relevant to posts submitted by [guest writers](https://support.wix.com/en/article/wix-blog-moderating-blog-posts-from-your-guest-writers).
|
164
153
|
* @readonly
|
165
154
|
*/
|
166
155
|
moderationDetails?: ModerationDetails;
|
@@ -201,11 +190,7 @@ export interface CoverMedia extends CoverMediaMediaOneOf {
|
|
201
190
|
enabled?: boolean;
|
202
191
|
/** Whether cover media is displayed. */
|
203
192
|
displayed?: boolean;
|
204
|
-
/**
|
205
|
-
* Whether the cover media is custom.
|
206
|
-
*
|
207
|
-
* `false` if the cover media is the first image or video in the post. `true` if set to some other image or video.
|
208
|
-
*/
|
193
|
+
/** Whether cover media is custom. If `false` the cover image is set to the first media item that appears in the content. */
|
209
194
|
custom?: boolean;
|
210
195
|
/**
|
211
196
|
* Media alternative text.
|
@@ -1680,11 +1665,11 @@ export interface TextNodeStyle {
|
|
1680
1665
|
}
|
1681
1666
|
export interface ModerationDetails {
|
1682
1667
|
/**
|
1683
|
-
* Member ID of the person
|
1668
|
+
* Member ID of the person submitting the draft post for review.
|
1684
1669
|
* @format GUID
|
1685
1670
|
*/
|
1686
1671
|
submittedBy?: string;
|
1687
|
-
/** Date
|
1672
|
+
/** Date the post was submitted for review. */
|
1688
1673
|
submittedDate?: Date | null;
|
1689
1674
|
/** Status indicating whether the submission was approved or rejected by the moderator. */
|
1690
1675
|
status?: ModerationStatusStatus;
|
@@ -1693,7 +1678,7 @@ export interface ModerationDetails {
|
|
1693
1678
|
* @format GUID
|
1694
1679
|
*/
|
1695
1680
|
moderatedBy?: string | null;
|
1696
|
-
/** Date
|
1681
|
+
/** Date the post was approved or rejected. */
|
1697
1682
|
moderationDate?: Date | null;
|
1698
1683
|
}
|
1699
1684
|
export declare enum ModerationStatusStatus {
|
@@ -1708,11 +1693,7 @@ export interface Media extends MediaMediaOneOf {
|
|
1708
1693
|
embedMedia?: EmbedMedia;
|
1709
1694
|
/** Whether cover media is displayed. */
|
1710
1695
|
displayed?: boolean;
|
1711
|
-
/**
|
1712
|
-
* Whether the cover media is custom.
|
1713
|
-
*
|
1714
|
-
* `false` if the cover media is the first image or video in the post. `true` if set to some other image or video.
|
1715
|
-
*/
|
1696
|
+
/** Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media. */
|
1716
1697
|
custom?: boolean;
|
1717
1698
|
/**
|
1718
1699
|
* Media alternative text.
|
@@ -1897,8 +1878,8 @@ export interface QueryPostCountStatsRequest {
|
|
1897
1878
|
/**
|
1898
1879
|
* Language filter.
|
1899
1880
|
*
|
1900
|
-
*
|
1901
|
-
*
|
1881
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
1882
|
+
* Pass a language to only receive the period post count for that specified language.
|
1902
1883
|
* @format LANGUAGE_TAG
|
1903
1884
|
*/
|
1904
1885
|
language?: string | null;
|
@@ -1918,7 +1899,7 @@ export declare enum Order {
|
|
1918
1899
|
}
|
1919
1900
|
/** Get Blog Post Count Stats response */
|
1920
1901
|
export interface QueryPostCountStatsResponse {
|
1921
|
-
/** List of
|
1902
|
+
/** List of published post counts by month. */
|
1922
1903
|
stats?: PeriodPostCount[];
|
1923
1904
|
}
|
1924
1905
|
/** Post count for a specific time period */
|
@@ -1944,8 +1925,8 @@ export interface GetTotalPostsRequest {
|
|
1944
1925
|
/**
|
1945
1926
|
* Language filter.
|
1946
1927
|
*
|
1947
|
-
*
|
1948
|
-
*
|
1928
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
1929
|
+
* Pass a language to receive the total amount of posts in that specified language.
|
1949
1930
|
* @format LANGUAGE_TAG
|
1950
1931
|
*/
|
1951
1932
|
language?: string | null;
|
@@ -2153,11 +2134,7 @@ export interface ListTemplatesResponse {
|
|
2153
2134
|
export interface MetaData {
|
2154
2135
|
/** Number of items returned in this response. */
|
2155
2136
|
count?: number;
|
2156
|
-
/**
|
2157
|
-
* Number of items skipped in the current sort order.
|
2158
|
-
*
|
2159
|
-
*
|
2160
|
-
*/
|
2137
|
+
/** Requested offset. */
|
2161
2138
|
offset?: number;
|
2162
2139
|
/** Total number of items that match the query. */
|
2163
2140
|
total?: number;
|
@@ -2651,7 +2628,9 @@ export interface GetPostRequest {
|
|
2651
2628
|
*/
|
2652
2629
|
postId: string;
|
2653
2630
|
/**
|
2654
|
-
* List of post fields to
|
2631
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
2632
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
2633
|
+
* only the post’s base fields are returned.
|
2655
2634
|
* @maxSize 20
|
2656
2635
|
*/
|
2657
2636
|
fieldsets?: PostFieldField[];
|
@@ -2685,7 +2664,9 @@ export interface GetPostBySlugRequest {
|
|
2685
2664
|
*/
|
2686
2665
|
slug: string;
|
2687
2666
|
/**
|
2688
|
-
* List of post fields to
|
2667
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
2668
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
2669
|
+
* only the post’s base fields are returned.
|
2689
2670
|
* @maxSize 20
|
2690
2671
|
*/
|
2691
2672
|
fieldsets?: PostFieldField[];
|
@@ -2728,15 +2709,20 @@ export interface ListPostsRequest {
|
|
2728
2709
|
* @maxLength 38
|
2729
2710
|
*/
|
2730
2711
|
tagIds?: string[];
|
2731
|
-
/**
|
2712
|
+
/**
|
2713
|
+
* Sorting options.
|
2714
|
+
*
|
2715
|
+
* Default: `FEED`
|
2716
|
+
*/
|
2732
2717
|
sort?: GetPostsSort;
|
2733
2718
|
/** Pagination options. */
|
2734
2719
|
paging?: BlogPaging;
|
2735
2720
|
/**
|
2736
2721
|
* Language filter.
|
2737
2722
|
*
|
2738
|
-
*
|
2739
|
-
*
|
2723
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
2724
|
+
* Pass a language to only receive posts that are in that language.
|
2725
|
+
* If omitted, posts in all languages are returned.
|
2740
2726
|
* @format LANGUAGE_TAG
|
2741
2727
|
*/
|
2742
2728
|
language?: string | null;
|
@@ -2746,7 +2732,9 @@ export interface ListPostsRequest {
|
|
2746
2732
|
*/
|
2747
2733
|
memberId?: string | null;
|
2748
2734
|
/**
|
2749
|
-
* List of post fields to
|
2735
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
2736
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
2737
|
+
* only the post’s base fields are returned.
|
2750
2738
|
* @maxSize 20
|
2751
2739
|
*/
|
2752
2740
|
fieldsets?: PostFieldField[];
|
@@ -2777,7 +2765,9 @@ export interface QueryPostsRequest {
|
|
2777
2765
|
/** Query options. */
|
2778
2766
|
query?: PlatformQuery;
|
2779
2767
|
/**
|
2780
|
-
* List of post fields to
|
2768
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
2769
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
2770
|
+
* only the post’s base fields are returned.
|
2781
2771
|
* @maxSize 20
|
2782
2772
|
*/
|
2783
2773
|
fieldsets?: PostFieldField[];
|
@@ -3729,7 +3719,7 @@ export declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => v
|
|
3729
3719
|
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
3730
3720
|
* @applicableIdentity APP
|
3731
3721
|
* @applicableIdentity VISITOR
|
3732
|
-
* @returns
|
3722
|
+
* @returns Get Blog Post Count Stats response
|
3733
3723
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.QueryPostCountStats
|
3734
3724
|
*/
|
3735
3725
|
export declare function queryPostCountStats(options?: QueryPostCountStatsOptions): Promise<QueryPostCountStatsResponse & QueryPostCountStatsResponseNonNullableFields>;
|
@@ -3737,10 +3727,12 @@ export interface QueryPostCountStatsOptions {
|
|
3737
3727
|
/** Start of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
|
3738
3728
|
rangeStart?: Date | null;
|
3739
3729
|
/**
|
3740
|
-
*
|
3741
|
-
* Use `'ASC'` for ascending order or `'DESC'` for descending order.
|
3730
|
+
* Order of returned results.
|
3742
3731
|
*
|
3743
|
-
*
|
3732
|
+
* - `OLDEST`: posts by date in ascending order.
|
3733
|
+
* - `NEWEST`: posts by date in descending order.
|
3734
|
+
*
|
3735
|
+
* Default: `OLDEST`
|
3744
3736
|
*/
|
3745
3737
|
order?: Order;
|
3746
3738
|
/** Number of months to include in response. */
|
@@ -3748,8 +3740,8 @@ export interface QueryPostCountStatsOptions {
|
|
3748
3740
|
/**
|
3749
3741
|
* Language filter.
|
3750
3742
|
*
|
3751
|
-
*
|
3752
|
-
*
|
3743
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
3744
|
+
* Pass a language to only receive the period post count for that specified language.
|
3753
3745
|
* @format LANGUAGE_TAG
|
3754
3746
|
*/
|
3755
3747
|
language?: string | null;
|
@@ -3763,13 +3755,7 @@ export interface QueryPostCountStatsOptions {
|
|
3763
3755
|
timeZone?: string | null;
|
3764
3756
|
}
|
3765
3757
|
/**
|
3766
|
-
*
|
3767
|
-
*
|
3768
|
-
*
|
3769
|
-
* The `getTotalPosts()` function returns a Promise that resolves to the total amount of published posts on your blog's site.
|
3770
|
-
*
|
3771
|
-
*
|
3772
|
-
* You can use the `language` option to filter posts for a specified language.
|
3758
|
+
* Retrieves the total amount of published posts of the blog.
|
3773
3759
|
* @public
|
3774
3760
|
* @documentationMaturity preview
|
3775
3761
|
* @param options - Language Options.
|
@@ -3782,7 +3768,6 @@ export interface QueryPostCountStatsOptions {
|
|
3782
3768
|
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
3783
3769
|
* @applicableIdentity APP
|
3784
3770
|
* @applicableIdentity VISITOR
|
3785
|
-
* @returns Fulfilled - Total number of posts.
|
3786
3771
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
|
3787
3772
|
*/
|
3788
3773
|
export declare function getTotalPosts(options?: GetTotalPostsOptions): Promise<GetTotalPostsResponse & GetTotalPostsResponseNonNullableFields>;
|
@@ -3790,18 +3775,14 @@ export interface GetTotalPostsOptions {
|
|
3790
3775
|
/**
|
3791
3776
|
* Language filter.
|
3792
3777
|
*
|
3793
|
-
*
|
3794
|
-
*
|
3778
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
3779
|
+
* Pass a language to receive the total amount of posts in that specified language.
|
3795
3780
|
* @format LANGUAGE_TAG
|
3796
3781
|
*/
|
3797
3782
|
language?: string | null;
|
3798
3783
|
}
|
3799
3784
|
/**
|
3800
|
-
*
|
3801
|
-
*
|
3802
|
-
*
|
3803
|
-
* The `getPost()` function returns a Promise that resolves to a post whose ID matches the given ID.
|
3804
|
-
*
|
3785
|
+
* Retrieves a post by the specified ID.
|
3805
3786
|
* @param postId - Post ID.
|
3806
3787
|
* @public
|
3807
3788
|
* @requiredField postId
|
@@ -3815,30 +3796,29 @@ export interface GetTotalPostsOptions {
|
|
3815
3796
|
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
3816
3797
|
* @applicableIdentity APP
|
3817
3798
|
* @applicableIdentity VISITOR
|
3818
|
-
* @returns Fulfilled - The requested post.
|
3819
3799
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
3820
3800
|
*/
|
3821
3801
|
export declare function getPost(postId: string, options?: GetPostOptions): Promise<GetPostResponse & GetPostResponseNonNullableFields>;
|
3822
3802
|
export interface GetPostOptions {
|
3823
3803
|
/**
|
3824
|
-
* List of post fields to
|
3804
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
3805
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
3806
|
+
* only the post’s base fields are returned.
|
3825
3807
|
* @maxSize 20
|
3826
3808
|
*/
|
3827
3809
|
fieldsets?: PostFieldField[];
|
3828
3810
|
}
|
3829
3811
|
/**
|
3830
|
-
*
|
3831
|
-
*
|
3812
|
+
* Retrieves a post with the provided slug.
|
3832
3813
|
*
|
3833
|
-
* The
|
3834
|
-
*
|
3835
|
-
*
|
3814
|
+
* The slug is the end of a post's URL that refers to a specific post.
|
3815
|
+
* For example, if a post's URL is `https:/example.com/blog/post/my-post-slug`,
|
3816
|
+
* the slug is `my-post-slug`. The slug is case-sensitive, and is generally derived from the post title,
|
3817
|
+
* unless specified otherwise.
|
3818
|
+
* @param slug - Slug of the post to retrieve.
|
3836
3819
|
* @public
|
3837
3820
|
* @requiredField slug
|
3838
3821
|
* @param options - Options specifying which fields to return.
|
3839
|
-
* @param slug - Slug of the post to retrieve.
|
3840
|
-
*
|
3841
|
-
* The end of a post's URL, for example, `https:/example.com/blog/post/my-post-slug`. Case sensitive and generally based on the post title if not specified.
|
3842
3822
|
* @permissionId BLOG.READ-PUBLICATION
|
3843
3823
|
* @permissionScope Read Blog
|
3844
3824
|
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
@@ -3848,26 +3828,25 @@ export interface GetPostOptions {
|
|
3848
3828
|
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
3849
3829
|
* @applicableIdentity APP
|
3850
3830
|
* @applicableIdentity VISITOR
|
3851
|
-
* @returns Fulfilled - The requested post.
|
3852
3831
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
|
3853
3832
|
*/
|
3854
3833
|
export declare function getPostBySlug(slug: string, options?: GetPostBySlugOptions): Promise<GetPostBySlugResponse & GetPostBySlugResponseNonNullableFields>;
|
3855
3834
|
export interface GetPostBySlugOptions {
|
3856
3835
|
/**
|
3857
|
-
* List of post fields to
|
3836
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
3837
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
3838
|
+
* only the post’s base fields are returned.
|
3858
3839
|
* @maxSize 20
|
3859
3840
|
*/
|
3860
3841
|
fieldsets?: PostFieldField[];
|
3861
3842
|
}
|
3862
3843
|
/**
|
3863
|
-
* Retrieves a list of published posts.
|
3864
|
-
*
|
3865
|
-
*
|
3866
|
-
* The `listPosts()` function returns a Promise that resolves to a list of up to 100 published posts.
|
3867
|
-
*
|
3868
|
-
* Using the `options` parameter, you can filter your list of posts, set the amount of posts to be returned, and sort your list in a specified order.
|
3844
|
+
* Retrieves a list of up to 100 published posts per request.
|
3869
3845
|
*
|
3870
|
-
*
|
3846
|
+
* List Posts runs with these defaults, which you can override:
|
3847
|
+
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
3848
|
+
* - `paging.limit` is `50`.
|
3849
|
+
* - `paging.offset` is `0`.
|
3871
3850
|
* @public
|
3872
3851
|
* @param options - Sort, filter, and paging options.
|
3873
3852
|
* @permissionId BLOG.READ-PUBLICATION
|
@@ -3879,52 +3858,47 @@ export interface GetPostBySlugOptions {
|
|
3879
3858
|
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
3880
3859
|
* @applicableIdentity APP
|
3881
3860
|
* @applicableIdentity VISITOR
|
3882
|
-
* @returns Fulfilled - List of retrieved posts.
|
3883
3861
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
|
3884
3862
|
*/
|
3885
3863
|
export declare function listPosts(options?: ListPostsOptions): Promise<ListPostsResponse & ListPostsResponseNonNullableFields>;
|
3886
3864
|
export interface ListPostsOptions {
|
3887
|
-
/** Featured filter. Whether to return only featured posts. */
|
3888
|
-
featured?: boolean;
|
3889
3865
|
/**
|
3890
|
-
*
|
3866
|
+
* Whether to return only featured posts.
|
3891
3867
|
*
|
3868
|
+
* Default: `false`
|
3869
|
+
*/
|
3870
|
+
featured?: boolean;
|
3871
|
+
/**
|
3872
|
+
* Hashtag filter.
|
3892
3873
|
*
|
3893
|
-
*
|
3874
|
+
* Pass an array of hashtags to return only posts containing any of the provided hashtags.
|
3875
|
+
* If omitted, all posts with or without hashtags are returned.
|
3894
3876
|
* @maxSize 100
|
3895
3877
|
* @maxLength 100
|
3896
3878
|
*/
|
3897
3879
|
hashtags?: string[];
|
3898
3880
|
/**
|
3899
|
-
*
|
3900
|
-
*
|
3881
|
+
* Category filter.
|
3901
3882
|
*
|
3902
|
-
*
|
3883
|
+
* Pass an array of category IDs to return only posts with any of the provided categories.
|
3884
|
+
* If omitted, all posts with or without associated categories are returned.
|
3903
3885
|
* @maxSize 50
|
3904
3886
|
* @maxLength 38
|
3905
3887
|
*/
|
3906
3888
|
categoryIds?: string[];
|
3907
3889
|
/**
|
3908
|
-
*
|
3909
|
-
*
|
3890
|
+
* Tag filter.
|
3910
3891
|
*
|
3911
|
-
*
|
3892
|
+
* Pass an array of tag IDs to return only posts with any of the provided tags.
|
3893
|
+
* If omitted, all posts with or without tags are returned.
|
3912
3894
|
* @maxSize 50
|
3913
3895
|
* @maxLength 38
|
3914
3896
|
*/
|
3915
3897
|
tagIds?: string[];
|
3916
3898
|
/**
|
3917
|
-
*
|
3918
|
-
*
|
3919
|
-
* Sort by one of the following:
|
3920
|
-
* - `'VIEW_COUNT'` descending view count
|
3921
|
-
* - `'LIKE_COUNT'` descending like count
|
3922
|
-
* - `'PUBLISHED_DATE_ASC'` ascending published date
|
3923
|
-
* - `'PUBLISHED_DATE_DESC'` descending published date
|
3924
|
-
* - `'TITLE_ASC'` ascending title
|
3925
|
-
* - `'TITLE_DESC'` descending title
|
3899
|
+
* Sorting options.
|
3926
3900
|
*
|
3927
|
-
*
|
3901
|
+
* Default: `FEED`
|
3928
3902
|
*/
|
3929
3903
|
sort?: GetPostsSort;
|
3930
3904
|
/** Pagination options. */
|
@@ -3932,21 +3906,21 @@ export interface ListPostsOptions {
|
|
3932
3906
|
/**
|
3933
3907
|
* Language filter.
|
3934
3908
|
*
|
3935
|
-
*
|
3936
|
-
*
|
3909
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
3910
|
+
* Pass a language to only receive posts that are in that language.
|
3911
|
+
* If omitted, posts in all languages are returned.
|
3937
3912
|
* @format LANGUAGE_TAG
|
3938
3913
|
*/
|
3939
3914
|
language?: string | null;
|
3940
3915
|
/**
|
3941
|
-
*
|
3942
|
-
*
|
3943
|
-
*
|
3944
|
-
* Default: All members
|
3916
|
+
* Post owner's member ID.
|
3945
3917
|
* @format GUID
|
3946
3918
|
*/
|
3947
3919
|
memberId?: string | null;
|
3948
3920
|
/**
|
3949
|
-
* List of post fields to
|
3921
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
3922
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
3923
|
+
* only the post’s base fields are returned.
|
3950
3924
|
* @maxSize 20
|
3951
3925
|
*/
|
3952
3926
|
fieldsets?: PostFieldField[];
|
@@ -3955,21 +3929,21 @@ export interface ListPostsOptions {
|
|
3955
3929
|
* Creates a query to retrieve a list of posts.
|
3956
3930
|
*
|
3957
3931
|
*
|
3958
|
-
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a
|
3932
|
+
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
3959
3933
|
*
|
3960
|
-
* The returned object contains the query definition which is typically used to run the query using the
|
3934
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
3961
3935
|
*
|
3962
3936
|
* You can refine the query by chaining `PostsQueryBuilder` functions onto the query. `PostsQueryBuilder` functions enable you to sort, filter, and control the results that `queryPosts()` returns.
|
3963
3937
|
*
|
3964
|
-
* `queryPosts()` runs with these `PostsQueryBuilder` defaults that can
|
3965
|
-
* +
|
3966
|
-
* +
|
3938
|
+
* `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
|
3939
|
+
* + `limit(50)`
|
3940
|
+
* + `descending('firstPublishedDate')`
|
3967
3941
|
*
|
3968
3942
|
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
3969
3943
|
*
|
3970
3944
|
* To learn how to query posts, refer to the table below.
|
3971
3945
|
*
|
3972
|
-
* The following `PostsQueryBuilder` functions are supported for the `queryPosts()` function. For a full description of the Posts object, see the object returned for the
|
3946
|
+
* The following `PostsQueryBuilder` functions are supported for the `queryPosts()` function. For a full description of the Posts object, see the object returned for the `items` property in `PostsQueryResult`.
|
3973
3947
|
* @public
|
3974
3948
|
* @param options - Options specifying which fields to return.
|
3975
3949
|
* @permissionScope Read Blog
|
@@ -3986,7 +3960,9 @@ export interface ListPostsOptions {
|
|
3986
3960
|
export declare function queryPosts(options?: QueryPostsOptions): PostsQueryBuilder;
|
3987
3961
|
export interface QueryPostsOptions {
|
3988
3962
|
/**
|
3989
|
-
* List of post fields to
|
3963
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
3964
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
3965
|
+
* only the post’s base fields are returned.
|
3990
3966
|
* @maxSize 20
|
3991
3967
|
*/
|
3992
3968
|
fieldsets?: PostFieldField[] | undefined;
|
@@ -4054,10 +4030,7 @@ export interface PostsQueryBuilder {
|
|
4054
4030
|
find: () => Promise<PostsQueryResult>;
|
4055
4031
|
}
|
4056
4032
|
/**
|
4057
|
-
*
|
4058
|
-
*
|
4059
|
-
*
|
4060
|
-
* The `getPostMetrics()` function returns a Promise that resolves to the specified post's metrics.
|
4033
|
+
* Retrieves a post's metrics.
|
4061
4034
|
*
|
4062
4035
|
* A post's metrics include the comments, likes, and views the post receives.
|
4063
4036
|
* @param postId - Post ID to retrieve metrics for.
|
@@ -4072,7 +4045,6 @@ export interface PostsQueryBuilder {
|
|
4072
4045
|
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
4073
4046
|
* @applicableIdentity APP
|
4074
4047
|
* @applicableIdentity VISITOR
|
4075
|
-
* @returns Fulfilled - Post metrics.
|
4076
4048
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics
|
4077
4049
|
*/
|
4078
4050
|
export declare function getPostMetrics(postId: string): Promise<GetPostMetricsResponse & GetPostMetricsResponseNonNullableFields>;
|