@wix/auto_sdk_blog_posts 1.0.170 → 1.0.172
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 +199 -196
- package/build/cjs/index.typings.js +25 -25
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +182 -167
- package/build/cjs/meta.js +19 -19
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +84 -86
- package/build/cjs/schemas.js +150 -156
- package/build/cjs/schemas.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 +199 -196
- package/build/es/index.typings.mjs +25 -25
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +182 -167
- package/build/es/meta.mjs +19 -19
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +84 -86
- package/build/es/schemas.mjs +150 -156
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +11 -15
- package/build/internal/cjs/index.js +30 -35
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +253 -250
- package/build/internal/cjs/index.typings.js +25 -25
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +236 -221
- package/build/internal/cjs/meta.js +19 -19
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +84 -86
- package/build/internal/cjs/schemas.js +150 -156
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +11 -15
- package/build/internal/es/index.mjs +30 -35
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +253 -250
- package/build/internal/es/index.typings.mjs +25 -25
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +236 -221
- package/build/internal/es/meta.mjs +19 -19
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +84 -86
- package/build/internal/es/schemas.mjs +150 -156
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -335,7 +335,22 @@ interface Tag {
|
|
|
335
335
|
meta?: Record<string, any> | null;
|
|
336
336
|
/** SEO tag inner content. For example, `<title> inner content </title>`. */
|
|
337
337
|
children?: string;
|
|
338
|
-
/**
|
|
338
|
+
/**
|
|
339
|
+
* Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages) —
|
|
340
|
+
* i.e. an entry from the site's Advanced/Custom Tags list.
|
|
341
|
+
*
|
|
342
|
+
* This flag is scoped to that feature only. It is NOT an indicator of whether a standard tag
|
|
343
|
+
* (`title`, `description`, Open Graph, etc.) reflects a manually configured value versus a computed
|
|
344
|
+
* default/pattern — standard tags always resolve with `custom: false`, even when their content comes
|
|
345
|
+
* from a page's manually saved SEO title/description override. Don't use this field to verify whether
|
|
346
|
+
* a live page reflects a manual per-page SEO edit.
|
|
347
|
+
*
|
|
348
|
+
* Limitation: when `ResolveStaticPageSeoTags` is called without `seoData`, the per-page SEO data is read
|
|
349
|
+
* only from the Vibe/Wix-managed-headless override store. That store holds nothing for classic Wix Editor
|
|
350
|
+
* or Wix Studio pages, so even genuine Advanced/Custom Tags saved on those pages are missing from the
|
|
351
|
+
* response entirely — there, `false` means this API could not tell, not that no custom tag exists.
|
|
352
|
+
* Pass `seoData` explicitly to resolve against a known set of tags.
|
|
353
|
+
*/
|
|
339
354
|
custom?: boolean;
|
|
340
355
|
/** Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. */
|
|
341
356
|
disabled?: boolean;
|
|
@@ -3580,91 +3595,62 @@ interface GetTotalPostsResponse {
|
|
|
3580
3595
|
/** Total amount of published posts. */
|
|
3581
3596
|
total?: number;
|
|
3582
3597
|
}
|
|
3583
|
-
interface
|
|
3584
|
-
/**
|
|
3585
|
-
* Member ID of person who triggered the counter update
|
|
3586
|
-
* @format GUID
|
|
3587
|
-
*/
|
|
3588
|
-
memberId?: string | null;
|
|
3589
|
-
/**
|
|
3590
|
-
* Visitor ID if person that liked the post is not logged in
|
|
3591
|
-
* @format GUID
|
|
3592
|
-
*/
|
|
3593
|
-
anonymousVisitorId?: string | null;
|
|
3594
|
-
/**
|
|
3595
|
-
* ID of the post which counters were updated.
|
|
3596
|
-
* @format GUID
|
|
3597
|
-
*/
|
|
3598
|
-
postId?: string;
|
|
3599
|
-
/**
|
|
3600
|
-
* Internal ID of the post which counters were updated.
|
|
3601
|
-
* @internal
|
|
3602
|
-
* @maxLength 24
|
|
3603
|
-
*/
|
|
3604
|
-
postInternalId?: string;
|
|
3605
|
-
/** Field of the updated counter. */
|
|
3606
|
-
updatedCounterField?: FieldWithLiterals;
|
|
3607
|
-
/** New counter value. */
|
|
3608
|
-
counter?: number;
|
|
3609
|
-
}
|
|
3610
|
-
/** @oneof */
|
|
3611
|
-
interface PostCountersUpdatedInitiatorOneOf {
|
|
3598
|
+
interface ListDemoPostsRequest {
|
|
3612
3599
|
/**
|
|
3613
|
-
*
|
|
3614
|
-
*
|
|
3600
|
+
* Whether to return only featured posts.
|
|
3601
|
+
*
|
|
3602
|
+
* Default: `false`
|
|
3615
3603
|
*/
|
|
3616
|
-
|
|
3604
|
+
featured?: boolean;
|
|
3617
3605
|
/**
|
|
3618
|
-
*
|
|
3619
|
-
*
|
|
3606
|
+
* Hashtag filter.
|
|
3607
|
+
*
|
|
3608
|
+
* Pass an array of hashtags to return only posts containing any of the provided hashtags.
|
|
3609
|
+
* If omitted, all posts with or without hashtags are returned.
|
|
3610
|
+
* @maxSize 100
|
|
3611
|
+
* @maxLength 100
|
|
3620
3612
|
*/
|
|
3621
|
-
|
|
3622
|
-
}
|
|
3623
|
-
declare enum Field {
|
|
3624
|
-
/** Undefined field. */
|
|
3625
|
-
UNKNOWN = "UNKNOWN",
|
|
3626
|
-
/** Total comments field. */
|
|
3627
|
-
TOTAL_COMMENTS = "TOTAL_COMMENTS",
|
|
3628
|
-
/** Like count field. */
|
|
3629
|
-
LIKE_COUNT = "LIKE_COUNT",
|
|
3630
|
-
/** View count field. */
|
|
3631
|
-
VIEW_COUNT = "VIEW_COUNT",
|
|
3632
|
-
/** Rating count field. */
|
|
3633
|
-
RATING_COUNT = "RATING_COUNT"
|
|
3634
|
-
}
|
|
3635
|
-
/** @enumType */
|
|
3636
|
-
type FieldWithLiterals = Field | 'UNKNOWN' | 'TOTAL_COMMENTS' | 'LIKE_COUNT' | 'VIEW_COUNT' | 'RATING_COUNT';
|
|
3637
|
-
interface PostOwnerChanged {
|
|
3613
|
+
hashtags?: string[];
|
|
3638
3614
|
/**
|
|
3639
|
-
*
|
|
3640
|
-
*
|
|
3615
|
+
* Category filter.
|
|
3616
|
+
*
|
|
3617
|
+
* Pass an array of category IDs to return only posts with any of the provided categories.
|
|
3618
|
+
* If omitted, all posts with or without associated categories are returned.
|
|
3619
|
+
* @maxSize 50
|
|
3641
3620
|
* @format GUID
|
|
3642
3621
|
*/
|
|
3643
|
-
|
|
3622
|
+
categoryIds?: string[];
|
|
3644
3623
|
/**
|
|
3645
|
-
*
|
|
3646
|
-
*
|
|
3624
|
+
* Tag filter.
|
|
3625
|
+
*
|
|
3626
|
+
* Pass an array of tag IDs to return only posts with any of the provided tags.
|
|
3627
|
+
* If omitted, all posts with or without tags are returned.
|
|
3628
|
+
* @maxSize 50
|
|
3647
3629
|
* @format GUID
|
|
3648
3630
|
*/
|
|
3649
|
-
|
|
3650
|
-
}
|
|
3651
|
-
interface InitialPostsCopied {
|
|
3652
|
-
/** Number of posts copied. */
|
|
3653
|
-
count?: number;
|
|
3654
|
-
}
|
|
3655
|
-
interface GetPostRequest {
|
|
3631
|
+
tagIds?: string[];
|
|
3656
3632
|
/**
|
|
3657
|
-
*
|
|
3658
|
-
*
|
|
3659
|
-
*
|
|
3633
|
+
* Sorting options.
|
|
3634
|
+
*
|
|
3635
|
+
* - `FEED`: Ordered by `firstPublishedDate` in descending order with pinned posts first.
|
|
3636
|
+
* - `VIEW_COUNT`: Ordered by total number of views in descending order.
|
|
3637
|
+
* - `LIKE_COUNT`: Ordered by total number of likes in descending order.
|
|
3638
|
+
* - `PUBLISHED_DATE_ASC`: Ordered by `firstPublishedDate` in ascending order.
|
|
3639
|
+
* - `PUBLISHED_DATE_DESC`: Ordered by `firstPublishedDate` in descending order.
|
|
3640
|
+
* - `TITLE_ASC`: Ordered by `title` in ascending order.
|
|
3641
|
+
* - `TITLE_DESC`: Ordered by `title` in descending order.
|
|
3642
|
+
* - `RATING`: reserved for internal use.
|
|
3643
|
+
*
|
|
3644
|
+
* Default: `FEED`
|
|
3660
3645
|
*/
|
|
3661
|
-
|
|
3646
|
+
sort?: GetPostsSortWithLiterals;
|
|
3647
|
+
/** Pagination options. */
|
|
3648
|
+
paging?: BlogPaging;
|
|
3662
3649
|
/**
|
|
3663
3650
|
* __Deprecated.__ Use `fieldsets` instead.
|
|
3664
3651
|
* This parameter will be removed on June 30, 2023.
|
|
3665
3652
|
*
|
|
3666
3653
|
* List of post fields to be included in the response.
|
|
3667
|
-
* @internal
|
|
3668
3654
|
* @maxSize 20
|
|
3669
3655
|
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
3670
3656
|
* This parameter will be removed on June 30, 2023.
|
|
@@ -3674,6 +3660,20 @@ interface GetPostRequest {
|
|
|
3674
3660
|
* @targetRemovalDate 2024-06-30
|
|
3675
3661
|
*/
|
|
3676
3662
|
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
3663
|
+
/**
|
|
3664
|
+
* Language filter.
|
|
3665
|
+
*
|
|
3666
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3667
|
+
* Pass a language to only receive posts that are in that language.
|
|
3668
|
+
* If omitted, posts in all languages are returned.
|
|
3669
|
+
* @format LANGUAGE_TAG
|
|
3670
|
+
*/
|
|
3671
|
+
language?: string | null;
|
|
3672
|
+
/**
|
|
3673
|
+
* Post owner's member ID.
|
|
3674
|
+
* @format GUID
|
|
3675
|
+
*/
|
|
3676
|
+
memberId?: string | null;
|
|
3677
3677
|
/**
|
|
3678
3678
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
3679
3679
|
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
@@ -3682,6 +3682,52 @@ interface GetPostRequest {
|
|
|
3682
3682
|
*/
|
|
3683
3683
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
3684
3684
|
}
|
|
3685
|
+
declare enum GetPostsSort {
|
|
3686
|
+
/** Ordered by `firstPublishedDate` in descending order with pinned posts first. */
|
|
3687
|
+
FEED = "FEED",
|
|
3688
|
+
/** Ordered by `firstPublishedDate` in ascending order. */
|
|
3689
|
+
PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
|
|
3690
|
+
/** Ordered by `firstPublishedDate` in descending order. */
|
|
3691
|
+
PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC",
|
|
3692
|
+
/** Ordered by total number of views in descending order. */
|
|
3693
|
+
VIEW_COUNT = "VIEW_COUNT",
|
|
3694
|
+
/** Ordered by total number of likes in descending order. */
|
|
3695
|
+
LIKE_COUNT = "LIKE_COUNT",
|
|
3696
|
+
/** Ordered by `title` in ascending order. */
|
|
3697
|
+
TITLE_ASC = "TITLE_ASC",
|
|
3698
|
+
/** Ordered by `title` in descending order. */
|
|
3699
|
+
TITLE_DESC = "TITLE_DESC",
|
|
3700
|
+
/**
|
|
3701
|
+
* Sorting by post rating descending.
|
|
3702
|
+
* @internal
|
|
3703
|
+
*/
|
|
3704
|
+
RATING = "RATING"
|
|
3705
|
+
}
|
|
3706
|
+
/** @enumType */
|
|
3707
|
+
type GetPostsSortWithLiterals = GetPostsSort | 'FEED' | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC' | 'VIEW_COUNT' | 'LIKE_COUNT' | 'TITLE_ASC' | 'TITLE_DESC';
|
|
3708
|
+
interface BlogPaging {
|
|
3709
|
+
/**
|
|
3710
|
+
* Number of items to skip in the current sort order.
|
|
3711
|
+
*
|
|
3712
|
+
*
|
|
3713
|
+
* Default: `0`
|
|
3714
|
+
*/
|
|
3715
|
+
offset?: number;
|
|
3716
|
+
/**
|
|
3717
|
+
* Number of items to return.
|
|
3718
|
+
*
|
|
3719
|
+
*
|
|
3720
|
+
* Default:`50`
|
|
3721
|
+
* @min 1
|
|
3722
|
+
* @max 100
|
|
3723
|
+
*/
|
|
3724
|
+
limit?: number;
|
|
3725
|
+
/**
|
|
3726
|
+
* Pointer to the next or previous page in the list of results.
|
|
3727
|
+
* @maxLength 2000
|
|
3728
|
+
*/
|
|
3729
|
+
cursor?: string | null;
|
|
3730
|
+
}
|
|
3685
3731
|
declare enum PostFieldField {
|
|
3686
3732
|
UNKNOWN = "UNKNOWN",
|
|
3687
3733
|
/**
|
|
@@ -3763,6 +3809,127 @@ declare enum PostFieldField {
|
|
|
3763
3809
|
}
|
|
3764
3810
|
/** @enumType */
|
|
3765
3811
|
type PostFieldFieldWithLiterals = PostFieldField | 'UNKNOWN' | 'URL' | 'CONTENT_TEXT' | 'METRICS' | 'SEO' | 'CONTACT_ID' | 'RICH_CONTENT' | 'REFERENCE_ID';
|
|
3812
|
+
interface ListDemoPostsResponse {
|
|
3813
|
+
/** List of posts. */
|
|
3814
|
+
posts?: Post[];
|
|
3815
|
+
/** Details on the paged set of results returned. */
|
|
3816
|
+
metaData?: MetaData;
|
|
3817
|
+
}
|
|
3818
|
+
interface MetaData {
|
|
3819
|
+
/** Number of items returned in this response. */
|
|
3820
|
+
count?: number;
|
|
3821
|
+
/** Requested offset. */
|
|
3822
|
+
offset?: number;
|
|
3823
|
+
/** Total number of items that match the query. */
|
|
3824
|
+
total?: number;
|
|
3825
|
+
/**
|
|
3826
|
+
* Pointer to the next or previous page in the list of results.
|
|
3827
|
+
* @maxLength 2000
|
|
3828
|
+
*/
|
|
3829
|
+
cursor?: string | null;
|
|
3830
|
+
}
|
|
3831
|
+
interface PostCountersUpdated extends PostCountersUpdatedInitiatorOneOf {
|
|
3832
|
+
/**
|
|
3833
|
+
* Member ID of person who triggered the counter update
|
|
3834
|
+
* @format GUID
|
|
3835
|
+
*/
|
|
3836
|
+
memberId?: string | null;
|
|
3837
|
+
/**
|
|
3838
|
+
* Visitor ID if person that liked the post is not logged in
|
|
3839
|
+
* @format GUID
|
|
3840
|
+
*/
|
|
3841
|
+
anonymousVisitorId?: string | null;
|
|
3842
|
+
/**
|
|
3843
|
+
* ID of the post which counters were updated.
|
|
3844
|
+
* @format GUID
|
|
3845
|
+
*/
|
|
3846
|
+
postId?: string;
|
|
3847
|
+
/**
|
|
3848
|
+
* Internal ID of the post which counters were updated.
|
|
3849
|
+
* @internal
|
|
3850
|
+
* @maxLength 24
|
|
3851
|
+
*/
|
|
3852
|
+
postInternalId?: string;
|
|
3853
|
+
/** Field of the updated counter. */
|
|
3854
|
+
updatedCounterField?: FieldWithLiterals;
|
|
3855
|
+
/** New counter value. */
|
|
3856
|
+
counter?: number;
|
|
3857
|
+
}
|
|
3858
|
+
/** @oneof */
|
|
3859
|
+
interface PostCountersUpdatedInitiatorOneOf {
|
|
3860
|
+
/**
|
|
3861
|
+
* Member ID of person who triggered the counter update
|
|
3862
|
+
* @format GUID
|
|
3863
|
+
*/
|
|
3864
|
+
memberId?: string | null;
|
|
3865
|
+
/**
|
|
3866
|
+
* Visitor ID if person that liked the post is not logged in
|
|
3867
|
+
* @format GUID
|
|
3868
|
+
*/
|
|
3869
|
+
anonymousVisitorId?: string | null;
|
|
3870
|
+
}
|
|
3871
|
+
declare enum Field {
|
|
3872
|
+
/** Undefined field. */
|
|
3873
|
+
UNKNOWN = "UNKNOWN",
|
|
3874
|
+
/** Total comments field. */
|
|
3875
|
+
TOTAL_COMMENTS = "TOTAL_COMMENTS",
|
|
3876
|
+
/** Like count field. */
|
|
3877
|
+
LIKE_COUNT = "LIKE_COUNT",
|
|
3878
|
+
/** View count field. */
|
|
3879
|
+
VIEW_COUNT = "VIEW_COUNT",
|
|
3880
|
+
/** Rating count field. */
|
|
3881
|
+
RATING_COUNT = "RATING_COUNT"
|
|
3882
|
+
}
|
|
3883
|
+
/** @enumType */
|
|
3884
|
+
type FieldWithLiterals = Field | 'UNKNOWN' | 'TOTAL_COMMENTS' | 'LIKE_COUNT' | 'VIEW_COUNT' | 'RATING_COUNT';
|
|
3885
|
+
interface PostOwnerChanged {
|
|
3886
|
+
/**
|
|
3887
|
+
* Member ID of the post's owner before the change.
|
|
3888
|
+
* @internal
|
|
3889
|
+
* @format GUID
|
|
3890
|
+
*/
|
|
3891
|
+
oldMemberId?: string;
|
|
3892
|
+
/**
|
|
3893
|
+
* Member ID of the post's owner after the change.
|
|
3894
|
+
* @internal
|
|
3895
|
+
* @format GUID
|
|
3896
|
+
*/
|
|
3897
|
+
newMemberId?: string;
|
|
3898
|
+
}
|
|
3899
|
+
interface InitialPostsCopied {
|
|
3900
|
+
/** Number of posts copied. */
|
|
3901
|
+
count?: number;
|
|
3902
|
+
}
|
|
3903
|
+
interface GetPostRequest {
|
|
3904
|
+
/**
|
|
3905
|
+
* Post ID.
|
|
3906
|
+
* @minLength 1
|
|
3907
|
+
* @maxLength 38
|
|
3908
|
+
*/
|
|
3909
|
+
postId: string;
|
|
3910
|
+
/**
|
|
3911
|
+
* __Deprecated.__ Use `fieldsets` instead.
|
|
3912
|
+
* This parameter will be removed on June 30, 2023.
|
|
3913
|
+
*
|
|
3914
|
+
* List of post fields to be included in the response.
|
|
3915
|
+
* @internal
|
|
3916
|
+
* @maxSize 20
|
|
3917
|
+
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
3918
|
+
* This parameter will be removed on June 30, 2023.
|
|
3919
|
+
*
|
|
3920
|
+
* List of post fields to be included in the response.
|
|
3921
|
+
* @replacedBy fieldsets
|
|
3922
|
+
* @targetRemovalDate 2024-06-30
|
|
3923
|
+
*/
|
|
3924
|
+
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
3925
|
+
/**
|
|
3926
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
3927
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
3928
|
+
* only the post’s base fields are returned.
|
|
3929
|
+
* @maxSize 20
|
|
3930
|
+
*/
|
|
3931
|
+
fieldsets?: PostFieldFieldWithLiterals[];
|
|
3932
|
+
}
|
|
3766
3933
|
interface GetPostResponse {
|
|
3767
3934
|
/** Retrieved post info. */
|
|
3768
3935
|
post?: Post;
|
|
@@ -3885,71 +4052,12 @@ interface ListPostsRequest {
|
|
|
3885
4052
|
*/
|
|
3886
4053
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
3887
4054
|
}
|
|
3888
|
-
declare enum GetPostsSort {
|
|
3889
|
-
/** Ordered by `firstPublishedDate` in descending order with pinned posts first. */
|
|
3890
|
-
FEED = "FEED",
|
|
3891
|
-
/** Ordered by `firstPublishedDate` in ascending order. */
|
|
3892
|
-
PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
|
|
3893
|
-
/** Ordered by `firstPublishedDate` in descending order. */
|
|
3894
|
-
PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC",
|
|
3895
|
-
/** Ordered by total number of views in descending order. */
|
|
3896
|
-
VIEW_COUNT = "VIEW_COUNT",
|
|
3897
|
-
/** Ordered by total number of likes in descending order. */
|
|
3898
|
-
LIKE_COUNT = "LIKE_COUNT",
|
|
3899
|
-
/** Ordered by `title` in ascending order. */
|
|
3900
|
-
TITLE_ASC = "TITLE_ASC",
|
|
3901
|
-
/** Ordered by `title` in descending order. */
|
|
3902
|
-
TITLE_DESC = "TITLE_DESC",
|
|
3903
|
-
/**
|
|
3904
|
-
* Sorting by post rating descending.
|
|
3905
|
-
* @internal
|
|
3906
|
-
*/
|
|
3907
|
-
RATING = "RATING"
|
|
3908
|
-
}
|
|
3909
|
-
/** @enumType */
|
|
3910
|
-
type GetPostsSortWithLiterals = GetPostsSort | 'FEED' | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC' | 'VIEW_COUNT' | 'LIKE_COUNT' | 'TITLE_ASC' | 'TITLE_DESC';
|
|
3911
|
-
interface BlogPaging {
|
|
3912
|
-
/**
|
|
3913
|
-
* Number of items to skip in the current sort order.
|
|
3914
|
-
*
|
|
3915
|
-
*
|
|
3916
|
-
* Default: `0`
|
|
3917
|
-
*/
|
|
3918
|
-
offset?: number;
|
|
3919
|
-
/**
|
|
3920
|
-
* Number of items to return.
|
|
3921
|
-
*
|
|
3922
|
-
*
|
|
3923
|
-
* Default:`50`
|
|
3924
|
-
* @min 1
|
|
3925
|
-
* @max 100
|
|
3926
|
-
*/
|
|
3927
|
-
limit?: number;
|
|
3928
|
-
/**
|
|
3929
|
-
* Pointer to the next or previous page in the list of results.
|
|
3930
|
-
* @maxLength 2000
|
|
3931
|
-
*/
|
|
3932
|
-
cursor?: string | null;
|
|
3933
|
-
}
|
|
3934
4055
|
interface ListPostsResponse {
|
|
3935
4056
|
/** List of retrieved posts. */
|
|
3936
4057
|
posts?: Post[];
|
|
3937
4058
|
/** Details on the paged set of results returned. */
|
|
3938
4059
|
metaData?: MetaData;
|
|
3939
4060
|
}
|
|
3940
|
-
interface MetaData {
|
|
3941
|
-
/** Number of items returned in this response. */
|
|
3942
|
-
count?: number;
|
|
3943
|
-
/** Requested offset. */
|
|
3944
|
-
offset?: number;
|
|
3945
|
-
/** Total number of items that match the query. */
|
|
3946
|
-
total?: number;
|
|
3947
|
-
/**
|
|
3948
|
-
* Pointer to the next or previous page in the list of results.
|
|
3949
|
-
* @maxLength 2000
|
|
3950
|
-
*/
|
|
3951
|
-
cursor?: string | null;
|
|
3952
|
-
}
|
|
3953
4061
|
interface QueryPostsRequest {
|
|
3954
4062
|
/**
|
|
3955
4063
|
* __Deprecated.__ Use `query` instead.
|
|
@@ -4397,99 +4505,6 @@ interface PostCount {
|
|
|
4397
4505
|
/** Number of posts. */
|
|
4398
4506
|
postCount?: number;
|
|
4399
4507
|
}
|
|
4400
|
-
interface ListDemoPostsRequest {
|
|
4401
|
-
/**
|
|
4402
|
-
* Whether to return only featured posts.
|
|
4403
|
-
*
|
|
4404
|
-
* Default: `false`
|
|
4405
|
-
*/
|
|
4406
|
-
featured?: boolean;
|
|
4407
|
-
/**
|
|
4408
|
-
* Hashtag filter.
|
|
4409
|
-
*
|
|
4410
|
-
* Pass an array of hashtags to return only posts containing any of the provided hashtags.
|
|
4411
|
-
* If omitted, all posts with or without hashtags are returned.
|
|
4412
|
-
* @maxSize 100
|
|
4413
|
-
* @maxLength 100
|
|
4414
|
-
*/
|
|
4415
|
-
hashtags?: string[];
|
|
4416
|
-
/**
|
|
4417
|
-
* Category filter.
|
|
4418
|
-
*
|
|
4419
|
-
* Pass an array of category IDs to return only posts with any of the provided categories.
|
|
4420
|
-
* If omitted, all posts with or without associated categories are returned.
|
|
4421
|
-
* @maxSize 50
|
|
4422
|
-
* @format GUID
|
|
4423
|
-
*/
|
|
4424
|
-
categoryIds?: string[];
|
|
4425
|
-
/**
|
|
4426
|
-
* Tag filter.
|
|
4427
|
-
*
|
|
4428
|
-
* Pass an array of tag IDs to return only posts with any of the provided tags.
|
|
4429
|
-
* If omitted, all posts with or without tags are returned.
|
|
4430
|
-
* @maxSize 50
|
|
4431
|
-
* @format GUID
|
|
4432
|
-
*/
|
|
4433
|
-
tagIds?: string[];
|
|
4434
|
-
/**
|
|
4435
|
-
* Sorting options.
|
|
4436
|
-
*
|
|
4437
|
-
* - `FEED`: Ordered by `firstPublishedDate` in descending order with pinned posts first.
|
|
4438
|
-
* - `VIEW_COUNT`: Ordered by total number of views in descending order.
|
|
4439
|
-
* - `LIKE_COUNT`: Ordered by total number of likes in descending order.
|
|
4440
|
-
* - `PUBLISHED_DATE_ASC`: Ordered by `firstPublishedDate` in ascending order.
|
|
4441
|
-
* - `PUBLISHED_DATE_DESC`: Ordered by `firstPublishedDate` in descending order.
|
|
4442
|
-
* - `TITLE_ASC`: Ordered by `title` in ascending order.
|
|
4443
|
-
* - `TITLE_DESC`: Ordered by `title` in descending order.
|
|
4444
|
-
* - `RATING`: reserved for internal use.
|
|
4445
|
-
*
|
|
4446
|
-
* Default: `FEED`
|
|
4447
|
-
*/
|
|
4448
|
-
sort?: GetPostsSortWithLiterals;
|
|
4449
|
-
/** Pagination options. */
|
|
4450
|
-
paging?: BlogPaging;
|
|
4451
|
-
/**
|
|
4452
|
-
* __Deprecated.__ Use `fieldsets` instead.
|
|
4453
|
-
* This parameter will be removed on June 30, 2023.
|
|
4454
|
-
*
|
|
4455
|
-
* List of post fields to be included in the response.
|
|
4456
|
-
* @maxSize 20
|
|
4457
|
-
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
4458
|
-
* This parameter will be removed on June 30, 2023.
|
|
4459
|
-
*
|
|
4460
|
-
* List of post fields to be included in the response.
|
|
4461
|
-
* @replacedBy fieldsets
|
|
4462
|
-
* @targetRemovalDate 2024-06-30
|
|
4463
|
-
*/
|
|
4464
|
-
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
4465
|
-
/**
|
|
4466
|
-
* Language filter.
|
|
4467
|
-
*
|
|
4468
|
-
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
4469
|
-
* Pass a language to only receive posts that are in that language.
|
|
4470
|
-
* If omitted, posts in all languages are returned.
|
|
4471
|
-
* @format LANGUAGE_TAG
|
|
4472
|
-
*/
|
|
4473
|
-
language?: string | null;
|
|
4474
|
-
/**
|
|
4475
|
-
* Post owner's member ID.
|
|
4476
|
-
* @format GUID
|
|
4477
|
-
*/
|
|
4478
|
-
memberId?: string | null;
|
|
4479
|
-
/**
|
|
4480
|
-
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
4481
|
-
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
4482
|
-
* only the post’s base fields are returned.
|
|
4483
|
-
* @maxSize 20
|
|
4484
|
-
*/
|
|
4485
|
-
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4486
|
-
}
|
|
4487
|
-
interface ListDemoPostsResponse {
|
|
4488
|
-
/** List of posts. */
|
|
4489
|
-
posts?: Post[];
|
|
4490
|
-
/** Details on the paged set of results returned. */
|
|
4491
|
-
metaData?: MetaData;
|
|
4492
|
-
}
|
|
4493
4508
|
interface BaseEventMetadata {
|
|
4494
4509
|
/**
|
|
4495
4510
|
* App instance ID.
|
|
@@ -4637,14 +4652,13 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
|
|
|
4637
4652
|
/**
|
|
4638
4653
|
* Retrieves the number of published posts per month within a specified time range.
|
|
4639
4654
|
*
|
|
4640
|
-
*
|
|
4641
|
-
* The
|
|
4642
|
-
*
|
|
4643
|
-
*
|
|
4644
|
-
*
|
|
4645
|
-
*
|
|
4655
|
+
* The time range is set using the `rangeStart` and `months` properties.
|
|
4656
|
+
* The time range always starts on the 1st day of the month set in `rangeStart` and
|
|
4657
|
+
* includes the number of `months` following `rangeStart`.
|
|
4658
|
+
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
|
4659
|
+
* 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.
|
|
4660
|
+
* > 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.
|
|
4646
4661
|
* @public
|
|
4647
|
-
* @param options - Options specifying time frame, sort, and filter.
|
|
4648
4662
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4649
4663
|
* @applicableIdentity APP
|
|
4650
4664
|
* @returns Get Blog Post Count Stats response
|
|
@@ -4685,7 +4699,6 @@ interface QueryPostCountStatsOptions {
|
|
|
4685
4699
|
/**
|
|
4686
4700
|
* Retrieves the total amount of published posts of the blog.
|
|
4687
4701
|
* @public
|
|
4688
|
-
* @param options - Language Options.
|
|
4689
4702
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4690
4703
|
* @applicableIdentity APP
|
|
4691
4704
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
|
|
@@ -4706,12 +4719,12 @@ interface GetTotalPostsOptions {
|
|
|
4706
4719
|
* @param postId - Post ID.
|
|
4707
4720
|
* @public
|
|
4708
4721
|
* @requiredField postId
|
|
4709
|
-
* @param options - Options specifying which fields to return.
|
|
4710
4722
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4711
4723
|
* @applicableIdentity APP
|
|
4724
|
+
* @returns Retrieved post info.
|
|
4712
4725
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
|
4713
4726
|
*/
|
|
4714
|
-
declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<
|
|
4727
|
+
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>>;
|
|
4715
4728
|
interface GetPostOptions {
|
|
4716
4729
|
/**
|
|
4717
4730
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
@@ -4731,7 +4744,6 @@ interface GetPostOptions {
|
|
|
4731
4744
|
* @param slug - Slug of the post to retrieve.
|
|
4732
4745
|
* @public
|
|
4733
4746
|
* @requiredField slug
|
|
4734
|
-
* @param options - Options specifying which fields to return.
|
|
4735
4747
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4736
4748
|
* @applicableIdentity APP
|
|
4737
4749
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
|
|
@@ -4759,7 +4771,6 @@ interface GetPostBySlugOptions {
|
|
|
4759
4771
|
* - `paging.limit` is `50`.
|
|
4760
4772
|
* - `paging.offset` is `0`.
|
|
4761
4773
|
* @public
|
|
4762
|
-
* @param options - Sort, filter, and paging options.
|
|
4763
4774
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4764
4775
|
* @applicableIdentity APP
|
|
4765
4776
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
|
|
@@ -4830,26 +4841,18 @@ interface ListPostsOptions {
|
|
|
4830
4841
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4831
4842
|
}
|
|
4832
4843
|
/**
|
|
4833
|
-
*
|
|
4834
|
-
*
|
|
4835
|
-
*
|
|
4836
|
-
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
|
4844
|
+
* Retrieves a list of up to 100 posts, given the provided paging, filtering, and sorting.
|
|
4837
4845
|
*
|
|
4838
|
-
*
|
|
4839
|
-
*
|
|
4840
|
-
*
|
|
4841
|
-
*
|
|
4842
|
-
* `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
|
|
4843
|
-
* + `limit(50)`
|
|
4844
|
-
* + `descending('firstPublishedDate')`
|
|
4845
|
-
*
|
|
4846
|
-
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
|
4847
|
-
*
|
|
4848
|
-
* To learn how to query posts, refer to the table below.
|
|
4846
|
+
* Query Posts runs with these defaults, which you can override:
|
|
4847
|
+
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
|
4848
|
+
* - `paging.limit` is `50`.
|
|
4849
|
+
* - `paging.offset` is `0`.
|
|
4849
4850
|
*
|
|
4850
|
-
*
|
|
4851
|
+
* To learn about working with _Query_ endpoints, see
|
|
4852
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
|
|
4853
|
+
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
|
|
4854
|
+
* [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
4851
4855
|
* @public
|
|
4852
|
-
* @param options - Options specifying which fields to return.
|
|
4853
4856
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4854
4857
|
* @applicableIdentity APP
|
|
4855
4858
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
|