@knkcs/contenthub-ui 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +2 -2
- package/dist/{branch-content-fields-WBpviLQg.js → branch-content-fields-LyF6sD2e.js} +2 -2
- package/dist/{branch-content-fields-WBpviLQg.js.map → branch-content-fields-LyF6sD2e.js.map} +1 -1
- package/dist/{content-library-B2eauvHt.js → content-library-v0mjVD4J.js} +452 -405
- package/dist/content-library-v0mjVD4J.js.map +1 -0
- package/dist/{heads-Brd2Gtjm.js → heads-dBmqNcOB.js} +12 -12
- package/dist/heads-dBmqNcOB.js.map +1 -0
- package/dist/index.d.ts +68 -13
- package/dist/index.js +2349 -2306
- package/dist/index.js.map +1 -1
- package/dist/testing.d.ts +65 -13
- package/dist/testing.js +494 -467
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
- package/dist/content-library-B2eauvHt.js.map +0 -1
- package/dist/heads-Brd2Gtjm.js.map +0 -1
package/dist/testing.d.ts
CHANGED
|
@@ -36,14 +36,22 @@ declare interface BlueprintReleaseInfo {
|
|
|
36
36
|
name: string;
|
|
37
37
|
/** ISO 8601: when it was cut. */
|
|
38
38
|
releaseTime: string;
|
|
39
|
+
/**
|
|
40
|
+
* Why contenthub refuses to pin it, as `CheckBlueprintRelease` answers;
|
|
41
|
+
* empty or absent when Content can pin it. A Release is offered either
|
|
42
|
+
* way, a refused one disabled with its reasons, so a Blueprint author sees
|
|
43
|
+
* why it can't be used rather than where it went.
|
|
44
|
+
*/
|
|
45
|
+
refusals?: RefusalReason[];
|
|
39
46
|
}
|
|
40
47
|
|
|
41
48
|
/**
|
|
42
|
-
* The
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
49
|
+
* The workspace's content Blueprints and their Releases, for New Content and
|
|
50
|
+
* the Library's Blueprint filter. contenthub serves them itself
|
|
51
|
+
* (`BlueprintCatalogService`, #238): blueprinthub is its direct dependency,
|
|
52
|
+
* not a port a host fills (ADR 0020 as amended), so every screen builds this
|
|
53
|
+
* from its `ContenthubClient` unless a host passes its own, which only tests
|
|
54
|
+
* need.
|
|
47
55
|
*/
|
|
48
56
|
declare interface BlueprintSource {
|
|
49
57
|
/**
|
|
@@ -634,6 +642,32 @@ declare interface ContenthubClient {
|
|
|
634
642
|
pageSize?: number;
|
|
635
643
|
pageToken?: string;
|
|
636
644
|
}): Promise<ContentList>;
|
|
645
|
+
/**
|
|
646
|
+
* A page of the workspace's content Blueprints Content can be made from:
|
|
647
|
+
* not archived, with at least one Release, whose accessor or name holds
|
|
648
|
+
* `query`. contenthub asks blueprinthub as the caller (#238). Rejects
|
|
649
|
+
* with `ServiceUnavailableError` while blueprinthub gives no answer.
|
|
650
|
+
*/
|
|
651
|
+
searchBlueprints(input: {
|
|
652
|
+
query: string;
|
|
653
|
+
pageToken?: string;
|
|
654
|
+
signal?: AbortSignal;
|
|
655
|
+
}): Promise<BlueprintPage>;
|
|
656
|
+
/**
|
|
657
|
+
* Every Release of a Blueprint, newest first, each with contenthub's
|
|
658
|
+
* answer: `refusals` is empty when Content can pin it. Empty for a
|
|
659
|
+
* Blueprint the workspace doesn't have. Rejects with
|
|
660
|
+
* `ServiceUnavailableError` while blueprinthub gives no answer.
|
|
661
|
+
*/
|
|
662
|
+
listBlueprintReleases(blueprintId: string): Promise<BlueprintReleaseInfo[]>;
|
|
663
|
+
/**
|
|
664
|
+
* Names the Blueprints of these ids, archived ones and ones without a
|
|
665
|
+
* Release included, so existing Content stays readable after its
|
|
666
|
+
* Blueprint is retired (#241). An unknown id, or one of another
|
|
667
|
+
* workspace, is left out. At most `MAX_BLUEPRINT_IDS`. Rejects with
|
|
668
|
+
* `ServiceUnavailableError` while blueprinthub gives no answer.
|
|
669
|
+
*/
|
|
670
|
+
getBlueprints(ids: string[]): Promise<BlueprintInfo[]>;
|
|
637
671
|
/**
|
|
638
672
|
* Creates a Content in an open Change Set, pinning a Blueprint Release,
|
|
639
673
|
* with empty data: its one Chain has one Branch, opened in the Branch
|
|
@@ -1152,6 +1186,16 @@ declare interface ReferrerList {
|
|
|
1152
1186
|
nextPageToken: string;
|
|
1153
1187
|
}
|
|
1154
1188
|
|
|
1189
|
+
/** One reason contenthub refused a write, as the rule's owner gave it. */
|
|
1190
|
+
declare interface RefusalReason {
|
|
1191
|
+
/** Whose rule: "fieldkit", "knkeditor", "format" or "contenthub". */
|
|
1192
|
+
source: string;
|
|
1193
|
+
/** The rule's own code, such as fieldkit's "required". */
|
|
1194
|
+
code: string;
|
|
1195
|
+
/** A /-separated location, such as "/title"; "" for the whole. */
|
|
1196
|
+
path: string;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1155
1199
|
/** A Release a Publish cut, or would cut. */
|
|
1156
1200
|
declare interface Release {
|
|
1157
1201
|
id: string;
|
|
@@ -1303,8 +1347,9 @@ export declare function stubBlockReasons(): BlockReason[];
|
|
|
1303
1347
|
export declare function stubBlueprintReleases(): BlueprintReleaseInfo[];
|
|
1304
1348
|
|
|
1305
1349
|
/**
|
|
1306
|
-
* The workspace's content Blueprints, as
|
|
1307
|
-
*
|
|
1350
|
+
* The workspace's content Blueprints, as a `BlueprintSource` answers, by
|
|
1351
|
+
* name. Commentary has had no Release cut yet, so contenthub's catalog
|
|
1352
|
+
* (the stub client's `searchBlueprints`) leaves it out.
|
|
1308
1353
|
*/
|
|
1309
1354
|
export declare function stubBlueprints(): BlueprintInfo[];
|
|
1310
1355
|
|
|
@@ -1397,13 +1442,20 @@ export declare interface StubContenthubClientOptions {
|
|
|
1397
1442
|
/** The workspace's Content, every way it can be read; the fixtures' by default. */
|
|
1398
1443
|
contents?: StubContent[];
|
|
1399
1444
|
/**
|
|
1400
|
-
* The
|
|
1401
|
-
*
|
|
1445
|
+
* The workspace's content Blueprints, as `getBlueprints` names them;
|
|
1446
|
+
* the fixtures' by default. `searchBlueprints` lists those Content can
|
|
1447
|
+
* be made from: not `archived`, with a Release.
|
|
1402
1448
|
*/
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1449
|
+
blueprints?: (BlueprintInfo & {
|
|
1450
|
+
archived?: boolean;
|
|
1451
|
+
})[];
|
|
1452
|
+
/**
|
|
1453
|
+
* The Blueprint Releases, newest first per Blueprint, as
|
|
1454
|
+
* `listBlueprintReleases` lists them; the fixtures' by default.
|
|
1455
|
+
* `createContent` pins one without `refusals` and refuses the rest, as
|
|
1456
|
+
* contenthub refuses a Release it can't load.
|
|
1457
|
+
*/
|
|
1458
|
+
blueprintReleases?: (Pick<BlueprintReleaseInfo, "id" | "blueprintId"> & Partial<BlueprintReleaseInfo>)[];
|
|
1407
1459
|
/** The Resolved Releases `getContent` answers with, by Blueprint Release id; the fixtures' by default. */
|
|
1408
1460
|
resolvedReleases?: Record<string, ResolvedBlueprintRelease>;
|
|
1409
1461
|
/**
|