@knkcs/contenthub-ui 0.5.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/CHANGELOG.md +13 -0
- package/README.md +2 -2
- package/dist/{branch-content-fields-DI9aQfh0.js → branch-content-fields-CMa-BJa2.js} +2 -2
- package/dist/{branch-content-fields-DI9aQfh0.js.map → branch-content-fields-CMa-BJa2.js.map} +1 -1
- package/dist/{content-library-BdHuzmXL.js → content-library-C5MCRNY0.js} +449 -375
- package/dist/content-library-C5MCRNY0.js.map +1 -0
- package/dist/{heads-BrvZ_GYT.js → heads-BT8RZ-Gs.js} +16 -11
- package/dist/heads-BT8RZ-Gs.js.map +1 -0
- package/dist/index.d.ts +166 -37
- package/dist/index.js +2774 -2718
- package/dist/index.js.map +1 -1
- package/dist/testing.d.ts +71 -21
- package/dist/testing.js +685 -655
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
- package/dist/content-library-BdHuzmXL.js.map +0 -1
- package/dist/heads-BrvZ_GYT.js.map +0 -1
package/dist/testing.d.ts
CHANGED
|
@@ -27,11 +27,21 @@ declare interface BlueprintEditingOverride {
|
|
|
27
27
|
effective: EditingSettings;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
/** A
|
|
30
|
+
/** A Blueprint, as the `BlueprintSource` port names it. */
|
|
31
31
|
declare interface BlueprintInfo {
|
|
32
32
|
id: string;
|
|
33
33
|
/** What editors call it. */
|
|
34
34
|
name: string;
|
|
35
|
+
/**
|
|
36
|
+
* Its accessor, unique in the workspace for good: what workspace
|
|
37
|
+
* configuration names it by (ADR 0023).
|
|
38
|
+
*/
|
|
39
|
+
accessor: string;
|
|
40
|
+
/**
|
|
41
|
+
* Whether it is archived. Search never offers an archived Blueprint;
|
|
42
|
+
* naming one by id or accessor does, marked. Absent means not archived.
|
|
43
|
+
*/
|
|
44
|
+
archived?: boolean;
|
|
35
45
|
}
|
|
36
46
|
|
|
37
47
|
/** One page of `BlueprintSource.searchBlueprints`. */
|
|
@@ -59,8 +69,8 @@ declare interface BlueprintReleaseInfo {
|
|
|
59
69
|
}
|
|
60
70
|
|
|
61
71
|
/**
|
|
62
|
-
* The workspace's content Blueprints and their Releases, for New Content
|
|
63
|
-
*
|
|
72
|
+
* The workspace's content Blueprints and their Releases, for New Content, the
|
|
73
|
+
* Library's Blueprint filter and the configuration that names Blueprints. contenthub serves them itself
|
|
64
74
|
* (`BlueprintCatalogService`, #238): blueprinthub is its direct dependency,
|
|
65
75
|
* not a port a host fills (ADR 0020 as amended), so every screen builds this
|
|
66
76
|
* from its `ContenthubClient` unless a host passes its own, which only tests
|
|
@@ -68,16 +78,24 @@ declare interface BlueprintReleaseInfo {
|
|
|
68
78
|
*/
|
|
69
79
|
declare interface BlueprintSource {
|
|
70
80
|
/**
|
|
71
|
-
* Unarchived content Blueprints whose name holds `query`
|
|
72
|
-
* ""), by name
|
|
81
|
+
* Unarchived content Blueprints with a Release whose name holds `query`
|
|
82
|
+
* (every one for ""), by name; with `includeWithoutRelease`, those
|
|
83
|
+
* without a Release too. `signal` aborts a search the user has moved on
|
|
84
|
+
* from.
|
|
73
85
|
*/
|
|
74
86
|
searchBlueprints(input: {
|
|
75
87
|
query: string;
|
|
76
88
|
pageToken?: string;
|
|
89
|
+
includeWithoutRelease?: boolean;
|
|
77
90
|
signal?: AbortSignal;
|
|
78
91
|
}): Promise<BlueprintPage>;
|
|
79
92
|
/** The Blueprints of these ids, archived ones too; an unknown id is left out. */
|
|
80
93
|
getBlueprints(ids: string[]): Promise<BlueprintInfo[]>;
|
|
94
|
+
/**
|
|
95
|
+
* The Blueprints of these accessors, archived ones too; an accessor of no
|
|
96
|
+
* Blueprint is left out.
|
|
97
|
+
*/
|
|
98
|
+
getBlueprintsByAccessor(accessors: string[]): Promise<BlueprintInfo[]>;
|
|
81
99
|
/** Every Release of a Blueprint, newest first; empty while none has been cut. */
|
|
82
100
|
listReleases(blueprintId: string): Promise<BlueprintReleaseInfo[]>;
|
|
83
101
|
}
|
|
@@ -563,11 +581,18 @@ declare interface ContenthubClient {
|
|
|
563
581
|
listRequiredChecks(): Promise<RequiredCheck[]>;
|
|
564
582
|
/**
|
|
565
583
|
* Declares a Required Check; it gates every open Change Set at once.
|
|
566
|
-
* Rejects with `NameTakenError` when another check has the name,
|
|
567
|
-
* `
|
|
584
|
+
* Rejects with `NameTakenError` when another check has the name,
|
|
585
|
+
* `BlueprintAccessorsRefusedError` for accessors naming no content
|
|
586
|
+
* Blueprint taking new work, `ServiceUnavailableError` while they can't
|
|
587
|
+
* be checked, and `InvalidInputError` for anything else the service
|
|
588
|
+
* refuses.
|
|
568
589
|
*/
|
|
569
590
|
createRequiredCheck(input: RequiredCheckInput): Promise<RequiredCheck>;
|
|
570
|
-
/**
|
|
591
|
+
/**
|
|
592
|
+
* Replaces every field of a Required Check; its id stays. Rejects as
|
|
593
|
+
* create does, checking only the accessors it adds: one the check names
|
|
594
|
+
* already passes whatever its Blueprint's state now.
|
|
595
|
+
*/
|
|
571
596
|
updateRequiredCheck(input: RequiredCheckInput & {
|
|
572
597
|
id: string;
|
|
573
598
|
}): Promise<RequiredCheck>;
|
|
@@ -630,7 +655,10 @@ declare interface ContenthubClient {
|
|
|
630
655
|
/**
|
|
631
656
|
* Replaces one Blueprint's override; admin only. A null field follows the
|
|
632
657
|
* workspace's, and at least one must be set. Rejects as
|
|
633
|
-
* `setEditingSettings` does
|
|
658
|
+
* `setEditingSettings` does, and adding an override with
|
|
659
|
+
* `BlueprintAccessorsRefusedError` for an accessor naming no content
|
|
660
|
+
* Blueprint taking new work, `ServiceUnavailableError` while it can't be
|
|
661
|
+
* checked.
|
|
634
662
|
*/
|
|
635
663
|
setBlueprintEditingOverride(input: {
|
|
636
664
|
blueprintAccessor: string;
|
|
@@ -744,12 +772,16 @@ declare interface ContenthubClient {
|
|
|
744
772
|
/**
|
|
745
773
|
* A page of the workspace's content Blueprints Content can be made from:
|
|
746
774
|
* not archived, with at least one Release, whose accessor or name holds
|
|
747
|
-
* `query`.
|
|
748
|
-
*
|
|
775
|
+
* `query`. With `includeWithoutRelease`, those without a Release too, for
|
|
776
|
+
* configuration that names a Blueprint before its first Release (ADR
|
|
777
|
+
* 0023); never an archived one. contenthub asks blueprinthub as the
|
|
778
|
+
* caller (#238). Rejects with `ServiceUnavailableError` while blueprinthub
|
|
779
|
+
* gives no answer.
|
|
749
780
|
*/
|
|
750
781
|
searchBlueprints(input: {
|
|
751
782
|
query: string;
|
|
752
783
|
pageToken?: string;
|
|
784
|
+
includeWithoutRelease?: boolean;
|
|
753
785
|
signal?: AbortSignal;
|
|
754
786
|
}): Promise<BlueprintPage>;
|
|
755
787
|
/**
|
|
@@ -767,6 +799,14 @@ declare interface ContenthubClient {
|
|
|
767
799
|
* `ServiceUnavailableError` while blueprinthub gives no answer.
|
|
768
800
|
*/
|
|
769
801
|
getBlueprints(ids: string[]): Promise<BlueprintInfo[]>;
|
|
802
|
+
/**
|
|
803
|
+
* Names the Blueprints of these accessors, as workspace configuration
|
|
804
|
+
* names them (ADR 0023): archived ones and ones without a Release
|
|
805
|
+
* included. An accessor of no Blueprint, or of one of another workspace,
|
|
806
|
+
* is left out. At most `MAX_BLUEPRINT_IDS`. Rejects with
|
|
807
|
+
* `ServiceUnavailableError` while blueprinthub gives no answer.
|
|
808
|
+
*/
|
|
809
|
+
getBlueprintsByAccessor(accessors: string[]): Promise<BlueprintInfo[]>;
|
|
770
810
|
/**
|
|
771
811
|
* Creates a Content in an open Change Set, pinning a Blueprint Release,
|
|
772
812
|
* with empty data: its one Chain has one Branch, opened in the Branch
|
|
@@ -1510,8 +1550,18 @@ declare interface RequiredCheck {
|
|
|
1510
1550
|
declare interface RequiredCheckInput {
|
|
1511
1551
|
name: string;
|
|
1512
1552
|
scope: CheckScope;
|
|
1513
|
-
/**
|
|
1553
|
+
/**
|
|
1554
|
+
* Blueprint accessors, empty exactly when `everyBlueprint` is set. Each
|
|
1555
|
+
* one the write adds must name a content Blueprint of the workspace that
|
|
1556
|
+
* is not archived (ADR 0023).
|
|
1557
|
+
*/
|
|
1514
1558
|
blueprintAccessors: string[];
|
|
1559
|
+
/**
|
|
1560
|
+
* Applies the check to every Blueprint. A switch of its own: no accessors
|
|
1561
|
+
* without it is refused, so clearing the last Blueprint never widens a
|
|
1562
|
+
* check to every Publish.
|
|
1563
|
+
*/
|
|
1564
|
+
everyBlueprint: boolean;
|
|
1515
1565
|
independent: boolean;
|
|
1516
1566
|
}
|
|
1517
1567
|
|
|
@@ -1732,13 +1782,13 @@ export declare interface StubContenthubClientOptions {
|
|
|
1732
1782
|
/** The workspace's Content, every way it can be read; the fixtures' by default. */
|
|
1733
1783
|
contents?: StubContent[];
|
|
1734
1784
|
/**
|
|
1735
|
-
* The workspace's content Blueprints, as `getBlueprints`
|
|
1736
|
-
* the fixtures' by default.
|
|
1737
|
-
* be made from: not
|
|
1785
|
+
* The workspace's content Blueprints, as `getBlueprints` and
|
|
1786
|
+
* `getBlueprintsByAccessor` name them; the fixtures' by default.
|
|
1787
|
+
* `searchBlueprints` lists those Content can be made from: not
|
|
1788
|
+
* `archived`, with a Release — or, with `includeWithoutRelease`, any not
|
|
1789
|
+
* `archived`.
|
|
1738
1790
|
*/
|
|
1739
|
-
blueprints?:
|
|
1740
|
-
archived?: boolean;
|
|
1741
|
-
})[];
|
|
1791
|
+
blueprints?: BlueprintInfo[];
|
|
1742
1792
|
/**
|
|
1743
1793
|
* The Blueprint Releases, newest first per Blueprint, as
|
|
1744
1794
|
* `listBlueprintReleases` lists them; the fixtures' by default.
|
|
@@ -1749,9 +1799,9 @@ export declare interface StubContenthubClientOptions {
|
|
|
1749
1799
|
/** The Resolved Releases `getContent` answers with, by Blueprint Release id; the fixtures' by default. */
|
|
1750
1800
|
resolvedReleases?: Record<string, ResolvedBlueprintRelease>;
|
|
1751
1801
|
/**
|
|
1752
|
-
* The workspace's Required Checks; the fixtures' by default.
|
|
1753
|
-
*
|
|
1754
|
-
*
|
|
1802
|
+
* The workspace's Required Checks; the fixtures' by default. A check
|
|
1803
|
+
* covers a Content whose Blueprint (in `blueprints`) has one of its
|
|
1804
|
+
* `blueprintAccessors`.
|
|
1755
1805
|
*/
|
|
1756
1806
|
requiredChecks?: RequiredCheck[];
|
|
1757
1807
|
/** Check Results recorded before, in the order they were recorded. */
|