@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.
@@ -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 Permission {
4
+ export interface AuthPermission {
5
5
  resource: string;
6
6
  action: string;
7
7
  conditions: Record<string, string>;
8
8
  }
9
- export interface AuthPermissions extends AuthUser {
10
- permissions?: Permission[];
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: AuthPermissions | null;
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: Permission[];
39
- hasPermission: (permission: Permission) => boolean;
40
- hasAnyPermission: (permissions: Permission[]) => boolean;
41
- hasAllPermissions: (permissions: Permission[]) => boolean;
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 {};
@@ -1,9 +1,9 @@
1
1
  import type { AuthAdapterUser, AuthSession, Tokens } from "./adapter-interface";
2
- import type { AuthPermissions } from "./client";
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: AuthPermissions | null;
6
+ user: AuthUserPermissions | null;
7
7
  tokens: AuthTokens | null;
8
8
  isAuthenticated: boolean;
9
9
  isLoading: boolean;
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/types",
3
- "version": "1.46.4",
3
+ "version": "1.46.6",
4
4
  "author": "Redeemer Pace",
5
5
  "license": "ISC",
6
6
  "description": "Provides shared TypeScript types and schema utilities for validation and parsing in the @playz ecosystem.",