@wix/auto_sdk_blog_posts 1.0.181 → 1.0.183
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
|
@@ -3546,172 +3546,6 @@ interface GetTotalPostsResponse {
|
|
|
3546
3546
|
/** Total amount of published posts. */
|
|
3547
3547
|
total?: number;
|
|
3548
3548
|
}
|
|
3549
|
-
interface ListDemoPostsRequest {
|
|
3550
|
-
/**
|
|
3551
|
-
* Whether to return only featured posts.
|
|
3552
|
-
*
|
|
3553
|
-
* Default: `false`
|
|
3554
|
-
*/
|
|
3555
|
-
featured?: boolean;
|
|
3556
|
-
/**
|
|
3557
|
-
* Hashtag filter.
|
|
3558
|
-
*
|
|
3559
|
-
* Pass an array of hashtags to return only posts containing any of the provided hashtags.
|
|
3560
|
-
* If omitted, all posts with or without hashtags are returned.
|
|
3561
|
-
* @maxSize 100
|
|
3562
|
-
* @maxLength 100
|
|
3563
|
-
*/
|
|
3564
|
-
hashtags?: string[];
|
|
3565
|
-
/**
|
|
3566
|
-
* Category filter.
|
|
3567
|
-
*
|
|
3568
|
-
* Pass an array of category IDs to return only posts with any of the provided categories.
|
|
3569
|
-
* If omitted, all posts with or without associated categories are returned.
|
|
3570
|
-
* @maxSize 50
|
|
3571
|
-
* @format GUID
|
|
3572
|
-
*/
|
|
3573
|
-
categoryIds?: string[];
|
|
3574
|
-
/**
|
|
3575
|
-
* Tag filter.
|
|
3576
|
-
*
|
|
3577
|
-
* Pass an array of tag IDs to return only posts with any of the provided tags.
|
|
3578
|
-
* If omitted, all posts with or without tags are returned.
|
|
3579
|
-
* @maxSize 50
|
|
3580
|
-
* @format GUID
|
|
3581
|
-
*/
|
|
3582
|
-
tagIds?: string[];
|
|
3583
|
-
/**
|
|
3584
|
-
* Sorting options.
|
|
3585
|
-
*
|
|
3586
|
-
* - `FEED`: Ordered by `firstPublishedDate` in descending order with pinned posts first.
|
|
3587
|
-
* - `VIEW_COUNT`: Ordered by total number of views in descending order.
|
|
3588
|
-
* - `LIKE_COUNT`: Ordered by total number of likes in descending order.
|
|
3589
|
-
* - `PUBLISHED_DATE_ASC`: Ordered by `firstPublishedDate` in ascending order.
|
|
3590
|
-
* - `PUBLISHED_DATE_DESC`: Ordered by `firstPublishedDate` in descending order.
|
|
3591
|
-
* - `TITLE_ASC`: Ordered by `title` in ascending order.
|
|
3592
|
-
* - `TITLE_DESC`: Ordered by `title` in descending order.
|
|
3593
|
-
* - `RATING`: reserved for internal use.
|
|
3594
|
-
*
|
|
3595
|
-
* Default: `FEED`
|
|
3596
|
-
*/
|
|
3597
|
-
sort?: GetPostsSortWithLiterals;
|
|
3598
|
-
/** Pagination options. */
|
|
3599
|
-
paging?: BlogPaging;
|
|
3600
|
-
/**
|
|
3601
|
-
* __Deprecated.__ Use `fieldsets` instead.
|
|
3602
|
-
* This parameter will be removed on June 30, 2023.
|
|
3603
|
-
*
|
|
3604
|
-
* List of post fields to be included in the response.
|
|
3605
|
-
* @maxSize 20
|
|
3606
|
-
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
3607
|
-
* This parameter will be removed on June 30, 2023.
|
|
3608
|
-
*
|
|
3609
|
-
* List of post fields to be included in the response.
|
|
3610
|
-
* @replacedBy fieldsets
|
|
3611
|
-
* @targetRemovalDate 2024-06-30
|
|
3612
|
-
*/
|
|
3613
|
-
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
3614
|
-
/**
|
|
3615
|
-
* Language filter.
|
|
3616
|
-
*
|
|
3617
|
-
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3618
|
-
* Pass a language to only receive posts that are in that language.
|
|
3619
|
-
* If omitted, posts in all languages are returned.
|
|
3620
|
-
* @format LANGUAGE_TAG
|
|
3621
|
-
*/
|
|
3622
|
-
language?: string | null;
|
|
3623
|
-
/**
|
|
3624
|
-
* Post owner's member ID.
|
|
3625
|
-
* @format GUID
|
|
3626
|
-
*/
|
|
3627
|
-
memberId?: string | null;
|
|
3628
|
-
/**
|
|
3629
|
-
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
3630
|
-
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
3631
|
-
* only the post’s base fields are returned.
|
|
3632
|
-
* @maxSize 20
|
|
3633
|
-
*/
|
|
3634
|
-
fieldsets?: PostFieldFieldWithLiterals[];
|
|
3635
|
-
}
|
|
3636
|
-
declare enum GetPostsSort {
|
|
3637
|
-
/** Ordered by `firstPublishedDate` in descending order with pinned posts first. */
|
|
3638
|
-
FEED = "FEED",
|
|
3639
|
-
/** Ordered by `firstPublishedDate` in ascending order. */
|
|
3640
|
-
PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
|
|
3641
|
-
/** Ordered by `firstPublishedDate` in descending order. */
|
|
3642
|
-
PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC",
|
|
3643
|
-
/** Ordered by total number of views in descending order. */
|
|
3644
|
-
VIEW_COUNT = "VIEW_COUNT",
|
|
3645
|
-
/** Ordered by total number of likes in descending order. */
|
|
3646
|
-
LIKE_COUNT = "LIKE_COUNT",
|
|
3647
|
-
/** Ordered by `title` in ascending order. */
|
|
3648
|
-
TITLE_ASC = "TITLE_ASC",
|
|
3649
|
-
/** Ordered by `title` in descending order. */
|
|
3650
|
-
TITLE_DESC = "TITLE_DESC"
|
|
3651
|
-
}
|
|
3652
|
-
/** @enumType */
|
|
3653
|
-
type GetPostsSortWithLiterals = GetPostsSort | 'FEED' | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC' | 'VIEW_COUNT' | 'LIKE_COUNT' | 'TITLE_ASC' | 'TITLE_DESC';
|
|
3654
|
-
interface BlogPaging {
|
|
3655
|
-
/**
|
|
3656
|
-
* Number of items to skip in the current sort order.
|
|
3657
|
-
*
|
|
3658
|
-
*
|
|
3659
|
-
* Default: `0`
|
|
3660
|
-
*/
|
|
3661
|
-
offset?: number;
|
|
3662
|
-
/**
|
|
3663
|
-
* Number of items to return.
|
|
3664
|
-
*
|
|
3665
|
-
*
|
|
3666
|
-
* Default:`50`
|
|
3667
|
-
* @min 1
|
|
3668
|
-
* @max 100
|
|
3669
|
-
*/
|
|
3670
|
-
limit?: number;
|
|
3671
|
-
/**
|
|
3672
|
-
* Pointer to the next or previous page in the list of results.
|
|
3673
|
-
* @maxLength 2000
|
|
3674
|
-
*/
|
|
3675
|
-
cursor?: string | null;
|
|
3676
|
-
}
|
|
3677
|
-
declare enum PostFieldField {
|
|
3678
|
-
UNKNOWN = "UNKNOWN",
|
|
3679
|
-
/** Includes post URL when present. */
|
|
3680
|
-
URL = "URL",
|
|
3681
|
-
/** Includes post content text string when present. */
|
|
3682
|
-
CONTENT_TEXT = "CONTENT_TEXT",
|
|
3683
|
-
/** Includes post metrics when present. */
|
|
3684
|
-
METRICS = "METRICS",
|
|
3685
|
-
/** Includes SEO data. */
|
|
3686
|
-
SEO = "SEO",
|
|
3687
|
-
/** Includes post owner's contact ID. */
|
|
3688
|
-
CONTACT_ID = "CONTACT_ID",
|
|
3689
|
-
/** Includes post rich content. */
|
|
3690
|
-
RICH_CONTENT = "RICH_CONTENT",
|
|
3691
|
-
/** Includes post reference ID field. */
|
|
3692
|
-
REFERENCE_ID = "REFERENCE_ID"
|
|
3693
|
-
}
|
|
3694
|
-
/** @enumType */
|
|
3695
|
-
type PostFieldFieldWithLiterals = PostFieldField | 'UNKNOWN' | 'URL' | 'CONTENT_TEXT' | 'METRICS' | 'SEO' | 'CONTACT_ID' | 'RICH_CONTENT' | 'REFERENCE_ID';
|
|
3696
|
-
interface ListDemoPostsResponse {
|
|
3697
|
-
/** List of posts. */
|
|
3698
|
-
posts?: Post[];
|
|
3699
|
-
/** Details on the paged set of results returned. */
|
|
3700
|
-
metaData?: MetaData;
|
|
3701
|
-
}
|
|
3702
|
-
interface MetaData {
|
|
3703
|
-
/** Number of items returned in this response. */
|
|
3704
|
-
count?: number;
|
|
3705
|
-
/** Requested offset. */
|
|
3706
|
-
offset?: number;
|
|
3707
|
-
/** Total number of items that match the query. */
|
|
3708
|
-
total?: number;
|
|
3709
|
-
/**
|
|
3710
|
-
* Pointer to the next or previous page in the list of results.
|
|
3711
|
-
* @maxLength 2000
|
|
3712
|
-
*/
|
|
3713
|
-
cursor?: string | null;
|
|
3714
|
-
}
|
|
3715
3549
|
interface PostCountersUpdated extends PostCountersUpdatedInitiatorOneOf {
|
|
3716
3550
|
/**
|
|
3717
3551
|
* Member ID of person who triggered the counter update
|
|
@@ -3781,6 +3615,25 @@ interface GetPostRequest {
|
|
|
3781
3615
|
*/
|
|
3782
3616
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
3783
3617
|
}
|
|
3618
|
+
declare enum PostFieldField {
|
|
3619
|
+
UNKNOWN = "UNKNOWN",
|
|
3620
|
+
/** Includes post URL when present. */
|
|
3621
|
+
URL = "URL",
|
|
3622
|
+
/** Includes post content text string when present. */
|
|
3623
|
+
CONTENT_TEXT = "CONTENT_TEXT",
|
|
3624
|
+
/** Includes post metrics when present. */
|
|
3625
|
+
METRICS = "METRICS",
|
|
3626
|
+
/** Includes SEO data. */
|
|
3627
|
+
SEO = "SEO",
|
|
3628
|
+
/** Includes post owner's contact ID. */
|
|
3629
|
+
CONTACT_ID = "CONTACT_ID",
|
|
3630
|
+
/** Includes post rich content. */
|
|
3631
|
+
RICH_CONTENT = "RICH_CONTENT",
|
|
3632
|
+
/** Includes post reference ID field. */
|
|
3633
|
+
REFERENCE_ID = "REFERENCE_ID"
|
|
3634
|
+
}
|
|
3635
|
+
/** @enumType */
|
|
3636
|
+
type PostFieldFieldWithLiterals = PostFieldField | 'UNKNOWN' | 'URL' | 'CONTENT_TEXT' | 'METRICS' | 'SEO' | 'CONTACT_ID' | 'RICH_CONTENT' | 'REFERENCE_ID';
|
|
3784
3637
|
interface GetPostResponse {
|
|
3785
3638
|
/** Retrieved post info. */
|
|
3786
3639
|
post?: Post;
|
|
@@ -3873,12 +3726,66 @@ interface ListPostsRequest {
|
|
|
3873
3726
|
*/
|
|
3874
3727
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
3875
3728
|
}
|
|
3729
|
+
declare enum GetPostsSort {
|
|
3730
|
+
/** Ordered by `firstPublishedDate` in descending order with pinned posts first. */
|
|
3731
|
+
FEED = "FEED",
|
|
3732
|
+
/** Ordered by `firstPublishedDate` in ascending order. */
|
|
3733
|
+
PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
|
|
3734
|
+
/** Ordered by `firstPublishedDate` in descending order. */
|
|
3735
|
+
PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC",
|
|
3736
|
+
/** Ordered by total number of views in descending order. */
|
|
3737
|
+
VIEW_COUNT = "VIEW_COUNT",
|
|
3738
|
+
/** Ordered by total number of likes in descending order. */
|
|
3739
|
+
LIKE_COUNT = "LIKE_COUNT",
|
|
3740
|
+
/** Ordered by `title` in ascending order. */
|
|
3741
|
+
TITLE_ASC = "TITLE_ASC",
|
|
3742
|
+
/** Ordered by `title` in descending order. */
|
|
3743
|
+
TITLE_DESC = "TITLE_DESC"
|
|
3744
|
+
}
|
|
3745
|
+
/** @enumType */
|
|
3746
|
+
type GetPostsSortWithLiterals = GetPostsSort | 'FEED' | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC' | 'VIEW_COUNT' | 'LIKE_COUNT' | 'TITLE_ASC' | 'TITLE_DESC';
|
|
3747
|
+
interface BlogPaging {
|
|
3748
|
+
/**
|
|
3749
|
+
* Number of items to skip in the current sort order.
|
|
3750
|
+
*
|
|
3751
|
+
*
|
|
3752
|
+
* Default: `0`
|
|
3753
|
+
*/
|
|
3754
|
+
offset?: number;
|
|
3755
|
+
/**
|
|
3756
|
+
* Number of items to return.
|
|
3757
|
+
*
|
|
3758
|
+
*
|
|
3759
|
+
* Default:`50`
|
|
3760
|
+
* @min 1
|
|
3761
|
+
* @max 100
|
|
3762
|
+
*/
|
|
3763
|
+
limit?: number;
|
|
3764
|
+
/**
|
|
3765
|
+
* Pointer to the next or previous page in the list of results.
|
|
3766
|
+
* @maxLength 2000
|
|
3767
|
+
*/
|
|
3768
|
+
cursor?: string | null;
|
|
3769
|
+
}
|
|
3876
3770
|
interface ListPostsResponse {
|
|
3877
3771
|
/** List of retrieved posts. */
|
|
3878
3772
|
posts?: Post[];
|
|
3879
3773
|
/** Details on the paged set of results returned. */
|
|
3880
3774
|
metaData?: MetaData;
|
|
3881
3775
|
}
|
|
3776
|
+
interface MetaData {
|
|
3777
|
+
/** Number of items returned in this response. */
|
|
3778
|
+
count?: number;
|
|
3779
|
+
/** Requested offset. */
|
|
3780
|
+
offset?: number;
|
|
3781
|
+
/** Total number of items that match the query. */
|
|
3782
|
+
total?: number;
|
|
3783
|
+
/**
|
|
3784
|
+
* Pointer to the next or previous page in the list of results.
|
|
3785
|
+
* @maxLength 2000
|
|
3786
|
+
*/
|
|
3787
|
+
cursor?: string | null;
|
|
3788
|
+
}
|
|
3882
3789
|
interface QueryPostsRequest {
|
|
3883
3790
|
/** Query options. */
|
|
3884
3791
|
query?: PlatformQuery;
|
|
@@ -4237,6 +4144,99 @@ interface PostCount {
|
|
|
4237
4144
|
/** Number of posts. */
|
|
4238
4145
|
postCount?: number;
|
|
4239
4146
|
}
|
|
4147
|
+
interface ListDemoPostsRequest {
|
|
4148
|
+
/**
|
|
4149
|
+
* Whether to return only featured posts.
|
|
4150
|
+
*
|
|
4151
|
+
* Default: `false`
|
|
4152
|
+
*/
|
|
4153
|
+
featured?: boolean;
|
|
4154
|
+
/**
|
|
4155
|
+
* Hashtag filter.
|
|
4156
|
+
*
|
|
4157
|
+
* Pass an array of hashtags to return only posts containing any of the provided hashtags.
|
|
4158
|
+
* If omitted, all posts with or without hashtags are returned.
|
|
4159
|
+
* @maxSize 100
|
|
4160
|
+
* @maxLength 100
|
|
4161
|
+
*/
|
|
4162
|
+
hashtags?: string[];
|
|
4163
|
+
/**
|
|
4164
|
+
* Category filter.
|
|
4165
|
+
*
|
|
4166
|
+
* Pass an array of category IDs to return only posts with any of the provided categories.
|
|
4167
|
+
* If omitted, all posts with or without associated categories are returned.
|
|
4168
|
+
* @maxSize 50
|
|
4169
|
+
* @format GUID
|
|
4170
|
+
*/
|
|
4171
|
+
categoryIds?: string[];
|
|
4172
|
+
/**
|
|
4173
|
+
* Tag filter.
|
|
4174
|
+
*
|
|
4175
|
+
* Pass an array of tag IDs to return only posts with any of the provided tags.
|
|
4176
|
+
* If omitted, all posts with or without tags are returned.
|
|
4177
|
+
* @maxSize 50
|
|
4178
|
+
* @format GUID
|
|
4179
|
+
*/
|
|
4180
|
+
tagIds?: string[];
|
|
4181
|
+
/**
|
|
4182
|
+
* Sorting options.
|
|
4183
|
+
*
|
|
4184
|
+
* - `FEED`: Ordered by `firstPublishedDate` in descending order with pinned posts first.
|
|
4185
|
+
* - `VIEW_COUNT`: Ordered by total number of views in descending order.
|
|
4186
|
+
* - `LIKE_COUNT`: Ordered by total number of likes in descending order.
|
|
4187
|
+
* - `PUBLISHED_DATE_ASC`: Ordered by `firstPublishedDate` in ascending order.
|
|
4188
|
+
* - `PUBLISHED_DATE_DESC`: Ordered by `firstPublishedDate` in descending order.
|
|
4189
|
+
* - `TITLE_ASC`: Ordered by `title` in ascending order.
|
|
4190
|
+
* - `TITLE_DESC`: Ordered by `title` in descending order.
|
|
4191
|
+
* - `RATING`: reserved for internal use.
|
|
4192
|
+
*
|
|
4193
|
+
* Default: `FEED`
|
|
4194
|
+
*/
|
|
4195
|
+
sort?: GetPostsSortWithLiterals;
|
|
4196
|
+
/** Pagination options. */
|
|
4197
|
+
paging?: BlogPaging;
|
|
4198
|
+
/**
|
|
4199
|
+
* __Deprecated.__ Use `fieldsets` instead.
|
|
4200
|
+
* This parameter will be removed on June 30, 2023.
|
|
4201
|
+
*
|
|
4202
|
+
* List of post fields to be included in the response.
|
|
4203
|
+
* @maxSize 20
|
|
4204
|
+
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
4205
|
+
* This parameter will be removed on June 30, 2023.
|
|
4206
|
+
*
|
|
4207
|
+
* List of post fields to be included in the response.
|
|
4208
|
+
* @replacedBy fieldsets
|
|
4209
|
+
* @targetRemovalDate 2024-06-30
|
|
4210
|
+
*/
|
|
4211
|
+
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
4212
|
+
/**
|
|
4213
|
+
* Language filter.
|
|
4214
|
+
*
|
|
4215
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
4216
|
+
* Pass a language to only receive posts that are in that language.
|
|
4217
|
+
* If omitted, posts in all languages are returned.
|
|
4218
|
+
* @format LANGUAGE_TAG
|
|
4219
|
+
*/
|
|
4220
|
+
language?: string | null;
|
|
4221
|
+
/**
|
|
4222
|
+
* Post owner's member ID.
|
|
4223
|
+
* @format GUID
|
|
4224
|
+
*/
|
|
4225
|
+
memberId?: string | null;
|
|
4226
|
+
/**
|
|
4227
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
4228
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
4229
|
+
* only the post’s base fields are returned.
|
|
4230
|
+
* @maxSize 20
|
|
4231
|
+
*/
|
|
4232
|
+
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4233
|
+
}
|
|
4234
|
+
interface ListDemoPostsResponse {
|
|
4235
|
+
/** List of posts. */
|
|
4236
|
+
posts?: Post[];
|
|
4237
|
+
/** Details on the paged set of results returned. */
|
|
4238
|
+
metaData?: MetaData;
|
|
4239
|
+
}
|
|
4240
4240
|
interface BaseEventMetadata {
|
|
4241
4241
|
/**
|
|
4242
4242
|
* App instance ID.
|
|
@@ -4384,14 +4384,13 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
|
|
|
4384
4384
|
/**
|
|
4385
4385
|
* Retrieves the number of published posts per month within a specified time range.
|
|
4386
4386
|
*
|
|
4387
|
-
*
|
|
4388
|
-
* The
|
|
4389
|
-
*
|
|
4390
|
-
*
|
|
4391
|
-
*
|
|
4392
|
-
*
|
|
4387
|
+
* The time range is set using the `rangeStart` and `months` properties.
|
|
4388
|
+
* The time range always starts on the 1st day of the month set in `rangeStart` and
|
|
4389
|
+
* includes the number of `months` following `rangeStart`.
|
|
4390
|
+
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
|
4391
|
+
* 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.
|
|
4392
|
+
* > 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.
|
|
4393
4393
|
* @public
|
|
4394
|
-
* @param options - Options specifying time frame, sort, and filter.
|
|
4395
4394
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4396
4395
|
* @applicableIdentity APP
|
|
4397
4396
|
* @returns Get Blog Post Count Stats response
|
|
@@ -4432,7 +4431,6 @@ interface QueryPostCountStatsOptions {
|
|
|
4432
4431
|
/**
|
|
4433
4432
|
* Retrieves the total amount of published posts of the blog.
|
|
4434
4433
|
* @public
|
|
4435
|
-
* @param options - Language Options.
|
|
4436
4434
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4437
4435
|
* @applicableIdentity APP
|
|
4438
4436
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
|
|
@@ -4453,12 +4451,12 @@ interface GetTotalPostsOptions {
|
|
|
4453
4451
|
* @param postId - Post ID.
|
|
4454
4452
|
* @public
|
|
4455
4453
|
* @requiredField postId
|
|
4456
|
-
* @param options - Options specifying which fields to return.
|
|
4457
4454
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4458
4455
|
* @applicableIdentity APP
|
|
4456
|
+
* @returns Retrieved post info.
|
|
4459
4457
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
|
4460
4458
|
*/
|
|
4461
|
-
declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<
|
|
4459
|
+
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`, 6>>;
|
|
4462
4460
|
interface GetPostOptions {
|
|
4463
4461
|
/**
|
|
4464
4462
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
@@ -4478,7 +4476,6 @@ interface GetPostOptions {
|
|
|
4478
4476
|
* @param slug - Slug of the post to retrieve.
|
|
4479
4477
|
* @public
|
|
4480
4478
|
* @requiredField slug
|
|
4481
|
-
* @param options - Options specifying which fields to return.
|
|
4482
4479
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4483
4480
|
* @applicableIdentity APP
|
|
4484
4481
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
|
|
@@ -4506,7 +4503,6 @@ interface GetPostBySlugOptions {
|
|
|
4506
4503
|
* - `paging.limit` is `50`.
|
|
4507
4504
|
* - `paging.offset` is `0`.
|
|
4508
4505
|
* @public
|
|
4509
|
-
* @param options - Sort, filter, and paging options.
|
|
4510
4506
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4511
4507
|
* @applicableIdentity APP
|
|
4512
4508
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
|
|
@@ -4577,26 +4573,18 @@ interface ListPostsOptions {
|
|
|
4577
4573
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4578
4574
|
}
|
|
4579
4575
|
/**
|
|
4580
|
-
*
|
|
4581
|
-
*
|
|
4582
|
-
*
|
|
4583
|
-
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
|
4584
|
-
*
|
|
4585
|
-
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
4586
|
-
*
|
|
4587
|
-
* 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.
|
|
4576
|
+
* Retrieves a list of up to 100 posts, given the provided paging, filtering, and sorting.
|
|
4588
4577
|
*
|
|
4589
|
-
*
|
|
4590
|
-
*
|
|
4591
|
-
*
|
|
4592
|
-
*
|
|
4593
|
-
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
|
4594
|
-
*
|
|
4595
|
-
* To learn how to query posts, refer to the table below.
|
|
4578
|
+
* Query Posts runs with these defaults, which you can override:
|
|
4579
|
+
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
|
4580
|
+
* - `paging.limit` is `50`.
|
|
4581
|
+
* - `paging.offset` is `0`.
|
|
4596
4582
|
*
|
|
4597
|
-
*
|
|
4583
|
+
* To learn about working with _Query_ endpoints, see
|
|
4584
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
|
|
4585
|
+
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
|
|
4586
|
+
* [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
4598
4587
|
* @public
|
|
4599
|
-
* @param options - Options specifying which fields to return.
|
|
4600
4588
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4601
4589
|
* @applicableIdentity APP
|
|
4602
4590
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
|
|
@@ -1728,17 +1728,14 @@ var Order = /* @__PURE__ */ ((Order2) => {
|
|
|
1728
1728
|
Order2["NEWEST"] = "NEWEST";
|
|
1729
1729
|
return Order2;
|
|
1730
1730
|
})(Order || {});
|
|
1731
|
-
var
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
GetPostsSort2["RATING"] = "RATING";
|
|
1740
|
-
return GetPostsSort2;
|
|
1741
|
-
})(GetPostsSort || {});
|
|
1731
|
+
var Field = /* @__PURE__ */ ((Field2) => {
|
|
1732
|
+
Field2["UNKNOWN"] = "UNKNOWN";
|
|
1733
|
+
Field2["TOTAL_COMMENTS"] = "TOTAL_COMMENTS";
|
|
1734
|
+
Field2["LIKE_COUNT"] = "LIKE_COUNT";
|
|
1735
|
+
Field2["VIEW_COUNT"] = "VIEW_COUNT";
|
|
1736
|
+
Field2["RATING_COUNT"] = "RATING_COUNT";
|
|
1737
|
+
return Field2;
|
|
1738
|
+
})(Field || {});
|
|
1742
1739
|
var PostFieldField = /* @__PURE__ */ ((PostFieldField2) => {
|
|
1743
1740
|
PostFieldField2["UNKNOWN"] = "UNKNOWN";
|
|
1744
1741
|
PostFieldField2["COUNTERS"] = "COUNTERS";
|
|
@@ -1762,14 +1759,17 @@ var PostFieldField = /* @__PURE__ */ ((PostFieldField2) => {
|
|
|
1762
1759
|
PostFieldField2["IMAGE"] = "IMAGE";
|
|
1763
1760
|
return PostFieldField2;
|
|
1764
1761
|
})(PostFieldField || {});
|
|
1765
|
-
var
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1762
|
+
var GetPostsSort = /* @__PURE__ */ ((GetPostsSort2) => {
|
|
1763
|
+
GetPostsSort2["FEED"] = "FEED";
|
|
1764
|
+
GetPostsSort2["PUBLISHED_DATE_ASC"] = "PUBLISHED_DATE_ASC";
|
|
1765
|
+
GetPostsSort2["PUBLISHED_DATE_DESC"] = "PUBLISHED_DATE_DESC";
|
|
1766
|
+
GetPostsSort2["VIEW_COUNT"] = "VIEW_COUNT";
|
|
1767
|
+
GetPostsSort2["LIKE_COUNT"] = "LIKE_COUNT";
|
|
1768
|
+
GetPostsSort2["TITLE_ASC"] = "TITLE_ASC";
|
|
1769
|
+
GetPostsSort2["TITLE_DESC"] = "TITLE_DESC";
|
|
1770
|
+
GetPostsSort2["RATING"] = "RATING";
|
|
1771
|
+
return GetPostsSort2;
|
|
1772
|
+
})(GetPostsSort || {});
|
|
1773
1773
|
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
1774
1774
|
SortOrder2["ASC"] = "ASC";
|
|
1775
1775
|
SortOrder2["DESC"] = "DESC";
|
|
@@ -1868,8 +1868,8 @@ async function getPost2(postId, options) {
|
|
|
1868
1868
|
paths: [{ path: "post.media.wixMedia.videoV2" }]
|
|
1869
1869
|
}
|
|
1870
1870
|
]),
|
|
1871
|
-
["post.richContent"
|
|
1872
|
-
);
|
|
1871
|
+
["post.richContent"]
|
|
1872
|
+
)?.post;
|
|
1873
1873
|
} catch (err) {
|
|
1874
1874
|
const transformedError = (0, import_transform_error.transformError)(
|
|
1875
1875
|
err,
|
|
@@ -1916,7 +1916,7 @@ async function getPostBySlug2(slug, options) {
|
|
|
1916
1916
|
paths: [{ path: "post.media.wixMedia.videoV2" }]
|
|
1917
1917
|
}
|
|
1918
1918
|
]),
|
|
1919
|
-
["post.richContent"
|
|
1919
|
+
["post.richContent"]
|
|
1920
1920
|
);
|
|
1921
1921
|
} catch (err) {
|
|
1922
1922
|
const transformedError = (0, import_transform_error.transformError)(
|
|
@@ -1975,7 +1975,7 @@ async function listPosts2(options) {
|
|
|
1975
1975
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1976
1976
|
}
|
|
1977
1977
|
]),
|
|
1978
|
-
["posts.richContent"
|
|
1978
|
+
["posts.richContent"]
|
|
1979
1979
|
);
|
|
1980
1980
|
} catch (err) {
|
|
1981
1981
|
const transformedError = (0, import_transform_error.transformError)(
|
|
@@ -2045,7 +2045,7 @@ function queryPosts2(options) {
|
|
|
2045
2045
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
2046
2046
|
}
|
|
2047
2047
|
]),
|
|
2048
|
-
["posts.richContent"
|
|
2048
|
+
["posts.richContent"]
|
|
2049
2049
|
);
|
|
2050
2050
|
return {
|
|
2051
2051
|
items: transformedData?.posts,
|
|
@@ -2093,7 +2093,7 @@ async function typedQueryPosts(query, options) {
|
|
|
2093
2093
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
2094
2094
|
}
|
|
2095
2095
|
]),
|
|
2096
|
-
["posts.richContent"
|
|
2096
|
+
["posts.richContent"]
|
|
2097
2097
|
);
|
|
2098
2098
|
} catch (err) {
|
|
2099
2099
|
const transformedError = (0, import_transform_error.transformError)(
|