@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.
- package/build/cjs/index.d.ts +31 -5
- package/build/cjs/index.js +169 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +363 -5
- package/build/cjs/index.typings.js +152 -4
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +238 -2
- package/build/cjs/meta.js +86 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +31 -5
- package/build/es/index.mjs +167 -4
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +363 -5
- package/build/es/index.typings.mjs +150 -4
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +238 -2
- package/build/es/meta.mjs +84 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +31 -5
- package/build/internal/cjs/index.typings.d.ts +363 -5
- package/build/internal/cjs/meta.d.ts +238 -2
- package/build/internal/es/index.d.mts +31 -5
- package/build/internal/es/index.typings.d.mts +363 -5
- package/build/internal/es/meta.d.mts +238 -2
- package/package.json +2 -2
|
@@ -679,6 +679,31 @@ interface GetImportSourceFileRequest {
|
|
|
679
679
|
* @maxLength 500
|
|
680
680
|
*/
|
|
681
681
|
filePath: string;
|
|
682
|
+
/**
|
|
683
|
+
* QUERY OPTIONS (spec 0027) — at most one of `tail`, `head`, `lines`, `grep`.
|
|
684
|
+
* Served from the S3 snapshot only (never a clone): a checkpoint with no
|
|
685
|
+
* snapshot answers FAILED_PRECONDITION, an account outside the rollout
|
|
686
|
+
* UNIMPLEMENTED. When none is set the call is the plain bounded preview.
|
|
687
|
+
*
|
|
688
|
+
* Return only the last N lines of the file (N ≤ 200).
|
|
689
|
+
*/
|
|
690
|
+
tail?: number;
|
|
691
|
+
/** Return only the first N lines of the file (N ≤ 200). */
|
|
692
|
+
head?: number;
|
|
693
|
+
/**
|
|
694
|
+
* Return a line range such as "10-60" (at most 200 lines).
|
|
695
|
+
* @maxLength 20
|
|
696
|
+
*/
|
|
697
|
+
lines?: string;
|
|
698
|
+
/**
|
|
699
|
+
* Return the lines matching this pattern (with `context` lines around each).
|
|
700
|
+
* @maxLength 200
|
|
701
|
+
*/
|
|
702
|
+
grep?: string;
|
|
703
|
+
/** Lines of context around each `grep` match, 0-10. */
|
|
704
|
+
context?: number;
|
|
705
|
+
/** Treat `grep` as a literal string instead of a regular expression. */
|
|
706
|
+
fixed?: boolean;
|
|
682
707
|
}
|
|
683
708
|
interface GetImportSourceFileResponse {
|
|
684
709
|
/**
|
|
@@ -707,6 +732,36 @@ interface GetImportSourceFileResponse {
|
|
|
707
732
|
* clipped, not the complete file.
|
|
708
733
|
*/
|
|
709
734
|
truncated?: boolean;
|
|
735
|
+
/**
|
|
736
|
+
* First line number of `content` for `head`/`lines`; absent for `tail`
|
|
737
|
+
* (the line number of a file's end is not known without reading all of it).
|
|
738
|
+
*/
|
|
739
|
+
firstLine?: number;
|
|
740
|
+
/**
|
|
741
|
+
* `grep` results (with context lines), in file order. `content` is empty.
|
|
742
|
+
* @maxSize 5000
|
|
743
|
+
*/
|
|
744
|
+
matches?: SourceMatch[];
|
|
745
|
+
/**
|
|
746
|
+
* Why a query result is incomplete — MAX_LINES, MAX_MATCHES, RESPONSE_SIZE,
|
|
747
|
+
* TIME, LINE_CLIPPED (a line over 64 KiB was cut, so text past it was not
|
|
748
|
+
* seen) or STORED_PREFIX_ONLY (the file is over 25 MB and only its start is
|
|
749
|
+
* stored). Set whenever `truncated` is true for a query.
|
|
750
|
+
* @maxLength 32
|
|
751
|
+
*/
|
|
752
|
+
truncatedReason?: string;
|
|
753
|
+
}
|
|
754
|
+
/** One matching (or context) line of a `grep` query on a single file. */
|
|
755
|
+
interface SourceMatch {
|
|
756
|
+
/** 1-based line number within the file. */
|
|
757
|
+
line?: number;
|
|
758
|
+
/**
|
|
759
|
+
* The line's text (clipped to 2000 characters).
|
|
760
|
+
* @maxLength 2000
|
|
761
|
+
*/
|
|
762
|
+
text?: string;
|
|
763
|
+
/** True for a context line around a match, false for the match itself. */
|
|
764
|
+
contextLine?: boolean;
|
|
710
765
|
}
|
|
711
766
|
interface GetImportSourceForSiteRequest {
|
|
712
767
|
/**
|
|
@@ -822,6 +877,31 @@ interface GetImportSourceFileForSiteRequest {
|
|
|
822
877
|
* @format GUID
|
|
823
878
|
*/
|
|
824
879
|
importId: string;
|
|
880
|
+
/**
|
|
881
|
+
* QUERY OPTIONS (spec 0027) — at most one of `tail`, `head`, `lines`, `grep`.
|
|
882
|
+
* Served from the S3 snapshot only (never a clone): a checkpoint with no
|
|
883
|
+
* snapshot answers FAILED_PRECONDITION, an account outside the rollout
|
|
884
|
+
* UNIMPLEMENTED. When none is set the call is the plain bounded preview.
|
|
885
|
+
*
|
|
886
|
+
* Return only the last N lines of the file (N ≤ 200).
|
|
887
|
+
*/
|
|
888
|
+
tail?: number;
|
|
889
|
+
/** Return only the first N lines of the file (N ≤ 200). */
|
|
890
|
+
head?: number;
|
|
891
|
+
/**
|
|
892
|
+
* Return a line range such as "10-60" (at most 200 lines).
|
|
893
|
+
* @maxLength 20
|
|
894
|
+
*/
|
|
895
|
+
lines?: string;
|
|
896
|
+
/**
|
|
897
|
+
* Return the lines matching this pattern (with `context` lines around each).
|
|
898
|
+
* @maxLength 200
|
|
899
|
+
*/
|
|
900
|
+
grep?: string;
|
|
901
|
+
/** Lines of context around each `grep` match, 0-10. */
|
|
902
|
+
context?: number;
|
|
903
|
+
/** Treat `grep` as a literal string instead of a regular expression. */
|
|
904
|
+
fixed?: boolean;
|
|
825
905
|
}
|
|
826
906
|
/**
|
|
827
907
|
* Identical shape to GetImportSourceFileResponse — a distinct message only
|
|
@@ -854,6 +934,158 @@ interface GetImportSourceFileForSiteResponse {
|
|
|
854
934
|
* clipped, not the complete file.
|
|
855
935
|
*/
|
|
856
936
|
truncated?: boolean;
|
|
937
|
+
/**
|
|
938
|
+
* First line number of `content` for `head`/`lines`; absent for `tail`
|
|
939
|
+
* (the line number of a file's end is not known without reading all of it).
|
|
940
|
+
*/
|
|
941
|
+
firstLine?: number;
|
|
942
|
+
/**
|
|
943
|
+
* `grep` results (with context lines), in file order. `content` is empty.
|
|
944
|
+
* @maxSize 5000
|
|
945
|
+
*/
|
|
946
|
+
matches?: SourceMatch[];
|
|
947
|
+
/**
|
|
948
|
+
* Why a query result is incomplete — MAX_LINES, MAX_MATCHES, RESPONSE_SIZE,
|
|
949
|
+
* TIME, LINE_CLIPPED (a line over 64 KiB was cut, so text past it was not
|
|
950
|
+
* seen) or STORED_PREFIX_ONLY (the file is over 25 MB and only its start is
|
|
951
|
+
* stored). Set whenever `truncated` is true for a query.
|
|
952
|
+
* @maxLength 32
|
|
953
|
+
*/
|
|
954
|
+
truncatedReason?: string;
|
|
955
|
+
}
|
|
956
|
+
interface SearchImportSourceRequest {
|
|
957
|
+
/**
|
|
958
|
+
* Id of the import whose source to search.
|
|
959
|
+
* @format GUID
|
|
960
|
+
*/
|
|
961
|
+
importId: string;
|
|
962
|
+
/**
|
|
963
|
+
* Checkpoint to search AS OF — a prior GetImportSource response's
|
|
964
|
+
* `checkpoint`. Absent = the latest checkpoint.
|
|
965
|
+
* @maxLength 40
|
|
966
|
+
*/
|
|
967
|
+
checkpoint?: string;
|
|
968
|
+
/**
|
|
969
|
+
* The pattern to look for (a regular expression unless `fixed`).
|
|
970
|
+
* @maxLength 200
|
|
971
|
+
*/
|
|
972
|
+
pattern: string;
|
|
973
|
+
/** Treat `pattern` as a literal string. */
|
|
974
|
+
fixed?: boolean;
|
|
975
|
+
/** Lines of context around each match, 0-10. */
|
|
976
|
+
context?: number;
|
|
977
|
+
/**
|
|
978
|
+
* Only search files whose path starts with this prefix.
|
|
979
|
+
* @maxLength 500
|
|
980
|
+
*/
|
|
981
|
+
pathPrefix?: string;
|
|
982
|
+
}
|
|
983
|
+
interface SearchImportSourceResponse {
|
|
984
|
+
/**
|
|
985
|
+
* Id of this import (echoes the request).
|
|
986
|
+
* @format GUID
|
|
987
|
+
*/
|
|
988
|
+
importId?: string;
|
|
989
|
+
/**
|
|
990
|
+
* The checkpoint that was searched.
|
|
991
|
+
* @maxLength 40
|
|
992
|
+
*/
|
|
993
|
+
checkpoint?: string;
|
|
994
|
+
/**
|
|
995
|
+
* Matching lines (and their context), in path order.
|
|
996
|
+
* @maxSize 5000
|
|
997
|
+
*/
|
|
998
|
+
matches?: SearchMatch[];
|
|
999
|
+
/** True if the scan stopped before covering every file. */
|
|
1000
|
+
truncated?: boolean;
|
|
1001
|
+
/**
|
|
1002
|
+
* Why: MAX_FILES, MAX_BYTES, MAX_MATCHES, RESPONSE_SIZE, TIME, LINE_CLIPPED (a
|
|
1003
|
+
* line over 64 KiB was cut) or STORED_PREFIX_ONLY (a file over 25 MB is stored
|
|
1004
|
+
* only in part). Unknown values should be treated as "partial result".
|
|
1005
|
+
* @maxLength 32
|
|
1006
|
+
*/
|
|
1007
|
+
truncatedReason?: string;
|
|
1008
|
+
/**
|
|
1009
|
+
* The last path fully scanned, so a capped search can continue with a
|
|
1010
|
+
* narrower `path_prefix`.
|
|
1011
|
+
* @maxLength 500
|
|
1012
|
+
*/
|
|
1013
|
+
lastPathScanned?: string;
|
|
1014
|
+
}
|
|
1015
|
+
/** One matching (or context) line found by SearchImportSource. */
|
|
1016
|
+
interface SearchMatch {
|
|
1017
|
+
/**
|
|
1018
|
+
* File the line is in, relative to the repository root.
|
|
1019
|
+
* @maxLength 500
|
|
1020
|
+
*/
|
|
1021
|
+
path?: string;
|
|
1022
|
+
/** 1-based line number within the file. */
|
|
1023
|
+
line?: number;
|
|
1024
|
+
/**
|
|
1025
|
+
* The line's text (clipped to 2000 characters).
|
|
1026
|
+
* @maxLength 2000
|
|
1027
|
+
*/
|
|
1028
|
+
text?: string;
|
|
1029
|
+
/** True for a context line around a match, false for the match itself. */
|
|
1030
|
+
contextLine?: boolean;
|
|
1031
|
+
}
|
|
1032
|
+
interface SearchImportSourceForSiteRequest {
|
|
1033
|
+
/**
|
|
1034
|
+
* OPTIONAL. Pins the search to the import a prior GetImportSourceForSite
|
|
1035
|
+
* response resolved; the server re-verifies it belongs to the caller's site.
|
|
1036
|
+
* @format GUID
|
|
1037
|
+
*/
|
|
1038
|
+
importId?: string;
|
|
1039
|
+
/**
|
|
1040
|
+
* Checkpoint to search AS OF. Absent = the latest checkpoint.
|
|
1041
|
+
* @maxLength 40
|
|
1042
|
+
*/
|
|
1043
|
+
checkpoint?: string;
|
|
1044
|
+
/**
|
|
1045
|
+
* The pattern to look for (a regular expression unless `fixed`).
|
|
1046
|
+
* @maxLength 200
|
|
1047
|
+
*/
|
|
1048
|
+
pattern: string;
|
|
1049
|
+
/** Treat `pattern` as a literal string. */
|
|
1050
|
+
fixed?: boolean;
|
|
1051
|
+
/** Lines of context around each match, 0-10. */
|
|
1052
|
+
context?: number;
|
|
1053
|
+
/**
|
|
1054
|
+
* Only search files whose path starts with this prefix.
|
|
1055
|
+
* @maxLength 500
|
|
1056
|
+
*/
|
|
1057
|
+
pathPrefix?: string;
|
|
1058
|
+
}
|
|
1059
|
+
interface SearchImportSourceForSiteResponse {
|
|
1060
|
+
/**
|
|
1061
|
+
* Id of the import resolved for the caller's site.
|
|
1062
|
+
* @format GUID
|
|
1063
|
+
*/
|
|
1064
|
+
importId?: string;
|
|
1065
|
+
/**
|
|
1066
|
+
* The checkpoint that was searched.
|
|
1067
|
+
* @maxLength 40
|
|
1068
|
+
*/
|
|
1069
|
+
checkpoint?: string;
|
|
1070
|
+
/**
|
|
1071
|
+
* Matching lines (and their context), in path order.
|
|
1072
|
+
* @maxSize 5000
|
|
1073
|
+
*/
|
|
1074
|
+
matches?: SearchMatch[];
|
|
1075
|
+
/** True if the scan stopped before covering every file. */
|
|
1076
|
+
truncated?: boolean;
|
|
1077
|
+
/**
|
|
1078
|
+
* Why: MAX_FILES, MAX_BYTES, MAX_MATCHES, RESPONSE_SIZE, TIME, LINE_CLIPPED (a
|
|
1079
|
+
* line over 64 KiB was cut) or STORED_PREFIX_ONLY (a file over 25 MB is stored
|
|
1080
|
+
* only in part). Unknown values should be treated as "partial result".
|
|
1081
|
+
* @maxLength 32
|
|
1082
|
+
*/
|
|
1083
|
+
truncatedReason?: string;
|
|
1084
|
+
/**
|
|
1085
|
+
* The last path fully scanned, so a capped search can continue.
|
|
1086
|
+
* @maxLength 500
|
|
1087
|
+
*/
|
|
1088
|
+
lastPathScanned?: string;
|
|
857
1089
|
}
|
|
858
1090
|
interface GetImportBySiteRequest {
|
|
859
1091
|
/**
|
|
@@ -1113,12 +1345,11 @@ interface GetImportSourceOptions {
|
|
|
1113
1345
|
* @documentationMaturity preview
|
|
1114
1346
|
* @requiredField checkpoint
|
|
1115
1347
|
* @requiredField importId
|
|
1116
|
-
* @requiredField options
|
|
1117
1348
|
* @requiredField options.filePath
|
|
1118
1349
|
* @permissionId ecom:site_import:v1:import:get_import_source_file
|
|
1119
1350
|
* @fqn wix.ecom.site_import.v1.SiteImportService.GetImportSourceFile
|
|
1120
1351
|
*/
|
|
1121
|
-
declare function getImportSourceFile(importId: string, checkpoint: string, options
|
|
1352
|
+
declare function getImportSourceFile(importId: string, checkpoint: string, options?: NonNullablePaths<GetImportSourceFileOptions, `filePath`, 0>): Promise<NonNullablePaths<GetImportSourceFileResponse, `importId` | `checkpoint` | `path` | `content` | `truncated` | `firstLine` | `matches` | `matches.${number}.line` | `matches.${number}.text` | `matches.${number}.contextLine` | `truncatedReason`, 2>>;
|
|
1122
1353
|
interface GetImportSourceFileOptions {
|
|
1123
1354
|
/**
|
|
1124
1355
|
* Path relative to the migration root, as named in a `SourceFile`/
|
|
@@ -1126,6 +1357,31 @@ interface GetImportSourceFileOptions {
|
|
|
1126
1357
|
* @maxLength 500
|
|
1127
1358
|
*/
|
|
1128
1359
|
filePath: string;
|
|
1360
|
+
/**
|
|
1361
|
+
* QUERY OPTIONS (spec 0027) — at most one of `tail`, `head`, `lines`, `grep`.
|
|
1362
|
+
* Served from the S3 snapshot only (never a clone): a checkpoint with no
|
|
1363
|
+
* snapshot answers FAILED_PRECONDITION, an account outside the rollout
|
|
1364
|
+
* UNIMPLEMENTED. When none is set the call is the plain bounded preview.
|
|
1365
|
+
*
|
|
1366
|
+
* Return only the last N lines of the file (N ≤ 200).
|
|
1367
|
+
*/
|
|
1368
|
+
tail?: number;
|
|
1369
|
+
/** Return only the first N lines of the file (N ≤ 200). */
|
|
1370
|
+
head?: number;
|
|
1371
|
+
/**
|
|
1372
|
+
* Return a line range such as "10-60" (at most 200 lines).
|
|
1373
|
+
* @maxLength 20
|
|
1374
|
+
*/
|
|
1375
|
+
lines?: string;
|
|
1376
|
+
/**
|
|
1377
|
+
* Return the lines matching this pattern (with `context` lines around each).
|
|
1378
|
+
* @maxLength 200
|
|
1379
|
+
*/
|
|
1380
|
+
grep?: string;
|
|
1381
|
+
/** Lines of context around each `grep` match, 0-10. */
|
|
1382
|
+
context?: number;
|
|
1383
|
+
/** Treat `grep` as a literal string instead of a regular expression. */
|
|
1384
|
+
fixed?: boolean;
|
|
1129
1385
|
}
|
|
1130
1386
|
/**
|
|
1131
1387
|
* Same manifest/delta contract as GetImportSource, but scoped to the
|
|
@@ -1202,7 +1458,6 @@ interface GetImportSourceForSiteOptions {
|
|
|
1202
1458
|
* @public
|
|
1203
1459
|
* @documentationMaturity preview
|
|
1204
1460
|
* @requiredField checkpoint
|
|
1205
|
-
* @requiredField options
|
|
1206
1461
|
* @requiredField options.filePath
|
|
1207
1462
|
* @requiredField options.importId
|
|
1208
1463
|
* @permissionId ecom:site_import:v1:import:get_import_source_file_for_site
|
|
@@ -1211,7 +1466,7 @@ interface GetImportSourceForSiteOptions {
|
|
|
1211
1466
|
* one rpc name.
|
|
1212
1467
|
* @fqn wix.ecom.site_import.v1.SiteImportService.GetImportSourceFileForSite
|
|
1213
1468
|
*/
|
|
1214
|
-
declare function getImportSourceFileForSite(checkpoint: string, options
|
|
1469
|
+
declare function getImportSourceFileForSite(checkpoint: string, options?: NonNullablePaths<GetImportSourceFileForSiteOptions, `filePath` | `importId`, 0>): Promise<NonNullablePaths<GetImportSourceFileForSiteResponse, `importId` | `checkpoint` | `path` | `content` | `truncated` | `firstLine` | `matches` | `matches.${number}.line` | `matches.${number}.text` | `matches.${number}.contextLine` | `truncatedReason`, 2>>;
|
|
1215
1470
|
interface GetImportSourceFileForSiteOptions {
|
|
1216
1471
|
/**
|
|
1217
1472
|
* Path relative to the migration root, as named in a `SourceFile`/
|
|
@@ -1232,6 +1487,109 @@ interface GetImportSourceFileForSiteOptions {
|
|
|
1232
1487
|
* @format GUID
|
|
1233
1488
|
*/
|
|
1234
1489
|
importId: string;
|
|
1490
|
+
/**
|
|
1491
|
+
* QUERY OPTIONS (spec 0027) — at most one of `tail`, `head`, `lines`, `grep`.
|
|
1492
|
+
* Served from the S3 snapshot only (never a clone): a checkpoint with no
|
|
1493
|
+
* snapshot answers FAILED_PRECONDITION, an account outside the rollout
|
|
1494
|
+
* UNIMPLEMENTED. When none is set the call is the plain bounded preview.
|
|
1495
|
+
*
|
|
1496
|
+
* Return only the last N lines of the file (N ≤ 200).
|
|
1497
|
+
*/
|
|
1498
|
+
tail?: number;
|
|
1499
|
+
/** Return only the first N lines of the file (N ≤ 200). */
|
|
1500
|
+
head?: number;
|
|
1501
|
+
/**
|
|
1502
|
+
* Return a line range such as "10-60" (at most 200 lines).
|
|
1503
|
+
* @maxLength 20
|
|
1504
|
+
*/
|
|
1505
|
+
lines?: string;
|
|
1506
|
+
/**
|
|
1507
|
+
* Return the lines matching this pattern (with `context` lines around each).
|
|
1508
|
+
* @maxLength 200
|
|
1509
|
+
*/
|
|
1510
|
+
grep?: string;
|
|
1511
|
+
/** Lines of context around each `grep` match, 0-10. */
|
|
1512
|
+
context?: number;
|
|
1513
|
+
/** Treat `grep` as a literal string instead of a regular expression. */
|
|
1514
|
+
fixed?: boolean;
|
|
1515
|
+
}
|
|
1516
|
+
/**
|
|
1517
|
+
* Search the migration's source for a pattern WITHOUT downloading it (spec
|
|
1518
|
+
* 0027): the service streams each file from S3, matches, and returns only
|
|
1519
|
+
* the matching lines (with optional context). Works only on checkpoints
|
|
1520
|
+
* that have a snapshot and only for accounts the snapshot-read rollout
|
|
1521
|
+
* covers; otherwise FAILED_PRECONDITION / UNIMPLEMENTED. Bounded — a
|
|
1522
|
+
* `truncated_reason` says which cap (files, bytes, time, matches, response
|
|
1523
|
+
* size) ended the scan and `last_path_scanned` lets the caller continue with
|
|
1524
|
+
* a narrower `path_prefix`.
|
|
1525
|
+
* @param importId - Id of the import whose source to search.
|
|
1526
|
+
* @public
|
|
1527
|
+
* @documentationMaturity preview
|
|
1528
|
+
* @requiredField importId
|
|
1529
|
+
* @requiredField options.pattern
|
|
1530
|
+
* @permissionId ecom:site_import:v1:import:search_import_source
|
|
1531
|
+
* @fqn wix.ecom.site_import.v1.SiteImportService.SearchImportSource
|
|
1532
|
+
*/
|
|
1533
|
+
declare function searchImportSource(importId: string, options?: NonNullablePaths<SearchImportSourceOptions, `pattern`, 0>): Promise<NonNullablePaths<SearchImportSourceResponse, `importId` | `checkpoint` | `matches` | `matches.${number}.path` | `matches.${number}.line` | `matches.${number}.text` | `matches.${number}.contextLine` | `truncated` | `truncatedReason` | `lastPathScanned`, 2>>;
|
|
1534
|
+
interface SearchImportSourceOptions {
|
|
1535
|
+
/**
|
|
1536
|
+
* Checkpoint to search AS OF — a prior GetImportSource response's
|
|
1537
|
+
* `checkpoint`. Absent = the latest checkpoint.
|
|
1538
|
+
* @maxLength 40
|
|
1539
|
+
*/
|
|
1540
|
+
checkpoint?: string;
|
|
1541
|
+
/**
|
|
1542
|
+
* The pattern to look for (a regular expression unless `fixed`).
|
|
1543
|
+
* @maxLength 200
|
|
1544
|
+
*/
|
|
1545
|
+
pattern: string;
|
|
1546
|
+
/** Treat `pattern` as a literal string. */
|
|
1547
|
+
fixed?: boolean;
|
|
1548
|
+
/** Lines of context around each match, 0-10. */
|
|
1549
|
+
context?: number;
|
|
1550
|
+
/**
|
|
1551
|
+
* Only search files whose path starts with this prefix.
|
|
1552
|
+
* @maxLength 500
|
|
1553
|
+
*/
|
|
1554
|
+
pathPrefix?: string;
|
|
1555
|
+
}
|
|
1556
|
+
/**
|
|
1557
|
+
* SITE-tenancy counterpart to SearchImportSource: the import is resolved
|
|
1558
|
+
* from the caller's destination site (optionally pinned with `import_id`),
|
|
1559
|
+
* exactly like GetImportSourceForSite.
|
|
1560
|
+
* @public
|
|
1561
|
+
* @documentationMaturity preview
|
|
1562
|
+
* @requiredField options.pattern
|
|
1563
|
+
* @permissionId ecom:site_import:v1:import:search_import_source_for_site
|
|
1564
|
+
* @fqn wix.ecom.site_import.v1.SiteImportService.SearchImportSourceForSite
|
|
1565
|
+
*/
|
|
1566
|
+
declare function searchImportSourceForSite(options?: NonNullablePaths<SearchImportSourceForSiteOptions, `pattern`, 0>): Promise<NonNullablePaths<SearchImportSourceForSiteResponse, `importId` | `checkpoint` | `matches` | `matches.${number}.path` | `matches.${number}.line` | `matches.${number}.text` | `matches.${number}.contextLine` | `truncated` | `truncatedReason` | `lastPathScanned`, 2>>;
|
|
1567
|
+
interface SearchImportSourceForSiteOptions {
|
|
1568
|
+
/**
|
|
1569
|
+
* OPTIONAL. Pins the search to the import a prior GetImportSourceForSite
|
|
1570
|
+
* response resolved; the server re-verifies it belongs to the caller's site.
|
|
1571
|
+
* @format GUID
|
|
1572
|
+
*/
|
|
1573
|
+
importId?: string;
|
|
1574
|
+
/**
|
|
1575
|
+
* Checkpoint to search AS OF. Absent = the latest checkpoint.
|
|
1576
|
+
* @maxLength 40
|
|
1577
|
+
*/
|
|
1578
|
+
checkpoint?: string;
|
|
1579
|
+
/**
|
|
1580
|
+
* The pattern to look for (a regular expression unless `fixed`).
|
|
1581
|
+
* @maxLength 200
|
|
1582
|
+
*/
|
|
1583
|
+
pattern: string;
|
|
1584
|
+
/** Treat `pattern` as a literal string. */
|
|
1585
|
+
fixed?: boolean;
|
|
1586
|
+
/** Lines of context around each match, 0-10. */
|
|
1587
|
+
context?: number;
|
|
1588
|
+
/**
|
|
1589
|
+
* Only search files whose path starts with this prefix.
|
|
1590
|
+
* @maxLength 500
|
|
1591
|
+
*/
|
|
1592
|
+
pathPrefix?: string;
|
|
1235
1593
|
}
|
|
1236
1594
|
/**
|
|
1237
1595
|
* Recovers the `import_id` for the site/fileset this call is scoped to, when
|
|
@@ -1279,4 +1637,4 @@ interface GetImportBySiteOptions {
|
|
|
1279
1637
|
fileUrls?: string[];
|
|
1280
1638
|
}
|
|
1281
1639
|
|
|
1282
|
-
export { type CancelImportRequest, type CancelImportResponse, type ClaudeResultSummary, type FailedTaskDetail, type GetImportBySiteOptions, type GetImportBySiteRequest, type GetImportBySiteResponse, type GetImportDebugRequest, type GetImportDebugResponse, type GetImportSourceFileForSiteOptions, type GetImportSourceFileForSiteRequest, type GetImportSourceFileForSiteResponse, type GetImportSourceFileOptions, type GetImportSourceFileRequest, type GetImportSourceFileResponse, type GetImportSourceForSiteOptions, type GetImportSourceForSiteRequest, type GetImportSourceForSiteResponse, type GetImportSourceOptions, type GetImportSourceRequest, type GetImportSourceResponse, type GetImportStatusOptions, type GetImportStatusRequest, type GetImportStatusResponse, type Import, type ImportActivity, ImportActivityKind, type ImportActivityKindWithLiterals, type ImportArtifact, ImportArtifactFormat, type ImportArtifactFormatWithLiterals, ImportStatus, type ImportStatusWithLiterals, type ImportTodo, ImportTodoStatus, type ImportTodoStatusWithLiterals, type SendImportMessageRequest, type SendImportMessageResponse, type SourceChange, SourceChangeStatus, type SourceChangeStatusWithLiterals, SourceConfidence, type SourceConfidenceWithLiterals, type SourceFile, SourcePlatform, type SourcePlatformWithLiterals, SourceSyncMode, type SourceSyncModeWithLiterals, type StartFrontendPreviewRequest, type StartFrontendPreviewResponse, type StartImportOptions, type StartImportRequest, type StartImportResponse, type TaskDebug, cancelImport, getImportBySite, getImportDebug, getImportSource, getImportSourceFile, getImportSourceFileForSite, getImportSourceForSite, getImportStatus, sendImportMessage, startFrontendPreview, startImport };
|
|
1640
|
+
export { type CancelImportRequest, type CancelImportResponse, type ClaudeResultSummary, type FailedTaskDetail, type GetImportBySiteOptions, type GetImportBySiteRequest, type GetImportBySiteResponse, type GetImportDebugRequest, type GetImportDebugResponse, type GetImportSourceFileForSiteOptions, type GetImportSourceFileForSiteRequest, type GetImportSourceFileForSiteResponse, type GetImportSourceFileOptions, type GetImportSourceFileRequest, type GetImportSourceFileResponse, type GetImportSourceForSiteOptions, type GetImportSourceForSiteRequest, type GetImportSourceForSiteResponse, type GetImportSourceOptions, type GetImportSourceRequest, type GetImportSourceResponse, type GetImportStatusOptions, type GetImportStatusRequest, type GetImportStatusResponse, type Import, type ImportActivity, ImportActivityKind, type ImportActivityKindWithLiterals, type ImportArtifact, ImportArtifactFormat, type ImportArtifactFormatWithLiterals, ImportStatus, type ImportStatusWithLiterals, type ImportTodo, ImportTodoStatus, type ImportTodoStatusWithLiterals, type SearchImportSourceForSiteOptions, type SearchImportSourceForSiteRequest, type SearchImportSourceForSiteResponse, type SearchImportSourceOptions, type SearchImportSourceRequest, type SearchImportSourceResponse, type SearchMatch, type SendImportMessageRequest, type SendImportMessageResponse, type SourceChange, SourceChangeStatus, type SourceChangeStatusWithLiterals, SourceConfidence, type SourceConfidenceWithLiterals, type SourceFile, type SourceMatch, SourcePlatform, type SourcePlatformWithLiterals, SourceSyncMode, type SourceSyncModeWithLiterals, type StartFrontendPreviewRequest, type StartFrontendPreviewResponse, type StartImportOptions, type StartImportRequest, type StartImportResponse, type TaskDebug, cancelImport, getImportBySite, getImportDebug, getImportSource, getImportSourceFile, getImportSourceFileForSite, getImportSourceForSite, getImportStatus, searchImportSource, searchImportSourceForSite, sendImportMessage, startFrontendPreview, startImport };
|
|
@@ -36,6 +36,8 @@ __export(index_typings_exports, {
|
|
|
36
36
|
getImportSourceFileForSite: () => getImportSourceFileForSite2,
|
|
37
37
|
getImportSourceForSite: () => getImportSourceForSite2,
|
|
38
38
|
getImportStatus: () => getImportStatus2,
|
|
39
|
+
searchImportSource: () => searchImportSource2,
|
|
40
|
+
searchImportSourceForSite: () => searchImportSourceForSite2,
|
|
39
41
|
sendImportMessage: () => sendImportMessage2,
|
|
40
42
|
startFrontendPreview: () => startFrontendPreview2,
|
|
41
43
|
startImport: () => startImport2
|
|
@@ -66,6 +68,10 @@ function resolveWixEcomSiteImportV1SiteImportServiceUrl(opts) {
|
|
|
66
68
|
{
|
|
67
69
|
srcPath: "/site-import",
|
|
68
70
|
destPath: ""
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
srcPath: "/ecom/site-import",
|
|
74
|
+
destPath: ""
|
|
69
75
|
}
|
|
70
76
|
],
|
|
71
77
|
_: [
|
|
@@ -312,6 +318,48 @@ function getImportSourceFileForSite(payload) {
|
|
|
312
318
|
}
|
|
313
319
|
return __getImportSourceFileForSite;
|
|
314
320
|
}
|
|
321
|
+
function searchImportSource(payload) {
|
|
322
|
+
function __searchImportSource({ host }) {
|
|
323
|
+
const metadata = {
|
|
324
|
+
entityFqdn: "wix.ecom.site_import.v1.import",
|
|
325
|
+
method: "GET",
|
|
326
|
+
methodFqn: "wix.ecom.site_import.v1.SiteImportService.SearchImportSource",
|
|
327
|
+
packageName: PACKAGE_NAME,
|
|
328
|
+
migrationOptions: {
|
|
329
|
+
optInTransformResponse: true
|
|
330
|
+
},
|
|
331
|
+
url: resolveWixEcomSiteImportV1SiteImportServiceUrl({
|
|
332
|
+
protoPath: "/v1/imports/{importId}/source/search",
|
|
333
|
+
data: payload,
|
|
334
|
+
host
|
|
335
|
+
}),
|
|
336
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
337
|
+
};
|
|
338
|
+
return metadata;
|
|
339
|
+
}
|
|
340
|
+
return __searchImportSource;
|
|
341
|
+
}
|
|
342
|
+
function searchImportSourceForSite(payload) {
|
|
343
|
+
function __searchImportSourceForSite({ host }) {
|
|
344
|
+
const metadata = {
|
|
345
|
+
entityFqdn: "wix.ecom.site_import.v1.import",
|
|
346
|
+
method: "GET",
|
|
347
|
+
methodFqn: "wix.ecom.site_import.v1.SiteImportService.SearchImportSourceForSite",
|
|
348
|
+
packageName: PACKAGE_NAME,
|
|
349
|
+
migrationOptions: {
|
|
350
|
+
optInTransformResponse: true
|
|
351
|
+
},
|
|
352
|
+
url: resolveWixEcomSiteImportV1SiteImportServiceUrl({
|
|
353
|
+
protoPath: "/v1/site-imports/source/search",
|
|
354
|
+
data: payload,
|
|
355
|
+
host
|
|
356
|
+
}),
|
|
357
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
358
|
+
};
|
|
359
|
+
return metadata;
|
|
360
|
+
}
|
|
361
|
+
return __searchImportSourceForSite;
|
|
362
|
+
}
|
|
315
363
|
function getImportBySite(payload) {
|
|
316
364
|
function __getImportBySite({ host }) {
|
|
317
365
|
const metadata = {
|
|
@@ -589,7 +637,13 @@ async function getImportSourceFile2(importId, checkpoint, options) {
|
|
|
589
637
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
590
638
|
importId,
|
|
591
639
|
checkpoint,
|
|
592
|
-
filePath: options?.filePath
|
|
640
|
+
filePath: options?.filePath,
|
|
641
|
+
tail: options?.tail,
|
|
642
|
+
head: options?.head,
|
|
643
|
+
lines: options?.lines,
|
|
644
|
+
grep: options?.grep,
|
|
645
|
+
context: options?.context,
|
|
646
|
+
fixed: options?.fixed
|
|
593
647
|
});
|
|
594
648
|
const reqOpts = getImportSourceFile(payload);
|
|
595
649
|
sideEffects?.onSiteCall?.();
|
|
@@ -605,7 +659,13 @@ async function getImportSourceFile2(importId, checkpoint, options) {
|
|
|
605
659
|
explicitPathsToArguments: {
|
|
606
660
|
importId: "$[0]",
|
|
607
661
|
checkpoint: "$[1]",
|
|
608
|
-
filePath: "$[2].filePath"
|
|
662
|
+
filePath: "$[2].filePath",
|
|
663
|
+
tail: "$[2].tail",
|
|
664
|
+
head: "$[2].head",
|
|
665
|
+
lines: "$[2].lines",
|
|
666
|
+
grep: "$[2].grep",
|
|
667
|
+
context: "$[2].context",
|
|
668
|
+
fixed: "$[2].fixed"
|
|
609
669
|
},
|
|
610
670
|
singleArgumentUnchanged: false
|
|
611
671
|
},
|
|
@@ -651,7 +711,13 @@ async function getImportSourceFileForSite2(checkpoint, options) {
|
|
|
651
711
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
652
712
|
checkpoint,
|
|
653
713
|
filePath: options?.filePath,
|
|
654
|
-
importId: options?.importId
|
|
714
|
+
importId: options?.importId,
|
|
715
|
+
tail: options?.tail,
|
|
716
|
+
head: options?.head,
|
|
717
|
+
lines: options?.lines,
|
|
718
|
+
grep: options?.grep,
|
|
719
|
+
context: options?.context,
|
|
720
|
+
fixed: options?.fixed
|
|
655
721
|
});
|
|
656
722
|
const reqOpts = getImportSourceFileForSite(payload);
|
|
657
723
|
sideEffects?.onSiteCall?.();
|
|
@@ -667,7 +733,13 @@ async function getImportSourceFileForSite2(checkpoint, options) {
|
|
|
667
733
|
explicitPathsToArguments: {
|
|
668
734
|
checkpoint: "$[0]",
|
|
669
735
|
filePath: "$[1].filePath",
|
|
670
|
-
importId: "$[1].importId"
|
|
736
|
+
importId: "$[1].importId",
|
|
737
|
+
tail: "$[1].tail",
|
|
738
|
+
head: "$[1].head",
|
|
739
|
+
lines: "$[1].lines",
|
|
740
|
+
grep: "$[1].grep",
|
|
741
|
+
context: "$[1].context",
|
|
742
|
+
fixed: "$[1].fixed"
|
|
671
743
|
},
|
|
672
744
|
singleArgumentUnchanged: false
|
|
673
745
|
},
|
|
@@ -677,6 +749,80 @@ async function getImportSourceFileForSite2(checkpoint, options) {
|
|
|
677
749
|
throw transformedError;
|
|
678
750
|
}
|
|
679
751
|
}
|
|
752
|
+
async function searchImportSource2(importId, options) {
|
|
753
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
754
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
755
|
+
importId,
|
|
756
|
+
checkpoint: options?.checkpoint,
|
|
757
|
+
pattern: options?.pattern,
|
|
758
|
+
fixed: options?.fixed,
|
|
759
|
+
context: options?.context,
|
|
760
|
+
pathPrefix: options?.pathPrefix
|
|
761
|
+
});
|
|
762
|
+
const reqOpts = searchImportSource(payload);
|
|
763
|
+
sideEffects?.onSiteCall?.();
|
|
764
|
+
try {
|
|
765
|
+
const result = await httpClient.request(reqOpts);
|
|
766
|
+
sideEffects?.onSuccess?.(result);
|
|
767
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
768
|
+
} catch (err) {
|
|
769
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
770
|
+
err,
|
|
771
|
+
{
|
|
772
|
+
spreadPathsToArguments: {},
|
|
773
|
+
explicitPathsToArguments: {
|
|
774
|
+
importId: "$[0]",
|
|
775
|
+
checkpoint: "$[1].checkpoint",
|
|
776
|
+
pattern: "$[1].pattern",
|
|
777
|
+
fixed: "$[1].fixed",
|
|
778
|
+
context: "$[1].context",
|
|
779
|
+
pathPrefix: "$[1].pathPrefix"
|
|
780
|
+
},
|
|
781
|
+
singleArgumentUnchanged: false
|
|
782
|
+
},
|
|
783
|
+
["importId", "options"]
|
|
784
|
+
);
|
|
785
|
+
sideEffects?.onError?.(err);
|
|
786
|
+
throw transformedError;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
async function searchImportSourceForSite2(options) {
|
|
790
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
791
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
792
|
+
importId: options?.importId,
|
|
793
|
+
checkpoint: options?.checkpoint,
|
|
794
|
+
pattern: options?.pattern,
|
|
795
|
+
fixed: options?.fixed,
|
|
796
|
+
context: options?.context,
|
|
797
|
+
pathPrefix: options?.pathPrefix
|
|
798
|
+
});
|
|
799
|
+
const reqOpts = searchImportSourceForSite(payload);
|
|
800
|
+
sideEffects?.onSiteCall?.();
|
|
801
|
+
try {
|
|
802
|
+
const result = await httpClient.request(reqOpts);
|
|
803
|
+
sideEffects?.onSuccess?.(result);
|
|
804
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
805
|
+
} catch (err) {
|
|
806
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
807
|
+
err,
|
|
808
|
+
{
|
|
809
|
+
spreadPathsToArguments: {},
|
|
810
|
+
explicitPathsToArguments: {
|
|
811
|
+
importId: "$[0].importId",
|
|
812
|
+
checkpoint: "$[0].checkpoint",
|
|
813
|
+
pattern: "$[0].pattern",
|
|
814
|
+
fixed: "$[0].fixed",
|
|
815
|
+
context: "$[0].context",
|
|
816
|
+
pathPrefix: "$[0].pathPrefix"
|
|
817
|
+
},
|
|
818
|
+
singleArgumentUnchanged: false
|
|
819
|
+
},
|
|
820
|
+
["options"]
|
|
821
|
+
);
|
|
822
|
+
sideEffects?.onError?.(err);
|
|
823
|
+
throw transformedError;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
680
826
|
async function getImportBySite2(options) {
|
|
681
827
|
const { httpClient, sideEffects } = arguments[1];
|
|
682
828
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -724,6 +870,8 @@ async function getImportBySite2(options) {
|
|
|
724
870
|
getImportSourceFileForSite,
|
|
725
871
|
getImportSourceForSite,
|
|
726
872
|
getImportStatus,
|
|
873
|
+
searchImportSource,
|
|
874
|
+
searchImportSourceForSite,
|
|
727
875
|
sendImportMessage,
|
|
728
876
|
startFrontendPreview,
|
|
729
877
|
startImport
|