@wix/auto_sdk_blog_draft-posts 1.0.127 → 1.0.129

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.
@@ -7,6 +7,16 @@ interface CreateDraftPostSignature {
7
7
  /**
8
8
  * Creates a draft post.
9
9
  *
10
+ * The `title` is optional. A missing, empty or whitespace-only title creates an untitled draft post,
11
+ * which is returned with an empty `title`. An untitled draft post can't be published or scheduled,
12
+ * so creating it with `publish` set to `true` fails with the `POST_TITLE_REQUIRED` application error.
13
+ *
14
+ * The response includes `richContent` only when `fieldsets` contains `RICH_CONTENT`. The content is saved either way,
15
+ * so a response without `richContent` doesn't mean the content wasn't saved.
16
+ *
17
+ * Each successful call creates a new draft post, even when a draft post with the same title and content already exists.
18
+ * To read a draft post that you created, call Get Draft Post with its `id` instead of creating it again.
19
+ *
10
20
  * For 3rd-party apps, `memberId` is a required field.
11
21
  *
12
22
  * In `categoryIds`, only categories that already exist will be added to the draft post. Including
@@ -17,21 +27,27 @@ interface CreateDraftPostSignature {
17
27
  * @param - Draft post to create.
18
28
  * @param - Options for creating a draft post.
19
29
  */
20
- (draftPost: NonNullablePaths<DraftPost, `title`, 0>, options?: CreateDraftPostOptions): Promise<NonNullablePaths<CreateDraftPostResponse, `draftPost._id` | `draftPost.title` | `draftPost.categoryIds` | `draftPost.hashtags` | `draftPost.minutesToRead` | `draftPost.tagIds` | `draftPost.relatedPostIds` | `draftPost.pricingPlanIds` | `draftPost.status` | `draftPost.moderationDetails.submittedBy` | `draftPost.moderationDetails.status` | `draftPost.hasUnpublishedChanges` | `draftPost.seoData.tags` | `draftPost.seoData.tags.${number}.type` | `draftPost.seoData.tags.${number}.children` | `draftPost.seoData.tags.${number}.custom` | `draftPost.seoData.tags.${number}.disabled` | `draftPost.seoData.settings.preventAutoRedirect` | `draftPost.seoData.settings.keywords` | `draftPost.seoData.settings.keywords.${number}.term` | `draftPost.seoData.settings.keywords.${number}.isMain` | `draftPost.media.embedMedia.thumbnail.url` | `draftPost.media.embedMedia.thumbnail.width` | `draftPost.media.embedMedia.thumbnail.height` | `draftPost.media.embedMedia.video.url` | `draftPost.media.embedMedia.video.width` | `draftPost.media.embedMedia.video.height` | `draftPost.media.displayed` | `draftPost.media.custom`, 5>>;
30
+ (draftPost: DraftPost, options?: CreateDraftPostOptions): Promise<NonNullablePaths<CreateDraftPostResponse, `draftPost._id` | `draftPost.title` | `draftPost.categoryIds` | `draftPost.hashtags` | `draftPost.minutesToRead` | `draftPost.tagIds` | `draftPost.relatedPostIds` | `draftPost.pricingPlanIds` | `draftPost.status` | `draftPost.moderationDetails.submittedBy` | `draftPost.moderationDetails.status` | `draftPost.hasUnpublishedChanges` | `draftPost.seoData.tags` | `draftPost.seoData.tags.${number}.type` | `draftPost.seoData.tags.${number}.children` | `draftPost.seoData.tags.${number}.custom` | `draftPost.seoData.tags.${number}.disabled` | `draftPost.seoData.settings.preventAutoRedirect` | `draftPost.seoData.settings.keywords` | `draftPost.seoData.settings.keywords.${number}.term` | `draftPost.seoData.settings.keywords.${number}.isMain` | `draftPost.media.embedMedia.thumbnail.url` | `draftPost.media.embedMedia.thumbnail.width` | `draftPost.media.embedMedia.thumbnail.height` | `draftPost.media.embedMedia.video.url` | `draftPost.media.embedMedia.video.width` | `draftPost.media.embedMedia.video.height` | `draftPost.media.displayed` | `draftPost.media.custom`, 5>>;
21
31
  }
22
32
  declare function bulkCreateDraftPosts$1(httpClient: HttpClient): BulkCreateDraftPostsSignature;
23
33
  interface BulkCreateDraftPostsSignature {
24
34
  /**
25
35
  * Creates multiple draft posts.
36
+ *
37
+ * The `title` of each draft post is optional, as in Create Draft Post. When `publish` is `true` and any
38
+ * draft post has no title, the whole request fails with the `POST_TITLE_REQUIRED` application error.
26
39
  * @param - Draft posts to create.
27
40
  * @param - Options for creating multiple draft posts.
28
41
  */
29
- (draftPosts: NonNullablePaths<DraftPost, `title`, 0>[], options?: BulkCreateDraftPostsOptions): Promise<NonNullablePaths<BulkCreateDraftPostsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item._id` | `results.${number}.item.title` | `results.${number}.item.minutesToRead` | `results.${number}.item.status` | `results.${number}.item.moderationDetails.submittedBy` | `results.${number}.item.moderationDetails.status` | `results.${number}.item.hasUnpublishedChanges` | `results.${number}.item.media.displayed` | `results.${number}.item.media.custom` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
42
+ (draftPosts: DraftPost[], options?: BulkCreateDraftPostsOptions): Promise<NonNullablePaths<BulkCreateDraftPostsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item._id` | `results.${number}.item.title` | `results.${number}.item.minutesToRead` | `results.${number}.item.status` | `results.${number}.item.moderationDetails.submittedBy` | `results.${number}.item.moderationDetails.status` | `results.${number}.item.hasUnpublishedChanges` | `results.${number}.item.media.displayed` | `results.${number}.item.media.custom` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
30
43
  }
31
44
  declare function bulkUpdateDraftPosts$1(httpClient: HttpClient): BulkUpdateDraftPostsSignature;
