@wix/auto_sdk_blog_draft-posts 1.0.112 → 1.0.113

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.
@@ -3530,6 +3530,10 @@ interface DraftPostTranslation {
3530
3530
  /** Post URL. */
3531
3531
  url?: PageUrl;
3532
3532
  }
3533
+ interface InitialDraftPostsCopied {
3534
+ /** Number of draft posts copied. */
3535
+ count?: number;
3536
+ }
3533
3537
  interface DraftCategoriesUpdated {
3534
3538
  /**
3535
3539
  * Draft post ID.
@@ -3568,244 +3572,6 @@ interface DraftTagsUpdated {
3568
3572
  */
3569
3573
  previousTags?: string[];
3570
3574
  }
3571
- interface GetDraftPostTotalsRequest {
3572
- /**
3573
- * Group results by fields (defaults to grouping by status).
3574
- * If, for example, grouping by language is passed, language values in response will be filled.
3575
- * If, for example, grouping by language is not passed, null values will be filled in language field in response.
3576
- * @maxSize 10
3577
- */
3578
- groupBy?: TotalDraftPostsGroupingFieldWithLiterals[];
3579
- /**
3580
- * Optional language filter by provided language code. Useful in multilingual context.
3581
- * @format LANGUAGE_TAG
3582
- */
3583
- language?: string | null;
3584
- }
3585
- declare enum TotalDraftPostsGroupingField {
3586
- /** Groups results by status. */
3587
- STATUS = "STATUS",
3588
- /** Groups results by language. */
3589
- LANGUAGE = "LANGUAGE"
3590
- }
3591
- /** @enumType */
3592
- type TotalDraftPostsGroupingFieldWithLiterals = TotalDraftPostsGroupingField | 'STATUS' | 'LANGUAGE';
3593
- interface GetDraftPostTotalsResponse {
3594
- /** Draft post totals. */
3595
- totalDraftPosts?: TotalDraftPosts[];
3596
- }
3597
- interface TotalDraftPosts {
3598
- /** Draft post totals in that group. */
3599
- total?: number;
3600
- /** Draft post status (only has value when grouping by status, otherwise null). */
3601
- status?: StatusWithLiterals;
3602
- /**
3603
- * Draft post language code (only has value when grouping by language, otherwise null).
3604
- * @format LANGUAGE_TAG
3605
- */
3606
- language?: string | null;
3607
- }
3608
- interface DomainEvent extends DomainEventBodyOneOf {
3609
- createdEvent?: EntityCreatedEvent;
3610
- updatedEvent?: EntityUpdatedEvent;
3611
- deletedEvent?: EntityDeletedEvent;
3612
- actionEvent?: ActionEvent;
3613
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
3614
- id?: string;
3615
- /**
3616
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
3617
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
3618
- */
3619
- entityFqdn?: string;
3620
- /**
3621
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
3622
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
3623
- */
3624
- slug?: string;
3625
- /** ID of the entity associated with the event. */
3626
- entityId?: string;
3627
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
3628
- eventTime?: Date | null;
3629
- /**
3630
- * Whether the event was triggered as a result of a privacy regulation application
3631
- * (for example, GDPR).
3632
- */
3633
- triggeredByAnonymizeRequest?: boolean | null;
3634
- /** If present, indicates the action that triggered the event. */
3635
- originatedFrom?: string | null;
3636
- /**
3637
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
3638
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
3639
- */
3640
- entityEventSequence?: string | null;
3641
- }
3642
- /** @oneof */
3643
- interface DomainEventBodyOneOf {
3644
- createdEvent?: EntityCreatedEvent;
3645
- updatedEvent?: EntityUpdatedEvent;
3646
- deletedEvent?: EntityDeletedEvent;
3647
- actionEvent?: ActionEvent;
3648
- }
3649
- interface EntityCreatedEvent {
3650
- entityAsJson?: string;
3651
- /**
3652
- * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
3653
- * @internal
3654
- */
3655
- triggeredByUndelete?: boolean | null;
3656
- /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
3657
- restoreInfo?: RestoreInfo;
3658
- /**
3659
- * Optional domain-specific metadata defined by the API owner, encoded as JSON.
3660
- * @internal
3661
- */
3662
- additionalMetadataAsJson?: string | null;
3663
- }
3664
- interface RestoreInfo {
3665
- deletedDate?: Date | null;
3666
- }
3667
- interface EntityUpdatedEvent {
3668
- /**
3669
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
3670
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
3671
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
3672
- */
3673
- currentEntityAsJson?: string;
3674
- /**
3675
- * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard
3676
- * wont populate it / have any reference to it in the API.
3677
- * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,
3678
- * the developer should send only the new (current) entity.
3679
- * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
3680
- * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
3681
- * @internal
3682
- * @deprecated
3683
- */
3684
- previousEntityAsJson?: string | null;
3685
- /**
3686
- * Map of fully qualified field paths to their previous values for fields that changed.
3687
- * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)
3688
- * @internal
3689
- */
3690
- modifiedFields?: Record<string, any>;
3691
- /**
3692
- * Optional domain-specific metadata defined by the API owner, encoded as JSON.
3693
- * @internal
3694
- */
3695
- additionalMetadataAsJson?: string | null;
3696
- }
3697
- interface EntityDeletedEvent {
3698
- /**
3699
- * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled
3700
- * @internal
3701
- */
3702
- movedToTrash?: boolean | null;
3703
- /** Entity that was deleted. */
3704
- deletedEntityAsJson?: string | null;
3705
- /**
3706
- * Optional domain-specific metadata defined by the API owner, encoded as JSON.
3707
- * @internal
3708
- */
3709
- additionalMetadataAsJson?: string | null;
3710
- }
3711
- interface ActionEvent {
3712
- bodyAsJson?: string;
3713
- }
3714
- interface MessageEnvelope {
3715
- /**
3716
- * App instance ID.
3717
- * @format GUID
3718
- */
3719
- instanceId?: string | null;
3720
- /**
3721
- * Event type.
3722
- * @maxLength 150
3723
- */
3724
- eventType?: string;
3725
- /** The identification type and identity data. */
3726
- identity?: IdentificationData;
3727
- /** Stringify payload. */
3728
- data?: string;
3729
- /** Details related to the account */
3730
- accountInfo?: AccountInfo;
3731
- }
3732
- interface IdentificationData extends IdentificationDataIdOneOf {
3733
- /**
3734
- * ID of a site visitor that has not logged in to the site.
3735
- * @format GUID
3736
- */
3737
- anonymousVisitorId?: string;
3738
- /**
3739
- * ID of a site visitor that has logged in to the site.
3740
- * @format GUID
3741
- */
3742
- memberId?: string;
3743
- /**
3744
- * ID of a Wix user (site owner, contributor, etc.).
3745
- * @format GUID
3746
- */
3747
- wixUserId?: string;
3748
- /**
3749
- * ID of an app.
3750
- * @format GUID
3751
- */
3752
- appId?: string;
3753
- /** @readonly */
3754
- identityType?: WebhookIdentityTypeWithLiterals;
3755
- }
3756
- /** @oneof */
3757
- interface IdentificationDataIdOneOf {
3758
- /**
3759
- * ID of a site visitor that has not logged in to the site.
3760
- * @format GUID
3761
- */
3762
- anonymousVisitorId?: string;
3763
- /**
3764
- * ID of a site visitor that has logged in to the site.
3765
- * @format GUID
3766
- */
3767
- memberId?: string;
3768
- /**
3769
- * ID of a Wix user (site owner, contributor, etc.).
3770
- * @format GUID
3771
- */
3772
- wixUserId?: string;
3773
- /**
3774
- * ID of an app.
3775
- * @format GUID
3776
- */
3777
- appId?: string;
3778
- }
3779
- declare enum WebhookIdentityType {
3780
- UNKNOWN = "UNKNOWN",
3781
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
3782
- MEMBER = "MEMBER",
3783
- WIX_USER = "WIX_USER",
3784
- APP = "APP"
3785
- }
3786
- /** @enumType */
3787
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
3788
- interface AccountInfo {
3789
- /**
3790
- * ID of the Wix account associated with the event.
3791
- * @format GUID
3792
- */
3793
- accountId?: string | null;
3794
- /**
3795
- * ID of the parent Wix account. Only included when accountId belongs to a child account.
3796
- * @format GUID
3797
- */
3798
- parentAccountId?: string | null;
3799
- /**
3800
- * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
3801
- * @format GUID
3802
- */
3803
- siteId?: string | null;
3804
- }
3805
- interface InitialDraftPostsCopied {
3806
- /** Number of draft posts copied. */
3807
- count?: number;
3808
- }
3809
3575
  interface CreateDraftPostRequest {
3810
3576
  /** Draft post to create. */
3811
3577
  draftPost: DraftPost;
@@ -4455,12 +4221,338 @@ interface DraftPostCount {
4455
4221
  /** Number of posts. */
4456
4222
  postCount?: number;
4457
4223
  }
4458
- interface BulkRevertToUnpublishedRequest {
4224
+ interface DomainEvent extends DomainEventBodyOneOf {
4225
+ createdEvent?: EntityCreatedEvent;
4226
+ updatedEvent?: EntityUpdatedEvent;
4227
+ deletedEvent?: EntityDeletedEvent;
4228
+ actionEvent?: ActionEvent;
4229
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
4230
+ id?: string;
4459
4231
  /**
4460
- * Source post IDs.
4461
- * @minSize 1
4462
- * @maxSize 100
4463
- * @format GUID
4232
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
4233
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
4234
+ */
4235
+ entityFqdn?: string;
4236
+ /**
4237
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
4238
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
4239
+ */
4240
+ slug?: string;
4241
+ /** ID of the entity associated with the event. */
4242
+ entityId?: string;
4243
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
4244
+ eventTime?: Date | null;
4245
+ /**
4246
+ * Whether the event was triggered as a result of a privacy regulation application
4247
+ * (for example, GDPR).
4248
+ */
4249
+ triggeredByAnonymizeRequest?: boolean | null;
4250
+ /** If present, indicates the action that triggered the event. */
4251
+ originatedFrom?: string | null;
4252
+ /**
4253
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
4254
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
4255
+ */
4256
+ entityEventSequence?: string | null;
4257
+ }
4258
+ /** @oneof */
4259
+ interface DomainEventBodyOneOf {
4260
+ createdEvent?: EntityCreatedEvent;
4261
+ updatedEvent?: EntityUpdatedEvent;
4262
+ deletedEvent?: EntityDeletedEvent;
4263
+ actionEvent?: ActionEvent;
4264
+ }
4265
+ interface EntityCreatedEvent {
4266
+ entityAsJson?: string;
4267
+ /**
4268
+ * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
4269
+ * @internal
4270
+ */
4271
+ triggeredByUndelete?: boolean | null;
4272
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
4273
+ restoreInfo?: RestoreInfo;
4274
+ /**
4275
+ * Optional domain-specific metadata defined by the API owner, encoded as JSON.
4276
+ * @internal
4277
+ */
4278
+ additionalMetadataAsJson?: string | null;
4279
+ }
4280
+ interface RestoreInfo {
4281
+ deletedDate?: Date | null;
4282
+ }
4283
+ interface EntityUpdatedEvent {
4284
+ /**
4285
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
4286
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
4287
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
4288
+ */
4289
+ currentEntityAsJson?: string;
4290
+ /**
4291
+ * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard
4292
+ * wont populate it / have any reference to it in the API.
4293
+ * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,
4294
+ * the developer should send only the new (current) entity.
4295
+ * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
4296
+ * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
4297
+ * @internal
4298
+ * @deprecated
4299
+ */
4300
+ previousEntityAsJson?: string | null;
4301
+ /**
4302
+ * Map of fully qualified field paths to their previous values for fields that changed.
4303
+ * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)
4304
+ * @internal
4305
+ */
4306
+ modifiedFields?: Record<string, any>;
4307
+ /**
4308
+ * Optional domain-specific metadata defined by the API owner, encoded as JSON.
4309
+ * @internal
4310
+ */
4311
+ additionalMetadataAsJson?: string | null;
4312
+ }
4313
+ interface EntityDeletedEvent {
4314
+ /**
4315
+ * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled
4316
+ * @internal
4317
+ */
4318
+ movedToTrash?: boolean | null;
4319
+ /** Entity that was deleted. */
4320
+ deletedEntityAsJson?: string | null;
4321
+ /**
4322
+ * Optional domain-specific metadata defined by the API owner, encoded as JSON.
4323
+ * @internal
4324
+ */
4325
+ additionalMetadataAsJson?: string | null;
4326
+ }
4327
+ interface ActionEvent {
4328
+ bodyAsJson?: string;
4329
+ }
4330
+ interface MessageEnvelope {
4331
+ /**
4332
+ * App instance ID.
4333
+ * @format GUID
4334
+ */
4335
+ instanceId?: string | null;
4336
+ /**
4337
+ * Event type.
4338
+ * @maxLength 150
4339
+ */
4340
+ eventType?: string;
4341
+ /** The identification type and identity data. */
4342
+ identity?: IdentificationData;
4343
+ /** Stringify payload. */
4344
+ data?: string;
4345
+ /** Details related to the account */
4346
+ accountInfo?: AccountInfo;
4347
+ }
4348
+ interface IdentificationData extends IdentificationDataIdOneOf {
4349
+ /**
4350
+ * ID of a site visitor that has not logged in to the site.
4351
+ * @format GUID
4352
+ */
4353
+ anonymousVisitorId?: string;
4354
+ /**
4355
+ * ID of a site visitor that has logged in to the site.
4356
+ * @format GUID
4357
+ */
4358
+ memberId?: string;
4359
+ /**
4360
+ * ID of a Wix user (site owner, contributor, etc.).
4361
+ * @format GUID
4362
+ */
4363
+ wixUserId?: string;
4364
+ /**
4365
+ * ID of an app.
4366
+ * @format GUID
4367
+ */
4368
+ appId?: string;
4369
+ /** @readonly */
4370
+ identityType?: WebhookIdentityTypeWithLiterals;
4371
+ }
4372
+ /** @oneof */
4373
+ interface IdentificationDataIdOneOf {
4374
+ /**
4375
+ * ID of a site visitor that has not logged in to the site.
4376
+ * @format GUID
4377
+ */
4378
+ anonymousVisitorId?: string;
4379
+ /**
4380
+ * ID of a site visitor that has logged in to the site.
4381
+ * @format GUID
4382
+ */
4383
+ memberId?: string;
4384
+ /**
4385
+ * ID of a Wix user (site owner, contributor, etc.).
4386
+ * @format GUID
4387
+ */
4388
+ wixUserId?: string;
4389
+ /**
4390
+ * ID of an app.
4391
+ * @format GUID
4392
+ */
4393
+ appId?: string;
4394
+ }
4395
+ declare enum WebhookIdentityType {
4396
+ UNKNOWN = "UNKNOWN",
4397
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
4398
+ MEMBER = "MEMBER",
4399
+ WIX_USER = "WIX_USER",
4400
+ APP = "APP"
4401
+ }
4402
+ /** @enumType */
4403
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
4404
+ interface AccountInfo {
4405
+ /**
4406
+ * ID of the Wix account associated with the event.
4407
+ * @format GUID
4408
+ */
4409
+ accountId?: string | null;
4410
+ /**
4411
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
4412
+ * @format GUID
4413
+ */
4414
+ parentAccountId?: string | null;
4415
+ /**
4416
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
4417
+ * @format GUID
4418
+ */
4419
+ siteId?: string | null;
4420
+ }
4421
+ interface GetDraftPostTotalsRequest {
4422
+ /**
4423
+ * Group results by fields (defaults to grouping by status).
4424
+ * If, for example, grouping by language is passed, language values in response will be filled.
4425
+ * If, for example, grouping by language is not passed, null values will be filled in language field in response.
4426
+ * @maxSize 10
4427
+ */
4428
+ groupBy?: TotalDraftPostsGroupingFieldWithLiterals[];
4429
+ /**
4430
+ * Optional language filter by provided language code. Useful in multilingual context.
4431
+ * @format LANGUAGE_TAG
4432
+ */
4433
+ language?: string | null;
4434
+ }
4435
+ declare enum TotalDraftPostsGroupingField {
4436
+ /** Groups results by status. */
4437
+ STATUS = "STATUS",
4438
+ /** Groups results by language. */
4439
+ LANGUAGE = "LANGUAGE"
4440
+ }
4441
+ /** @enumType */
4442
+ type TotalDraftPostsGroupingFieldWithLiterals = TotalDraftPostsGroupingField | 'STATUS' | 'LANGUAGE';
4443
+ interface GetDraftPostTotalsResponse {
4444
+ /** Draft post totals. */
4445
+ totalDraftPosts?: TotalDraftPosts[];
4446
+ }
4447
+ interface TotalDraftPosts {
4448
+ /** Draft post totals in that group. */
4449
+ total?: number;
4450
+ /** Draft post status (only has value when grouping by status, otherwise null). */
4451
+ status?: StatusWithLiterals;
4452
+ /**
4453
+ * Draft post language code (only has value when grouping by language, otherwise null).
4454
+ * @format LANGUAGE_TAG
4455
+ */
4456
+ language?: string | null;
4457
+ }
4458
+ interface TranslateDraftRequest {
4459
+ /**
4460
+ * ID of the draft post or published post to translate.
4461
+ * @format GUID
4462
+ */
4463
+ postId: string;
4464
+ /**
4465
+ * Language to translate the post into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
4466
+ * For example, `de` for German, or `pt-br` for Brazilian Portuguese.
4467
+ * @format LANGUAGE_TAG
4468
+ */
4469
+ language: string;
4470
+ /**
4471
+ * Predefined sets of fields to return in the created draft post, in addition to the core draft post fields.
4472
+ *
4473
+ * - `URL`: Returns the draft post's preview URL.
4474
+ * - `CONTENT`: Returns the draft post's content.
4475
+ * - `RICH_CONTENT`: Returns the draft post's rich content.
4476
+ * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4477
+ *
4478
+ * Default: Core draft post fields only.
4479
+ * @maxSize 10
4480
+ */
4481
+ fieldsets?: FieldWithLiterals[];
4482
+ /**
4483
+ * Whether to machine translate the title and content into the target language.
4484
+ *
4485
+ * Default: `false`
4486
+ * @internal
4487
+ */
4488
+ useAutoTranslation?: boolean;
4489
+ }
4490
+ interface TranslateDraftResponse {
4491
+ /** Created draft post. */
4492
+ draftPost?: DraftPost;
4493
+ }
4494
+ interface IsDraftPostAutoTranslatableRequest {
4495
+ /**
4496
+ * Draft post ID.
4497
+ * @format GUID
4498
+ */
4499
+ draftPostId?: string;
4500
+ }
4501
+ interface IsDraftPostAutoTranslatableResponse {
4502
+ /**
4503
+ * Draft post ID.
4504
+ * @format GUID
4505
+ */
4506
+ draftPostId?: string;
4507
+ /** Whether enough machine translation word credits are available to translate the draft post. */
4508
+ translatable?: boolean;
4509
+ /** Number of words in the draft post's title. */
4510
+ titleWordCount?: number;
4511
+ /** Number of words in the draft post's content. */
4512
+ contentWordCount?: number;
4513
+ /** Number of machine translation word credits currently available. `-1` if the site's quota is unlimited. */
4514
+ availableAutoTranslateWords?: number;
4515
+ /** Number of machine translation word credits that remain after translating the draft post. `-1` if the site's quota is unlimited. */
4516
+ availableAutoTranslateWordsAfter?: number;
4517
+ /** Number of characters in the draft post's plain text content. */
4518
+ contentTextCharacterCount?: number;
4519
+ }
4520
+ interface UpdateDraftPostLanguageRequest {
4521
+ /**
4522
+ * ID of the draft post to update.
4523
+ * @format GUID
4524
+ */
4525
+ postId: string;
4526
+ /**
4527
+ * New language of the draft post, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
4528
+ * For example, `de` for German, or `pt-br` for Brazilian Portuguese.
4529
+ * @minLength 2
4530
+ * @format LANGUAGE_TAG
4531
+ */
4532
+ language: string;
4533
+ /**
4534
+ * Predefined sets of fields to return in the updated draft post, in addition to the core draft post fields.
4535
+ *
4536
+ * - `URL`: Returns the draft post's preview URL.
4537
+ * - `CONTENT`: Returns the draft post's content.
4538
+ * - `RICH_CONTENT`: Returns the draft post's rich content.
4539
+ * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4540
+ *
4541
+ * Default: Core draft post fields only.
4542
+ * @maxSize 10
4543
+ */
4544
+ fieldsets?: FieldWithLiterals[];
4545
+ }
4546
+ interface UpdateDraftPostLanguageResponse {
4547
+ /** Updated draft post. */
4548
+ draftPost?: DraftPost;
4549
+ }
4550
+ interface BulkRevertToUnpublishedRequest {
4551
+ /**
4552
+ * Source post IDs.
4553
+ * @minSize 1
4554
+ * @maxSize 100
4555
+ * @format GUID
4464
4556
  */
4465
4557
  postIds?: string[];
4466
4558
  /** Should full draft post be returned. */
@@ -4602,98 +4694,6 @@ interface MarkPostAsInModerationResponse {
4602
4694
  /** Updated post draft. */
4603
4695
  draftPost?: DraftPost;
4604
4696
  }
4605
- interface TranslateDraftRequest {
4606
- /**
4607
- * ID of the draft post or published post to translate.
4608
- * @format GUID
4609
- */
4610
- postId: string;
4611
- /**
4612
- * Language to translate the post into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
4613
- * For example, `de` for German, or `pt-br` for Brazilian Portuguese.
4614
- * @format LANGUAGE_TAG
4615
- */
4616
- language: string;
4617
- /**
4618
- * Predefined sets of fields to return in the created draft post, in addition to the core draft post fields.
4619
- *
4620
- * - `URL`: Returns the draft post's preview URL.
4621
- * - `CONTENT`: Returns the draft post's content.
4622
- * - `RICH_CONTENT`: Returns the draft post's rich content.
4623
- * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4624
- *
4625
- * Default: Core draft post fields only.
4626
- * @maxSize 10
4627
- */
4628
- fieldsets?: FieldWithLiterals[];
4629
- /**
4630
- * Whether to machine translate the title and content into the target language.
4631
- *
4632
- * Default: `false`
4633
- * @internal
4634
- */
4635
- useAutoTranslation?: boolean;
4636
- }
4637
- interface TranslateDraftResponse {
4638
- /** Created draft post. */
4639
- draftPost?: DraftPost;
4640
- }
4641
- interface IsDraftPostAutoTranslatableRequest {
4642
- /**
4643
- * Draft post ID.
4644
- * @format GUID
4645
- */
4646
- draftPostId?: string;
4647
- }
4648
- interface IsDraftPostAutoTranslatableResponse {
4649
- /**
4650
- * Draft post ID.
4651
- * @format GUID
4652
- */
4653
- draftPostId?: string;
4654
- /** Whether enough machine translation word credits are available to translate the draft post. */
4655
- translatable?: boolean;
4656
- /** Number of words in the draft post's title. */
4657
- titleWordCount?: number;
4658
- /** Number of words in the draft post's content. */
4659
- contentWordCount?: number;
4660
- /** Number of machine translation word credits currently available. `-1` if the site's quota is unlimited. */
4661
- availableAutoTranslateWords?: number;
4662
- /** Number of machine translation word credits that remain after translating the draft post. `-1` if the site's quota is unlimited. */
4663
- availableAutoTranslateWordsAfter?: number;
4664
- /** Number of characters in the draft post's plain text content. */
4665
- contentTextCharacterCount?: number;
4666
- }
4667
- interface UpdateDraftPostLanguageRequest {
4668
- /**
4669
- * ID of the draft post to update.
4670
- * @format GUID
4671
- */
4672
- postId: string;
4673
- /**
4674
- * New language of the draft post, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
4675
- * For example, `de` for German, or `pt-br` for Brazilian Portuguese.
4676
- * @minLength 2
4677
- * @format LANGUAGE_TAG
4678
- */
4679
- language: string;
4680
- /**
4681
- * Predefined sets of fields to return in the updated draft post, in addition to the core draft post fields.
4682
- *
4683
- * - `URL`: Returns the draft post's preview URL.
4684
- * - `CONTENT`: Returns the draft post's content.
4685
- * - `RICH_CONTENT`: Returns the draft post's rich content.
4686
- * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4687
- *
4688
- * Default: Core draft post fields only.
4689
- * @maxSize 10
4690
- */
4691
- fieldsets?: FieldWithLiterals[];
4692
- }
4693
- interface UpdateDraftPostLanguageResponse {
4694
- /** Updated draft post. */
4695
- draftPost?: DraftPost;
4696
- }
4697
4697
 
4698
4698
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
4699
4699
  getUrl: (context: any) => string;