@knkcs/importhub-ui 0.4.0 → 0.6.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
@@ -4,6 +4,43 @@ import { ReactNode } from 'react';
4
4
  import { Schema } from '@knkcs/fieldkit/schema';
5
5
  import { Transport } from '@connectrpc/connect';
6
6
 
7
+ /**
8
+ * An importhub API key of the workspace (importhub.v1.APIKey): an odon API
9
+ * key with scope `importhub:workspace:<W>`, which importhub created with a
10
+ * standing Delegation Grant that ends with it (ADR 0006, amended). Never its
11
+ * secret.
12
+ */
13
+ export declare interface ApiKey {
14
+ id: string;
15
+ /** What it is for, as people read it: "Nightly gesetz feed". */
16
+ name: string;
17
+ /** The secret's first characters, for telling keys apart. */
18
+ keyPrefix: string;
19
+ /** The odon user id of who created it, as whom it acts; the host's members name them. */
20
+ owner: string;
21
+ /** When it stops working, as an ISO 8601 timestamp; "" for never. */
22
+ expireTime: string;
23
+ /** When it was created, as an ISO 8601 timestamp. */
24
+ createTime: string;
25
+ }
26
+
27
+ /**
28
+ * The workspace's importhub API keys, every importer's, with their name,
29
+ * owner, creation and expiry, never a secret (import-with-an-api-key:AC5,
30
+ * AC7). An importer creates one from the header and revokes one from its
31
+ * row.
32
+ *
33
+ * A viewer sees neither, nor the keys: every API key RPC needs importhub's
34
+ * `importer` (ADR 0010), ListAPIKeys too, so the screen does not ask for a
35
+ * list importhub would refuse and says who manages keys instead. As with
36
+ * Start and Cancel, `canImport` hides actions and guards nothing.
37
+ */
38
+ export declare function ApiKeysIndex({ client }: ApiKeysIndexProps): JSX.Element;
39
+
40
+ export declare interface ApiKeysIndexProps {
41
+ client: ImporthubClient;
42
+ }
43
+
7
44
  /** What moving a Mapping's draft to another Blueprint Release would lose. */
8
45
  export declare interface BlueprintReleaseCheck {
9
46
  blueprintId: string;
@@ -147,6 +184,14 @@ declare interface Configured<C> {
147
184
  state: ConfigurationState;
148
185
  }
149
186
 
187
+ /** What creating an API key takes. */
188
+ export declare interface CreateApiKeyInput {
189
+ /** Not blank, at most API_KEY_NAME_MAX characters. */
190
+ name: string;
191
+ /** When it stops working, as an ISO 8601 timestamp in the future; "" or unset for never. */
192
+ expireTime?: string;
193
+ }
194
+
150
195
  /**
151
196
  * The one call a host makes to talk to importhub (knkcms/core ADR 0003):
152
197
  * an `ImporthubClient` over Connect.
@@ -167,6 +212,19 @@ export declare interface CreateConnectImporthubClientOptions {
167
212
  fetch?: typeof fetch;
168
213
  /** A pre-built transport (tests: `createRouterTransport`). Overrides baseUrl and fetch. */
169
214
  transport?: Transport;
215
+ /**
216
+ * How a Source File's content is sent to the upload URL importhub hands
217
+ * out; `putToBlobStore` by default. Tests in Node, which has no
218
+ * XMLHttpRequest, pass their own.
219
+ */
220
+ putFile?: (url: string, file: File, onProgress: (fraction: number) => void) => Promise<void>;
221
+ }
222
+
223
+ /** A key just created, with its secret: the one time importhub returns it. */
224
+ export declare interface CreatedApiKey {
225
+ apiKey: ApiKey;
226
+ /** To send as `Authorization: Bearer <secret>`; no later call returns it. */
227
+ secret: string;
170
228
  }
171
229
 
172
230
  /** A Release cut, and for a Mapping the Import Profiles that take it. */
@@ -654,6 +712,142 @@ export declare const i18nResources: {
654
712
  folderPathSelectorHelp: string;
655
713
  };
656
714
  };
