@wix/auto_sdk_papyrus_documents 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,669 +0,0 @@
1
- // src/papyrus-v1-document-documents.http.ts
2
- import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
3
- import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
4
- import { transformRESTBytesToSDKBytes } from "@wix/sdk-runtime/transformations/bytes";
5
- import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
6
- import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
7
- import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
8
- import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
9
- function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
10
- const domainToMappings = {
11
- "api._base_domain_": [
12
- {
13
- srcPath: "/papyrus-document",
14
- destPath: ""
15
- }
16
- ],
17
- "www.wixapis.com": [
18
- {
19
- srcPath: "/papyrus-document/v1/documents",
20
- destPath: "/v1/documents"
21
- }
22
- ],
23
- "papyrus.wixapps.net": [
24
- {
25
- srcPath: "/download",
26
- destPath: "/download"
27
- },
28
- {
29
- srcPath: "/papyrus-document",
30
- destPath: ""
31
- },
32
- {
33
- srcPath: "/view",
34
- destPath: "/view"
35
- }
36
- ],
37
- "manage._base_domain_": [
38
- {
39
- srcPath: "/papyrus-document",
40
- destPath: ""
41
- }
42
- ],
43
- "api._api_base_domain_": [
44
- {
45
- srcPath: "/papyrus-document",
46
- destPath: ""
47
- }
48
- ]
49
- };
50
- return resolveUrl(Object.assign(opts, { domainToMappings }));
51
- }
52
- function resolveWixPapyrusV1DocumentServiceUrl(opts) {
53
- const domainToMappings = {
54
- "api._base_domain_": [
55
- {
56
- srcPath: "/papyrus-document",
57
- destPath: ""
58
- }
59
- ],
60
- "www.wixapis.com": [
61
- {
62
- srcPath: "/papyrus-document/v1/documents",
63
- destPath: "/v1/documents"
64
- }
65
- ],
66
- "papyrus.wixapps.net": [
67
- {
68
- srcPath: "/download",
69
- destPath: "/download"
70
- },
71
- {
72
- srcPath: "/papyrus-document",
73
- destPath: ""
74
- },
75
- {
76
- srcPath: "/view",
77
- destPath: "/view"
78
- }
79
- ],
80
- "manage._base_domain_": [
81
- {
82
- srcPath: "/papyrus-document",
83
- destPath: ""
84
- }
85
- ],
86
- "api._api_base_domain_": [
87
- {
88
- srcPath: "/papyrus-document",
89
- destPath: ""
90
- }
91
- ]
92
- };
93
- return resolveUrl(Object.assign(opts, { domainToMappings }));
94
- }
95
- var PACKAGE_NAME = "@wix/auto_sdk_papyrus_documents";
96
- function createDocument(payload) {
97
- function __createDocument({ host }) {
98
- const serializedData = transformPaths(payload, [
99
- {
100
- transformFn: transformSDKTimestampToRESTTimestamp,
101
- paths: [
102
- { path: "document.createdDate" },
103
- { path: "document.updatedDate" },
104
- { path: "document.expirationDate" }
105
- ]
106
- }
107
- ]);
108
- const metadata = {
109
- entityFqdn: "wix.papyrus.v1.document",
110
- method: "POST",
111
- methodFqn: "wix.papyrus.v1.DocumentService.CreateDocument",
112
- packageName: PACKAGE_NAME,
113
- migrationOptions: {
114
- optInTransformResponse: true
115
- },
116
- url: resolveWixPapyrusV1DocumentServiceUrl({
117
- protoPath: "/v1/documents",
118
- data: serializedData,
119
- host
120
- }),
121
- data: serializedData,
122
- transformResponse: (payload2) => transformPaths(payload2, [
123
- {
124
- transformFn: transformRESTTimestampToSDKTimestamp,
125
- paths: [
126
- { path: "document.createdDate" },
127
- { path: "document.updatedDate" },
128
- { path: "document.expirationDate" }
129
- ]
130
- }
131
- ])
132
- };
133
- return metadata;
134
- }
135
- return __createDocument;
136
- }
137
- function getDocument(payload) {
138
- function __getDocument({ host }) {
139
- const metadata = {
140
- entityFqdn: "wix.papyrus.v1.document",
141
- method: "GET",
142
- methodFqn: "wix.papyrus.v1.DocumentService.GetDocument",
143
- packageName: PACKAGE_NAME,
144
- migrationOptions: {
145
- optInTransformResponse: true
146
- },
147
- url: resolveWixPapyrusV1DocumentServiceUrl({
148
- protoPath: "/v1/documents/{documentId}",
149
- data: payload,
150
- host
151
- }),
152
- params: toURLSearchParams(payload),
153
- transformResponse: (payload2) => transformPaths(payload2, [
154
- {
155
- transformFn: transformRESTTimestampToSDKTimestamp,
156
- paths: [
157
- { path: "document.createdDate" },
158
- { path: "document.updatedDate" },
159
- { path: "document.expirationDate" }
160
- ]
161
- }
162
- ])
163
- };
164
- return metadata;
165
- }
166
- return __getDocument;
167
- }
168
- function deleteDocument(payload) {
169
- function __deleteDocument({ host }) {
170
- const metadata = {
171
- entityFqdn: "wix.papyrus.v1.document",
172
- method: "DELETE",
173
- methodFqn: "wix.papyrus.v1.DocumentService.DeleteDocument",
174
- packageName: PACKAGE_NAME,
175
- migrationOptions: {
176
- optInTransformResponse: true
177
- },
178
- url: resolveWixPapyrusV1DocumentServiceUrl({
179
- protoPath: "/v1/documents/{documentId}",
180
- data: payload,
181
- host
182
- }),
183
- params: toURLSearchParams(payload),
184
- transformResponse: (payload2) => transformPaths(payload2, [
185
- {
186
- transformFn: transformRESTTimestampToSDKTimestamp,
187
- paths: [
188
- { path: "document.createdDate" },
189
- { path: "document.updatedDate" },
190
- { path: "document.expirationDate" }
191
- ]
192
- }
193
- ])
194
- };
195
- return metadata;
196
- }
197
- return __deleteDocument;
198
- }
199
- function queryDocument(payload) {
200
- function __queryDocument({ host }) {
201
- const serializedData = transformPaths(payload, [
202
- {
203
- transformFn: transformSDKFloatToRESTFloat,
204
- paths: [
205
- { path: "query.sort.origin.latitude" },
206
- { path: "query.sort.origin.longitude" }
207
- ]
208
- }
209
- ]);
210
- const metadata = {
211
- entityFqdn: "wix.papyrus.v1.document",
212
- method: "POST",
213
- methodFqn: "wix.papyrus.v1.DocumentService.QueryDocument",
214
- packageName: PACKAGE_NAME,
215
- migrationOptions: {
216
- optInTransformResponse: true
217
- },
218
- url: resolveWixPapyrusV1DocumentServiceUrl({
219
- protoPath: "/v1/documents/query",
220
- data: serializedData,
221
- host
222
- }),
223
- data: serializedData,
224
- transformResponse: (payload2) => transformPaths(payload2, [
225
- {
226
- transformFn: transformRESTTimestampToSDKTimestamp,
227
- paths: [
228
- { path: "documents.createdDate" },
229
- { path: "documents.updatedDate" },
230
- { path: "documents.expirationDate" }
231
- ]
232
- }
233
- ])
234
- };
235
- return metadata;
236
- }
237
- return __queryDocument;
238
- }
239
- function updateDocument(payload) {
240
- function __updateDocument({ host }) {
241
- const metadata = {
242
- entityFqdn: "wix.papyrus.v1.document",
243
- method: "PATCH",
244
- methodFqn: "wix.papyrus.v1.DocumentService.UpdateDocument",
245
- packageName: PACKAGE_NAME,
246
- migrationOptions: {
247
- optInTransformResponse: true
248
- },
249
- url: resolveWixPapyrusV1DocumentServiceUrl({
250
- protoPath: "/v1/documents/{id}",
251
- data: payload,
252
- host
253
- }),
254
- data: payload,
255
- transformResponse: (payload2) => transformPaths(payload2, [
256
- {
257
- transformFn: transformRESTTimestampToSDKTimestamp,
258
- paths: [
259
- { path: "document.createdDate" },
260
- { path: "document.updatedDate" },
261
- { path: "document.expirationDate" }
262
- ]
263
- }
264
- ])
265
- };
266
- return metadata;
267
- }
268
- return __updateDocument;
269
- }
270
- function downloadDocument(payload) {
271
- function __downloadDocument({ host }) {
272
- const metadata = {
273
- entityFqdn: "wix.papyrus.v1.document",
274
- method: "GET",
275
- methodFqn: "wix.papyrus.v1.DocumentService.DownloadDocument",
276
- packageName: PACKAGE_NAME,
277
- migrationOptions: {
278
- optInTransformResponse: true
279
- },
280
- url: resolveWixPapyrusV1DocumentServiceUrl({
281
- protoPath: "/v1/documents/download/{documentId}",
282
- data: payload,
283
- host
284
- }),
285
- params: toURLSearchParams(payload),
286
- transformResponse: (payload2) => transformPaths(payload2, [
287
- {
288
- transformFn: transformRESTTimestampToSDKTimestamp,
289
- paths: [{ path: "expirationDate" }]
290
- }
291
- ])
292
- };
293
- return metadata;
294
- }
295
- return __downloadDocument;
296
- }
297
- function getDownloadUrl(payload) {
298
- function __getDownloadUrl({ host }) {
299
- const metadata = {
300
- entityFqdn: "wix.papyrus.v1.document",
301
- method: "GET",
302
- methodFqn: "wix.papyrus.v1.DocumentService.GetDownloadUrl",
303
- packageName: PACKAGE_NAME,
304
- migrationOptions: {
305
- optInTransformResponse: true
306
- },
307
- url: resolveWixPapyrusV1DocumentServiceUrl({
308
- protoPath: "/v1/documents/download-url",
309
- data: payload,
310
- host
311
- }),
312
- params: toURLSearchParams(payload),
313
- transformResponse: (payload2) => transformPaths(payload2, [
314
- {
315
- transformFn: transformRESTTimestampToSDKTimestamp,
316
- paths: [{ path: "expirationDate" }]
317
- }
318
- ])
319
- };
320
- return metadata;
321
- }
322
- return __getDownloadUrl;
323
- }
324
- function downloadDocumentSource(payload) {
325
- function __downloadDocumentSource({ host }) {
326
- const metadata = {
327
- entityFqdn: "wix.papyrus.v1.document",
328
- method: "GET",
329
- methodFqn: "wix.papyrus.v1.DocumentService.DownloadDocumentSource",
330
- packageName: PACKAGE_NAME,
331
- migrationOptions: {
332
- optInTransformResponse: true
333
- },
334
- url: resolveWixPapyrusV1DocumentServiceUrl({
335
- protoPath: "/v1/documents/download/{documentId}/source",
336
- data: payload,
337
- host
338
- }),
339
- params: toURLSearchParams(payload)
340
- };
341
- return metadata;
342
- }
343
- return __downloadDocumentSource;
344
- }
345
- function getDownloadPage(payload) {
346
- function __getDownloadPage({ host }) {
347
- const metadata = {
348
- entityFqdn: "wix.papyrus.v1.document",
349
- method: "GET",
350
- methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
351
- packageName: PACKAGE_NAME,
352
- migrationOptions: {
353
- optInTransformResponse: true
354
- },
355
- url: resolveWixPapyrusV1DownloadPageControllerUrl({
356
- protoPath: "/download",
357
- data: payload,
358
- host
359
- }),
360
- params: toURLSearchParams(payload),
361
- transformResponse: (payload2) => transformPaths(payload2, [
362
- {
363
- transformFn: transformRESTBytesToSDKBytes,
364
- paths: [{ path: "body" }]
365
- }
366
- ])
367
- };
368
- return metadata;
369
- }
370
- return __getDownloadPage;
371
- }
372
- function redirectToDocument(payload) {
373
- function __redirectToDocument({ host }) {
374
- const metadata = {
375
- entityFqdn: "wix.papyrus.v1.document",
376
- method: "GET",
377
- methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
378
- packageName: PACKAGE_NAME,
379
- migrationOptions: {
380
- optInTransformResponse: true
381
- },
382
- url: resolveWixPapyrusV1DownloadPageControllerUrl({
383
- protoPath: "/view",
384
- data: payload,
385
- host
386
- }),
387
- params: toURLSearchParams(payload),
388
- transformResponse: (payload2) => transformPaths(payload2, [
389
- {
390
- transformFn: transformRESTBytesToSDKBytes,
391
- paths: [{ path: "body" }]
392
- }
393
- ])
394
- };
395
- return metadata;
396
- }
397
- return __redirectToDocument;
398
- }
399
-
400
- // src/papyrus-v1-document-documents.types.ts
401
- var RenderStatus = /* @__PURE__ */ ((RenderStatus2) => {
402
- RenderStatus2["UNKNOWN"] = "UNKNOWN";
403
- RenderStatus2["ACCEPTED"] = "ACCEPTED";
404
- RenderStatus2["RENDERING"] = "RENDERING";
405
- RenderStatus2["READY"] = "READY";
406
- RenderStatus2["FAILED"] = "FAILED";
407
- RenderStatus2["EXPIRED"] = "EXPIRED";
408
- return RenderStatus2;
409
- })(RenderStatus || {});
410
- var Format = /* @__PURE__ */ ((Format2) => {
411
- Format2["UNKNOWN"] = "UNKNOWN";
412
- Format2["PDF"] = "PDF";
413
- return Format2;
414
- })(Format || {});
415
- var WixMpClientVersion = /* @__PURE__ */ ((WixMpClientVersion2) => {
416
- WixMpClientVersion2["UNKNOWN"] = "UNKNOWN";
417
- WixMpClientVersion2["MP_V1"] = "MP_V1";
418
- WixMpClientVersion2["MP_V2"] = "MP_V2";
419
- return WixMpClientVersion2;
420
- })(WixMpClientVersion || {});
421
- var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
422
- RequestedFields2["DOCUMENT_CONTENT"] = "DOCUMENT_CONTENT";
423
- return RequestedFields2;
424
- })(RequestedFields || {});
425
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
426
- SortOrder2["ASC"] = "ASC";
427
- SortOrder2["DESC"] = "DESC";
428
- return SortOrder2;
429
- })(SortOrder || {});
430
- var ContentDisposition = /* @__PURE__ */ ((ContentDisposition2) => {
431
- ContentDisposition2["UNKNOWN_CONTENT_DISPOSITION"] = "UNKNOWN_CONTENT_DISPOSITION";
432
- ContentDisposition2["ATTACHMENT"] = "ATTACHMENT";
433
- ContentDisposition2["INLINE"] = "INLINE";
434
- return ContentDisposition2;
435
- })(ContentDisposition || {});
436
- var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
437
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
438
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
439
- WebhookIdentityType2["MEMBER"] = "MEMBER";
440
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
441
- WebhookIdentityType2["APP"] = "APP";
442
- return WebhookIdentityType2;
443
- })(WebhookIdentityType || {});
444
- var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
445
- ResizeOption2["FIT"] = "FIT";
446
- ResizeOption2["CROP"] = "CROP";
447
- return ResizeOption2;
448
- })(ResizeOption || {});
449
- var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
450
- PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
451
- PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
452
- return PaperSize2;
453
- })(PaperSize || {});
454
- var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
455
- PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
456
- PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
457
- return PageOverflow2;
458
- })(PageOverflow || {});
459
- var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
460
- RenderFormat2["PDF"] = "PDF";
461
- RenderFormat2["HTML"] = "HTML";
462
- return RenderFormat2;
463
- })(RenderFormat || {});
464
-
465
- // src/papyrus-v1-document-documents.meta.ts
466
- function createDocument2() {
467
- const payload = {};
468
- const getRequestOptions = createDocument(payload);
469
- const getUrl = (context) => {
470
- const { url } = getRequestOptions(context);
471
- return url;
472
- };
473
- return {
474
- getUrl,
475
- httpMethod: "POST",
476
- path: "/v1/documents",
477
- pathParams: {},
478
- __requestType: null,
479
- __originalRequestType: null,
480
- __responseType: null,
481
- __originalResponseType: null
482
- };
483
- }
484
- function getDocument2() {
485
- const payload = { documentId: ":documentId" };
486
- const getRequestOptions = getDocument(payload);
487
- const getUrl = (context) => {
488
- const { url } = getRequestOptions(context);
489
- return url;
490
- };
491
- return {
492
- getUrl,
493
- httpMethod: "GET",
494
- path: "/v1/documents/{documentId}",
495
- pathParams: { documentId: "documentId" },
496
- __requestType: null,
497
- __originalRequestType: null,
498
- __responseType: null,
499
- __originalResponseType: null
500
- };
501
- }
502
- function deleteDocument2() {
503
- const payload = { documentId: ":documentId" };
504
- const getRequestOptions = deleteDocument(payload);
505
- const getUrl = (context) => {
506
- const { url } = getRequestOptions(context);
507
- return url;
508
- };
509
- return {
510
- getUrl,
511
- httpMethod: "DELETE",
512
- path: "/v1/documents/{documentId}",
513
- pathParams: { documentId: "documentId" },
514
- __requestType: null,
515
- __originalRequestType: null,
516
- __responseType: null,
517
- __originalResponseType: null
518
- };
519
- }
520
- function queryDocument2() {
521
- const payload = {};
522
- const getRequestOptions = queryDocument(payload);
523
- const getUrl = (context) => {
524
- const { url } = getRequestOptions(context);
525
- return url;
526
- };
527
- return {
528
- getUrl,
529
- httpMethod: "POST",
530
- path: "/v1/documents/query",
531
- pathParams: {},
532
- __requestType: null,
533
- __originalRequestType: null,
534
- __responseType: null,
535
- __originalResponseType: null
536
- };
537
- }
538
- function updateDocument2() {
539
- const payload = { id: ":id" };
540
- const getRequestOptions = updateDocument(payload);
541
- const getUrl = (context) => {
542
- const { url } = getRequestOptions(context);
543
- return url;
544
- };
545
- return {
546
- getUrl,
547
- httpMethod: "PATCH",
548
- path: "/v1/documents/{id}",
549
- pathParams: { id: "id" },
550
- __requestType: null,
551
- __originalRequestType: null,
552
- __responseType: null,
553
- __originalResponseType: null
554
- };
555
- }
556
- function downloadDocument2() {
557
- const payload = { documentId: ":documentId" };
558
- const getRequestOptions = downloadDocument(payload);
559
- const getUrl = (context) => {
560
- const { url } = getRequestOptions(context);
561
- return url;
562
- };
563
- return {
564
- getUrl,
565
- httpMethod: "GET",
566
- path: "/v1/documents/download/{documentId}",
567
- pathParams: { documentId: "documentId" },
568
- __requestType: null,
569
- __originalRequestType: null,
570
- __responseType: null,
571
- __originalResponseType: null
572
- };
573
- }
574
- function getDownloadUrl2() {
575
- const payload = {};
576
- const getRequestOptions = getDownloadUrl(payload);
577
- const getUrl = (context) => {
578
- const { url } = getRequestOptions(context);
579
- return url;
580
- };
581
- return {
582
- getUrl,
583
- httpMethod: "GET",
584
- path: "/v1/documents/download-url",
585
- pathParams: {},
586
- __requestType: null,
587
- __originalRequestType: null,
588
- __responseType: null,
589
- __originalResponseType: null
590
- };
591
- }
592
- function downloadDocumentSource2() {
593
- const payload = { documentId: ":documentId" };
594
- const getRequestOptions = downloadDocumentSource(payload);
595
- const getUrl = (context) => {
596
- const { url } = getRequestOptions(context);
597
- return url;
598
- };
599
- return {
600
- getUrl,
601
- httpMethod: "GET",
602
- path: "/v1/documents/download/{documentId}/source",
603
- pathParams: { documentId: "documentId" },
604
- __requestType: null,
605
- __originalRequestType: null,
606
- __responseType: null,
607
- __originalResponseType: null
608
- };
609
- }
610
- function getDownloadPage2() {
611
- const payload = {};
612
- const getRequestOptions = getDownloadPage(payload);
613
- const getUrl = (context) => {
614
- const { url } = getRequestOptions(context);
615
- return url;
616
- };
617
- return {
618
- getUrl,
619
- httpMethod: "GET",
620
- path: "/download",
621
- pathParams: {},
622
- __requestType: null,
623
- __originalRequestType: null,
624
- __responseType: null,
625
- __originalResponseType: null
626
- };
627
- }
628
- function redirectToDocument2() {
629
- const payload = {};
630
- const getRequestOptions = redirectToDocument(payload);
631
- const getUrl = (context) => {
632
- const { url } = getRequestOptions(context);
633
- return url;
634
- };
635
- return {
636
- getUrl,
637
- httpMethod: "GET",
638
- path: "/view",
639
- pathParams: {},
640
- __requestType: null,
641
- __originalRequestType: null,
642
- __responseType: null,
643
- __originalResponseType: null
644
- };
645
- }
646
- export {
647
- ContentDisposition as ContentDispositionOriginal,
648
- Format as FormatOriginal,
649
- PageOverflow as PageOverflowOriginal,
650
- PaperSize as PaperSizeOriginal,
651
- RenderFormat as RenderFormatOriginal,
652
- RenderStatus as RenderStatusOriginal,
653
- RequestedFields as RequestedFieldsOriginal,
654
- ResizeOption as ResizeOptionOriginal,
655
- SortOrder as SortOrderOriginal,
656
- WebhookIdentityType as WebhookIdentityTypeOriginal,
657
- WixMpClientVersion as WixMpClientVersionOriginal,
658
- createDocument2 as createDocument,
659
- deleteDocument2 as deleteDocument,
660
- downloadDocument2 as downloadDocument,
661
- downloadDocumentSource2 as downloadDocumentSource,
662
- getDocument2 as getDocument,
663
- getDownloadPage2 as getDownloadPage,
664
- getDownloadUrl2 as getDownloadUrl,
665
- queryDocument2 as queryDocument,
666
- redirectToDocument2 as redirectToDocument,
667
- updateDocument2 as updateDocument
668
- };
669
- //# sourceMappingURL=meta.mjs.map