@knkcs/importhub-ui 0.8.0 → 0.10.0
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/CHANGELOG.md +14 -0
- package/README.md +7 -6
- package/dist/importhub-client-BzOVIXA4.js +46 -0
- package/dist/importhub-client-BzOVIXA4.js.map +1 -0
- package/dist/index.d.ts +446 -5
- package/dist/index.js +1638 -1240
- package/dist/index.js.map +1 -1
- package/dist/mapping-editor.d.ts +157 -1
- package/dist/mapping-editor.js +613 -397
- package/dist/mapping-editor.js.map +1 -1
- package/dist/mapping-page-Bl2rA1SR.js +1090 -0
- package/dist/mapping-page-Bl2rA1SR.js.map +1 -0
- package/dist/testing.d.ts +167 -2
- package/dist/testing.js +695 -477
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
- package/dist/importhub-client-BS6F4DW2.js +0 -31
- package/dist/importhub-client-BS6F4DW2.js.map +0 -1
- package/dist/mapping-page-tIHPNu7C.js +0 -1078
- package/dist/mapping-page-tIHPNu7C.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -234,6 +234,84 @@ export declare interface CutReleaseResult {
|
|
|
234
234
|
importProfiles: ImportProfileRef[];
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
+
/** Every DryRunAction, in the order a report offers them. */
|
|
238
|
+
export declare const DRY_RUN_ACTIONS: readonly DryRunAction[];
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* What a real Import would do with one Source Version (importhub.v1.DryRunAction):
|
|
242
|
+
* create its Content, give it a new Planned Release, correct the Release its
|
|
243
|
+
* Changed Version matched, keep that Release, create a Stub, or nothing.
|
|
244
|
+
*/
|
|
245
|
+
export declare type DryRunAction = "created" | "planned" | "corrected" | "kept" | "stubbed" | "unchanged";
|
|
246
|
+
|
|
247
|
+
/** One entry of a Dry Run's report: one Source Version of one Content. */
|
|
248
|
+
export declare interface DryRunContent {
|
|
249
|
+
mappingId: string;
|
|
250
|
+
/** The Mapping's name in what the Dry Run ran. */
|
|
251
|
+
mappingName: string;
|
|
252
|
+
/** The element's Source Key: the Content's Content Key. */
|
|
253
|
+
sourceKey: string;
|
|
254
|
+
/** As the Mapping's display-name template makes it; "" without one. */
|
|
255
|
+
displayName: string;
|
|
256
|
+
action: DryRunAction;
|
|
257
|
+
/** The existing Content it is about; "" for Content it would create or stub. */
|
|
258
|
+
contentId: string;
|
|
259
|
+
/** The Validity Period, as YYYY-MM-DD; "" for undated Content and an open end. */
|
|
260
|
+
firstDay: string;
|
|
261
|
+
lastDay: string;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/** How a Dry Run's report is filtered: by action, by Mapping, by Source Key. */
|
|
265
|
+
export declare interface DryRunContentsFilter {
|
|
266
|
+
/** "" for every action. */
|
|
267
|
+
action: DryRunAction | "";
|
|
268
|
+
/** "" for every Mapping. */
|
|
269
|
+
mappingId: string;
|
|
270
|
+
/** Matches Source Keys that contain it, ignoring case; "" for all. */
|
|
271
|
+
sourceKeyQuery: string;
|
|
272
|
+
/** "" for the first page. */
|
|
273
|
+
pageToken: string;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/** One page of a Dry Run's report. */
|
|
277
|
+
export declare interface DryRunContentsPage {
|
|
278
|
+
contents: DryRunContent[];
|
|
279
|
+
/** Every entry of the report, whatever the filter. */
|
|
280
|
+
totalCount: number;
|
|
281
|
+
/** The entries the filter matches, on every page. */
|
|
282
|
+
matchingCount: number;
|
|
283
|
+
/** "" on the last page. */
|
|
284
|
+
nextPageToken: string;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* A Dry Run's report (dry-run-an-import:AC3, AC4; CONTEXT.md "Dry Run"):
|
|
289
|
+
* what a real Import with the same inputs would do, written nowhere. It
|
|
290
|
+
* lists per Content whether it would be created, given a new Planned
|
|
291
|
+
* Release, corrected, kept, stubbed or left unchanged, filterable by that
|
|
292
|
+
* and by Mapping; calls out the corrections, the one action that changes
|
|
293
|
+
* what is already published; and lists every Item Problem and Pending
|
|
294
|
+
* Reference. Around it, the Dry Run as any Import's page shows one: its
|
|
295
|
+
* status and progress, what it ran on (the latest Releases, or the drafts),
|
|
296
|
+
* and Cancel for an importer while it runs.
|
|
297
|
+
*
|
|
298
|
+
* `ImportDetail` shows this page for a Dry Run, so a host need not mount it
|
|
299
|
+
* apart; a host that does gets the same page. An Import that is no Dry Run
|
|
300
|
+
* has no report, and this says so.
|
|
301
|
+
*/
|
|
302
|
+
export declare function DryRunReport({ client, id, pollIntervalMs, }: DryRunReportProps): JSX.Element;
|
|
303
|
+
|
|
304
|
+
export declare interface DryRunReportProps {
|
|
305
|
+
client: ImporthubClient;
|
|
306
|
+
/** The Dry Run's id: an Import marked as a Dry Run. */
|
|
307
|
+
id: string;
|
|
308
|
+
/**
|
|
309
|
+
* How often the page reads the Dry Run again while it is queued or
|
|
310
|
+
* running, in ms; 2000 by default. It stops once the Dry Run has ended.
|
|
311
|
+
*/
|
|
312
|
+
pollIntervalMs?: number;
|
|
313
|
+
}
|
|
314
|
+
|
|
237
315
|
export declare type EntitySet = Configured<EntitySetContent>;
|
|
238
316
|
|
|
239
317
|
/** What an admin edits of an Entity Set. */
|
|
@@ -529,6 +607,7 @@ export declare const i18nResources: {
|
|
|
529
607
|
fields: string;
|
|
530
608
|
versions: string;
|
|
531
609
|
output: string;
|
|
610
|
+
test: string;
|
|
532
611
|
};
|
|
533
612
|
reasonsHere: string;
|
|
534
613
|
tree: {
|
|
@@ -715,6 +794,44 @@ export declare const i18nResources: {
|
|
|
715
794
|
folderPathSelector: string;
|
|
716
795
|
folderPathSelectorHelp: string;
|
|
717
796
|
};
|
|
797
|
+
test: {
|
|
798
|
+
title: string;
|
|
799
|
+
about: string;
|
|
800
|
+
aboutDerived: string;
|
|
801
|
+
adminOnly: string;
|
|
802
|
+
sampleCard: string;
|
|
803
|
+
sampleHelp: string;
|
|
804
|
+
dropHint: string;
|
|
805
|
+
dragActive: string;
|
|
806
|
+
chooseFile: string;
|
|
807
|
+
chosen: string;
|
|
808
|
+
notXml: string;
|
|
809
|
+
entitySet: string;
|
|
810
|
+
entitySetHelp: string;
|
|
811
|
+
noEntitySet: string;
|
|
812
|
+
run: string;
|
|
813
|
+
failed: string;
|
|
814
|
+
summary_one: string;
|
|
815
|
+
summary_other: string;
|
|
816
|
+
noElements: string;
|
|
817
|
+
onlyProblems: string;
|
|
818
|
+
element: string;
|
|
819
|
+
noSourceKey: string;
|
|
820
|
+
field: string;
|
|
821
|
+
value: string;
|
|
822
|
+
problem: string;
|
|
823
|
+
wholeElement: string;
|
|
824
|
+
validityPeriod: string;
|
|
825
|
+
validFromTo: string;
|
|
826
|
+
open: string;
|
|
827
|
+
displayName: string;
|
|
828
|
+
collections: string;
|
|
829
|
+
releaseSpec: string;
|
|
830
|
+
showMore: string;
|
|
831
|
+
shownOf: string;
|
|
832
|
+
problemCount_one: string;
|
|
833
|
+
problemCount_other: string;
|
|
834
|
+
};
|
|
718
835
|
};
|
|
719
836
|
imports: {
|
|
720
837
|
start: string;
|
|
@@ -790,6 +907,14 @@ export declare const i18nResources: {
|
|
|
790
907
|
outcomeColumn: string;
|
|
791
908
|
someone: string;
|
|
792
909
|
mappings: string;
|
|
910
|
+
kind: string;
|
|
911
|
+
pendingReference: string;
|
|
912
|
+
itemProblem: string;
|
|
913
|
+
problemCountWithPending_one: string;
|
|
914
|
+
problemCountWithPending_other: string;
|
|
915
|
+
kindColumn: string;
|
|
916
|
+
kindImport: string;
|
|
917
|
+
kindDryRun: string;
|
|
793
918
|
};
|
|
794
919
|
startImport: {
|
|
795
920
|
title: string;
|
|
@@ -820,6 +945,18 @@ export declare const i18nResources: {
|
|
|
820
945
|
refused: string;
|
|
821
946
|
notAllowed: string;
|
|
822
947
|
noProfiles: string;
|
|
948
|
+
on: string;
|
|
949
|
+
onRelease: string;
|
|
950
|
+
onDraft: string;
|
|
951
|
+
profileDraftHelp: string;
|
|
952
|
+
profileDraftOption: string;
|
|
953
|
+
startDryRun: string;
|
|
954
|
+
dryRunRefused: string;
|
|
955
|
+
dryRunConsent: string;
|
|
956
|
+
kind: string;
|
|
957
|
+
kindImport: string;
|
|
958
|
+
kindDryRun: string;
|
|
959
|
+
kindCard: string;
|
|
823
960
|
};
|
|
824
961
|
apiKeys: {
|
|
825
962
|
title: string;
|
|
@@ -852,6 +989,63 @@ export declare const i18nResources: {
|
|
|
852
989
|
revokeMessage: string;
|
|
853
990
|
revokeFailed: string;
|
|
854
991
|
};
|
|
992
|
+
dryRun: {
|
|
993
|
+
badge: string;
|
|
994
|
+
subtitle: string;
|
|
995
|
+
failedTitle: string;
|
|
996
|
+
cancelledBody: string;
|
|
997
|
+
problemsBody_one: string;
|
|
998
|
+
problemsBody_other: string;
|
|
999
|
+
cancel: string;
|
|
1000
|
+
cancelTitle: string;
|
|
1001
|
+
cancelMessage: string;
|
|
1002
|
+
phaseLong: {
|
|
1003
|
+
reading: string;
|
|
1004
|
+
writing: string;
|
|
1005
|
+
};
|
|
1006
|
+
ranOn: string;
|
|
1007
|
+
onReleases: string;
|
|
1008
|
+
onDrafts: string;
|
|
1009
|
+
configuration: string;
|
|
1010
|
+
draftOf: string;
|
|
1011
|
+
correctionsTitle_one: string;
|
|
1012
|
+
correctionsTitle_other: string;
|
|
1013
|
+
correctionsBody: string;
|
|
1014
|
+
showCorrections: string;
|
|
1015
|
+
summary: string;
|
|
1016
|
+
counts: {
|
|
1017
|
+
matched: string;
|
|
1018
|
+
created: string;
|
|
1019
|
+
planned: string;
|
|
1020
|
+
corrected: string;
|
|
1021
|
+
kept: string;
|
|
1022
|
+
stubbed: string;
|
|
1023
|
+
unchanged: string;
|
|
1024
|
+
problems: string;
|
|
1025
|
+
pendingReferences: string;
|
|
1026
|
+
};
|
|
1027
|
+
report: string;
|
|
1028
|
+
actionColumn: string;
|
|
1029
|
+
displayName: string;
|
|
1030
|
+
validity: string;
|
|
1031
|
+
filterAction: string;
|
|
1032
|
+
allActions: string;
|
|
1033
|
+
allMappings: string;
|
|
1034
|
+
emptyReport: string;
|
|
1035
|
+
noMatchingContent: string;
|
|
1036
|
+
validityRange: string;
|
|
1037
|
+
validityOpen: string;
|
|
1038
|
+
action: {
|
|
1039
|
+
created: string;
|
|
1040
|
+
planned: string;
|
|
1041
|
+
corrected: string;
|
|
1042
|
+
kept: string;
|
|
1043
|
+
stubbed: string;
|
|
1044
|
+
unchanged: string;
|
|
1045
|
+
};
|
|
1046
|
+
notDryRun: string;
|
|
1047
|
+
contentCount: string;
|
|
1048
|
+
};
|
|
855
1049
|
};
|
|
856
1050
|
};
|
|
857
1051
|
de: {
|
|
@@ -1104,6 +1298,7 @@ export declare const i18nResources: {
|
|
|
1104
1298
|
fields: string;
|
|
1105
1299
|
versions: string;
|
|
1106
1300
|
output: string;
|
|
1301
|
+
test: string;
|
|
1107
1302
|
};
|
|
1108
1303
|
reasonsHere: string;
|
|
1109
1304
|
tree: {
|
|
@@ -1290,6 +1485,44 @@ export declare const i18nResources: {
|
|
|
1290
1485
|
folderPathSelector: string;
|
|
1291
1486
|
folderPathSelectorHelp: string;
|
|
1292
1487
|
};
|
|
1488
|
+
test: {
|
|
1489
|
+
title: string;
|
|
1490
|
+
about: string;
|
|
1491
|
+
aboutDerived: string;
|
|
1492
|
+
adminOnly: string;
|
|
1493
|
+
sampleCard: string;
|
|
1494
|
+
sampleHelp: string;
|
|
1495
|
+
dropHint: string;
|
|
1496
|
+
dragActive: string;
|
|
1497
|
+
chooseFile: string;
|
|
1498
|
+
chosen: string;
|
|
1499
|
+
notXml: string;
|
|
1500
|
+
entitySet: string;
|
|
1501
|
+
entitySetHelp: string;
|
|
1502
|
+
noEntitySet: string;
|
|
1503
|
+
run: string;
|
|
1504
|
+
failed: string;
|
|
1505
|
+
summary_one: string;
|
|
1506
|
+
summary_other: string;
|
|
1507
|
+
noElements: string;
|
|
1508
|
+
onlyProblems: string;
|
|
1509
|
+
element: string;
|
|
1510
|
+
noSourceKey: string;
|
|
1511
|
+
field: string;
|
|
1512
|
+
value: string;
|
|
1513
|
+
problem: string;
|
|
1514
|
+
wholeElement: string;
|
|
1515
|
+
validityPeriod: string;
|
|
1516
|
+
validFromTo: string;
|
|
1517
|
+
open: string;
|
|
1518
|
+
displayName: string;
|
|
1519
|
+
collections: string;
|
|
1520
|
+
releaseSpec: string;
|
|
1521
|
+
showMore: string;
|
|
1522
|
+
shownOf: string;
|
|
1523
|
+
problemCount_one: string;
|
|
1524
|
+
problemCount_other: string;
|
|
1525
|
+
};
|
|
1293
1526
|
};
|
|
1294
1527
|
imports: {
|
|
1295
1528
|
start: string;
|
|
@@ -1365,6 +1598,14 @@ export declare const i18nResources: {
|
|
|
1365
1598
|
outcomeColumn: string;
|
|
1366
1599
|
someone: string;
|
|
1367
1600
|
mappings: string;
|
|
1601
|
+
kind: string;
|
|
1602
|
+
pendingReference: string;
|
|
1603
|
+
itemProblem: string;
|
|
1604
|
+
problemCountWithPending_one: string;
|
|
1605
|
+
problemCountWithPending_other: string;
|
|
1606
|
+
kindColumn: string;
|
|
1607
|
+
kindImport: string;
|
|
1608
|
+
kindDryRun: string;
|
|
1368
1609
|
};
|
|
1369
1610
|
startImport: {
|
|
1370
1611
|
title: string;
|
|
@@ -1395,6 +1636,18 @@ export declare const i18nResources: {
|
|
|
1395
1636
|
refused: string;
|
|
1396
1637
|
notAllowed: string;
|
|
1397
1638
|
noProfiles: string;
|
|
1639
|
+
on: string;
|
|
1640
|
+
onRelease: string;
|
|
1641
|
+
onDraft: string;
|
|
1642
|
+
profileDraftHelp: string;
|
|
1643
|
+
profileDraftOption: string;
|
|
1644
|
+
startDryRun: string;
|
|
1645
|
+
dryRunRefused: string;
|
|
1646
|
+
dryRunConsent: string;
|
|
1647
|
+
kind: string;
|
|
1648
|
+
kindImport: string;
|
|
1649
|
+
kindDryRun: string;
|
|
1650
|
+
kindCard: string;
|
|
1398
1651
|
};
|
|
1399
1652
|
apiKeys: {
|
|
1400
1653
|
title: string;
|
|
@@ -1427,6 +1680,63 @@ export declare const i18nResources: {
|
|
|
1427
1680
|
revokeMessage: string;
|
|
1428
1681
|
revokeFailed: string;
|
|
1429
1682
|
};
|
|
1683
|
+
dryRun: {
|
|
1684
|
+
badge: string;
|
|
1685
|
+
subtitle: string;
|
|
1686
|
+
failedTitle: string;
|
|
1687
|
+
cancelledBody: string;
|
|
1688
|
+
problemsBody_one: string;
|
|
1689
|
+
problemsBody_other: string;
|
|
1690
|
+
cancel: string;
|
|
1691
|
+
cancelTitle: string;
|
|
1692
|
+
cancelMessage: string;
|
|
1693
|
+
phaseLong: {
|
|
1694
|
+
reading: string;
|
|
1695
|
+
writing: string;
|
|
1696
|
+
};
|
|
1697
|
+
ranOn: string;
|
|
1698
|
+
onReleases: string;
|
|
1699
|
+
onDrafts: string;
|
|
1700
|
+
configuration: string;
|
|
1701
|
+
draftOf: string;
|
|
1702
|
+
correctionsTitle_one: string;
|
|
1703
|
+
correctionsTitle_other: string;
|
|
1704
|
+
correctionsBody: string;
|
|
1705
|
+
showCorrections: string;
|
|
1706
|
+
summary: string;
|
|
1707
|
+
counts: {
|
|
1708
|
+
matched: string;
|
|
1709
|
+
created: string;
|
|
1710
|
+
planned: string;
|
|
1711
|
+
corrected: string;
|
|
1712
|
+
kept: string;
|
|
1713
|
+
stubbed: string;
|
|
1714
|
+
unchanged: string;
|
|
1715
|
+
problems: string;
|
|
1716
|
+
pendingReferences: string;
|
|
1717
|
+
};
|
|
1718
|
+
report: string;
|
|
1719
|
+
actionColumn: string;
|
|
1720
|
+
displayName: string;
|
|
1721
|
+
validity: string;
|
|
1722
|
+
filterAction: string;
|
|
1723
|
+
allActions: string;
|
|
1724
|
+
allMappings: string;
|
|
1725
|
+
emptyReport: string;
|
|
1726
|
+
noMatchingContent: string;
|
|
1727
|
+
validityRange: string;
|
|
1728
|
+
validityOpen: string;
|
|
1729
|
+
action: {
|
|
1730
|
+
created: string;
|
|
1731
|
+
planned: string;
|
|
1732
|
+
corrected: string;
|
|
1733
|
+
kept: string;
|
|
1734
|
+
stubbed: string;
|
|
1735
|
+
unchanged: string;
|
|
1736
|
+
};
|
|
1737
|
+
notDryRun: string;
|
|
1738
|
+
contentCount: string;
|
|
1739
|
+
};
|
|
1430
1740
|
};
|
|
1431
1741
|
};
|
|
1432
1742
|
};
|
|
@@ -1470,6 +1780,14 @@ export declare interface Import {
|
|
|
1470
1780
|
/** YYYY-MM-DD, or "" for none. */
|
|
1471
1781
|
effectiveDate: string;
|
|
1472
1782
|
source?: ImportSource;
|
|
1783
|
+
/**
|
|
1784
|
+
* Whether it is a Dry Run (CONTEXT.md "Dry Run"): it writes nothing and
|
|
1785
|
+
* opens no Change Set, its counts say what a real Import would do, and its
|
|
1786
|
+
* report is `listDryRunContents`'.
|
|
1787
|
+
*/
|
|
1788
|
+
dryRun: boolean;
|
|
1789
|
+
/** Whether it runs drafts: a Dry Run started on them. Never for a real Import. */
|
|
1790
|
+
draft: boolean;
|
|
1473
1791
|
}
|
|
1474
1792
|
|
|
1475
1793
|
/** What an Import has done (importhub.v1.ImportCounts). */
|
|
@@ -1488,6 +1806,10 @@ export declare interface ImportCounts {
|
|
|
1488
1806
|
kept: number;
|
|
1489
1807
|
/** Source Versions already in contenthub. */
|
|
1490
1808
|
unchanged: number;
|
|
1809
|
+
/** Stubs created for a Stub Mapping's Source Keys no Content had. */
|
|
1810
|
+
stubbed: number;
|
|
1811
|
+
/** References it could not resolve: each one of its Item Problems too. */
|
|
1812
|
+
pendingReferences: number;
|
|
1491
1813
|
}
|
|
1492
1814
|
|
|
1493
1815
|
/**
|
|
@@ -1498,6 +1820,9 @@ export declare interface ImportCounts {
|
|
|
1498
1820
|
* Releases it ran with (release-a-configuration:AC8); and its Item Problems
|
|
1499
1821
|
* (AC4). An importer cancels a queued or running one from the rail; a viewer
|
|
1500
1822
|
* sees no Cancel (AC8).
|
|
1823
|
+
*
|
|
1824
|
+
* A Dry Run's page is its report (`DryRunReport`), so a host that opens an
|
|
1825
|
+
* Import's page from the list opens a Dry Run's report the same way.
|
|
1501
1826
|
*/
|
|
1502
1827
|
export declare function ImportDetail({ client, id, pollIntervalMs, }: ImportDetailProps): JSX.Element;
|
|
1503
1828
|
|
|
@@ -1615,6 +1940,14 @@ export declare interface ImporthubClient {
|
|
|
1615
1940
|
listMappingImportProfiles(id: string): Promise<ImportProfileRef[]>;
|
|
1616
1941
|
/** Checks moving the draft to another Blueprint Release, saving nothing. */
|
|
1617
1942
|
checkMappingBlueprintRelease(id: string, blueprintReleaseId: string): Promise<BlueprintReleaseCheck>;
|
|
1943
|
+
/**
|
|
1944
|
+
* Runs a Mapping Test: the content given over the sample, read as an
|
|
1945
|
+
* Import reads a Source File. Stores nothing and touches nothing outside
|
|
1946
|
+
* importhub (test-a-mapping-on-a-sample-file:AC4). Throws with importhub's
|
|
1947
|
+
* reason when the test cannot run at all: a sample that is not XML, an
|
|
1948
|
+
* element selector or Source Key xmlmapper cannot evaluate.
|
|
1949
|
+
*/
|
|
1950
|
+
runMappingTest(input: MappingTestInput): Promise<MappingTestResult>;
|
|
1618
1951
|
/** Every Entity Set of the workspace, by name. */
|
|
1619
1952
|
listEntitySets(): Promise<EntitySet[]>;
|
|
1620
1953
|
getEntitySet(id: string): Promise<EntitySet>;
|
|
@@ -1646,6 +1979,18 @@ export declare interface ImporthubClient {
|
|
|
1646
1979
|
/** Asks a queued or running Import to stop; returns it as it is now. */
|
|
1647
1980
|
cancelImport(id: string): Promise<Import>;
|
|
1648
1981
|
listItemProblems(importId: string, filter: ItemProblemsFilter): Promise<ItemProblemsPage>;
|
|
1982
|
+
/**
|
|
1983
|
+
* Queues a Dry Run: an Import with the same inputs that writes nothing
|
|
1984
|
+
* and opens no Change Set (dry-run-an-import:AC1, AC2). Throws
|
|
1985
|
+
* StartRefusedError, with importhub's reason, as `startImport` does, and
|
|
1986
|
+
* for a draft that is invalid.
|
|
1987
|
+
*/
|
|
1988
|
+
startDryRun(input: StartDryRunInput): Promise<Import>;
|
|
1989
|
+
/**
|
|
1990
|
+
* One page of a Dry Run's report: per Source Version, what a real Import
|
|
1991
|
+
* would do with its Content (dry-run-an-import:AC3).
|
|
1992
|
+
*/
|
|
1993
|
+
listDryRunContents(importId: string, filter: DryRunContentsFilter): Promise<DryRunContentsPage>;
|
|
1649
1994
|
/**
|
|
1650
1995
|
* Every API key of the workspace, every importer's, newest first, without
|
|
1651
1996
|
* their secrets. Needs importhub's `importer`, as all three key calls do.
|
|
@@ -1713,6 +2058,8 @@ export declare const importhubKeys: {
|
|
|
1713
2058
|
import: (workspaceId: string, id: string) => readonly ["importhub", string, "imports", string];
|
|
1714
2059
|
/** An Import's Item Problems under a filter, one entry per filter. */
|
|
1715
2060
|
itemProblems: (workspaceId: string, id: string, mappingId: string, sourceKeyQuery: string) => readonly ["importhub", string, "imports", string, "itemProblems", string, string];
|
|
2061
|
+
/** A Dry Run's report under a filter, one entry per filter. */
|
|
2062
|
+
dryRunContents: (workspaceId: string, id: string, action: string, mappingId: string, sourceKeyQuery: string) => readonly ["importhub", string, "imports", string, "dryRunContents", string, string, string];
|
|
1716
2063
|
/** The workspace's importhub API keys. */
|
|
1717
2064
|
apiKeys: (workspaceId: string) => readonly ["importhub", string, "apiKeys"];
|
|
1718
2065
|
blueprints: (workspaceId: string) => readonly ["importhub", string, "blueprints"];
|
|
@@ -1822,14 +2169,19 @@ export declare interface ImportReleaseRef {
|
|
|
1822
2169
|
configurationId: string;
|
|
1823
2170
|
/** The configuration's name in that Release. */
|
|
1824
2171
|
name: string;
|
|
2172
|
+
/** "" for a draft a Dry Run runs. */
|
|
1825
2173
|
releaseId: string;
|
|
1826
|
-
/** "Release 3". */
|
|
2174
|
+
/** "Release 3"; 0 for a draft a Dry Run runs. */
|
|
1827
2175
|
number: number;
|
|
2176
|
+
/** The draft Revision a Dry Run on drafts runs; unset for a Release. */
|
|
2177
|
+
revisionId?: string;
|
|
1828
2178
|
}
|
|
1829
2179
|
|
|
1830
2180
|
/**
|
|
1831
2181
|
* The workspace's Imports, newest first, with their Profile, starter,
|
|
1832
2182
|
* Outcome and counts (follow-an-import:AC1); a queued Import shows as Queued.
|
|
2183
|
+
* A Dry Run is listed with them, marked as one: its counts say what a real
|
|
2184
|
+
* Import would do, and its page is its report.
|
|
1833
2185
|
* The list follows Imports that are still running. An importer starts one
|
|
1834
2186
|
* from the header; a viewer sees no Start (follow-an-import:AC8).
|
|
1835
2187
|
*/
|
|
@@ -1876,6 +2228,16 @@ export declare interface ItemProblem {
|
|
|
1876
2228
|
field: string;
|
|
1877
2229
|
/** Why, as importhub words it. */
|
|
1878
2230
|
reason: string;
|
|
2231
|
+
/**
|
|
2232
|
+
* Set when it is a reference the Import could not resolve (CONTEXT.md
|
|
2233
|
+
* "Pending Reference"): what it names. Its holder is the Content its
|
|
2234
|
+
* Mapping and Source Key read, and `field` is where it holds it.
|
|
2235
|
+
*/
|
|
2236
|
+
pendingReference?: {
|
|
2237
|
+
targetMappingId: string;
|
|
2238
|
+
targetBlueprintId: string;
|
|
2239
|
+
targetSourceKey: string;
|
|
2240
|
+
};
|
|
1879
2241
|
}
|
|
1880
2242
|
|
|
1881
2243
|
/** How an Import's Item Problems are filtered: by Mapping, and by Source Key. */
|
|
@@ -1901,6 +2263,8 @@ export declare interface ItemProblemsPage {
|
|
|
1901
2263
|
mappingName: string;
|
|
1902
2264
|
count: number;
|
|
1903
2265
|
}[];
|
|
2266
|
+
/** The Item Problems that are Pending References, whatever the filter. */
|
|
2267
|
+
pendingReferenceCount: number;
|
|
1904
2268
|
/** "" on the last page. */
|
|
1905
2269
|
nextPageToken: string;
|
|
1906
2270
|
}
|
|
@@ -2019,6 +2383,68 @@ export declare interface MappingsIndexProps {
|
|
|
2019
2383
|
onOpen: (id: string) => void;
|
|
2020
2384
|
}
|
|
2021
2385
|
|
|
2386
|
+
/** One element a Mapping Test matched, as an Import would read it. */
|
|
2387
|
+
export declare interface MappingTestElement {
|
|
2388
|
+
/** Its position among the elements matched, from 1. */
|
|
2389
|
+
position: number;
|
|
2390
|
+
/** Its Source Key, verbatim; "" when it has none. */
|
|
2391
|
+
sourceKey: string;
|
|
2392
|
+
/** Its mapped values by field accessor; a field that cannot be mapped is left out. */
|
|
2393
|
+
values: Record<string, unknown>;
|
|
2394
|
+
/** The Validity Period the sample gives, as YYYY-MM-DD; "" for none. */
|
|
2395
|
+
firstDay: string;
|
|
2396
|
+
lastDay: string;
|
|
2397
|
+
/** The Release Spec values the sample gives, by field. */
|
|
2398
|
+
releaseSpec: Record<string, unknown>;
|
|
2399
|
+
/** What the display-name template makes; "" without one. */
|
|
2400
|
+
displayName: string;
|
|
2401
|
+
/** The Collections it would be filed into, by name. */
|
|
2402
|
+
collections: string[];
|
|
2403
|
+
/** Each field that cannot be mapped, and what an Import would report; none when clean. */
|
|
2404
|
+
problems: MappingTestProblem[];
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
/**
|
|
2408
|
+
* What a Mapping Test runs (test-a-mapping-on-a-sample-file:AC1): a
|
|
2409
|
+
* Mapping's content as the editor holds it, saved or not, over a sample file.
|
|
2410
|
+
*/
|
|
2411
|
+
export declare interface MappingTestInput {
|
|
2412
|
+
content: MappingContent;
|
|
2413
|
+
/** The sample file, an XML file, sent whole. */
|
|
2414
|
+
sample: Uint8Array;
|
|
2415
|
+
/**
|
|
2416
|
+
* An Entity Set of the workspace whose draft's entities the sample uses;
|
|
2417
|
+
* "" or unset for none.
|
|
2418
|
+
*/
|
|
2419
|
+
entitySetId?: string;
|
|
2420
|
+
}
|
|
2421
|
+
|
|
2422
|
+
/** One problem of an element in a Mapping Test (importhub.v1.MappingTestProblem). */
|
|
2423
|
+
export declare interface MappingTestProblem {
|
|
2424
|
+
/**
|
|
2425
|
+
* A field path, `.`-joined into fieldsets and virtual tables, or the
|
|
2426
|
+
* Mapping's setting that reads it (`display_name_template`, say); "" for
|
|
2427
|
+
* the element as a whole, such as an element without a Source Key.
|
|
2428
|
+
*/
|
|
2429
|
+
field: string;
|
|
2430
|
+
/** Why, for a person: xmlmapper's message for a field that cannot be mapped. */
|
|
2431
|
+
reason: string;
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
/**
|
|
2435
|
+
* A Mapping Test that could not run at all: the sample is not XML, the
|
|
2436
|
+
* element selector or Source Key cannot be evaluated, or the Entity Set named
|
|
2437
|
+
* is unknown. Its message is importhub's, which names xmlmapper's reason.
|
|
2438
|
+
*/
|
|
2439
|
+
export declare class MappingTestRefusedError extends Error {
|
|
2440
|
+
constructor(message: string);
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
/** What a Mapping Test answers: every element the element selector matched. */
|
|
2444
|
+
export declare interface MappingTestResult {
|
|
2445
|
+
elements: MappingTestElement[];
|
|
2446
|
+
}
|
|
2447
|
+
|
|
2022
2448
|
/** A create or rename refused: another configuration of the kind has the name. */
|
|
2023
2449
|
export declare class NameTakenError extends Error {
|
|
2024
2450
|
constructor(message?: string);
|
|
@@ -2084,10 +2510,22 @@ export declare interface SourceFile {
|
|
|
2084
2510
|
*/
|
|
2085
2511
|
export declare const STANDALONE_IMPORTHUB_PATHS: ImporthubPaths;
|
|
2086
2512
|
|
|
2513
|
+
/** What starting a Dry Run takes: an Import's inputs, and whether to run drafts. */
|
|
2514
|
+
export declare interface StartDryRunInput extends StartImportInput {
|
|
2515
|
+
/**
|
|
2516
|
+
* Run the drafts of the Profile, its Mappings and its Entity Set instead
|
|
2517
|
+
* of their latest Releases (ADR 0016); unset for the Releases.
|
|
2518
|
+
*/
|
|
2519
|
+
draft?: boolean;
|
|
2520
|
+
}
|
|
2521
|
+
|
|
2087
2522
|
/**
|
|
2088
|
-
* The start flow (start-an-import:AC1–AC4): an importer
|
|
2089
|
-
*
|
|
2090
|
-
*
|
|
2523
|
+
* The start flow (start-an-import:AC1–AC4): an importer chooses a real
|
|
2524
|
+
* Import or a Dry Run of one, with the same inputs (dry-run-an-import:AC1);
|
|
2525
|
+
* picks one of the workspace's Import Profiles that has a Release, since an
|
|
2526
|
+
* Import never runs a draft, while an admin may run a Dry Run on the drafts
|
|
2527
|
+
* of any Profile instead, to check them before releasing (ADR 0016);
|
|
2528
|
+
* uploads one XML file straight into importhub's storage, with its
|
|
2091
2529
|
* progress; gives, if the file carries none, an effective date and a Source
|
|
2092
2530
|
* (its date and reference, both or neither); reads what delegated access
|
|
2093
2531
|
* Start grants; and starts with the header's one action. A Start importhub
|
|
@@ -2108,7 +2546,10 @@ export declare interface StartImportInput {
|
|
|
2108
2546
|
|
|
2109
2547
|
export declare interface StartImportProps {
|
|
2110
2548
|
client: ImporthubClient;
|
|
2111
|
-
/**
|
|
2549
|
+
/**
|
|
2550
|
+
* The Import or Dry Run is queued: the host opens its page, where a Dry
|
|
2551
|
+
* Run's page is its report.
|
|
2552
|
+
*/
|
|
2112
2553
|
onStarted: (importId: string) => void;
|
|
2113
2554
|
}
|
|
2114
2555
|
|