@wix/auto_sdk_blog_draft-posts 1.0.29 → 1.0.31

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 (37) hide show
  1. package/build/cjs/index.d.ts +2 -2
  2. package/build/cjs/index.js +0 -8
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/{blog-v3-draft-draft-posts.universal-DE4EwIQq.d.ts → index.typings.d.ts} +289 -17
  5. package/build/cjs/index.typings.js +3077 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +2 -1
  8. package/build/cjs/meta.js +0 -8
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +2 -2
  11. package/build/es/index.mjs +0 -8
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/{blog-v3-draft-draft-posts.universal-DE4EwIQq.d.mts → index.typings.d.mts} +289 -17
  14. package/build/es/index.typings.mjs +3000 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +2 -1
  17. package/build/es/meta.mjs +0 -8
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +2 -2
  20. package/build/internal/cjs/index.js +0 -8
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/{blog-v3-draft-draft-posts.universal-DE4EwIQq.d.ts → index.typings.d.ts} +289 -17
  23. package/build/internal/cjs/index.typings.js +3077 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -0
  25. package/build/internal/cjs/meta.d.ts +2 -1
  26. package/build/internal/cjs/meta.js +0 -8
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +2 -2
  29. package/build/internal/es/index.mjs +0 -8
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/{blog-v3-draft-draft-posts.universal-DE4EwIQq.d.mts → index.typings.d.mts} +289 -17
  32. package/build/internal/es/index.typings.mjs +3000 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -0
  34. package/build/internal/es/meta.d.mts +2 -1
  35. package/build/internal/es/meta.mjs +0 -8
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
@@ -1,3 +1,5 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
1
3
  interface DraftPost {
2
4
  /**
3
5
  * Draft post ID.
@@ -1656,6 +1658,8 @@ declare enum NullValue {
1656
1658
  /** Null value. */
1657
1659
  NULL_VALUE = "NULL_VALUE"
1658
1660
  }
1661
+ /** @enumType */
1662
+ type NullValueWithLiterals = NullValue | 'NULL_VALUE';
1659
1663
  /**
1660
1664
  * `ListValue` is a wrapper around a repeated field of values.
1661
1665
  *
@@ -2182,6 +2186,8 @@ declare enum Type {
2182
2186
  /** Triggered by autosave when post created by AI tool. */
2183
2187
  AI_AUTO_SAVE = "AI_AUTO_SAVE"
2184
2188
  }
