@wix/auto_sdk_papyrus_documents 1.0.7 → 1.0.9
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 +19 -19
- package/build/cjs/index.js +138 -138
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +524 -524
- package/build/cjs/index.typings.js +122 -122
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +532 -532
- package/build/cjs/meta.js +112 -112
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +19 -19
- package/build/es/index.mjs +138 -138
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +524 -524
- package/build/es/index.typings.mjs +122 -122
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +532 -532
- package/build/es/meta.mjs +112 -112
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +19 -19
- package/build/internal/cjs/index.typings.d.ts +552 -552
- package/build/internal/cjs/meta.d.ts +567 -567
- package/build/internal/es/index.d.mts +19 -19
- package/build/internal/es/index.typings.d.mts +552 -552
- package/build/internal/es/meta.d.mts +567 -567
- package/package.json +2 -2
|
@@ -14,7 +14,7 @@ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transform
|
|
|
14
14
|
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
15
15
|
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
16
16
|
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
17
|
-
function
|
|
17
|
+
function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
|
|
18
18
|
const domainToMappings = {
|
|
19
19
|
"api._base_domain_": [
|
|
20
20
|
{
|
|
@@ -57,7 +57,7 @@ function resolveWixPapyrusV1DocumentServiceUrl(opts) {
|
|
|
57
57
|
};
|
|
58
58
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function resolveWixPapyrusV1DocumentServiceUrl(opts) {
|
|
61
61
|
const domainToMappings = {
|
|
62
62
|
"api._base_domain_": [
|
|
63
63
|
{
|
|
@@ -101,60 +101,6 @@ function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
|
|
|
101
101
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
102
102
|
}
|
|
103
103
|
var PACKAGE_NAME = "@wix/auto_sdk_papyrus_documents";
|
|
104
|
-
function getDownloadPage(payload) {
|
|
105
|
-
function __getDownloadPage({ host }) {
|
|
106
|
-
const metadata = {
|
|
107
|
-
entityFqdn: "wix.papyrus.v1.document",
|
|
108
|
-
method: "GET",
|
|
109
|
-
methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
|
|
110
|
-
packageName: PACKAGE_NAME,
|
|
111
|
-
migrationOptions: {
|
|
112
|
-
optInTransformResponse: true
|
|
113
|
-
},
|
|
114
|
-
url: resolveWixPapyrusV1DownloadPageControllerUrl({
|
|
115
|
-
protoPath: "/download",
|
|
116
|
-
data: payload,
|
|
117
|
-
host
|
|
118
|
-
}),
|
|
119
|
-
params: toURLSearchParams(payload),
|
|
120
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
121
|
-
{
|
|
122
|
-
transformFn: transformRESTBytesToSDKBytes,
|
|
123
|
-
paths: [{ path: "body" }]
|
|
124
|
-
}
|
|
125
|
-
])
|
|
126
|
-
};
|
|
127
|
-
return metadata;
|
|
128
|
-
}
|
|
129
|
-
return __getDownloadPage;
|
|
130
|
-
}
|
|
131
|
-
function redirectToDocument(payload) {
|
|
132
|
-
function __redirectToDocument({ host }) {
|
|
133
|
-
const metadata = {
|
|
134
|
-
entityFqdn: "wix.papyrus.v1.document",
|
|
135
|
-
method: "GET",
|
|
136
|
-
methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
|
|
137
|
-
packageName: PACKAGE_NAME,
|
|
138
|
-
migrationOptions: {
|
|
139
|
-
optInTransformResponse: true
|
|
140
|
-
},
|
|
141
|
-
url: resolveWixPapyrusV1DownloadPageControllerUrl({
|
|
142
|
-
protoPath: "/view",
|
|
143
|
-
data: payload,
|
|
144
|
-
host
|
|
145
|
-
}),
|
|
146
|
-
params: toURLSearchParams(payload),
|
|
147
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
148
|
-
{
|
|
149
|
-
transformFn: transformRESTBytesToSDKBytes,
|
|
150
|
-
paths: [{ path: "body" }]
|
|
151
|
-
}
|
|
152
|
-
])
|
|
153
|
-
};
|
|
154
|
-
return metadata;
|
|
155
|
-
}
|
|
156
|
-
return __redirectToDocument;
|
|
157
|
-
}
|
|
158
104
|
function createDocument(payload) {
|
|
159
105
|
function __createDocument({ host }) {
|
|
160
106
|
const serializedData = transformPaths(payload, [
|
|
@@ -404,6 +350,60 @@ function downloadDocumentSource(payload) {
|
|
|
404
350
|
}
|
|
405
351
|
return __downloadDocumentSource;
|
|
406
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
|
+
}
|
|
407
407
|
|
|
408
408
|
// src/papyrus-v1-document-documents.universal.ts
|
|
409
409
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
@@ -428,26 +428,6 @@ var WixMpClientVersion = /* @__PURE__ */ ((WixMpClientVersion2) => {
|
|
|
428
428
|
WixMpClientVersion2["MP_V2"] = "MP_V2";
|
|
429
429
|
return WixMpClientVersion2;
|
|
430
430
|
})(WixMpClientVersion || {});
|
|
431
|
-
var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
|
|
432
|
-
ResizeOption2["FIT"] = "FIT";
|
|
433
|
-
ResizeOption2["CROP"] = "CROP";
|
|
434
|
-
return ResizeOption2;
|
|
435
|
-
})(ResizeOption || {});
|
|
436
|
-
var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
|
|
437
|
-
PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
|
|
438
|
-
PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
|
|
439
|
-
return PaperSize2;
|
|
440
|
-
})(PaperSize || {});
|
|
441
|
-
var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
|
|
442
|
-
PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
|
|
443
|
-
PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
|
|
444
|
-
return PageOverflow2;
|
|
445
|
-
})(PageOverflow || {});
|
|
446
|
-
var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
|
|
447
|
-
RenderFormat2["PDF"] = "PDF";
|
|
448
|
-
RenderFormat2["HTML"] = "HTML";
|
|
449
|
-
return RenderFormat2;
|
|
450
|
-
})(RenderFormat || {});
|
|
451
431
|
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
452
432
|
RequestedFields2["DOCUMENT_CONTENT"] = "DOCUMENT_CONTENT";
|
|
453
433
|
return RequestedFields2;
|
|
@@ -471,52 +451,26 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
471
451
|
WebhookIdentityType2["APP"] = "APP";
|
|
472
452
|
return WebhookIdentityType2;
|
|
473
453
|
})(WebhookIdentityType || {});
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
throw transformedError;
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
async function redirectToDocument2(file) {
|
|
498
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
499
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({ file });
|
|
500
|
-
const reqOpts = redirectToDocument(payload);
|
|
501
|
-
sideEffects?.onSiteCall?.();
|
|
502
|
-
try {
|
|
503
|
-
const result = await httpClient.request(reqOpts);
|
|
504
|
-
sideEffects?.onSuccess?.(result);
|
|
505
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
506
|
-
} catch (err) {
|
|
507
|
-
const transformedError = sdkTransformError(
|
|
508
|
-
err,
|
|
509
|
-
{
|
|
510
|
-
spreadPathsToArguments: {},
|
|
511
|
-
explicitPathsToArguments: { file: "$[0]" },
|
|
512
|
-
singleArgumentUnchanged: false
|
|
513
|
-
},
|
|
514
|
-
["file"]
|
|
515
|
-
);
|
|
516
|
-
sideEffects?.onError?.(err);
|
|
517
|
-
throw transformedError;
|
|
518
|
-
}
|
|
519
|
-
}
|
|
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 || {});
|
|
520
474
|
async function createDocument2(options) {
|
|
521
475
|
const { httpClient, sideEffects } = arguments[1];
|
|
522
476
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -798,6 +752,52 @@ async function downloadDocumentSource2(documentId, options) {
|
|
|
798
752
|
throw transformedError;
|
|
799
753
|
}
|
|
800
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
|
+
}
|
|
801
801
|
export {
|
|
802
802
|
ContentDisposition,
|
|
803
803
|
Format,
|