@wix/auto_sdk_papyrus_documents 1.0.11 → 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,7 +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
- function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
55
+ var TRANSFORM_PATHS_0 = [{ path: "body" }];
56
+ var TRANSFORM_PATHS_1 = [
57
+ { path: "document.createdDate" },
58
+ { path: "document.updatedDate" },
59
+ { path: "document.expirationDate" }
60
+ ];
61
+ var TRANSFORM_PATHS_2 = [
62
+ { path: "query.sort.origin.latitude" },
63
+ { path: "query.sort.origin.longitude" }
64
+ ];
65
+ var TRANSFORM_PATHS_3 = [
66
+ { path: "documents.createdDate" },
67
+ { path: "documents.updatedDate" },
68
+ { path: "documents.expirationDate" }
69
+ ];
70
+ var TRANSFORM_PATHS_4 = [{ path: "expirationDate" }];
71
+ function resolveWixPapyrusV1DocumentServiceUrl(opts) {
56
72
  const domainToMappings = {
57
73
  "api._base_domain_": [
58
74
  {
@@ -95,7 +111,7 @@ function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
95
111
  };
96
112
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
97
113
  }
98
- function resolveWixPapyrusV1DocumentServiceUrl(opts) {
114
+ function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
99
115
  const domainToMappings = {
100
116
  "api._base_domain_": [
101
117
  {
@@ -139,16 +155,66 @@ function resolveWixPapyrusV1DocumentServiceUrl(opts) {
139
155
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
140
156
  }
141
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
+ }
142
212
  function createDocument(payload) {
143
213
  function __createDocument({ host }) {
144
214
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
145
215
  {
146
216
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
147
- paths: [
148
- { path: "document.createdDate" },
149
- { path: "document.updatedDate" },
150
- { path: "document.expirationDate" }
151
- ]
217
+ paths: TRANSFORM_PATHS_1
152
218
  }
153
219
  ]);
154
220
  const metadata = {
@@ -168,11 +234,7 @@ function createDocument(payload) {
168
234
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
169
235
  {
170
236
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
171
- paths: [
172
- { path: "document.createdDate" },
173
- { path: "document.updatedDate" },
174
- { path: "document.expirationDate" }
175
- ]
237
+ paths: TRANSFORM_PATHS_1
176
238
  }
177
239
  ])
178
240
  };
@@ -199,11 +261,7 @@ function getDocument(payload) {
199
261
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
200
262
  {
201
263
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
202
- paths: [
203
- { path: "document.createdDate" },
204
- { path: "document.updatedDate" },
205
- { path: "document.expirationDate" }
206
- ]
264
+ paths: TRANSFORM_PATHS_1
207
265
  }
208
266
  ])
209
267
  };
@@ -230,11 +288,7 @@ function deleteDocument(payload) {
230
288
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
231
289
  {
232
290
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
233
- paths: [
234
- { path: "document.createdDate" },
235
- { path: "document.updatedDate" },
236
- { path: "document.expirationDate" }
237
- ]
291
+ paths: TRANSFORM_PATHS_1
238
292
  }
239
293
  ])
240
294
  };
@@ -247,10 +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: [
251
- { path: "query.sort.origin.latitude" },
252
- { path: "query.sort.origin.longitude" }
253
- ]
304
+ paths: TRANSFORM_PATHS_2
254
305
  }
255
306
  ]);
256
307
  const metadata = {
@@ -270,11 +321,7 @@ function queryDocument(payload) {
270
321
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
271
322
  {
272
323
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
273
- paths: [
274
- { path: "documents.createdDate" },
275
- { path: "documents.updatedDate" },
276
- { path: "documents.expirationDate" }
277
- ]
324
+ paths: TRANSFORM_PATHS_3
278
325
  }
279
326
  ])
280
327
  };
@@ -301,11 +348,7 @@ function updateDocument(payload) {
301
348
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
302
349
  {
303
350
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
304
- paths: [
305
- { path: "document.createdDate" },
306
- { path: "document.updatedDate" },
307
- { path: "document.expirationDate" }
308
- ]
351
+ paths: TRANSFORM_PATHS_1
309
352
  }
310
353
  ])
311
354
  };
@@ -332,7 +375,7 @@ function downloadDocument(payload) {
332
375
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
333
376
  {
334
377
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
335
- paths: [{ path: "expirationDate" }]
378
+ paths: TRANSFORM_PATHS_4
336
379
  }
337
380
  ])
338
381
  };
@@ -359,7 +402,7 @@ function getDownloadUrl(payload) {
359
402
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
360
403
  {
361
404
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
362
- paths: [{ path: "expirationDate" }]
405
+ paths: TRANSFORM_PATHS_4
363
406
  }
364
407
  ])
365
408
  };
