@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
|
|
@@ -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
|
-
)
|
|
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)(
|