@bluestep-systems/b6p-core 1.6.0 → 1.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/dist/types.d.ts CHANGED
@@ -711,32 +711,61 @@ export interface GatewayKnowledgeBase {
711
711
  access?: GatewayKnowledgeBaseAccess;
712
712
  }
713
713
  /**
714
- * A knowledge base's access, as the gateway reports it: `{ kind: "public" }` (anyone may read it with no
715
- * sign-in), `{ kind: "private" }`, or a kind this version of core does not know. The kind is matched exactly
716
- * (`"public"` and `"private"`, lower case); anything else, including `"Public"`, is `unknown`, which must be
717
- * treated as private. `rawKind` is the kind as sent (`null` when it was not a string) and `raw` the whole value.
718
- * A kind that carries a permission object may follow, which is why this is a union and not a boolean.
714
+ * A knowledge base's access, as the gateway reports it. Who may read it:
715
+ * - `{ kind: "public" }`: anyone, with no sign-in.
716
+ * - `{ kind: "private" }`: any signed-in user the gateway admits to global knowledge bases.
717
+ * - `{ kind: "fleet-supers" }` (web-global contract 6.26.0): fleet supers only, that is supers who are enabled and
718
+ * not restricted to a reseller.
719
+ * - `{ kind: "supers" }` (web-global contract 6.26.0): fleet supers and reseller supers (enabled supers, restricted
720
+ * to a reseller or not).
721
+ * - `unknown`: a kind this version of core does not know.
722
+ *
723
+ * The kind is matched exactly (`"public"`, `"private"`, `"fleet-supers"`, `"supers"`, lower case, and no member
724
+ * but `kind`); anything else, including `"Public"`, `"Supers"` or `"fleet_supers"`, is `unknown`, which must never
725
+ * be treated as more open than the most closed kind: never public, and not readable by anyone in particular.
726
+ * Only `public` is readable signed out; `fleet-supers` and `supers` are internal and never public. `rawKind` is the
727
+ * kind as sent (`null` when it was not a string) and `raw` the whole value. A kind that carries a permission
728
+ * object may follow, which is why this is a union and not a boolean.
719
729
  * @lastreviewed null
720
730
  */
721
731
  export type GatewayKnowledgeBaseAccess = {
722
732
  kind: "public";
723
733
  } | {
724
734
  kind: "private";
735
+ } | {
736
+ kind: "fleet-supers";
737
+ } | {
738
+ kind: "supers";
725
739
  } | {
726
740
  kind: "unknown";
727
741
  rawKind: string | null;
728
742
  raw: JsonValue;
729
743
  };
730
744
  /**
731
- * An access a caller may set: public or private. An `unknown` access read from the gateway is never accepted
732
- * here, so it can never be sent back.
745
+ * An access a caller may set: `public`, `private`, `fleet-supers` or `supers` (see
746
+ * {@link GatewayKnowledgeBaseAccess} for who may read each). An `unknown` access read from the gateway is never
747
+ * accepted here, so it can never be sent back.
748
+ *
749
+ * Do not set `fleet-supers` or `supers` on any knowledge base until every gateway enforces them (web-global
750
+ * CU-1k5g91btrrn deployed, contract 6.26.0). An older gateway refuses them, or worse, lets any signed-in user read
751
+ * a kind it does not know.
733
752
  * @lastreviewed null
734
753
  */
735
754
  export type GatewayKnowledgeBaseAccessInput = {
736
755
  kind: "public";
737
756
  } | {
738
757
  kind: "private";
758
+ } | {
759
+ kind: "fleet-supers";
760
+ } | {
761
+ kind: "supers";
739
762
  };
763
+ /**
764
+ * The kinds of {@link GatewayKnowledgeBaseAccessInput}: every access kind this version of core knows, exactly as
765
+ * sent on the wire.
766
+ * @lastreviewed null
767
+ */
768
+ export type GatewayKnowledgeBaseAccessKind = GatewayKnowledgeBaseAccessInput["kind"];
740
769
  /**
741
770
  * A global knowledge base as the admin routes (`POST`, `GET /{id}`, `PATCH /{id}`) describe it.
742
771
  * @lastreviewed null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluestep-systems/b6p-core",
3
- "version": "1.6.0",
3
+ "version": "1.8.0",
4
4
  "description": "Core (vscode-free) library for BlueStep B6P script management",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -29,7 +29,7 @@
29
29
  "clean": "rm -rf dist tsconfig.tsbuildinfo && npm run clean -w @bluestep-systems/b6p-core-bsjs-git",
30
30
  "format": "prettier --write \"src/**/*.ts\" && npm run format -w @bluestep-systems/b6p-core-bsjs-git",
31
31
  "format-check": "prettier --check \"src/**/*.ts\" && npm run format-check -w @bluestep-systems/b6p-core-bsjs-git",
32
- "test": "npm run compile && npm test -w @bluestep-systems/b6p-core-bsjs-git && node test/B6PUri.test.js && node test/DownstairsPathParser.test.js && node test/AuditIntegrity.test.js && node test/GetSetupUrl.test.js && node test/TsConfigBuildFolder.test.js && node test/JsdocLastReviewed.test.js && node test/PullDivergenceGuard.test.js && node test/ScriptMetaDataStore.test.js && node test/SharedFilePersistence.test.js && node test/OrgCacheReadiness.test.js && node test/BearerAuthProvider.test.js && node test/DestructivePrompts.test.js && node test/GitDraftSync.test.js && node test/ServerVersionFloor.test.js && node test/Gateway.test.js && node test/GatewayGit.test.js && node test/GatewayTokens.test.js && node test/GatewayMarketplace.test.js && node test/GatewayKb.test.js && node test/GatewayKbAdmin.test.js && node test/SchemaService.test.js && node test/GitCredential.test.js",
32
+ "test": "npm run compile && npm test -w @bluestep-systems/b6p-core-bsjs-git && node test/B6PUri.test.js && node test/DownstairsPathParser.test.js && node test/AuditIntegrity.test.js && node test/GetSetupUrl.test.js && node test/TsConfigBuildFolder.test.js && node test/JsdocLastReviewed.test.js && node test/PullDivergenceGuard.test.js && node test/ScriptMetaDataStore.test.js && node test/SharedFilePersistence.test.js && node test/OrgCacheReadiness.test.js && node test/BearerAuthProvider.test.js && node test/DestructivePrompts.test.js && node test/GitDraftSync.test.js && node test/ServerVersionFloor.test.js && node test/Gateway.test.js && node test/GatewayGit.test.js && node test/GatewayTokens.test.js && node test/GatewayMarketplace.test.js && node test/GatewayKb.test.js && node test/GatewayKbAdmin.test.js && node test/GatewayKbReadPage.test.js && node test/SchemaService.test.js && node test/GitCredential.test.js",
33
33
  "prepublishOnly": "npm run clean && npm run format-check && npm run check-types && npm run compile"
34
34
  },
35
35
  "dependencies": {