@wix/auto_sdk_papyrus_documents 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +18 -18
- package/build/cjs/index.js +173 -156
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +552 -528
- package/build/cjs/index.typings.js +136 -127
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +536 -525
- package/build/cjs/meta.js +125 -114
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +26 -22
- package/build/cjs/schemas.js +317 -271
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +18 -18
- package/build/es/index.mjs +173 -156
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +552 -528
- package/build/es/index.typings.mjs +136 -127
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +536 -525
- package/build/es/meta.mjs +125 -114
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +26 -22
- package/build/es/schemas.mjs +317 -271
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +18 -18
- package/build/internal/cjs/index.typings.d.ts +616 -523
- package/build/internal/cjs/meta.d.ts +642 -516
- package/build/internal/cjs/schemas.d.ts +26 -22
- package/build/internal/es/index.d.mts +18 -18
- package/build/internal/es/index.typings.d.mts +616 -523
- package/build/internal/es/meta.d.mts +642 -516
- package/build/internal/es/schemas.d.mts +26 -22
- package/package.json +4 -4
- package/build/internal/cjs/index.js +0 -1101
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -863
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -705
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.js +0 -658
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -1050
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -817
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -658
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.mjs +0 -602
- package/build/internal/es/schemas.mjs.map +0 -1
|
@@ -8,12 +8,13 @@ import {
|
|
|
8
8
|
|
|
9
9
|
// src/papyrus-v1-document-documents.http.ts
|
|
10
10
|
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
11
|
+
import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
|
|
11
12
|
import { transformRESTBytesToSDKBytes } from "@wix/sdk-runtime/transformations/bytes";
|
|
12
13
|
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
13
14
|
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
14
15
|
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
15
16
|
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
16
|
-
function
|
|
17
|
+
function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
|
|
17
18
|
const domainToMappings = {
|
|
18
19
|
"api._base_domain_": [
|
|
19
20
|
{
|
|
@@ -56,7 +57,7 @@ function resolveWixPapyrusV1DocumentServiceUrl(opts) {
|
|
|
56
57
|
};
|
|
57
58
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
+
function resolveWixPapyrusV1DocumentServiceUrl(opts) {
|
|
60
61
|
const domainToMappings = {
|
|
61
62
|
"api._base_domain_": [
|
|
62
63
|
{
|
|
@@ -100,60 +101,6 @@ function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
|
|
|
100
101
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
101
102
|
}
|
|
102
103
|
var PACKAGE_NAME = "@wix/auto_sdk_papyrus_documents";
|
|
103
|
-
function getDownloadPage(payload) {
|
|
104
|
-
function __getDownloadPage({ host }) {
|
|
105
|
-
const metadata = {
|
|
106
|
-
entityFqdn: "wix.papyrus.v1.document",
|
|
107
|
-
method: "GET",
|
|
108
|
-
methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
|
|
109
|
-
packageName: PACKAGE_NAME,
|
|
110
|
-
migrationOptions: {
|
|
111
|
-
optInTransformResponse: true
|
|
112
|
-
},
|
|
113
|
-
url: resolveWixPapyrusV1DownloadPageControllerUrl({
|
|
114
|
-
protoPath: "/download",
|
|
115
|
-
data: payload,
|
|
116
|
-
host
|
|
117
|
-
}),
|
|
118
|
-
params: toURLSearchParams(payload),
|
|
119
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
120
|
-
{
|
|
121
|
-
transformFn: transformRESTBytesToSDKBytes,
|
|
122
|
-
paths: [{ path: "body" }]
|
|
123
|
-
}
|
|
124
|
-
])
|
|
125
|
-
};
|
|
126
|
-
return metadata;
|
|
127
|
-
}
|
|
128
|
-
return __getDownloadPage;
|
|
129
|
-
}
|
|
130
|
-
function redirectToDocument(payload) {
|
|
131
|
-
function __redirectToDocument({ host }) {
|
|
132
|
-
const metadata = {
|
|
133
|
-
entityFqdn: "wix.papyrus.v1.document",
|
|
134
|
-
method: "GET",
|
|
135
|
-
methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
|
|
136
|
-
packageName: PACKAGE_NAME,
|
|
137
|
-
migrationOptions: {
|
|
138
|
-
optInTransformResponse: true
|
|
139
|
-
},
|
|
140
|
-
url: resolveWixPapyrusV1DownloadPageControllerUrl({
|
|
141
|
-
protoPath: "/view",
|
|
142
|
-
data: payload,
|
|
143
|
-
host
|
|
144
|
-
}),
|
|
145
|
-
params: toURLSearchParams(payload),
|
|
146
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
147
|
-
{
|
|
148
|
-
transformFn: transformRESTBytesToSDKBytes,
|
|
149
|
-
paths: [{ path: "body" }]
|
|
150
|
-
}
|
|
151
|
-
])
|
|
152
|
-
};
|
|
153
|
-
return metadata;
|
|
154
|
-
}
|
|
155
|
-
return __redirectToDocument;
|
|
156
|
-
}
|
|
157
104
|
function createDocument(payload) {
|
|
158
105
|
function __createDocument({ host }) {
|
|
159
106
|
const serializedData = transformPaths(payload, [
|
|
@@ -259,6 +206,15 @@ function deleteDocument(payload) {
|
|
|
259
206
|
}
|
|
260
207
|
function queryDocument(payload) {
|
|
261
208
|
function __queryDocument({ host }) {
|
|
209
|
+
const serializedData = transformPaths(payload, [
|
|
210
|
+
{
|
|
211
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
212
|
+
paths: [
|
|
213
|
+
{ path: "query.sort.origin.latitude" },
|
|
214
|
+
{ path: "query.sort.origin.longitude" }
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
]);
|
|
262
218
|
const metadata = {
|
|
263
219
|
entityFqdn: "wix.papyrus.v1.document",
|
|
264
220
|
method: "POST",
|
|
@@ -269,10 +225,10 @@ function queryDocument(payload) {
|
|
|
269
225
|
},
|
|
270
226
|
url: resolveWixPapyrusV1DocumentServiceUrl({
|
|
271
227
|
protoPath: "/v1/documents/query",
|
|
272
|
-
data:
|
|
228
|
+
data: serializedData,
|
|
273
229
|
host
|
|
274
230
|
}),
|
|
275
|
-
data:
|
|
231
|
+
data: serializedData,
|
|
276
232
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
277
233
|
{
|
|
278
234
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
@@ -394,6 +350,60 @@ function downloadDocumentSource(payload) {
|
|
|
394
350
|
}
|
|
395
351
|
return __downloadDocumentSource;
|
|
396
352
|
}
|
|
353
|
+
function getDownloadPage(payload) {
|
|
354
|
+
function __getDownloadPage({ host }) {
|
|
355
|
+
const metadata = {
|
|
356
|
+
entityFqdn: "wix.papyrus.v1.document",
|
|
357
|
+
method: "GET",
|
|
358
|
+
methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
|
|
359
|
+
packageName: PACKAGE_NAME,
|
|
360
|
+
migrationOptions: {
|
|
361
|
+
optInTransformResponse: true
|
|
362
|
+
},
|
|
363
|
+
url: resolveWixPapyrusV1DownloadPageControllerUrl({
|
|
364
|
+
protoPath: "/download",
|
|
365
|
+
data: payload,
|
|
366
|
+
host
|
|
367
|
+
}),
|
|
368
|
+
params: toURLSearchParams(payload),
|
|
369
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
370
|
+
{
|
|
371
|
+
transformFn: transformRESTBytesToSDKBytes,
|
|
372
|
+
paths: [{ path: "body" }]
|
|
373
|
+
}
|
|
374
|
+
])
|
|
375
|
+
};
|
|
376
|
+
return metadata;
|
|
377
|
+
}
|
|
378
|
+
return __getDownloadPage;
|
|
379
|
+
}
|
|
380
|
+
function redirectToDocument(payload) {
|
|
381
|
+
function __redirectToDocument({ host }) {
|
|
382
|
+
const metadata = {
|
|
383
|
+
entityFqdn: "wix.papyrus.v1.document",
|
|
384
|
+
method: "GET",
|
|
385
|
+
methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
|
|
386
|
+
packageName: PACKAGE_NAME,
|
|
387
|
+
migrationOptions: {
|
|
388
|
+
optInTransformResponse: true
|
|
389
|
+
},
|
|
390
|
+
url: resolveWixPapyrusV1DownloadPageControllerUrl({
|
|
391
|
+
protoPath: "/view",
|
|
392
|
+
data: payload,
|
|
393
|
+
host
|
|
394
|
+
}),
|
|
395
|
+
params: toURLSearchParams(payload),
|
|
396
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
397
|
+
{
|
|
398
|
+
transformFn: transformRESTBytesToSDKBytes,
|
|
399
|
+
paths: [{ path: "body" }]
|
|
400
|
+
}
|
|
401
|
+
])
|
|
402
|
+
};
|
|
403
|
+
return metadata;
|
|
404
|
+
}
|
|
405
|
+
return __redirectToDocument;
|
|
406
|
+
}
|
|
397
407
|
|
|
398
408
|
// src/papyrus-v1-document-documents.universal.ts
|
|
399
409
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
@@ -418,26 +428,6 @@ var WixMpClientVersion = /* @__PURE__ */ ((WixMpClientVersion2) => {
|
|
|
418
428
|
WixMpClientVersion2["MP_V2"] = "MP_V2";
|
|
419
429
|
return WixMpClientVersion2;
|
|
420
430
|
})(WixMpClientVersion || {});
|
|
421
|
-
var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
|
|
422
|
-
ResizeOption2["FIT"] = "FIT";
|
|
423
|
-
ResizeOption2["CROP"] = "CROP";
|
|
424
|
-
return ResizeOption2;
|
|
425
|
-
})(ResizeOption || {});
|
|
426
|
-
var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
|
|
427
|
-
PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
|
|
428
|
-
PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
|
|
429
|
-
return PaperSize2;
|
|
430
|
-
})(PaperSize || {});
|
|
431
|
-
var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
|
|
432
|
-
PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
|
|
433
|
-
PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
|
|
434
|
-
return PageOverflow2;
|
|
435
|
-
})(PageOverflow || {});
|
|
436
|
-
var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
|
|
437
|
-
RenderFormat2["PDF"] = "PDF";
|
|
438
|
-
RenderFormat2["HTML"] = "HTML";
|
|
439
|
-
return RenderFormat2;
|
|
440
|
-
})(RenderFormat || {});
|
|
441
431
|
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
442
432
|
RequestedFields2["DOCUMENT_CONTENT"] = "DOCUMENT_CONTENT";
|
|
443
433
|
return RequestedFields2;
|
|
@@ -448,6 +438,7 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
|
448
438
|
return SortOrder2;
|
|
449
439
|
})(SortOrder || {});
|
|
450
440
|
var ContentDisposition = /* @__PURE__ */ ((ContentDisposition2) => {
|
|
441
|
+
ContentDisposition2["UNKNOWN_CONTENT_DISPOSITION"] = "UNKNOWN_CONTENT_DISPOSITION";
|
|
451
442
|
ContentDisposition2["ATTACHMENT"] = "ATTACHMENT";
|
|
452
443
|
ContentDisposition2["INLINE"] = "INLINE";
|
|
453
444
|
return ContentDisposition2;
|
|
@@ -460,52 +451,26 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
460
451
|
WebhookIdentityType2["APP"] = "APP";
|
|
461
452
|
return WebhookIdentityType2;
|
|
462
453
|
})(WebhookIdentityType || {});
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
throw transformedError;
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
async function redirectToDocument2(file) {
|
|
487
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
488
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({ file });
|
|
489
|
-
const reqOpts = redirectToDocument(payload);
|
|
490
|
-
sideEffects?.onSiteCall?.();
|
|
491
|
-
try {
|
|
492
|
-
const result = await httpClient.request(reqOpts);
|
|
493
|
-
sideEffects?.onSuccess?.(result);
|
|
494
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
495
|
-
} catch (err) {
|
|
496
|
-
const transformedError = sdkTransformError(
|
|
497
|
-
err,
|
|
498
|
-
{
|
|
499
|
-
spreadPathsToArguments: {},
|
|
500
|
-
explicitPathsToArguments: { file: "$[0]" },
|
|
501
|
-
singleArgumentUnchanged: false
|
|
502
|
-
},
|
|
503
|
-
["file"]
|
|
504
|
-
);
|
|
505
|
-
sideEffects?.onError?.(err);
|
|
506
|
-
throw transformedError;
|
|
507
|
-
}
|
|
508
|
-
}
|
|
454
|
+
var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
|
|
455
|
+
ResizeOption2["FIT"] = "FIT";
|
|
456
|
+
ResizeOption2["CROP"] = "CROP";
|
|
457
|
+
return ResizeOption2;
|
|
458
|
+
})(ResizeOption || {});
|
|
459
|
+
var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
|
|
460
|
+
PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
|
|
461
|
+
PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
|
|
462
|
+
return PaperSize2;
|
|
463
|
+
})(PaperSize || {});
|
|
464
|
+
var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
|
|
465
|
+
PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
|
|
466
|
+
PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
|
|
467
|
+
return PageOverflow2;
|
|
468
|
+
})(PageOverflow || {});
|
|
469
|
+
var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
|
|
470
|
+
RenderFormat2["PDF"] = "PDF";
|
|
471
|
+
RenderFormat2["HTML"] = "HTML";
|
|
472
|
+
return RenderFormat2;
|
|
473
|
+
})(RenderFormat || {});
|
|
509
474
|
async function createDocument2(options) {
|
|
510
475
|
const { httpClient, sideEffects } = arguments[1];
|
|
511
476
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -655,9 +620,7 @@ async function typedQueryDocument(query, options) {
|
|
|
655
620
|
}
|
|
656
621
|
}
|
|
657
622
|
var utils = {
|
|
658
|
-
query:
|
|
659
|
-
...createQueryUtils()
|
|
660
|
-
}
|
|
623
|
+
query: /* @__PURE__ */ createQueryUtils()
|
|
661
624
|
};
|
|
662
625
|
async function updateDocument2(_id, options) {
|
|
663
626
|
const { httpClient, sideEffects } = arguments[2];
|
|
@@ -789,6 +752,52 @@ async function downloadDocumentSource2(documentId, options) {
|
|
|
789
752
|
throw transformedError;
|
|
790
753
|
}
|
|
791
754
|
}
|
|
755
|
+
async function getDownloadPage2(file) {
|
|
756
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
757
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ file });
|
|
758
|
+
const reqOpts = getDownloadPage(payload);
|
|
759
|
+
sideEffects?.onSiteCall?.();
|
|
760
|
+
try {
|
|
761
|
+
const result = await httpClient.request(reqOpts);
|
|
762
|
+
sideEffects?.onSuccess?.(result);
|
|
763
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
764
|
+
} catch (err) {
|
|
765
|
+
const transformedError = sdkTransformError(
|
|
766
|
+
err,
|
|
767
|
+
{
|
|
768
|
+
spreadPathsToArguments: {},
|
|
769
|
+
explicitPathsToArguments: { file: "$[0]" },
|
|
770
|
+
singleArgumentUnchanged: false
|
|
771
|
+
},
|
|
772
|
+
["file"]
|
|
773
|
+
);
|
|
774
|
+
sideEffects?.onError?.(err);
|
|
775
|
+
throw transformedError;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
async function redirectToDocument2(file) {
|
|
779
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
780
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ file });
|
|
781
|
+
const reqOpts = redirectToDocument(payload);
|
|
782
|
+
sideEffects?.onSiteCall?.();
|
|
783
|
+
try {
|
|
784
|
+
const result = await httpClient.request(reqOpts);
|
|
785
|
+
sideEffects?.onSuccess?.(result);
|
|
786
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
787
|
+
} catch (err) {
|
|
788
|
+
const transformedError = sdkTransformError(
|
|
789
|
+
err,
|
|
790
|
+
{
|
|
791
|
+
spreadPathsToArguments: {},
|
|
792
|
+
explicitPathsToArguments: { file: "$[0]" },
|
|
793
|
+
singleArgumentUnchanged: false
|
|
794
|
+
},
|
|
795
|
+
["file"]
|
|
796
|
+
);
|
|
797
|
+
sideEffects?.onError?.(err);
|
|
798
|
+
throw transformedError;
|
|
799
|
+
}
|
|
800
|
+
}
|
|
792
801
|
export {
|
|
793
802
|
ContentDisposition,
|
|
794
803
|
Format,
|