@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/es/meta.mjs CHANGED
@@ -6,23 +6,23 @@ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transform
6
6
  import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
7
7
  import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
8
8
  import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
9
- var TRANSFORM_PATHS_0 = [
9
+ var TRANSFORM_PATHS_0 = [{ path: "body" }];
10
+ var TRANSFORM_PATHS_1 = [
10
11
  { path: "document.createdDate" },
11
12
  { path: "document.updatedDate" },
12
13
  { path: "document.expirationDate" }
13
14
  ];
14
- var TRANSFORM_PATHS_1 = [
15
+ var TRANSFORM_PATHS_2 = [
15
16
  { path: "query.sort.origin.latitude" },
16
17
  { path: "query.sort.origin.longitude" }
17
18
  ];
18
- var TRANSFORM_PATHS_2 = [
19
+ var TRANSFORM_PATHS_3 = [
19
20
  { path: "documents.createdDate" },
20
21
  { path: "documents.updatedDate" },
21
22
  { path: "documents.expirationDate" }
22
23
  ];
23
- var TRANSFORM_PATHS_3 = [{ path: "expirationDate" }];
24
- var TRANSFORM_PATHS_4 = [{ path: "body" }];
25
- function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
24
+ var TRANSFORM_PATHS_4 = [{ path: "expirationDate" }];
25
+ function resolveWixPapyrusV1DocumentServiceUrl(opts) {
26
26
  const domainToMappings = {
27
27
  "api._base_domain_": [
28
28
  {
@@ -65,7 +65,7 @@ function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
65
65
  };
66
66
  return resolveUrl(Object.assign(opts, { domainToMappings }));
67
67
  }
68
- function resolveWixPapyrusV1DocumentServiceUrl(opts) {
68
+ function resolveWixPapyrusV1DownloadPageControllerUrl(opts) {
69
69
  const domainToMappings = {
70
70
  "api._base_domain_": [
71
71
  {
@@ -109,12 +109,66 @@ function resolveWixPapyrusV1DocumentServiceUrl(opts) {
109
109
  return resolveUrl(Object.assign(opts, { domainToMappings }));
110
110
  }
111
111
  var PACKAGE_NAME = "@wix/auto_sdk_papyrus_documents";
112
+ function getDownloadPage(payload) {
113
+ function __getDownloadPage({ host }) {
114
+ const metadata = {
115
+ entityFqdn: "wix.papyrus.v1.document",
116
+ method: "GET",
117
+ methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
118
+ packageName: PACKAGE_NAME,
119
+ migrationOptions: {
120
+ optInTransformResponse: true
121
+ },
122
+ url: resolveWixPapyrusV1DownloadPageControllerUrl({
123
+ protoPath: "/download",
124
+ data: payload,
125
+ host
126
+ }),
127
+ params: toURLSearchParams(payload),
128
+ transformResponse: (payload2) => transformPaths(payload2, [
129
+ {
130
+ transformFn: transformRESTBytesToSDKBytes,
131
+ paths: TRANSFORM_PATHS_0
132
+ }
133
+ ])
134
+ };
135
+ return metadata;
136
+ }
137
+ return __getDownloadPage;
138
+ }
139
+ function redirectToDocument(payload) {
140
+ function __redirectToDocument({ host }) {
141
+ const metadata = {
142
+ entityFqdn: "wix.papyrus.v1.document",
143
+ method: "GET",
144
+ methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
145
+ packageName: PACKAGE_NAME,
146
+ migrationOptions: {
147
+ optInTransformResponse: true
148
+ },
149
+ url: resolveWixPapyrusV1DownloadPageControllerUrl({
150
+ protoPath: "/view",
151
+ data: payload,
152
+ host
153
+ }),
154
+ params: toURLSearchParams(payload),
155
+ transformResponse: (payload2) => transformPaths(payload2, [
156
+ {
157
+ transformFn: transformRESTBytesToSDKBytes,
158
+ paths: TRANSFORM_PATHS_0
159
+ }
160
+ ])
161
+ };
162
+ return metadata;
163
+ }
164
+ return __redirectToDocument;
165
+ }
112
166
  function createDocument(payload) {
113
167
  function __createDocument({ host }) {
114
168
  const serializedData = transformPaths(payload, [
115
169
  {
116
170
  transformFn: transformSDKTimestampToRESTTimestamp,
117
- paths: TRANSFORM_PATHS_0
171
+ paths: TRANSFORM_PATHS_1
118
172
  }
119
173
  ]);
120
174
  const metadata = {
@@ -134,7 +188,7 @@ function createDocument(payload) {
134
188
  transformResponse: (payload2) => transformPaths(payload2, [
135
189
  {
136
190
  transformFn: transformRESTTimestampToSDKTimestamp,
137
- paths: TRANSFORM_PATHS_0
191
+ paths: TRANSFORM_PATHS_1
138
192
  }
139
193
  ])
140
194
  };
@@ -161,7 +215,7 @@ function getDocument(payload) {
161
215
  transformResponse: (payload2) => transformPaths(payload2, [
162
216
  {
163
217
  transformFn: transformRESTTimestampToSDKTimestamp,
164
- paths: TRANSFORM_PATHS_0
218
+ paths: TRANSFORM_PATHS_1
165
219
  }
166
220
  ])
167
221
  };
@@ -188,7 +242,7 @@ function deleteDocument(payload) {
188
242
  transformResponse: (payload2) => transformPaths(payload2, [
189
243
  {
190
244
  transformFn: transformRESTTimestampToSDKTimestamp,
191
- paths: TRANSFORM_PATHS_0
245
+ paths: TRANSFORM_PATHS_1
192
246
  }
193
247
  ])
194
248
  };
@@ -201,7 +255,7 @@ function queryDocument(payload) {
201
255
  const serializedData = transformPaths(payload, [
202
256
  {
203
257
  transformFn: transformSDKFloatToRESTFloat,
204
- paths: TRANSFORM_PATHS_1
258
+ paths: TRANSFORM_PATHS_2
205
259
  }
206
260
  ]);
207
261
  const metadata = {
@@ -221,7 +275,7 @@ function queryDocument(payload) {
221
275
  transformResponse: (payload2) => transformPaths(payload2, [
222
276
  {
223
277
  transformFn: transformRESTTimestampToSDKTimestamp,
224
- paths: TRANSFORM_PATHS_2
278
+ paths: TRANSFORM_PATHS_3
225
279
  }
226
280
  ])
227
281
  };
@@ -248,7 +302,7 @@ function updateDocument(payload) {
248
302
  transformResponse: (payload2) => transformPaths(payload2, [
249
303
  {
250
304
  transformFn: transformRESTTimestampToSDKTimestamp,
251
- paths: TRANSFORM_PATHS_0
305
+ paths: TRANSFORM_PATHS_1
252
306
  }
253
307
  ])
254
308
  };
@@ -275,7 +329,7 @@ function downloadDocument(payload) {
275
329
  transformResponse: (payload2) => transformPaths(payload2, [
276
330
  {
277
331
  transformFn: transformRESTTimestampToSDKTimestamp,
278
- paths: TRANSFORM_PATHS_3
332
+ paths: TRANSFORM_PATHS_4
279
333
  }
280
334
  ])
281
335
  };
@@ -302,7 +356,7 @@ function getDownloadUrl(payload) {
302
356
  transformResponse: (payload2) => transformPaths(payload2, [
303
357
  {
304
358
  transformFn: transformRESTTimestampToSDKTimestamp,
305
- paths: TRANSFORM_PATHS_3
359
+ paths: TRANSFORM_PATHS_4
306
360
  }
307
361
  ])
308
362
  };
@@ -331,60 +385,6 @@ function downloadDocumentSource(payload) {
331
385
  }
332
386
  return __downloadDocumentSource;
333
387
  }
334
- function getDownloadPage(payload) {
335
- function __getDownloadPage({ host }) {
336
- const metadata = {
337
- entityFqdn: "wix.papyrus.v1.document",
338
- method: "GET",
339
- methodFqn: "wix.papyrus.v1.DownloadPageController.GetDownloadPage",
340
- packageName: PACKAGE_NAME,
341
- migrationOptions: {
342
- optInTransformResponse: true
343
- },
344
- url: resolveWixPapyrusV1DownloadPageControllerUrl({
345
- protoPath: "/download",
346
- data: payload,
347
- host
348
- }),
349
- params: toURLSearchParams(payload),
350
- transformResponse: (payload2) => transformPaths(payload2, [
351
- {
352
- transformFn: transformRESTBytesToSDKBytes,
353
- paths: TRANSFORM_PATHS_4
354
- }
355
- ])
356
- };
357
- return metadata;
358
- }
359
- return __getDownloadPage;
360
- }
361
- function redirectToDocument(payload) {
362
- function __redirectToDocument({ host }) {
363
- const metadata = {
364
- entityFqdn: "wix.papyrus.v1.document",
365
- method: "GET",
366
- methodFqn: "wix.papyrus.v1.DownloadPageController.RedirectToDocument",
367
- packageName: PACKAGE_NAME,
368
- migrationOptions: {
369
- optInTransformResponse: true
370
- },
371
- url: resolveWixPapyrusV1DownloadPageControllerUrl({
372
- protoPath: "/view",
373
- data: payload,
374
- host
375
- }),
376
- params: toURLSearchParams(payload),
377
- transformResponse: (payload2) => transformPaths(payload2, [
378
- {
379
- transformFn: transformRESTBytesToSDKBytes,
380
- paths: TRANSFORM_PATHS_4
381
- }
382
- ])
383
- };
384
- return metadata;
385
- }
386
- return __redirectToDocument;
387
- }
388
388
 
389
389
  // src/papyrus-v1-document-documents.types.ts
390
390
  var RenderStatus = /* @__PURE__ */ ((RenderStatus2) => {
@@ -407,6 +407,26 @@ var WixMpClientVersion = /* @__PURE__ */ ((WixMpClientVersion2) => {
407
407
  WixMpClientVersion2["MP_V2"] = "MP_V2";
408
408
  return WixMpClientVersion2;
409
409
  })(WixMpClientVersion || {});
410
+ var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
411
+ ResizeOption2["FIT"] = "FIT";
412
+ ResizeOption2["CROP"] = "CROP";
413
+ return ResizeOption2;
414
+ })(ResizeOption || {});
415
+ var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
416
+ PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
417
+ PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
418
+ return PaperSize2;
419
+ })(PaperSize || {});
420
+ var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
421
+ PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
422
+ PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
423
+ return PageOverflow2;
424
+ })(PageOverflow || {});
425
+ var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
426
+ RenderFormat2["PDF"] = "PDF";
427
+ RenderFormat2["HTML"] = "HTML";
428
+ return RenderFormat2;
429
+ })(RenderFormat || {});
410
430
  var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
411
431
  RequestedFields2["DOCUMENT_CONTENT"] = "DOCUMENT_CONTENT";
412
432
  return RequestedFields2;
@@ -430,28 +450,44 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
430
450
  WebhookIdentityType2["APP"] = "APP";
431
451
  return WebhookIdentityType2;
432
452
  })(WebhookIdentityType || {});
433
- var ResizeOption = /* @__PURE__ */ ((ResizeOption2) => {
434
- ResizeOption2["FIT"] = "FIT";
435
- ResizeOption2["CROP"] = "CROP";
436
- return ResizeOption2;
437
- })(ResizeOption || {});
438
- var PaperSize = /* @__PURE__ */ ((PaperSize2) => {
439
- PaperSize2["A4_PORTRAIT"] = "A4_PORTRAIT";
440
- PaperSize2["A4_LANDSCAPE"] = "A4_LANDSCAPE";
441
- return PaperSize2;
442
- })(PaperSize || {});
443
- var PageOverflow = /* @__PURE__ */ ((PageOverflow2) => {
444
- PageOverflow2["CONTENT_HIDDEN"] = "CONTENT_HIDDEN";
445
- PageOverflow2["CONTENT_BREAK"] = "CONTENT_BREAK";
446
- return PageOverflow2;
447
- })(PageOverflow || {});
448
- var RenderFormat = /* @__PURE__ */ ((RenderFormat2) => {
449
- RenderFormat2["PDF"] = "PDF";
450
- RenderFormat2["HTML"] = "HTML";
451
- return RenderFormat2;
452
- })(RenderFormat || {});
453
453
 
454
454
  // 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
+ }
455
491
  function createDocument2() {
456
492
  const payload = {};
457
493
  const getRequestOptions = createDocument(payload);
@@ -596,42 +632,6 @@ function downloadDocumentSource2() {
596
632
  __originalResponseType: null
597
633
  };
598
634
  }
599
- function getDownloadPage2() {
600
- const payload = {};
601
- const getRequestOptions = getDownloadPage(payload);
602
- const getUrl = (context) => {
603
- const { url } = getRequestOptions(context);
604
- return url;
605
- };
606
- return {
607
- getUrl,
608
- httpMethod: "GET",
609
- path: "/download",
610
- pathParams: {},
611
- __requestType: null,
612
- __originalRequestType: null,
613
- __responseType: null,
614
- __originalResponseType: null
615
- };
616
- }
617
- function redirectToDocument2() {
618
- const payload = {};
619
- const getRequestOptions = redirectToDocument(payload);
620
- const getUrl = (context) => {
621
- const { url } = getRequestOptions(context);
622
- return url;
623
- };
624
- return {
625
- getUrl,
626
- httpMethod: "GET",
627
- path: "/view",
628
- pathParams: {},
629
- __requestType: null,
630
- __originalRequestType: null,
631
- __responseType: null,
632
- __originalResponseType: null
633
- };
634
- }
635
635
  export {
636
636
  ContentDisposition as ContentDispositionOriginal,
637
637
  Format as FormatOriginal,