@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
|
@@ -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
|
-
*
|
|
3878
|
-
* The
|
|
3879
|
-
*
|
|
3880
|
-
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
|
3881
|
-
*
|
|
3882
|
-
*
|
|
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<
|
|
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
|
-
*
|
|
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
|
-
*
|
|
4074
|
-
*
|
|
4075
|
-
*
|
|
4076
|
-
*
|
|
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
|
|
@@ -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(
|