@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.
- package/build/cjs/index.d.ts +20 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +20 -4
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +20 -2
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +20 -4
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +20 -2
- package/build/internal/cjs/index.typings.d.ts +20 -4
- package/build/internal/es/index.d.mts +20 -2
- package/build/internal/es/index.typings.d.mts +20 -4
- package/package.json +2 -2
|
@@ -4518,6 +4518,10 @@ declare function onDraftUpdated(handler: (event: DraftUpdatedEnvelope) => void |
|
|
|
4518
4518
|
/**
|
|
4519
4519
|
* Creates a draft post.
|
|
4520
4520
|
*
|
|
4521
|
+
* The `title` is optional. A missing, empty or whitespace-only title creates an untitled draft post,
|
|
4522
|
+
* which is returned with an empty `title`. An untitled draft post can't be published or scheduled,
|
|
4523
|
+
* so creating it with `publish` set to `true` fails with the `POST_TITLE_REQUIRED` application error.
|
|
4524
|
+
*
|
|
4521
4525
|
* For 3rd-party apps, `memberId` is a required field.
|
|
4522
4526
|
*
|
|
4523
4527
|
* In `categoryIds`, only categories that already exist will be added to the draft post. Including
|
|
@@ -4528,13 +4532,12 @@ declare function onDraftUpdated(handler: (event: DraftUpdatedEnvelope) => void |
|
|
|
4528
4532
|
* @param draftPost - Draft post to create.
|
|
4529
4533
|
* @public
|
|
4530
4534
|
* @requiredField draftPost
|
|
4531
|
-
* @requiredField draftPost.title
|
|
4532
4535
|
* @param options - Options for creating a draft post.
|
|
4533
4536
|
* @permissionId BLOG.CREATE-DRAFT
|
|
4534
4537
|
* @applicableIdentity APP
|
|
4535
4538
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.CreateDraftPost
|
|
4536
4539
|
*/
|
|
4537
|
-
declare function createDraftPost(draftPost:
|
|
4540
|
+
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>>;
|
|
4538
4541
|
interface CreateDraftPostOptions {
|
|
4539
4542
|
/**
|
|
4540
4543
|
* Whether the draft post should be published on creation.
|
|
@@ -4552,16 +4555,18 @@ interface CreateDraftPostOptions {
|
|
|
4552
4555
|
}
|
|
4553
4556
|
/**
|
|
4554
4557
|
* Creates multiple draft posts.
|
|
4558
|
+
*
|
|
4559
|
+
* The `title` of each draft post is optional, as in Create Draft Post. When `publish` is `true` and any
|
|
4560
|
+
* draft post has no title, the whole request fails with the `POST_TITLE_REQUIRED` application error.
|
|
4555
4561
|
* @param draftPosts - Draft posts to create.
|
|
4556
4562
|
* @public
|
|
4557
4563
|
* @requiredField draftPosts
|
|
4558
|
-
* @requiredField draftPosts.title
|
|
4559
4564
|
* @param options - Options for creating multiple draft posts.
|
|
4560
4565
|
* @permissionId BLOG.CREATE-DRAFT
|
|
4561
4566
|
* @applicableIdentity APP
|
|
4562
4567
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.BulkCreateDraftPosts
|
|
4563
4568
|
*/
|
|
4564
|
-
declare function bulkCreateDraftPosts(draftPosts:
|
|
4569
|
+
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>>;
|
|
4565
4570
|
interface BulkCreateDraftPostsOptions {
|
|
4566
4571
|
/** Whether the draft post should be published after creation. */
|
|
4567
4572
|
publish?: boolean;
|
|
@@ -4577,6 +4582,9 @@ interface BulkCreateDraftPostsOptions {
|
|
|
4577
4582
|
}
|
|
4578
4583
|
/**
|
|
4579
4584
|
* Updates multiple draft posts.
|
|
4585
|
+
*
|
|
4586
|
+
* An item fails with the `POST_TITLE_REQUIRED` application error when it would publish or schedule a draft post
|
|
4587
|
+
* without a title, or clear the title of a scheduled draft post.
|
|
4580
4588
|
* @public
|
|
4581
4589
|
* @requiredField options.draftPosts.draftPost
|
|
4582
4590
|
* @requiredField options.draftPosts.draftPost._id
|
|
@@ -4678,6 +4686,12 @@ interface GetDraftPostOptions {
|
|
|
4678
4686
|
}
|
|
4679
4687
|
/**
|
|
4680
4688
|
* Updates a draft post.
|
|
4689
|
+
*
|
|
4690
|
+
* An empty or whitespace-only `title` clears the title. Fails with the `POST_TITLE_REQUIRED` application error
|
|
4691
|
+
* when `action` is `UPDATE_PUBLISH`, `UPDATE_SCHEDULE` or `UPDATE_PUBLICATION` and the draft post has no title,
|
|
4692
|
+
* or when the update clears the title of a scheduled draft post.
|
|
4693
|
+
* With `action` set to `UPDATE`, clearing the title of a published post's draft succeeds: the published post
|
|
4694
|
+
* keeps its title, and only publishing the untitled draft post fails.
|
|
4681
4695
|
* @param _id - Draft post ID.
|
|
4682
4696
|
* @public
|
|
4683
4697
|
* @requiredField _id
|
|
@@ -5178,6 +5192,8 @@ declare const utils: {
|
|
|
5178
5192
|
*
|
|
5179
5193
|
* If the draft post was already published, the published post will be updated with the latest values
|
|
5180
5194
|
* from the draft post.
|
|
5195
|
+
*
|
|
5196
|
+
* Fails with the `POST_TITLE_REQUIRED` application error when the draft post has no title.
|
|
5181
5197
|
* @param draftPostId - Draft post ID.
|
|
5182
5198
|
* @public
|
|
5183
5199
|
* @requiredField draftPostId
|