@@ -388,60 +431,6 @@ function downloadDocumentSource(payload) {
388
431
  }
389
432
  return __downloadDocumentSource;
390
433
  }
391
- function getDownloadPage(payload) {
392
- function __getDownloadPage({ host }) {
393
- const metadata = {
394
- entityFqdn: "wix.papyrus.v1.document",
395
- method: "GET",
396
- methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
397
- packageName: PACKAGE_NAME,
398
- migrationOptions: {
399
- optInTransformResponse: true
400
- },
401
- url: resolveWixPapyrusV1DownloadPageControllerUrl({
402
- protoPath: "/download",
403
- data: payload,
404
- host
405
- }),
406
- params: (0, import_rest_modules.toURLSearchParams)(payload),
407
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
408
- {
409
- transformFn: import_bytes.transformRESTBytesToSDKBytes,
410
- paths: [{ path: "body" }]
411
- }
412
- ])
413
- };
414
- return metadata;
415
- }
416
- return __getDownloadPage;
417
- }
418
- function redirectToDocument(payload) {
419
- function __redirectToDocument({ host }) {
420
- const metadata = {
421
- entityFqdn: "wix.papyrus.v1.document",
422
- method: "GET",
423
- methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
424
- packageName: PACKAGE_NAME,
425
- migrationOptions: {
426
- optInTransformResponse: true
427
- },
428
- url: resolveWixPapyrusV1DownloadPageControllerUrl({
429
- protoPath: "/view",
430
- data: payload,
431
- host
432
- }),
433
- params: (0, import_rest_modules.toURLSearchParams)(payload),
434
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
435
- {
436
- transformFn: import_bytes.transformRESTBytesToSDKBytes,
437
- paths: [{ path: "body" }]
438
- }
439
- ])
440
- };
441
- return metadata;
442
- }
443
- return __redirectToDocument;
444
- }
445
434
 
446
435
  // src/papyrus-v1-document-documents.types.ts
447
436
  var RenderStatus = /* @__PURE__ */ ((RenderStatus2) => {
@@ -464,6 +453,26 @@ var WixMpClientVersion = /* @__PURE__ */ ((WixMpClientVersion2) => {
464
453
  WixMpClientVersion2["MP_V2"] = "MP_V2";
465
454
  return WixMpClientVersion2;
466
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 || {});
467
476
  var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
468
477
  RequestedFields2["DOCUMENT_CONTENT"] = "DOCUMENT_CONTENT";
469
478
  return RequestedFields2;
@@ -487,28 +496,44 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
487
496
  WebhookIdentityType2["APP"] = "APP";
488
497
  return WebhookIdentityType2;
489
498
  })(WebhookIdentityType || {});
490
- var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
491
- ResizeOption2["FIT"] = "FIT";
492
- ResizeOption2["CROP"] = "CROP";
493
- return ResizeOption2;
494
- })(ResizeOption || {});
495
- var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
496
- PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
497
- PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
498
- return PaperSize2;
499
- })(PaperSize || {});
500
- var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
501
- PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
502
- PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
503
- return PageOverflow2;
504
- })(PageOverflow || {});
505
- var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
506
- RenderFormat2["PDF"] = "PDF";
507
- RenderFormat2["HTML"] = "HTML";
508
- return RenderFormat2;
509
- })(RenderFormat || {});
510
499
 
511
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
+ }
512
537
  function createDocument2() {
513
538
  const payload = {};
514
539
  const getRequestOptions = createDocument(payload);
@@ -653,42 +678,6 @@ function downloadDocumentSource2() {
653
678
  __originalResponseType: null
654
679
  };
655
680
  }
656
- function getDownloadPage2() {
657
- const payload = {};
658
- const getRequestOptions = getDownloadPage(payload);
659
- const getUrl = (context) => {
660
- const { url } = getRequestOptions(context);
661
- return url;
662
- };
663
- return {
664
- getUrl,
665
- httpMethod: "GET",
666
- path: "/download",
667
- pathParams: {},
668
- __requestType: null,
669
- __originalRequestType: null,
670
- __responseType: null,
671
- __originalResponseType: null
672
- };
673
- }
674
- function redirectToDocument2() {
675
- const payload = {};
676
- const getRequestOptions = redirectToDocument(payload);
677
- const getUrl = (context) => {
678
- const { url } = getRequestOptions(context);
679
- return url;
680
- };
681
- return {
682
- getUrl,
683
- httpMethod: "GET",
684
- path: "/view",
685
- pathParams: {},
686
- __requestType: null,
687
- __originalRequestType: null,
688
- __responseType: null,
689
- __originalResponseType: null
690
- };
691
- }
692
681
  // Annotate the CommonJS export names for ESM import in node:
693
682
  0 && (module.exports = {
694
683
  ContentDispositionOriginal,