@wix/auto_sdk_papyrus_documents 1.0.0 → 1.0.2

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 +317 -271
  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 +317 -271
  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.typings.d.ts +616 -523
  27. package/build/internal/cjs/meta.d.ts +642 -516
  28. package/build/internal/cjs/schemas.d.ts +26 -22
  29. package/build/internal/es/index.d.mts +18 -18
  30. package/build/internal/es/index.typings.d.mts +616 -523
  31. package/build/internal/es/meta.d.mts +642 -516
  32. package/build/internal/es/schemas.d.mts +26 -22
  33. package/package.json +4 -4
  34. package/build/internal/cjs/index.js +0 -1101
  35. package/build/internal/cjs/index.js.map +0 -1
  36. package/build/internal/cjs/index.typings.js +0 -863
  37. package/build/internal/cjs/index.typings.js.map +0 -1
  38. package/build/internal/cjs/meta.js +0 -705
  39. package/build/internal/cjs/meta.js.map +0 -1
  40. package/build/internal/cjs/schemas.js +0 -658
  41. package/build/internal/cjs/schemas.js.map +0 -1
  42. package/build/internal/es/index.mjs +0 -1050
  43. package/build/internal/es/index.mjs.map +0 -1
  44. package/build/internal/es/index.typings.mjs +0 -817
  45. package/build/internal/es/index.typings.mjs.map +0 -1
  46. package/build/internal/es/meta.mjs +0 -658
  47. package/build/internal/es/meta.mjs.map +0 -1
  48. package/build/internal/es/schemas.mjs +0 -602
  49. package/build/internal/es/schemas.mjs.map +0 -1
package/build/es/meta.mjs CHANGED
@@ -1,11 +1,12 @@
1
1
  // src/papyrus-v1-document-documents.http.ts
2
2
  import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
3
+ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
3
4
  import { transformRESTBytesToSDKBytes } from "@wix/sdk-runtime/transformations/bytes";
4
5
  import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
5
6
  import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
6
7
  import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
7
8
  import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
