@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>>;