@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.
- package/build/cjs/index.js +18 -18
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +387 -324
- package/build/cjs/index.typings.js +18 -18
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +391 -328
- package/build/cjs/meta.js +18 -18
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +18 -18
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +387 -324
- package/build/es/index.typings.mjs +18 -18
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +391 -328
- package/build/es/meta.mjs +18 -18
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +406 -343
- package/build/internal/cjs/meta.d.ts +539 -476
- package/build/internal/es/index.typings.d.mts +406 -343
- package/build/internal/es/meta.d.mts +539 -476
- package/package.json +4 -4
|
@@ -1034,6 +1034,8 @@ interface TextStyle {
|
|
|
1034
1034
|
textAlignment?: TextAlignmentWithLiterals;
|
|
1035
1035
|
/** 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. */
|
|
1036
1036
|
lineHeight?: string | null;
|
|
1037
|
+
/** 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. */
|
|
1038
|
+
fontSize?: FontSizeData;
|
|
1037
1039
|
}
|
|
1038
1040
|
declare enum TextAlignment {
|
|
1039
1041
|
/** browser default, eqivalent to `initial` */
|
|
@@ -1049,6 +1051,18 @@ declare enum TextAlignment {
|
|
|
1049
1051
|
}
|
|
1050
1052
|
/** @enumType */
|
|
1051
1053
|
type TextAlignmentWithLiterals = TextAlignment | 'AUTO' | 'LEFT' | 'RIGHT' | 'CENTER' | 'JUSTIFY';
|
|
1054
|
+
interface FontSizeData {
|
|
1055
|
+
/** The units used for the font size. */
|
|
1056
|
+
unit?: FontTypeWithLiterals;
|
|
1057
|
+
/** Font size value. */
|
|
1058
|
+
value?: number | null;
|
|
1059
|
+
}
|
|
1060
|
+
declare enum FontType {
|
|
1061
|
+
PX = "PX",
|
|
1062
|
+
EM = "EM"
|
|
1063
|
+
}
|
|
1064
|
+
/** @enumType */
|
|
1065
|
+
type FontTypeWithLiterals = FontType | 'PX' | 'EM';
|
|
1052
1066
|
interface DividerData {
|
|
1053
1067
|
/** Styling for the divider's container. */
|
|
1054
1068
|
containerData?: PluginContainerData;
|
|
@@ -1913,18 +1927,6 @@ interface MentionData {
|
|
|
1913
1927
|
/** 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. */
|
|
1914
1928
|
type?: string | null;
|
|
1915
1929
|
}
|
|
1916
|
-
interface FontSizeData {
|
|
1917
|
-
/** The units used for the font size. */
|
|
1918
|
-
unit?: FontTypeWithLiterals;
|
|
1919
|
-
/** Font size value. */
|
|
1920
|
-
value?: number | null;
|
|
1921
|
-
}
|
|
1922
|
-
declare enum FontType {
|
|
1923
|
-
PX = "PX",
|
|
1924
|
-
EM = "EM"
|
|
1925
|
-
}
|
|
1926
|
-
/** @enumType */
|
|
1927
|
-
type FontTypeWithLiterals = FontType | 'PX' | 'EM';
|
|
1928
1930
|
interface SpoilerData {
|
|
1929
1931
|
/** Spoiler ID. */
|
|
1930
1932
|
id?: string | null;
|
|
@@ -3207,73 +3209,117 @@ declare enum ModerationStatusStatus {
|
|
|
3207
3209
|
/** @enumType */
|
|
3208
3210
|
type ModerationStatusStatusWithLiterals = ModerationStatusStatus | 'UNKNOWN' | 'APPROVED' | 'REJECTED';
|
|
3209
3211
|
/**
|
|
3210
|
-
* The SEO
|
|
3211
|
-
*
|
|
3212
|
-
*
|
|
3212
|
+
* The SEO data for a single page or dynamic item, in the shape stored today.
|
|
3213
|
+
*
|
|
3214
|
+
* FROZEN. Existing server code maps onto this message field by field, so its
|
|
3215
|
+
* field set must never change (see the file header). New writers use
|
|
3216
|
+
* `SeoSchemaV2`.
|
|
3217
|
+
*
|
|
3218
|
+
* These tags are rendered into the <head> of the HTML document and are not
|
|
3219
|
+
* visible on the page itself. They override every other source of tags
|
|
3220
|
+
* (site defaults, vertical presets, patterns) for this page.
|
|
3213
3221
|
*/
|
|
3214
3222
|
interface SeoSchema {
|
|
3215
|
-
/**
|
|
3223
|
+
/**
|
|
3224
|
+
* The tags rendered into <head>, in no particular order. Render order is
|
|
3225
|
+
* decided by the renderer, not by position in this list.
|
|
3226
|
+
*
|
|
3227
|
+
* No maxSize: this list is already populated by data written years ago, and
|
|
3228
|
+
* a bound added now could reject a page that is already stored.
|
|
3229
|
+
*/
|
|
3216
3230
|
tags?: Tag[];
|
|
3217
|
-
/** SEO
|
|
3231
|
+
/** Page-level SEO settings that are not themselves tags. */
|
|
3218
3232
|
settings?: Settings;
|
|
3219
3233
|
}
|
|
3234
|
+
/** A keyword term the user is targeting. */
|
|
3220
3235
|
interface Keyword {
|
|
3221
|
-
/**
|
|
3236
|
+
/**
|
|
3237
|
+
* The term itself, e.g. "trail running shoes".
|
|
3238
|
+
*
|
|
3239
|
+
* No maxLength, for the same reason as the legacy tag fields: keywords are
|
|
3240
|
+
* already stored, and a bound added now could reject a record written
|
|
3241
|
+
* before the bound existed. The flynt `missing-string-validations` warning
|
|
3242
|
+
* on this field is accepted deliberately.
|
|
3243
|
+
*/
|
|
3222
3244
|
term?: string;
|
|
3223
|
-
/** Whether
|
|
3245
|
+
/** Whether this is the page's primary focus keyword. At most one per page. */
|
|
3224
3246
|
isMain?: boolean;
|
|
3225
3247
|
/**
|
|
3226
|
-
*
|
|
3248
|
+
* Which surface added the term, e.g. a panel or a suggestion flow. Used for
|
|
3249
|
+
* attribution in BI. Opaque to the renderer.
|
|
3227
3250
|
* @maxLength 1000
|
|
3228
3251
|
*/
|
|
3229
3252
|
origin?: string | null;
|
|
3230
3253
|
}
|
|
3254
|
+
/**
|
|
3255
|
+
* One tag in the page's <head>.
|
|
3256
|
+
*
|
|
3257
|
+
* Not deprecated, and with no removal date, deliberately: stored data is
|
|
3258
|
+
* never migrated, so this shape stays valid input forever. `seo-renderer`
|
|
3259
|
+
* normalizes both shapes on READ.
|
|
3260
|
+
*/
|
|
3231
3261
|
interface Tag {
|
|
3232
3262
|
/**
|
|
3233
|
-
*
|
|
3234
|
-
*
|
|
3263
|
+
* Legacy. Was a free-form string: "title" | "meta" | "script" | "link".
|
|
3264
|
+
* The typed replacement is the `kind` oneof on `SeoSchemaV2.Tag`, which makes
|
|
3265
|
+
* the invalid combinations unrepresentable rather than merely discouraged.
|
|
3235
3266
|
*
|
|
3236
|
-
*
|
|
3237
|
-
*
|
|
3238
|
-
*
|
|
3239
|
-
*
|
|
3240
|
-
*
|
|
3241
|
-
* `
|
|
3242
|
-
* check the field description of the specific `tags`-typed field you're writing to
|
|
3243
|
-
* for the types it actually supports and the error it returns.
|
|
3267
|
+
* Which of these an API actually accepts depends on where the tag is being
|
|
3268
|
+
* set: this list is not a blanket guarantee across every API that reuses
|
|
3269
|
+
* this message. Site SEO Tags in particular accepts only `meta` (see
|
|
3270
|
+
* `SiteSeoTags.tags`) and rejects `title`/`script`/`link` with a validation
|
|
3271
|
+
* error even though they appear here — check the field description of the
|
|
3272
|
+
* specific `tags`-typed field you are writing to.
|
|
3244
3273
|
*
|
|
3245
3274
|
* Limitation: `title` and `script` (e.g. a `script` tag with `props.type`
|
|
3246
|
-
*
|
|
3247
|
-
* `custom` is unset or `false`. Setting `custom: true` on a `title` or
|
|
3248
|
-
* tag is rejected with `TAG_TYPE_NOT_ALLOWED`, because
|
|
3249
|
-
* write through the site's Advanced/Custom Tags
|
|
3250
|
-
* omit `custom` (or set it to `false`).
|
|
3275
|
+
* "application/ld+json" carrying structured data) are supported only when
|
|
3276
|
+
* `custom` is unset or `false`. Setting `custom: true` on a `title` or
|
|
3277
|
+
* `script` tag is rejected with `TAG_TYPE_NOT_ALLOWED`, because
|
|
3278
|
+
* `custom: true` routes the write through the site's Advanced/Custom Tags
|
|
3279
|
+
* list. To write structured data, omit `custom` (or set it to `false`).
|
|
3280
|
+
*
|
|
3281
|
+
* No length limit: this field holds data written years ago by writers we
|
|
3282
|
+
* are not migrating. A constraint here could reject a record that is
|
|
3283
|
+
* already stored, which is exactly the promise this design makes.
|
|
3251
3284
|
*/
|
|
3252
3285
|
type?: string;
|
|
3253
3286
|
/**
|
|
3254
|
-
*
|
|
3255
|
-
*
|
|
3287
|
+
* Legacy. Was an untyped bag of HTML attributes.
|
|
3288
|
+
* Typed replacement: `SeoSchemaV2.TitleTag` / `MetaTag` / `LinkTag`.
|
|
3256
3289
|
*/
|
|
3257
3290
|
props?: Record<string, any> | null;
|
|
3258
|
-
/**
|
|
3291
|
+
/**
|
|
3292
|
+
* Legacy. Was an untyped bag of 16 mixed-purpose keys. In `SeoSchemaV2`
|
|
3293
|
+
* its contents are split by purpose: per-page structured-data state moves to
|
|
3294
|
+
* StructuredDataTag, authorship to `written_by`, and render-time preset
|
|
3295
|
+
* logic (variants, enabledByExperiment, removeSchemaIf*) moved out of the
|
|
3296
|
+
* stored document entirely — it belongs to the preset definition, not to the
|
|
3297
|
+
* page. See the design log for the full key-by-key mapping.
|
|
3298
|
+
*/
|
|
3259
3299
|
meta?: Record<string, any> | null;
|
|
3260
|
-
/**
|
|
3300
|
+
/**
|
|
3301
|
+
* Legacy. Was the tag's inner content, doubling as the JSON-LD payload
|
|
3302
|
+
* for script tags. Typed replacement: `SeoSchemaV2.TitleTag.text` and
|
|
3303
|
+
* `StructuredDataTag.json_ld`.
|
|
3304
|
+
* No length limit, for the same reason as `type` above.
|
|
3305
|
+
*/
|
|
3261
3306
|
children?: string;
|
|
3262
3307
|
/**
|
|
3263
3308
|
* Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages) —
|
|
3264
3309
|
* i.e. an entry from the site's Advanced/Custom Tags list.
|
|
3265
3310
|
*
|
|
3266
|
-
* Setting this to `true` on a write restricts which `type` values are
|
|
3267
|
-
* — the same restriction the Advanced/Custom Tags UI enforces.
|
|
3268
|
-
* `script` tags (including JSON-LD structured data) must be sent
|
|
3269
|
-
* omitted or `false`; sending them with `custom: true` is
|
|
3270
|
-
* `TAG_TYPE_NOT_ALLOWED`.
|
|
3311
|
+
* Setting this to `true` on a write restricts which `type` values are
|
|
3312
|
+
* accepted — the same restriction the Advanced/Custom Tags UI enforces.
|
|
3313
|
+
* `title` and `script` tags (including JSON-LD structured data) must be sent
|
|
3314
|
+
* with `custom` omitted or `false`; sending them with `custom: true` is
|
|
3315
|
+
* rejected with `TAG_TYPE_NOT_ALLOWED`.
|
|
3271
3316
|
*
|
|
3272
|
-
* Note this is a separate restriction from Site SEO Tags' own type
|
|
3273
|
-
* `SiteSeoTags.tags`: even with `custom` unset, Site SEO Tags
|
|
3274
|
-
* for site-wide structured data) unconditionally.
|
|
3275
|
-
* site-wide, every-page structured data
|
|
3276
|
-
* `script` tag through the Item
|
|
3317
|
+
* Note this is a separate restriction from Site SEO Tags' own type
|
|
3318
|
+
* restriction on `SiteSeoTags.tags`: even with `custom` unset, Site SEO Tags
|
|
3319
|
+
* rejects `script` (e.g. for site-wide structured data) unconditionally.
|
|
3320
|
+
* There is currently no way to set site-wide, every-page structured data
|
|
3321
|
+
* through any of these APIs — write a per-page `script` tag through the Item
|
|
3322
|
+
* SEO Tags API instead.
|
|
3277
3323
|
*
|
|
3278
3324
|
* This flag is scoped to that feature only. It is NOT an indicator of whether a standard tag
|
|
3279
3325
|
* (`title`, `description`, Open Graph, etc.) reflects a manually configured value versus a computed
|
|
@@ -3286,22 +3332,39 @@ interface Tag {
|
|
|
3286
3332
|
* or Wix Studio pages, so even genuine Advanced/Custom Tags saved on those pages are missing from the
|
|
3287
3333
|
* response entirely — there, `false` means this API could not tell, not that no custom tag exists.
|
|
3288
3334
|
* Pass `seoData` explicitly to resolve against a known set of tags.
|
|
3335
|
+
*
|
|
3336
|
+
* `SeoSchemaV2.Tag` expresses this as `written_by = USER_CUSTOM`.
|
|
3289
3337
|
*/
|
|
3290
3338
|
custom?: boolean;
|
|
3291
|
-
/**
|
|
3339
|
+
/**
|
|
3340
|
+
* Whether the tag is excluded from the rendered <head>.
|
|
3341
|
+
*
|
|
3342
|
+
* A disabled tag is still stored, so the user can re-enable it and so a
|
|
3343
|
+
* pattern-provided tag stays suppressed on this page. Default false.
|
|
3344
|
+
*/
|
|
3292
3345
|
disabled?: boolean;
|
|
3293
3346
|
}
|
|
3347
|
+
/** Page-level SEO settings that are not tags. */
|
|
3294
3348
|
interface Settings {
|
|
3295
3349
|
/**
|
|
3296
|
-
* Whether the
|
|
3350
|
+
* Whether to suppress the automatic redirect from this page's previous URL to
|
|
3351
|
+
* its current one after a slug change.
|
|
3297
3352
|
*
|
|
3298
|
-
*
|
|
3299
|
-
*
|
|
3353
|
+
* Default false, meaning the redirect IS created. The field is named for the
|
|
3354
|
+
* exception rather than the rule, which reads backwards; kept as-is because
|
|
3355
|
+
* renaming a stored boolean is not worth the migration.
|
|
3300
3356
|
*/
|
|
3301
3357
|
preventAutoRedirect?: boolean;
|
|
3302
3358
|
/**
|
|
3303
|
-
*
|
|
3304
|
-
*
|
|
3359
|
+
* Keyword terms the user is targeting for this page. Used by the SEO
|
|
3360
|
+
* assistant and checklist; never rendered into <head>.
|
|
3361
|
+
*
|
|
3362
|
+
* 20 is a sanity bound, not the product limit. v1 declared 5 — the number
|
|
3363
|
+
* the panel happens to allow today — which is exactly the mistake we are
|
|
3364
|
+
* fixing for structured data. A product decision to allow 8 should not need
|
|
3365
|
+
* a proto release, so the panel owns that number and the proto only stops
|
|
3366
|
+
* something absurd.
|
|
3367
|
+
* @maxSize 20
|
|
3305
3368
|
*/
|
|
3306
3369
|
keywords?: Keyword[];
|
|
3307
3370
|
}
|
|
@@ -3530,6 +3593,10 @@ interface DraftPostTranslation {
|
|
|
3530
3593
|
/** Post URL. */
|
|
3531
3594
|
url?: PageUrl;
|
|
3532
3595
|
}
|
|
3596
|
+
interface InitialDraftPostsCopied {
|
|
3597
|
+
/** Number of draft posts copied. */
|
|
3598
|
+
count?: number;
|
|
3599
|
+
}
|
|
3533
3600
|
interface DraftCategoriesUpdated {
|
|
3534
3601
|
/**
|
|
3535
3602
|
* Draft post ID.
|
|
@@ -3568,345 +3635,107 @@ interface DraftTagsUpdated {
|
|
|
3568
3635
|
*/
|
|
3569
3636
|
previousTags?: string[];
|
|
3570
3637
|
}
|
|
3571
|
-
interface
|
|
3572
|
-
/**
|
|
3573
|
-
|
|
3574
|
-
* If, for example, grouping by language is passed, language values in response will be filled.
|
|
3575
|
-
* If, for example, grouping by language is not passed, null values will be filled in language field in response.
|
|
3576
|
-
* @maxSize 10
|
|
3577
|
-
*/
|
|
3578
|
-
groupBy?: TotalDraftPostsGroupingFieldWithLiterals[];
|
|
3579
|
-
/**
|
|
3580
|
-
* Optional language filter by provided language code. Useful in multilingual context.
|
|
3581
|
-
* @format LANGUAGE_TAG
|
|
3582
|
-
*/
|
|
3583
|
-
language?: string | null;
|
|
3584
|
-
}
|
|
3585
|
-
declare enum TotalDraftPostsGroupingField {
|
|
3586
|
-
/** Groups results by status. */
|
|
3587
|
-
STATUS = "STATUS",
|
|
3588
|
-
/** Groups results by language. */
|
|
3589
|
-
LANGUAGE = "LANGUAGE"
|
|
3590
|
-
}
|
|
3591
|
-
/** @enumType */
|
|
3592
|
-
type TotalDraftPostsGroupingFieldWithLiterals = TotalDraftPostsGroupingField | 'STATUS' | 'LANGUAGE';
|
|
3593
|
-
interface GetDraftPostTotalsResponse {
|
|
3594
|
-
/** Draft post totals. */
|
|
3595
|
-
totalDraftPosts?: TotalDraftPosts[];
|
|
3596
|
-
}
|
|
3597
|
-
interface TotalDraftPosts {
|
|
3598
|
-
/** Draft post totals in that group. */
|
|
3599
|
-
total?: number;
|
|
3600
|
-
/** Draft post status (only has value when grouping by status, otherwise null). */
|
|
3601
|
-
status?: StatusWithLiterals;
|
|
3602
|
-
/**
|
|
3603
|
-
* Draft post language code (only has value when grouping by language, otherwise null).
|
|
3604
|
-
* @format LANGUAGE_TAG
|
|
3605
|
-
*/
|
|
3606
|
-
language?: string | null;
|
|
3607
|
-
}
|
|
3608
|
-
interface DomainEvent extends DomainEventBodyOneOf {
|
|
3609
|
-
createdEvent?: EntityCreatedEvent;
|
|
3610
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
3611
|
-
deletedEvent?: EntityDeletedEvent;
|
|
3612
|
-
actionEvent?: ActionEvent;
|
|
3613
|
-
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
3614
|
-
id?: string;
|
|
3615
|
-
/**
|
|
3616
|
-
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
3617
|
-
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
3618
|
-
*/
|
|
3619
|
-
entityFqdn?: string;
|
|
3638
|
+
interface CreateDraftPostRequest {
|
|
3639
|
+
/** Draft post to create. */
|
|
3640
|
+
draftPost: DraftPost;
|
|
3620
3641
|
/**
|
|
3621
|
-
*
|
|
3622
|
-
*
|
|
3642
|
+
* Whether the draft post should be published on creation.
|
|
3643
|
+
*
|
|
3644
|
+
* Default: `false`
|
|
3623
3645
|
*/
|
|
3624
|
-
|
|
3625
|
-
/** ID of the entity associated with the event. */
|
|
3626
|
-
entityId?: string;
|
|
3627
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
3628
|
-
eventTime?: Date | null;
|
|
3646
|
+
publish?: boolean;
|
|
3629
3647
|
/**
|
|
3630
|
-
*
|
|
3631
|
-
*
|
|
3648
|
+
* Save type.
|
|
3649
|
+
* @internal
|
|
3632
3650
|
*/
|
|
3633
|
-
|
|
3634
|
-
/** If present, indicates the action that triggered the event. */
|
|
3635
|
-
originatedFrom?: string | null;
|
|
3651
|
+
saveType?: TypeWithLiterals;
|
|
3636
3652
|
/**
|
|
3637
|
-
*
|
|
3638
|
-
*
|
|
3653
|
+
* List of additional draft post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
3654
|
+
* the response in addition to the draft post's base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
3655
|
+
* only the draft post's base fields are returned.
|
|
3656
|
+
* @maxSize 10
|
|
3639
3657
|
*/
|
|
3640
|
-
|
|
3658
|
+
fieldsets?: FieldWithLiterals[];
|
|
3641
3659
|
}
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3660
|
+
declare enum Type {
|
|
3661
|
+
UNKNOWN = "UNKNOWN",
|
|
3662
|
+
/** Manually saved. */
|
|
3663
|
+
MANUAL = "MANUAL",
|
|
3664
|
+
/** Triggered by autosave. */
|
|
3665
|
+
AUTO_SAVE = "AUTO_SAVE",
|
|
3666
|
+
/** Copied from template during provisioning flow. */
|
|
3667
|
+
PROVISIONING = "PROVISIONING",
|
|
3668
|
+
/** Imported from another blog. */
|
|
3669
|
+
IMPORT = "IMPORT",
|
|
3670
|
+
/** Triggered by autosave when post created by AI tool. */
|
|
3671
|
+
AI_AUTO_SAVE = "AI_AUTO_SAVE"
|
|
3648
3672
|
}
|
|
3649
|
-
|
|
3650
|
-
|
|
3673
|
+
/** @enumType */
|
|
3674
|
+
type TypeWithLiterals = Type | 'UNKNOWN' | 'MANUAL' | 'AUTO_SAVE' | 'PROVISIONING' | 'IMPORT' | 'AI_AUTO_SAVE';
|
|
3675
|
+
declare enum Field {
|
|
3676
|
+
/** Unknown field. */
|
|
3677
|
+
UNKNOWN = "UNKNOWN",
|
|
3678
|
+
/** Includes draft post preview URL. */
|
|
3679
|
+
URL = "URL",
|
|
3651
3680
|
/**
|
|
3652
|
-
*
|
|
3681
|
+
* Includes internal id field.
|
|
3682
|
+
* Reserved for internal use.
|
|
3653
3683
|
* @internal
|
|
3654
3684
|
*/
|
|
3655
|
-
|
|
3656
|
-
/**
|
|
3657
|
-
|
|
3685
|
+
INTERNAL_ID = "INTERNAL_ID",
|
|
3686
|
+
/** Includes content field. */
|
|
3687
|
+
CONTENT = "CONTENT",
|
|
3688
|
+
/** Includes rich content field. */
|
|
3689
|
+
RICH_CONTENT = "RICH_CONTENT",
|
|
3658
3690
|
/**
|
|
3659
|
-
*
|
|
3691
|
+
* Includes draft post translations when present.
|
|
3660
3692
|
* @internal
|
|
3661
3693
|
*/
|
|
3662
|
-
|
|
3694
|
+
TRANSLATIONS = "TRANSLATIONS",
|
|
3695
|
+
/** If the user has not set excerpt, returns the one autogenerated from content. */
|
|
3696
|
+
GENERATED_EXCERPT = "GENERATED_EXCERPT"
|
|
3663
3697
|
}
|
|
3664
|
-
|
|
3665
|
-
|
|
3698
|
+
/** @enumType */
|
|
3699
|
+
type FieldWithLiterals = Field | 'UNKNOWN' | 'URL' | 'CONTENT' | 'RICH_CONTENT' | 'GENERATED_EXCERPT';
|
|
3700
|
+
interface CreateDraftPostResponse {
|
|
3701
|
+
/** Created draft post info. */
|
|
3702
|
+
draftPost?: DraftPost;
|
|
3666
3703
|
}
|
|
3667
|
-
interface
|
|
3668
|
-
/**
|
|
3669
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
3670
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
3671
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
3672
|
-
*/
|
|
3673
|
-
currentEntityAsJson?: string;
|
|
3704
|
+
interface BulkCreateDraftPostsRequest {
|
|
3674
3705
|
/**
|
|
3675
|
-
*
|
|
3676
|
-
*
|
|
3677
|
-
*
|
|
3678
|
-
* the developer should send only the new (current) entity.
|
|
3679
|
-
* An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
|
|
3680
|
-
* Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
|
|
3681
|
-
* @internal
|
|
3682
|
-
* @deprecated
|
|
3706
|
+
* Draft posts to create.
|
|
3707
|
+
* @minSize 1
|
|
3708
|
+
* @maxSize 20
|
|
3683
3709
|
*/
|
|
3684
|
-
|
|
3710
|
+
draftPosts: DraftPost[];
|
|
3711
|
+
/** Whether the draft post should be published after creation. */
|
|
3712
|
+
publish?: boolean;
|
|
3685
3713
|
/**
|
|
3686
|
-
*
|
|
3687
|
-
* For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)
|
|
3714
|
+
* Save type.
|
|
3688
3715
|
* @internal
|
|
3689
3716
|
*/
|
|
3690
|
-
|
|
3717
|
+
saveType?: TypeWithLiterals;
|
|
3718
|
+
/** Whether to return the full created draft post entities in the response. */
|
|
3719
|
+
returnFullEntity?: boolean;
|
|
3691
3720
|
/**
|
|
3692
|
-
*
|
|
3693
|
-
*
|
|
3721
|
+
* List of draft post fields to be included in the response if the entities are present.
|
|
3722
|
+
* Base default fieldset returns all core draft post properties (all properties that are not a supported fieldset value).
|
|
3723
|
+
* For example, when `URL` fieldset is selected, returned draft post will include the set of base properties and the draft post's preview url.
|
|
3724
|
+
* @maxSize 10
|
|
3694
3725
|
*/
|
|
3695
|
-
|
|
3726
|
+
fieldsets?: FieldWithLiterals[];
|
|
3696
3727
|
}
|
|
3697
|
-
interface
|
|
3698
|
-
/**
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
movedToTrash?: boolean | null;
|
|
3703
|
-
/** Entity that was deleted. */
|
|
3704
|
-
deletedEntityAsJson?: string | null;
|
|
3705
|
-
/**
|
|
3706
|
-
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
3707
|
-
* @internal
|
|
3708
|
-
*/
|
|
3709
|
-
additionalMetadataAsJson?: string | null;
|
|
3728
|
+
interface BulkCreateDraftPostsResponse {
|
|
3729
|
+
/** Draft posts created by bulk action. */
|
|
3730
|
+
results?: BulkDraftPostResult[];
|
|
3731
|
+
/** Bulk action metadata. */
|
|
3732
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
3710
3733
|
}
|
|
3711
|
-
interface
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
* App instance ID.
|
|
3717
|
-
* @format GUID
|
|
3718
|
-
*/
|
|
3719
|
-
instanceId?: string | null;
|
|
3720
|
-
/**
|
|
3721
|
-
* Event type.
|
|
3722
|
-
* @maxLength 150
|
|
3723
|
-
*/
|
|
3724
|
-
eventType?: string;
|
|
3725
|
-
/** The identification type and identity data. */
|
|
3726
|
-
identity?: IdentificationData;
|
|
3727
|
-
/** Stringify payload. */
|
|
3728
|
-
data?: string;
|
|
3729
|
-
/** Details related to the account */
|
|
3730
|
-
accountInfo?: AccountInfo;
|
|
3731
|
-
}
|
|
3732
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
3733
|
-
/**
|
|
3734
|
-
* ID of a site visitor that has not logged in to the site.
|
|
3735
|
-
* @format GUID
|
|
3736
|
-
*/
|
|
3737
|
-
anonymousVisitorId?: string;
|
|
3738
|
-
/**
|
|
3739
|
-
* ID of a site visitor that has logged in to the site.
|
|
3740
|
-
* @format GUID
|
|
3741
|
-
*/
|
|
3742
|
-
memberId?: string;
|
|
3743
|
-
/**
|
|
3744
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
3745
|
-
* @format GUID
|
|
3746
|
-
*/
|
|
3747
|
-
wixUserId?: string;
|
|
3748
|
-
/**
|
|
3749
|
-
* ID of an app.
|
|
3750
|
-
* @format GUID
|
|
3751
|
-
*/
|
|
3752
|
-
appId?: string;
|
|
3753
|
-
/** @readonly */
|
|
3754
|
-
identityType?: WebhookIdentityTypeWithLiterals;
|
|
3755
|
-
}
|
|
3756
|
-
/** @oneof */
|
|
3757
|
-
interface IdentificationDataIdOneOf {
|
|
3758
|
-
/**
|
|
3759
|
-
* ID of a site visitor that has not logged in to the site.
|
|
3760
|
-
* @format GUID
|
|
3761
|
-
*/
|
|
3762
|
-
anonymousVisitorId?: string;
|
|
3763
|
-
/**
|
|
3764
|
-
* ID of a site visitor that has logged in to the site.
|
|
3765
|
-
* @format GUID
|
|
3766
|
-
*/
|
|
3767
|
-
memberId?: string;
|
|
3768
|
-
/**
|
|
3769
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
3770
|
-
* @format GUID
|
|
3771
|
-
*/
|
|
3772
|
-
wixUserId?: string;
|
|
3773
|
-
/**
|
|
3774
|
-
* ID of an app.
|
|
3775
|
-
* @format GUID
|
|
3776
|
-
*/
|
|
3777
|
-
appId?: string;
|
|
3778
|
-
}
|
|
3779
|
-
declare enum WebhookIdentityType {
|
|
3780
|
-
UNKNOWN = "UNKNOWN",
|
|
3781
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
3782
|
-
MEMBER = "MEMBER",
|
|
3783
|
-
WIX_USER = "WIX_USER",
|
|
3784
|
-
APP = "APP"
|
|
3785
|
-
}
|
|
3786
|
-
/** @enumType */
|
|
3787
|
-
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
3788
|
-
interface AccountInfo {
|
|
3789
|
-
/**
|
|
3790
|
-
* ID of the Wix account associated with the event.
|
|
3791
|
-
* @format GUID
|
|
3792
|
-
*/
|
|
3793
|
-
accountId?: string | null;
|
|
3794
|
-
/**
|
|
3795
|
-
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
3796
|
-
* @format GUID
|
|
3797
|
-
*/
|
|
3798
|
-
parentAccountId?: string | null;
|
|
3799
|
-
/**
|
|
3800
|
-
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
3801
|
-
* @format GUID
|
|
3802
|
-
*/
|
|
3803
|
-
siteId?: string | null;
|
|
3804
|
-
}
|
|
3805
|
-
interface InitialDraftPostsCopied {
|
|
3806
|
-
/** Number of draft posts copied. */
|
|
3807
|
-
count?: number;
|
|
3808
|
-
}
|
|
3809
|
-
interface CreateDraftPostRequest {
|
|
3810
|
-
/** Draft post to create. */
|
|
3811
|
-
draftPost: DraftPost;
|
|
3812
|
-
/**
|
|
3813
|
-
* Whether the draft post should be published on creation.
|
|
3814
|
-
*
|
|
3815
|
-
* Default: `false`
|
|
3816
|
-
*/
|
|
3817
|
-
publish?: boolean;
|
|
3818
|
-
/**
|
|
3819
|
-
* Save type.
|
|
3820
|
-
* @internal
|
|
3821
|
-
*/
|
|
3822
|
-
saveType?: TypeWithLiterals;
|
|
3823
|
-
/**
|
|
3824
|
-
* List of additional draft post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
3825
|
-
* the response in addition to the draft post's base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
3826
|
-
* only the draft post's base fields are returned.
|
|
3827
|
-
* @maxSize 10
|
|
3828
|
-
*/
|
|
3829
|
-
fieldsets?: FieldWithLiterals[];
|
|
3830
|
-
}
|
|
3831
|
-
declare enum Type {
|
|
3832
|
-
UNKNOWN = "UNKNOWN",
|
|
3833
|
-
/** Manually saved. */
|
|
3834
|
-
MANUAL = "MANUAL",
|
|
3835
|
-
/** Triggered by autosave. */
|
|
3836
|
-
AUTO_SAVE = "AUTO_SAVE",
|
|
3837
|
-
/** Copied from template during provisioning flow. */
|
|
3838
|
-
PROVISIONING = "PROVISIONING",
|
|
3839
|
-
/** Imported from another blog. */
|
|
3840
|
-
IMPORT = "IMPORT",
|
|
3841
|
-
/** Triggered by autosave when post created by AI tool. */
|
|
3842
|
-
AI_AUTO_SAVE = "AI_AUTO_SAVE"
|
|
3843
|
-
}
|
|
3844
|
-
/** @enumType */
|
|
3845
|
-
type TypeWithLiterals = Type | 'UNKNOWN' | 'MANUAL' | 'AUTO_SAVE' | 'PROVISIONING' | 'IMPORT' | 'AI_AUTO_SAVE';
|
|
3846
|
-
declare enum Field {
|
|
3847
|
-
/** Unknown field. */
|
|
3848
|
-
UNKNOWN = "UNKNOWN",
|
|
3849
|
-
/** Includes draft post preview URL. */
|
|
3850
|
-
URL = "URL",
|
|
3851
|
-
/**
|
|
3852
|
-
* Includes internal id field.
|
|
3853
|
-
* Reserved for internal use.
|
|
3854
|
-
* @internal
|
|
3855
|
-
*/
|
|
3856
|
-
INTERNAL_ID = "INTERNAL_ID",
|
|
3857
|
-
/** Includes content field. */
|
|
3858
|
-
CONTENT = "CONTENT",
|
|
3859
|
-
/** Includes rich content field. */
|
|
3860
|
-
RICH_CONTENT = "RICH_CONTENT",
|
|
3861
|
-
/**
|
|
3862
|
-
* Includes draft post translations when present.
|
|
3863
|
-
* @internal
|
|
3864
|
-
*/
|
|
3865
|
-
TRANSLATIONS = "TRANSLATIONS",
|
|
3866
|
-
/** If the user has not set excerpt, returns the one autogenerated from content. */
|
|
3867
|
-
GENERATED_EXCERPT = "GENERATED_EXCERPT"
|
|
3868
|
-
}
|
|
3869
|
-
/** @enumType */
|
|
3870
|
-
type FieldWithLiterals = Field | 'UNKNOWN' | 'URL' | 'CONTENT' | 'RICH_CONTENT' | 'GENERATED_EXCERPT';
|
|
3871
|
-
interface CreateDraftPostResponse {
|
|
3872
|
-
/** Created draft post info. */
|
|
3873
|
-
draftPost?: DraftPost;
|
|
3874
|
-
}
|
|
3875
|
-
interface BulkCreateDraftPostsRequest {
|
|
3876
|
-
/**
|
|
3877
|
-
* Draft posts to create.
|
|
3878
|
-
* @minSize 1
|
|
3879
|
-
* @maxSize 20
|
|
3880
|
-
*/
|
|
3881
|
-
draftPosts: DraftPost[];
|
|
3882
|
-
/** Whether the draft post should be published after creation. */
|
|
3883
|
-
publish?: boolean;
|
|
3884
|
-
/**
|
|
3885
|
-
* Save type.
|
|
3886
|
-
* @internal
|
|
3887
|
-
*/
|
|
3888
|
-
saveType?: TypeWithLiterals;
|
|
3889
|
-
/** Whether to return the full created draft post entities in the response. */
|
|
3890
|
-
returnFullEntity?: boolean;
|
|
3891
|
-
/**
|
|
3892
|
-
* List of draft post fields to be included in the response if the entities are present.
|
|
3893
|
-
* Base default fieldset returns all core draft post properties (all properties that are not a supported fieldset value).
|
|
3894
|
-
* For example, when `URL` fieldset is selected, returned draft post will include the set of base properties and the draft post's preview url.
|
|
3895
|
-
* @maxSize 10
|
|
3896
|
-
*/
|
|
3897
|
-
fieldsets?: FieldWithLiterals[];
|
|
3898
|
-
}
|
|
3899
|
-
interface BulkCreateDraftPostsResponse {
|
|
3900
|
-
/** Draft posts created by bulk action. */
|
|
3901
|
-
results?: BulkDraftPostResult[];
|
|
3902
|
-
/** Bulk action metadata. */
|
|
3903
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
3904
|
-
}
|
|
3905
|
-
interface BulkDraftPostResult {
|
|
3906
|
-
/** Bulk actions metadata for draft post. */
|
|
3907
|
-
itemMetadata?: ItemMetadata;
|
|
3908
|
-
/** Optional full draft post. */
|
|
3909
|
-
item?: DraftPost;
|
|
3734
|
+
interface BulkDraftPostResult {
|
|
3735
|
+
/** Bulk actions metadata for draft post. */
|
|
3736
|
+
itemMetadata?: ItemMetadata;
|
|
3737
|
+
/** Optional full draft post. */
|
|
3738
|
+
item?: DraftPost;
|
|
3910
3739
|
}
|
|
3911
3740
|
interface ItemMetadata {
|
|
3912
3741
|
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
@@ -4455,152 +4284,239 @@ interface DraftPostCount {
|
|
|
4455
4284
|
/** Number of posts. */
|
|
4456
4285
|
postCount?: number;
|
|
4457
4286
|
}
|
|
4458
|
-
interface
|
|
4287
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
4288
|
+
createdEvent?: EntityCreatedEvent;
|
|
4289
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
4290
|
+
deletedEvent?: EntityDeletedEvent;
|
|
4291
|
+
actionEvent?: ActionEvent;
|
|
4292
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
4293
|
+
id?: string;
|
|
4459
4294
|
/**
|
|
4460
|
-
*
|
|
4461
|
-
*
|
|
4462
|
-
* @maxSize 100
|
|
4463
|
-
* @format GUID
|
|
4295
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
4296
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
4464
4297
|
*/
|
|
4465
|
-
|
|
4466
|
-
/** Should full draft post be returned. */
|
|
4467
|
-
returnFullEntity?: boolean;
|
|
4468
|
-
}
|
|
4469
|
-
interface BulkRevertToUnpublishedResponse {
|
|
4470
|
-
/** Bulk action results. */
|
|
4471
|
-
results?: BulkDraftPostResult[];
|
|
4472
|
-
/** Bulk action metadata. */
|
|
4473
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
4474
|
-
}
|
|
4475
|
-
interface BulkRejectDraftPostRequest {
|
|
4298
|
+
entityFqdn?: string;
|
|
4476
4299
|
/**
|
|
4477
|
-
*
|
|
4478
|
-
*
|
|
4479
|
-
* @maxSize 100
|
|
4480
|
-
* @format GUID
|
|
4300
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
4301
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
4481
4302
|
*/
|
|
4482
|
-
|
|
4483
|
-
/**
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
/** Bulk action results. */
|
|
4488
|
-
results?: BulkDraftPostResult[];
|
|
4489
|
-
/** Bulk action metadata. */
|
|
4490
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
4491
|
-
}
|
|
4492
|
-
interface RevertToUnpublishedRequest {
|
|
4303
|
+
slug?: string;
|
|
4304
|
+
/** ID of the entity associated with the event. */
|
|
4305
|
+
entityId?: string;
|
|
4306
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
4307
|
+
eventTime?: Date | null;
|
|
4493
4308
|
/**
|
|
4494
|
-
*
|
|
4495
|
-
*
|
|
4309
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
4310
|
+
* (for example, GDPR).
|
|
4496
4311
|
*/
|
|
4497
|
-
|
|
4312
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
4313
|
+
/** If present, indicates the action that triggered the event. */
|
|
4314
|
+
originatedFrom?: string | null;
|
|
4498
4315
|
/**
|
|
4499
|
-
*
|
|
4500
|
-
*
|
|
4501
|
-
* @maxSize 10
|
|
4502
|
-
* @deprecated List of draft post fields to be included in the response.
|
|
4503
|
-
* @replacedBy fieldsets
|
|
4504
|
-
* @targetRemovalDate 2024-06-30
|
|
4316
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
|
|
4317
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
4505
4318
|
*/
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4319
|
+
entityEventSequence?: string | null;
|
|
4320
|
+
}
|
|
4321
|
+
/** @oneof */
|
|
4322
|
+
interface DomainEventBodyOneOf {
|
|
4323
|
+
createdEvent?: EntityCreatedEvent;
|
|
4324
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
4325
|
+
deletedEvent?: EntityDeletedEvent;
|
|
4326
|
+
actionEvent?: ActionEvent;
|
|
4327
|
+
}
|
|
4328
|
+
interface EntityCreatedEvent {
|
|
4329
|
+
entityAsJson?: string;
|
|
4330
|
+
/**
|
|
4331
|
+
* Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
|
|
4332
|
+
* @internal
|
|
4512
4333
|
*/
|
|
4513
|
-
|
|
4334
|
+
triggeredByUndelete?: boolean | null;
|
|
4335
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
4336
|
+
restoreInfo?: RestoreInfo;
|
|
4337
|
+
/**
|
|
4338
|
+
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
4339
|
+
* @internal
|
|
4340
|
+
*/
|
|
4341
|
+
additionalMetadataAsJson?: string | null;
|
|
4514
4342
|
}
|
|
4515
|
-
interface
|
|
4516
|
-
|
|
4517
|
-
draftPost?: DraftPost;
|
|
4343
|
+
interface RestoreInfo {
|
|
4344
|
+
deletedDate?: Date | null;
|
|
4518
4345
|
}
|
|
4519
|
-
interface
|
|
4346
|
+
interface EntityUpdatedEvent {
|
|
4520
4347
|
/**
|
|
4521
|
-
*
|
|
4522
|
-
*
|
|
4348
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
4349
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
4350
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
4523
4351
|
*/
|
|
4524
|
-
|
|
4352
|
+
currentEntityAsJson?: string;
|
|
4525
4353
|
/**
|
|
4526
|
-
*
|
|
4354
|
+
* This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard
|
|
4355
|
+
* wont populate it / have any reference to it in the API.
|
|
4356
|
+
* The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,
|
|
4357
|
+
* the developer should send only the new (current) entity.
|
|
4358
|
+
* An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
|
|
4359
|
+
* Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
|
|
4527
4360
|
* @internal
|
|
4528
|
-
* @
|
|
4529
|
-
* @deprecated List of draft post fields to be included in the response.
|
|
4530
|
-
* @replacedBy fieldsets
|
|
4531
|
-
* @targetRemovalDate 2024-06-30
|
|
4361
|
+
* @deprecated
|
|
4532
4362
|
*/
|
|
4533
|
-
|
|
4363
|
+
previousEntityAsJson?: string | null;
|
|
4534
4364
|
/**
|
|
4535
|
-
*
|
|
4536
|
-
*
|
|
4537
|
-
*
|
|
4538
|
-
* @maxSize 10
|
|
4365
|
+
* Map of fully qualified field paths to their previous values for fields that changed.
|
|
4366
|
+
* For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)
|
|
4367
|
+
* @internal
|
|
4539
4368
|
*/
|
|
4540
|
-
|
|
4369
|
+
modifiedFields?: Record<string, any>;
|
|
4370
|
+
/**
|
|
4371
|
+
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
4372
|
+
* @internal
|
|
4373
|
+
*/
|
|
4374
|
+
additionalMetadataAsJson?: string | null;
|
|
4541
4375
|
}
|
|
4542
|
-
interface
|
|
4543
|
-
/**
|
|
4544
|
-
|
|
4376
|
+
interface EntityDeletedEvent {
|
|
4377
|
+
/**
|
|
4378
|
+
* Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled
|
|
4379
|
+
* @internal
|
|
4380
|
+
*/
|
|
4381
|
+
movedToTrash?: boolean | null;
|
|
4382
|
+
/** Entity that was deleted. */
|
|
4383
|
+
deletedEntityAsJson?: string | null;
|
|
4384
|
+
/**
|
|
4385
|
+
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
4386
|
+
* @internal
|
|
4387
|
+
*/
|
|
4388
|
+
additionalMetadataAsJson?: string | null;
|
|
4545
4389
|
}
|
|
4546
|
-
interface
|
|
4390
|
+
interface ActionEvent {
|
|
4391
|
+
bodyAsJson?: string;
|
|
4392
|
+
}
|
|
4393
|
+
interface MessageEnvelope {
|
|
4547
4394
|
/**
|
|
4548
|
-
*
|
|
4395
|
+
* App instance ID.
|
|
4549
4396
|
* @format GUID
|
|
4550
4397
|
*/
|
|
4551
|
-
|
|
4398
|
+
instanceId?: string | null;
|
|
4552
4399
|
/**
|
|
4553
|
-
*
|
|
4554
|
-
* @maxLength
|
|
4400
|
+
* Event type.
|
|
4401
|
+
* @maxLength 150
|
|
4555
4402
|
*/
|
|
4556
|
-
|
|
4403
|
+
eventType?: string;
|
|
4404
|
+
/** The identification type and identity data. */
|
|
4405
|
+
identity?: IdentificationData;
|
|
4406
|
+
/** Stringify payload. */
|
|
4407
|
+
data?: string;
|
|
4408
|
+
/** Details related to the account */
|
|
4409
|
+
accountInfo?: AccountInfo;
|
|
4410
|
+
}
|
|
4411
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
4557
4412
|
/**
|
|
4558
|
-
*
|
|
4559
|
-
* @
|
|
4560
|
-
* @maxSize 10
|
|
4561
|
-
* @deprecated List of draft post fields to be included in the response.
|
|
4562
|
-
* @replacedBy fieldsets
|
|
4563
|
-
* @targetRemovalDate 2024-06-30
|
|
4413
|
+
* ID of a site visitor that has not logged in to the site.
|
|
4414
|
+
* @format GUID
|
|
4564
4415
|
*/
|
|
4565
|
-
|
|
4416
|
+
anonymousVisitorId?: string;
|
|
4566
4417
|
/**
|
|
4567
|
-
*
|
|
4568
|
-
*
|
|
4569
|
-
* Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
|
|
4570
|
-
* @maxSize 10
|
|
4418
|
+
* ID of a site visitor that has logged in to the site.
|
|
4419
|
+
* @format GUID
|
|
4571
4420
|
*/
|
|
4572
|
-
|
|
4421
|
+
memberId?: string;
|
|
4422
|
+
/**
|
|
4423
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
4424
|
+
* @format GUID
|
|
4425
|
+
*/
|
|
4426
|
+
wixUserId?: string;
|
|
4427
|
+
/**
|
|
4428
|
+
* ID of an app.
|
|
4429
|
+
* @format GUID
|
|
4430
|
+
*/
|
|
4431
|
+
appId?: string;
|
|
4432
|
+
/** @readonly */
|
|
4433
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
4573
4434
|
}
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4435
|
+
/** @oneof */
|
|
4436
|
+
interface IdentificationDataIdOneOf {
|
|
4437
|
+
/**
|
|
4438
|
+
* ID of a site visitor that has not logged in to the site.
|
|
4439
|
+
* @format GUID
|
|
4440
|
+
*/
|
|
4441
|
+
anonymousVisitorId?: string;
|
|
4442
|
+
/**
|
|
4443
|
+
* ID of a site visitor that has logged in to the site.
|
|
4444
|
+
* @format GUID
|
|
4445
|
+
*/
|
|
4446
|
+
memberId?: string;
|
|
4447
|
+
/**
|
|
4448
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
4449
|
+
* @format GUID
|
|
4450
|
+
*/
|
|
4451
|
+
wixUserId?: string;
|
|
4452
|
+
/**
|
|
4453
|
+
* ID of an app.
|
|
4454
|
+
* @format GUID
|
|
4455
|
+
*/
|
|
4456
|
+
appId?: string;
|
|
4577
4457
|
}
|
|
4578
|
-
|
|
4458
|
+
declare enum WebhookIdentityType {
|
|
4459
|
+
UNKNOWN = "UNKNOWN",
|
|
4460
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
4461
|
+
MEMBER = "MEMBER",
|
|
4462
|
+
WIX_USER = "WIX_USER",
|
|
4463
|
+
APP = "APP"
|
|
4464
|
+
}
|
|
4465
|
+
/** @enumType */
|
|
4466
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
4467
|
+
interface AccountInfo {
|
|
4579
4468
|
/**
|
|
4580
|
-
*
|
|
4581
|
-
* @
|
|
4469
|
+
* ID of the Wix account associated with the event.
|
|
4470
|
+
* @format GUID
|
|
4582
4471
|
*/
|
|
4583
|
-
|
|
4472
|
+
accountId?: string | null;
|
|
4584
4473
|
/**
|
|
4585
|
-
*
|
|
4586
|
-
* @
|
|
4587
|
-
* @maxSize 10
|
|
4588
|
-
* @deprecated List of draft post fields to be included in the response.
|
|
4589
|
-
* @replacedBy fieldsets
|
|
4590
|
-
* @targetRemovalDate 2024-06-30
|
|
4474
|
+
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
4475
|
+
* @format GUID
|
|
4591
4476
|
*/
|
|
4592
|
-
|
|
4477
|
+
parentAccountId?: string | null;
|
|
4593
4478
|
/**
|
|
4594
|
-
*
|
|
4595
|
-
*
|
|
4596
|
-
|
|
4479
|
+
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
4480
|
+
* @format GUID
|
|
4481
|
+
*/
|
|
4482
|
+
siteId?: string | null;
|
|
4483
|
+
}
|
|
4484
|
+
interface GetDraftPostTotalsRequest {
|
|
4485
|
+
/**
|
|
4486
|
+
* Group results by fields (defaults to grouping by status).
|
|
4487
|
+
* If, for example, grouping by language is passed, language values in response will be filled.
|
|
4488
|
+
* If, for example, grouping by language is not passed, null values will be filled in language field in response.
|
|
4597
4489
|
* @maxSize 10
|
|
4598
4490
|
*/
|
|
4599
|
-
|
|
4491
|
+
groupBy?: TotalDraftPostsGroupingFieldWithLiterals[];
|
|
4492
|
+
/**
|
|
4493
|
+
* Optional language filter by provided language code. Useful in multilingual context.
|
|
4494
|
+
* @format LANGUAGE_TAG
|
|
4495
|
+
*/
|
|
4496
|
+
language?: string | null;
|
|
4600
4497
|
}
|
|
4601
|
-
|
|
4602
|
-
/**
|
|
4603
|
-
|
|
4498
|
+
declare enum TotalDraftPostsGroupingField {
|
|
4499
|
+
/** Groups results by status. */
|
|
4500
|
+
STATUS = "STATUS",
|
|
4501
|
+
/** Groups results by language. */
|
|
4502
|
+
LANGUAGE = "LANGUAGE"
|
|
4503
|
+
}
|
|
4504
|
+
/** @enumType */
|
|
4505
|
+
type TotalDraftPostsGroupingFieldWithLiterals = TotalDraftPostsGroupingField | 'STATUS' | 'LANGUAGE';
|
|
4506
|
+
interface GetDraftPostTotalsResponse {
|
|
4507
|
+
/** Draft post totals. */
|
|
4508
|
+
totalDraftPosts?: TotalDraftPosts[];
|
|
4509
|
+
}
|
|
4510
|
+
interface TotalDraftPosts {
|
|
4511
|
+
/** Draft post totals in that group. */
|
|
4512
|
+
total?: number;
|
|
4513
|
+
/** Draft post status (only has value when grouping by status, otherwise null). */
|
|
4514
|
+
status?: StatusWithLiterals;
|
|
4515
|
+
/**
|
|
4516
|
+
* Draft post language code (only has value when grouping by language, otherwise null).
|
|
4517
|
+
* @format LANGUAGE_TAG
|
|
4518
|
+
*/
|
|
4519
|
+
language?: string | null;
|
|
4604
4520
|
}
|
|
4605
4521
|
interface TranslateDraftRequest {
|
|
4606
4522
|
/**
|
|
@@ -4694,6 +4610,153 @@ interface UpdateDraftPostLanguageResponse {
|
|
|
4694
4610
|
/** Updated draft post. */
|
|
4695
4611
|
draftPost?: DraftPost;
|
|
4696
4612
|
}
|
|
4613
|
+
interface BulkRevertToUnpublishedRequest {
|
|
4614
|
+
/**
|
|
4615
|
+
* Source post IDs.
|
|
4616
|
+
* @minSize 1
|
|
4617
|
+
* @maxSize 100
|
|
4618
|
+
* @format GUID
|
|
4619
|
+
*/
|
|
4620
|
+
postIds?: string[];
|
|
4621
|
+
/** Should full draft post be returned. */
|
|
4622
|
+
returnFullEntity?: boolean;
|
|
4623
|
+
}
|
|
4624
|
+
interface BulkRevertToUnpublishedResponse {
|
|
4625
|
+
/** Bulk action results. */
|
|
4626
|
+
results?: BulkDraftPostResult[];
|
|
4627
|
+
/** Bulk action metadata. */
|
|
4628
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
4629
|
+
}
|
|
4630
|
+
interface BulkRejectDraftPostRequest {
|
|
4631
|
+
/**
|
|
4632
|
+
* Source post IDs.
|
|
4633
|
+
* @minSize 1
|
|
4634
|
+
* @maxSize 100
|
|
4635
|
+
* @format GUID
|
|
4636
|
+
*/
|
|
4637
|
+
postIds?: string[];
|
|
4638
|
+
/** Should full draft post be returned. */
|
|
4639
|
+
returnFullEntity?: boolean;
|
|
4640
|
+
}
|
|
4641
|
+
interface BulkRejectDraftPostResponse {
|
|
4642
|
+
/** Bulk action results. */
|
|
4643
|
+
results?: BulkDraftPostResult[];
|
|
4644
|
+
/** Bulk action metadata. */
|
|
4645
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
4646
|
+
}
|
|
4647
|
+
interface RevertToUnpublishedRequest {
|
|
4648
|
+
/**
|
|
4649
|
+
* Source post ID.
|
|
4650
|
+
* @format GUID
|
|
4651
|
+
*/
|
|
4652
|
+
postId?: string;
|
|
4653
|
+
/**
|
|
4654
|
+
* List of draft post fields to be included in the response.
|
|
4655
|
+
* @internal
|
|
4656
|
+
* @maxSize 10
|
|
4657
|
+
* @deprecated List of draft post fields to be included in the response.
|
|
4658
|
+
* @replacedBy fieldsets
|
|
4659
|
+
* @targetRemovalDate 2024-06-30
|
|
4660
|
+
*/
|
|
4661
|
+
fieldsToInclude?: FieldWithLiterals[];
|
|
4662
|
+
/**
|
|
4663
|
+
* List of draft post fields to be included if entities are present in the response.
|
|
4664
|
+
* Base fieldset, which is default, will return all core draft post properties.
|
|
4665
|
+
* Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
|
|
4666
|
+
* @maxSize 10
|
|
4667
|
+
*/
|
|
4668
|
+
fieldsets?: FieldWithLiterals[];
|
|
4669
|
+
}
|
|
4670
|
+
interface RevertToUnpublishedResponse {
|
|
4671
|
+
/** Updated post draft. */
|
|
4672
|
+
draftPost?: DraftPost;
|
|
4673
|
+
}
|
|
4674
|
+
interface RejectDraftPostRequest {
|
|
4675
|
+
/**
|
|
4676
|
+
* Source post ID.
|
|
4677
|
+
* @format GUID
|
|
4678
|
+
*/
|
|
4679
|
+
postId?: string;
|
|
4680
|
+
/**
|
|
4681
|
+
* List of draft post fields to be included in the response.
|
|
4682
|
+
* @internal
|
|
4683
|
+
* @maxSize 10
|
|
4684
|
+
* @deprecated List of draft post fields to be included in the response.
|
|
4685
|
+
* @replacedBy fieldsets
|
|
4686
|
+
* @targetRemovalDate 2024-06-30
|
|
4687
|
+
*/
|
|
4688
|
+
fieldsToInclude?: FieldWithLiterals[];
|
|
4689
|
+
/**
|
|
4690
|
+
* List of draft post fields to be included if entities are present in the response.
|
|
4691
|
+
* Base fieldset, which is default, will return all core draft post properties.
|
|
4692
|
+
* Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
|
|
4693
|
+
* @maxSize 10
|
|
4694
|
+
*/
|
|
4695
|
+
fieldsets?: FieldWithLiterals[];
|
|
4696
|
+
}
|
|
4697
|
+
interface RejectDraftPostResponse {
|
|
4698
|
+
/** Draft post. */
|
|
4699
|
+
draftPost?: DraftPost;
|
|
4700
|
+
}
|
|
4701
|
+
interface ApproveDraftPostRequest {
|
|
4702
|
+
/**
|
|
4703
|
+
* Source post ID.
|
|
4704
|
+
* @format GUID
|
|
4705
|
+
*/
|
|
4706
|
+
postId?: string;
|
|
4707
|
+
/**
|
|
4708
|
+
* Scheduled publish date if should be not immediately published.
|
|
4709
|
+
* @maxLength 24
|
|
4710
|
+
*/
|
|
4711
|
+
scheduledPublishDate?: string | null;
|
|
4712
|
+
/**
|
|
4713
|
+
* List of draft post fields to be included in the response.
|
|
4714
|
+
* @internal
|
|
4715
|
+
* @maxSize 10
|
|
4716
|
+
* @deprecated List of draft post fields to be included in the response.
|
|
4717
|
+
* @replacedBy fieldsets
|
|
4718
|
+
* @targetRemovalDate 2024-06-30
|
|
4719
|
+
*/
|
|
4720
|
+
fieldsToInclude?: FieldWithLiterals[];
|
|
4721
|
+
/**
|
|
4722
|
+
* List of draft post fields to be included if entities are present in the response.
|
|
4723
|
+
* Base fieldset, which is default, will return all core draft post properties.
|
|
4724
|
+
* Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
|
|
4725
|
+
* @maxSize 10
|
|
4726
|
+
*/
|
|
4727
|
+
fieldsets?: FieldWithLiterals[];
|
|
4728
|
+
}
|
|
4729
|
+
interface ApproveDraftPostResponse {
|
|
4730
|
+
/** Updated post draft. */
|
|
4731
|
+
draftPost?: DraftPost;
|
|
4732
|
+
}
|
|
4733
|
+
interface MarkPostAsInModerationRequest {
|
|
4734
|
+
/**
|
|
4735
|
+
* Source post ID.
|
|
4736
|
+
* @maxLength 38
|
|
4737
|
+
*/
|
|
4738
|
+
postId?: string;
|
|
4739
|
+
/**
|
|
4740
|
+
* List of draft post fields to be included in the response.
|
|
4741
|
+
* @internal
|
|
4742
|
+
* @maxSize 10
|
|
4743
|
+
* @deprecated List of draft post fields to be included in the response.
|
|
4744
|
+
* @replacedBy fieldsets
|
|
4745
|
+
* @targetRemovalDate 2024-06-30
|
|
4746
|
+
*/
|
|
4747
|
+
fieldsToInclude?: FieldWithLiterals[];
|
|
4748
|
+
/**
|
|
4749
|
+
* List of draft post fields to be included if entities are present in the response.
|
|
4750
|
+
* Base fieldset, which is default, will return all core draft post properties.
|
|
4751
|
+
* Example: When URL fieldset is selected, returned draft post will have a set of base properties and draft post preview url.
|
|
4752
|
+
* @maxSize 10
|
|
4753
|
+
*/
|
|
4754
|
+
fieldsets?: FieldWithLiterals[];
|
|
4755
|
+
}
|
|
4756
|
+
interface MarkPostAsInModerationResponse {
|
|
4757
|
+
/** Updated post draft. */
|
|
4758
|
+
draftPost?: DraftPost;
|
|
4759
|
+
}
|
|
4697
4760
|
|
|
4698
4761
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
4699
4762
|
getUrl: (context: any) => string;
|