@knkcs/contenthub-ui 0.2.0 → 0.3.1

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/testing.d.ts CHANGED
@@ -182,6 +182,11 @@ declare interface ChangeSetStatusInfo {
182
182
  name: string;
183
183
  /** Its colour as statushub holds it (a CSS colour); absent for none. */
184
184
  color?: string;
185
+ /**
186
+ * statushub's default for the catalogue: what a Change Set without a
187
+ * status reads as (ADR 0014 D9). At most one status has it.
188
+ */
189
+ isDefault?: boolean;
185
190
  }
186
191
 
187
192
  /** What `updateChangeSet` changes of a Change Set. */
@@ -660,6 +665,14 @@ declare interface ContenthubClient {
660
665
  * `ServiceUnavailableError` while blueprinthub gives no answer.
661
666
  */
662
667
  listBlueprintReleases(blueprintId: string): Promise<BlueprintReleaseInfo[]>;
668
+ /**
669
+ * Names the Blueprints of these ids, archived ones and ones without a
670
+ * Release included, so existing Content stays readable after its
671
+ * Blueprint is retired (#241). An unknown id, or one of another
672
+ * workspace, is left out. At most `MAX_BLUEPRINT_IDS`. Rejects with
673
+ * `ServiceUnavailableError` while blueprinthub gives no answer.
674
+ */
675
+ getBlueprints(ids: string[]): Promise<BlueprintInfo[]>;
663
676
  /**
664
677
  * Creates a Content in an open Change Set, pinning a Blueprint Release,
665
678
  * with empty data: its one Chain has one Branch, opened in the Branch
@@ -706,12 +719,15 @@ declare interface ContenthubClient {
706
719
  }): Promise<Content>;
707
720
  /**
708
721
  * One Content with its Blueprint Release and attributes: on Main, or
709
- * inside `changeSetId`. Content born in an open Change Set exists only
710
- * there, so read anywhere else it is a NotFound ConnectError.
722
+ * inside `changeSetId`, at the head of its Chain's last Branch, or of
723
+ * `branchId`, a Branch of that Chain, when given (#252). Content born in
724
+ * an open Change Set exists only there, so read anywhere else it is a
725
+ * NotFound ConnectError, as is a Branch outside the Chain.
711
726
  */
712
727
  getContent(input: {
713
728
  id: string;
714
729
  changeSetId?: string;
730
+ branchId?: string;
715
731
  }): Promise<ContentDetail>;
716
732
  /** Its Timeline, with the Planned Releases of open Change Sets beside it. */
717
733
  getTimeline(contentId: string): Promise<ContentTimeline>;
@@ -1313,7 +1329,8 @@ declare interface RevisionList {
1313
1329
  * The port a host fills with statushub (ADR 0020): the workspace's Change Set
1314
1330
  * statuses, for their display names and colours. contenthub-ui depends on no
1315
1331
  * statushub package. A host without statushub leaves the port empty, and the
1316
- * screens then show the bare slug and offer no status picker.
1332
+ * screens then show the bare slug and offer no status picker. The status
1333
+ * marked `isDefault` names a Change Set that has none yet (ADR 0014 D9).
1317
1334
  */
1318
1335
  declare interface StatusSource {
1319
1336
  /** Every status of the workspace's `contenthub/change_set` catalogue, in its order. */
@@ -1434,10 +1451,13 @@ export declare interface StubContenthubClientOptions {
1434
1451
  /** The workspace's Content, every way it can be read; the fixtures' by default. */
1435
1452
  contents?: StubContent[];
1436
1453
  /**
1437
- * The workspace's content Blueprints Content can be made from, as
1438
- * `searchBlueprints` lists them; the fixtures' by default.
1454
+ * The workspace's content Blueprints, as `getBlueprints` names them;
1455
+ * the fixtures' by default. `searchBlueprints` lists those Content can
1456
+ * be made from: not `archived`, with a Release.
1439
1457
  */
1440
- blueprints?: BlueprintInfo[];
1458
+ blueprints?: (BlueprintInfo & {
1459
+ archived?: boolean;
1460
+ })[];
1441
1461
  /**
1442
1462
  * The Blueprint Releases, newest first per Blueprint, as
1443
1463
  * `listBlueprintReleases` lists them; the fixtures' by default.