@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.
- package/build/cjs/index.d.ts +15 -11
- package/build/cjs/index.js +16 -11
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +29 -17
- package/build/cjs/index.typings.js +6 -6
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +2 -2
- package/build/es/index.d.mts +15 -11
- package/build/es/index.mjs +16 -11
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +29 -17
- package/build/es/index.typings.mjs +6 -6
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +2 -2
- package/build/internal/cjs/index.d.ts +15 -11
- package/build/internal/cjs/index.js +16 -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 +6 -6
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +2 -2
- package/build/internal/es/index.d.mts +15 -11
- package/build/internal/es/index.mjs +16 -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 +6 -6
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +2 -2
- package/package.json +2 -2
|
@@ -4154,13 +4154,14 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
|
|
|
4154
4154
|
/**
|
|
4155
4155
|
* Retrieves the number of published posts per month within a specified time range.
|
|
4156
4156
|
*
|
|
4157
|
-
*
|
|
4158
|
-
* The
|
|
4159
|
-
*
|
|
4160
|
-
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
|
4161
|
-
*
|
|
4162
|
-
*
|
|
4157
|
+
*
|
|
4158
|
+
* The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
|
|
4159
|
+
*
|
|
4160
|
+
* 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.
|
|
4161
|
+
*
|
|
4162
|
+
* >**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.
|
|
4163
4163
|
* @public
|
|
4164
|
+
* @param options - Options specifying time frame, sort, and filter.
|
|
4164
4165
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4165
4166
|
* @applicableIdentity APP
|
|
4166
4167
|
* @returns Get Blog Post Count Stats response
|
|
@@ -4201,6 +4202,7 @@ interface QueryPostCountStatsOptions {
|
|
|
4201
4202
|
/**
|
|
4202
4203
|
* Retrieves the total amount of published posts of the blog.
|
|
4203
4204
|
* @public
|
|
4205
|
+
* @param options - Language Options.
|
|
4204
4206
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4205
4207
|
* @applicableIdentity APP
|
|
4206
4208
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
|
|
@@ -4221,12 +4223,12 @@ interface GetTotalPostsOptions {
|
|
|
4221
4223
|
* @param postId - Post ID.
|
|
4222
4224
|
* @public
|
|
4223
4225
|
* @requiredField postId
|
|
4226
|
+
* @param options - Options specifying which fields to return.
|
|
4224
4227
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4225
4228
|
* @applicableIdentity APP
|
|
4226
|
-
* @returns Retrieved post info.
|
|
4227
4229
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
|
4228
4230
|
*/
|
|
4229
|
-
declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<
|
|
4231
|
+
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>>;
|
|
4230
4232
|
interface GetPostOptions {
|
|
4231
4233
|
/**
|
|
4232
4234
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
@@ -4246,6 +4248,7 @@ interface GetPostOptions {
|
|
|
4246
4248
|
* @param slug - Slug of the post to retrieve.
|
|
4247
4249
|
* @public
|
|
4248
4250
|
* @requiredField slug
|
|
4251
|
+
* @param options - Options specifying which fields to return.
|
|
4249
4252
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4250
4253
|
* @applicableIdentity APP
|
|
4251
4254
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
|
|
@@ -4273,6 +4276,7 @@ interface GetPostBySlugOptions {
|
|
|
4273
4276
|
* - `paging.limit` is `50`.
|
|
4274
4277
|
* - `paging.offset` is `0`.
|
|
4275
4278
|
* @public
|
|
4279
|
+
* @param options - Sort, filter, and paging options.
|
|
4276
4280
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4277
4281
|
* @applicableIdentity APP
|
|
4278
4282
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
|
|
@@ -4343,18 +4347,26 @@ interface ListPostsOptions {
|
|
|
4343
4347
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4344
4348
|
}
|
|
4345
4349
|
/**
|
|
4346
|
-
*
|
|
4350
|
+
* Creates a query to retrieve a list of posts.
|
|
4347
4351
|
*
|
|
4348
|
-
* Query Posts runs with these defaults, which you can override:
|
|
4349
|
-
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
|
4350
|
-
* - `paging.limit` is `50`.
|
|
4351
|
-
* - `paging.offset` is `0`.
|
|
4352
4352
|
*
|
|
4353
|
-
*
|
|
4354
|
-
*
|
|
4355
|
-
*
|
|
4356
|
-
*
|
|
4353
|
+
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
|
4354
|
+
*
|
|
4355
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
4356
|
+
*
|
|
4357
|
+
* 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.
|
|
4358
|
+
*
|
|
4359
|
+
* `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
|
|
4360
|
+
* + `limit(50)`
|
|
4361
|
+
* + `descending('firstPublishedDate')`
|
|
4362
|
+
*
|
|
4363
|
+
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
|
4364
|
+
*
|
|
4365
|
+
* To learn how to query posts, refer to the table below.
|
|
4366
|
+
*
|
|
4367
|
+
* 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`.
|
|
4357
4368
|
* @public
|
|
4369
|
+
* @param options - Options specifying which fields to return.
|
|
4358
4370
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4359
4371
|
* @applicableIdentity APP
|
|
4360
4372
|
* @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
|
-
)
|
|
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(
|