@wix/auto_sdk_papyrus_documents 1.0.0 → 1.0.1

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.
Files changed (49) hide show
  1. package/build/cjs/index.d.ts +18 -18
  2. package/build/cjs/index.js +173 -156
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +552 -528
  5. package/build/cjs/index.typings.js +136 -127
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +536 -525
  8. package/build/cjs/meta.js +125 -114
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +26 -22
  11. package/build/cjs/schemas.js +43 -35
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +18 -18
  14. package/build/es/index.mjs +173 -156
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +552 -528
  17. package/build/es/index.typings.mjs +136 -127
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +536 -525
  20. package/build/es/meta.mjs +125 -114
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +26 -22
  23. package/build/es/schemas.mjs +43 -35
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +18 -18
  26. package/build/internal/cjs/index.js +173 -156
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +616 -523
  29. package/build/internal/cjs/index.typings.js +136 -127
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +642 -516
  32. package/build/internal/cjs/meta.js +125 -114
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +26 -22
  35. package/build/internal/cjs/schemas.js +43 -35
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +18 -18
  38. package/build/internal/es/index.mjs +173 -156
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +616 -523
  41. package/build/internal/es/index.typings.mjs +136 -127
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +642 -516
  44. package/build/internal/es/meta.mjs +125 -114
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +26 -22
  47. package/build/internal/es/schemas.mjs +43 -35
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +4 -4
@@ -1,21 +1,7 @@
1
1
  import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { RawHttpResponse, CreateDocumentOptions, GetDocumentOptions, DeleteDocumentResponse, UpdateDocumentOptions, UpdateDocumentResponse, DownloadDocumentOptions, DownloadDocumentResponse, DownloadDocumentApplicationErrors, GetDownloadUrlOptions, GetDownloadUrlResponse, DownloadDocumentSourceOptions, DownloadDocumentSourceResponse, DownloadDocumentSourceApplicationErrors, DocumentCreatedEnvelope, DocumentDeletedEnvelope, DocumentRenderDelayedEnvelope, DocumentRenderFailedEnvelope, DocumentRenderedEnvelope, DocumentUpdatedEnvelope, DocumentQuery, QueryDocumentOptions, typedQueryDocument, DocumentsQueryBuilder } from './index.typings.js';
