@pol-studios/db 1.0.1 → 1.0.2

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,9 +1,9 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { D as Database } from '../useSupabase-DO9kQv2O.js';
2
+ import { D as Database } from '../useSupabase-pPhUZHcl.js';
3
3
  import { useInsertMutation, useUpdateMutation } from '@supabase-cache-helpers/postgrest-react-query';
4
- import { G as GetResult } from '../select-query-parser-CGI40aOg.js';
5
- import { G as GenericSchema } from '../types-DjuX1XHy.js';
6
- export { u as useBatchDelete, a as useBatchUpsert } from '../useBatchUpsert-BHaIk9ID.js';
4
+ import { G as GetResult } from '../select-query-parser-CLkOKHzc.js';
5
+ import { G as GenericSchema } from '../types-CKsWM8T3.js';
6
+ export { u as useBatchDelete, a as useBatchUpsert } from '../useBatchUpsert-ooLlpJMg.js';
7
7
  import 'react/jsx-runtime';
8
8
  import '@supabase/supabase-js/dist/module/lib/types.js';
9
9
  import 'react';
@@ -1,6 +1,6 @@
1
1
  import { PostgrestBuilder, PostgrestSingleResponse, PostgrestMaybeSingleResponse, PostgrestResponse, PostgrestQueryBuilder } from '@supabase/postgrest-js';
2
- export { G as GetResult, S as SelectQueryError } from '../select-query-parser-CGI40aOg.js';
3
- export { F as Fetch, k as GenericFunction, i as GenericNonUpdatableView, G as GenericSchema, a as GenericTable, h as GenericUpdatableView, j as GenericView, b as PostgrestError, f as PostgrestMaybeSingleResponse, g as PostgrestResponse, d as PostgrestResponseFailure, c as PostgrestResponseSuccess, e as PostgrestSingleResponse, P as Prettify } from '../types-DjuX1XHy.js';
2
+ export { G as GetResult, S as SelectQueryError } from '../select-query-parser-CLkOKHzc.js';
3
+ export { F as Fetch, k as GenericFunction, j as GenericNonUpdatableView, G as GenericSchema, a as GenericTable, i as GenericUpdatableView, b as GenericView, c as PostgrestError, g as PostgrestMaybeSingleResponse, h as PostgrestResponse, e as PostgrestResponseFailure, d as PostgrestResponseSuccess, f as PostgrestSingleResponse, P as Prettify } from '../types-CKsWM8T3.js';
4
4
 
