@pol-studios/db 1.0.1 → 1.0.3
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-CeUdM6kV.d.ts → UserMetadataContext-BYYqA6LI.d.ts} +1 -1
- package/dist/auth/context.d.ts +2 -2
- package/dist/auth/hooks.d.ts +3 -3
- package/dist/auth/index.d.ts +2 -2
- package/dist/client/index.d.ts +1 -1
- package/dist/hooks/index.d.ts +79 -2
- package/dist/{index-DNv49L9u.d.ts → index-DNrSptau.d.ts} +1 -1
- package/dist/index.d.ts +22 -1075
- package/dist/index.js +519 -7428
- package/dist/index.js.map +1 -1
- package/dist/index.web.d.ts +317 -0
- package/dist/index.web.js +46268 -0
- package/dist/index.web.js.map +1 -0
- package/dist/mutation/index.d.ts +4 -4
- package/dist/parser/index.d.ts +2 -2
- package/dist/query/index.d.ts +1 -1
- package/dist/{select-query-parser-CGI40aOg.d.ts → select-query-parser-CLkOKHzc.d.ts} +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{types-DjuX1XHy.d.ts → types-CKsWM8T3.d.ts} +1 -1
- package/dist/{useBatchUpsert-BHaIk9ID.d.ts → useBatchUpsert-ooLlpJMg.d.ts} +3 -3
- package/dist/{index-CMhJjgef.d.ts → useDbCount-B5-Va9sg.d.ts} +1 -76
- package/dist/useResolveFeedback-kQZVy6lb.d.ts +1071 -0
- package/dist/{useSupabase-DO9kQv2O.d.ts → useSupabase-pPhUZHcl.d.ts} +1 -1
- package/package.json +23 -12
|
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
import { User, SignUpWithPasswordCredentials, AuthTokenResponsePassword } from '@supabase/supabase-js';
|
|
5
|
-
import { D as Database } from './useSupabase-
|
|
5
|
+
import { D as Database } from './useSupabase-pPhUZHcl.js';
|
|
6
6
|
|
|
7
7
|
type ProfileStatus = "active" | "archived" | "suspended";
|
|
8
8
|
interface SetupAuthContext {
|
package/dist/auth/context.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { c as Profile, P as ProfileStatus, a as SetupAuthContext, S as SetupAuthContextProvider, b as SetupAuthContextProviderProps, U as UserMetadataContextType, h as UserMetadataInsert, i as UserMetadataProvider, j as UserMetadataRow, k as UserMetadataUpdate, s as setupAuthContext, u as useSetUserMetadata, d as useUserMetadata, e as useUserMetadataState, f as useUserMetadataValue, g as userMetadataContext } from '../UserMetadataContext-
|
|
1
|
+
export { c as Profile, P as ProfileStatus, a as SetupAuthContext, S as SetupAuthContextProvider, b as SetupAuthContextProviderProps, U as UserMetadataContextType, h as UserMetadataInsert, i as UserMetadataProvider, j as UserMetadataRow, k as UserMetadataUpdate, s as setupAuthContext, u as useSetUserMetadata, d as useUserMetadata, e as useUserMetadataState, f as useUserMetadataValue, g as userMetadataContext } from '../UserMetadataContext-BYYqA6LI.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
5
|
import { d as EntityType, b as EntityPermissionCheck, a as EntityAction } from '../EntityPermissions-DwFt4tUd.js';
|
|
6
6
|
import '@supabase/supabase-js';
|
|
7
|
-
import '../useSupabase-
|
|
7
|
+
import '../useSupabase-pPhUZHcl.js';
|
|
8
8
|
import '@supabase/supabase-js/dist/module/lib/types.js';
|
|
9
9
|
|
|
10
10
|
interface AuthProviderProps {
|
package/dist/auth/hooks.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { User } from '@supabase/supabase-js';
|
|
2
|
-
import { a as SetupAuthContext } from '../UserMetadataContext-
|
|
3
|
-
export { u as useSetUserMetadata, d as useUserMetadata, e as useUserMetadataState, f as useUserMetadataValue } from '../UserMetadataContext-
|
|
2
|
+
import { a as SetupAuthContext } from '../UserMetadataContext-BYYqA6LI.js';
|
|
3
|
+
export { u as useSetUserMetadata, d as useUserMetadata, e as useUserMetadataState, f as useUserMetadataValue } from '../UserMetadataContext-BYYqA6LI.js';
|
|
4
4
|
import { d as EntityType, a as EntityAction, b as EntityPermissionCheck } from '../EntityPermissions-DwFt4tUd.js';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'react';
|
|
7
|
-
import '../useSupabase-
|
|
7
|
+
import '../useSupabase-pPhUZHcl.js';
|
|
8
8
|
import '@supabase/supabase-js/dist/module/lib/types.js';
|
|
9
9
|
|
|
10
10
|
/**
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { EntityWithPermission, useAuth, useCanCreate, useCanDelete, useCanEdit, useCanShare, useCanView, useInvalidatePermission, usePermission, usePermissionCheck, usePermissionLoading, usePermissionsBatch, useSetupAuth } from './hooks.js';
|
|
2
|
-
export { c as Profile, P as ProfileStatus, a as SetupAuthContext, S as SetupAuthContextProvider, b as SetupAuthContextProviderProps, U as UserMetadataContextType, h as UserMetadataInsert, i as UserMetadataProvider, j as UserMetadataRow, k as UserMetadataUpdate, s as setupAuthContext, u as useSetUserMetadata, d as useUserMetadata, e as useUserMetadataState, f as useUserMetadataValue, g as userMetadataContext } from '../UserMetadataContext-
|
|
2
|
+
export { c as Profile, P as ProfileStatus, a as SetupAuthContext, S as SetupAuthContextProvider, b as SetupAuthContextProviderProps, U as UserMetadataContextType, h as UserMetadataInsert, i as UserMetadataProvider, j as UserMetadataRow, k as UserMetadataUpdate, s as setupAuthContext, u as useSetUserMetadata, d as useUserMetadata, e as useUserMetadataState, f as useUserMetadataValue, g as userMetadataContext } from '../UserMetadataContext-BYYqA6LI.js';
|
|
3
3
|
export { AuthProvider, AuthProviderProps, EntityPermissionContextValue, PermissionContextValue, PermissionProvider, entityPermissionContext, permissionContext, usePermissions } from './context.js';
|
|
4
4
|
export { hasAccess, hasAllAccess, hasAllEntityAccess, hasAnyAccess, hasAnyEntityAccess, hasEntityAccess, isEntityAccessDenied, isPermissionLoaded } from './guards.js';
|
|
5
5
|
export { E as EntityAccessRecord, a as EntityAction, b as EntityPermissionCheck, c as EntityPermissionLevel, d as EntityType, P as PermissionEffect } from '../EntityPermissions-DwFt4tUd.js';
|
|
6
6
|
import '@supabase/supabase-js';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import 'react';
|
|
9
|
-
import '../useSupabase-
|
|
9
|
+
import '../useSupabase-pPhUZHcl.js';
|
|
10
10
|
import '@supabase/supabase-js/dist/module/lib/types.js';
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { D as Database,
|
|
1
|
+
export { D as Database, S as SupabaseDatabaseTypes, a as SupabaseProvider, T as TypedSupabaseClient, U as UserSessionId, c as createNewSupabaseClient, o as onSupabaseInitialized, s as setDefaultOptions, t as typedSupabase, u as useSupabase } from '../useSupabase-pPhUZHcl.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import '@supabase/supabase-js/dist/module/lib/types.js';
|
|
4
4
|
import 'react';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,83 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { H as ClarificationQuestion, p as DatabaseTypes, F as Filter, y as FilterGroup, z as FilterOperator, E as Pagination, P as PublicTableNames, Q as QueryState, R as ResolveRowType, S as SchemaNames, q as SchemaTableNames, G as Sort, r as TableIdentifier, I as UseAdvanceQueryOptions, J as UseAdvanceQueryResult, a4 as UseDbCountOptions, a5 as UseDbCountResult, _ as UseDbDeleteOptions, $ as UseDbDeleteResult, a1 as UseDbInfiniteQueryOptions, a2 as UseDbInfiniteQueryResult, L as UseDbInsertOptions, M as UseDbInsertResult, v as UseDbQueryByIdOptions, w as UseDbQueryByIdResult, U as UseDbQueryOptions, s as UseDbQueryResult, O as UseDbUpdateOptions, V as UseDbUpdateResult, X as UseDbUpsertOptions, Y as UseDbUpsertResult, x as useAdvanceQuery, u as useDataLayer, n as useDataLayerOptional, a3 as useDbCount, Z as useDbDelete, a0 as useDbInfiniteQuery, K as useDbInsert, o as useDbQuery, t as useDbQueryById, N as useDbUpdate, W as useDbUpsert } from '../useDbCount-B5-Va9sg.js';
|
|
2
|
+
import { SyncStatus, SyncControl } from '../core/index.js';
|
|
2
3
|
import 'react';
|
|
3
4
|
import '@supabase/supabase-js';
|
|
4
5
|
import '@tanstack/react-query';
|
|
5
|
-
import '../core/index.js';
|
|
6
6
|
import '../executor-CB4KHyYG.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* V3 useSyncStatus Hook
|
|
10
|
+
*
|
|
11
|
+
* Provides sync status information from the data layer.
|
|
12
|
+
* Returns default "always synced" status when PowerSync is not available.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Hook to get the current sync status
|
|
17
|
+
*
|
|
18
|
+
* When PowerSync is not available, returns a default "always synced" status.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const { isSyncing, pendingUploads, isConnected } = useSyncStatus();
|
|
22
|
+
*
|
|
23
|
+
* if (pendingUploads > 0) {
|
|
24
|
+
* console.log(`${pendingUploads} changes waiting to sync`);
|
|
25
|
+
* }
|
|
26
|
+
*/
|
|
27
|
+
declare function useSyncStatus(): SyncStatus;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* V3 useSyncControl Hook
|
|
31
|
+
*
|
|
32
|
+
* Provides sync control functions from the data layer.
|
|
33
|
+
* Returns no-op functions when PowerSync is not available.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Hook to get sync controls for PowerSync
|
|
38
|
+
*
|
|
39
|
+
* When PowerSync is not available, all methods are no-ops that log a warning.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* const { triggerSync, startLiveSync, stopLiveSync } = useSyncControl();
|
|
43
|
+
*
|
|
44
|
+
* // Manually trigger a sync
|
|
45
|
+
* await triggerSync();
|
|
46
|
+
*
|
|
47
|
+
* // Start/stop live sync
|
|
48
|
+
* await startLiveSync();
|
|
49
|
+
* stopLiveSync();
|
|
50
|
+
*/
|
|
51
|
+
declare function useSyncControl(): SyncControl;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* V3 useOnlineStatus Hook
|
|
55
|
+
*
|
|
56
|
+
* Provides online/connection status information.
|
|
57
|
+
* Combines data layer status with platform-specific online/offline events.
|
|
58
|
+
* Works on both web (browser events) and React Native (NetInfo).
|
|
59
|
+
*/
|
|
60
|
+
/**
|
|
61
|
+
* Online status information
|
|
62
|
+
*/
|
|
63
|
+
interface OnlineStatus {
|
|
64
|
+
/** Whether the device has network connectivity */
|
|
65
|
+
isOnline: boolean;
|
|
66
|
+
/** Whether PowerSync is connected (false if using Supabase-only) */
|
|
67
|
+
isConnected: boolean;
|
|
68
|
+
/** Current backend being used */
|
|
69
|
+
backend: "powersync" | "supabase" | null;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Hook to get online/connection status
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* const { isOnline, isConnected, backend } = useOnlineStatus();
|
|
76
|
+
*
|
|
77
|
+
* if (!isOnline) {
|
|
78
|
+
* return <OfflineBanner />;
|
|
79
|
+
* }
|
|
80
|
+
*/
|
|
81
|
+
declare function useOnlineStatus(): OnlineStatus;
|
|
82
|
+
|
|
83
|
+
export { type OnlineStatus, useOnlineStatus, useSyncControl, useSyncStatus };
|
|
@@ -8777,4 +8777,4 @@ declare function useDbAdvanceFilterQuery<Result>(query: PromiseLike<PostgrestSin
|
|
|
8777
8777
|
Dispatch<SetStateAction<QueryState>>
|
|
8778
8778
|
];
|
|
8779
8779
|
|
|
8780
|
-
export { type BooleanOperator as B, type CompositeTypes as C, type
|
|
8780
|
+
export { type BooleanOperator as B, type CompositeTypes as C, type Database as D, type Enums as E, type FilterConditionType as F, type Json as J, type OrderColumn as O, type Pagination as P, type QueryState as Q, type Sort as S, type Tables as T, type ValueOrArrayForPropertyType as V, type TablesInsert as a, type TablesUpdate as b, Constants as c, type DbChangeLog as d, type FilterInput as e, type FilterState as f, type ComputedSortConfig as g, type ClarificationSuggestion as h, type FilterContextType as i, type FilterOperator as j, type Filter as k, type FilterGroup as l, type ClarificationQuestion as m, normalizeFilter as n, useDbAdvanceFilterQuery as u };
|