@wix/auto_sdk_blog_posts 1.0.154 → 1.0.155
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 +84 -82
- package/build/cjs/schemas.js +153 -147
- package/build/cjs/schemas.js.map +1 -1
- 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 +84 -82
- package/build/es/schemas.mjs +153 -147
- package/build/es/schemas.mjs.map +1 -1
- 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 +84 -82
- package/build/internal/cjs/schemas.js +153 -147
- package/build/internal/cjs/schemas.js.map +1 -1
- 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 +84 -82
- package/build/internal/es/schemas.mjs +153 -147
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -4285,13 +4285,14 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
|
|
|
4285
4285
|
/**
|
|
4286
4286
|
* Retrieves the number of published posts per month within a specified time range.
|
|
4287
4287
|
*
|
|
4288
|
-
*
|
|
4289
|
-
* The
|
|
4290
|
-
*
|
|
4291
|
-
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
|
4292
|
-
*
|
|
4293
|
-
*
|
|
4288
|
+
*
|
|
4289
|
+
* The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
|
|
4290
|
+
*
|
|
4291
|
+
* 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.
|
|
4292
|
+
*
|
|
4293
|
+
* >**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.
|
|
4294
4294
|
* @public
|
|
4295
|
+
* @param options - Options specifying time frame, sort, and filter.
|
|
4295
4296
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4296
4297
|
* @applicableIdentity APP
|
|
4297
4298
|
* @returns Get Blog Post Count Stats response
|
|
@@ -4332,6 +4333,7 @@ interface QueryPostCountStatsOptions {
|
|
|
4332
4333
|
/**
|
|
4333
4334
|
* Retrieves the total amount of published posts of the blog.
|
|
4334
4335
|
* @public
|
|
4336
|
+
* @param options - Language Options.
|
|
4335
4337
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4336
4338
|
* @applicableIdentity APP
|
|
4337
4339
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
|
|
@@ -4352,12 +4354,12 @@ interface GetTotalPostsOptions {
|
|
|
4352
4354
|
* @param postId - Post ID.
|
|
4353
4355
|
* @public
|
|
4354
4356
|
* @requiredField postId
|
|
4357
|
+
* @param options - Options specifying which fields to return.
|
|
4355
4358
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4356
4359
|
* @applicableIdentity APP
|
|
4357
|
-
* @returns Retrieved post info.
|
|
4358
4360
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
|
4359
4361
|
*/
|
|
4360
|
-
declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<
|
|
4362
|
+
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>>;
|
|
4361
4363
|
interface GetPostOptions {
|
|
4362
4364
|
/**
|
|
4363
4365
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
@@ -4377,6 +4379,7 @@ interface GetPostOptions {
|
|
|
4377
4379
|
* @param slug - Slug of the post to retrieve.
|
|
4378
4380
|
* @public
|
|
4379
4381
|
* @requiredField slug
|
|
4382
|
+
* @param options - Options specifying which fields to return.
|
|
4380
4383
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4381
4384
|
* @applicableIdentity APP
|
|
4382
4385
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
|
|
@@ -4404,6 +4407,7 @@ interface GetPostBySlugOptions {
|
|
|
4404
4407
|
* - `paging.limit` is `50`.
|
|
4405
4408
|
* - `paging.offset` is `0`.
|
|
4406
4409
|
* @public
|
|
4410
|
+
* @param options - Sort, filter, and paging options.
|
|
4407
4411
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4408
4412
|
* @applicableIdentity APP
|
|
4409
4413
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
|
|
@@ -4474,18 +4478,26 @@ interface ListPostsOptions {
|
|
|
4474
4478
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4475
4479
|
}
|
|
4476
4480
|
/**
|
|
4477
|
-
*
|
|
4481
|
+
* Creates a query to retrieve a list of posts.
|
|
4478
4482
|
*
|
|
4479
|
-
* Query Posts runs with these defaults, which you can override:
|
|
4480
|
-
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
|
4481
|
-
* - `paging.limit` is `50`.
|
|
4482
|
-
* - `paging.offset` is `0`.
|
|
4483
4483
|
*
|
|
4484
|
-
*
|
|
4485
|
-
*
|
|
4486
|
-
*
|
|
4487
|
-
*
|
|
4484
|
+
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
|
4485
|
+
*
|
|
4486
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
4487
|
+
*
|
|
4488
|
+
* 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.
|
|
4489
|
+
*
|
|
4490
|
+
* `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
|
|
4491
|
+
* + `limit(50)`
|
|
4492
|
+
* + `descending('firstPublishedDate')`
|
|
4493
|
+
*
|
|
4494
|
+
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
|
4495
|
+
*
|
|
4496
|
+
* To learn how to query posts, refer to the table below.
|
|
4497
|
+
*
|
|
4498
|
+
* 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`.
|
|
4488
4499
|
* @public
|
|
4500
|
+
* @param options - Options specifying which fields to return.
|
|
4489
4501
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4490
4502
|
* @applicableIdentity APP
|
|
4491
4503
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
|
|
@@ -1660,8 +1660,8 @@ async function getPost2(postId, options) {
|
|
|
1660
1660
|
paths: [{ path: "post.media.wixMedia.videoV2" }]
|
|
1661
1661
|
}
|
|
1662
1662
|
]),
|
|
1663
|
-
["post.richContent"]
|
|
1664
|
-
)
|
|
1663
|
+
["post.richContent", "post.rich_content"]
|
|
1664
|
+
);
|
|
1665
1665
|
} catch (err) {
|
|
1666
1666
|
const transformedError = (0, import_transform_error.transformError)(
|
|
1667
1667
|
err,
|
|
@@ -1708,7 +1708,7 @@ async function getPostBySlug2(slug, options) {
|
|
|
1708
1708
|
paths: [{ path: "post.media.wixMedia.videoV2" }]
|
|
1709
1709
|
}
|
|
1710
1710
|
]),
|
|
1711
|
-
["post.richContent"]
|
|
1711
|
+
["post.richContent", "post.rich_content"]
|
|
1712
1712
|
);
|
|
1713
1713
|
} catch (err) {
|
|
1714
1714
|
const transformedError = (0, import_transform_error.transformError)(
|
|
@@ -1767,7 +1767,7 @@ async function listPosts2(options) {
|
|
|
1767
1767
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1768
1768
|
}
|
|
1769
1769
|
]),
|
|
1770
|
-
["posts.richContent"]
|
|
1770
|
+
["posts.richContent", "posts.rich_content"]
|
|
1771
1771
|
);
|
|
1772
1772
|
} catch (err) {
|
|
1773
1773
|
const transformedError = (0, import_transform_error.transformError)(
|
|
@@ -1837,7 +1837,7 @@ function queryPosts2(options) {
|
|
|
1837
1837
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1838
1838
|
}
|
|
1839
1839
|
]),
|
|
1840
|
-
["posts.richContent"]
|
|
1840
|
+
["posts.richContent", "posts.rich_content"]
|
|
1841
1841
|
);
|
|
1842
1842
|
return {
|
|
1843
1843
|
items: transformedData?.posts,
|
|
@@ -1885,7 +1885,7 @@ async function typedQueryPosts(query, options) {
|
|
|
1885
1885
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1886
1886
|
}
|
|
1887
1887
|
]),
|
|
1888
|
-
["posts.richContent"]
|
|
1888
|
+
["posts.richContent", "posts.rich_content"]
|
|
1889
1889
|
);
|
|
1890
1890
|
} catch (err) {
|
|
1891
1891
|
const transformedError = (0, import_transform_error.transformError)(
|