@wix/papyrus 1.0.0

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.
@@ -0,0 +1,765 @@
1
+ /** Document is the main entity of DocumentService. */
2
+ interface Document$1 {
3
+ /**
4
+ * Document ID.
5
+ * @readonly
6
+ */
7
+ id?: string | null;
8
+ /**
9
+ * Represents the time this Document was created.
10
+ * @readonly
11
+ */
12
+ createdDate?: Date;
13
+ /**
14
+ * Represents the time this Document was last updated.
15
+ * @readonly
16
+ */
17
+ updatedDate?: Date;
18
+ /**
19
+ * Document render status.
20
+ * @readonly
21
+ */
22
+ renderStatus?: RenderStatus$1;
23
+ /**
24
+ * URL to download document. Returned only when Document is in `READY` state.
25
+ * @readonly
26
+ */
27
+ downloadUrl?: string | null;
28
+ /** Template ID. When this parameter used the document will be rendered with this template default settings */
29
+ templateId?: string | null;
30
+ /** Unique per tenant external ID, for example order number. Used to retrieve Document later. */
31
+ externalId?: string | null;
32
+ /** Unique per tenant template external ID, for example ticket definition ID. Used to lookup corresponding template & template settings. */
33
+ templateSettingsExternalId?: string | null;
34
+ /** Template settings ID. */
35
+ templateSettingsId?: string | null;
36
+ /** The app slug of the template */
37
+ appSlug?: string | null;
38
+ /** The type of the template. */
39
+ templateType?: string | null;
40
+ /** Document content that is injected into template. */
41
+ content?: DocumentContent$1;
42
+ /** Number of hours after which document will be eventually expired and its content erased. */
43
+ expiresInHours?: number;
44
+ /**
45
+ * Represents the time this document becomes expired.
46
+ * @readonly
47
+ */
48
+ expirationDate?: Date;
49
+ /** Document format. Defaults to `PDF`. */
50
+ format?: Format$1;
51
+ /**
52
+ * Whether the link to the uploaded document is public or private.
53
+ * For public document static URL will be returned.
54
+ * For private document temporary URL will be generated by DocumentService.DownloadDocument.
55
+ */
56
+ public?: boolean | null;
57
+ /** Optional filename (without extension) to be used for the downloadable document. */
58
+ fileName?: string | null;
59
+ /** Client defined content checksum. Can be used for content comparison. */
60
+ contentChecksum?: string | null;
61
+ /** Rendering notification config. */
62
+ renderDelayedEventConfig?: RenderDelayedEventConfig$1;
63
+ }
64
+ declare enum RenderStatus$1 {
65
+ UNKNOWN = "UNKNOWN",
66
+ /** Document was accepted and is waiting to be rendered. */
67
+ ACCEPTED = "ACCEPTED",
68
+ /** Rendering is in progress. */
69
+ RENDERING = "RENDERING",
70
+ /** Rendering finished successfully and document is ready to download. */
71
+ READY = "READY",
72
+ /** Rendering failed. */
73
+ FAILED = "FAILED",
74
+ /** Rendered document expired and is no longer available for download. */
75
+ EXPIRED = "EXPIRED"
76
+ }
77
+ interface DocumentContent$1 {
78
+ /** Document pages. Each page is reference as $page. */
79
+ pages?: Record<string, any>[] | null;
80
+ /** Other document content referenced by $content variable */
81
+ content?: Record<string, any> | null;
82
+ /** ISO 639-1 language code of content (used in translations). */
83
+ language?: string;
84
+ /** IETF BCP 47 language tag (e.g. en-US). */
85
+ locale?: string | null;
86
+ }
87
+ declare enum Format$1 {
88
+ UNKNOWN = "UNKNOWN",
89
+ PDF = "PDF"
90
+ }
91
+ declare enum WixMpClientVersion$1 {
92
+ UNKNOWN = "UNKNOWN",
93
+ MP_V1 = "MP_V1",
94
+ MP_V2 = "MP_V2"
95
+ }
96
+ interface RenderDelayedEventConfig$1 {
97
+ /**
98
+ * Controls DocumentRenderDelayed action event sending.
99
+ * Event will be sent after time_in_queue_minutes if document render status is ACCEPTED/RENDERING.
100
+ */
101
+ timeInQueueMinutes?: number;
102
+ }
103
+ interface GetDownloadPageRequest$1 {
104
+ file: string | null;
105
+ }
106
+ interface RawHttpResponse$1 {
107
+ body?: Uint8Array;
108
+ statusCode?: number | null;
109
+ headers?: HeadersEntry$1[];
110
+ }
111
+ interface HeadersEntry$1 {
112
+ key?: string;
113
+ value?: string;
114
+ }
115
+ interface CreateDocumentRequest$1 {
116
+ /** Document to be created */
117
+ document?: Document$1;
118
+ }
119
+ interface CreateDocumentResponse$1 {
120
+ /** The created Document */
121
+ document?: Document$1;
122
+ }
123
+ interface GetDocumentRequest$1 {
124
+ /** ID of the Document to retrieve */
125
+ documentId: string;
126
+ fields?: RequestedFields$1[];
127
+ }
128
+ declare enum RequestedFields$1 {
129
+ UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
130
+ /** Include `documentContent` in the response. */
131
+ DOCUMENT_CONTENT = "DOCUMENT_CONTENT"
132
+ }
133
+ interface GetDocumentResponse$1 {
134
+ /** The retrieved Document */
135
+ document?: Document$1;
136
+ }
137
+ interface DeleteDocumentRequest$1 {
138
+ /** ID of the Document to delete */
139
+ documentId: string;
140
+ }
141
+ interface DeleteDocumentResponse$1 {
142
+ /** Deleted document. */
143
+ document?: Document$1;
144
+ }
145
+ interface QueryDocumentRequest$1 {
146
+ /** WQL expression */
147
+ query: QueryV2$1;
148
+ fields?: RequestedFields$1[];
149
+ }
150
+ interface QueryV2$1 extends QueryV2PagingMethodOneOf$1 {
151
+ /** Paging options to limit and skip the number of items. */
152
+ paging?: Paging$1;
153
+ /** 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`. */
154
+ cursorPaging?: CursorPaging$1;
155
+ /**
156
+ * Filter object.
157
+ *
158
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
159
+ */
160
+ filter?: Record<string, any> | null;
161
+ /**
162
+ * Sort object.
163
+ *
164
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
165
+ */
166
+ sort?: Sorting$1[];
167
+ /** 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. */
168
+ fields?: string[];
169
+ /** 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. */
170
+ fieldsets?: string[];
171
+ }
172
+ /** @oneof */
173
+ interface QueryV2PagingMethodOneOf$1 {
174
+ /** Paging options to limit and skip the number of items. */
175
+ paging?: Paging$1;
176
+ /** 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`. */
177
+ cursorPaging?: CursorPaging$1;
178
+ }
179
+ interface Sorting$1 {
180
+ /** Name of the field to sort by. */
181
+ fieldName?: string;
182
+ /** Sort order. */
183
+ order?: SortOrder$1;
184
+ }
185
+ declare enum SortOrder$1 {
186
+ ASC = "ASC",
187
+ DESC = "DESC"
188
+ }
189
+ interface Paging$1 {
190
+ /** Number of items to load. */
191
+ limit?: number | null;
192
+ /** Number of items to skip in the current sort order. */
193
+ offset?: number | null;
194
+ }
195
+ interface CursorPaging$1 {
196
+ /** Maximum number of items to return in the results. */
197
+ limit?: number | null;
198
+ /**
199
+ * Pointer to the next or previous page in the list of results.
200
+ *
201
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
202
+ * Not relevant for the first request.
203
+ */
204
+ cursor?: string | null;
205
+ }
206
+ interface QueryDocumentResponse$1 {
207
+ /** The retrieved Documents */
208
+ documents?: Document$1[];
209
+ /** Query results' metadata */
210
+ metadata?: PagingMetadataV2$1;
211
+ }
212
+ interface PagingMetadataV2$1 {
213
+ /** Number of items returned in the response. */
214
+ count?: number | null;
215
+ /** Offset that was requested. */
216
+ offset?: number | null;
217
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
218
+ total?: number | null;
219
+ /** Flag that indicates the server failed to calculate the `total` field. */
220
+ tooManyToCount?: boolean | null;
221
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
222
+ cursors?: Cursors$1;
223
+ }
224
+ interface Cursors$1 {
225
+ /** Cursor string pointing to the next page in the list of results. */
226
+ next?: string | null;
227
+ /** Cursor pointing to the previous page in the list of results. */
228
+ prev?: string | null;
229
+ }
230
+ interface UpdateDocumentRequest$1 {
231
+ /**
232
+ * Document ID.
233
+ * @readonly
234
+ */
235
+ id: string | null;
236
+ /** Document render status. */
237
+ renderStatus?: RenderStatus$1;
238
+ /** Rendered document file. */
239
+ file?: DocumentFile$1;
240
+ /** Rendered document source HTML file. */
241
+ sourceFile?: DocumentFile$1;
242
+ }
243
+ interface DocumentFile$1 {
244
+ /** File ID. */
245
+ fileId?: string | null;
246
+ /** File URL. Defined only for public documents. */
247
+ staticUrl?: string | null;
248
+ /** File path. */
249
+ filePath?: string | null;
250
+ }
251
+ interface UpdateDocumentResponse$1 {
252
+ /** The created Document */
253
+ document?: Document$1;
254
+ }
255
+ interface DownloadDocumentRequest$1 {
256
+ /** ID of the Document to retrieve */
257
+ documentId: string;
258
+ /** URL expiration time. Only relevant for private documents. */
259
+ urlExpirationInSeconds?: number | null;
260
+ }
261
+ interface DownloadDocumentResponse$1 {
262
+ /** Download URL. */
263
+ downloadUrl?: string;
264
+ /** URL expiration timestamp. Not provided for public documents because their links do not expire. */
265
+ expirationDate?: Date;
266
+ }
267
+ interface GetDownloadUrlRequest$1 extends GetDownloadUrlRequestDocumentOneOf$1 {
268
+ /** ID of the Document to retrieve */
269
+ documentId?: string | null;
270
+ /** ID of the Document to retrieve */
271
+ externalId?: string | null;
272
+ /** Signed file token */
273
+ fileToken?: string | null;
274
+ /** URL expiration time. Only relevant for private documents. */
275
+ urlExpirationInSeconds?: number | null;
276
+ }
277
+ /** @oneof */
278
+ interface GetDownloadUrlRequestDocumentOneOf$1 {
279
+ /** ID of the Document to retrieve */
280
+ documentId?: string | null;
281
+ /** ID of the Document to retrieve */
282
+ externalId?: string | null;
283
+ /** Signed file token */
284
+ fileToken?: string | null;
285
+ }
286
+ interface GetDownloadUrlResponse$1 {
287
+ /** Download URL. */
288
+ downloadUrl?: string | null;
289
+ /** URL expiration timestamp. Not provided for public documents because their links do not expire. */
290
+ expirationDate?: Date;
291
+ /** Document ID. */
292
+ documentId?: string | null;
293
+ /** Document render status. */
294
+ renderStatus?: RenderStatus$1;
295
+ /** Download URL. */
296
+ downloadPageUrl?: string | null;
297
+ }
298
+ interface DownloadDocumentSourceRequest$1 {
299
+ /** ID of the Document to retrieve */
300
+ documentId: string;
301
+ }
302
+ interface DownloadDocumentSourceResponse$1 {
303
+ /** Download URL. Expires after 10 minutes. */
304
+ downloadUrl?: string;
305
+ }
306
+ interface HeadersEntryNonNullableFields$1 {
307
+ key: string;
308
+ value: string;
309
+ }
310
+ interface RawHttpResponseNonNullableFields$1 {
311
+ body: Uint8Array;
312
+ headers: HeadersEntryNonNullableFields$1[];
313
+ }
314
+ interface DocumentContentNonNullableFields$1 {
315
+ language: string;
316
+ }
317
+ interface TemplateSettingsOverrideNonNullableFields$1 {
318
+ pageIndices: number[];
319
+ }
320
+ interface PageSettingsNonNullableFields$1 {
321
+ pageIndices: number[];
322
+ }
323
+ interface RenderDelayedEventConfigNonNullableFields$1 {
324
+ timeInQueueMinutes: number;
325
+ }
326
+ interface DocumentNonNullableFields$1 {
327
+ renderStatus: RenderStatus$1;
328
+ content?: DocumentContentNonNullableFields$1;
329
+ expiresInHours: number;
330
+ format: Format$1;
331
+ templateSettings: TemplateSettingsOverrideNonNullableFields$1[];
332
+ pageSettings: PageSettingsNonNullableFields$1[];
333
+ wixMpClientVersion: WixMpClientVersion$1;
334
+ renderDelayedEventConfig?: RenderDelayedEventConfigNonNullableFields$1;
335
+ }
336
+ interface CreateDocumentResponseNonNullableFields$1 {
337
+ document?: DocumentNonNullableFields$1;
338
+ }
339
+ interface GetDocumentResponseNonNullableFields$1 {
340
+ document?: DocumentNonNullableFields$1;
341
+ }
342
+ interface DeleteDocumentResponseNonNullableFields$1 {
343
+ document?: DocumentNonNullableFields$1;
344
+ }
345
+ interface QueryDocumentResponseNonNullableFields$1 {
346
+ documents: DocumentNonNullableFields$1[];
347
+ }
348
+ interface UpdateDocumentResponseNonNullableFields$1 {
349
+ document?: DocumentNonNullableFields$1;
350
+ }
351
+ interface DownloadDocumentResponseNonNullableFields$1 {
352
+ downloadUrl: string;
353
+ }
354
+ interface GetDownloadUrlResponseNonNullableFields$1 {
355
+ renderStatus: RenderStatus$1;
356
+ }
357
+ interface DownloadDocumentSourceResponseNonNullableFields$1 {
358
+ downloadUrl: string;
359
+ }
360
+
361
+ /** Document is the main entity of DocumentService. */
362
+ interface Document {
363
+ /**
364
+ * Document ID.
365
+ * @readonly
366
+ */
367
+ _id?: string | null;
368
+ /**
369
+ * Represents the time this Document was created.
370
+ * @readonly
371
+ */
372
+ _createdDate?: Date;
373
+ /**
374
+ * Represents the time this Document was last updated.
375
+ * @readonly
376
+ */
377
+ _updatedDate?: Date;
378
+ /**
379
+ * Document render status.
380
+ * @readonly
381
+ */
382
+ renderStatus?: RenderStatus;
383
+ /**
384
+ * URL to download document. Returned only when Document is in `READY` state.
385
+ * @readonly
386
+ */
387
+ downloadUrl?: string | null;
388
+ /** Template ID. When this parameter used the document will be rendered with this template default settings */
389
+ templateId?: string | null;
390
+ /** Unique per tenant external ID, for example order number. Used to retrieve Document later. */
391
+ externalId?: string | null;
392
+ /** Unique per tenant template external ID, for example ticket definition ID. Used to lookup corresponding template & template settings. */
393
+ templateSettingsExternalId?: string | null;
394
+ /** Template settings ID. */
395
+ templateSettingsId?: string | null;
396
+ /** The app slug of the template */
397
+ appSlug?: string | null;
398
+ /** The type of the template. */
399
+ templateType?: string | null;
400
+ /** Document content that is injected into template. */
401
+ content?: DocumentContent;
402
+ /** Number of hours after which document will be eventually expired and its content erased. */
403
+ expiresInHours?: number;
404
+ /**
405
+ * Represents the time this document becomes expired.
406
+ * @readonly
407
+ */
408
+ expirationDate?: Date;
409
+ /** Document format. Defaults to `PDF`. */
410
+ format?: Format;
411
+ /**
412
+ * Whether the link to the uploaded document is public or private.
413
+ * For public document static URL will be returned.
414
+ * For private document temporary URL will be generated by DocumentService.DownloadDocument.
415
+ */
416
+ public?: boolean | null;
417
+ /** Optional filename (without extension) to be used for the downloadable document. */
418
+ fileName?: string | null;
419
+ /** Client defined content checksum. Can be used for content comparison. */
420
+ contentChecksum?: string | null;
421
+ /** Rendering notification config. */
422
+ renderDelayedEventConfig?: RenderDelayedEventConfig;
423
+ }
424
+ declare enum RenderStatus {
425
+ UNKNOWN = "UNKNOWN",
426
+ /** Document was accepted and is waiting to be rendered. */
427
+ ACCEPTED = "ACCEPTED",
428
+ /** Rendering is in progress. */
429
+ RENDERING = "RENDERING",
430
+ /** Rendering finished successfully and document is ready to download. */
431
+ READY = "READY",
432
+ /** Rendering failed. */
433
+ FAILED = "FAILED",
434
+ /** Rendered document expired and is no longer available for download. */
435
+ EXPIRED = "EXPIRED"
436
+ }
437
+ interface DocumentContent {
438
+ /** Document pages. Each page is reference as $page. */
439
+ pages?: Record<string, any>[] | null;
440
+ /** Other document content referenced by $content variable */
441
+ content?: Record<string, any> | null;
442
+ /** ISO 639-1 language code of content (used in translations). */
443
+ language?: string;
444
+ /** IETF BCP 47 language tag (e.g. en-US). */
445
+ locale?: string | null;
446
+ }
447
+ declare enum Format {
448
+ UNKNOWN = "UNKNOWN",
449
+ PDF = "PDF"
450
+ }
451
+ declare enum WixMpClientVersion {
452
+ UNKNOWN = "UNKNOWN",
453
+ MP_V1 = "MP_V1",
454
+ MP_V2 = "MP_V2"
455
+ }
456
+ interface RenderDelayedEventConfig {
457
+ /**
458
+ * Controls DocumentRenderDelayed action event sending.
459
+ * Event will be sent after time_in_queue_minutes if document render status is ACCEPTED/RENDERING.
460
+ */
461
+ timeInQueueMinutes?: number;
462
+ }
463
+ interface GetDownloadPageRequest {
464
+ file: string | null;
465
+ }
466
+ interface RawHttpResponse {
467
+ body?: Uint8Array;
468
+ statusCode?: number | null;
469
+ headers?: HeadersEntry[];
470
+ }
471
+ interface HeadersEntry {
472
+ key?: string;
473
+ value?: string;
474
+ }
475
+ interface CreateDocumentRequest {
476
+ /** Document to be created */
477
+ document?: Document;
478
+ }
479
+ interface CreateDocumentResponse {
480
+ /** The created Document */
481
+ document?: Document;
482
+ }
483
+ interface GetDocumentRequest {
484
+ /** ID of the Document to retrieve */
485
+ documentId: string;
486
+ fields?: RequestedFields[];
487
+ }
488
+ declare enum RequestedFields {
489
+ UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
490
+ /** Include `documentContent` in the response. */
491
+ DOCUMENT_CONTENT = "DOCUMENT_CONTENT"
492
+ }
493
+ interface GetDocumentResponse {
494
+ /** The retrieved Document */
495
+ document?: Document;
496
+ }
497
+ interface DeleteDocumentRequest {
498
+ /** ID of the Document to delete */
499
+ documentId: string;
500
+ }
501
+ interface DeleteDocumentResponse {
502
+ /** Deleted document. */
503
+ document?: Document;
504
+ }
505
+ interface QueryDocumentRequest {
506
+ /** WQL expression */
507
+ query: QueryV2;
508
+ fields?: RequestedFields[];
509
+ }
510
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
511
+ /** Paging options to limit and skip the number of items. */
512
+ paging?: Paging;
513
+ /** 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`. */
514
+ cursorPaging?: CursorPaging;
515
+ /**
516
+ * Filter object.
517
+ *
518
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
519
+ */
520
+ filter?: Record<string, any> | null;
521
+ /**
522
+ * Sort object.
523
+ *
524
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
525
+ */
526
+ sort?: Sorting[];
527
+ /** 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. */
528
+ fields?: string[];
529
+ /** 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. */
530
+ fieldsets?: string[];
531
+ }
532
+ /** @oneof */
533
+ interface QueryV2PagingMethodOneOf {
534
+ /** Paging options to limit and skip the number of items. */
535
+ paging?: Paging;
536
+ /** 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`. */
537
+ cursorPaging?: CursorPaging;
538
+ }
539
+ interface Sorting {
540
+ /** Name of the field to sort by. */
541
+ fieldName?: string;
542
+ /** Sort order. */
543
+ order?: SortOrder;
544
+ }
545
+ declare enum SortOrder {
546
+ ASC = "ASC",
547
+ DESC = "DESC"
548
+ }
549
+ interface Paging {
550
+ /** Number of items to load. */
551
+ limit?: number | null;
552
+ /** Number of items to skip in the current sort order. */
553
+ offset?: number | null;
554
+ }
555
+ interface CursorPaging {
556
+ /** Maximum number of items to return in the results. */
557
+ limit?: number | null;
558
+ /**
559
+ * Pointer to the next or previous page in the list of results.
560
+ *
561
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
562
+ * Not relevant for the first request.
563
+ */
564
+ cursor?: string | null;
565
+ }
566
+ interface QueryDocumentResponse {
567
+ /** The retrieved Documents */
568
+ documents?: Document[];
569
+ /** Query results' metadata */
570
+ metadata?: PagingMetadataV2;
571
+ }
572
+ interface PagingMetadataV2 {
573
+ /** Number of items returned in the response. */
574
+ count?: number | null;
575
+ /** Offset that was requested. */
576
+ offset?: number | null;
577
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
578
+ total?: number | null;
579
+ /** Flag that indicates the server failed to calculate the `total` field. */
580
+ tooManyToCount?: boolean | null;
581
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
582
+ cursors?: Cursors;
583
+ }
584
+ interface Cursors {
585
+ /** Cursor string pointing to the next page in the list of results. */
586
+ next?: string | null;
587
+ /** Cursor pointing to the previous page in the list of results. */
588
+ prev?: string | null;
589
+ }
590
+ interface UpdateDocumentRequest {
591
+ /**
592
+ * Document ID.
593
+ * @readonly
594
+ */
595
+ _id: string | null;
596
+ /** Document render status. */
597
+ renderStatus?: RenderStatus;
598
+ /** Rendered document file. */
599
+ file?: DocumentFile;
600
+ /** Rendered document source HTML file. */
601
+ sourceFile?: DocumentFile;
602
+ }
603
+ interface DocumentFile {
604
+ /** File ID. */
605
+ fileId?: string | null;
606
+ /** File URL. Defined only for public documents. */
607
+ staticUrl?: string | null;
608
+ /** File path. */
609
+ filePath?: string | null;
610
+ }
611
+ interface UpdateDocumentResponse {
612
+ /** The created Document */
613
+ document?: Document;
614
+ }
615
+ interface DownloadDocumentRequest {
616
+ /** ID of the Document to retrieve */
617
+ documentId: string;
618
+ /** URL expiration time. Only relevant for private documents. */
619
+ urlExpirationInSeconds?: number | null;
620
+ }
621
+ interface DownloadDocumentResponse {
622
+ /** Download URL. */
623
+ downloadUrl?: string;
624
+ /** URL expiration timestamp. Not provided for public documents because their links do not expire. */
625
+ expirationDate?: Date;
626
+ }
627
+ interface GetDownloadUrlRequest extends GetDownloadUrlRequestDocumentOneOf {
628
+ /** ID of the Document to retrieve */
629
+ documentId?: string | null;
630
+ /** ID of the Document to retrieve */
631
+ externalId?: string | null;
632
+ /** Signed file token */
633
+ fileToken?: string | null;
634
+ /** URL expiration time. Only relevant for private documents. */
635
+ urlExpirationInSeconds?: number | null;
636
+ }
637
+ /** @oneof */
638
+ interface GetDownloadUrlRequestDocumentOneOf {
639
+ /** ID of the Document to retrieve */
640
+ documentId?: string | null;
641
+ /** ID of the Document to retrieve */
642
+ externalId?: string | null;
643
+ /** Signed file token */
644
+ fileToken?: string | null;
645
+ }
646
+ interface GetDownloadUrlResponse {
647
+ /** Download URL. */
648
+ downloadUrl?: string | null;
649
+ /** URL expiration timestamp. Not provided for public documents because their links do not expire. */
650
+ expirationDate?: Date;
651
+ /** Document ID. */
652
+ documentId?: string | null;
653
+ /** Document render status. */
654
+ renderStatus?: RenderStatus;
655
+ /** Download URL. */
656
+ downloadPageUrl?: string | null;
657
+ }
658
+ interface DownloadDocumentSourceRequest {
659
+ /** ID of the Document to retrieve */
660
+ documentId: string;
661
+ }
662
+ interface DownloadDocumentSourceResponse {
663
+ /** Download URL. Expires after 10 minutes. */
664
+ downloadUrl?: string;
665
+ }
666
+ interface HeadersEntryNonNullableFields {
667
+ key: string;
668
+ value: string;
669
+ }
670
+ interface RawHttpResponseNonNullableFields {
671
+ body: Uint8Array;
672
+ headers: HeadersEntryNonNullableFields[];
673
+ }
674
+ interface DocumentContentNonNullableFields {
675
+ language: string;
676
+ }
677
+ interface TemplateSettingsOverrideNonNullableFields {
678
+ pageIndices: number[];
679
+ }
680
+ interface PageSettingsNonNullableFields {
681
+ pageIndices: number[];
682
+ }
683
+ interface RenderDelayedEventConfigNonNullableFields {
684
+ timeInQueueMinutes: number;
685
+ }
686
+ interface DocumentNonNullableFields {
687
+ renderStatus: RenderStatus;
688
+ content?: DocumentContentNonNullableFields;
689
+ expiresInHours: number;
690
+ format: Format;
691
+ templateSettings: TemplateSettingsOverrideNonNullableFields[];
692
+ pageSettings: PageSettingsNonNullableFields[];
693
+ wixMpClientVersion: WixMpClientVersion;
694
+ renderDelayedEventConfig?: RenderDelayedEventConfigNonNullableFields;
695
+ }
696
+ interface CreateDocumentResponseNonNullableFields {
697
+ document?: DocumentNonNullableFields;
698
+ }
699
+ interface GetDocumentResponseNonNullableFields {
700
+ document?: DocumentNonNullableFields;
701
+ }
702
+ interface DeleteDocumentResponseNonNullableFields {
703
+ document?: DocumentNonNullableFields;
704
+ }
705
+ interface QueryDocumentResponseNonNullableFields {
706
+ documents: DocumentNonNullableFields[];
707
+ }
708
+ interface UpdateDocumentResponseNonNullableFields {
709
+ document?: DocumentNonNullableFields;
710
+ }
711
+ interface DownloadDocumentResponseNonNullableFields {
712
+ downloadUrl: string;
713
+ }
714
+ interface GetDownloadUrlResponseNonNullableFields {
715
+ renderStatus: RenderStatus;
716
+ }
717
+ interface DownloadDocumentSourceResponseNonNullableFields {
718
+ downloadUrl: string;
719
+ }
720
+
721
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
722
+ getUrl: (context: any) => string;
723
+ httpMethod: K;
724
+ path: string;
725
+ pathParams: M;
726
+ __requestType: T;
727
+ __originalRequestType: S;
728
+ __responseType: Q;
729
+ __originalResponseType: R;
730
+ };
731
+ declare function getDownloadPage(): __PublicMethodMetaInfo<'GET', {}, GetDownloadPageRequest, GetDownloadPageRequest$1, RawHttpResponse & RawHttpResponseNonNullableFields, RawHttpResponse$1 & RawHttpResponseNonNullableFields$1>;
732
+ declare function createDocument(): __PublicMethodMetaInfo<'POST', {}, CreateDocumentRequest, CreateDocumentRequest$1, CreateDocumentResponse & CreateDocumentResponseNonNullableFields, CreateDocumentResponse$1 & CreateDocumentResponseNonNullableFields$1>;
733
+ declare function getDocument(): __PublicMethodMetaInfo<'GET', {
734
+ documentId: string;
735
+ }, GetDocumentRequest, GetDocumentRequest$1, GetDocumentResponse & GetDocumentResponseNonNullableFields, GetDocumentResponse$1 & GetDocumentResponseNonNullableFields$1>;
736
+ declare function deleteDocument(): __PublicMethodMetaInfo<'DELETE', {
737
+ documentId: string;
738
+ }, DeleteDocumentRequest, DeleteDocumentRequest$1, DeleteDocumentResponse & DeleteDocumentResponseNonNullableFields, DeleteDocumentResponse$1 & DeleteDocumentResponseNonNullableFields$1>;
739
+ declare function queryDocument(): __PublicMethodMetaInfo<'POST', {}, QueryDocumentRequest, QueryDocumentRequest$1, QueryDocumentResponse & QueryDocumentResponseNonNullableFields, QueryDocumentResponse$1 & QueryDocumentResponseNonNullableFields$1>;
740
+ declare function updateDocument(): __PublicMethodMetaInfo<'PATCH', {
741
+ id: string;
742
+ }, UpdateDocumentRequest, UpdateDocumentRequest$1, UpdateDocumentResponse & UpdateDocumentResponseNonNullableFields, UpdateDocumentResponse$1 & UpdateDocumentResponseNonNullableFields$1>;
743
+ declare function downloadDocument(): __PublicMethodMetaInfo<'GET', {
744
+ documentId: string;
745
+ }, DownloadDocumentRequest, DownloadDocumentRequest$1, DownloadDocumentResponse & DownloadDocumentResponseNonNullableFields, DownloadDocumentResponse$1 & DownloadDocumentResponseNonNullableFields$1>;
746
+ declare function getDownloadUrl(): __PublicMethodMetaInfo<'GET', {}, GetDownloadUrlRequest, GetDownloadUrlRequest$1, GetDownloadUrlResponse & GetDownloadUrlResponseNonNullableFields, GetDownloadUrlResponse$1 & GetDownloadUrlResponseNonNullableFields$1>;
747
+ declare function downloadDocumentSource(): __PublicMethodMetaInfo<'GET', {
748
+ documentId: string;
749
+ }, DownloadDocumentSourceRequest, DownloadDocumentSourceRequest$1, DownloadDocumentSourceResponse & DownloadDocumentSourceResponseNonNullableFields, DownloadDocumentSourceResponse$1 & DownloadDocumentSourceResponseNonNullableFields$1>;
750
+
751
+ type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
752
+ declare const meta_createDocument: typeof createDocument;
753
+ declare const meta_deleteDocument: typeof deleteDocument;
754
+ declare const meta_downloadDocument: typeof downloadDocument;
755
+ declare const meta_downloadDocumentSource: typeof downloadDocumentSource;
756
+ declare const meta_getDocument: typeof getDocument;
757
+ declare const meta_getDownloadPage: typeof getDownloadPage;
758
+ declare const meta_getDownloadUrl: typeof getDownloadUrl;
759
+ declare const meta_queryDocument: typeof queryDocument;
760
+ declare const meta_updateDocument: typeof updateDocument;
761
+ declare namespace meta {
762
+ export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_createDocument as createDocument, meta_deleteDocument as deleteDocument, meta_downloadDocument as downloadDocument, meta_downloadDocumentSource as downloadDocumentSource, meta_getDocument as getDocument, meta_getDownloadPage as getDownloadPage, meta_getDownloadUrl as getDownloadUrl, meta_queryDocument as queryDocument, meta_updateDocument as updateDocument };
763
+ }
764
+
765
+ export { meta as documents };