715
+ imports: {
716
+ start: string;
717
+ empty: string;
718
+ profile: string;
719
+ startedBy: string;
720
+ started: string;
721
+ ended: string;
722
+ matched: string;
723
+ created: string;
724
+ problems: string;
725
+ planned: string;
726
+ corrected: string;
727
+ kept: string;
728
+ unchanged: string;
729
+ loadMore: string;
730
+ phase: {
731
+ queued: string;
732
+ reading: string;
733
+ writing: string;
734
+ cancelling: string;
735
+ };
736
+ outcome: {
737
+ succeeded: string;
738
+ succeeded_with_problems: string;
739
+ failed: string;
740
+ cancelled: string;
741
+ };
742
+ progressTitle: string;
743
+ phaseLong: {
744
+ reading: string;
745
+ writing: string;
746
+ };
747
+ progressOf: string;
748
+ progressUnknown: string;
749
+ queuedBody: string;
750
+ failedTitle: string;
751
+ cancelledBody: string;
752
+ cancellingBody: string;
753
+ problemsBody_one: string;
754
+ problemsBody_other: string;
755
+ details: string;
756
+ effectiveDate: string;
757
+ source: string;
758
+ sourceValue: string;
759
+ none: string;
760
+ changeSet: string;
761
+ counts: string;
762
+ releases: string;
763
+ releaseOf: string;
764
+ mapping: string;
765
+ entitySet: string;
766
+ cancel: string;
767
+ cancelTitle: string;
768
+ cancelMessage: string;
769
+ cancelConfirm: string;
770
+ keepRunning: string;
771
+ cancelFailed: string;
772
+ itemProblems: string;
773
+ noItemProblems: string;
774
+ noMatchingProblems: string;
775
+ searchSourceKey: string;
776
+ filterMapping: string;
777
+ allMappings: string;
778
+ mappingCount: string;
779
+ problemCount: string;
780
+ sourceKey: string;
781
+ field: string;
782
+ reason: string;
783
+ wholeVersion: string;
784
+ noSourceKey: string;
785
+ subtitle: string;
786
+ outcomeColumn: string;
787
+ someone: string;
788
+ mappings: string;
789
+ };
790
+ startImport: {
791
+ title: string;
792
+ fileCard: string;
793
+ profile: string;
794
+ profileHelp: string;
795
+ profileOption: string;
796
+ file: string;
797
+ fileHelp: string;
798
+ dropHint: string;
799
+ dragActive: string;
800
+ chooseFile: string;
801
+ uploading: string;
802
+ uploaded: string;
803
+ uploadFailed: string;
804
+ notXml: string;
805
+ datesCard: string;
806
+ datesHelp: string;
807
+ effectiveDate: string;
808
+ effectiveDateHelp: string;
809
+ sourceDate: string;
810
+ sourceReference: string;
811
+ sourceReferenceHelp: string;
812
+ sourceIncomplete: string;
813
+ profileRequired: string;
814
+ consentTitle: string;
815
+ consent: string;
816
+ refused: string;
817
+ notAllowed: string;
818
+ noProfiles: string;
819
+ };
820
+ apiKeys: {
821
+ title: string;
822
+ subtitle: string;
823
+ new: string;
824
+ empty: string;
825
+ importersOnly: string;
826
+ prefix: string;
827
+ owner: string;
828
+ created: string;
829
+ expires: string;
830
+ never: string;
831
+ nameHelp: string;
832
+ nameRequired: string;
833
+ nameTooLong: string;
834
+ expiresOn: string;
835
+ expiresOnHelp: string;
836
+ expiryPast: string;
837
+ consentTitle: string;
838
+ consent: string;
839
+ createFailed: string;
840
+ secretTitle: string;
841
+ secret: string;
842
+ secretOnce: string;
843
+ copySecret: string;
844
+ done: string;
845
+ revoke: string;
846
+ revokeKey: string;
847
+ revokeTitle: string;
848
+ revokeMessage: string;
849
+ revokeFailed: string;
850
+ };
657
851
  };
658
852
  };
659
853
  de: {
@@ -1089,10 +1283,227 @@ export declare const i18nResources: {
1089
1283
  folderPathSelectorHelp: string;
1090
1284
  };
1091
1285
  };
