@wix/auto_sdk_papyrus_documents 1.0.11 → 1.0.13

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.
@@ -235,328 +235,235 @@ interface DebugOptions {
235
235
  */
236
236
  staticsVersionOverride?: string | null;
237
237
  }
238
- interface DocumentRenderDelayed {
239
- /** Document that is being rendered. */
240
- document?: Document;
241
- }
242
- interface CreateDocumentRequest {
243
- /** Document to be created */
244
- document?: Document;
245
- }
246
- interface CreateDocumentResponse {
247
- /** The created Document */
248
- document?: Document;
249
- }
250
- interface GetDocumentRequest {
238
+ interface RenderDocumentRequest {
239
+ /** Template settings. */
240
+ templateSettings?: TemplateSettings;
241
+ /** Document content. */
242
+ content?: DocumentContent;
243
+ /** Output format, defaults to PDF. */
244
+ outputFormat?: RenderFormatWithLiterals;
251
245
  /**
252
- * ID of the Document to retrieve
253
- * @format GUID
246
+ * Overrides papyrusTemplatesStaticsUrl: "//static.parastorage.com/services/papyrus-templates-statics/${version_override}/"
247
+ * @maxLength 100
254
248
  */
255
- documentId: string;
256
- /** @maxSize 1 */
257
- fields?: RequestedFieldsWithLiterals[];
258
- }
259
- declare enum RequestedFields {
260
- /** Include `documentContent` in the response. */
261
- DOCUMENT_CONTENT = "DOCUMENT_CONTENT"
262
- }
263
- /** @enumType */
264
- type RequestedFieldsWithLiterals = RequestedFields | 'DOCUMENT_CONTENT';
265
- interface GetDocumentResponse {
266
- /** The retrieved Document */
267
- document?: Document;
268
- }
269
- interface DeleteDocumentRequest {
249
+ versionOverride?: string | null;
270
250
  /**
271
- * ID of the Document to delete
272
- * @format GUID
251
+ * Overrides static versions for the statics config.
252
+ * @maxSize 10
273
253
  */
274
- documentId: string;
275
- }
276
- interface DeleteDocumentResponse {
277
- /** Deleted document. */
278
- document?: Document;
254
+ staticOverrides?: Record<string, string>;
279
255
  }
280
- interface DeleteDocumentByExternalIdRequest {
256
+ interface TemplateSettings {
281
257
  /**
282
- * External ID of the Document to delete
283
- * @minLength 1
284
- * @maxLength 100
258
+ * Auto generated ID.
259
+ * @format GUID
260
+ * @readonly
285
261
  */
286
- externalId?: string;
287
- }
288
- interface DeleteDocumentByExternalIdResponse {
289
- /** Deleted document. */
290
- document?: Document;
291
- }
292
- interface QueryDocumentRequest {
293
- /** WQL expression */
294
- query: QueryV2;
295
- /** @maxSize 1 */
296
- fields?: RequestedFieldsWithLiterals[];
297
- }
298
- interface QueryV2 extends QueryV2PagingMethodOneOf {
299
- /** Paging options to limit and offset the number of items. */
300
- paging?: Paging;
301
- /** 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`. */
302
- cursorPaging?: CursorPaging;
262
+ _id?: string | null;
303
263
  /**
304
- * Filter object.
305
- *
306
- * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
264
+ * Wix app definition ID.
265
+ * @minLength 1
266
+ * @maxLength 20
307
267
  */
308
- filter?: Record<string, any> | null;
268
+ appSlug?: string | null;
309
269
  /**
310
- * Sort object.
311
- *
312
- * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
270
+ * The type of the template.
271
+ * @minLength 1
272
+ * @maxLength 20
313
273
  */
314
- sort?: Sorting[];
315
- /** 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. */
316
- fields?: string[];
317
- /** 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. */
318
- fieldsets?: string[];
319
- }
320
- /** @oneof */
321
- interface QueryV2PagingMethodOneOf {
322
- /** Paging options to limit and offset the number of items. */
323
- paging?: Paging;
324
- /** 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`. */
325
- cursorPaging?: CursorPaging;
326
- }
327
- interface Sorting {
274
+ templateType?: string | null;
328
275
  /**
329
- * Name of the field to sort by.
330
- * @maxLength 512
276
+ * The id of the template.
277
+ * @minLength 1
278
+ * @maxLength 20
331
279
  */
332
- fieldName?: string;
333
- /** Sort order. */
334
- order?: SortOrderWithLiterals;
280
+ templateId?: string | null;
335
281
  /**
336
- * Origin point for geo-distance sorting on a GEO field
337
- * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
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
338
286
  */
339
- origin?: AddressLocation;
340
- }
341
- declare enum SortOrder {
342
- ASC = "ASC",
343
- DESC = "DESC"
344
- }
345
- /** @enumType */
346
- type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
347
- interface AddressLocation {
348
- /** Address latitude. */
349
- latitude?: number | null;
350
- /** Address longitude. */
351
- longitude?: number | null;
352
- }
353
- interface Paging {
354
- /** Number of items to load. */
355
- limit?: number | null;
356
- /** Number of items to skip in the current sort order. */
357
- offset?: number | null;
358
- }
359
- interface CursorPaging {
287
+ externalId?: string | null;
360
288
  /**
361
- * Maximum number of items to return in the results.
362
- * @max 100
289
+ * Date settings were created.
290
+ * @readonly
363
291
  */
364
- limit?: number | null;
292
+ _createdDate?: Date | null;
365
293
  /**
366
- * Pointer to the next or previous page in the list of results.
367
- *
368
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
369
- * Not relevant for the first request.
370
- * @maxLength 16000
294
+ * Date settings were updated.
295
+ * @readonly
371
296
  */
372
- cursor?: string | null;
373
- }
374
- interface QueryDocumentResponse {
375
- /** The retrieved Documents */
376
- documents?: Document[];
377
- /** Query results' metadata */
378
- metadata?: PagingMetadataV2;
379
- }
380
- interface PagingMetadataV2 {
381
- /** Number of items returned in the response. */
382
- count?: number | null;
383
- /** Offset that was requested. */
384
- offset?: number | null;
385
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
386
- total?: number | null;
387
- /** Flag that indicates the server failed to calculate the `total` field. */
388
- tooManyToCount?: boolean | null;
389
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
390
- cursors?: Cursors;
297
+ _updatedDate?: Date | null;
298
+ /** @maxSize 10 */
299
+ settingGroups?: SettingsGroup[];
300
+ /** Paper size */
301
+ paperSize?: PaperSizeWithLiterals;
302
+ pageOverflow?: PageOverflowWithLiterals;
391
303
  }
392
- interface Cursors {
304
+ interface TextSetting {
393
305
  /**
394
- * Cursor string pointing to the next page in the list of results.
395
- * @maxLength 16000
306
+ * Font family class name
307
+ * @maxLength 20
396
308
  */
397
- next?: string | null;
309
+ fontFamily?: string | null;
398
310
  /**
399
- * Cursor pointing to the previous page in the list of results.
400
- * @maxLength 16000
311
+ * Font style class names
312
+ * @maxSize 10
313
+ * @maxLength 20
401
314
  */
402
- prev?: string | null;
403
- }
404
- interface UpdateDocumentRequest {
315
+ fontStyle?: string[];
405
316
  /**
406
- * Document ID.
407
- * @format GUID
408
- * @readonly
317
+ * Text alignment class name
318
+ * @maxLength 20
409
319
  */
410
- _id: string | null;
411
- /** Document render status. */
412
- renderStatus?: RenderStatusWithLiterals;
413
- /** Rendered document file. */
414
- file?: DocumentFile;
415
- /** Rendered document source HTML file. */
416
- sourceFile?: DocumentFile;
417
- }
418
- interface DocumentFile {
419
- /** File ID. */
420
- fileId?: string | null;
421
- /** File URL. Defined only for public documents. */
422
- staticUrl?: string | null;
423
- /** File path. */
424
- filePath?: string | null;
425
- /** Size in bytes. */
426
- sizeInBytes?: number | null;
427
- }
428
- interface UpdateDocumentResponse {
429
- /** The created Document */
430
- document?: Document;
431
- }
432
- interface DocumentRendered {
433
- /** Rendered document */
434
- document?: Document;
435
- }
436
- interface DocumentRenderFailed {
437
- /** Document that failed to render */
438
- document?: Document;
439
- }
440
- interface DownloadDocumentRequest {
320
+ textAlignment?: string | null;
441
321
  /**
442
- * ID of the Document to retrieve
443
- * @format GUID
322
+ * Text color hex code
323
+ * @minLength 7
324
+ * @maxLength 7
444
325
  */
445
- documentId: string;
326
+ textColor?: string | null;
446
327
  /**
447
- * URL expiration time. Only relevant for private documents.
448
- * @min 600
449
- * @max 86400
328
+ * Font size
329
+ * @min 1
450
330
  */
451
- urlExpirationInSeconds?: number | null;
331
+ fontSize?: number | null;
332
+ /** Text content setting */
333
+ textContent?: TextContent[];
334
+ }
335
+ interface TextContent {
452
336
  /**
453
- * Whether the link downloads the file or opens the file in the browser.
454
- * Default: `ATTACHMENT`
337
+ * @minLength 3
338
+ * @maxLength 50
455
339
  */
456
- contentDisposition?: ContentDispositionWithLiterals;
340
+ _id?: string;
341
+ /** @maxLength 500 */
342
+ value?: string | null;
343
+ visible?: boolean;
457
344
  }
458
- declare enum ContentDisposition {
459
- /** The link downloads the file. */
460
- ATTACHMENT = "ATTACHMENT",
461
- /** The link opens the file in the browser. */
462
- INLINE = "INLINE"
345
+ interface ImageSetting {
346
+ /** Wix media Image */
347
+ image?: string;
348
+ /** Image resizing mode */
349
+ resize?: ResizeOptionWithLiterals;
350
+ }
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;
463
360
  }
464
- /** @enumType */
465
- type ContentDispositionWithLiterals = ContentDisposition | 'ATTACHMENT' | 'INLINE';
466
- interface DownloadDocumentResponse {
467
- /** Download URL. */
468
- downloadUrl?: string;
469
- /** URL expiration timestamp. Not provided for public documents because their links do not expire. */
470
- expirationDate?: Date | null;
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"
471
366
  }
472
- interface GetDownloadUrlRequest extends GetDownloadUrlRequestDocumentOneOf {
473
- /**
474
- * ID of the Document to retrieve
475
- * @format GUID
476
- */
477
- documentId?: string | null;
367
+ /** @enumType */
368
+ type ResizeOptionWithLiterals = ResizeOption | 'FIT' | 'CROP';
369
+ interface SelectSetting {
370
+ /** Selected value */
371
+ value?: string | null;
478
372
  /**
479
- * ID of the Document to retrieve
480
- * @minLength 1
481
- * @maxLength 100
373
+ * Color hex code
374
+ * @minLength 7
375
+ * @maxLength 7
482
376
  */
483
- externalId?: string | null;
377
+ primaryColor?: string | null;
484
378
  /**
485
- * Signed file token
486
- * @minLength 1
487
- * @maxLength 500
379
+ * Color hex code
380
+ * @minLength 7
381
+ * @maxLength 7
488
382
  */
489
- fileToken?: string | null;
383
+ secondaryColor?: string | null;
384
+ /** Size */
385
+ size?: number | null;
386
+ }
387
+ interface BackgroundSetting {
490
388
  /**
491
- * URL expiration time. Only relevant for private documents.
492
- * @min 600
493
- * @max 86400
389
+ * Color of the background hex code
390
+ * @minLength 7
391
+ * @maxLength 9
494
392
  */
495
- urlExpirationInSeconds?: number | null;
496
- /** @maxLength 100 */
497
- downloadButtonText?: string | null;
393
+ color?: string | null;
394
+ /** Wix media Image */
395
+ image?: string;
396
+ }
397
+ interface SettingsGroup {
498
398
  /**
499
- * Whether the link downloads the file or opens the file in the browser.
500
- * Default: `ATTACHMENT`
399
+ * Id of the control group
400
+ * @minLength 5
401
+ * @maxLength 50
501
402
  */
502
- contentDisposition?: ContentDispositionWithLiterals;
503
- }
504
- /** @oneof */
505
- interface GetDownloadUrlRequestDocumentOneOf {
403
+ groupId?: string;
506
404
  /**
507
- * ID of the Document to retrieve
508
- * @format GUID
405
+ * Display settings.
406
+ * @maxSize 20
509
407
  */
510
- documentId?: string | null;
408
+ display?: Record<string, boolean>;
511
409
  /**
512
- * ID of the Document to retrieve
513
- * @minLength 1
514
- * @maxLength 100
410
+ * Texts settings.
411
+ * @maxSize 20
515
412
  */
516
- externalId?: string | null;
413
+ texts?: Record<string, TextSetting>;
517
414
  /**
518
- * Signed file token
519
- * @minLength 1
520
- * @maxLength 500
415
+ * Images settings.
416
+ * @maxSize 10
521
417
  */
522
- fileToken?: string | null;
523
- }
524
- interface GetDownloadUrlResponse {
525
- /** Download URL. */
526
- downloadUrl?: string | null;
527
- /** URL expiration timestamp. Not provided for public documents because their links do not expire. */
528
- expirationDate?: Date | null;
418
+ images?: Record<string, ImageSetting>;
529
419
  /**
530
- * Document ID.
531
- * @format GUID
420
+ * Select option settings.
421
+ * @maxSize 20
532
422
  */
533
- documentId?: string | null;
534
- /** Document render status. */
535
- renderStatus?: RenderStatusWithLiterals;
536
- /** Download URL. */
537
- downloadPageUrl?: string | null;
423
+ selects?: Record<string, SelectSetting>;
538
424
  /**
539
- * Client defined content checksum. Can be used for content comparison.
540
- * @minLength 1
541
- * @maxLength 64
425
+ * Backgrounds settings.
426
+ * @maxSize 20
542
427
  */
543
- contentChecksum?: string | null;
428
+ backgrounds?: Record<string, BackgroundSetting>;
544
429
  }
545
- interface DownloadDocumentSourceRequest {
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;
458
+ }
459
+ interface RenderDocumentByIdRequest {
546
460
  /**
547
- * ID of the Document to retrieve
461
+ * Document ID.
548
462
  * @format GUID
549
463
  */
550
- documentId: string;
551
- /**
552
- * Whether the link downloads the file or opens the file in the browser.
553
- * Default: `ATTACHMENT`
554
- */
555
- contentDisposition?: ContentDispositionWithLiterals;
556
- }
557
- interface DownloadDocumentSourceResponse {
558
- /** Download URL. Expires after 10 minutes. */
559
- downloadUrl?: string;
464
+ documentId?: string | null;
465
+ /** Output format, defaults to PDF. */
466
+ outputFormat?: RenderFormatWithLiterals;
560
467
  }
561
468
  interface DomainEvent extends DomainEventBodyOneOf {
562
469
  createdEvent?: EntityCreatedEvent;
@@ -622,352 +529,445 @@ interface ActionEvent {
622
529
  }
623
530
  interface Empty {
624
531
  }
625
- interface MessageEnvelope {
532
+ interface GetRendererInfoRequest {
533
+ }
534
+ interface GetRendererInfoResponse {
535
+ /** Renderer info */
536
+ info?: Record<string, string>;
537
+ }
538
+ interface GetCachedHtmlRequest {
626
539
  /**
627
- * App instance ID.
628
- * @format GUID
540
+ * Html Access Key.
541
+ * @maxLength 100
629
542
  */
630
- instanceId?: string | null;
543
+ htmlAccessKey?: string;
631
544
  /**
632
- * Event type.
633
- * @maxLength 150
545
+ * Meta Site Id.
546
+ * @format GUID
634
547
  */
635
- eventType?: string;
636
- /** The identification type and identity data. */
637
- identity?: IdentificationData;
638
- /** Stringify payload. */
639
- data?: string;
640
- /** Details related to the account */
641
- accountInfo?: AccountInfo;
548
+ metaSiteId?: string | null;
642
549
  }
643
- interface IdentificationData extends IdentificationDataIdOneOf {
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;
569
+ }
570
+ interface GetDocumentRequest {
644
571
  /**
645
- * ID of a site visitor that has not logged in to the site.
572
+ * ID of the Document to retrieve
646
573
  * @format GUID
647
574
  */
648
- anonymousVisitorId?: string;
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 {
649
590
  /**
650
- * ID of a site visitor that has logged in to the site.
591
+ * ID of the Document to delete
651
592
  * @format GUID
652
593
  */
653
- memberId?: string;
594
+ documentId: string;
595
+ }
596
+ interface DeleteDocumentResponse {
597
+ /** Deleted document. */
598
+ document?: Document;
599
+ }
600
+ interface DeleteDocumentByExternalIdRequest {
654
601
  /**
655
- * ID of a Wix user (site owner, contributor, etc.).
656
- * @format GUID
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;
623
+ /**
624
+ * Filter object.
625
+ *
626
+ * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
657
627
  */
658
- wixUserId?: string;
628
+ filter?: Record<string, any> | null;
659
629
  /**
660
- * ID of an app.
661
- * @format GUID
630
+ * Sort object.
631
+ *
632
+ * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
662
633
  */
663
- appId?: string;
664
- /** @readonly */
665
- identityType?: WebhookIdentityTypeWithLiterals;
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[];
666
639
  }
667
640
  /** @oneof */
668
- interface IdentificationDataIdOneOf {
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 {
669
648
  /**
670
- * ID of a site visitor that has not logged in to the site.
671
- * @format GUID
649
+ * Name of the field to sort by.
650
+ * @maxLength 512
672
651
  */
673
- anonymousVisitorId?: string;
652
+ fieldName?: string;
653
+ /** Sort order. */
654
+ order?: SortOrderWithLiterals;
674
655
  /**
675
- * ID of a site visitor that has logged in to the site.
676
- * @format GUID
656
+ * Origin point for geo-distance sorting on a GEO field
657
+ * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
677
658
  */
678
- memberId?: string;
659
+ origin?: AddressLocation;
660
+ }
661
+ declare enum SortOrder {
662
+ ASC = "ASC",
663
+ DESC = "DESC"
664
+ }
665
+ /** @enumType */
666
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
667
+ interface AddressLocation {
668
+ /** Address latitude. */
669
+ latitude?: number | null;
670
+ /** Address longitude. */
671
+ longitude?: number | null;
672
+ }
673
+ interface Paging {
674
+ /** Number of items to load. */
675
+ limit?: number | null;
676
+ /** Number of items to skip in the current sort order. */
677
+ offset?: number | null;
678
+ }
679
+ interface CursorPaging {
679
680
  /**
680
- * ID of a Wix user (site owner, contributor, etc.).
681
- * @format GUID
681
+ * Maximum number of items to return in the results.
682
+ * @max 100
682
683
  */
683
- wixUserId?: string;
684
+ limit?: number | null;
684
685
  /**
685
- * ID of an app.
686
- * @format GUID
686
+ * Pointer to the next or previous page in the list of results.
687
+ *
688
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
689
+ * Not relevant for the first request.
690
+ * @maxLength 16000
687
691
  */
688
- appId?: string;
692
+ cursor?: string | null;
689
693
  }
690
- declare enum WebhookIdentityType {
691
- UNKNOWN = "UNKNOWN",
692
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
693
- MEMBER = "MEMBER",
694
- WIX_USER = "WIX_USER",
695
- APP = "APP"
694
+ interface QueryDocumentResponse {
695
+ /** The retrieved Documents */
696
+ documents?: Document[];
697
+ /** Query results' metadata */
698
+ metadata?: PagingMetadataV2;
696
699
  }
697
- /** @enumType */
698
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
699
- interface AccountInfo {
700
+ interface PagingMetadataV2 {
701
+ /** Number of items returned in the response. */
702
+ count?: number | null;
703
+ /** Offset that was requested. */
704
+ offset?: number | null;
705
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
706
+ total?: number | null;
707
+ /** Flag that indicates the server failed to calculate the `total` field. */
708
+ tooManyToCount?: boolean | null;
709
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
710
+ cursors?: Cursors;
711
+ }
712
+ interface Cursors {
700
713
  /**
701
- * ID of the Wix account associated with the event.
702
- * @format GUID
714
+ * Cursor string pointing to the next page in the list of results.
715
+ * @maxLength 16000
703
716
  */
704
- accountId?: string | null;
717
+ next?: string | null;
705
718
  /**
706
- * ID of the parent Wix account. Only included when accountId belongs to a child account.
707
- * @format GUID
719
+ * Cursor pointing to the previous page in the list of results.
720
+ * @maxLength 16000
708
721
  */
709
- parentAccountId?: string | null;
722
+ prev?: string | null;
723
+ }
724
+ interface UpdateDocumentRequest {
710
725
  /**
711
- * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
726
+ * Document ID.
712
727
  * @format GUID
728
+ * @readonly
713
729
  */
714
- siteId?: string | null;
715
- }
716
- interface GetDownloadPageRequest {
717
- /** @maxLength 1000 */
718
- file: string | null;
730
+ _id: string | null;
731
+ /** Document render status. */
732
+ renderStatus?: RenderStatusWithLiterals;
733
+ /** Rendered document file. */
734
+ file?: DocumentFile;
735
+ /** Rendered document source HTML file. */
736
+ sourceFile?: DocumentFile;
719
737
  }
720
- interface RawHttpResponse {
721
- body?: Uint8Array;
722
- statusCode?: number | null;
723
- headers?: HeadersEntry[];
738
+ interface DocumentFile {
739
+ /** File ID. */
740
+ fileId?: string | null;
741
+ /** File URL. Defined only for public documents. */
742
+ staticUrl?: string | null;
743
+ /** File path. */
744
+ filePath?: string | null;
745
+ /** Size in bytes. */
746
+ sizeInBytes?: number | null;
724
747
  }
725
- interface HeadersEntry {
726
- key?: string;
727
- value?: string;
748
+ interface UpdateDocumentResponse {
749
+ /** The created Document */
750
+ document?: Document;
728
751
  }
729
- interface RedirectToDocumentRequest {
730
- /** @maxLength 1000 */
731
- file: string | null;
752
+ interface DocumentRendered {
753
+ /** Rendered document */
754
+ document?: Document;
732
755
  }
733
- interface RenderDocumentRequest {
734
- /** Template settings. */
735
- templateSettings?: TemplateSettings;
736
- /** Document content. */
737
- content?: DocumentContent;
738
- /** Output format, defaults to PDF. */
739
- outputFormat?: RenderFormatWithLiterals;
740
- /**
741
- * Overrides papyrusTemplatesStaticsUrl: "//static.parastorage.com/services/papyrus-templates-statics/${version_override}/"
742
- * @maxLength 100
743
- */
744
- versionOverride?: string | null;
745
- /**
746
- * Overrides static versions for the statics config.
747
- * @maxSize 10
748
- */
749
- staticOverrides?: Record<string, string>;
756
+ interface DocumentRenderFailed {
757
+ /** Document that failed to render */
758
+ document?: Document;
750
759
  }
751
- interface TemplateSettings {
760
+ interface DownloadDocumentRequest {
752
761
  /**
753
- * Auto generated ID.
762
+ * ID of the Document to retrieve
754
763
  * @format GUID
755
- * @readonly
756
764
  */
757
- _id?: string | null;
765
+ documentId: string;
758
766
  /**
759
- * Wix app definition ID.
760
- * @minLength 1
761
- * @maxLength 20
767
+ * URL expiration time. Only relevant for private documents.
768
+ * @min 600
769
+ * @max 86400
762
770
  */
763
- appSlug?: string | null;
771
+ urlExpirationInSeconds?: number | null;
764
772
  /**
765
- * The type of the template.
766
- * @minLength 1
767
- * @maxLength 20
773
+ * Whether the link downloads the file or opens the file in the browser.
774
+ * Default: `ATTACHMENT`
768
775
  */
769
- templateType?: string | null;
776
+ contentDisposition?: ContentDispositionWithLiterals;
777
+ }
778
+ declare enum ContentDisposition {
779
+ /** The link downloads the file. */
780
+ ATTACHMENT = "ATTACHMENT",
781
+ /** The link opens the file in the browser. */
782
+ INLINE = "INLINE"
783
+ }
784
+ /** @enumType */
785
+ type ContentDispositionWithLiterals = ContentDisposition | 'ATTACHMENT' | 'INLINE';
786
+ interface DownloadDocumentResponse {
787
+ /** Download URL. */
788
+ downloadUrl?: string;
789
+ /** URL expiration timestamp. Not provided for public documents because their links do not expire. */
790
+ expirationDate?: Date | null;
791
+ }
792
+ interface GetDownloadUrlRequest extends GetDownloadUrlRequestDocumentOneOf {
770
793
  /**
771
- * The id of the template.
772
- * @minLength 1
773
- * @maxLength 20
794
+ * ID of the Document to retrieve
795
+ * @format GUID
774
796
  */
775
- templateId?: string | null;
797
+ documentId?: string | null;
776
798
  /**
777
- * Template settings external ID. For example ticket definition ID.
778
- * Must be unique per tenant where tenant is taken from authorization (wix_app_id + meta_site_id)
799
+ * ID of the Document to retrieve
779
800
  * @minLength 1
780
801
  * @maxLength 100
781
802
  */
782
803
  externalId?: string | null;
783
804
  /**
784
- * Date settings were created.
785
- * @readonly
805
+ * Signed file token
806
+ * @minLength 1
807
+ * @maxLength 500
786
808
  */
787
- _createdDate?: Date | null;
809
+ fileToken?: string | null;
788
810
  /**
789
- * Date settings were updated.
790
- * @readonly
811
+ * URL expiration time. Only relevant for private documents.
812
+ * @min 600
813
+ * @max 86400
791
814
  */
792
- _updatedDate?: Date | null;
793
- /** @maxSize 10 */
794
- settingGroups?: SettingsGroup[];
795
- /** Paper size */
796
- paperSize?: PaperSizeWithLiterals;
797
- pageOverflow?: PageOverflowWithLiterals;
815
+ urlExpirationInSeconds?: number | null;
816
+ /** @maxLength 100 */
817
+ downloadButtonText?: string | null;
818
+ /**
819
+ * Whether the link downloads the file or opens the file in the browser.
820
+ * Default: `ATTACHMENT`
821
+ */
822
+ contentDisposition?: ContentDispositionWithLiterals;
798
823
  }
799
- interface TextSetting {
824
+ /** @oneof */
825
+ interface GetDownloadUrlRequestDocumentOneOf {
800
826
  /**
801
- * Font family class name
802
- * @maxLength 20
827
+ * ID of the Document to retrieve
828
+ * @format GUID
803
829
  */
804
- fontFamily?: string | null;
830
+ documentId?: string | null;
805
831
  /**
806
- * Font style class names
807
- * @maxSize 10
808
- * @maxLength 20
832
+ * ID of the Document to retrieve
833
+ * @minLength 1
834
+ * @maxLength 100
809
835
  */
810
- fontStyle?: string[];
836
+ externalId?: string | null;
811
837
  /**
812
- * Text alignment class name
813
- * @maxLength 20
838
+ * Signed file token
839
+ * @minLength 1
840
+ * @maxLength 500
814
841
  */
815
- textAlignment?: string | null;
842
+ fileToken?: string | null;
843
+ }
844
+ interface GetDownloadUrlResponse {
845
+ /** Download URL. */
846
+ downloadUrl?: string | null;
847
+ /** URL expiration timestamp. Not provided for public documents because their links do not expire. */
848
+ expirationDate?: Date | null;
816
849
  /**
817
- * Text color hex code
818
- * @minLength 7
819
- * @maxLength 7
850
+ * Document ID.
851
+ * @format GUID
820
852
  */
821
- textColor?: string | null;
853
+ documentId?: string | null;
854
+ /** Document render status. */
855
+ renderStatus?: RenderStatusWithLiterals;
856
+ /** Download URL. */
857
+ downloadPageUrl?: string | null;
822
858
  /**
823
- * Font size
824
- * @min 1
859
+ * Client defined content checksum. Can be used for content comparison.
860
+ * @minLength 1
861
+ * @maxLength 64
825
862
  */
826
- fontSize?: number | null;
827
- /** Text content setting */
828
- textContent?: TextContent[];
863
+ contentChecksum?: string | null;
829
864
  }
830
- interface TextContent {
865
+ interface DownloadDocumentSourceRequest {
831
866
  /**
832
- * @minLength 3
833
- * @maxLength 50
867
+ * ID of the Document to retrieve
868
+ * @format GUID
834
869
  */
835
- _id?: string;
836
- /** @maxLength 500 */
837
- value?: string | null;
838
- visible?: boolean;
839
- }
840
- interface ImageSetting {
841
- /** Wix media Image */
842
- image?: string;
843
- /** Image resizing mode */
844
- resize?: ResizeOptionWithLiterals;
845
- }
846
- interface FocalPoint {
847
- /** X-coordinate of the focal point. */
848
- x?: number;
849
- /** Y-coordinate of the focal point. */
850
- y?: number;
851
- /** crop by height */
852
- height?: number | null;
853
- /** crop by width */
854
- width?: number | null;
870
+ documentId: string;
871
+ /**
872
+ * Whether the link downloads the file or opens the file in the browser.
873
+ * Default: `ATTACHMENT`
874
+ */
875
+ contentDisposition?: ContentDispositionWithLiterals;
855
876
  }
856
- declare enum ResizeOption {
857
- /** Automatically resizes full image to fit image field */
858
- FIT = "FIT",
859
- /** Enables user to manually crop image to fit image field */
860
- CROP = "CROP"
877
+ interface DownloadDocumentSourceResponse {
878
+ /** Download URL. Expires after 10 minutes. */
879
+ downloadUrl?: string;
861
880
  }
862
- /** @enumType */
863
- type ResizeOptionWithLiterals = ResizeOption | 'FIT' | 'CROP';
864
- interface SelectSetting {
865
- /** Selected value */
866
- value?: string | null;
881
+ interface MessageEnvelope {
867
882
  /**
868
- * Color hex code
869
- * @minLength 7
870
- * @maxLength 7
883
+ * App instance ID.
884
+ * @format GUID
871
885
  */
872
- primaryColor?: string | null;
886
+ instanceId?: string | null;
873
887
  /**
874
- * Color hex code
875
- * @minLength 7
876
- * @maxLength 7
888
+ * Event type.
889
+ * @maxLength 150
877
890
  */
878
- secondaryColor?: string | null;
879
- /** Size */
880
- size?: number | null;
891
+ eventType?: string;
892
+ /** The identification type and identity data. */
893
+ identity?: IdentificationData;
894
+ /** Stringify payload. */
895
+ data?: string;
896
+ /** Details related to the account */
897
+ accountInfo?: AccountInfo;
881
898
  }
882
- interface BackgroundSetting {
899
+ interface IdentificationData extends IdentificationDataIdOneOf {
883
900
  /**
884
- * Color of the background hex code
885
- * @minLength 7
886
- * @maxLength 9
901
+ * ID of a site visitor that has not logged in to the site.
902
+ * @format GUID
887
903
  */
888
- color?: string | null;
889
- /** Wix media Image */
890
- image?: string;
891
- }
892
- interface SettingsGroup {
904
+ anonymousVisitorId?: string;
893
905
  /**
894
- * Id of the control group
895
- * @minLength 5
896
- * @maxLength 50
906
+ * ID of a site visitor that has logged in to the site.
907
+ * @format GUID
897
908
  */
898
- groupId?: string;
909
+ memberId?: string;
899
910
  /**
900
- * Display settings.
901
- * @maxSize 20
911
+ * ID of a Wix user (site owner, contributor, etc.).
912
+ * @format GUID
902
913
  */
903
- display?: Record<string, boolean>;
914
+ wixUserId?: string;
904
915
  /**
905
- * Texts settings.
906
- * @maxSize 20
916
+ * ID of an app.
917
+ * @format GUID
907
918
  */
908
- texts?: Record<string, TextSetting>;
919
+ appId?: string;
920
+ /** @readonly */
921
+ identityType?: WebhookIdentityTypeWithLiterals;
922
+ }
923
+ /** @oneof */
924
+ interface IdentificationDataIdOneOf {
909
925
  /**
910
- * Images settings.
911
- * @maxSize 10
926
+ * ID of a site visitor that has not logged in to the site.
927
+ * @format GUID
912
928
  */
913
- images?: Record<string, ImageSetting>;
929
+ anonymousVisitorId?: string;
914
930
  /**
915
- * Select option settings.
916
- * @maxSize 20
931
+ * ID of a site visitor that has logged in to the site.
932
+ * @format GUID
917
933
  */
918
- selects?: Record<string, SelectSetting>;
934
+ memberId?: string;
919
935
  /**
920
- * Backgrounds settings.
921
- * @maxSize 20
936
+ * ID of a Wix user (site owner, contributor, etc.).
937
+ * @format GUID
922
938
  */
923
- backgrounds?: Record<string, BackgroundSetting>;
924
- }
925
- declare enum PaperSize {
926
- A4_PORTRAIT = "A4_PORTRAIT",
927
- A4_LANDSCAPE = "A4_LANDSCAPE"
928
- }
929
- /** @enumType */
930
- type PaperSizeWithLiterals = PaperSize | 'A4_PORTRAIT' | 'A4_LANDSCAPE';
931
- declare enum PageOverflow {
932
- CONTENT_HIDDEN = "CONTENT_HIDDEN",
933
- CONTENT_BREAK = "CONTENT_BREAK"
939
+ wixUserId?: string;
940
+ /**
941
+ * ID of an app.
942
+ * @format GUID
943
+ */
944
+ appId?: string;
934
945
  }
935
- /** @enumType */
936
- type PageOverflowWithLiterals = PageOverflow | 'CONTENT_HIDDEN' | 'CONTENT_BREAK';
937
- declare enum RenderFormat {
938
- /** content-type: application/pdf */
939
- PDF = "PDF",
940
- /** content-type: text/html */
941
- HTML = "HTML"
946
+ declare enum WebhookIdentityType {
947
+ UNKNOWN = "UNKNOWN",
948
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
949
+ MEMBER = "MEMBER",
950
+ WIX_USER = "WIX_USER",
951
+ APP = "APP"
942
952
  }
943
953
  /** @enumType */
944
- type RenderFormatWithLiterals = RenderFormat | 'PDF' | 'HTML';
945
- interface RenderDocumentByIdRequest {
954
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
955
+ interface AccountInfo {
946
956
  /**
947
- * Document ID.
957
+ * ID of the Wix account associated with the event.
948
958
  * @format GUID
949
959
  */
950
- documentId?: string | null;
951
- /** Output format, defaults to PDF. */
952
- outputFormat?: RenderFormatWithLiterals;
953
- }
954
- interface GetRendererInfoRequest {
955
- }
956
- interface GetRendererInfoResponse {
957
- /** Renderer info */
958
- info?: Record<string, string>;
959
- }
960
- interface GetCachedHtmlRequest {
960
+ accountId?: string | null;
961
961
  /**
962
- * Html Access Key.
963
- * @maxLength 100
962
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
963
+ * @format GUID
964
964
  */
965
- htmlAccessKey?: string;
965
+ parentAccountId?: string | null;
966
966
  /**
967
- * Meta Site Id.
967
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
968
968
  * @format GUID
969
969
  */
970
- metaSiteId?: string | null;
970
+ siteId?: string | null;
971
971
  }
972
972
  /** @docsIgnore */
973
973
  type DownloadDocumentApplicationErrors = {
@@ -1211,6 +1211,22 @@ interface DocumentUpdatedEnvelope {
1211
1211
  * @slug updated
1212
1212
  */
1213
1213
  declare function onDocumentUpdated(handler: (event: DocumentUpdatedEnvelope) => void | Promise<void>): void;
1214
+ /**
1215
+ * Get Document.
1216
+ * @public
1217
+ * @requiredField file
1218
+ * @permissionId PAPYRUS.DOWNLOAD_DOCUMENT
1219
+ * @fqn wix.papyrus.v1.DownloadPageController.GetDownloadPage
1220
+ */
1221
+ declare function getDownloadPage(file: string | null): Promise<RawHttpResponse>;
1222
+ /**
1223
+ * Get Document.
1224
+ * @public
1225
+ * @requiredField file
1226
+ * @permissionId PAPYRUS.DOWNLOAD_DOCUMENT
1227
+ * @fqn wix.papyrus.v1.DownloadPageController.RedirectToDocument
1228
+ */
1229
+ declare function redirectToDocument(file: string | null): Promise<RawHttpResponse>;
1214
1230
  /**
1215
1231
  * Creates a new Document
1216
1232
  * @public
@@ -1469,21 +1485,5 @@ interface DownloadDocumentSourceOptions {
1469
1485
  */
1470
1486
  contentDisposition?: ContentDispositionWithLiterals;
1471
1487
  }
1472
- /**
1473
- * Get Document.
1474
- * @public
1475
- * @requiredField file
1476
- * @permissionId PAPYRUS.DOWNLOAD_DOCUMENT
1477
- * @fqn wix.papyrus.v1.DownloadPageController.GetDownloadPage
1478
- */
1479
- declare function getDownloadPage(file: string | null): Promise<RawHttpResponse>;
1480
- /**
1481
- * Get Document.
1482
- * @public
1483
- * @requiredField file
1484
- * @permissionId PAPYRUS.DOWNLOAD_DOCUMENT
1485
- * @fqn wix.papyrus.v1.DownloadPageController.RedirectToDocument
1486
- */
1487
- declare function redirectToDocument(file: string | null): Promise<RawHttpResponse>;
1488
1488
 
1489
1489
  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 };