32
45
  interface BulkUpdateDraftPostsSignature {
33
46
  /**
34
47
  * Updates multiple draft posts.
48
+ *
49
+ * An item fails with the `POST_TITLE_REQUIRED` application error when it would publish or schedule a draft post
50
+ * without a title, or clear the title of a scheduled draft post.
35
51
  * @param - Options for updating multiple draft posts.
36
52
  */
37
53
  (options?: NonNullablePaths<BulkUpdateDraftPostsOptions, `draftPosts.${number}.draftPost` | `draftPosts.${number}.draftPost._id`, 3>): Promise<NonNullablePaths<BulkUpdateDraftPostsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item._id` | `results.${number}.item.title` | `results.${number}.item.minutesToRead` | `results.${number}.item.status` | `results.${number}.item.moderationDetails.submittedBy` | `results.${number}.item.moderationDetails.status` | `results.${number}.item.hasUnpublishedChanges` | `results.${number}.item.media.displayed` | `results.${number}.item.media.custom` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
@@ -62,6 +78,16 @@ declare function updateDraftPost$1(httpClient: HttpClient): UpdateDraftPostSigna
62
78
  interface UpdateDraftPostSignature {
63
79
  /**
64
80
  * Updates a draft post.
81
+ *
82
+ * If the post is already published, the default `UPDATE` action changes only the draft post. The published post
83
+ * stays as it was until the draft post is published. To apply the changes to the published post, set `action` to
84
+ * `UPDATE_PUBLISH`, which updates and publishes in one call, or call Publish Draft Post afterward.
85
+ *
86
+ * An empty or whitespace-only `title` clears the title. Fails with the `POST_TITLE_REQUIRED` application error
87
+ * when `action` is `UPDATE_PUBLISH`, `UPDATE_SCHEDULE` or `UPDATE_PUBLICATION` and the draft post has no title,
88
+ * or when the update clears the title of a scheduled draft post.
89
+ * With `action` set to `UPDATE`, clearing the title of a published post's draft succeeds: the published post
90
+ * keeps its title, and only publishing the untitled draft post fails.
65
91
  * @param - Draft post ID.
66
92
  * @param - Options for updating a draft post.
67
93
  * @param - Draft Post info.
@@ -136,6 +162,8 @@ interface PublishDraftPostSignature {
136
162
  *
137
163
  * If the draft post was already published, the published post will be updated with the latest values
138
164
  * from the draft post.
165
+ *
166
+ * Fails with the `POST_TITLE_REQUIRED` application error when the draft post has no title.
139
167
  * @param - Draft post ID.
140
168
  */
141
169
  (draftPostId: string): Promise<NonNullablePaths<PublishDraftPostResponse, `postId`, 0>>;
@@ -3798,7 +3798,11 @@ declare enum Field {
3798
3798
  * @internal
3799
3799
  */
3800
3800
  INTERNAL_ID = "INTERNAL_ID",
3801
- /** Includes content field. */
3801
+ /**
3802
+ * Includes content field.
3803
+ * Reserved for internal use. Use `RICH_CONTENT` instead.
3804
+ * @internal
3805
+ */
3802
3806
  CONTENT = "CONTENT",
3803
3807
  /** Includes rich content field. */
3804
3808
  RICH_CONTENT = "RICH_CONTENT",
@@ -3811,7 +3815,7 @@ declare enum Field {
3811
3815
  GENERATED_EXCERPT = "GENERATED_EXCERPT"
3812
3816
  }
3813
3817
  /** @enumType */
3814
- type FieldWithLiterals = Field | 'UNKNOWN' | 'URL' | 'CONTENT' | 'RICH_CONTENT' | 'GENERATED_EXCERPT';
3818
+ type FieldWithLiterals = Field | 'UNKNOWN' | 'URL' | 'RICH_CONTENT' | 'GENERATED_EXCERPT';
3815
3819
  interface CreateDraftPostResponse {
3816
3820
  /** Created draft post info. */
3817
3821
  draftPost?: DraftPost;
@@ -3915,9 +3919,12 @@ interface MaskedDraftPosts {
3915
3919
  fieldMask?: string[];
3916
3920
  }
3917
3921
  declare enum Action {
3918
- /** Update the draft post. */
3922
+ /** Update the draft post. If the post is already published, the published post isn't changed. */
3919
3923
  UPDATE = "UPDATE",
3920
- /** Update and publish a draft post. */
3924
+ /**
3925
+ * Update and publish a draft post. If the post is already published, the published post is updated
3926
+ * with the draft post's values in the same call.
3927
+ */
3921
3928
  UPDATE_PUBLISH = "UPDATE_PUBLISH",
3922
3929
  /** Update the draft post and schedule a publish date. */
3923
3930
  UPDATE_SCHEDULE = "UPDATE_SCHEDULE",
@@ -3927,7 +3934,7 @@ declare enum Action {
3927
3934
  UPDATE_CANCEL_SCHEDULE = "UPDATE_CANCEL_SCHEDULE",
3928
3935
  /** Update and reject draft post. */
3929
3936
  UPDATE_REJECT = "UPDATE_REJECT",
3930
- /** Update a post that's already been published. This creates and updates a draft version of the post. The original post is still published. */
3937
+ /** Update a post that's already been published. The changes are saved to the draft post and applied to the published post. */
3931
3938
  UPDATE_PUBLICATION = "UPDATE_PUBLICATION"
3932
3939
  }
3933
3940
  /** @enumType */
@@ -4562,7 +4569,6 @@ interface TranslateDraftRequest {
4562
4569
  * Predefined sets of fields to return in the created draft post, in addition to the core draft post fields.
4563
4570
  *
4564
4571
  * - `URL`: Returns the draft post's preview URL.
4565
- * - `CONTENT`: Returns the draft post's content.
4566
4572
  * - `RICH_CONTENT`: Returns the draft post's rich content.
4567
4573
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4568
4574
  *
@@ -4625,7 +4631,6 @@ interface UpdateDraftPostLanguageRequest {
4625
4631
  * Predefined sets of fields to return in the updated draft post, in addition to the core draft post fields.
4626
4632
  *
4627
4633
  * - `URL`: Returns the draft post's preview URL.
4628
- * - `CONTENT`: Returns the draft post's content.
4629
4634
  * - `RICH_CONTENT`: Returns the draft post's rich content.
4630
4635
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4631
4636
  *
@@ -4768,6 +4773,16 @@ declare function onDraftUpdated(handler: (event: DraftUpdatedEnvelope) => void |
4768
4773
  /**
4769
4774
  * Creates a draft post.
4770
4775
  *
4776
+ * The `title` is optional. A missing, empty or whitespace-only title creates an untitled draft post,
4777
+ * which is returned with an empty `title`. An untitled draft post can't be published or scheduled,
4778
+ * so creating it with `publish` set to `true` fails with the `POST_TITLE_REQUIRED` application error.
4779
+ *
4780
+ * The response includes `richContent` only when `fieldsets` contains `RICH_CONTENT`. The content is saved either way,
4781
+ * so a response without `richContent` doesn't mean the content wasn't saved.
4782
+ *
4783
+ * Each successful call creates a new draft post, even when a draft post with the same title and content already exists.
4784
+ * To read a draft post that you created, call Get Draft Post with its `id` instead of creating it again.
4785
+ *
4771
4786
  * For 3rd-party apps, `memberId` is a required field.
4772
4787
  *
4773
4788
  * In `categoryIds`, only categories that already exist will be added to the draft post. Including
@@ -4778,13 +4793,12 @@ declare function onDraftUpdated(handler: (event: DraftUpdatedEnvelope) => void |
4778
4793
  * @param draftPost - Draft post to create.
4779
4794
  * @public
4780
4795
  * @requiredField draftPost
4781
- * @requiredField draftPost.title
4782
4796
  * @param options - Options for creating a draft post.
4783
4797
  * @permissionId BLOG.CREATE-DRAFT
4784
4798
  * @applicableIdentity APP
4785
4799
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.CreateDraftPost
4786
4800
  */
4787
- declare function createDraftPost(draftPost: NonNullablePaths<DraftPost, `title`, 0>, options?: CreateDraftPostOptions): Promise<NonNullablePaths<CreateDraftPostResponse, `draftPost._id` | `draftPost.title` | `draftPost.categoryIds` | `draftPost.hashtags` | `draftPost.minutesToRead` | `draftPost.tagIds` | `draftPost.relatedPostIds` | `draftPost.pricingPlanIds` | `draftPost.status` | `draftPost.moderationDetails.submittedBy` | `draftPost.moderationDetails.status` | `draftPost.hasUnpublishedChanges` | `draftPost.seoData.tags` | `draftPost.seoData.tags.${number}.type` | `draftPost.seoData.tags.${number}.children` | `draftPost.seoData.tags.${number}.custom` | `draftPost.seoData.tags.${number}.disabled` | `draftPost.seoData.settings.preventAutoRedirect` | `draftPost.seoData.settings.keywords` | `draftPost.seoData.settings.keywords.${number}.term` | `draftPost.seoData.settings.keywords.${number}.isMain` | `draftPost.media.embedMedia.thumbnail.url` | `draftPost.media.embedMedia.thumbnail.width` | `draftPost.media.embedMedia.thumbnail.height` | `draftPost.media.embedMedia.video.url` | `draftPost.media.embedMedia.video.width` | `draftPost.media.embedMedia.video.height` | `draftPost.media.displayed` | `draftPost.media.custom`, 5>>;
4801
+ declare function createDraftPost(draftPost: DraftPost, options?: CreateDraftPostOptions): Promise<NonNullablePaths<CreateDraftPostResponse, `draftPost._id` | `draftPost.title` | `draftPost.categoryIds` | `draftPost.hashtags` | `draftPost.minutesToRead` | `draftPost.tagIds` | `draftPost.relatedPostIds` | `draftPost.pricingPlanIds` | `draftPost.status` | `draftPost.moderationDetails.submittedBy` | `draftPost.moderationDetails.status` | `draftPost.hasUnpublishedChanges` | `draftPost.seoData.tags` | `draftPost.seoData.tags.${number}.type` | `draftPost.seoData.tags.${number}.children` | `draftPost.seoData.tags.${number}.custom` | `draftPost.seoData.tags.${number}.disabled` | `draftPost.seoData.settings.preventAutoRedirect` | `draftPost.seoData.settings.keywords` | `draftPost.seoData.settings.keywords.${number}.term` | `draftPost.seoData.settings.keywords.${number}.isMain` | `draftPost.media.embedMedia.thumbnail.url` | `draftPost.media.embedMedia.thumbnail.width` | `draftPost.media.embedMedia.thumbnail.height` | `draftPost.media.embedMedia.video.url` | `draftPost.media.embedMedia.video.width` | `draftPost.media.embedMedia.video.height` | `draftPost.media.displayed` | `draftPost.media.custom`, 5>>;
4788
4802
  interface CreateDraftPostOptions {
4789
4803
  /**
4790
4804
  * Whether the draft post should be published on creation.
@@ -4802,16 +4816,18 @@ interface CreateDraftPostOptions {
4802
4816
  }
4803
4817
  /**
4804
4818
  * Creates multiple draft posts.
4819
+ *
4820
+ * The `title` of each draft post is optional, as in Create Draft Post. When `publish` is `true` and any
4821
+ * draft post has no title, the whole request fails with the `POST_TITLE_REQUIRED` application error.
4805
4822
  * @param draftPosts - Draft posts to create.
4806
4823
  * @public
4807
4824
  * @requiredField draftPosts
4808
- * @requiredField draftPosts.title
4809
4825
  * @param options - Options for creating multiple draft posts.
4810
4826
  * @permissionId BLOG.CREATE-DRAFT
4811
4827
  * @applicableIdentity APP
4812
4828
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.BulkCreateDraftPosts
4813
4829
  */
4814
- declare function bulkCreateDraftPosts(draftPosts: NonNullablePaths<DraftPost, `title`, 0>[], options?: BulkCreateDraftPostsOptions): Promise<NonNullablePaths<BulkCreateDraftPostsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item._id` | `results.${number}.item.title` | `results.${number}.item.minutesToRead` | `results.${number}.item.status` | `results.${number}.item.moderationDetails.submittedBy` | `results.${number}.item.moderationDetails.status` | `results.${number}.item.hasUnpublishedChanges` | `results.${number}.item.media.displayed` | `results.${number}.item.media.custom` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
4830
+ declare function bulkCreateDraftPosts(draftPosts: DraftPost[], options?: BulkCreateDraftPostsOptions): Promise<NonNullablePaths<BulkCreateDraftPostsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item._id` | `results.${number}.item.title` | `results.${number}.item.minutesToRead` | `results.${number}.item.status` | `results.${number}.item.moderationDetails.submittedBy` | `results.${number}.item.moderationDetails.status` | `results.${number}.item.hasUnpublishedChanges` | `results.${number}.item.media.displayed` | `results.${number}.item.media.custom` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
4815
4831
  interface BulkCreateDraftPostsOptions {
4816
4832
  /** Whether the draft post should be published after creation. */
4817
4833
  publish?: boolean;
@@ -4827,6 +4843,9 @@ interface BulkCreateDraftPostsOptions {
4827
4843
  }
4828
4844
  /**
4829
4845
  * Updates multiple draft posts.
4846
+ *
4847
+ * An item fails with the `POST_TITLE_REQUIRED` application error when it would publish or schedule a draft post
4848
+ * without a title, or clear the title of a scheduled draft post.
4830
4849
  * @public
4831
4850
  * @requiredField options.draftPosts.draftPost
4832
4851
  * @requiredField options.draftPosts.draftPost._id
@@ -4928,6 +4947,16 @@ interface GetDraftPostOptions {
4928
4947
  }
4929
4948
  /**
4930
4949
  * Updates a draft post.
4950
+ *
4951
+ * If the post is already published, the default `UPDATE` action changes only the draft post. The published post
4952
+ * stays as it was until the draft post is published. To apply the changes to the published post, set `action` to
4953
+ * `UPDATE_PUBLISH`, which updates and publishes in one call, or call Publish Draft Post afterward.
4954
+ *
4955
+ * An empty or whitespace-only `title` clears the title. Fails with the `POST_TITLE_REQUIRED` application error
4956
+ * when `action` is `UPDATE_PUBLISH`, `UPDATE_SCHEDULE` or `UPDATE_PUBLICATION` and the draft post has no title,
4957
+ * or when the update clears the title of a scheduled draft post.
4958
+ * With `action` set to `UPDATE`, clearing the title of a published post's draft succeeds: the published post
4959
+ * keeps its title, and only publishing the untitled draft post fails.
4931
4960
  * @param _id - Draft post ID.
4932
4961
  * @public
4933
4962
  * @requiredField _id
@@ -5513,6 +5542,8 @@ declare const utils: {
5513
5542
  *
5514
5543
  * If the draft post was already published, the published post will be updated with the latest values
5515
5544
  * from the draft post.
5545
+ *
5546
+ * Fails with the `POST_TITLE_REQUIRED` application error when the draft post has no title.
5516
5547
  * @param draftPostId - Draft post ID.
5517
5548
  * @public
5518
5549
  * @requiredField draftPostId
@@ -5559,7 +5590,6 @@ interface TranslateDraftOptions {
5559
5590
  * Predefined sets of fields to return in the created draft post, in addition to the core draft post fields.
5560
5591
  *
5561
5592
  * - `URL`: Returns the draft post's preview URL.
5562
- * - `CONTENT`: Returns the draft post's content.
5563
5593
  * - `RICH_CONTENT`: Returns the draft post's rich content.
5564
5594
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
5565
5595
  *
@@ -5597,7 +5627,6 @@ interface UpdateDraftPostLanguageOptions {
5597
5627
  * Predefined sets of fields to return in the updated draft post, in addition to the core draft post fields.
5598
5628
  *
5599
5629
  * - `URL`: Returns the draft post's preview URL.
5600
- * - `CONTENT`: Returns the draft post's content.
5601
5630
  * - `RICH_CONTENT`: Returns the draft post's rich content.
5602
5631
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
5603
5632
  *
@@ -3958,7 +3958,11 @@ declare enum Field {
3958
3958
  * @internal
3959
3959
  */
3960
3960
  INTERNAL_ID = "INTERNAL_ID",
3961
- /** Includes content field. */
3961
+ /**
3962
+ * Includes content field.
3963
+ * Reserved for internal use. Use `RICH_CONTENT` instead.
3964
+ * @internal
3965
+ */
3962
3966
  CONTENT = "CONTENT",
3963
3967
  /** Includes rich content field. */
3964
3968
  RICH_CONTENT = "RICH_CONTENT",
@@ -3971,7 +3975,7 @@ declare enum Field {
3971
3975
  GENERATED_EXCERPT = "GENERATED_EXCERPT"
3972
3976
  }
3973
3977
  /** @enumType */
3974
- type FieldWithLiterals = Field | 'UNKNOWN' | 'URL' | 'CONTENT' | 'RICH_CONTENT' | 'GENERATED_EXCERPT';
3978
+ type FieldWithLiterals = Field | 'UNKNOWN' | 'URL' | 'RICH_CONTENT' | 'GENERATED_EXCERPT';
3975
3979
  interface CreateDraftPostResponse {
3976
3980
  /** Created draft post info. */
3977
3981
  draftPost?: DraftPost;
@@ -4075,9 +4079,12 @@ interface MaskedDraftPosts {
4075
4079
  fieldMask?: string[];
4076
4080
  }
4077
4081
  declare enum Action {
4078
- /** Update the draft post. */
4082
+ /** Update the draft post. If the post is already published, the published post isn't changed. */
4079
4083
  UPDATE = "UPDATE",
4080
- /** Update and publish a draft post. */
4084
+ /**
4085
+ * Update and publish a draft post. If the post is already published, the published post is updated
4086
+ * with the draft post's values in the same call.
4087
+ */
4081
4088
  UPDATE_PUBLISH = "UPDATE_PUBLISH",
4082
4089
  /** Update the draft post and schedule a publish date. */
4083
4090
  UPDATE_SCHEDULE = "UPDATE_SCHEDULE",
@@ -4087,7 +4094,7 @@ declare enum Action {
4087
4094
  UPDATE_CANCEL_SCHEDULE = "UPDATE_CANCEL_SCHEDULE",
4088
4095
  /** Update and reject draft post. */
4089
4096
  UPDATE_REJECT = "UPDATE_REJECT",
4090
- /** Update a post that's already been published. This creates and updates a draft version of the post. The original post is still published. */
4097
+ /** Update a post that's already been published. The changes are saved to the draft post and applied to the published post. */
4091
4098
  UPDATE_PUBLICATION = "UPDATE_PUBLICATION"
4092
4099
  }
4093
4100
  /** @enumType */
@@ -4722,7 +4729,6 @@ interface TranslateDraftRequest {
4722
4729
  * Predefined sets of fields to return in the created draft post, in addition to the core draft post fields.
4723
4730
  *
4724
4731
  * - `URL`: Returns the draft post's preview URL.
4725
- * - `CONTENT`: Returns the draft post's content.
4726
4732
  * - `RICH_CONTENT`: Returns the draft post's rich content.
4727
4733
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4728
4734
  *
@@ -4785,7 +4791,6 @@ interface UpdateDraftPostLanguageRequest {
4785
4791
  * Predefined sets of fields to return in the updated draft post, in addition to the core draft post fields.
4786
4792
  *
4787
4793
  * - `URL`: Returns the draft post's preview URL.
4788
- * - `CONTENT`: Returns the draft post's content.
4789
4794
  * - `RICH_CONTENT`: Returns the draft post's rich content.
4790
4795
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4791
4796
  *
@@ -7,6 +7,16 @@ interface CreateDraftPostSignature {
7
7
  /**
8
8
  * Creates a draft post.
9
9
  *
10
+ * The `title` is optional. A missing, empty or whitespace-only title creates an untitled draft post,
11
+ * which is returned with an empty `title`. An untitled draft post can't be published or scheduled,
12
+ * so creating it with `publish` set to `true` fails with the `POST_TITLE_REQUIRED` application error.
13
+ *
14
+ * The response includes `richContent` only when `fieldsets` contains `RICH_CONTENT`. The content is saved either way,
15
+ * so a response without `richContent` doesn't mean the content wasn't saved.
16
+ *
17
+ * Each successful call creates a new draft post, even when a draft post with the same title and content already exists.
18
+ * To read a draft post that you created, call Get Draft Post with its `id` instead of creating it again.
19
+ *
10
20
  * For 3rd-party apps, `memberId` is a required field.
11
21
  *
12
22
  * In `categoryIds`, only categories that already exist will be added to the draft post. Including
@@ -17,21 +27,27 @@ interface CreateDraftPostSignature {
17
27
  * @param - Draft post to create.
18
28
  * @param - Options for creating a draft post.
19
29
  */
20
- (draftPost: NonNullablePaths<DraftPost, `title`, 0>, options?: CreateDraftPostOptions): Promise<NonNullablePaths<CreateDraftPostResponse, `draftPost._id` | `draftPost.title` | `draftPost.categoryIds` | `draftPost.hashtags` | `draftPost.minutesToRead` | `draftPost.tagIds` | `draftPost.relatedPostIds` | `draftPost.pricingPlanIds` | `draftPost.status` | `draftPost.moderationDetails.submittedBy` | `draftPost.moderationDetails.status` | `draftPost.hasUnpublishedChanges` | `draftPost.seoData.tags` | `draftPost.seoData.tags.${number}.type` | `draftPost.seoData.tags.${number}.children` | `draftPost.seoData.tags.${number}.custom` | `draftPost.seoData.tags.${number}.disabled` | `draftPost.seoData.settings.preventAutoRedirect` | `draftPost.seoData.settings.keywords` | `draftPost.seoData.settings.keywords.${number}.term` | `draftPost.seoData.settings.keywords.${number}.isMain` | `draftPost.media.embedMedia.thumbnail.url` | `draftPost.media.embedMedia.thumbnail.width` | `draftPost.media.embedMedia.thumbnail.height` | `draftPost.media.embedMedia.video.url` | `draftPost.media.embedMedia.video.width` | `draftPost.media.embedMedia.video.height` | `draftPost.media.displayed` | `draftPost.media.custom`, 5>>;
30
+ (draftPost: DraftPost, options?: CreateDraftPostOptions): Promise<NonNullablePaths<CreateDraftPostResponse, `draftPost._id` | `draftPost.title` | `draftPost.categoryIds` | `draftPost.hashtags` | `draftPost.minutesToRead` | `draftPost.tagIds` | `draftPost.relatedPostIds` | `draftPost.pricingPlanIds` | `draftPost.status` | `draftPost.moderationDetails.submittedBy` | `draftPost.moderationDetails.status` | `draftPost.hasUnpublishedChanges` | `draftPost.seoData.tags` | `draftPost.seoData.tags.${number}.type` | `draftPost.seoData.tags.${number}.children` | `draftPost.seoData.tags.${number}.custom` | `draftPost.seoData.tags.${number}.disabled` | `draftPost.seoData.settings.preventAutoRedirect` | `draftPost.seoData.settings.keywords` | `draftPost.seoData.settings.keywords.${number}.term` | `draftPost.seoData.settings.keywords.${number}.isMain` | `draftPost.media.embedMedia.thumbnail.url` | `draftPost.media.embedMedia.thumbnail.width` | `draftPost.media.embedMedia.thumbnail.height` | `draftPost.media.embedMedia.video.url` | `draftPost.media.embedMedia.video.width` | `draftPost.media.embedMedia.video.height` | `draftPost.media.displayed` | `draftPost.media.custom`, 5>>;
21
31
  }
22
32
  declare function bulkCreateDraftPosts$1(httpClient: HttpClient): BulkCreateDraftPostsSignature;
23
33
  interface BulkCreateDraftPostsSignature {
24
34
  /**
25
35
  * Creates multiple draft posts.
36
+ *
37
+ * The `title` of each draft post is optional, as in Create Draft Post. When `publish` is `true` and any
38
+ * draft post has no title, the whole request fails with the `POST_TITLE_REQUIRED` application error.
26
39
  * @param - Draft posts to create.
27
40
  * @param - Options for creating multiple draft posts.
28
41
  */
29
- (draftPosts: NonNullablePaths<DraftPost, `title`, 0>[], options?: BulkCreateDraftPostsOptions): Promise<NonNullablePaths<BulkCreateDraftPostsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item._id` | `results.${number}.item.title` | `results.${number}.item.minutesToRead` | `results.${number}.item.status` | `results.${number}.item.moderationDetails.submittedBy` | `results.${number}.item.moderationDetails.status` | `results.${number}.item.hasUnpublishedChanges` | `results.${number}.item.media.displayed` | `results.${number}.item.media.custom` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
42
+ (draftPosts: DraftPost[], options?: BulkCreateDraftPostsOptions): Promise<NonNullablePaths<BulkCreateDraftPostsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item._id` | `results.${number}.item.title` | `results.${number}.item.minutesToRead` | `results.${number}.item.status` | `results.${number}.item.moderationDetails.submittedBy` | `results.${number}.item.moderationDetails.status` | `results.${number}.item.hasUnpublishedChanges` | `results.${number}.item.media.displayed` | `results.${number}.item.media.custom` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
30
43
  }
31
44
  declare function bulkUpdateDraftPosts$1(httpClient: HttpClient): BulkUpdateDraftPostsSignature;
32
45
  interface BulkUpdateDraftPostsSignature {
33
46
  /**
34
47
  * Updates multiple draft posts.
48
+ *
49
+ * An item fails with the `POST_TITLE_REQUIRED` application error when it would publish or schedule a draft post
50
+ * without a title, or clear the title of a scheduled draft post.
35
51
  * @param - Options for updating multiple draft posts.
36
52
  */
37
53
  (options?: NonNullablePaths<BulkUpdateDraftPostsOptions, `draftPosts.${number}.draftPost` | `draftPosts.${number}.draftPost._id`, 3>): Promise<NonNullablePaths<BulkUpdateDraftPostsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item._id` | `results.${number}.item.title` | `results.${number}.item.minutesToRead` | `results.${number}.item.status` | `results.${number}.item.moderationDetails.submittedBy` | `results.${number}.item.moderationDetails.status` | `results.${number}.item.hasUnpublishedChanges` | `results.${number}.item.media.displayed` | `results.${number}.item.media.custom` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
@@ -62,6 +78,16 @@ declare function updateDraftPost$1(httpClient: HttpClient): UpdateDraftPostSigna
62
78
  interface UpdateDraftPostSignature {
63
79
  /**
64
80
  * Updates a draft post.
81
+ *
82
+ * If the post is already published, the default `UPDATE` action changes only the draft post. The published post
83
+ * stays as it was until the draft post is published. To apply the changes to the published post, set `action` to
84
+ * `UPDATE_PUBLISH`, which updates and publishes in one call, or call Publish Draft Post afterward.
85
+ *
86
+ * An empty or whitespace-only `title` clears the title. Fails with the `POST_TITLE_REQUIRED` application error
87
+ * when `action` is `UPDATE_PUBLISH`, `UPDATE_SCHEDULE` or `UPDATE_PUBLICATION` and the draft post has no title,
88
+ * or when the update clears the title of a scheduled draft post.
89
+ * With `action` set to `UPDATE`, clearing the title of a published post's draft succeeds: the published post
90
+ * keeps its title, and only publishing the untitled draft post fails.
65
91
  * @param - Draft post ID.
66
92
  * @param - Options for updating a draft post.
67
93
  * @param - Draft Post info.
@@ -136,6 +162,8 @@ interface PublishDraftPostSignature {
136
162
  *
137
163
  * If the draft post was already published, the published post will be updated with the latest values
138
164
  * from the draft post.
165
+ *
166
+ * Fails with the `POST_TITLE_REQUIRED` application error when the draft post has no title.
139
167
  * @param - Draft post ID.
140
168
  */
141
169
  (draftPostId: string): Promise<NonNullablePaths<PublishDraftPostResponse, `postId`, 0>>;
@@ -3798,7 +3798,11 @@ declare enum Field {
3798
3798
  * @internal
3799
3799
  */
3800
3800
  INTERNAL_ID = "INTERNAL_ID",
3801
- /** Includes content field. */
3801
+ /**
3802
+ * Includes content field.
3803
+ * Reserved for internal use. Use `RICH_CONTENT` instead.
3804
+ * @internal
3805
+ */
3802
3806
  CONTENT = "CONTENT",
3803
3807
  /** Includes rich content field. */
3804
3808
  RICH_CONTENT = "RICH_CONTENT",
@@ -3811,7 +3815,7 @@ declare enum Field {
3811
3815
  GENERATED_EXCERPT = "GENERATED_EXCERPT"
3812
3816
  }
3813
3817
  /** @enumType */
3814
- type FieldWithLiterals = Field | 'UNKNOWN' | 'URL' | 'CONTENT' | 'RICH_CONTENT' | 'GENERATED_EXCERPT';
3818
+ type FieldWithLiterals = Field | 'UNKNOWN' | 'URL' | 'RICH_CONTENT' | 'GENERATED_EXCERPT';
3815
3819
  interface CreateDraftPostResponse {
3816
3820
  /** Created draft post info. */
3817
3821
  draftPost?: DraftPost;
@@ -3915,9 +3919,12 @@ interface MaskedDraftPosts {
3915
3919
  fieldMask?: string[];
3916
3920
  }
3917
3921
  declare enum Action {
3918
- /** Update the draft post. */
3922
+ /** Update the draft post. If the post is already published, the published post isn't changed. */
3919
3923
  UPDATE = "UPDATE",
3920
- /** Update and publish a draft post. */
3924
+ /**
3925
+ * Update and publish a draft post. If the post is already published, the published post is updated
3926
+ * with the draft post's values in the same call.
3927
+ */
3921
3928
  UPDATE_PUBLISH = "UPDATE_PUBLISH",
3922
3929
  /** Update the draft post and schedule a publish date. */
3923
3930
  UPDATE_SCHEDULE = "UPDATE_SCHEDULE",
@@ -3927,7 +3934,7 @@ declare enum Action {
3927
3934
  UPDATE_CANCEL_SCHEDULE = "UPDATE_CANCEL_SCHEDULE",
3928
3935
  /** Update and reject draft post. */
3929
3936
  UPDATE_REJECT = "UPDATE_REJECT",
3930
- /** Update a post that's already been published. This creates and updates a draft version of the post. The original post is still published. */
3937
+ /** Update a post that's already been published. The changes are saved to the draft post and applied to the published post. */
3931
3938
  UPDATE_PUBLICATION = "UPDATE_PUBLICATION"
3932
3939
  }
3933
3940
  /** @enumType */
@@ -4562,7 +4569,6 @@ interface TranslateDraftRequest {
4562
4569
  * Predefined sets of fields to return in the created draft post, in addition to the core draft post fields.
4563
4570
  *
4564
4571
  * - `URL`: Returns the draft post's preview URL.
4565
- * - `CONTENT`: Returns the draft post's content.
4566
4572
  * - `RICH_CONTENT`: Returns the draft post's rich content.
4567
4573
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4568
4574
  *
@@ -4625,7 +4631,6 @@ interface UpdateDraftPostLanguageRequest {
4625
4631
  * Predefined sets of fields to return in the updated draft post, in addition to the core draft post fields.
4626
4632
  *
4627
4633
  * - `URL`: Returns the draft post's preview URL.
4628
- * - `CONTENT`: Returns the draft post's content.
4629
4634
  * - `RICH_CONTENT`: Returns the draft post's rich content.
4630
4635
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4631
4636
  *
@@ -4768,6 +4773,16 @@ declare function onDraftUpdated(handler: (event: DraftUpdatedEnvelope) => void |
4768
4773
  /**
4769
4774
  * Creates a draft post.
4770
4775
  *
4776
+ * The `title` is optional. A missing, empty or whitespace-only title creates an untitled draft post,
4777
+ * which is returned with an empty `title`. An untitled draft post can't be published or scheduled,
4778
+ * so creating it with `publish` set to `true` fails with the `POST_TITLE_REQUIRED` application error.
4779
+ *
4780
+ * The response includes `richContent` only when `fieldsets` contains `RICH_CONTENT`. The content is saved either way,
4781
+ * so a response without `richContent` doesn't mean the content wasn't saved.
4782
+ *
4783
+ * Each successful call creates a new draft post, even when a draft post with the same title and content already exists.
4784
+ * To read a draft post that you created, call Get Draft Post with its `id` instead of creating it again.
4785
+ *
4771
4786
  * For 3rd-party apps, `memberId` is a required field.
4772
4787
  *
4773
4788
  * In `categoryIds`, only categories that already exist will be added to the draft post. Including
@@ -4778,13 +4793,12 @@ declare function onDraftUpdated(handler: (event: DraftUpdatedEnvelope) => void |
4778
4793
  * @param draftPost - Draft post to create.
4779
4794
  * @public
4780
4795
  * @requiredField draftPost
4781
- * @requiredField draftPost.title
4782
4796
  * @param options - Options for creating a draft post.
4783
4797
  * @permissionId BLOG.CREATE-DRAFT
4784
4798
  * @applicableIdentity APP
4785
4799
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.CreateDraftPost
4786
4800
  */
4787
- declare function createDraftPost(draftPost: NonNullablePaths<DraftPost, `title`, 0>, options?: CreateDraftPostOptions): Promise<NonNullablePaths<CreateDraftPostResponse, `draftPost._id` | `draftPost.title` | `draftPost.categoryIds` | `draftPost.hashtags` | `draftPost.minutesToRead` | `draftPost.tagIds` | `draftPost.relatedPostIds` | `draftPost.pricingPlanIds` | `draftPost.status` | `draftPost.moderationDetails.submittedBy` | `draftPost.moderationDetails.status` | `draftPost.hasUnpublishedChanges` | `draftPost.seoData.tags` | `draftPost.seoData.tags.${number}.type` | `draftPost.seoData.tags.${number}.children` | `draftPost.seoData.tags.${number}.custom` | `draftPost.seoData.tags.${number}.disabled` | `draftPost.seoData.settings.preventAutoRedirect` | `draftPost.seoData.settings.keywords` | `draftPost.seoData.settings.keywords.${number}.term` | `draftPost.seoData.settings.keywords.${number}.isMain` | `draftPost.media.embedMedia.thumbnail.url` | `draftPost.media.embedMedia.thumbnail.width` | `draftPost.media.embedMedia.thumbnail.height` | `draftPost.media.embedMedia.video.url` | `draftPost.media.embedMedia.video.width` | `draftPost.media.embedMedia.video.height` | `draftPost.media.displayed` | `draftPost.media.custom`, 5>>;
4801
+ declare function createDraftPost(draftPost: DraftPost, options?: CreateDraftPostOptions): Promise<NonNullablePaths<CreateDraftPostResponse, `draftPost._id` | `draftPost.title` | `draftPost.categoryIds` | `draftPost.hashtags` | `draftPost.minutesToRead` | `draftPost.tagIds` | `draftPost.relatedPostIds` | `draftPost.pricingPlanIds` | `draftPost.status` | `draftPost.moderationDetails.submittedBy` | `draftPost.moderationDetails.status` | `draftPost.hasUnpublishedChanges` | `draftPost.seoData.tags` | `draftPost.seoData.tags.${number}.type` | `draftPost.seoData.tags.${number}.children` | `draftPost.seoData.tags.${number}.custom` | `draftPost.seoData.tags.${number}.disabled` | `draftPost.seoData.settings.preventAutoRedirect` | `draftPost.seoData.settings.keywords` | `draftPost.seoData.settings.keywords.${number}.term` | `draftPost.seoData.settings.keywords.${number}.isMain` | `draftPost.media.embedMedia.thumbnail.url` | `draftPost.media.embedMedia.thumbnail.width` | `draftPost.media.embedMedia.thumbnail.height` | `draftPost.media.embedMedia.video.url` | `draftPost.media.embedMedia.video.width` | `draftPost.media.embedMedia.video.height` | `draftPost.media.displayed` | `draftPost.media.custom`, 5>>;
4788
4802
  interface CreateDraftPostOptions {
4789
4803
  /**
4790
4804
  * Whether the draft post should be published on creation.
@@ -4802,16 +4816,18 @@ interface CreateDraftPostOptions {
4802
4816
  }
4803
4817
  /**
4804
4818
  * Creates multiple draft posts.
4819
+ *
4820
+ * The `title` of each draft post is optional, as in Create Draft Post. When `publish` is `true` and any
4821
+ * draft post has no title, the whole request fails with the `POST_TITLE_REQUIRED` application error.
4805
4822
  * @param draftPosts - Draft posts to create.
4806
4823
  * @public
4807
4824
  * @requiredField draftPosts
4808
- * @requiredField draftPosts.title
4809
4825
  * @param options - Options for creating multiple draft posts.
4810
4826
  * @permissionId BLOG.CREATE-DRAFT
4811
4827
  * @applicableIdentity APP
4812
4828
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.BulkCreateDraftPosts
4813
4829
  */
4814
- declare function bulkCreateDraftPosts(draftPosts: NonNullablePaths<DraftPost, `title`, 0>[], options?: BulkCreateDraftPostsOptions): Promise<NonNullablePaths<BulkCreateDraftPostsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item._id` | `results.${number}.item.title` | `results.${number}.item.minutesToRead` | `results.${number}.item.status` | `results.${number}.item.moderationDetails.submittedBy` | `results.${number}.item.moderationDetails.status` | `results.${number}.item.hasUnpublishedChanges` | `results.${number}.item.media.displayed` | `results.${number}.item.media.custom` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
4830
+ declare function bulkCreateDraftPosts(draftPosts: DraftPost[], options?: BulkCreateDraftPostsOptions): Promise<NonNullablePaths<BulkCreateDraftPostsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item._id` | `results.${number}.item.title` | `results.${number}.item.minutesToRead` | `results.${number}.item.status` | `results.${number}.item.moderationDetails.submittedBy` | `results.${number}.item.moderationDetails.status` | `results.${number}.item.hasUnpublishedChanges` | `results.${number}.item.media.displayed` | `results.${number}.item.media.custom` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
4815
4831
  interface BulkCreateDraftPostsOptions {
4816
4832
  /** Whether the draft post should be published after creation. */
4817
4833
  publish?: boolean;
@@ -4827,6 +4843,9 @@ interface BulkCreateDraftPostsOptions {
4827
4843
  }
4828
4844
  /**
4829
4845
  * Updates multiple draft posts.
4846
+ *
4847
+ * An item fails with the `POST_TITLE_REQUIRED` application error when it would publish or schedule a draft post
4848
+ * without a title, or clear the title of a scheduled draft post.
4830
4849
  * @public
4831
4850
  * @requiredField options.draftPosts.draftPost
4832
4851
  * @requiredField options.draftPosts.draftPost._id
@@ -4928,6 +4947,16 @@ interface GetDraftPostOptions {
4928
4947
  }
4929
4948
  /**
4930
4949
  * Updates a draft post.
4950
+ *
4951
+ * If the post is already published, the default `UPDATE` action changes only the draft post. The published post
4952
+ * stays as it was until the draft post is published. To apply the changes to the published post, set `action` to
4953
+ * `UPDATE_PUBLISH`, which updates and publishes in one call, or call Publish Draft Post afterward.
4954
+ *
4955
+ * An empty or whitespace-only `title` clears the title. Fails with the `POST_TITLE_REQUIRED` application error
4956
+ * when `action` is `UPDATE_PUBLISH`, `UPDATE_SCHEDULE` or `UPDATE_PUBLICATION` and the draft post has no title,
4957
+ * or when the update clears the title of a scheduled draft post.
4958
+ * With `action` set to `UPDATE`, clearing the title of a published post's draft succeeds: the published post
4959
+ * keeps its title, and only publishing the untitled draft post fails.
4931
4960
  * @param _id - Draft post ID.
4932
4961
  * @public
4933
4962
  * @requiredField _id
@@ -5513,6 +5542,8 @@ declare const utils: {
5513
5542
  *
5514
5543
  * If the draft post was already published, the published post will be updated with the latest values
5515
5544
  * from the draft post.
5545
+ *
5546
+ * Fails with the `POST_TITLE_REQUIRED` application error when the draft post has no title.
5516
5547
  * @param draftPostId - Draft post ID.
5517
5548
  * @public
5518
5549
  * @requiredField draftPostId
@@ -5559,7 +5590,6 @@ interface TranslateDraftOptions {
5559
5590
  * Predefined sets of fields to return in the created draft post, in addition to the core draft post fields.
5560
5591
  *
5561
5592
  * - `URL`: Returns the draft post's preview URL.
5562
- * - `CONTENT`: Returns the draft post's content.
5563
5593
  * - `RICH_CONTENT`: Returns the draft post's rich content.
5564
5594
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
5565
5595
  *
@@ -5597,7 +5627,6 @@ interface UpdateDraftPostLanguageOptions {
5597
5627
  * Predefined sets of fields to return in the updated draft post, in addition to the core draft post fields.
5598
5628
  *
5599
5629
  * - `URL`: Returns the draft post's preview URL.
5600
- * - `CONTENT`: Returns the draft post's content.
5601
5630
  * - `RICH_CONTENT`: Returns the draft post's rich content.
5602
5631
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
5603
5632
  *
@@ -3958,7 +3958,11 @@ declare enum Field {
3958
3958
  * @internal
3959
3959
  */
3960
3960
  INTERNAL_ID = "INTERNAL_ID",
3961
- /** Includes content field. */
3961
+ /**
3962
+ * Includes content field.
3963
+ * Reserved for internal use. Use `RICH_CONTENT` instead.
3964
+ * @internal
3965
+ */
3962
3966
  CONTENT = "CONTENT",
3963
3967
  /** Includes rich content field. */
3964
3968
  RICH_CONTENT = "RICH_CONTENT",
@@ -3971,7 +3975,7 @@ declare enum Field {
3971
3975
  GENERATED_EXCERPT = "GENERATED_EXCERPT"
3972
3976
  }
3973
3977
  /** @enumType */
3974
- type FieldWithLiterals = Field | 'UNKNOWN' | 'URL' | 'CONTENT' | 'RICH_CONTENT' | 'GENERATED_EXCERPT';
3978
+ type FieldWithLiterals = Field | 'UNKNOWN' | 'URL' | 'RICH_CONTENT' | 'GENERATED_EXCERPT';
3975
3979
  interface CreateDraftPostResponse {
3976
3980
  /** Created draft post info. */
3977
3981
  draftPost?: DraftPost;
@@ -4075,9 +4079,12 @@ interface MaskedDraftPosts {
4075
4079
  fieldMask?: string[];
4076
4080
  }
4077
4081
  declare enum Action {
4078
- /** Update the draft post. */
4082
+ /** Update the draft post. If the post is already published, the published post isn't changed. */
4079
4083
  UPDATE = "UPDATE",
4080
- /** Update and publish a draft post. */
4084
+ /**
4085
+ * Update and publish a draft post. If the post is already published, the published post is updated
4086
+ * with the draft post's values in the same call.
4087
+ */
4081
4088
  UPDATE_PUBLISH = "UPDATE_PUBLISH",
4082
4089
  /** Update the draft post and schedule a publish date. */
4083
4090
  UPDATE_SCHEDULE = "UPDATE_SCHEDULE",
@@ -4087,7 +4094,7 @@ declare enum Action {
4087
4094
  UPDATE_CANCEL_SCHEDULE = "UPDATE_CANCEL_SCHEDULE",
4088
4095
  /** Update and reject draft post. */
4089
4096
  UPDATE_REJECT = "UPDATE_REJECT",
4090
- /** Update a post that's already been published. This creates and updates a draft version of the post. The original post is still published. */
4097
+ /** Update a post that's already been published. The changes are saved to the draft post and applied to the published post. */
4091
4098
  UPDATE_PUBLICATION = "UPDATE_PUBLICATION"
4092
4099
  }
4093
4100
  /** @enumType */
@@ -4722,7 +4729,6 @@ interface TranslateDraftRequest {
4722
4729
  * Predefined sets of fields to return in the created draft post, in addition to the core draft post fields.
4723
4730
  *
4724
4731
  * - `URL`: Returns the draft post's preview URL.
4725
- * - `CONTENT`: Returns the draft post's content.
4726
4732
  * - `RICH_CONTENT`: Returns the draft post's rich content.
4727
4733
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4728
4734
  *
@@ -4785,7 +4791,6 @@ interface UpdateDraftPostLanguageRequest {
4785
4791
  * Predefined sets of fields to return in the updated draft post, in addition to the core draft post fields.
4786
4792
  *
4787
4793
  * - `URL`: Returns the draft post's preview URL.
4788
- * - `CONTENT`: Returns the draft post's content.
4789
4794
  * - `RICH_CONTENT`: Returns the draft post's rich content.
4790
4795
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4791
4796
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_blog_draft-posts",
3
- "version": "1.0.127",
3
+ "version": "1.0.129",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -50,5 +50,5 @@
50
50
  "fqdn": "wix.blog.v3.draft"
51
51
  }
52
52
  },
53
- "falconPackageHash": "d442d04d8bbc1d77c23f253d2f84ffb26c57f3bde0ded6ad897ef75e"
53
+ "falconPackageHash": "70fc763d9eb6e3e556110f5a9b1daba4b50cbb366beed0d1cce068f7"
54
54
  }