@wix/auto_sdk_blog_posts 1.0.144 → 1.0.145

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.
@@ -4161,13 +4161,14 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
4161
4161
  /**
4162
4162
  * Retrieves the number of published posts per month within a specified time range.
4163
4163
  *
4164
- * The time range is set using the `rangeStart` and `months` properties.
4165
- * The time range always starts on the 1st day of the month set in `rangeStart` and
4166
- * includes the number of `months` following `rangeStart`.
4167
- * For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
4168
- * 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.
4169
- * > 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.
4164
+ *
4165
+ * The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
4166
+ *
4167
+ * 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.
4168
+ *
4169
+ * >**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.
4170
4170
  * @public
4171
+ * @param options - Options specifying time frame, sort, and filter.
4171
4172
  * @permissionId BLOG.READ-PUBLICATION
4172
4173
  * @applicableIdentity APP
4173
4174
  * @returns Get Blog Post Count Stats response
@@ -4208,6 +4209,7 @@ interface QueryPostCountStatsOptions {
4208
4209
  /**
4209
4210
  * Retrieves the total amount of published posts of the blog.
4210
4211
  * @public
4212
+ * @param options - Language Options.
4211
4213
  * @permissionId BLOG.READ-PUBLICATION
4212
4214
  * @applicableIdentity APP
4213
4215
  * @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
@@ -4228,12 +4230,12 @@ interface GetTotalPostsOptions {
4228
4230
  * @param postId - Post ID.
4229
4231
  * @public
4230
4232
  * @requiredField postId
4233
+ * @param options - Options specifying which fields to return.
4231
4234
  * @permissionId BLOG.READ-PUBLICATION
4232
4235
  * @applicableIdentity APP
4233
- * @returns Retrieved post info.
4234
4236
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
4235
4237
  */
4236
- 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>>;
4238
+ 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>>;
4237
4239
  interface GetPostOptions {
4238
4240
  /**
4239
4241
  * List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
@@ -4253,6 +4255,7 @@ interface GetPostOptions {
4253
4255
  * @param slug - Slug of the post to retrieve.
4254
4256
  * @public
4255
4257
  * @requiredField slug
4258
+ * @param options - Options specifying which fields to return.
4256
4259
  * @permissionId BLOG.READ-PUBLICATION
4257
4260
  * @applicableIdentity APP
4258
4261
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
@@ -4280,6 +4283,7 @@ interface GetPostBySlugOptions {
4280
4283
  * - `paging.limit` is `50`.
4281
4284
  * - `paging.offset` is `0`.
4282
4285
  * @public
4286
+ * @param options - Sort, filter, and paging options.
4283
4287
  * @permissionId BLOG.READ-PUBLICATION
4284
4288
  * @applicableIdentity APP
4285
4289
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
@@ -4350,18 +4354,26 @@ interface ListPostsOptions {
4350
4354
  fieldsets?: PostFieldFieldWithLiterals[];
4351
4355
  }
4352
4356
  /**
4353
- * Retrieves a list of up to 100 posts, given the provided paging, filtering, and sorting.
4357
+ * Creates a query to retrieve a list of posts.
4354
4358
  *
4355
- * Query Posts runs with these defaults, which you can override:
4356
- * - `firstPublishedDate` is sorted in descending order, with pinned posts first.
4357
- * - `paging.limit` is `50`.
4358
- * - `paging.offset` is `0`.
4359
4359
  *
4360
- * To learn about working with _Query_ endpoints, see
4361
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
4362
- * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
4363
- * [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
4360
+ * The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
4361
+ *
4362
+ * The returned object contains the query definition which is typically used to run the query using the `find()` function.
4363
+ *
4364
+ * 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.
4365
+ *
4366
+ * `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
4367
+ * + `limit(50)`
4368
+ * + `descending('firstPublishedDate')`
4369
+ *
4370
+ * Note that the default limit is `'50'`, but the max limit is `'100'`.
4371
+ *
4372
+ * To learn how to query posts, refer to the table below.
4373
+ *
4374
+ * 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`.
4364
4375
  * @public
4376
+ * @param options - Options specifying which fields to return.
4365
4377
  * @permissionId BLOG.READ-PUBLICATION
4366
4378
  * @applicableIdentity APP
4367
4379
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
@@ -1515,8 +1515,8 @@ async function getPost2(postId, options) {
1515
1515
  paths: [{ path: "post.media.wixMedia.videoV2" }]
1516
1516
  }
1517
1517
  ]),
1518
- ["post.richContent"]
1519
- )?.post;
1518
+ ["post.richContent", "post.rich_content"]
1519
+ );
1520
1520
  } catch (err) {
1521
1521
  const transformedError = sdkTransformError(
1522
1522
  err,
@@ -1563,7 +1563,7 @@ async function getPostBySlug2(slug, options) {
1563
1563
  paths: [{ path: "post.media.wixMedia.videoV2" }]
1564
1564
  }
1565
1565
  ]),
1566
- ["post.richContent"]
1566
+ ["post.richContent", "post.rich_content"]
1567
1567
  );
1568
1568
  } catch (err) {
1569
1569
  const transformedError = sdkTransformError(
@@ -1622,7 +1622,7 @@ async function listPosts2(options) {
1622
1622
  paths: [{ path: "posts.media.wixMedia.videoV2" }]
1623
1623
  }
1624
1624
  ]),
1625
- ["posts.richContent"]
1625
+ ["posts.richContent", "posts.rich_content"]
1626
1626
  );
1627
1627
  } catch (err) {
1628
1628
  const transformedError = sdkTransformError(
@@ -1692,7 +1692,7 @@ function queryPosts2(options) {
1692
1692
  paths: [{ path: "posts.media.wixMedia.videoV2" }]
1693
1693
  }
1694
1694
  ]),
1695
- ["posts.richContent"]
1695
+ ["posts.richContent", "posts.rich_content"]
1696
1696
  );
1697
1697
  return {
1698
1698
  items: transformedData?.posts,
@@ -1740,7 +1740,7 @@ async function typedQueryPosts(query, options) {
1740
1740
  paths: [{ path: "posts.media.wixMedia.videoV2" }]
1741
1741
  }
1742
1742
  ]),
1743
- ["posts.richContent"]
1743
+ ["posts.richContent", "posts.rich_content"]
1744
1744
  );
1745
1745
  } catch (err) {
1746
1746
  const transformedError = sdkTransformError(