1286
+ imports: {
1287
+ start: string;
1288
+ empty: string;
1289
+ profile: string;
1290
+ startedBy: string;
1291
+ started: string;
1292
+ ended: string;
1293
+ matched: string;
1294
+ created: string;
1295
+ problems: string;
1296
+ planned: string;
1297
+ corrected: string;
1298
+ kept: string;
1299
+ unchanged: string;
1300
+ loadMore: string;
1301
+ phase: {
1302
+ queued: string;
1303
+ reading: string;
1304
+ writing: string;
1305
+ cancelling: string;
1306
+ };
1307
+ outcome: {
1308
+ succeeded: string;
1309
+ succeeded_with_problems: string;
1310
+ failed: string;
1311
+ cancelled: string;
1312
+ };
1313
+ progressTitle: string;
1314
+ phaseLong: {
1315
+ reading: string;
1316
+ writing: string;
1317
+ };
1318
+ progressOf: string;
1319
+ progressUnknown: string;
1320
+ queuedBody: string;
1321
+ failedTitle: string;
1322
+ cancelledBody: string;
1323
+ cancellingBody: string;
1324
+ problemsBody_one: string;
1325
+ problemsBody_other: string;
1326
+ details: string;
1327
+ effectiveDate: string;
1328
+ source: string;
1329
+ sourceValue: string;
1330
+ none: string;
1331
+ changeSet: string;
1332
+ counts: string;
1333
+ releases: string;
1334
+ releaseOf: string;
1335
+ mapping: string;
1336
+ entitySet: string;
1337
+ cancel: string;
1338
+ cancelTitle: string;
1339
+ cancelMessage: string;
1340
+ cancelConfirm: string;
1341
+ keepRunning: string;
1342
+ cancelFailed: string;
1343
+ itemProblems: string;
1344
+ noItemProblems: string;
1345
+ noMatchingProblems: string;
1346
+ searchSourceKey: string;
1347
+ filterMapping: string;
1348
+ allMappings: string;
1349
+ mappingCount: string;
1350
+ problemCount: string;
1351
+ sourceKey: string;
1352
+ field: string;
1353
+ reason: string;
1354
+ wholeVersion: string;
1355
+ noSourceKey: string;
1356
+ subtitle: string;
1357
+ outcomeColumn: string;
1358
+ someone: string;
1359
+ mappings: string;
1360
+ };
1361
+ startImport: {
1362
+ title: string;
1363
+ fileCard: string;
1364
+ profile: string;
1365
+ profileHelp: string;
1366
+ profileOption: string;
1367
+ file: string;
1368
+ fileHelp: string;
1369
+ dropHint: string;
1370
+ dragActive: string;
1371
+ chooseFile: string;
1372
+ uploading: string;
1373
+ uploaded: string;
1374
+ uploadFailed: string;
1375
+ notXml: string;
1376
+ datesCard: string;
1377
+ datesHelp: string;
1378
+ effectiveDate: string;
1379
+ effectiveDateHelp: string;
1380
+ sourceDate: string;
1381
+ sourceReference: string;
1382
+ sourceReferenceHelp: string;
1383
+ sourceIncomplete: string;
1384
+ profileRequired: string;
1385
+ consentTitle: string;
1386
+ consent: string;
1387
+ refused: string;
1388
+ notAllowed: string;
1389
+ noProfiles: string;
1390
+ };
1391
+ apiKeys: {
1392
+ title: string;
1393
+ subtitle: string;
1394
+ new: string;
1395
+ empty: string;
1396
+ importersOnly: string;
1397
+ prefix: string;
1398
+ owner: string;
1399
+ created: string;
1400
+ expires: string;
1401
+ never: string;
1402
+ nameHelp: string;
1403
+ nameRequired: string;
1404
+ nameTooLong: string;
1405
+ expiresOn: string;
1406
+ expiresOnHelp: string;
1407
+ expiryPast: string;
1408
+ consentTitle: string;
1409
+ consent: string;
1410
+ createFailed: string;
1411
+ secretTitle: string;
1412
+ secret: string;
1413
+ secretOnce: string;
1414
+ copySecret: string;
1415
+ done: string;
1416
+ revoke: string;
1417
+ revokeKey: string;
1418
+ revokeTitle: string;
1419
+ revokeMessage: string;
1420
+ revokeFailed: string;
1421
+ };
1092
1422
  };
