@wix/auto_sdk_blog_posts 1.0.162 → 1.0.164
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 +29 -34
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +207 -219
- package/build/cjs/index.typings.js +24 -24
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +188 -188
- package/build/cjs/meta.js +18 -18
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +85 -86
- package/build/cjs/schemas.js +149 -154
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +11 -15
- package/build/es/index.mjs +29 -34
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +207 -219
- package/build/es/index.typings.mjs +24 -24
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +188 -188
- package/build/es/meta.mjs +18 -18
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +85 -86
- package/build/es/schemas.mjs +149 -154
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +11 -15
- package/build/internal/cjs/index.js +29 -34
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +207 -219
- package/build/internal/cjs/index.typings.js +24 -24
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +188 -188
- package/build/internal/cjs/meta.js +18 -18
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +85 -86
- package/build/internal/cjs/schemas.js +149 -154
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +11 -15
- package/build/internal/es/index.mjs +29 -34
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +207 -219
- package/build/internal/es/index.typings.mjs +24 -24
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +188 -188
- package/build/internal/es/meta.mjs +18 -18
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +85 -86
- package/build/internal/es/schemas.mjs +149 -154
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -3134,194 +3134,6 @@ interface GetTotalPostsResponse {
|
|
|
3134
3134
|
/** Total amount of published posts. */
|
|
3135
3135
|
total?: number;
|
|
3136
3136
|
}
|
|
3137
|
-
interface ListDemoPostsRequest {
|
|
3138
|
-
/**
|
|
3139
|
-
* Whether to return only featured posts.
|
|
3140
|
-
*
|
|
3141
|
-
* Default: `false`
|
|
3142
|
-
*/
|
|
3143
|
-
featured?: boolean;
|
|
3144
|
-
/**
|
|
3145
|
-
* Hashtag filter.
|
|
3146
|
-
*
|
|
3147
|
-
* Pass an array of hashtags to return only posts containing any of the provided hashtags.
|
|
3148
|
-
* If omitted, all posts with or without hashtags are returned.
|
|
3149
|
-
* @maxSize 100
|
|
3150
|
-
* @maxLength 100
|
|
3151
|
-
*/
|
|
3152
|
-
hashtags?: string[];
|
|
3153
|
-
/**
|
|
3154
|
-
* Category filter.
|
|
3155
|
-
*
|
|
3156
|
-
* Pass an array of category IDs to return only posts with any of the provided categories.
|
|
3157
|
-
* If omitted, all posts with or without associated categories are returned.
|
|
3158
|
-
* @maxSize 50
|
|
3159
|
-
* @format GUID
|
|
3160
|
-
*/
|
|
3161
|
-
categoryIds?: string[];
|
|
3162
|
-
/**
|
|
3163
|
-
* Tag filter.
|
|
3164
|
-
*
|
|
3165
|
-
* Pass an array of tag IDs to return only posts with any of the provided tags.
|
|
3166
|
-
* If omitted, all posts with or without tags are returned.
|
|
3167
|
-
* @maxSize 50
|
|
3168
|
-
* @format GUID
|
|
3169
|
-
*/
|
|
3170
|
-
tagIds?: string[];
|
|
3171
|
-
/**
|
|
3172
|
-
* Sorting options.
|
|
3173
|
-
*
|
|
3174
|
-
* - `FEED`: Ordered by `firstPublishedDate` in descending order with pinned posts first.
|
|
3175
|
-
* - `VIEW_COUNT`: Ordered by total number of views in descending order.
|
|
3176
|
-
* - `LIKE_COUNT`: Ordered by total number of likes in descending order.
|
|
3177
|
-
* - `PUBLISHED_DATE_ASC`: Ordered by `firstPublishedDate` in ascending order.
|
|
3178
|
-
* - `PUBLISHED_DATE_DESC`: Ordered by `firstPublishedDate` in descending order.
|
|
3179
|
-
* - `TITLE_ASC`: Ordered by `title` in ascending order.
|
|
3180
|
-
* - `TITLE_DESC`: Ordered by `title` in descending order.
|
|
3181
|
-
* - `RATING`: reserved for internal use.
|
|
3182
|
-
*
|
|
3183
|
-
* Default: `FEED`
|
|
3184
|
-
*/
|
|
3185
|
-
sort?: GetPostsSortWithLiterals;
|
|
3186
|
-
/** Pagination options. */
|
|
3187
|
-
paging?: BlogPaging;
|
|
3188
|
-
/**
|
|
3189
|
-
* __Deprecated.__ Use `fieldsets` instead.
|
|
3190
|
-
* This parameter will be removed on June 30, 2023.
|
|
3191
|
-
*
|
|
3192
|
-
* List of post fields to be included in the response.
|
|
3193
|
-
* @maxSize 20
|
|
3194
|
-
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
3195
|
-
* This parameter will be removed on June 30, 2023.
|
|
3196
|
-
*
|
|
3197
|
-
* List of post fields to be included in the response.
|
|
3198
|
-
* @replacedBy fieldsets
|
|
3199
|
-
* @targetRemovalDate 2024-06-30
|
|
3200
|
-
*/
|
|
3201
|
-
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
3202
|
-
/**
|
|
3203
|
-
* Language filter.
|
|
3204
|
-
*
|
|
3205
|
-
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3206
|
-
* Pass a language to only receive posts that are in that language.
|
|
3207
|
-
* If omitted, posts in all languages are returned.
|
|
3208
|
-
* @format LANGUAGE_TAG
|
|
3209
|
-
*/
|
|
3210
|
-
language?: string | null;
|
|
3211
|
-
/**
|
|
3212
|
-
* Post owner's member ID.
|
|
3213
|
-
* @format GUID
|
|
3214
|
-
*/
|
|
3215
|
-
memberId?: string | null;
|
|
3216
|
-
/**
|
|
3217
|
-
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
3218
|
-
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
3219
|
-
* only the post’s base fields are returned.
|
|
3220
|
-
* @maxSize 20
|
|
3221
|
-
*/
|
|
3222
|
-
fieldsets?: PostFieldFieldWithLiterals[];
|
|
3223
|
-
}
|
|
3224
|
-
declare enum GetPostsSort {
|
|
3225
|
-
/** Ordered by `firstPublishedDate` in descending order with pinned posts first. */
|
|
3226
|
-
FEED = "FEED",
|
|
3227
|
-
/** Ordered by `firstPublishedDate` in ascending order. */
|
|
3228
|
-
PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
|
|
3229
|
-
/** Ordered by `firstPublishedDate` in descending order. */
|
|
3230
|
-
PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC",
|
|
3231
|
-
/** Ordered by total number of views in descending order. */
|
|
3232
|
-
VIEW_COUNT = "VIEW_COUNT",
|
|
3233
|
-
/** Ordered by total number of likes in descending order. */
|
|
3234
|
-
LIKE_COUNT = "LIKE_COUNT",
|
|
3235
|
-
/** Ordered by `title` in ascending order. */
|
|
3236
|
-
TITLE_ASC = "TITLE_ASC",
|
|
3237
|
-
/** Ordered by `title` in descending order. */
|
|
3238
|
-
TITLE_DESC = "TITLE_DESC"
|
|
3239
|
-
}
|
|
3240
|
-
/** @enumType */
|
|
3241
|
-
type GetPostsSortWithLiterals = GetPostsSort | 'FEED' | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC' | 'VIEW_COUNT' | 'LIKE_COUNT' | 'TITLE_ASC' | 'TITLE_DESC';
|
|
3242
|
-
interface BlogPaging {
|
|
3243
|
-
/**
|
|
3244
|
-
* Number of items to skip in the current sort order.
|
|
3245
|
-
*
|
|
3246
|
-
*
|
|
3247
|
-
* Default: `0`
|
|
3248
|
-
*/
|
|
3249
|
-
offset?: number;
|
|
3250
|
-
/**
|
|
3251
|
-
* Number of items to return.
|
|
3252
|
-
*
|
|
3253
|
-
*
|
|
3254
|
-
* Default:`50`
|
|
3255
|
-
* @min 1
|
|
3256
|
-
* @max 100
|
|
3257
|
-
*/
|
|
3258
|
-
limit?: number;
|
|
3259
|
-
/**
|
|
3260
|
-
* Pointer to the next or previous page in the list of results.
|
|
3261
|
-
* @maxLength 2000
|
|
3262
|
-
*/
|
|
3263
|
-
cursor?: string | null;
|
|
3264
|
-
}
|
|
3265
|
-
declare enum PostFieldField {
|
|
3266
|
-
UNKNOWN = "UNKNOWN",
|
|
3267
|
-
/** Includes post URL when present. */
|
|
3268
|
-
URL = "URL",
|
|
3269
|
-
/** Includes post content text string when present. */
|
|
3270
|
-
CONTENT_TEXT = "CONTENT_TEXT",
|
|
3271
|
-
/** Includes post metrics when present. */
|
|
3272
|
-
METRICS = "METRICS",
|
|
3273
|
-
/** Includes SEO data. */
|
|
3274
|
-
SEO = "SEO",
|
|
3275
|
-
/** Includes post owner's contact ID. */
|
|
3276
|
-
CONTACT_ID = "CONTACT_ID",
|
|
3277
|
-
/** Includes post rich content. */
|
|
3278
|
-
RICH_CONTENT = "RICH_CONTENT",
|
|
3279
|
-
/** Includes post reference ID field. */
|
|
3280
|
-
REFERENCE_ID = "REFERENCE_ID"
|
|
3281
|
-
}
|
|
3282
|
-
/** @enumType */
|
|
3283
|
-
type PostFieldFieldWithLiterals = PostFieldField | 'UNKNOWN' | 'URL' | 'CONTENT_TEXT' | 'METRICS' | 'SEO' | 'CONTACT_ID' | 'RICH_CONTENT' | 'REFERENCE_ID';
|
|
3284
|
-
interface ListDemoPostsResponse {
|
|
3285
|
-
/** List of posts. */
|
|
3286
|
-
posts?: Post[];
|
|
3287
|
-
/** Details on the paged set of results returned. */
|
|
3288
|
-
metaData?: MetaData;
|
|
3289
|
-
}
|
|
3290
|
-
interface MetaData {
|
|
3291
|
-
/** Number of items returned in this response. */
|
|
3292
|
-
count?: number;
|
|
3293
|
-
/** Requested offset. */
|
|
3294
|
-
offset?: number;
|
|
3295
|
-
/** Total number of items that match the query. */
|
|
3296
|
-
total?: number;
|
|
3297
|
-
/**
|
|
3298
|
-
* Pointer to the next or previous page in the list of results.
|
|
3299
|
-
* @maxLength 2000
|
|
3300
|
-
*/
|
|
3301
|
-
cursor?: string | null;
|
|
3302
|
-
}
|
|
3303
|
-
interface ConvertDraftJsToRichContentRequest {
|
|
3304
|
-
/** DraftJs content to convert to Rich content. */
|
|
3305
|
-
content?: Record<string, any> | null;
|
|
3306
|
-
}
|
|
3307
|
-
interface ConvertDraftJsToRichContentResponse {
|
|
3308
|
-
/**
|
|
3309
|
-
* Rich content converted from DraftJs content.
|
|
3310
|
-
* @maxLength 2000000
|
|
3311
|
-
*/
|
|
3312
|
-
richContent?: string;
|
|
3313
|
-
}
|
|
3314
|
-
interface ConvertRichContentToDraftJsRequest {
|
|
3315
|
-
/**
|
|
3316
|
-
* Rich content to convert to DraftJs content.
|
|
3317
|
-
* @maxLength 2000000
|
|
3318
|
-
*/
|
|
3319
|
-
richContent?: string;
|
|
3320
|
-
}
|
|
3321
|
-
interface ConvertRichContentToDraftJsResponse {
|
|
3322
|
-
/** DraftJs content converted from Rich content. */
|
|
3323
|
-
content?: Record<string, any> | null;
|
|
3324
|
-
}
|
|
3325
3137
|
interface PostCountersUpdated extends PostCountersUpdatedInitiatorOneOf {
|
|
3326
3138
|
/**
|
|
3327
3139
|
* Member ID of person who triggered the counter update
|
|
@@ -3391,6 +3203,25 @@ interface GetPostRequest {
|
|
|
3391
3203
|
*/
|
|
3392
3204
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
3393
3205
|
}
|
|
3206
|
+
declare enum PostFieldField {
|
|
3207
|
+
UNKNOWN = "UNKNOWN",
|
|
3208
|
+
/** Includes post URL when present. */
|
|
3209
|
+
URL = "URL",
|
|
3210
|
+
/** Includes post content text string when present. */
|
|
3211
|
+
CONTENT_TEXT = "CONTENT_TEXT",
|
|
3212
|
+
/** Includes post metrics when present. */
|
|
3213
|
+
METRICS = "METRICS",
|
|
3214
|
+
/** Includes SEO data. */
|
|
3215
|
+
SEO = "SEO",
|
|
3216
|
+
/** Includes post owner's contact ID. */
|
|
3217
|
+
CONTACT_ID = "CONTACT_ID",
|
|
3218
|
+
/** Includes post rich content. */
|
|
3219
|
+
RICH_CONTENT = "RICH_CONTENT",
|
|
3220
|
+
/** Includes post reference ID field. */
|
|
3221
|
+
REFERENCE_ID = "REFERENCE_ID"
|
|
3222
|
+
}
|
|
3223
|
+
/** @enumType */
|
|
3224
|
+
type PostFieldFieldWithLiterals = PostFieldField | 'UNKNOWN' | 'URL' | 'CONTENT_TEXT' | 'METRICS' | 'SEO' | 'CONTACT_ID' | 'RICH_CONTENT' | 'REFERENCE_ID';
|
|
3394
3225
|
interface GetPostResponse {
|
|
3395
3226
|
/** Retrieved post info. */
|
|
3396
3227
|
post?: Post;
|
|
@@ -3483,12 +3314,66 @@ interface ListPostsRequest {
|
|
|
3483
3314
|
*/
|
|
3484
3315
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
3485
3316
|
}
|
|
3317
|
+
declare enum GetPostsSort {
|
|
3318
|
+
/** Ordered by `firstPublishedDate` in descending order with pinned posts first. */
|
|
3319
|
+
FEED = "FEED",
|
|
3320
|
+
/** Ordered by `firstPublishedDate` in ascending order. */
|
|
3321
|
+
PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
|
|
3322
|
+
/** Ordered by `firstPublishedDate` in descending order. */
|
|
3323
|
+
PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC",
|
|
3324
|
+
/** Ordered by total number of views in descending order. */
|
|
3325
|
+
VIEW_COUNT = "VIEW_COUNT",
|
|
3326
|
+
/** Ordered by total number of likes in descending order. */
|
|
3327
|
+
LIKE_COUNT = "LIKE_COUNT",
|
|
3328
|
+
/** Ordered by `title` in ascending order. */
|
|
3329
|
+
TITLE_ASC = "TITLE_ASC",
|
|
3330
|
+
/** Ordered by `title` in descending order. */
|
|
3331
|
+
TITLE_DESC = "TITLE_DESC"
|
|
3332
|
+
}
|
|
3333
|
+
/** @enumType */
|
|
3334
|
+
type GetPostsSortWithLiterals = GetPostsSort | 'FEED' | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC' | 'VIEW_COUNT' | 'LIKE_COUNT' | 'TITLE_ASC' | 'TITLE_DESC';
|
|
3335
|
+
interface BlogPaging {
|
|
3336
|
+
/**
|
|
3337
|
+
* Number of items to skip in the current sort order.
|
|
3338
|
+
*
|
|
3339
|
+
*
|
|
3340
|
+
* Default: `0`
|
|
3341
|
+
*/
|
|
3342
|
+
offset?: number;
|
|
3343
|
+
/**
|
|
3344
|
+
* Number of items to return.
|
|
3345
|
+
*
|
|
3346
|
+
*
|
|
3347
|
+
* Default:`50`
|
|
3348
|
+
* @min 1
|
|
3349
|
+
* @max 100
|
|
3350
|
+
*/
|
|
3351
|
+
limit?: number;
|
|
3352
|
+
/**
|
|
3353
|
+
* Pointer to the next or previous page in the list of results.
|
|
3354
|
+
* @maxLength 2000
|
|
3355
|
+
*/
|
|
3356
|
+
cursor?: string | null;
|
|
3357
|
+
}
|
|
3486
3358
|
interface ListPostsResponse {
|
|
3487
3359
|
/** List of retrieved posts. */
|
|
3488
3360
|
posts?: Post[];
|
|
3489
3361
|
/** Details on the paged set of results returned. */
|
|
3490
3362
|
metaData?: MetaData;
|
|
3491
3363
|
}
|
|
3364
|
+
interface MetaData {
|
|
3365
|
+
/** Number of items returned in this response. */
|
|
3366
|
+
count?: number;
|
|
3367
|
+
/** Requested offset. */
|
|
3368
|
+
offset?: number;
|
|
3369
|
+
/** Total number of items that match the query. */
|
|
3370
|
+
total?: number;
|
|
3371
|
+
/**
|
|
3372
|
+
* Pointer to the next or previous page in the list of results.
|
|
3373
|
+
* @maxLength 2000
|
|
3374
|
+
*/
|
|
3375
|
+
cursor?: string | null;
|
|
3376
|
+
}
|
|
3492
3377
|
interface QueryPostsRequest {
|
|
3493
3378
|
/** Query options. */
|
|
3494
3379
|
query?: PlatformQuery;
|
|
@@ -3832,6 +3717,121 @@ interface PostCount {
|
|
|
3832
3717
|
/** Number of posts. */
|
|
3833
3718
|
postCount?: number;
|
|
3834
3719
|
}
|
|
3720
|
+
interface ListDemoPostsRequest {
|
|
3721
|
+
/**
|
|
3722
|
+
* Whether to return only featured posts.
|
|
3723
|
+
*
|
|
3724
|
+
* Default: `false`
|
|
3725
|
+
*/
|
|
3726
|
+
featured?: boolean;
|
|
3727
|
+
/**
|
|
3728
|
+
* Hashtag filter.
|
|
3729
|
+
*
|
|
3730
|
+
* Pass an array of hashtags to return only posts containing any of the provided hashtags.
|
|
3731
|
+
* If omitted, all posts with or without hashtags are returned.
|
|
3732
|
+
* @maxSize 100
|
|
3733
|
+
* @maxLength 100
|
|
3734
|
+
*/
|
|
3735
|
+
hashtags?: string[];
|
|
3736
|
+
/**
|
|
3737
|
+
* Category filter.
|
|
3738
|
+
*
|
|
3739
|
+
* Pass an array of category IDs to return only posts with any of the provided categories.
|
|
3740
|
+
* If omitted, all posts with or without associated categories are returned.
|
|
3741
|
+
* @maxSize 50
|
|
3742
|
+
* @format GUID
|
|
3743
|
+
*/
|
|
3744
|
+
categoryIds?: string[];
|
|
3745
|
+
/**
|
|
3746
|
+
* Tag filter.
|
|
3747
|
+
*
|
|
3748
|
+
* Pass an array of tag IDs to return only posts with any of the provided tags.
|
|
3749
|
+
* If omitted, all posts with or without tags are returned.
|
|
3750
|
+
* @maxSize 50
|
|
3751
|
+
* @format GUID
|
|
3752
|
+
*/
|
|
3753
|
+
tagIds?: string[];
|
|
3754
|
+
/**
|
|
3755
|
+
* Sorting options.
|
|
3756
|
+
*
|
|
3757
|
+
* - `FEED`: Ordered by `firstPublishedDate` in descending order with pinned posts first.
|
|
3758
|
+
* - `VIEW_COUNT`: Ordered by total number of views in descending order.
|
|
3759
|
+
* - `LIKE_COUNT`: Ordered by total number of likes in descending order.
|
|
3760
|
+
* - `PUBLISHED_DATE_ASC`: Ordered by `firstPublishedDate` in ascending order.
|
|
3761
|
+
* - `PUBLISHED_DATE_DESC`: Ordered by `firstPublishedDate` in descending order.
|
|
3762
|
+
* - `TITLE_ASC`: Ordered by `title` in ascending order.
|
|
3763
|
+
* - `TITLE_DESC`: Ordered by `title` in descending order.
|
|
3764
|
+
* - `RATING`: reserved for internal use.
|
|
3765
|
+
*
|
|
3766
|
+
* Default: `FEED`
|
|
3767
|
+
*/
|
|
3768
|
+
sort?: GetPostsSortWithLiterals;
|
|
3769
|
+
/** Pagination options. */
|
|
3770
|
+
paging?: BlogPaging;
|
|
3771
|
+
/**
|
|
3772
|
+
* __Deprecated.__ Use `fieldsets` instead.
|
|
3773
|
+
* This parameter will be removed on June 30, 2023.
|
|
3774
|
+
*
|
|
3775
|
+
* List of post fields to be included in the response.
|
|
3776
|
+
* @maxSize 20
|
|
3777
|
+
* @deprecated __Deprecated.__ Use `fieldsets` instead.
|
|
3778
|
+
* This parameter will be removed on June 30, 2023.
|
|
3779
|
+
*
|
|
3780
|
+
* List of post fields to be included in the response.
|
|
3781
|
+
* @replacedBy fieldsets
|
|
3782
|
+
* @targetRemovalDate 2024-06-30
|
|
3783
|
+
*/
|
|
3784
|
+
fieldsToInclude?: PostFieldFieldWithLiterals[];
|
|
3785
|
+
/**
|
|
3786
|
+
* Language filter.
|
|
3787
|
+
*
|
|
3788
|
+
* 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3789
|
+
* Pass a language to only receive posts that are in that language.
|
|
3790
|
+
* If omitted, posts in all languages are returned.
|
|
3791
|
+
* @format LANGUAGE_TAG
|
|
3792
|
+
*/
|
|
3793
|
+
language?: string | null;
|
|
3794
|
+
/**
|
|
3795
|
+
* Post owner's member ID.
|
|
3796
|
+
* @format GUID
|
|
3797
|
+
*/
|
|
3798
|
+
memberId?: string | null;
|
|
3799
|
+
/**
|
|
3800
|
+
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
3801
|
+
* the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
3802
|
+
* only the post’s base fields are returned.
|
|
3803
|
+
* @maxSize 20
|
|
3804
|
+
*/
|
|
3805
|
+
fieldsets?: PostFieldFieldWithLiterals[];
|
|
3806
|
+
}
|
|
3807
|
+
interface ListDemoPostsResponse {
|
|
3808
|
+
/** List of posts. */
|
|
3809
|
+
posts?: Post[];
|
|
3810
|
+
/** Details on the paged set of results returned. */
|
|
3811
|
+
metaData?: MetaData;
|
|
3812
|
+
}
|
|
3813
|
+
interface ConvertDraftJsToRichContentRequest {
|
|
3814
|
+
/** DraftJs content to convert to Rich content. */
|
|
3815
|
+
content?: Record<string, any> | null;
|
|
3816
|
+
}
|
|
3817
|
+
interface ConvertDraftJsToRichContentResponse {
|
|
3818
|
+
/**
|
|
3819
|
+
* Rich content converted from DraftJs content.
|
|
3820
|
+
* @maxLength 2000000
|
|
3821
|
+
*/
|
|
3822
|
+
richContent?: string;
|
|
3823
|
+
}
|
|
3824
|
+
interface ConvertRichContentToDraftJsRequest {
|
|
3825
|
+
/**
|
|
3826
|
+
* Rich content to convert to DraftJs content.
|
|
3827
|
+
* @maxLength 2000000
|
|
3828
|
+
*/
|
|
3829
|
+
richContent?: string;
|
|
3830
|
+
}
|
|
3831
|
+
interface ConvertRichContentToDraftJsResponse {
|
|
3832
|
+
/** DraftJs content converted from Rich content. */
|
|
3833
|
+
content?: Record<string, any> | null;
|
|
3834
|
+
}
|
|
3835
3835
|
interface BaseEventMetadata {
|
|
3836
3836
|
/**
|
|
3837
3837
|
* App instance ID.
|
|
@@ -3979,14 +3979,13 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
|
|
|
3979
3979
|
/**
|
|
3980
3980
|
* Retrieves the number of published posts per month within a specified time range.
|
|
3981
3981
|
*
|
|
3982
|
-
*
|
|
3983
|
-
* The
|
|
3984
|
-
*
|
|
3985
|
-
*
|
|
3986
|
-
*
|
|
3987
|
-
*
|
|
3982
|
+
* The time range is set using the `rangeStart` and `months` properties.
|
|
3983
|
+
* The time range always starts on the 1st day of the month set in `rangeStart` and
|
|
3984
|
+
* includes the number of `months` following `rangeStart`.
|
|
3985
|
+
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
|
3986
|
+
* 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.
|
|
3987
|
+
* > 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.
|
|
3988
3988
|
* @public
|
|
3989
|
-
* @param options - Options specifying time frame, sort, and filter.
|
|
3990
3989
|
* @permissionId BLOG.READ-PUBLICATION
|
|
3991
3990
|
* @applicableIdentity APP
|
|
3992
3991
|
* @returns Get Blog Post Count Stats response
|
|
@@ -4027,7 +4026,6 @@ interface QueryPostCountStatsOptions {
|
|
|
4027
4026
|
/**
|
|
4028
4027
|
* Retrieves the total amount of published posts of the blog.
|
|
4029
4028
|
* @public
|
|
4030
|
-
* @param options - Language Options.
|
|
4031
4029
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4032
4030
|
* @applicableIdentity APP
|
|
4033
4031
|
* @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
|
|
@@ -4048,12 +4046,12 @@ interface GetTotalPostsOptions {
|
|
|
4048
4046
|
* @param postId - Post ID.
|
|
4049
4047
|
* @public
|
|
4050
4048
|
* @requiredField postId
|
|
4051
|
-
* @param options - Options specifying which fields to return.
|
|
4052
4049
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4053
4050
|
* @applicableIdentity APP
|
|
4051
|
+
* @returns Retrieved post info.
|
|
4054
4052
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
|
4055
4053
|
*/
|
|
4056
|
-
declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<
|
|
4054
|
+
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>>;
|
|
4057
4055
|
interface GetPostOptions {
|
|
4058
4056
|
/**
|
|
4059
4057
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
@@ -4073,7 +4071,6 @@ interface GetPostOptions {
|
|
|
4073
4071
|
* @param slug - Slug of the post to retrieve.
|
|
4074
4072
|
* @public
|
|
4075
4073
|
* @requiredField slug
|
|
4076
|
-
* @param options - Options specifying which fields to return.
|
|
4077
4074
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4078
4075
|
* @applicableIdentity APP
|
|
4079
4076
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
|
|
@@ -4101,7 +4098,6 @@ interface GetPostBySlugOptions {
|
|
|
4101
4098
|
* - `paging.limit` is `50`.
|
|
4102
4099
|
* - `paging.offset` is `0`.
|
|
4103
4100
|
* @public
|
|
4104
|
-
* @param options - Sort, filter, and paging options.
|
|
4105
4101
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4106
4102
|
* @applicableIdentity APP
|
|
4107
4103
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
|
|
@@ -4172,26 +4168,18 @@ interface ListPostsOptions {
|
|
|
4172
4168
|
fieldsets?: PostFieldFieldWithLiterals[];
|
|
4173
4169
|
}
|
|
4174
4170
|
/**
|
|
4175
|
-
*
|
|
4176
|
-
*
|
|
4177
|
-
*
|
|
4178
|
-
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
|
4179
|
-
*
|
|
4180
|
-
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
4171
|
+
* Retrieves a list of up to 100 posts, given the provided paging, filtering, and sorting.
|
|
4181
4172
|
*
|
|
4182
|
-
*
|
|
4183
|
-
*
|
|
4184
|
-
* `
|
|
4185
|
-
*
|
|
4186
|
-
* + `descending('firstPublishedDate')`
|
|
4187
|
-
*
|
|
4188
|
-
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
|
4189
|
-
*
|
|
4190
|
-
* To learn how to query posts, refer to the table below.
|
|
4173
|
+
* Query Posts runs with these defaults, which you can override:
|
|
4174
|
+
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
|
4175
|
+
* - `paging.limit` is `50`.
|
|
4176
|
+
* - `paging.offset` is `0`.
|
|
4191
4177
|
*
|
|
4192
|
-
*
|
|
4178
|
+
* To learn about working with _Query_ endpoints, see
|
|
4179
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
|
|
4180
|
+
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
|
|
4181
|
+
* [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
4193
4182
|
* @public
|
|
4194
|
-
* @param options - Options specifying which fields to return.
|
|
4195
4183
|
* @permissionId BLOG.READ-PUBLICATION
|
|
4196
4184
|
* @applicableIdentity APP
|
|
4197
4185
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
|
|
@@ -4247,7 +4235,7 @@ interface PostsQueryBuilder {
|
|
|
4247
4235
|
/** @param propertyName - Property whose value is compared with `string`.
|
|
4248
4236
|
* @param string - String to compare against. Case-insensitive.
|
|
4249
4237
|
*/
|
|
4250
|
-
startsWith: (propertyName: 'title', value: string) => PostsQueryBuilder;
|
|
4238
|
+
startsWith: (propertyName: 'title' | 'slug', value: string) => PostsQueryBuilder;
|
|
4251
4239
|
/** @param propertyName - Property whose value is compared with `values`.
|
|
4252
4240
|
* @param values - List of values to compare against.
|
|
4253
4241
|
*/
|
|
@@ -4310,7 +4298,7 @@ interface PostQuerySpec extends QuerySpec {
|
|
|
4310
4298
|
},
|
|
4311
4299
|
{
|
|
4312
4300
|
fields: ['slug'];
|
|
4313
|
-
operators: ['$eq', '$hasAll', '$hasSome', '$ne'];
|
|
4301
|
+
operators: ['$eq', '$hasAll', '$hasSome', '$ne', '$startsWith'];
|
|
4314
4302
|
sort: 'BOTH';
|
|
4315
4303
|
},
|
|
4316
4304
|
{
|
|
@@ -1617,16 +1617,14 @@ var Order = /* @__PURE__ */ ((Order2) => {
|
|
|
1617
1617
|
Order2["NEWEST"] = "NEWEST";
|
|
1618
1618
|
return Order2;
|
|
1619
1619
|
})(Order || {});
|
|
1620
|
-
var
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
return GetPostsSort2;
|
|
1629
|
-
})(GetPostsSort || {});
|
|
1620
|
+
var Field = /* @__PURE__ */ ((Field2) => {
|
|
1621
|
+
Field2["UNKNOWN"] = "UNKNOWN";
|
|
1622
|
+
Field2["TOTAL_COMMENTS"] = "TOTAL_COMMENTS";
|
|
1623
|
+
Field2["LIKE_COUNT"] = "LIKE_COUNT";
|
|
1624
|
+
Field2["VIEW_COUNT"] = "VIEW_COUNT";
|
|
1625
|
+
Field2["RATING_COUNT"] = "RATING_COUNT";
|
|
1626
|
+
return Field2;
|
|
1627
|
+
})(Field || {});
|
|
1630
1628
|
var PostFieldField = /* @__PURE__ */ ((PostFieldField2) => {
|
|
1631
1629
|
PostFieldField2["UNKNOWN"] = "UNKNOWN";
|
|
1632
1630
|
PostFieldField2["URL"] = "URL";
|
|
@@ -1638,14 +1636,16 @@ var PostFieldField = /* @__PURE__ */ ((PostFieldField2) => {
|
|
|
1638
1636
|
PostFieldField2["REFERENCE_ID"] = "REFERENCE_ID";
|
|
1639
1637
|
return PostFieldField2;
|
|
1640
1638
|
})(PostFieldField || {});
|
|
1641
|
-
var
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1639
|
+
var GetPostsSort = /* @__PURE__ */ ((GetPostsSort2) => {
|
|
1640
|
+
GetPostsSort2["FEED"] = "FEED";
|
|
1641
|
+
GetPostsSort2["PUBLISHED_DATE_ASC"] = "PUBLISHED_DATE_ASC";
|
|
1642
|
+
GetPostsSort2["PUBLISHED_DATE_DESC"] = "PUBLISHED_DATE_DESC";
|
|
1643
|
+
GetPostsSort2["VIEW_COUNT"] = "VIEW_COUNT";
|
|
1644
|
+
GetPostsSort2["LIKE_COUNT"] = "LIKE_COUNT";
|
|
1645
|
+
GetPostsSort2["TITLE_ASC"] = "TITLE_ASC";
|
|
1646
|
+
GetPostsSort2["TITLE_DESC"] = "TITLE_DESC";
|
|
1647
|
+
return GetPostsSort2;
|
|
1648
|
+
})(GetPostsSort || {});
|
|
1649
1649
|
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
1650
1650
|
SortOrder2["ASC"] = "ASC";
|
|
1651
1651
|
SortOrder2["DESC"] = "DESC";
|
|
@@ -1744,8 +1744,8 @@ async function getPost2(postId, options) {
|
|
|
1744
1744
|
paths: [{ path: "post.media.wixMedia.videoV2" }]
|
|
1745
1745
|
}
|
|
1746
1746
|
]),
|
|
1747
|
-
["post.richContent"
|
|
1748
|
-
);
|
|
1747
|
+
["post.richContent"]
|
|
1748
|
+
)?.post;
|
|
1749
1749
|
} catch (err) {
|
|
1750
1750
|
const transformedError = (0, import_transform_error.transformError)(
|
|
1751
1751
|
err,
|
|
@@ -1792,7 +1792,7 @@ async function getPostBySlug2(slug, options) {
|
|
|
1792
1792
|
paths: [{ path: "post.media.wixMedia.videoV2" }]
|
|
1793
1793
|
}
|
|
1794
1794
|
]),
|
|
1795
|
-
["post.richContent"
|
|
1795
|
+
["post.richContent"]
|
|
1796
1796
|
);
|
|
1797
1797
|
} catch (err) {
|
|
1798
1798
|
const transformedError = (0, import_transform_error.transformError)(
|
|
@@ -1851,7 +1851,7 @@ async function listPosts2(options) {
|
|
|
1851
1851
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1852
1852
|
}
|
|
1853
1853
|
]),
|
|
1854
|
-
["posts.richContent"
|
|
1854
|
+
["posts.richContent"]
|
|
1855
1855
|
);
|
|
1856
1856
|
} catch (err) {
|
|
1857
1857
|
const transformedError = (0, import_transform_error.transformError)(
|
|
@@ -1921,7 +1921,7 @@ function queryPosts2(options) {
|
|
|
1921
1921
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1922
1922
|
}
|
|
1923
1923
|
]),
|
|
1924
|
-
["posts.richContent"
|
|
1924
|
+
["posts.richContent"]
|
|
1925
1925
|
);
|
|
1926
1926
|
return {
|
|
1927
1927
|
items: transformedData?.posts,
|
|
@@ -1969,7 +1969,7 @@ async function typedQueryPosts(query, options) {
|
|
|
1969
1969
|
paths: [{ path: "posts.media.wixMedia.videoV2" }]
|
|
1970
1970
|
}
|
|
1971
1971
|
]),
|
|
1972
|
-
["posts.richContent"
|
|
1972
|
+
["posts.richContent"]
|
|
1973
1973
|
);
|
|
1974
1974
|
} catch (err) {
|
|
1975
1975
|
const transformedError = (0, import_transform_error.transformError)(
|