@knkcs/importhub-ui 0.3.0 → 0.5.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/dist/index.d.ts CHANGED
@@ -13,6 +13,9 @@ export declare interface BlueprintReleaseCheck {
13
13
  missingReleaseSpecFields: string[];
14
14
  }
15
15
 
16
+ /** What happens to a Changed Version (importhub.v1.ChangedVersionHandling). */
17
+ export declare type ChangedVersionHandling = "CHANGED_VERSION_HANDLING_UNSPECIFIED" | "CHANGED_VERSION_HANDLING_CORRECT" | "CHANGED_VERSION_HANDLING_KEEP" | "CHANGED_VERSION_HANDLING_FAIL";
18
+
16
19
  /**
17
20
  * The link out to a Change Set in contenthub, where the host says it is
18
21
  * (`ImporthubHost.changeSetHref`). Nothing when the host has no address for
@@ -164,6 +167,12 @@ export declare interface CreateConnectImporthubClientOptions {
164
167
  fetch?: typeof fetch;
165
168
  /** A pre-built transport (tests: `createRouterTransport`). Overrides baseUrl and fetch. */
166
169
  transport?: Transport;
170
+ /**
171
+ * How a Source File's content is sent to the upload URL importhub hands
172
+ * out; `putToBlobStore` by default. Tests in Node, which has no
173
+ * XMLHttpRequest, pass their own.
174
+ */
175
+ putFile?: (url: string, file: File, onProgress: (fraction: number) => void) => Promise<void>;
167
176
  }
168
177
 
169
178
  /** A Release cut, and for a Mapping the Import Profiles that take it. */
@@ -463,6 +472,299 @@ export declare const i18nResources: {
463
472
  yes: string;
464
473
  no: string;
465
474
  };
