@wix/auto_sdk_blog_draft-posts 1.0.128 → 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.
@@ -3649,15 +3649,13 @@ declare enum Field {
3649
3649
  UNKNOWN = "UNKNOWN",
3650
3650
  /** Includes draft post preview URL. */
3651
3651
  URL = "URL",
3652
- /** Includes content field. */
3653
- CONTENT = "CONTENT",
3654
3652
  /** Includes rich content field. */
3655
3653
  RICH_CONTENT = "RICH_CONTENT",
3656
3654
  /** If the user has not set excerpt, returns the one autogenerated from content. */
3657
3655
  GENERATED_EXCERPT = "GENERATED_EXCERPT"
3658
3656
  }
3659
3657
  /** @enumType */
3660
- type FieldWithLiterals = Field | 'UNKNOWN' | 'URL' | 'CONTENT' | 'RICH_CONTENT' | 'GENERATED_EXCERPT';
3658
+ type FieldWithLiterals = Field | 'UNKNOWN' | 'URL' | 'RICH_CONTENT' | 'GENERATED_EXCERPT';
3661
3659
  interface CreateDraftPostResponse {
3662
3660
  /** Created draft post info. */
3663
3661
  draftPost?: DraftPost;
@@ -3751,9 +3749,12 @@ interface MaskedDraftPosts {
3751
3749
  fieldMask?: string[];
3752
3750
  }
3753
3751
  declare enum Action {
3754
- /** Update the draft post. */
3752
+ /** Update the draft post. If the post is already published, the published post isn't changed. */
3755
3753
  UPDATE = "UPDATE",
3756
- /** Update and publish a draft post. */
3754
+ /**
3755
+ * Update and publish a draft post. If the post is already published, the published post is updated
3756
+ * with the draft post's values in the same call.
3757
+ */
3757
3758
  UPDATE_PUBLISH = "UPDATE_PUBLISH",
3758
3759
  /** Update the draft post and schedule a publish date. */
3759
3760
  UPDATE_SCHEDULE = "UPDATE_SCHEDULE",
@@ -3763,7 +3764,7 @@ declare enum Action {
3763
3764
  UPDATE_CANCEL_SCHEDULE = "UPDATE_CANCEL_SCHEDULE",
3764
3765
  /** Update and reject draft post. */
3765
3766
  UPDATE_REJECT = "UPDATE_REJECT",
3766
- /** Update a post that's already been published. This creates and updates a draft version of the post. The original post is still published. */
3767
+ /** Update a post that's already been published. The changes are saved to the draft post and applied to the published post. */
3767
3768
  UPDATE_PUBLICATION = "UPDATE_PUBLICATION"
3768
3769
  }
3769
3770
  /** @enumType */
@@ -4319,7 +4320,6 @@ interface TranslateDraftRequest {
4319
4320
  * Predefined sets of fields to return in the created draft post, in addition to the core draft post fields.
4320
4321
  *
4321
4322
  * - `URL`: Returns the draft post's preview URL.
4322
- * - `CONTENT`: Returns the draft post's content.
4323
4323
  * - `RICH_CONTENT`: Returns the draft post's rich content.
4324
4324
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4325
4325
  *
@@ -4375,7 +4375,6 @@ interface UpdateDraftPostLanguageRequest {
4375
4375
  * Predefined sets of fields to return in the updated draft post, in addition to the core draft post fields.
4376
4376
  *
4377
4377
  * - `URL`: Returns the draft post's preview URL.
4378
- * - `CONTENT`: Returns the draft post's content.
4379
4378
  * - `RICH_CONTENT`: Returns the draft post's rich content.
4380
4379
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4381
4380
  *
@@ -4522,6 +4521,12 @@ declare function onDraftUpdated(handler: (event: DraftUpdatedEnvelope) => void |
4522
4521
  * which is returned with an empty `title`. An untitled draft post can't be published or scheduled,
4523
4522
  * so creating it with `publish` set to `true` fails with the `POST_TITLE_REQUIRED` application error.
4524
4523
  *
4524
+ * The response includes `richContent` only when `fieldsets` contains `RICH_CONTENT`. The content is saved either way,
4525
+ * so a response without `richContent` doesn't mean the content wasn't saved.
4526
+ *
4527
+ * Each successful call creates a new draft post, even when a draft post with the same title and content already exists.
4528
+ * To read a draft post that you created, call Get Draft Post with its `id` instead of creating it again.
4529
+ *
4525
4530
  * For 3rd-party apps, `memberId` is a required field.
4526
4531
  *
4527
4532
  * In `categoryIds`, only categories that already exist will be added to the draft post. Including
@@ -4687,6 +4692,10 @@ interface GetDraftPostOptions {
4687
4692
  /**
4688
4693
  * Updates a draft post.
4689
4694
  *
4695
+ * If the post is already published, the default `UPDATE` action changes only the draft post. The published post
4696
+ * stays as it was until the draft post is published. To apply the changes to the published post, set `action` to
4697
+ * `UPDATE_PUBLISH`, which updates and publishes in one call, or call Publish Draft Post afterward.
4698
+ *
4690
4699
  * An empty or whitespace-only `title` clears the title. Fails with the `POST_TITLE_REQUIRED` application error
4691
4700
  * when `action` is `UPDATE_PUBLISH`, `UPDATE_SCHEDULE` or `UPDATE_PUBLICATION` and the draft post has no title,
4692
4701
  * or when the update clears the title of a scheduled draft post.
@@ -5240,7 +5249,6 @@ interface TranslateDraftOptions {
5240
5249
  * Predefined sets of fields to return in the created draft post, in addition to the core draft post fields.
5241
5250
  *
5242
5251
  * - `URL`: Returns the draft post's preview URL.
5243
- * - `CONTENT`: Returns the draft post's content.
5244
5252
  * - `RICH_CONTENT`: Returns the draft post's rich content.
5245
5253
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
5246
5254
  *
@@ -5278,7 +5286,6 @@ interface UpdateDraftPostLanguageOptions {
5278
5286
  * Predefined sets of fields to return in the updated draft post, in addition to the core draft post fields.
5279
5287
  *
5280
5288
  * - `URL`: Returns the draft post's preview URL.
5281
- * - `CONTENT`: Returns the draft post's content.
5282
5289
  * - `RICH_CONTENT`: Returns the draft post's rich content.
5283
5290
  * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
5284
5291
  *