5
5
  /**
6
6
  * A function that validates whether the given input is an object of type Type
@@ -10,7 +10,7 @@ import * as _supabase_postgrest_js from '@supabase/postgrest-js';
10
10
  import * as react from 'react';
11
11
  import { Dispatch, SetStateAction } from 'react';
12
12
  import { V as ValueForPropertyType, P as PropertyType, a as FilterConfig } from '../FilterConfig-Bt2Ek74z.js';
13
- import { a as GenericTable, j as GenericView } from '../types-DjuX1XHy.js';
13
+ import { a as GenericTable, b as GenericView } from '../types-CKsWM8T3.js';
14
14
 
15
15
  /**
16
16
  * Select String Parser
@@ -1,4 +1,4 @@
1
- import { G as GenericSchema, P as Prettify } from './types-DjuX1XHy.js';
1
+ import { G as GenericSchema, P as Prettify } from './types-CKsWM8T3.js';
2
2
 
3
3
  type Whitespace = ' ' | '\n' | '\t';
4
4
  type LowerAlphabet = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z';
@@ -1,5 +1,5 @@
1
1
  export { a as FilterConfig, F as FilterConfigOption, G as Group, P as PropertyType, S as SortConfig, T as TableInfo, V as ValueForPropertyType, b as WhereClause, W as WhereFilter } from '../FilterConfig-Bt2Ek74z.js';
2
- export { B as BooleanOperator, l as ClarificationQuestion, k as ClarificationSuggestion, j as ComputedSortConfig, a as Database, D as DbChangeLog, f as Filter, e as FilterConditionType, m as FilterContextType, g as FilterGroup, h as FilterInput, F as FilterOperator, i as FilterState, O as OrderColumn, P as Pagination, Q as QueryState, S as Sort, V as ValueOrArrayForPropertyType } from '../index-DNv49L9u.js';
2
+ export { B as BooleanOperator, m as ClarificationQuestion, h as ClarificationSuggestion, g as ComputedSortConfig, D as Database, d as DbChangeLog, k as Filter, F as FilterConditionType, i as FilterContextType, l as FilterGroup, e as FilterInput, j as FilterOperator, f as FilterState, O as OrderColumn, P as Pagination, Q as QueryState, S as Sort, V as ValueOrArrayForPropertyType } from '../index-DNrSptau.js';
3
3
  import 'moment';
4
4
  import '@supabase/supabase-js';
5
5
  import 'react';
@@ -59,4 +59,4 @@ type Prettify<T> = {
59
59
  [K in keyof T]: T[K];
60
60
  } & {};
61
61
 
62
- export type { Fetch as F, GenericSchema as G, Prettify as P, GenericTable as a, PostgrestError as b, PostgrestResponseSuccess as c, PostgrestResponseFailure as d, PostgrestSingleResponse as e, PostgrestMaybeSingleResponse as f, PostgrestResponse as g, GenericUpdatableView as h, GenericNonUpdatableView as i, GenericView as j, GenericFunction as k };
62
+ export type { Fetch as F, GenericSchema as G, Prettify as P, GenericTable as a, GenericView as b, PostgrestError as c, PostgrestResponseSuccess as d, PostgrestResponseFailure as e, PostgrestSingleResponse as f, PostgrestMaybeSingleResponse as g, PostgrestResponse as h, GenericUpdatableView as i, GenericNonUpdatableView as j, GenericFunction as k };
@@ -1,7 +1,7 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { D as Database } from './useSupabase-DO9kQv2O.js';
3
- import { G as GetResult } from './select-query-parser-CGI40aOg.js';
4
- import { G as GenericSchema } from './types-DjuX1XHy.js';
2
+ import { D as Database } from './useSupabase-pPhUZHcl.js';
3
+ import { G as GetResult } from './select-query-parser-CLkOKHzc.js';
4
+ import { G as GenericSchema } from './types-CKsWM8T3.js';
5
5
 
6
6
  type ItemType$1<T> = T extends Array<infer U> ? U : T;
7
7
  declare function useBatchDelete<TableName extends string & keyof PublicSchema["Tables"], Table extends PublicSchema["Tables"][TableName], Schema extends keyof Database = "public", PublicSchema extends GenericSchema = Database[Extract<keyof Database, Schema>], Query extends string = "*", RelationName = unknown, Relationships = Table extends {
@@ -1737,79 +1737,4 @@ interface UseDbCountResult {
1737
1737
  */
1738
1738
  declare function useDbCount(table: string, options?: UseDbCountOptions): UseDbCountResult;
1739
1739
 
