@wix/auto_sdk_papyrus_documents 1.0.3 → 1.0.4
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 +4 -11
- package/build/cjs/schemas.d.ts +0 -415
- package/build/cjs/schemas.js +0 -704
- package/build/cjs/schemas.js.map +0 -1
- package/build/es/schemas.d.mts +0 -415
- package/build/es/schemas.mjs +0 -648
- package/build/es/schemas.mjs.map +0 -1
- package/build/internal/cjs/schemas.d.ts +0 -415
- package/build/internal/es/schemas.d.mts +0 -415
- package/schemas/package.json +0 -3
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
2
|
+
import { CreateDocumentOptions, GetDocumentOptions, DeleteDocumentResponse, UpdateDocumentOptions, UpdateDocumentResponse, DownloadDocumentOptions, DownloadDocumentResponse, DownloadDocumentApplicationErrors, GetDownloadUrlOptions, GetDownloadUrlResponse, DownloadDocumentSourceOptions, DownloadDocumentSourceResponse, DownloadDocumentSourceApplicationErrors, RawHttpResponse, DocumentCreatedEnvelope, DocumentDeletedEnvelope, DocumentRenderDelayedEnvelope, DocumentRenderFailedEnvelope, DocumentRenderedEnvelope, DocumentUpdatedEnvelope, DocumentQuery, QueryDocumentOptions, typedQueryDocument, DocumentsQueryBuilder } from './index.typings.js';
|
|
3
3
|
export { AccountInfo, AccountInfoMetadata, ActionEvent, AddressLocation, BackgroundSetting, BaseEventMetadata, CommonQueryWithEntityContext, ContentDisposition, ContentDispositionWithLiterals, CreateDocumentRequest, CreateDocumentResponse, CursorPaging, Cursors, DebugOptions, DeleteDocumentByExternalIdRequest, DeleteDocumentByExternalIdResponse, DeleteDocumentRequest, Document, DocumentContent, DocumentFile, DocumentQuerySpec, DocumentRenderDelayed, DocumentRenderFailed, DocumentRendered, DocumentsQueryResult, DomainEvent, DomainEventBodyOneOf, DownloadDocumentRequest, DownloadDocumentSourceRequest, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, FocalPoint, Format, FormatWithLiterals, GetCachedHtmlRequest, GetDocumentRequest, GetDocumentResponse, GetDownloadPageRequest, GetDownloadUrlOptionsDocumentOneOf, GetDownloadUrlRequest, GetDownloadUrlRequestDocumentOneOf, GetRendererInfoRequest, GetRendererInfoResponse, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, ImageSetting, MessageEnvelope, PageOverflow, PageOverflowWithLiterals, PageSettings, Paging, PagingMetadataV2, PaperSize, PaperSizeWithLiterals, QueryDocumentRequest, QueryDocumentResponse, QueryV2, QueryV2PagingMethodOneOf, RedirectToDocumentRequest, RenderDelayedEventConfig, RenderDocumentByIdRequest, RenderDocumentRequest, RenderFormat, RenderFormatWithLiterals, RenderStatus, RenderStatusWithLiterals, RequestedFields, RequestedFieldsWithLiterals, ResizeOption, ResizeOptionWithLiterals, RestoreInfo, SelectSetting, SettingsGroup, SortOrder, SortOrderWithLiterals, Sorting, TemplateSettings, TemplateSettingsOverride, TextContent, TextSetting, UpdateDocumentRequest, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WixMpClientVersion, WixMpClientVersionWithLiterals, utils } from './index.typings.js';
|
|
4
4
|
|
|
5
|
-
declare function getDownloadPage$1(httpClient: HttpClient): GetDownloadPageSignature;
|
|
6
|
-
interface GetDownloadPageSignature {
|
|
7
|
-
/**
|
|
8
|
-
* Get Document.
|
|
9
|
-
*/
|
|
10
|
-
(file: string | null): Promise<RawHttpResponse>;
|
|
11
|
-
}
|
|
12
|
-
declare function redirectToDocument$1(httpClient: HttpClient): RedirectToDocumentSignature;
|
|
13
|
-
interface RedirectToDocumentSignature {
|
|
14
|
-
/**
|
|
15
|
-
* Get Document.
|
|
16
|
-
*/
|
|
17
|
-
(file: string | null): Promise<RawHttpResponse>;
|
|
18
|
-
}
|
|
19
5
|
declare function createDocument$1(httpClient: HttpClient): CreateDocumentSignature;
|
|
20
6
|
interface CreateDocumentSignature {
|
|
21
7
|
/**
|
|
@@ -76,6 +62,20 @@ interface DownloadDocumentSourceSignature {
|
|
|
76
62
|
__applicationErrorsType?: DownloadDocumentSourceApplicationErrors;
|
|
77
63
|
}>;
|
|
78
64
|
}
|
|
65
|
+
declare function getDownloadPage$1(httpClient: HttpClient): GetDownloadPageSignature;
|
|
66
|
+
interface GetDownloadPageSignature {
|
|
67
|
+
/**
|
|
68
|
+
* Get Document.
|
|
69
|
+
*/
|
|
70
|
+
(file: string | null): Promise<RawHttpResponse>;
|
|
71
|
+
}
|
|
72
|
+
declare function redirectToDocument$1(httpClient: HttpClient): RedirectToDocumentSignature;
|
|
73
|
+
interface RedirectToDocumentSignature {
|
|
74
|
+
/**
|
|
75
|
+
* Get Document.
|
|
76
|
+
*/
|
|
77
|
+
(file: string | null): Promise<RawHttpResponse>;
|
|
78
|
+
}
|
|
79
79
|
declare const onDocumentCreated$1: EventDefinition<DocumentCreatedEnvelope, "wix.papyrus.v1.document_created">;
|
|
80
80
|
declare const onDocumentDeleted$1: EventDefinition<DocumentDeletedEnvelope, "wix.papyrus.v1.document_deleted">;
|
|
81
81
|
declare const onDocumentRenderDelayed$1: EventDefinition<DocumentRenderDelayedEnvelope, "wix.papyrus.v1.document_document_render_delayed">;
|
|
@@ -87,8 +87,6 @@ declare function customQueryDocument(httpClient: HttpClient): {
|
|
|
87
87
|
(query: DocumentQuery, options?: QueryDocumentOptions): ReturnType<typeof typedQueryDocument>;
|
|
88
88
|
(options?: QueryDocumentOptions): DocumentsQueryBuilder;
|
|
89
89
|
};
|
|
90
|
-
declare const getDownloadPage: MaybeContext<BuildRESTFunction<typeof getDownloadPage$1> & typeof getDownloadPage$1>;
|
|
91
|
-
declare const redirectToDocument: MaybeContext<BuildRESTFunction<typeof redirectToDocument$1> & typeof redirectToDocument$1>;
|
|
92
90
|
declare const createDocument: MaybeContext<BuildRESTFunction<typeof createDocument$1> & typeof createDocument$1>;
|
|
93
91
|
declare const getDocument: MaybeContext<BuildRESTFunction<typeof getDocument$1> & typeof getDocument$1>;
|
|
94
92
|
declare const deleteDocument: MaybeContext<BuildRESTFunction<typeof deleteDocument$1> & typeof deleteDocument$1>;
|
|
@@ -96,6 +94,8 @@ declare const updateDocument: MaybeContext<BuildRESTFunction<typeof updateDocume
|
|
|
96
94
|
declare const downloadDocument: MaybeContext<BuildRESTFunction<typeof downloadDocument$1> & typeof downloadDocument$1>;
|
|
97
95
|
declare const getDownloadUrl: MaybeContext<BuildRESTFunction<typeof getDownloadUrl$1> & typeof getDownloadUrl$1>;
|
|
98
96
|
declare const downloadDocumentSource: MaybeContext<BuildRESTFunction<typeof downloadDocumentSource$1> & typeof downloadDocumentSource$1>;
|
|
97
|
+
declare const getDownloadPage: MaybeContext<BuildRESTFunction<typeof getDownloadPage$1> & typeof getDownloadPage$1>;
|
|
98
|
+
declare const redirectToDocument: MaybeContext<BuildRESTFunction<typeof redirectToDocument$1> & typeof redirectToDocument$1>;
|
|
99
99
|
declare const queryDocument: MaybeContext<BuildRESTFunction<typeof customQueryDocument> & typeof customQueryDocument>;
|
|
100
100
|
/** */
|
|
101
101
|
declare const onDocumentCreated: BuildEventDefinition<typeof onDocumentCreated$1> & typeof onDocumentCreated$1;
|
package/build/cjs/index.js
CHANGED
|
@@ -70,7 +70,7 @@ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
|
70
70
|
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
71
71
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
72
72
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
73
|
-
function
|
|
73
|
+
function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
|
|
74
74
|
const domainToMappings = {
|
|
75
75
|
"api._base_domain_": [
|
|
76
76
|
{
|
|
@@ -113,7 +113,7 @@ function resolveWixPapyrusV1DocumentServiceUrl(opts) {
|
|
|
113
113
|
};
|
|
114
114
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function resolveWixPapyrusV1DocumentServiceUrl(opts) {
|
|
117
117
|
const domainToMappings = {
|
|
118
118
|
"api._base_domain_": [
|
|
119
119
|
{
|
|
@@ -157,60 +157,6 @@ function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
|
|
|
157
157
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
158
158
|
}
|
|
159
159
|
var PACKAGE_NAME = "@wix/auto_sdk_papyrus_documents";
|
|
160
|
-
function getDownloadPage(payload) {
|
|
161
|
-
function __getDownloadPage({ host }) {
|
|
162
|
-
const metadata = {
|
|
163
|
-
entityFqdn: "wix.papyrus.v1.document",
|
|
164
|
-
method: "GET",
|
|
165
|
-
methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
|
|
166
|
-
packageName: PACKAGE_NAME,
|
|
167
|
-
migrationOptions: {
|
|
168
|
-
optInTransformResponse: true
|
|
169
|
-
},
|
|
170
|
-
url: resolveWixPapyrusV1DownloadPageControllerUrl({
|
|
171
|
-
protoPath: "/download",
|
|
172
|
-
data: payload,
|
|
173
|
-
host
|
|
174
|
-
}),
|
|
175
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
176
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
177
|
-
{
|
|
178
|
-
transformFn: import_bytes.transformRESTBytesToSDKBytes,
|
|
179
|
-
paths: [{ path: "body" }]
|
|
180
|
-
}
|
|
181
|
-
])
|
|
182
|
-
};
|
|
183
|
-
return metadata;
|
|
184
|
-
}
|
|
185
|
-
return __getDownloadPage;
|
|
186
|
-
}
|
|
187
|
-
function redirectToDocument(payload) {
|
|
188
|
-
function __redirectToDocument({ host }) {
|
|
189
|
-
const metadata = {
|
|
190
|
-
entityFqdn: "wix.papyrus.v1.document",
|
|
191
|
-
method: "GET",
|
|
192
|
-
methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
|
|
193
|
-
packageName: PACKAGE_NAME,
|
|
194
|
-
migrationOptions: {
|
|
195
|
-
optInTransformResponse: true
|
|
196
|
-
},
|
|
197
|
-
url: resolveWixPapyrusV1DownloadPageControllerUrl({
|
|
198
|
-
protoPath: "/view",
|
|
199
|
-
data: payload,
|
|
200
|
-
host
|
|
201
|
-
}),
|
|
202
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
203
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
204
|
-
{
|
|
205
|
-
transformFn: import_bytes.transformRESTBytesToSDKBytes,
|
|
206
|
-
paths: [{ path: "body" }]
|
|
207
|
-
}
|
|
208
|
-
])
|
|
209
|
-
};
|
|
210
|
-
return metadata;
|
|
211
|
-
}
|
|
212
|
-
return __redirectToDocument;
|
|
213
|
-
}
|
|
214
160
|
function createDocument(payload) {
|
|
215
161
|
function __createDocument({ host }) {
|
|
216
162
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -460,6 +406,60 @@ function downloadDocumentSource(payload) {
|
|
|
460
406
|
}
|
|
461
407
|
return __downloadDocumentSource;
|
|
462
408
|
}
|
|
409
|
+
function getDownloadPage(payload) {
|
|
410
|
+
function __getDownloadPage({ host }) {
|
|
411
|
+
const metadata = {
|
|
412
|
+
entityFqdn: "wix.papyrus.v1.document",
|
|
413
|
+
method: "GET",
|
|
414
|
+
methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
|
|
415
|
+
packageName: PACKAGE_NAME,
|
|
416
|
+
migrationOptions: {
|
|
417
|
+
optInTransformResponse: true
|
|
418
|
+
},
|
|
419
|
+
url: resolveWixPapyrusV1DownloadPageControllerUrl({
|
|
420
|
+
protoPath: "/download",
|
|
421
|
+
data: payload,
|
|
422
|
+
host
|
|
423
|
+
}),
|
|
424
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
425
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
426
|
+
{
|
|
427
|
+
transformFn: import_bytes.transformRESTBytesToSDKBytes,
|
|
428
|
+
paths: [{ path: "body" }]
|
|
429
|
+
}
|
|
430
|
+
])
|
|
431
|
+
};
|
|
432
|
+
return metadata;
|
|
433
|
+
}
|
|
434
|
+
return __getDownloadPage;
|
|
435
|
+
}
|
|
436
|
+
function redirectToDocument(payload) {
|
|
437
|
+
function __redirectToDocument({ host }) {
|
|
438
|
+
const metadata = {
|
|
439
|
+
entityFqdn: "wix.papyrus.v1.document",
|
|
440
|
+
method: "GET",
|
|
441
|
+
methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
|
|
442
|
+
packageName: PACKAGE_NAME,
|
|
443
|
+
migrationOptions: {
|
|
444
|
+
optInTransformResponse: true
|
|
445
|
+
},
|
|
446
|
+
url: resolveWixPapyrusV1DownloadPageControllerUrl({
|
|
447
|
+
protoPath: "/view",
|
|
448
|
+
data: payload,
|
|
449
|
+
host
|
|
450
|
+
}),
|
|
451
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
452
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
453
|
+
{
|
|
454
|
+
transformFn: import_bytes.transformRESTBytesToSDKBytes,
|
|
455
|
+
paths: [{ path: "body" }]
|
|
456
|
+
}
|
|
457
|
+
])
|
|
458
|
+
};
|
|
459
|
+
return metadata;
|
|
460
|
+
}
|
|
461
|
+
return __redirectToDocument;
|
|
462
|
+
}
|
|
463
463
|
|
|
464
464
|
// src/papyrus-v1-document-documents.universal.ts
|
|
465
465
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
@@ -484,26 +484,6 @@ var WixMpClientVersion = /* @__PURE__ */ ((WixMpClientVersion2) => {
|
|
|
484
484
|
WixMpClientVersion2["MP_V2"] = "MP_V2";
|
|
485
485
|
return WixMpClientVersion2;
|
|
486
486
|
})(WixMpClientVersion || {});
|
|
487
|
-
var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
|
|
488
|
-
ResizeOption2["FIT"] = "FIT";
|
|
489
|
-
ResizeOption2["CROP"] = "CROP";
|
|
490
|
-
return ResizeOption2;
|
|
491
|
-
})(ResizeOption || {});
|
|
492
|
-
var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
|
|
493
|
-
PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
|
|
494
|
-
PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
|
|
495
|
-
return PaperSize2;
|
|
496
|
-
})(PaperSize || {});
|
|
497
|
-
var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
|
|
498
|
-
PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
|
|
499
|
-
PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
|
|
500
|
-
return PageOverflow2;
|
|
501
|
-
})(PageOverflow || {});
|
|
502
|
-
var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
|
|
503
|
-
RenderFormat2["PDF"] = "PDF";
|
|
504
|
-
RenderFormat2["HTML"] = "HTML";
|
|
505
|
-
return RenderFormat2;
|
|
506
|
-
})(RenderFormat || {});
|
|
507
487
|
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
508
488
|
RequestedFields2["DOCUMENT_CONTENT"] = "DOCUMENT_CONTENT";
|
|
509
489
|
return RequestedFields2;
|
|
@@ -527,52 +507,26 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
527
507
|
WebhookIdentityType2["APP"] = "APP";
|
|
528
508
|
return WebhookIdentityType2;
|
|
529
509
|
})(WebhookIdentityType || {});
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
throw transformedError;
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
async function redirectToDocument2(file) {
|
|
554
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
555
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ file });
|
|
556
|
-
const reqOpts = redirectToDocument(payload);
|
|
557
|
-
sideEffects?.onSiteCall?.();
|
|
558
|
-
try {
|
|
559
|
-
const result = await httpClient.request(reqOpts);
|
|
560
|
-
sideEffects?.onSuccess?.(result);
|
|
561
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
562
|
-
} catch (err) {
|
|
563
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
564
|
-
err,
|
|
565
|
-
{
|
|
566
|
-
spreadPathsToArguments: {},
|
|
567
|
-
explicitPathsToArguments: { file: "$[0]" },
|
|
568
|
-
singleArgumentUnchanged: false
|
|
569
|
-
},
|
|
570
|
-
["file"]
|
|
571
|
-
);
|
|
572
|
-
sideEffects?.onError?.(err);
|
|
573
|
-
throw transformedError;
|
|
574
|
-
}
|
|
575
|
-
}
|
|
510
|
+
var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
|
|
511
|
+
ResizeOption2["FIT"] = "FIT";
|
|
512
|
+
ResizeOption2["CROP"] = "CROP";
|
|
513
|
+
return ResizeOption2;
|
|
514
|
+
})(ResizeOption || {});
|
|
515
|
+
var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
|
|
516
|
+
PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
|
|
517
|
+
PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
|
|
518
|
+
return PaperSize2;
|
|
519
|
+
})(PaperSize || {});
|
|
520
|
+
var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
|
|
521
|
+
PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
|
|
522
|
+
PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
|
|
523
|
+
return PageOverflow2;
|
|
524
|
+
})(PageOverflow || {});
|
|
525
|
+
var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
|
|
526
|
+
RenderFormat2["PDF"] = "PDF";
|
|
527
|
+
RenderFormat2["HTML"] = "HTML";
|
|
528
|
+
return RenderFormat2;
|
|
529
|
+
})(RenderFormat || {});
|
|
576
530
|
async function createDocument2(options) {
|
|
577
531
|
const { httpClient, sideEffects } = arguments[1];
|
|
578
532
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -854,22 +808,54 @@ async function downloadDocumentSource2(documentId, options) {
|
|
|
854
808
|
throw transformedError;
|
|
855
809
|
}
|
|
856
810
|
}
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
811
|
+
async function getDownloadPage2(file) {
|
|
812
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
813
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ file });
|
|
814
|
+
const reqOpts = getDownloadPage(payload);
|
|
815
|
+
sideEffects?.onSiteCall?.();
|
|
816
|
+
try {
|
|
817
|
+
const result = await httpClient.request(reqOpts);
|
|
818
|
+
sideEffects?.onSuccess?.(result);
|
|
819
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
820
|
+
} catch (err) {
|
|
821
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
822
|
+
err,
|
|
823
|
+
{
|
|
824
|
+
spreadPathsToArguments: {},
|
|
825
|
+
explicitPathsToArguments: { file: "$[0]" },
|
|
826
|
+
singleArgumentUnchanged: false
|
|
827
|
+
},
|
|
828
|
+
["file"]
|
|
829
|
+
);
|
|
830
|
+
sideEffects?.onError?.(err);
|
|
831
|
+
throw transformedError;
|
|
832
|
+
}
|
|
865
833
|
}
|
|
866
|
-
function
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
834
|
+
async function redirectToDocument2(file) {
|
|
835
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
836
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ file });
|
|
837
|
+
const reqOpts = redirectToDocument(payload);
|
|
838
|
+
sideEffects?.onSiteCall?.();
|
|
839
|
+
try {
|
|
840
|
+
const result = await httpClient.request(reqOpts);
|
|
841
|
+
sideEffects?.onSuccess?.(result);
|
|
842
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
843
|
+
} catch (err) {
|
|
844
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
845
|
+
err,
|
|
846
|
+
{
|
|
847
|
+
spreadPathsToArguments: {},
|
|
848
|
+
explicitPathsToArguments: { file: "$[0]" },
|
|
849
|
+
singleArgumentUnchanged: false
|
|
850
|
+
},
|
|
851
|
+
["file"]
|
|
852
|
+
);
|
|
853
|
+
sideEffects?.onError?.(err);
|
|
854
|
+
throw transformedError;
|
|
855
|
+
}
|
|
872
856
|
}
|
|
857
|
+
|
|
858
|
+
// src/papyrus-v1-document-documents.public.ts
|
|
873
859
|
function createDocument3(httpClient) {
|
|
874
860
|
return (options) => createDocument2(
|
|
875
861
|
options,
|
|
@@ -938,6 +924,20 @@ function downloadDocumentSource3(httpClient) {
|
|
|
938
924
|
{ httpClient }
|
|
939
925
|
);
|
|
940
926
|
}
|
|
927
|
+
function getDownloadPage3(httpClient) {
|
|
928
|
+
return (file) => getDownloadPage2(
|
|
929
|
+
file,
|
|
930
|
+
// @ts-ignore
|
|
931
|
+
{ httpClient }
|
|
932
|
+
);
|
|
933
|
+
}
|
|
934
|
+
function redirectToDocument3(httpClient) {
|
|
935
|
+
return (file) => redirectToDocument2(
|
|
936
|
+
file,
|
|
937
|
+
// @ts-ignore
|
|
938
|
+
{ httpClient }
|
|
939
|
+
);
|
|
940
|
+
}
|
|
941
941
|
var onDocumentCreated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
|
|
942
942
|
"wix.papyrus.v1.document_created",
|
|
943
943
|
true,
|
|
@@ -1056,8 +1056,6 @@ function customQueryDocument(httpClient) {
|
|
|
1056
1056
|
}
|
|
1057
1057
|
return overloadedQuery;
|
|
1058
1058
|
}
|
|
1059
|
-
var getDownloadPage4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getDownloadPage3);
|
|
1060
|
-
var redirectToDocument4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(redirectToDocument3);
|
|
1061
1059
|
var createDocument4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createDocument3);
|
|
1062
1060
|
var getDocument4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getDocument3);
|
|
1063
1061
|
var deleteDocument4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteDocument3);
|
|
@@ -1065,6 +1063,8 @@ var updateDocument4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)
|
|
|
1065
1063
|
var downloadDocument4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(downloadDocument3);
|
|
1066
1064
|
var getDownloadUrl4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getDownloadUrl3);
|
|
1067
1065
|
var downloadDocumentSource4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(downloadDocumentSource3);
|
|
1066
|
+
var getDownloadPage4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getDownloadPage3);
|
|
1067
|
+
var redirectToDocument4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(redirectToDocument3);
|
|
1068
1068
|
var queryDocument4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryDocument);
|
|
1069
1069
|
var onDocumentCreated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
|
|
1070
1070
|
onDocumentCreated
|