@wix/auto_sdk_blog_posts 1.0.172 → 1.0.173
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.d.ts +15 -11
- package/build/cjs/index.js +16 -11
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +29 -17
- package/build/cjs/index.typings.js +6 -6
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +84 -82
- package/build/cjs/schemas.js +153 -147
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +15 -11
- package/build/es/index.mjs +16 -11
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +29 -17
- package/build/es/index.typings.mjs +6 -6
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +84 -82
- package/build/es/schemas.mjs +153 -147
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +15 -11
- package/build/internal/cjs/index.js +16 -11
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +29 -17
- package/build/internal/cjs/index.typings.js +6 -6
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +84 -82
- package/build/internal/cjs/schemas.js +153 -147
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +15 -11
- package/build/internal/es/index.mjs +16 -11
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +29 -17
- package/build/internal/es/index.typings.mjs +6 -6
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +84 -82
- package/build/internal/es/schemas.mjs +153 -147
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -4652,13 +4652,14 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
|
|
|
4652
4652
|
/**
|
|
4653
4653
|
* Retrieves the number of published posts per month within a specified time range.
|
|
4654
4654
|
*
|
|
4655
|
-
*
|
|
4656
|
-
* The
|
|
4657
|
-
*
|
|
4658
|
-
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
|
4659
|
-
*
|
|
4660
|
-
*
|
|
4655
|
+
*
|
|
4656
|
+
* The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
|
|
4657
|
+
*
|
|
4658
|
+
* You can set the time range using the `rangeStart` and `months` properties. The time range always starts on the 1st day of the month set in `rangeStart` and includes the number of `months` following `rangeStart`. For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`, the time range will be from `'2022-03-01'` until `'2022-06-30'`. The time range ends on the last day of the month.
|
|
4659
|
+
*
|
|
4660
|
+
* >**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.
|
|
4661
4661
|
* @public
|
|
4662
|
+
* @param options - Options specifying time frame, sort, and filter.
|
|
4662
4663
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4663
4664
|
* @applicableIdentity APP
|
|
4664
4665
|
* @returns Get Blog Post Count Stats response
|
|
@@ -4699,6 +4700,7 @@ interface QueryPostCountStatsOptions {
|
|
|
4699
4700
|
/**
|
|
4700
4701
|
* Retrieves the total amount of published posts of the blog.
|
|
4701
4702
|
* @public
|
|
4703
|
+
* @param options - Language Options.
|
|
4702
4704
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4703
4705
|
* @applicableIdentity APP
|
|
4704
4706
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
|
|
@@ -4719,12 +4721,12 @@ interface GetTotalPostsOptions {
|
|
|
4719
4721
|
* @param postId - Post ID.
|
|
4720
4722
|
* @public
|
|
4721
4723
|
* @requiredField postId
|
|
4724
|
+
* @param options - Options specifying which fields to return.
|
|
4722
4725
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4723
4726
|
* @applicableIdentity APP
|
|
4724
|
-
* @returns Retrieved post info.
|
|
4725
4727
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
|
4726
4728
|
*/
|
|
4727
|
-
declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<
|
|
4729
|
+
declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<GetPostResponse, `post._id` | `post.title` | `post.excerpt` | `post.slug` | `post.featured` | `post.pinned` | `post.categoryIds` | `post.memberId` | `post.hashtags` | `post.commentingEnabled` | `post.minutesToRead` | `post.tagIds` | `post.relatedPostIds` | `post.pricingPlanIds` | `post.seoData.tags` | `post.seoData.tags.${number}.type` | `post.seoData.tags.${number}.children` | `post.seoData.tags.${number}.custom` | `post.seoData.tags.${number}.disabled` | `post.seoData.settings.preventAutoRedirect` | `post.seoData.settings.keywords` | `post.seoData.settings.keywords.${number}.term` | `post.seoData.settings.keywords.${number}.isMain` | `post.preview` | `post.moderationDetails.submittedBy` | `post.moderationDetails.status` | `post.media.embedMedia.thumbnail.url` | `post.media.embedMedia.thumbnail.width` | `post.media.embedMedia.thumbnail.height` | `post.media.embedMedia.video.url` | `post.media.embedMedia.video.width` | `post.media.embedMedia.video.height` | `post.media.displayed` | `post.media.custom` | `post.hasUnpublishedChanges`, 7>>;
|
|
4728
4730
|
interface GetPostOptions {
|
|
4729
4731
|
/**
|
|
4730
4732
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
@@ -4744,6 +4746,7 @@ interface GetPostOptions {
|
|
|
4744
4746
|
* @param slug - Slug of the post to retrieve.
|
|
4745
4747
|
* @public
|
|
4746
4748
|
* @requiredField slug
|
|
4749
|
+
* @param options - Options specifying which fields to return.
|
|
4747
4750
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4748
4751
|
* @applicableIdentity APP
|
|
4749
4752
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
|
|
@@ -4771,6 +4774,7 @@ interface GetPostBySlugOptions {
|
|
|
4771
4774
|
* - `paging.limit` is `50`.
|
|
4772
4775
|
* - `paging.offset` is `0`.
|
|
4773
4776
|
* @public
|
|
4777
|
+
* @param options - Sort, filter, and paging options.
|
|
4774
4778
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4775
4779
|
* @applicableIdentity APP
|
|
4776
4780
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
|
|
@@ -4841,18 +4845,26 @@ interface ListPostsOptions {
|
|
|
4841
4845
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4842
4846
|
}
|
|
4843
4847
|
/**
|
|
4844
|
-
*
|
|
4848
|
+
* Creates a query to retrieve a list of posts.
|
|
4845
4849
|
*
|
|
4846
|
-
* Query Posts runs with these defaults, which you can override:
|
|
4847
|
-
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
|
4848
|
-
* - `paging.limit` is `50`.
|
|
4849
|
-
* - `paging.offset` is `0`.
|
|
4850
4850
|
*
|
|
4851
|
-
*
|
|
4852
|
-
*
|
|
4853
|
-
*
|
|
4854
|
-
*
|
|
4851
|
+
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
|
4852
|
+
*
|
|
4853
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
4854
|
+
*
|
|
4855
|
+
* 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.
|
|
4856
|
+
*
|
|
4857
|
+
* `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
|
|
4858
|
+
* + `limit(50)`
|
|
4859
|
+
* + `descending('firstPublishedDate')`
|
|
4860
|
+
*
|
|
4861
|
+
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
|
4862
|
+
*
|
|
4863
|
+
* To learn how to query posts, refer to the table below.
|
|
4864
|
+
*
|
|
4865
|
+
* 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`.
|
|
4855
4866
|
* @public
|
|
4867
|
+
* @param options - Options specifying which fields to return.
|
|
4856
4868
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4857
4869
|
* @applicableIdentity APP
|
|
4858
4870
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
|
|
@@ -1733,8 +1733,8 @@ async function getPost2(postId, options) {
|
|
|
1733
1733
|
paths: [{ path: "post.media.wixMedia.videoV2" }]
|
|
1734
1734
|
}
|
|
1735
1735
|
]),
|
|
1736
|
-
["post.richContent"]
|
|
1737
|
-
)
|
|
1736
|
+
["post.richContent", "post.rich_content"]
|
|
1737
|
+
);
|
|
1738
1738
|
} catch (err) {
|
|
1739
1739
|
const transformedError = sdkTransformError(
|
|
1740
1740
|
err,
|
|
@@ -1781,7 +1781,7 @@ async function getPostBySlug2(slug, options) {
|
|
|
1781
1781
|
paths: [{ path: "post.media.wixMedia.videoV2" }]
|
|
1782
1782
|
}
|
|
1783
1783
|
]),
|
|
1784
|
-
["post.richContent"]
|
|
1784
|
+
["post.richContent", "post.rich_content"]
|
|
1785
1785
|
);
|
|
1786
1786
|
} catch (err) {
|
|
1787
1787
|
const transformedError = sdkTransformError(
|
|
@@ -1840,7 +1840,7 @@ async function listPosts2(options) {
|
|
|
1840
1840
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1841
1841
|
}
|
|
1842
1842
|
]),
|
|
1843
|
-
["posts.richContent"]
|
|
1843
|
+
["posts.richContent", "posts.rich_content"]
|
|
1844
1844
|
);
|
|
1845
1845
|
} catch (err) {
|
|
1846
1846
|
const transformedError = sdkTransformError(
|
|
@@ -1910,7 +1910,7 @@ function queryPosts2(options) {
|
|
|
1910
1910
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1911
1911
|
}
|
|
1912
1912
|
]),
|
|
1913
|
-
["posts.richContent"]
|
|
1913
|
+
["posts.richContent", "posts.rich_content"]
|
|
1914
1914
|
);
|
|
1915
1915
|
return {
|
|
1916
1916
|
items: transformedData?.posts,
|
|
@@ -1958,7 +1958,7 @@ async function typedQueryPosts(query, options) {
|
|
|
1958
1958
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1959
1959
|
}
|
|
1960
1960
|
]),
|
|
1961
|
-
["posts.richContent"]
|
|
1961
|
+
["posts.richContent", "posts.rich_content"]
|
|
1962
1962
|
);
|
|
1963
1963
|
} catch (err) {
|
|
1964
1964
|
const transformedError = sdkTransformError(
|