@pol-studios/db 1.0.36 → 1.0.38
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/UserMetadataContext-yLZQu24J.d.ts +33 -0
- package/dist/auth/context.d.ts +5 -53
- package/dist/auth/context.js +1 -25
- package/dist/auth/hooks.d.ts +3 -107
- package/dist/auth/hooks.js +2 -8
- package/dist/auth/index.d.ts +5 -5
- package/dist/auth/index.js +9 -39
- package/dist/{chunk-YQUNORJD.js → chunk-6OSNGHRE.js} +77 -153
- package/dist/chunk-6OSNGHRE.js.map +1 -0
- package/dist/{chunk-7NFMEDJW.js → chunk-ILGWCJ6S.js} +9 -42
- package/dist/chunk-ILGWCJ6S.js.map +1 -0
- package/dist/{chunk-U4BZKCBH.js → chunk-INIX2V6L.js} +3 -3
- package/dist/chunk-NSIAAYW3.js +1 -0
- package/dist/{chunk-QHXN6BNL.js → chunk-QMHHKYZO.js} +2 -2
- package/dist/{chunk-HFIGNQ7T.js → chunk-TO5QB4UM.js} +4 -4
- package/dist/chunk-TO5QB4UM.js.map +1 -0
- package/dist/index.js +6 -7
- package/dist/index.native.js +6 -7
- package/dist/index.web.js +5 -6
- package/dist/index.web.js.map +1 -1
- package/dist/with-auth/index.js +4 -5
- package/dist/with-auth/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/UserMetadataContext-QLIv-mfF.d.ts +0 -171
- package/dist/chunk-5HJLTYRA.js +0 -355
- package/dist/chunk-5HJLTYRA.js.map +0 -1
- package/dist/chunk-6KN7KLEG.js +0 -1
- package/dist/chunk-7NFMEDJW.js.map +0 -1
- package/dist/chunk-HFIGNQ7T.js.map +0 -1
- package/dist/chunk-YQUNORJD.js.map +0 -1
- /package/dist/{chunk-U4BZKCBH.js.map → chunk-INIX2V6L.js.map} +0 -0
- /package/dist/{chunk-6KN7KLEG.js.map → chunk-NSIAAYW3.js.map} +0 -0
- /package/dist/{chunk-QHXN6BNL.js.map → chunk-QMHHKYZO.js.map} +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { D as Database } from './useSupabase-DSZNeXnF.js';
|
|
5
|
+
|
|
6
|
+
type UserMetadataRow = Database["core"]["Tables"]["UserMetadata"]["Row"];
|
|
7
|
+
type UserMetadataInsert = Database["core"]["Tables"]["UserMetadata"]["Insert"];
|
|
8
|
+
type UserMetadataUpdate = Database["core"]["Tables"]["UserMetadata"]["Update"];
|
|
9
|
+
interface UserMetadataContextType {
|
|
10
|
+
metadata: Record<string, string>;
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
error: Error | null;
|
|
13
|
+
setMetadata: (key: string, value: string) => Promise<void>;
|
|
14
|
+
getMetadata: (key: string) => string | undefined;
|
|
15
|
+
removeMetadata: (key: string) => Promise<void>;
|
|
16
|
+
refreshMetadata: () => Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
declare const userMetadataContext: react.Context<UserMetadataContextType>;
|
|
19
|
+
declare function UserMetadataProvider({ children }: {
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
}): react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare function useUserMetadata(): UserMetadataContextType;
|
|
23
|
+
declare function useUserMetadataValue(key: string): string | undefined;
|
|
24
|
+
declare function useSetUserMetadata(): {
|
|
25
|
+
setMetadata: (key: string, value: string) => Promise<void>;
|
|
26
|
+
removeMetadata: (key: string) => Promise<void>;
|
|
27
|
+
};
|
|
28
|
+
declare function useUserMetadataState<T>(key: string, defaultValue: T, options?: {
|
|
29
|
+
serialize?: (value: T) => string;
|
|
30
|
+
deserialize?: (value: string) => T;
|
|
31
|
+
}): [T, (value: T) => Promise<void>, boolean];
|
|
32
|
+
|
|
33
|
+
export { type UserMetadataContextType as U, useUserMetadata as a, useUserMetadataState as b, useUserMetadataValue as c, userMetadataContext as d, type UserMetadataInsert as e, UserMetadataProvider as f, type UserMetadataRow as g, type UserMetadataUpdate as h, useSetUserMetadata as u };
|
package/dist/auth/context.d.ts
CHANGED
|
@@ -1,65 +1,17 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { P as Profile, a as ProfileStatus, S as SetupAuthContext, b as SetupAuthContextProviderProps, s as setupAuthContext } from '../setupAuthContext-B76nbIP6.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
|
-
import { User } from '@supabase/supabase-js';
|
|
6
|
-
export { P as Profile, a as ProfileStatus, S as SetupAuthContext, b as SetupAuthContextProviderProps, s as setupAuthContext } from '../setupAuthContext-B76nbIP6.js';
|
|
7
5
|
import { d as EntityType, b as EntityPermissionCheck, a as EntityAction } from '../EntityPermissions-DwFt4tUd.js';
|
|
6
|
+
export { U as UserMetadataContextType, e as UserMetadataInsert, f as UserMetadataProvider, g as UserMetadataRow, h as UserMetadataUpdate, u as useSetUserMetadata, a as useUserMetadata, b as useUserMetadataState, c as useUserMetadataValue, d as userMetadataContext } from '../UserMetadataContext-yLZQu24J.js';
|
|
7
|
+
import '@supabase/supabase-js';
|
|
8
8
|
import '../useSupabase-DSZNeXnF.js';
|
|
9
9
|
import '@supabase/supabase-js/dist/module/lib/types.js';
|
|
10
10
|
|
|
11
|
-
interface PowerSyncDB {
|
|
12
|
-
getAll: <T>(sql: string, params?: any[]) => Promise<T[]>;
|
|
13
|
-
getOptional: <T>(sql: string, params?: any[]) => Promise<T | null>;
|
|
14
|
-
watch: (sql: string, params: any[], options: {
|
|
15
|
-
onResult: (result: any) => void;
|
|
16
|
-
}, abortOptions?: {
|
|
17
|
-
signal: AbortSignal;
|
|
18
|
-
}) => void;
|
|
19
|
-
}
|
|
20
|
-
interface SupabaseClient {
|
|
21
|
-
auth: {
|
|
22
|
-
getUser: () => Promise<{
|
|
23
|
-
data: {
|
|
24
|
-
user: User | null;
|
|
25
|
-
};
|
|
26
|
-
error: any;
|
|
27
|
-
}>;
|
|
28
|
-
getSession: () => Promise<{
|
|
29
|
-
data: {
|
|
30
|
-
session: {
|
|
31
|
-
user: User;
|
|
32
|
-
} | null;
|
|
33
|
-
};
|
|
34
|
-
error: any;
|
|
35
|
-
}>;
|
|
36
|
-
signOut: () => Promise<{
|
|
37
|
-
error: any;
|
|
38
|
-
}>;
|
|
39
|
-
onAuthStateChange: (callback: (event: string, session: any) => void) => {
|
|
40
|
-
data: {
|
|
41
|
-
subscription: {
|
|
42
|
-
unsubscribe: () => void;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
interface OfflineAuthProviderProps {
|
|
49
|
-
children: ReactNode;
|
|
50
|
-
/** PowerSync database instance */
|
|
51
|
-
db: PowerSyncDB | null;
|
|
52
|
-
/** Supabase client for auth */
|
|
53
|
-
supabase: SupabaseClient;
|
|
54
|
-
/** Whether PowerSync is ready */
|
|
55
|
-
isDbReady?: boolean;
|
|
56
|
-
}
|
|
57
|
-
declare function OfflineAuthProvider({ children, db, supabase, isDbReady, }: OfflineAuthProviderProps): react_jsx_runtime.JSX.Element;
|
|
58
|
-
|
|
59
11
|
interface AuthProviderProps {
|
|
60
12
|
children: ReactNode;
|
|
61
13
|
/**
|
|
62
|
-
* Enable entity-level permissions
|
|
14
|
+
* Enable entity-level permissions (Project, Client, ProjectDatabase access control).
|
|
63
15
|
* When enabled, wraps children with PermissionProvider.
|
|
64
16
|
* @default false
|
|
65
17
|
*/
|
|
@@ -93,4 +45,4 @@ declare function PermissionProvider({ children }: {
|
|
|
93
45
|
}): react_jsx_runtime.JSX.Element;
|
|
94
46
|
declare function usePermissions(): PermissionContextValue;
|
|
95
47
|
|
|
96
|
-
export { AuthProvider, type AuthProviderProps, type EntityPermissionContextValue,
|
|
48
|
+
export { AuthProvider, type AuthProviderProps, type EntityPermissionContextValue, type PermissionContextValue, PermissionProvider, entityPermissionContext, permissionContext, usePermissions };
|
package/dist/auth/context.js
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
OfflineAuthProvider,
|
|
3
|
-
SimpleAuthProvider,
|
|
4
|
-
getPermissionLevel,
|
|
5
|
-
hasResourceAccess,
|
|
6
|
-
useCanDelete,
|
|
7
|
-
useCanEdit,
|
|
8
|
-
useCanShare,
|
|
9
|
-
useCanView,
|
|
10
|
-
useRequireAuth,
|
|
11
|
-
useResourceAccess,
|
|
12
|
-
useSimpleAuth
|
|
13
|
-
} from "../chunk-5HJLTYRA.js";
|
|
14
1
|
import {
|
|
15
2
|
AuthProvider,
|
|
16
3
|
PermissionProvider,
|
|
@@ -24,7 +11,7 @@ import {
|
|
|
24
11
|
useUserMetadataState,
|
|
25
12
|
useUserMetadataValue,
|
|
26
13
|
userMetadataContext
|
|
27
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-6OSNGHRE.js";
|
|
28
15
|
import "../chunk-UBHORKBS.js";
|
|
29
16
|
import "../chunk-J4ZVCXZ4.js";
|
|
30
17
|
import "../chunk-YUX6RGLZ.js";
|
|
@@ -33,24 +20,13 @@ import "../chunk-DMVUEJG2.js";
|
|
|
33
20
|
import "../chunk-7D4SUZUM.js";
|
|
34
21
|
export {
|
|
35
22
|
AuthProvider,
|
|
36
|
-
OfflineAuthProvider,
|
|
37
23
|
PermissionProvider,
|
|
38
|
-
SimpleAuthProvider,
|
|
39
24
|
UserMetadataProvider,
|
|
40
25
|
entityPermissionContext,
|
|
41
|
-
getPermissionLevel,
|
|
42
|
-
hasResourceAccess,
|
|
43
26
|
permissionContext,
|
|
44
27
|
setupAuthContext,
|
|
45
28
|
usePermissions,
|
|
46
|
-
useRequireAuth,
|
|
47
|
-
useResourceAccess,
|
|
48
29
|
useSetUserMetadata,
|
|
49
|
-
useSimpleAuth,
|
|
50
|
-
useCanDelete as useSimpleCanDelete,
|
|
51
|
-
useCanEdit as useSimpleCanEdit,
|
|
52
|
-
useCanShare as useSimpleCanShare,
|
|
53
|
-
useCanView as useSimpleCanView,
|
|
54
30
|
useUserMetadata,
|
|
55
31
|
useUserMetadataState,
|
|
56
32
|
useUserMetadataValue,
|
package/dist/auth/hooks.d.ts
CHANGED
|
@@ -1,116 +1,12 @@
|
|
|
1
1
|
import { User } from '@supabase/supabase-js';
|
|
2
|
-
import { k as SimpleProfile, l as SimpleUserAccess } from '../UserMetadataContext-QLIv-mfF.js';
|
|
3
|
-
export { m as useSetUserMetadata, n as useUserMetadata, o as useUserMetadataState, p as useUserMetadataValue } from '../UserMetadataContext-QLIv-mfF.js';
|
|
4
2
|
import { S as SetupAuthContext, E as EffectivePermission } from '../setupAuthContext-B76nbIP6.js';
|
|
5
3
|
import { d as EntityType, a as EntityAction, b as EntityPermissionCheck } from '../EntityPermissions-DwFt4tUd.js';
|
|
6
|
-
|
|
4
|
+
export { u as useSetUserMetadata, a as useUserMetadata, b as useUserMetadataState, c as useUserMetadataValue } from '../UserMetadataContext-yLZQu24J.js';
|
|
7
5
|
import 'react';
|
|
6
|
+
import 'react/jsx-runtime';
|
|
8
7
|
import '../useSupabase-DSZNeXnF.js';
|
|
9
8
|
import '@supabase/supabase-js/dist/module/lib/types.js';
|
|
10
9
|
|
|
11
|
-
/**
|
|
12
|
-
* useOfflineAuth - Hook for offline-first authentication
|
|
13
|
-
*
|
|
14
|
-
* Reads Profile and UserAccess from PowerSync (local SQLite).
|
|
15
|
-
* Works 100% offline once data is synced.
|
|
16
|
-
*
|
|
17
|
-
* Usage:
|
|
18
|
-
* ```tsx
|
|
19
|
-
* import { SimpleAuthProvider } from "@pol-studios/db";
|
|
20
|
-
* import { useOfflineAuth } from "@pol-studios/db";
|
|
21
|
-
*
|
|
22
|
-
* function AuthWrapper({ children }) {
|
|
23
|
-
* const authData = useOfflineAuth();
|
|
24
|
-
*
|
|
25
|
-
* return (
|
|
26
|
-
* <SimpleAuthProvider {...authData}>
|
|
27
|
-
* {children}
|
|
28
|
-
* </SimpleAuthProvider>
|
|
29
|
-
* );
|
|
30
|
-
* }
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
interface OfflineAuthData {
|
|
35
|
-
/** Supabase user from auth session */
|
|
36
|
-
user: User | null;
|
|
37
|
-
/** Profile from PowerSync */
|
|
38
|
-
profile: SimpleProfile | null;
|
|
39
|
-
/** User access records from PowerSync */
|
|
40
|
-
userAccess: SimpleUserAccess[] | null;
|
|
41
|
-
/** Whether auth data is loading */
|
|
42
|
-
isLoading: boolean;
|
|
43
|
-
/** Sign out function */
|
|
44
|
-
onSignOut: () => Promise<void>;
|
|
45
|
-
}
|
|
46
|
-
interface UseOfflineAuthOptions {
|
|
47
|
-
/** Supabase client for auth operations */
|
|
48
|
-
supabase: {
|
|
49
|
-
auth: {
|
|
50
|
-
getUser: () => Promise<{
|
|
51
|
-
data: {
|
|
52
|
-
user: User | null;
|
|
53
|
-
};
|
|
54
|
-
error: any;
|
|
55
|
-
}>;
|
|
56
|
-
signOut: () => Promise<{
|
|
57
|
-
error: any;
|
|
58
|
-
}>;
|
|
59
|
-
onAuthStateChange: (callback: (event: string, session: any) => void) => {
|
|
60
|
-
data: {
|
|
61
|
-
subscription: {
|
|
62
|
-
unsubscribe: () => void;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
/** PowerSync database for local queries */
|
|
69
|
-
db: {
|
|
70
|
-
getAll: <T>(sql: string, params?: any[]) => Promise<T[]>;
|
|
71
|
-
getOptional: <T>(sql: string, params?: any[]) => Promise<T | null>;
|
|
72
|
-
} | null;
|
|
73
|
-
/** Whether PowerSync is ready */
|
|
74
|
-
isDbReady?: boolean;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Query keys for React Query integration
|
|
78
|
-
*/
|
|
79
|
-
declare const offlineAuthQueryKeys: {
|
|
80
|
-
profile: (userId: string | undefined) => readonly ["profile", string];
|
|
81
|
-
userAccess: (userId: string | undefined) => readonly ["userAccess", string];
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Query functions for React Query integration.
|
|
85
|
-
* Use these with useQuery from @tanstack/react-query.
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* ```tsx
|
|
89
|
-
* import { useQuery } from "@tanstack/react-query";
|
|
90
|
-
* import { offlineAuthQueries, offlineAuthQueryKeys } from "@pol-studios/db";
|
|
91
|
-
*
|
|
92
|
-
* function useProfile(db, userId) {
|
|
93
|
-
* return useQuery({
|
|
94
|
-
* queryKey: offlineAuthQueryKeys.profile(userId),
|
|
95
|
-
* queryFn: () => offlineAuthQueries.fetchProfile(db, userId),
|
|
96
|
-
* enabled: !!userId && !!db,
|
|
97
|
-
* });
|
|
98
|
-
* }
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
declare const offlineAuthQueries: {
|
|
102
|
-
fetchProfile(db: {
|
|
103
|
-
getOptional: <T>(sql: string, params?: any[]) => Promise<T | null>;
|
|
104
|
-
}, userId: string): Promise<SimpleProfile | null>;
|
|
105
|
-
fetchUserAccess(db: {
|
|
106
|
-
getAll: <T>(sql: string, params?: any[]) => Promise<T[]>;
|
|
107
|
-
}, userId: string): Promise<SimpleUserAccess[]>;
|
|
108
|
-
};
|
|
109
|
-
/**
|
|
110
|
-
* Extract access keys from UserAccess records.
|
|
111
|
-
*/
|
|
112
|
-
declare function extractAccessKeys(userAccess: SimpleUserAccess[] | null): string[];
|
|
113
|
-
|
|
114
10
|
/**
|
|
115
11
|
* Hook for authenticated users only.
|
|
116
12
|
* Throws an error if the user is not authenticated.
|
|
@@ -414,4 +310,4 @@ declare function useInvalidatePermission(): (entityType: EntityType, entityId: n
|
|
|
414
310
|
*/
|
|
415
311
|
declare function usePermissionLoading(): boolean;
|
|
416
312
|
|
|
417
|
-
export { EntityAction, EntityPermissionCheck, EntityType, type EntityWithPermission,
|
|
313
|
+
export { EntityAction, EntityPermissionCheck, EntityType, type EntityWithPermission, useAuth, useCanCreate, useCanDelete, useCanEdit, useCanShare, useCanView, useInvalidatePermission, usePermission, usePermissionCheck, usePermissionLoading, usePermissionsBatch, useSetupAuth };
|
package/dist/auth/hooks.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
extractAccessKeys,
|
|
3
|
-
offlineAuthQueries,
|
|
4
|
-
offlineAuthQueryKeys,
|
|
5
2
|
useAuth,
|
|
6
3
|
useCanCreate,
|
|
7
4
|
useCanDelete,
|
|
@@ -14,13 +11,13 @@ import {
|
|
|
14
11
|
usePermissionLoading,
|
|
15
12
|
usePermissionsBatch,
|
|
16
13
|
useSetupAuth
|
|
17
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-ILGWCJ6S.js";
|
|
18
15
|
import {
|
|
19
16
|
useSetUserMetadata,
|
|
20
17
|
useUserMetadata,
|
|
21
18
|
useUserMetadataState,
|
|
22
19
|
useUserMetadataValue
|
|
23
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-6OSNGHRE.js";
|
|
24
21
|
import "../chunk-UBHORKBS.js";
|
|
25
22
|
import "../chunk-J4ZVCXZ4.js";
|
|
26
23
|
import "../chunk-YUX6RGLZ.js";
|
|
@@ -28,9 +25,6 @@ import "../chunk-AKIRHA4Q.js";
|
|
|
28
25
|
import "../chunk-DMVUEJG2.js";
|
|
29
26
|
import "../chunk-7D4SUZUM.js";
|
|
30
27
|
export {
|
|
31
|
-
extractAccessKeys,
|
|
32
|
-
offlineAuthQueries,
|
|
33
|
-
offlineAuthQueryKeys,
|
|
34
28
|
useAuth,
|
|
35
29
|
useCanCreate,
|
|
36
30
|
useCanDelete,
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { EntityWithPermission, OfflineAuthData, UseOfflineAuthOptions, extractAccessKeys, offlineAuthQueries, offlineAuthQueryKeys, useAuth, useCanCreate, useCanDelete, useCanEdit, useCanShare, useCanView, useInvalidatePermission, usePermission, usePermissionCheck, usePermissionLoading, usePermissionsBatch, useSetupAuth } from './hooks.js';
|
|
3
|
-
export { AuthProvider, AuthProviderProps, EntityPermissionContextValue, OfflineAuthProvider, OfflineAuthProviderProps, PermissionContextValue, PermissionProvider, entityPermissionContext, permissionContext, usePermissions } from './context.js';
|
|
1
|
+
export { EntityWithPermission, useAuth, useCanCreate, useCanDelete, useCanEdit, useCanShare, useCanView, useInvalidatePermission, usePermission, usePermissionCheck, usePermissionLoading, usePermissionsBatch, useSetupAuth } from './hooks.js';
|
|
4
2
|
export { P as Profile, a as ProfileStatus, S as SetupAuthContext, b as SetupAuthContextProviderProps, s as setupAuthContext } from '../setupAuthContext-B76nbIP6.js';
|
|
3
|
+
export { AuthProvider, AuthProviderProps, EntityPermissionContextValue, PermissionContextValue, PermissionProvider, entityPermissionContext, permissionContext, usePermissions } from './context.js';
|
|
4
|
+
export { U as UserMetadataContextType, e as UserMetadataInsert, f as UserMetadataProvider, g as UserMetadataRow, h as UserMetadataUpdate, u as useSetUserMetadata, a as useUserMetadata, b as useUserMetadataState, c as useUserMetadataValue, d as userMetadataContext } from '../UserMetadataContext-yLZQu24J.js';
|
|
5
5
|
export { hasAccess, hasAllAccess, hasAllEntityAccess, hasAnyAccess, hasAnyEntityAccess, hasEntityAccess, isEntityAccessDenied, isPermissionLoaded } from './guards.js';
|
|
6
6
|
export { E as EntityAccessRecord, a as EntityAction, b as EntityPermissionCheck, c as EntityPermissionLevel, d as EntityType, P as PermissionEffect } from '../EntityPermissions-DwFt4tUd.js';
|
|
7
|
-
import 'react/jsx-runtime';
|
|
8
|
-
import 'react';
|
|
9
7
|
import '@supabase/supabase-js';
|
|
8
|
+
import 'react';
|
|
9
|
+
import 'react/jsx-runtime';
|
|
10
10
|
import '../useSupabase-DSZNeXnF.js';
|
|
11
11
|
import '@supabase/supabase-js/dist/module/lib/types.js';
|
package/dist/auth/index.js
CHANGED
|
@@ -1,34 +1,18 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-NSIAAYW3.js";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
getPermissionLevel,
|
|
6
|
-
hasResourceAccess,
|
|
3
|
+
useAuth,
|
|
4
|
+
useCanCreate,
|
|
7
5
|
useCanDelete,
|
|
8
6
|
useCanEdit,
|
|
9
7
|
useCanShare,
|
|
10
8
|
useCanView,
|
|
11
|
-
useRequireAuth,
|
|
12
|
-
useResourceAccess,
|
|
13
|
-
useSimpleAuth
|
|
14
|
-
} from "../chunk-5HJLTYRA.js";
|
|
15
|
-
import {
|
|
16
|
-
extractAccessKeys,
|
|
17
|
-
offlineAuthQueries,
|
|
18
|
-
offlineAuthQueryKeys,
|
|
19
|
-
useAuth,
|
|
20
|
-
useCanCreate,
|
|
21
|
-
useCanDelete as useCanDelete2,
|
|
22
|
-
useCanEdit as useCanEdit2,
|
|
23
|
-
useCanShare as useCanShare2,
|
|
24
|
-
useCanView as useCanView2,
|
|
25
9
|
useInvalidatePermission,
|
|
26
10
|
usePermission,
|
|
27
11
|
usePermissionCheck,
|
|
28
12
|
usePermissionLoading,
|
|
29
13
|
usePermissionsBatch,
|
|
30
14
|
useSetupAuth
|
|
31
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-ILGWCJ6S.js";
|
|
32
16
|
import {
|
|
33
17
|
AuthProvider,
|
|
34
18
|
PermissionProvider,
|
|
@@ -42,7 +26,7 @@ import {
|
|
|
42
26
|
useUserMetadataState,
|
|
43
27
|
useUserMetadataValue,
|
|
44
28
|
userMetadataContext
|
|
45
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-6OSNGHRE.js";
|
|
46
30
|
import "../chunk-UBHORKBS.js";
|
|
47
31
|
import {
|
|
48
32
|
hasAccess,
|
|
@@ -61,47 +45,33 @@ import "../chunk-DMVUEJG2.js";
|
|
|
61
45
|
import "../chunk-7D4SUZUM.js";
|
|
62
46
|
export {
|
|
63
47
|
AuthProvider,
|
|
64
|
-
OfflineAuthProvider,
|
|
65
48
|
PermissionProvider,
|
|
66
|
-
SimpleAuthProvider,
|
|
67
49
|
UserMetadataProvider,
|
|
68
50
|
entityPermissionContext,
|
|
69
|
-
extractAccessKeys,
|
|
70
|
-
getPermissionLevel,
|
|
71
51
|
hasAccess,
|
|
72
52
|
hasAllAccess,
|
|
73
53
|
hasAllEntityAccess,
|
|
74
54
|
hasAnyAccess,
|
|
75
55
|
hasAnyEntityAccess,
|
|
76
56
|
hasEntityAccess,
|
|
77
|
-
hasResourceAccess,
|
|
78
57
|
isEntityAccessDenied,
|
|
79
58
|
isPermissionLoaded,
|
|
80
|
-
offlineAuthQueries,
|
|
81
|
-
offlineAuthQueryKeys,
|
|
82
59
|
permissionContext,
|
|
83
60
|
setupAuthContext,
|
|
84
61
|
useAuth,
|
|
85
62
|
useCanCreate,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
63
|
+
useCanDelete,
|
|
64
|
+
useCanEdit,
|
|
65
|
+
useCanShare,
|
|
66
|
+
useCanView,
|
|
90
67
|
useInvalidatePermission,
|
|
91
68
|
usePermission,
|
|
92
69
|
usePermissionCheck,
|
|
93
70
|
usePermissionLoading,
|
|
94
71
|
usePermissions,
|
|
95
72
|
usePermissionsBatch,
|
|
96
|
-
useRequireAuth,
|
|
97
|
-
useResourceAccess,
|
|
98
73
|
useSetUserMetadata,
|
|
99
74
|
useSetupAuth,
|
|
100
|
-
useSimpleAuth,
|
|
101
|
-
useCanDelete as useSimpleCanDelete,
|
|
102
|
-
useCanEdit as useSimpleCanEdit,
|
|
103
|
-
useCanShare as useSimpleCanShare,
|
|
104
|
-
useCanView as useSimpleCanView,
|
|
105
75
|
useUserMetadata,
|
|
106
76
|
useUserMetadataState,
|
|
107
77
|
useUserMetadataValue,
|