@wix/auto_sdk_blog_posts 1.0.167 → 1.0.169
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 +24 -16
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +17 -29
- package/build/cjs/index.typings.js +19 -6
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +13 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +82 -84
- package/build/cjs/schemas.js +147 -153
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +11 -15
- package/build/es/index.mjs +24 -16
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +17 -29
- package/build/es/index.typings.mjs +19 -6
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +13 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +82 -84
- package/build/es/schemas.mjs +147 -153
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +11 -15
- package/build/internal/cjs/index.js +24 -16
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +486 -31
- package/build/internal/cjs/index.typings.js +19 -6
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +518 -2
- package/build/internal/cjs/meta.js +13 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +82 -84
- package/build/internal/cjs/schemas.js +147 -153
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +11 -15
- package/build/internal/es/index.mjs +24 -16
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +486 -31
- package/build/internal/es/index.typings.mjs +19 -6
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +518 -2
- package/build/internal/es/meta.mjs +13 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +82 -84
- package/build/internal/es/schemas.mjs +147 -153
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -65,6 +65,14 @@ interface Post {
|
|
|
65
65
|
hashtags?: string[];
|
|
66
66
|
/** Whether commenting on the post is enabled. */
|
|
67
67
|
commentingEnabled?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Dynamic post count info Comment Count, Like Count, View Count.
|
|
70
|
+
* @internal
|
|
71
|
+
* @deprecated Dynamic post count info Comment Count, Like Count, View Count.
|
|
72
|
+
* @replacedBy metrics
|
|
73
|
+
* @targetRemovalDate 2024-06-30
|
|
74
|
+
*/
|
|
75
|
+
postCountInfo?: PostCountInfo;
|
|
68
76
|
/** Estimated reading time (calculated automatically). */
|
|
69
77
|
minutesToRead?: number;
|
|
70
78
|
/** Image placed at the top of the blog page. Only displays on mobile devices. */
|
|
@@ -104,8 +112,22 @@ interface Post {
|
|
|
104
112
|
* @format LANGUAGE_TAG
|
|
105
113
|
*/
|
|
106
114
|
language?: string | null;
|
|
115
|
+
/**
|
|
116
|
+
* Post metrics.
|
|
117
|
+
* Deprecated on '2022-02-15', data can be inconsistent, for consistent data please use 'PostService#GetPostMetrics' API instead
|
|
118
|
+
* @internal
|
|
119
|
+
* @deprecated
|
|
120
|
+
*/
|
|
121
|
+
metrics?: Metrics;
|
|
107
122
|
/** SEO data. */
|
|
108
123
|
seoData?: SeoSchema;
|
|
124
|
+
/**
|
|
125
|
+
* Reserved for internal use.
|
|
126
|
+
* @internal
|
|
127
|
+
* @readonly
|
|
128
|
+
* @maxLength 400000
|
|
129
|
+
*/
|
|
130
|
+
content?: string | null;
|
|
109
131
|
/**
|
|
110
132
|
* Contact ID of the post's owner. See the Contacts API for more info.
|
|
111
133
|
* @format GUID
|
|
@@ -126,6 +148,19 @@ interface Post {
|
|
|
126
148
|
* @readonly
|
|
127
149
|
*/
|
|
128
150
|
preview?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Reserved for internal use.
|
|
153
|
+
* @internal
|
|
154
|
+
* @maxLength 24
|
|
155
|
+
*/
|
|
156
|
+
contentId?: string | null;
|
|
157
|
+
/**
|
|
158
|
+
* Reserved for internal use.
|
|
159
|
+
* @internal
|
|
160
|
+
* @readonly
|
|
161
|
+
* @format GUID
|
|
162
|
+
*/
|
|
163
|
+
mostRecentContributorId?: string | null;
|
|
129
164
|
/**
|
|
130
165
|
* Post moderation details. Only relevant to posts submitted by [guest writers](https://support.wix.com/en/article/wix-blog-moderating-blog-posts-from-your-guest-writers).
|
|
131
166
|
*
|
|
@@ -142,17 +177,68 @@ interface Post {
|
|
|
142
177
|
* @maxLength 8000000
|
|
143
178
|
*/
|
|
144
179
|
richContentString?: string | null;
|
|
180
|
+
/**
|
|
181
|
+
* Post rich content as compressed binary data
|
|
182
|
+
* @internal
|
|
183
|
+
* @readonly
|
|
184
|
+
*/
|
|
185
|
+
richContentCompressed?: Uint8Array | null;
|
|
145
186
|
/**
|
|
146
187
|
* Indicates if there is a draft post with changes that have not yet been published.
|
|
147
188
|
* @readonly
|
|
148
189
|
*/
|
|
149
190
|
hasUnpublishedChanges?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* List of the post's translated posts.
|
|
193
|
+
* @internal
|
|
194
|
+
* @readonly
|
|
195
|
+
* @maxSize 1000
|
|
196
|
+
*/
|
|
197
|
+
translations?: PostTranslation[];
|
|
198
|
+
/**
|
|
199
|
+
* Identifies whether excerpt was set by contributor.
|
|
200
|
+
* True - excerpt was set by contributor.
|
|
201
|
+
* False - excerpt was generated from content.
|
|
202
|
+
* @internal
|
|
203
|
+
* @readonly
|
|
204
|
+
*/
|
|
205
|
+
customExcerpt?: boolean;
|
|
150
206
|
/**
|
|
151
207
|
* Post reference ID. You can reference the post from other entities, for example, comments.
|
|
152
208
|
* @readonly
|
|
153
209
|
* @maxLength 24
|
|
154
210
|
*/
|
|
155
211
|
referenceId?: string | null;
|
|
212
|
+
/**
|
|
213
|
+
* Reserved for internal use.
|
|
214
|
+
* @internal
|
|
215
|
+
* @readonly
|
|
216
|
+
* @maxLength 24
|
|
217
|
+
*/
|
|
218
|
+
internalId?: string | null;
|
|
219
|
+
/**
|
|
220
|
+
* Reserved for internal use.
|
|
221
|
+
* @internal
|
|
222
|
+
* @readonly
|
|
223
|
+
* @maxSize 10
|
|
224
|
+
* @maxLength 24
|
|
225
|
+
*/
|
|
226
|
+
internalCategoryIds?: string[];
|
|
227
|
+
/**
|
|
228
|
+
* Reserved for internal use.
|
|
229
|
+
* @internal
|
|
230
|
+
* @readonly
|
|
231
|
+
* @maxSize 3
|
|
232
|
+
* @maxLength 24
|
|
233
|
+
*/
|
|
234
|
+
internalRelatedPostIds?: string[];
|
|
235
|
+
/**
|
|
236
|
+
* Identifies if post is created from template
|
|
237
|
+
* Reserved for internal use.
|
|
238
|
+
* @internal
|
|
239
|
+
* @readonly
|
|
240
|
+
*/
|
|
241
|
+
isDemo?: boolean | null;
|
|
156
242
|
}
|
|
157
243
|
interface PostCountInfo {
|
|
158
244
|
/**
|
|
@@ -197,6 +283,18 @@ interface Metrics {
|
|
|
197
283
|
* @readonly
|
|
198
284
|
*/
|
|
199
285
|
views?: number;
|
|
286
|
+
/**
|
|
287
|
+
* Total number of post ratings.
|
|
288
|
+
* @internal
|
|
289
|
+
* @readonly
|
|
290
|
+
*/
|
|
291
|
+
totalRatings?: number;
|
|
292
|
+
/**
|
|
293
|
+
* Average rating of post from 1 to 5.
|
|
294
|
+
* @internal
|
|
295
|
+
* @readonly
|
|
296
|
+
*/
|
|
297
|
+
averageRating?: number;
|
|
200
298
|
}
|
|
201
299
|
/**
|
|
202
300
|
* The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
|
|
@@ -2910,8 +3008,68 @@ interface VideoResolution {
|
|
|
2910
3008
|
height?: number;
|
|
2911
3009
|
/** Video width. */
|
|
2912
3010
|
width?: number;
|
|
3011
|
+
/**
|
|
3012
|
+
* Deprecated. Use the `posters` property in the parent entity instead.
|
|
3013
|
+
* @internal
|
|
3014
|
+
* @deprecated
|
|
3015
|
+
*/
|
|
3016
|
+
poster?: string;
|
|
2913
3017
|
/** Video format for example, mp4, hls. */
|
|
2914
3018
|
format?: string;
|
|
3019
|
+
/**
|
|
3020
|
+
* Deprecated. Use the `urlExpirationDate` property in the parent entity instead.
|
|
3021
|
+
* @internal
|
|
3022
|
+
* @deprecated
|
|
3023
|
+
*/
|
|
3024
|
+
urlExpirationDate?: Date | null;
|
|
3025
|
+
/**
|
|
3026
|
+
* Deprecated. Use the `sizeInBytes` property in the parent entity instead. Size cannot be provided per resolution.
|
|
3027
|
+
* @internal
|
|
3028
|
+
* @format DECIMAL_VALUE
|
|
3029
|
+
* @deprecated
|
|
3030
|
+
*/
|
|
3031
|
+
sizeInBytes?: string | null;
|
|
3032
|
+
/**
|
|
3033
|
+
* Video quality. For example: 480p, 720p.
|
|
3034
|
+
* @internal
|
|
3035
|
+
*/
|
|
3036
|
+
quality?: string | null;
|
|
3037
|
+
/**
|
|
3038
|
+
* Video filename.
|
|
3039
|
+
* @internal
|
|
3040
|
+
*/
|
|
3041
|
+
filename?: string | null;
|
|
3042
|
+
/**
|
|
3043
|
+
* Video duration in seconds.
|
|
3044
|
+
* @internal
|
|
3045
|
+
* @readonly
|
|
3046
|
+
* @deprecated Video duration in seconds.
|
|
3047
|
+
* @replacedBy duration_in_milliseconds
|
|
3048
|
+
* @targetRemovalDate 2024-08-01
|
|
3049
|
+
*/
|
|
3050
|
+
durationInSeconds?: number | null;
|
|
3051
|
+
/**
|
|
3052
|
+
* Video duration in milliseconds.
|
|
3053
|
+
* @internal
|
|
3054
|
+
* @readonly
|
|
3055
|
+
*/
|
|
3056
|
+
durationInMilliseconds?: number | null;
|
|
3057
|
+
/**
|
|
3058
|
+
* When true, this is a protected asset, and calling the URL will return a 403 error.
|
|
3059
|
+
* In order to access private assets, make a request to:
|
|
3060
|
+
* `GenerateFileDownloadUrl` with the WixMedia id and specify the asset_key in the request
|
|
3061
|
+
* @internal
|
|
3062
|
+
* @readonly
|
|
3063
|
+
*/
|
|
3064
|
+
private?: boolean | null;
|
|
3065
|
+
/**
|
|
3066
|
+
* Key to identify the video resolution's relationship to the original media in WixMedia.
|
|
3067
|
+
* Can be used to request a download for the specific video resolution.
|
|
3068
|
+
* For example: 480p.mp4, 720p.mp4, 1080p.mp4, trailer-720p.mp4, clip-720p.mp4
|
|
3069
|
+
* @internal
|
|
3070
|
+
* @readonly
|
|
3071
|
+
*/
|
|
3072
|
+
assetKey?: string | null;
|
|
2915
3073
|
}
|
|
2916
3074
|
interface EmbedMedia {
|
|
2917
3075
|
/** Thumbnail details. */
|
|
@@ -3282,6 +3440,20 @@ interface PeriodPublicationsCount {
|
|
|
3282
3440
|
interface QueryPostCountStatsRequest {
|
|
3283
3441
|
/** Start of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
|
|
3284
3442
|
rangeStart?: Date | null;
|
|
3443
|
+
/**
|
|
3444
|
+
* __Deprecated.__ Use `months` instead.
|
|
3445
|
+
* This property will be removed on June 30, 2023.
|
|
3446
|
+
*
|
|
3447
|
+
* Non-inclusive end of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format.
|
|
3448
|
+
* @internal
|
|
3449
|
+
* @deprecated __Deprecated.__ Use `months` instead.
|
|
3450
|
+
* This property will be removed on June 30, 2023.
|
|
3451
|
+
*
|
|
3452
|
+
* Non-inclusive end of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format.
|
|
3453
|
+
* @replacedBy months
|
|
3454
|
+
* @targetRemovalDate 2024-06-30
|
|
3455
|
+
*/
|
|
3456
|
+
rangeEnd?: Date | null;
|
|
3285
3457
|
/**
|
|
3286
3458
|
* Order of returned results.
|
|
3287
3459
|
*
|
|
@@ -3371,6 +3543,12 @@ interface PostCountersUpdated extends PostCountersUpdatedInitiatorOneOf {
|
|
|
3371
3543
|
* @format GUID
|
|
3372
3544
|
*/
|
|
3373
3545
|
postId?: string;
|
|
3546
|
+
/**
|
|
3547
|
+
* Internal ID of the post which counters were updated.
|
|
3548
|
+
* @internal
|
|
3549
|
+
* @maxLength 24
|
|
3550
|
+
*/
|
|
3551
|
+
postInternalId?: string;
|
|
3374
3552
|
/** Field of the updated counter. */
|
|
3375
3553
|
updatedCounterField?: FieldWithLiterals;
|
|
3376
3554
|
/** New counter value. */
|
|
@@ -3404,6 +3582,18 @@ declare enum Field {
|
|
|
3404
3582
|
/** @enumType */
|
|
3405
3583
|
type FieldWithLiterals = Field | 'UNKNOWN' | 'TOTAL_COMMENTS' | 'LIKE_COUNT' | 'VIEW_COUNT' | 'RATING_COUNT';
|
|
3406
3584
|
interface PostOwnerChanged {
|
|
3585
|
+
/**
|
|
3586
|
+
* Member ID of the post's owner before the change.
|
|
3587
|
+
* @internal
|
|
3588
|
+
* @format GUID
|
|
3589
|
+
*/
|
|
3590
|
+
oldMemberId?: string;
|
|
3591
|
+
/**
|
|
3592
|
+
* Member ID of the post's owner after the change.
|
|
3593
|
+
* @internal
|
|
3594
|
+
* @format GUID
|
|
3595
|
+
*/
|
|
3596
|
+
newMemberId?: string;
|
|
3407
3597
|
}
|
|
3408
3598
|
interface InitialPostsCopied {
|
|
3409
3599
|
/** Number of posts copied. */
|
|
@@ -3416,6 +3606,21 @@ interface GetPostRequest {
|
|
|
3416
3606
|
* @maxLength 38
|
|
3417
3607
|
*/
|
|
3418
3608
|
postId: string;
|
|
3609
|
+
/**
|
|
3610
|
+
* __Deprecated.__ Use `fieldsets` instead.
|
|
3611
|
+
* This parameter will be removed on June 30, 2023.
|
|
3612
|
+
*
|
|
3613
|
+
* List of post fields to be included in the response.
|
|
3614
|
+
* @internal
|
|
3615
|
+
* @maxSize 20
|
|
3616
|
+
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
3617
|
+
* This parameter will be removed on June 30, 2023.
|
|
3618
|
+
*
|
|
3619
|
+
* List of post fields to be included in the response.
|
|
3620
|
+
* @replacedBy fieldsets
|
|
3621
|
+
* @targetRemovalDate 2024-06-30
|
|
3622
|
+
*/
|
|
3623
|
+
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
3419
3624
|
/**
|
|
3420
3625
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
3421
3626
|
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
@@ -3426,6 +3631,11 @@ interface GetPostRequest {
|
|
|
3426
3631
|
}
|
|
3427
3632
|
declare enum PostFieldField {
|
|
3428
3633
|
UNKNOWN = "UNKNOWN",
|
|
3634
|
+
/**
|
|
3635
|
+
* Deprecated use `METRICS` instead.
|
|
3636
|
+
* @internal
|
|
3637
|
+
*/
|
|
3638
|
+
COUNTERS = "COUNTERS",
|
|
3429
3639
|
/** Includes post URL when present. */
|
|
3430
3640
|
URL = "URL",
|
|
3431
3641
|
/** Includes post content text string when present. */
|
|
@@ -3434,12 +3644,69 @@ declare enum PostFieldField {
|
|
|
3434
3644
|
METRICS = "METRICS",
|
|
3435
3645
|
/** Includes SEO data. */
|
|
3436
3646
|
SEO = "SEO",
|
|
3647
|
+
/**
|
|
3648
|
+
* Includes post content as a stringified DraftJS document.
|
|
3649
|
+
* Reserved for internal use.
|
|
3650
|
+
* @internal
|
|
3651
|
+
*/
|
|
3652
|
+
CONTENT = "CONTENT",
|
|
3653
|
+
/**
|
|
3654
|
+
* Includes internal ID field.
|
|
3655
|
+
* Reserved for internal use.
|
|
3656
|
+
* @internal
|
|
3657
|
+
*/
|
|
3658
|
+
INTERNAL_ID = "INTERNAL_ID",
|
|
3437
3659
|
/** Includes post owner's contact ID. */
|
|
3438
3660
|
CONTACT_ID = "CONTACT_ID",
|
|
3439
3661
|
/** Includes post rich content. */
|
|
3440
3662
|
RICH_CONTENT = "RICH_CONTENT",
|
|
3663
|
+
/**
|
|
3664
|
+
* Includes post rich content string.
|
|
3665
|
+
* @internal
|
|
3666
|
+
*/
|
|
3667
|
+
RICH_CONTENT_STRING = "RICH_CONTENT_STRING",
|
|
3668
|
+
/**
|
|
3669
|
+
* Includes compressed post rich content string.
|
|
3670
|
+
* @internal
|
|
3671
|
+
*/
|
|
3672
|
+
RICH_CONTENT_COMPRESSED = "RICH_CONTENT_COMPRESSED",
|
|
3673
|
+
/**
|
|
3674
|
+
* Includes post translations.
|
|
3675
|
+
* @internal
|
|
3676
|
+
*/
|
|
3677
|
+
TRANSLATIONS = "TRANSLATIONS",
|
|
3441
3678
|
/** Includes post reference ID field. */
|
|
3442
|
-
REFERENCE_ID = "REFERENCE_ID"
|
|
3679
|
+
REFERENCE_ID = "REFERENCE_ID",
|
|
3680
|
+
/**
|
|
3681
|
+
* If provided, all content fields exclude paid content.
|
|
3682
|
+
* @internal
|
|
3683
|
+
*/
|
|
3684
|
+
EXCLUDE_PAID_CONTENT = "EXCLUDE_PAID_CONTENT",
|
|
3685
|
+
/**
|
|
3686
|
+
* Needed for post proxy to work correctly.
|
|
3687
|
+
* @internal
|
|
3688
|
+
*/
|
|
3689
|
+
SEO_DATA = "SEO_DATA",
|
|
3690
|
+
/**
|
|
3691
|
+
* Needed for post proxy to work correctly.
|
|
3692
|
+
* @internal
|
|
3693
|
+
*/
|
|
3694
|
+
OWNER = "OWNER",
|
|
3695
|
+
/**
|
|
3696
|
+
* Needed for post proxy to work correctly.
|
|
3697
|
+
* @internal
|
|
3698
|
+
*/
|
|
3699
|
+
HAS_UNPUBLISHED_CHANGES = "HAS_UNPUBLISHED_CHANGES",
|
|
3700
|
+
/**
|
|
3701
|
+
* Needed for post proxy to work correctly.
|
|
3702
|
+
* @internal
|
|
3703
|
+
*/
|
|
3704
|
+
HEADING = "HEADING",
|
|
3705
|
+
/**
|
|
3706
|
+
* Needed for post proxy to work correctly.
|
|
3707
|
+
* @internal
|
|
3708
|
+
*/
|
|
3709
|
+
IMAGE = "IMAGE"
|
|
3443
3710
|
}
|
|
3444
3711
|
/** @enumType */
|
|
3445
3712
|
type PostFieldFieldWithLiterals = PostFieldField | 'UNKNOWN' | 'URL' | 'CONTENT_TEXT' | 'METRICS' | 'SEO' | 'CONTACT_ID' | 'RICH_CONTENT' | 'REFERENCE_ID';
|
|
@@ -3454,6 +3721,21 @@ interface GetPostBySlugRequest {
|
|
|
3454
3721
|
* @maxLength 200
|
|
3455
3722
|
*/
|
|
3456
3723
|
slug: string;
|
|
3724
|
+
/**
|
|
3725
|
+
* __Deprecated.__ Use `fieldsets` instead.
|
|
3726
|
+
* This parameter will be removed on June 30, 2023.
|
|
3727
|
+
*
|
|
3728
|
+
* List of post fields to be included in the response.
|
|
3729
|
+
* @internal
|
|
3730
|
+
* @maxSize 20
|
|
3731
|
+
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
3732
|
+
* This parameter will be removed on June 30, 2023.
|
|
3733
|
+
*
|
|
3734
|
+
* List of post fields to be included in the response.
|
|
3735
|
+
* @replacedBy fieldsets
|
|
3736
|
+
* @targetRemovalDate 2024-06-30
|
|
3737
|
+
*/
|
|
3738
|
+
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
3457
3739
|
/**
|
|
3458
3740
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
3459
3741
|
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
@@ -3513,6 +3795,21 @@ interface ListPostsRequest {
|
|
|
3513
3795
|
sort?: GetPostsSortWithLiterals;
|
|
3514
3796
|
/** Pagination options. */
|
|
3515
3797
|
paging?: BlogPaging;
|
|
3798
|
+
/**
|
|
3799
|
+
* __Deprecated.__ Use `fieldsets` instead.
|
|
3800
|
+
* This parameter will be removed on June 30, 2023.
|
|
3801
|
+
*
|
|
3802
|
+
* List of post fields to be included in the response.
|
|
3803
|
+
* @internal
|
|
3804
|
+
* @maxSize 20
|
|
3805
|
+
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
3806
|
+
* This parameter will be removed on June 30, 2023.
|
|
3807
|
+
*
|
|
3808
|
+
* List of post fields to be included in the response.
|
|
3809
|
+
* @replacedBy fieldsets
|
|
3810
|
+
* @targetRemovalDate 2024-06-30
|
|
3811
|
+
*/
|
|
3812
|
+
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
3516
3813
|
/**
|
|
3517
3814
|
* Language filter.
|
|
3518
3815
|
*
|
|
@@ -3549,7 +3846,12 @@ declare enum GetPostsSort {
|
|
|
3549
3846
|
/** Ordered by `title` in ascending order. */
|
|
3550
3847
|
TITLE_ASC = "TITLE_ASC",
|
|
3551
3848
|
/** Ordered by `title` in descending order. */
|
|
3552
|
-
TITLE_DESC = "TITLE_DESC"
|
|
3849
|
+
TITLE_DESC = "TITLE_DESC",
|
|
3850
|
+
/**
|
|
3851
|
+
* Sorting by post rating descending.
|
|
3852
|
+
* @internal
|
|
3853
|
+
*/
|
|
3854
|
+
RATING = "RATING"
|
|
3553
3855
|
}
|
|
3554
3856
|
/** @enumType */
|
|
3555
3857
|
type GetPostsSortWithLiterals = GetPostsSort | 'FEED' | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC' | 'VIEW_COUNT' | 'LIKE_COUNT' | 'TITLE_ASC' | 'TITLE_DESC';
|
|
@@ -3596,6 +3898,64 @@ interface MetaData {
|
|
|
3596
3898
|
cursor?: string | null;
|
|
3597
3899
|
}
|
|
3598
3900
|
interface QueryPostsRequest {
|
|
3901
|
+
/**
|
|
3902
|
+
* __Deprecated.__ Use `query` instead.
|
|
3903
|
+
* This parameter will be removed on June 30, 2023.
|
|
3904
|
+
*
|
|
3905
|
+
* Pagination options.
|
|
3906
|
+
* @internal
|
|
3907
|
+
* @deprecated __Deprecated.__ Use `query` instead.
|
|
3908
|
+
* This parameter will be removed on June 30, 2023.
|
|
3909
|
+
*
|
|
3910
|
+
* Pagination options.
|
|
3911
|
+
* @replacedBy query
|
|
3912
|
+
* @targetRemovalDate 2024-06-30
|
|
3913
|
+
*/
|
|
3914
|
+
paging?: BlogPaging;
|
|
3915
|
+
/**
|
|
3916
|
+
* __Deprecated.__ Use `query` instead.
|
|
3917
|
+
* This parameter will be removed on June 30, 2023.
|
|
3918
|
+
*
|
|
3919
|
+
* Filter object.
|
|
3920
|
+
* @internal
|
|
3921
|
+
* @deprecated __Deprecated.__ Use `query` instead.
|
|
3922
|
+
* This parameter will be removed on June 30, 2023.
|
|
3923
|
+
*
|
|
3924
|
+
* Filter object.
|
|
3925
|
+
* @replacedBy query
|
|
3926
|
+
* @targetRemovalDate 2024-06-30
|
|
3927
|
+
*/
|
|
3928
|
+
filter?: Record<string, any> | null;
|
|
3929
|
+
/**
|
|
3930
|
+
* __Deprecated.__ Use `query` instead.
|
|
3931
|
+
* This parameter will be removed on June 30, 2023.
|
|
3932
|
+
*
|
|
3933
|
+
* Sorting options.
|
|
3934
|
+
* @internal
|
|
3935
|
+
* @maxSize 3
|
|
3936
|
+
* @deprecated __Deprecated.__ Use `query` instead.
|
|
3937
|
+
* This parameter will be removed on June 30, 2023.
|
|
3938
|
+
*
|
|
3939
|
+
* Sorting options.
|
|
3940
|
+
* @replacedBy query
|
|
3941
|
+
* @targetRemovalDate 2024-06-30
|
|
3942
|
+
*/
|
|
3943
|
+
sort?: Sorting[];
|
|
3944
|
+
/**
|
|
3945
|
+
* __Deprecated.__ Use `fieldsets` instead.
|
|
3946
|
+
* This parameter will be removed on June 30, 2023.
|
|
3947
|
+
*
|
|
3948
|
+
* List of post fields to be included in the response.
|
|
3949
|
+
* @internal
|
|
3950
|
+
* @maxSize 20
|
|
3951
|
+
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
3952
|
+
* This parameter will be removed on June 30, 2023.
|
|
3953
|
+
*
|
|
3954
|
+
* List of post fields to be included in the response.
|
|
3955
|
+
* @replacedBy fieldsets
|
|
3956
|
+
* @targetRemovalDate 2024-06-30
|
|
3957
|
+
*/
|
|
3958
|
+
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
3599
3959
|
/** Query options. */
|
|
3600
3960
|
query?: PlatformQuery;
|
|
3601
3961
|
/**
|
|
@@ -3614,6 +3974,20 @@ interface Sorting {
|
|
|
3614
3974
|
fieldName?: string;
|
|
3615
3975
|
/** Sort order. */
|
|
3616
3976
|
order?: SortOrderWithLiterals;
|
|
3977
|
+
/**
|
|
3978
|
+
* When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
|
|
3979
|
+
* a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
|
|
3980
|
+
*
|
|
3981
|
+
* If multiple filters are provided, they are combined with AND operator.
|
|
3982
|
+
*
|
|
3983
|
+
* Example:
|
|
3984
|
+
* Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
|
|
3985
|
+
* and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
|
|
3986
|
+
* { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
|
|
3987
|
+
* @internal
|
|
3988
|
+
* @maxSize 10
|
|
3989
|
+
*/
|
|
3990
|
+
selectItemsBy?: Record<string, any>[] | null;
|
|
3617
3991
|
/**
|
|
3618
3992
|
* Origin point for geo-distance sorting on a GEO field
|
|
3619
3993
|
* results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
|
|
@@ -3688,6 +4062,20 @@ interface CursorPaging {
|
|
|
3688
4062
|
interface QueryPostsResponse {
|
|
3689
4063
|
/** List of retrieved posts. */
|
|
3690
4064
|
posts?: Post[];
|
|
4065
|
+
/**
|
|
4066
|
+
* __Deprecated.__ Use `pagingMetadata` instead.
|
|
4067
|
+
* This property will be removed on June 30, 2023.
|
|
4068
|
+
*
|
|
4069
|
+
* Details on the paged set of results returned.
|
|
4070
|
+
* @internal
|
|
4071
|
+
* @deprecated __Deprecated.__ Use `pagingMetadata` instead.
|
|
4072
|
+
* This property will be removed on June 30, 2023.
|
|
4073
|
+
*
|
|
4074
|
+
* Details on the paged set of results returned.
|
|
4075
|
+
* @replacedBy pagingMetadata
|
|
4076
|
+
* @targetRemovalDate 2024-06-30
|
|
4077
|
+
*/
|
|
4078
|
+
metaData?: MetaData;
|
|
3691
4079
|
/** Details on the paged set of results returned. */
|
|
3692
4080
|
pagingMetadata?: PagingMetadataV2;
|
|
3693
4081
|
}
|
|
@@ -3702,6 +4090,13 @@ interface PagingMetadataV2 {
|
|
|
3702
4090
|
tooManyToCount?: boolean | null;
|
|
3703
4091
|
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
3704
4092
|
cursors?: Cursors;
|
|
4093
|
+
/**
|
|
4094
|
+
* Indicates if there are more results after the current page.
|
|
4095
|
+
* If `true`, another page of results can be retrieved.
|
|
4096
|
+
* If `false`, this is the last page.
|
|
4097
|
+
* @internal
|
|
4098
|
+
*/
|
|
4099
|
+
hasNext?: boolean | null;
|
|
3705
4100
|
}
|
|
3706
4101
|
interface Cursors {
|
|
3707
4102
|
/**
|
|
@@ -4189,14 +4584,13 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
|
|
|
4189
4584
|
/**
|
|
4190
4585
|
* Retrieves the number of published posts per month within a specified time range.
|
|
4191
4586
|
*
|
|
4192
|
-
*
|
|
4193
|
-
* The
|
|
4194
|
-
*
|
|
4195
|
-
*
|
|
4196
|
-
*
|
|
4197
|
-
*
|
|
4587
|
+
* The time range is set using the `rangeStart` and `months` properties.
|
|
4588
|
+
* The time range always starts on the 1st day of the month set in `rangeStart` and
|
|
4589
|
+
* includes the number of `months` following `rangeStart`.
|
|
4590
|
+
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
|
4591
|
+
* 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.
|
|
4592
|
+
* > 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.
|
|
4198
4593
|
* @public
|
|
4199
|
-
* @param options - Options specifying time frame, sort, and filter.
|
|
4200
4594
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4201
4595
|
* @applicableIdentity APP
|
|
4202
4596
|
* @returns Get Blog Post Count Stats response
|
|
@@ -4237,7 +4631,6 @@ interface QueryPostCountStatsOptions {
|
|
|
4237
4631
|
/**
|
|
4238
4632
|
* Retrieves the total amount of published posts of the blog.
|
|
4239
4633
|
* @public
|
|
4240
|
-
* @param options - Language Options.
|
|
4241
4634
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4242
4635
|
* @applicableIdentity APP
|
|
4243
4636
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
|
|
@@ -4258,12 +4651,12 @@ interface GetTotalPostsOptions {
|
|
|
4258
4651
|
* @param postId - Post ID.
|
|
4259
4652
|
* @public
|
|
4260
4653
|
* @requiredField postId
|
|
4261
|
-
* @param options - Options specifying which fields to return.
|
|
4262
4654
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4263
4655
|
* @applicableIdentity APP
|
|
4656
|
+
* @returns Retrieved post info.
|
|
4264
4657
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
|
4265
4658
|
*/
|
|
4266
|
-
declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<
|
|
4659
|
+
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>>;
|
|
4267
4660
|
interface GetPostOptions {
|
|
4268
4661
|
/**
|
|
4269
4662
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
@@ -4283,7 +4676,6 @@ interface GetPostOptions {
|
|
|
4283
4676
|
* @param slug - Slug of the post to retrieve.
|
|
4284
4677
|
* @public
|
|
4285
4678
|
* @requiredField slug
|
|
4286
|
-
* @param options - Options specifying which fields to return.
|
|
4287
4679
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4288
4680
|
* @applicableIdentity APP
|
|
4289
4681
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
|
|
@@ -4311,7 +4703,6 @@ interface GetPostBySlugOptions {
|
|
|
4311
4703
|
* - `paging.limit` is `50`.
|
|
4312
4704
|
* - `paging.offset` is `0`.
|
|
4313
4705
|
* @public
|
|
4314
|
-
* @param options - Sort, filter, and paging options.
|
|
4315
4706
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4316
4707
|
* @applicableIdentity APP
|
|
4317
4708
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
|
|
@@ -4382,32 +4773,82 @@ interface ListPostsOptions {
|
|
|
4382
4773
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4383
4774
|
}
|
|
4384
4775
|
/**
|
|
4385
|
-
*
|
|
4386
|
-
*
|
|
4387
|
-
*
|
|
4388
|
-
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
|
4389
|
-
*
|
|
4390
|
-
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
4391
|
-
*
|
|
4392
|
-
* 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.
|
|
4776
|
+
* Retrieves a list of up to 100 posts, given the provided paging, filtering, and sorting.
|
|
4393
4777
|
*
|
|
4394
|
-
*
|
|
4395
|
-
*
|
|
4396
|
-
*
|
|
4397
|
-
*
|
|
4398
|
-
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
|
4399
|
-
*
|
|
4400
|
-
* To learn how to query posts, refer to the table below.
|
|
4778
|
+
* Query Posts runs with these defaults, which you can override:
|
|
4779
|
+
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
|
4780
|
+
* - `paging.limit` is `50`.
|
|
4781
|
+
* - `paging.offset` is `0`.
|
|
4401
4782
|
*
|
|
4402
|
-
*
|
|
4783
|
+
* To learn about working with _Query_ endpoints, see
|
|
4784
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
|
|
4785
|
+
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
|
|
4786
|
+
* [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
4403
4787
|
* @public
|
|
4404
|
-
* @param options - Options specifying which fields to return.
|
|
4405
4788
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4406
4789
|
* @applicableIdentity APP
|
|
4407
4790
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
|
|
4408
4791
|
*/
|
|
4409
4792
|
declare function queryPosts(options?: QueryPostsOptions): PostsQueryBuilder;
|
|
4410
4793
|
interface QueryPostsOptions {
|
|
4794
|
+
/**
|
|
4795
|
+
* __Deprecated.__ Use `query` instead.
|
|
4796
|
+
* This parameter will be removed on June 30, 2023.
|
|
4797
|
+
*
|
|
4798
|
+
* Pagination options.
|
|
4799
|
+
* @internal
|
|
4800
|
+
* @deprecated __Deprecated.__ Use `query` instead.
|
|
4801
|
+
* This parameter will be removed on June 30, 2023.
|
|
4802
|
+
*
|
|
4803
|
+
* Pagination options.
|
|
4804
|
+
* @replacedBy query
|
|
4805
|
+
* @targetRemovalDate 2024-06-30
|
|
4806
|
+
*/
|
|
4807
|
+
paging?: BlogPaging | undefined;
|
|
4808
|
+
/**
|
|
4809
|
+
* __Deprecated.__ Use `query` instead.
|
|
4810
|
+
* This parameter will be removed on June 30, 2023.
|
|
4811
|
+
*
|
|
4812
|
+
* Filter object.
|
|
4813
|
+
* @internal
|
|
4814
|
+
* @deprecated __Deprecated.__ Use `query` instead.
|
|
4815
|
+
* This parameter will be removed on June 30, 2023.
|
|
4816
|
+
*
|
|
4817
|
+
* Filter object.
|
|
4818
|
+
* @replacedBy query
|
|
4819
|
+
* @targetRemovalDate 2024-06-30
|
|
4820
|
+
*/
|
|
4821
|
+
filter?: Record<string, any> | null | undefined;
|
|
4822
|
+
/**
|
|
4823
|
+
* __Deprecated.__ Use `query` instead.
|
|
4824
|
+
* This parameter will be removed on June 30, 2023.
|
|
4825
|
+
*
|
|
4826
|
+
* Sorting options.
|
|
4827
|
+
* @internal
|
|
4828
|
+
* @maxSize 3
|
|
4829
|
+
* @deprecated __Deprecated.__ Use `query` instead.
|
|
4830
|
+
* This parameter will be removed on June 30, 2023.
|
|
4831
|
+
*
|
|
4832
|
+
* Sorting options.
|
|
4833
|
+
* @replacedBy query
|
|
4834
|
+
* @targetRemovalDate 2024-06-30
|
|
4835
|
+
*/
|
|
4836
|
+
sort?: Sorting[] | undefined;
|
|
4837
|
+
/**
|
|
4838
|
+
* __Deprecated.__ Use `fieldsets` instead.
|
|
4839
|
+
* This parameter will be removed on June 30, 2023.
|
|
4840
|
+
*
|
|
4841
|
+
* List of post fields to be included in the response.
|
|
4842
|
+
* @internal
|
|
4843
|
+
* @maxSize 20
|
|
4844
|
+
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
4845
|
+
* This parameter will be removed on June 30, 2023.
|
|
4846
|
+
*
|
|
4847
|
+
* List of post fields to be included in the response.
|
|
4848
|
+
* @replacedBy fieldsets
|
|
4849
|
+
* @targetRemovalDate 2024-06-30
|
|
4850
|
+
*/
|
|
4851
|
+
fieldsToInclude?: PostFieldFieldWithLiterals[] | undefined;
|
|
4411
4852
|
/**
|
|
4412
4853
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
4413
4854
|
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
@@ -4646,6 +5087,20 @@ type PostQuery = {
|
|
|
4646
5087
|
*/
|
|
4647
5088
|
order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
|
|
4648
5089
|
/**
|
|
5090
|
+
When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
|
|
5091
|
+
a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
|
|
5092
|
+
|
|
5093
|
+
If multiple filters are provided, they are combined with AND operator.
|
|
5094
|
+
|
|
5095
|
+
Example:
|
|
5096
|
+
Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
|
|
5097
|
+
and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
|
|
5098
|
+
{ fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
|
|
5099
|
+
@internal: undefined,
|
|
5100
|
+
@maxSize: 10
|
|
5101
|
+
*/
|
|
5102
|
+
selectItemsBy?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['selectItemsBy'] | null;
|
|
5103
|
+
/**
|
|
4649
5104
|
Origin point for geo-distance sorting on a GEO field
|
|
4650
5105
|
results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
|
|
4651
5106
|
*/
|