@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.
- package/build/cjs/index.d.ts +30 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +37 -14
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +7 -8
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +30 -2
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +37 -14
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +7 -8
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +30 -2
- package/build/internal/cjs/index.typings.d.ts +42 -13
- package/build/internal/cjs/meta.d.ts +12 -7
- package/build/internal/es/index.d.mts +30 -2
- package/build/internal/es/index.typings.d.mts +42 -13
- package/build/internal/es/meta.d.mts +12 -7
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -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:
|
|
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:
|
|
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>>;
|