@koolbase/core 12.24.0 → 12.25.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/cjs/auth.js +2 -0
- package/dist/cjs/types.d.ts +7 -0
- package/dist/esm/auth.js +2 -0
- package/dist/esm/types.d.ts +7 -0
- package/package.json +1 -1
package/dist/cjs/auth.js
CHANGED
|
@@ -1214,6 +1214,8 @@ class KoolbaseAuth {
|
|
|
1214
1214
|
avatarUrl: raw.avatar_url,
|
|
1215
1215
|
verified: raw.verified ?? false,
|
|
1216
1216
|
createdAt: raw.created_at,
|
|
1217
|
+
// Only the claims readable by the user reach here (#155b).
|
|
1218
|
+
...(raw.claims && typeof raw.claims === 'object' && !Array.isArray(raw.claims) ? { claims: { ...raw.claims } } : {}),
|
|
1217
1219
|
};
|
|
1218
1220
|
}
|
|
1219
1221
|
/**
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -37,6 +37,13 @@ export interface KoolbaseUser {
|
|
|
37
37
|
avatarUrl?: string;
|
|
38
38
|
verified: boolean;
|
|
39
39
|
createdAt: string;
|
|
40
|
+
/**
|
|
41
|
+
* The trusted claims this user may read about themselves -- a role, an
|
|
42
|
+
* organisation -- only the keys the project's owner made readable by the
|
|
43
|
+
* user. Absent when there are none. Set by the server; a changed role
|
|
44
|
+
* arrives on the next refresh or getCurrentUser().
|
|
45
|
+
*/
|
|
46
|
+
claims?: Record<string, unknown>;
|
|
40
47
|
}
|
|
41
48
|
export interface KoolbaseSession {
|
|
42
49
|
accessToken: string;
|
package/dist/esm/auth.js
CHANGED
|
@@ -1211,6 +1211,8 @@ export class KoolbaseAuth {
|
|
|
1211
1211
|
avatarUrl: raw.avatar_url,
|
|
1212
1212
|
verified: raw.verified ?? false,
|
|
1213
1213
|
createdAt: raw.created_at,
|
|
1214
|
+
// Only the claims readable by the user reach here (#155b).
|
|
1215
|
+
...(raw.claims && typeof raw.claims === 'object' && !Array.isArray(raw.claims) ? { claims: { ...raw.claims } } : {}),
|
|
1214
1216
|
};
|
|
1215
1217
|
}
|
|
1216
1218
|
/**
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -37,6 +37,13 @@ export interface KoolbaseUser {
|
|
|
37
37
|
avatarUrl?: string;
|
|
38
38
|
verified: boolean;
|
|
39
39
|
createdAt: string;
|
|
40
|
+
/**
|
|
41
|
+
* The trusted claims this user may read about themselves -- a role, an
|
|
42
|
+
* organisation -- only the keys the project's owner made readable by the
|
|
43
|
+
* user. Absent when there are none. Set by the server; a changed role
|
|
44
|
+
* arrives on the next refresh or getCurrentUser().
|
|
45
|
+
*/
|
|
46
|
+
claims?: Record<string, unknown>;
|
|
40
47
|
}
|
|
41
48
|
export interface KoolbaseSession {
|
|
42
49
|
accessToken: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koolbase/core",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.25.0",
|
|
4
4
|
"description": "Koolbase SDK core \u2014 shared behaviour behind @koolbase/react-native and @koolbase/js. Install one of those, not this.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|