@knkcs/importhub-ui 0.2.0 → 0.4.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
@@ -24,6 +27,51 @@ export declare interface ChangeSetLinkProps {
24
27
  changeSetId: string;
25
28
  }
26
29
 
30
+ /** Two Revisions of one configuration, and how each top-level field differs. */
31
+ export declare interface ConfigurationComparison {
32
+ from: ConfigurationVersion;
33
+ to: ConfigurationVersion;
34
+ fields: {
35
+ field: string;
36
+ status: FieldComparisonStatus;
37
+ }[];
38
+ }
39
+
40
+ /**
41
+ * A configuration's history (release-a-configuration:AC6, AC7): every
42
+ * Revision, newest first, with who saved it and when, the Releases cut from
43
+ * it with who cut them and when, and whether it was valid. Choosing two
44
+ * compares them side by side; an admin restores an older one as a new draft.
45
+ * A panel, not a page: the configuration's page renders it as its History
46
+ * tab, and a host may place it elsewhere. The table reaches both edges, as
47
+ * anker's flush tab bodies do.
48
+ */
49
+ export declare function ConfigurationHistory({ client, kind, id, draftRevisionId, onRestored, }: ConfigurationHistoryProps): JSX.Element;
50
+
51
+ /** One page of a configuration's history. */
52
+ export declare interface ConfigurationHistoryPage {
53
+ /** This page's Revisions, newest first. */
54
+ revisions: ConfigurationRevision[];
55
+ /** Every Release, newest first, on every page. */
56
+ releases: ConfigurationReleaseRecord[];
57
+ /** The token of the next page; "" on the last. */
58
+ nextPageToken: string;
59
+ }
60
+
61
+ export declare interface ConfigurationHistoryProps {
62
+ client: ImporthubClient;
63
+ kind: ConfigurationKind;
64
+ /** The Import Profile's, Mapping's or Entity Set's id. */
65
+ id: string;
66
+ /** The draft as the page last read it: a restore builds on it. */
67
+ draftRevisionId: string;
68
+ /**
69
+ * A restore saved a new draft: the page reads it again, and drops edits
70
+ * it holds on the old one.
71
+ */
72
+ onRestored?: () => void | Promise<void>;
73
+ }
74
+
27
75
  /**
28
76
  * A delete importhub refused because Import Profiles still include the
29
77
  * Mapping, or name the Entity Set (manage-mappings:AC4,
@@ -34,12 +82,38 @@ export declare class ConfigurationInUseError extends Error {
34
82
  constructor(importProfiles: ImportProfileRef[], message?: string);
35
83
  }
36
84
 
85
+ /** The kinds of versioned configuration (ADR 0016). */
86
+ export declare type ConfigurationKind = "importProfile" | "mapping" | "entitySet";
87
+
37
88
  /** A Configuration Release, as a list names it: "Release 3". */
38
89
  export declare interface ConfigurationRelease {
39
90
  id: string;
40
91
  number: number;
41
92
  }
42
93
 
94
+ /** A Configuration Release as the history lists it: who cut it, when, from what. */
95
+ export declare interface ConfigurationReleaseRecord extends ConfigurationRelease {
96
+ /** The Revision it pins. */
97
+ revisionId: string;
98
+ /** The odon user id of the admin who cut it. */
99
+ releasedBy: string;
100
+ /** When it was cut, as an ISO 8601 timestamp. */
101
+ releasedAt: string;
102
+ }
103
+
104
+ /** One saved Revision of a configuration, as its history lists it. */
105
+ export declare interface ConfigurationRevision {
106
+ id: string;
107
+ /** The odon user id of who saved it; the host's members name them. */
108
+ savedBy: string;
109
+ /** When it was saved, as an ISO 8601 timestamp. */
110
+ savedAt: string;
111
+ /** Whether it could be released, as decided when it was saved. */
112
+ validity: Validity;
113
+ /** The Revision it restored; "" for an ordinary save. */
114
+ restoredFromRevisionId: string;
115
+ }
116
+
43
117
  /** Where a configuration stands: its draft and its latest Release. */