1093
1423
  };
1094
1424
  };
1095
1425
 
1426
+ /** One run of an Import Profile's Release over one Source File. */
1427
+ export declare interface Import {
1428
+ id: string;
1429
+ importProfileId: string;
1430
+ /** The Profile's name when the Import started. */
1431
+ importProfileName: string;
1432
+ sourceFileId: string;
1433
+ /** The odon user id of who started it; the host's members name them. */
1434
+ startedBy: string;
1435
+ phase: ImportPhase;
1436
+ /** Unset until it has ended. */
1437
+ outcome?: ImportOutcome;
1438
+ /** Why it Failed, as importhub words it; "" otherwise. */
1439
+ failureReason: string;
1440
+ /** How far the current phase is: done of total, both 0 while unknown. */
1441
+ progress: {
1442
+ done: number;
1443
+ total: number;
1444
+ };
1445
+ counts: ImportCounts;
1446
+ /** The contenthub Change Set it fills; "" until it opened one. */
1447
+ changeSetId: string;
1448
+ /** The exact Releases it runs with, pinned at Start (release-a-configuration:AC8). */
1449
+ releases: {
1450
+ importProfile?: ImportReleaseRef;
1451
+ /** In the Profile's order. */
1452
+ mappings: ImportReleaseRef[];
1453
+ /** Unset when the Profile names no Entity Set. */
1454
+ entitySet?: ImportReleaseRef;
1455
+ };
1456
+ /** ISO 8601 timestamps; start and end "" until they happen. */
1457
+ createTime: string;
1458
+ startTime: string;
1459
+ endTime: string;
1460
+ /** The odon user id of who cancelled it, as soon as they asked; "" for nobody. */
1461
+ cancelledBy: string;
1462
+ /** YYYY-MM-DD, or "" for none. */
1463
+ effectiveDate: string;
1464
+ source?: ImportSource;
1465
+ }
1466
+
1467
+ /** What an Import has done (importhub.v1.ImportCounts). */
1468
+ export declare interface ImportCounts {
1469
+ /** Source Versions its Mappings matched. */
1470
+ matched: number;
1471
+ /** Content it created. */
1472
+ created: number;
1473
+ /** Item Problems: Source Versions it skipped. */
1474
+ problems: number;
1475
+ /** New Planned Releases of Content that exists. */
1476
+ planned: number;
1477
+ /** Changed Versions planned as corrections. */
1478
+ corrected: number;
1479
+ /** Changed Versions kept. */
1480
+ kept: number;
1481
+ /** Source Versions already in contenthub. */
1482
+ unchanged: number;
1483
+ }
1484
+
1485
+ /**
1486
+ * One Import (follow-an-import): its status, and while it runs its phase
1487
+ * and progress, read again until it ends (AC2); how it ended and why (AC7),
1488
+ * who cancelled it (AC6); its details with the link to its Change Set in
1489
+ * contenthub, where the host says that is (AC5); its counts; the exact
1490
+ * Releases it ran with (release-a-configuration:AC8); and its Item Problems
1491
+ * (AC4). An importer cancels a queued or running one from the rail; a viewer
1492
+ * sees no Cancel (AC8).
1493
+ */
1494
+ export declare function ImportDetail({ client, id, pollIntervalMs, }: ImportDetailProps): JSX.Element;
1495
+
1496
+ export declare interface ImportDetailProps {
1497
+ client: ImporthubClient;
1498
+ /** The Import's id. */
1499
+ id: string;
1500
+ /**
1501
+ * How often the page reads the Import again while it is queued or
1502
+ * running, in ms; 2000 by default. It stops once the Import has ended.
1503
+ */
1504
+ pollIntervalMs?: number;
1505
+ }
1506
+
1096
1507
  /** Each section's icon, as the Standalone App's sidebar shows it too. */
1097
1508
  export declare const IMPORTHUB_SECTION_ICONS: Record<ImporthubSection, LucideIcon>;
1098
1509
 