3
- export { AccountInfo, AccountInfoMetadata, ActionEvent, 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';
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
+ 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;
@@ -64,12 +64,13 @@ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-
64
64
 
65
65
  // src/papyrus-v1-document-documents.http.ts
66
66
  var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
67
+ var import_float = require("@wix/sdk-runtime/transformations/float");
67
68
  var import_bytes = require("@wix/sdk-runtime/transformations/bytes");
68
69
  var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
69
70
  var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
70
71
  var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
71
72
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
72
- function resolveWixPapyrusV1DocumentServiceUrl(opts) {
73
+ function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
73
74
  const domainToMappings = {
74
75
  "api._base_domain_": [
75
76
  {
@@ -112,7 +113,7 @@ function resolveWixPapyrusV1DocumentServiceUrl(opts) {
112
113
  };
113
114
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
114
115
  }
115
- function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
116
+ function resolveWixPapyrusV1DocumentServiceUrl(opts) {
116
117
  const domainToMappings = {
117
118
  "api._base_domain_": [
118
119
  {
@@ -156,60 +157,6 @@ function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
156
157
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
157
158
  }
158
159
  var PACKAGE_NAME = "@wix/auto_sdk_papyrus_documents";
159
- function getDownloadPage(payload) {
160
- function __getDownloadPage({ host }) {
161
- const metadata = {
162
- entityFqdn: "wix.papyrus.v1.document",
163
- method: "GET",
164
- methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
165
- packageName: PACKAGE_NAME,
166
- migrationOptions: {
167
- optInTransformResponse: true
168
- },
169
- url: resolveWixPapyrusV1DownloadPageControllerUrl({
170
- protoPath: "/download",
171
- data: payload,
172
- host
173
- }),
174
- params: (0, import_rest_modules.toURLSearchParams)(payload),
175
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
176
- {
177
- transformFn: import_bytes.transformRESTBytesToSDKBytes,
178
- paths: [{ path: "body" }]
179
- }
180
- ])
181
- };
182
- return metadata;
183
- }
184
- return __getDownloadPage;
185
- }
186
- function redirectToDocument(payload) {
187
- function __redirectToDocument({ host }) {
188
- const metadata = {
189
- entityFqdn: "wix.papyrus.v1.document",
190
- method: "GET",
191
- methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
192
- packageName: PACKAGE_NAME,
193
- migrationOptions: {
194
- optInTransformResponse: true
195
- },
196
- url: resolveWixPapyrusV1DownloadPageControllerUrl({
197
- protoPath: "/view",
198
- data: payload,
199
- host
200
- }),
201
- params: (0, import_rest_modules.toURLSearchParams)(payload),
202
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
203
- {
204
- transformFn: import_bytes.transformRESTBytesToSDKBytes,
205
- paths: [{ path: "body" }]
206
- }
207
- ])
208
- };
209
- return metadata;
210
- }
211
- return __redirectToDocument;
212
- }
213
160
  function createDocument(payload) {
214
161
  function __createDocument({ host }) {
215
162
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -315,6 +262,15 @@ function deleteDocument(payload) {
315
262
  }
316
263
  function queryDocument(payload) {
317
264
  function __queryDocument({ host }) {
265
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
266
+ {
267
+ transformFn: import_float.transformSDKFloatToRESTFloat,
268
+ paths: [
269
+ { path: "query.sort.origin.latitude" },
270
+ { path: "query.sort.origin.longitude" }
271
+ ]
272
+ }
273
+ ]);
318
274
  const metadata = {
319
275
  entityFqdn: "wix.papyrus.v1.document",
320
276
  method: "POST",
@@ -325,10 +281,10 @@ function queryDocument(payload) {
325
281
  },
326
282
  url: resolveWixPapyrusV1DocumentServiceUrl({
327
283
  protoPath: "/v1/documents/query",
328
- data: payload,
284
+ data: serializedData,
329
285
  host
330
286
  }),
331
- data: payload,
287
+ data: serializedData,
332
288
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
333
289
  {
334
290
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
@@ -450,6 +406,60 @@ function downloadDocumentSource(payload) {
450
406
  }
451
407
  return __downloadDocumentSource;
452
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
+ }
453
463
 
454
464
  // src/papyrus-v1-document-documents.universal.ts
455
465
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
@@ -474,26 +484,6 @@ var WixMpClientVersion = /* @__PURE__ */ ((WixMpClientVersion2) => {
474
484
  WixMpClientVersion2["MP_V2"] = "MP_V2";
475
485
  return WixMpClientVersion2;
476
486
  })(WixMpClientVersion || {});
477
- var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
478
- ResizeOption2["FIT"] = "FIT";
479
- ResizeOption2["CROP"] = "CROP";
480
- return ResizeOption2;
481
- })(ResizeOption || {});
482
- var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
483
- PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
484
- PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
485
- return PaperSize2;
486
- })(PaperSize || {});
487
- var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
488
- PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
489
- PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
490
- return PageOverflow2;
491
- })(PageOverflow || {});
492
- var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
493
- RenderFormat2["PDF"] = "PDF";
494
- RenderFormat2["HTML"] = "HTML";
495
- return RenderFormat2;
496
- })(RenderFormat || {});
497
487
  var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
498
488
  RequestedFields2["DOCUMENT_CONTENT"] = "DOCUMENT_CONTENT";
499
489
  return RequestedFields2;
@@ -504,6 +494,7 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
504
494
  return SortOrder2;
505
495
  })(SortOrder || {});