44
118
  export declare interface ConfigurationState {
45
119
  draftRevisionId: string;
@@ -49,6 +123,15 @@ export declare interface ConfigurationState {
49
123
  draftDiffersFromRelease: boolean;
50
124
  }
51
125
 
126
+ /**
127
+ * One side of a comparison: a Revision's content, keyed as importhub keys
128
+ * the compared fields (the proto's field names, such as `mapping_ids`).
129
+ */
130
+ export declare interface ConfigurationVersion {
131
+ revisionId: string;
132
+ content: Record<string, unknown>;
133
+ }
134
+
52
135
  /** One configuration of a kind, at its draft. */
53
136
  declare interface Configured<C> {
54
137
  id: string;
@@ -86,6 +169,13 @@ export declare interface CreateConnectImporthubClientOptions {
86
169
  transport?: Transport;
87
170
  }
88
171
 
172
+ /** A Release cut, and for a Mapping the Import Profiles that take it. */
173
+ export declare interface CutReleaseResult {
174
+ release: ConfigurationReleaseRecord;
175
+ /** The Profiles that include the Mapping; empty for other kinds. */
176
+ importProfiles: ImportProfileRef[];
177
+ }
178
+
89
179
  export declare type EntitySet = Configured<EntitySetContent>;
90
180
 
91
181
  /** What an admin edits of an Entity Set. */
@@ -100,7 +190,10 @@ export declare interface EntitySetContent {
100
190
  * One Entity Set (manage-entity-sets:AC1): its name and its table of
101
191
  * entities, each with the text it stands for. An admin edits the table and
102
192
  * saves with the header's Save, and deletes from the rail, which importhub
103
- * refuses while a Profile names it, naming them (AC3).
193
+ * refuses while a Profile names it, naming them (AC3). It shows whether its
194
+ * draft differs from its latest Release, an admin cuts a Release from the
195
+ * rail, and its History tab lists, compares and restores its Revisions
196
+ * (release-a-configuration).
104
197
  */
105
198
  export declare function EntitySetDetail({ client, id, onDeleted }: EntitySetDetailProps): JSX.Element;
106
199
 
@@ -124,6 +217,8 @@ export declare interface EntitySetsIndexProps {
124
217
  onOpen: (id: string) => void;
125
218
  }
126
219
 
220
+ export declare type FieldComparisonStatus = "unchanged" | "added" | "removed" | "changed";
221
+
127
222
  /** The package's bundled translations, keyed by language, then by namespace. */
128
223
  export declare const i18nResources: {
129
224
  en: {
@@ -185,6 +280,11 @@ export declare const i18nResources: {
185
280
  column: string;
186
281
  number: string;
187
282
  none: string;
283
+ state: {
284
+ none: string;
285
+ differs: string;
286
+ current: string;
287
+ };
188
288
  };
189
289
  delete: {
190
290
  inUse: string;
@@ -305,6 +405,255 @@ export declare const i18nResources: {
305
405
  deleteTitle: string;
306
406
  deleteMessage: string;
307
407
  };
408
+ tabs: {
409
+ settings: string;
410
+ history: string;
411
+ };
412
+ cut: {
413
+ action: string;
414
+ title: string;
415
+ confirm: string;
416
+ message: string;
417
+ unchanged: string;
418
+ unsaved: string;
419
+ profilesIntro: string;
420
+ profiles: string;
421
+ noProfiles: string;
422
+ refused: string;
423
+ failed: string;
424
+ done: string;
425
+ doneBody: string;
426
+ };
427
+ history: {
428
+ hint: string;
429
+ none: string;
430
+ loadMore: string;
431
+ columns: {
432
+ revision: string;
433
+ release: string;
434
+ savedBy: string;
435
+ savedAt: string;
436
+ };
437
+ draft: string;
438
+ revision: string;
439
+ revisionOf: string;
440
+ restoredFrom: string;
441
+ cutBy: string;
442
+ unknownPerson: string;
443
+ restore: string;
444
+ restoreTitle: string;
445
+ restoreConfirm: string;
446
+ restoreMessage: string;
447
+ restoreFailed: string;
448
+ olderRelease: string;
449
+ earlierRevision: string;
450
+ };
451
+ compare: {
452
+ title: string;
453
+ between: string;
454
+ field: string;
455
+ same: string;
456
+ differing_one: string;
457
+ differing_other: string;
458
+ status: {
459
+ unchanged: string;
460
+ added: string;
461
+ removed: string;
462
+ changed: string;
463
+ };
464
+ absent: string;
465
+ missingEntitySet: string;
466
+ yes: string;
467
+ no: string;
468
+ };
469
+ editor: {
470
+ tabs: {
471
+ fields: string;
472
+ versions: string;
473
+ output: string;
474
+ };
475
+ reasonsHere: string;
476
+ tree: {
477
+ label: string;
478
+ mapped: string;
479
+ unmapped: string;
480
+ invalid: string;
481
+ toggle: string;
482
+ outside: string;
483
+ noLookup: string;
484
+ loadFailed: string;
485
+ selectField: string;
486
+ };
487
+ field: {
488
+ title: string;
489
+ notMapped: string;
490
+ map: string;
491
+ remove: string;
492
+ selector: string;
493
+ selectorHelp: string;
494
+ type: string;
495
+ optional: string;
496
+ optionalHelp: string;
497
+ dateFormat: string;
498
+ dateFormatHelp: string;
499
+ dateFormats: string;
500
+ dateFormatsHelp: string;
501
+ autoDetectDateFormat: string;
502
+ numberLocale: string;
503
+ locale: {
504
+ de: string;
505
+ en: string;
506
+ ch: string;
507
+ };
508
+ stripCurrency: string;
509
+ skipInvalid: string;
510
+ skipInvalidHelp: string;
511
+ selectOptions: string;
512
+ selectOptionsHelp: string;
513
+ textWrapperElement: string;
514
+ ignoreElements: string;
515
+ passThroughElements: string;
516
+ elementsHelp: string;
517
+ normalizeWhitespace: string;
518
+ convertNewlinesToBreaks: string;
519
+ richTextMore: string;
520
+ refBlueprintId: string;
521
+ refIdTemplate: string;
522
+ refIdTemplateHelp: string;
523
+ refIdExtractPattern: string;
524
+ refIdExtractSeparator: string;
525
+ refIdExtractSeparatorHelp: string;
526
+ concatSelectors: string;
527
+ concatSelectorsHelp: string;
528
+ normalizeUnicode: string;
529
+ childrenHelp: string;
530
+ elementBlueprintMap: string;
531
+ elementBlueprintMapHelp: string;
532
+ elementRefIdTemplateMap: string;
533
+ elementRefIdTemplateMapHelp: string;
534
+ };
535
+ json: {
536
+ title: string;
537
+ help: string;
538
+ label: string;
539
+ apply: string;
540
+ notJson: string;
541
+ notObject: string;
542
+ unapplied: string;
543
+ };
544
+ sourceKey: {
545
+ title: string;
546
+ help: string;
547
+ extractPattern: string;
548
+ extractPatternHelp: string;
549
+ extractSeparator: string;
550
+ extractSeparatorHelp: string;
551
+ normalize: string;
552
+ };
553
+ versionMatch: {
554
+ title: string;
555
+ help: string;
556
+ validityPeriod: string;
557
+ releaseSpecFields: string;
558
+ noReleaseSpecFields: string;
559
+ contentFields: string;
560
+ noContentFields: string;
561
+ };
562
+ validityPeriod: {
563
+ title: string;
564
+ validFrom: string;
565
+ validTo: string;
566
+ validToHelp: string;
567
+ dateFormats: string;
568
+ dateFormatsHelp: string;
569
+ };
570
+ releaseSpec: {
571
+ title: string;
572
+ none: string;
573
+ field: string;
574
+ selector: string;
575
+ remove: string;
576
+ add: string;
577
+ };
578
+ changedVersion: {
579
+ title: string;
580
+ label: string;
581
+ help: string;
582
+ correct: string;
583
+ keep: string;
584
+ fail: string;
585
+ };
586
+ stub: {
587
+ title: string;
588
+ label: string;
589
+ help: string;
590
+ };
591
+ naming: {
592
+ title: string;
593
+ displayNameTemplate: string;
594
+ displayNameTemplateHelp: string;
595
+ collections: string;
596
+ collectionsHelp: string;
597
+ };
598
+ routing: {
599
+ title: string;
600
+ help: string;
601
+ selector: string;
602
+ collectionMap: string;
603
+ collectionMapHelp: string;
604
+ idPattern: string;
605
+ collectionTemplate: string;
606
+ collectionTemplateHelp: string;
607
+ suffix: string;
608
+ fallback: string;
609
+ };
610
+ titles: {
611
+ title: string;
612
+ help: string;
613
+ none: string;
614
+ item: string;
615
+ remove: string;
616
+ add: string;
617
+ selector: string;
618
+ selectorHelp: string;
619
+ ausgabeCodeSelector: string;
620
+ referenceSpecValues: string;
621
+ valueField: string;
622
+ valueSelector: string;
623
+ removeValue: string;
624
+ addValue: string;
625
+ referenceFilterSelector: string;
626
+ intent: string;
627
+ intents: {
628
+ none: string;
629
+ exclude: string;
630
+ replace: string;
631
+ annotate: string;
632
+ };
633
+ intentTextSelector: string;
634
+ intentTextSelectorHelp: string;
635
+ };
636
+ assets: {
637
+ title: string;
638
+ help: string;
639
+ none: string;
640
+ item: string;
641
+ remove: string;
642
+ add: string;
643
+ selector: string;
644
+ selectorHelp: string;
645
+ assetType: string;
646
+ keyParts: string;
647
+ keyPartsHelp: string;
648
+ nameSelector: string;
649
+ descriptionSelector: string;
650
+ metadata: string;
651
+ metadataHelp: string;
652
+ folderRoot: string;
653
+ folderPathSelector: string;
654
+ folderPathSelectorHelp: string;
655
+ };
656
+ };
308
657
  };
309
658
  };
310
659
  de: {
@@ -366,6 +715,11 @@ export declare const i18nResources: {
366
715
  column: string;
367
716
  number: string;
368
717
  none: string;
718
+ state: {
719
+ none: string;
720
+ differs: string;
721
+ current: string;
722
+ };
369
723
  };
370
724
  delete: {
371
725
  inUse: string;
@@ -486,6 +840,255 @@ export declare const i18nResources: {
486
840
  deleteTitle: string;
487
841
  deleteMessage: string;
488
842
  };
843
+ tabs: {
844
+ settings: string;
845
+ history: string;
846
+ };
847
+ cut: {
848
+ action: string;
849
+ title: string;
850
+ confirm: string;
851
+ message: string;
852
+ unchanged: string;
853
+ unsaved: string;
854
+ profilesIntro: string;
855
+ profiles: string;
856
+ noProfiles: string;
857
+ refused: string;
858
+ failed: string;
859
+ done: string;
860
+ doneBody: string;
861
+ };
862
+ history: {
863
+ hint: string;
864
+ none: string;
865
+ loadMore: string;
866
+ columns: {
867
+ revision: string;
868
+ release: string;
869
+ savedBy: string;
870
+ savedAt: string;
871
+ };
872
+ draft: string;
873
+ revision: string;
874
+ revisionOf: string;
875
+ restoredFrom: string;
876
+ cutBy: string;
877
+ unknownPerson: string;
878
+ restore: string;
879
+ restoreTitle: string;
880
+ restoreConfirm: string;
881
+ restoreMessage: string;
882
+ restoreFailed: string;
883
+ olderRelease: string;
884
+ earlierRevision: string;
885
+ };
886
+ compare: {
887
+ title: string;
888
+ between: string;
889
+ field: string;
890
+ same: string;
891
+ differing_one: string;
892
+ differing_other: string;
893
+ status: {
894
+ unchanged: string;
895
+ added: string;
896
+ removed: string;
897
+ changed: string;
898
+ };
899
+ absent: string;
900
+ missingEntitySet: string;
901
+ yes: string;
902
+ no: string;
903
+ };
904
+ editor: {
905
+ tabs: {
906
+ fields: string;
907
+ versions: string;
908
+ output: string;
909
+ };
910
+ reasonsHere: string;
911
+ tree: {
912
+ label: string;
913
+ mapped: string;
914
+ unmapped: string;
915
+ invalid: string;
916
+ toggle: string;
917
+ outside: string;
918
+ noLookup: string;
919
+ loadFailed: string;
920
+ selectField: string;
921
+ };
922
+ field: {
923
+ title: string;
924
+ notMapped: string;
925
+ map: string;
926
+ remove: string;
927
+ selector: string;
928
+ selectorHelp: string;
929
+ type: string;
930
+ optional: string;
931
+ optionalHelp: string;
932
+ dateFormat: string;
933
+ dateFormatHelp: string;
934
+ dateFormats: string;
935
+ dateFormatsHelp: string;
936
+ autoDetectDateFormat: string;
937
+ numberLocale: string;
938
+ locale: {
939
+ de: string;
940
+ en: string;
941
+ ch: string;
942
+ };
943
+ stripCurrency: string;
944
+ skipInvalid: string;
945
+ skipInvalidHelp: string;
946
+ selectOptions: string;
947
+ selectOptionsHelp: string;
948
+ textWrapperElement: string;
949
+ ignoreElements: string;
950
+ passThroughElements: string;
951
+ elementsHelp: string;
952
+ normalizeWhitespace: string;
953
+ convertNewlinesToBreaks: string;
954
+ richTextMore: string;
955
+ refBlueprintId: string;
956
+ refIdTemplate: string;
957
+ refIdTemplateHelp: string;
958
+ refIdExtractPattern: string;
959
+ refIdExtractSeparator: string;
960
+ refIdExtractSeparatorHelp: string;
961
+ concatSelectors: string;
962
+ concatSelectorsHelp: string;
963
+ normalizeUnicode: string;
964
+ childrenHelp: string;
965
+ elementBlueprintMap: string;
966
+ elementBlueprintMapHelp: string;
967
+ elementRefIdTemplateMap: string;
968
+ elementRefIdTemplateMapHelp: string;
969
+ };
970
+ json: {
971
+ title: string;
972
+ help: string;
973
+ label: string;
974
+ apply: string;
975
+ notJson: string;
976
+ notObject: string;
977
+ unapplied: string;
978
+ };
979
+ sourceKey: {
980
+ title: string;
981
+ help: string;
982
+ extractPattern: string;
983
+ extractPatternHelp: string;
984
+ extractSeparator: string;
985
+ extractSeparatorHelp: string;
986
+ normalize: string;
987
+ };
988
+ versionMatch: {
989
+ title: string;
990
+ help: string;
991
+ validityPeriod: string;
992
+ releaseSpecFields: string;
993
+ noReleaseSpecFields: string;
994
+ contentFields: string;
995
+ noContentFields: string;
996
+ };
997
+ validityPeriod: {
998
+ title: string;
999
+ validFrom: string;
1000
+ validTo: string;
1001
+ validToHelp: string;
1002
+ dateFormats: string;
1003
+ dateFormatsHelp: string;
1004
+ };
1005
+ releaseSpec: {
1006
+ title: string;
1007
+ none: string;
1008
+ field: string;
1009
+ selector: string;
1010
+ remove: string;
1011
+ add: string;
1012
+ };
1013
+ changedVersion: {
1014
+ title: string;
1015
+ label: string;
1016
+ help: string;
1017
+ correct: string;
1018
+ keep: string;
1019
+ fail: string;
1020
+ };
1021
+ stub: {
1022
+ title: string;
1023
+ label: string;
1024
+ help: string;
1025
+ };
1026
+ naming: {
1027
+ title: string;
1028
+ displayNameTemplate: string;
1029
+ displayNameTemplateHelp: string;
1030
+ collections: string;
1031
+ collectionsHelp: string;
1032
+ };
1033
+ routing: {
1034
+ title: string;
1035
+ help: string;
1036
+ selector: string;
1037
+ collectionMap: string;
1038
+ collectionMapHelp: string;
1039
+ idPattern: string;
1040
+ collectionTemplate: string;
1041
+ collectionTemplateHelp: string;
1042
+ suffix: string;
1043
+ fallback: string;
1044
+ };
1045
+ titles: {
1046
+ title: string;
1047
+ help: string;
1048
+ none: string;
1049
+ item: string;
1050
+ remove: string;
1051
+ add: string;
1052
+ selector: string;
1053
+ selectorHelp: string;
1054
+ ausgabeCodeSelector: string;
1055
+ referenceSpecValues: string;
1056
+ valueField: string;
1057
+ valueSelector: string;
1058
+ removeValue: string;
1059
+ addValue: string;
1060
+ referenceFilterSelector: string;
1061
+ intent: string;
1062
+ intents: {
1063
+ none: string;
1064
+ exclude: string;
1065
+ replace: string;
1066
+ annotate: string;
1067
+ };
1068
+ intentTextSelector: string;
1069
+ intentTextSelectorHelp: string;
1070
+ };
1071
+ assets: {
1072
+ title: string;
1073
+ help: string;
1074
+ none: string;
1075
+ item: string;
1076
+ remove: string;
1077
+ add: string;
1078
+ selector: string;
1079
+ selectorHelp: string;
1080
+ assetType: string;
1081
+ keyParts: string;
1082
+ keyPartsHelp: string;
1083
+ nameSelector: string;
1084
+ descriptionSelector: string;
1085
+ metadata: string;
1086
+ metadataHelp: string;
1087
+ folderRoot: string;
1088
+ folderPathSelector: string;
1089
+ folderPathSelectorHelp: string;
1090
+ };
1091
+ };
489
1092
  };
490
1093
  };
491
1094
  };
@@ -510,12 +1113,41 @@ export declare interface ImporthubBlueprint {
510
1113
  name: string;
511
1114
  }
512
1115
 
1116
+ /**
1117
+ * One field of a Blueprint Release's field tree, as the Mapping editor shows
1118
+ * it (importhub.v1.BlueprintField).
1119
+ */
1120
+ export declare interface ImporthubBlueprintField {
1121
+ /** Its accessor among its siblings. */
1122
+ accessor: string;
1123
+ /** Its accessors from the top joined by `.`: how a Mapping names it. */
1124
+ path: string;
1125
+ /** Its fieldkit field type, such as `text`, `date` or `fieldset`. */
1126
+ fieldType: string;
1127
+ /** Its label for a person; "" when the Release gives none. */
1128
+ label: string;
1129
+ /** A fieldset's or a virtual table's fields, nested. */
1130
+ children: ImporthubBlueprintField[];
1131
+ }
1132
+
513
1133
  /** A Blueprint Release, as a Mapping pins it: `label` names it, such as "Release 3". */
514
1134
  export declare interface ImporthubBlueprintRelease {
515
1135
  id: string;
516
1136
  label: string;
517
1137
  }
518
1138
 
1139
+ /** A Blueprint Release with its field tree, as the Mapping editor reads it. */
1140
+ export declare interface ImporthubBlueprintReleaseTree {
1141
+ id: string;
1142
+ blueprintId: string;
1143
+ /** The name it was cut with, such as `2026-10`. */
1144
+ name: string;
1145
+ /** Its field tree, in the Release's order. */
1146
+ fields: ImporthubBlueprintField[];
1147
+ /** Its Release Spec fields, which Release Spec sources and Version Match read. */
1148
+ releaseSpecFields: ImporthubBlueprintField[];
1149
+ }
1150
+
519
1151
  /**
520
1152
  * Where the screens find Blueprints and their Releases, which live in
521
1153
  * blueprinthub, not importhub: importhub stores only their ids. A host that
@@ -528,6 +1160,13 @@ export declare interface ImporthubBlueprints {
528
1160
  listBlueprints(): Promise<ImporthubBlueprint[]>;
529
1161
  /** A Blueprint's Releases, newest first. */
530
1162
  listReleases(blueprintId: string): Promise<ImporthubBlueprintRelease[]>;
1163
+ /**
1164
+ * A Release with its field tree, for the Mapping editor
1165
+ * (edit-a-mapping-in-the-structured-editor:AC1). Optional, so a host
1166
+ * written before the editor still type-checks; without it the editor
1167
+ * lists only the fields the Mapping maps, and says why.
1168
+ */
1169
+ getRelease?(releaseId: string): Promise<ImporthubBlueprintReleaseTree>;
531
1170
  }
532
1171
 
533
1172
  /**
@@ -564,6 +1203,16 @@ export declare interface ImporthubClient {
564
1203
  updateEntitySet(id: string, content: EntitySetContent, draftRevisionId: string): Promise<EntitySet>;
565
1204
  /** Throws ConfigurationInUseError while a Profile names it. */
566
1205
  deleteEntitySet(id: string): Promise<void>;
1206
+ /**
1207
+ * Cuts a Configuration Release from the draft named. Throws
1208
+ * ReleaseRefusedError, with the reasons when the draft is invalid.
1209
+ */
1210
+ cutRelease(kind: ConfigurationKind, id: string, draftRevisionId: string): Promise<CutReleaseResult>;
1211
+ /** One page of the history; pageToken "" for the first. */
1212
+ listHistory(kind: ConfigurationKind, id: string, pageToken: string): Promise<ConfigurationHistoryPage>;
1213
+ compareRevisions(kind: ConfigurationKind, id: string, fromRevisionId: string, toRevisionId: string): Promise<ConfigurationComparison>;
1214
+ /** Saves an older Revision's content as a new draft, on the draft named. */
1215
+ restoreRevision(kind: ConfigurationKind, id: string, revisionId: string, draftRevisionId: string): Promise<void>;
567
1216
  }
568
1217
 
569
1218
  export declare interface ImporthubHost {
@@ -607,6 +1256,14 @@ export declare const importhubKeys: {
607
1256
  entitySet: (workspaceId: string, id: string) => readonly ["importhub", string, "entitySets", string];
608
1257
  blueprints: (workspaceId: string) => readonly ["importhub", string, "blueprints"];
609
1258
  blueprintReleases: (workspaceId: string, blueprintId: string) => readonly ["importhub", string, "blueprints", string, "releases"];
1259
+ /** A Blueprint Release with its field tree; a Release never changes once cut. */
1260
+ blueprintRelease: (workspaceId: string, releaseId: string) => readonly ["importhub", string, "blueprints", "release", string];
1261
+ /** One configuration of a kind, as its page reads it. */
1262
+ configuration: (workspaceId: string, kind: ConfigurationKind, id: string) => readonly ["importhub", string, "importProfiles", string] | readonly ["importhub", string, "mappings", string] | readonly ["importhub", string, "entitySets", string];
1263
+ /** Every list of a kind, so one change refreshes them all. */
1264
+ configurations: (workspaceId: string, kind: ConfigurationKind) => readonly ["importhub", string, "importProfiles"] | readonly ["importhub", string, "mappings"] | readonly ["importhub", string, "entitySets"];
1265
+ history: (workspaceId: string, kind: ConfigurationKind, id: string) => readonly ["importhub", string, "importProfiles", string, "history"] | readonly ["importhub", string, "mappings", string, "history"] | readonly ["importhub", string, "entitySets", string, "history"];
1266
+ comparison: (workspaceId: string, kind: ConfigurationKind, id: string, fromRevisionId: string, toRevisionId: string) => readonly ["importhub", string, "importProfiles", string, "comparison", string, string] | readonly ["importhub", string, "mappings", string, "comparison", string, string] | readonly ["importhub", string, "entitySets", string, "comparison", string, string];
610
1267
  };
611
1268
 
612
1269
  /**
@@ -700,10 +1357,10 @@ export declare type Mapping = Configured<MappingContent>;
700
1357
 
701
1358
  /**
702
1359
  * What an admin edits of a Mapping, in the JSON shape of importhub.v1's
703
- * MappingContent (its camelCase keys). The screens here edit only the
704
- * fields they name; every other setting (field mappings, Version Match,
705
- * Title Contributions, …) is the structured editor's (F4), and travels
706
- * through as given, so a save here never drops it.
1360
+ * MappingContent: its camelCase keys, enums by their names
1361
+ * (`CHANGED_VERSION_HANDLING_KEEP`), unset settings left out. The settings are
1362
+ * typed as the structured editor (F4) edits them; every key travels through
1363
+ * as given, typed or not, so a save never drops one a screen does not show.
707
1364
  */
708
1365
  export declare interface MappingContent {
709
1366
  name: string;
@@ -714,19 +1371,73 @@ export declare interface MappingContent {
714
1371
  sourceKey?: {
715
1372
  selector?: string;
716
1373
  template?: string;
1374
+ extractPattern?: string;
1375
+ /** `-` when unset; "" joins the groups with nothing. */
1376
+ extractSeparator?: string;
1377
+ normalize?: boolean;
717
1378
  [key: string]: unknown;
718
1379
  };
719
1380
  /** Each an xmlmapper FieldMapping; `name` is the field path. */
720
1381
  fields?: Array<Record<string, unknown>>;
1382
+ versionMatch?: {
1383
+ validityPeriod?: boolean;
1384
+ releaseSpecFields?: string[];
1385
+ contentFields?: string[];
1386
+ };
1387
+ validityPeriod?: {
1388
+ validFromSelector?: string;
1389
+ validToSelector?: string;
1390
+ dateFormats?: string[];
1391
+ };
1392
+ releaseSpec?: Array<{
1393
+ field?: string;
1394
+ selector?: string;
1395
+ }>;
1396
+ /** Unset: Correct. */
1397
+ changedVersion?: ChangedVersionHandling;
1398
+ stub?: boolean;
1399
+ titleContributions?: Array<{
1400
+ selector?: string;
1401
+ ausgabeCodeSelector?: string;
1402
+ referenceSpecValues?: Array<{
1403
+ field?: string;
1404
+ selector?: string;
1405
+ }>;
1406
+ referenceFilterSelector?: string;
1407
+ intent?: TitleIntent;
1408
+ intentTextSelector?: string;
1409
+ }>;
1410
+ collectionRouting?: {
1411
+ selector?: string;
1412
+ collectionMap?: Record<string, string>;
1413
+ idPattern?: string;
1414
+ collectionTemplate?: string;
1415
+ suffix?: string;
1416
+ fallback?: string;
1417
+ };
1418
+ collections?: string[];
1419
+ displayNameTemplate?: string;
1420
+ placeholderAssets?: Array<{
1421
+ selector?: string;
1422
+ assetType?: string;
1423
+ keyParts?: string[];
1424
+ nameSelector?: string;
1425
+ descriptionSelector?: string;
1426
+ metadata?: Record<string, string>;
1427
+ folderRoot?: string;
1428
+ folderPathSelector?: string;
1429
+ }>;
721
1430
  [key: string]: unknown;
722
1431
  }
723
1432
 
724
1433
  /**
725
- * One Mapping (manage-mappings:AC2): its name, what it selects and its
726
- * Source Key, the Blueprint Release it pins with the move to another one
727
- * (AC5), the Import Profiles that include it (AC3), and why it is invalid.
728
- * An admin saves with the header's Save and deletes from the rail, which
729
- * importhub refuses while a Profile includes it, naming them (AC4).
1434
+ * One Mapping's page without the structured editor (manage-mappings:AC2):
1435
+ * its name, element selector and Source Key, its target, the Profiles that
1436
+ * include it, release and history. Every other setting (field mappings,
1437
+ * Version Match, Title Contributions, …) is the Mapping editor's, from
1438
+ * `@knkcs/importhub-ui/mapping-editor`, and is saved back exactly as it came.
1439
+ * A host that loads the editor mounts `MappingEditor` in its place: the same
1440
+ * page with the editor's tabs.
730
1441
  */
731
1442
  export declare function MappingDetail({ client, id, onDeleted }: MappingDetailProps): JSX.Element;
732
1443
 
@@ -792,6 +1503,17 @@ export declare interface ProcessorStep {
792
1503
 
793
1504
  export declare type ProcessorTarget = "source_file" | "rich_text_field";
794
1505
 
1506
+ /**
1507
+ * A cut importhub refused (release-a-configuration:AC3): the draft is
1508
+ * invalid now, it does not differ from the latest Release, or somebody saved
1509
+ * in between. Carries the draft's validity when that was the reason, so the
1510
+ * screen lists why.
1511
+ */
1512
+ export declare class ReleaseRefusedError extends Error {
1513
+ readonly validity?: Validity;
1514
+ constructor(message: string, validity?: Validity);
1515
+ }
1516
+
795
1517
  /**
796
1518
  * The Standalone App's paths: Imports at the top, the configuration under
797
1519
  * `/settings/<item>`, one page per item (odon's integration guide, "Sidebar
@@ -799,6 +1521,9 @@ export declare type ProcessorTarget = "source_file" | "rich_text_field";
799
1521
  */
800
1522
  export declare const STANDALONE_IMPORTHUB_PATHS: ImporthubPaths;
801
1523
 
1524
+ /** The intent a Title Contribution writes (importhub.v1.TitleIntent). */
1525
+ export declare type TitleIntent = "TITLE_INTENT_UNSPECIFIED" | "TITLE_INTENT_EXCLUDE" | "TITLE_INTENT_REPLACE" | "TITLE_INTENT_ANNOTATE";
1526
+
802
1527
  /**
803
1528
  * The host's decisions; outside a provider, the Standalone App's paths and
804
1529
  * no Change Set links.