@hadoku/prefs-client 1.1.0 → 1.1.2
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 +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ declare function getDeviceId(storage?: AsyncStorage): Promise<string>;
|
|
|
74
74
|
type IdentityScope = 'user' | 'session' | 'anon' | 'none';
|
|
75
75
|
interface WhoamiResult {
|
|
76
76
|
userId: string;
|
|
77
|
-
userType: 'admin' | 'wife' | 'service' | 'friend' | 'public';
|
|
77
|
+
userType: 'admin' | 'wife' | 'service' | 'friend' | 'member' | 'public';
|
|
78
78
|
name?: string | null;
|
|
79
79
|
/**
|
|
80
80
|
* How `userId` was derived. Callers that PERSIST anything keyed by
|
package/dist/index.js
CHANGED
|
@@ -114,7 +114,7 @@ function adaptWhoami(body) {
|
|
|
114
114
|
if (!body || body.valid === false) {
|
|
115
115
|
return { userId: ANON_USER_ID, userType: "public", scope: "anon" };
|
|
116
116
|
}
|
|
117
|
-
const userType = body.userType === "admin" || body.userType === "wife" || body.userType === "service" || body.userType === "friend" || body.userType === "public" ? body.userType : "public";
|
|
117
|
+
const userType = body.userType === "admin" || body.userType === "wife" || body.userType === "service" || body.userType === "friend" || body.userType === "member" || body.userType === "public" ? body.userType : "public";
|
|
118
118
|
const name = typeof body.name === "string" ? body.name : null;
|
|
119
119
|
if (typeof body.userId === "string" && body.userId) {
|
|
120
120
|
return { userId: body.userId, userType, name, scope: "user" };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hadoku/prefs-client",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"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).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|