@wix/auto_sdk_blog_posts 1.0.191 → 1.0.192

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.
@@ -4456,14 +4456,13 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
4456
4456
  /**
4457
4457
  * Retrieves the number of published posts per month within a specified time range.
4458
4458
  *
4459
- *
4460
- * The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
4461
- *
4462
- * 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.
4463
- *
4464
- * >**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.
4459
+ * The time range is set using the `rangeStart` and `months` properties.
4460
+ * The time range always starts on the 1st day of the month set in `rangeStart` and
4461
+ * includes the number of `months` following `rangeStart`.
4462
+ * For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
4463
+ * 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.
4464
+ * > 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.
4465
4465
  * @public
4466
- * @param options - Options specifying time frame, sort, and filter.
4467
4466
  * @permissionId BLOG.READ-PUBLICATION
4468
4467
  * @applicableIdentity APP
4469
4468
  * @returns Get Blog Post Count Stats response
@@ -4504,7 +4503,6 @@ interface QueryPostCountStatsOptions {
4504
4503
  /**
4505
4504
  * Retrieves the total amount of published posts of the blog.
4506
4505
  * @public
4507
- * @param options - Language Options.
4508
4506
  * @permissionId BLOG.READ-PUBLICATION
4509
4507
  * @applicableIdentity APP
4510
4508
  * @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
@@ -4525,12 +4523,12 @@ interface GetTotalPostsOptions {
4525
4523
  * @param postId - Post ID.
4526
4524
  * @public
4527
4525
  * @requiredField postId
4528
- * @param options - Options specifying which fields to return.
4529
4526
  * @permissionId BLOG.READ-PUBLICATION
4530
4527
  * @applicableIdentity APP
4528
+ * @returns Retrieved post info.
4531
4529
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
4532
4530
  */
4533
- 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`, 5>>;
4531
+ 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`, 4>>;
4534
4532
  interface GetPostOptions {
4535
4533
  /**
4536
4534
  * List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
@@ -4550,7 +4548,6 @@ interface GetPostOptions {
4550
4548
  * @param slug - Slug of the post to retrieve.
4551
4549
  * @public
4552
4550
  * @requiredField slug
4553
- * @param options - Options specifying which fields to return.
4554
4551
  * @permissionId BLOG.READ-PUBLICATION
4555
4552
  * @applicableIdentity APP
4556
4553
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
@@ -4578,7 +4575,6 @@ interface GetPostBySlugOptions {
4578
4575
  * - `paging.limit` is `50`.
4579
4576
  * - `paging.offset` is `0`.
4580
4577
  * @public
4581
- * @param options - Sort, filter, and paging options.
4582
4578
  * @permissionId BLOG.READ-PUBLICATION
4583
4579
  * @applicableIdentity APP
4584
4580
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
@@ -4649,26 +4645,18 @@ interface ListPostsOptions {
4649
4645
  fieldsets?: PostFieldFieldWithLiterals[];
4650
4646
  }
4651
4647
  /**
4652
- * Creates a query to retrieve a list of posts.
4653
- *
4654
- *
4655
- * The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
4656
- *
4657
- * The returned object contains the query definition which is typically used to run the query using the `find()` function.
4648
+ * Retrieves a list of up to 100 posts, given the provided paging, filtering, and sorting.
4658
4649
  *
4659
- * 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.
4660
- *
4661
- * `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
4662
- * + `limit(50)`
4663
- * + `descending('firstPublishedDate')`
4664
- *
4665
- * Note that the default limit is `'50'`, but the max limit is `'100'`.
4666
- *
4667
- * To learn how to query posts, refer to the table below.
4650
+ * Query Posts runs with these defaults, which you can override:
4651
+ * - `firstPublishedDate` is sorted in descending order, with pinned posts first.
4652
+ * - `paging.limit` is `50`.
4653
+ * - `paging.offset` is `0`.
4668
4654
  *
4669
- * 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`.
4655
+ * To learn about working with _Query_ endpoints, see
4656
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
4657
+ * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
4658
+ * [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
4670
4659
  * @public
4671
- * @param options - Options specifying which fields to return.
4672
4660
  * @permissionId BLOG.READ-PUBLICATION
4673
4661
  * @applicableIdentity APP
4674
4662
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
@@ -1910,8 +1910,8 @@ async function getPost2(postId, options) {
1910
1910
  paths: TRANSFORM_PATHS_22
1911
1911
  }
1912
1912
  ]),
1913
- ["post.richContent", "post.rich_content"]
1914
- );
1913
+ ["post.richContent"]
1914
+ )?.post;
1915
1915
  } catch (err) {
1916
1916
  const transformedError = (0, import_transform_error.transformError)(
1917
1917
  err,
@@ -1955,7 +1955,7 @@ async function getPostBySlug2(slug, options) {
1955
1955
  paths: TRANSFORM_PATHS_22
1956
1956
  }
1957
1957
  ]),
1958
- ["post.richContent", "post.rich_content"]
1958
+ ["post.richContent"]
1959
1959
  );
1960
1960
  } catch (err) {
1961
1961
  const transformedError = (0, import_transform_error.transformError)(
@@ -2011,7 +2011,7 @@ async function listPosts2(options) {
2011
2011
  paths: TRANSFORM_PATHS_52
2012
2012
  }
2013
2013
  ]),
2014
- ["posts.richContent", "posts.rich_content"]
2014
+ ["posts.richContent"]
2015
2015
  );
2016
2016
  } catch (err) {
2017
2017
  const transformedError = (0, import_transform_error.transformError)(
@@ -2078,7 +2078,7 @@ function queryPosts2(options) {
2078
2078
  paths: TRANSFORM_PATHS_52
2079
2079
  }
2080
2080
  ]),
2081
- ["posts.richContent", "posts.rich_content"]
2081
+ ["posts.richContent"]
2082
2082
  );
2083
2083
  return {
2084
2084
  items: transformedData?.posts,
@@ -2123,7 +2123,7 @@ async function typedQueryPosts(query, options) {
2123
2123
  paths: TRANSFORM_PATHS_52
2124
2124
  }
2125
2125
  ]),
2126
- ["posts.richContent", "posts.rich_content"]
2126
+ ["posts.richContent"]
2127
2127
  );
2128
2128
  } catch (err) {
2129
2129
  const transformedError = (0, import_transform_error.transformError)(