@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.
Files changed (49) hide show
  1. package/build/cjs/index.d.ts +11 -15
  2. package/build/cjs/index.js +29 -34
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +207 -219
  5. package/build/cjs/index.typings.js +24 -24
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +188 -188
  8. package/build/cjs/meta.js +18 -18
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +85 -86
  11. package/build/cjs/schemas.js +149 -154
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +11 -15
  14. package/build/es/index.mjs +29 -34
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +207 -219
  17. package/build/es/index.typings.mjs +24 -24
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +188 -188
  20. package/build/es/meta.mjs +18 -18
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +85 -86
  23. package/build/es/schemas.mjs +149 -154
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +11 -15
  26. package/build/internal/cjs/index.js +29 -34
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +207 -219
  29. package/build/internal/cjs/index.typings.js +24 -24
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +188 -188
  32. package/build/internal/cjs/meta.js +18 -18
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +85 -86
  35. package/build/internal/cjs/schemas.js +149 -154
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +11 -15
  38. package/build/internal/es/index.mjs +29 -34
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +207 -219
  41. package/build/internal/es/index.typings.mjs +24 -24
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +188 -188
  44. package/build/internal/es/meta.mjs +18 -18
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +85 -86
  47. package/build/internal/es/schemas.mjs +149 -154
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +2 -2
@@ -3127,194 +3127,6 @@ interface GetTotalPostsResponse {
3127
3127
  /** Total amount of published posts. */
3128
3128
  total?: number;
3129
3129
  }
