@wix/auto_sdk_site-import_imports 1.0.2 → 1.0.4

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.
@@ -25,6 +25,10 @@ function resolveWixEcomSiteImportV1SiteImportServiceUrl(opts) {
25
25
  {
26
26
  srcPath: "/site-import",
27
27
  destPath: ""
28
+ },
29
+ {
30
+ srcPath: "/ecom/site-import",
31
+ destPath: ""
28
32
  }
29
33
  ],
30
34
  _: [
@@ -271,6 +275,48 @@ function getImportSourceFileForSite(payload) {
271
275
  }
272
276
  return __getImportSourceFileForSite;
273
277
  }
278
+ function searchImportSource(payload) {
279
+ function __searchImportSource({ host }) {
280
+ const metadata = {
281
+ entityFqdn: "wix.ecom.site_import.v1.import",
282
+ method: "GET",
283
+ methodFqn: "wix.ecom.site_import.v1.SiteImportService.SearchImportSource",
284
+ packageName: PACKAGE_NAME,
285
+ migrationOptions: {
286
+ optInTransformResponse: true
287
+ },
288
+ url: resolveWixEcomSiteImportV1SiteImportServiceUrl({
289
+ protoPath: "/v1/imports/{importId}/source/search",
290
+ data: payload,
291
+ host
292
+ }),
293
+ params: toURLSearchParams(payload)
294
+ };
295
+ return metadata;
296
+ }
297
+ return __searchImportSource;
298
+ }
299
+ function searchImportSourceForSite(payload) {
300
+ function __searchImportSourceForSite({ host }) {
301
+ const metadata = {
302
+ entityFqdn: "wix.ecom.site_import.v1.import",
303
+ method: "GET",
304
+ methodFqn: "wix.ecom.site_import.v1.SiteImportService.SearchImportSourceForSite",
305
+ packageName: PACKAGE_NAME,
306
+ migrationOptions: {
307
+ optInTransformResponse: true
308
+ },
309
+ url: resolveWixEcomSiteImportV1SiteImportServiceUrl({
310
+ protoPath: "/v1/site-imports/source/search",
311
+ data: payload,
312
+ host
313
+ }),
314
+ params: toURLSearchParams(payload)
315
+ };
316
+ return metadata;
317
+ }
318
+ return __searchImportSourceForSite;
319
+ }
274
320
  function getImportBySite(payload) {
275
321
  function __getImportBySite({ host }) {
276
322
  const metadata = {
@@ -548,7 +594,13 @@ async function getImportSourceFile2(importId, checkpoint, options) {
548
594
  const payload = renameKeysFromSDKRequestToRESTRequest({
549
595
  importId,
550
596
  checkpoint,
551
- filePath: options?.filePath
597
+ filePath: options?.filePath,
598
+ tail: options?.tail,
599
+ head: options?.head,
600
+ lines: options?.lines,
601
+ grep: options?.grep,
602
+ context: options?.context,
603
+ fixed: options?.fixed
552
604
  });
553
605
  const reqOpts = getImportSourceFile(payload);
554
606
  sideEffects?.onSiteCall?.();
@@ -564,7 +616,13 @@ async function getImportSourceFile2(importId, checkpoint, options) {
564
616
  explicitPathsToArguments: {
565
617
  importId: "$[0]",
566
618
  checkpoint: "$[1]",
567
- filePath: "$[2].filePath"
619
+ filePath: "$[2].filePath",
620
+ tail: "$[2].tail",
621
+ head: "$[2].head",
622
+ lines: "$[2].lines",
623
+ grep: "$[2].grep",
624
+ context: "$[2].context",
625
+ fixed: "$[2].fixed"
568
626
  },
569
627
  singleArgumentUnchanged: false
570
628
  },
@@ -610,7 +668,13 @@ async function getImportSourceFileForSite2(checkpoint, options) {
610
668
  const payload = renameKeysFromSDKRequestToRESTRequest({
611
669
  checkpoint,
612
670
  filePath: options?.filePath,
613
- importId: options?.importId
671
+ importId: options?.importId,
672
+ tail: options?.tail,
673
+ head: options?.head,
674
+ lines: options?.lines,
675
+ grep: options?.grep,
676
+ context: options?.context,
677
+ fixed: options?.fixed
614
678
  });
615
679
  const reqOpts = getImportSourceFileForSite(payload);
616
680
  sideEffects?.onSiteCall?.();
@@ -626,7 +690,13 @@ async function getImportSourceFileForSite2(checkpoint, options) {
626
690
  explicitPathsToArguments: {
627
691
  checkpoint: "$[0]",
628
692
  filePath: "$[1].filePath",
629
- importId: "$[1].importId"
693
+ importId: "$[1].importId",
694
+ tail: "$[1].tail",
695
+ head: "$[1].head",
696
+ lines: "$[1].lines",
697
+ grep: "$[1].grep",
698
+ context: "$[1].context",
699
+ fixed: "$[1].fixed"
630
700
  },
631
701
  singleArgumentUnchanged: false
632
702
  },
@@ -636,6 +706,80 @@ async function getImportSourceFileForSite2(checkpoint, options) {
636
706
  throw transformedError;
637
707
  }
638
708
  }
709
+ async function searchImportSource2(importId, options) {
710
+ const { httpClient, sideEffects } = arguments[2];
711
+ const payload = renameKeysFromSDKRequestToRESTRequest({
712
+ importId,
713
+ checkpoint: options?.checkpoint,
714
+ pattern: options?.pattern,
715
+ fixed: options?.fixed,
716
+ context: options?.context,
717
+ pathPrefix: options?.pathPrefix
718
+ });
719
+ const reqOpts = searchImportSource(payload);
720
+ sideEffects?.onSiteCall?.();
721
+ try {
722
+ const result = await httpClient.request(reqOpts);
723
+ sideEffects?.onSuccess?.(result);
724
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
725
+ } catch (err) {
726
+ const transformedError = sdkTransformError(
727
+ err,
728
+ {
729
+ spreadPathsToArguments: {},
730
+ explicitPathsToArguments: {
731
+ importId: "$[0]",
732
+ checkpoint: "$[1].checkpoint",
733
+ pattern: "$[1].pattern",
734
+ fixed: "$[1].fixed",
735
+ context: "$[1].context",
736
+ pathPrefix: "$[1].pathPrefix"
737
+ },
738
+ singleArgumentUnchanged: false
739
+ },
740
+ ["importId", "options"]
741
+ );
742
+ sideEffects?.onError?.(err);
743
+ throw transformedError;
744
+ }
745
+ }
746
+ async function searchImportSourceForSite2(options) {
747
+ const { httpClient, sideEffects } = arguments[1];
748
+ const payload = renameKeysFromSDKRequestToRESTRequest({
749
+ importId: options?.importId,
750
+ checkpoint: options?.checkpoint,
751
+ pattern: options?.pattern,
752
+ fixed: options?.fixed,
753
+ context: options?.context,
754
+ pathPrefix: options?.pathPrefix
755
+ });
756
+ const reqOpts = searchImportSourceForSite(payload);
757
+ sideEffects?.onSiteCall?.();
758
+ try {
759
+ const result = await httpClient.request(reqOpts);
760
+ sideEffects?.onSuccess?.(result);
761
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
762
+ } catch (err) {
763
+ const transformedError = sdkTransformError(
764
+ err,
765
+ {
766
+ spreadPathsToArguments: {},
767
+ explicitPathsToArguments: {
768
+ importId: "$[0].importId",
769
+ checkpoint: "$[0].checkpoint",
770
+ pattern: "$[0].pattern",
771
+ fixed: "$[0].fixed",
772
+ context: "$[0].context",
773
+ pathPrefix: "$[0].pathPrefix"
774
+ },
775
+ singleArgumentUnchanged: false
776
+ },
777
+ ["options"]
778
+ );
779
+ sideEffects?.onError?.(err);
780
+ throw transformedError;
781
+ }
782
+ }
639
783
  async function getImportBySite2(options) {
640
784
  const { httpClient, sideEffects } = arguments[1];
641
785
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -744,6 +888,21 @@ function getImportSourceFileForSite3(httpClient) {
744
888
  { httpClient }
745
889
  );
746
890
  }
891
+ function searchImportSource3(httpClient) {
892
+ return (importId, options) => searchImportSource2(
893
+ importId,
894
+ options,
895
+ // @ts-ignore
896
+ { httpClient }
897
+ );
898
+ }
899
+ function searchImportSourceForSite3(httpClient) {
900
+ return (options) => searchImportSourceForSite2(
901
+ options,
902
+ // @ts-ignore
903
+ { httpClient }
904
+ );
905
+ }
747
906
  function getImportBySite3(httpClient) {
748
907
  return (options) => getImportBySite2(
749
908
  options,
@@ -764,6 +923,8 @@ var getImportSource4 = /* @__PURE__ */ createRESTModule(getImportSource3);
764
923
  var getImportSourceFile4 = /* @__PURE__ */ createRESTModule(getImportSourceFile3);
765
924
  var getImportSourceForSite4 = /* @__PURE__ */ createRESTModule(getImportSourceForSite3);
766
925
  var getImportSourceFileForSite4 = /* @__PURE__ */ createRESTModule(getImportSourceFileForSite3);
926
+ var searchImportSource4 = /* @__PURE__ */ createRESTModule(searchImportSource3);
927
+ var searchImportSourceForSite4 = /* @__PURE__ */ createRESTModule(searchImportSourceForSite3);
767
928
  var getImportBySite4 = /* @__PURE__ */ createRESTModule(getImportBySite3);
768
929
  export {
769
930
  ImportActivityKind,
@@ -782,6 +943,8 @@ export {
782
943
  getImportSourceFileForSite4 as getImportSourceFileForSite,
783
944
  getImportSourceForSite4 as getImportSourceForSite,
784
945
  getImportStatus4 as getImportStatus,
946
+ searchImportSource4 as searchImportSource,
947
+ searchImportSourceForSite4 as searchImportSourceForSite,
785
948
  sendImportMessage4 as sendImportMessage,
786
949
  startFrontendPreview4 as startFrontendPreview,
787
950
  startImport4 as startImport