@wix/auto_sdk_blog_draft-posts 1.0.119 → 1.0.120

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.
@@ -3096,73 +3096,117 @@ declare enum ModerationStatusStatus {
3096
3096
  /** @enumType */
3097
3097
  type ModerationStatusStatusWithLiterals = ModerationStatusStatus | 'UNKNOWN' | 'APPROVED' | 'REJECTED';
3098
3098
  /**
3099
- * The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
3100
- * The search engines use this information for ranking purposes, or to display snippets in the search results.
3101
- * This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
3099
+ * The SEO data for a single page or dynamic item, in the shape stored today.
3100
+ *
3101
+ * FROZEN. Existing server code maps onto this message field by field, so its
3102
+ * field set must never change (see the file header). New writers use
3103
+ * `SeoSchemaV2`.
3104
+ *
3105
+ * These tags are rendered into the <head> of the HTML document and are not
3106
+ * visible on the page itself. They override every other source of tags
3107
+ * (site defaults, vertical presets, patterns) for this page.
3102
3108
  */
3103
3109
  interface SeoSchema {
3104
- /** SEO tag information. */
3110
+ /**
3111
+ * The tags rendered into <head>, in no particular order. Render order is
3112
+ * decided by the renderer, not by position in this list.
3113
+ *
3114
+ * No maxSize: this list is already populated by data written years ago, and
3115
+ * a bound added now could reject a page that is already stored.
3116
+ */
3105
3117
  tags?: Tag[];
3106
- /** SEO general settings. */
3118
+ /** Page-level SEO settings that are not themselves tags. */
3107
3119
  settings?: Settings;
3108
3120
  }
3121
+ /** A keyword term the user is targeting. */
3109
3122
  interface Keyword {
3110
- /** Keyword value. */
3123
+ /**
3124
+ * The term itself, e.g. "trail running shoes".
3125
+ *
3126
+ * No maxLength, for the same reason as the legacy tag fields: keywords are
3127
+ * already stored, and a bound added now could reject a record written
3128
+ * before the bound existed. The flynt `missing-string-validations` warning
3129
+ * on this field is accepted deliberately.
3130
+ */
3111
3131
  term?: string;
3112
- /** Whether the keyword is the main focus keyword. */
3132
+ /** Whether this is the page's primary focus keyword. At most one per page. */
3113
3133
  isMain?: boolean;
3114
3134
  /**
3115
- * The source that added the keyword terms to the SEO settings.
3135
+ * Which surface added the term, e.g. a panel or a suggestion flow. Used for
3136
+ * attribution in BI. Opaque to the renderer.
3116
3137
  * @maxLength 1000
3117
3138
  */
3118
3139
  origin?: string | null;
3119
3140
  }
3141
+ /**
3142
+ * One tag in the page's <head>.
3143
+ *
3144
+ * Not deprecated, and with no removal date, deliberately: stored data is
3145
+ * never migrated, so this shape stays valid input forever. `seo-renderer`
3146
+ * normalizes both shapes on READ.
3147
+ */
3120
3148
  interface Tag {
3121
3149
  /**
3122
- * SEO tag type.
3123
- *
3150
+ * Legacy. Was a free-form string: "title" | "meta" | "script" | "link".
3151
+ * The typed replacement is the `kind` oneof on `SeoSchemaV2.Tag`, which makes
3152
+ * the invalid combinations unrepresentable rather than merely discouraged.
3124
3153
  *
3125
- * Supported values: `title`, `meta`, `script`, `link`.
3126
- *
3127
- * Which of these an API actually accepts depends on where the tag is being set: this
3128
- * list is not a blanket guarantee across every API that reuses this message. Site SEO
3129
- * Tags in particular accepts only `meta` (see `SiteSeoTags.tags`) and rejects
3130
- * `title`/`script`/`link` with a validation error even though they appear here —
3131
- * check the field description of the specific `tags`-typed field you're writing to
3132
- * for the types it actually supports and the error it returns.
3154
+ * Which of these an API actually accepts depends on where the tag is being
3155
+ * set: this list is not a blanket guarantee across every API that reuses
3156
+ * this message. Site SEO Tags in particular accepts only `meta` (see
3157
+ * `SiteSeoTags.tags`) and rejects `title`/`script`/`link` with a validation
3158
+ * error even though they appear here — check the field description of the
3159
+ * specific `tags`-typed field you are writing to.
3133
3160
  *
3134
3161
  * Limitation: `title` and `script` (e.g. a `script` tag with `props.type`
3135
- * `"application/ld+json"` carrying structured data) are supported only when
3136
- * `custom` is unset or `false`. Setting `custom: true` on a `title` or `script`
3137
- * tag is rejected with `TAG_TYPE_NOT_ALLOWED`, because `custom: true` routes the
3138
- * write through the site's Advanced/Custom Tags list. To write structured data,
3139
- * omit `custom` (or set it to `false`).
3162
+ * "application/ld+json" carrying structured data) are supported only when
3163
+ * `custom` is unset or `false`. Setting `custom: true` on a `title` or
3164
+ * `script` tag is rejected with `TAG_TYPE_NOT_ALLOWED`, because
3165
+ * `custom: true` routes the write through the site's Advanced/Custom Tags
3166
+ * list. To write structured data, omit `custom` (or set it to `false`).
3167
+ *
3168
+ * No length limit: this field holds data written years ago by writers we
3169
+ * are not migrating. A constraint here could reject a record that is
3170
+ * already stored, which is exactly the promise this design makes.
3140
3171
  */
3141
3172
  type?: string;
3142
3173
  /**
3143
- * A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
3144
- * For example: `{"name": "description", "content": "the description itself"}`.
3174
+ * Legacy. Was an untyped bag of HTML attributes.
3175
+ * Typed replacement: `SeoSchemaV2.TitleTag` / `MetaTag` / `LinkTag`.
3145
3176
  */
3146
3177
  props?: Record<string, any> | null;
3147
- /** SEO tag metadata. For example, `{"height": 300, "width": 240}`. */
3178
+ /**
3179
+ * Legacy. Was an untyped bag of 16 mixed-purpose keys. In `SeoSchemaV2`
3180
+ * its contents are split by purpose: per-page structured-data state moves to
3181
+ * StructuredDataTag, authorship to `written_by`, and render-time preset
3182
+ * logic (variants, enabledByExperiment, removeSchemaIf*) moved out of the
3183
+ * stored document entirely — it belongs to the preset definition, not to the
3184
+ * page. See the design log for the full key-by-key mapping.
3185
+ */
3148
3186
  meta?: Record<string, any> | null;
3149
- /** SEO tag inner content. For example, `<title> inner content </title>`. */
3187
+ /**
3188
+ * Legacy. Was the tag's inner content, doubling as the JSON-LD payload
3189
+ * for script tags. Typed replacement: `SeoSchemaV2.TitleTag.text` and
3190
+ * `StructuredDataTag.json_ld`.
3191
+ * No length limit, for the same reason as `type` above.
3192
+ */
3150
3193
  children?: string;
3151
3194
  /**
3152
3195
  * Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages) —
3153
3196
  * i.e. an entry from the site's Advanced/Custom Tags list.
3154
3197
  *
3155
- * Setting this to `true` on a write restricts which `type` values are accepted
3156
- * — the same restriction the Advanced/Custom Tags UI enforces. `title` and
3157
- * `script` tags (including JSON-LD structured data) must be sent with `custom`
3158
- * omitted or `false`; sending them with `custom: true` is rejected with
3159
- * `TAG_TYPE_NOT_ALLOWED`.
3198
+ * Setting this to `true` on a write restricts which `type` values are
3199
+ * accepted — the same restriction the Advanced/Custom Tags UI enforces.
3200
+ * `title` and `script` tags (including JSON-LD structured data) must be sent
3201
+ * with `custom` omitted or `false`; sending them with `custom: true` is
3202
+ * rejected with `TAG_TYPE_NOT_ALLOWED`.
3160
3203
  *
3161
- * Note this is a separate restriction from Site SEO Tags' own type restriction on
3162
- * `SiteSeoTags.tags`: even with `custom` unset, Site SEO Tags rejects `script` (e.g.
3163
- * for site-wide structured data) unconditionally. There is currently no way to set
3164
- * site-wide, every-page structured data through any of these APIs — write a per-page
3165
- * `script` tag through the Item SEO Tags API instead.
3204
+ * Note this is a separate restriction from Site SEO Tags' own type
3205
+ * restriction on `SiteSeoTags.tags`: even with `custom` unset, Site SEO Tags
3206
+ * rejects `script` (e.g. for site-wide structured data) unconditionally.
3207
+ * There is currently no way to set site-wide, every-page structured data
3208
+ * through any of these APIs — write a per-page `script` tag through the Item
3209
+ * SEO Tags API instead.
3166
3210
  *
3167
3211
  * This flag is scoped to that feature only. It is NOT an indicator of whether a standard tag
3168
3212
  * (`title`, `description`, Open Graph, etc.) reflects a manually configured value versus a computed
@@ -3175,22 +3219,39 @@ interface Tag {
3175
3219
  * or Wix Studio pages, so even genuine Advanced/Custom Tags saved on those pages are missing from the
3176
3220
  * response entirely — there, `false` means this API could not tell, not that no custom tag exists.
3177
3221
  * Pass `seoData` explicitly to resolve against a known set of tags.
3222
+ *
3223
+ * `SeoSchemaV2.Tag` expresses this as `written_by = USER_CUSTOM`.
3178
3224
  */
3179
3225
  custom?: boolean;
3180
- /** Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. */
3226
+ /**
3227
+ * Whether the tag is excluded from the rendered <head>.
3228
+ *
3229
+ * A disabled tag is still stored, so the user can re-enable it and so a
3230
+ * pattern-provided tag stays suppressed on this page. Default false.
3231
+ */
3181
3232
  disabled?: boolean;
3182
3233
  }
3234
+ /** Page-level SEO settings that are not tags. */
3183
3235
  interface Settings {
3184
3236
  /**
3185
- * Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.
3237
+ * Whether to suppress the automatic redirect from this page's previous URL to
3238
+ * its current one after a slug change.
3186
3239
  *
3187
- *
3188
- * Default: `false` (automatical redirect is enabled).
3240
+ * Default false, meaning the redirect IS created. The field is named for the
3241
+ * exception rather than the rule, which reads backwards; kept as-is because
3242
+ * renaming a stored boolean is not worth the migration.
3189
3243
  */
3190
3244
  preventAutoRedirect?: boolean;
3191
3245
  /**
3192
- * User-selected keyword terms for a specific page.
3193
- * @maxSize 5
3246
+ * Keyword terms the user is targeting for this page. Used by the SEO
3247
+ * assistant and checklist; never rendered into <head>.
3248
+ *
3249
+ * 20 is a sanity bound, not the product limit. v1 declared 5 — the number
3250
+ * the panel happens to allow today — which is exactly the mistake we are
3251
+ * fixing for structured data. A product decision to allow 8 should not need
3252
+ * a proto release, so the panel owns that number and the proto only stops
3253
+ * something absurd.
3254
+ * @maxSize 20
3194
3255
  */
3195
3256
  keywords?: Keyword[];
3196
3257
  }
@@ -3284,6 +3345,10 @@ interface DraftPostTranslation {
3284
3345
  /** Post URL. */
3285
3346
  url?: string;
3286
3347
  }
3348
+ interface InitialDraftPostsCopied {
3349
+ /** Number of draft posts copied. */
3350
+ count?: number;
3351
+ }
3287
3352
  interface DraftCategoriesUpdated {
3288
3353
  /**
3289
3354
  * Draft post ID.
@@ -3322,200 +3387,6 @@ interface DraftTagsUpdated {
3322
3387
  */
3323
3388
  previousTags?: string[];
3324
3389
  }
3325
- interface GetDraftPostTotalsRequest {
3326
- /**
3327
- * Group results by fields (defaults to grouping by status).
3328
- * If, for example, grouping by language is passed, language values in response will be filled.
3329
- * If, for example, grouping by language is not passed, null values will be filled in language field in response.
3330
- * @maxSize 10
3331
- */
3332
- groupBy?: TotalDraftPostsGroupingFieldWithLiterals[];
3333
- /**
3334
- * Optional language filter by provided language code. Useful in multilingual context.
3335
- * @format LANGUAGE_TAG
3336
- */
3337
- language?: string | null;
3338
- }
3339
- declare enum TotalDraftPostsGroupingField {
3340
- /** Groups results by status. */
3341
- STATUS = "STATUS",
3342
- /** Groups results by language. */
3343
- LANGUAGE = "LANGUAGE"
3344
- }
3345
- /** @enumType */
3346
- type TotalDraftPostsGroupingFieldWithLiterals = TotalDraftPostsGroupingField | 'STATUS' | 'LANGUAGE';
3347
- interface GetDraftPostTotalsResponse {
3348
- /** Draft post totals. */
3349
- totalDraftPosts?: TotalDraftPosts[];
3350
- }
3351
- interface TotalDraftPosts {
3352
- /** Draft post totals in that group. */
3353
- total?: number;
3354
- /** Draft post status (only has value when grouping by status, otherwise null). */
3355
- status?: StatusWithLiterals;
3356
- /**
3357
- * Draft post language code (only has value when grouping by language, otherwise null).
3358
- * @format LANGUAGE_TAG
3359
- */
3360
- language?: string | null;
3361
- }
3362
- interface DomainEvent extends DomainEventBodyOneOf {
3363
- createdEvent?: EntityCreatedEvent;
3364
- updatedEvent?: EntityUpdatedEvent;
3365
- deletedEvent?: EntityDeletedEvent;
3366
- actionEvent?: ActionEvent;
3367
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
3368
- _id?: string;
3369
- /**
3370
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
3371
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
3372
- */
3373
- entityFqdn?: string;
3374
- /**
3375
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
3376
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
3377
- */
3378
- slug?: string;
3379
- /** ID of the entity associated with the event. */
3380
- entityId?: string;
3381
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
3382
- eventTime?: Date | null;
3383
- /**
3384
- * Whether the event was triggered as a result of a privacy regulation application
3385
- * (for example, GDPR).
3386
- */
3387
- triggeredByAnonymizeRequest?: boolean | null;
3388
- /** If present, indicates the action that triggered the event. */
3389
- originatedFrom?: string | null;
3390
- /**
3391
- * 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.
3392
- * 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.
3393
- */
3394
- entityEventSequence?: string | null;
3395
- }
3396
- /** @oneof */
3397
- interface DomainEventBodyOneOf {
3398
- createdEvent?: EntityCreatedEvent;
3399
- updatedEvent?: EntityUpdatedEvent;
3400
- deletedEvent?: EntityDeletedEvent;
3401
- actionEvent?: ActionEvent;
3402
- }
3403
- interface EntityCreatedEvent {
3404
- entity?: string;
3405
- }
3406
- interface RestoreInfo {
3407
- deletedDate?: Date | null;
3408
- }
3409
- interface EntityUpdatedEvent {
3410
- /**
3411
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
3412
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
3413
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
3414
- */
3415
- currentEntity?: string;
3416
- }
3417
- interface EntityDeletedEvent {
3418
- /** Entity that was deleted. */
3419
- deletedEntity?: string | null;
3420
- }
3421
- interface ActionEvent {
3422
- body?: string;
3423
- }
3424
- interface MessageEnvelope {
3425
- /**
3426
- * App instance ID.
3427
- * @format GUID
3428
- */
3429
- instanceId?: string | null;
3430
- /**
3431
- * Event type.
3432
- * @maxLength 150
3433
- */
3434
- eventType?: string;
3435
- /** The identification type and identity data. */
3436
- identity?: IdentificationData;
3437
- /** Stringify payload. */
3438
- data?: string;
3439
- /** Details related to the account */
3440
- accountInfo?: AccountInfo;
3441
- }
3442
- interface IdentificationData extends IdentificationDataIdOneOf {
3443
- /**
3444
- * ID of a site visitor that has not logged in to the site.
3445
- * @format GUID
3446
- */
3447
- anonymousVisitorId?: string;
3448
- /**
3449
- * ID of a site visitor that has logged in to the site.
3450
- * @format GUID
3451
- */
3452
- memberId?: string;
3453
- /**
3454
- * ID of a Wix user (site owner, contributor, etc.).
3455
- * @format GUID
3456
- */
3457
- wixUserId?: string;
3458
- /**
3459
- * ID of an app.
3460
- * @format GUID
3461
- */
3462
- appId?: string;
3463
- /** @readonly */
3464
- identityType?: WebhookIdentityTypeWithLiterals;
3465
- }
3466
- /** @oneof */
3467
- interface IdentificationDataIdOneOf {
3468
- /**
3469
- * ID of a site visitor that has not logged in to the site.
3470
- * @format GUID
3471
- */
3472
- anonymousVisitorId?: string;
3473
- /**
3474
- * ID of a site visitor that has logged in to the site.
3475
- * @format GUID
3476
- */
3477
- memberId?: string;
3478
- /**
3479
- * ID of a Wix user (site owner, contributor, etc.).
3480
- * @format GUID
3481
- */
3482
- wixUserId?: string;
3483
- /**
3484
- * ID of an app.
3485
- * @format GUID
3486
- */
3487
- appId?: string;
3488
- }
3489
- declare enum WebhookIdentityType {
3490
- UNKNOWN = "UNKNOWN",
3491
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
3492
- MEMBER = "MEMBER",
3493
- WIX_USER = "WIX_USER",
3494
- APP = "APP"
3495
- }
3496
- /** @enumType */
3497
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
3498
- interface AccountInfo {
3499
- /**
3500
- * ID of the Wix account associated with the event.
3501
- * @format GUID
3502
- */
3503
- accountId?: string | null;
3504
- /**
3505
- * ID of the parent Wix account. Only included when accountId belongs to a child account.
3506
- * @format GUID
3507
- */
3508
- parentAccountId?: string | null;
3509
- /**
3510
- * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
3511
- * @format GUID
3512
- */
3513
- siteId?: string | null;
3514
- }
3515
- interface InitialDraftPostsCopied {
3516
- /** Number of draft posts copied. */
3517
- count?: number;
3518
- }
3519
3390
  interface CreateDraftPostRequest {
3520
3391
  /** Draft post to create. */
3521
3392
  draftPost: DraftPost;
@@ -4096,116 +3967,195 @@ interface DraftPostCount {
4096
3967
  /** Number of posts. */
4097
3968
  postCount?: number;
4098
3969
  }
4099
- interface BulkRevertToUnpublishedRequest {
3970
+ interface DomainEvent extends DomainEventBodyOneOf {
3971
+ createdEvent?: EntityCreatedEvent;
3972
+ updatedEvent?: EntityUpdatedEvent;
3973
+ deletedEvent?: EntityDeletedEvent;
3974
+ actionEvent?: ActionEvent;
3975
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
3976
+ _id?: string;
4100
3977
  /**
4101
- * Source post IDs.
4102
- * @minSize 1
4103
- * @maxSize 100
4104
- * @format GUID
3978
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
3979
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
4105
3980
  */
4106
- postIds?: string[];
4107
- /** Should full draft post be returned. */
4108
- returnFullEntity?: boolean;
4109
- }
4110
- interface BulkRevertToUnpublishedResponse {
4111
- /** Bulk action results. */
4112
- results?: BulkDraftPostResult[];
4113
- /** Bulk action metadata. */
4114
- bulkActionMetadata?: BulkActionMetadata;
4115
- }
4116
- interface BulkRejectDraftPostRequest {
3981
+ entityFqdn?: string;
4117
3982
  /**
4118
- * Source post IDs.
4119
- * @minSize 1
4120
- * @maxSize 100
4121
- * @format GUID
3983
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
3984
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
4122
3985
  */
4123
- postIds?: string[];
4124
- /** Should full draft post be returned. */
4125
- returnFullEntity?: boolean;
3986
+ slug?: string;
3987
+ /** ID of the entity associated with the event. */
3988
+ entityId?: string;
3989
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
3990
+ eventTime?: Date | null;
3991
+ /**
3992
+ * Whether the event was triggered as a result of a privacy regulation application
3993
+ * (for example, GDPR).
3994
+ */
3995
+ triggeredByAnonymizeRequest?: boolean | null;
3996
+ /** If present, indicates the action that triggered the event. */
3997
+ originatedFrom?: string | null;
3998
+ /**
3999
+ * 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.
4000
+ * 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.
4001
+ */
4002
+ entityEventSequence?: string | null;
4126
4003
  }
4127
- interface BulkRejectDraftPostResponse {
4128
- /** Bulk action results. */
4129
- results?: BulkDraftPostResult[];
4130
- /** Bulk action metadata. */
4131
- bulkActionMetadata?: BulkActionMetadata;
4004
+ /** @oneof */
4005
+ interface DomainEventBodyOneOf {
4006
+ createdEvent?: EntityCreatedEvent;
4007
+ updatedEvent?: EntityUpdatedEvent;
4008
+ deletedEvent?: EntityDeletedEvent;
4009
+ actionEvent?: ActionEvent;
4132
4010
  }
4133
- interface RevertToUnpublishedRequest {
4011
+ interface EntityCreatedEvent {
4012
+ entity?: string;
4013
+ }
4014
+ interface RestoreInfo {
4015
+ deletedDate?: Date | null;
4016
+ }
4017
+ interface EntityUpdatedEvent {
4134
4018
  /**
4135
- * Source post ID.
4019
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
4020
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
4021
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
4022
+ */
4023
+ currentEntity?: string;
4024
+ }
4025
+ interface EntityDeletedEvent {
4026
+ /** Entity that was deleted. */
4027
+ deletedEntity?: string | null;
4028
+ }
4029
+ interface ActionEvent {
4030
+ body?: string;
4031
+ }
4032
+ interface MessageEnvelope {
4033
+ /**
4034
+ * App instance ID.
4136
4035
  * @format GUID
4137
4036
  */
4138
- postId?: string;
4037
+ instanceId?: string | null;
4139
4038
  /**
4140
- * List of draft post fields to be included if entities are present in the response.
4141
- * Base fieldset, which is default, will return all core draft post properties.
4142
- * Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
4143
- * @maxSize 10
4039
+ * Event type.
4040
+ * @maxLength 150
4144
4041
  */
4145
- fieldsets?: FieldWithLiterals[];
4146
- }
4147
- interface RevertToUnpublishedResponse {
4148
- /** Updated post draft. */
4149
- draftPost?: DraftPost;
4042
+ eventType?: string;
4043
+ /** The identification type and identity data. */
4044
+ identity?: IdentificationData;
4045
+ /** Stringify payload. */
4046
+ data?: string;
4047
+ /** Details related to the account */
4048
+ accountInfo?: AccountInfo;
4150
4049
  }
4151
- interface RejectDraftPostRequest {
4050
+ interface IdentificationData extends IdentificationDataIdOneOf {
4152
4051
  /**
4153
- * Source post ID.
4052
+ * ID of a site visitor that has not logged in to the site.
4154
4053
  * @format GUID
4155
4054
  */
4156
- postId?: string;
4055
+ anonymousVisitorId?: string;
4157
4056
  /**
4158
- * List of draft post fields to be included if entities are present in the response.
4159
- * Base fieldset, which is default, will return all core draft post properties.
4160
- * Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
4161
- * @maxSize 10
4057
+ * ID of a site visitor that has logged in to the site.
4058
+ * @format GUID
4162
4059
  */
4163
- fieldsets?: FieldWithLiterals[];
4164
- }
4165
- interface RejectDraftPostResponse {
4166
- /** Draft post. */
4167
- draftPost?: DraftPost;
4060
+ memberId?: string;
4061
+ /**
4062
+ * ID of a Wix user (site owner, contributor, etc.).
4063
+ * @format GUID
4064
+ */
4065
+ wixUserId?: string;
4066
+ /**
4067
+ * ID of an app.
4068
+ * @format GUID
4069
+ */
4070
+ appId?: string;
4071
+ /** @readonly */
4072
+ identityType?: WebhookIdentityTypeWithLiterals;
4168
4073
  }
4169
- interface ApproveDraftPostRequest {
4074
+ /** @oneof */
4075
+ interface IdentificationDataIdOneOf {
4170
4076
  /**
4171
- * Source post ID.
4077
+ * ID of a site visitor that has not logged in to the site.
4172
4078
  * @format GUID
4173
4079
  */
4174
- postId?: string;
4080
+ anonymousVisitorId?: string;
4175
4081
  /**
4176
- * Scheduled publish date if should be not immediately published.
4177
- * @maxLength 24
4082
+ * ID of a site visitor that has logged in to the site.
4083
+ * @format GUID
4178
4084
  */
4179
- scheduledPublishDate?: string | null;
4085
+ memberId?: string;
4180
4086
  /**
4181
- * List of draft post fields to be included if entities are present in the response.
4182
- * Base fieldset, which is default, will return all core draft post properties.
4183
- * Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
4184
- * @maxSize 10
4087
+ * ID of a Wix user (site owner, contributor, etc.).
4088
+ * @format GUID
4185
4089
  */
4186
- fieldsets?: FieldWithLiterals[];
4090
+ wixUserId?: string;
4091
+ /**
4092
+ * ID of an app.
4093
+ * @format GUID
4094
+ */
4095
+ appId?: string;
4187
4096
  }
4188
- interface ApproveDraftPostResponse {
4189
- /** Updated post draft. */
4190
- draftPost?: DraftPost;
4097
+ declare enum WebhookIdentityType {
4098
+ UNKNOWN = "UNKNOWN",
4099
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
4100
+ MEMBER = "MEMBER",
4101
+ WIX_USER = "WIX_USER",
4102
+ APP = "APP"
4191
4103
  }
4192
- interface MarkPostAsInModerationRequest {
4104
+ /** @enumType */
4105
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
4106
+ interface AccountInfo {
4193
4107
  /**
4194
- * Source post ID.
4195
- * @maxLength 38
4108
+ * ID of the Wix account associated with the event.
4109
+ * @format GUID
4196
4110
  */
4197
- postId?: string;
4111
+ accountId?: string | null;
4198
4112
  /**
4199
- * List of draft post fields to be included if entities are present in the response.
4200
- * Base fieldset, which is default, will return all core draft post properties.
4201
- * Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
4113
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
4114
+ * @format GUID
4115
+ */
4116
+ parentAccountId?: string | null;
4117
+ /**
4118
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
4119
+ * @format GUID
4120
+ */
4121
+ siteId?: string | null;
4122
+ }
4123
+ interface GetDraftPostTotalsRequest {
4124
+ /**
4125
+ * Group results by fields (defaults to grouping by status).
4126
+ * If, for example, grouping by language is passed, language values in response will be filled.
4127
+ * If, for example, grouping by language is not passed, null values will be filled in language field in response.
4202
4128
  * @maxSize 10
4203
4129
  */
4204
- fieldsets?: FieldWithLiterals[];
4130
+ groupBy?: TotalDraftPostsGroupingFieldWithLiterals[];
4131
+ /**
4132
+ * Optional language filter by provided language code. Useful in multilingual context.
4133
+ * @format LANGUAGE_TAG
4134
+ */
4135
+ language?: string | null;
4205
4136
  }
4206
- interface MarkPostAsInModerationResponse {
4207
- /** Updated post draft. */
4208
- draftPost?: DraftPost;
4137
+ declare enum TotalDraftPostsGroupingField {
4138
+ /** Groups results by status. */
4139
+ STATUS = "STATUS",
4140
+ /** Groups results by language. */
4141
+ LANGUAGE = "LANGUAGE"
4142
+ }
4143
+ /** @enumType */
4144
+ type TotalDraftPostsGroupingFieldWithLiterals = TotalDraftPostsGroupingField | 'STATUS' | 'LANGUAGE';
4145
+ interface GetDraftPostTotalsResponse {
4146
+ /** Draft post totals. */
4147
+ totalDraftPosts?: TotalDraftPosts[];
4148
+ }
4149
+ interface TotalDraftPosts {
4150
+ /** Draft post totals in that group. */
4151
+ total?: number;
4152
+ /** Draft post status (only has value when grouping by status, otherwise null). */
4153
+ status?: StatusWithLiterals;
4154
+ /**
4155
+ * Draft post language code (only has value when grouping by language, otherwise null).
4156
+ * @format LANGUAGE_TAG
4157
+ */
4158
+ language?: string | null;
4209
4159
  }
4210
4160
  interface TranslateDraftRequest {
4211
4161
  /**
@@ -4292,6 +4242,117 @@ interface UpdateDraftPostLanguageResponse {
4292
4242
  /** Updated draft post. */
4293
4243
  draftPost?: DraftPost;
4294
4244
  }
4245
+ interface BulkRevertToUnpublishedRequest {
4246
+ /**
4247
+ * Source post IDs.
4248
+ * @minSize 1
4249
+ * @maxSize 100
4250
+ * @format GUID
4251
+ */
4252
+ postIds?: string[];
4253
+ /** Should full draft post be returned. */
4254
+ returnFullEntity?: boolean;
4255
+ }
4256
+ interface BulkRevertToUnpublishedResponse {
4257
+ /** Bulk action results. */
4258
+ results?: BulkDraftPostResult[];
4259
+ /** Bulk action metadata. */
4260
+ bulkActionMetadata?: BulkActionMetadata;
4261
+ }
4262
+ interface BulkRejectDraftPostRequest {
4263
+ /**
4264
+ * Source post IDs.
4265
+ * @minSize 1
4266
+ * @maxSize 100
4267
+ * @format GUID
4268
+ */
4269
+ postIds?: string[];
4270
+ /** Should full draft post be returned. */
4271
+ returnFullEntity?: boolean;
4272
+ }
4273
+ interface BulkRejectDraftPostResponse {
4274
+ /** Bulk action results. */
4275
+ results?: BulkDraftPostResult[];
4276
+ /** Bulk action metadata. */
4277
+ bulkActionMetadata?: BulkActionMetadata;
4278
+ }
4279
+ interface RevertToUnpublishedRequest {
4280
+ /**
4281
+ * Source post ID.
4282
+ * @format GUID
4283
+ */
4284
+ postId?: string;
4285
+ /**
4286
+ * List of draft post fields to be included if entities are present in the response.
4287
+ * Base fieldset, which is default, will return all core draft post properties.
4288
+ * Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
4289
+ * @maxSize 10
4290
+ */
4291
+ fieldsets?: FieldWithLiterals[];
4292
+ }
4293
+ interface RevertToUnpublishedResponse {
4294
+ /** Updated post draft. */
4295
+ draftPost?: DraftPost;
4296
+ }
4297
+ interface RejectDraftPostRequest {
4298
+ /**
4299
+ * Source post ID.
4300
+ * @format GUID
4301
+ */
4302
+ postId?: string;
4303
+ /**
4304
+ * List of draft post fields to be included if entities are present in the response.
4305
+ * Base fieldset, which is default, will return all core draft post properties.
4306
+ * Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
4307
+ * @maxSize 10
4308
+ */
4309
+ fieldsets?: FieldWithLiterals[];
4310
+ }
4311
+ interface RejectDraftPostResponse {
4312
+ /** Draft post. */
4313
+ draftPost?: DraftPost;
4314
+ }
4315
+ interface ApproveDraftPostRequest {
4316
+ /**
4317
+ * Source post ID.
4318
+ * @format GUID
4319
+ */
4320
+ postId?: string;
4321
+ /**
4322
+ * Scheduled publish date if should be not immediately published.
4323
+ * @maxLength 24
4324
+ */
4325
+ scheduledPublishDate?: string | null;
4326
+ /**
4327
+ * List of draft post fields to be included if entities are present in the response.
4328
+ * Base fieldset, which is default, will return all core draft post properties.
4329
+ * Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
4330
+ * @maxSize 10
4331
+ */
4332
+ fieldsets?: FieldWithLiterals[];
4333
+ }
4334
+ interface ApproveDraftPostResponse {
4335
+ /** Updated post draft. */
4336
+ draftPost?: DraftPost;
4337
+ }
4338
+ interface MarkPostAsInModerationRequest {
4339
+ /**
4340
+ * Source post ID.
4341
+ * @maxLength 38
4342
+ */
4343
+ postId?: string;
4344
+ /**
4345
+ * List of draft post fields to be included if entities are present in the response.
4346
+ * Base fieldset, which is default, will return all core draft post properties.
4347
+ * Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
4348
+ * @maxSize 10
4349
+ */
4350
+ fieldsets?: FieldWithLiterals[];
4351
+ }
4352
+ interface MarkPostAsInModerationResponse {
4353
+ /** Updated post draft. */
4354
+ draftPost?: DraftPost;
4355
+ }
4295
4356
  interface BaseEventMetadata {
4296
4357
  /**
4297
4358
  * App instance ID.