@wix/auto_sdk_blog_posts 1.0.129 → 1.0.130

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.
@@ -3874,13 +3874,14 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
3874
3874
  /**
3875
3875
  * Retrieves the number of published posts per month within a specified time range.
3876
3876
  *
3877
- * The time range is set using the `rangeStart` and `months` properties.
3878
- * The time range always starts on the 1st day of the month set in `rangeStart` and
3879
- * includes the number of `months` following `rangeStart`.
3880
- * For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
3881
- * 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.
3882
- * > 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.
3877
+ *
3878
+ * The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
3879
+ *
3880
+ * 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.
3881
+ *
3882
+ * >**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.
3883
3883
  * @public
3884
+ * @param options - Options specifying time frame, sort, and filter.
3884
3885
  * @permissionId BLOG.READ-PUBLICATION
3885
3886
  * @applicableIdentity APP
3886
3887
  * @returns Get Blog Post Count Stats response
@@ -3921,6 +3922,7 @@ interface QueryPostCountStatsOptions {
3921
3922
  /**
3922
3923
  * Retrieves the total amount of published posts of the blog.
3923
3924
  * @public
3925
+ * @param options - Language Options.
3924
3926
  * @permissionId BLOG.READ-PUBLICATION
3925
3927
  * @applicableIdentity APP
3926
3928
  * @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
@@ -3941,12 +3943,12 @@ interface GetTotalPostsOptions {
3941
3943
  * @param postId - Post ID.
3942
3944
  * @public
3943
3945
  * @requiredField postId
3946
+ * @param options - Options specifying which fields to return.
3944
3947
  * @permissionId BLOG.READ-PUBLICATION
3945
3948
  * @applicableIdentity APP
3946
- * @returns Retrieved post info.
3947
3949
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
3948
3950
  */
3949
- 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>>;
3951
+ 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>>;
3950
3952
  interface GetPostOptions {
3951
3953
  /**
3952
3954
  * List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
@@ -3966,6 +3968,7 @@ interface GetPostOptions {
3966
3968
  * @param slug - Slug of the post to retrieve.
3967
3969
  * @public
3968
3970
  * @requiredField slug
3971
+ * @param options - Options specifying which fields to return.
3969
3972
  * @permissionId BLOG.READ-PUBLICATION
3970
3973
  * @applicableIdentity APP
3971
3974
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
@@ -3993,6 +3996,7 @@ interface GetPostBySlugOptions {
3993
3996
  * - `paging.limit` is `50`.
3994
3997
  * - `paging.offset` is `0`.
3995
3998
  * @public
3999
+ * @param options - Sort, filter, and paging options.
3996
4000
  * @permissionId BLOG.READ-PUBLICATION
3997
4001
  * @applicableIdentity APP
3998
4002
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
@@ -4063,18 +4067,26 @@ interface ListPostsOptions {
4063
4067
  fieldsets?: PostFieldFieldWithLiterals[];
4064
4068
  }
4065
4069
  /**
4066
- * Retrieves a list of up to 100 posts, given the provided paging, filtering, and sorting.
4070
+ * Creates a query to retrieve a list of posts.
4067
4071
  *
4068
- * Query Posts runs with these defaults, which you can override:
4069
- * - `firstPublishedDate` is sorted in descending order, with pinned posts first.
4070
- * - `paging.limit` is `50`.
4071
- * - `paging.offset` is `0`.
4072
4072
  *
4073
- * To learn about working with _Query_ endpoints, see
4074
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
4075
- * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
4076
- * [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
4073
+ * The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
4074
+ *
4075
+ * The returned object contains the query definition which is typically used to run the query using the `find()` function.
4076
+ *
4077
+ * 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.
4078
+ *
4079
+ * `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
4080
+ * + `limit(50)`
4081
+ * + `descending('firstPublishedDate')`
4082
+ *
4083
+ * Note that the default limit is `'50'`, but the max limit is `'100'`.
4084
+ *
4085
+ * To learn how to query posts, refer to the table below.
4086
+ *
4087
+ * 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`.
4077
4088
  * @public
4089
+ * @param options - Options specifying which fields to return.
4078
4090
  * @permissionId BLOG.READ-PUBLICATION
4079
4091
  * @applicableIdentity APP
4080
4092
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
@@ -136,6 +136,10 @@ function resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl(opts)
136
136
  {
137
137
  srcPath: "/_api/communities-blog-node-api/v3/posts",
138
138
  destPath: "/v3/posts"
139
+ },
140
+ {
141
+ srcPath: "/_api/post-service-api-proxy/v3/bulk/posts",
142
+ destPath: "/v3/bulk/posts"
139
143
  }
140
144
  ],
141
145
  "*.dev.wix-code.com": [
@@ -1329,8 +1333,8 @@ async function getPost2(postId, options) {
1329
1333
  paths: [{ path: "post.media.wixMedia.videoV2" }]
1330
1334
  }
1331
1335
  ]),
1332
- ["post.richContent"]
1333
- )?.post;
1336
+ ["post.richContent", "post.rich_content"]
1337
+ );
1334
1338
  } catch (err) {
1335
1339
  const transformedError = (0, import_transform_error.transformError)(
1336
1340
  err,
@@ -1377,7 +1381,7 @@ async function getPostBySlug2(slug, options) {
1377
1381
  paths: [{ path: "post.media.wixMedia.videoV2" }]
1378
1382
  }
1379
1383
  ]),
1380
- ["post.richContent"]
1384
+ ["post.richContent", "post.rich_content"]
1381
1385
  );
1382
1386
  } catch (err) {
1383
1387
  const transformedError = (0, import_transform_error.transformError)(
@@ -1436,7 +1440,7 @@ async function listPosts2(options) {
1436
1440
  paths: [{ path: "posts.media.wixMedia.videoV2" }]
1437
1441
  }
1438
1442
  ]),
1439
- ["posts.richContent"]
1443
+ ["posts.richContent", "posts.rich_content"]
1440
1444
  );
1441
1445
  } catch (err) {
1442
1446
  const transformedError = (0, import_transform_error.transformError)(
@@ -1506,7 +1510,7 @@ function queryPosts2(options) {
1506
1510
  paths: [{ path: "posts.media.wixMedia.videoV2" }]
1507
1511
  }
1508
1512
  ]),
1509
- ["posts.richContent"]
1513
+ ["posts.richContent", "posts.rich_content"]
1510
1514
  );
1511
1515
  return {
1512
1516
  items: transformedData?.posts,
@@ -1554,7 +1558,7 @@ async function typedQueryPosts(query, options) {
1554
1558
  paths: [{ path: "posts.media.wixMedia.videoV2" }]
1555
1559
  }
1556
1560
  ]),
1557
- ["posts.richContent"]
1561
+ ["posts.richContent", "posts.rich_content"]
1558
1562
  );
1559
1563
  } catch (err) {
1560
1564
  const transformedError = (0, import_transform_error.transformError)(