@wix/auto_sdk_blog_posts 1.0.174 → 1.0.175
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 +11 -15
- package/build/cjs/index.js +11 -16
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +17 -29
- 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 +82 -84
- package/build/cjs/schemas.js +147 -153
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +11 -15
- package/build/es/index.mjs +11 -16
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +17 -29
- 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 +82 -84
- package/build/es/schemas.mjs +147 -153
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +11 -15
- package/build/internal/cjs/index.js +11 -16
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +17 -29
- 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 +82 -84
- package/build/internal/cjs/schemas.js +147 -153
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +11 -15
- package/build/internal/es/index.mjs +11 -16
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +17 -29
- 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 +82 -84
- package/build/internal/es/schemas.mjs +147 -153
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -4756,14 +4756,13 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
|
|
|
4756
4756
|
/**
|
|
4757
4757
|
* Retrieves the number of published posts per month within a specified time range.
|
|
4758
4758
|
*
|
|
4759
|
-
*
|
|
4760
|
-
* The
|
|
4761
|
-
*
|
|
4762
|
-
*
|
|
4763
|
-
*
|
|
4764
|
-
*
|
|
4759
|
+
* The time range is set using the `rangeStart` and `months` properties.
|
|
4760
|
+
* The time range always starts on the 1st day of the month set in `rangeStart` and
|
|
4761
|
+
* includes the number of `months` following `rangeStart`.
|
|
4762
|
+
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
|
4763
|
+
* the time range will be from `'2022-03-01'` until `'2022-06-30'`. The time range always ends on the last day of the month.
|
|
4764
|
+
* > Note: If there are no published posts in a month within the time range, 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.
|
|
4765
4765
|
* @public
|
|
4766
|
-
* @param options - Options specifying time frame, sort, and filter.
|
|
4767
4766
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4768
4767
|
* @applicableIdentity APP
|
|
4769
4768
|
* @returns Get Blog Post Count Stats response
|
|
@@ -4804,7 +4803,6 @@ interface QueryPostCountStatsOptions {
|
|
|
4804
4803
|
/**
|
|
4805
4804
|
* Retrieves the total amount of published posts of the blog.
|
|
4806
4805
|
* @public
|
|
4807
|
-
* @param options - Language Options.
|
|
4808
4806
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4809
4807
|
* @applicableIdentity APP
|
|
4810
4808
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
|
|
@@ -4825,12 +4823,12 @@ interface GetTotalPostsOptions {
|
|
|
4825
4823
|
* @param postId - Post ID.
|
|
4826
4824
|
* @public
|
|
4827
4825
|
* @requiredField postId
|
|
4828
|
-
* @param options - Options specifying which fields to return.
|
|
4829
4826
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4830
4827
|
* @applicableIdentity APP
|
|
4828
|
+
* @returns Retrieved post info.
|
|
4831
4829
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
|
4832
4830
|
*/
|
|
4833
|
-
declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<
|
|
4831
|
+
declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<Post, `_id` | `title` | `excerpt` | `slug` | `featured` | `pinned` | `categoryIds` | `memberId` | `hashtags` | `commentingEnabled` | `minutesToRead` | `tagIds` | `relatedPostIds` | `pricingPlanIds` | `seoData.tags` | `seoData.tags.${number}.type` | `seoData.tags.${number}.children` | `seoData.tags.${number}.custom` | `seoData.tags.${number}.disabled` | `seoData.settings.preventAutoRedirect` | `seoData.settings.keywords` | `seoData.settings.keywords.${number}.term` | `seoData.settings.keywords.${number}.isMain` | `preview` | `moderationDetails.submittedBy` | `moderationDetails.status` | `media.embedMedia.thumbnail.url` | `media.embedMedia.thumbnail.width` | `media.embedMedia.thumbnail.height` | `media.embedMedia.video.url` | `media.embedMedia.video.width` | `media.embedMedia.video.height` | `media.displayed` | `media.custom` | `hasUnpublishedChanges`, 6>>;
|
|
4834
4832
|
interface GetPostOptions {
|
|
4835
4833
|
/**
|
|
4836
4834
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
@@ -4850,7 +4848,6 @@ interface GetPostOptions {
|
|
|
4850
4848
|
* @param slug - Slug of the post to retrieve.
|
|
4851
4849
|
* @public
|
|
4852
4850
|
* @requiredField slug
|
|
4853
|
-
* @param options - Options specifying which fields to return.
|
|
4854
4851
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4855
4852
|
* @applicableIdentity APP
|
|
4856
4853
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
|
|
@@ -4878,7 +4875,6 @@ interface GetPostBySlugOptions {
|
|
|
4878
4875
|
* - `paging.limit` is `50`.
|
|
4879
4876
|
* - `paging.offset` is `0`.
|
|
4880
4877
|
* @public
|
|
4881
|
-
* @param options - Sort, filter, and paging options.
|
|
4882
4878
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4883
4879
|
* @applicableIdentity APP
|
|
4884
4880
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
|
|
@@ -4949,26 +4945,18 @@ interface ListPostsOptions {
|
|
|
4949
4945
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4950
4946
|
}
|
|
4951
4947
|
/**
|
|
4952
|
-
*
|
|
4953
|
-
*
|
|
4954
|
-
*
|
|
4955
|
-
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
|
4956
|
-
*
|
|
4957
|
-
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
4948
|
+
* Retrieves a list of up to 100 posts, given the provided paging, filtering, and sorting.
|
|
4958
4949
|
*
|
|
4959
|
-
*
|
|
4960
|
-
*
|
|
4961
|
-
* `
|
|
4962
|
-
*
|
|
4963
|
-
* + `descending('firstPublishedDate')`
|
|
4964
|
-
*
|
|
4965
|
-
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
|
4966
|
-
*
|
|
4967
|
-
* To learn how to query posts, refer to the table below.
|
|
4950
|
+
* Query Posts runs with these defaults, which you can override:
|
|
4951
|
+
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
|
4952
|
+
* - `paging.limit` is `50`.
|
|
4953
|
+
* - `paging.offset` is `0`.
|
|
4968
4954
|
*
|
|
4969
|
-
*
|
|
4955
|
+
* To learn about working with _Query_ endpoints, see
|
|
4956
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
|
|
4957
|
+
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
|
|
4958
|
+
* [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
4970
4959
|
* @public
|
|
4971
|
-
* @param options - Options specifying which fields to return.
|
|
4972
4960
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4973
4961
|
* @applicableIdentity APP
|
|
4974
4962
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
|
|
@@ -1868,8 +1868,8 @@ async function getPost2(postId, options) {
|
|
|
1868
1868
|
paths: [{ path: "post.media.wixMedia.videoV2" }]
|
|
1869
1869
|
}
|
|
1870
1870
|
]),
|
|
1871
|
-
["post.richContent"
|
|
1872
|
-
);
|
|
1871
|
+
["post.richContent"]
|
|
1872
|
+
)?.post;
|
|
1873
1873
|
} catch (err) {
|
|
1874
1874
|
const transformedError = (0, import_transform_error.transformError)(
|
|
1875
1875
|
err,
|
|
@@ -1916,7 +1916,7 @@ async function getPostBySlug2(slug, options) {
|
|
|
1916
1916
|
paths: [{ path: "post.media.wixMedia.videoV2" }]
|
|
1917
1917
|
}
|
|
1918
1918
|
]),
|
|
1919
|
-
["post.richContent"
|
|
1919
|
+
["post.richContent"]
|
|
1920
1920
|
);
|
|
1921
1921
|
} catch (err) {
|
|
1922
1922
|
const transformedError = (0, import_transform_error.transformError)(
|
|
@@ -1975,7 +1975,7 @@ async function listPosts2(options) {
|
|
|
1975
1975
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1976
1976
|
}
|
|
1977
1977
|
]),
|
|
1978
|
-
["posts.richContent"
|
|
1978
|
+
["posts.richContent"]
|
|
1979
1979
|
);
|
|
1980
1980
|
} catch (err) {
|
|
1981
1981
|
const transformedError = (0, import_transform_error.transformError)(
|
|
@@ -2045,7 +2045,7 @@ function queryPosts2(options) {
|
|
|
2045
2045
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
2046
2046
|
}
|
|
2047
2047
|
]),
|
|
2048
|
-
["posts.richContent"
|
|
2048
|
+
["posts.richContent"]
|
|
2049
2049
|
);
|
|
2050
2050
|
return {
|
|
2051
2051
|
items: transformedData?.posts,
|
|
@@ -2093,7 +2093,7 @@ async function typedQueryPosts(query, options) {
|
|
|
2093
2093
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
2094
2094
|
}
|
|
2095
2095
|
]),
|
|
2096
|
-
["posts.richContent"
|
|
2096
|
+
["posts.richContent"]
|
|
2097
2097
|
);
|
|
2098
2098
|
} catch (err) {
|
|
2099
2099
|
const transformedError = (0, import_transform_error.transformError)(
|