@wix/auto_sdk_papyrus_documents 1.0.12 → 1.0.13

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/meta.js CHANGED
@@ -52,23 +52,23 @@ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
52
52
  var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
53
53
  var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
54
54
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
55
- var TRANSFORM_PATHS_0 = [
55
+ var TRANSFORM_PATHS_0 = [{ path: "body" }];
56
+ var TRANSFORM_PATHS_1 = [
56
57
  { path: "document.createdDate" },
57
58
  { path: "document.updatedDate" },
58
59
  { path: "document.expirationDate" }
59
60
  ];
60
- var TRANSFORM_PATHS_1 = [
61
+ var TRANSFORM_PATHS_2 = [
61
62
  { path: "query.sort.origin.latitude" },
62
63
  { path: "query.sort.origin.longitude" }
63
64
  ];
64
- var TRANSFORM_PATHS_2 = [
65
+ var TRANSFORM_PATHS_3 = [
65
66
  { path: "documents.createdDate" },
66
67
  { path: "documents.updatedDate" },
67
68
  { path: "documents.expirationDate" }
68
69
  ];
69
- var TRANSFORM_PATHS_3 = [{ path: "expirationDate" }];
70
- var TRANSFORM_PATHS_4 = [{ path: "body" }];
71
- function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
70
+ var TRANSFORM_PATHS_4 = [{ path: "expirationDate" }];
71
+ function resolveWixPapyrusV1DocumentServiceUrl(opts) {
72
72
  const domainToMappings = {
73
73
  "api._base_domain_": [
74
74
  {
@@ -111,7 +111,7 @@ function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
111
111
  };
112
112
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
113
113
  }
114
- function resolveWixPapyrusV1DocumentServiceUrl(opts) {
114
+ function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
115
115
  const domainToMappings = {
116
116
  "api._base_domain_": [
117
117
  {
@@ -155,12 +155,66 @@ function resolveWixPapyrusV1DocumentServiceUrl(opts) {
155
155
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
156
156
  }
157
157
  var PACKAGE_NAME = "@wix/auto_sdk_papyrus_documents";
158
+ function getDownloadPage(payload) {
159
+ function __getDownloadPage({ host }) {
160
+ const metadata = {
161
+ entityFqdn: "wix.papyrus.v1.document",
162
+ method: "GET",
163
+ methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
164
+ packageName: PACKAGE_NAME,
165
+ migrationOptions: {
166
+ optInTransformResponse: true
167
+ },
168
+ url: resolveWixPapyrusV1DownloadPageControllerUrl({
169
+ protoPath: "/download",
170
+ data: payload,
171
+ host
172
+ }),
173
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
174
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
175
+ {
176
+ transformFn: import_bytes.transformRESTBytesToSDKBytes,
177
+ paths: TRANSFORM_PATHS_0
178
+ }
179
+ ])
180
+ };
181
+ return metadata;
182
+ }
183
+ return __getDownloadPage;
184
+ }
185
+ function redirectToDocument(payload) {
186
+ function __redirectToDocument({ host }) {
187
+ const metadata = {
188
+ entityFqdn: "wix.papyrus.v1.document",
189
+ method: "GET",
190
+ methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
191
+ packageName: PACKAGE_NAME,
192
+ migrationOptions: {
193
+ optInTransformResponse: true
194
+ },
195
+ url: resolveWixPapyrusV1DownloadPageControllerUrl({
196
+ protoPath: "/view",
197
+ data: payload,
198
+ host
199
+ }),
200
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
201
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
202
+ {
203
+ transformFn: import_bytes.transformRESTBytesToSDKBytes,
204
+ paths: TRANSFORM_PATHS_0
205
+ }
206
+ ])
207
+ };
208
+ return metadata;
209
+ }
210
+ return __redirectToDocument;
211
+ }
158
212
  function createDocument(payload) {
159
213
  function __createDocument({ host }) {
160
214
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
161
215
  {
162
216
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
163
- paths: TRANSFORM_PATHS_0
217
+ paths: TRANSFORM_PATHS_1
164
218
  }
165
219
  ]);
166
220
  const metadata = {
@@ -180,7 +234,7 @@ function createDocument(payload) {
180
234
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
181
235
  {
182
236
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
183
- paths: TRANSFORM_PATHS_0
237
+ paths: TRANSFORM_PATHS_1
184
238
  }
185
239
  ])
186
240
  };
@@ -207,7 +261,7 @@ function getDocument(payload) {
207
261
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
208
262
  {
209
263
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
210
- paths: TRANSFORM_PATHS_0
264
+ paths: TRANSFORM_PATHS_1
211
265
  }
212
266
  ])
213
267
  };
@@ -234,7 +288,7 @@ function deleteDocument(payload) {
234
288
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
235
289
  {
236
290
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
237
- paths: TRANSFORM_PATHS_0
291
+ paths: TRANSFORM_PATHS_1
238
292
  }
239
293
  ])
240
294
  };