475
+ editor: {
476
+ tabs: {
477
+ fields: string;
478
+ versions: string;
479
+ output: string;
480
+ };
481
+ reasonsHere: string;
482
+ tree: {
483
+ label: string;
484
+ mapped: string;
485
+ unmapped: string;
486
+ invalid: string;
487
+ toggle: string;
488
+ outside: string;
489
+ noLookup: string;
490
+ loadFailed: string;
491
+ selectField: string;
492
+ };
493
+ field: {
494
+ title: string;
495
+ notMapped: string;
496
+ map: string;
497
+ remove: string;
498
+ selector: string;
499
+ selectorHelp: string;
500
+ type: string;
501
+ optional: string;
502
+ optionalHelp: string;
503
+ dateFormat: string;
504
+ dateFormatHelp: string;
505
+ dateFormats: string;
506
+ dateFormatsHelp: string;
507
+ autoDetectDateFormat: string;
508
+ numberLocale: string;
509
+ locale: {
510
+ de: string;
511
+ en: string;
512
+ ch: string;
513
+ };
514
+ stripCurrency: string;
515
+ skipInvalid: string;
516
+ skipInvalidHelp: string;
517
+ selectOptions: string;
518
+ selectOptionsHelp: string;
519
+ textWrapperElement: string;
520
+ ignoreElements: string;
521
+ passThroughElements: string;
522
+ elementsHelp: string;
523
+ normalizeWhitespace: string;
524
+ convertNewlinesToBreaks: string;
525
+ richTextMore: string;
526
+ refBlueprintId: string;
527
+ refIdTemplate: string;
528
+ refIdTemplateHelp: string;
529
+ refIdExtractPattern: string;
530
+ refIdExtractSeparator: string;
531
+ refIdExtractSeparatorHelp: string;
532
+ concatSelectors: string;
533
+ concatSelectorsHelp: string;
534
+ normalizeUnicode: string;
535
+ childrenHelp: string;
536
+ elementBlueprintMap: string;
537
+ elementBlueprintMapHelp: string;
538
+ elementRefIdTemplateMap: string;
539
+ elementRefIdTemplateMapHelp: string;
540
+ };
541
+ json: {
542
+ title: string;
543
+ help: string;
544
+ label: string;
545
+ apply: string;
546
+ notJson: string;
547
+ notObject: string;
548
+ unapplied: string;
549
+ };
550
+ sourceKey: {
551
+ title: string;
552
+ help: string;
553
+ extractPattern: string;
554
+ extractPatternHelp: string;
555
+ extractSeparator: string;
556
+ extractSeparatorHelp: string;
557
+ normalize: string;
558
+ };
559
+ versionMatch: {
560
+ title: string;
561
+ help: string;
562
+ validityPeriod: string;
563
+ releaseSpecFields: string;
564
+ noReleaseSpecFields: string;
565
+ contentFields: string;
566
+ noContentFields: string;
567
+ };
568
+ validityPeriod: {
569
+ title: string;
570
+ validFrom: string;
571
+ validTo: string;
572
+ validToHelp: string;
573
+ dateFormats: string;
574
+ dateFormatsHelp: string;
575
+ };
576
+ releaseSpec: {
577
+ title: string;
578
+ none: string;
579
+ field: string;
580
+ selector: string;
581
+ remove: string;
582
+ add: string;
583
+ };
584
+ changedVersion: {
585
+ title: string;
586
+ label: string;
587
+ help: string;
588
+ correct: string;
589
+ keep: string;
590
+ fail: string;
591
+ };
592
+ stub: {
593
+ title: string;
594
+ label: string;
595
+ help: string;
596
+ };
597
+ naming: {
598
+ title: string;
599
+ displayNameTemplate: string;
600
+ displayNameTemplateHelp: string;
601
+ collections: string;
602
+ collectionsHelp: string;
603
+ };
604
+ routing: {
605
+ title: string;
606
+ help: string;
607
+ selector: string;
608
+ collectionMap: string;
609
+ collectionMapHelp: string;
610
+ idPattern: string;
611
+ collectionTemplate: string;
612
+ collectionTemplateHelp: string;
613
+ suffix: string;
614
+ fallback: string;
615
+ };
616
+ titles: {
617
+ title: string;
618
+ help: string;
619
+ none: string;
620
+ item: string;
621
+ remove: string;
622
+ add: string;
623
+ selector: string;
624
+ selectorHelp: string;
625
+ ausgabeCodeSelector: string;
626
+ referenceSpecValues: string;
627
+ valueField: string;
628
+ valueSelector: string;
629
+ removeValue: string;
630
+ addValue: string;
631
+ referenceFilterSelector: string;
632
+ intent: string;
633
+ intents: {
634
+ none: string;
635
+ exclude: string;
636
+ replace: string;
637
+ annotate: string;
638
+ };
639
+ intentTextSelector: string;
640
+ intentTextSelectorHelp: string;
641
+ };
642
+ assets: {
643
+ title: string;
644
+ help: string;
645
+ none: string;
646
+ item: string;
647
+ remove: string;
648
+ add: string;
649
+ selector: string;
650
+ selectorHelp: string;
651
+ assetType: string;
652
+ keyParts: string;
653
+ keyPartsHelp: string;
654
+ nameSelector: string;
655
+ descriptionSelector: string;
656
+ metadata: string;
657
+ metadataHelp: string;
658
+ folderRoot: string;
659
+ folderPathSelector: string;
660
+ folderPathSelectorHelp: string;
661
+ };
662
+ };
663
+ imports: {
664
+ start: string;
665
+ empty: string;
666
+ profile: string;
667
+ startedBy: string;
668
+ started: string;
669
+ ended: string;
670
+ matched: string;
671
+ created: string;
672
+ problems: string;
673
+ planned: string;
674
+ corrected: string;
675
+ kept: string;
676
+ unchanged: string;
677
+ loadMore: string;
678
+ phase: {
679
+ queued: string;
680
+ reading: string;
681
+ writing: string;
682
+ cancelling: string;
683
+ };
684
+ outcome: {
685
+ succeeded: string;
686
+ succeeded_with_problems: string;
687
+ failed: string;
688
+ cancelled: string;
689
+ };
690
+ progressTitle: string;
691
+ phaseLong: {
692
+ reading: string;
693
+ writing: string;
694
+ };
695
+ progressOf: string;
696
+ progressUnknown: string;
697
+ queuedBody: string;
698
+ failedTitle: string;
699
+ cancelledBody: string;
700
+ cancellingBody: string;
701
+ problemsBody_one: string;
702
+ problemsBody_other: string;
703
+ details: string;
704
+ effectiveDate: string;
705
+ source: string;
706
+ sourceValue: string;
707
+ none: string;
708
+ changeSet: string;
709
+ counts: string;
710
+ releases: string;
711
+ releaseOf: string;
712
+ mapping: string;
713
+ entitySet: string;
714
+ cancel: string;
715
+ cancelTitle: string;
716
+ cancelMessage: string;
717
+ cancelConfirm: string;
718
+ keepRunning: string;
719
+ cancelFailed: string;
720
+ itemProblems: string;
721
+ noItemProblems: string;
722
+ noMatchingProblems: string;
723
+ searchSourceKey: string;
724
+ filterMapping: string;
725
+ allMappings: string;
726
+ mappingCount: string;
727
+ problemCount: string;
728
+ sourceKey: string;
729
+ field: string;
730
+ reason: string;
731
+ wholeVersion: string;
732
+ noSourceKey: string;
733
+ subtitle: string;
734
+ outcomeColumn: string;
735
+ someone: string;
736
+ mappings: string;
737
+ };
738
+ startImport: {
739
+ title: string;
740
+ fileCard: string;
741
+ profile: string;
742
+ profileHelp: string;
743
+ profileOption: string;
744
+ file: string;
745
+ fileHelp: string;
746
+ dropHint: string;
747
+ dragActive: string;
748
+ chooseFile: string;
749
+ uploading: string;
750
+ uploaded: string;
751
+ uploadFailed: string;
752
+ notXml: string;
753
+ datesCard: string;
754
+ datesHelp: string;
755
+ effectiveDate: string;
756
+ effectiveDateHelp: string;
757
+ sourceDate: string;
758
+ sourceReference: string;
759
+ sourceReferenceHelp: string;
760
+ sourceIncomplete: string;
761
+ profileRequired: string;
762
+ consentTitle: string;
763
+ consent: string;
764
+ refused: string;
765
+ notAllowed: string;
766
+ noProfiles: string;
767
+ };
466
768
  };
467
769
  };
