@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;
|
@@ -194,11 +183,7 @@ export interface CoverMedia extends CoverMediaMediaOneOf {
|
|
194
183
|
enabled?: boolean;
|
195
184
|
/** Whether cover media is displayed. */
|
196
185
|
displayed?: boolean;
|
197
|
-
/**
|
198
|
-
* Whether the cover media is custom.
|
199
|
-
*
|
200
|
-
* `false` if the cover media is the first image or video in the post. `true` if set to some other image or video.
|
201
|
-
*/
|
186
|
+
/** Whether cover media is custom. If `false` the cover image is set to the first media item that appears in the content. */
|
202
187
|
custom?: boolean;
|
203
188
|
/**
|
204
189
|
* Media alternative text.
|
@@ -1673,11 +1658,11 @@ export interface TextNodeStyle {
|
|
1673
1658
|
}
|
1674
1659
|
export interface ModerationDetails {
|
1675
1660
|
/**
|
1676
|
-
* Member ID of the person
|
1661
|
+
* Member ID of the person submitting the draft post for review.
|
1677
1662
|
* @format GUID
|
1678
1663
|
*/
|
1679
1664
|
submittedBy?: string;
|
1680
|
-
/** Date
|
1665
|
+
/** Date the post was submitted for review. */
|
1681
1666
|
submittedDate?: Date | null;
|
1682
1667
|
/** Status indicating whether the submission was approved or rejected by the moderator. */
|
1683
1668
|
status?: ModerationStatusStatus;
|
@@ -1686,7 +1671,7 @@ export interface ModerationDetails {
|
|
1686
1671
|
* @format GUID
|
1687
1672
|
*/
|
1688
1673
|
moderatedBy?: string | null;
|
1689
|
-
/** Date
|
1674
|
+
/** Date the post was approved or rejected. */
|
1690
1675
|
moderationDate?: Date | null;
|
1691
1676
|
}
|
1692
1677
|
export declare enum ModerationStatusStatus {
|
@@ -1701,11 +1686,7 @@ export interface Media extends MediaMediaOneOf {
|
|
1701
1686
|
embedMedia?: EmbedMedia;
|
1702
1687
|
/** Whether cover media is displayed. */
|
1703
1688
|
displayed?: boolean;
|
1704
|
-
/**
|
1705
|
-
* Whether the cover media is custom.
|
1706
|
-
*
|
1707
|
-
* `false` if the cover media is the first image or video in the post. `true` if set to some other image or video.
|
1708
|
-
*/
|
1689
|
+
/** Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media. */
|
1709
1690
|
custom?: boolean;
|
1710
1691
|
/**
|
1711
1692
|
* Media alternative text.
|
@@ -1890,8 +1871,8 @@ export interface QueryPostCountStatsRequest {
|
|
1890
1871
|
/**
|
1891
1872
|
* Language filter.
|
1892
1873
|
*
|
1893
|
-
*
|
1894
|
-
*
|
1874
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
1875
|
+
* Pass a language to only receive the period post count for that specified language.
|
1895
1876
|
* @format LANGUAGE_TAG
|
1896
1877
|
*/
|
1897
1878
|
language?: string | null;
|
@@ -1911,7 +1892,7 @@ export declare enum Order {
|
|
1911
1892
|
}
|
1912
1893
|
/** Get Blog Post Count Stats response */
|
1913
1894
|
export interface QueryPostCountStatsResponse {
|
1914
|
-
/** List of
|
1895
|
+
/** List of published post counts by month. */
|
1915
1896
|
stats?: PeriodPostCount[];
|
1916
1897
|
}
|
1917
1898
|
/** Post count for a specific time period */
|
@@ -1937,8 +1918,8 @@ export interface GetTotalPostsRequest {
|
|
1937
1918
|
/**
|
1938
1919
|
* Language filter.
|
1939
1920
|
*
|
1940
|
-
*
|
1941
|
-
*
|
1921
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
1922
|
+
* Pass a language to receive the total amount of posts in that specified language.
|
1942
1923
|
* @format LANGUAGE_TAG
|
1943
1924
|
*/
|
1944
1925
|
language?: string | null;
|
@@ -2146,11 +2127,7 @@ export interface ListTemplatesResponse {
|
|
2146
2127
|
export interface MetaData {
|
2147
2128
|
/** Number of items returned in this response. */
|
2148
2129
|
count?: number;
|
2149
|
-
/**
|
2150
|
-
* Number of items skipped in the current sort order.
|
2151
|
-
*
|
2152
|
-
*
|
2153
|
-
*/
|
2130
|
+
/** Requested offset. */
|
2154
2131
|
offset?: number;
|
2155
2132
|
/** Total number of items that match the query. */
|
2156
2133
|
total?: number;
|
@@ -2644,7 +2621,9 @@ export interface GetPostRequest {
|
|
2644
2621
|
*/
|
2645
2622
|
postId: string;
|
2646
2623
|
/**
|
2647
|
-
* List of post fields to
|
2624
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
2625
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
2626
|
+
* only the post’s base fields are returned.
|
2648
2627
|
* @maxSize 20
|
2649
2628
|
*/
|
2650
2629
|
fieldsets?: PostFieldField[];
|
@@ -2678,7 +2657,9 @@ export interface GetPostBySlugRequest {
|
|
2678
2657
|
*/
|
2679
2658
|
slug: string;
|
2680
2659
|
/**
|
2681
|
-
* List of post fields to
|
2660
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
2661
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
2662
|
+
* only the post’s base fields are returned.
|
2682
2663
|
* @maxSize 20
|
2683
2664
|
*/
|
2684
2665
|
fieldsets?: PostFieldField[];
|
@@ -2721,15 +2702,20 @@ export interface ListPostsRequest {
|
|
2721
2702
|
* @maxLength 38
|
2722
2703
|
*/
|
2723
2704
|
tagIds?: string[];
|
2724
|
-
/**
|
2705
|
+
/**
|
2706
|
+
* Sorting options.
|
2707
|
+
*
|
2708
|
+
* Default: `FEED`
|
2709
|
+
*/
|
2725
2710
|
sort?: GetPostsSort;
|
2726
2711
|
/** Pagination options. */
|
2727
2712
|
paging?: BlogPaging;
|
2728
2713
|
/**
|
2729
2714
|
* Language filter.
|
2730
2715
|
*
|
2731
|
-
*
|
2732
|
-
*
|
2716
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
2717
|
+
* Pass a language to only receive posts that are in that language.
|
2718
|
+
* If omitted, posts in all languages are returned.
|
2733
2719
|
* @format LANGUAGE_TAG
|
2734
2720
|
*/
|
2735
2721
|
language?: string | null;
|
@@ -2739,7 +2725,9 @@ export interface ListPostsRequest {
|
|
2739
2725
|
*/
|
2740
2726
|
memberId?: string | null;
|
2741
2727
|
/**
|
2742
|
-
* List of post fields to
|
2728
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
2729
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
2730
|
+
* only the post’s base fields are returned.
|
2743
2731
|
* @maxSize 20
|
2744
2732
|
*/
|
2745
2733
|
fieldsets?: PostFieldField[];
|
@@ -2770,7 +2758,9 @@ export interface QueryPostsRequest {
|
|
2770
2758
|
/** Query options. */
|
2771
2759
|
query?: PlatformQuery;
|
2772
2760
|
/**
|
2773
|
-
* List of post fields to
|
2761
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
2762
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
2763
|
+
* only the post’s base fields are returned.
|
2774
2764
|
* @maxSize 20
|
2775
2765
|
*/
|
2776
2766
|
fieldsets?: PostFieldField[];
|
@@ -3722,7 +3712,7 @@ export declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => v
|
|
3722
3712
|
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
3723
3713
|
* @applicableIdentity APP
|
3724
3714
|
* @applicableIdentity VISITOR
|
3725
|
-
* @returns
|
3715
|
+
* @returns Get Blog Post Count Stats response
|
3726
3716
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.QueryPostCountStats
|
3727
3717
|
*/
|
3728
3718
|
export declare function queryPostCountStats(options?: QueryPostCountStatsOptions): Promise<QueryPostCountStatsResponse & QueryPostCountStatsResponseNonNullableFields>;
|
@@ -3730,10 +3720,12 @@ export interface QueryPostCountStatsOptions {
|
|
3730
3720
|
/** Start of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
|
3731
3721
|
rangeStart?: Date | null;
|
3732
3722
|
/**
|
3733
|
-
*
|
3734
|
-
* Use `'ASC'` for ascending order or `'DESC'` for descending order.
|
3723
|
+
* Order of returned results.
|
3735
3724
|
*
|
3736
|
-
*
|
3725
|
+
* - `OLDEST`: posts by date in ascending order.
|
3726
|
+
* - `NEWEST`: posts by date in descending order.
|
3727
|
+
*
|
3728
|
+
* Default: `OLDEST`
|
3737
3729
|
*/
|
3738
3730
|
order?: Order;
|
3739
3731
|
/** Number of months to include in response. */
|
@@ -3741,8 +3733,8 @@ export interface QueryPostCountStatsOptions {
|
|
3741
3733
|
/**
|
3742
3734
|
* Language filter.
|
3743
3735
|
*
|
3744
|
-
*
|
3745
|
-
*
|
3736
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
3737
|
+
* Pass a language to only receive the period post count for that specified language.
|
3746
3738
|
* @format LANGUAGE_TAG
|
3747
3739
|
*/
|
3748
3740
|
language?: string | null;
|
@@ -3756,13 +3748,7 @@ export interface QueryPostCountStatsOptions {
|
|
3756
3748
|
timeZone?: string | null;
|
3757
3749
|
}
|
3758
3750
|
/**
|
3759
|
-
*
|
3760
|
-
*
|
3761
|
-
*
|
3762
|
-
* The `getTotalPosts()` function returns a Promise that resolves to the total amount of published posts on your blog's site.
|
3763
|
-
*
|
3764
|
-
*
|
3765
|
-
* You can use the `language` option to filter posts for a specified language.
|
3751
|
+
* Retrieves the total amount of published posts of the blog.
|
3766
3752
|
* @public
|
3767
3753
|
* @documentationMaturity preview
|
3768
3754
|
* @param options - Language Options.
|
@@ -3775,7 +3761,6 @@ export interface QueryPostCountStatsOptions {
|
|
3775
3761
|
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
3776
3762
|
* @applicableIdentity APP
|
3777
3763
|
* @applicableIdentity VISITOR
|
3778
|
-
* @returns Fulfilled - Total number of posts.
|
3779
3764
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
|
3780
3765
|
*/
|
3781
3766
|
export declare function getTotalPosts(options?: GetTotalPostsOptions): Promise<GetTotalPostsResponse & GetTotalPostsResponseNonNullableFields>;
|
@@ -3783,18 +3768,14 @@ export interface GetTotalPostsOptions {
|
|
3783
3768
|
/**
|
3784
3769
|
* Language filter.
|
3785
3770
|
*
|
3786
|
-
*
|
3787
|
-
*
|
3771
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
3772
|
+
* Pass a language to receive the total amount of posts in that specified language.
|
3788
3773
|
* @format LANGUAGE_TAG
|
3789
3774
|
*/
|
3790
3775
|
language?: string | null;
|
3791
3776
|
}
|
3792
3777
|
/**
|
3793
|
-
*
|
3794
|
-
*
|
3795
|
-
*
|
3796
|
-
* The `getPost()` function returns a Promise that resolves to a post whose ID matches the given ID.
|
3797
|
-
*
|
3778
|
+
* Retrieves a post by the specified ID.
|
3798
3779
|
* @param postId - Post ID.
|
3799
3780
|
* @public
|
3800
3781
|
* @requiredField postId
|
@@ -3808,30 +3789,29 @@ export interface GetTotalPostsOptions {
|
|
3808
3789
|
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
3809
3790
|
* @applicableIdentity APP
|
3810
3791
|
* @applicableIdentity VISITOR
|
3811
|
-
* @returns Fulfilled - The requested post.
|
3812
3792
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
3813
3793
|
*/
|
3814
3794
|
export declare function getPost(postId: string, options?: GetPostOptions): Promise<GetPostResponse & GetPostResponseNonNullableFields>;
|
3815
3795
|
export interface GetPostOptions {
|
3816
3796
|
/**
|
3817
|
-
* List of post fields to
|
3797
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
3798
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
3799
|
+
* only the post’s base fields are returned.
|
3818
3800
|
* @maxSize 20
|
3819
3801
|
*/
|
3820
3802
|
fieldsets?: PostFieldField[];
|
3821
3803
|
}
|
3822
3804
|
/**
|
3823
|
-
*
|
3824
|
-
*
|
3805
|
+
* Retrieves a post with the provided slug.
|
3825
3806
|
*
|
3826
|
-
* The
|
3827
|
-
*
|
3828
|
-
*
|
3807
|
+
* The slug is the end of a post's URL that refers to a specific post.
|
3808
|
+
* For example, if a post's URL is `https:/example.com/blog/post/my-post-slug`,
|
3809
|
+
* the slug is `my-post-slug`. The slug is case-sensitive, and is generally derived from the post title,
|
3810
|
+
* unless specified otherwise.
|
3811
|
+
* @param slug - Slug of the post to retrieve.
|
3829
3812
|
* @public
|
3830
3813
|
* @requiredField slug
|
3831
3814
|
* @param options - Options specifying which fields to return.
|
3832
|
-
* @param slug - Slug of the post to retrieve.
|
3833
|
-
*
|
3834
|
-
* 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.
|
3835
3815
|
* @permissionId BLOG.READ-PUBLICATION
|
3836
3816
|
* @permissionScope Read Blog
|
3837
3817
|
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
@@ -3841,26 +3821,25 @@ export interface GetPostOptions {
|
|
3841
3821
|
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
3842
3822
|
* @applicableIdentity APP
|
3843
3823
|
* @applicableIdentity VISITOR
|
3844
|
-
* @returns Fulfilled - The requested post.
|
3845
3824
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
|
3846
3825
|
*/
|
3847
3826
|
export declare function getPostBySlug(slug: string, options?: GetPostBySlugOptions): Promise<GetPostBySlugResponse & GetPostBySlugResponseNonNullableFields>;
|
3848
3827
|
export interface GetPostBySlugOptions {
|
3849
3828
|
/**
|
3850
|
-
* List of post fields to
|
3829
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
3830
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
3831
|
+
* only the post’s base fields are returned.
|
3851
3832
|
* @maxSize 20
|
3852
3833
|
*/
|
3853
3834
|
fieldsets?: PostFieldField[];
|
3854
3835
|
}
|
3855
3836
|
/**
|
3856
|
-
* Retrieves a list of published posts.
|
3857
|
-
*
|
3858
|
-
*
|
3859
|
-
* The `listPosts()` function returns a Promise that resolves to a list of up to 100 published posts.
|
3860
|
-
*
|
3861
|
-
* 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.
|
3837
|
+
* Retrieves a list of up to 100 published posts per request.
|
3862
3838
|
*
|
3863
|
-
*
|
3839
|
+
* List Posts runs with these defaults, which you can override:
|
3840
|
+
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
3841
|
+
* - `paging.limit` is `50`.
|
3842
|
+
* - `paging.offset` is `0`.
|
3864
3843
|
* @public
|
3865
3844
|
* @param options - Sort, filter, and paging options.
|
3866
3845
|
* @permissionId BLOG.READ-PUBLICATION
|
@@ -3872,52 +3851,47 @@ export interface GetPostBySlugOptions {
|
|
3872
3851
|
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
3873
3852
|
* @applicableIdentity APP
|
3874
3853
|
* @applicableIdentity VISITOR
|
3875
|
-
* @returns Fulfilled - List of retrieved posts.
|
3876
3854
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
|
3877
3855
|
*/
|
3878
3856
|
export declare function listPosts(options?: ListPostsOptions): Promise<ListPostsResponse & ListPostsResponseNonNullableFields>;
|
3879
3857
|
export interface ListPostsOptions {
|
3880
|
-
/** Featured filter. Whether to return only featured posts. */
|
3881
|
-
featured?: boolean;
|
3882
3858
|
/**
|
3883
|
-
*
|
3859
|
+
* Whether to return only featured posts.
|
3884
3860
|
*
|
3861
|
+
* Default: `false`
|
3862
|
+
*/
|
3863
|
+
featured?: boolean;
|
3864
|
+
/**
|
3865
|
+
* Hashtag filter.
|
3885
3866
|
*
|
3886
|
-
*
|
3867
|
+
* Pass an array of hashtags to return only posts containing any of the provided hashtags.
|
3868
|
+
* If omitted, all posts with or without hashtags are returned.
|
3887
3869
|
* @maxSize 100
|
3888
3870
|
* @maxLength 100
|
3889
3871
|
*/
|
3890
3872
|
hashtags?: string[];
|
3891
3873
|
/**
|
3892
|
-
*
|
3893
|
-
*
|
3874
|
+
* Category filter.
|
3894
3875
|
*
|
3895
|
-
*
|
3876
|
+
* Pass an array of category IDs to return only posts with any of the provided categories.
|
3877
|
+
* If omitted, all posts with or without associated categories are returned.
|
3896
3878
|
* @maxSize 50
|
3897
3879
|
* @maxLength 38
|
3898
3880
|
*/
|
3899
3881
|
categoryIds?: string[];
|
3900
3882
|
/**
|
3901
|
-
*
|
3902
|
-
*
|
3883
|
+
* Tag filter.
|
3903
3884
|
*
|
3904
|
-
*
|
3885
|
+
* Pass an array of tag IDs to return only posts with any of the provided tags.
|
3886
|
+
* If omitted, all posts with or without tags are returned.
|
3905
3887
|
* @maxSize 50
|
3906
3888
|
* @maxLength 38
|
3907
3889
|
*/
|
3908
3890
|
tagIds?: string[];
|
3909
3891
|
/**
|
3910
|
-
*
|
3911
|
-
*
|
3912
|
-
* Sort by one of the following:
|
3913
|
-
* - `'VIEW_COUNT'` descending view count
|
3914
|
-
* - `'LIKE_COUNT'` descending like count
|
3915
|
-
* - `'PUBLISHED_DATE_ASC'` ascending published date
|
3916
|
-
* - `'PUBLISHED_DATE_DESC'` descending published date
|
3917
|
-
* - `'TITLE_ASC'` ascending title
|
3918
|
-
* - `'TITLE_DESC'` descending title
|
3892
|
+
* Sorting options.
|
3919
3893
|
*
|
3920
|
-
*
|
3894
|
+
* Default: `FEED`
|
3921
3895
|
*/
|
3922
3896
|
sort?: GetPostsSort;
|
3923
3897
|
/** Pagination options. */
|
@@ -3925,21 +3899,21 @@ export interface ListPostsOptions {
|
|
3925
3899
|
/**
|
3926
3900
|
* Language filter.
|
3927
3901
|
*
|
3928
|
-
*
|
3929
|
-
*
|
3902
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
3903
|
+
* Pass a language to only receive posts that are in that language.
|
3904
|
+
* If omitted, posts in all languages are returned.
|
3930
3905
|
* @format LANGUAGE_TAG
|
3931
3906
|
*/
|
3932
3907
|
language?: string | null;
|
3933
3908
|
/**
|
3934
|
-
*
|
3935
|
-
*
|
3936
|
-
*
|
3937
|
-
* Default: All members
|
3909
|
+
* Post owner's member ID.
|
3938
3910
|
* @format GUID
|
3939
3911
|
*/
|
3940
3912
|
memberId?: string | null;
|
3941
3913
|
/**
|
3942
|
-
* List of post fields to
|
3914
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
3915
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
3916
|
+
* only the post’s base fields are returned.
|
3943
3917
|
* @maxSize 20
|
3944
3918
|
*/
|
3945
3919
|
fieldsets?: PostFieldField[];
|
@@ -3948,21 +3922,21 @@ export interface ListPostsOptions {
|
|
3948
3922
|
* Creates a query to retrieve a list of posts.
|
3949
3923
|
*
|
3950
3924
|
*
|
3951
|
-
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a
|
3925
|
+
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
3952
3926
|
*
|
3953
|
-
* The returned object contains the query definition which is typically used to run the query using the
|
3927
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
3954
3928
|
*
|
3955
3929
|
* 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.
|
3956
3930
|
*
|
3957
|
-
* `queryPosts()` runs with these `PostsQueryBuilder` defaults that can
|
3958
|
-
* +
|
3959
|
-
* +
|
3931
|
+
* `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
|
3932
|
+
* + `limit(50)`
|
3933
|
+
* + `descending('firstPublishedDate')`
|
3960
3934
|
*
|
3961
3935
|
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
3962
3936
|
*
|
3963
3937
|
* To learn how to query posts, refer to the table below.
|
3964
3938
|
*
|
3965
|
-
* The following `PostsQueryBuilder` functions are supported for the `queryPosts()` function. For a full description of the Posts object, see the object returned for the
|
3939
|
+
* 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`.
|
3966
3940
|
* @public
|
3967
3941
|
* @param options - Options specifying which fields to return.
|
3968
3942
|
* @permissionScope Read Blog
|
@@ -3979,7 +3953,9 @@ export interface ListPostsOptions {
|
|
3979
3953
|
export declare function queryPosts(options?: QueryPostsOptions): PostsQueryBuilder;
|
3980
3954
|
export interface QueryPostsOptions {
|
3981
3955
|
/**
|
3982
|
-
* List of post fields to
|
3956
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
3957
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
3958
|
+
* only the post’s base fields are returned.
|
3983
3959
|
* @maxSize 20
|
3984
3960
|
*/
|
3985
3961
|
fieldsets?: PostFieldField[] | undefined;
|
@@ -4047,10 +4023,7 @@ export interface PostsQueryBuilder {
|
|
4047
4023
|
find: () => Promise<PostsQueryResult>;
|
4048
4024
|
}
|
4049
4025
|
/**
|
4050
|
-
*
|
4051
|
-
*
|
4052
|
-
*
|
4053
|
-
* The `getPostMetrics()` function returns a Promise that resolves to the specified post's metrics.
|
4026
|
+
* Retrieves a post's metrics.
|
4054
4027
|
*
|
4055
4028
|
* A post's metrics include the comments, likes, and views the post receives.
|
4056
4029
|
* @param postId - Post ID to retrieve metrics for.
|
@@ -4065,7 +4038,6 @@ export interface PostsQueryBuilder {
|
|
4065
4038
|
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
4066
4039
|
* @applicableIdentity APP
|
4067
4040
|
* @applicableIdentity VISITOR
|
4068
|
-
* @returns Fulfilled - Post metrics.
|
4069
4041
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics
|
4070
4042
|
*/
|
4071
4043
|
export declare function getPostMetrics(postId: string): Promise<GetPostMetricsResponse & GetPostMetricsResponseNonNullableFields>;
|