@wix/auto_sdk_blog_draft-posts 1.0.120 → 1.0.121

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.
@@ -3593,10 +3593,6 @@ interface DraftPostTranslation {
3593
3593
  /** Post URL. */
3594
3594
  url?: PageUrl;
3595
3595
  }
3596
- interface InitialDraftPostsCopied {
3597
- /** Number of draft posts copied. */
3598
- count?: number;
3599
- }
3600
3596
  interface DraftCategoriesUpdated {
3601
3597
  /**
3602
3598
  * Draft post ID.
@@ -3635,6 +3631,244 @@ interface DraftTagsUpdated {
3635
3631
  */
3636
3632
  previousTags?: string[];
3637
3633
  }
3634
+ interface GetDraftPostTotalsRequest {
3635
+ /**
3636
+ * Group results by fields (defaults to grouping by status).
3637
+ * If, for example, grouping by language is passed, language values in response will be filled.
3638
+ * If, for example, grouping by language is not passed, null values will be filled in language field in response.
3639
+ * @maxSize 10
3640
+ */
3641
+ groupBy?: TotalDraftPostsGroupingFieldWithLiterals[];
3642
+ /**
3643
+ * Optional language filter by provided language code. Useful in multilingual context.
3644
+ * @format LANGUAGE_TAG
3645
+ */
3646
+ language?: string | null;
3647
+ }
3648
+ declare enum TotalDraftPostsGroupingField {
3649
+ /** Groups results by status. */
3650
+ STATUS = "STATUS",
3651
+ /** Groups results by language. */
3652
+ LANGUAGE = "LANGUAGE"
3653
+ }
3654
+ /** @enumType */
3655
+ type TotalDraftPostsGroupingFieldWithLiterals = TotalDraftPostsGroupingField | 'STATUS' | 'LANGUAGE';
3656
+ interface GetDraftPostTotalsResponse {
3657
+ /** Draft post totals. */
3658
+ totalDraftPosts?: TotalDraftPosts[];
3659
+ }
3660
+ interface TotalDraftPosts {
3661
+ /** Draft post totals in that group. */
3662
+ total?: number;
3663
+ /** Draft post status (only has value when grouping by status, otherwise null). */
3664
+ status?: StatusWithLiterals;
3665
+ /**
3666
+ * Draft post language code (only has value when grouping by language, otherwise null).
3667
+ * @format LANGUAGE_TAG
3668
+ */
3669
+ language?: string | null;
3670
+ }
3671
+ interface DomainEvent extends DomainEventBodyOneOf {
3672
+ createdEvent?: EntityCreatedEvent;
3673
+ updatedEvent?: EntityUpdatedEvent;
3674
+ deletedEvent?: EntityDeletedEvent;
3675
+ actionEvent?: ActionEvent;
3676
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
3677
+ id?: string;
3678
+ /**
3679
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
3680
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
3681
+ */
3682
+ entityFqdn?: string;
3683
+ /**
3684
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
3685
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
3686
+ */
3687
+ slug?: string;
3688
+ /** ID of the entity associated with the event. */
3689
+ entityId?: string;
3690
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
3691
+ eventTime?: Date | null;
3692
+ /**
3693
+ * Whether the event was triggered as a result of a privacy regulation application
3694
+ * (for example, GDPR).
3695
+ */
3696
+ triggeredByAnonymizeRequest?: boolean | null;
3697
+ /** If present, indicates the action that triggered the event. */
3698
+ originatedFrom?: string | null;
3699
+ /**
3700
+ * 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.
3701
+ * 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.
3702
+ */
3703
+ entityEventSequence?: string | null;
3704
+ }
3705
+ /** @oneof */
3706
+ interface DomainEventBodyOneOf {
3707
+ createdEvent?: EntityCreatedEvent;
3708
+ updatedEvent?: EntityUpdatedEvent;
3709
+ deletedEvent?: EntityDeletedEvent;
3710
+ actionEvent?: ActionEvent;
3711
+ }
3712
+ interface EntityCreatedEvent {
3713
+ entityAsJson?: string;
3714
+ /**
3715
+ * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
3716
+ * @internal
3717
+ */
3718
+ triggeredByUndelete?: boolean | null;
3719
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
3720
+ restoreInfo?: RestoreInfo;
3721
+ /**
3722
+ * Optional domain-specific metadata defined by the API owner, encoded as JSON.
3723
+ * @internal
3724
+ */
3725
+ additionalMetadataAsJson?: string | null;
3726
+ }
3727
+ interface RestoreInfo {
3728
+ deletedDate?: Date | null;
3729
+ }
3730
+ interface EntityUpdatedEvent {
3731
+ /**
3732
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
3733
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
3734
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
3735
+ */
3736
+ currentEntityAsJson?: string;
3737
+ /**
3738
+ * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard
3739
+ * wont populate it / have any reference to it in the API.
3740
+ * 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,
3741
+ * the developer should send only the new (current) entity.
3742
+ * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
3743
+ * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
3744
+ * @internal
3745
+ * @deprecated
3746
+ */
3747
+ previousEntityAsJson?: string | null;
3748
+ /**
3749
+ * Map of fully qualified field paths to their previous values for fields that changed.
3750
+ * 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)
3751
+ * @internal
3752
+ */
3753
+ modifiedFields?: Record<string, any>;
3754
+ /**
3755
+ * Optional domain-specific metadata defined by the API owner, encoded as JSON.
3756
+ * @internal
3757
+ */
3758
+ additionalMetadataAsJson?: string | null;
3759
+ }
3760
+ interface EntityDeletedEvent {
3761
+ /**
3762
+ * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled
3763
+ * @internal
3764
+ */
3765
+ movedToTrash?: boolean | null;
3766
+ /** Entity that was deleted. */
3767
+ deletedEntityAsJson?: string | null;
3768
+ /**
3769
+ * Optional domain-specific metadata defined by the API owner, encoded as JSON.
3770
+ * @internal
3771
+ */
3772
+ additionalMetadataAsJson?: string | null;
3773
+ }
3774
+ interface ActionEvent {
3775
+ bodyAsJson?: string;
3776
+ }
3777
+ interface MessageEnvelope {
3778
+ /**
3779
+ * App instance ID.
3780
+ * @format GUID
3781
+ */
3782
+ instanceId?: string | null;
3783
+ /**
3784
+ * Event type.
3785
+ * @maxLength 150
3786
+ */
3787
+ eventType?: string;
3788
+ /** The identification type and identity data. */
3789
+ identity?: IdentificationData;
3790
+ /** Stringify payload. */
3791
+ data?: string;
3792
+ /** Details related to the account */
3793
+ accountInfo?: AccountInfo;
3794
+ }
3795
+ interface IdentificationData extends IdentificationDataIdOneOf {
3796
+ /**
3797
+ * ID of a site visitor that has not logged in to the site.
3798
+ * @format GUID
3799
+ */
3800
+ anonymousVisitorId?: string;
3801
+ /**
3802
+ * ID of a site visitor that has logged in to the site.
3803
+ * @format GUID
3804
+ */
3805
+ memberId?: string;
3806
+ /**
3807
+ * ID of a Wix user (site owner, contributor, etc.).
3808
+ * @format GUID
3809
+ */
3810
+ wixUserId?: string;
3811
+ /**
3812
+ * ID of an app.
3813
+ * @format GUID
3814
+ */
3815
+ appId?: string;
3816
+ /** @readonly */
3817
+ identityType?: WebhookIdentityTypeWithLiterals;
3818
+ }
3819
+ /** @oneof */
3820
+ interface IdentificationDataIdOneOf {
3821
+ /**
3822
+ * ID of a site visitor that has not logged in to the site.
3823
+ * @format GUID
3824
+ */
3825
+ anonymousVisitorId?: string;
3826
+ /**
3827
+ * ID of a site visitor that has logged in to the site.
3828
+ * @format GUID
3829
+ */
3830
+ memberId?: string;
3831
+ /**
3832
+ * ID of a Wix user (site owner, contributor, etc.).
3833
+ * @format GUID
3834
+ */
3835
+ wixUserId?: string;
3836
+ /**
3837
+ * ID of an app.
3838
+ * @format GUID
3839
+ */
3840
+ appId?: string;
3841
+ }
3842
+ declare enum WebhookIdentityType {
3843
+ UNKNOWN = "UNKNOWN",
3844
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
3845
+ MEMBER = "MEMBER",
3846
+ WIX_USER = "WIX_USER",
3847
+ APP = "APP"
3848
+ }
3849
+ /** @enumType */
3850
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
3851
+ interface AccountInfo {
3852
+ /**
3853
+ * ID of the Wix account associated with the event.
3854
+ * @format GUID
3855
+ */
3856
+ accountId?: string | null;
3857
+ /**
3858
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
3859
+ * @format GUID
3860
+ */
3861
+ parentAccountId?: string | null;
3862
+ /**
3863
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
3864
+ * @format GUID
3865
+ */
3866
+ siteId?: string | null;
3867
+ }
3868
+ interface InitialDraftPostsCopied {
3869
+ /** Number of draft posts copied. */
3870
+ count?: number;
3871
+ }
3638
3872
  interface CreateDraftPostRequest {
3639
3873
  /** Draft post to create. */
3640
3874
  draftPost: DraftPost;
@@ -4284,338 +4518,12 @@ interface DraftPostCount {
4284
4518
  /** Number of posts. */
4285
4519
  postCount?: number;
4286
4520
  }
4287
- interface DomainEvent extends DomainEventBodyOneOf {
4288
- createdEvent?: EntityCreatedEvent;
4289
- updatedEvent?: EntityUpdatedEvent;
4290
- deletedEvent?: EntityDeletedEvent;
4291
- actionEvent?: ActionEvent;
4292
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
4293
- id?: string;
4521
+ interface BulkRevertToUnpublishedRequest {
4294
4522
  /**
4295
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
4296
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
4297
- */
4298
- entityFqdn?: string;
4299
- /**
4300
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
4301
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
4302
- */
4303
- slug?: string;
4304
- /** ID of the entity associated with the event. */
4305
- entityId?: string;
4306
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
4307
- eventTime?: Date | null;
4308
- /**
4309
- * Whether the event was triggered as a result of a privacy regulation application
4310
- * (for example, GDPR).
4311
- */
4312
- triggeredByAnonymizeRequest?: boolean | null;
4313
- /** If present, indicates the action that triggered the event. */
4314
- originatedFrom?: string | null;
4315
- /**
4316
- * 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.
4317
- * 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.
4318
- */
4319
- entityEventSequence?: string | null;
4320
- }
4321
- /** @oneof */
4322
- interface DomainEventBodyOneOf {
4323
- createdEvent?: EntityCreatedEvent;
4324
- updatedEvent?: EntityUpdatedEvent;
4325
- deletedEvent?: EntityDeletedEvent;
4326
- actionEvent?: ActionEvent;
4327
- }
4328
- interface EntityCreatedEvent {
4329
- entityAsJson?: string;
4330
- /**
4331
- * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
4332
- * @internal
4333
- */
4334
- triggeredByUndelete?: boolean | null;
4335
- /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
4336
- restoreInfo?: RestoreInfo;
4337
- /**
4338
- * Optional domain-specific metadata defined by the API owner, encoded as JSON.
4339
- * @internal
4340
- */
4341
- additionalMetadataAsJson?: string | null;
4342
- }
4343
- interface RestoreInfo {
4344
- deletedDate?: Date | null;
4345
- }
4346
- interface EntityUpdatedEvent {
4347
- /**
4348
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
4349
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
4350
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
4351
- */
4352
- currentEntityAsJson?: string;
4353
- /**
4354
- * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard
4355
- * wont populate it / have any reference to it in the API.
4356
- * 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,
4357
- * the developer should send only the new (current) entity.
4358
- * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
4359
- * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
4360
- * @internal
4361
- * @deprecated
4362
- */
4363
- previousEntityAsJson?: string | null;
4364
- /**
4365
- * Map of fully qualified field paths to their previous values for fields that changed.
4366
- * 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)
4367
- * @internal
4368
- */
4369
- modifiedFields?: Record<string, any>;
4370
- /**
4371
- * Optional domain-specific metadata defined by the API owner, encoded as JSON.
4372
- * @internal
4373
- */
4374
- additionalMetadataAsJson?: string | null;
4375
- }
4376
- interface EntityDeletedEvent {
4377
- /**
4378
- * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled
4379
- * @internal
4380
- */
4381
- movedToTrash?: boolean | null;
4382
- /** Entity that was deleted. */
4383
- deletedEntityAsJson?: string | null;
4384
- /**
4385
- * Optional domain-specific metadata defined by the API owner, encoded as JSON.
4386
- * @internal
4387
- */
4388
- additionalMetadataAsJson?: string | null;
4389
- }
4390
- interface ActionEvent {
4391
- bodyAsJson?: string;
4392
- }
4393
- interface MessageEnvelope {
4394
- /**
4395
- * App instance ID.
4396
- * @format GUID
4397
- */
4398
- instanceId?: string | null;
4399
- /**
4400
- * Event type.
4401
- * @maxLength 150
4402
- */
4403
- eventType?: string;
4404
- /** The identification type and identity data. */
4405
- identity?: IdentificationData;
4406
- /** Stringify payload. */
4407
- data?: string;
4408
- /** Details related to the account */
4409
- accountInfo?: AccountInfo;
4410
- }
4411
- interface IdentificationData extends IdentificationDataIdOneOf {
4412
- /**
4413
- * ID of a site visitor that has not logged in to the site.
4414
- * @format GUID
4415
- */
4416
- anonymousVisitorId?: string;
4417
- /**
4418
- * ID of a site visitor that has logged in to the site.
4419
- * @format GUID
4420
- */
4421
- memberId?: string;
4422
- /**
4423
- * ID of a Wix user (site owner, contributor, etc.).
4424
- * @format GUID
4425
- */
4426
- wixUserId?: string;
4427
- /**
4428
- * ID of an app.
4429
- * @format GUID
4430
- */
4431
- appId?: string;
4432
- /** @readonly */
4433
- identityType?: WebhookIdentityTypeWithLiterals;
4434
- }
4435
- /** @oneof */
4436
- interface IdentificationDataIdOneOf {
4437
- /**
4438
- * ID of a site visitor that has not logged in to the site.
4439
- * @format GUID
4440
- */
4441
- anonymousVisitorId?: string;
4442
- /**
4443
- * ID of a site visitor that has logged in to the site.
4444
- * @format GUID
4445
- */
4446
- memberId?: string;
4447
- /**
4448
- * ID of a Wix user (site owner, contributor, etc.).
4449
- * @format GUID
4450
- */
4451
- wixUserId?: string;
4452
- /**
4453
- * ID of an app.
4454
- * @format GUID
4455
- */
4456
- appId?: string;
4457
- }
4458
- declare enum WebhookIdentityType {
4459
- UNKNOWN = "UNKNOWN",
4460
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
4461
- MEMBER = "MEMBER",
4462
- WIX_USER = "WIX_USER",
4463
- APP = "APP"
4464
- }
4465
- /** @enumType */
4466
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
4467
- interface AccountInfo {
4468
- /**
4469
- * ID of the Wix account associated with the event.
4470
- * @format GUID
4471
- */
4472
- accountId?: string | null;
4473
- /**
4474
- * ID of the parent Wix account. Only included when accountId belongs to a child account.
4475
- * @format GUID
4476
- */
4477
- parentAccountId?: string | null;
4478
- /**
4479
- * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
4480
- * @format GUID
4481
- */
4482
- siteId?: string | null;
4483
- }
4484
- interface GetDraftPostTotalsRequest {
4485
- /**
4486
- * Group results by fields (defaults to grouping by status).
4487
- * If, for example, grouping by language is passed, language values in response will be filled.
4488
- * If, for example, grouping by language is not passed, null values will be filled in language field in response.
4489
- * @maxSize 10
4490
- */
4491
- groupBy?: TotalDraftPostsGroupingFieldWithLiterals[];
4492
- /**
4493
- * Optional language filter by provided language code. Useful in multilingual context.
4494
- * @format LANGUAGE_TAG
4495
- */
4496
- language?: string | null;
4497
- }
4498
- declare enum TotalDraftPostsGroupingField {
4499
- /** Groups results by status. */
4500
- STATUS = "STATUS",
4501
- /** Groups results by language. */
4502
- LANGUAGE = "LANGUAGE"
4503
- }
4504
- /** @enumType */
4505
- type TotalDraftPostsGroupingFieldWithLiterals = TotalDraftPostsGroupingField | 'STATUS' | 'LANGUAGE';
4506
- interface GetDraftPostTotalsResponse {
4507
- /** Draft post totals. */
4508
- totalDraftPosts?: TotalDraftPosts[];
4509
- }
4510
- interface TotalDraftPosts {
4511
- /** Draft post totals in that group. */
4512
- total?: number;
4513
- /** Draft post status (only has value when grouping by status, otherwise null). */
4514
- status?: StatusWithLiterals;
4515
- /**
4516
- * Draft post language code (only has value when grouping by language, otherwise null).
4517
- * @format LANGUAGE_TAG
4518
- */
4519
- language?: string | null;
4520
- }
4521
- interface TranslateDraftRequest {
4522
- /**
4523
- * ID of the draft post or published post to translate.
4524
- * @format GUID
4525
- */
4526
- postId: string;
4527
- /**
4528
- * Language to translate the post into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
4529
- * For example, `de` for German, or `pt-br` for Brazilian Portuguese.
4530
- * @format LANGUAGE_TAG
4531
- */
4532
- language: string;
4533
- /**
4534
- * Predefined sets of fields to return in the created 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
- * Whether to machine translate the title and content into the target language.
4547
- *
4548
- * Default: `false`
4549
- * @internal
4550
- */
4551
- useAutoTranslation?: boolean;
4552
- }
4553
- interface TranslateDraftResponse {
4554
- /** Created draft post. */
4555
- draftPost?: DraftPost;
4556
- }
4557
- interface IsDraftPostAutoTranslatableRequest {
4558
- /**
4559
- * Draft post ID.
4560
- * @format GUID
4561
- */
4562
- draftPostId?: string;
4563
- }
4564
- interface IsDraftPostAutoTranslatableResponse {
4565
- /**
4566
- * Draft post ID.
4567
- * @format GUID
4568
- */
4569
- draftPostId?: string;
4570
- /** Whether enough machine translation word credits are available to translate the draft post. */
4571
- translatable?: boolean;
4572
- /** Number of words in the draft post's title. */
4573
- titleWordCount?: number;
4574
- /** Number of words in the draft post's content. */
4575
- contentWordCount?: number;
4576
- /** Number of machine translation word credits currently available. `-1` if the site's quota is unlimited. */
4577
- availableAutoTranslateWords?: number;
4578
- /** Number of machine translation word credits that remain after translating the draft post. `-1` if the site's quota is unlimited. */
4579
- availableAutoTranslateWordsAfter?: number;
4580
- /** Number of characters in the draft post's plain text content. */
4581
- contentTextCharacterCount?: number;
4582
- }
4583
- interface UpdateDraftPostLanguageRequest {
4584
- /**
4585
- * ID of the draft post to update.
4586
- * @format GUID
4587
- */
4588
- postId: string;
4589
- /**
4590
- * New language of the draft post, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
4591
- * For example, `de` for German, or `pt-br` for Brazilian Portuguese.
4592
- * @minLength 2
4593
- * @format LANGUAGE_TAG
4594
- */
4595
- language: string;
4596
- /**
4597
- * Predefined sets of fields to return in the updated draft post, in addition to the core draft post fields.
4598
- *
4599
- * - `URL`: Returns the draft post's preview URL.
4600
- * - `CONTENT`: Returns the draft post's content.
4601
- * - `RICH_CONTENT`: Returns the draft post's rich content.
4602
- * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4603
- *
4604
- * Default: Core draft post fields only.
4605
- * @maxSize 10
4606
- */
4607
- fieldsets?: FieldWithLiterals[];
4608
- }
4609
- interface UpdateDraftPostLanguageResponse {
4610
- /** Updated draft post. */
4611
- draftPost?: DraftPost;
4612
- }
4613
- interface BulkRevertToUnpublishedRequest {
4614
- /**
4615
- * Source post IDs.
4616
- * @minSize 1
4617
- * @maxSize 100
4618
- * @format GUID
4523
+ * Source post IDs.
4524
+ * @minSize 1
4525
+ * @maxSize 100
4526
+ * @format GUID
4619
4527
  */
4620
4528
  postIds?: string[];
4621
4529
  /** Should full draft post be returned. */
@@ -4757,6 +4665,98 @@ interface MarkPostAsInModerationResponse {
4757
4665
  /** Updated post draft. */
4758
4666
  draftPost?: DraftPost;
4759
4667
  }
4668
+ interface TranslateDraftRequest {
4669
+ /**
4670
+ * ID of the draft post or published post to translate.
4671
+ * @format GUID
4672
+ */
4673
+ postId: string;
4674
+ /**
4675
+ * Language to translate the post into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
4676
+ * For example, `de` for German, or `pt-br` for Brazilian Portuguese.
4677
+ * @format LANGUAGE_TAG
4678
+ */
4679
+ language: string;
4680
+ /**
4681
+ * Predefined sets of fields to return in the created 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
+ * Whether to machine translate the title and content into the target language.
4694
+ *
4695
+ * Default: `false`
4696
+ * @internal
4697
+ */
4698
+ useAutoTranslation?: boolean;
4699
+ }
4700
+ interface TranslateDraftResponse {
4701
+ /** Created draft post. */
4702
+ draftPost?: DraftPost;
4703
+ }
4704
+ interface IsDraftPostAutoTranslatableRequest {
4705
+ /**
4706
+ * Draft post ID.
4707
+ * @format GUID
4708
+ */
4709
+ draftPostId?: string;
4710
+ }
4711
+ interface IsDraftPostAutoTranslatableResponse {
4712
+ /**
4713
+ * Draft post ID.
4714
+ * @format GUID
4715
+ */
4716
+ draftPostId?: string;
4717
+ /** Whether enough machine translation word credits are available to translate the draft post. */
4718
+ translatable?: boolean;
4719
+ /** Number of words in the draft post's title. */
4720
+ titleWordCount?: number;
4721
+ /** Number of words in the draft post's content. */
4722
+ contentWordCount?: number;
4723
+ /** Number of machine translation word credits currently available. `-1` if the site's quota is unlimited. */
4724
+ availableAutoTranslateWords?: number;
4725
+ /** Number of machine translation word credits that remain after translating the draft post. `-1` if the site's quota is unlimited. */
4726
+ availableAutoTranslateWordsAfter?: number;
4727
+ /** Number of characters in the draft post's plain text content. */
4728
+ contentTextCharacterCount?: number;
4729
+ }
4730
+ interface UpdateDraftPostLanguageRequest {
4731
+ /**
4732
+ * ID of the draft post to update.
4733
+ * @format GUID
4734
+ */
4735
+ postId: string;
4736
+ /**
4737
+ * New language of the draft post, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
4738
+ * For example, `de` for German, or `pt-br` for Brazilian Portuguese.
4739
+ * @minLength 2
4740
+ * @format LANGUAGE_TAG
4741
+ */
4742
+ language: string;
4743
+ /**
4744
+ * Predefined sets of fields to return in the updated draft post, in addition to the core draft post fields.
4745
+ *
4746
+ * - `URL`: Returns the draft post's preview URL.
4747
+ * - `CONTENT`: Returns the draft post's content.
4748
+ * - `RICH_CONTENT`: Returns the draft post's rich content.
4749
+ * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4750
+ *
4751
+ * Default: Core draft post fields only.
4752
+ * @maxSize 10
4753
+ */
4754
+ fieldsets?: FieldWithLiterals[];
4755
+ }
4756
+ interface UpdateDraftPostLanguageResponse {
4757
+ /** Updated draft post. */
4758
+ draftPost?: DraftPost;
4759
+ }
4760
4760
 
4761
4761
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
4762
4762
  getUrl: (context: any) => string;