468
770
  de: {
@@ -710,10 +1012,384 @@ export declare const i18nResources: {
710
1012
  yes: string;
711
1013
  no: string;
712
1014
  };
1015
+ editor: {
1016
+ tabs: {
1017
+ fields: string;
1018
+ versions: string;
1019
+ output: string;
1020
+ };
1021
+ reasonsHere: string;
1022
+ tree: {
1023
+ label: string;
1024
+ mapped: string;
1025
+ unmapped: string;
1026
+ invalid: string;
1027
+ toggle: string;
1028
+ outside: string;
1029
+ noLookup: string;
1030
+ loadFailed: string;
1031
+ selectField: string;
1032
+ };
1033
+ field: {
1034
+ title: string;
1035
+ notMapped: string;
1036
+ map: string;
1037
+ remove: string;
1038
+ selector: string;
1039
+ selectorHelp: string;
1040
+ type: string;
1041
+ optional: string;
1042
+ optionalHelp: string;
1043
+ dateFormat: string;
1044
+ dateFormatHelp: string;
1045
+ dateFormats: string;
1046
+ dateFormatsHelp: string;
1047
+ autoDetectDateFormat: string;
1048
+ numberLocale: string;
1049
+ locale: {
1050
+ de: string;
1051
+ en: string;
1052
+ ch: string;
1053
+ };
1054
+ stripCurrency: string;
1055
+ skipInvalid: string;
1056
+ skipInvalidHelp: string;
1057
+ selectOptions: string;
1058
+ selectOptionsHelp: string;
1059
+ textWrapperElement: string;
1060
+ ignoreElements: string;
1061
+ passThroughElements: string;
1062
+ elementsHelp: string;
1063
+ normalizeWhitespace: string;
1064
+ convertNewlinesToBreaks: string;
1065
+ richTextMore: string;
1066
+ refBlueprintId: string;
1067
+ refIdTemplate: string;
1068
+ refIdTemplateHelp: string;
1069
+ refIdExtractPattern: string;
1070
+ refIdExtractSeparator: string;
1071
+ refIdExtractSeparatorHelp: string;
1072
+ concatSelectors: string;
1073
+ concatSelectorsHelp: string;
1074
+ normalizeUnicode: string;
1075
+ childrenHelp: string;
1076
+ elementBlueprintMap: string;
1077
+ elementBlueprintMapHelp: string;
1078
+ elementRefIdTemplateMap: string;
1079
+ elementRefIdTemplateMapHelp: string;
1080
+ };
1081
+ json: {
1082
+ title: string;
1083
+ help: string;
1084
+ label: string;
1085
+ apply: string;
1086
+ notJson: string;
1087
+ notObject: string;
1088
+ unapplied: string;
1089
+ };
1090
+ sourceKey: {
1091
+ title: string;
1092
+ help: string;
1093
+ extractPattern: string;
1094
+ extractPatternHelp: string;
1095
+ extractSeparator: string;
1096
+ extractSeparatorHelp: string;
1097
+ normalize: string;
1098
+ };
1099
+ versionMatch: {
1100
+ title: string;
1101
+ help: string;
1102
+ validityPeriod: string;
1103
+ releaseSpecFields: string;
1104
+ noReleaseSpecFields: string;
1105
+ contentFields: string;
1106
+ noContentFields: string;
1107
+ };
1108
+ validityPeriod: {
1109
+ title: string;
1110
+ validFrom: string;
1111
+ validTo: string;
1112
+ validToHelp: string;
1113
+ dateFormats: string;
1114
+ dateFormatsHelp: string;
1115
+ };
1116
+ releaseSpec: {
1117
+ title: string;
1118
+ none: string;
1119
+ field: string;
1120
+ selector: string;
1121
+ remove: string;
1122
+ add: string;
1123
+ };
1124
+ changedVersion: {
1125
+ title: string;
1126
+ label: string;
1127
+ help: string;
1128
+ correct: string;
1129
+ keep: string;
1130
+ fail: string;
1131
+ };
1132
+ stub: {
1133
+ title: string;
1134
+ label: string;
1135
+ help: string;
1136
+ };
1137
+ naming: {
1138
+ title: string;
1139
+ displayNameTemplate: string;
1140
+ displayNameTemplateHelp: string;
1141
+ collections: string;
1142
+ collectionsHelp: string;
1143
+ };
1144
+ routing: {
1145
+ title: string;
1146
+ help: string;
1147
+ selector: string;
1148
+ collectionMap: string;
1149
+ collectionMapHelp: string;
1150
+ idPattern: string;
1151
+ collectionTemplate: string;
1152
+ collectionTemplateHelp: string;
1153
+ suffix: string;
1154
+ fallback: string;
1155
+ };
1156
+ titles: {
1157
+ title: string;
1158
+ help: string;
1159
+ none: string;
1160
+ item: string;
1161
+ remove: string;
1162
+ add: string;
1163
+ selector: string;
1164
+ selectorHelp: string;
1165
+ ausgabeCodeSelector: string;
1166
+ referenceSpecValues: string;
1167
+ valueField: string;
1168
+ valueSelector: string;
1169
+ removeValue: string;
1170
+ addValue: string;
1171
+ referenceFilterSelector: string;
1172
+ intent: string;
1173
+ intents: {
1174
+ none: string;
1175
+ exclude: string;
1176
+ replace: string;
1177
+ annotate: string;
1178
+ };
1179
+ intentTextSelector: string;
1180
+ intentTextSelectorHelp: string;
1181
+ };
1182
+ assets: {
1183
+ title: string;
1184
+ help: string;
1185
+ none: string;
1186
+ item: string;
1187
+ remove: string;
1188
+ add: string;
1189
+ selector: string;
1190
+ selectorHelp: string;
1191
+ assetType: string;
1192
+ keyParts: string;
1193
+ keyPartsHelp: string;
1194
+ nameSelector: string;
1195
+ descriptionSelector: string;
1196
+ metadata: string;
1197
+ metadataHelp: string;
1198
+ folderRoot: string;
1199
+ folderPathSelector: string;
1200
+ folderPathSelectorHelp: string;
1201
+ };
1202
+ };
1203
+ imports: {
1204
+ start: string;
1205
+ empty: string;
1206
+ profile: string;
1207
+ startedBy: string;
1208
+ started: string;
1209
+ ended: string;
1210
+ matched: string;
1211
+ created: string;
1212
+ problems: string;
1213
+ planned: string;
1214
+ corrected: string;
1215
+ kept: string;
1216
+ unchanged: string;
1217
+ loadMore: string;
1218
+ phase: {
1219
+ queued: string;
1220
+ reading: string;
1221
+ writing: string;
1222
+ cancelling: string;
1223
+ };
1224
+ outcome: {
1225
+ succeeded: string;
1226
+ succeeded_with_problems: string;
1227
+ failed: string;
1228
+ cancelled: string;
1229
+ };
1230
+ progressTitle: string;
1231
+ phaseLong: {
1232
+ reading: string;
1233
+ writing: string;
1234
+ };
1235
+ progressOf: string;
1236
+ progressUnknown: string;
1237
+ queuedBody: string;
1238
+ failedTitle: string;
1239
+ cancelledBody: string;
1240
+ cancellingBody: string;
1241
+ problemsBody_one: string;
1242
+ problemsBody_other: string;
1243
+ details: string;
1244
+ effectiveDate: string;
1245
+ source: string;
1246
+ sourceValue: string;
1247
+ none: string;
1248
+ changeSet: string;
1249
+ counts: string;
1250
+ releases: string;
1251
+ releaseOf: string;
1252
+ mapping: string;
1253
+ entitySet: string;
1254
+ cancel: string;
1255
+ cancelTitle: string;
1256
+ cancelMessage: string;
1257
+ cancelConfirm: string;
1258
+ keepRunning: string;
1259
+ cancelFailed: string;
1260
+ itemProblems: string;
1261
+ noItemProblems: string;
1262
+ noMatchingProblems: string;
1263
+ searchSourceKey: string;
1264
+ filterMapping: string;
1265
+ allMappings: string;
1266
+ mappingCount: string;
1267
+ problemCount: string;
1268
+ sourceKey: string;
1269
+ field: string;
1270
+ reason: string;
1271
+ wholeVersion: string;
1272
+ noSourceKey: string;
1273
+ subtitle: string;
1274
+ outcomeColumn: string;
1275
+ someone: string;
1276
+ mappings: string;
1277
+ };
1278
+ startImport: {
1279
+ title: string;
1280
+ fileCard: string;
1281
+ profile: string;
1282
+ profileHelp: string;
1283
+ profileOption: string;
1284
+ file: string;
1285
+ fileHelp: string;
1286
+ dropHint: string;
1287
+ dragActive: string;
1288
+ chooseFile: string;
1289
+ uploading: string;
1290
+ uploaded: string;
1291
+ uploadFailed: string;
1292
+ notXml: string;
1293
+ datesCard: string;
1294
+ datesHelp: string;
1295
+ effectiveDate: string;
1296
+ effectiveDateHelp: string;
1297
+ sourceDate: string;
1298
+ sourceReference: string;
1299
+ sourceReferenceHelp: string;
1300
+ sourceIncomplete: string;
1301
+ profileRequired: string;
1302
+ consentTitle: string;
1303
+ consent: string;
1304
+ refused: string;
1305
+ notAllowed: string;
1306
+ noProfiles: string;
1307
+ };
713
1308
  };
