@explita/cloud-auth-client 0.1.3 → 0.2.1

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
@@ -225,6 +225,29 @@ export type UseTokenRefresherOptions = {
225
225
  revalidateUserWhenOnline?: () => void;
226
226
  config?: AuthConfig;
227
227
  };
228
+ export type ServerSession = User & {
229
+ meta: {
230
+ sessionId: string;
231
+ iat: number;
232
+ exp: number;
233
+ };
234
+ };
235
+ export type TokenSession<T extends Record<string, any> = Record<string, any>> = {
236
+ id: string;
237
+ subId: string;
238
+ groupId: string;
239
+ role: {
240
+ label: string;
241
+ permissions: string[];
242
+ };
243
+ isSuperAdmin: boolean;
244
+ metadata: T;
245
+ meta: {
246
+ sessionId: string;
247
+ iat: number;
248
+ exp: number;
249
+ };
250
+ };
228
251
  export type QueryOpts = {
229
252
  groupIds?: (string | number | null)[];
230
253
  };
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@explita/cloud-auth-client",
3
- "version": "0.1.3",
3
+ "version": "0.2.1",
4
4
  "author": "Explita",
5
5
  "license": "MIT",
6
6
  "description": "A simple authentication library for React",
7
7
  "main": "./dist/index.js",
8
8
  "types": "./dist/types.d.ts",
9
+ "sideEffects": false,
9
10
  "exports": {
10
11
  ".": {
11
12
  "default": "./dist/index.js"