@@ -1213,6 +1624,35 @@ export declare interface ImporthubClient {
1213
1624
  compareRevisions(kind: ConfigurationKind, id: string, fromRevisionId: string, toRevisionId: string): Promise<ConfigurationComparison>;
1214
1625
  /** Saves an older Revision's content as a new draft, on the draft named. */
1215
1626
  restoreRevision(kind: ConfigurationKind, id: string, revisionId: string, draftRevisionId: string): Promise<void>;
1627
+ /**
1628
+ * Uploads one file as a Source File: importhub hands out a direct upload
1629
+ * URL into its blob store, and the file goes there, not through importhub
1630
+ * (start-an-import:AC1). `onProgress` hears the share sent, 0 to 1.
1631
+ */
1632
+ uploadSourceFile(file: File, onProgress: (fraction: number) => void): Promise<SourceFile>;
1633
+ /** Queues an Import. Throws StartRefusedError, with importhub's reason. */
1634
+ startImport(input: StartImportInput): Promise<Import>;
1635
+ /** One page of the workspace's Imports, newest first; pageToken "" for the first. */
1636
+ listImports(pageToken: string): Promise<ImportsPage>;
1637
+ getImport(id: string): Promise<Import>;
1638
+ /** Asks a queued or running Import to stop; returns it as it is now. */
1639
+ cancelImport(id: string): Promise<Import>;
1640
+ listItemProblems(importId: string, filter: ItemProblemsFilter): Promise<ItemProblemsPage>;
1641
+ /**
1642
+ * Every API key of the workspace, every importer's, newest first, without
1643
+ * their secrets. Needs importhub's `importer`, as all three key calls do.
1644
+ */
1645
+ listApiKeys(): Promise<ApiKey[]>;
1646
+ /**
1647
+ * Creates an API key acting as the caller, with its Delegation Grant, and
1648
+ * returns its secret this once (import-with-an-api-key:AC5).
1649
+ */
1650
+ createApiKey(input: CreateApiKeyInput): Promise<CreatedApiKey>;
1651
+ /**
1652
+ * Revokes an API key in odon and releases its Grant: it stops working at
1653
+ * once (import-with-an-api-key:AC7).
1654
+ */
1655
+ revokeApiKey(id: string): Promise<void>;
1216
1656
  }
1217
1657
 
