@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.
- package/build/cjs/index.d.ts +15 -11
- package/build/cjs/index.js +20 -11
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +29 -17
- package/build/cjs/index.typings.js +10 -6
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +4 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +15 -11
- package/build/es/index.mjs +20 -11
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +29 -17
- package/build/es/index.typings.mjs +10 -6
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +4 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +15 -11
- package/build/internal/cjs/index.js +20 -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 +10 -6
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.js +4 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +15 -11
- package/build/internal/es/index.mjs +20 -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 +10 -6
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.mjs +4 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -3867,13 +3867,14 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
|
|
|
3867
3867
|
/**
|
|
3868
3868
|
* Retrieves the number of published posts per month within a specified time range.
|
|
3869
3869
|
*
|
|
3870
|
-
*
|
|
3871
|
-
* The
|
|
3872
|
-
*
|
|
3873
|
-
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
|
3874
|
-
*
|
|
3875
|
-
*
|
|
3870
|
+
*
|
|
3871
|
+
* The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
|
|
3872
|
+
*
|
|
3873
|
+
* 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.
|
|
3874
|
+
*
|
|
3875
|
+
* >**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.
|
|
3876
3876
|
* @public
|
|
3877
|
+
* @param options - Options specifying time frame, sort, and filter.
|
|
3877
3878
|
* @permissionId BLOG.READ-PUBLICATION
|
|
3878
3879
|
* @applicableIdentity APP
|
|
3879
3880
|
* @returns Get Blog Post Count Stats response
|
|
@@ -3914,6 +3915,7 @@ interface QueryPostCountStatsOptions {
|
|
|
3914
3915
|
/**
|
|
3915
3916
|
* Retrieves the total amount of published posts of the blog.
|
|
3916
3917
|
* @public
|
|
3918
|
+
* @param options - Language Options.
|
|
3917
3919
|
* @permissionId BLOG.READ-PUBLICATION
|
|
3918
3920
|
* @applicableIdentity APP
|
|
3919
3921
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
|
|
@@ -3934,12 +3936,12 @@ interface GetTotalPostsOptions {
|
|
|
3934
3936
|
* @param postId - Post ID.
|
|
3935
3937
|
* @public
|
|
3936
3938
|
* @requiredField postId
|
|
3939
|
+
* @param options - Options specifying which fields to return.
|
|
3937
3940
|
* @permissionId BLOG.READ-PUBLICATION
|
|
3938
3941
|
* @applicableIdentity APP
|
|
3939
|
-
* @returns Retrieved post info.
|
|
3940
3942
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
|
3941
3943
|
*/
|
|
3942
|
-
declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<
|
|
3944
|
+
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>>;
|
|
3943
3945
|
interface GetPostOptions {
|
|
3944
3946
|
/**
|
|
3945
3947
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
@@ -3959,6 +3961,7 @@ interface GetPostOptions {
|
|
|
3959
3961
|
* @param slug - Slug of the post to retrieve.
|
|
3960
3962
|
* @public
|
|
3961
3963
|
* @requiredField slug
|
|
3964
|
+
* @param options - Options specifying which fields to return.
|
|
3962
3965
|
* @permissionId BLOG.READ-PUBLICATION
|
|
3963
3966
|
* @applicableIdentity APP
|
|
3964
3967
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
|
|
@@ -3986,6 +3989,7 @@ interface GetPostBySlugOptions {
|
|
|
3986
3989
|
* - `paging.limit` is `50`.
|
|
3987
3990
|
* - `paging.offset` is `0`.
|
|
3988
3991
|
* @public
|
|
3992
|
+
* @param options - Sort, filter, and paging options.
|
|
3989
3993
|
* @permissionId BLOG.READ-PUBLICATION
|
|
3990
3994
|
* @applicableIdentity APP
|
|
3991
3995
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
|
|
@@ -4056,18 +4060,26 @@ interface ListPostsOptions {
|
|
|
4056
4060
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4057
4061
|
}
|
|
4058
4062
|
/**
|
|
4059
|
-
*
|
|
4063
|
+
* Creates a query to retrieve a list of posts.
|
|
4060
4064
|
*
|
|
4061
|
-
* Query Posts runs with these defaults, which you can override:
|
|
4062
|
-
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
|
4063
|
-
* - `paging.limit` is `50`.
|
|
4064
|
-
* - `paging.offset` is `0`.
|
|
4065
4065
|
*
|
|
4066
|
-
*
|
|
4067
|
-
*
|
|
4068
|
-
*
|
|
4069
|
-
*
|
|
4066
|
+
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
|
4067
|
+
*
|
|
4068
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
4069
|
+
*
|
|
4070
|
+
* 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.
|
|
4071
|
+
*
|
|
4072
|
+
* `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
|
|
4073
|
+
* + `limit(50)`
|
|
4074
|
+
* + `descending('firstPublishedDate')`
|
|
4075
|
+
*
|
|
4076
|
+
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
|
4077
|
+
*
|
|
4078
|
+
* To learn how to query posts, refer to the table below.
|
|
4079
|
+
*
|
|
4080
|
+
* 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`.
|
|
4070
4081
|
* @public
|
|
4082
|
+
* @param options - Options specifying which fields to return.
|
|
4071
4083
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4072
4084
|
* @applicableIdentity APP
|
|
4073
4085
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
|
|
@@ -52,6 +52,10 @@ function resolveComWixpressNpmCommunitiesPlatformizedBlogV3PostServiceUrl(opts)
|
|
|
52
52
|
{
|
|
53
53
|
srcPath: "/_api/communities-blog-node-api/v3/posts",
|
|
54
54
|
destPath: "/v3/posts"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
srcPath: "/_api/post-service-api-proxy/v3/bulk/posts",
|
|
58
|
+
destPath: "/v3/bulk/posts"
|
|
55
59
|
}
|
|
56
60
|
],
|
|
57
61
|
"*.dev.wix-code.com": [
|
|
@@ -1245,8 +1249,8 @@ async function getPost2(postId, options) {
|
|
|
1245
1249
|
paths: [{ path: "post.media.wixMedia.videoV2" }]
|
|
1246
1250
|
}
|
|
1247
1251
|
]),
|
|
1248
|
-
["post.richContent"]
|
|
1249
|
-
)
|
|
1252
|
+
["post.richContent", "post.rich_content"]
|
|
1253
|
+
);
|
|
1250
1254
|
} catch (err) {
|
|
1251
1255
|
const transformedError = sdkTransformError(
|
|
1252
1256
|
err,
|
|
@@ -1293,7 +1297,7 @@ async function getPostBySlug2(slug, options) {
|
|
|
1293
1297
|
paths: [{ path: "post.media.wixMedia.videoV2" }]
|
|
1294
1298
|
}
|
|
1295
1299
|
]),
|
|
1296
|
-
["post.richContent"]
|
|
1300
|
+
["post.richContent", "post.rich_content"]
|
|
1297
1301
|
);
|
|
1298
1302
|
} catch (err) {
|
|
1299
1303
|
const transformedError = sdkTransformError(
|
|
@@ -1352,7 +1356,7 @@ async function listPosts2(options) {
|
|
|
1352
1356
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1353
1357
|
}
|
|
1354
1358
|
]),
|
|
1355
|
-
["posts.richContent"]
|
|
1359
|
+
["posts.richContent", "posts.rich_content"]
|
|
1356
1360
|
);
|
|
1357
1361
|
} catch (err) {
|
|
1358
1362
|
const transformedError = sdkTransformError(
|
|
@@ -1422,7 +1426,7 @@ function queryPosts2(options) {
|
|
|
1422
1426
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1423
1427
|
}
|
|
1424
1428
|
]),
|
|
1425
|
-
["posts.richContent"]
|
|
1429
|
+
["posts.richContent", "posts.rich_content"]
|
|
1426
1430
|
);
|
|
1427
1431
|
return {
|
|
1428
1432
|
items: transformedData?.posts,
|
|
@@ -1470,7 +1474,7 @@ async function typedQueryPosts(query, options) {
|
|
|
1470
1474
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1471
1475
|
}
|
|
1472
1476
|
]),
|
|
1473
|
-
["posts.richContent"]
|
|
1477
|
+
["posts.richContent", "posts.rich_content"]
|
|
1474
1478
|
);
|
|
1475
1479
|
} catch (err) {
|
|
1476
1480
|
const transformedError = sdkTransformError(
|