@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.
- package/build/cjs/index.d.ts +17 -17
- 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 +17 -17
- 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 +17 -17
- 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 +17 -17
- package/build/internal/es/index.typings.d.mts +552 -552
- package/build/internal/es/meta.d.mts +567 -567
- package/package.json +2 -2
|
@@ -59,7 +59,7 @@ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
|
59
59
|
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
60
60
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
61
61
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
62
|
-
function
|
|
62
|
+
function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
|
|
63
63
|
const domainToMappings = {
|
|
64
64
|
"api._base_domain_": [
|
|
65
65
|
{
|
|
@@ -102,7 +102,7 @@ function resolveWixPapyrusV1DocumentServiceUrl(opts) {
|
|
|
102
102
|
};
|
|
103
103
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function resolveWixPapyrusV1DocumentServiceUrl(opts) {
|
|
106
106
|
const domainToMappings = {
|
|
107
107
|
"api._base_domain_": [
|
|
108
108
|
{
|
|
@@ -146,60 +146,6 @@ function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
|
|
|
146
146
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
147
147
|
}
|
|
148
148
|
var PACKAGE_NAME = "@wix/auto_sdk_papyrus_documents";
|
|
149
|
-
function getDownloadPage(payload) {
|
|
150
|
-
function __getDownloadPage({ host }) {
|
|
151
|
-
const metadata = {
|
|
152
|
-
entityFqdn: "wix.papyrus.v1.document",
|
|
153
|
-
method: "GET",
|
|
154
|
-
methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
|
|
155
|
-
packageName: PACKAGE_NAME,
|
|
156
|
-
migrationOptions: {
|
|
157
|
-
optInTransformResponse: true
|
|
158
|
-
},
|
|
159
|
-
url: resolveWixPapyrusV1DownloadPageControllerUrl({
|
|
160
|
-
protoPath: "/download",
|
|
161
|
-
data: payload,
|
|
162
|
-
host
|
|
163
|
-
}),
|
|
164
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
165
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
166
|
-
{
|
|
167
|
-
transformFn: import_bytes.transformRESTBytesToSDKBytes,
|
|
168
|
-
paths: [{ path: "body" }]
|
|
169
|
-
}
|
|
170
|
-
])
|
|
171
|
-
};
|
|
172
|
-
return metadata;
|
|
173
|
-
}
|
|
174
|
-
return __getDownloadPage;
|
|
175
|
-
}
|
|
176
|
-
function redirectToDocument(payload) {
|
|
177
|
-
function __redirectToDocument({ host }) {
|
|
178
|
-
const metadata = {
|
|
179
|
-
entityFqdn: "wix.papyrus.v1.document",
|
|
180
|
-
method: "GET",
|
|
181
|
-
methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
|
|
182
|
-
packageName: PACKAGE_NAME,
|
|
183
|
-
migrationOptions: {
|
|
184
|
-
optInTransformResponse: true
|
|
185
|
-
},
|
|
186
|
-
url: resolveWixPapyrusV1DownloadPageControllerUrl({
|
|
187
|
-
protoPath: "/view",
|
|
188
|
-
data: payload,
|
|
189
|
-
host
|
|
190
|
-
}),
|
|
191
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
192
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
193
|
-
{
|
|
194
|
-
transformFn: import_bytes.transformRESTBytesToSDKBytes,
|
|
195
|
-
paths: [{ path: "body" }]
|
|
196
|
-
}
|
|
197
|
-
])
|
|
198
|
-
};
|
|
199
|
-
return metadata;
|
|
200
|
-
}
|
|
201
|
-
return __redirectToDocument;
|
|
202
|
-
}
|
|
203
149
|
function createDocument(payload) {
|
|
204
150
|
function __createDocument({ host }) {
|
|
205
151
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -449,6 +395,60 @@ function downloadDocumentSource(payload) {
|
|
|
449
395
|
}
|
|
450
396
|
return __downloadDocumentSource;
|
|
451
397
|
}
|
|
398
|
+
function getDownloadPage(payload) {
|
|
399
|
+
function __getDownloadPage({ host }) {
|
|
400
|
+
const metadata = {
|
|
401
|
+
entityFqdn: "wix.papyrus.v1.document",
|
|
402
|
+
method: "GET",
|
|
403
|
+
methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
|
|
404
|
+
packageName: PACKAGE_NAME,
|
|
405
|
+
migrationOptions: {
|
|
406
|
+
optInTransformResponse: true
|
|
407
|
+
},
|
|
408
|
+
url: resolveWixPapyrusV1DownloadPageControllerUrl({
|
|
409
|
+
protoPath: "/download",
|
|
410
|
+
data: payload,
|
|
411
|
+
host
|
|
412
|
+
}),
|
|
413
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
414
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
415
|
+
{
|
|
416
|
+
transformFn: import_bytes.transformRESTBytesToSDKBytes,
|
|
417
|
+
paths: [{ path: "body" }]
|
|
418
|
+
}
|
|
419
|
+
])
|
|
420
|
+
};
|
|
421
|
+
return metadata;
|
|
422
|
+
}
|
|
423
|
+
return __getDownloadPage;
|
|
424
|
+
}
|
|
425
|
+
function redirectToDocument(payload) {
|
|
426
|
+
function __redirectToDocument({ host }) {
|
|
427
|
+
const metadata = {
|
|
428
|
+
entityFqdn: "wix.papyrus.v1.document",
|
|
429
|
+
method: "GET",
|
|
430
|
+
methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
|
|
431
|
+
packageName: PACKAGE_NAME,
|
|
432
|
+
migrationOptions: {
|
|
433
|
+
optInTransformResponse: true
|
|
434
|
+
},
|
|
435
|
+
url: resolveWixPapyrusV1DownloadPageControllerUrl({
|
|
436
|
+
protoPath: "/view",
|
|
437
|
+
data: payload,
|
|
438
|
+
host
|
|
439
|
+
}),
|
|
440
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
441
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
442
|
+
{
|
|
443
|
+
transformFn: import_bytes.transformRESTBytesToSDKBytes,
|
|
444
|
+
paths: [{ path: "body" }]
|
|
445
|
+
}
|
|
446
|
+
])
|
|
447
|
+
};
|
|
448
|
+
return metadata;
|
|
449
|
+
}
|
|
450
|
+
return __redirectToDocument;
|
|
451
|
+
}
|
|
452
452
|
|
|
453
453
|
// src/papyrus-v1-document-documents.universal.ts
|
|
454
454
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
@@ -473,26 +473,6 @@ var WixMpClientVersion = /* @__PURE__ */ ((WixMpClientVersion2) => {
|
|
|
473
473
|
WixMpClientVersion2["MP_V2"] = "MP_V2";
|
|
474
474
|
return WixMpClientVersion2;
|
|
475
475
|
})(WixMpClientVersion || {});
|
|
476
|
-
var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
|
|
477
|
-
ResizeOption2["FIT"] = "FIT";
|
|
478
|
-
ResizeOption2["CROP"] = "CROP";
|
|
479
|
-
return ResizeOption2;
|
|
480
|
-
})(ResizeOption || {});
|
|
481
|
-
var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
|
|
482
|
-
PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
|
|
483
|
-
PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
|
|
484
|
-
return PaperSize2;
|
|
485
|
-
})(PaperSize || {});
|
|
486
|
-
var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
|
|
487
|
-
PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
|
|
488
|
-
PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
|
|
489
|
-
return PageOverflow2;
|
|
490
|
-
})(PageOverflow || {});
|
|
491
|
-
var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
|
|
492
|
-
RenderFormat2["PDF"] = "PDF";
|
|
493
|
-
RenderFormat2["HTML"] = "HTML";
|
|
494
|
-
return RenderFormat2;
|
|
495
|
-
})(RenderFormat || {});
|
|
496
476
|
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
497
477
|
RequestedFields2["DOCUMENT_CONTENT"] = "DOCUMENT_CONTENT";
|
|
498
478
|
return RequestedFields2;
|
|
@@ -516,52 +496,26 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
516
496
|
WebhookIdentityType2["APP"] = "APP";
|
|
517
497
|
return WebhookIdentityType2;
|
|
518
498
|
})(WebhookIdentityType || {});
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
throw transformedError;
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
async function redirectToDocument2(file) {
|
|
543
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
544
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ file });
|
|
545
|
-
const reqOpts = redirectToDocument(payload);
|
|
546
|
-
sideEffects?.onSiteCall?.();
|
|
547
|
-
try {
|
|
548
|
-
const result = await httpClient.request(reqOpts);
|
|
549
|
-
sideEffects?.onSuccess?.(result);
|
|
550
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
551
|
-
} catch (err) {
|
|
552
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
553
|
-
err,
|
|
554
|
-
{
|
|
555
|
-
spreadPathsToArguments: {},
|
|
556
|
-
explicitPathsToArguments: { file: "$[0]" },
|
|
557
|
-
singleArgumentUnchanged: false
|
|
558
|
-
},
|
|
559
|
-
["file"]
|
|
560
|
-
);
|
|
561
|
-
sideEffects?.onError?.(err);
|
|
562
|
-
throw transformedError;
|
|
563
|
-
}
|
|
564
|
-
}
|
|
499
|
+
var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
|
|
500
|
+
ResizeOption2["FIT"] = "FIT";
|
|
501
|
+
ResizeOption2["CROP"] = "CROP";
|
|
502
|
+
return ResizeOption2;
|
|
503
|
+
})(ResizeOption || {});
|
|
504
|
+
var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
|
|
505
|
+
PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
|
|
506
|
+
PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
|
|
507
|
+
return PaperSize2;
|
|
508
|
+
})(PaperSize || {});
|
|
509
|
+
var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
|
|
510
|
+
PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
|
|
511
|
+
PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
|
|
512
|
+
return PageOverflow2;
|
|
513
|
+
})(PageOverflow || {});
|
|
514
|
+
var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
|
|
515
|
+
RenderFormat2["PDF"] = "PDF";
|
|
516
|
+
RenderFormat2["HTML"] = "HTML";
|
|
517
|
+
return RenderFormat2;
|
|
518
|
+
})(RenderFormat || {});
|
|
565
519
|
async function createDocument2(options) {
|
|
566
520
|
const { httpClient, sideEffects } = arguments[1];
|
|
567
521
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -843,6 +797,52 @@ async function downloadDocumentSource2(documentId, options) {
|
|
|
843
797
|
throw transformedError;
|
|
844
798
|
}
|
|
845
799
|
}
|
|
800
|
+
async function getDownloadPage2(file) {
|
|
801
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
802
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ file });
|
|
803
|
+
const reqOpts = getDownloadPage(payload);
|
|
804
|
+
sideEffects?.onSiteCall?.();
|
|
805
|
+
try {
|
|
806
|
+
const result = await httpClient.request(reqOpts);
|
|
807
|
+
sideEffects?.onSuccess?.(result);
|
|
808
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
809
|
+
} catch (err) {
|
|
810
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
811
|
+
err,
|
|
812
|
+
{
|
|
813
|
+
spreadPathsToArguments: {},
|
|
814
|
+
explicitPathsToArguments: { file: "$[0]" },
|
|
815
|
+
singleArgumentUnchanged: false
|
|
816
|
+
},
|
|
817
|
+
["file"]
|
|
818
|
+
);
|
|
819
|
+
sideEffects?.onError?.(err);
|
|
820
|
+
throw transformedError;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
async function redirectToDocument2(file) {
|
|
824
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
825
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ file });
|
|
826
|
+
const reqOpts = redirectToDocument(payload);
|
|
827
|
+
sideEffects?.onSiteCall?.();
|
|
828
|
+
try {
|
|
829
|
+
const result = await httpClient.request(reqOpts);
|
|
830
|
+
sideEffects?.onSuccess?.(result);
|
|
831
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
832
|
+
} catch (err) {
|
|
833
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
834
|
+
err,
|
|
835
|
+
{
|
|
836
|
+
spreadPathsToArguments: {},
|
|
837
|
+
explicitPathsToArguments: { file: "$[0]" },
|
|
838
|
+
singleArgumentUnchanged: false
|
|
839
|
+
},
|
|
840
|
+
["file"]
|
|
841
|
+
);
|
|
842
|
+
sideEffects?.onError?.(err);
|
|
843
|
+
throw transformedError;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
846
|
// Annotate the CommonJS export names for ESM import in node:
|
|
847
847
|
0 && (module.exports = {
|
|
848
848
|
ContentDisposition,
|