506
496
  var ContentDisposition = /* @__PURE__ */ ((ContentDisposition2) => {
497
+ ContentDisposition2["UNKNOWN_CONTENT_DISPOSITION"] = "UNKNOWN_CONTENT_DISPOSITION";
507
498
  ContentDisposition2["ATTACHMENT"] = "ATTACHMENT";
508
499
  ContentDisposition2["INLINE"] = "INLINE";
509
500
  return ContentDisposition2;
@@ -516,52 +507,26 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
516
507
  WebhookIdentityType2["APP"] = "APP";
517
508
  return WebhookIdentityType2;
518
509
  })(WebhookIdentityType || {});
519
- async function getDownloadPage2(file) {
520
- const { httpClient, sideEffects } = arguments[1];
521
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ file });
522
- const reqOpts = getDownloadPage(payload);
523
- sideEffects?.onSiteCall?.();
524
- try {
525
- const result = await httpClient.request(reqOpts);
526
- sideEffects?.onSuccess?.(result);
527
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
528
- } catch (err) {
529
- const transformedError = (0, import_transform_error.transformError)(
530
- err,
531
- {
532
- spreadPathsToArguments: {},
533
- explicitPathsToArguments: { file: "$[0]" },
534
- singleArgumentUnchanged: false
535
- },
536
- ["file"]
537
- );
538
- sideEffects?.onError?.(err);
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
- }
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 || {});
565
530
  async function createDocument2(options) {
566
531
  const { httpClient, sideEffects } = arguments[1];
567
532
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -711,9 +676,7 @@ async function typedQueryDocument(query, options) {
711
676
  }
712
677
  }
713
678
  var utils = {
714
- query: {
715
- ...(0, import_query_builder_utils.createQueryUtils)()
716
- }
679
+ query: /* @__PURE__ */ (0, import_query_builder_utils.createQueryUtils)()
717
680
  };
718
681
  async function updateDocument2(_id, options) {
719
682
  const { httpClient, sideEffects } = arguments[2];
@@ -845,22 +808,54 @@ async function downloadDocumentSource2(documentId, options) {
845
808
  throw transformedError;
846
809
  }
847
810
  }
848
-
849
- // src/papyrus-v1-document-documents.public.ts
850
- function getDownloadPage3(httpClient) {
851
- return (file) => getDownloadPage2(
852
- file,
853
- // @ts-ignore
854
- { httpClient }
855
- );
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
+ }
856
833
  }
857
- function redirectToDocument3(httpClient) {
858
- return (file) => redirectToDocument2(
859
- file,
860
- // @ts-ignore
861
- { httpClient }
862
- );
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
+ }
863
856
  }
857
+
858
+ // src/papyrus-v1-document-documents.public.ts
864
859
  function createDocument3(httpClient) {
865
860
  return (options) => createDocument2(
866
861
  options,
@@ -929,7 +924,21 @@ function downloadDocumentSource3(httpClient) {
929
924
  { httpClient }
930
925
  );
931
926
  }
932
- var onDocumentCreated = (0, import_sdk_types.EventDefinition)(
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
+ var onDocumentCreated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
933
942
  "wix.papyrus.v1.document_created",
934
943
  true,
935
944
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -946,7 +955,7 @@ var onDocumentCreated = (0, import_sdk_types.EventDefinition)(
946
955
  ])
947
956
  )
948
957
  )();
949
- var onDocumentDeleted = (0, import_sdk_types.EventDefinition)(
958
+ var onDocumentDeleted = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
950
959
  "wix.papyrus.v1.document_deleted",
951
960
  true,
952
961
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -963,7 +972,7 @@ var onDocumentDeleted = (0, import_sdk_types.EventDefinition)(
963
972
  ])
964
973
  )
965
974
  )();
966
- var onDocumentRenderDelayed = (0, import_sdk_types.EventDefinition)(
975
+ var onDocumentRenderDelayed = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
967
976
  "wix.papyrus.v1.document_document_render_delayed",
968
977
  true,
969
978
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -980,7 +989,7 @@ var onDocumentRenderDelayed = (0, import_sdk_types.EventDefinition)(
980
989
  ])