8
- function resolveWixPapyrusV1DocumentServiceUrl(opts) {
9
+ function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
9
10
  const domainToMappings = {
10
11
  "api._base_domain_": [
11
12
  {
@@ -48,7 +49,7 @@ function resolveWixPapyrusV1DocumentServiceUrl(opts) {
48
49
  };
49
50
  return resolveUrl(Object.assign(opts, { domainToMappings }));
50
51
  }
51
- function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
52
+ function resolveWixPapyrusV1DocumentServiceUrl(opts) {
52
53
  const domainToMappings = {
53
54
  "api._base_domain_": [
54
55
  {
@@ -92,60 +93,6 @@ function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
92
93
  return resolveUrl(Object.assign(opts, { domainToMappings }));
93
94
  }
94
95
  var PACKAGE_NAME = "@wix/auto_sdk_papyrus_documents";
95
- function getDownloadPage(payload) {
96
- function __getDownloadPage({ host }) {
97
- const metadata = {
98
- entityFqdn: "wix.papyrus.v1.document",
99
- method: "GET",
100
- methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
101
- packageName: PACKAGE_NAME,
102
- migrationOptions: {
103
- optInTransformResponse: true
104
- },
105
- url: resolveWixPapyrusV1DownloadPageControllerUrl({
106
- protoPath: "/download",
107
- data: payload,
108
- host
109
- }),
110
- params: toURLSearchParams(payload),
111
- transformResponse: (payload2) => transformPaths(payload2, [
112
- {
113
- transformFn: transformRESTBytesToSDKBytes,
114
- paths: [{ path: "body" }]
115
- }
116
- ])
117
- };
118
- return metadata;
119
- }
120
- return __getDownloadPage;
121
- }
122
- function redirectToDocument(payload) {
123
- function __redirectToDocument({ host }) {
124
- const metadata = {
125
- entityFqdn: "wix.papyrus.v1.document",
126
- method: "GET",
127
- methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
128
- packageName: PACKAGE_NAME,
129
- migrationOptions: {
130
- optInTransformResponse: true
131
- },
132
- url: resolveWixPapyrusV1DownloadPageControllerUrl({
133
- protoPath: "/view",
134
- data: payload,
135
- host
136
- }),
137
- params: toURLSearchParams(payload),
138
- transformResponse: (payload2) => transformPaths(payload2, [
139
- {
140
- transformFn: transformRESTBytesToSDKBytes,
141
- paths: [{ path: "body" }]
142
- }
143
- ])
144
- };
145
- return metadata;
146
- }
147
- return __redirectToDocument;
148
- }
149
96
  function createDocument(payload) {
150
97
  function __createDocument({ host }) {
151
98
  const serializedData = transformPaths(payload, [
@@ -251,6 +198,15 @@ function deleteDocument(payload) {
251
198
  }
252
199
  function queryDocument(payload) {
253
200
  function __queryDocument({ host }) {
201
+ const serializedData = transformPaths(payload, [
202
+ {
203
+ transformFn: transformSDKFloatToRESTFloat,
204
+ paths: [
205
+ { path: "query.sort.origin.latitude" },
206
+ { path: "query.sort.origin.longitude" }
207
+ ]
208
+ }
209
+ ]);
254
210
  const metadata = {
255
211
  entityFqdn: "wix.papyrus.v1.document",
256
212
  method: "POST",
@@ -261,10 +217,10 @@ function queryDocument(payload) {
261
217
  },
262
218
  url: resolveWixPapyrusV1DocumentServiceUrl({
263
219
  protoPath: "/v1/documents/query",
264
- data: payload,
220
+ data: serializedData,
265
221
  host
266
222
  }),
267
- data: payload,
223
+ data: serializedData,
268
224
  transformResponse: (payload2) => transformPaths(payload2, [
269
225
  {
270
226
  transformFn: transformRESTTimestampToSDKTimestamp,
@@ -386,6 +342,60 @@ function downloadDocumentSource(payload) {
386
342
  }
387
343
  return __downloadDocumentSource;
388
344
  }
345
+ function getDownloadPage(payload) {
346
+ function __getDownloadPage({ host }) {
347
+ const metadata = {
348
+ entityFqdn: "wix.papyrus.v1.document",
349
+ method: "GET",
350
+ methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
351
+ packageName: PACKAGE_NAME,
352
+ migrationOptions: {
353
+ optInTransformResponse: true
354
+ },
355
+ url: resolveWixPapyrusV1DownloadPageControllerUrl({
356
+ protoPath: "/download",
357
+ data: payload,
358
+ host
359
+ }),
360
+ params: toURLSearchParams(payload),
361
+ transformResponse: (payload2) => transformPaths(payload2, [
362
+ {
363
+ transformFn: transformRESTBytesToSDKBytes,
364
+ paths: [{ path: "body" }]
365
+ }
366
+ ])
367
+ };
368
+ return metadata;
369
+ }
370
+ return __getDownloadPage;
371
+ }
372
+ function redirectToDocument(payload) {
373
+ function __redirectToDocument({ host }) {
374
+ const metadata = {
375
+ entityFqdn: "wix.papyrus.v1.document",
376
+ method: "GET",
377
+ methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
378
+ packageName: PACKAGE_NAME,
379
+ migrationOptions: {
380
+ optInTransformResponse: true
381
+ },
382
+ url: resolveWixPapyrusV1DownloadPageControllerUrl({
383
+ protoPath: "/view",
384
+ data: payload,
385
+ host
386
+ }),
387
+ params: toURLSearchParams(payload),
388
+ transformResponse: (payload2) => transformPaths(payload2, [
389
+ {
390
+ transformFn: transformRESTBytesToSDKBytes,
391
+ paths: [{ path: "body" }]
392
+ }
393
+ ])
394
+ };
395
+ return metadata;
396
+ }
397
+ return __redirectToDocument;
398
+ }
389
399
 
390
400
  // src/papyrus-v1-document-documents.types.ts
391
401
  var RenderStatus = /* @__PURE__ */ ((RenderStatus2) => {
@@ -408,26 +418,6 @@ var WixMpClientVersion = /* @__PURE__ */ ((WixMpClientVersion2) => {
408
418
  WixMpClientVersion2["MP_V2"] = "MP_V2";
409
419
  return WixMpClientVersion2;
410
420
  })(WixMpClientVersion || {});
411
- var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
412
- ResizeOption2["FIT"] = "FIT";
413
- ResizeOption2["CROP"] = "CROP";
414
- return ResizeOption2;
415
- })(ResizeOption || {});
416
- var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
417
- PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
418
- PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
419
- return PaperSize2;
420
- })(PaperSize || {});
421
- var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
422
- PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
423
- PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
424
- return PageOverflow2;
425
- })(PageOverflow || {});
426
- var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
427
- RenderFormat2["PDF"] = "PDF";
428
- RenderFormat2["HTML"] = "HTML";
429
- return RenderFormat2;
430
- })(RenderFormat || {});
431
421
  var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
432
422
  RequestedFields2["DOCUMENT_CONTENT"] = "DOCUMENT_CONTENT";
433
423
  return RequestedFields2;
@@ -438,6 +428,7 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
438
428
  return SortOrder2;
439
429
  })(SortOrder || {});
440
430
  var ContentDisposition = /* @__PURE__ */ ((ContentDisposition2) => {
431
+ ContentDisposition2["UNKNOWN_CONTENT_DISPOSITION"] = "UNKNOWN_CONTENT_DISPOSITION";
441
432
  ContentDisposition2["ATTACHMENT"] = "ATTACHMENT";
442
433
  ContentDisposition2["INLINE"] = "INLINE";
443
434
  return ContentDisposition2;
@@ -450,44 +441,28 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
450
441
  WebhookIdentityType2["APP"] = "APP";
451
442
  return WebhookIdentityType2;
452
443
  })(WebhookIdentityType || {});
444
+ var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
445
+ ResizeOption2["FIT"] = "FIT";
446
+ ResizeOption2["CROP"] = "CROP";
447
+ return ResizeOption2;
448
+ })(ResizeOption || {});
449
+ var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
450
+ PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
451
+ PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
452
+ return PaperSize2;
453
+ })(PaperSize || {});
454
+ var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
455
+ PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
456
+ PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
457
+ return PageOverflow2;
458
+ })(PageOverflow || {});
459
+ var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
460
+ RenderFormat2["PDF"] = "PDF";
461
+ RenderFormat2["HTML"] = "HTML";
462
+ return RenderFormat2;
463
+ })(RenderFormat || {});
453
464
 