3130
- interface ListDemoPostsRequest {
3131
- /**
3132
- * Whether to return only featured posts.
3133
- *
3134
- * Default: `false`
3135
- */
3136
- featured?: boolean;
3137
- /**
3138
- * Hashtag filter.
3139
- *
3140
- * Pass an array of hashtags to return only posts containing any of the provided hashtags.
3141
- * If omitted, all posts with or without hashtags are returned.
3142
- * @maxSize 100
3143
- * @maxLength 100
3144
- */
3145
- hashtags?: string[];
3146
- /**
3147
- * Category filter.
3148
- *
3149
- * Pass an array of category IDs to return only posts with any of the provided categories.
3150
- * If omitted, all posts with or without associated categories are returned.
3151
- * @maxSize 50
3152
- * @format GUID
3153
- */
3154
- categoryIds?: string[];
3155
- /**
3156
- * Tag filter.
3157
- *
3158
- * Pass an array of tag IDs to return only posts with any of the provided tags.
3159
- * If omitted, all posts with or without tags are returned.
3160
- * @maxSize 50
3161
- * @format GUID
3162
- */
3163
- tagIds?: string[];
3164
- /**
3165
- * Sorting options.
3166
- *
3167
- * - `FEED`: Ordered by `firstPublishedDate` in descending order with pinned posts first.
3168
- * - `VIEW_COUNT`: Ordered by total number of views in descending order.
3169
- * - `LIKE_COUNT`: Ordered by total number of likes in descending order.
3170
- * - `PUBLISHED_DATE_ASC`: Ordered by `firstPublishedDate` in ascending order.
3171
- * - `PUBLISHED_DATE_DESC`: Ordered by `firstPublishedDate` in descending order.
3172
- * - `TITLE_ASC`: Ordered by `title` in ascending order.
3173
- * - `TITLE_DESC`: Ordered by `title` in descending order.
3174
- * - `RATING`: reserved for internal use.
3175
- *
3176
- * Default: `FEED`
3177
- */
3178
- sort?: GetPostsSortWithLiterals;
3179
- /** Pagination options. */
3180
- paging?: BlogPaging;
3181
- /**
3182
- * __Deprecated.__ Use `fieldsets` instead.
3183
- * This parameter will be removed on June 30, 2023.
3184
- *
3185
- * List of post fields to be included in the response.
3186
- * @maxSize 20
3187
- * @deprecated __Deprecated.__ Use `fieldsets` instead.
3188
- * This parameter will be removed on June 30, 2023.
3189
- *
3190
- * List of post fields to be included in the response.
3191
- * @replacedBy fieldsets
3192
- * @targetRemovalDate 2024-06-30
3193
- */
3194
- fieldsToInclude?: PostFieldFieldWithLiterals[];
3195
- /**
3196
- * Language filter.
3197
- *
3198
- * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
3199
- * Pass a language to only receive posts that are in that language.
3200
- * If omitted, posts in all languages are returned.
3201
- * @format LANGUAGE_TAG
3202
- */
3203
- language?: string | null;
3204
- /**
3205
- * Post owner's member ID.
3206
- * @format GUID
3207
- */
3208
- memberId?: string | null;
3209
- /**
3210
- * List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
3211
- * the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
3212
- * only the post’s base fields are returned.
3213
- * @maxSize 20
3214
- */
3215
- fieldsets?: PostFieldFieldWithLiterals[];
3216
- }
3217
- declare enum GetPostsSort {
3218
- /** Ordered by `firstPublishedDate` in descending order with pinned posts first. */
3219
- FEED = "FEED",
3220
- /** Ordered by `firstPublishedDate` in ascending order. */
3221
- PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
3222
- /** Ordered by `firstPublishedDate` in descending order. */
3223
- PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC",
3224
- /** Ordered by total number of views in descending order. */
3225
- VIEW_COUNT = "VIEW_COUNT",
3226
- /** Ordered by total number of likes in descending order. */
3227
- LIKE_COUNT = "LIKE_COUNT",
3228
- /** Ordered by `title` in ascending order. */
3229
- TITLE_ASC = "TITLE_ASC",
3230
- /** Ordered by `title` in descending order. */
3231
- TITLE_DESC = "TITLE_DESC"
3232
- }
3233
- /** @enumType */
3234
- type GetPostsSortWithLiterals = GetPostsSort | 'FEED' | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC' | 'VIEW_COUNT' | 'LIKE_COUNT' | 'TITLE_ASC' | 'TITLE_DESC';
3235
- interface BlogPaging {
3236
- /**
3237
- * Number of items to skip in the current sort order.
3238
- *
3239
- *
3240
- * Default: `0`
3241
- */
3242
- offset?: number;
3243
- /**
3244
- * Number of items to return.
3245
- *
3246
- *
3247
- * Default:`50`
3248
- * @min 1
3249
- * @max 100
3250
- */
3251
- limit?: number;
3252
- /**
3253
- * Pointer to the next or previous page in the list of results.
3254
- * @maxLength 2000
3255
- */
3256
- cursor?: string | null;
3257
- }
3258
- declare enum PostFieldField {
3259
- UNKNOWN = "UNKNOWN",
3260
- /** Includes post URL when present. */
3261
- URL = "URL",
3262
- /** Includes post content text string when present. */
3263
- CONTENT_TEXT = "CONTENT_TEXT",
3264
- /** Includes post metrics when present. */
3265
- METRICS = "METRICS",
3266
- /** Includes SEO data. */
3267
- SEO = "SEO",
3268
- /** Includes post owner's contact ID. */
3269
- CONTACT_ID = "CONTACT_ID",
3270
- /** Includes post rich content. */
3271
- RICH_CONTENT = "RICH_CONTENT",
3272
- /** Includes post reference ID field. */
3273
- REFERENCE_ID = "REFERENCE_ID"
3274
- }
3275
- /** @enumType */
3276
- type PostFieldFieldWithLiterals = PostFieldField | 'UNKNOWN' | 'URL' | 'CONTENT_TEXT' | 'METRICS' | 'SEO' | 'CONTACT_ID' | 'RICH_CONTENT' | 'REFERENCE_ID';
3277
- interface ListDemoPostsResponse {
3278
- /** List of posts. */
3279
- posts?: Post[];
3280
- /** Details on the paged set of results returned. */
3281
- metaData?: MetaData;
3282
- }
3283
- interface MetaData {
3284
- /** Number of items returned in this response. */
3285
- count?: number;
3286
- /** Requested offset. */
3287
- offset?: number;
3288
- /** Total number of items that match the query. */
3289
- total?: number;
3290
- /**
3291
- * Pointer to the next or previous page in the list of results.
3292
- * @maxLength 2000
3293
- */
3294
- cursor?: string | null;
3295
- }
3296
- interface ConvertDraftJsToRichContentRequest {
3297
- /** DraftJs content to convert to Rich content. */
3298
- content?: Record<string, any> | null;
3299
- }
3300
- interface ConvertDraftJsToRichContentResponse {
3301
- /**
3302
- * Rich content converted from DraftJs content.
3303
- * @maxLength 2000000
3304
- */
3305
- richContent?: string;
3306
- }
3307
- interface ConvertRichContentToDraftJsRequest {
3308
- /**
3309
- * Rich content to convert to DraftJs content.
3310
- * @maxLength 2000000
3311
- */
3312
- richContent?: string;
3313
- }
3314
- interface ConvertRichContentToDraftJsResponse {
3315
- /** DraftJs content converted from Rich content. */
3316
- content?: Record<string, any> | null;
3317
- }
3318
3130
  interface PostCountersUpdated extends PostCountersUpdatedInitiatorOneOf {
3319
3131
  /**
3320
3132
  * Member ID of person who triggered the counter update
@@ -3384,6 +3196,25 @@ interface GetPostRequest {
3384
3196
  */
3385
3197
  fieldsets?: PostFieldFieldWithLiterals[];
3386
3198
  }