981
990
  )
982
991
  )();
983
- var onDocumentRenderFailed = (0, import_sdk_types.EventDefinition)(
992
+ var onDocumentRenderFailed = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
984
993
  "wix.papyrus.v1.document_document_render_failed",
985
994
  true,
986
995
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -997,7 +1006,7 @@ var onDocumentRenderFailed = (0, import_sdk_types.EventDefinition)(
997
1006
  ])
998
1007
  )
999
1008
  )();
1000
- var onDocumentRendered = (0, import_sdk_types.EventDefinition)(
1009
+ var onDocumentRendered = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
1001
1010
  "wix.papyrus.v1.document_document_rendered",
1002
1011
  true,
1003
1012
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -1014,7 +1023,7 @@ var onDocumentRendered = (0, import_sdk_types.EventDefinition)(
1014
1023
  ])
1015
1024
  )
1016
1025
  )();
1017
- var onDocumentUpdated = (0, import_sdk_types.EventDefinition)(
1026
+ var onDocumentUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
1018
1027
  "wix.papyrus.v1.document_updated",
1019
1028
  true,
1020
1029
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -1037,7 +1046,7 @@ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
1037
1046
  var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
1038
1047
  var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
1039
1048
  function customQueryDocument(httpClient) {
1040
- const router = (0, import_query_method_router.createQueryOverloadRouter)({
1049
+ const router = /* @__PURE__ */ (0, import_query_method_router.createQueryOverloadRouter)({
1041
1050
  builderQueryFunction: (options) => queryDocument3(httpClient)(options),
1042
1051
  typedQueryFunction: (query, options) => typedQueryDocument2(httpClient)(query, options),
1043
1052
  hasOptionsParameter: true
@@ -1047,8 +1056,6 @@ function customQueryDocument(httpClient) {
1047
1056
  }
1048
1057
  return overloadedQuery;
1049
1058
  }
1050
- var getDownloadPage4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getDownloadPage3);
1051
- var redirectToDocument4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(redirectToDocument3);
1052
1059
  var createDocument4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createDocument3);
1053
1060
  var getDocument4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getDocument3);
1054
1061
  var deleteDocument4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteDocument3);
@@ -1056,17 +1063,27 @@ var updateDocument4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)
1056
1063
  var downloadDocument4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(downloadDocument3);
1057
1064
  var getDownloadUrl4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getDownloadUrl3);
1058
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);
1059
1068
  var queryDocument4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryDocument);
1060
- var onDocumentCreated2 = (0, import_event_definition_modules.createEventModule)(onDocumentCreated);
1061
- var onDocumentDeleted2 = (0, import_event_definition_modules.createEventModule)(onDocumentDeleted);
1062
- var onDocumentRenderDelayed2 = (0, import_event_definition_modules.createEventModule)(
1069
+ var onDocumentCreated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
1070
+ onDocumentCreated
1071
+ );
1072
+ var onDocumentDeleted2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
1073
+ onDocumentDeleted
1074
+ );
1075
+ var onDocumentRenderDelayed2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
1063
1076
  onDocumentRenderDelayed
1064
1077
  );
1065
- var onDocumentRenderFailed2 = (0, import_event_definition_modules.createEventModule)(
1078
+ var onDocumentRenderFailed2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
1066
1079
  onDocumentRenderFailed
1067
1080
  );
1068
- var onDocumentRendered2 = (0, import_event_definition_modules.createEventModule)(onDocumentRendered);
1069
- var onDocumentUpdated2 = (0, import_event_definition_modules.createEventModule)(onDocumentUpdated);
1081
+ var onDocumentRendered2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
1082
+ onDocumentRendered
1083
+ );
1084
+ var onDocumentUpdated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
1085
+ onDocumentUpdated
1086
+ );
1070
1087
  // Annotate the CommonJS export names for ESM import in node:
1071
1088
  0 && (module.exports = {
1072
1089
  ContentDisposition,