@wix/auto_sdk_blog_draft-posts 1.0.127 → 1.0.128

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,10 @@ 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
+ *
10
14
  * For 3rd-party apps, `memberId` is a required field.
11
15
  *
12
16
  * In `categoryIds`, only categories that already exist will be added to the draft post. Including
@@ -17,21 +21,27 @@ interface CreateDraftPostSignature {
17
21
  * @param - Draft post to create.
18
22
  * @param - Options for creating a draft post.
19
23
  */
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>>;
24
+ (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
25
  }
22
26
  declare function bulkCreateDraftPosts$1(httpClient: HttpClient): BulkCreateDraftPostsSignature;
23
27
  interface BulkCreateDraftPostsSignature {
24
28
  /**
25
29
  * Creates multiple draft posts.
30
+ *
31
+ * The `title` of each draft post is optional, as in Create Draft Post. When `publish` is `true` and any
32
+ * draft post has no title, the whole request fails with the `POST_TITLE_REQUIRED` application error.
26
33
  * @param - Draft posts to create.
27
34
  * @param - Options for creating multiple draft posts.
28
35
  */
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>>;
36
+ (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
37
  }
31
38
  declare function bulkUpdateDraftPosts$1(httpClient: HttpClient): BulkUpdateDraftPostsSignature;
32
39
  interface BulkUpdateDraftPostsSignature {
33
40
  /**
34
41
  * Updates multiple draft posts.
42
+ *
43
+ * An item fails with the `POST_TITLE_REQUIRED` application error when it would publish or schedule a draft post
44
+ * without a title, or clear the title of a scheduled draft post.
35
45
  * @param - Options for updating multiple draft posts.
36
46
  */
37
47
  (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 +72,12 @@ declare function updateDraftPost$1(httpClient: HttpClient): UpdateDraftPostSigna
62
72
  interface UpdateDraftPostSignature {
63
73
  /**
64
74
  * Updates a draft post.
75
+ *
76
+ * An empty or whitespace-only `title` clears the title. Fails with the `POST_TITLE_REQUIRED` application error
77
+ * when `action` is `UPDATE_PUBLISH`, `UPDATE_SCHEDULE` or `UPDATE_PUBLICATION` and the draft post has no title,
78
+ * or when the update clears the title of a scheduled draft post.
79
+ * With `action` set to `UPDATE`, clearing the title of a published post's draft succeeds: the published post
80
+ * keeps its title, and only publishing the untitled draft post fails.
65
81
  * @param - Draft post ID.
66
82
  * @param - Options for updating a draft post.
67
83
  * @param - Draft Post info.
@@ -136,6 +152,8 @@ interface PublishDraftPostSignature {
136
152
  *
137
153
  * If the draft post was already published, the published post will be updated with the latest values
138
154
  * from the draft post.
155
+ *
156
+ * Fails with the `POST_TITLE_REQUIRED` application error when the draft post has no title.
139
157
  * @param - Draft post ID.
140
158
  */
141
159
  (draftPostId: string): Promise<NonNullablePaths<PublishDraftPostResponse, `postId`, 0>>;
@@ -4768,6 +4768,10 @@ declare function onDraftUpdated(handler: (event: DraftUpdatedEnvelope) => void |
4768
4768
  /**
4769
4769
  * Creates a draft post.
4770
4770
  *
4771
+ * The `title` is optional. A missing, empty or whitespace-only title creates an untitled draft post,
4772
+ * which is returned with an empty `title`. An untitled draft post can't be published or scheduled,
4773
+ * so creating it with `publish` set to `true` fails with the `POST_TITLE_REQUIRED` application error.
4774
+ *
4771
4775
  * For 3rd-party apps, `memberId` is a required field.
4772
4776
  *
4773
4777
  * In `categoryIds`, only categories that already exist will be added to the draft post. Including
@@ -4778,13 +4782,12 @@ declare function onDraftUpdated(handler: (event: DraftUpdatedEnvelope) => void |
4778
4782
  * @param draftPost - Draft post to create.
4779
4783
  * @public
4780
4784
  * @requiredField draftPost
4781
- * @requiredField draftPost.title
4782
4785
  * @param options - Options for creating a draft post.
4783
4786
  * @permissionId BLOG.CREATE-DRAFT
4784
4787
  * @applicableIdentity APP
4785
4788
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.CreateDraftPost
4786
4789
  */
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>>;
4790
+ 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
4791
  interface CreateDraftPostOptions {
4789
4792
  /**
4790
4793
  * Whether the draft post should be published on creation.
@@ -4802,16 +4805,18 @@ interface CreateDraftPostOptions {
4802
4805
  }
4803
4806
  /**
4804
4807
  * Creates multiple draft posts.
4808
+ *
4809
+ * The `title` of each draft post is optional, as in Create Draft Post. When `publish` is `true` and any
4810
+ * draft post has no title, the whole request fails with the `POST_TITLE_REQUIRED` application error.
4805
4811
  * @param draftPosts - Draft posts to create.
4806
4812
  * @public
4807
4813
  * @requiredField draftPosts
4808
- * @requiredField draftPosts.title
4809
4814
  * @param options - Options for creating multiple draft posts.
4810
4815
  * @permissionId BLOG.CREATE-DRAFT
4811
4816
  * @applicableIdentity APP
4812
4817
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.BulkCreateDraftPosts
4813
4818
  */
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>>;
4819
+ 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
4820
  interface BulkCreateDraftPostsOptions {
4816
4821
  /** Whether the draft post should be published after creation. */
4817
4822
  publish?: boolean;
@@ -4827,6 +4832,9 @@ interface BulkCreateDraftPostsOptions {
4827
4832
  }
4828
4833
  /**
4829
4834
  * Updates multiple draft posts.
4835
+ *
4836
+ * An item fails with the `POST_TITLE_REQUIRED` application error when it would publish or schedule a draft post
4837
+ * without a title, or clear the title of a scheduled draft post.
4830
4838
  * @public
4831
4839
  * @requiredField options.draftPosts.draftPost
4832
4840
  * @requiredField options.draftPosts.draftPost._id
@@ -4928,6 +4936,12 @@ interface GetDraftPostOptions {
4928
4936
  }
4929
4937
  /**
4930
4938
  * Updates a draft post.
4939
+ *
4940
+ * An empty or whitespace-only `title` clears the title. Fails with the `POST_TITLE_REQUIRED` application error
4941
+ * when `action` is `UPDATE_PUBLISH`, `UPDATE_SCHEDULE` or `UPDATE_PUBLICATION` and the draft post has no title,
4942
+ * or when the update clears the title of a scheduled draft post.
4943
+ * With `action` set to `UPDATE`, clearing the title of a published post's draft succeeds: the published post
4944
+ * keeps its title, and only publishing the untitled draft post fails.
4931
4945
  * @param _id - Draft post ID.
4932
4946
  * @public
4933
4947
  * @requiredField _id
@@ -5513,6 +5527,8 @@ declare const utils: {
5513
5527
  *
5514
5528
  * If the draft post was already published, the published post will be updated with the latest values
5515
5529
  * from the draft post.
5530
+ *
5531
+ * Fails with the `POST_TITLE_REQUIRED` application error when the draft post has no title.
5516
5532
  * @param draftPostId - Draft post ID.
5517
5533
  * @public
5518
5534
  * @requiredField draftPostId
@@ -7,6 +7,10 @@ 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
+ *
10
14
  * For 3rd-party apps, `memberId` is a required field.
11
15
  *
12
16
  * In `categoryIds`, only categories that already exist will be added to the draft post. Including
@@ -17,21 +21,27 @@ interface CreateDraftPostSignature {
17
21
  * @param - Draft post to create.
18
22
  * @param - Options for creating a draft post.
19
23
  */
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>>;
24
+ (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
25
  }
22
26
  declare function bulkCreateDraftPosts$1(httpClient: HttpClient): BulkCreateDraftPostsSignature;
23
27
  interface BulkCreateDraftPostsSignature {
24
28
  /**
25
29
  * Creates multiple draft posts.
30
+ *
31
+ * The `title` of each draft post is optional, as in Create Draft Post. When `publish` is `true` and any
32
+ * draft post has no title, the whole request fails with the `POST_TITLE_REQUIRED` application error.
26
33
  * @param - Draft posts to create.
27
34
  * @param - Options for creating multiple draft posts.
28
35
  */
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>>;
36
+ (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
37
  }
31
38
  declare function bulkUpdateDraftPosts$1(httpClient: HttpClient): BulkUpdateDraftPostsSignature;
32
39
  interface BulkUpdateDraftPostsSignature {
33
40
  /**
34
41
  * Updates multiple draft posts.
42
+ *
43
+ * An item fails with the `POST_TITLE_REQUIRED` application error when it would publish or schedule a draft post
44
+ * without a title, or clear the title of a scheduled draft post.
35
45
  * @param - Options for updating multiple draft posts.
36
46
  */
37
47
  (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 +72,12 @@ declare function updateDraftPost$1(httpClient: HttpClient): UpdateDraftPostSigna
62
72
  interface UpdateDraftPostSignature {
63
73
  /**
64
74
  * Updates a draft post.
75
+ *
76
+ * An empty or whitespace-only `title` clears the title. Fails with the `POST_TITLE_REQUIRED` application error
77
+ * when `action` is `UPDATE_PUBLISH`, `UPDATE_SCHEDULE` or `UPDATE_PUBLICATION` and the draft post has no title,
78
+ * or when the update clears the title of a scheduled draft post.
79
+ * With `action` set to `UPDATE`, clearing the title of a published post's draft succeeds: the published post
80
+ * keeps its title, and only publishing the untitled draft post fails.
65
81
  * @param - Draft post ID.
66
82
  * @param - Options for updating a draft post.
67
83
  * @param - Draft Post info.
@@ -136,6 +152,8 @@ interface PublishDraftPostSignature {
136
152
  *
137
153
  * If the draft post was already published, the published post will be updated with the latest values
138
154
  * from the draft post.
155
+ *
156
+ * Fails with the `POST_TITLE_REQUIRED` application error when the draft post has no title.
139
157
  * @param - Draft post ID.
140
158
  */
141
159
  (draftPostId: string): Promise<NonNullablePaths<PublishDraftPostResponse, `postId`, 0>>;
@@ -4768,6 +4768,10 @@ declare function onDraftUpdated(handler: (event: DraftUpdatedEnvelope) => void |
4768
4768
  /**
4769
4769
  * Creates a draft post.
4770
4770
  *
4771
+ * The `title` is optional. A missing, empty or whitespace-only title creates an untitled draft post,
4772
+ * which is returned with an empty `title`. An untitled draft post can't be published or scheduled,
4773
+ * so creating it with `publish` set to `true` fails with the `POST_TITLE_REQUIRED` application error.
4774
+ *
4771
4775
  * For 3rd-party apps, `memberId` is a required field.
4772
4776
  *
4773
4777
  * In `categoryIds`, only categories that already exist will be added to the draft post. Including
@@ -4778,13 +4782,12 @@ declare function onDraftUpdated(handler: (event: DraftUpdatedEnvelope) => void |
4778
4782
  * @param draftPost - Draft post to create.
4779
4783
  * @public
4780
4784
  * @requiredField draftPost
4781
- * @requiredField draftPost.title
4782
4785
  * @param options - Options for creating a draft post.
4783
4786
  * @permissionId BLOG.CREATE-DRAFT
4784
4787
  * @applicableIdentity APP
4785
4788
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.CreateDraftPost
4786
4789
  */
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>>;
4790
+ 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
4791
  interface CreateDraftPostOptions {
4789
4792
  /**
4790
4793
  * Whether the draft post should be published on creation.
@@ -4802,16 +4805,18 @@ interface CreateDraftPostOptions {
4802
4805
  }
4803
4806
  /**
4804
4807
  * Creates multiple draft posts.
4808
+ *
4809
+ * The `title` of each draft post is optional, as in Create Draft Post. When `publish` is `true` and any
4810
+ * draft post has no title, the whole request fails with the `POST_TITLE_REQUIRED` application error.
4805
4811
  * @param draftPosts - Draft posts to create.
4806
4812
  * @public
4807
4813
  * @requiredField draftPosts
4808
- * @requiredField draftPosts.title
4809
4814
  * @param options - Options for creating multiple draft posts.
4810
4815
  * @permissionId BLOG.CREATE-DRAFT
4811
4816
  * @applicableIdentity APP
4812
4817
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.BulkCreateDraftPosts
4813
4818
  */
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>>;
4819
+ 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
4820
  interface BulkCreateDraftPostsOptions {
4816
4821
  /** Whether the draft post should be published after creation. */
4817
4822
  publish?: boolean;
@@ -4827,6 +4832,9 @@ interface BulkCreateDraftPostsOptions {
4827
4832
  }
4828
4833
  /**
4829
4834
  * Updates multiple draft posts.
4835
+ *
4836
+ * An item fails with the `POST_TITLE_REQUIRED` application error when it would publish or schedule a draft post
4837
+ * without a title, or clear the title of a scheduled draft post.
4830
4838
  * @public
4831
4839
  * @requiredField options.draftPosts.draftPost
4832
4840
  * @requiredField options.draftPosts.draftPost._id
@@ -4928,6 +4936,12 @@ interface GetDraftPostOptions {
4928
4936
  }
4929
4937
  /**
4930
4938
  * Updates a draft post.
4939
+ *
4940
+ * An empty or whitespace-only `title` clears the title. Fails with the `POST_TITLE_REQUIRED` application error
4941
+ * when `action` is `UPDATE_PUBLISH`, `UPDATE_SCHEDULE` or `UPDATE_PUBLICATION` and the draft post has no title,
4942
+ * or when the update clears the title of a scheduled draft post.
4943
+ * With `action` set to `UPDATE`, clearing the title of a published post's draft succeeds: the published post
4944
+ * keeps its title, and only publishing the untitled draft post fails.
4931
4945
  * @param _id - Draft post ID.
4932
4946
  * @public
4933
4947
  * @requiredField _id
@@ -5513,6 +5527,8 @@ declare const utils: {
5513
5527
  *
5514
5528
  * If the draft post was already published, the published post will be updated with the latest values
5515
5529
  * from the draft post.
5530
+ *
5531
+ * Fails with the `POST_TITLE_REQUIRED` application error when the draft post has no title.
5516
5532
  * @param draftPostId - Draft post ID.
5517
5533
  * @public
5518
5534
  * @requiredField draftPostId
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.128",
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": "ef55a197a0ea807d2968b87b329ec53b8a596f06a3bcc91dcc5097d6"
54
54
  }