@hadoku/prefs-client 1.1.30 → 1.1.31

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/index.d.ts CHANGED
@@ -83,17 +83,10 @@ interface WhoamiResult {
83
83
  * 'anon' means the key is shared with every other browser user.
84
84
  */
85
85
  scope: IdentityScope;
86
- /**
87
- * The operator verifies this person (the edge's `isVerified`, the same
88
- * answer as the `X-Hadoku-Verified` header): every tier above member, and a
89
- * member the operator made or verified. Present only as `true`; absent
90
- * means not verified, as the header's absence does.
91
- */
92
- verified?: true;
93
86
  /**
94
87
  * This browser is a TV (the edge's `isTvUserAgent`, on every answer, signed
95
88
  * in or not): an app may start in its 10-foot layout. Present only as
96
- * `true`, like `verified`.
89
+ * `true`.
97
90
  */
98
91
  tv?: true;
99
92
  }
package/dist/index.js CHANGED
@@ -131,9 +131,8 @@ function adaptWhoami(body) {
131
131
  }
132
132
  const userType = body.userType === "admin" || body.userType === "wife" || body.userType === "service" || body.userType === "friend" || body.userType === "member" || body.userType === "guest" || body.userType === "public" ? body.userType : "public";
133
133
  const name = typeof body.name === "string" ? body.name : null;
134
- const verified = body.verified === true ? { verified: true } : {};
135
134
  if (typeof body.userId === "string" && body.userId) {
136
- return { userId: body.userId, userType, name, scope: "user", ...verified, ...tv };
135
+ return { userId: body.userId, userType, name, scope: "user", ...tv };
137
136
  }
138
137
  if (typeof body.sessionId === "string" && body.sessionId) {
139
138
  return {
@@ -141,11 +140,10 @@ function adaptWhoami(body) {
141
140
  userType,
142
141
  name,
143
142
  scope: "session",
144
- ...verified,
145
143
  ...tv
146
144
  };
147
145
  }
148
- return { userId: UNSCOPED_ID, userType, name, scope: "none", ...verified, ...tv };
146
+ return { userId: UNSCOPED_ID, userType, name, scope: "none", ...tv };
149
147
  }
150
148
  var WHOAMI_TIMEOUT_MS = 3e3;
151
149
  async function fetchWhoamiRaw(url, userKey) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hadoku/prefs-client",
3
- "version": "1.1.30",
4
- "gitHead": "ebe6f933a83bfe3f1957d23beba6edda1bb8c817",
3
+ "version": "1.1.31",
4
+ "gitHead": "04fd486bdf484dd5655e0bb12fd21071b8e68607",
5
5
  "description": "Client SDK for the hadoku unified preferences store. Wraps /prefs/api/v1/* with localStorage caching, debounced writes, Zod-validated reads, and a usePrefs() React hook, plus match history, ratings and leaderboards for every game (./games), the one resolved avatar per user (./avatar), and the avatar cosmetics renderer (./cosmetics).",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",