@knkcs/importhub-ui 0.6.0 → 0.8.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/dist/field-tree-CghMgGKm.js +108 -0
- package/dist/field-tree-CghMgGKm.js.map +1 -0
- package/dist/importhub-client-BS6F4DW2.js.map +1 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.js +555 -555
- package/dist/index.js.map +1 -1
- package/dist/mapping-editor.d.ts +5 -0
- package/dist/mapping-editor.js +536 -608
- package/dist/mapping-editor.js.map +1 -1
- package/dist/{mapping-page-wJywO-hg.js → mapping-page-tIHPNu7C.js} +279 -279
- package/dist/{mapping-page-wJywO-hg.js.map → mapping-page-tIHPNu7C.js.map} +1 -1
- package/dist/testing.d.ts +5 -0
- package/dist/testing.js +364 -329
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.8.0](https://github.com/knkCS/importhub/compare/importhub-ui-v0.7.0...importhub-ui-v0.8.0) (2026-12-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* write the display name into the Blueprint field the Mapping names (B9b) ([#125](https://github.com/knkCS/importhub/issues/125)) ([07fe84c](https://github.com/knkCS/importhub/commit/07fe84cf6970503f9df150bdb39358e86f679e13))
|
|
9
|
+
|
|
10
|
+
## [0.7.0](https://github.com/knkCS/importhub/compare/importhub-ui-v0.6.0...importhub-ui-v0.7.0) (2026-12-04)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* file imported Content into Collections and name it by template (B9) ([#118](https://github.com/knkCS/importhub/issues/118)) ([1814bc1](https://github.com/knkCS/importhub/commit/1814bc1f92aadbf28664282e5aaa71671da43522))
|
|
16
|
+
|
|
3
17
|
## [0.6.0](https://github.com/knkCS/importhub/compare/importhub-ui-v0.5.0...importhub-ui-v0.6.0) (2026-12-04)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
const y = ["fields", "virtualTableFields"], o = (e) => Array.isArray(e) ? e : [];
|
|
2
|
+
function x(e, t = "", n = "fields") {
|
|
3
|
+
return o(e).flatMap((r, s) => {
|
|
4
|
+
const l = `${t}${String(r.name ?? "")}`, i = `${n}.${s}`;
|
|
5
|
+
return [
|
|
6
|
+
{ path: l, name: i },
|
|
7
|
+
...y.flatMap((a) => x(r[a], `${l}.`, `${i}.${a}`))
|
|
8
|
+
];
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function _(e, t) {
|
|
12
|
+
return x(e).find((n) => n.path === t)?.name ?? null;
|
|
13
|
+
}
|
|
14
|
+
function g(e, t) {
|
|
15
|
+
for (const n of e) {
|
|
16
|
+
if (n.path === t) return [n];
|
|
17
|
+
if (t.startsWith(`${n.path}.`)) {
|
|
18
|
+
const r = g(n.children, t);
|
|
19
|
+
if (r) return [n, ...r];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
function T(e, t = "") {
|
|
25
|
+
return { accessor: e.split(".").pop() ?? e, path: e, fieldType: t, label: "", children: [] };
|
|
26
|
+
}
|
|
27
|
+
const $ = (e) => e.fieldType.includes("table") ? "virtualTableFields" : "fields";
|
|
28
|
+
function I(e, t, n) {
|
|
29
|
+
const r = structuredClone(o(e)), s = _(r, n);
|
|
30
|
+
if (s) return { fields: r, name: s };
|
|
31
|
+
const l = g(t, n) ?? [{ ...T(n, "text"), accessor: n }];
|
|
32
|
+
let i = r, a = "fields", p = "";
|
|
33
|
+
return l.forEach((f, m) => {
|
|
34
|
+
const b = f.path.slice(p.length);
|
|
35
|
+
let u = i.findIndex((c) => String(c.name ?? "") === b);
|
|
36
|
+
const h = m === l.length - 1;
|
|
37
|
+
if (u < 0 && (i.push({
|
|
38
|
+
name: b,
|
|
39
|
+
selector: h ? "" : ".",
|
|
40
|
+
type: v(f.fieldType)
|
|
41
|
+
}), u = i.length - 1), a = `${a}.${u}`, !h) {
|
|
42
|
+
const c = $(f), d = i[u];
|
|
43
|
+
d[c] = o(d[c]), i = d[c], a = `${a}.${c}`, p = `${f.path}.`;
|
|
44
|
+
}
|
|
45
|
+
}), { fields: r, name: a };
|
|
46
|
+
}
|
|
47
|
+
function L(e, t) {
|
|
48
|
+
const n = structuredClone(o(e)), r = t.split(".").slice(1);
|
|
49
|
+
let s = n;
|
|
50
|
+
for (let l = 0; l < r.length - 1; l += 2) {
|
|
51
|
+
const i = s[Number(r[l])];
|
|
52
|
+
if (!i) return n;
|
|
53
|
+
s = o(i[r[l + 1]]);
|
|
54
|
+
}
|
|
55
|
+
return s.splice(Number(r[r.length - 1]), 1), n;
|
|
56
|
+
}
|
|
57
|
+
const P = [
|
|
58
|
+
"text",
|
|
59
|
+
"array",
|
|
60
|
+
"date",
|
|
61
|
+
"number",
|
|
62
|
+
"richtext",
|
|
63
|
+
"reference",
|
|
64
|
+
"toc_reference",
|
|
65
|
+
"concat",
|
|
66
|
+
"virtualtable",
|
|
67
|
+
"select",
|
|
68
|
+
"boolean",
|
|
69
|
+
"fieldset",
|
|
70
|
+
"title_scope",
|
|
71
|
+
"title_data",
|
|
72
|
+
"outline_tree",
|
|
73
|
+
"processing_instructions"
|
|
74
|
+
], M = {
|
|
75
|
+
date: "date",
|
|
76
|
+
number: "number",
|
|
77
|
+
boolean: "boolean",
|
|
78
|
+
select: "select",
|
|
79
|
+
radio: "select",
|
|
80
|
+
checkboxes: "array",
|
|
81
|
+
list: "array",
|
|
82
|
+
array: "array",
|
|
83
|
+
rich_text: "richtext",
|
|
84
|
+
reference: "reference",
|
|
85
|
+
single_reference: "reference",
|
|
86
|
+
fieldset: "fieldset",
|
|
87
|
+
group: "fieldset",
|
|
88
|
+
card: "fieldset",
|
|
89
|
+
section: "fieldset",
|
|
90
|
+
virtual_table: "virtualtable"
|
|
91
|
+
};
|
|
92
|
+
function v(e) {
|
|
93
|
+
return M[e] ?? "text";
|
|
94
|
+
}
|
|
95
|
+
const E = ["text", "textarea"];
|
|
96
|
+
function F(e) {
|
|
97
|
+
return e.flatMap((t) => t.fieldType === "virtual_table" ? [] : [...E.includes(t.fieldType) ? [t] : [], ...F(t.children)]);
|
|
98
|
+
}
|
|
99
|
+
export {
|
|
100
|
+
P as X,
|
|
101
|
+
T as a,
|
|
102
|
+
I as b,
|
|
103
|
+
g as f,
|
|
104
|
+
x as l,
|
|
105
|
+
F as p,
|
|
106
|
+
L as r
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=field-tree-CghMgGKm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-tree-CghMgGKm.js","sources":["../src/screens/mapping-editor/field-tree.ts"],"sourcesContent":["// The bookkeeping between a Blueprint Release's field tree and a Mapping's\n// field mappings, which are xmlmapper FieldMappings: `name` is the field\n// path, and a fieldset's (`fields`) or a virtual table's\n// (`virtualTableFields`) children are named relative to it, as importhub's\n// configstore reads them (fieldPaths in internal/configstore/mapping.go).\n// Pure functions over plain values, so the form's state stays the one copy.\nimport type { ImporthubBlueprintField } from \"../../common/host\";\n\n/** One field mapping as the form holds it: xmlmapper's open object. */\nexport type FieldMappingValue = Record<string, unknown>;\n\n/** A field mapping's place: the field path it writes and its form name. */\nexport interface MappingPlace {\n\tpath: string;\n\t/** Where the form holds it, such as `fields.1.fields.0`. */\n\tname: string;\n}\n\nconst CHILD_KEYS = [\"fields\", \"virtualTableFields\"] as const;\n\nconst asList = (value: unknown): FieldMappingValue[] =>\n\tArray.isArray(value) ? (value as FieldMappingValue[]) : [];\n\n/** Every field mapping, parents before their children, in the Mapping's order. */\nexport function listMappings(fields: unknown, prefix = \"\", base = \"fields\"): MappingPlace[] {\n\treturn asList(fields).flatMap((m, i) => {\n\t\tconst path = `${prefix}${String(m.name ?? \"\")}`;\n\t\tconst name = `${base}.${i}`;\n\t\treturn [\n\t\t\t{ path, name },\n\t\t\t...CHILD_KEYS.flatMap((key) => listMappings(m[key], `${path}.`, `${name}.${key}`)),\n\t\t];\n\t});\n}\n\n/** The form name of the mapping that writes `path`; null while none does. */\nexport function locateMapping(fields: unknown, path: string): string | null {\n\treturn listMappings(fields).find((p) => p.path === path)?.name ?? null;\n}\n\n/** The field and its ancestors, from the top; null when the tree lacks it. */\nexport function findField(\n\ttree: readonly ImporthubBlueprintField[],\n\tpath: string,\n): ImporthubBlueprintField[] | null {\n\tfor (const f of tree) {\n\t\tif (f.path === path) return [f];\n\t\tif (path.startsWith(`${f.path}.`)) {\n\t\t\tconst below = findField(f.children, path);\n\t\t\tif (below) return [f, ...below];\n\t\t}\n\t}\n\treturn null;\n}\n\n/**\n * A field known only by its path: one the Mapping maps that the Release does\n * not have, or every field where the Release cannot be read.\n */\nexport function leafField(path: string, fieldType = \"\"): ImporthubBlueprintField {\n\treturn { accessor: path.split(\".\").pop() ?? path, path, fieldType, label: \"\", children: [] };\n}\n\n/** Where a node's children are mapped: a virtual table's rows, or a fieldset's fields. */\nconst childKeyOf = (f: ImporthubBlueprintField) =>\n\tf.fieldType.includes(\"table\") ? \"virtualTableFields\" : \"fields\";\n\n/**\n * The field mappings with one more, for the field at `path`, and its form\n * name. Its ancestors get a mapping too where they have none (a fieldset's\n * selector `.`, its element's own context), since xmlmapper reads a child\n * only through its parent. Returns them unchanged when it is mapped already.\n */\nexport function addMapping(\n\tfields: unknown,\n\ttree: readonly ImporthubBlueprintField[],\n\tpath: string,\n): { fields: FieldMappingValue[]; name: string } {\n\tconst top = structuredClone(asList(fields));\n\tconst existing = locateMapping(top, path);\n\tif (existing) return { fields: top, name: existing };\n\tconst chain = findField(tree, path) ?? [{ ...leafField(path, \"text\"), accessor: path }];\n\tlet list = top;\n\tlet name = \"fields\";\n\tlet prefix = \"\";\n\tchain.forEach((node, depth) => {\n\t\tconst relative = node.path.slice(prefix.length);\n\t\tlet index = list.findIndex((m) => String(m.name ?? \"\") === relative);\n\t\tconst last = depth === chain.length - 1;\n\t\tif (index < 0) {\n\t\t\tlist.push({\n\t\t\t\tname: relative,\n\t\t\t\tselector: last ? \"\" : \".\",\n\t\t\t\ttype: xmlmapperTypeOf(node.fieldType),\n\t\t\t});\n\t\t\tindex = list.length - 1;\n\t\t}\n\t\tname = `${name}.${index}`;\n\t\tif (!last) {\n\t\t\tconst key = childKeyOf(node);\n\t\t\tconst parent = list[index] as FieldMappingValue;\n\t\t\tparent[key] = asList(parent[key]);\n\t\t\tlist = parent[key] as FieldMappingValue[];\n\t\t\tname = `${name}.${key}`;\n\t\t\tprefix = `${node.path}.`;\n\t\t}\n\t});\n\treturn { fields: top, name };\n}\n\n/** The field mappings without the one at the form name (and its children). */\nexport function removeMapping(fields: unknown, name: string): FieldMappingValue[] {\n\tconst top = structuredClone(asList(fields));\n\tconst tokens = name.split(\".\").slice(1);\n\tlet list: FieldMappingValue[] = top;\n\tfor (let i = 0; i < tokens.length - 1; i += 2) {\n\t\tconst parent = list[Number(tokens[i])];\n\t\tif (!parent) return top;\n\t\tlist = asList(parent[tokens[i + 1] as string]);\n\t}\n\tlist.splice(Number(tokens[tokens.length - 1]), 1);\n\treturn top;\n}\n\n/** The xmlmapper field types (xmlmapper's schema.go). */\nexport const XMLMAPPER_TYPES = [\n\t\"text\",\n\t\"array\",\n\t\"date\",\n\t\"number\",\n\t\"richtext\",\n\t\"reference\",\n\t\"toc_reference\",\n\t\"concat\",\n\t\"virtualtable\",\n\t\"select\",\n\t\"boolean\",\n\t\"fieldset\",\n\t\"title_scope\",\n\t\"title_data\",\n\t\"outline_tree\",\n\t\"processing_instructions\",\n] as const;\n\nconst BY_FIELDKIT_TYPE: Record<string, string> = {\n\tdate: \"date\",\n\tnumber: \"number\",\n\tboolean: \"boolean\",\n\tselect: \"select\",\n\tradio: \"select\",\n\tcheckboxes: \"array\",\n\tlist: \"array\",\n\tarray: \"array\",\n\trich_text: \"richtext\",\n\treference: \"reference\",\n\tsingle_reference: \"reference\",\n\tfieldset: \"fieldset\",\n\tgroup: \"fieldset\",\n\tcard: \"fieldset\",\n\tsection: \"fieldset\",\n\tvirtual_table: \"virtualtable\",\n};\n\n/** The xmlmapper type a new mapping of a fieldkit field starts with; text by default. */\nexport function xmlmapperTypeOf(fieldkitType: string): string {\n\treturn BY_FIELDKIT_TYPE[fieldkitType] ?? \"text\";\n}\n\n/** The field types whose value is one plain string a display name can be. */\nconst PLAIN_TEXT = [\"text\", \"textarea\"];\n\n/**\n * The fields of a Release a display name can be written into\n * (knkCS/importhub#119): its `text` and `textarea` fields, a fieldset's too,\n * but none in a virtual table's rows, which are one field per row. importhub\n * checks the same on save (checkDisplayName in internal/configstore/mapping.go).\n */\nexport function plainTextFields(tree: ImporthubBlueprintField[]): ImporthubBlueprintField[] {\n\treturn tree.flatMap((f) => {\n\t\tif (f.fieldType === \"virtual_table\") return [];\n\t\treturn [...(PLAIN_TEXT.includes(f.fieldType) ? [f] : []), ...plainTextFields(f.children)];\n\t});\n}\n"],"names":["CHILD_KEYS","asList","value","listMappings","fields","prefix","base","m","i","path","name","key","locateMapping","p","findField","tree","f","below","leafField","fieldType","childKeyOf","addMapping","top","existing","chain","list","node","depth","relative","index","last","xmlmapperTypeOf","parent","removeMapping","tokens","XMLMAPPER_TYPES","BY_FIELDKIT_TYPE","fieldkitType","PLAIN_TEXT","plainTextFields"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"importhub-client-BS6F4DW2.js","sources":["../src/client/importhub-client.ts"],"sourcesContent":["// The client the screens are handed: a small, hand-written interface over\n// importhub's Connect API, as every hub package has (blueprinthub-ui,\n// contenthub-ui). Proto types never leave it, so a host or a test can supply\n// any implementation (`createConnectImporthubClient`, or the stub in\n// `@knkcs/importhub-ui/testing`), and a screen never learns the wire.\n//\n// It grows with the screens: the configuration screens (F2) read and write\n// Import Profiles, Mappings and Entity Sets and read the Processor catalogue;\n// release and history (F3, release-a-configuration) cut Releases, list,\n// compare and restore Revisions, alike for every kind of configuration.\n// Imports (F6, start-an-import, follow-an-import) upload a Source File,\n// start, list, read and cancel Imports, and list their Item Problems. API\n// keys (F9, import-with-an-api-key) are created, listed and revoked.\n\nimport type { Schema } from \"@knkcs/fieldkit/schema\";\n\n/** One thing that makes a configuration invalid (importhub.v1.ValidityReason). */\nexport interface ValidityReason {\n\t/** Where, as a JSON Pointer into the content; empty for the whole. */\n\tpath: string;\n\t/** A stable code, such as `no_mappings`; the type's service lists them. */\n\tcode: string;\n\t/** What is wrong, in English, for a person. */\n\tmessage: string;\n}\n\n/** Whether a configuration may be released, and if not, why. */\nexport interface Validity {\n\tvalid: boolean;\n\treasons: ValidityReason[];\n}\n\n/** A Configuration Release, as a list names it: \"Release 3\". */\nexport interface ConfigurationRelease {\n\tid: string;\n\tnumber: number;\n}\n\n/** Where a configuration stands: its draft and its latest Release. */\nexport interface ConfigurationState {\n\tdraftRevisionId: string;\n\t/** Unset while the configuration has none. */\n\tlatestRelease?: ConfigurationRelease;\n\t/** True when the draft differs from the latest Release, and while there is none. */\n\tdraftDiffersFromRelease: boolean;\n}\n\n/** One configuration of a kind, at its draft. */\ninterface Configured<C> {\n\tid: string;\n\t/** The draft's content. */\n\tcontent: C;\n\t/**\n\t * Whether it is valid now: for Profiles and Mappings the service's\n\t * `current_validity`, which counts what changed since the save (an\n\t * included Mapping turned invalid, a Blueprint gone); for Entity Sets the\n\t * validity as saved, the only one they have.\n\t */\n\tvalidity: Validity;\n\tstate: ConfigurationState;\n}\n\n/** One Processor in a Profile's pipeline, with its settings. */\nexport interface ProcessorStep {\n\t/** The Processor, by its name in the catalogue. */\n\tprocessor: string;\n\t/** One value per setting of its settings spec, by `api_accessor`. */\n\tsettings: Record<string, unknown>;\n}\n\n/** What an admin edits of an Import Profile. */\nexport interface ImportProfileContent {\n\tname: string;\n\tdescription: string;\n\t/** The Entity Set the Source File is read with; \"\" for none. */\n\tentitySetId: string;\n\t/** In the order they run. */\n\tpreprocessors: ProcessorStep[];\n\t/** The Mappings it includes, by id, in the order they run. */\n\tmappingIds: string[];\n\t/** In the order they run. */\n\tpostProcessors: ProcessorStep[];\n\tautoPublish: boolean;\n\tdeleteSourceFileOnSuccess: boolean;\n}\n\nexport type ImportProfile = Configured<ImportProfileContent>;\n\n/**\n * What an admin edits of a Mapping, in the JSON shape of importhub.v1's\n * MappingContent: its camelCase keys, enums by their names\n * (`CHANGED_VERSION_HANDLING_KEEP`), unset settings left out. The settings are\n * typed as the structured editor (F4) edits them; every key travels through\n * as given, typed or not, so a save never drops one a screen does not show.\n */\nexport interface MappingContent {\n\tname: string;\n\tdescription?: string;\n\tblueprintId: string;\n\tblueprintReleaseId: string;\n\telementSelector?: string;\n\tsourceKey?: {\n\t\tselector?: string;\n\t\ttemplate?: string;\n\t\textractPattern?: string;\n\t\t/** `-` when unset; \"\" joins the groups with nothing. */\n\t\textractSeparator?: string;\n\t\tnormalize?: boolean;\n\t\t[key: string]: unknown;\n\t};\n\t/** Each an xmlmapper FieldMapping; `name` is the field path. */\n\tfields?: Array<Record<string, unknown>>;\n\tversionMatch?: {\n\t\tvalidityPeriod?: boolean;\n\t\treleaseSpecFields?: string[];\n\t\tcontentFields?: string[];\n\t};\n\tvalidityPeriod?: {\n\t\tvalidFromSelector?: string;\n\t\tvalidToSelector?: string;\n\t\tdateFormats?: string[];\n\t};\n\treleaseSpec?: Array<{ field?: string; selector?: string }>;\n\t/** Unset: Correct. */\n\tchangedVersion?: ChangedVersionHandling;\n\tstub?: boolean;\n\ttitleContributions?: Array<{\n\t\tselector?: string;\n\t\tausgabeCodeSelector?: string;\n\t\treferenceSpecValues?: Array<{ field?: string; selector?: string }>;\n\t\treferenceFilterSelector?: string;\n\t\tintent?: TitleIntent;\n\t\tintentTextSelector?: string;\n\t}>;\n\tcollectionRouting?: {\n\t\tselector?: string;\n\t\tcollectionMap?: Record<string, string>;\n\t\tidPattern?: string;\n\t\tcollectionTemplate?: string;\n\t\tsuffix?: string;\n\t\tfallback?: string;\n\t};\n\tcollections?: string[];\n\tdisplayNameTemplate?: string;\n\tplaceholderAssets?: Array<{\n\t\tselector?: string;\n\t\tassetType?: string;\n\t\tkeyParts?: string[];\n\t\tnameSelector?: string;\n\t\tdescriptionSelector?: string;\n\t\tmetadata?: Record<string, string>;\n\t\tfolderRoot?: string;\n\t\tfolderPathSelector?: string;\n\t}>;\n\t[key: string]: unknown;\n}\n\n/** What happens to a Changed Version (importhub.v1.ChangedVersionHandling). */\nexport type ChangedVersionHandling =\n\t| \"CHANGED_VERSION_HANDLING_UNSPECIFIED\"\n\t| \"CHANGED_VERSION_HANDLING_CORRECT\"\n\t| \"CHANGED_VERSION_HANDLING_KEEP\"\n\t| \"CHANGED_VERSION_HANDLING_FAIL\";\n\n/** The intent a Title Contribution writes (importhub.v1.TitleIntent). */\nexport type TitleIntent =\n\t| \"TITLE_INTENT_UNSPECIFIED\"\n\t| \"TITLE_INTENT_EXCLUDE\"\n\t| \"TITLE_INTENT_REPLACE\"\n\t| \"TITLE_INTENT_ANNOTATE\";\n\nexport type Mapping = Configured<MappingContent>;\n\n/** What an admin edits of an Entity Set. */\nexport interface EntitySetContent {\n\tname: string;\n\tdescription: string;\n\t/** Entity names without `&` and `;`, to the text each stands for. */\n\tentities: Record<string, string>;\n}\n\nexport type EntitySet = Configured<EntitySetContent>;\n\n/** An Import Profile, named where another configuration is used. */\nexport interface ImportProfileRef {\n\tid: string;\n\tname: string;\n}\n\nexport type ProcessorKind = \"preprocessor\" | \"post_processor\";\nexport type ProcessorTarget = \"source_file\" | \"rich_text_field\";\n\n/** One entry of the Processor catalogue. */\nexport interface Processor {\n\t/** How a Profile names it, such as `entity-element`. */\n\tname: string;\n\tkind: ProcessorKind;\n\t/** What it works on: a Profile lists only `source_file` ones. */\n\ttarget: ProcessorTarget;\n\t/** In English, from the service. */\n\tdescription: string;\n\t/** Its settings as fieldkit Fields, in form order; empty for none. */\n\tsettingsSpec: Schema;\n}\n\n/** What moving a Mapping's draft to another Blueprint Release would lose. */\nexport interface BlueprintReleaseCheck {\n\tblueprintId: string;\n\t/** Every mapped field path the Release does not have. */\n\tmissingFieldPaths: string[];\n\t/** Every Release Spec field read or matched on that it does not have. */\n\tmissingReleaseSpecFields: string[];\n}\n\n/**\n * A delete importhub refused because Import Profiles still include the\n * Mapping, or name the Entity Set (manage-mappings:AC4,\n * manage-entity-sets:AC3). Carries the Profiles, so the screen names them.\n */\nexport class ConfigurationInUseError extends Error {\n\treadonly importProfiles: ImportProfileRef[];\n\tconstructor(importProfiles: ImportProfileRef[], message = \"in use by Import Profiles\") {\n\t\tsuper(message);\n\t\tthis.name = \"ConfigurationInUseError\";\n\t\tthis.importProfiles = importProfiles;\n\t}\n}\n\n/**\n * A cut importhub refused (release-a-configuration:AC3): the draft is\n * invalid now, it does not differ from the latest Release, or somebody saved\n * in between. Carries the draft's validity when that was the reason, so the\n * screen lists why.\n */\nexport class ReleaseRefusedError extends Error {\n\treadonly validity?: Validity;\n\tconstructor(message: string, validity?: Validity) {\n\t\tsuper(message);\n\t\tthis.name = \"ReleaseRefusedError\";\n\t\tthis.validity = validity;\n\t}\n}\n\n/** A create or rename refused: another configuration of the kind has the name. */\nexport class NameTakenError extends Error {\n\tconstructor(message = \"the name is taken\") {\n\t\tsuper(message);\n\t\tthis.name = \"NameTakenError\";\n\t}\n}\n\n/** The kinds of versioned configuration (ADR 0016). */\nexport type ConfigurationKind = \"importProfile\" | \"mapping\" | \"entitySet\";\n\n/** One saved Revision of a configuration, as its history lists it. */\nexport interface ConfigurationRevision {\n\tid: string;\n\t/** The odon user id of who saved it; the host's members name them. */\n\tsavedBy: string;\n\t/** When it was saved, as an ISO 8601 timestamp. */\n\tsavedAt: string;\n\t/** Whether it could be released, as decided when it was saved. */\n\tvalidity: Validity;\n\t/** The Revision it restored; \"\" for an ordinary save. */\n\trestoredFromRevisionId: string;\n}\n\n/** A Configuration Release as the history lists it: who cut it, when, from what. */\nexport interface ConfigurationReleaseRecord extends ConfigurationRelease {\n\t/** The Revision it pins. */\n\trevisionId: string;\n\t/** The odon user id of the admin who cut it. */\n\treleasedBy: string;\n\t/** When it was cut, as an ISO 8601 timestamp. */\n\treleasedAt: string;\n}\n\n/** One page of a configuration's history. */\nexport interface ConfigurationHistoryPage {\n\t/** This page's Revisions, newest first. */\n\trevisions: ConfigurationRevision[];\n\t/** Every Release, newest first, on every page. */\n\treleases: ConfigurationReleaseRecord[];\n\t/** The token of the next page; \"\" on the last. */\n\tnextPageToken: string;\n}\n\n/**\n * One side of a comparison: a Revision's content, keyed as importhub keys\n * the compared fields (the proto's field names, such as `mapping_ids`).\n */\nexport interface ConfigurationVersion {\n\trevisionId: string;\n\tcontent: Record<string, unknown>;\n}\n\nexport type FieldComparisonStatus = \"unchanged\" | \"added\" | \"removed\" | \"changed\";\n\n/** Two Revisions of one configuration, and how each top-level field differs. */\nexport interface ConfigurationComparison {\n\tfrom: ConfigurationVersion;\n\tto: ConfigurationVersion;\n\tfields: { field: string; status: FieldComparisonStatus }[];\n}\n\n/** A Release cut, and for a Mapping the Import Profiles that take it. */\nexport interface CutReleaseResult {\n\trelease: ConfigurationReleaseRecord;\n\t/** The Profiles that include the Mapping; empty for other kinds. */\n\timportProfiles: ImportProfileRef[];\n}\n\n/** Where an Import is (importhub.v1.ImportPhase). */\nexport type ImportPhase = \"queued\" | \"reading\" | \"writing\" | \"ended\";\n\n/** How an Import ended (importhub.v1.ImportOutcome, CONTEXT.md \"Import Outcome\"). */\nexport type ImportOutcome = \"succeeded\" | \"succeeded_with_problems\" | \"failed\" | \"cancelled\";\n\n/** The publication that triggered an Import: such as 2026-09-20, \"BGBl. 2026 I Nr. 270\". */\nexport interface ImportSource {\n\t/** The day it was published, as YYYY-MM-DD. */\n\tdate: string;\n\t/** How it is cited. */\n\treference: string;\n}\n\n/** One Configuration Release an Import runs with, named as it was then. */\nexport interface ImportReleaseRef {\n\tconfigurationId: string;\n\t/** The configuration's name in that Release. */\n\tname: string;\n\treleaseId: string;\n\t/** \"Release 3\". */\n\tnumber: number;\n}\n\n/** What an Import has done (importhub.v1.ImportCounts). */\nexport interface ImportCounts {\n\t/** Source Versions its Mappings matched. */\n\tmatched: number;\n\t/** Content it created. */\n\tcreated: number;\n\t/** Item Problems: Source Versions it skipped. */\n\tproblems: number;\n\t/** New Planned Releases of Content that exists. */\n\tplanned: number;\n\t/** Changed Versions planned as corrections. */\n\tcorrected: number;\n\t/** Changed Versions kept. */\n\tkept: number;\n\t/** Source Versions already in contenthub. */\n\tunchanged: number;\n}\n\n/** One run of an Import Profile's Release over one Source File. */\nexport interface Import {\n\tid: string;\n\timportProfileId: string;\n\t/** The Profile's name when the Import started. */\n\timportProfileName: string;\n\tsourceFileId: string;\n\t/** The odon user id of who started it; the host's members name them. */\n\tstartedBy: string;\n\tphase: ImportPhase;\n\t/** Unset until it has ended. */\n\toutcome?: ImportOutcome;\n\t/** Why it Failed, as importhub words it; \"\" otherwise. */\n\tfailureReason: string;\n\t/** How far the current phase is: done of total, both 0 while unknown. */\n\tprogress: { done: number; total: number };\n\tcounts: ImportCounts;\n\t/** The contenthub Change Set it fills; \"\" until it opened one. */\n\tchangeSetId: string;\n\t/** The exact Releases it runs with, pinned at Start (release-a-configuration:AC8). */\n\treleases: {\n\t\timportProfile?: ImportReleaseRef;\n\t\t/** In the Profile's order. */\n\t\tmappings: ImportReleaseRef[];\n\t\t/** Unset when the Profile names no Entity Set. */\n\t\tentitySet?: ImportReleaseRef;\n\t};\n\t/** ISO 8601 timestamps; start and end \"\" until they happen. */\n\tcreateTime: string;\n\tstartTime: string;\n\tendTime: string;\n\t/** The odon user id of who cancelled it, as soon as they asked; \"\" for nobody. */\n\tcancelledBy: string;\n\t/** YYYY-MM-DD, or \"\" for none. */\n\teffectiveDate: string;\n\tsource?: ImportSource;\n}\n\n/** One page of the workspace's Imports, newest first. */\nexport interface ImportsPage {\n\timports: Import[];\n\t/** \"\" on the last page. */\n\tnextPageToken: string;\n}\n\n/** A Source File uploaded and ready to be imported. */\nexport interface SourceFile {\n\tid: string;\n\tfileName: string;\n}\n\n/** What starting an Import takes. */\nexport interface StartImportInput {\n\timportProfileId: string;\n\tsourceFileId: string;\n\t/** YYYY-MM-DD; \"\" or unset for none. */\n\teffectiveDate?: string;\n\t/** Both or neither. */\n\tsource?: ImportSource;\n}\n\n/** One Source Version an Import could not save and skipped (CONTEXT.md \"Item Problem\"). */\nexport interface ItemProblem {\n\tid: string;\n\tmappingId: string;\n\t/** The Mapping's name in the Release the Import ran. */\n\tmappingName: string;\n\t/** \"\" when the element has none. */\n\tsourceKey: string;\n\t/** A /-separated path in the Content's data; \"\" for the Source Version as a whole. */\n\tfield: string;\n\t/** Why, as importhub words it. */\n\treason: string;\n}\n\n/** How an Import's Item Problems are filtered: by Mapping, and by Source Key. */\nexport interface ItemProblemsFilter {\n\t/** \"\" for every Mapping. */\n\tmappingId: string;\n\t/** Matches Source Keys that contain it, ignoring case; \"\" for all. */\n\tsourceKeyQuery: string;\n\t/** \"\" for the first page. */\n\tpageToken: string;\n}\n\n/** One page of an Import's Item Problems, with their counts. */\nexport interface ItemProblemsPage {\n\titemProblems: ItemProblem[];\n\t/** Every Item Problem of the Import, whatever the filter. */\n\ttotalCount: number;\n\t/** The Item Problems the filter matches, on every page. */\n\tmatchingCount: number;\n\t/** Every Mapping with Item Problems and how many, whatever the filter. */\n\tmappings: { mappingId: string; mappingName: string; count: number }[];\n\t/** \"\" on the last page. */\n\tnextPageToken: string;\n}\n\n/**\n * A Start importhub refused (start-an-import:AC4, release-a-configuration:AC5):\n * the starter lacks contenthub `editor`, or `publisher` for an Auto-publish\n * Profile, or what the Import would run has no Release or is invalid now. Its\n * message is importhub's, which names what stands in the way.\n */\nexport class StartRefusedError extends Error {\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = \"StartRefusedError\";\n\t}\n}\n\n/**\n * An importhub API key of the workspace (importhub.v1.APIKey): an odon API\n * key with scope `importhub:workspace:<W>`, which importhub created with a\n * standing Delegation Grant that ends with it (ADR 0006, amended). Never its\n * secret.\n */\nexport interface ApiKey {\n\tid: string;\n\t/** What it is for, as people read it: \"Nightly gesetz feed\". */\n\tname: string;\n\t/** The secret's first characters, for telling keys apart. */\n\tkeyPrefix: string;\n\t/** The odon user id of who created it, as whom it acts; the host's members name them. */\n\towner: string;\n\t/** When it stops working, as an ISO 8601 timestamp; \"\" for never. */\n\texpireTime: string;\n\t/** When it was created, as an ISO 8601 timestamp. */\n\tcreateTime: string;\n}\n\n/** The longest name CreateAPIKey takes. */\nexport const API_KEY_NAME_MAX = 100;\n\n/** What creating an API key takes. */\nexport interface CreateApiKeyInput {\n\t/** Not blank, at most API_KEY_NAME_MAX characters. */\n\tname: string;\n\t/** When it stops working, as an ISO 8601 timestamp in the future; \"\" or unset for never. */\n\texpireTime?: string;\n}\n\n/** A key just created, with its secret: the one time importhub returns it. */\nexport interface CreatedApiKey {\n\tapiKey: ApiKey;\n\t/** To send as `Authorization: Bearer <secret>`; no later call returns it. */\n\tsecret: string;\n}\n\n/**\n * What the screens ask of importhub. Every call acts on the caller's\n * workspace, which importhub takes from the token's active workspace and\n * never from an argument: a host switches workspace by switching the token.\n * An update names the draft it was made on, and is refused when somebody\n * saved in between.\n */\nexport interface ImporthubClient {\n\t/** Every Import Profile of the workspace, by name. */\n\tlistImportProfiles(): Promise<ImportProfile[]>;\n\tgetImportProfile(id: string): Promise<ImportProfile>;\n\tcreateImportProfile(content: ImportProfileContent): Promise<ImportProfile>;\n\tupdateImportProfile(\n\t\tid: string,\n\t\tcontent: ImportProfileContent,\n\t\tdraftRevisionId: string,\n\t): Promise<ImportProfile>;\n\tdeleteImportProfile(id: string): Promise<void>;\n\n\t/** The Processor catalogue, by name; the same in every workspace. */\n\tlistProcessors(): Promise<Processor[]>;\n\n\t/** Every Mapping of the workspace, by name. */\n\tlistMappings(): Promise<Mapping[]>;\n\tgetMapping(id: string): Promise<Mapping>;\n\tcreateMapping(content: MappingContent): Promise<Mapping>;\n\tupdateMapping(id: string, content: MappingContent, draftRevisionId: string): Promise<Mapping>;\n\t/** Throws ConfigurationInUseError while a Profile includes it. */\n\tdeleteMapping(id: string): Promise<void>;\n\t/** The Import Profiles whose draft or latest Release includes it. */\n\tlistMappingImportProfiles(id: string): Promise<ImportProfileRef[]>;\n\t/** Checks moving the draft to another Blueprint Release, saving nothing. */\n\tcheckMappingBlueprintRelease(\n\t\tid: string,\n\t\tblueprintReleaseId: string,\n\t): Promise<BlueprintReleaseCheck>;\n\n\t/** Every Entity Set of the workspace, by name. */\n\tlistEntitySets(): Promise<EntitySet[]>;\n\tgetEntitySet(id: string): Promise<EntitySet>;\n\tcreateEntitySet(content: EntitySetContent): Promise<EntitySet>;\n\tupdateEntitySet(\n\t\tid: string,\n\t\tcontent: EntitySetContent,\n\t\tdraftRevisionId: string,\n\t): Promise<EntitySet>;\n\t/** Throws ConfigurationInUseError while a Profile names it. */\n\tdeleteEntitySet(id: string): Promise<void>;\n\n\t/**\n\t * Cuts a Configuration Release from the draft named. Throws\n\t * ReleaseRefusedError, with the reasons when the draft is invalid.\n\t */\n\tcutRelease(\n\t\tkind: ConfigurationKind,\n\t\tid: string,\n\t\tdraftRevisionId: string,\n\t): Promise<CutReleaseResult>;\n\t/** One page of the history; pageToken \"\" for the first. */\n\tlistHistory(\n\t\tkind: ConfigurationKind,\n\t\tid: string,\n\t\tpageToken: string,\n\t): Promise<ConfigurationHistoryPage>;\n\tcompareRevisions(\n\t\tkind: ConfigurationKind,\n\t\tid: string,\n\t\tfromRevisionId: string,\n\t\ttoRevisionId: string,\n\t): Promise<ConfigurationComparison>;\n\t/** Saves an older Revision's content as a new draft, on the draft named. */\n\trestoreRevision(\n\t\tkind: ConfigurationKind,\n\t\tid: string,\n\t\trevisionId: string,\n\t\tdraftRevisionId: string,\n\t): Promise<void>;\n\n\t/**\n\t * Uploads one file as a Source File: importhub hands out a direct upload\n\t * URL into its blob store, and the file goes there, not through importhub\n\t * (start-an-import:AC1). `onProgress` hears the share sent, 0 to 1.\n\t */\n\tuploadSourceFile(file: File, onProgress: (fraction: number) => void): Promise<SourceFile>;\n\t/** Queues an Import. Throws StartRefusedError, with importhub's reason. */\n\tstartImport(input: StartImportInput): Promise<Import>;\n\t/** One page of the workspace's Imports, newest first; pageToken \"\" for the first. */\n\tlistImports(pageToken: string): Promise<ImportsPage>;\n\tgetImport(id: string): Promise<Import>;\n\t/** Asks a queued or running Import to stop; returns it as it is now. */\n\tcancelImport(id: string): Promise<Import>;\n\tlistItemProblems(importId: string, filter: ItemProblemsFilter): Promise<ItemProblemsPage>;\n\n\t/**\n\t * Every API key of the workspace, every importer's, newest first, without\n\t * their secrets. Needs importhub's `importer`, as all three key calls do.\n\t */\n\tlistApiKeys(): Promise<ApiKey[]>;\n\t/**\n\t * Creates an API key acting as the caller, with its Delegation Grant, and\n\t * returns its secret this once (import-with-an-api-key:AC5).\n\t */\n\tcreateApiKey(input: CreateApiKeyInput): Promise<CreatedApiKey>;\n\t/**\n\t * Revokes an API key in odon and releases its Grant: it stops working at\n\t * once (import-with-an-api-key:AC7).\n\t */\n\trevokeApiKey(id: string): Promise<void>;\n}\n"],"names":["ConfigurationInUseError","importProfiles","message","ReleaseRefusedError","validity","NameTakenError","StartRefusedError","API_KEY_NAME_MAX"],"mappings":"AA2NO,MAAMA,UAAgC,MAAM;AAAA,EACzC;AAAA,EACT,YAAYC,GAAoCC,IAAU,6BAA6B;AACtF,UAAMA,CAAO,GACb,KAAK,OAAO,2BACZ,KAAK,iBAAiBD;AAAA,EACvB;AACD;AAQO,MAAME,UAA4B,MAAM;AAAA,EACrC;AAAA,EACT,YAAYD,GAAiBE,GAAqB;AACjD,UAAMF,CAAO,GACb,KAAK,OAAO,uBACZ,KAAK,WAAWE;AAAA,EACjB;AACD;AAGO,MAAMC,UAAuB,MAAM;AAAA,EACzC,YAAYH,IAAU,qBAAqB;AAC1C,UAAMA,CAAO,GACb,KAAK,OAAO;AAAA,EACb;AACD;AAiNO,MAAMI,UAA0B,MAAM;AAAA,EAC5C,YAAYJ,GAAiB;AAC5B,UAAMA,CAAO,GACb,KAAK,OAAO;AAAA,EACb;AACD;AAuBO,MAAMK,IAAmB;"}
|
|
1
|
+
{"version":3,"file":"importhub-client-BS6F4DW2.js","sources":["../src/client/importhub-client.ts"],"sourcesContent":["// The client the screens are handed: a small, hand-written interface over\n// importhub's Connect API, as every hub package has (blueprinthub-ui,\n// contenthub-ui). Proto types never leave it, so a host or a test can supply\n// any implementation (`createConnectImporthubClient`, or the stub in\n// `@knkcs/importhub-ui/testing`), and a screen never learns the wire.\n//\n// It grows with the screens: the configuration screens (F2) read and write\n// Import Profiles, Mappings and Entity Sets and read the Processor catalogue;\n// release and history (F3, release-a-configuration) cut Releases, list,\n// compare and restore Revisions, alike for every kind of configuration.\n// Imports (F6, start-an-import, follow-an-import) upload a Source File,\n// start, list, read and cancel Imports, and list their Item Problems. API\n// keys (F9, import-with-an-api-key) are created, listed and revoked.\n\nimport type { Schema } from \"@knkcs/fieldkit/schema\";\n\n/** One thing that makes a configuration invalid (importhub.v1.ValidityReason). */\nexport interface ValidityReason {\n\t/** Where, as a JSON Pointer into the content; empty for the whole. */\n\tpath: string;\n\t/** A stable code, such as `no_mappings`; the type's service lists them. */\n\tcode: string;\n\t/** What is wrong, in English, for a person. */\n\tmessage: string;\n}\n\n/** Whether a configuration may be released, and if not, why. */\nexport interface Validity {\n\tvalid: boolean;\n\treasons: ValidityReason[];\n}\n\n/** A Configuration Release, as a list names it: \"Release 3\". */\nexport interface ConfigurationRelease {\n\tid: string;\n\tnumber: number;\n}\n\n/** Where a configuration stands: its draft and its latest Release. */\nexport interface ConfigurationState {\n\tdraftRevisionId: string;\n\t/** Unset while the configuration has none. */\n\tlatestRelease?: ConfigurationRelease;\n\t/** True when the draft differs from the latest Release, and while there is none. */\n\tdraftDiffersFromRelease: boolean;\n}\n\n/** One configuration of a kind, at its draft. */\ninterface Configured<C> {\n\tid: string;\n\t/** The draft's content. */\n\tcontent: C;\n\t/**\n\t * Whether it is valid now: for Profiles and Mappings the service's\n\t * `current_validity`, which counts what changed since the save (an\n\t * included Mapping turned invalid, a Blueprint gone); for Entity Sets the\n\t * validity as saved, the only one they have.\n\t */\n\tvalidity: Validity;\n\tstate: ConfigurationState;\n}\n\n/** One Processor in a Profile's pipeline, with its settings. */\nexport interface ProcessorStep {\n\t/** The Processor, by its name in the catalogue. */\n\tprocessor: string;\n\t/** One value per setting of its settings spec, by `api_accessor`. */\n\tsettings: Record<string, unknown>;\n}\n\n/** What an admin edits of an Import Profile. */\nexport interface ImportProfileContent {\n\tname: string;\n\tdescription: string;\n\t/** The Entity Set the Source File is read with; \"\" for none. */\n\tentitySetId: string;\n\t/** In the order they run. */\n\tpreprocessors: ProcessorStep[];\n\t/** The Mappings it includes, by id, in the order they run. */\n\tmappingIds: string[];\n\t/** In the order they run. */\n\tpostProcessors: ProcessorStep[];\n\tautoPublish: boolean;\n\tdeleteSourceFileOnSuccess: boolean;\n}\n\nexport type ImportProfile = Configured<ImportProfileContent>;\n\n/**\n * What an admin edits of a Mapping, in the JSON shape of importhub.v1's\n * MappingContent: its camelCase keys, enums by their names\n * (`CHANGED_VERSION_HANDLING_KEEP`), unset settings left out. The settings are\n * typed as the structured editor (F4) edits them; every key travels through\n * as given, typed or not, so a save never drops one a screen does not show.\n */\nexport interface MappingContent {\n\tname: string;\n\tdescription?: string;\n\tblueprintId: string;\n\tblueprintReleaseId: string;\n\telementSelector?: string;\n\tsourceKey?: {\n\t\tselector?: string;\n\t\ttemplate?: string;\n\t\textractPattern?: string;\n\t\t/** `-` when unset; \"\" joins the groups with nothing. */\n\t\textractSeparator?: string;\n\t\tnormalize?: boolean;\n\t\t[key: string]: unknown;\n\t};\n\t/** Each an xmlmapper FieldMapping; `name` is the field path. */\n\tfields?: Array<Record<string, unknown>>;\n\tversionMatch?: {\n\t\tvalidityPeriod?: boolean;\n\t\treleaseSpecFields?: string[];\n\t\tcontentFields?: string[];\n\t};\n\tvalidityPeriod?: {\n\t\tvalidFromSelector?: string;\n\t\tvalidToSelector?: string;\n\t\tdateFormats?: string[];\n\t};\n\treleaseSpec?: Array<{ field?: string; selector?: string }>;\n\t/** Unset: Correct. */\n\tchangedVersion?: ChangedVersionHandling;\n\tstub?: boolean;\n\ttitleContributions?: Array<{\n\t\tselector?: string;\n\t\tausgabeCodeSelector?: string;\n\t\treferenceSpecValues?: Array<{ field?: string; selector?: string }>;\n\t\treferenceFilterSelector?: string;\n\t\tintent?: TitleIntent;\n\t\tintentTextSelector?: string;\n\t}>;\n\tcollectionRouting?: {\n\t\tselector?: string;\n\t\tcollectionMap?: Record<string, string>;\n\t\tidPattern?: string;\n\t\tcollectionTemplate?: string;\n\t\tsuffix?: string;\n\t\tfallback?: string;\n\t};\n\tcollections?: string[];\n\tdisplayNameTemplate?: string;\n\t/**\n\t * The plain-text field of the pinned Release the display name is written\n\t * into; set with displayNameTemplate, or neither.\n\t */\n\tdisplayNameField?: string;\n\tplaceholderAssets?: Array<{\n\t\tselector?: string;\n\t\tassetType?: string;\n\t\tkeyParts?: string[];\n\t\tnameSelector?: string;\n\t\tdescriptionSelector?: string;\n\t\tmetadata?: Record<string, string>;\n\t\tfolderRoot?: string;\n\t\tfolderPathSelector?: string;\n\t}>;\n\t[key: string]: unknown;\n}\n\n/** What happens to a Changed Version (importhub.v1.ChangedVersionHandling). */\nexport type ChangedVersionHandling =\n\t| \"CHANGED_VERSION_HANDLING_UNSPECIFIED\"\n\t| \"CHANGED_VERSION_HANDLING_CORRECT\"\n\t| \"CHANGED_VERSION_HANDLING_KEEP\"\n\t| \"CHANGED_VERSION_HANDLING_FAIL\";\n\n/** The intent a Title Contribution writes (importhub.v1.TitleIntent). */\nexport type TitleIntent =\n\t| \"TITLE_INTENT_UNSPECIFIED\"\n\t| \"TITLE_INTENT_EXCLUDE\"\n\t| \"TITLE_INTENT_REPLACE\"\n\t| \"TITLE_INTENT_ANNOTATE\";\n\nexport type Mapping = Configured<MappingContent>;\n\n/** What an admin edits of an Entity Set. */\nexport interface EntitySetContent {\n\tname: string;\n\tdescription: string;\n\t/** Entity names without `&` and `;`, to the text each stands for. */\n\tentities: Record<string, string>;\n}\n\nexport type EntitySet = Configured<EntitySetContent>;\n\n/** An Import Profile, named where another configuration is used. */\nexport interface ImportProfileRef {\n\tid: string;\n\tname: string;\n}\n\nexport type ProcessorKind = \"preprocessor\" | \"post_processor\";\nexport type ProcessorTarget = \"source_file\" | \"rich_text_field\";\n\n/** One entry of the Processor catalogue. */\nexport interface Processor {\n\t/** How a Profile names it, such as `entity-element`. */\n\tname: string;\n\tkind: ProcessorKind;\n\t/** What it works on: a Profile lists only `source_file` ones. */\n\ttarget: ProcessorTarget;\n\t/** In English, from the service. */\n\tdescription: string;\n\t/** Its settings as fieldkit Fields, in form order; empty for none. */\n\tsettingsSpec: Schema;\n}\n\n/** What moving a Mapping's draft to another Blueprint Release would lose. */\nexport interface BlueprintReleaseCheck {\n\tblueprintId: string;\n\t/** Every mapped field path the Release does not have. */\n\tmissingFieldPaths: string[];\n\t/** Every Release Spec field read or matched on that it does not have. */\n\tmissingReleaseSpecFields: string[];\n}\n\n/**\n * A delete importhub refused because Import Profiles still include the\n * Mapping, or name the Entity Set (manage-mappings:AC4,\n * manage-entity-sets:AC3). Carries the Profiles, so the screen names them.\n */\nexport class ConfigurationInUseError extends Error {\n\treadonly importProfiles: ImportProfileRef[];\n\tconstructor(importProfiles: ImportProfileRef[], message = \"in use by Import Profiles\") {\n\t\tsuper(message);\n\t\tthis.name = \"ConfigurationInUseError\";\n\t\tthis.importProfiles = importProfiles;\n\t}\n}\n\n/**\n * A cut importhub refused (release-a-configuration:AC3): the draft is\n * invalid now, it does not differ from the latest Release, or somebody saved\n * in between. Carries the draft's validity when that was the reason, so the\n * screen lists why.\n */\nexport class ReleaseRefusedError extends Error {\n\treadonly validity?: Validity;\n\tconstructor(message: string, validity?: Validity) {\n\t\tsuper(message);\n\t\tthis.name = \"ReleaseRefusedError\";\n\t\tthis.validity = validity;\n\t}\n}\n\n/** A create or rename refused: another configuration of the kind has the name. */\nexport class NameTakenError extends Error {\n\tconstructor(message = \"the name is taken\") {\n\t\tsuper(message);\n\t\tthis.name = \"NameTakenError\";\n\t}\n}\n\n/** The kinds of versioned configuration (ADR 0016). */\nexport type ConfigurationKind = \"importProfile\" | \"mapping\" | \"entitySet\";\n\n/** One saved Revision of a configuration, as its history lists it. */\nexport interface ConfigurationRevision {\n\tid: string;\n\t/** The odon user id of who saved it; the host's members name them. */\n\tsavedBy: string;\n\t/** When it was saved, as an ISO 8601 timestamp. */\n\tsavedAt: string;\n\t/** Whether it could be released, as decided when it was saved. */\n\tvalidity: Validity;\n\t/** The Revision it restored; \"\" for an ordinary save. */\n\trestoredFromRevisionId: string;\n}\n\n/** A Configuration Release as the history lists it: who cut it, when, from what. */\nexport interface ConfigurationReleaseRecord extends ConfigurationRelease {\n\t/** The Revision it pins. */\n\trevisionId: string;\n\t/** The odon user id of the admin who cut it. */\n\treleasedBy: string;\n\t/** When it was cut, as an ISO 8601 timestamp. */\n\treleasedAt: string;\n}\n\n/** One page of a configuration's history. */\nexport interface ConfigurationHistoryPage {\n\t/** This page's Revisions, newest first. */\n\trevisions: ConfigurationRevision[];\n\t/** Every Release, newest first, on every page. */\n\treleases: ConfigurationReleaseRecord[];\n\t/** The token of the next page; \"\" on the last. */\n\tnextPageToken: string;\n}\n\n/**\n * One side of a comparison: a Revision's content, keyed as importhub keys\n * the compared fields (the proto's field names, such as `mapping_ids`).\n */\nexport interface ConfigurationVersion {\n\trevisionId: string;\n\tcontent: Record<string, unknown>;\n}\n\nexport type FieldComparisonStatus = \"unchanged\" | \"added\" | \"removed\" | \"changed\";\n\n/** Two Revisions of one configuration, and how each top-level field differs. */\nexport interface ConfigurationComparison {\n\tfrom: ConfigurationVersion;\n\tto: ConfigurationVersion;\n\tfields: { field: string; status: FieldComparisonStatus }[];\n}\n\n/** A Release cut, and for a Mapping the Import Profiles that take it. */\nexport interface CutReleaseResult {\n\trelease: ConfigurationReleaseRecord;\n\t/** The Profiles that include the Mapping; empty for other kinds. */\n\timportProfiles: ImportProfileRef[];\n}\n\n/** Where an Import is (importhub.v1.ImportPhase). */\nexport type ImportPhase = \"queued\" | \"reading\" | \"writing\" | \"ended\";\n\n/** How an Import ended (importhub.v1.ImportOutcome, CONTEXT.md \"Import Outcome\"). */\nexport type ImportOutcome = \"succeeded\" | \"succeeded_with_problems\" | \"failed\" | \"cancelled\";\n\n/** The publication that triggered an Import: such as 2026-09-20, \"BGBl. 2026 I Nr. 270\". */\nexport interface ImportSource {\n\t/** The day it was published, as YYYY-MM-DD. */\n\tdate: string;\n\t/** How it is cited. */\n\treference: string;\n}\n\n/** One Configuration Release an Import runs with, named as it was then. */\nexport interface ImportReleaseRef {\n\tconfigurationId: string;\n\t/** The configuration's name in that Release. */\n\tname: string;\n\treleaseId: string;\n\t/** \"Release 3\". */\n\tnumber: number;\n}\n\n/** What an Import has done (importhub.v1.ImportCounts). */\nexport interface ImportCounts {\n\t/** Source Versions its Mappings matched. */\n\tmatched: number;\n\t/** Content it created. */\n\tcreated: number;\n\t/** Item Problems: Source Versions it skipped. */\n\tproblems: number;\n\t/** New Planned Releases of Content that exists. */\n\tplanned: number;\n\t/** Changed Versions planned as corrections. */\n\tcorrected: number;\n\t/** Changed Versions kept. */\n\tkept: number;\n\t/** Source Versions already in contenthub. */\n\tunchanged: number;\n}\n\n/** One run of an Import Profile's Release over one Source File. */\nexport interface Import {\n\tid: string;\n\timportProfileId: string;\n\t/** The Profile's name when the Import started. */\n\timportProfileName: string;\n\tsourceFileId: string;\n\t/** The odon user id of who started it; the host's members name them. */\n\tstartedBy: string;\n\tphase: ImportPhase;\n\t/** Unset until it has ended. */\n\toutcome?: ImportOutcome;\n\t/** Why it Failed, as importhub words it; \"\" otherwise. */\n\tfailureReason: string;\n\t/** How far the current phase is: done of total, both 0 while unknown. */\n\tprogress: { done: number; total: number };\n\tcounts: ImportCounts;\n\t/** The contenthub Change Set it fills; \"\" until it opened one. */\n\tchangeSetId: string;\n\t/** The exact Releases it runs with, pinned at Start (release-a-configuration:AC8). */\n\treleases: {\n\t\timportProfile?: ImportReleaseRef;\n\t\t/** In the Profile's order. */\n\t\tmappings: ImportReleaseRef[];\n\t\t/** Unset when the Profile names no Entity Set. */\n\t\tentitySet?: ImportReleaseRef;\n\t};\n\t/** ISO 8601 timestamps; start and end \"\" until they happen. */\n\tcreateTime: string;\n\tstartTime: string;\n\tendTime: string;\n\t/** The odon user id of who cancelled it, as soon as they asked; \"\" for nobody. */\n\tcancelledBy: string;\n\t/** YYYY-MM-DD, or \"\" for none. */\n\teffectiveDate: string;\n\tsource?: ImportSource;\n}\n\n/** One page of the workspace's Imports, newest first. */\nexport interface ImportsPage {\n\timports: Import[];\n\t/** \"\" on the last page. */\n\tnextPageToken: string;\n}\n\n/** A Source File uploaded and ready to be imported. */\nexport interface SourceFile {\n\tid: string;\n\tfileName: string;\n}\n\n/** What starting an Import takes. */\nexport interface StartImportInput {\n\timportProfileId: string;\n\tsourceFileId: string;\n\t/** YYYY-MM-DD; \"\" or unset for none. */\n\teffectiveDate?: string;\n\t/** Both or neither. */\n\tsource?: ImportSource;\n}\n\n/** One Source Version an Import could not save and skipped (CONTEXT.md \"Item Problem\"). */\nexport interface ItemProblem {\n\tid: string;\n\tmappingId: string;\n\t/** The Mapping's name in the Release the Import ran. */\n\tmappingName: string;\n\t/** \"\" when the element has none. */\n\tsourceKey: string;\n\t/** A /-separated path in the Content's data; \"\" for the Source Version as a whole. */\n\tfield: string;\n\t/** Why, as importhub words it. */\n\treason: string;\n}\n\n/** How an Import's Item Problems are filtered: by Mapping, and by Source Key. */\nexport interface ItemProblemsFilter {\n\t/** \"\" for every Mapping. */\n\tmappingId: string;\n\t/** Matches Source Keys that contain it, ignoring case; \"\" for all. */\n\tsourceKeyQuery: string;\n\t/** \"\" for the first page. */\n\tpageToken: string;\n}\n\n/** One page of an Import's Item Problems, with their counts. */\nexport interface ItemProblemsPage {\n\titemProblems: ItemProblem[];\n\t/** Every Item Problem of the Import, whatever the filter. */\n\ttotalCount: number;\n\t/** The Item Problems the filter matches, on every page. */\n\tmatchingCount: number;\n\t/** Every Mapping with Item Problems and how many, whatever the filter. */\n\tmappings: { mappingId: string; mappingName: string; count: number }[];\n\t/** \"\" on the last page. */\n\tnextPageToken: string;\n}\n\n/**\n * A Start importhub refused (start-an-import:AC4, release-a-configuration:AC5):\n * the starter lacks contenthub `editor`, or `publisher` for an Auto-publish\n * Profile, or what the Import would run has no Release or is invalid now. Its\n * message is importhub's, which names what stands in the way.\n */\nexport class StartRefusedError extends Error {\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = \"StartRefusedError\";\n\t}\n}\n\n/**\n * An importhub API key of the workspace (importhub.v1.APIKey): an odon API\n * key with scope `importhub:workspace:<W>`, which importhub created with a\n * standing Delegation Grant that ends with it (ADR 0006, amended). Never its\n * secret.\n */\nexport interface ApiKey {\n\tid: string;\n\t/** What it is for, as people read it: \"Nightly gesetz feed\". */\n\tname: string;\n\t/** The secret's first characters, for telling keys apart. */\n\tkeyPrefix: string;\n\t/** The odon user id of who created it, as whom it acts; the host's members name them. */\n\towner: string;\n\t/** When it stops working, as an ISO 8601 timestamp; \"\" for never. */\n\texpireTime: string;\n\t/** When it was created, as an ISO 8601 timestamp. */\n\tcreateTime: string;\n}\n\n/** The longest name CreateAPIKey takes. */\nexport const API_KEY_NAME_MAX = 100;\n\n/** What creating an API key takes. */\nexport interface CreateApiKeyInput {\n\t/** Not blank, at most API_KEY_NAME_MAX characters. */\n\tname: string;\n\t/** When it stops working, as an ISO 8601 timestamp in the future; \"\" or unset for never. */\n\texpireTime?: string;\n}\n\n/** A key just created, with its secret: the one time importhub returns it. */\nexport interface CreatedApiKey {\n\tapiKey: ApiKey;\n\t/** To send as `Authorization: Bearer <secret>`; no later call returns it. */\n\tsecret: string;\n}\n\n/**\n * What the screens ask of importhub. Every call acts on the caller's\n * workspace, which importhub takes from the token's active workspace and\n * never from an argument: a host switches workspace by switching the token.\n * An update names the draft it was made on, and is refused when somebody\n * saved in between.\n */\nexport interface ImporthubClient {\n\t/** Every Import Profile of the workspace, by name. */\n\tlistImportProfiles(): Promise<ImportProfile[]>;\n\tgetImportProfile(id: string): Promise<ImportProfile>;\n\tcreateImportProfile(content: ImportProfileContent): Promise<ImportProfile>;\n\tupdateImportProfile(\n\t\tid: string,\n\t\tcontent: ImportProfileContent,\n\t\tdraftRevisionId: string,\n\t): Promise<ImportProfile>;\n\tdeleteImportProfile(id: string): Promise<void>;\n\n\t/** The Processor catalogue, by name; the same in every workspace. */\n\tlistProcessors(): Promise<Processor[]>;\n\n\t/** Every Mapping of the workspace, by name. */\n\tlistMappings(): Promise<Mapping[]>;\n\tgetMapping(id: string): Promise<Mapping>;\n\tcreateMapping(content: MappingContent): Promise<Mapping>;\n\tupdateMapping(id: string, content: MappingContent, draftRevisionId: string): Promise<Mapping>;\n\t/** Throws ConfigurationInUseError while a Profile includes it. */\n\tdeleteMapping(id: string): Promise<void>;\n\t/** The Import Profiles whose draft or latest Release includes it. */\n\tlistMappingImportProfiles(id: string): Promise<ImportProfileRef[]>;\n\t/** Checks moving the draft to another Blueprint Release, saving nothing. */\n\tcheckMappingBlueprintRelease(\n\t\tid: string,\n\t\tblueprintReleaseId: string,\n\t): Promise<BlueprintReleaseCheck>;\n\n\t/** Every Entity Set of the workspace, by name. */\n\tlistEntitySets(): Promise<EntitySet[]>;\n\tgetEntitySet(id: string): Promise<EntitySet>;\n\tcreateEntitySet(content: EntitySetContent): Promise<EntitySet>;\n\tupdateEntitySet(\n\t\tid: string,\n\t\tcontent: EntitySetContent,\n\t\tdraftRevisionId: string,\n\t): Promise<EntitySet>;\n\t/** Throws ConfigurationInUseError while a Profile names it. */\n\tdeleteEntitySet(id: string): Promise<void>;\n\n\t/**\n\t * Cuts a Configuration Release from the draft named. Throws\n\t * ReleaseRefusedError, with the reasons when the draft is invalid.\n\t */\n\tcutRelease(\n\t\tkind: ConfigurationKind,\n\t\tid: string,\n\t\tdraftRevisionId: string,\n\t): Promise<CutReleaseResult>;\n\t/** One page of the history; pageToken \"\" for the first. */\n\tlistHistory(\n\t\tkind: ConfigurationKind,\n\t\tid: string,\n\t\tpageToken: string,\n\t): Promise<ConfigurationHistoryPage>;\n\tcompareRevisions(\n\t\tkind: ConfigurationKind,\n\t\tid: string,\n\t\tfromRevisionId: string,\n\t\ttoRevisionId: string,\n\t): Promise<ConfigurationComparison>;\n\t/** Saves an older Revision's content as a new draft, on the draft named. */\n\trestoreRevision(\n\t\tkind: ConfigurationKind,\n\t\tid: string,\n\t\trevisionId: string,\n\t\tdraftRevisionId: string,\n\t): Promise<void>;\n\n\t/**\n\t * Uploads one file as a Source File: importhub hands out a direct upload\n\t * URL into its blob store, and the file goes there, not through importhub\n\t * (start-an-import:AC1). `onProgress` hears the share sent, 0 to 1.\n\t */\n\tuploadSourceFile(file: File, onProgress: (fraction: number) => void): Promise<SourceFile>;\n\t/** Queues an Import. Throws StartRefusedError, with importhub's reason. */\n\tstartImport(input: StartImportInput): Promise<Import>;\n\t/** One page of the workspace's Imports, newest first; pageToken \"\" for the first. */\n\tlistImports(pageToken: string): Promise<ImportsPage>;\n\tgetImport(id: string): Promise<Import>;\n\t/** Asks a queued or running Import to stop; returns it as it is now. */\n\tcancelImport(id: string): Promise<Import>;\n\tlistItemProblems(importId: string, filter: ItemProblemsFilter): Promise<ItemProblemsPage>;\n\n\t/**\n\t * Every API key of the workspace, every importer's, newest first, without\n\t * their secrets. Needs importhub's `importer`, as all three key calls do.\n\t */\n\tlistApiKeys(): Promise<ApiKey[]>;\n\t/**\n\t * Creates an API key acting as the caller, with its Delegation Grant, and\n\t * returns its secret this once (import-with-an-api-key:AC5).\n\t */\n\tcreateApiKey(input: CreateApiKeyInput): Promise<CreatedApiKey>;\n\t/**\n\t * Revokes an API key in odon and releases its Grant: it stops working at\n\t * once (import-with-an-api-key:AC7).\n\t */\n\trevokeApiKey(id: string): Promise<void>;\n}\n"],"names":["ConfigurationInUseError","importProfiles","message","ReleaseRefusedError","validity","NameTakenError","StartRefusedError","API_KEY_NAME_MAX"],"mappings":"AAgOO,MAAMA,UAAgC,MAAM;AAAA,EACzC;AAAA,EACT,YAAYC,GAAoCC,IAAU,6BAA6B;AACtF,UAAMA,CAAO,GACb,KAAK,OAAO,2BACZ,KAAK,iBAAiBD;AAAA,EACvB;AACD;AAQO,MAAME,UAA4B,MAAM;AAAA,EACrC;AAAA,EACT,YAAYD,GAAiBE,GAAqB;AACjD,UAAMF,CAAO,GACb,KAAK,OAAO,uBACZ,KAAK,WAAWE;AAAA,EACjB;AACD;AAGO,MAAMC,UAAuB,MAAM;AAAA,EACzC,YAAYH,IAAU,qBAAqB;AAC1C,UAAMA,CAAO,GACb,KAAK,OAAO;AAAA,EACb;AACD;AAiNO,MAAMI,UAA0B,MAAM;AAAA,EAC5C,YAAYJ,GAAiB;AAC5B,UAAMA,CAAO,GACb,KAAK,OAAO;AAAA,EACb;AACD;AAuBO,MAAMK,IAAmB;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -650,6 +650,10 @@ export declare const i18nResources: {
|
|
|
650
650
|
title: string;
|
|
651
651
|
displayNameTemplate: string;
|
|
652
652
|
displayNameTemplateHelp: string;
|
|
653
|
+
displayNameField: string;
|
|
654
|
+
displayNameFieldHelp: string;
|
|
655
|
+
displayNameFieldNone: string;
|
|
656
|
+
displayNameFieldPathHelp: string;
|
|
653
657
|
collections: string;
|
|
654
658
|
collectionsHelp: string;
|
|
655
659
|
};
|
|
@@ -1221,6 +1225,10 @@ export declare const i18nResources: {
|
|
|
1221
1225
|
title: string;
|
|
1222
1226
|
displayNameTemplate: string;
|
|
1223
1227
|
displayNameTemplateHelp: string;
|
|
1228
|
+
displayNameField: string;
|
|
1229
|
+
displayNameFieldHelp: string;
|
|
1230
|
+
displayNameFieldNone: string;
|
|
1231
|
+
displayNameFieldPathHelp: string;
|
|
1224
1232
|
collections: string;
|
|
1225
1233
|
collectionsHelp: string;
|
|
1226
1234
|
};
|
|
@@ -1961,6 +1969,11 @@ export declare interface MappingContent {
|
|
|
1961
1969
|
};
|
|
1962
1970
|
collections?: string[];
|
|
1963
1971
|
displayNameTemplate?: string;
|
|
1972
|
+
/**
|
|
1973
|
+
* The plain-text field of the pinned Release the display name is written
|
|
1974
|
+
* into; set with displayNameTemplate, or neither.
|
|
1975
|
+
*/
|
|
1976
|
+
displayNameField?: string;
|
|
1964
1977
|
placeholderAssets?: Array<{
|
|
1965
1978
|
selector?: string;
|
|
1966
1979
|
assetType?: string;
|