454
465
  // src/papyrus-v1-document-documents.meta.ts
455
- function getDownloadPage2() {
456
- const payload = {};
457
- const getRequestOptions = getDownloadPage(payload);
458
- const getUrl = (context) => {
459
- const { url } = getRequestOptions(context);
460
- return url;
461
- };
462
- return {
463
- getUrl,
464
- httpMethod: "GET",
465
- path: "/download",
466
- pathParams: {},
467
- __requestType: null,
468
- __originalRequestType: null,
469
- __responseType: null,
470
- __originalResponseType: null
471
- };
472
- }
473
- function redirectToDocument2() {
474
- const payload = {};
475
- const getRequestOptions = redirectToDocument(payload);
476
- const getUrl = (context) => {
477
- const { url } = getRequestOptions(context);
478
- return url;
479
- };
480
- return {
481
- getUrl,
482
- httpMethod: "GET",
483
- path: "/view",
484
- pathParams: {},
485
- __requestType: null,
486
- __originalRequestType: null,
487
- __responseType: null,
488
- __originalResponseType: null
489
- };
490
- }
491
466
  function createDocument2() {
492
467
  const payload = {};
493
468
  const getRequestOptions = createDocument(payload);
@@ -632,6 +607,42 @@ function downloadDocumentSource2() {
632
607
  __originalResponseType: null
633
608
  };
634
609
  }
610
+ function getDownloadPage2() {
611
+ const payload = {};
612
+ const getRequestOptions = getDownloadPage(payload);
613
+ const getUrl = (context) => {
614
+ const { url } = getRequestOptions(context);
615
+ return url;
616
+ };
617
+ return {
618
+ getUrl,
619
+ httpMethod: "GET",
620
+ path: "/download",
621
+ pathParams: {},
622
+ __requestType: null,
623
+ __originalRequestType: null,
624
+ __responseType: null,
625
+ __originalResponseType: null
626
+ };
627
+ }
628
+ function redirectToDocument2() {
629
+ const payload = {};
630
+ const getRequestOptions = redirectToDocument(payload);
631
+ const getUrl = (context) => {
632
+ const { url } = getRequestOptions(context);
633
+ return url;
634
+ };
635
+ return {
636
+ getUrl,
637
+ httpMethod: "GET",
638
+ path: "/view",
639
+ pathParams: {},
640
+ __requestType: null,
641
+ __originalRequestType: null,
642
+ __responseType: null,
643
+ __originalResponseType: null
644
+ };
645
+ }
635
646
  export {
636
647
  ContentDisposition as ContentDispositionOriginal,
637
648
  Format as FormatOriginal,