@wix/auto_sdk_blog_draft-posts 1.0.3 → 1.0.5
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/src/blog-v3-draft-draft-posts.http.d.ts +33 -29
- package/build/cjs/src/blog-v3-draft-draft-posts.http.js +33 -29
- package/build/cjs/src/blog-v3-draft-draft-posts.http.js.map +1 -1
- package/build/cjs/src/blog-v3-draft-draft-posts.public.d.ts +32 -22
- package/build/cjs/src/blog-v3-draft-draft-posts.public.js.map +1 -1
- package/build/cjs/src/blog-v3-draft-draft-posts.types.d.ts +7 -77
- package/build/cjs/src/blog-v3-draft-draft-posts.types.js +0 -11
- package/build/cjs/src/blog-v3-draft-draft-posts.types.js.map +1 -1
- package/build/cjs/src/blog-v3-draft-draft-posts.universal.d.ts +57 -152
- package/build/cjs/src/blog-v3-draft-draft-posts.universal.js +32 -33
- package/build/cjs/src/blog-v3-draft-draft-posts.universal.js.map +1 -1
- package/build/es/src/blog-v3-draft-draft-posts.http.d.ts +33 -29
- package/build/es/src/blog-v3-draft-draft-posts.http.js +33 -29
- package/build/es/src/blog-v3-draft-draft-posts.http.js.map +1 -1
- package/build/es/src/blog-v3-draft-draft-posts.public.d.ts +32 -22
- package/build/es/src/blog-v3-draft-draft-posts.public.js.map +1 -1
- package/build/es/src/blog-v3-draft-draft-posts.types.d.ts +7 -77
- package/build/es/src/blog-v3-draft-draft-posts.types.js +0 -11
- package/build/es/src/blog-v3-draft-draft-posts.types.js.map +1 -1
- package/build/es/src/blog-v3-draft-draft-posts.universal.d.ts +57 -152
- package/build/es/src/blog-v3-draft-draft-posts.universal.js +32 -33
- package/build/es/src/blog-v3-draft-draft-posts.universal.js.map +1 -1
- package/build/internal/cjs/src/blog-v3-draft-draft-posts.http.d.ts +33 -29
- package/build/internal/cjs/src/blog-v3-draft-draft-posts.http.js +33 -29
- package/build/internal/cjs/src/blog-v3-draft-draft-posts.http.js.map +1 -1
- package/build/internal/cjs/src/blog-v3-draft-draft-posts.public.d.ts +32 -22
- package/build/internal/cjs/src/blog-v3-draft-draft-posts.public.js.map +1 -1
- package/build/internal/cjs/src/blog-v3-draft-draft-posts.types.d.ts +7 -77
- package/build/internal/cjs/src/blog-v3-draft-draft-posts.types.js +0 -11
- package/build/internal/cjs/src/blog-v3-draft-draft-posts.types.js.map +1 -1
- package/build/internal/cjs/src/blog-v3-draft-draft-posts.universal.d.ts +57 -168
- package/build/internal/cjs/src/blog-v3-draft-draft-posts.universal.js +32 -33
- package/build/internal/cjs/src/blog-v3-draft-draft-posts.universal.js.map +1 -1
- package/build/internal/es/src/blog-v3-draft-draft-posts.http.d.ts +33 -29
- package/build/internal/es/src/blog-v3-draft-draft-posts.http.js +33 -29
- package/build/internal/es/src/blog-v3-draft-draft-posts.http.js.map +1 -1
- package/build/internal/es/src/blog-v3-draft-draft-posts.public.d.ts +32 -22
- package/build/internal/es/src/blog-v3-draft-draft-posts.public.js.map +1 -1
- package/build/internal/es/src/blog-v3-draft-draft-posts.types.d.ts +7 -77
- package/build/internal/es/src/blog-v3-draft-draft-posts.types.js +0 -11
- package/build/internal/es/src/blog-v3-draft-draft-posts.types.js.map +1 -1
- package/build/internal/es/src/blog-v3-draft-draft-posts.universal.d.ts +57 -168
- package/build/internal/es/src/blog-v3-draft-draft-posts.universal.js +32 -33
- package/build/internal/es/src/blog-v3-draft-draft-posts.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -32,7 +32,7 @@ export interface DraftPost {
|
|
|
32
32
|
*/
|
|
33
33
|
memberId?: string | null;
|
|
34
34
|
/**
|
|
35
|
-
* Hashtags in the
|
|
35
|
+
* Hashtags in the post.
|
|
36
36
|
* @maxSize 100
|
|
37
37
|
* @maxLength 100
|
|
38
38
|
*/
|
|
@@ -59,7 +59,7 @@ export interface DraftPost {
|
|
|
59
59
|
*/
|
|
60
60
|
relatedPostIds?: string[];
|
|
61
61
|
/**
|
|
62
|
-
* Pricing plan IDs. Only relevant if a post is assigned to a specific pricing plan.
|
|
62
|
+
* Pricing plan IDs. Only relevant if a post is assigned to a specific pricing plan. See the Pricing Plans API for more info.
|
|
63
63
|
* @maxSize 100
|
|
64
64
|
* @format GUID
|
|
65
65
|
*/
|
|
@@ -80,22 +80,12 @@ export interface DraftPost {
|
|
|
80
80
|
*/
|
|
81
81
|
language?: string | null;
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
* Reserved for internal use.
|
|
89
|
-
* @readonly
|
|
90
|
-
* @maxLength 24
|
|
91
|
-
*/
|
|
92
|
-
contentId?: string | null;
|
|
93
|
-
/**
|
|
94
|
-
* Reserved for internal use.
|
|
95
|
-
* @format GUID
|
|
83
|
+
* Draft Post rich content.
|
|
84
|
+
*
|
|
85
|
+
* <widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">
|
|
86
|
+
* <a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>
|
|
87
|
+
* </widget>
|
|
96
88
|
*/
|
|
97
|
-
editingSessionId?: string | null;
|
|
98
|
-
/** Draft post rich content. */
|
|
99
89
|
richContent?: RichContent;
|
|
100
90
|
/**
|
|
101
91
|
* Status of the draft post.
|
|
@@ -104,12 +94,6 @@ export interface DraftPost {
|
|
|
104
94
|
status?: Status;
|
|
105
95
|
/** Details of the draft post in review. Only relevant to posts submitted by guest writers. */
|
|
106
96
|
moderationDetails?: ModerationDetails;
|
|
107
|
-
/**
|
|
108
|
-
* Reserved for internal use.
|
|
109
|
-
* @readonly
|
|
110
|
-
* @format GUID
|
|
111
|
-
*/
|
|
112
|
-
mostRecentContributorId?: string | null;
|
|
113
97
|
/**
|
|
114
98
|
* Indicates if there are changes made to the draft post that have not yet been published.
|
|
115
99
|
* @readonly
|
|
@@ -125,27 +109,10 @@ export interface DraftPost {
|
|
|
125
109
|
* @readonly
|
|
126
110
|
*/
|
|
127
111
|
scheduledPublishDate?: Date | null;
|
|
128
|
-
/** Reserved for internal use. */
|
|
129
|
-
content?: Record<string, any> | null;
|
|
130
112
|
/** Date the post was first published. */
|
|
131
113
|
firstPublishedDate?: Date | null;
|
|
132
114
|
/** SEO data. */
|
|
133
115
|
seoData?: SeoSchema;
|
|
134
|
-
/**
|
|
135
|
-
* @internal Deprecated.
|
|
136
|
-
* @internal Deprecated.
|
|
137
|
-
* @deprecated
|
|
138
|
-
* @replacedBy preview_text_paragraph
|
|
139
|
-
* @targetRemovalDate 2024-06-30
|
|
140
|
-
*/
|
|
141
|
-
paidContentParagraph?: number | null;
|
|
142
|
-
/**
|
|
143
|
-
* Reserved for internal use.
|
|
144
|
-
* @readonly
|
|
145
|
-
* @maxSize 5000
|
|
146
|
-
* @maxLength 100
|
|
147
|
-
*/
|
|
148
|
-
slugs?: string[];
|
|
149
116
|
/**
|
|
150
117
|
* Draft post URL preview. What the URL will look like once the post is published.
|
|
151
118
|
* @readonly
|
|
@@ -165,12 +132,6 @@ export interface DraftPost {
|
|
|
165
132
|
media?: Media;
|
|
166
133
|
/** Number of paragraphs to display in a paid content preview for non-paying users. */
|
|
167
134
|
previewTextParagraph?: number | null;
|
|
168
|
-
/**
|
|
169
|
-
* Reserved for internal use.
|
|
170
|
-
* @readonly
|
|
171
|
-
* @maxLength 24
|
|
172
|
-
*/
|
|
173
|
-
internalId?: string | null;
|
|
174
135
|
}
|
|
175
136
|
export interface CoverMedia extends CoverMediaMediaOneOf {
|
|
176
137
|
/** Image url. */
|
|
@@ -191,7 +152,12 @@ export interface CoverMedia extends CoverMediaMediaOneOf {
|
|
|
191
152
|
/** Whether cover media is custom. If `false` the cover image is set to the first media item that appears in the content. */
|
|
192
153
|
custom?: boolean;
|
|
193
154
|
/**
|
|
194
|
-
*
|
|
155
|
+
* Alternative text is a short phrase that describes what the image depicts.
|
|
156
|
+
*
|
|
157
|
+
* The alternative text is used:
|
|
158
|
+
* + If the browser cannot display the image.
|
|
159
|
+
* + If the user is utilizing a screen reader.
|
|
160
|
+
* + By search engines to understand what images are on a site.
|
|
195
161
|
* @minLength 1
|
|
196
162
|
* @maxLength 1000
|
|
197
163
|
*/
|
|
@@ -571,7 +537,7 @@ export interface Link extends LinkDataOneOf {
|
|
|
571
537
|
/** The target node's ID. Used for linking to another node in this object. */
|
|
572
538
|
anchor?: string;
|
|
573
539
|
/**
|
|
574
|
-
*
|
|
540
|
+
* he HTML `target` attribute value for the link. This property defines where the linked document opens as follows:
|
|
575
541
|
* `SELF` - Default. Opens the linked document in the same frame as the link.
|
|
576
542
|
* `BLANK` - Opens the linked document in a new browser tab or window.
|
|
577
543
|
* `PARENT` - Opens the linked document in the link's parent frame.
|
|
@@ -607,7 +573,7 @@ export interface Rel {
|
|
|
607
573
|
sponsored?: boolean | null;
|
|
608
574
|
/** Indicates that this link is user-generated content and isn't necessarily trusted or endorsed by the page’s author. For example, a link in a fourm post. Defaults to `false`. */
|
|
609
575
|
ugc?: boolean | null;
|
|
610
|
-
/** Indicates that this link
|
|
576
|
+
/** Indicates that this link protect referral information from being passed to the target website. */
|
|
611
577
|
noreferrer?: boolean | null;
|
|
612
578
|
}
|
|
613
579
|
export interface CodeBlockData {
|
|
@@ -1658,12 +1624,6 @@ export declare enum Status {
|
|
|
1658
1624
|
SCHEDULED = "SCHEDULED",
|
|
1659
1625
|
/** Status indicating the draft post is deleted. */
|
|
1660
1626
|
DELETED = "DELETED",
|
|
1661
|
-
/**
|
|
1662
|
-
* Deprecated. Use `IN_REVIEW` instead. Status indicating the draft post is in review.
|
|
1663
|
-
* Target removal date 2024-06-30
|
|
1664
|
-
* Reserved for internal use.
|
|
1665
|
-
*/
|
|
1666
|
-
IN_MODERATION = "IN_MODERATION",
|
|
1667
1627
|
/** Status indicating the draft post is in review. */
|
|
1668
1628
|
IN_REVIEW = "IN_REVIEW"
|
|
1669
1629
|
}
|
|
@@ -2090,11 +2050,6 @@ export declare enum Field {
|
|
|
2090
2050
|
UNKNOWN = "UNKNOWN",
|
|
2091
2051
|
/** Includes draft post preview URL. */
|
|
2092
2052
|
URL = "URL",
|
|
2093
|
-
/**
|
|
2094
|
-
* Includes internal id field.
|
|
2095
|
-
* Reserved for internal use.
|
|
2096
|
-
*/
|
|
2097
|
-
INTERNAL_ID = "INTERNAL_ID",
|
|
2098
2053
|
/** Includes content field. */
|
|
2099
2054
|
CONTENT = "CONTENT",
|
|
2100
2055
|
/** Includes rich content field. */
|
|
@@ -2173,14 +2128,6 @@ export interface BulkUpdateDraftPostsRequest {
|
|
|
2173
2128
|
/**
|
|
2174
2129
|
* Action to perform on the posts.
|
|
2175
2130
|
*
|
|
2176
|
-
* - `UPDATE`: Update the draft post.
|
|
2177
|
-
* - `UPDATE_PUBLISH`: Update and publish the draft post.
|
|
2178
|
-
* - `UPDATE_SCHEDULE`: Update the draft post and schedule a publish date.
|
|
2179
|
-
* - `UPDATE_REVERT_TO_DRAFT`: Update the post and revert it to a draft post.
|
|
2180
|
-
* - `UPDATE_CANCEL_SCHEDULE`: Update the draft post and cancel the scheduled publish date.
|
|
2181
|
-
* - `UPDATE_REJECT`: Update and reject the draft post.
|
|
2182
|
-
* - `UPDATE_PUBLICATION`: Update a published post. This creates and updates a draft version of the post. The original post is still published.
|
|
2183
|
-
*
|
|
2184
2131
|
* Default: `UPDATE`
|
|
2185
2132
|
*/
|
|
2186
2133
|
action?: Action;
|
|
@@ -2197,7 +2144,7 @@ export interface BulkUpdateDraftPostsRequest {
|
|
|
2197
2144
|
fieldsets?: Field[];
|
|
2198
2145
|
}
|
|
2199
2146
|
export interface MaskedDraftPosts {
|
|
2200
|
-
/** Draft post
|
|
2147
|
+
/** Draft post */
|
|
2201
2148
|
draftPost?: DraftPost;
|
|
2202
2149
|
/** Field mask of fields to update. */
|
|
2203
2150
|
fieldMask?: string[];
|
|
@@ -2329,7 +2276,7 @@ export interface UpdateDraftPostContentRequest extends UpdateDraftPostContentReq
|
|
|
2329
2276
|
* @maxLength 400000
|
|
2330
2277
|
*/
|
|
2331
2278
|
content?: string;
|
|
2332
|
-
/** Draft
|
|
2279
|
+
/** Draft Post rich content. */
|
|
2333
2280
|
richContent?: RichContent;
|
|
2334
2281
|
/**
|
|
2335
2282
|
* Draft post ID.
|
|
@@ -2353,7 +2300,7 @@ export interface UpdateDraftPostContentRequestDraftContentOneOf {
|
|
|
2353
2300
|
* @maxLength 400000
|
|
2354
2301
|
*/
|
|
2355
2302
|
content?: string;
|
|
2356
|
-
/** Draft
|
|
2303
|
+
/** Draft Post rich content. */
|
|
2357
2304
|
richContent?: RichContent;
|
|
2358
2305
|
}
|
|
2359
2306
|
export interface UpdateDraftPostContentResponse {
|
|
@@ -2429,7 +2376,6 @@ export interface ListDraftPostsRequest {
|
|
|
2429
2376
|
* Draft post status filter.
|
|
2430
2377
|
*
|
|
2431
2378
|
* If omitted, draft posts with all statuses are returned.
|
|
2432
|
-
* `IN_MODERATION` is deprecated, use `IN_REVIEW` instead.
|
|
2433
2379
|
*/
|
|
2434
2380
|
status?: Status;
|
|
2435
2381
|
/**
|
|
@@ -2564,19 +2510,6 @@ export interface CursorPaging {
|
|
|
2564
2510
|
export interface QueryDraftPostsResponse {
|
|
2565
2511
|
/** List of posts. */
|
|
2566
2512
|
draftPosts?: DraftPost[];
|
|
2567
|
-
/**
|
|
2568
|
-
* __Deprecated.__ Use `pagingMetadata` instead.
|
|
2569
|
-
* This property will be removed on June 30, 2023.
|
|
2570
|
-
*
|
|
2571
|
-
* Details on the paged set of results returned.
|
|
2572
|
-
* @deprecated __Deprecated.__ Use `pagingMetadata` instead.
|
|
2573
|
-
* This property will be removed on June 30, 2023.
|
|
2574
|
-
*
|
|
2575
|
-
* Details on the paged set of results returned.
|
|
2576
|
-
* @replacedBy pagingMetadata
|
|
2577
|
-
* @targetRemovalDate 2024-06-30
|
|
2578
|
-
*/
|
|
2579
|
-
metaData?: MetaData;
|
|
2580
2513
|
/** Details on the paged set of results returned. */
|
|
2581
2514
|
pagingMetadata?: PagingMetadataV2;
|
|
2582
2515
|
}
|
|
@@ -2703,12 +2636,6 @@ export interface Category {
|
|
|
2703
2636
|
* @maxLength 100
|
|
2704
2637
|
*/
|
|
2705
2638
|
slug?: string;
|
|
2706
|
-
/**
|
|
2707
|
-
* Reserved for internal use.
|
|
2708
|
-
* @readonly
|
|
2709
|
-
* @maxLength 24
|
|
2710
|
-
*/
|
|
2711
|
-
internalId?: string | null;
|
|
2712
2639
|
/** SEO data. */
|
|
2713
2640
|
seoData?: SeoSchema;
|
|
2714
2641
|
/** Category cover image. */
|
|
@@ -3500,7 +3427,13 @@ export declare function onDraftUpdated(handler: (event: DraftUpdatedEnvelope) =>
|
|
|
3500
3427
|
/**
|
|
3501
3428
|
* Creates a draft post.
|
|
3502
3429
|
*
|
|
3503
|
-
*
|
|
3430
|
+
* For 3rd-party apps, `memberId` is a required field.
|
|
3431
|
+
*
|
|
3432
|
+
* In `categoryIds`, only categories that already exist will be added to the draft post. Including
|
|
3433
|
+
* `categoryIds` that do not exist will not return an error, but they will not be added to the `categoryIds` array.
|
|
3434
|
+
* If some of the categories exist, those will be added while those that do not exist will not be added to `categoryIds`.
|
|
3435
|
+
* You can check which categories are available with
|
|
3436
|
+
* List Categories ([SDK](https://dev.wix.com/docs/sdk/backend-modules/blog/categories/list-categories) | [REST](https://dev.wix.com/docs/rest/business-solutions/blog/category/list-categories)).
|
|
3504
3437
|
* @param draftPost - Draft post to create.
|
|
3505
3438
|
* @public
|
|
3506
3439
|
* @requiredField draftPost
|
|
@@ -3578,14 +3511,6 @@ export interface BulkUpdateDraftPostsOptions {
|
|
|
3578
3511
|
/**
|
|
3579
3512
|
* Action to perform on the posts.
|
|
3580
3513
|
*
|
|
3581
|
-
* - `UPDATE`: Update the draft post.
|
|
3582
|
-
* - `UPDATE_PUBLISH`: Update and publish the draft post.
|
|
3583
|
-
* - `UPDATE_SCHEDULE`: Update the draft post and schedule a publish date.
|
|
3584
|
-
* - `UPDATE_REVERT_TO_DRAFT`: Update the post and revert it to a draft post.
|
|
3585
|
-
* - `UPDATE_CANCEL_SCHEDULE`: Update the draft post and cancel the scheduled publish date.
|
|
3586
|
-
* - `UPDATE_REJECT`: Update and reject the draft post.
|
|
3587
|
-
* - `UPDATE_PUBLICATION`: Update a published post. This creates and updates a draft version of the post. The original post is still published.
|
|
3588
|
-
*
|
|
3589
3514
|
* Default: `UPDATE`
|
|
3590
3515
|
*/
|
|
3591
3516
|
action?: Action;
|
|
@@ -3604,7 +3529,7 @@ export interface BulkUpdateDraftPostsOptions {
|
|
|
3604
3529
|
/**
|
|
3605
3530
|
* Retrieves a list of up to 100 deleted draft posts.
|
|
3606
3531
|
*
|
|
3607
|
-
* List
|
|
3532
|
+
* List Draft Posts runs with these defaults, which you can override:
|
|
3608
3533
|
* - `editedDate` is sorted in descending order. In this case,`editedDate` implies the date the post was deleted.
|
|
3609
3534
|
* - `paging.limit` is `50`.
|
|
3610
3535
|
* - `paging.offset` is `0`.
|
|
@@ -3649,9 +3574,7 @@ export interface ListDeletedDraftPostsOptions {
|
|
|
3649
3574
|
draftPostIds?: string[];
|
|
3650
3575
|
}
|
|
3651
3576
|
/**
|
|
3652
|
-
*
|
|
3653
|
-
*
|
|
3654
|
-
* Uses the provided `draftPostId` to retrieve a draft post.
|
|
3577
|
+
* Retrieves a draft post by the provided ID.
|
|
3655
3578
|
* @param draftPostId - Draft post ID.
|
|
3656
3579
|
* @public
|
|
3657
3580
|
* @requiredField draftPostId
|
|
@@ -3721,7 +3644,7 @@ export interface UpdateDraftPost {
|
|
|
3721
3644
|
*/
|
|
3722
3645
|
memberId?: string | null;
|
|
3723
3646
|
/**
|
|
3724
|
-
* Hashtags in the
|
|
3647
|
+
* Hashtags in the post.
|
|
3725
3648
|
* @maxSize 100
|
|
3726
3649
|
* @maxLength 100
|
|
3727
3650
|
*/
|
|
@@ -3748,7 +3671,7 @@ export interface UpdateDraftPost {
|
|
|
3748
3671
|
*/
|
|
3749
3672
|
relatedPostIds?: string[];
|
|
3750
3673
|
/**
|
|
3751
|
-
* Pricing plan IDs. Only relevant if a post is assigned to a specific pricing plan.
|
|
3674
|
+
* Pricing plan IDs. Only relevant if a post is assigned to a specific pricing plan. See the Pricing Plans API for more info.
|
|
3752
3675
|
* @maxSize 100
|
|
3753
3676
|
* @format GUID
|
|
3754
3677
|
*/
|
|
@@ -3769,22 +3692,12 @@ export interface UpdateDraftPost {
|
|
|
3769
3692
|
*/
|
|
3770
3693
|
language?: string | null;
|
|
3771
3694
|
/**
|
|
3772
|
-
*
|
|
3773
|
-
*
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
* Reserved for internal use.
|
|
3778
|
-
* @readonly
|
|
3779
|
-
* @maxLength 24
|
|
3780
|
-
*/
|
|
3781
|
-
contentId?: string | null;
|
|
3782
|
-
/**
|
|
3783
|
-
* Reserved for internal use.
|
|
3784
|
-
* @format GUID
|
|
3695
|
+
* Draft Post rich content.
|
|
3696
|
+
*
|
|
3697
|
+
* <widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">
|
|
3698
|
+
* <a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>
|
|
3699
|
+
* </widget>
|
|
3785
3700
|
*/
|
|
3786
|
-
editingSessionId?: string | null;
|
|
3787
|
-
/** Draft post rich content. */
|
|
3788
3701
|
richContent?: RichContent;
|
|
3789
3702
|
/**
|
|
3790
3703
|
* Status of the draft post.
|
|
@@ -3793,12 +3706,6 @@ export interface UpdateDraftPost {
|
|
|
3793
3706
|
status?: Status;
|
|
3794
3707
|
/** Details of the draft post in review. Only relevant to posts submitted by guest writers. */
|
|
3795
3708
|
moderationDetails?: ModerationDetails;
|
|
3796
|
-
/**
|
|
3797
|
-
* Reserved for internal use.
|
|
3798
|
-
* @readonly
|
|
3799
|
-
* @format GUID
|
|
3800
|
-
*/
|
|
3801
|
-
mostRecentContributorId?: string | null;
|
|
3802
3709
|
/**
|
|
3803
3710
|
* Indicates if there are changes made to the draft post that have not yet been published.
|
|
3804
3711
|
* @readonly
|
|
@@ -3814,27 +3721,10 @@ export interface UpdateDraftPost {
|
|
|
3814
3721
|
* @readonly
|
|
3815
3722
|
*/
|
|
3816
3723
|
scheduledPublishDate?: Date | null;
|
|
3817
|
-
/** Reserved for internal use. */
|
|
3818
|
-
content?: Record<string, any> | null;
|
|
3819
3724
|
/** Date the post was first published. */
|
|
3820
3725
|
firstPublishedDate?: Date | null;
|
|
3821
3726
|
/** SEO data. */
|
|
3822
3727
|
seoData?: SeoSchema;
|
|
3823
|
-
/**
|
|
3824
|
-
* @internal Deprecated.
|
|
3825
|
-
* @internal Deprecated.
|
|
3826
|
-
* @deprecated
|
|
3827
|
-
* @replacedBy preview_text_paragraph
|
|
3828
|
-
* @targetRemovalDate 2024-06-30
|
|
3829
|
-
*/
|
|
3830
|
-
paidContentParagraph?: number | null;
|
|
3831
|
-
/**
|
|
3832
|
-
* Reserved for internal use.
|
|
3833
|
-
* @readonly
|
|
3834
|
-
* @maxSize 5000
|
|
3835
|
-
* @maxLength 100
|
|
3836
|
-
*/
|
|
3837
|
-
slugs?: string[];
|
|
3838
3728
|
/**
|
|
3839
3729
|
* Draft post URL preview. What the URL will look like once the post is published.
|
|
3840
3730
|
* @readonly
|
|
@@ -3854,12 +3744,6 @@ export interface UpdateDraftPost {
|
|
|
3854
3744
|
media?: Media;
|
|
3855
3745
|
/** Number of paragraphs to display in a paid content preview for non-paying users. */
|
|
3856
3746
|
previewTextParagraph?: number | null;
|
|
3857
|
-
/**
|
|
3858
|
-
* Reserved for internal use.
|
|
3859
|
-
* @readonly
|
|
3860
|
-
* @maxLength 24
|
|
3861
|
-
*/
|
|
3862
|
-
internalId?: string | null;
|
|
3863
3747
|
}
|
|
3864
3748
|
export interface UpdateDraftPostOptions {
|
|
3865
3749
|
/**
|
|
@@ -3879,10 +3763,10 @@ export interface UpdateDraftPostOptions {
|
|
|
3879
3763
|
fieldsets?: Field[];
|
|
3880
3764
|
}
|
|
3881
3765
|
/**
|
|
3882
|
-
* Moves a draft post
|
|
3883
|
-
* A published post can also be deleted by
|
|
3766
|
+
* Moves a draft post to the trash bin.
|
|
3767
|
+
* A published post can also be deleted by the `post.id`. See the Posts API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/blog/posts/) | [REST](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/post-object)) for more information about posts.
|
|
3884
3768
|
*
|
|
3885
|
-
*
|
|
3769
|
+
* To permanently delete a post bypassing the trash bin, set the `permanent` field value to `true`. The post can't be restored after this.
|
|
3886
3770
|
* @param draftPostId - Draft post ID.
|
|
3887
3771
|
* @public
|
|
3888
3772
|
* @requiredField draftPostId
|
|
@@ -3903,9 +3787,9 @@ export interface DeleteDraftPostOptions {
|
|
|
3903
3787
|
permanent?: boolean;
|
|
3904
3788
|
}
|
|
3905
3789
|
/**
|
|
3906
|
-
* Permanently deletes a draft post
|
|
3790
|
+
* Permanently deletes a draft post that is currently in the trash bin.
|
|
3907
3791
|
*
|
|
3908
|
-
*
|
|
3792
|
+
* This action is permanent and can't be reversed.
|
|
3909
3793
|
* @param draftPostId - Draft post ID.
|
|
3910
3794
|
* @public
|
|
3911
3795
|
* @requiredField draftPostId
|
|
@@ -3954,7 +3838,6 @@ export interface ListDraftPostsOptions {
|
|
|
3954
3838
|
* Draft post status filter.
|
|
3955
3839
|
*
|
|
3956
3840
|
* If omitted, draft posts with all statuses are returned.
|
|
3957
|
-
* `IN_MODERATION` is deprecated, use `IN_REVIEW` instead.
|
|
3958
3841
|
*/
|
|
3959
3842
|
status?: Status;
|
|
3960
3843
|
/**
|
|
@@ -3982,9 +3865,7 @@ export interface ListDraftPostsOptions {
|
|
|
3982
3865
|
fieldsets?: Field[];
|
|
3983
3866
|
}
|
|
3984
3867
|
/**
|
|
3985
|
-
*
|
|
3986
|
-
*
|
|
3987
|
-
* Uses the provided `draftPostId` to retrieve a previously deleted draft post from the trash bin.
|
|
3868
|
+
* Retrieves a deleted draft post from the trash bin by the provided ID.
|
|
3988
3869
|
* @param draftPostId - Draft post ID.
|
|
3989
3870
|
* @public
|
|
3990
3871
|
* @requiredField draftPostId
|
|
@@ -3997,8 +3878,6 @@ export interface ListDraftPostsOptions {
|
|
|
3997
3878
|
export declare function getDeletedDraftPost(draftPostId: string): Promise<GetDeletedDraftPostResponse & GetDeletedDraftPostResponseNonNullableFields>;
|
|
3998
3879
|
/**
|
|
3999
3880
|
* Restores a deleted draft post from the trash bin by the provided ID.
|
|
4000
|
-
*
|
|
4001
|
-
* Uses the `draftPostId` to restore a deleted draft post from the trash bin.
|
|
4002
3881
|
* @param draftPostId - Draft post ID.
|
|
4003
3882
|
* @public
|
|
4004
3883
|
* @requiredField draftPostId
|
|
@@ -4010,12 +3889,20 @@ export declare function getDeletedDraftPost(draftPostId: string): Promise<GetDel
|
|
|
4010
3889
|
*/
|
|
4011
3890
|
export declare function restoreFromTrashBin(draftPostId: string): Promise<RestoreFromTrashBinResponse & RestoreFromTrashBinResponseNonNullableFields>;
|
|
4012
3891
|
/**
|
|
4013
|
-
*
|
|
3892
|
+
* Creates a query to retrieve a list of up to 100 draft posts.
|
|
4014
3893
|
*
|
|
4015
|
-
*
|
|
4016
|
-
*
|
|
4017
|
-
*
|
|
4018
|
-
*
|
|
3894
|
+
*
|
|
3895
|
+
* The `queryDraftPosts()` function builds a query to retrieve a list of up to 100 draft posts, and returns a `DraftPostsQueryBuilder` object.
|
|
3896
|
+
*
|
|
3897
|
+
* The returned object contains the query definition, which is typically used to run the query using the `find()` function.
|
|
3898
|
+
*
|
|
3899
|
+
* You can refine the query by chaining `DraftPostsQueryBuilder` functions onto the query. `DraftPostsQueryBuilder` functions enable you to sort, filter, and control the results that `queryDraftPosts()` returns.
|
|
3900
|
+
*
|
|
3901
|
+
* `queryDraftPosts()` runs with these `DraftPostsQueryBuilder` defaults that can be overridden:
|
|
3902
|
+
* - `limit(50)`
|
|
3903
|
+
* - `ascending('_id')`
|
|
3904
|
+
*
|
|
3905
|
+
* The following `DraftPostsQueryBuilder` functions are supported for `queryDraftPosts()`. For a full description of the Draft Posts object, see the object returned for the `items` property in `DraftPostsQueryResult`.
|
|
4019
3906
|
* @public
|
|
4020
3907
|
* @param options - Options for querying draft posts.
|
|
4021
3908
|
* @permissionScope Manage Blog
|
|
@@ -4089,9 +3976,11 @@ export interface DraftPostsQueryBuilder {
|
|
|
4089
3976
|
find: () => Promise<DraftPostsQueryResult>;
|
|
4090
3977
|
}
|
|
4091
3978
|
/**
|
|
4092
|
-
* Publishes a
|
|
3979
|
+
* Publishes a draft post by ID. This creates a new post ([SDK](https://dev.wix.com/docs/sdk/backend-modules/blog/posts/) | [REST](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/post-object))
|
|
3980
|
+
* with the data from the draft post.
|
|
4093
3981
|
*
|
|
4094
|
-
* If the
|
|
3982
|
+
* If the draft post was already published, the published post will be updated with the latest values
|
|
3983
|
+
* from the draft post.
|
|
4095
3984
|
* @param draftPostId - Draft post ID.
|
|
4096
3985
|
* @public
|
|
4097
3986
|
* @requiredField draftPostId
|
|
@@ -404,12 +404,6 @@ export var Status;
|
|
|
404
404
|
Status["SCHEDULED"] = "SCHEDULED";
|
|
405
405
|
/** Status indicating the draft post is deleted. */
|
|
406
406
|
Status["DELETED"] = "DELETED";
|
|
407
|
-
/**
|
|
408
|
-
* Deprecated. Use `IN_REVIEW` instead. Status indicating the draft post is in review.
|
|
409
|
-
* Target removal date 2024-06-30
|
|
410
|
-
* Reserved for internal use.
|
|
411
|
-
*/
|
|
412
|
-
Status["IN_MODERATION"] = "IN_MODERATION";
|
|
413
407
|
/** Status indicating the draft post is in review. */
|
|
414
408
|
Status["IN_REVIEW"] = "IN_REVIEW";
|
|
415
409
|
})(Status || (Status = {}));
|
|
@@ -454,11 +448,6 @@ export var Field;
|
|
|
454
448
|
Field["UNKNOWN"] = "UNKNOWN";
|
|
455
449
|
/** Includes draft post preview URL. */
|
|
456
450
|
Field["URL"] = "URL";
|
|
457
|
-
/**
|
|
458
|
-
* Includes internal id field.
|
|
459
|
-
* Reserved for internal use.
|
|
460
|
-
*/
|
|
461
|
-
Field["INTERNAL_ID"] = "INTERNAL_ID";
|
|
462
451
|
/** Includes content field. */
|
|
463
452
|
Field["CONTENT"] = "CONTENT";
|
|
464
453
|
/** Includes rich content field. */
|
|
@@ -498,7 +487,13 @@ export var SortOrder;
|
|
|
498
487
|
/**
|
|
499
488
|
* Creates a draft post.
|
|
500
489
|
*
|
|
501
|
-
*
|
|
490
|
+
* For 3rd-party apps, `memberId` is a required field.
|
|
491
|
+
*
|
|
492
|
+
* In `categoryIds`, only categories that already exist will be added to the draft post. Including
|
|
493
|
+
* `categoryIds` that do not exist will not return an error, but they will not be added to the `categoryIds` array.
|
|
494
|
+
* If some of the categories exist, those will be added while those that do not exist will not be added to `categoryIds`.
|
|
495
|
+
* You can check which categories are available with
|
|
496
|
+
* List Categories ([SDK](https://dev.wix.com/docs/sdk/backend-modules/blog/categories/list-categories) | [REST](https://dev.wix.com/docs/rest/business-solutions/blog/category/list-categories)).
|
|
502
497
|
* @param draftPost - Draft post to create.
|
|
503
498
|
* @public
|
|
504
499
|
* @requiredField draftPost
|
|
@@ -775,7 +770,7 @@ export async function bulkUpdateDraftPosts(options) {
|
|
|
775
770
|
/**
|
|
776
771
|
* Retrieves a list of up to 100 deleted draft posts.
|
|
777
772
|
*
|
|
778
|
-
* List
|
|
773
|
+
* List Draft Posts runs with these defaults, which you can override:
|
|
779
774
|
* - `editedDate` is sorted in descending order. In this case,`editedDate` implies the date the post was deleted.
|
|
780
775
|
* - `paging.limit` is `50`.
|
|
781
776
|
* - `paging.offset` is `0`.
|
|
@@ -845,9 +840,7 @@ export async function listDeletedDraftPosts(options) {
|
|
|
845
840
|
}
|
|
846
841
|
}
|
|
847
842
|
/**
|
|
848
|
-
*
|
|
849
|
-
*
|
|
850
|
-
* Uses the provided `draftPostId` to retrieve a draft post.
|
|
843
|
+
* Retrieves a draft post by the provided ID.
|
|
851
844
|
* @param draftPostId - Draft post ID.
|
|
852
845
|
* @public
|
|
853
846
|
* @requiredField draftPostId
|
|
@@ -1003,10 +996,10 @@ export async function updateDraftPost(_id, draftPost, options) {
|
|
|
1003
996
|
}
|
|
1004
997
|
}
|
|
1005
998
|
/**
|
|
1006
|
-
* Moves a draft post
|
|
1007
|
-
* A published post can also be deleted by
|
|
999
|
+
* Moves a draft post to the trash bin.
|
|
1000
|
+
* A published post can also be deleted by the `post.id`. See the Posts API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/blog/posts/) | [REST](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/post-object)) for more information about posts.
|
|
1008
1001
|
*
|
|
1009
|
-
*
|
|
1002
|
+
* To permanently delete a post bypassing the trash bin, set the `permanent` field value to `true`. The post can't be restored after this.
|
|
1010
1003
|
* @param draftPostId - Draft post ID.
|
|
1011
1004
|
* @public
|
|
1012
1005
|
* @requiredField draftPostId
|
|
@@ -1044,9 +1037,9 @@ export async function deleteDraftPost(draftPostId, options) {
|
|
|
1044
1037
|
}
|
|
1045
1038
|
}
|
|
1046
1039
|
/**
|
|
1047
|
-
* Permanently deletes a draft post
|
|
1040
|
+
* Permanently deletes a draft post that is currently in the trash bin.
|
|
1048
1041
|
*
|
|
1049
|
-
*
|
|
1042
|
+
* This action is permanent and can't be reversed.
|
|
1050
1043
|
* @param draftPostId - Draft post ID.
|
|
1051
1044
|
* @public
|
|
1052
1045
|
* @requiredField draftPostId
|
|
@@ -1214,9 +1207,7 @@ export async function listDraftPosts(options) {
|
|
|
1214
1207
|
}
|
|
1215
1208
|
}
|
|
1216
1209
|
/**
|
|
1217
|
-
*
|
|
1218
|
-
*
|
|
1219
|
-
* Uses the provided `draftPostId` to retrieve a previously deleted draft post from the trash bin.
|
|
1210
|
+
* Retrieves a deleted draft post from the trash bin by the provided ID.
|
|
1220
1211
|
* @param draftPostId - Draft post ID.
|
|
1221
1212
|
* @public
|
|
1222
1213
|
* @requiredField draftPostId
|
|
@@ -1275,8 +1266,6 @@ export async function getDeletedDraftPost(draftPostId) {
|
|
|
1275
1266
|
}
|
|
1276
1267
|
/**
|
|
1277
1268
|
* Restores a deleted draft post from the trash bin by the provided ID.
|
|
1278
|
-
*
|
|
1279
|
-
* Uses the `draftPostId` to restore a deleted draft post from the trash bin.
|
|
1280
1269
|
* @param draftPostId - Draft post ID.
|
|
1281
1270
|
* @public
|
|
1282
1271
|
* @requiredField draftPostId
|
|
@@ -1334,12 +1323,20 @@ export async function restoreFromTrashBin(draftPostId) {
|
|
|
1334
1323
|
}
|
|
1335
1324
|
}
|
|
1336
1325
|
/**
|
|
1337
|
-
*
|
|
1326
|
+
* Creates a query to retrieve a list of up to 100 draft posts.
|
|
1338
1327
|
*
|
|
1339
|
-
*
|
|
1340
|
-
*
|
|
1341
|
-
*
|
|
1342
|
-
*
|
|
1328
|
+
*
|
|
1329
|
+
* The `queryDraftPosts()` function builds a query to retrieve a list of up to 100 draft posts, and returns a `DraftPostsQueryBuilder` object.
|
|
1330
|
+
*
|
|
1331
|
+
* The returned object contains the query definition, which is typically used to run the query using the `find()` function.
|
|
1332
|
+
*
|
|
1333
|
+
* You can refine the query by chaining `DraftPostsQueryBuilder` functions onto the query. `DraftPostsQueryBuilder` functions enable you to sort, filter, and control the results that `queryDraftPosts()` returns.
|
|
1334
|
+
*
|
|
1335
|
+
* `queryDraftPosts()` runs with these `DraftPostsQueryBuilder` defaults that can be overridden:
|
|
1336
|
+
* - `limit(50)`
|
|
1337
|
+
* - `ascending('_id')`
|
|
1338
|
+
*
|
|
1339
|
+
* The following `DraftPostsQueryBuilder` functions are supported for `queryDraftPosts()`. For a full description of the Draft Posts object, see the object returned for the `items` property in `DraftPostsQueryResult`.
|
|
1343
1340
|
* @public
|
|
1344
1341
|
* @param options - Options for querying draft posts.
|
|
1345
1342
|
* @permissionScope Manage Blog
|
|
@@ -1419,9 +1416,11 @@ export function queryDraftPosts(options) {
|
|
|
1419
1416
|
});
|
|
1420
1417
|
}
|
|
1421
1418
|
/**
|
|
1422
|
-
* Publishes a
|
|
1419
|
+
* Publishes a draft post by ID. This creates a new post ([SDK](https://dev.wix.com/docs/sdk/backend-modules/blog/posts/) | [REST](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/post-object))
|
|
1420
|
+
* with the data from the draft post.
|
|
1423
1421
|
*
|
|
1424
|
-
* If the
|
|
1422
|
+
* If the draft post was already published, the published post will be updated with the latest values
|
|
1423
|
+
* from the draft post.
|
|
1425
1424
|
* @param draftPostId - Draft post ID.
|
|
1426
1425
|
* @public
|
|
1427
1426
|
* @requiredField draftPostId
|