714
1309
  };
715
1310
  };
716
1311
 
1312
+ /** One run of an Import Profile's Release over one Source File. */
1313
+ export declare interface Import {
1314
+ id: string;
1315
+ importProfileId: string;
1316
+ /** The Profile's name when the Import started. */
1317
+ importProfileName: string;
1318
+ sourceFileId: string;
1319
+ /** The odon user id of who started it; the host's members name them. */
1320
+ startedBy: string;
1321
+ phase: ImportPhase;
1322
+ /** Unset until it has ended. */
1323
+ outcome?: ImportOutcome;
1324
+ /** Why it Failed, as importhub words it; "" otherwise. */
1325
+ failureReason: string;
1326
+ /** How far the current phase is: done of total, both 0 while unknown. */
1327
+ progress: {
1328
+ done: number;
1329
+ total: number;
1330
+ };
1331
+ counts: ImportCounts;
1332
+ /** The contenthub Change Set it fills; "" until it opened one. */
1333
+ changeSetId: string;
1334
+ /** The exact Releases it runs with, pinned at Start (release-a-configuration:AC8). */
1335
+ releases: {
1336
+ importProfile?: ImportReleaseRef;
1337
+ /** In the Profile's order. */
1338
+ mappings: ImportReleaseRef[];
1339
+ /** Unset when the Profile names no Entity Set. */
1340
+ entitySet?: ImportReleaseRef;
1341
+ };
1342
+ /** ISO 8601 timestamps; start and end "" until they happen. */
1343
+ createTime: string;
1344
+ startTime: string;
1345
+ endTime: string;
1346
+ /** The odon user id of who cancelled it, as soon as they asked; "" for nobody. */
1347
+ cancelledBy: string;
1348
+ /** YYYY-MM-DD, or "" for none. */
1349
+ effectiveDate: string;
1350
+ source?: ImportSource;
1351
+ }
1352
+
1353
+ /** What an Import has done (importhub.v1.ImportCounts). */
1354
+ export declare interface ImportCounts {
1355
+ /** Source Versions its Mappings matched. */
1356
+ matched: number;
1357
+ /** Content it created. */
1358
+ created: number;
1359
+ /** Item Problems: Source Versions it skipped. */
1360
+ problems: number;
1361
+ /** New Planned Releases of Content that exists. */
1362
+ planned: number;
1363
+ /** Changed Versions planned as corrections. */
1364
+ corrected: number;
1365
+ /** Changed Versions kept. */
1366
+ kept: number;
1367
+ /** Source Versions already in contenthub. */
1368
+ unchanged: number;
1369
+ }
1370
+
1371
+ /**
1372
+ * One Import (follow-an-import): its status, and while it runs its phase
1373
+ * and progress, read again until it ends (AC2); how it ended and why (AC7),
1374
+ * who cancelled it (AC6); its details with the link to its Change Set in
1375
+ * contenthub, where the host says that is (AC5); its counts; the exact
1376
+ * Releases it ran with (release-a-configuration:AC8); and its Item Problems
1377
+ * (AC4). An importer cancels a queued or running one from the rail; a viewer
1378
+ * sees no Cancel (AC8).
1379
+ */
1380
+ export declare function ImportDetail({ client, id, pollIntervalMs, }: ImportDetailProps): JSX.Element;
1381
+
1382
+ export declare interface ImportDetailProps {
1383
+ client: ImporthubClient;
1384
+ /** The Import's id. */
1385
+ id: string;
1386
+ /**
1387
+ * How often the page reads the Import again while it is queued or
1388
+ * running, in ms; 2000 by default. It stops once the Import has ended.
1389
+ */
1390
+ pollIntervalMs?: number;
1391
+ }
1392
+
717
1393
  /** Each section's icon, as the Standalone App's sidebar shows it too. */