1218
1658
  export declare interface ImporthubHost {
@@ -1232,6 +1672,13 @@ export declare interface ImporthubHost {
1232
1672
  * nothing.
1233
1673
  */
1234
1674
  canConfigure?: boolean;
1675
+ /**
1676
+ * Whether the viewer may start and cancel Imports: importhub's
1677
+ * `importer` (ADR 0010), which `admin` implies. Unset, the screens offer
1678
+ * neither, as to a `viewer` (follow-an-import:AC8); importhub authorizes
1679
+ * every Start and Cancel itself, so this hides actions and guards nothing.
1680
+ */
1681
+ canImport?: boolean;
1235
1682
  /** Where Blueprints and their Releases are found; see ImporthubBlueprints. */
1236
1683
  blueprints?: ImporthubBlueprints;
1237
1684
  }
@@ -1254,6 +1701,12 @@ export declare const importhubKeys: {
1254
1701
  mappingImportProfiles: (workspaceId: string, id: string) => readonly ["importhub", string, "mappings", string, "importProfiles"];
1255
1702
  entitySets: (workspaceId: string) => readonly ["importhub", string, "entitySets"];
1256
1703
  entitySet: (workspaceId: string, id: string) => readonly ["importhub", string, "entitySets", string];
1704
+ imports: (workspaceId: string) => readonly ["importhub", string, "imports"];
1705
+ import: (workspaceId: string, id: string) => readonly ["importhub", string, "imports", string];
1706
+ /** An Import's Item Problems under a filter, one entry per filter. */
1707
+ itemProblems: (workspaceId: string, id: string, mappingId: string, sourceKeyQuery: string) => readonly ["importhub", string, "imports", string, "itemProblems", string, string];
1708
+ /** The workspace's importhub API keys. */
1709
+ apiKeys: (workspaceId: string) => readonly ["importhub", string, "apiKeys"];
1257
1710
  blueprints: (workspaceId: string) => readonly ["importhub", string, "blueprints"];
1258
1711
  blueprintReleases: (workspaceId: string, blueprintId: string) => readonly ["importhub", string, "blueprints", string, "releases"];
1259
1712
  /** A Blueprint Release with its field tree; a Release never changes once cut. */
@@ -1294,6 +1747,12 @@ export declare interface ImporthubStartPageProps {
1294
1747
  section: ImporthubSection;
1295
1748
  }
1296
1749
 
1750
+ /** How an Import ended (importhub.v1.ImportOutcome, CONTEXT.md "Import Outcome"). */
1751
+ export declare type ImportOutcome = "succeeded" | "succeeded_with_problems" | "failed" | "cancelled";
1752
+
1753
+ /** Where an Import is (importhub.v1.ImportPhase). */
1754
+ export declare type ImportPhase = "queued" | "reading" | "writing" | "ended";
1755
+
1297
1756
  export declare type ImportProfile = Configured<ImportProfileContent>;
1298
1757
 
1299
1758
  /** What an admin edits of an Import Profile. */
@@ -1350,9 +1809,94 @@ export declare interface ImportProfilesIndexProps {
1350
1809
  onOpen: (id: string) => void;
1351
1810
  }
1352
1811
 
1812
+ /** One Configuration Release an Import runs with, named as it was then. */
1813
+ export declare interface ImportReleaseRef {
1814
+ configurationId: string;
1815
+ /** The configuration's name in that Release. */
1816
+ name: string;
1817
+ releaseId: string;
1818
+ /** "Release 3". */
1819
+ number: number;
1820
+ }
1821
+
1822
+ /**
1823
+ * The workspace's Imports, newest first, with their Profile, starter,
1824
+ * Outcome and counts (follow-an-import:AC1); a queued Import shows as Queued.
1825
+ * The list follows Imports that are still running. An importer starts one
1826
+ * from the header; a viewer sees no Start (follow-an-import:AC8).
1827
+ */
1828
+ export declare function ImportsIndex({ client, onStart, pollIntervalMs, }: ImportsIndexProps): JSX.Element;
1829
+
1830
+ export declare interface ImportsIndexProps {
1831
+ client: ImporthubClient;
1832
+ /** Opens the start flow: the host navigates to where it mounts `StartImport`. */
1833
+ onStart: () => void;
1834
+ /**
1835
+ * How often the list reads again while one of its Imports is queued or
1836
+ * running, in ms; 2000 by default. It stops once all have ended.
1837
+ */
1838
+ pollIntervalMs?: number;
1839
+ }
1840
+
1841
+ /** The publication that triggered an Import: such as 2026-09-20, "BGBl. 2026 I Nr. 270". */
1842
+ export declare interface ImportSource {
1843
+ /** The day it was published, as YYYY-MM-DD. */
1844
+ date: string;
1845
+ /** How it is cited. */
1846
+ reference: string;
1847
+ }
1848
+
1849
+ /** One page of the workspace's Imports, newest first. */
1850
+ export declare interface ImportsPage {
1851
+ imports: Import[];
1852
+ /** "" on the last page. */
1853
+ nextPageToken: string;
1854
+ }
1855
+
1353
1856
  /** Where an item of a section lives: its index's path, then its id. */
1354
1857
  export declare function itemPath(paths: ImporthubPaths, section: ImporthubSection, id: string): string;
1355
1858
 
1859
+ /** One Source Version an Import could not save and skipped (CONTEXT.md "Item Problem"). */
1860
+ export declare interface ItemProblem {
1861
+ id: string;
1862
+ mappingId: string;
1863
+ /** The Mapping's name in the Release the Import ran. */
1864
+ mappingName: string;
1865
+ /** "" when the element has none. */
1866
+ sourceKey: string;
1867
+ /** A /-separated path in the Content's data; "" for the Source Version as a whole. */
1868
+ field: string;
1869
+ /** Why, as importhub words it. */
1870
+ reason: string;
1871
+ }
1872
+
1873
+ /** How an Import's Item Problems are filtered: by Mapping, and by Source Key. */
1874
+ export declare interface ItemProblemsFilter {
1875
+ /** "" for every Mapping. */
1876
+ mappingId: string;
1877
+ /** Matches Source Keys that contain it, ignoring case; "" for all. */
1878
+ sourceKeyQuery: string;
1879
+ /** "" for the first page. */
1880
+ pageToken: string;
1881
+ }
1882
+
1883
+ /** One page of an Import's Item Problems, with their counts. */
1884
+ export declare interface ItemProblemsPage {
1885
+ itemProblems: ItemProblem[];
1886
+ /** Every Item Problem of the Import, whatever the filter. */
1887
+ totalCount: number;
1888
+ /** The Item Problems the filter matches, on every page. */
1889
+ matchingCount: number;
1890
+ /** Every Mapping with Item Problems and how many, whatever the filter. */
1891
+ mappings: {
1892
+ mappingId: string;
1893
+ mappingName: string;
1894
+ count: number;
1895
+ }[];
1896
+ /** "" on the last page. */
1897
+ nextPageToken: string;
1898
+ }
1899
+
1356
1900
  export declare type Mapping = Configured<MappingContent>;
1357
1901
 
1358
1902
  /**
@@ -1514,6 +2058,12 @@ export declare class ReleaseRefusedError extends Error {
1514
2058
  constructor(message: string, validity?: Validity);
1515
2059
  }
1516
2060
 
2061
+ /** A Source File uploaded and ready to be imported. */
2062
+ export declare interface SourceFile {
2063
+ id: string;
2064
+ fileName: string;
2065
+ }
2066
+
1517
2067
  /**
1518
2068
  * The Standalone App's paths: Imports at the top, the configuration under
1519
2069
  * `/settings/<item>`, one page per item (odon's integration guide, "Sidebar
@@ -1521,6 +2071,44 @@ export declare class ReleaseRefusedError extends Error {
1521
2071
  */
1522
2072
  export declare const STANDALONE_IMPORTHUB_PATHS: ImporthubPaths;
1523
2073
 
2074
+ /**
2075
+ * The start flow (start-an-import:AC1–AC4): an importer picks one of the
2076
+ * workspace's Import Profiles that has a Release, since an Import never runs
2077
+ * a draft; uploads one XML file straight into importhub's storage, with its
2078
+ * progress; gives, if the file carries none, an effective date and a Source
2079
+ * (its date and reference, both or neither); reads what delegated access
2080
+ * Start grants; and starts with the header's one action. A Start importhub
2081
+ * refuses (a missing contenthub right, a configuration without a Release or
2082
+ * invalid now) is shown with importhub's reason. A viewer gets no Start.
2083
+ */
2084
+ export declare function StartImport({ client, onStarted }: StartImportProps): JSX.Element;
2085
+
2086
+ /** What starting an Import takes. */
2087
+ export declare interface StartImportInput {
2088
+ importProfileId: string;
2089
+ sourceFileId: string;
2090
+ /** YYYY-MM-DD; "" or unset for none. */
2091
+ effectiveDate?: string;
2092
+ /** Both or neither. */
2093
+ source?: ImportSource;
2094
+ }
2095
+
2096
+ export declare interface StartImportProps {
2097
+ client: ImporthubClient;
2098
+ /** The Import is queued: the host opens its page. */
2099
+ onStarted: (importId: string) => void;
2100
+ }
2101
+
2102
+ /**
2103
+ * A Start importhub refused (start-an-import:AC4, release-a-configuration:AC5):
2104
+ * the starter lacks contenthub `editor`, or `publisher` for an Auto-publish
2105
+ * Profile, or what the Import would run has no Release or is invalid now. Its
2106
+ * message is importhub's, which names what stands in the way.
2107
+ */
2108
+ export declare class StartRefusedError extends Error {
2109
+ constructor(message: string);
2110
+ }
2111
+
1524
2112
  /** The intent a Title Contribution writes (importhub.v1.TitleIntent). */
1525
2113
  export declare type TitleIntent = "TITLE_INTENT_UNSPECIFIED" | "TITLE_INTENT_EXCLUDE" | "TITLE_INTENT_REPLACE" | "TITLE_INTENT_ANNOTATE";
1526
2114