3199
+ declare enum PostFieldField {
3200
+ UNKNOWN = "UNKNOWN",
3201
+ /** Includes post URL when present. */
3202
+ URL = "URL",
3203
+ /** Includes post content text string when present. */
3204
+ CONTENT_TEXT = "CONTENT_TEXT",
3205
+ /** Includes post metrics when present. */
3206
+ METRICS = "METRICS",
3207
+ /** Includes SEO data. */
3208
+ SEO = "SEO",
3209
+ /** Includes post owner's contact ID. */
3210
+ CONTACT_ID = "CONTACT_ID",
3211
+ /** Includes post rich content. */
3212
+ RICH_CONTENT = "RICH_CONTENT",
3213
+ /** Includes post reference ID field. */
3214
+ REFERENCE_ID = "REFERENCE_ID"
3215
+ }
3216
+ /** @enumType */
3217
+ type PostFieldFieldWithLiterals = PostFieldField | 'UNKNOWN' | 'URL' | 'CONTENT_TEXT' | 'METRICS' | 'SEO' | 'CONTACT_ID' | 'RICH_CONTENT' | 'REFERENCE_ID';
3387
3218
  interface GetPostResponse {
3388
3219
  /** Retrieved post info. */
3389
3220
  post?: Post;
@@ -3476,12 +3307,66 @@ interface ListPostsRequest {
3476
3307
  */
3477
3308
  fieldsets?: PostFieldFieldWithLiterals[];
3478
3309
  }
3310
+ declare enum GetPostsSort {
3311
+ /** Ordered by `firstPublishedDate` in descending order with pinned posts first. */
3312
+ FEED = "FEED",
3313
+ /** Ordered by `firstPublishedDate` in ascending order. */
3314
+ PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
3315
+ /** Ordered by `firstPublishedDate` in descending order. */
3316
+ PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC",
3317
+ /** Ordered by total number of views in descending order. */
3318
+ VIEW_COUNT = "VIEW_COUNT",
3319
+ /** Ordered by total number of likes in descending order. */
3320
+ LIKE_COUNT = "LIKE_COUNT",
3321
+ /** Ordered by `title` in ascending order. */
3322
+ TITLE_ASC = "TITLE_ASC",
3323
+ /** Ordered by `title` in descending order. */
3324
+ TITLE_DESC = "TITLE_DESC"
3325
+ }
3326
+ /** @enumType */
3327
+ type GetPostsSortWithLiterals = GetPostsSort | 'FEED' | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC' | 'VIEW_COUNT' | 'LIKE_COUNT' | 'TITLE_ASC' | 'TITLE_DESC';
3328
+ interface BlogPaging {
3329
+ /**
3330
+ * Number of items to skip in the current sort order.
3331
+ *
3332
+ *
3333
+ * Default: `0`
3334
+ */
3335
+ offset?: number;
3336
+ /**
3337
+ * Number of items to return.
3338
+ *
3339
+ *
3340
+ * Default:`50`
3341
+ * @min 1
3342
+ * @max 100
3343
+ */
3344
+ limit?: number;
3345
+ /**
3346
+ * Pointer to the next or previous page in the list of results.
3347
+ * @maxLength 2000
3348
+ */
3349
+ cursor?: string | null;
3350
+ }
3479
3351
  interface ListPostsResponse {
3480
3352
  /** List of retrieved posts. */
3481
3353
  posts?: Post[];
3482
3354
  /** Details on the paged set of results returned. */
3483
3355
  metaData?: MetaData;
3484
3356
  }
3357
+ interface MetaData {
3358
+ /** Number of items returned in this response. */
3359
+ count?: number;
3360
+ /** Requested offset. */
3361
+ offset?: number;
3362
+ /** Total number of items that match the query. */
3363
+ total?: number;
3364
+ /**
3365
+ * Pointer to the next or previous page in the list of results.
3366
+ * @maxLength 2000
3367
+ */
3368
+ cursor?: string | null;
3369
+ }
3485
3370
  interface QueryPostsRequest {
3486
3371
  /** Query options. */
3487
3372
  query?: PlatformQuery;
@@ -3825,6 +3710,121 @@ interface PostCount {
3825
3710
  /** Number of posts. */
3826
3711
  postCount?: number;
3827
3712
  }
3713
+ interface ListDemoPostsRequest {
3714
+ /**
3715
+ * Whether to return only featured posts.
3716
+ *
3717
+ * Default: `false`
3718
+ */
3719
+ featured?: boolean;
3720
+ /**
3721
+ * Hashtag filter.
3722
+ *
3723
+ * Pass an array of hashtags to return only posts containing any of the provided hashtags.
3724
+ * If omitted, all posts with or without hashtags are returned.
3725
+ * @maxSize 100
3726
+ * @maxLength 100
3727
+ */
3728
+ hashtags?: string[];
3729
+ /**
3730
+ * Category filter.
3731
+ *
3732
+ * Pass an array of category IDs to return only posts with any of the provided categories.
3733
+ * If omitted, all posts with or without associated categories are returned.
3734
+ * @maxSize 50
3735
+ * @format GUID
3736
+ */
3737
+ categoryIds?: string[];
3738
+ /**
3739
+ * Tag filter.
3740
+ *
3741
+ * Pass an array of tag IDs to return only posts with any of the provided tags.
3742
+ * If omitted, all posts with or without tags are returned.
3743
+ * @maxSize 50
3744
+ * @format GUID
3745
+ */
3746
+ tagIds?: string[];
3747
+ /**
3748
+ * Sorting options.
3749
+ *
3750
+ * - `FEED`: Ordered by `firstPublishedDate` in descending order with pinned posts first.
3751
+ * - `VIEW_COUNT`: Ordered by total number of views in descending order.
3752
+ * - `LIKE_COUNT`: Ordered by total number of likes in descending order.
3753
+ * - `PUBLISHED_DATE_ASC`: Ordered by `firstPublishedDate` in ascending order.
3754
+ * - `PUBLISHED_DATE_DESC`: Ordered by `firstPublishedDate` in descending order.
3755
+ * - `TITLE_ASC`: Ordered by `title` in ascending order.
3756
+ * - `TITLE_DESC`: Ordered by `title` in descending order.
3757
+ * - `RATING`: reserved for internal use.
3758
+ *
3759
+ * Default: `FEED`
3760
+ */
3761
+ sort?: GetPostsSortWithLiterals;
3762
+ /** Pagination options. */
3763
+ paging?: BlogPaging;
3764
+ /**
3765
+ * __Deprecated.__ Use `fieldsets` instead.
3766
+ * This parameter will be removed on June 30, 2023.
3767
+ *
3768
+ * List of post fields to be included in the response.
3769
+ * @maxSize 20
3770
+ * @deprecated __Deprecated.__ Use `fieldsets` instead.
3771
+ * This parameter will be removed on June 30, 2023.
3772
+ *
3773
+ * List of post fields to be included in the response.
3774
+ * @replacedBy fieldsets
3775
+ * @targetRemovalDate 2024-06-30
3776
+ */
3777
+ fieldsToInclude?: PostFieldFieldWithLiterals[];
3778
+ /**
3779
+ * Language filter.
3780
+ *
3781
+ * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
3782
+ * Pass a language to only receive posts that are in that language.
3783
+ * If omitted, posts in all languages are returned.
3784
+ * @format LANGUAGE_TAG
3785
+ */
3786
+ language?: string | null;
3787
+ /**
3788
+ * Post owner's member ID.
3789
+ * @format GUID
3790
+ */
3791
+ memberId?: string | null;
3792
+ /**
3793
+ * List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
3794
+ * the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
3795
+ * only the post’s base fields are returned.
3796
+ * @maxSize 20
3797
+ */
3798
+ fieldsets?: PostFieldFieldWithLiterals[];
3799
+ }
3800
+ interface ListDemoPostsResponse {
3801
+ /** List of posts. */
3802
+ posts?: Post[];
3803
+ /** Details on the paged set of results returned. */
3804
+ metaData?: MetaData;
3805
+ }
3806
+ interface ConvertDraftJsToRichContentRequest {
3807
+ /** DraftJs content to convert to Rich content. */
3808
+ content?: Record<string, any> | null;
3809
+ }
3810
+ interface ConvertDraftJsToRichContentResponse {
3811
+ /**
3812
+ * Rich content converted from DraftJs content.
3813
+ * @maxLength 2000000
3814
+ */
3815
+ richContent?: string;
3816
+ }
3817
+ interface ConvertRichContentToDraftJsRequest {
3818
+ /**
3819
+ * Rich content to convert to DraftJs content.
3820
+ * @maxLength 2000000
3821
+ */
3822
+ richContent?: string;
3823
+ }
3824
+ interface ConvertRichContentToDraftJsResponse {
3825
+ /** DraftJs content converted from Rich content. */
3826
+ content?: Record<string, any> | null;
3827
+ }
3828
3828
  interface BaseEventMetadata {
3829
3829
  /**
3830
3830
  * App instance ID.
@@ -3972,14 +3972,13 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
3972
3972
  /**
3973
3973
  * Retrieves the number of published posts per month within a specified time range.
3974
3974
  *
3975
- *
3976
- * The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
3977
- *
3978
- * 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.
3979
- *
3980
- * >**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.
3975
+ * The time range is set using the `rangeStart` and `months` properties.
3976
+ * The time range always starts on the 1st day of the month set in `rangeStart` and
3977
+ * includes the number of `months` following `rangeStart`.
3978
+ * For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
3979
+ * 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.
3980
+ * > 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.
3981
3981
  * @public
3982
- * @param options - Options specifying time frame, sort, and filter.
3983
3982
  * @permissionId BLOG.READ-PUBLICATION
3984
3983
  * @applicableIdentity APP
3985
3984
  * @returns Get Blog Post Count Stats response
@@ -4020,7 +4019,6 @@ interface QueryPostCountStatsOptions {
4020
4019
  /**
4021
4020
  * Retrieves the total amount of published posts of the blog.
4022
4021
  * @public
4023
- * @param options - Language Options.
4024
4022
  * @permissionId BLOG.READ-PUBLICATION
4025
4023
  * @applicableIdentity APP
4026
4024
  * @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
@@ -4041,12 +4039,12 @@ interface GetTotalPostsOptions {
4041
4039
  * @param postId - Post ID.
4042
4040
  * @public
4043
4041
  * @requiredField postId
4044
- * @param options - Options specifying which fields to return.
4045
4042
  * @permissionId BLOG.READ-PUBLICATION
4046
4043
  * @applicableIdentity APP
4044
+ * @returns Retrieved post info.
4047
4045
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
4048
4046
  */
4049
- 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`, 7>>;
4047
+ 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>>;
4050
4048
  interface GetPostOptions {
4051
4049
  /**
4052
4050
  * List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
@@ -4066,7 +4064,6 @@ interface GetPostOptions {
4066
4064
  * @param slug - Slug of the post to retrieve.
4067
4065
  * @public
4068
4066
  * @requiredField slug
4069
- * @param options - Options specifying which fields to return.
4070
4067
  * @permissionId BLOG.READ-PUBLICATION
4071
4068
  * @applicableIdentity APP
4072
4069
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
@@ -4094,7 +4091,6 @@ interface GetPostBySlugOptions {
4094
4091
  * - `paging.limit` is `50`.
4095
4092
  * - `paging.offset` is `0`.
4096
4093
  * @public
4097
- * @param options - Sort, filter, and paging options.
4098
4094
  * @permissionId BLOG.READ-PUBLICATION
4099
4095
  * @applicableIdentity APP
4100
4096
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
@@ -4165,26 +4161,18 @@ interface ListPostsOptions {
4165
4161
  fieldsets?: PostFieldFieldWithLiterals[];
4166
4162
  }
4167
4163
  /**
4168
- * Creates a query to retrieve a list of posts.
4169
- *
4170
- *
4171
- * The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
4172
- *
4173
- * The returned object contains the query definition which is typically used to run the query using the `find()` function.
4164
+ * Retrieves a list of up to 100 posts, given the provided paging, filtering, and sorting.
4174
4165
  *
4175
- * 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.
4176
- *
4177
- * `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
4178
- * + `limit(50)`
4179
- * + `descending('firstPublishedDate')`
4180
- *
4181
- * Note that the default limit is `'50'`, but the max limit is `'100'`.
4182
- *
4183
- * To learn how to query posts, refer to the table below.
4166
+ * Query Posts runs with these defaults, which you can override:
4167
+ * - `firstPublishedDate` is sorted in descending order, with pinned posts first.
4168
+ * - `paging.limit` is `50`.
4169
+ * - `paging.offset` is `0`.
4184
4170
  *
4185
- * 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`.
4171
+ * To learn about working with _Query_ endpoints, see
4172
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
4173
+ * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
4174
+ * [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
4186
4175
  * @public
4187
- * @param options - Options specifying which fields to return.
4188
4176
  * @permissionId BLOG.READ-PUBLICATION
4189
4177
  * @applicableIdentity APP
4190
4178
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
@@ -4240,7 +4228,7 @@ interface PostsQueryBuilder {
4240
4228
  /** @param propertyName - Property whose value is compared with `string`.
4241
4229
  * @param string - String to compare against. Case-insensitive.
4242
4230
  */
4243
- startsWith: (propertyName: 'title', value: string) => PostsQueryBuilder;
4231
+ startsWith: (propertyName: 'title' | 'slug', value: string) => PostsQueryBuilder;
4244
4232
  /** @param propertyName - Property whose value is compared with `values`.
4245
4233
  * @param values - List of values to compare against.
4246
4234
  */
@@ -4303,7 +4291,7 @@ interface PostQuerySpec extends QuerySpec {
4303
4291
  },
4304
4292
  {
4305
4293
  fields: ['slug'];
4306
- operators: ['$eq', '$hasAll', '$hasSome', '$ne'];
4294
+ operators: ['$eq', '$hasAll', '$hasSome', '$ne', '$startsWith'];
4307
4295
  sort: 'BOTH';
4308
4296
  },
4309
4297
  {
@@ -1617,16 +1617,14 @@ var Order = /* @__PURE__ */ ((Order2) => {
1617
1617
  Order2["NEWEST"] = "NEWEST";
1618
1618
  return Order2;
1619
1619
  })(Order || {});
1620
- var GetPostsSort = /* @__PURE__ */ ((GetPostsSort2) => {
1621
- GetPostsSort2["FEED"] = "FEED";
1622
- GetPostsSort2["PUBLISHED_DATE_ASC"] = "PUBLISHED_DATE_ASC";
1623
- GetPostsSort2["PUBLISHED_DATE_DESC"] = "PUBLISHED_DATE_DESC";
1624
- GetPostsSort2["VIEW_COUNT"] = "VIEW_COUNT";
1625
- GetPostsSort2["LIKE_COUNT"] = "LIKE_COUNT";
1626
- GetPostsSort2["TITLE_ASC"] = "TITLE_ASC";
1627
- GetPostsSort2["TITLE_DESC"] = "TITLE_DESC";
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 Field = /* @__PURE__ */ ((Field2) => {
1642
- Field2["UNKNOWN"] = "UNKNOWN";
1643
- Field2["TOTAL_COMMENTS"] = "TOTAL_COMMENTS";
1644
- Field2["LIKE_COUNT"] = "LIKE_COUNT";
1645
- Field2["VIEW_COUNT"] = "VIEW_COUNT";
1646
- Field2["RATING_COUNT"] = "RATING_COUNT";
1647
- return Field2;
1648
- })(Field || {});
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", "post.rich_content"]
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", "post.rich_content"]
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", "posts.rich_content"]
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", "posts.rich_content"]
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", "posts.rich_content"]
1972
+ ["posts.richContent"]
1973
1973
  );
1974
1974
  } catch (err) {
1975
1975
  const transformedError = (0, import_transform_error.transformError)(