1740
- /**
1741
- * V3 useSyncStatus Hook
1742
- *
1743
- * Provides sync status information from the data layer.
1744
- * Returns default "always synced" status when PowerSync is not available.
1745
- */
1746
-
1747
- /**
1748
- * Hook to get the current sync status
1749
- *
1750
- * When PowerSync is not available, returns a default "always synced" status.
1751
- *
1752
- * @example
1753
- * const { isSyncing, pendingUploads, isConnected } = useSyncStatus();
1754
- *
1755
- * if (pendingUploads > 0) {
1756
- * console.log(`${pendingUploads} changes waiting to sync`);
1757
- * }
1758
- */
1759
- declare function useSyncStatus(): SyncStatus;
1760
-
1761
- /**
1762
- * V3 useSyncControl Hook
1763
- *
1764
- * Provides sync control functions from the data layer.
1765
- * Returns no-op functions when PowerSync is not available.
1766
- */
1767
-
1768
- /**
1769
- * Hook to get sync controls for PowerSync
1770
- *
1771
- * When PowerSync is not available, all methods are no-ops that log a warning.
1772
- *
1773
- * @example
1774
- * const { triggerSync, startLiveSync, stopLiveSync } = useSyncControl();
1775
- *
1776
- * // Manually trigger a sync
1777
- * await triggerSync();
1778
- *
1779
- * // Start/stop live sync
1780
- * await startLiveSync();
1781
- * stopLiveSync();
1782
- */
1783
- declare function useSyncControl(): SyncControl;
1784
-
1785
- /**
1786
- * V3 useOnlineStatus Hook
1787
- *
1788
- * Provides online/connection status information.
1789
- * Combines data layer status with platform-specific online/offline events.
1790
- * Works on both web (browser events) and React Native (NetInfo).
1791
- */
1792
- /**
1793
- * Online status information
1794
- */
1795
- interface OnlineStatus {
1796
- /** Whether the device has network connectivity */
1797
- isOnline: boolean;
1798
- /** Whether PowerSync is connected (false if using Supabase-only) */
1799
- isConnected: boolean;
1800
- /** Current backend being used */
1801
- backend: "powersync" | "supabase" | null;
1802
- }
1803
- /**
1804
- * Hook to get online/connection status
1805
- *
1806
- * @example
1807
- * const { isOnline, isConnected, backend } = useOnlineStatus();
1808
- *
1809
- * if (!isOnline) {
1810
- * return <OfflineBanner />;
1811
- * }
1812
- */
1813
- declare function useOnlineStatus(): OnlineStatus;
1814
-
1815
- export { type Pagination as $, type AdapterCapabilities as A, type AdapterDependencies as B, type CapableDataAdapter as C, type DataLayerContextValue as D, type AdapterStrategyType as E, ADAPTER_STRATEGIES as F, AdapterRegistry as G, createAdapterRegistry as H, AdapterAutoDetector as I, createAdapterAutoDetector as J, BackendStatus as K, type AutoDetectionResult as L, type AutoDetectorOptions as M, type BackendChangeListener as N, DataLayerContext as O, type PublicTableNames$1 as P, type DataLayerStatus as Q, type ResolveRowType$1 as R, type SchemaNames$1 as S, type TableDataAdapter as T, type UseDbInfiniteQueryOptions as U, useDataLayerOptional as V, type UseDbQueryByIdOptions as W, type UseDbQueryByIdResult as X, type Filter as Y, type FilterGroup as Z, type FilterOperator as _, type AdapterQueryResult as a, type Sort as a0, type QueryState as a1, type ClarificationQuestion as a2, type UseDbInsertOptions as a3, type UseDbInsertResult as a4, type UseDbUpdateOptions as a5, type UseDbUpdateResult as a6, type UseDbUpsertOptions as a7, type UseDbUpsertResult as a8, type UseDbDeleteOptions as a9, type UseDbDeleteResult as aa, type OnlineStatus as ab, useDbDelete as b, useDbInsert as c, useDbQuery as d, useDbQueryById as e, useDbUpdate as f, useDbUpsert as g, useOnlineStatus as h, useSyncControl as i, useSyncStatus as j, useDbInfiniteQuery as k, useDbCount as l, useAdvanceQuery as m, type DatabaseTypes$1 as n, type SchemaTableNames$1 as o, type TableIdentifier$1 as p, type UseDbInfiniteQueryResult as q, type UseDbCountOptions as r, type UseDbCountResult as s, type UseDbQueryResult as t, useDataLayer as u, type UseDbQueryOptions as v, type UseAdvanceQueryOptions as w, type UseAdvanceQueryResult as x, type AdapterConfig as y, type AdapterFactory as z };
1740
+ export { type UseDbDeleteResult as $, type AdapterQueryResult as A, BackendStatus as B, type CapableDataAdapter as C, type DataLayerContextValue as D, type Pagination as E, type Filter as F, type Sort as G, type ClarificationQuestion as H, type UseAdvanceQueryOptions as I, type UseAdvanceQueryResult as J, useDbInsert as K, type UseDbInsertOptions as L, type UseDbInsertResult as M, useDbUpdate as N, type UseDbUpdateOptions as O, type PublicTableNames$1 as P, type QueryState as Q, type ResolveRowType$1 as R, type SchemaNames$1 as S, type TableDataAdapter as T, type UseDbQueryOptions as U, type UseDbUpdateResult as V, useDbUpsert as W, type UseDbUpsertOptions as X, type UseDbUpsertResult as Y, useDbDelete as Z, type UseDbDeleteOptions as _, type AdapterConfig as a, useDbInfiniteQuery as a0, type UseDbInfiniteQueryOptions as a1, type UseDbInfiniteQueryResult as a2, useDbCount as a3, type UseDbCountOptions as a4, type UseDbCountResult as a5, DataLayerContext as a6, type DataLayerStatus as a7, type AdapterFactory as b, type AdapterCapabilities as c, type AdapterDependencies as d, type AdapterStrategyType as e, ADAPTER_STRATEGIES as f, AdapterRegistry as g, createAdapterRegistry as h, AdapterAutoDetector as i, createAdapterAutoDetector as j, type AutoDetectionResult as k, type AutoDetectorOptions as l, type BackendChangeListener as m, useDataLayerOptional as n, useDbQuery as o, type DatabaseTypes$1 as p, type SchemaTableNames$1 as q, type TableIdentifier$1 as r, type UseDbQueryResult as s, useDbQueryById as t, useDataLayer as u, type UseDbQueryByIdOptions as v, type UseDbQueryByIdResult as w, useAdvanceQuery as x, type FilterGroup as y, type FilterOperator as z };