@plyaz/types 1.46.4 → 1.46.6
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/auth/client.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { AuthAdapterUser, AuthSession, Tokens } from "./adapter-interface";
|
|
2
2
|
import type { AUTHPROVIDER } from "./enums";
|
|
3
3
|
import type { AuthCredentials, AuthUser, ConnectedAccount, Session } from "./types";
|
|
4
|
-
interface
|
|
4
|
+
export interface AuthPermission {
|
|
5
5
|
resource: string;
|
|
6
6
|
action: string;
|
|
7
7
|
conditions: Record<string, string>;
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
10
|
-
permissions?:
|
|
9
|
+
export interface AuthUserPermissions extends AuthUser {
|
|
10
|
+
permissions?: AuthPermission[];
|
|
11
11
|
isActive: boolean;
|
|
12
12
|
isVerified: boolean;
|
|
13
13
|
}
|
|
14
14
|
export interface UseAuthReturn {
|
|
15
|
-
user:
|
|
15
|
+
user: AuthUserPermissions | null;
|
|
16
16
|
isAuthenticated: boolean;
|
|
17
17
|
isLoading: boolean;
|
|
18
18
|
error: string | null;
|
|
@@ -35,10 +35,10 @@ export interface UseConnectedAccountsReturn {
|
|
|
35
35
|
refreshAccounts: () => Promise<void>;
|
|
36
36
|
}
|
|
37
37
|
export interface UsePermissionsReturn {
|
|
38
|
-
permissions:
|
|
39
|
-
hasPermission: (permission:
|
|
40
|
-
hasAnyPermission: (permissions:
|
|
41
|
-
hasAllPermissions: (permissions:
|
|
38
|
+
permissions: AuthPermission[];
|
|
39
|
+
hasPermission: (permission: AuthPermission) => boolean;
|
|
40
|
+
hasAnyPermission: (permissions: AuthPermission[]) => boolean;
|
|
41
|
+
hasAllPermissions: (permissions: AuthPermission[]) => boolean;
|
|
42
42
|
}
|
|
43
43
|
export interface UseRBACReturn {
|
|
44
44
|
hasRole: (role: string) => boolean;
|
|
@@ -54,4 +54,3 @@ export interface UseSessionRetrun {
|
|
|
54
54
|
expiresAt: Date | null;
|
|
55
55
|
refresh: () => Promise<void>;
|
|
56
56
|
}
|
|
57
|
-
export {};
|
package/dist/auth/store.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { AuthAdapterUser, AuthSession, Tokens } from "./adapter-interface";
|
|
2
|
-
import type {
|
|
2
|
+
import type { AuthUserPermissions } from "./client";
|
|
3
3
|
import type { AUTHPROVIDER } from "./enums";
|
|
4
4
|
import type { AuthCredentials, AuthTokens, AuthUser, ConnectedAccount, Session } from "./types";
|
|
5
5
|
export interface AuthState {
|
|
6
|
-
user:
|
|
6
|
+
user: AuthUserPermissions | null;
|
|
7
7
|
tokens: AuthTokens | null;
|
|
8
8
|
isAuthenticated: boolean;
|
|
9
9
|
isLoading: boolean;
|
package/dist/devtools/types.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import type { CorePlyazConfig } from '../core';
|
|
|
11
11
|
/**
|
|
12
12
|
* Available devtools tab identifiers
|
|
13
13
|
*/
|
|
14
|
-
export type DevtoolsTab = 'stores' | 'actions' | 'api' | 'streaming' | 'security' | 'compliance' | 'accessibility' | 'services' | 'errors' | 'events' | 'uploads' | 'observability' | 'config' | 'storage' | 'playground' | 'runner' | 'flags' | 'mocking' | 'explorer' | 'ssr' | 'routes' | 'i18n' | 'react' | 'console' | 'shortcuts';
|
|
14
|
+
export type DevtoolsTab = 'stores' | 'actions' | 'api' | 'streaming' | 'security' | 'compliance' | 'accessibility' | 'services' | 'errors' | 'events' | 'uploads' | 'observability' | 'config' | 'storage' | 'playground' | 'runner' | 'flags' | 'mocking' | 'explorer' | 'types' | 'ssr' | 'routes' | 'i18n' | 'react' | 'console' | 'shortcuts';
|
|
15
15
|
/**
|
|
16
16
|
* Tab group configuration
|
|
17
17
|
*/
|
package/package.json
CHANGED