@wix/auto_sdk_papyrus_documents 1.0.5 → 1.0.6

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