@@ -247,7 +301,7 @@ function queryDocument(payload) {
247
301
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
248
302
  {
249
303
  transformFn: import_float.transformSDKFloatToRESTFloat,
250
- paths: TRANSFORM_PATHS_1
304
+ paths: TRANSFORM_PATHS_2
251
305
  }
252
306
  ]);
253
307
  const metadata = {
@@ -267,7 +321,7 @@ function queryDocument(payload) {
267
321
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
268
322
  {
269
323
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
270
- paths: TRANSFORM_PATHS_2
324
+ paths: TRANSFORM_PATHS_3
271
325
  }
272
326
  ])
273
327
  };
@@ -294,7 +348,7 @@ function updateDocument(payload) {
294
348
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
295
349
  {
296
350
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
297
- paths: TRANSFORM_PATHS_0
351
+ paths: TRANSFORM_PATHS_1
298
352
  }
299
353
  ])
300
354
  };
@@ -321,7 +375,7 @@ function downloadDocument(payload) {
321
375
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
322
376
  {
323
377
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
324
- paths: TRANSFORM_PATHS_3
378
+ paths: TRANSFORM_PATHS_4
325
379
  }
326
380
  ])
327
381
  };
@@ -348,7 +402,7 @@ function getDownloadUrl(payload) {
348
402
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
349
403
  {
350
404
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
351
- paths: TRANSFORM_PATHS_3
405
+ paths: TRANSFORM_PATHS_4
352
406
  }
353
407
  ])
354
408
  };
@@ -377,60 +431,6 @@ function downloadDocumentSource(payload) {
377
431
  }
378
432
  return __downloadDocumentSource;
379
433
  }
380
- function getDownloadPage(payload) {
381
- function __getDownloadPage({ host }) {
382
- const metadata = {
383
- entityFqdn: "wix.papyrus.v1.document",
384
- method: "GET",
385
- methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
386
- packageName: PACKAGE_NAME,
387
- migrationOptions: {
388
- optInTransformResponse: true
389
- },
390
- url: resolveWixPapyrusV1DownloadPageControllerUrl({
391
- protoPath: "/download",
392
- data: payload,
393
- host
394
- }),
395
- params: (0, import_rest_modules.toURLSearchParams)(payload),
396
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
397
- {
398
- transformFn: import_bytes.transformRESTBytesToSDKBytes,
399
- paths: TRANSFORM_PATHS_4
400
- }
401
- ])
402
- };
403
- return metadata;
404
- }
405
- return __getDownloadPage;
406
- }
407
- function redirectToDocument(payload) {
408
- function __redirectToDocument({ host }) {
409
- const metadata = {
410
- entityFqdn: "wix.papyrus.v1.document",
411
- method: "GET",
412
- methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
413
- packageName: PACKAGE_NAME,
414
- migrationOptions: {
415
- optInTransformResponse: true
416
- },
417
- url: resolveWixPapyrusV1DownloadPageControllerUrl({
418
- protoPath: "/view",
419
- data: payload,
420
- host
421
- }),
422
- params: (0, import_rest_modules.toURLSearchParams)(payload),
423
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
424
- {
425
- transformFn: import_bytes.transformRESTBytesToSDKBytes,
426
- paths: TRANSFORM_PATHS_4
427
- }
428
- ])
429
- };
430
- return metadata;
431
- }
432
- return __redirectToDocument;
433
- }
434
434
 
435
435
  // src/papyrus-v1-document-documents.types.ts
