@wix/auto_sdk_site-import_imports 1.0.2 → 1.0.3

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