718
1394
  export declare const IMPORTHUB_SECTION_ICONS: Record<ImporthubSection, LucideIcon>;
719
1395
 
@@ -734,12 +1410,41 @@ export declare interface ImporthubBlueprint {
734
1410
  name: string;
735
1411
  }
736
1412
 
1413
+ /**
1414
+ * One field of a Blueprint Release's field tree, as the Mapping editor shows
1415
+ * it (importhub.v1.BlueprintField).
1416
+ */
1417
+ export declare interface ImporthubBlueprintField {
1418
+ /** Its accessor among its siblings. */
1419
+ accessor: string;
1420
+ /** Its accessors from the top joined by `.`: how a Mapping names it. */
1421
+ path: string;
1422
+ /** Its fieldkit field type, such as `text`, `date` or `fieldset`. */
1423
+ fieldType: string;
1424
+ /** Its label for a person; "" when the Release gives none. */
1425
+ label: string;
1426
+ /** A fieldset's or a virtual table's fields, nested. */
1427
+ children: ImporthubBlueprintField[];
1428
+ }
1429
+
737
1430
  /** A Blueprint Release, as a Mapping pins it: `label` names it, such as "Release 3". */
738
1431
  export declare interface ImporthubBlueprintRelease {
739
1432
  id: string;
740
1433
  label: string;
741
1434
  }
742
1435
 
1436
+ /** A Blueprint Release with its field tree, as the Mapping editor reads it. */
1437
+ export declare interface ImporthubBlueprintReleaseTree {
1438
+ id: string;
1439
+ blueprintId: string;
1440
+ /** The name it was cut with, such as `2026-10`. */
1441
+ name: string;
1442
+ /** Its field tree, in the Release's order. */
1443
+ fields: ImporthubBlueprintField[];
1444
+ /** Its Release Spec fields, which Release Spec sources and Version Match read. */
1445
+ releaseSpecFields: ImporthubBlueprintField[];
1446
+ }
1447
+
743
1448
  /**
744
1449
  * Where the screens find Blueprints and their Releases, which live in
745
1450
  * blueprinthub, not importhub: importhub stores only their ids. A host that
@@ -752,6 +1457,13 @@ export declare interface ImporthubBlueprints {
752
1457
  listBlueprints(): Promise<ImporthubBlueprint[]>;
753
1458
  /** A Blueprint's Releases, newest first. */
754
1459
  listReleases(blueprintId: string): Promise<ImporthubBlueprintRelease[]>;
1460
+ /**
1461
+ * A Release with its field tree, for the Mapping editor
1462
+ * (edit-a-mapping-in-the-structured-editor:AC1). Optional, so a host
1463
+ * written before the editor still type-checks; without it the editor
1464
+ * lists only the fields the Mapping maps, and says why.
1465
+ */
1466
+ getRelease?(releaseId: string): Promise<ImporthubBlueprintReleaseTree>;
755
1467
  }
756
1468
 
757
1469
  /**
@@ -798,6 +1510,20 @@ export declare interface ImporthubClient {
798
1510
  compareRevisions(kind: ConfigurationKind, id: string, fromRevisionId: string, toRevisionId: string): Promise<ConfigurationComparison>;
799
1511
  /** Saves an older Revision's content as a new draft, on the draft named. */
