@wix/auto_sdk_papyrus_documents 1.0.0 → 1.0.2

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.
Files changed (49) hide show
  1. package/build/cjs/index.d.ts +18 -18
  2. package/build/cjs/index.js +173 -156
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +552 -528
  5. package/build/cjs/index.typings.js +136 -127
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +536 -525
  8. package/build/cjs/meta.js +125 -114
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +26 -22
  11. package/build/cjs/schemas.js +317 -271
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +18 -18
  14. package/build/es/index.mjs +173 -156
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +552 -528
  17. package/build/es/index.typings.mjs +136 -127
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +536 -525
  20. package/build/es/meta.mjs +125 -114
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +26 -22
  23. package/build/es/schemas.mjs +317 -271
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +18 -18
  26. package/build/internal/cjs/index.typings.d.ts +616 -523
  27. package/build/internal/cjs/meta.d.ts +642 -516
  28. package/build/internal/cjs/schemas.d.ts +26 -22
  29. package/build/internal/es/index.d.mts +18 -18
  30. package/build/internal/es/index.typings.d.mts +616 -523
  31. package/build/internal/es/meta.d.mts +642 -516
  32. package/build/internal/es/schemas.d.mts +26 -22
  33. package/package.json +4 -4
  34. package/build/internal/cjs/index.js +0 -1101
  35. package/build/internal/cjs/index.js.map +0 -1
  36. package/build/internal/cjs/index.typings.js +0 -863
  37. package/build/internal/cjs/index.typings.js.map +0 -1
  38. package/build/internal/cjs/meta.js +0 -705
  39. package/build/internal/cjs/meta.js.map +0 -1
  40. package/build/internal/cjs/schemas.js +0 -658
  41. package/build/internal/cjs/schemas.js.map +0 -1
  42. package/build/internal/es/index.mjs +0 -1050
  43. package/build/internal/es/index.mjs.map +0 -1
  44. package/build/internal/es/index.typings.mjs +0 -817
  45. package/build/internal/es/index.typings.mjs.map +0 -1
  46. package/build/internal/es/meta.mjs +0 -658
  47. package/build/internal/es/meta.mjs.map +0 -1
  48. package/build/internal/es/schemas.mjs +0 -602
  49. package/build/internal/es/schemas.mjs.map +0 -1
@@ -99,6 +99,25 @@ interface Document {
99
99
  * @immutable
100
100
  */
101
101
  public?: boolean | null;
102
+ /**
103
+ * Template settings override per content page.
104
+ * @internal
105
+ * @immutable
106
+ * @deprecated
107
+ */
108
+ templateSettings?: TemplateSettingsOverride[];
109
+ /**
110
+ * Whether WixMP storage is enabled.
111
+ * @internal
112
+ * @immutable
113
+ */
114
+ wixMpStorageEnabled?: boolean | null;
115
+ /**
116
+ * Template settings override per content page.
117
+ * @internal
118
+ * @immutable
119
+ */
120
+ pageSettings?: PageSettings[];
102
121
  /**
103
122
  * Optional filename (without extension) to be used for the downloadable document.
104
123
  * @minLength 1
@@ -112,6 +131,12 @@ interface Document {
112
131
  * @immutable
113
132
  */
114
133
  contentChecksum?: string | null;
134
+ /**
135
+ * Whether WixMP v1 Java Client is used.
136
+ * @internal
137
+ * @readonly
138
+ */
139
+ wixMpClientVersion?: WixMpClientVersionWithLiterals;
115
140
  /** Rendering notification config. */
116
141
  renderDelayedEventConfig?: RenderDelayedEventConfig;
117
142
  /**
@@ -119,6 +144,13 @@ interface Document {
119
144
  * @readonly
120
145
  */
121
146
  sizeInBytes?: number | null;
147
+ /**
148
+ * Debug options. When used:
149
+ * - Document status changes FAILED if the first attempt to render fails.
150
+ * @internal
151
+ * @immutable
152
+ */
153
+ debugOptions?: DebugOptions;
122
154
  }
