@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.
@@ -928,6 +928,8 @@ interface TextStyle {
928
928
  textAlignment?: TextAlignmentWithLiterals;
929
929
  /** 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. */
930
930
  lineHeight?: string | null;
931
+ /** 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. */
932
+ fontSize?: FontSizeData;
931
933
  }
932
934
  declare enum TextAlignment {
933
935
  /** browser default, eqivalent to `initial` */
@@ -943,6 +945,18 @@ declare enum TextAlignment {
943
945
  }
944
946
  /** @enumType */
945
947
  type TextAlignmentWithLiterals = TextAlignment | 'AUTO' | 'LEFT' | 'RIGHT' | 'CENTER' | 'JUSTIFY';
948
+ interface FontSizeData {
949
+ /** The units used for the font size. */
950
+ unit?: FontTypeWithLiterals;
951
+ /** Font size value. */
952
+ value?: number | null;
953
+ }
954
+ declare enum FontType {
955
+ PX = "PX",
956
+ EM = "EM"
957
+ }
958
+ /** @enumType */
959
+ type FontTypeWithLiterals = FontType | 'PX' | 'EM';
946
960
  interface DividerData {
947
961
  /** Styling for the divider's container. */
948
962
  containerData?: PluginContainerData;
@@ -1807,18 +1821,6 @@ interface MentionData {
1807
1821
  /** 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. */
1808
1822
  type?: string | null;
1809
1823
  }
1810
- interface FontSizeData {
1811
- /** The units used for the font size. */
1812
- unit?: FontTypeWithLiterals;
1813
- /** Font size value. */
1814
- value?: number | null;
1815
- }
1816
- declare enum FontType {
1817
- PX = "PX",
1818
- EM = "EM"
1819
- }
1820
- /** @enumType */
1821
- type FontTypeWithLiterals = FontType | 'PX' | 'EM';
1822
1824
  interface SpoilerData {
1823
1825
  /** Spoiler ID. */
1824
1826
  id?: string | null;
@@ -3094,73 +3096,117 @@ declare enum ModerationStatusStatus {
3094
3096
  /** @enumType */
3095
3097
  type ModerationStatusStatusWithLiterals = ModerationStatusStatus | 'UNKNOWN' | 'APPROVED' | 'REJECTED';
3096
3098
  /**
3097
- * 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.
3098
- * The search engines use this information for ranking purposes, or to display snippets in the search results.
3099
- * 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.
3100
3108
  */
3101
3109
  interface SeoSchema {
3102
- /** 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
+ */
3103
3117
  tags?: Tag[];
3104
- /** SEO general settings. */
3118
+ /** Page-level SEO settings that are not themselves tags. */
3105
3119
  settings?: Settings;
3106
3120
  }
3121
+ /** A keyword term the user is targeting. */
3107
3122
  interface Keyword {
3108
- /** 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
+ */
3109
3131
  term?: string;
3110
- /** Whether the keyword is the main focus keyword. */
3132
+ /** Whether this is the page's primary focus keyword. At most one per page. */
3111
3133
  isMain?: boolean;
3112
3134
  /**
3113
- * 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.
3114
3137
  * @maxLength 1000
3115
3138
  */
3116
3139
  origin?: string | null;
3117
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
+ */
3118
3148
  interface Tag {
3119
3149
  /**
3120
- * SEO tag type.
3121
- *
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.
3122
3153
  *
3123
- * Supported values: `title`, `meta`, `script`, `link`.
3124
- *
3125
- * Which of these an API actually accepts depends on where the tag is being set: this
3126
- * list is not a blanket guarantee across every API that reuses this message. Site SEO
3127
- * Tags in particular accepts only `meta` (see `SiteSeoTags.tags`) and rejects
3128
- * `title`/`script`/`link` with a validation error even though they appear here —
3129
- * check the field description of the specific `tags`-typed field you're writing to
3130
- * 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.
3131
3160
  *
3132
3161
  * Limitation: `title` and `script` (e.g. a `script` tag with `props.type`
3133
- * `"application/ld+json"` carrying structured data) are supported only when
3134
- * `custom` is unset or `false`. Setting `custom: true` on a `title` or `script`
3135
- * tag is rejected with `TAG_TYPE_NOT_ALLOWED`, because `custom: true` routes the
3136
- * write through the site's Advanced/Custom Tags list. To write structured data,
3137
- * 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.
3138
3171
  */
3139
3172
  type?: string;
3140
3173
  /**
3141
- * A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
3142
- * For example: `{"name": "description", "content": "the description itself"}`.
3174
+ * Legacy. Was an untyped bag of HTML attributes.
3175
+ * Typed replacement: `SeoSchemaV2.TitleTag` / `MetaTag` / `LinkTag`.
3143
3176
  */
3144
3177
  props?: Record<string, any> | null;
3145
- /** 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
+ */
3146
3186
  meta?: Record<string, any> | null;
3147
- /** 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
+ */
3148
3193
  children?: string;
3149
3194
  /**
3150
3195
  * Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages) —
3151
3196
  * i.e. an entry from the site's Advanced/Custom Tags list.
3152
3197
  *
3153
- * Setting this to `true` on a write restricts which `type` values are accepted
3154
- * — the same restriction the Advanced/Custom Tags UI enforces. `title` and
3155
- * `script` tags (including JSON-LD structured data) must be sent with `custom`
3156
- * omitted or `false`; sending them with `custom: true` is rejected with
3157
- * `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`.
3158
3203
  *
3159
- * Note this is a separate restriction from Site SEO Tags' own type restriction on
3160
- * `SiteSeoTags.tags`: even with `custom` unset, Site SEO Tags rejects `script` (e.g.
3161
- * for site-wide structured data) unconditionally. There is currently no way to set
3162
- * site-wide, every-page structured data through any of these APIs — write a per-page
3163
- * `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.
3164
3210
  *
3165
3211
  * This flag is scoped to that feature only. It is NOT an indicator of whether a standard tag
3166
3212
  * (`title`, `description`, Open Graph, etc.) reflects a manually configured value versus a computed
@@ -3173,22 +3219,39 @@ interface Tag {
3173
3219
  * or Wix Studio pages, so even genuine Advanced/Custom Tags saved on those pages are missing from the
3174
3220
  * response entirely — there, `false` means this API could not tell, not that no custom tag exists.
3175
3221
  * Pass `seoData` explicitly to resolve against a known set of tags.
3222
+ *
3223
+ * `SeoSchemaV2.Tag` expresses this as `written_by = USER_CUSTOM`.
3176
3224
  */
3177
3225
  custom?: boolean;
3178
- /** 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
+ */
3179
3232
  disabled?: boolean;
3180
3233
  }
3234
+ /** Page-level SEO settings that are not tags. */
3181
3235
  interface Settings {
3182
3236
  /**
3183
- * 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.
3184
3239
  *
3185
- *
3186
- * 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.
3187
3243
  */
3188
3244
  preventAutoRedirect?: boolean;
3189
3245
  /**
3190
- * User-selected keyword terms for a specific page.
3191
- * @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
3192
3255
  */
3193
3256
  keywords?: Keyword[];
3194
3257
  }
@@ -3282,6 +3345,10 @@ interface DraftPostTranslation {
3282
3345
  /** Post URL. */
3283
3346
  url?: string;
3284
3347
  }
3348
+ interface InitialDraftPostsCopied {
3349
+ /** Number of draft posts copied. */
3350
+ count?: number;
3351
+ }
3285
3352
  interface DraftCategoriesUpdated {
3286
3353
  /**
3287
3354
  * Draft post ID.
@@ -3320,200 +3387,6 @@ interface DraftTagsUpdated {
3320
3387
  */
3321
3388
  previousTags?: string[];
3322
3389
  }
3323
- interface GetDraftPostTotalsRequest {
3324
- /**
3325
- * Group results by fields (defaults to grouping by status).
3326
- * If, for example, grouping by language is passed, language values in response will be filled.
3327
- * If, for example, grouping by language is not passed, null values will be filled in language field in response.
3328
- * @maxSize 10
3329
- */
3330
- groupBy?: TotalDraftPostsGroupingFieldWithLiterals[];
3331
- /**
3332
- * Optional language filter by provided language code. Useful in multilingual context.
3333
- * @format LANGUAGE_TAG
3334
- */
3335
- language?: string | null;
3336
- }
3337
- declare enum TotalDraftPostsGroupingField {
3338
- /** Groups results by status. */
3339
- STATUS = "STATUS",
3340
- /** Groups results by language. */
3341
- LANGUAGE = "LANGUAGE"
3342
- }
3343
- /** @enumType */
3344
- type TotalDraftPostsGroupingFieldWithLiterals = TotalDraftPostsGroupingField | 'STATUS' | 'LANGUAGE';
3345
- interface GetDraftPostTotalsResponse {
3346
- /** Draft post totals. */
3347
- totalDraftPosts?: TotalDraftPosts[];
3348
- }
3349
- interface TotalDraftPosts {
3350
- /** Draft post totals in that group. */
3351
- total?: number;
3352
- /** Draft post status (only has value when grouping by status, otherwise null). */
3353
- status?: StatusWithLiterals;
3354
- /**
3355
- * Draft post language code (only has value when grouping by language, otherwise null).
3356
- * @format LANGUAGE_TAG
3357
- */
3358
- language?: string | null;
3359
- }
3360
- interface DomainEvent extends DomainEventBodyOneOf {
3361
- createdEvent?: EntityCreatedEvent;
3362
- updatedEvent?: EntityUpdatedEvent;
3363
- deletedEvent?: EntityDeletedEvent;
3364
- actionEvent?: ActionEvent;
3365
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
3366
- _id?: string;
3367
- /**
3368
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
3369
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
3370
- */
3371
- entityFqdn?: string;
3372
- /**
3373
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
3374
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
3375
- */
3376
- slug?: string;
3377
- /** ID of the entity associated with the event. */
3378
- entityId?: string;
3379
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
3380
- eventTime?: Date | null;
3381
- /**
3382
- * Whether the event was triggered as a result of a privacy regulation application
3383
- * (for example, GDPR).
3384
- */
3385
- triggeredByAnonymizeRequest?: boolean | null;
3386
- /** If present, indicates the action that triggered the event. */
3387
- originatedFrom?: string | null;
3388
- /**
3389
- * 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.
3390
- * 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.
3391
- */
3392
- entityEventSequence?: string | null;
3393
- }
3394
- /** @oneof */
3395
- interface DomainEventBodyOneOf {
3396
- createdEvent?: EntityCreatedEvent;
3397
- updatedEvent?: EntityUpdatedEvent;
3398
- deletedEvent?: EntityDeletedEvent;
3399
- actionEvent?: ActionEvent;
3400
- }
3401
- interface EntityCreatedEvent {
3402
- entity?: string;
3403
- }
3404
- interface RestoreInfo {
3405
- deletedDate?: Date | null;
3406
- }
3407
- interface EntityUpdatedEvent {
3408
- /**
3409
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
3410
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
3411
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
3412
- */
3413
- currentEntity?: string;
3414
- }
3415
- interface EntityDeletedEvent {
3416
- /** Entity that was deleted. */
3417
- deletedEntity?: string | null;
3418
- }
3419
- interface ActionEvent {
3420
- body?: string;
3421
- }
3422
- interface MessageEnvelope {
3423
- /**
3424
- * App instance ID.
3425
- * @format GUID
3426
- */
3427
- instanceId?: string | null;
3428
- /**
3429
- * Event type.
3430
- * @maxLength 150
3431
- */
3432
- eventType?: string;
3433
- /** The identification type and identity data. */
3434
- identity?: IdentificationData;
3435
- /** Stringify payload. */
3436
- data?: string;
3437
- /** Details related to the account */
3438
- accountInfo?: AccountInfo;
3439
- }
3440
- interface IdentificationData extends IdentificationDataIdOneOf {
3441
- /**
3442
- * ID of a site visitor that has not logged in to the site.
3443
- * @format GUID
3444
- */
3445
- anonymousVisitorId?: string;
3446
- /**
3447
- * ID of a site visitor that has logged in to the site.
3448
- * @format GUID
3449
- */
3450
- memberId?: string;
3451
- /**
3452
- * ID of a Wix user (site owner, contributor, etc.).
3453
- * @format GUID
3454
- */
3455
- wixUserId?: string;
3456
- /**
3457
- * ID of an app.
3458
- * @format GUID
3459
- */
3460
- appId?: string;
3461
- /** @readonly */
3462
- identityType?: WebhookIdentityTypeWithLiterals;
3463
- }
3464
- /** @oneof */
3465
- interface IdentificationDataIdOneOf {
3466
- /**
3467
- * ID of a site visitor that has not logged in to the site.
3468
- * @format GUID
3469
- */
3470
- anonymousVisitorId?: string;
3471
- /**
3472
- * ID of a site visitor that has logged in to the site.
3473
- * @format GUID
3474
- */
3475
- memberId?: string;
3476
- /**
3477
- * ID of a Wix user (site owner, contributor, etc.).
3478
- * @format GUID
3479
- */
3480
- wixUserId?: string;
3481
- /**
3482
- * ID of an app.
3483
- * @format GUID
3484
- */
3485
- appId?: string;
3486
- }
3487
- declare enum WebhookIdentityType {
3488
- UNKNOWN = "UNKNOWN",
3489
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
3490
- MEMBER = "MEMBER",
3491
- WIX_USER = "WIX_USER",
3492
- APP = "APP"
3493
- }
3494
- /** @enumType */
3495
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
3496
- interface AccountInfo {
3497
- /**
3498
- * ID of the Wix account associated with the event.
3499
- * @format GUID
3500
- */
3501
- accountId?: string | null;
3502
- /**
3503
- * ID of the parent Wix account. Only included when accountId belongs to a child account.
3504
- * @format GUID
3505
- */
3506
- parentAccountId?: string | null;
3507
- /**
3508
- * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
3509
- * @format GUID
3510
- */
3511
- siteId?: string | null;
3512
- }
3513
- interface InitialDraftPostsCopied {
3514
- /** Number of draft posts copied. */
3515
- count?: number;
3516
- }
3517
3390
  interface CreateDraftPostRequest {
3518
3391
  /** Draft post to create. */
3519
3392
  draftPost: DraftPost;
@@ -4094,116 +3967,195 @@ interface DraftPostCount {
4094
3967
  /** Number of posts. */
4095
3968
  postCount?: number;
4096
3969
  }
4097
- 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;
4098
3977
  /**
4099
- * Source post IDs.
4100
- * @minSize 1
4101
- * @maxSize 100
4102
- * @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`.
4103
3980
  */
4104
- postIds?: string[];
4105
- /** Should full draft post be returned. */
4106
- returnFullEntity?: boolean;
3981
+ entityFqdn?: string;
3982
+ /**
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`.
3985
+ */
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;
4107
4003
  }
4108
- interface BulkRevertToUnpublishedResponse {
4109
- /** Bulk action results. */
4110
- results?: BulkDraftPostResult[];
4111
- /** Bulk action metadata. */
4112
- bulkActionMetadata?: BulkActionMetadata;
4004
+ /** @oneof */
4005
+ interface DomainEventBodyOneOf {
4006
+ createdEvent?: EntityCreatedEvent;
4007
+ updatedEvent?: EntityUpdatedEvent;
4008
+ deletedEvent?: EntityDeletedEvent;
4009
+ actionEvent?: ActionEvent;
4113
4010
  }
4114
- interface BulkRejectDraftPostRequest {
4011
+ interface EntityCreatedEvent {
4012
+ entity?: string;
4013
+ }
4014
+ interface RestoreInfo {
4015
+ deletedDate?: Date | null;
4016
+ }
4017
+ interface EntityUpdatedEvent {
4115
4018
  /**
4116
- * Source post IDs.
4117
- * @minSize 1
4118
- * @maxSize 100
4119
- * @format GUID
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.
4120
4022
  */
4121
- postIds?: string[];
4122
- /** Should full draft post be returned. */
4123
- returnFullEntity?: boolean;
4023
+ currentEntity?: string;
4124
4024
  }
4125
- interface BulkRejectDraftPostResponse {
4126
- /** Bulk action results. */
4127
- results?: BulkDraftPostResult[];
4128
- /** Bulk action metadata. */
4129
- bulkActionMetadata?: BulkActionMetadata;
4025
+ interface EntityDeletedEvent {
4026
+ /** Entity that was deleted. */
4027
+ deletedEntity?: string | null;
4130
4028
  }
4131
- interface RevertToUnpublishedRequest {
4029
+ interface ActionEvent {
4030
+ body?: string;
4031
+ }
4032
+ interface MessageEnvelope {
4132
4033
  /**
4133
- * Source post ID.
4034
+ * App instance ID.
4134
4035
  * @format GUID
4135
4036
  */
4136
- postId?: string;
4037
+ instanceId?: string | null;
4137
4038
  /**
4138
- * List of draft post fields to be included if entities are present in the response.
4139
- * Base fieldset, which is default, will return all core draft post properties.
4140
- * Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
4141
- * @maxSize 10
4039
+ * Event type.
4040
+ * @maxLength 150
4142
4041
  */
4143
- fieldsets?: FieldWithLiterals[];
4144
- }
4145
- interface RevertToUnpublishedResponse {
4146
- /** Updated post draft. */
4147
- 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;
4148
4049
  }
4149
- interface RejectDraftPostRequest {
4050
+ interface IdentificationData extends IdentificationDataIdOneOf {
4150
4051
  /**
4151
- * Source post ID.
4052
+ * ID of a site visitor that has not logged in to the site.
4152
4053
  * @format GUID
4153
4054
  */
4154
- postId?: string;
4055
+ anonymousVisitorId?: string;
4155
4056
  /**
4156
- * List of draft post fields to be included if entities are present in the response.
4157
- * Base fieldset, which is default, will return all core draft post properties.
4158
- * Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
4159
- * @maxSize 10
4057
+ * ID of a site visitor that has logged in to the site.
4058
+ * @format GUID
4160
4059
  */
4161
- fieldsets?: FieldWithLiterals[];
4162
- }
4163
- interface RejectDraftPostResponse {
4164
- /** Draft post. */
4165
- 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;
4166
4073
  }
4167
- interface ApproveDraftPostRequest {
4074
+ /** @oneof */
4075
+ interface IdentificationDataIdOneOf {
4168
4076
  /**
4169
- * Source post ID.
4077
+ * ID of a site visitor that has not logged in to the site.
4170
4078
  * @format GUID
4171
4079
  */
4172
- postId?: string;
4080
+ anonymousVisitorId?: string;
4173
4081
  /**
4174
- * Scheduled publish date if should be not immediately published.
4175
- * @maxLength 24
4082
+ * ID of a site visitor that has logged in to the site.
4083
+ * @format GUID
4176
4084
  */
4177
- scheduledPublishDate?: string | null;
4085
+ memberId?: string;
4178
4086
  /**
4179
- * List of draft post fields to be included if entities are present in the response.
4180
- * Base fieldset, which is default, will return all core draft post properties.
4181
- * Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
4182
- * @maxSize 10
4087
+ * ID of a Wix user (site owner, contributor, etc.).
4088
+ * @format GUID
4183
4089
  */
4184
- fieldsets?: FieldWithLiterals[];
4090
+ wixUserId?: string;
4091
+ /**
4092
+ * ID of an app.
4093
+ * @format GUID
4094
+ */
4095
+ appId?: string;
4185
4096
  }
4186
- interface ApproveDraftPostResponse {
4187
- /** Updated post draft. */
4188
- 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"
4189
4103
  }
4190
- interface MarkPostAsInModerationRequest {
4104
+ /** @enumType */
4105
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
4106
+ interface AccountInfo {
4191
4107
  /**
4192
- * Source post ID.
4193
- * @maxLength 38
4108
+ * ID of the Wix account associated with the event.
4109
+ * @format GUID
4194
4110
  */
4195
- postId?: string;
4111
+ accountId?: string | null;
4196
4112
  /**
4197
- * List of draft post fields to be included if entities are present in the response.
4198
- * Base fieldset, which is default, will return all core draft post properties.
4199
- * 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.
4200
4128
  * @maxSize 10
4201
4129
  */
4202
- 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;
4203
4136
  }
4204
- interface MarkPostAsInModerationResponse {
4205
- /** Updated post draft. */
4206
- 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;
4207
4159
  }
4208
4160
  interface TranslateDraftRequest {
4209
4161
  /**
@@ -4290,6 +4242,117 @@ interface UpdateDraftPostLanguageResponse {
4290
4242
  /** Updated draft post. */
4291
4243
  draftPost?: DraftPost;
4292
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
+ }
4293
4356
  interface BaseEventMetadata {
4294
4357
  /**
4295
4358
  * App instance ID.