@wix/auto_sdk_blog_posts 1.0.189 → 1.0.191
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 +18 -12
- package/build/cjs/index.js +998 -2344
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +199 -185
- package/build/cjs/index.typings.js +673 -1392
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +167 -167
- package/build/cjs/meta.js +634 -1356
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +18 -12
- package/build/es/index.mjs +998 -2344
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +199 -185
- package/build/es/index.typings.mjs +673 -1392
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +167 -167
- package/build/es/meta.mjs +634 -1356
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +18 -12
- package/build/internal/cjs/index.typings.d.ts +253 -239
- package/build/internal/cjs/meta.d.ts +221 -221
- package/build/internal/es/index.d.mts +18 -12
- package/build/internal/es/index.typings.d.mts +253 -239
- package/build/internal/es/meta.d.mts +221 -221
- package/package.json +2 -2
|
@@ -3797,62 +3797,91 @@ interface GetTotalPostsResponse {
|
|
|
3797
3797
|
/** Total amount of published posts. */
|
|
3798
3798
|
total?: number;
|
|
3799
3799
|
}
|
|
3800
|
-
interface
|
|
3800
|
+
interface PostCountersUpdated extends PostCountersUpdatedInitiatorOneOf {
|
|
3801
3801
|
/**
|
|
3802
|
-
*
|
|
3803
|
-
*
|
|
3804
|
-
* Default: `false`
|
|
3802
|
+
* Member ID of person who triggered the counter update
|
|
3803
|
+
* @format GUID
|
|
3805
3804
|
*/
|
|
3806
|
-
|
|
3805
|
+
memberId?: string | null;
|
|
3807
3806
|
/**
|
|
3808
|
-
*
|
|
3809
|
-
*
|
|
3810
|
-
* Pass an array of hashtags to return only posts containing any of the provided hashtags.
|
|
3811
|
-
* If omitted, all posts with or without hashtags are returned.
|
|
3812
|
-
* @maxSize 100
|
|
3813
|
-
* @maxLength 100
|
|
3807
|
+
* Visitor ID if person that liked the post is not logged in
|
|
3808
|
+
* @format GUID
|
|
3814
3809
|
*/
|
|
3815
|
-
|
|
3810
|
+
anonymousVisitorId?: string | null;
|
|
3816
3811
|
/**
|
|
3817
|
-
*
|
|
3818
|
-
*
|
|
3819
|
-
* Pass an array of category IDs to return only posts with any of the provided categories.
|
|
3820
|
-
* If omitted, all posts with or without associated categories are returned.
|
|
3821
|
-
* @maxSize 50
|
|
3812
|
+
* ID of the post which counters were updated.
|
|
3822
3813
|
* @format GUID
|
|
3823
3814
|
*/
|
|
3824
|
-
|
|
3815
|
+
postId?: string;
|
|
3825
3816
|
/**
|
|
3826
|
-
*
|
|
3827
|
-
*
|
|
3828
|
-
*
|
|
3829
|
-
|
|
3830
|
-
|
|
3817
|
+
* Internal ID of the post which counters were updated.
|
|
3818
|
+
* @internal
|
|
3819
|
+
* @maxLength 24
|
|
3820
|
+
*/
|
|
3821
|
+
postInternalId?: string;
|
|
3822
|
+
/** Field of the updated counter. */
|
|
3823
|
+
updatedCounterField?: FieldWithLiterals;
|
|
3824
|
+
/** New counter value. */
|
|
3825
|
+
counter?: number;
|
|
3826
|
+
}
|
|
3827
|
+
/** @oneof */
|
|
3828
|
+
interface PostCountersUpdatedInitiatorOneOf {
|
|
3829
|
+
/**
|
|
3830
|
+
* Member ID of person who triggered the counter update
|
|
3831
3831
|
* @format GUID
|
|
3832
3832
|
*/
|
|
3833
|
-
|
|
3833
|
+
memberId?: string | null;
|
|
3834
3834
|
/**
|
|
3835
|
-
*
|
|
3836
|
-
*
|
|
3837
|
-
* - `FEED`: Ordered by `firstPublishedDate` in descending order with pinned posts first.
|
|
3838
|
-
* - `VIEW_COUNT`: Ordered by total number of views in descending order.
|
|
3839
|
-
* - `LIKE_COUNT`: Ordered by total number of likes in descending order.
|
|
3840
|
-
* - `PUBLISHED_DATE_ASC`: Ordered by `firstPublishedDate` in ascending order.
|
|
3841
|
-
* - `PUBLISHED_DATE_DESC`: Ordered by `firstPublishedDate` in descending order.
|
|
3842
|
-
* - `TITLE_ASC`: Ordered by `title` in ascending order.
|
|
3843
|
-
* - `TITLE_DESC`: Ordered by `title` in descending order.
|
|
3844
|
-
* - `RATING`: reserved for internal use.
|
|
3845
|
-
*
|
|
3846
|
-
* Default: `FEED`
|
|
3835
|
+
* Visitor ID if person that liked the post is not logged in
|
|
3836
|
+
* @format GUID
|
|
3847
3837
|
*/
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3838
|
+
anonymousVisitorId?: string | null;
|
|
3839
|
+
}
|
|
3840
|
+
declare enum Field {
|
|
3841
|
+
/** Undefined field. */
|
|
3842
|
+
UNKNOWN = "UNKNOWN",
|
|
3843
|
+
/** Total comments field. */
|
|
3844
|
+
TOTAL_COMMENTS = "TOTAL_COMMENTS",
|
|
3845
|
+
/** Like count field. */
|
|
3846
|
+
LIKE_COUNT = "LIKE_COUNT",
|
|
3847
|
+
/** View count field. */
|
|
3848
|
+
VIEW_COUNT = "VIEW_COUNT",
|
|
3849
|
+
/** Rating count field. */
|
|
3850
|
+
RATING_COUNT = "RATING_COUNT"
|
|
3851
|
+
}
|
|
3852
|
+
/** @enumType */
|
|
3853
|
+
type FieldWithLiterals = Field | 'UNKNOWN' | 'TOTAL_COMMENTS' | 'LIKE_COUNT' | 'VIEW_COUNT' | 'RATING_COUNT';
|
|
3854
|
+
interface PostOwnerChanged {
|
|
3855
|
+
/**
|
|
3856
|
+
* Member ID of the post's owner before the change.
|
|
3857
|
+
* @internal
|
|
3858
|
+
* @format GUID
|
|
3859
|
+
*/
|
|
3860
|
+
oldMemberId?: string;
|
|
3861
|
+
/**
|
|
3862
|
+
* Member ID of the post's owner after the change.
|
|
3863
|
+
* @internal
|
|
3864
|
+
* @format GUID
|
|
3865
|
+
*/
|
|
3866
|
+
newMemberId?: string;
|
|
3867
|
+
}
|
|
3868
|
+
interface InitialPostsCopied {
|
|
3869
|
+
/** Number of posts copied. */
|
|
3870
|
+
count?: number;
|
|
3871
|
+
}
|
|
3872
|
+
interface GetPostRequest {
|
|
3873
|
+
/**
|
|
3874
|
+
* Post ID.
|
|
3875
|
+
* @minLength 1
|
|
3876
|
+
* @maxLength 38
|
|
3877
|
+
*/
|
|
3878
|
+
postId: string;
|
|
3851
3879
|
/**
|
|
3852
3880
|
* __Deprecated.__ Use `fieldsets` instead.
|
|
3853
3881
|
* This parameter will be removed on June 30, 2023.
|
|
3854
3882
|
*
|
|
3855
3883
|
* List of post fields to be included in the response.
|
|
3884
|
+
* @internal
|
|
3856
3885
|
* @maxSize 20
|
|
3857
3886
|
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
3858
3887
|
* This parameter will be removed on June 30, 2023.
|
|
@@ -3862,20 +3891,6 @@ interface ListDemoPostsRequest {
|
|
|
3862
3891
|
* @targetRemovalDate 2024-06-30
|
|
3863
3892
|
*/
|
|
3864
3893
|
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
3865
|
-
/**
|
|
3866
|
-
* Language filter.
|
|
3867
|
-
*
|
|
3868
|
-
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3869
|
-
* Pass a language to only receive posts that are in that language.
|
|
3870
|
-
* If omitted, posts in all languages are returned.
|
|
3871
|
-
* @format LANGUAGE_TAG
|
|
3872
|
-
*/
|
|
3873
|
-
language?: string | null;
|
|
3874
|
-
/**
|
|
3875
|
-
* Post owner's member ID.
|
|
3876
|
-
* @format GUID
|
|
3877
|
-
*/
|
|
3878
|
-
memberId?: string | null;
|
|
3879
3894
|
/**
|
|
3880
3895
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
3881
3896
|
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
@@ -3884,52 +3899,6 @@ interface ListDemoPostsRequest {
|
|
|
3884
3899
|
*/
|
|
3885
3900
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
3886
3901
|
}
|
|
3887
|
-
declare enum GetPostsSort {
|
|
3888
|
-
/** Ordered by `firstPublishedDate` in descending order with pinned posts first. */
|
|
3889
|
-
FEED = "FEED",
|
|
3890
|
-
/** Ordered by `firstPublishedDate` in ascending order. */
|
|
3891
|
-
PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
|
|
3892
|
-
/** Ordered by `firstPublishedDate` in descending order. */
|
|
3893
|
-
PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC",
|
|
3894
|
-
/** Ordered by total number of views in descending order. */
|
|
3895
|
-
VIEW_COUNT = "VIEW_COUNT",
|
|
3896
|
-
/** Ordered by total number of likes in descending order. */
|
|
3897
|
-
LIKE_COUNT = "LIKE_COUNT",
|
|
3898
|
-
/** Ordered by `title` in ascending order. */
|
|
3899
|
-
TITLE_ASC = "TITLE_ASC",
|
|
3900
|
-
/** Ordered by `title` in descending order. */
|
|
3901
|
-
TITLE_DESC = "TITLE_DESC",
|
|
3902
|
-
/**
|
|
3903
|
-
* Sorting by post rating descending.
|
|
3904
|
-
* @internal
|
|
3905
|
-
*/
|
|
3906
|
-
RATING = "RATING"
|
|
3907
|
-
}
|
|
3908
|
-
/** @enumType */
|
|
3909
|
-
type GetPostsSortWithLiterals = GetPostsSort | 'FEED' | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC' | 'VIEW_COUNT' | 'LIKE_COUNT' | 'TITLE_ASC' | 'TITLE_DESC';
|
|
3910
|
-
interface BlogPaging {
|
|
3911
|
-
/**
|
|
3912
|
-
* Number of items to skip in the current sort order.
|
|
3913
|
-
*
|
|
3914
|
-
*
|
|
3915
|
-
* Default: `0`
|
|
3916
|
-
*/
|
|
3917
|
-
offset?: number;
|
|
3918
|
-
/**
|
|
3919
|
-
* Number of items to return.
|
|
3920
|
-
*
|
|
3921
|
-
*
|
|
3922
|
-
* Default:`50`
|
|
3923
|
-
* @min 1
|
|
3924
|
-
* @max 100
|
|
3925
|
-
*/
|
|
3926
|
-
limit?: number;
|
|
3927
|
-
/**
|
|
3928
|
-
* Pointer to the next or previous page in the list of results.
|
|
3929
|
-
* @maxLength 2000
|
|
3930
|
-
*/
|
|
3931
|
-
cursor?: string | null;
|
|
3932
|
-
}
|
|
3933
3902
|
declare enum PostFieldField {
|
|
3934
3903
|
UNKNOWN = "UNKNOWN",
|
|
3935
3904
|
/**
|
|
@@ -4011,127 +3980,6 @@ declare enum PostFieldField {
|
|
|
4011
3980
|
}
|
|
4012
3981
|
/** @enumType */
|
|
4013
3982
|
type PostFieldFieldWithLiterals = PostFieldField | 'UNKNOWN' | 'URL' | 'CONTENT_TEXT' | 'METRICS' | 'SEO' | 'CONTACT_ID' | 'RICH_CONTENT' | 'REFERENCE_ID';
|
|
4014
|
-
interface ListDemoPostsResponse {
|
|
4015
|
-
/** List of posts. */
|
|
4016
|
-
posts?: Post[];
|
|
4017
|
-
/** Details on the paged set of results returned. */
|
|
4018
|
-
metaData?: MetaData;
|
|
4019
|
-
}
|
|
4020
|
-
interface MetaData {
|
|
4021
|
-
/** Number of items returned in this response. */
|
|
4022
|
-
count?: number;
|
|
4023
|
-
/** Requested offset. */
|
|
4024
|
-
offset?: number;
|
|
4025
|
-
/** Total number of items that match the query. */
|
|
4026
|
-
total?: number;
|
|
4027
|
-
/**
|
|
4028
|
-
* Pointer to the next or previous page in the list of results.
|
|
4029
|
-
* @maxLength 2000
|
|
4030
|
-
*/
|
|
4031
|
-
cursor?: string | null;
|
|
4032
|
-
}
|
|
4033
|
-
interface PostCountersUpdated extends PostCountersUpdatedInitiatorOneOf {
|
|
4034
|
-
/**
|
|
4035
|
-
* Member ID of person who triggered the counter update
|
|
4036
|
-
* @format GUID
|
|
4037
|
-
*/
|
|
4038
|
-
memberId?: string | null;
|
|
4039
|
-
/**
|
|
4040
|
-
* Visitor ID if person that liked the post is not logged in
|
|
4041
|
-
* @format GUID
|
|
4042
|
-
*/
|
|
4043
|
-
anonymousVisitorId?: string | null;
|
|
4044
|
-
/**
|
|
4045
|
-
* ID of the post which counters were updated.
|
|
4046
|
-
* @format GUID
|
|
4047
|
-
*/
|
|
4048
|
-
postId?: string;
|
|
4049
|
-
/**
|
|
4050
|
-
* Internal ID of the post which counters were updated.
|
|
4051
|
-
* @internal
|
|
4052
|
-
* @maxLength 24
|
|
4053
|
-
*/
|
|
4054
|
-
postInternalId?: string;
|
|
4055
|
-
/** Field of the updated counter. */
|
|
4056
|
-
updatedCounterField?: FieldWithLiterals;
|
|
4057
|
-
/** New counter value. */
|
|
4058
|
-
counter?: number;
|
|
4059
|
-
}
|
|
4060
|
-
/** @oneof */
|
|
4061
|
-
interface PostCountersUpdatedInitiatorOneOf {
|
|
4062
|
-
/**
|
|
4063
|
-
* Member ID of person who triggered the counter update
|
|
4064
|
-
* @format GUID
|
|
4065
|
-
*/
|
|
4066
|
-
memberId?: string | null;
|
|
4067
|
-
/**
|
|
4068
|
-
* Visitor ID if person that liked the post is not logged in
|
|
4069
|
-
* @format GUID
|
|
4070
|
-
*/
|
|
4071
|
-
anonymousVisitorId?: string | null;
|
|
4072
|
-
}
|
|
4073
|
-
declare enum Field {
|
|
4074
|
-
/** Undefined field. */
|
|
4075
|
-
UNKNOWN = "UNKNOWN",
|
|
4076
|
-
/** Total comments field. */
|
|
4077
|
-
TOTAL_COMMENTS = "TOTAL_COMMENTS",
|
|
4078
|
-
/** Like count field. */
|
|
4079
|
-
LIKE_COUNT = "LIKE_COUNT",
|
|
4080
|
-
/** View count field. */
|
|
4081
|
-
VIEW_COUNT = "VIEW_COUNT",
|
|
4082
|
-
/** Rating count field. */
|
|
4083
|
-
RATING_COUNT = "RATING_COUNT"
|
|
4084
|
-
}
|
|
4085
|
-
/** @enumType */
|
|
4086
|
-
type FieldWithLiterals = Field | 'UNKNOWN' | 'TOTAL_COMMENTS' | 'LIKE_COUNT' | 'VIEW_COUNT' | 'RATING_COUNT';
|
|
4087
|
-
interface PostOwnerChanged {
|
|
4088
|
-
/**
|
|
4089
|
-
* Member ID of the post's owner before the change.
|
|
4090
|
-
* @internal
|
|
4091
|
-
* @format GUID
|
|
4092
|
-
*/
|
|
4093
|
-
oldMemberId?: string;
|
|
4094
|
-
/**
|
|
4095
|
-
* Member ID of the post's owner after the change.
|
|
4096
|
-
* @internal
|
|
4097
|
-
* @format GUID
|
|
4098
|
-
*/
|
|
4099
|
-
newMemberId?: string;
|
|
4100
|
-
}
|
|
4101
|
-
interface InitialPostsCopied {
|
|
4102
|
-
/** Number of posts copied. */
|
|
4103
|
-
count?: number;
|
|
4104
|
-
}
|
|
4105
|
-
interface GetPostRequest {
|
|
4106
|
-
/**
|
|
4107
|
-
* Post ID.
|
|
4108
|
-
* @minLength 1
|
|
4109
|
-
* @maxLength 38
|
|
4110
|
-
*/
|
|
4111
|
-
postId: string;
|
|
4112
|
-
/**
|
|
4113
|
-
* __Deprecated.__ Use `fieldsets` instead.
|
|
4114
|
-
* This parameter will be removed on June 30, 2023.
|
|
4115
|
-
*
|
|
4116
|
-
* List of post fields to be included in the response.
|
|
4117
|
-
* @internal
|
|
4118
|
-
* @maxSize 20
|
|
4119
|
-
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
4120
|
-
* This parameter will be removed on June 30, 2023.
|
|
4121
|
-
*
|
|
4122
|
-
* List of post fields to be included in the response.
|
|
4123
|
-
* @replacedBy fieldsets
|
|
4124
|
-
* @targetRemovalDate 2024-06-30
|
|
4125
|
-
*/
|
|
4126
|
-
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
4127
|
-
/**
|
|
4128
|
-
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
4129
|
-
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
4130
|
-
* only the post’s base fields are returned.
|
|
4131
|
-
* @maxSize 20
|
|
4132
|
-
*/
|
|
4133
|
-
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4134
|
-
}
|
|
4135
3983
|
interface GetPostResponse {
|
|
4136
3984
|
/** Retrieved post info. */
|
|
4137
3985
|
post?: Post;
|
|
@@ -4254,12 +4102,71 @@ interface ListPostsRequest {
|
|
|
4254
4102
|
*/
|
|
4255
4103
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4256
4104
|
}
|
|
4105
|
+
declare enum GetPostsSort {
|
|
4106
|
+
/** Ordered by `firstPublishedDate` in descending order with pinned posts first. */
|
|
4107
|
+
FEED = "FEED",
|
|
4108
|
+
/** Ordered by `firstPublishedDate` in ascending order. */
|
|
4109
|
+
PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
|
|
4110
|
+
/** Ordered by `firstPublishedDate` in descending order. */
|
|
4111
|
+
PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC",
|
|
4112
|
+
/** Ordered by total number of views in descending order. */
|
|
4113
|
+
VIEW_COUNT = "VIEW_COUNT",
|
|
4114
|
+
/** Ordered by total number of likes in descending order. */
|
|
4115
|
+
LIKE_COUNT = "LIKE_COUNT",
|
|
4116
|
+
/** Ordered by `title` in ascending order. */
|
|
4117
|
+
TITLE_ASC = "TITLE_ASC",
|
|
4118
|
+
/** Ordered by `title` in descending order. */
|
|
4119
|
+
TITLE_DESC = "TITLE_DESC",
|
|
4120
|
+
/**
|
|
4121
|
+
* Sorting by post rating descending.
|
|
4122
|
+
* @internal
|
|
4123
|
+
*/
|
|
4124
|
+
RATING = "RATING"
|
|
4125
|
+
}
|
|
4126
|
+
/** @enumType */
|
|
4127
|
+
type GetPostsSortWithLiterals = GetPostsSort | 'FEED' | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC' | 'VIEW_COUNT' | 'LIKE_COUNT' | 'TITLE_ASC' | 'TITLE_DESC';
|
|
4128
|
+
interface BlogPaging {
|
|
4129
|
+
/**
|
|
4130
|
+
* Number of items to skip in the current sort order.
|
|
4131
|
+
*
|
|
4132
|
+
*
|
|
4133
|
+
* Default: `0`
|
|
4134
|
+
*/
|
|
4135
|
+
offset?: number;
|
|
4136
|
+
/**
|
|
4137
|
+
* Number of items to return.
|
|
4138
|
+
*
|
|
4139
|
+
*
|
|
4140
|
+
* Default:`50`
|
|
4141
|
+
* @min 1
|
|
4142
|
+
* @max 100
|
|
4143
|
+
*/
|
|
4144
|
+
limit?: number;
|
|
4145
|
+
/**
|
|
4146
|
+
* Pointer to the next or previous page in the list of results.
|
|
4147
|
+
* @maxLength 2000
|
|
4148
|
+
*/
|
|
4149
|
+
cursor?: string | null;
|
|
4150
|
+
}
|
|
4257
4151
|
interface ListPostsResponse {
|
|
4258
4152
|
/** List of retrieved posts. */
|
|
4259
4153
|
posts?: Post[];
|
|
4260
4154
|
/** Details on the paged set of results returned. */
|
|
4261
4155
|
metaData?: MetaData;
|
|
4262
4156
|
}
|
|
4157
|
+
interface MetaData {
|
|
4158
|
+
/** Number of items returned in this response. */
|
|
4159
|
+
count?: number;
|
|
4160
|
+
/** Requested offset. */
|
|
4161
|
+
offset?: number;
|
|
4162
|
+
/** Total number of items that match the query. */
|
|
4163
|
+
total?: number;
|
|
4164
|
+
/**
|
|
4165
|
+
* Pointer to the next or previous page in the list of results.
|
|
4166
|
+
* @maxLength 2000
|
|
4167
|
+
*/
|
|
4168
|
+
cursor?: string | null;
|
|
4169
|
+
}
|
|
4263
4170
|
interface QueryPostsRequest {
|
|
4264
4171
|
/**
|
|
4265
4172
|
* __Deprecated.__ Use `query` instead.
|
|
@@ -4496,7 +4403,7 @@ interface ViewPostRequest {
|
|
|
4496
4403
|
postId: string;
|
|
4497
4404
|
}
|
|
4498
4405
|
interface ViewPostResponse {
|
|
4499
|
-
/**
|
|
4406
|
+
/** Updated total number of views for the post. */
|
|
4500
4407
|
views?: number;
|
|
4501
4408
|
}
|
|
4502
4409
|
interface LikePostRequest {
|
|
@@ -4711,6 +4618,99 @@ interface PostCount {
|
|
|
4711
4618
|
/** Number of posts. */
|
|
4712
4619
|
postCount?: number;
|
|
4713
4620
|
}
|
|
4621
|
+
interface ListDemoPostsRequest {
|
|
4622
|
+
/**
|
|
4623
|
+
* Whether to return only featured posts.
|
|
4624
|
+
*
|
|
4625
|
+
* Default: `false`
|
|
4626
|
+
*/
|
|
4627
|
+
featured?: boolean;
|
|
4628
|
+
/**
|
|
4629
|
+
* Hashtag filter.
|
|
4630
|
+
*
|
|
4631
|
+
* Pass an array of hashtags to return only posts containing any of the provided hashtags.
|
|
4632
|
+
* If omitted, all posts with or without hashtags are returned.
|
|
4633
|
+
* @maxSize 100
|
|
4634
|
+
* @maxLength 100
|
|
4635
|
+
*/
|
|
4636
|
+
hashtags?: string[];
|
|
4637
|
+
/**
|
|
4638
|
+
* Category filter.
|
|
4639
|
+
*
|
|
4640
|
+
* Pass an array of category IDs to return only posts with any of the provided categories.
|
|
4641
|
+
* If omitted, all posts with or without associated categories are returned.
|
|
4642
|
+
* @maxSize 50
|
|
4643
|
+
* @format GUID
|
|
4644
|
+
*/
|
|
4645
|
+
categoryIds?: string[];
|
|
4646
|
+
/**
|
|
4647
|
+
* Tag filter.
|
|
4648
|
+
*
|
|
4649
|
+
* Pass an array of tag IDs to return only posts with any of the provided tags.
|
|
4650
|
+
* If omitted, all posts with or without tags are returned.
|
|
4651
|
+
* @maxSize 50
|
|
4652
|
+
* @format GUID
|
|
4653
|
+
*/
|
|
4654
|
+
tagIds?: string[];
|
|
4655
|
+
/**
|
|
4656
|
+
* Sorting options.
|
|
4657
|
+
*
|
|
4658
|
+
* - `FEED`: Ordered by `firstPublishedDate` in descending order with pinned posts first.
|
|
4659
|
+
* - `VIEW_COUNT`: Ordered by total number of views in descending order.
|
|
4660
|
+
* - `LIKE_COUNT`: Ordered by total number of likes in descending order.
|
|
4661
|
+
* - `PUBLISHED_DATE_ASC`: Ordered by `firstPublishedDate` in ascending order.
|
|
4662
|
+
* - `PUBLISHED_DATE_DESC`: Ordered by `firstPublishedDate` in descending order.
|
|
4663
|
+
* - `TITLE_ASC`: Ordered by `title` in ascending order.
|
|
4664
|
+
* - `TITLE_DESC`: Ordered by `title` in descending order.
|
|
4665
|
+
* - `RATING`: reserved for internal use.
|
|
4666
|
+
*
|
|
4667
|
+
* Default: `FEED`
|
|
4668
|
+
*/
|
|
4669
|
+
sort?: GetPostsSortWithLiterals;
|
|
4670
|
+
/** Pagination options. */
|
|
4671
|
+
paging?: BlogPaging;
|
|
4672
|
+
/**
|
|
4673
|
+
* __Deprecated.__ Use `fieldsets` instead.
|
|
4674
|
+
* This parameter will be removed on June 30, 2023.
|
|
4675
|
+
*
|
|
4676
|
+
* List of post fields to be included in the response.
|
|
4677
|
+
* @maxSize 20
|
|
4678
|
+
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
4679
|
+
* This parameter will be removed on June 30, 2023.
|
|
4680
|
+
*
|
|
4681
|
+
* List of post fields to be included in the response.
|
|
4682
|
+
* @replacedBy fieldsets
|
|
4683
|
+
* @targetRemovalDate 2024-06-30
|
|
4684
|
+
*/
|
|
4685
|
+
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
4686
|
+
/**
|
|
4687
|
+
* Language filter.
|
|
4688
|
+
*
|
|
4689
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
4690
|
+
* Pass a language to only receive posts that are in that language.
|
|
4691
|
+
* If omitted, posts in all languages are returned.
|
|
4692
|
+
* @format LANGUAGE_TAG
|
|
4693
|
+
*/
|
|
4694
|
+
language?: string | null;
|
|
4695
|
+
/**
|
|
4696
|
+
* Post owner's member ID.
|
|
4697
|
+
* @format GUID
|
|
4698
|
+
*/
|
|
4699
|
+
memberId?: string | null;
|
|
4700
|
+
/**
|
|
4701
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
4702
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
4703
|
+
* only the post’s base fields are returned.
|
|
4704
|
+
* @maxSize 20
|
|
4705
|
+
*/
|
|
4706
|
+
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4707
|
+
}
|
|
4708
|
+
interface ListDemoPostsResponse {
|
|
4709
|
+
/** List of posts. */
|
|
4710
|
+
posts?: Post[];
|
|
4711
|
+
/** Details on the paged set of results returned. */
|
|
4712
|
+
metaData?: MetaData;
|
|
4713
|
+
}
|
|
4714
4714
|
interface BaseEventMetadata {
|
|
4715
4715
|
/**
|
|
4716
4716
|
* App instance ID.
|
|
@@ -4858,13 +4858,14 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
|
|
|
4858
4858
|
/**
|
|
4859
4859
|
* Retrieves the number of published posts per month within a specified time range.
|
|
4860
4860
|
*
|
|
4861
|
-
*
|
|
4862
|
-
* The
|
|
4863
|
-
*
|
|
4864
|
-
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
|
4865
|
-
*
|
|
4866
|
-
*
|
|
4861
|
+
*
|
|
4862
|
+
* The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
|
|
4863
|
+
*
|
|
4864
|
+
* 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.
|
|
4865
|
+
*
|
|
4866
|
+
* >**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.
|
|
4867
4867
|
* @public
|
|
4868
|
+
* @param options - Options specifying time frame, sort, and filter.
|
|
4868
4869
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4869
4870
|
* @applicableIdentity APP
|
|
4870
4871
|
* @returns Get Blog Post Count Stats response
|
|
@@ -4905,6 +4906,7 @@ interface QueryPostCountStatsOptions {
|
|
|
4905
4906
|
/**
|
|
4906
4907
|
* Retrieves the total amount of published posts of the blog.
|
|
4907
4908
|
* @public
|
|
4909
|
+
* @param options - Language Options.
|
|
4908
4910
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4909
4911
|
* @applicableIdentity APP
|
|
4910
4912
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
|
|
@@ -4925,12 +4927,12 @@ interface GetTotalPostsOptions {
|
|
|
4925
4927
|
* @param postId - Post ID.
|
|
4926
4928
|
* @public
|
|
4927
4929
|
* @requiredField postId
|
|
4930
|
+
* @param options - Options specifying which fields to return.
|
|
4928
4931
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4929
4932
|
* @applicableIdentity APP
|
|
4930
|
-
* @returns Retrieved post info.
|
|
4931
4933
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
|
4932
4934
|
*/
|
|
4933
|
-
declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<
|
|
4935
|
+
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`, 5>>;
|
|
4934
4936
|
interface GetPostOptions {
|
|
4935
4937
|
/**
|
|
4936
4938
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
@@ -4950,6 +4952,7 @@ interface GetPostOptions {
|
|
|
4950
4952
|
* @param slug - Slug of the post to retrieve.
|
|
4951
4953
|
* @public
|
|
4952
4954
|
* @requiredField slug
|
|
4955
|
+
* @param options - Options specifying which fields to return.
|
|
4953
4956
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4954
4957
|
* @applicableIdentity APP
|
|
4955
4958
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
|
|
@@ -4977,6 +4980,7 @@ interface GetPostBySlugOptions {
|
|
|
4977
4980
|
* - `paging.limit` is `50`.
|
|
4978
4981
|
* - `paging.offset` is `0`.
|
|
4979
4982
|
* @public
|
|
4983
|
+
* @param options - Sort, filter, and paging options.
|
|
4980
4984
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4981
4985
|
* @applicableIdentity APP
|
|
4982
4986
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
|
|
@@ -5047,18 +5051,26 @@ interface ListPostsOptions {
|
|
|
5047
5051
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
5048
5052
|
}
|
|
5049
5053
|
/**
|
|
5050
|
-
*
|
|
5054
|
+
* Creates a query to retrieve a list of posts.
|
|
5051
5055
|
*
|
|
5052
|
-
* Query Posts runs with these defaults, which you can override:
|
|
5053
|
-
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
|
5054
|
-
* - `paging.limit` is `50`.
|
|
5055
|
-
* - `paging.offset` is `0`.
|
|
5056
5056
|
*
|
|
5057
|
-
*
|
|
5058
|
-
*
|
|
5059
|
-
*
|
|
5060
|
-
*
|
|
5057
|
+
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
|
5058
|
+
*
|
|
5059
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
5060
|
+
*
|
|
5061
|
+
* 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.
|
|
5062
|
+
*
|
|
5063
|
+
* `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
|
|
5064
|
+
* + `limit(50)`
|
|
5065
|
+
* + `descending('firstPublishedDate')`
|
|
5066
|
+
*
|
|
5067
|
+
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
|
5068
|
+
*
|
|
5069
|
+
* To learn how to query posts, refer to the table below.
|
|
5070
|
+
*
|
|
5071
|
+
* 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`.
|
|
5061
5072
|
* @public
|
|
5073
|
+
* @param options - Options specifying which fields to return.
|
|
5062
5074
|
* @permissionId BLOG.READ-PUBLICATION
|
|
5063
5075
|
* @applicableIdentity APP
|
|
5064
5076
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
|
|
@@ -5401,7 +5413,9 @@ declare function getPostMetrics(postId: string): Promise<NonNullablePaths<GetPos
|
|
|
5401
5413
|
/**
|
|
5402
5414
|
* Increments a post's view count.
|
|
5403
5415
|
*
|
|
5404
|
-
* Call this method when a site visitor views a published post. The response returns the post's updated total number of views.
|
|
5416
|
+
* Call this method when a site visitor views a published post. The post must already be published. The response returns the post's updated total number of views.
|
|
5417
|
+
*
|
|
5418
|
+
* This method accepts up to 100 calls per minute from an IP address on the site, and up to 100 calls per minute from an IP address for a single post. Further calls are rejected.
|
|
5405
5419
|
* @param postId - Post ID.
|
|
5406
5420
|
* @public
|
|
5407
5421
|
* @requiredField postId
|