@boost33/shell-data 0.1.0 → 0.2.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
@@ -10,6 +10,13 @@
10
10
  export type ChromeClaims = {
11
11
  email: string;
12
12
  name: string | null;
13
+ /**
14
+ * The person's language, a BCP-47 tag ("fr", "en-GB"), when the claims carry
15
+ * one. Served back as `locale`, which the chrome reads to pick its words.
16
+ */
17
+ locale?: string | null;
18
+ /** Identity's staff flag, when the claims carry it. With the email's domain, it decides whose product list a cache may serve. */
19
+ staff?: boolean;
13
20
  orgName?: string | null;
14
21
  act: string | null;
15
22
  accounts: ReadonlyArray<{
@@ -28,15 +35,32 @@ export type ChromeConfig = {
28
35
  docsUrl?: string;
29
36
  /** Defaults to `support@boost33.com`. */
30
37
  supportEmail?: string;
31
- /** This app's Identity service key, for the profile read. Server env only. */
32
- identityKey: string;
33
- /** This app's slug as Identity knows it, sent as `x-boost33-app`. */
34
- appId: string;
35
- ledger: {
36
- /** The ledger's origin. `/api/v1` is appended here. */
37
- url: string;
38
- key: string;
39
- app: string;
38
+ /**
39
+ * This app's Identity service key, for the profile read. Server env only.
40
+ * Optional: an app with no key (one not in Identity's `APPS`) reads as the
41
+ * viewer only, so `profileName` resolves null and the `name` claim stands.
42
+ * The product list is always read as the viewer and needs no key.
43
+ */
44
+ identityKey?: string;
45
+ /**
46
+ * This app's slug in Identity's `APPS` (boost33-identity src/config/apps.ts),
47
+ * sent as `x-boost33-app` with `identityKey`. Identity's caller slug, NOT the
48
+ * product slug: Outbound is `outbound`, not `boostoutbound`. Identity checks
49
+ * it against the key, so a product slug here fails the profile read.
50
+ */
51
+ appId?: string;
52
+ /**
53
+ * The ledger. With `key` and `app`, the token split is read with this app's
54
+ * ledger key (`tokenSplit`). Without them, or without `ledger` at all, it is
55
+ * read as the viewer with their own `b33_ctx` (`tokenSplitForViewer`): no key,
56
+ * read-only, the wallet taken from the token's acting account. With no `url`
57
+ * the ledger client falls back to `BOOST33_LEDGER_URL`.
58
+ */
59
+ ledger?: {
60
+ /** The ledger's origin. A trailing `/api/v1` is accepted and never doubled. */
61
+ url?: string;
62
+ key?: string;
63
+ app?: string;
40
64
  };
41
65
  };
42
66
  export type ChromePerson = {
@@ -72,9 +96,12 @@ export type ChromeProducts = {
72
96
  /** Every product except the Wallet, in the order Identity returned them. */
73
97
  all: ChromeProduct[];
74
98
  /**
75
- * Slugs pinned on the rail: the first four of `all`. Identity's order, never a
76
- * list baked in here (CLAUDE.md in @boost33/ui: "the product list is served,
77
- * never hardcoded"); Identity serving an explicit order is a ticket of its own.
99
+ * Slugs on the rail, in the person's order (0.2.0; Jamal, 18 Nov 2026: the
100
+ * rail is remembered per person and the same in every app). From the
101
+ * person's saved pins, which Identity serves with the product list:
102
+ * never chosen, or a read that failed, gives the first four of `all`; chosen
103
+ * none gives none; a list gives that list, kept to slugs `all` has, without
104
+ * repeats, at most four. One rule for every app (`pinnedFrom`).
78
105
  */
79
106
  pinned: string[];
80
107
  /** The Wallet, when it is live. Null hides it from the rail. */
@@ -121,6 +148,8 @@ export type ChromeLinks = {
121
148
  signOut: string;
122
149
  docs: string;
123
150
  support: string;
151
+ /** 0.2.0: the Hub's Inbox. The rail draws it after Wallet in every app. */
152
+ inbox: string;
124
153
  };
125
154
  export type BackdropChromeData = {
126
155
  /** Drawn at once, from the claims. */
@@ -132,4 +161,17 @@ export type BackdropChromeData = {
132
161
  /** Never rejects; failure is `{ kind: 'unknown' }`. */
133
162
  tokens: Promise<ChromeTokens>;
134
163
  links: ChromeLinks;
164
+ /**
165
+ * 0.2.0: the person's language from the claims, or null. Spread onto the
166
+ * chrome with the rest, it picks the chrome's words: French for an `fr` tag,
167
+ * English otherwise.
168
+ */
169
+ locale: string | null;
170
+ /**
171
+ * 0.2.0: whether the person keeps an app's page menu folded, read with the
172
+ * product list (true folded, false open, null never chose or the read
173
+ * failed). Never cached. Never rejects. The chrome draws the menu in this
174
+ * state from the start.
175
+ */
176
+ appMenuFolded: Promise<boolean | null>;
135
177
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boost33/shell-data",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Server-only reads that hand the Backdrop chrome in @boost33/ui exactly the data it draws.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -20,13 +20,17 @@
20
20
  "types": "./dist/index.d.ts",
21
21
  "import": "./dist/index.js"
22
22
  },
23
+ "./contract": {
24
+ "types": "./dist/contract.d.ts",
25
+ "import": "./dist/contract.js"
26
+ },
23
27
  "./session": {
24
28
  "types": "./dist/session.d.ts",
25
29
  "import": "./dist/session.js"
26
30
  }
27
31
  },
28
32
  "scripts": {
29
- "typecheck": "tsc --noEmit",
33
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.drift.json",
30
34
  "test": "vitest run",
31
35
  "build": "rm -rf dist && tsc -p tsconfig.build.json",
32
36
  "prepublishOnly": "npm run typecheck && npm run test && npm run build"
@@ -48,7 +52,9 @@
48
52
  }
49
53
  },
50
54
  "devDependencies": {
55
+ "@boost33/ui": "0.16.0",
51
56
  "@types/node": "^24.0.0",
57
+ "@types/react": "19.3.0",
52
58
  "jose": "^6.2.17",
53
59
  "next": "^16.4.6",
54
60
  "react": "^19.3.1",