436
436
  var RenderStatus = /* @__PURE__ */ ((RenderStatus2) => {
@@ -453,6 +453,26 @@ var WixMpClientVersion = /* @__PURE__ */ ((WixMpClientVersion2) => {
453
453
  WixMpClientVersion2["MP_V2"] = "MP_V2";
454
454
  return WixMpClientVersion2;
455
455
  })(WixMpClientVersion || {});
456
+ var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
457
+ ResizeOption2["FIT"] = "FIT";
458
+ ResizeOption2["CROP"] = "CROP";
459
+ return ResizeOption2;
460
+ })(ResizeOption || {});
461
+ var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
462
+ PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
463
+ PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
464
+ return PaperSize2;
465
+ })(PaperSize || {});
466
+ var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
467
+ PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
468
+ PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
469
+ return PageOverflow2;
470
+ })(PageOverflow || {});
471
+ var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
472
+ RenderFormat2["PDF"] = "PDF";
473
+ RenderFormat2["HTML"] = "HTML";
474
+ return RenderFormat2;
475
+ })(RenderFormat || {});
456
476
  var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
457
477
  RequestedFields2["DOCUMENT_CONTENT"] = "DOCUMENT_CONTENT";
458
478
  return RequestedFields2;
@@ -476,28 +496,44 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
476
496
  WebhookIdentityType2["APP"] = "APP";
477
497
  return WebhookIdentityType2;
478
498
  })(WebhookIdentityType || {});
479
- var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
480
- ResizeOption2["FIT"] = "FIT";
481
- ResizeOption2["CROP"] = "CROP";
482
- return ResizeOption2;
483
- })(ResizeOption || {});
484
- var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
485
- PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
486
- PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
487
- return PaperSize2;
488
- })(PaperSize || {});
489
- var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
490
- PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
491
- PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
492
- return PageOverflow2;
493
- })(PageOverflow || {});
494
- var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
495
- RenderFormat2["PDF"] = "PDF";
496
- RenderFormat2["HTML"] = "HTML";
497
- return RenderFormat2;
498
- })(RenderFormat || {});
499
499
 
500
500
  // src/papyrus-v1-document-documents.meta.ts
501
+ function getDownloadPage2() {
502
+ const payload = {};
503
+ const getRequestOptions = getDownloadPage(payload);
504
+ const getUrl = (context) => {
505
+ const { url } = getRequestOptions(context);
506
+ return url;
507
+ };
508
+ return {
509
+ getUrl,
510
+ httpMethod: "GET",
511
+ path: "/download",
512
+ pathParams: {},
513
+ __requestType: null,
514
+ __originalRequestType: null,
515
+ __responseType: null,
516
+ __originalResponseType: null
517
+ };
518
+ }
519
+ function redirectToDocument2() {
520
+ const payload = {};
521
+ const getRequestOptions = redirectToDocument(payload);
522
+ const getUrl = (context) => {
523
+ const { url } = getRequestOptions(context);
524
+ return url;
525
+ };
526
+ return {
527
+ getUrl,
528
+ httpMethod: "GET",
529
+ path: "/view",
530
+ pathParams: {},
531
+ __requestType: null,
532
+ __originalRequestType: null,
533
+ __responseType: null,
534
+ __originalResponseType: null
535
+ };
536
+ }
501
537
  function createDocument2() {
502
538
  const payload = {};
503
539
  const getRequestOptions = createDocument(payload);
@@ -642,42 +678,6 @@ function downloadDocumentSource2() {
642
678
  __originalResponseType: null
643
679
  };
644
680
  }
645
- function getDownloadPage2() {
646
- const payload = {};
647
- const getRequestOptions = getDownloadPage(payload);
648
- const getUrl = (context) => {
649
- const { url } = getRequestOptions(context);
650
- return url;
651
- };
652
- return {
653
- getUrl,
654
- httpMethod: "GET",
655
- path: "/download",
656
- pathParams: {},
657
- __requestType: null,
658
- __originalRequestType: null,
659
- __responseType: null,
660
- __originalResponseType: null
661
- };
662
- }
663
- function redirectToDocument2() {
664
- const payload = {};
665
- const getRequestOptions = redirectToDocument(payload);
666
- const getUrl = (context) => {
667
- const { url } = getRequestOptions(context);
668
- return url;
669
- };
670
- return {
671
- getUrl,
672
- httpMethod: "GET",
673
- path: "/view",
674
- pathParams: {},
675
- __requestType: null,
676
- __originalRequestType: null,
677
- __responseType: null,
678
- __originalResponseType: null
679
- };
680
- }
681
681
  // Annotate the CommonJS export names for ESM import in node:
682
682
  0 && (module.exports = {
683
683
  ContentDispositionOriginal,