@wix/auto_sdk_blog_draft-posts 1.0.110 → 1.0.111

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