800
1512
  restoreRevision(kind: ConfigurationKind, id: string, revisionId: string, draftRevisionId: string): Promise<void>;
1513
+ /**
1514
+ * Uploads one file as a Source File: importhub hands out a direct upload
1515
+ * URL into its blob store, and the file goes there, not through importhub
1516
+ * (start-an-import:AC1). `onProgress` hears the share sent, 0 to 1.
1517
+ */
1518
+ uploadSourceFile(file: File, onProgress: (fraction: number) => void): Promise<SourceFile>;
1519
+ /** Queues an Import. Throws StartRefusedError, with importhub's reason. */
1520
+ startImport(input: StartImportInput): Promise<Import>;
1521
+ /** One page of the workspace's Imports, newest first; pageToken "" for the first. */
1522
+ listImports(pageToken: string): Promise<ImportsPage>;
1523
+ getImport(id: string): Promise<Import>;
1524
+ /** Asks a queued or running Import to stop; returns it as it is now. */
1525
+ cancelImport(id: string): Promise<Import>;
1526
+ listItemProblems(importId: string, filter: ItemProblemsFilter): Promise<ItemProblemsPage>;
801
1527
  }
802
1528
 
803
1529
  export declare interface ImporthubHost {
@@ -817,6 +1543,13 @@ export declare interface ImporthubHost {
817
1543
  * nothing.
818
1544
  */
819
1545
  canConfigure?: boolean;
1546
+ /**
1547
+ * Whether the viewer may start and cancel Imports: importhub's
1548
+ * `importer` (ADR 0010), which `admin` implies. Unset, the screens offer
1549
+ * neither, as to a `viewer` (follow-an-import:AC8); importhub authorizes
1550
+ * every Start and Cancel itself, so this hides actions and guards nothing.
1551
+ */
1552
+ canImport?: boolean;
820
1553
  /** Where Blueprints and their Releases are found; see ImporthubBlueprints. */
821
1554
  blueprints?: ImporthubBlueprints;
822
1555
  }
@@ -839,8 +1572,14 @@ export declare const importhubKeys: {
839
1572
  mappingImportProfiles: (workspaceId: string, id: string) => readonly ["importhub", string, "mappings", string, "importProfiles"];
840
1573
  entitySets: (workspaceId: string) => readonly ["importhub", string, "entitySets"];
841
1574
  entitySet: (workspaceId: string, id: string) => readonly ["importhub", string, "entitySets", string];
1575
+ imports: (workspaceId: string) => readonly ["importhub", string, "imports"];
1576
+ import: (workspaceId: string, id: string) => readonly ["importhub", string, "imports", string];
1577
+ /** An Import's Item Problems under a filter, one entry per filter. */
1578
+ itemProblems: (workspaceId: string, id: string, mappingId: string, sourceKeyQuery: string) => readonly ["importhub", string, "imports", string, "itemProblems", string, string];
842
1579
  blueprints: (workspaceId: string) => readonly ["importhub", string, "blueprints"];
843
1580
  blueprintReleases: (workspaceId: string, blueprintId: string) => readonly ["importhub", string, "blueprints", string, "releases"];
1581
+ /** A Blueprint Release with its field tree; a Release never changes once cut. */
1582
+ blueprintRelease: (workspaceId: string, releaseId: string) => readonly ["importhub", string, "blueprints", "release", string];
844
1583
  /** One configuration of a kind, as its page reads it. */
845
1584
  configuration: (workspaceId: string, kind: ConfigurationKind, id: string) => readonly ["importhub", string, "importProfiles", string] | readonly ["importhub", string, "mappings", string] | readonly ["importhub", string, "entitySets", string];
846
1585
  /** Every list of a kind, so one change refreshes them all. */
@@ -877,6 +1616,12 @@ export declare interface ImporthubStartPageProps {
877
1616
  section: ImporthubSection;
878
1617
  }
879
1618
 
1619
+ /** How an Import ended (importhub.v1.ImportOutcome, CONTEXT.md "Import Outcome"). */
1620
+ export declare type ImportOutcome = "succeeded" | "succeeded_with_problems" | "failed" | "cancelled";
1621
+
1622
+ /** Where an Import is (importhub.v1.ImportPhase). */
1623
+ export declare type ImportPhase = "queued" | "reading" | "writing" | "ended";
1624
+
880
1625
  export declare type ImportProfile = Configured<ImportProfileContent>;
881
1626
 
882
1627
  /** What an admin edits of an Import Profile. */
@@ -933,17 +1678,102 @@ export declare interface ImportProfilesIndexProps {
933
1678
  onOpen: (id: string) => void;
934
1679
  }
935
1680
 
1681
+ /** One Configuration Release an Import runs with, named as it was then. */
1682
+ export declare interface ImportReleaseRef {
1683
+ configurationId: string;
1684
+ /** The configuration's name in that Release. */
1685
+ name: string;
1686
+ releaseId: string;
1687
+ /** "Release 3". */
1688
+ number: number;
1689
+ }
1690
+
1691
+ /**
1692
+ * The workspace's Imports, newest first, with their Profile, starter,
1693
+ * Outcome and counts (follow-an-import:AC1); a queued Import shows as Queued.
1694
+ * The list follows Imports that are still running. An importer starts one
1695
+ * from the header; a viewer sees no Start (follow-an-import:AC8).
1696
+ */
1697
+ export declare function ImportsIndex({ client, onStart, pollIntervalMs, }: ImportsIndexProps): JSX.Element;
1698
+
1699
+ export declare interface ImportsIndexProps {
1700
+ client: ImporthubClient;
1701
+ /** Opens the start flow: the host navigates to where it mounts `StartImport`. */
1702
+ onStart: () => void;
1703
+ /**
1704
+ * How often the list reads again while one of its Imports is queued or
1705
+ * running, in ms; 2000 by default. It stops once all have ended.
1706
+ */
1707
+ pollIntervalMs?: number;
1708
+ }
1709
+
1710
+ /** The publication that triggered an Import: such as 2026-09-20, "BGBl. 2026 I Nr. 270". */
1711
+ export declare interface ImportSource {
1712
+ /** The day it was published, as YYYY-MM-DD. */
1713
+ date: string;
1714
+ /** How it is cited. */
1715
+ reference: string;
1716
+ }
1717
+
1718
+ /** One page of the workspace's Imports, newest first. */
1719
+ export declare interface ImportsPage {
1720
+ imports: Import[];
1721
+ /** "" on the last page. */
1722
+ nextPageToken: string;
1723
+ }
1724
+
936
1725
  /** Where an item of a section lives: its index's path, then its id. */
937
1726
  export declare function itemPath(paths: ImporthubPaths, section: ImporthubSection, id: string): string;
938
1727
 
1728
+ /** One Source Version an Import could not save and skipped (CONTEXT.md "Item Problem"). */
1729
+ export declare interface ItemProblem {
1730
+ id: string;
1731
+ mappingId: string;
1732
+ /** The Mapping's name in the Release the Import ran. */
1733
+ mappingName: string;
1734
+ /** "" when the element has none. */
1735
+ sourceKey: string;
1736
+ /** A /-separated path in the Content's data; "" for the Source Version as a whole. */
1737
+ field: string;
1738
+ /** Why, as importhub words it. */
1739
+ reason: string;
1740
+ }
1741
+
1742
+ /** How an Import's Item Problems are filtered: by Mapping, and by Source Key. */
1743
+ export declare interface ItemProblemsFilter {
1744
+ /** "" for every Mapping. */
1745
+ mappingId: string;
1746
+ /** Matches Source Keys that contain it, ignoring case; "" for all. */
1747
+ sourceKeyQuery: string;
1748
+ /** "" for the first page. */
1749
+ pageToken: string;
1750
+ }
1751
+
1752
+ /** One page of an Import's Item Problems, with their counts. */
1753
+ export declare interface ItemProblemsPage {
1754
+ itemProblems: ItemProblem[];
1755
+ /** Every Item Problem of the Import, whatever the filter. */
1756
+ totalCount: number;
1757
+ /** The Item Problems the filter matches, on every page. */
1758
+ matchingCount: number;
1759
+ /** Every Mapping with Item Problems and how many, whatever the filter. */
1760
+ mappings: {
1761
+ mappingId: string;
1762
+ mappingName: string;
1763
+ count: number;
1764
+ }[];
1765
+ /** "" on the last page. */
1766
+ nextPageToken: string;
1767
+ }
1768
+
939
1769
  export declare type Mapping = Configured<MappingContent>;
940
1770
 
941
1771
  /**
942
1772
  * What an admin edits of a Mapping, in the JSON shape of importhub.v1's
943
- * MappingContent (its camelCase keys). The screens here edit only the
944
- * fields they name; every other setting (field mappings, Version Match,
945
- * Title Contributions, …) is the structured editor's (F4), and travels
946
- * through as given, so a save here never drops it.
1773
+ * MappingContent: its camelCase keys, enums by their names
1774
+ * (`CHANGED_VERSION_HANDLING_KEEP`), unset settings left out. The settings are
1775
+ * typed as the structured editor (F4) edits them; every key travels through
1776
+ * as given, typed or not, so a save never drops one a screen does not show.
947
1777
  */
948
1778
  export declare interface MappingContent {
949
1779
  name: string;
@@ -954,23 +1784,73 @@ export declare interface MappingContent {
954
1784
  sourceKey?: {
955
1785
  selector?: string;
956
1786
  template?: string;
1787
+ extractPattern?: string;
1788
+ /** `-` when unset; "" joins the groups with nothing. */
1789
+ extractSeparator?: string;
1790
+ normalize?: boolean;
957
1791
  [key: string]: unknown;
958
1792
  };
959
1793
  /** Each an xmlmapper FieldMapping; `name` is the field path. */
960
1794
  fields?: Array<Record<string, unknown>>;
1795
+ versionMatch?: {
1796
+ validityPeriod?: boolean;
1797
+ releaseSpecFields?: string[];
1798
+ contentFields?: string[];
1799
+ };
1800
+ validityPeriod?: {
1801
+ validFromSelector?: string;
1802
+ validToSelector?: string;
1803
+ dateFormats?: string[];
1804
+ };
1805
+ releaseSpec?: Array<{
1806
+ field?: string;
1807
+ selector?: string;
1808
+ }>;
1809
+ /** Unset: Correct. */
1810
+ changedVersion?: ChangedVersionHandling;
1811
+ stub?: boolean;
1812
+ titleContributions?: Array<{
1813
+ selector?: string;
1814
+ ausgabeCodeSelector?: string;
1815
+ referenceSpecValues?: Array<{
1816
+ field?: string;
1817
+ selector?: string;
1818
+ }>;
1819
+ referenceFilterSelector?: string;
1820
+ intent?: TitleIntent;
1821
+ intentTextSelector?: string;
1822
+ }>;
1823
+ collectionRouting?: {
1824
+ selector?: string;
1825
+ collectionMap?: Record<string, string>;
1826
+ idPattern?: string;
1827
+ collectionTemplate?: string;
1828
+ suffix?: string;
1829
+ fallback?: string;
1830
+ };
1831
+ collections?: string[];
1832
+ displayNameTemplate?: string;
1833
+ placeholderAssets?: Array<{
1834
+ selector?: string;
1835
+ assetType?: string;
1836
+ keyParts?: string[];
1837
+ nameSelector?: string;
1838
+ descriptionSelector?: string;
1839
+ metadata?: Record<string, string>;
1840
+ folderRoot?: string;
1841
+ folderPathSelector?: string;
1842
+ }>;
961
1843
  [key: string]: unknown;
962
1844
  }
963
1845
 
964
1846
  /**
965
- * One Mapping (manage-mappings:AC2): its name, what it selects and its
966
- * Source Key, the Blueprint Release it pins with the move to another one
967
- * (AC5), the Import Profiles that include it (AC3), and why it is invalid.
968
- * An admin saves with the header's Save and deletes from the rail, which
969
- * importhub refuses while a Profile includes it, naming them (AC4). It
970
- * shows whether its draft differs from its latest Release; an admin cuts a
971
- * Release from the rail, seeing the Profiles that take it first, and its
972
- * History tab lists, compares and restores its Revisions
973
- * (release-a-configuration).
1847
+ * One Mapping's page without the structured editor (manage-mappings:AC2):
1848
+ * its name, element selector and Source Key, its target, the Profiles that
1849
+ * include it, release and history. Every other setting (field mappings,
1850
+ * Version Match, Title Contributions, …) is the Mapping editor's, from
1851
+ * `@knkcs/importhub-ui/mapping-editor`, and is saved back exactly as it came.
1852
+ * A host that loads the editor mounts `MappingEditor` in its place: the same
1853
+ * page with the editor's tabs.
974
1854
  */
975
1855
  export declare function MappingDetail({ client, id, onDeleted }: MappingDetailProps): JSX.Element;
976
1856
 
@@ -1047,6 +1927,12 @@ export declare class ReleaseRefusedError extends Error {
1047
1927
  constructor(message: string, validity?: Validity);
1048
1928
  }
1049
1929
 
1930
+ /** A Source File uploaded and ready to be imported. */
1931
+ export declare interface SourceFile {
1932
+ id: string;
1933
+ fileName: string;
1934
+ }
1935
+
1050
1936
  /**
1051
1937
  * The Standalone App's paths: Imports at the top, the configuration under
1052
1938
  * `/settings/<item>`, one page per item (odon's integration guide, "Sidebar
@@ -1054,6 +1940,47 @@ export declare class ReleaseRefusedError extends Error {
1054
1940
  */
1055
1941
  export declare const STANDALONE_IMPORTHUB_PATHS: ImporthubPaths;
1056
1942
 
1943
+ /**
1944
+ * The start flow (start-an-import:AC1–AC4): an importer picks one of the
1945
+ * workspace's Import Profiles that has a Release, since an Import never runs
1946
+ * a draft; uploads one XML file straight into importhub's storage, with its
1947
+ * progress; gives, if the file carries none, an effective date and a Source
1948
+ * (its date and reference, both or neither); reads what delegated access
1949
+ * Start grants; and starts with the header's one action. A Start importhub
1950
+ * refuses (a missing contenthub right, a configuration without a Release or
1951
+ * invalid now) is shown with importhub's reason. A viewer gets no Start.
1952
+ */
1953
+ export declare function StartImport({ client, onStarted }: StartImportProps): JSX.Element;
1954
+
1955
+ /** What starting an Import takes. */
1956
+ export declare interface StartImportInput {
1957
+ importProfileId: string;
1958
+ sourceFileId: string;
1959
+ /** YYYY-MM-DD; "" or unset for none. */
1960
+ effectiveDate?: string;
1961
+ /** Both or neither. */
1962
+ source?: ImportSource;
1963
+ }
1964
+
1965
+ export declare interface StartImportProps {
1966
+ client: ImporthubClient;
1967
+ /** The Import is queued: the host opens its page. */
1968
+ onStarted: (importId: string) => void;
1969
+ }
1970
+
1971
+ /**
1972
+ * A Start importhub refused (start-an-import:AC4, release-a-configuration:AC5):
1973
+ * the starter lacks contenthub `editor`, or `publisher` for an Auto-publish
1974
+ * Profile, or what the Import would run has no Release or is invalid now. Its
1975
+ * message is importhub's, which names what stands in the way.
1976
+ */
1977
+ export declare class StartRefusedError extends Error {
1978
+ constructor(message: string);
1979
+ }
1980
+
1981
+ /** The intent a Title Contribution writes (importhub.v1.TitleIntent). */
1982
+ export declare type TitleIntent = "TITLE_INTENT_UNSPECIFIED" | "TITLE_INTENT_EXCLUDE" | "TITLE_INTENT_REPLACE" | "TITLE_INTENT_ANNOTATE";
1983
+
1057
1984
  /**
1058
1985
  * The host's decisions; outside a provider, the Standalone App's paths and
1059
1986
  * no Change Set links.