123
155
  declare enum RenderStatus {
124
156
  UNKNOWN = "UNKNOWN",
@@ -235,235 +267,351 @@ interface DebugOptions {
235
267
  */
236
268
  staticsVersionOverride?: string | null;
237
269
  }
238
- interface RenderDocumentRequest {
239
- /** Template settings. */
240
- templateSettings?: TemplateSettings;
241
- /** Document content. */
242
- content?: DocumentContent;
243
- /** Output format, defaults to PDF. */
244
- outputFormat?: RenderFormatWithLiterals;
245
- /**
246
- * Overrides papyrusTemplatesStaticsUrl: "//static.parastorage.com/services/papyrus-templates-statics/${version_override}/"
247
- * @maxLength 100
248
- */
249
- versionOverride?: string | null;
270
+ interface DocumentRenderDelayed {
271
+ /** Document that is being rendered. */
272
+ document?: Document;
273
+ }
274
+ interface CreateDocumentRequest {
275
+ /** Document to be created */
276
+ document?: Document;
277
+ }
278
+ interface CreateDocumentResponse {
279
+ /** The created Document */
280
+ document?: Document;
281
+ }
282
+ interface GetDocumentRequest {
250
283
  /**
251
- * Overrides static versions for the statics config.
252
- * @maxSize 10
284
+ * ID of the Document to retrieve
285
+ * @format GUID
253
286
  */
254
- staticOverrides?: Record<string, string>;
287
+ documentId: string;
288
+ /** @maxSize 1 */
289
+ fields?: RequestedFieldsWithLiterals[];
255
290
  }
256
- interface TemplateSettings {
291
+ declare enum RequestedFields {
292
+ /** Include `documentContent` in the response. */
293
+ DOCUMENT_CONTENT = "DOCUMENT_CONTENT"
294
+ }
295
+ /** @enumType */
296
+ type RequestedFieldsWithLiterals = RequestedFields | 'DOCUMENT_CONTENT';
297
+ interface GetDocumentResponse {
298
+ /** The retrieved Document */
299
+ document?: Document;
300
+ }
301
+ interface DeleteDocumentRequest {
257
302
  /**
258
- * Auto generated ID.
303
+ * ID of the Document to delete
259
304
  * @format GUID
260
- * @readonly
261
305
  */
262
- _id?: string | null;
306
+ documentId: string;
307
+ }
308
+ interface DeleteDocumentResponse {
309
+ /** Deleted document. */
310
+ document?: Document;
311
+ }
312
+ interface DeleteDocumentByExternalIdRequest {
263
313
  /**
264
- * Wix app definition ID.
314
+ * External ID of the Document to delete
265
315
  * @minLength 1
266
- * @maxLength 20
316
+ * @maxLength 100
267
317
  */
268
- appSlug?: string | null;
318
+ externalId?: string;
319
+ }
320
+ interface DeleteDocumentByExternalIdResponse {
321
+ /** Deleted document. */
322
+ document?: Document;
323
+ }
324
+ interface QueryDocumentRequest {
325
+ /** WQL expression */
326
+ query: QueryV2;
327
+ /** @maxSize 1 */
328
+ fields?: RequestedFieldsWithLiterals[];
329
+ }
330
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
331
+ /** Paging options to limit and offset the number of items. */
332
+ paging?: Paging;
333
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
334
+ cursorPaging?: CursorPaging;
269
335
  /**
270
- * The type of the template.
271
- * @minLength 1
272
- * @maxLength 20
336
+ * Filter object.
337
+ *
338
+ * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
273
339
  */
274
- templateType?: string | null;
340
+ filter?: Record<string, any> | null;
275
341
  /**
276
- * The id of the template.
277
- * @minLength 1
278
- * @maxLength 20
342
+ * Sort object.
343
+ *
344
+ * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
279
345
  */
280
- templateId?: string | null;
346
+ sort?: Sorting[];
347
+ /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
348
+ fields?: string[];
349
+ /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
350
+ fieldsets?: string[];
351
+ }
352
+ /** @oneof */
353
+ interface QueryV2PagingMethodOneOf {
354
+ /** Paging options to limit and offset the number of items. */
355
+ paging?: Paging;
356
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
357
+ cursorPaging?: CursorPaging;
358
+ }
359
+ interface Sorting {
281
360
  /**
282
- * Template settings external ID. For example ticket definition ID.
283
- * Must be unique per tenant where tenant is taken from authorization (wix_app_id + meta_site_id)
284
- * @minLength 1
285
- * @maxLength 100
361
+ * Name of the field to sort by.
362
+ * @maxLength 512
286
363
  */
287
- externalId?: string | null;
364
+ fieldName?: string;
365
+ /** Sort order. */
366
+ order?: SortOrderWithLiterals;
288
367
  /**
289
- * Date settings were created.
290
- * @readonly
368
+ * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
369
+ * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
370
+ *
371
+ * If multiple filters are provided, they are combined with AND operator.
372
+ *
373
+ * Example:
374
+ * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
375
+ * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
376
+ * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
377
+ * @internal
378
+ * @maxSize 10
291
379
  */
292
- _createdDate?: Date | null;
380
+ selectItemsBy?: Record<string, any>[] | null;
293
381
  /**
294
- * Date settings were updated.
295
- * @readonly
382
+ * Origin point for geo-distance sorting on a GEO field
383
+ * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
296
384
  */
297
- _updatedDate?: Date | null;
298
- /** @maxSize 10 */
299
- settingGroups?: SettingsGroup[];
300
- /** Paper size */
301
- paperSize?: PaperSizeWithLiterals;
302
- pageOverflow?: PageOverflowWithLiterals;
385
+ origin?: AddressLocation;
303
386
  }
304
- interface TextSetting {
387
+ declare enum SortOrder {
388
+ ASC = "ASC",
389
+ DESC = "DESC"
390
+ }
391
+ /** @enumType */
392
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
393
+ interface AddressLocation {
394
+ /** Address latitude. */
395
+ latitude?: number | null;
396
+ /** Address longitude. */
397
+ longitude?: number | null;
398
+ }
399
+ interface Paging {
400
+ /** Number of items to load. */
401
+ limit?: number | null;
402
+ /** Number of items to skip in the current sort order. */
403
+ offset?: number | null;
404
+ }
405
+ interface CursorPaging {
305
406
  /**
306
- * Font family class name
307
- * @maxLength 20
407
+ * Maximum number of items to return in the results.
408
+ * @max 100
308
409
  */
309
- fontFamily?: string | null;
410
+ limit?: number | null;
310
411
  /**
311
- * Font style class names
312
- * @maxSize 10
313
- * @maxLength 20
412
+ * Pointer to the next or previous page in the list of results.
413
+ *
414
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
415
+ * Not relevant for the first request.
416
+ * @maxLength 16000
314
417
  */
315
- fontStyle?: string[];
418
+ cursor?: string | null;
419
+ }
420
+ interface QueryDocumentResponse {
421
+ /** The retrieved Documents */
422
+ documents?: Document[];
423
+ /** Query results' metadata */
424
+ metadata?: PagingMetadataV2;
425
+ }
426
+ interface PagingMetadataV2 {
427
+ /** Number of items returned in the response. */
428
+ count?: number | null;
429
+ /** Offset that was requested. */
430
+ offset?: number | null;
431
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
432
+ total?: number | null;
433
+ /** Flag that indicates the server failed to calculate the `total` field. */
434
+ tooManyToCount?: boolean | null;
435
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
436
+ cursors?: Cursors;
316
437
  /**
317
- * Text alignment class name
318
- * @maxLength 20
438
+ * Indicates if there are more results after the current page.
439
+ * If `true`, another page of results can be retrieved.
440
+ * If `false`, this is the last page.
441
+ * @internal
319
442
  */
320
- textAlignment?: string | null;
443
+ hasNext?: boolean | null;
444
+ }
445
+ interface Cursors {
321
446
  /**
322
- * Text color hex code
323
- * @minLength 7
324
- * @maxLength 7
447
+ * Cursor string pointing to the next page in the list of results.
448
+ * @maxLength 16000
325
449
  */
326
- textColor?: string | null;
450
+ next?: string | null;
327
451
  /**
328
- * Font size
329
- * @min 1
452
+ * Cursor pointing to the previous page in the list of results.
453
+ * @maxLength 16000
330
454
  */
331
- fontSize?: number | null;
332
- /** Text content setting */
333
- textContent?: TextContent[];
455
+ prev?: string | null;
334
456
  }
335
- interface TextContent {
457
+ interface UpdateDocumentRequest {
336
458
  /**
337
- * @minLength 3
338
- * @maxLength 50
459
+ * Document ID.
460
+ * @format GUID
461
+ * @readonly
339
462
  */
340
- _id?: string;
341
- /** @maxLength 500 */
342
- value?: string | null;
343
- visible?: boolean;
463
+ _id: string | null;
464
+ /** Document render status. */
465
+ renderStatus?: RenderStatusWithLiterals;
466
+ /** Rendered document file. */
467
+ file?: DocumentFile;
468
+ /** Rendered document source HTML file. */
469
+ sourceFile?: DocumentFile;
344
470
  }
345
- interface ImageSetting {
346
- /** Wix media Image */
347
- image?: string;
348
- /** Image resizing mode */
349
- resize?: ResizeOptionWithLiterals;
471
+ interface DocumentFile {
472
+ /** File ID. */
473
+ fileId?: string | null;
474
+ /** File URL. Defined only for public documents. */
475
+ staticUrl?: string | null;
476
+ /** File path. */
477
+ filePath?: string | null;
478
+ /** Size in bytes. */
479
+ sizeInBytes?: number | null;
350
480
  }
351
- interface FocalPoint {
352
- /** X-coordinate of the focal point. */
353
- x?: number;
354
- /** Y-coordinate of the focal point. */
355
- y?: number;
356
- /** crop by height */
357
- height?: number | null;
358
- /** crop by width */
359
- width?: number | null;
481
+ interface UpdateDocumentResponse {
482
+ /** The created Document */
483
+ document?: Document;
360
484
  }
361
- declare enum ResizeOption {
362
- /** Automatically resizes full image to fit image field */
363
- FIT = "FIT",
364
- /** Enables user to manually crop image to fit image field */
365
- CROP = "CROP"
485
+ interface DocumentRendered {
486
+ /** Rendered document */
487
+ document?: Document;
366
488
  }
367
- /** @enumType */
368
- type ResizeOptionWithLiterals = ResizeOption | 'FIT' | 'CROP';
369
- interface SelectSetting {
370
- /** Selected value */
371
- value?: string | null;
489
+ interface DocumentRenderFailed {
490
+ /** Document that failed to render */
491
+ document?: Document;
492
+ }
493
+ interface DownloadDocumentRequest {
372
494
  /**
373
- * Color hex code
374
- * @minLength 7
375
- * @maxLength 7
495
+ * ID of the Document to retrieve
496
+ * @format GUID
376
497
  */
377
- primaryColor?: string | null;
498
+ documentId: string;
378
499
  /**
379
- * Color hex code
380
- * @minLength 7
381
- * @maxLength 7
500
+ * URL expiration time. Only relevant for private documents.
501
+ * @min 600
502
+ * @max 86400
382
503
  */
383
- secondaryColor?: string | null;
384
- /** Size */
385
- size?: number | null;
386
- }
387
- interface BackgroundSetting {
504
+ urlExpirationInSeconds?: number | null;
388
505
  /**
389
- * Color of the background hex code
390
- * @minLength 7
391
- * @maxLength 9
506
+ * Whether the link downloads the file or opens the file in the browser.
507
+ * Default: `ATTACHMENT`
392
508
  */
393
- color?: string | null;
394
- /** Wix media Image */
395
- image?: string;
509
+ contentDisposition?: ContentDispositionWithLiterals;
396
510
  }
397
- interface SettingsGroup {
511
+ declare enum ContentDisposition {
512
+ /** @internal */
513
+ UNKNOWN_CONTENT_DISPOSITION = "UNKNOWN_CONTENT_DISPOSITION",
514
+ /** The link downloads the file. */
515
+ ATTACHMENT = "ATTACHMENT",
516
+ /** The link opens the file in the browser. */
517
+ INLINE = "INLINE"
518
+ }
519
+ /** @enumType */
520
+ type ContentDispositionWithLiterals = ContentDisposition | 'ATTACHMENT' | 'INLINE';
521
+ interface DownloadDocumentResponse {
522
+ /** Download URL. */
523
+ downloadUrl?: string;
524
+ /** URL expiration timestamp. Not provided for public documents because their links do not expire. */
525
+ expirationDate?: Date | null;
526
+ }
527
+ interface GetDownloadUrlRequest extends GetDownloadUrlRequestDocumentOneOf {
398
528
  /**
399
- * Id of the control group
400
- * @minLength 5
401
- * @maxLength 50
529
+ * ID of the Document to retrieve
530
+ * @format GUID
402
531
  */
403
- groupId?: string;
532
+ documentId?: string | null;
404
533
  /**
405
- * Display settings.
406
- * @maxSize 20
534
+ * ID of the Document to retrieve
535
+ * @minLength 1
536
+ * @maxLength 100
407
537
  */
408
- display?: Record<string, boolean>;
538
+ externalId?: string | null;
409
539
  /**
410
- * Texts settings.
411
- * @maxSize 20
540
+ * Signed file token
541
+ * @minLength 1
542
+ * @maxLength 500
412
543
  */
413
- texts?: Record<string, TextSetting>;
544
+ fileToken?: string | null;
414
545
  /**
415
- * Images settings.
416
- * @maxSize 10
546
+ * URL expiration time. Only relevant for private documents.
547
+ * @min 600
548
+ * @max 86400
417
549
  */
418
- images?: Record<string, ImageSetting>;
550
+ urlExpirationInSeconds?: number | null;
551
+ /** @maxLength 100 */
552
+ downloadButtonText?: string | null;
419
553
  /**
420
- * Select option settings.
421
- * @maxSize 20
554
+ * Whether the link downloads the file or opens the file in the browser.
555
+ * Default: `ATTACHMENT`
422
556
  */
423
- selects?: Record<string, SelectSetting>;
557
+ contentDisposition?: ContentDispositionWithLiterals;
558
+ }
559
+ /** @oneof */
560
+ interface GetDownloadUrlRequestDocumentOneOf {
424
561
  /**
425
- * Backgrounds settings.
426
- * @maxSize 20
562
+ * ID of the Document to retrieve
563
+ * @format GUID
427
564
  */
428
- backgrounds?: Record<string, BackgroundSetting>;
429
- }
430
- declare enum PaperSize {
431
- A4_PORTRAIT = "A4_PORTRAIT",
432
- A4_LANDSCAPE = "A4_LANDSCAPE"
433
- }
434
- /** @enumType */
435
- type PaperSizeWithLiterals = PaperSize | 'A4_PORTRAIT' | 'A4_LANDSCAPE';
436
- declare enum PageOverflow {
437
- CONTENT_HIDDEN = "CONTENT_HIDDEN",
438
- CONTENT_BREAK = "CONTENT_BREAK"
439
- }
440
- /** @enumType */
441
- type PageOverflowWithLiterals = PageOverflow | 'CONTENT_HIDDEN' | 'CONTENT_BREAK';
442
- declare enum RenderFormat {
443
- /** content-type: application/pdf */
444
- PDF = "PDF",
445
- /** content-type: text/html */
446
- HTML = "HTML"
447
- }
448
- /** @enumType */
449
- type RenderFormatWithLiterals = RenderFormat | 'PDF' | 'HTML';
450
- interface RawHttpResponse {
451
- body?: Uint8Array;
452
- statusCode?: number | null;
453
- headers?: HeadersEntry[];
454
- }
455
- interface HeadersEntry {
456
- key?: string;
457
- value?: string;
565
+ documentId?: string | null;
566
+ /**
567
+ * ID of the Document to retrieve
568
+ * @minLength 1
569
+ * @maxLength 100
570
+ */
571
+ externalId?: string | null;
572
+ /**
573
+ * Signed file token
574
+ * @minLength 1
575
+ * @maxLength 500
576
+ */
577
+ fileToken?: string | null;
458
578
  }
459
- interface RenderDocumentByIdRequest {
579
+ interface GetDownloadUrlResponse {
580
+ /** Download URL. */
581
+ downloadUrl?: string | null;
582
+ /** URL expiration timestamp. Not provided for public documents because their links do not expire. */
583
+ expirationDate?: Date | null;
460
584
  /**
461
585
  * Document ID.
462
586
  * @format GUID
463
587
  */
464
588
  documentId?: string | null;
465
- /** Output format, defaults to PDF. */
466
- outputFormat?: RenderFormatWithLiterals;
589
+ /** Document render status. */
590
+ renderStatus?: RenderStatusWithLiterals;
591
+ /** Download URL. */
592
+ downloadPageUrl?: string | null;
593
+ /**
594
+ * Client defined content checksum. Can be used for content comparison.
595
+ * @minLength 1
596
+ * @maxLength 64
597
+ */
598
+ contentChecksum?: string | null;
599
+ }
600
+ interface DownloadDocumentSourceRequest {
601
+ /**
602
+ * ID of the Document to retrieve
603
+ * @format GUID
604
+ */
605
+ documentId: string;
606
+ /**
607
+ * Whether the link downloads the file or opens the file in the browser.
608
+ * Default: `ATTACHMENT`
609
+ */
610
+ contentDisposition?: ContentDispositionWithLiterals;
611
+ }
612
+ interface DownloadDocumentSourceResponse {
613
+ /** Download URL. Expires after 10 minutes. */
614
+ downloadUrl?: string;
467
615
  }
468
616
  interface DomainEvent extends DomainEventBodyOneOf {
469
617
  createdEvent?: EntityCreatedEvent;
@@ -494,7 +642,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
494
642
  /** If present, indicates the action that triggered the event. */
495
643
  originatedFrom?: string | null;
496
644
  /**
497
- * 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.
645
+ * 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.
498
646
  * 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.
499
647
  */
500
648
  entityEventSequence?: string | null;
@@ -529,434 +677,352 @@ interface ActionEvent {
529
677
  }
530
678
  interface Empty {
531
679
  }
532
- interface GetRendererInfoRequest {
533
- }
534
- interface GetRendererInfoResponse {
535
- /** Renderer info */
536
- info?: Record<string, string>;
537
- }
538
- interface GetCachedHtmlRequest {
680
+ interface MessageEnvelope {
539
681
  /**
540
- * Html Access Key.
541
- * @maxLength 100
682
+ * App instance ID.
683
+ * @format GUID
542
684
  */
543
- htmlAccessKey?: string;
685
+ instanceId?: string | null;
544
686
  /**
545
- * Meta Site Id.
546
- * @format GUID
687
+ * Event type.
688
+ * @maxLength 150
547
689
  */
548
- metaSiteId?: string | null;
549
- }
550
- interface GetDownloadPageRequest {
551
- /** @maxLength 1000 */
552
- file: string | null;
553
- }
554
- interface RedirectToDocumentRequest {
555
- /** @maxLength 1000 */
556
- file: string | null;
557
- }
558
- interface DocumentRenderDelayed {
559
- /** Document that is being rendered. */
560
- document?: Document;
561
- }
562
- interface CreateDocumentRequest {
563
- /** Document to be created */
564
- document?: Document;
565
- }
566
- interface CreateDocumentResponse {
567
- /** The created Document */
568
- document?: Document;
690
+ eventType?: string;
691
+ /** The identification type and identity data. */
692
+ identity?: IdentificationData;
693
+ /** Stringify payload. */
694
+ data?: string;
695
+ /** Details related to the account */
696
+ accountInfo?: AccountInfo;
569
697
  }
570
- interface GetDocumentRequest {
698
+ interface IdentificationData extends IdentificationDataIdOneOf {
571
699
  /**
572
- * ID of the Document to retrieve
700
+ * ID of a site visitor that has not logged in to the site.
573
701
  * @format GUID
574
702
  */
575
- documentId: string;
576
- /** @maxSize 1 */
577
- fields?: RequestedFieldsWithLiterals[];
578
- }
579
- declare enum RequestedFields {
580
- /** Include `documentContent` in the response. */
581
- DOCUMENT_CONTENT = "DOCUMENT_CONTENT"
582
- }
583
- /** @enumType */
584
- type RequestedFieldsWithLiterals = RequestedFields | 'DOCUMENT_CONTENT';
585
- interface GetDocumentResponse {
586
- /** The retrieved Document */
587
- document?: Document;
588
- }
589
- interface DeleteDocumentRequest {
703
+ anonymousVisitorId?: string;
590
704
  /**
591
- * ID of the Document to delete
705
+ * ID of a site visitor that has logged in to the site.
592
706
  * @format GUID
593
707
  */
594
- documentId: string;
595
- }
596
- interface DeleteDocumentResponse {
597
- /** Deleted document. */
598
- document?: Document;
599
- }
600
- interface DeleteDocumentByExternalIdRequest {
601
- /**
602
- * External ID of the Document to delete
603
- * @minLength 1
604
- * @maxLength 100
605
- */
606
- externalId?: string;
607
- }
608
- interface DeleteDocumentByExternalIdResponse {
609
- /** Deleted document. */
610
- document?: Document;
611
- }
612
- interface QueryDocumentRequest {
613
- /** WQL expression */
614
- query: QueryV2;
615
- /** @maxSize 1 */
616
- fields?: RequestedFieldsWithLiterals[];
617
- }
618
- interface QueryV2 extends QueryV2PagingMethodOneOf {
619
- /** Paging options to limit and offset the number of items. */
620
- paging?: Paging;
621
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
622
- cursorPaging?: CursorPaging;
708
+ memberId?: string;
623
709
  /**
624
- * Filter object.
625
- *
626
- * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
710
+ * ID of a Wix user (site owner, contributor, etc.).
711
+ * @format GUID
627
712
  */
628
- filter?: Record<string, any> | null;
713
+ wixUserId?: string;
629
714
  /**
630
- * Sort object.
631
- *
632
- * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
715
+ * ID of an app.
716
+ * @format GUID
633
717
  */
634
- sort?: Sorting[];
635
- /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
636
- fields?: string[];
637
- /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
638
- fieldsets?: string[];
718
+ appId?: string;
719
+ /** @readonly */
720
+ identityType?: WebhookIdentityTypeWithLiterals;
639
721
  }
640
722
  /** @oneof */
641
- interface QueryV2PagingMethodOneOf {
642
- /** Paging options to limit and offset the number of items. */
643
- paging?: Paging;
644
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
645
- cursorPaging?: CursorPaging;
646
- }
647
- interface Sorting {
723
+ interface IdentificationDataIdOneOf {
648
724
  /**
649
- * Name of the field to sort by.
650
- * @maxLength 512
725
+ * ID of a site visitor that has not logged in to the site.
726
+ * @format GUID
651
727
  */
652
- fieldName?: string;
653
- /** Sort order. */
654
- order?: SortOrderWithLiterals;
655
- }
656
- declare enum SortOrder {
657
- ASC = "ASC",
658
- DESC = "DESC"
659
- }
660
- /** @enumType */
661
- type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
662
- interface Paging {
663
- /** Number of items to load. */
664
- limit?: number | null;
665
- /** Number of items to skip in the current sort order. */
666
- offset?: number | null;
667
- }
668
- interface CursorPaging {
728
+ anonymousVisitorId?: string;
669
729
  /**
670
- * Maximum number of items to return in the results.
671
- * @max 100
730
+ * ID of a site visitor that has logged in to the site.
731
+ * @format GUID
672
732
  */
673
- limit?: number | null;
733
+ memberId?: string;
674
734
  /**
675
- * Pointer to the next or previous page in the list of results.
676
- *
677
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
678
- * Not relevant for the first request.
679
- * @maxLength 16000
735
+ * ID of a Wix user (site owner, contributor, etc.).
736
+ * @format GUID
680
737
  */
681
- cursor?: string | null;
682
- }
683
- interface QueryDocumentResponse {
684
- /** The retrieved Documents */
685
- documents?: Document[];
686
- /** Query results' metadata */
687
- metadata?: PagingMetadataV2;
738
+ wixUserId?: string;
739
+ /**
740
+ * ID of an app.
741
+ * @format GUID
742
+ */
743
+ appId?: string;
688
744
  }
689
- interface PagingMetadataV2 {
690
- /** Number of items returned in the response. */
691
- count?: number | null;
692
- /** Offset that was requested. */
693
- offset?: number | null;
694
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
695
- total?: number | null;
696
- /** Flag that indicates the server failed to calculate the `total` field. */
697
- tooManyToCount?: boolean | null;
698
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
699
- cursors?: Cursors;
745
+ declare enum WebhookIdentityType {
746
+ UNKNOWN = "UNKNOWN",
747
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
748
+ MEMBER = "MEMBER",
749
+ WIX_USER = "WIX_USER",
750
+ APP = "APP"
700
751
  }
701
- interface Cursors {
752
+ /** @enumType */
753
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
754
+ interface AccountInfo {
702
755
  /**
703
- * Cursor string pointing to the next page in the list of results.
704
- * @maxLength 16000
756
+ * ID of the Wix account associated with the event.
757
+ * @format GUID
705
758
  */
706
- next?: string | null;
759
+ accountId?: string | null;
707
760
  /**
708
- * Cursor pointing to the previous page in the list of results.
709
- * @maxLength 16000
761
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
762
+ * @format GUID
710
763
  */
711
- prev?: string | null;
712
- }
713
- interface UpdateDocumentRequest {
764
+ parentAccountId?: string | null;
714
765
  /**
715
- * Document ID.
766
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
716
767
  * @format GUID
717
- * @readonly
718
768
  */
719
- _id: string | null;
720
- /** Document render status. */
721
- renderStatus?: RenderStatusWithLiterals;
722
- /** Rendered document file. */
723
- file?: DocumentFile;
724
- /** Rendered document source HTML file. */
725
- sourceFile?: DocumentFile;
769
+ siteId?: string | null;
726
770
  }
727
- interface DocumentFile {
728
- /** File ID. */
729
- fileId?: string | null;
730
- /** File URL. Defined only for public documents. */
731
- staticUrl?: string | null;
732
- /** File path. */
733
- filePath?: string | null;
734
- /** Size in bytes. */
735
- sizeInBytes?: number | null;
771
+ interface GetDownloadPageRequest {
772
+ /** @maxLength 1000 */
773
+ file: string | null;
736
774
  }
737
- interface UpdateDocumentResponse {
738
- /** The created Document */
739
- document?: Document;
775
+ interface RawHttpResponse {
776
+ body?: Uint8Array;
777
+ statusCode?: number | null;
778
+ headers?: HeadersEntry[];
740
779
  }
741
- interface DocumentRendered {
742
- /** Rendered document */
743
- document?: Document;
780
+ interface HeadersEntry {
781
+ key?: string;
782
+ value?: string;
744
783
  }
745
- interface DocumentRenderFailed {
746
- /** Document that failed to render */
747
- document?: Document;
784
+ interface RedirectToDocumentRequest {
785
+ /** @maxLength 1000 */
786
+ file: string | null;
748
787
  }
749
- interface DownloadDocumentRequest {
750
- /**
751
- * ID of the Document to retrieve
752
- * @format GUID
753
- */
754
- documentId: string;
788
+ interface RenderDocumentRequest {
789
+ /** Template settings. */
790
+ templateSettings?: TemplateSettings;
791
+ /** Document content. */
792
+ content?: DocumentContent;
793
+ /** Output format, defaults to PDF. */
794
+ outputFormat?: RenderFormatWithLiterals;
755
795
  /**
756
- * URL expiration time. Only relevant for private documents.
757
- * @min 600
758
- * @max 86400
796
+ * Overrides papyrusTemplatesStaticsUrl: "//static.parastorage.com/services/papyrus-templates-statics/${version_override}/"
797
+ * @maxLength 100
759
798
  */
760
- urlExpirationInSeconds?: number | null;
799
+ versionOverride?: string | null;
761
800
  /**
762
- * Whether the link downloads the file or opens the file in the browser.
763
- * Default: `ATTACHMENT`
801
+ * Overrides static versions for the statics config.
802
+ * @maxSize 10
764
803
  */
765
- contentDisposition?: ContentDispositionWithLiterals;
766
- }
767
- declare enum ContentDisposition {
768
- /** The link downloads the file. */
769
- ATTACHMENT = "ATTACHMENT",
770
- /** The link opens the file in the browser. */
771
- INLINE = "INLINE"
772
- }
773
- /** @enumType */
774
- type ContentDispositionWithLiterals = ContentDisposition | 'ATTACHMENT' | 'INLINE';
775
- interface DownloadDocumentResponse {
776
- /** Download URL. */
777
- downloadUrl?: string;
778
- /** URL expiration timestamp. Not provided for public documents because their links do not expire. */
779
- expirationDate?: Date | null;
804
+ staticOverrides?: Record<string, string>;
780
805
  }
781
- interface GetDownloadUrlRequest extends GetDownloadUrlRequestDocumentOneOf {
806
+ interface TemplateSettings {
782
807
  /**
783
- * ID of the Document to retrieve
808
+ * Auto generated ID.
784
809
  * @format GUID
810
+ * @readonly
785
811
  */
786
- documentId?: string | null;
812
+ _id?: string | null;
787
813
  /**
788
- * ID of the Document to retrieve
814
+ * Wix app definition ID.
789
815
  * @minLength 1
790
- * @maxLength 100
816
+ * @maxLength 20
791
817
  */
792
- externalId?: string | null;
818
+ appSlug?: string | null;
793
819
  /**
794
- * Signed file token
820
+ * The type of the template.
795
821
  * @minLength 1
796
- * @maxLength 500
822
+ * @maxLength 20
797
823
  */
798
- fileToken?: string | null;
824
+ templateType?: string | null;
799
825
  /**
800
- * URL expiration time. Only relevant for private documents.
801
- * @min 600
802
- * @max 86400
826
+ * The id of the template.
827
+ * @minLength 1
828
+ * @maxLength 20
803
829
  */
804
- urlExpirationInSeconds?: number | null;
805
- /** @maxLength 100 */
806
- downloadButtonText?: string | null;
830
+ templateId?: string | null;
807
831
  /**
808
- * Whether the link downloads the file or opens the file in the browser.
809
- * Default: `ATTACHMENT`
832
+ * Template settings external ID. For example ticket definition ID.
833
+ * Must be unique per tenant where tenant is taken from authorization (wix_app_id + meta_site_id)
834
+ * @minLength 1
835
+ * @maxLength 100
810
836
  */
811
- contentDisposition?: ContentDispositionWithLiterals;
812
- }
813
- /** @oneof */
814
- interface GetDownloadUrlRequestDocumentOneOf {
837
+ externalId?: string | null;
815
838
  /**
816
- * ID of the Document to retrieve
817
- * @format GUID
839
+ * Date settings were created.
840
+ * @readonly
818
841
  */
819
- documentId?: string | null;
842
+ _createdDate?: Date | null;
820
843
  /**
821
- * ID of the Document to retrieve
822
- * @minLength 1
823
- * @maxLength 100
844
+ * Date settings were updated.
845
+ * @readonly
824
846
  */
825
- externalId?: string | null;
847
+ _updatedDate?: Date | null;
848
+ /** @maxSize 10 */
849
+ settingGroups?: SettingsGroup[];
850
+ /** Paper size */
851
+ paperSize?: PaperSizeWithLiterals;
852
+ pageOverflow?: PageOverflowWithLiterals;
853
+ }
854
+ interface TextSetting {
826
855
  /**
827
- * Signed file token
828
- * @minLength 1
829
- * @maxLength 500
856
+ * Font family class name
857
+ * @maxLength 20
858
+ */
859
+ fontFamily?: string | null;
860
+ /**
861
+ * Font style class names
862
+ * @maxSize 10
863
+ * @maxLength 20
830
864
  */
831
- fileToken?: string | null;
832
- }
833
- interface GetDownloadUrlResponse {
834
- /** Download URL. */
835
- downloadUrl?: string | null;
836
- /** URL expiration timestamp. Not provided for public documents because their links do not expire. */
837
- expirationDate?: Date | null;
865
+ fontStyle?: string[];
838
866
  /**
839
- * Document ID.
840
- * @format GUID
867
+ * Text alignment class name
868
+ * @maxLength 20
841
869
  */
842
- documentId?: string | null;
843
- /** Document render status. */
844
- renderStatus?: RenderStatusWithLiterals;
845
- /** Download URL. */
846
- downloadPageUrl?: string | null;
870
+ textAlignment?: string | null;
847
871
  /**
848
- * Client defined content checksum. Can be used for content comparison.
849
- * @minLength 1
850
- * @maxLength 64
872
+ * Text color hex code
873
+ * @minLength 7
874
+ * @maxLength 7
851
875
  */
852
- contentChecksum?: string | null;
853
- }
854
- interface DownloadDocumentSourceRequest {
876
+ textColor?: string | null;
855
877
  /**
856
- * ID of the Document to retrieve
857
- * @format GUID
878
+ * Font size
879
+ * @min 1
858
880
  */
859
- documentId: string;
881
+ fontSize?: number | null;
882
+ /** Text content setting */
883
+ textContent?: TextContent[];
884
+ }
885
+ interface TextContent {
860
886
  /**
861
- * Whether the link downloads the file or opens the file in the browser.
862
- * Default: `ATTACHMENT`
887
+ * @minLength 3
888
+ * @maxLength 50
863
889
  */
864
- contentDisposition?: ContentDispositionWithLiterals;
890
+ _id?: string;
891
+ /** @maxLength 500 */
892
+ value?: string | null;
893
+ visible?: boolean;
865
894
  }
866
- interface DownloadDocumentSourceResponse {
867
- /** Download URL. Expires after 10 minutes. */
868
- downloadUrl?: string;
895
+ interface ImageSetting {
896
+ /** Wix media Image */
897
+ image?: string;
898
+ /** Image resizing mode */
899
+ resize?: ResizeOptionWithLiterals;
869
900
  }
870
- interface MessageEnvelope {
901
+ interface FocalPoint {
902
+ /** X-coordinate of the focal point. */
903
+ x?: number;
904
+ /** Y-coordinate of the focal point. */
905
+ y?: number;
906
+ /** crop by height */
907
+ height?: number | null;
908
+ /** crop by width */
909
+ width?: number | null;
910
+ }
911
+ declare enum ResizeOption {
912
+ /** Automatically resizes full image to fit image field */
913
+ FIT = "FIT",
914
+ /** Enables user to manually crop image to fit image field */
915
+ CROP = "CROP"
916
+ }
917
+ /** @enumType */
918
+ type ResizeOptionWithLiterals = ResizeOption | 'FIT' | 'CROP';
919
+ interface SelectSetting {
920
+ /** Selected value */
921
+ value?: string | null;
871
922
  /**
872
- * App instance ID.
873
- * @format GUID
923
+ * Color hex code
924
+ * @minLength 7
925
+ * @maxLength 7
874
926
  */
875
- instanceId?: string | null;
927
+ primaryColor?: string | null;
876
928
  /**
877
- * Event type.
878
- * @maxLength 150
929
+ * Color hex code
930
+ * @minLength 7
931
+ * @maxLength 7
879
932
  */
880
- eventType?: string;
881
- /** The identification type and identity data. */
882
- identity?: IdentificationData;
883
- /** Stringify payload. */
884
- data?: string;
885
- /** Details related to the account */
886
- accountInfo?: AccountInfo;
933
+ secondaryColor?: string | null;
934
+ /** Size */
935
+ size?: number | null;
887
936
  }
888
- interface IdentificationData extends IdentificationDataIdOneOf {
889
- /**
890
- * ID of a site visitor that has not logged in to the site.
891
- * @format GUID
892
- */
893
- anonymousVisitorId?: string;
937
+ interface BackgroundSetting {
894
938
  /**
895
- * ID of a site visitor that has logged in to the site.
896
- * @format GUID
939
+ * Color of the background hex code
940
+ * @minLength 7
941
+ * @maxLength 9
897
942
  */
898
- memberId?: string;
943
+ color?: string | null;
944
+ /** Wix media Image */
945
+ image?: string;
946
+ }
947
+ interface SettingsGroup {
899
948
  /**
900
- * ID of a Wix user (site owner, contributor, etc.).
901
- * @format GUID
949
+ * Id of the control group
950
+ * @minLength 5
951
+ * @maxLength 50
902
952
  */
903
- wixUserId?: string;
953
+ groupId?: string;
904
954
  /**
905
- * ID of an app.
906
- * @format GUID
955
+ * Display settings.
956
+ * @maxSize 20
907
957
  */
908
- appId?: string;
909
- /** @readonly */
910
- identityType?: WebhookIdentityTypeWithLiterals;
911
- }
912
- /** @oneof */
913
- interface IdentificationDataIdOneOf {
958
+ display?: Record<string, boolean>;
914
959
  /**
915
- * ID of a site visitor that has not logged in to the site.
916
- * @format GUID
960
+ * Texts settings.
961
+ * @maxSize 20
917
962
  */
918
- anonymousVisitorId?: string;
963
+ texts?: Record<string, TextSetting>;
919
964
  /**
920
- * ID of a site visitor that has logged in to the site.
921
- * @format GUID
965
+ * Images settings.
966
+ * @maxSize 10
922
967
  */
923
- memberId?: string;
968
+ images?: Record<string, ImageSetting>;
924
969
  /**
925
- * ID of a Wix user (site owner, contributor, etc.).
926
- * @format GUID
970
+ * Select option settings.
971
+ * @maxSize 20
927
972
  */
928
- wixUserId?: string;
973
+ selects?: Record<string, SelectSetting>;
929
974
  /**
930
- * ID of an app.
931
- * @format GUID
975
+ * Backgrounds settings.
976
+ * @maxSize 20
932
977
  */
933
- appId?: string;
978
+ backgrounds?: Record<string, BackgroundSetting>;
934
979
  }
935
- declare enum WebhookIdentityType {
936
- UNKNOWN = "UNKNOWN",
937
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
938
- MEMBER = "MEMBER",
939
- WIX_USER = "WIX_USER",
940
- APP = "APP"
980
+ declare enum PaperSize {
981
+ A4_PORTRAIT = "A4_PORTRAIT",
982
+ A4_LANDSCAPE = "A4_LANDSCAPE"
941
983
  }
942
984
  /** @enumType */
943
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
944
- interface AccountInfo {
985
+ type PaperSizeWithLiterals = PaperSize | 'A4_PORTRAIT' | 'A4_LANDSCAPE';
986
+ declare enum PageOverflow {
987
+ CONTENT_HIDDEN = "CONTENT_HIDDEN",
988
+ CONTENT_BREAK = "CONTENT_BREAK"
989
+ }
990
+ /** @enumType */
991
+ type PageOverflowWithLiterals = PageOverflow | 'CONTENT_HIDDEN' | 'CONTENT_BREAK';
992
+ declare enum RenderFormat {
993
+ /** content-type: application/pdf */
994
+ PDF = "PDF",
995
+ /** content-type: text/html */
996
+ HTML = "HTML"
997
+ }
998
+ /** @enumType */
999
+ type RenderFormatWithLiterals = RenderFormat | 'PDF' | 'HTML';
1000
+ interface RenderDocumentByIdRequest {
945
1001
  /**
946
- * ID of the Wix account associated with the event.
1002
+ * Document ID.
947
1003
  * @format GUID
948
1004
  */
949
- accountId?: string | null;
1005
+ documentId?: string | null;
1006
+ /** Output format, defaults to PDF. */
1007
+ outputFormat?: RenderFormatWithLiterals;
1008
+ }
1009
+ interface GetRendererInfoRequest {
1010
+ }
1011
+ interface GetRendererInfoResponse {
1012
+ /** Renderer info */
1013
+ info?: Record<string, string>;
1014
+ }
1015
+ interface GetCachedHtmlRequest {
950
1016
  /**
951
- * ID of the parent Wix account. Only included when accountId belongs to a child account.
952
- * @format GUID
1017
+ * Html Access Key.
1018
+ * @maxLength 100
953
1019
  */
954
- parentAccountId?: string | null;
1020
+ htmlAccessKey?: string;
955
1021
  /**
956
- * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
1022
+ * Meta Site Id.
957
1023
  * @format GUID
958
1024
  */
959
- siteId?: string | null;
1025
+ metaSiteId?: string | null;
960
1026
  }
961
1027
  /** @docsIgnore */
962
1028
  type DownloadDocumentApplicationErrors = {
@@ -1011,7 +1077,7 @@ interface EventMetadata extends BaseEventMetadata {
1011
1077
  /** If present, indicates the action that triggered the event. */
1012
1078
  originatedFrom?: string | null;
1013
1079
  /**
1014
- * 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.
1080
+ * 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.
1015
1081
  * 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.
1016
1082
  */
1017
1083
  entityEventSequence?: string | null;
@@ -1029,7 +1095,9 @@ interface DocumentCreatedEnvelope {
1029
1095
  entity: Document;
1030
1096
  metadata: EventMetadata;
1031
1097
  }
1032
- /** @permissionScope Manage Stores
1098
+ /** @permissionScope Manage_Wix_Rentals_App_Forms_submissions
1099
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
1100
+ * @permissionScope Manage Stores
1033
1101
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1034
1102
  * @permissionScope Manage form submissions.
1035
1103
  * @permissionScopeId SCOPE.FORMS.MANAGE-SUBMISSIONS
@@ -1055,7 +1123,9 @@ declare function onDocumentCreated(handler: (event: DocumentCreatedEnvelope) =>
1055
1123
  interface DocumentDeletedEnvelope {
1056
1124
  metadata: EventMetadata;
1057
1125
  }
1058
- /** @permissionScope Manage Stores
1126
+ /** @permissionScope Manage_Wix_Rentals_App_Forms_submissions
1127
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
1128
+ * @permissionScope Manage Stores
1059
1129
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1060
1130
  * @permissionScope Manage form submissions.
1061
1131
  * @permissionScopeId SCOPE.FORMS.MANAGE-SUBMISSIONS
@@ -1084,6 +1154,8 @@ interface DocumentRenderDelayedEnvelope {
1084
1154
  }
1085
1155
  /**
1086
1156
  * Event is sent after specific time if configured and RenderStatus is ACCEPTED/RENDERING.
1157
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
1158
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
1087
1159
  * @permissionScope Manage Stores
1088
1160
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1089
1161
  * @permissionScope Manage form submissions.
@@ -1111,7 +1183,9 @@ interface DocumentRenderFailedEnvelope {
1111
1183
  data: DocumentRenderFailed;
1112
1184
  metadata: EventMetadata;
1113
1185
  }
1114
- /** @permissionScope Manage Stores
1186
+ /** @permissionScope Manage_Wix_Rentals_App_Forms_submissions
1187
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
1188
+ * @permissionScope Manage Stores
1115
1189
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1116
1190
  * @permissionScope Manage form submissions.
1117
1191
  * @permissionScopeId SCOPE.FORMS.MANAGE-SUBMISSIONS
@@ -1138,7 +1212,9 @@ interface DocumentRenderedEnvelope {
1138
1212
  data: DocumentRendered;
1139
1213
  metadata: EventMetadata;
1140
1214
  }
1141
- /** @permissionScope Manage Stores
1215
+ /** @permissionScope Manage_Wix_Rentals_App_Forms_submissions
1216
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
1217
+ * @permissionScope Manage Stores
1142
1218
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1143
1219
  * @permissionScope Manage form submissions.
1144
1220
  * @permissionScopeId SCOPE.FORMS.MANAGE-SUBMISSIONS
@@ -1165,7 +1241,9 @@ interface DocumentUpdatedEnvelope {
1165
1241
  entity: Document;
1166
1242
  metadata: EventMetadata;
1167
1243
  }
1168
- /** @permissionScope Manage Stores
1244
+ /** @permissionScope Manage_Wix_Rentals_App_Forms_submissions
1245
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
1246
+ * @permissionScope Manage Stores
1169
1247
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1170
1248
  * @permissionScope Manage form submissions.
1171
1249
  * @permissionScopeId SCOPE.FORMS.MANAGE-SUBMISSIONS
@@ -1188,22 +1266,6 @@ interface DocumentUpdatedEnvelope {
1188
1266
  * @slug updated
1189
1267
  */
1190
1268
  declare function onDocumentUpdated(handler: (event: DocumentUpdatedEnvelope) => void | Promise<void>): void;
1191
- /**
1192
- * Get Document.
1193
- * @public
1194
- * @requiredField file
1195
- * @permissionId PAPYRUS.DOWNLOAD_DOCUMENT
1196
- * @fqn wix.papyrus.v1.DownloadPageController.GetDownloadPage
1197
- */
1198
- declare function getDownloadPage(file: string | null): Promise<RawHttpResponse>;
1199
- /**
1200
- * Get Document.
1201
- * @public
1202
- * @requiredField file
1203
- * @permissionId PAPYRUS.DOWNLOAD_DOCUMENT
1204
- * @fqn wix.papyrus.v1.DownloadPageController.RedirectToDocument
1205
- */
1206
- declare function redirectToDocument(file: string | null): Promise<RawHttpResponse>;
1207
1269
  /**
1208
1270
  * Creates a new Document
1209
1271
  * @public
@@ -1329,14 +1391,29 @@ type DocumentQuery = {
1329
1391
  Sort order.
1330
1392
  */
1331
1393
  order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
1394
+ /**
1395
+ When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
1396
+ a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
1397
+
1398
+ If multiple filters are provided, they are combined with AND operator.
1399
+
1400
+ Example:
1401
+ Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
1402
+ and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
1403
+ { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
1404
+ @internal: undefined,
1405
+ @maxSize: 10
1406
+ */
1407
+ selectItemsBy?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['selectItemsBy'] | null;
1408
+ /**
1409
+ Origin point for geo-distance sorting on a GEO field
1410
+ results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
1411
+ */
1412
+ origin?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['origin'];
1332
1413
  }[];
1333
1414
  };
1334
1415
  declare const utils: {
1335
- query: {
1336
- QueryBuilder: () => _wix_sdk_types.QueryBuilder<Document, DocumentQuerySpec, DocumentQuery>;
1337
- Filter: _wix_sdk_types.FilterFactory<Document, DocumentQuerySpec>;
1338
- Sort: _wix_sdk_types.SortFactory<DocumentQuerySpec>;
1339
- };
1416
+ query: _wix_sdk_types.QueryHelpers<Document, DocumentQuerySpec, DocumentQuery>;
1340
1417
  };
1341
1418
  /**
1342
1419
  * Updates Document. Currently supports only render_status, file_id and static_url updates.
@@ -1461,5 +1538,21 @@ interface DownloadDocumentSourceOptions {
1461
1538
  */
1462
1539
  contentDisposition?: ContentDispositionWithLiterals;
1463
1540
  }
1541
+ /**
1542
+ * Get Document.
1543
+ * @public
1544
+ * @requiredField file
1545
+ * @permissionId PAPYRUS.DOWNLOAD_DOCUMENT
1546
+ * @fqn wix.papyrus.v1.DownloadPageController.GetDownloadPage
1547
+ */
1548
+ declare function getDownloadPage(file: string | null): Promise<RawHttpResponse>;
1549
+ /**
1550
+ * Get Document.
1551
+ * @public
1552
+ * @requiredField file
1553
+ * @permissionId PAPYRUS.DOWNLOAD_DOCUMENT
1554
+ * @fqn wix.papyrus.v1.DownloadPageController.RedirectToDocument
1555
+ */
1556
+ declare function redirectToDocument(file: string | null): Promise<RawHttpResponse>;
1464
1557
 
1465
- export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type BackgroundSetting, type BaseEventMetadata, type CommonQueryWithEntityContext, ContentDisposition, type ContentDispositionWithLiterals, type CreateDocumentOptions, type CreateDocumentRequest, type CreateDocumentResponse, type CursorPaging, type Cursors, type DebugOptions, type DeleteDocumentByExternalIdRequest, type DeleteDocumentByExternalIdResponse, type DeleteDocumentRequest, type DeleteDocumentResponse, type Document, type DocumentContent, type DocumentCreatedEnvelope, type DocumentDeletedEnvelope, type DocumentFile, type DocumentQuery, type DocumentQuerySpec, type DocumentRenderDelayed, type DocumentRenderDelayedEnvelope, type DocumentRenderFailed, type DocumentRenderFailedEnvelope, type DocumentRendered, type DocumentRenderedEnvelope, type DocumentUpdatedEnvelope, type DocumentsQueryBuilder, type DocumentsQueryResult, type DomainEvent, type DomainEventBodyOneOf, type DownloadDocumentApplicationErrors, type DownloadDocumentOptions, type DownloadDocumentRequest, type DownloadDocumentResponse, type DownloadDocumentSourceApplicationErrors, type DownloadDocumentSourceOptions, type DownloadDocumentSourceRequest, type DownloadDocumentSourceResponse, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type FocalPoint, Format, type FormatWithLiterals, type GetCachedHtmlRequest, type GetDocumentOptions, type GetDocumentRequest, type GetDocumentResponse, type GetDownloadPageRequest, type GetDownloadUrlOptions, type GetDownloadUrlOptionsDocumentOneOf, type GetDownloadUrlRequest, type GetDownloadUrlRequestDocumentOneOf, type GetDownloadUrlResponse, type GetRendererInfoRequest, type GetRendererInfoResponse, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ImageSetting, type MessageEnvelope, PageOverflow, type PageOverflowWithLiterals, type PageSettings, type Paging, type PagingMetadataV2, PaperSize, type PaperSizeWithLiterals, type QueryDocumentOptions, type QueryDocumentRequest, type QueryDocumentResponse, type QueryV2, type QueryV2PagingMethodOneOf, type RawHttpResponse, type RedirectToDocumentRequest, type RenderDelayedEventConfig, type RenderDocumentByIdRequest, type RenderDocumentRequest, RenderFormat, type RenderFormatWithLiterals, RenderStatus, type RenderStatusWithLiterals, RequestedFields, type RequestedFieldsWithLiterals, ResizeOption, type ResizeOptionWithLiterals, type RestoreInfo, type SelectSetting, type SettingsGroup, SortOrder, type SortOrderWithLiterals, type Sorting, type TemplateSettings, type TemplateSettingsOverride, type TextContent, type TextSetting, type UpdateDocumentOptions, type UpdateDocumentRequest, type UpdateDocumentResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WixMpClientVersion, type WixMpClientVersionWithLiterals, createDocument, deleteDocument, downloadDocument, downloadDocumentSource, getDocument, getDownloadPage, getDownloadUrl, onDocumentCreated, onDocumentDeleted, onDocumentRenderDelayed, onDocumentRenderFailed, onDocumentRendered, onDocumentUpdated, queryDocument, redirectToDocument, typedQueryDocument, updateDocument, utils };
1558
+ export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddressLocation, type BackgroundSetting, type BaseEventMetadata, type CommonQueryWithEntityContext, ContentDisposition, type ContentDispositionWithLiterals, type CreateDocumentOptions, type CreateDocumentRequest, type CreateDocumentResponse, type CursorPaging, type Cursors, type DebugOptions, type DeleteDocumentByExternalIdRequest, type DeleteDocumentByExternalIdResponse, type DeleteDocumentRequest, type DeleteDocumentResponse, type Document, type DocumentContent, type DocumentCreatedEnvelope, type DocumentDeletedEnvelope, type DocumentFile, type DocumentQuery, type DocumentQuerySpec, type DocumentRenderDelayed, type DocumentRenderDelayedEnvelope, type DocumentRenderFailed, type DocumentRenderFailedEnvelope, type DocumentRendered, type DocumentRenderedEnvelope, type DocumentUpdatedEnvelope, type DocumentsQueryBuilder, type DocumentsQueryResult, type DomainEvent, type DomainEventBodyOneOf, type DownloadDocumentApplicationErrors, type DownloadDocumentOptions, type DownloadDocumentRequest, type DownloadDocumentResponse, type DownloadDocumentSourceApplicationErrors, type DownloadDocumentSourceOptions, type DownloadDocumentSourceRequest, type DownloadDocumentSourceResponse, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type FocalPoint, Format, type FormatWithLiterals, type GetCachedHtmlRequest, type GetDocumentOptions, type GetDocumentRequest, type GetDocumentResponse, type GetDownloadPageRequest, type GetDownloadUrlOptions, type GetDownloadUrlOptionsDocumentOneOf, type GetDownloadUrlRequest, type GetDownloadUrlRequestDocumentOneOf, type GetDownloadUrlResponse, type GetRendererInfoRequest, type GetRendererInfoResponse, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ImageSetting, type MessageEnvelope, PageOverflow, type PageOverflowWithLiterals, type PageSettings, type Paging, type PagingMetadataV2, PaperSize, type PaperSizeWithLiterals, type QueryDocumentOptions, type QueryDocumentRequest, type QueryDocumentResponse, type QueryV2, type QueryV2PagingMethodOneOf, type RawHttpResponse, type RedirectToDocumentRequest, type RenderDelayedEventConfig, type RenderDocumentByIdRequest, type RenderDocumentRequest, RenderFormat, type RenderFormatWithLiterals, RenderStatus, type RenderStatusWithLiterals, RequestedFields, type RequestedFieldsWithLiterals, ResizeOption, type ResizeOptionWithLiterals, type RestoreInfo, type SelectSetting, type SettingsGroup, SortOrder, type SortOrderWithLiterals, type Sorting, type TemplateSettings, type TemplateSettingsOverride, type TextContent, type TextSetting, type UpdateDocumentOptions, type UpdateDocumentRequest, type UpdateDocumentResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WixMpClientVersion, type WixMpClientVersionWithLiterals, createDocument, deleteDocument, downloadDocument, downloadDocumentSource, getDocument, getDownloadPage, getDownloadUrl, onDocumentCreated, onDocumentDeleted, onDocumentRenderDelayed, onDocumentRenderFailed, onDocumentRendered, onDocumentUpdated, queryDocument, redirectToDocument, typedQueryDocument, updateDocument, utils };