@wix/auto_sdk_blog_posts 1.0.191 → 1.0.193
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 +11 -15
- package/build/cjs/index.js +30 -35
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +183 -195
- package/build/cjs/index.typings.js +25 -25
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +166 -166
- package/build/cjs/meta.js +19 -19
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +11 -15
- package/build/es/index.mjs +30 -35
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +183 -195
- package/build/es/index.typings.mjs +25 -25
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +166 -166
- package/build/es/meta.mjs +19 -19
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +11 -15
- package/build/internal/cjs/index.typings.d.ts +237 -249
- package/build/internal/cjs/meta.d.ts +220 -220
- package/build/internal/es/index.d.mts +11 -15
- package/build/internal/es/index.typings.d.mts +237 -249
- package/build/internal/es/meta.d.mts +220 -220
- package/package.json +2 -2
|
@@ -3618,6 +3618,172 @@ interface GetTotalPostsResponse {
|
|
|
3618
3618
|
/** Total amount of published posts. */
|
|
3619
3619
|
total?: number;
|
|
3620
3620
|
}
|
|
3621
|
+
interface ListDemoPostsRequest {
|
|
3622
|
+
/**
|
|
3623
|
+
* Whether to return only featured posts.
|
|
3624
|
+
*
|
|
3625
|
+
* Default: `false`
|
|
3626
|
+
*/
|
|
3627
|
+
featured?: boolean;
|
|
3628
|
+
/**
|
|
3629
|
+
* Hashtag filter.
|
|
3630
|
+
*
|
|
3631
|
+
* Pass an array of hashtags to return only posts containing any of the provided hashtags.
|
|
3632
|
+
* If omitted, all posts with or without hashtags are returned.
|
|
3633
|
+
* @maxSize 100
|
|
3634
|
+
* @maxLength 100
|
|
3635
|
+
*/
|
|
3636
|
+
hashtags?: string[];
|
|
3637
|
+
/**
|
|
3638
|
+
* Category filter.
|
|
3639
|
+
*
|
|
3640
|
+
* Pass an array of category IDs to return only posts with any of the provided categories.
|
|
3641
|
+
* If omitted, all posts with or without associated categories are returned.
|
|
3642
|
+
* @maxSize 50
|
|
3643
|
+
* @format GUID
|
|
3644
|
+
*/
|
|
3645
|
+
categoryIds?: string[];
|
|
3646
|
+
/**
|
|
3647
|
+
* Tag filter.
|
|
3648
|
+
*
|
|
3649
|
+
* Pass an array of tag IDs to return only posts with any of the provided tags.
|
|
3650
|
+
* If omitted, all posts with or without tags are returned.
|
|
3651
|
+
* @maxSize 50
|
|
3652
|
+
* @format GUID
|
|
3653
|
+
*/
|
|
3654
|
+
tagIds?: string[];
|
|
3655
|
+
/**
|
|
3656
|
+
* Sorting options.
|
|
3657
|
+
*
|
|
3658
|
+
* - `FEED`: Ordered by `firstPublishedDate` in descending order with pinned posts first.
|
|
3659
|
+
* - `VIEW_COUNT`: Ordered by total number of views in descending order.
|
|
3660
|
+
* - `LIKE_COUNT`: Ordered by total number of likes in descending order.
|
|
3661
|
+
* - `PUBLISHED_DATE_ASC`: Ordered by `firstPublishedDate` in ascending order.
|
|
3662
|
+
* - `PUBLISHED_DATE_DESC`: Ordered by `firstPublishedDate` in descending order.
|
|
3663
|
+
* - `TITLE_ASC`: Ordered by `title` in ascending order.
|
|
3664
|
+
* - `TITLE_DESC`: Ordered by `title` in descending order.
|
|
3665
|
+
* - `RATING`: reserved for internal use.
|
|
3666
|
+
*
|
|
3667
|
+
* Default: `FEED`
|
|
3668
|
+
*/
|
|
3669
|
+
sort?: GetPostsSortWithLiterals;
|
|
3670
|
+
/** Pagination options. */
|
|
3671
|
+
paging?: BlogPaging;
|
|
3672
|
+
/**
|
|
3673
|
+
* __Deprecated.__ Use `fieldsets` instead.
|
|
3674
|
+
* This parameter will be removed on June 30, 2023.
|
|
3675
|
+
*
|
|
3676
|
+
* List of post fields to be included in the response.
|
|
3677
|
+
* @maxSize 20
|
|
3678
|
+
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
3679
|
+
* This parameter will be removed on June 30, 2023.
|
|
3680
|
+
*
|
|
3681
|
+
* List of post fields to be included in the response.
|
|
3682
|
+
* @replacedBy fieldsets
|
|
3683
|
+
* @targetRemovalDate 2024-06-30
|
|
3684
|
+
*/
|
|
3685
|
+
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
3686
|
+
/**
|
|
3687
|
+
* Language filter.
|
|
3688
|
+
*
|
|
3689
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3690
|
+
* Pass a language to only receive posts that are in that language.
|
|
3691
|
+
* If omitted, posts in all languages are returned.
|
|
3692
|
+
* @format LANGUAGE_TAG
|
|
3693
|
+
*/
|
|
3694
|
+
language?: string | null;
|
|
3695
|
+
/**
|
|
3696
|
+
* Post owner's member ID.
|
|
3697
|
+
* @format GUID
|
|
3698
|
+
*/
|
|
3699
|
+
memberId?: string | null;
|
|
3700
|
+
/**
|
|
3701
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
3702
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
3703
|
+
* only the post’s base fields are returned.
|
|
3704
|
+
* @maxSize 20
|
|
3705
|
+
*/
|
|
3706
|
+
fieldsets?: PostFieldFieldWithLiterals[];
|
|
3707
|
+
}
|
|
3708
|
+
declare enum GetPostsSort {
|
|
3709
|
+
/** Ordered by `firstPublishedDate` in descending order with pinned posts first. */
|
|
3710
|
+
FEED = "FEED",
|
|
3711
|
+
/** Ordered by `firstPublishedDate` in ascending order. */
|
|
3712
|
+
PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
|
|
3713
|
+
/** Ordered by `firstPublishedDate` in descending order. */
|
|
3714
|
+
PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC",
|
|
3715
|
+
/** Ordered by total number of views in descending order. */
|
|
3716
|
+
VIEW_COUNT = "VIEW_COUNT",
|
|
3717
|
+
/** Ordered by total number of likes in descending order. */
|
|
3718
|
+
LIKE_COUNT = "LIKE_COUNT",
|
|
3719
|
+
/** Ordered by `title` in ascending order. */
|
|
3720
|
+
TITLE_ASC = "TITLE_ASC",
|
|
3721
|
+
/** Ordered by `title` in descending order. */
|
|
3722
|
+
TITLE_DESC = "TITLE_DESC"
|
|
3723
|
+
}
|
|
3724
|
+
/** @enumType */
|
|
3725
|
+
type GetPostsSortWithLiterals = GetPostsSort | 'FEED' | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC' | 'VIEW_COUNT' | 'LIKE_COUNT' | 'TITLE_ASC' | 'TITLE_DESC';
|
|
3726
|
+
interface BlogPaging {
|
|
3727
|
+
/**
|
|
3728
|
+
* Number of items to skip in the current sort order.
|
|
3729
|
+
*
|
|
3730
|
+
*
|
|
3731
|
+
* Default: `0`
|
|
3732
|
+
*/
|
|
3733
|
+
offset?: number;
|
|
3734
|
+
/**
|
|
3735
|
+
* Number of items to return.
|
|
3736
|
+
*
|
|
3737
|
+
*
|
|
3738
|
+
* Default:`50`
|
|
3739
|
+
* @min 1
|
|
3740
|
+
* @max 100
|
|
3741
|
+
*/
|
|
3742
|
+
limit?: number;
|
|
3743
|
+
/**
|
|
3744
|
+
* Pointer to the next or previous page in the list of results.
|
|
3745
|
+
* @maxLength 2000
|
|
3746
|
+
*/
|
|
3747
|
+
cursor?: string | null;
|
|
3748
|
+
}
|
|
3749
|
+
declare enum PostFieldField {
|
|
3750
|
+
UNKNOWN = "UNKNOWN",
|
|
3751
|
+
/** Includes post URL when present. */
|
|
3752
|
+
URL = "URL",
|
|
3753
|
+
/** Includes post content text string when present. */
|
|
3754
|
+
CONTENT_TEXT = "CONTENT_TEXT",
|
|
3755
|
+
/** Includes post metrics when present. */
|
|
3756
|
+
METRICS = "METRICS",
|
|
3757
|
+
/** Includes SEO data. */
|
|
3758
|
+
SEO = "SEO",
|
|
3759
|
+
/** Includes post owner's contact ID. */
|
|
3760
|
+
CONTACT_ID = "CONTACT_ID",
|
|
3761
|
+
/** Includes post rich content. */
|
|
3762
|
+
RICH_CONTENT = "RICH_CONTENT",
|
|
3763
|
+
/** Includes post reference ID field. */
|
|
3764
|
+
REFERENCE_ID = "REFERENCE_ID"
|
|
3765
|
+
}
|
|
3766
|
+
/** @enumType */
|
|
3767
|
+
type PostFieldFieldWithLiterals = PostFieldField | 'UNKNOWN' | 'URL' | 'CONTENT_TEXT' | 'METRICS' | 'SEO' | 'CONTACT_ID' | 'RICH_CONTENT' | 'REFERENCE_ID';
|
|
3768
|
+
interface ListDemoPostsResponse {
|
|
3769
|
+
/** List of posts. */
|
|
3770
|
+
posts?: Post[];
|
|
3771
|
+
/** Details on the paged set of results returned. */
|
|
3772
|
+
metaData?: MetaData;
|
|
3773
|
+
}
|
|
3774
|
+
interface MetaData {
|
|
3775
|
+
/** Number of items returned in this response. */
|
|
3776
|
+
count?: number;
|
|
3777
|
+
/** Requested offset. */
|
|
3778
|
+
offset?: number;
|
|
3779
|
+
/** Total number of items that match the query. */
|
|
3780
|
+
total?: number;
|
|
3781
|
+
/**
|
|
3782
|
+
* Pointer to the next or previous page in the list of results.
|
|
3783
|
+
* @maxLength 2000
|
|
3784
|
+
*/
|
|
3785
|
+
cursor?: string | null;
|
|
3786
|
+
}
|
|
3621
3787
|
interface PostCountersUpdated extends PostCountersUpdatedInitiatorOneOf {
|
|
3622
3788
|
/**
|
|
3623
3789
|
* Member ID of person who triggered the counter update
|
|
@@ -3687,25 +3853,6 @@ interface GetPostRequest {
|
|
|
3687
3853
|
*/
|
|
3688
3854
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
3689
3855
|
}
|
|
3690
|
-
declare enum PostFieldField {
|
|
3691
|
-
UNKNOWN = "UNKNOWN",
|
|
3692
|
-
/** Includes post URL when present. */
|
|
3693
|
-
URL = "URL",
|
|
3694
|
-
/** Includes post content text string when present. */
|
|
3695
|
-
CONTENT_TEXT = "CONTENT_TEXT",
|
|
3696
|
-
/** Includes post metrics when present. */
|
|
3697
|
-
METRICS = "METRICS",
|
|
3698
|
-
/** Includes SEO data. */
|
|
3699
|
-
SEO = "SEO",
|
|
3700
|
-
/** Includes post owner's contact ID. */
|
|
3701
|
-
CONTACT_ID = "CONTACT_ID",
|
|
3702
|
-
/** Includes post rich content. */
|
|
3703
|
-
RICH_CONTENT = "RICH_CONTENT",
|
|
3704
|
-
/** Includes post reference ID field. */
|
|
3705
|
-
REFERENCE_ID = "REFERENCE_ID"
|
|
3706
|
-
}
|
|
3707
|
-
/** @enumType */
|
|
3708
|
-
type PostFieldFieldWithLiterals = PostFieldField | 'UNKNOWN' | 'URL' | 'CONTENT_TEXT' | 'METRICS' | 'SEO' | 'CONTACT_ID' | 'RICH_CONTENT' | 'REFERENCE_ID';
|
|
3709
3856
|
interface GetPostResponse {
|
|
3710
3857
|
/** Retrieved post info. */
|
|
3711
3858
|
post?: Post;
|
|
@@ -3798,66 +3945,12 @@ interface ListPostsRequest {
|
|
|
3798
3945
|
*/
|
|
3799
3946
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
3800
3947
|
}
|
|
3801
|
-
declare enum GetPostsSort {
|
|
3802
|
-
/** Ordered by `firstPublishedDate` in descending order with pinned posts first. */
|
|
3803
|
-
FEED = "FEED",
|
|
3804
|
-
/** Ordered by `firstPublishedDate` in ascending order. */
|
|
3805
|
-
PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
|
|
3806
|
-
/** Ordered by `firstPublishedDate` in descending order. */
|
|
3807
|
-
PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC",
|
|
3808
|
-
/** Ordered by total number of views in descending order. */
|
|
3809
|
-
VIEW_COUNT = "VIEW_COUNT",
|
|
3810
|
-
/** Ordered by total number of likes in descending order. */
|
|
3811
|
-
LIKE_COUNT = "LIKE_COUNT",
|
|
3812
|
-
/** Ordered by `title` in ascending order. */
|
|
3813
|
-
TITLE_ASC = "TITLE_ASC",
|
|
3814
|
-
/** Ordered by `title` in descending order. */
|
|
3815
|
-
TITLE_DESC = "TITLE_DESC"
|
|
3816
|
-
}
|
|
3817
|
-
/** @enumType */
|
|
3818
|
-
type GetPostsSortWithLiterals = GetPostsSort | 'FEED' | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC' | 'VIEW_COUNT' | 'LIKE_COUNT' | 'TITLE_ASC' | 'TITLE_DESC';
|
|
3819
|
-
interface BlogPaging {
|
|
3820
|
-
/**
|
|
3821
|
-
* Number of items to skip in the current sort order.
|
|
3822
|
-
*
|
|
3823
|
-
*
|
|
3824
|
-
* Default: `0`
|
|
3825
|
-
*/
|
|
3826
|
-
offset?: number;
|
|
3827
|
-
/**
|
|
3828
|
-
* Number of items to return.
|
|
3829
|
-
*
|
|
3830
|
-
*
|
|
3831
|
-
* Default:`50`
|
|
3832
|
-
* @min 1
|
|
3833
|
-
* @max 100
|
|
3834
|
-
*/
|
|
3835
|
-
limit?: number;
|
|
3836
|
-
/**
|
|
3837
|
-
* Pointer to the next or previous page in the list of results.
|
|
3838
|
-
* @maxLength 2000
|
|
3839
|
-
*/
|
|
3840
|
-
cursor?: string | null;
|
|
3841
|
-
}
|
|
3842
3948
|
interface ListPostsResponse {
|
|
3843
3949
|
/** List of retrieved posts. */
|
|
3844
3950
|
posts?: Post[];
|
|
3845
3951
|
/** Details on the paged set of results returned. */
|
|
3846
3952
|
metaData?: MetaData;
|
|
3847
3953
|
}
|
|
3848
|
-
interface MetaData {
|
|
3849
|
-
/** Number of items returned in this response. */
|
|
3850
|
-
count?: number;
|
|
3851
|
-
/** Requested offset. */
|
|
3852
|
-
offset?: number;
|
|
3853
|
-
/** Total number of items that match the query. */
|
|
3854
|
-
total?: number;
|
|
3855
|
-
/**
|
|
3856
|
-
* Pointer to the next or previous page in the list of results.
|
|
3857
|
-
* @maxLength 2000
|
|
3858
|
-
*/
|
|
3859
|
-
cursor?: string | null;
|
|
3860
|
-
}
|
|
3861
3954
|
interface QueryPostsRequest {
|
|
3862
3955
|
/** Query options. */
|
|
3863
3956
|
query?: PlatformQuery;
|
|
@@ -4216,99 +4309,6 @@ interface PostCount {
|
|
|
4216
4309
|
/** Number of posts. */
|
|
4217
4310
|
postCount?: number;
|
|
4218
4311
|
}
|
|
4219
|
-
interface ListDemoPostsRequest {
|
|
4220
|
-
/**
|
|
4221
|
-
* Whether to return only featured posts.
|
|
4222
|
-
*
|
|
4223
|
-
* Default: `false`
|
|
4224
|
-
*/
|
|
4225
|
-
featured?: boolean;
|
|
4226
|
-
/**
|
|
4227
|
-
* Hashtag filter.
|
|
4228
|
-
*
|
|
4229
|
-
* Pass an array of hashtags to return only posts containing any of the provided hashtags.
|
|
4230
|
-
* If omitted, all posts with or without hashtags are returned.
|
|
4231
|
-
* @maxSize 100
|
|
4232
|
-
* @maxLength 100
|
|
4233
|
-
*/
|
|
4234
|
-
hashtags?: string[];
|
|
4235
|
-
/**
|
|
4236
|
-
* Category filter.
|
|
4237
|
-
*
|
|
4238
|
-
* Pass an array of category IDs to return only posts with any of the provided categories.
|
|
4239
|
-
* If omitted, all posts with or without associated categories are returned.
|
|
4240
|
-
* @maxSize 50
|
|
4241
|
-
* @format GUID
|
|
4242
|
-
*/
|
|
4243
|
-
categoryIds?: string[];
|
|
4244
|
-
/**
|
|
4245
|
-
* Tag filter.
|
|
4246
|
-
*
|
|
4247
|
-
* Pass an array of tag IDs to return only posts with any of the provided tags.
|
|
4248
|
-
* If omitted, all posts with or without tags are returned.
|
|
4249
|
-
* @maxSize 50
|
|
4250
|
-
* @format GUID
|
|
4251
|
-
*/
|
|
4252
|
-
tagIds?: string[];
|
|
4253
|
-
/**
|
|
4254
|
-
* Sorting options.
|
|
4255
|
-
*
|
|
4256
|
-
* - `FEED`: Ordered by `firstPublishedDate` in descending order with pinned posts first.
|
|
4257
|
-
* - `VIEW_COUNT`: Ordered by total number of views in descending order.
|
|
4258
|
-
* - `LIKE_COUNT`: Ordered by total number of likes in descending order.
|
|
4259
|
-
* - `PUBLISHED_DATE_ASC`: Ordered by `firstPublishedDate` in ascending order.
|
|
4260
|
-
* - `PUBLISHED_DATE_DESC`: Ordered by `firstPublishedDate` in descending order.
|
|
4261
|
-
* - `TITLE_ASC`: Ordered by `title` in ascending order.
|
|
4262
|
-
* - `TITLE_DESC`: Ordered by `title` in descending order.
|
|
4263
|
-
* - `RATING`: reserved for internal use.
|
|
4264
|
-
*
|
|
4265
|
-
* Default: `FEED`
|
|
4266
|
-
*/
|
|
4267
|
-
sort?: GetPostsSortWithLiterals;
|
|
4268
|
-
/** Pagination options. */
|
|
4269
|
-
paging?: BlogPaging;
|
|
4270
|
-
/**
|
|
4271
|
-
* __Deprecated.__ Use `fieldsets` instead.
|
|
4272
|
-
* This parameter will be removed on June 30, 2023.
|
|
4273
|
-
*
|
|
4274
|
-
* List of post fields to be included in the response.
|
|
4275
|
-
* @maxSize 20
|
|
4276
|
-
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
4277
|
-
* This parameter will be removed on June 30, 2023.
|
|
4278
|
-
*
|
|
4279
|
-
* List of post fields to be included in the response.
|
|
4280
|
-
* @replacedBy fieldsets
|
|
4281
|
-
* @targetRemovalDate 2024-06-30
|
|
4282
|
-
*/
|
|
4283
|
-
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
4284
|
-
/**
|
|
4285
|
-
* Language filter.
|
|
4286
|
-
*
|
|
4287
|
-
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
4288
|
-
* Pass a language to only receive posts that are in that language.
|
|
4289
|
-
* If omitted, posts in all languages are returned.
|
|
4290
|
-
* @format LANGUAGE_TAG
|
|
4291
|
-
*/
|
|
4292
|
-
language?: string | null;
|
|
4293
|
-
/**
|
|
4294
|
-
* Post owner's member ID.
|
|
4295
|
-
* @format GUID
|
|
4296
|
-
*/
|
|
4297
|
-
memberId?: string | null;
|
|
4298
|
-
/**
|
|
4299
|
-
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
4300
|
-
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
4301
|
-
* only the post’s base fields are returned.
|
|
4302
|
-
* @maxSize 20
|
|
4303
|
-
*/
|
|
4304
|
-
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4305
|
-
}
|
|
4306
|
-
interface ListDemoPostsResponse {
|
|
4307
|
-
/** List of posts. */
|
|
4308
|
-
posts?: Post[];
|
|
4309
|
-
/** Details on the paged set of results returned. */
|
|
4310
|
-
metaData?: MetaData;
|
|
4311
|
-
}
|
|
4312
4312
|
interface BaseEventMetadata {
|
|
4313
4313
|
/**
|
|
4314
4314
|
* App instance ID.
|
|
@@ -4456,14 +4456,13 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
|
|
|
4456
4456
|
/**
|
|
4457
4457
|
* Retrieves the number of published posts per month within a specified time range.
|
|
4458
4458
|
*
|
|
4459
|
-
*
|
|
4460
|
-
* The
|
|
4461
|
-
*
|
|
4462
|
-
*
|
|
4463
|
-
*
|
|
4464
|
-
*
|
|
4459
|
+
* The time range is set using the `rangeStart` and `months` properties.
|
|
4460
|
+
* The time range always starts on the 1st day of the month set in `rangeStart` and
|
|
4461
|
+
* includes the number of `months` following `rangeStart`.
|
|
4462
|
+
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
|
4463
|
+
* the time range will be from `'2022-03-01'` until `'2022-06-30'`. The time range always ends on the last day of the month.
|
|
4464
|
+
* > Note: If there are no published posts in a month within the time range, 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.
|
|
4465
4465
|
* @public
|
|
4466
|
-
* @param options - Options specifying time frame, sort, and filter.
|
|
4467
4466
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4468
4467
|
* @applicableIdentity APP
|
|
4469
4468
|
* @returns Get Blog Post Count Stats response
|
|
@@ -4504,7 +4503,6 @@ interface QueryPostCountStatsOptions {
|
|
|
4504
4503
|
/**
|
|
4505
4504
|
* Retrieves the total amount of published posts of the blog.
|
|
4506
4505
|
* @public
|
|
4507
|
-
* @param options - Language Options.
|
|
4508
4506
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4509
4507
|
* @applicableIdentity APP
|
|
4510
4508
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
|
|
@@ -4525,12 +4523,12 @@ interface GetTotalPostsOptions {
|
|
|
4525
4523
|
* @param postId - Post ID.
|
|
4526
4524
|
* @public
|
|
4527
4525
|
* @requiredField postId
|
|
4528
|
-
* @param options - Options specifying which fields to return.
|
|
4529
4526
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4530
4527
|
* @applicableIdentity APP
|
|
4528
|
+
* @returns Retrieved post info.
|
|
4531
4529
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
|
4532
4530
|
*/
|
|
4533
|
-
declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<
|
|
4531
|
+
declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<Post, `_id` | `title` | `excerpt` | `slug` | `featured` | `pinned` | `categoryIds` | `memberId` | `hashtags` | `commentingEnabled` | `minutesToRead` | `tagIds` | `relatedPostIds` | `pricingPlanIds` | `seoData.tags` | `seoData.tags.${number}.type` | `seoData.tags.${number}.children` | `seoData.tags.${number}.custom` | `seoData.tags.${number}.disabled` | `seoData.settings.preventAutoRedirect` | `seoData.settings.keywords` | `seoData.settings.keywords.${number}.term` | `seoData.settings.keywords.${number}.isMain` | `preview` | `moderationDetails.submittedBy` | `moderationDetails.status` | `media.embedMedia.thumbnail.url` | `media.embedMedia.thumbnail.width` | `media.embedMedia.thumbnail.height` | `media.embedMedia.video.url` | `media.embedMedia.video.width` | `media.embedMedia.video.height` | `media.displayed` | `media.custom` | `hasUnpublishedChanges`, 4>>;
|
|
4534
4532
|
interface GetPostOptions {
|
|
4535
4533
|
/**
|
|
4536
4534
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
@@ -4550,7 +4548,6 @@ interface GetPostOptions {
|
|
|
4550
4548
|
* @param slug - Slug of the post to retrieve.
|
|
4551
4549
|
* @public
|
|
4552
4550
|
* @requiredField slug
|
|
4553
|
-
* @param options - Options specifying which fields to return.
|
|
4554
4551
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4555
4552
|
* @applicableIdentity APP
|
|
4556
4553
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
|
|
@@ -4578,7 +4575,6 @@ interface GetPostBySlugOptions {
|
|
|
4578
4575
|
* - `paging.limit` is `50`.
|
|
4579
4576
|
* - `paging.offset` is `0`.
|
|
4580
4577
|
* @public
|
|
4581
|
-
* @param options - Sort, filter, and paging options.
|
|
4582
4578
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4583
4579
|
* @applicableIdentity APP
|
|
4584
4580
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
|
|
@@ -4649,26 +4645,18 @@ interface ListPostsOptions {
|
|
|
4649
4645
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4650
4646
|
}
|
|
4651
4647
|
/**
|
|
4652
|
-
*
|
|
4653
|
-
*
|
|
4654
|
-
*
|
|
4655
|
-
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
|
4656
|
-
*
|
|
4657
|
-
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
4658
|
-
*
|
|
4659
|
-
* 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.
|
|
4648
|
+
* Retrieves a list of up to 100 posts, given the provided paging, filtering, and sorting.
|
|
4660
4649
|
*
|
|
4661
|
-
*
|
|
4662
|
-
*
|
|
4663
|
-
*
|
|
4664
|
-
*
|
|
4665
|
-
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
|
4666
|
-
*
|
|
4667
|
-
* To learn how to query posts, refer to the table below.
|
|
4650
|
+
* Query Posts runs with these defaults, which you can override:
|
|
4651
|
+
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
|
4652
|
+
* - `paging.limit` is `50`.
|
|
4653
|
+
* - `paging.offset` is `0`.
|
|
4668
4654
|
*
|
|
4669
|
-
*
|
|
4655
|
+
* To learn about working with _Query_ endpoints, see
|
|
4656
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
|
|
4657
|
+
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
|
|
4658
|
+
* [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
4670
4659
|
* @public
|
|
4671
|
-
* @param options - Options specifying which fields to return.
|
|
4672
4660
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4673
4661
|
* @applicableIdentity APP
|
|
4674
4662
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
|
|
@@ -1773,14 +1773,17 @@ var Order = /* @__PURE__ */ ((Order2) => {
|
|
|
1773
1773
|
Order2["NEWEST"] = "NEWEST";
|
|
1774
1774
|
return Order2;
|
|
1775
1775
|
})(Order || {});
|
|
1776
|
-
var
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1776
|
+
var GetPostsSort = /* @__PURE__ */ ((GetPostsSort2) => {
|
|
1777
|
+
GetPostsSort2["FEED"] = "FEED";
|
|
1778
|
+
GetPostsSort2["PUBLISHED_DATE_ASC"] = "PUBLISHED_DATE_ASC";
|
|
1779
|
+
GetPostsSort2["PUBLISHED_DATE_DESC"] = "PUBLISHED_DATE_DESC";
|
|
1780
|
+
GetPostsSort2["VIEW_COUNT"] = "VIEW_COUNT";
|
|
1781
|
+
GetPostsSort2["LIKE_COUNT"] = "LIKE_COUNT";
|
|
1782
|
+
GetPostsSort2["TITLE_ASC"] = "TITLE_ASC";
|
|
1783
|
+
GetPostsSort2["TITLE_DESC"] = "TITLE_DESC";
|
|
1784
|
+
GetPostsSort2["RATING"] = "RATING";
|
|
1785
|
+
return GetPostsSort2;
|
|
1786
|
+
})(GetPostsSort || {});
|
|
1784
1787
|
var PostFieldField = /* @__PURE__ */ ((PostFieldField2) => {
|
|
1785
1788
|
PostFieldField2["UNKNOWN"] = "UNKNOWN";
|
|
1786
1789
|
PostFieldField2["COUNTERS"] = "COUNTERS";
|
|
@@ -1804,17 +1807,14 @@ var PostFieldField = /* @__PURE__ */ ((PostFieldField2) => {
|
|
|
1804
1807
|
PostFieldField2["IMAGE"] = "IMAGE";
|
|
1805
1808
|
return PostFieldField2;
|
|
1806
1809
|
})(PostFieldField || {});
|
|
1807
|
-
var
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
GetPostsSort2["RATING"] = "RATING";
|
|
1816
|
-
return GetPostsSort2;
|
|
1817
|
-
})(GetPostsSort || {});
|
|
1810
|
+
var Field = /* @__PURE__ */ ((Field2) => {
|
|
1811
|
+
Field2["UNKNOWN"] = "UNKNOWN";
|
|
1812
|
+
Field2["TOTAL_COMMENTS"] = "TOTAL_COMMENTS";
|
|
1813
|
+
Field2["LIKE_COUNT"] = "LIKE_COUNT";
|
|
1814
|
+
Field2["VIEW_COUNT"] = "VIEW_COUNT";
|
|
1815
|
+
Field2["RATING_COUNT"] = "RATING_COUNT";
|
|
1816
|
+
return Field2;
|
|
1817
|
+
})(Field || {});
|
|
1818
1818
|
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
1819
1819
|
SortOrder2["ASC"] = "ASC";
|
|
1820
1820
|
SortOrder2["DESC"] = "DESC";
|
|
@@ -1910,8 +1910,8 @@ async function getPost2(postId, options) {
|
|
|
1910
1910
|
paths: TRANSFORM_PATHS_22
|
|
1911
1911
|
}
|
|
1912
1912
|
]),
|
|
1913
|
-
["post.richContent"
|
|
1914
|
-
);
|
|
1913
|
+
["post.richContent"]
|
|
1914
|
+
)?.post;
|
|
1915
1915
|
} catch (err) {
|
|
1916
1916
|
const transformedError = (0, import_transform_error.transformError)(
|
|
1917
1917
|
err,
|
|
@@ -1955,7 +1955,7 @@ async function getPostBySlug2(slug, options) {
|
|
|
1955
1955
|
paths: TRANSFORM_PATHS_22
|
|
1956
1956
|
}
|
|
1957
1957
|
]),
|
|
1958
|
-
["post.richContent"
|
|
1958
|
+
["post.richContent"]
|
|
1959
1959
|
);
|
|
1960
1960
|
} catch (err) {
|
|
1961
1961
|
const transformedError = (0, import_transform_error.transformError)(
|
|
@@ -2011,7 +2011,7 @@ async function listPosts2(options) {
|
|
|
2011
2011
|
paths: TRANSFORM_PATHS_52
|
|
2012
2012
|
}
|
|
2013
2013
|
]),
|
|
2014
|
-
["posts.richContent"
|
|
2014
|
+
["posts.richContent"]
|
|
2015
2015
|
);
|
|
2016
2016
|
} catch (err) {
|
|
2017
2017
|
const transformedError = (0, import_transform_error.transformError)(
|
|
@@ -2078,7 +2078,7 @@ function queryPosts2(options) {
|
|
|
2078
2078
|
paths: TRANSFORM_PATHS_52
|
|
2079
2079
|
}
|
|
2080
2080
|
]),
|
|
2081
|
-
["posts.richContent"
|
|
2081
|
+
["posts.richContent"]
|
|
2082
2082
|
);
|
|
2083
2083
|
return {
|
|
2084
2084
|
items: transformedData?.posts,
|
|
@@ -2123,7 +2123,7 @@ async function typedQueryPosts(query, options) {
|
|
|
2123
2123
|
paths: TRANSFORM_PATHS_52
|
|
2124
2124
|
}
|
|
2125
2125
|
]),
|
|
2126
|
-
["posts.richContent"
|
|
2126
|
+
["posts.richContent"]
|
|
2127
2127
|
);
|
|
2128
2128
|
} catch (err) {
|
|
2129
2129
|
const transformedError = (0, import_transform_error.transformError)(
|