@wix/auto_sdk_blog_draft-posts 1.0.118 → 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.
@@ -993,6 +993,8 @@ interface TextStyle {
993
993
  textAlignment?: TextAlignmentWithLiterals;
994
994
  /** A CSS `line-height` value for the text expressed as a ratio relative to the font size. For example, if the font size is 20px, a `lineHeight` value of `'1.5'`` results in a line height of 30px. */
995
995
  lineHeight?: string | null;
996
+ /** Font size of an empty block: it sizes the empty line, its list marker and the text typed into it. Ignored on a block with text, which is sized by its text's `FONT_SIZE` decorations. */
997
+ fontSize?: FontSizeData;
996
998
  }
997
999
  declare enum TextAlignment {
998
1000
  /** browser default, eqivalent to `initial` */
@@ -1008,6 +1010,18 @@ declare enum TextAlignment {
1008
1010
  }
1009
1011
  /** @enumType */
1010
1012
  type TextAlignmentWithLiterals = TextAlignment | 'AUTO' | 'LEFT' | 'RIGHT' | 'CENTER' | 'JUSTIFY';
1013
+ interface FontSizeData {
1014
+ /** The units used for the font size. */
1015
+ unit?: FontTypeWithLiterals;
1016
+ /** Font size value. */
1017
+ value?: number | null;
1018
+ }
1019
+ declare enum FontType {
1020
+ PX = "PX",
1021
+ EM = "EM"
1022
+ }
1023
+ /** @enumType */
1024
+ type FontTypeWithLiterals = FontType | 'PX' | 'EM';
1011
1025
  interface DividerData {
1012
1026
  /** Styling for the divider's container. */
1013
1027
  containerData?: PluginContainerData;
@@ -1872,18 +1886,6 @@ interface MentionData {
1872
1886
  /** The kind of entity the mention refers to. Any value is accepted, and it's usually used to mark a mention as a group mention (for example, `group`). When empty, the mention refers to a member. */
1873
1887
  type?: string | null;
1874
1888
  }
1875
- interface FontSizeData {
1876
- /** The units used for the font size. */
1877
- unit?: FontTypeWithLiterals;
1878
- /** Font size value. */
1879
- value?: number | null;
1880
- }
1881
- declare enum FontType {
1882
- PX = "PX",
1883
- EM = "EM"
1884
- }
1885
- /** @enumType */
1886
- type FontTypeWithLiterals = FontType | 'PX' | 'EM';
1887
1889
  interface SpoilerData {
1888
1890
  /** Spoiler ID. */
1889
1891
  id?: string | null;
@@ -3166,73 +3168,117 @@ declare enum ModerationStatusStatus {
3166
3168
  /** @enumType */
3167
3169
  type ModerationStatusStatusWithLiterals = ModerationStatusStatus | 'UNKNOWN' | 'APPROVED' | 'REJECTED';
3168
3170
  /**
3169
- * 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.
3170
- * The search engines use this information for ranking purposes, or to display snippets in the search results.
3171
- * 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.
3171
+ * The SEO data for a single page or dynamic item, in the shape stored today.
3172
+ *
3173
+ * FROZEN. Existing server code maps onto this message field by field, so its
3174
+ * field set must never change (see the file header). New writers use
3175
+ * `SeoSchemaV2`.
3176
+ *
3177
+ * These tags are rendered into the <head> of the HTML document and are not
3178
+ * visible on the page itself. They override every other source of tags
3179
+ * (site defaults, vertical presets, patterns) for this page.
3172
3180
  */
3173
3181
  interface SeoSchema {
3174
- /** SEO tag information. */
3182
+ /**
3183
+ * The tags rendered into <head>, in no particular order. Render order is
3184
+ * decided by the renderer, not by position in this list.
3185
+ *
3186
+ * No maxSize: this list is already populated by data written years ago, and
3187
+ * a bound added now could reject a page that is already stored.
3188
+ */
3175
3189
  tags?: Tag[];
3176
- /** SEO general settings. */
3190
+ /** Page-level SEO settings that are not themselves tags. */
3177
3191
  settings?: Settings;
3178
3192
  }
3193
+ /** A keyword term the user is targeting. */
3179
3194
  interface Keyword {
3180
- /** Keyword value. */
3195
+ /**
3196
+ * The term itself, e.g. "trail running shoes".
3197
+ *
3198
+ * No maxLength, for the same reason as the legacy tag fields: keywords are
3199
+ * already stored, and a bound added now could reject a record written
3200
+ * before the bound existed. The flynt `missing-string-validations` warning
3201
+ * on this field is accepted deliberately.
3202
+ */
3181
3203
  term?: string;
3182
- /** Whether the keyword is the main focus keyword. */
3204
+ /** Whether this is the page's primary focus keyword. At most one per page. */
3183
3205
  isMain?: boolean;
3184
3206
  /**
3185
- * The source that added the keyword terms to the SEO settings.
3207
+ * Which surface added the term, e.g. a panel or a suggestion flow. Used for
3208
+ * attribution in BI. Opaque to the renderer.
3186
3209
  * @maxLength 1000
3187
3210
  */
3188
3211
  origin?: string | null;
3189
3212
  }
3213
+ /**
3214
+ * One tag in the page's <head>.
3215
+ *
3216
+ * Not deprecated, and with no removal date, deliberately: stored data is
3217
+ * never migrated, so this shape stays valid input forever. `seo-renderer`
3218
+ * normalizes both shapes on READ.
3219
+ */
3190
3220
  interface Tag {
3191
3221
  /**
3192
- * SEO tag type.
3193
- *
3222
+ * Legacy. Was a free-form string: "title" | "meta" | "script" | "link".
3223
+ * The typed replacement is the `kind` oneof on `SeoSchemaV2.Tag`, which makes
3224
+ * the invalid combinations unrepresentable rather than merely discouraged.
3194
3225
  *
3195
- * Supported values: `title`, `meta`, `script`, `link`.
3196
- *
3197
- * Which of these an API actually accepts depends on where the tag is being set: this
3198
- * list is not a blanket guarantee across every API that reuses this message. Site SEO
3199
- * Tags in particular accepts only `meta` (see `SiteSeoTags.tags`) and rejects
3200
- * `title`/`script`/`link` with a validation error even though they appear here —
3201
- * check the field description of the specific `tags`-typed field you're writing to
3202
- * for the types it actually supports and the error it returns.
3226
+ * Which of these an API actually accepts depends on where the tag is being
3227
+ * set: this list is not a blanket guarantee across every API that reuses
3228
+ * this message. Site SEO Tags in particular accepts only `meta` (see
3229
+ * `SiteSeoTags.tags`) and rejects `title`/`script`/`link` with a validation
3230
+ * error even though they appear here — check the field description of the
3231
+ * specific `tags`-typed field you are writing to.
3203
3232
  *
3204
3233
  * Limitation: `title` and `script` (e.g. a `script` tag with `props.type`
3205
- * `"application/ld+json"` carrying structured data) are supported only when
3206
- * `custom` is unset or `false`. Setting `custom: true` on a `title` or `script`
3207
- * tag is rejected with `TAG_TYPE_NOT_ALLOWED`, because `custom: true` routes the
3208
- * write through the site's Advanced/Custom Tags list. To write structured data,
3209
- * omit `custom` (or set it to `false`).
3234
+ * "application/ld+json" carrying structured data) are supported only when
3235
+ * `custom` is unset or `false`. Setting `custom: true` on a `title` or
3236
+ * `script` tag is rejected with `TAG_TYPE_NOT_ALLOWED`, because
3237
+ * `custom: true` routes the write through the site's Advanced/Custom Tags
3238
+ * list. To write structured data, omit `custom` (or set it to `false`).
3239
+ *
3240
+ * No length limit: this field holds data written years ago by writers we
3241
+ * are not migrating. A constraint here could reject a record that is
3242
+ * already stored, which is exactly the promise this design makes.
3210
3243
  */
3211
3244
  type?: string;
3212
3245
  /**
3213
- * A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
3214
- * For example: `{"name": "description", "content": "the description itself"}`.
3246
+ * Legacy. Was an untyped bag of HTML attributes.
3247
+ * Typed replacement: `SeoSchemaV2.TitleTag` / `MetaTag` / `LinkTag`.
3215
3248
  */
3216
3249
  props?: Record<string, any> | null;
3217
- /** SEO tag metadata. For example, `{"height": 300, "width": 240}`. */
3250
+ /**
3251
+ * Legacy. Was an untyped bag of 16 mixed-purpose keys. In `SeoSchemaV2`
3252
+ * its contents are split by purpose: per-page structured-data state moves to
3253
+ * StructuredDataTag, authorship to `written_by`, and render-time preset
3254
+ * logic (variants, enabledByExperiment, removeSchemaIf*) moved out of the
3255
+ * stored document entirely — it belongs to the preset definition, not to the
3256
+ * page. See the design log for the full key-by-key mapping.
3257
+ */
3218
3258
  meta?: Record<string, any> | null;
3219
- /** SEO tag inner content. For example, `<title> inner content </title>`. */
3259
+ /**
3260
+ * Legacy. Was the tag's inner content, doubling as the JSON-LD payload
3261
+ * for script tags. Typed replacement: `SeoSchemaV2.TitleTag.text` and
3262
+ * `StructuredDataTag.json_ld`.
3263
+ * No length limit, for the same reason as `type` above.
3264
+ */
3220
3265
  children?: string;
3221
3266
  /**
3222
3267
  * Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages) —
3223
3268
  * i.e. an entry from the site's Advanced/Custom Tags list.
3224
3269
  *
3225
- * Setting this to `true` on a write restricts which `type` values are accepted
3226
- * — the same restriction the Advanced/Custom Tags UI enforces. `title` and
3227
- * `script` tags (including JSON-LD structured data) must be sent with `custom`
3228
- * omitted or `false`; sending them with `custom: true` is rejected with
3229
- * `TAG_TYPE_NOT_ALLOWED`.
3270
+ * Setting this to `true` on a write restricts which `type` values are
3271
+ * accepted — the same restriction the Advanced/Custom Tags UI enforces.
3272
+ * `title` and `script` tags (including JSON-LD structured data) must be sent
3273
+ * with `custom` omitted or `false`; sending them with `custom: true` is
3274
+ * rejected with `TAG_TYPE_NOT_ALLOWED`.
3230
3275
  *
3231
- * Note this is a separate restriction from Site SEO Tags' own type restriction on
3232
- * `SiteSeoTags.tags`: even with `custom` unset, Site SEO Tags rejects `script` (e.g.
3233
- * for site-wide structured data) unconditionally. There is currently no way to set
3234
- * site-wide, every-page structured data through any of these APIs — write a per-page
3235
- * `script` tag through the Item SEO Tags API instead.
3276
+ * Note this is a separate restriction from Site SEO Tags' own type
3277
+ * restriction on `SiteSeoTags.tags`: even with `custom` unset, Site SEO Tags
3278
+ * rejects `script` (e.g. for site-wide structured data) unconditionally.
3279
+ * There is currently no way to set site-wide, every-page structured data
3280
+ * through any of these APIs — write a per-page `script` tag through the Item
3281
+ * SEO Tags API instead.
3236
3282
  *
3237
3283
  * This flag is scoped to that feature only. It is NOT an indicator of whether a standard tag
3238
3284
  * (`title`, `description`, Open Graph, etc.) reflects a manually configured value versus a computed
@@ -3245,22 +3291,39 @@ interface Tag {
3245
3291
  * or Wix Studio pages, so even genuine Advanced/Custom Tags saved on those pages are missing from the
3246
3292
  * response entirely — there, `false` means this API could not tell, not that no custom tag exists.
3247
3293
  * Pass `seoData` explicitly to resolve against a known set of tags.
3294
+ *
3295
+ * `SeoSchemaV2.Tag` expresses this as `written_by = USER_CUSTOM`.
3248
3296
  */
3249
3297
  custom?: boolean;
3250
- /** Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. */
3298
+ /**
3299
+ * Whether the tag is excluded from the rendered <head>.
3300
+ *
3301
+ * A disabled tag is still stored, so the user can re-enable it and so a
3302
+ * pattern-provided tag stays suppressed on this page. Default false.
3303
+ */
3251
3304
  disabled?: boolean;
3252
3305
  }
3306
+ /** Page-level SEO settings that are not tags. */
3253
3307
  interface Settings {
3254
3308
  /**
3255
- * 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.
3309
+ * Whether to suppress the automatic redirect from this page's previous URL to
3310
+ * its current one after a slug change.
3256
3311
  *
3257
- *
3258
- * Default: `false` (automatical redirect is enabled).
3312
+ * Default false, meaning the redirect IS created. The field is named for the
3313
+ * exception rather than the rule, which reads backwards; kept as-is because
3314
+ * renaming a stored boolean is not worth the migration.
3259
3315
  */
3260
3316
  preventAutoRedirect?: boolean;
3261
3317
  /**
3262
- * User-selected keyword terms for a specific page.
3263
- * @maxSize 5
3318
+ * Keyword terms the user is targeting for this page. Used by the SEO
3319
+ * assistant and checklist; never rendered into <head>.
3320
+ *
3321
+ * 20 is a sanity bound, not the product limit. v1 declared 5 — the number
3322
+ * the panel happens to allow today — which is exactly the mistake we are
3323
+ * fixing for structured data. A product decision to allow 8 should not need
3324
+ * a proto release, so the panel owns that number and the proto only stops
3325
+ * something absurd.
3326
+ * @maxSize 20
3264
3327
  */
3265
3328
  keywords?: Keyword[];
3266
3329
  }
@@ -3414,6 +3477,10 @@ interface DraftPostTranslation {
3414
3477
  /** Post URL. */
3415
3478
  url?: string;
3416
3479
  }
3480
+ interface InitialDraftPostsCopied {
3481
+ /** Number of draft posts copied. */
3482
+ count?: number;
3483
+ }
3417
3484
  interface DraftCategoriesUpdated {
3418
3485
  /**
3419
3486
  * Draft post ID.
@@ -3452,200 +3519,6 @@ interface DraftTagsUpdated {
3452
3519
  */
3453
3520
  previousTags?: string[];
3454
3521
  }
3455
- interface GetDraftPostTotalsRequest {
3456
- /**
3457
- * Group results by fields (defaults to grouping by status).
3458
- * If, for example, grouping by language is passed, language values in response will be filled.
3459
- * If, for example, grouping by language is not passed, null values will be filled in language field in response.
3460
- * @maxSize 10
3461
- */
3462
- groupBy?: TotalDraftPostsGroupingFieldWithLiterals[];
3463
- /**
3464
- * Optional language filter by provided language code. Useful in multilingual context.
3465
- * @format LANGUAGE_TAG
3466
- */
3467
- language?: string | null;
3468
- }
3469
- declare enum TotalDraftPostsGroupingField {
3470
- /** Groups results by status. */
3471
- STATUS = "STATUS",
3472
- /** Groups results by language. */
3473
- LANGUAGE = "LANGUAGE"
3474
- }
3475
- /** @enumType */
3476
- type TotalDraftPostsGroupingFieldWithLiterals = TotalDraftPostsGroupingField | 'STATUS' | 'LANGUAGE';
3477
- interface GetDraftPostTotalsResponse {
3478
- /** Draft post totals. */
3479
- totalDraftPosts?: TotalDraftPosts[];
3480
- }
3481
- interface TotalDraftPosts {
3482
- /** Draft post totals in that group. */
3483
- total?: number;
3484
- /** Draft post status (only has value when grouping by status, otherwise null). */
3485
- status?: StatusWithLiterals;
3486
- /**
3487
- * Draft post language code (only has value when grouping by language, otherwise null).
3488
- * @format LANGUAGE_TAG
3489
- */
3490
- language?: string | null;
3491
- }
3492
- interface DomainEvent extends DomainEventBodyOneOf {
3493
- createdEvent?: EntityCreatedEvent;
3494
- updatedEvent?: EntityUpdatedEvent;
3495
- deletedEvent?: EntityDeletedEvent;
3496
- actionEvent?: ActionEvent;
3497
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
3498
- _id?: string;
3499
- /**
3500
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
3501
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
3502
- */
3503
- entityFqdn?: string;
3504
- /**
3505
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
3506
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
3507
- */
3508
- slug?: string;
3509
- /** ID of the entity associated with the event. */
3510
- entityId?: string;
3511
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
3512
- eventTime?: Date | null;
3513
- /**
3514
- * Whether the event was triggered as a result of a privacy regulation application
3515
- * (for example, GDPR).
3516
- */
3517
- triggeredByAnonymizeRequest?: boolean | null;
3518
- /** If present, indicates the action that triggered the event. */
3519
- originatedFrom?: string | null;
3520
- /**
3521
- * 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.
3522
- * 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.
3523
- */
3524
- entityEventSequence?: string | null;
3525
- }
3526
- /** @oneof */
3527
- interface DomainEventBodyOneOf {
3528
- createdEvent?: EntityCreatedEvent;
3529
- updatedEvent?: EntityUpdatedEvent;
3530
- deletedEvent?: EntityDeletedEvent;
3531
- actionEvent?: ActionEvent;
3532
- }
3533
- interface EntityCreatedEvent {
3534
- entity?: string;
3535
- }
3536
- interface RestoreInfo {
3537
- deletedDate?: Date | null;
3538
- }
3539
- interface EntityUpdatedEvent {
3540
- /**
3541
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
3542
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
3543
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
3544
- */
3545
- currentEntity?: string;
3546
- }
3547
- interface EntityDeletedEvent {
3548
- /** Entity that was deleted. */
3549
- deletedEntity?: string | null;
3550
- }
3551
- interface ActionEvent {
3552
- body?: string;
3553
- }
3554
- interface MessageEnvelope {
3555
- /**
3556
- * App instance ID.
3557
- * @format GUID
3558
- */
3559
- instanceId?: string | null;
3560
- /**
3561
- * Event type.
3562
- * @maxLength 150
3563
- */
3564
- eventType?: string;
3565
- /** The identification type and identity data. */
3566
- identity?: IdentificationData;
3567
- /** Stringify payload. */
3568
- data?: string;
3569
- /** Details related to the account */
3570
- accountInfo?: AccountInfo;
3571
- }
3572
- interface IdentificationData extends IdentificationDataIdOneOf {
3573
- /**
3574
- * ID of a site visitor that has not logged in to the site.
3575
- * @format GUID
3576
- */
3577
- anonymousVisitorId?: string;
3578
- /**
3579
- * ID of a site visitor that has logged in to the site.
3580
- * @format GUID
3581
- */
3582
- memberId?: string;
3583
- /**
3584
- * ID of a Wix user (site owner, contributor, etc.).
3585
- * @format GUID
3586
- */
3587
- wixUserId?: string;
3588
- /**
3589
- * ID of an app.
3590
- * @format GUID
3591
- */
3592
- appId?: string;
3593
- /** @readonly */
3594
- identityType?: WebhookIdentityTypeWithLiterals;
3595
- }
3596
- /** @oneof */
3597
- interface IdentificationDataIdOneOf {
3598
- /**
3599
- * ID of a site visitor that has not logged in to the site.
3600
- * @format GUID
3601
- */
3602
- anonymousVisitorId?: string;
3603
- /**
3604
- * ID of a site visitor that has logged in to the site.
3605
- * @format GUID
3606
- */
3607
- memberId?: string;
3608
- /**
3609
- * ID of a Wix user (site owner, contributor, etc.).
3610
- * @format GUID
3611
- */
3612
- wixUserId?: string;
3613
- /**
3614
- * ID of an app.
3615
- * @format GUID
3616
- */
3617
- appId?: string;
3618
- }
3619
- declare enum WebhookIdentityType {
3620
- UNKNOWN = "UNKNOWN",
3621
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
3622
- MEMBER = "MEMBER",
3623
- WIX_USER = "WIX_USER",
3624
- APP = "APP"
3625
- }
3626
- /** @enumType */
3627
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
3628
- interface AccountInfo {
3629
- /**
3630
- * ID of the Wix account associated with the event.
3631
- * @format GUID
3632
- */
3633
- accountId?: string | null;
3634
- /**
3635
- * ID of the parent Wix account. Only included when accountId belongs to a child account.
3636
- * @format GUID
3637
- */
3638
- parentAccountId?: string | null;
3639
- /**
3640
- * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
3641
- * @format GUID
3642
- */
3643
- siteId?: string | null;
3644
- }
3645
- interface InitialDraftPostsCopied {
3646
- /** Number of draft posts copied. */
3647
- count?: number;
3648
- }
3649
3522
  interface CreateDraftPostRequest {
3650
3523
  /** Draft post to create. */
3651
3524
  draftPost: DraftPost;
@@ -4295,9 +4168,291 @@ interface DraftPostCount {
4295
4168
  /** Number of posts. */
4296
4169
  postCount?: number;
4297
4170
  }
4298
- interface BulkRevertToUnpublishedRequest {
4171
+ interface DomainEvent extends DomainEventBodyOneOf {
4172
+ createdEvent?: EntityCreatedEvent;
4173
+ updatedEvent?: EntityUpdatedEvent;
4174
+ deletedEvent?: EntityDeletedEvent;
4175
+ actionEvent?: ActionEvent;
4176
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
4177
+ _id?: string;
4299
4178
  /**
4300
- * Source post IDs.
4179
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
4180
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
4181
+ */
4182
+ entityFqdn?: string;
4183
+ /**
4184
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
4185
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
4186
+ */
4187
+ slug?: string;
4188
+ /** ID of the entity associated with the event. */
4189
+ entityId?: string;
4190
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
4191
+ eventTime?: Date | null;
4192
+ /**
4193
+ * Whether the event was triggered as a result of a privacy regulation application
4194
+ * (for example, GDPR).
4195
+ */
4196
+ triggeredByAnonymizeRequest?: boolean | null;
4197
+ /** If present, indicates the action that triggered the event. */
4198
+ originatedFrom?: string | null;
4199
+ /**
4200
+ * 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.
4201
+ * 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.
4202
+ */
4203
+ entityEventSequence?: string | null;
4204
+ }
4205
+ /** @oneof */
4206
+ interface DomainEventBodyOneOf {
4207
+ createdEvent?: EntityCreatedEvent;
4208
+ updatedEvent?: EntityUpdatedEvent;
4209
+ deletedEvent?: EntityDeletedEvent;
4210
+ actionEvent?: ActionEvent;
4211
+ }
4212
+ interface EntityCreatedEvent {
4213
+ entity?: string;
4214
+ }
4215
+ interface RestoreInfo {
4216
+ deletedDate?: Date | null;
4217
+ }
4218
+ interface EntityUpdatedEvent {
4219
+ /**
4220
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
4221
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
4222
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
4223
+ */
4224
+ currentEntity?: string;
4225
+ }
4226
+ interface EntityDeletedEvent {
4227
+ /** Entity that was deleted. */
4228
+ deletedEntity?: string | null;
4229
+ }
4230
+ interface ActionEvent {
4231
+ body?: string;
4232
+ }
4233
+ interface MessageEnvelope {
4234
+ /**
4235
+ * App instance ID.
4236
+ * @format GUID
4237
+ */
4238
+ instanceId?: string | null;
4239
+ /**
4240
+ * Event type.
4241
+ * @maxLength 150
4242
+ */
4243
+ eventType?: string;
4244
+ /** The identification type and identity data. */
4245
+ identity?: IdentificationData;
4246
+ /** Stringify payload. */
4247
+ data?: string;
4248
+ /** Details related to the account */
4249
+ accountInfo?: AccountInfo;
4250
+ }
4251
+ interface IdentificationData extends IdentificationDataIdOneOf {
4252
+ /**
4253
+ * ID of a site visitor that has not logged in to the site.
4254
+ * @format GUID
4255
+ */
4256
+ anonymousVisitorId?: string;
4257
+ /**
4258
+ * ID of a site visitor that has logged in to the site.
4259
+ * @format GUID
4260
+ */
4261
+ memberId?: string;
4262
+ /**
4263
+ * ID of a Wix user (site owner, contributor, etc.).
4264
+ * @format GUID
4265
+ */
4266
+ wixUserId?: string;
4267
+ /**
4268
+ * ID of an app.
4269
+ * @format GUID
4270
+ */
4271
+ appId?: string;
4272
+ /** @readonly */
4273
+ identityType?: WebhookIdentityTypeWithLiterals;
4274
+ }
4275
+ /** @oneof */
4276
+ interface IdentificationDataIdOneOf {
4277
+ /**
4278
+ * ID of a site visitor that has not logged in to the site.
4279
+ * @format GUID
4280
+ */
4281
+ anonymousVisitorId?: string;
4282
+ /**
4283
+ * ID of a site visitor that has logged in to the site.
4284
+ * @format GUID
4285
+ */
4286
+ memberId?: string;
4287
+ /**
4288
+ * ID of a Wix user (site owner, contributor, etc.).
4289
+ * @format GUID
4290
+ */
4291
+ wixUserId?: string;
4292
+ /**
4293
+ * ID of an app.
4294
+ * @format GUID
4295
+ */
4296
+ appId?: string;
4297
+ }
4298
+ declare enum WebhookIdentityType {
4299
+ UNKNOWN = "UNKNOWN",
4300
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
4301
+ MEMBER = "MEMBER",
4302
+ WIX_USER = "WIX_USER",
4303
+ APP = "APP"
4304
+ }
4305
+ /** @enumType */
4306
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
4307
+ interface AccountInfo {
4308
+ /**
4309
+ * ID of the Wix account associated with the event.
4310
+ * @format GUID
4311
+ */
4312
+ accountId?: string | null;
4313
+ /**
4314
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
4315
+ * @format GUID
4316
+ */
4317
+ parentAccountId?: string | null;
4318
+ /**
4319
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
4320
+ * @format GUID
4321
+ */
4322
+ siteId?: string | null;
4323
+ }
4324
+ interface GetDraftPostTotalsRequest {
4325
+ /**
4326
+ * Group results by fields (defaults to grouping by status).
4327
+ * If, for example, grouping by language is passed, language values in response will be filled.
4328
+ * If, for example, grouping by language is not passed, null values will be filled in language field in response.
4329
+ * @maxSize 10
4330
+ */
4331
+ groupBy?: TotalDraftPostsGroupingFieldWithLiterals[];
4332
+ /**
4333
+ * Optional language filter by provided language code. Useful in multilingual context.
4334
+ * @format LANGUAGE_TAG
4335
+ */
4336
+ language?: string | null;
4337
+ }
4338
+ declare enum TotalDraftPostsGroupingField {
4339
+ /** Groups results by status. */
4340
+ STATUS = "STATUS",
4341
+ /** Groups results by language. */
4342
+ LANGUAGE = "LANGUAGE"
4343
+ }
4344
+ /** @enumType */
4345
+ type TotalDraftPostsGroupingFieldWithLiterals = TotalDraftPostsGroupingField | 'STATUS' | 'LANGUAGE';
4346
+ interface GetDraftPostTotalsResponse {
4347
+ /** Draft post totals. */
4348
+ totalDraftPosts?: TotalDraftPosts[];
4349
+ }
4350
+ interface TotalDraftPosts {
4351
+ /** Draft post totals in that group. */
4352
+ total?: number;
4353
+ /** Draft post status (only has value when grouping by status, otherwise null). */
4354
+ status?: StatusWithLiterals;
4355
+ /**
4356
+ * Draft post language code (only has value when grouping by language, otherwise null).
4357
+ * @format LANGUAGE_TAG
4358
+ */
4359
+ language?: string | null;
4360
+ }
4361
+ interface TranslateDraftRequest {
4362
+ /**
4363
+ * ID of the draft post or published post to translate.
4364
+ * @format GUID
4365
+ */
4366
+ postId: string;
4367
+ /**
4368
+ * Language to translate the post into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
4369
+ * For example, `de` for German, or `pt-br` for Brazilian Portuguese.
4370
+ * @format LANGUAGE_TAG
4371
+ */
4372
+ language: string;
4373
+ /**
4374
+ * Predefined sets of fields to return in the created draft post, in addition to the core draft post fields.
4375
+ *
4376
+ * - `URL`: Returns the draft post's preview URL.
4377
+ * - `CONTENT`: Returns the draft post's content.
4378
+ * - `RICH_CONTENT`: Returns the draft post's rich content.
4379
+ * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4380
+ *
4381
+ * Default: Core draft post fields only.
4382
+ * @maxSize 10
4383
+ */
4384
+ fieldsets?: FieldWithLiterals[];
4385
+ /**
4386
+ * Whether to machine translate the title and content into the target language.
4387
+ *
4388
+ * Default: `false`
4389
+ * @internal
4390
+ */
4391
+ useAutoTranslation?: boolean;
4392
+ }
4393
+ interface TranslateDraftResponse {
4394
+ /** Created draft post. */
4395
+ draftPost?: DraftPost;
4396
+ }
4397
+ interface IsDraftPostAutoTranslatableRequest {
4398
+ /**
4399
+ * Draft post ID.
4400
+ * @format GUID
4401
+ */
4402
+ draftPostId?: string;
4403
+ }
4404
+ interface IsDraftPostAutoTranslatableResponse {
4405
+ /**
4406
+ * Draft post ID.
4407
+ * @format GUID
4408
+ */
4409
+ draftPostId?: string;
4410
+ /** Whether enough machine translation word credits are available to translate the draft post. */
4411
+ translatable?: boolean;
4412
+ /** Number of words in the draft post's title. */
4413
+ titleWordCount?: number;
4414
+ /** Number of words in the draft post's content. */
4415
+ contentWordCount?: number;
4416
+ /** Number of machine translation word credits currently available. `-1` if the site's quota is unlimited. */
4417
+ availableAutoTranslateWords?: number;
4418
+ /** Number of machine translation word credits that remain after translating the draft post. `-1` if the site's quota is unlimited. */
4419
+ availableAutoTranslateWordsAfter?: number;
4420
+ /** Number of characters in the draft post's plain text content. */
4421
+ contentTextCharacterCount?: number;
4422
+ }
4423
+ interface UpdateDraftPostLanguageRequest {
4424
+ /**
4425
+ * ID of the draft post to update.
4426
+ * @format GUID
4427
+ */
4428
+ postId: string;
4429
+ /**
4430
+ * New language of the draft post, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
4431
+ * For example, `de` for German, or `pt-br` for Brazilian Portuguese.
4432
+ * @minLength 2
4433
+ * @format LANGUAGE_TAG
4434
+ */
4435
+ language: string;
4436
+ /**
4437
+ * Predefined sets of fields to return in the updated draft post, in addition to the core draft post fields.
4438
+ *
4439
+ * - `URL`: Returns the draft post's preview URL.
4440
+ * - `CONTENT`: Returns the draft post's content.
4441
+ * - `RICH_CONTENT`: Returns the draft post's rich content.
4442
+ * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4443
+ *
4444
+ * Default: Core draft post fields only.
4445
+ * @maxSize 10
4446
+ */
4447
+ fieldsets?: FieldWithLiterals[];
4448
+ }
4449
+ interface UpdateDraftPostLanguageResponse {
4450
+ /** Updated draft post. */
4451
+ draftPost?: DraftPost;
4452
+ }
4453
+ interface BulkRevertToUnpublishedRequest {
4454
+ /**
4455
+ * Source post IDs.
4301
4456
  * @minSize 1
4302
4457
  * @maxSize 100
4303
4458
  * @format GUID
@@ -4442,98 +4597,6 @@ interface MarkPostAsInModerationResponse {
4442
4597
  /** Updated post draft. */
4443
4598
  draftPost?: DraftPost;
4444
4599
  }
4445
- interface TranslateDraftRequest {
4446
- /**
4447
- * ID of the draft post or published post to translate.
4448
- * @format GUID
4449
- */
4450
- postId: string;
4451
- /**
4452
- * Language to translate the post into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
4453
- * For example, `de` for German, or `pt-br` for Brazilian Portuguese.
4454
- * @format LANGUAGE_TAG
4455
- */
4456
- language: string;
4457
- /**
4458
- * Predefined sets of fields to return in the created draft post, in addition to the core draft post fields.
4459
- *
4460
- * - `URL`: Returns the draft post's preview URL.
4461
- * - `CONTENT`: Returns the draft post's content.
4462
- * - `RICH_CONTENT`: Returns the draft post's rich content.
4463
- * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4464
- *
4465
- * Default: Core draft post fields only.
4466
- * @maxSize 10
4467
- */
4468
- fieldsets?: FieldWithLiterals[];
4469
- /**
4470
- * Whether to machine translate the title and content into the target language.
4471
- *
4472
- * Default: `false`
4473
- * @internal
4474
- */
4475
- useAutoTranslation?: boolean;
4476
- }
4477
- interface TranslateDraftResponse {
4478
- /** Created draft post. */
4479
- draftPost?: DraftPost;
4480
- }
4481
- interface IsDraftPostAutoTranslatableRequest {
4482
- /**
4483
- * Draft post ID.
4484
- * @format GUID
4485
- */
4486
- draftPostId?: string;
4487
- }
4488
- interface IsDraftPostAutoTranslatableResponse {
4489
- /**
4490
- * Draft post ID.
4491
- * @format GUID
4492
- */
4493
- draftPostId?: string;
4494
- /** Whether enough machine translation word credits are available to translate the draft post. */
4495
- translatable?: boolean;
4496
- /** Number of words in the draft post's title. */
4497
- titleWordCount?: number;
4498
- /** Number of words in the draft post's content. */
4499
- contentWordCount?: number;
4500
- /** Number of machine translation word credits currently available. `-1` if the site's quota is unlimited. */
4501
- availableAutoTranslateWords?: number;
4502
- /** Number of machine translation word credits that remain after translating the draft post. `-1` if the site's quota is unlimited. */
4503
- availableAutoTranslateWordsAfter?: number;
4504
- /** Number of characters in the draft post's plain text content. */
4505
- contentTextCharacterCount?: number;
4506
- }
4507
- interface UpdateDraftPostLanguageRequest {
4508
- /**
4509
- * ID of the draft post to update.
4510
- * @format GUID
4511
- */
4512
- postId: string;
4513
- /**
4514
- * New language of the draft post, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
4515
- * For example, `de` for German, or `pt-br` for Brazilian Portuguese.
4516
- * @minLength 2
4517
- * @format LANGUAGE_TAG
4518
- */
4519
- language: string;
4520
- /**
4521
- * Predefined sets of fields to return in the updated draft post, in addition to the core draft post fields.
4522
- *
4523
- * - `URL`: Returns the draft post's preview URL.
4524
- * - `CONTENT`: Returns the draft post's content.
4525
- * - `RICH_CONTENT`: Returns the draft post's rich content.
4526
- * - `GENERATED_EXCERPT`: Returns an excerpt generated from the content if a custom excerpt isn't set.
4527
- *
4528
- * Default: Core draft post fields only.
4529
- * @maxSize 10
4530
- */
4531
- fieldsets?: FieldWithLiterals[];
4532
- }
4533
- interface UpdateDraftPostLanguageResponse {
4534
- /** Updated draft post. */
4535
- draftPost?: DraftPost;
4536
- }
4537
4600
  interface BaseEventMetadata {
4538
4601
  /**
4539
4602
  * App instance ID.