2189
+ /** @enumType */
2190
+ type TypeWithLiterals = Type | 'UNKNOWN' | 'MANUAL' | 'AUTO_SAVE' | 'PROVISIONING' | 'IMPORT' | 'AI_AUTO_SAVE';
2185
2191
  declare enum Field {
2186
2192
  /** Unknown field. */
2187
2193
  UNKNOWN = "UNKNOWN",
@@ -2450,14 +2456,7 @@ interface GetDraftPostResponse {
2450
2456
  /** Draft post info. */
2451
2457
  draftPost?: DraftPost;
2452
2458
  }
2453
- interface UpdateDraftPostContentRequest extends UpdateDraftPostContentRequestDraftContentOneOf {
2454
- /**
2455
- * DraftJs content to update.
2456
- * @maxLength 400000
2457
- */
2458
- content?: string;
2459
- /** Draft Post rich content. */
2460
- richContent?: RichContent;
2459
+ interface UpdateDraftPostContentRequest {
2461
2460
  /**
2462
2461
  * Draft post ID.
2463
2462
  * @maxLength 38
@@ -2472,14 +2471,6 @@ interface UpdateDraftPostContentRequest extends UpdateDraftPostContentRequestDra
2472
2471
  * @maxSize 10
2473
2472
  */
2474
2473
  fieldsets?: FieldWithLiterals[];
2475
- }
2476
- /** @oneof */
2477
- interface UpdateDraftPostContentRequestDraftContentOneOf {
2478
- /**
2479
- * DraftJs content to update.
2480
- * @maxLength 400000
2481
- */
2482
- content?: string;
2483
2474
  /** Draft Post rich content. */
2484
2475
  richContent?: RichContent;
2485
2476
  }
@@ -3108,14 +3099,109 @@ interface DraftCreatedEnvelope {
3108
3099
  entity: DraftPost;
3109
3100
  metadata: EventMetadata;
3110
3101
  }
3102
+ /**
3103
+ * Triggered when a draft post is created.
3104
+ * @permissionScope Manage Blog
3105
+ * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
3106
+ * @permissionScope Manage Blog
3107
+ * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
3108
+ * @permissionScope Read Draft Blog Posts
3109
+ * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
3110
+ * @permissionScope Read Blog
3111
+ * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
3112
+ * @permissionScope Manage Blog
3113
+ * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
3114
+ * @permissionScope Manage Blog
3115
+ * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
3116
+ * @permissionScope Read Draft Blog Posts
3117
+ * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
3118
+ * @permissionId BLOG.READ_ANY_DRAFT
3119
+ * @permissionId BLOG.READ-PUBLICATION
3120
+ * @webhook
3121
+ * @eventType wix.blog.v3.draft_created
3122
+ * @serviceIdentifier com.wixpress.npm.communities.platformized.blog.v3.DraftPostService
3123
+ * @slug created
3124
+ */
3125
+ declare function onDraftCreated(handler: (event: DraftCreatedEnvelope) => void | Promise<void>): void;
3111
3126
  interface DraftDeletedEnvelope {
3112
3127
  entity: DraftPost;
3113
3128
  metadata: EventMetadata;
3114
3129
  }
3130
+ /**
3131
+ * Triggered when a draft post is deleted.
3132
+ * @permissionScope Manage Blog
3133
+ * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
3134
+ * @permissionScope Manage Blog
3135
+ * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
3136
+ * @permissionScope Read Draft Blog Posts
3137
+ * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
3138
+ * @permissionScope Read Blog
3139
+ * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
3140
+ * @permissionScope Manage Blog
3141
+ * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
3142
+ * @permissionScope Manage Blog
3143
+ * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
3144
+ * @permissionScope Read Draft Blog Posts
3145
+ * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
3146
+ * @permissionId BLOG.READ_ANY_DRAFT
3147
+ * @permissionId BLOG.READ-PUBLICATION
3148
+ * @webhook
3149
+ * @eventType wix.blog.v3.draft_deleted
3150
+ * @serviceIdentifier com.wixpress.npm.communities.platformized.blog.v3.DraftPostService
3151
+ * @slug deleted
3152
+ */
3153
+ declare function onDraftDeleted(handler: (event: DraftDeletedEnvelope) => void | Promise<void>): void;
3115
3154
  interface DraftUpdatedEnvelope {
3116
3155
  entity: DraftPost;
3117
3156
  metadata: EventMetadata;
3118
3157
  }
3158
+ /**
3159
+ * Triggered when a draft post is updated.
3160
+ * @permissionScope Manage Blog
3161
+ * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
3162
+ * @permissionScope Manage Blog
3163
+ * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
3164
+ * @permissionScope Read Draft Blog Posts
3165
+ * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
3166
+ * @permissionScope Read Blog
3167
+ * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
3168
+ * @permissionScope Manage Blog
3169
+ * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
3170
+ * @permissionScope Manage Blog
3171
+ * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
3172
+ * @permissionScope Read Draft Blog Posts
3173
+ * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
3174
+ * @permissionId BLOG.READ_ANY_DRAFT
3175
+ * @permissionId BLOG.READ-PUBLICATION
3176
+ * @webhook
3177
+ * @eventType wix.blog.v3.draft_updated
3178
+ * @serviceIdentifier com.wixpress.npm.communities.platformized.blog.v3.DraftPostService
3179
+ * @slug updated
3180
+ */
3181
+ declare function onDraftUpdated(handler: (event: DraftUpdatedEnvelope) => void | Promise<void>): void;
3182
+ type DraftNonNullablePaths = `_id` | `title` | `categoryIds` | `hashtags` | `minutesToRead` | `tagIds` | `relatedPostIds` | `pricingPlanIds` | `status` | `moderationDetails.submittedBy` | `moderationDetails.status` | `hasUnpublishedChanges` | `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` | `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`;
3183
+ /**
3184
+ * Creates a draft post.
3185
+ *
3186
+ * For 3rd-party apps, `memberId` is a required field.
3187
+ *
3188
+ * In `categoryIds`, only categories that already exist will be added to the draft post. Including
3189
+ * `categoryIds` that do not exist will not return an error, but they will not be added to the `categoryIds` array.
3190
+ * If some of the categories exist, those will be added while those that do not exist will not be added to `categoryIds`.
3191
+ * You can check which categories are available with
3192
+ * List Categories ([SDK](https://dev.wix.com/docs/sdk/backend-modules/blog/categories/list-categories) | [REST](https://dev.wix.com/docs/rest/business-solutions/blog/category/list-categories)).
3193
+ * @param draftPost - Draft post to create.
3194
+ * @public
3195
+ * @requiredField draftPost
3196
+ * @requiredField draftPost.title
3197
+ * @param options - Options for creating a draft post.
3198
+ * @permissionId BLOG.CREATE-DRAFT
3199
+ * @applicableIdentity APP
3200
+ * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.CreateDraftPost
3201
+ */
3202
+ declare function createDraftPost(draftPost: NonNullablePaths<DraftPost, `title`>, options?: CreateDraftPostOptions): Promise<NonNullablePaths<CreateDraftPostResponse, {
3203
+ [P in DraftNonNullablePaths]: `draftPost.${P}`;
3204
+ }[DraftNonNullablePaths]>>;
3119
3205
  interface CreateDraftPostOptions {
3120
3206
  /**
3121
3207
  * Whether the draft post should be published on creation.
@@ -3131,6 +3217,20 @@ interface CreateDraftPostOptions {
3131
3217
  */
3132
3218
  fieldsets?: FieldWithLiterals[];
3133
3219
  }
3220
+ /**
3221
+ * Creates multiple draft posts.
3222
+ * @param draftPosts - Draft posts to create.
3223
+ * @public
3224
+ * @requiredField draftPosts
3225
+ * @requiredField draftPosts.title
3226
+ * @param options - Options for creating multiple draft posts.
3227
+ * @permissionId BLOG.CREATE-DRAFT
3228
+ * @applicableIdentity APP
3229
+ * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.BulkCreateDraftPosts
3230
+ */
3231
+ declare function bulkCreateDraftPosts(draftPosts: NonNullablePaths<DraftPost, `title`>[], options?: BulkCreateDraftPostsOptions): Promise<NonNullablePaths<BulkCreateDraftPostsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
3232
+ [P in DraftNonNullablePaths]: `results.${number}.item.${P}`;
3233
+ }[DraftNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
3134
3234
  interface BulkCreateDraftPostsOptions {
3135
3235
  /** Whether the draft post should be published after creation. */
3136
3236
  publish?: boolean;
@@ -3144,6 +3244,19 @@ interface BulkCreateDraftPostsOptions {
3144
3244
  */
3145
3245
  fieldsets?: FieldWithLiterals[];
3146
3246
  }
3247
+ /**
3248
+ * Updates multiple draft posts.
3249
+ * @public
3250
+ * @requiredField options.draftPosts.draftPost
3251
+ * @requiredField options.draftPosts.draftPost._id
3252
+ * @param options - Options for updating multiple draft posts.
3253
+ * @permissionId BLOG.EDIT-DRAFT
3254
+ * @applicableIdentity APP
3255
+ * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.BulkUpdateDraftPosts
3256
+ */
3257
+ declare function bulkUpdateDraftPosts(options?: NonNullablePaths<BulkUpdateDraftPostsOptions, `draftPosts.${number}.draftPost` | `draftPosts.${number}.draftPost._id`>): Promise<NonNullablePaths<BulkUpdateDraftPostsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
3258
+ [P in DraftNonNullablePaths]: `results.${number}.item.${P}`;
3259
+ }[DraftNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
3147
3260
  interface BulkUpdateDraftPostsOptions {
3148
3261
  /**
3149
3262
  * Draft posts to update.
@@ -3169,6 +3282,22 @@ interface BulkUpdateDraftPostsOptions {
3169
3282
  */
3170
3283
  fieldsets?: FieldWithLiterals[];
3171
3284
  }
3285
+ /**
3286
+ * Retrieves a list of up to 100 deleted draft posts.
3287
+ *
3288
+ * List Draft Posts runs with these defaults, which you can override:
3289
+ * - `editedDate` is sorted in descending order. In this case,`editedDate` implies the date the post was deleted.
3290
+ * - `paging.limit` is `50`.
3291
+ * - `paging.offset` is `0`.
3292
+ * @public
3293
+ * @param options - Options for listing deleted draft posts.
3294
+ * @permissionId BLOG.READ_DRAFT
3295
+ * @applicableIdentity APP
3296
+ * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.ListDeletedDraftPosts
3297
+ */
3298
+ declare function listDeletedDraftPosts(options?: ListDeletedDraftPostsOptions): Promise<NonNullablePaths<ListDeletedDraftPostsResponse, {
3299
+ [P in DraftNonNullablePaths]: `draftPosts.${number}.${P}`;
3300
+ }[DraftNonNullablePaths] | `metaData.count` | `metaData.offset` | `metaData.total`>>;
3172
3301
  interface ListDeletedDraftPostsOptions {
3173
3302
  /**
3174
3303
  * Language filter.
@@ -3200,6 +3329,19 @@ interface ListDeletedDraftPostsOptions {
3200
3329
  */
3201
3330
  draftPostIds?: string[];
3202
3331
  }
3332
+ /**
3333
+ * Retrieves a draft post by the provided ID.
3334
+ * @param draftPostId - Draft post ID.
3335
+ * @public
3336
+ * @requiredField draftPostId
3337
+ * @param options - Options for getting a draft post.
3338
+ * @permissionId BLOG.READ_DRAFT
3339
+ * @applicableIdentity APP
3340
+ * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.GetDraftPost
3341
+ */
3342
+ declare function getDraftPost(draftPostId: string, options?: GetDraftPostOptions): Promise<NonNullablePaths<GetDraftPostResponse, {
3343
+ [P in DraftNonNullablePaths]: `draftPost.${P}`;
3344
+ }[DraftNonNullablePaths]>>;
3203
3345
  interface GetDraftPostOptions {
3204
3346
  /**
3205
3347
  * List of additional draft post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
@@ -3209,6 +3351,21 @@ interface GetDraftPostOptions {
3209
3351
  */
3210
3352
  fieldsets?: FieldWithLiterals[];
3211
3353
  }
3354
+ /**
3355
+ * Updates a draft post.
3356
+ * @param _id - Draft post ID.
3357
+ * @public
3358
+ * @requiredField _id
3359
+ * @requiredField draftPost
3360
+ * @param options - Options for updating a draft post.
3361
+ * @param draftPost - Draft Post info.
3362
+ * @permissionId BLOG.EDIT-DRAFT
3363
+ * @applicableIdentity APP
3364
+ * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.UpdateDraftPost
3365
+ */
3366
+ declare function updateDraftPost(_id: string, draftPost: UpdateDraftPost, options?: UpdateDraftPostOptions): Promise<NonNullablePaths<UpdateDraftPostResponse, {
3367
+ [P in DraftNonNullablePaths]: `draftPost.${P}`;
3368
+ }[DraftNonNullablePaths]>>;
3212
3369
  interface UpdateDraftPost {
3213
3370
  /**
3214
3371
  * Draft post ID.
@@ -3361,6 +3518,20 @@ interface UpdateDraftPostOptions {
3361
3518
  */
3362
3519
  fieldsets?: FieldWithLiterals[];
3363
3520
  }
3521
+ /**
3522
+ * Moves a draft post to the trash bin.
3523
+ * A published post can also be deleted by the `post.id`. See the Posts API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/blog/posts/) | [REST](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/post-object)) for more information about posts.
3524
+ *
3525
+ * To permanently delete a post bypassing the trash bin, set the `permanent` field value to `true`. The post can't be restored after this.
3526
+ * @param draftPostId - Draft post ID.
3527
+ * @public
3528
+ * @requiredField draftPostId
3529
+ * @param options - Options for deleting a draft post.
3530
+ * @permissionId BLOG.DELETE-DRAFT
3531
+ * @applicableIdentity APP
3532
+ * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.DeleteDraftPost
3533
+ */
3534
+ declare function deleteDraftPost(draftPostId: string, options?: DeleteDraftPostOptions): Promise<void>;
3364
3535
  interface DeleteDraftPostOptions {
3365
3536
  /**
3366
3537
  * Whether to bypass the trash bin and delete the post permanently.
@@ -3369,10 +3540,51 @@ interface DeleteDraftPostOptions {
3369
3540
  */
3370
3541
  permanent?: boolean;
3371
3542
  }
3543
+ /**
3544
+ * Permanently deletes a draft post that is currently in the trash bin.
3545
+ *
3546
+ * This action is permanent and can't be reversed.
3547
+ * @param draftPostId - Draft post ID.
3548
+ * @public
3549
+ * @requiredField draftPostId
3550
+ * @permissionId BLOG.DELETE-DRAFT
3551
+ * @applicableIdentity APP
3552
+ * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.RemoveFromTrashBin
3553
+ */
3554
+ declare function removeFromTrashBin(draftPostId: string): Promise<void>;
3555
+ /**
3556
+ * Deletes multiple draft posts.
3557
+ * @param postIds - Post IDs.
3558
+ * @public
3559
+ * @requiredField postIds
3560
+ * @param options - Options for deleting multiple draft posts.
3561
+ * @permissionId BLOG.DELETE-DRAFT
3562
+ * @applicableIdentity APP
3563
+ * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.BulkDeleteDraftPosts
3564
+ */
3565
+ declare function bulkDeleteDraftPosts(postIds: string[], options?: BulkDeleteDraftPostsOptions): Promise<NonNullablePaths<BulkDeleteDraftPostsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
3566
+ [P in DraftNonNullablePaths]: `results.${number}.item.${P}`;
3567
+ }[DraftNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
3372
3568
  interface BulkDeleteDraftPostsOptions {
3373
3569
  /** Should delete bypassing the trash-bin. */
3374
3570
  permanent?: boolean;
3375
3571
  }
3572
+ /**
3573
+ * Retrieves a list of up to 100 draft posts per request.
3574
+ *
3575
+ * List Draft Posts runs with these defaults, which you can override:
3576
+ * - `editedDate` is sorted in descending order.
3577
+ * - `paging.limit` is `50`.
3578
+ * - `paging.offset` is `0`.
3579
+ * @public
3580
+ * @param options - Options for listing multiple draft posts.
3581
+ * @permissionId BLOG.READ_DRAFT
3582
+ * @applicableIdentity APP
3583
+ * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.ListDraftPosts
3584
+ */
3585
+ declare function listDraftPosts(options?: ListDraftPostsOptions): Promise<NonNullablePaths<ListDraftPostsResponse, {
3586
+ [P in DraftNonNullablePaths]: `draftPosts.${number}.${P}`;
3587
+ }[DraftNonNullablePaths] | `metaData.count` | `metaData.offset` | `metaData.total`>>;
3376
3588
  interface ListDraftPostsOptions {
3377
3589
  /**
3378
3590
  * Draft post status filter.
@@ -3404,6 +3616,52 @@ interface ListDraftPostsOptions {
3404
3616
  */
3405
3617
  fieldsets?: FieldWithLiterals[];
3406
3618
  }
3619
+ /**
3620
+ * Retrieves a deleted draft post from the trash bin by the provided ID.
3621
+ * @param draftPostId - Draft post ID.
3622
+ * @public
3623
+ * @requiredField draftPostId
3624
+ * @permissionId BLOG.READ_DRAFT
3625
+ * @applicableIdentity APP
3626
+ * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.GetDeletedDraftPost
3627
+ */
3628
+ declare function getDeletedDraftPost(draftPostId: string): Promise<NonNullablePaths<GetDeletedDraftPostResponse, {
3629
+ [P in DraftNonNullablePaths]: `draftPost.${P}`;
3630
+ }[DraftNonNullablePaths]>>;
3631
+ /**
3632
+ * Restores a deleted draft post from the trash bin by the provided ID.
3633
+ * @param draftPostId - Draft post ID.
3634
+ * @public
3635
+ * @requiredField draftPostId
3636
+ * @permissionId BLOG.EDIT-DRAFT
3637
+ * @applicableIdentity APP
3638
+ * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.RestoreFromTrashBin
3639
+ */
3640
+ declare function restoreFromTrashBin(draftPostId: string): Promise<NonNullablePaths<RestoreFromTrashBinResponse, {
3641
+ [P in DraftNonNullablePaths]: `draftPost.${P}`;
3642
+ }[DraftNonNullablePaths]>>;
3643
+ /**
3644
+ * Creates a query to retrieve a list of up to 100 draft posts.
3645
+ *
3646
+ *
3647
+ * The `queryDraftPosts()` function builds a query to retrieve a list of up to 100 draft posts, and returns a `DraftPostsQueryBuilder` object.
3648
+ *
3649
+ * The returned object contains the query definition, which is typically used to run the query using the `find()` function.
3650
+ *
3651
+ * You can refine the query by chaining `DraftPostsQueryBuilder` functions onto the query. `DraftPostsQueryBuilder` functions enable you to sort, filter, and control the results that `queryDraftPosts()` returns.
3652
+ *
3653
+ * `queryDraftPosts()` runs with these `DraftPostsQueryBuilder` defaults that can be overridden:
3654
+ * - `limit(50)`
3655
+ * - `ascending('_id')`
3656
+ *
3657
+ * The following `DraftPostsQueryBuilder` functions are supported for `queryDraftPosts()`. For a full description of the Draft Posts object, see the object returned for the `items` property in `DraftPostsQueryResult`.
3658
+ * @public
3659
+ * @param options - Options for querying draft posts.
3660
+ * @permissionId BLOG.READ_DRAFT
3661
+ * @applicableIdentity APP
3662
+ * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.QueryDraftPosts
3663
+ */
3664
+ declare function queryDraftPosts(options?: QueryDraftPostsOptions): DraftPostsQueryBuilder;
3407
3665
  interface QueryDraftPostsOptions {
3408
3666
  /**
3409
3667
  * List of additional draft post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
@@ -3475,5 +3733,19 @@ interface DraftPostsQueryBuilder {
3475
3733
  skipTo: (cursor: string) => DraftPostsQueryBuilder;
3476
3734
  find: () => Promise<DraftPostsQueryResult>;
3477
3735
  }
3736
+ /**
3737
+ * Publishes a draft post by ID. This creates a new post ([SDK](https://dev.wix.com/docs/sdk/backend-modules/blog/posts/) | [REST](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/post-object))
3738
+ * with the data from the draft post.
3739
+ *
3740
+ * If the draft post was already published, the published post will be updated with the latest values
3741
+ * from the draft post.
3742
+ * @param draftPostId - Draft post ID.
3743
+ * @public
3744
+ * @requiredField draftPostId
3745
+ * @permissionId BLOG.PUBLISH-POST
3746
+ * @applicableIdentity APP
3747
+ * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.PublishDraftPost
3748
+ */
3749
+ declare function publishDraftPost(draftPostId: string): Promise<NonNullablePaths<PublishDraftPostResponse, `postId`>>;
3478
3750
 
3479
- export { AppType as $, Alignment as A, type BulkCreateDraftPostsOptions as B, type CreateDraftPostOptions as C, type DraftPost as D, ThumbnailsAlignment as E, GIFType as F, type GetDraftPostOptions as G, Position as H, ViewRole as I, VoteRole as J, PollLayoutType as K, type ListDeletedDraftPostsOptions as L, MapType as M, NodeType as N, Origin as O, type PublishDraftPostResponse as P, type QueryDraftPostsOptions as Q, type RestoreFromTrashBinResponse as R, Source as S, Target as T, type UpdateDraftPost as U, ViewMode as V, WidthType as W, PollLayoutDirection as X, BackgroundType as Y, DecorationType as Z, FontType as _, type CreateDraftPostResponse as a, type Permissions as a$, InitialExpandedItems as a0, Direction as a1, VerticalAlignment as a2, NullValue as a3, Status as a4, ModerationStatusStatus as a5, TotalDraftPostsGroupingField as a6, WebhookIdentityType as a7, Type as a8, Field as a9, type FileSource as aA, type FileSourceDataOneOf as aB, type PDFSettings as aC, type GalleryData as aD, type V1Media as aE, type Image as aF, type Video as aG, type Item as aH, type ItemDataOneOf as aI, type GalleryOptions as aJ, type Layout as aK, type ItemStyle as aL, type Thumbnails as aM, type GIFData as aN, type GIF as aO, type HeadingData as aP, type HTMLData as aQ, type HTMLDataDataOneOf as aR, type ImageData as aS, type StylesBorder as aT, type ImageDataStyles as aU, type LinkPreviewData as aV, type LinkPreviewDataStyles as aW, type MapData as aX, type MapSettings as aY, type ParagraphData as aZ, type PollData as a_, Action as aa, GetDraftPostsSort as ab, SortOrder as ac, type CoverMedia as ad, type CoverMediaMediaOneOf as ae, type FocalPoint as af, type RichContent as ag, type Node as ah, type NodeDataOneOf as ai, type NodeStyle as aj, type ButtonData as ak, type Border as al, type Colors as am, type PluginContainerData as an, type PluginContainerDataWidth as ao, type PluginContainerDataWidthDataOneOf as ap, type Spoiler as aq, type Height as ar, type Styles as as, type Link as at, type LinkDataOneOf as au, type Rel as av, type CodeBlockData as aw, type TextStyle as ax, type DividerData as ay, type FileData as az, type BulkCreateDraftPostsResponse as b, type DomainEvent as b$, type Option as b0, type PollSettings as b1, type PollLayout as b2, type OptionLayout as b3, type Gradient as b4, type Background as b5, type BackgroundBackgroundOneOf as b6, type PollDesign as b7, type OptionDesign as b8, type Poll as b9, type AudioData as bA, type OrderedListData as bB, type BulletedListData as bC, type BlockquoteData as bD, type CaptionData as bE, type LayoutCellData as bF, type Metadata as bG, type DocumentStyle as bH, type TextNodeStyle as bI, type ModerationDetails as bJ, type SeoSchema as bK, type Keyword as bL, type Tag as bM, type Settings as bN, type Media as bO, type MediaMediaOneOf as bP, type WixMedia as bQ, type VideoResolution as bR, type EmbedMedia as bS, type EmbedThumbnail as bT, type EmbedVideo as bU, type DraftPostTranslation as bV, type DraftCategoriesUpdated as bW, type DraftTagsUpdated as bX, type GetDraftPostTotalsRequest as bY, type GetDraftPostTotalsResponse as bZ, type TotalDraftPosts as b_, type PollDataLayout as ba, type Design as bb, type TextData as bc, type Decoration as bd, type DecorationDataOneOf as be, type AnchorData as bf, type ColorData as bg, type LinkData as bh, type MentionData as bi, type FontSizeData as bj, type SpoilerData as bk, type AppEmbedData as bl, type AppEmbedDataAppDataOneOf as bm, type BookingData as bn, type EventData as bo, type VideoData as bp, type PlaybackOptions as bq, type EmbedData as br, type Oembed as bs, type CollapsibleListData as bt, type TableData as bu, type Dimensions as bv, type TableCellData as bw, type CellStyle as bx, type BorderColors as by, type ListValue as bz, type BulkUpdateDraftPostsOptions as c, type BulkRevertToUnpublishedResponse as c$, type DomainEventBodyOneOf as c0, type EntityCreatedEvent as c1, type RestoreInfo as c2, type EntityUpdatedEvent as c3, type EntityDeletedEvent as c4, type ActionEvent as c5, type MessageEnvelope as c6, type IdentificationData as c7, type IdentificationDataIdOneOf as c8, type InitialDraftPostsCopied as c9, type RestoreFromTrashBinRequest as cA, type QueryDraftPostsRequest as cB, type Sorting as cC, type PlatformQuery as cD, type PlatformQueryPagingMethodOneOf as cE, type Paging as cF, type CursorPaging as cG, type QueryDraftPostsResponse as cH, type PublishDraftPostRequest as cI, type UnpublishPostRequest as cJ, type UnpublishPostResponse as cK, type TranslateCategoryRequest as cL, type TranslateCategoryResponse as cM, type Category as cN, type CategoryTranslation as cO, type TranslateDraftRequest as cP, type TranslateDraftResponse as cQ, type IsDraftPostAutoTranslatableRequest as cR, type IsDraftPostAutoTranslatableResponse as cS, type UpdateDraftPostLanguageRequest as cT, type UpdateDraftPostLanguageResponse as cU, type BulkUpdateDraftPostLanguageRequest as cV, type BulkUpdateDraftPostLanguageResponse as cW, type GetPostAmountsByLanguageRequest as cX, type GetPostAmountsByLanguageResponse as cY, type PostAmountByLanguage as cZ, type BulkRevertToUnpublishedRequest as c_, type CreateDraftPostRequest as ca, type BulkCreateDraftPostsRequest as cb, type BulkDraftPostResult as cc, type ItemMetadata as cd, type ApplicationError as ce, type BulkActionMetadata as cf, type BulkUpdateDraftPostsRequest as cg, type MaskedDraftPosts as ch, type DraftPostOwnerChanged as ci, type ListDeletedDraftPostsRequest as cj, type BlogPaging as ck, type MetaData as cl, type PagingMetadataV2 as cm, type Cursors as cn, type GetDraftPostRequest as co, type UpdateDraftPostContentRequest as cp, type UpdateDraftPostContentRequestDraftContentOneOf as cq, type UpdateDraftPostContentResponse as cr, type UpdateDraftPostRequest as cs, type DeleteDraftPostRequest as ct, type DeleteDraftPostResponse as cu, type RemoveFromTrashBinRequest as cv, type RemoveFromTrashBinResponse as cw, type BulkDeleteDraftPostsRequest as cx, type ListDraftPostsRequest as cy, type GetDeletedDraftPostRequest as cz, type BulkUpdateDraftPostsResponse as d, type BulkRejectDraftPostRequest as d0, type BulkRejectDraftPostResponse as d1, type RevertToUnpublishedRequest as d2, type RevertToUnpublishedResponse as d3, type RejectDraftPostRequest as d4, type RejectDraftPostResponse as d5, type ApproveDraftPostRequest as d6, type ApproveDraftPostResponse as d7, type MarkPostAsInModerationRequest as d8, type MarkPostAsInModerationResponse as d9, type BaseEventMetadata as da, type EventMetadata as db, type DraftPostsQueryResult as dc, type ListDeletedDraftPostsResponse as e, type GetDraftPostResponse as f, type UpdateDraftPostOptions as g, type UpdateDraftPostResponse as h, type DeleteDraftPostOptions as i, type BulkDeleteDraftPostsOptions as j, type BulkDeleteDraftPostsResponse as k, type ListDraftPostsOptions as l, type ListDraftPostsResponse as m, type GetDeletedDraftPostResponse as n, type DraftPostsQueryBuilder as o, type DraftCreatedEnvelope as p, type DraftDeletedEnvelope as q, type DraftUpdatedEnvelope as r, PluginContainerDataAlignment as s, ButtonDataType as t, TextAlignment as u, LineStyle as v, Width as w, LayoutType as x, Orientation as y, Crop as z };
3751
+ export { Action, type ActionEvent, type ActionWithLiterals, Alignment, type AlignmentWithLiterals, type AnchorData, type AppEmbedData, type AppEmbedDataAppDataOneOf, AppType, type AppTypeWithLiterals, type ApplicationError, type ApproveDraftPostRequest, type ApproveDraftPostResponse, type AudioData, type Background, type BackgroundBackgroundOneOf, BackgroundType, type BackgroundTypeWithLiterals, type BaseEventMetadata, type BlockquoteData, type BlogPaging, type BookingData, type Border, type BorderColors, type BulkActionMetadata, type BulkCreateDraftPostsOptions, type BulkCreateDraftPostsRequest, type BulkCreateDraftPostsResponse, type BulkDeleteDraftPostsOptions, type BulkDeleteDraftPostsRequest, type BulkDeleteDraftPostsResponse, type BulkDraftPostResult, type BulkRejectDraftPostRequest, type BulkRejectDraftPostResponse, type BulkRevertToUnpublishedRequest, type BulkRevertToUnpublishedResponse, type BulkUpdateDraftPostLanguageRequest, type BulkUpdateDraftPostLanguageResponse, type BulkUpdateDraftPostsOptions, type BulkUpdateDraftPostsRequest, type BulkUpdateDraftPostsResponse, type BulletedListData, type ButtonData, ButtonDataType, type ButtonDataTypeWithLiterals, type CaptionData, type Category, type CategoryTranslation, type CellStyle, type CodeBlockData, type CollapsibleListData, type ColorData, type Colors, type CoverMedia, type CoverMediaMediaOneOf, type CreateDraftPostOptions, type CreateDraftPostRequest, type CreateDraftPostResponse, Crop, type CropWithLiterals, type CursorPaging, type Cursors, type Decoration, type DecorationDataOneOf, DecorationType, type DecorationTypeWithLiterals, type DeleteDraftPostOptions, type DeleteDraftPostRequest, type DeleteDraftPostResponse, type Design, type Dimensions, Direction, type DirectionWithLiterals, type DividerData, type DocumentStyle, type DomainEvent, type DomainEventBodyOneOf, type DraftCategoriesUpdated, type DraftCreatedEnvelope, type DraftDeletedEnvelope, type DraftPost, type DraftPostOwnerChanged, type DraftPostTranslation, type DraftPostsQueryBuilder, type DraftPostsQueryResult, type DraftTagsUpdated, type DraftUpdatedEnvelope, type EmbedData, type EmbedMedia, type EmbedThumbnail, type EmbedVideo, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventData, type EventMetadata, Field, type FieldWithLiterals, type FileData, type FileSource, type FileSourceDataOneOf, type FocalPoint, type FontSizeData, FontType, type FontTypeWithLiterals, type GIF, type GIFData, GIFType, type GIFTypeWithLiterals, type GalleryData, type GalleryOptions, type GetDeletedDraftPostRequest, type GetDeletedDraftPostResponse, type GetDraftPostOptions, type GetDraftPostRequest, type GetDraftPostResponse, type GetDraftPostTotalsRequest, type GetDraftPostTotalsResponse, GetDraftPostsSort, type GetDraftPostsSortWithLiterals, type GetPostAmountsByLanguageRequest, type GetPostAmountsByLanguageResponse, type Gradient, type HTMLData, type HTMLDataDataOneOf, type HeadingData, type Height, type IdentificationData, type IdentificationDataIdOneOf, type Image, type ImageData, type ImageDataStyles, type InitialDraftPostsCopied, InitialExpandedItems, type InitialExpandedItemsWithLiterals, type IsDraftPostAutoTranslatableRequest, type IsDraftPostAutoTranslatableResponse, type Item, type ItemDataOneOf, type ItemMetadata, type ItemStyle, type Keyword, type Layout, type LayoutCellData, LayoutType, type LayoutTypeWithLiterals, LineStyle, type LineStyleWithLiterals, type Link, type LinkData, type LinkDataOneOf, type LinkPreviewData, type LinkPreviewDataStyles, type ListDeletedDraftPostsOptions, type ListDeletedDraftPostsRequest, type ListDeletedDraftPostsResponse, type ListDraftPostsOptions, type ListDraftPostsRequest, type ListDraftPostsResponse, type ListValue, type MapData, type MapSettings, MapType, type MapTypeWithLiterals, type MarkPostAsInModerationRequest, type MarkPostAsInModerationResponse, type MaskedDraftPosts, type Media, type MediaMediaOneOf, type MentionData, type MessageEnvelope, type MetaData, type Metadata, type ModerationDetails, ModerationStatusStatus, type ModerationStatusStatusWithLiterals, type Node, type NodeDataOneOf, type NodeStyle, NodeType, type NodeTypeWithLiterals, NullValue, type NullValueWithLiterals, type Oembed, type Option, type OptionDesign, type OptionLayout, type OrderedListData, Orientation, type OrientationWithLiterals, Origin, type OriginWithLiterals, type PDFSettings, type Paging, type PagingMetadataV2, type ParagraphData, type Permissions, type PlatformQuery, type PlatformQueryPagingMethodOneOf, type PlaybackOptions, type PluginContainerData, PluginContainerDataAlignment, type PluginContainerDataAlignmentWithLiterals, type PluginContainerDataWidth, type PluginContainerDataWidthDataOneOf, type Poll, type PollData, type PollDataLayout, type PollDesign, type PollLayout, PollLayoutDirection, type PollLayoutDirectionWithLiterals, PollLayoutType, type PollLayoutTypeWithLiterals, type PollSettings, Position, type PositionWithLiterals, type PostAmountByLanguage, type PublishDraftPostRequest, type PublishDraftPostResponse, type QueryDraftPostsOptions, type QueryDraftPostsRequest, type QueryDraftPostsResponse, type RejectDraftPostRequest, type RejectDraftPostResponse, type Rel, type RemoveFromTrashBinRequest, type RemoveFromTrashBinResponse, type RestoreFromTrashBinRequest, type RestoreFromTrashBinResponse, type RestoreInfo, type RevertToUnpublishedRequest, type RevertToUnpublishedResponse, type RichContent, type SeoSchema, type Settings, SortOrder, type SortOrderWithLiterals, type Sorting, Source, type SourceWithLiterals, type Spoiler, type SpoilerData, Status, type StatusWithLiterals, type Styles, type StylesBorder, type TableCellData, type TableData, type Tag, Target, type TargetWithLiterals, TextAlignment, type TextAlignmentWithLiterals, type TextData, type TextNodeStyle, type TextStyle, type Thumbnails, ThumbnailsAlignment, type ThumbnailsAlignmentWithLiterals, type TotalDraftPosts, TotalDraftPostsGroupingField, type TotalDraftPostsGroupingFieldWithLiterals, type TranslateCategoryRequest, type TranslateCategoryResponse, type TranslateDraftRequest, type TranslateDraftResponse, Type, type TypeWithLiterals, type UnpublishPostRequest, type UnpublishPostResponse, type UpdateDraftPost, type UpdateDraftPostContentRequest, type UpdateDraftPostContentResponse, type UpdateDraftPostLanguageRequest, type UpdateDraftPostLanguageResponse, type UpdateDraftPostOptions, type UpdateDraftPostRequest, type UpdateDraftPostResponse, type V1Media, VerticalAlignment, type VerticalAlignmentWithLiterals, type Video, type VideoData, type VideoResolution, ViewMode, type ViewModeWithLiterals, ViewRole, type ViewRoleWithLiterals, VoteRole, type VoteRoleWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, Width, WidthType, type WidthTypeWithLiterals, type WidthWithLiterals, type WixMedia, bulkCreateDraftPosts, bulkDeleteDraftPosts, bulkUpdateDraftPosts, createDraftPost, deleteDraftPost, getDeletedDraftPost, getDraftPost, listDeletedDraftPosts, listDraftPosts, onDraftCreated, onDraftDeleted, onDraftUpdated, publishDraftPost, queryDraftPosts, removeFromTrashBin, restoreFromTrashBin, updateDraftPost };