@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
|
@@ -4161,13 +4161,14 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
|
|
|
4161
4161
|
/**
|
|
4162
4162
|
* Retrieves the number of published posts per month within a specified time range.
|
|
4163
4163
|
*
|
|
4164
|
-
*
|
|
4165
|
-
* The
|
|
4166
|
-
*
|
|
4167
|
-
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
|
4168
|
-
*
|
|
4169
|
-
*
|
|
4164
|
+
*
|
|
4165
|
+
* The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
|
|
4166
|
+
*
|
|
4167
|
+
* 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.
|
|
4168
|
+
*
|
|
4169
|
+
* >**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.
|
|
4170
4170
|
* @public
|
|
4171
|
+
* @param options - Options specifying time frame, sort, and filter.
|
|
4171
4172
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4172
4173
|
* @applicableIdentity APP
|
|
4173
4174
|
* @returns Get Blog Post Count Stats response
|
|
@@ -4208,6 +4209,7 @@ interface QueryPostCountStatsOptions {
|
|
|
4208
4209
|
/**
|
|
4209
4210
|
* Retrieves the total amount of published posts of the blog.
|
|
4210
4211
|
* @public
|
|
4212
|
+
* @param options - Language Options.
|
|
4211
4213
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4212
4214
|
* @applicableIdentity APP
|
|
4213
4215
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
|
|
@@ -4228,12 +4230,12 @@ interface GetTotalPostsOptions {
|
|
|
4228
4230
|
* @param postId - Post ID.
|
|
4229
4231
|
* @public
|
|
4230
4232
|
* @requiredField postId
|
|
4233
|
+
* @param options - Options specifying which fields to return.
|
|
4231
4234
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4232
4235
|
* @applicableIdentity APP
|
|
4233
|
-
* @returns Retrieved post info.
|
|
4234
4236
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
|
4235
4237
|
*/
|
|
4236
|
-
declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<
|
|
4238
|
+
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>>;
|
|
4237
4239
|
interface GetPostOptions {
|
|
4238
4240
|
/**
|
|
4239
4241
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
@@ -4253,6 +4255,7 @@ interface GetPostOptions {
|
|
|
4253
4255
|
* @param slug - Slug of the post to retrieve.
|
|
4254
4256
|
* @public
|
|
4255
4257
|
* @requiredField slug
|
|
4258
|
+
* @param options - Options specifying which fields to return.
|
|
4256
4259
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4257
4260
|
* @applicableIdentity APP
|
|
4258
4261
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
|
|
@@ -4280,6 +4283,7 @@ interface GetPostBySlugOptions {
|
|
|
4280
4283
|
* - `paging.limit` is `50`.
|
|
4281
4284
|
* - `paging.offset` is `0`.
|
|
4282
4285
|
* @public
|
|
4286
|
+
* @param options - Sort, filter, and paging options.
|
|
4283
4287
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4284
4288
|
* @applicableIdentity APP
|
|
4285
4289
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
|
|
@@ -4350,18 +4354,26 @@ interface ListPostsOptions {
|
|
|
4350
4354
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4351
4355
|
}
|
|
4352
4356
|
/**
|
|
4353
|
-
*
|
|
4357
|
+
* Creates a query to retrieve a list of posts.
|
|
4354
4358
|
*
|
|
4355
|
-
* Query Posts runs with these defaults, which you can override:
|
|
4356
|
-
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
|
4357
|
-
* - `paging.limit` is `50`.
|
|
4358
|
-
* - `paging.offset` is `0`.
|
|
4359
4359
|
*
|
|
4360
|
-
*
|
|
4361
|
-
*
|
|
4362
|
-
*
|
|
4363
|
-
*
|
|
4360
|
+
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
|
4361
|
+
*
|
|
4362
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
4363
|
+
*
|
|
4364
|
+
* 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.
|
|
4365
|
+
*
|
|
4366
|
+
* `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
|
|
4367
|
+
* + `limit(50)`
|
|
4368
|
+
* + `descending('firstPublishedDate')`
|
|
4369
|
+
*
|
|
4370
|
+
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
|
4371
|
+
*
|
|
4372
|
+
* To learn how to query posts, refer to the table below.
|
|
4373
|
+
*
|
|
4374
|
+
* 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`.
|
|
4364
4375
|
* @public
|
|
4376
|
+
* @param options - Options specifying which fields to return.
|
|
4365
4377
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4366
4378
|
* @applicableIdentity APP
|
|
4367
4379
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
|
|
@@ -1609,8 +1609,8 @@ async function getPost2(postId, options) {
|
|
|
1609
1609
|
paths: [{ path: "post.media.wixMedia.videoV2" }]
|
|
1610
1610
|
}
|
|
1611
1611
|
]),
|
|
1612
|
-
["post.richContent"]
|
|
1613
|
-
)
|
|
1612
|
+
["post.richContent", "post.rich_content"]
|
|
1613
|
+
);
|
|
1614
1614
|
} catch (err) {
|
|
1615
1615
|
const transformedError = (0, import_transform_error.transformError)(
|
|
1616
1616
|
err,
|
|
@@ -1657,7 +1657,7 @@ async function getPostBySlug2(slug, options) {
|
|
|
1657
1657
|
paths: [{ path: "post.media.wixMedia.videoV2" }]
|
|
1658
1658
|
}
|
|
1659
1659
|
]),
|
|
1660
|
-
["post.richContent"]
|
|
1660
|
+
["post.richContent", "post.rich_content"]
|
|
1661
1661
|
);
|
|
1662
1662
|
} catch (err) {
|
|
1663
1663
|
const transformedError = (0, import_transform_error.transformError)(
|
|
@@ -1716,7 +1716,7 @@ async function listPosts2(options) {
|
|
|
1716
1716
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1717
1717
|
}
|
|
1718
1718
|
]),
|
|
1719
|
-
["posts.richContent"]
|
|
1719
|
+
["posts.richContent", "posts.rich_content"]
|
|
1720
1720
|
);
|
|
1721
1721
|
} catch (err) {
|
|
1722
1722
|
const transformedError = (0, import_transform_error.transformError)(
|
|
@@ -1786,7 +1786,7 @@ function queryPosts2(options) {
|
|
|
1786
1786
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1787
1787
|
}
|
|
1788
1788
|
]),
|
|
1789
|
-
["posts.richContent"]
|
|
1789
|
+
["posts.richContent", "posts.rich_content"]
|
|
1790
1790
|
);
|
|
1791
1791
|
return {
|
|
1792
1792
|
items: transformedData?.posts,
|
|
@@ -1834,7 +1834,7 @@ async function typedQueryPosts(query, options) {
|
|
|
1834
1834
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1835
1835
|
}
|
|
1836
1836
|
]),
|
|
1837
|
-
["posts.richContent"]
|
|
1837
|
+
["posts.richContent", "posts.rich_content"]
|
|
1838
1838
|
);
|
|
1839
1839
|
} catch (err) {
|
|
1840
1840
|
const transformedError = (0, import_transform_error.transformError)(
|