@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/index.d.ts CHANGED
@@ -1,406 +1,37 @@
1
- import { u as useDbAdvanceFilterQuery, Q as QueryState, T as Tables, D as DbChangeLog } from './index-DNv49L9u.js';
2
- export { B as BooleanOperator, l as ClarificationQuestion, k as ClarificationSuggestion, C as CompositeTypes, j as ComputedSortConfig, d as Constants, a as Database, E as Enums, f as Filter, e as FilterConditionType, m as FilterContextType, g as FilterGroup, h as FilterInput, F as FilterOperator, i as FilterState, J as Json, O as OrderColumn, P as Pagination, S as Sort, b as TablesInsert, c as TablesUpdate, V as ValueOrArrayForPropertyType, n as normalizeFilter } from './index-DNv49L9u.js';
1
+ export { B as BooleanOperator, m as ClarificationQuestion, h as ClarificationSuggestion, C as CompositeTypes, g as ComputedSortConfig, c as Constants, D as Database, d as DbChangeLog, E as Enums, k as Filter, F as FilterConditionType, i as FilterContextType, l as FilterGroup, e as FilterInput, j as FilterOperator, f as FilterState, J as Json, O as OrderColumn, P as Pagination, Q as QueryState, S as Sort, T as Tables, a as TablesInsert, b as TablesUpdate, V as ValueOrArrayForPropertyType, n as normalizeFilter, u as useDbAdvanceFilterQuery, u as useDbAdvanceQuery } from './index-DNrSptau.js';
3
2
  export { a as FilterConfig, F as FilterConfigOption, G as Group, P as PropertyType, S as SortConfig, T as TableInfo, V as ValueForPropertyType, W as WhereFilter } from './FilterConfig-Bt2Ek74z.js';
3
+ export { E as AIOptions, F as AIResponse, _ as AlertProps, T as BUCKETS, I as BatchAnalysisProgress, V as BucketName, Q as CustomPageQueryResult, Y as DEFAULT_QUERY_TIMEOUT, H as ExtractedReceipt, ah as FeedbackListItem, ai as FeedbackListParams, $ as LiveChangeContext, a0 as LiveChangeContextProvider, M as MutationOption, P as PendingExpense, J as ServerAvailabilityState, R as StorageObjectMetadata, ak as SubmitFeedbackParams, S as SupabaseAdapter, X as TIMEOUT_ERROR_MESSAGE, N as UpdateOptions, U as UseDbPartialAdvanceQueryResult, v as UseDbPartialQueryResult, x as UseDbRealtimeQueryResult, A as UseMutationSuccessOptions, y as convertFilterToRealtimeQuery, W as createInCondition, f as createSupabaseAdapter, O as executeAdvanceQuery, D as getErrorBody, p as getSupabaseUrl, Z as isTimeoutError, n as newTimeActivity, s as setSupabaseUrl, G as useAI, al as useApplyFeedback, k as useAutosaveState, ac as useChangelogById, ad as useChangelogBySlug, ae as useChangelogEntries, af as useChangelogMedia, aa as useChangelogs, c as useDbDelete, a as useDbInsert, q as useDbMultiDelete, r as useDbMultiUpsert, t as useDbPartialAdvanceQuery, w as useDbPartialQuery, u as useDbRealtime, e as useDbRealtimeQuery, b as useDbUpdate, d as useDbUpsert, z as useDbUpsertResponse, c as useDelete, a2 as useDeleteChangelog, a5 as useDeleteChangelogEntry, a8 as useDeleteChangelogMedia, ag as useFeedbackList, a as useInsert, j as useLatestOperationLog, i as useLiveChangeTracking, a6 as useMultiDeleteChangelogEntries, a4 as useMultiUpsertChangelogEntries, B as useMutationSuccess, C as useMutationSuccessRN, ab as usePublishedChangelogs, u as useRealtime, e as useRealtimeQuery, h as useReceiptAI, am as useResolveFeedback, L as useSearchQuery, K as useServerAvailability, o as useStoragePath, m as useStorageUrl, aj as useSubmitFeedback, g as useSupabaseFunction, l as useToastError, b as useUpdate, a9 as useUploadChangelogMedia, d as useUpsert, a1 as useUpsertChangelog, a3 as useUpsertChangelogEntry, a7 as useUpsertChangelogMedia } from './useResolveFeedback-kQZVy6lb.js';
4
+ 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';
5
+ export { U as UseDbQuerySingleReturn, u as useDbQuery } from './useDbQuery-C-TL8jY1.js';
4
6
  import * as _tanstack_react_query from '@tanstack/react-query';
5
- import { UseQueryOptions, UseMutationResult, QueryClient, UseMutationOptions } from '@tanstack/react-query';
6
- import { D as Database } from './useSupabase-DO9kQv2O.js';
7
- export { a as SupabaseDatabaseTypes, S as SupabaseProvider, T as TypedSupabaseClient, U as UserSessionId, c as createNewSupabaseClient, u as default, o as onSupabaseInitialized, s as setDefaultOptions, t as typedSupabase, u as useSupabase } from './useSupabase-DO9kQv2O.js';
8
- import { G as GetResult } from './select-query-parser-CGI40aOg.js';
9
- export { S as SelectQueryError } from './select-query-parser-CGI40aOg.js';
10
- import { G as GenericSchema, a as GenericTable } from './types-DjuX1XHy.js';
11
- export { F as Fetch, k as GenericFunction, i as GenericNonUpdatableView, 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';
12
- import { useInsertMutation, useUpdateMutation } from '@supabase-cache-helpers/postgrest-react-query';
13
- import { PostgrestSingleResponse, PostgrestError, RealtimePostgresChangesPayload, SupabaseClient } from '@supabase/supabase-js';
14
- import * as react from 'react';
15
- import { ReactNode, JSX } from 'react';
16
- import { U as UseDbQuerySingleReturn } from './useDbQuery-C-TL8jY1.js';
17
- export { u as useDbQuery } from './useDbQuery-C-TL8jY1.js';
18
- import { ItemType as ItemType$6 } from '@pol-studios/utils';
19
- import { FileOptions, TransformOptions } from '@supabase/storage-js';
20
- export { u as useBatchDelete, a as useBatchUpsert } from './useBatchUpsert-BHaIk9ID.js';
7
+ import { QueryClient } from '@tanstack/react-query';
8
+ import { FileOptions } from '@supabase/storage-js';
9
+ export { u as useBatchDelete, a as useBatchUpsert } from './useBatchUpsert-ooLlpJMg.js';
21
10
  import { DatabaseSchema, QueryOptions, DataLayerConfig } from './core/index.js';
22
11
  export { AdapterRegistry as AdapterRegistryInterface, AutoStrategy, BuiltQuery, CachedStrategy, ColumnInfo, ColumnType, ConnectionConfig, DataAdapter, DataLayerHooks, DeleteMutationResult, ExtractInsert, ExtractRow, ExtractUpdate, HybridStrategy, MutationHookResult, MutationResult, OrderBy, ParsedSelect, PowerSyncStrategy, QueryResult, QuerySingleResult, RelationshipInfo, RelationshipType, ResolvedRelationship, ScopeDefinition, SelectColumn, SelectRelation, SupabaseStrategy, SyncControl, SyncMode, SyncScope, SyncStatus, TableNames, TableSchema, TableStrategy, UseDbMutationHook, UseDbQueryByIdHook, UseDbQueryHook, WhereClause, WhereOperators } from './core/index.js';
23
12
  export { UsePartialAdvancedQueryResult, UsePartialQueryResult, UseQuerySingleReturn, extractColumnNames, extractRelationNames, getRelationSelect, hasRelation, parseSelect, stringifySelect, tokenizeTopLevel, useAdvancedFilterQuery, useAdvancedQuery, useInfiniteQuery, usePartialAdvancedQuery, usePartialQuery, useQuery } from './query/index.js';
24
13
  import { Q as QueryExecutor, P as PowerSyncDatabase$1 } from './executor-CB4KHyYG.js';
25
14
  export { e as RelationJoinData, R as RelationshipResolver, b as ResultJoiner, S as SQLBuilder, f as createQueryExecutor, c as createRelationshipResolver, d as createResultJoiner, a as createSQLBuilder } from './executor-CB4KHyYG.js';
26
- import { T as TableDataAdapter, C as CapableDataAdapter, A as AdapterCapabilities, a as AdapterQueryResult, D as DataLayerContextValue } from './index-CMhJjgef.js';
27
- export { F as ADAPTER_STRATEGIES, I as AdapterAutoDetector, y as AdapterConfig, B as AdapterDependencies, z as AdapterFactory, G as AdapterRegistry, E as AdapterStrategyType, L as AutoDetectionResult, M as AutoDetectorOptions, N as BackendChangeListener, K as BackendStatus, O as DataLayerContext, Q as DataLayerStatus, n as DatabaseTypes, P as PublicTableNames, R as ResolveRowType, S as SchemaNames, o as SchemaTableNames, p as TableIdentifier, w as UseAdvanceQueryOptions, x as UseAdvanceQueryResult, r as UseDbCountOptions, s as UseDbCountResult, U as UseDbInfiniteQueryOptions, q as UseDbInfiniteQueryResult, v as UseDbQueryOptions, t as UseDbQueryResult, J as createAdapterAutoDetector, H as createAdapterRegistry, m as useAdvanceQuery, u as useDataLayer, l as useDbCount, l as useDbCountV3, b as useDbDeleteV3, k as useDbInfiniteQuery, k as useDbInfiniteQueryV3, c as useDbInsertV3, e as useDbQueryById, d as useDbQueryV3, f as useDbUpdateV3, g as useDbUpsertV3, h as useOnlineStatus, i as useSyncControl, j as useSyncStatus } from './index-CMhJjgef.js';
28
- import { FunctionsResponse } from '@supabase/functions-js';
29
- import * as _supabase_postgrest_js from '@supabase/postgrest-js';
30
- import { PostgrestSingleResponse as PostgrestSingleResponse$1 } from '@supabase/postgrest-js';
31
- import { Moment } from 'moment';
15
+ import { T as TableDataAdapter, C as CapableDataAdapter, c as AdapterCapabilities, A as AdapterQueryResult, D as DataLayerContextValue } from './useDbCount-B5-Va9sg.js';
16
+ export { f as ADAPTER_STRATEGIES, i as AdapterAutoDetector, a as AdapterConfig, d as AdapterDependencies, b as AdapterFactory, g as AdapterRegistry, e as AdapterStrategyType, k as AutoDetectionResult, l as AutoDetectorOptions, m as BackendChangeListener, B as BackendStatus, a6 as DataLayerContext, a7 as DataLayerStatus, p as DatabaseTypes, P as PublicTableNames, R as ResolveRowType, S as SchemaNames, q as SchemaTableNames, r as TableIdentifier, I as UseAdvanceQueryOptions, J as UseAdvanceQueryResult, a4 as UseDbCountOptions, a5 as UseDbCountResult, a1 as UseDbInfiniteQueryOptions, a2 as UseDbInfiniteQueryResult, U as UseDbQueryOptions, s as UseDbQueryResult, j as createAdapterAutoDetector, h as createAdapterRegistry, x as useAdvanceQuery, u as useDataLayer, a3 as useDbCount, a3 as useDbCountV3, Z as useDbDeleteV3, a0 as useDbInfiniteQuery, a0 as useDbInfiniteQueryV3, K as useDbInsertV3, t as useDbQueryById, o as useDbQueryV3, N as useDbUpdateV3, W as useDbUpsertV3 } from './useDbCount-B5-Va9sg.js';
17
+ import * as react from 'react';
18
+ import { ReactNode, JSX } from 'react';
19
+ import { SupabaseClient } from '@supabase/supabase-js';
20
+ export { useOnlineStatus, useSyncControl, useSyncStatus } from './hooks/index.js';
21
+ export { S as SupabaseDatabaseTypes, a as SupabaseProvider, T as TypedSupabaseClient, U as UserSessionId, c as createNewSupabaseClient, u as default, o as onSupabaseInitialized, s as setDefaultOptions, t as typedSupabase, u as useSupabase } from './useSupabase-pPhUZHcl.js';
32
22
  import * as react_dropzone from 'react-dropzone';
33
23
  import { FileRejection, FileError } from 'react-dropzone';
34
24
  export { AnyPostgrestResponse, FilterDefinition, FilterDefinitions, FilterFn, NestedPath, OPERATOR_MAP, OperatorFn, OrderDefinition, Path, PostgrestFilter, PostgrestFilterOperator, PostgrestHasMorePaginationCacheData, PostgrestHasMorePaginationResponse, PostgrestPaginationCacheData, PostgrestPaginationResponse, PostgrestParser, PostgrestQueryParser, PostgrestQueryParserOptions, SUPPORTED_OPERATORS, ValueType, binarySearch, buildSortedComparator, denormalize, encodeObject, extractPathsFromFilters, filterFilterDefinitionsByPaths, findFilters, findIndexOrdered, findLastIndex, get, getTable, groupPathsRecursive, ifDateGetTime, isAndFilter, isAnyPostgrestResponse, isFilterDefinition, isISODateString, isNestedPath, isNotNull, isObject, isOrFilter, isPostgrestBuilder, isPostgrestHasMorePaginationCacheData, isPostgrestHasMorePaginationResponse, isPostgrestPaginationCacheData, isPostgrestPaginationResponse, parseOrderByKey, parseSelectParam, parseValue, removeAliasFromDeclaration, removeFirstPathElement, setFilterValue, sortSearchParams } from './parser/index.js';
25
+ export { G as GetResult, S as SelectQueryError } from './select-query-parser-CLkOKHzc.js';
35
26
  export { Accessory, Address, AdvanceQuery, AdvanceQueryNotificationSetting, AdvancedQueryView, BillableService, BillingDetails, CachedEmbedding, Changelog, ChangelogEntry, ChangelogMedia, ChargeTable, Circuit, Client, Comment, CommentReaction, CommentRead, CommentSection, CommentTag, CommonNote, CommonNoteCategory, CommonNoteSubCategory, ControlComponent, ControlComponentDatasheet, Controller, CoreSavedQuery, CoreSavedQueryAccess, Currency, CurrencyUsdConversion, DataExchangeImport, Datasheet, Dimension, DimmerModule, DimmerRack, Embedding, EquipmentConfigurationGroup, EquipmentFixture, EquipmentFixtureConfiguration, EquipmentFixtureConfigurationAccessoryEntry, EquipmentFixtureConfigurationControlComponentEntry, EquipmentFixtureCost, EquipmentFixtureDatasheet, EquipmentFixtureDimension, EquipmentFixtureDocument, EquipmentFixtureLampConfiguration, EquipmentFixtureListing, EquipmentFixtureMode, EquipmentFixtureModeChannel, EquipmentFixturePreset, EquipmentFixtureUnit, EquipmentFixtureUnitControl, EquipmentFixtureUnitLocation, EquipmentFixtureUnitLocationTag, EquipmentFixtureUnitLocationTagValue, EquipmentFixtureUnitPatternEntry, EquipmentFixtureWeight, EquipmentType, EquipmentUnitMediaContent, Expense, ExpenseLineItem, ExpenseReport, Fixture, FixtureCatalog, FixtureCatalogItem, FixtureCategory, FixtureTag, GlobalExpenseReport, HighlightServer, HighlightServerInstance, HighlightServerInstanceLog, HighlightServerInstanceOptions, HighlightServerInstanceStatus, HighlightServerRequest, Invoice, InvoiceSummaryTable, InvoiceTerm, InvoiceTermCondition, Lamp, LampCategory, LampCurrentListing, LampType, LicenseAssignment, Logo, Manufacturer, ManufacturerTag, ManufacturerToTag, OperationLog, OrderHinted, Organization, OrganizationUser, OrganizationUserAccess, ParameterMappingProfile, ParameterMappingProfileAssignment, Pattern, PaymentCustomer, PaymentInvoice, PaymentPaymentIntents, PaymentPlan, PaymentProduct, PaymentProductFeature, PaymentSubscription, PaymentSubscriptionPlan, PhaseActivityBucket, ProfileConfig as Profile, ProfileConfig, ProfileTimeBank, Project, ProjectDatabase, ProjectDatabaseEquipmentConfigurationGroup, ProjectDatabaseExcelParameterAssignment, ProjectDatabaseGroup, ProjectDatabaseParameterMappingProfile, ProjectDefaultRateByTitle, ProjectDocument, ProjectDocumentLineItem, PunchList, PunchListAccess, PunchListItem, PunchListItemAssignment, PunchListItemAttachedEntity, PunchListItemAttachment, PunchListItemCheckListItem, PunchListPage, PunchListPageAccess, PunchListUserOrderHint, QrCode, RetainageItem, RevitEquipmentUnitChange, RevitImport, RevitValueChangedEvent, Role, Service, ServiceCosts, ServiceStorageHourly, SmartCode, SmartCodeTag, Subtask, SystemBroadcastChannel, SystemBroadcastChannelThrottle, SystemConfiguration, SystemEmailNotification, SystemEvent, SystemEventListener, SystemEventWorker, SystemGlobalVariables, SystemHealthCheck, SystemInAppNotification, SystemLog, SystemMutedTopic, SystemNotification, SystemPushNotification, SystemSubscriber, SystemSupportAccess, SystemSupportTeam, SystemTask, SystemTaskAttempt, SystemTaskAttemptAccess, SystemTemp, SystemTicket, SystemTicketAttachment, SystemTicketComment, SystemTicketCommentAttachment, SystemUserPushTokens, Tag, Task, TaxCategory, Ticket, TicketAttachment, TicketComment, TicketCommentAttachment, TimeActivity, TimeBankTransaction, UserMetadata, UserTimesheet, WeeklyTimesheet, WorkEstimation, WorkEstimationLineItem, WorkingPhase, WorkingPhaseBillingItemDailySummary, WorkingPhaseBillingItemLatestSummary, WorkingPhaseCategory, WorkingPhaseDailySummary, WorkingPhaseRoleRate, WorkingPhaseSummary } from './gen/index.js';
36
- import * as react_jsx_runtime from 'react/jsx-runtime';
27
+ import 'moment';
28
+ import '@supabase-cache-helpers/postgrest-react-query';
29
+ import '@pol-studios/utils';
30
+ import '@supabase/functions-js';
31
+ import '@supabase/postgrest-js';
32
+ import 'react/jsx-runtime';
37
33
  import '@supabase/supabase-js/dist/module/lib/types.js';
38
34
 
39
- declare function setSupabaseUrl(url: string): void;
40
- declare function getSupabaseUrl(): string;
41
-
42
- type ItemType$5<T> = T extends Array<infer U> ? U : T;
43
- declare function useDbDelete<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 {
44
- Relationships: infer R;
45
- } ? R : unknown, RowResult extends object = GetResult<PublicSchema, Table["Row"], RelationName, Relationships, Query>>(relation: TableName | {
46
- table: TableName;
47
- schema: Schema;
48
- }, primaryKeys?: (keyof ItemType$5<RowResult> & string)[]): _tanstack_react_query.UseMutationResult<RowResult, Error, Partial<RowResult>, unknown>;
49
-
50
- type ItemType$4<T> = T extends Array<infer U> ? U : T;
51
- type MutationOption$2 = Parameters<typeof useInsertMutation>[3];
52
- declare function useDbInsert<TableName extends string & keyof PublicSchema["Tables"], Table extends PublicSchema["Tables"][TableName], Schema extends keyof Database = "public", ReturnQuery extends string | undefined = undefined, PublicSchema extends GenericSchema = Database[Extract<keyof Database, Schema>], RelationName = unknown, Relationships = Table extends {
53
- Relationships: infer R;
54
- } ? R : unknown, RowResult = ReturnQuery extends undefined ? null : GetResult<PublicSchema, Table["Row"], RelationName, Relationships, Extract<ReturnQuery, string>>, ResultInsert extends object = GetResult<PublicSchema, Table["Insert"], RelationName, Relationships, "*">>(relation: TableName | {
55
- table: TableName;
56
- schema: Schema;
57
- }, primaryKeys?: (keyof (ItemType$4<RowResult> | any) & string)[], query?: ReturnQuery, mutationOption?: MutationOption$2 & {
58
- crossOrganization?: boolean;
59
- }): _tanstack_react_query.UseMutationResult<RowResult, Error, ResultInsert, unknown>;
60
-
61
- type ItemType$3<T> = T extends Array<infer U> ? U : T;
62
- declare function useDbMultiDelete<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 {
63
- Relationships: infer R;
64
- } ? R : unknown, RowResult extends object = Omit<GetResult<PublicSchema, Table["Update"], RelationName, Relationships, Query>, "id">>(relation: TableName | {
65
- table: TableName;
66
- schema: Schema;
67
- }, primaryKeys?: (keyof ItemType$3<RowResult> & string)[]): _tanstack_react_query.UseMutationResult<RowResult, Error, RowResult | RowResult[], unknown>;
68
-
69
- type ItemType$2<T> = T extends Array<infer U> ? U : T;
70
- declare function useDbMultiUpsert<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 {
71
- Relationships: infer R;
72
- } ? R : unknown, RowResult extends object = GetResult<PublicSchema, Table["Row"], RelationName, Relationships, Query>, ResultInsert extends object = GetResult<PublicSchema, Table["Insert"], RelationName, Relationships, Query>, ResultUpdate extends object = Omit<GetResult<PublicSchema, Table["Update"], RelationName, Relationships, Query>, "id"> & {
73
- id: any;
74
- }>(relation: TableName | {
75
- table: TableName;
76
- schema: Schema;
77
- }, primaryKeys?: (keyof (ItemType$2<RowResult> | any) & string)[], query?: string): _tanstack_react_query.UseMutationResult<RowResult[], Error, (ResultInsert | ResultUpdate)[], unknown>;
78
-
79
- type UseDbPartialAdvanceQueryResult<T extends Record<string, any>> = ReturnType<typeof useDbPartialAdvanceQuery<T[]>>;
80
- declare function useDbPartialAdvanceQuery<Result extends Record<string, any>[]>(query: PromiseLike<PostgrestSingleResponse<Result>>, itemCountPerPage: number, config?: Omit<UseQueryOptions<PostgrestSingleResponse<Result>>, "queryKey" | "queryFn"> & {
81
- filterKey?: string;
82
- timeout?: number;
83
- }): [
84
- ReturnType<typeof useDbAdvanceFilterQuery<Result>>[0] & {
85
- currentPage: number;
86
- setCurrentPage: (value: React.SetStateAction<number>) => void;
87
- fetchNextPage: () => any;
88
- fetchPreviousPage: () => any;
89
- data: {
90
- Items: Result;
91
- CurrentPage: number;
92
- ItemCount: number;
93
- MaxCountPerPage: number;
94
- PageCount: number;
95
- };
96
- pageCount: number;
97
- hasNextPage: boolean;
98
- hasPreviousPage: boolean;
99
- count: number;
100
- },
101
- QueryState,
102
- React.Dispatch<React.SetStateAction<QueryState>>
103
- ];
104
-
105
- type UseDbPartialQueryResult<T extends Record<string, any>> = ReturnType<typeof useDbPartialQuery<T[]>>;
106
- declare function useDbPartialQuery<Result extends Record<string, any>[]>(query: PromiseLike<PostgrestSingleResponse<Result>>, itemCountPerPage: number, config?: Omit<UseQueryOptions<Result, PostgrestError>, "queryKey" | "queryFn">): {
107
- fetchPreviousPage: () => void;
108
- fetchNextPage: () => void;
109
- currentPage: number;
110
- setCurrentPage: react.Dispatch<react.SetStateAction<number>>;
111
- data: {
112
- Items: Result;
113
- CurrentPage: number;
114
- ItemCount: number;
115
- MaxCountPerPage: number;
116
- PageCount: number;
117
- };
118
- pageCount: number;
119
- hasNextPage: boolean;
120
- hasPreviousPage: boolean;
121
- error: PostgrestError;
122
- status: "error";
123
- isError: true;
124
- isPending: false;
125
- isSuccess: false;
126
- failureCount: number;
127
- failureReason: PostgrestError;
128
- isPaused: boolean;
129
- isLoading: false;
130
- isLoadingError: false;
131
- isRefetchError: true;
132
- isPlaceholderData: false;
133
- dataUpdatedAt: number;
134
- errorUpdatedAt: number;
135
- errorUpdateCount: number;
136
- isFetched: boolean;
137
- isFetchedAfterMount: boolean;
138
- isFetching: boolean;
139
- isInitialLoading: boolean;
140
- isRefetching: boolean;
141
- isStale: boolean;
142
- isEnabled: boolean;
143
- fetchStatus: _tanstack_react_query.FetchStatus;
144
- promise: Promise<Result>;
145
- refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<PostgrestSingleResponse<Result>, PostgrestError>>;
146
- count: number | null;
147
- } | {
148
- fetchPreviousPage: () => void;
149
- fetchNextPage: () => void;
150
- currentPage: number;
151
- setCurrentPage: react.Dispatch<react.SetStateAction<number>>;
152
- data: {
153
- Items: Result;
154
- CurrentPage: number;
155
- ItemCount: number;
156
- MaxCountPerPage: number;
157
- PageCount: number;
158
- };
159
- pageCount: number;
160
- hasNextPage: boolean;
161
- hasPreviousPage: boolean;
162
- error: null;
163
- status: "success";
164
- isError: false;
165
- isPending: false;
166
- isSuccess: true;
167
- failureCount: number;
168
- failureReason: PostgrestError;
169
- isPaused: boolean;
170
- isLoading: false;
171
- isLoadingError: false;
172
- isRefetchError: false;
173
- isPlaceholderData: false;
174
- dataUpdatedAt: number;
175
- errorUpdatedAt: number;
176
- errorUpdateCount: number;
177
- isFetched: boolean;
178
- isFetchedAfterMount: boolean;
179
- isFetching: boolean;
180
- isInitialLoading: boolean;
181
- isRefetching: boolean;
182
- isStale: boolean;
183
- isEnabled: boolean;
184
- fetchStatus: _tanstack_react_query.FetchStatus;
185
- promise: Promise<Result>;
186
- refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<PostgrestSingleResponse<Result>, PostgrestError>>;
187
- count: number | null;
188
- } | {
189
- fetchPreviousPage: () => void;
190
- fetchNextPage: () => void;
191
- currentPage: number;
192
- setCurrentPage: react.Dispatch<react.SetStateAction<number>>;
193
- data: {
194
- Items: Result;
195
- CurrentPage: number;
196
- ItemCount: number;
197
- MaxCountPerPage: number;
198
- PageCount: number;
199
- };
200
- pageCount: number;
201
- hasNextPage: boolean;
202
- hasPreviousPage: boolean;
203
- error: PostgrestError;
204
- status: "error";
205
- isError: true;
206
- isPending: false;
207
- isSuccess: false;
208
- failureCount: number;
209
- failureReason: PostgrestError;
210
- isPaused: boolean;
211
- isLoading: false;
212
- isLoadingError: true;
213
- isRefetchError: false;
214
- isPlaceholderData: false;
215
- dataUpdatedAt: number;
216
- errorUpdatedAt: number;
217
- errorUpdateCount: number;
218
- isFetched: boolean;
219
- isFetchedAfterMount: boolean;
220
- isFetching: boolean;
221
- isInitialLoading: boolean;
222
- isRefetching: boolean;
223
- isStale: boolean;
224
- isEnabled: boolean;
225
- fetchStatus: _tanstack_react_query.FetchStatus;
226
- promise: Promise<Result>;
227
- refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<PostgrestSingleResponse<Result>, PostgrestError>>;
228
- count: number | null;
229
- } | {
230
- fetchPreviousPage: () => void;
231
- fetchNextPage: () => void;
232
- currentPage: number;
233
- setCurrentPage: react.Dispatch<react.SetStateAction<number>>;
234
- data: {
235
- Items: Result;
236
- CurrentPage: number;
237
- ItemCount: number;
238
- MaxCountPerPage: number;
239
- PageCount: number;
240
- };
241
- pageCount: number;
242
- hasNextPage: boolean;
243
- hasPreviousPage: boolean;
244
- error: null;
245
- status: "pending";
246
- isError: false;
247
- isPending: true;
248
- isSuccess: false;
249
- failureCount: number;
250
- failureReason: PostgrestError;
251
- isPaused: boolean;
252
- isLoading: true;
253
- isLoadingError: false;
254
- isRefetchError: false;
255
- isPlaceholderData: false;
256
- dataUpdatedAt: number;
257
- errorUpdatedAt: number;
258
- errorUpdateCount: number;
259
- isFetched: boolean;
260
- isFetchedAfterMount: boolean;
261
- isFetching: boolean;
262
- isInitialLoading: boolean;
263
- isRefetching: boolean;
264
- isStale: boolean;
265
- isEnabled: boolean;
266
- fetchStatus: _tanstack_react_query.FetchStatus;
267
- promise: Promise<Result>;
268
- refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<PostgrestSingleResponse<Result>, PostgrestError>>;
269
- count: number | null;
270
- } | {
271
- fetchPreviousPage: () => void;
272
- fetchNextPage: () => void;
273
- currentPage: number;
274
- setCurrentPage: react.Dispatch<react.SetStateAction<number>>;
275
- data: {
276
- Items: Result;
277
- CurrentPage: number;
278
- ItemCount: number;
279
- MaxCountPerPage: number;
280
- PageCount: number;
281
- };
282
- pageCount: number;
283
- hasNextPage: boolean;
284
- hasPreviousPage: boolean;
285
- error: null;
286
- status: "pending";
287
- isError: false;
288
- isPending: true;
289
- isSuccess: false;
290
- failureCount: number;
291
- failureReason: PostgrestError;
292
- isPaused: boolean;
293
- isLoading: boolean;
294
- isLoadingError: false;
295
- isRefetchError: false;
296
- isPlaceholderData: false;
297
- dataUpdatedAt: number;
298
- errorUpdatedAt: number;
299
- errorUpdateCount: number;
300
- isFetched: boolean;
301
- isFetchedAfterMount: boolean;
302
- isFetching: boolean;
303
- isInitialLoading: boolean;
304
- isRefetching: boolean;
305
- isStale: boolean;
306
- isEnabled: boolean;
307
- fetchStatus: _tanstack_react_query.FetchStatus;
308
- promise: Promise<Result>;
309
- refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<PostgrestSingleResponse<Result>, PostgrestError>>;
310
- count: number | null;
311
- } | {
312
- fetchPreviousPage: () => void;
313
- fetchNextPage: () => void;
314
- currentPage: number;
315
- setCurrentPage: react.Dispatch<react.SetStateAction<number>>;
316
- data: {
317
- Items: Result;
318
- CurrentPage: number;
319
- ItemCount: number;
320
- MaxCountPerPage: number;
321
- PageCount: number;
322
- };
323
- pageCount: number;
324
- hasNextPage: boolean;
325
- hasPreviousPage: boolean;
326
- error: null;
327
- status: "success";
328
- isError: false;
329
- isPending: false;
330
- isSuccess: true;
331
- failureCount: number;
332
- failureReason: PostgrestError;
333
- isPaused: boolean;
334
- isLoading: false;
335
- isLoadingError: false;
336
- isRefetchError: false;
337
- isPlaceholderData: true;
338
- dataUpdatedAt: number;
339
- errorUpdatedAt: number;
340
- errorUpdateCount: number;
341
- isFetched: boolean;
342
- isFetchedAfterMount: boolean;
343
- isFetching: boolean;
344
- isInitialLoading: boolean;
345
- isRefetching: boolean;
346
- isStale: boolean;
347
- isEnabled: boolean;
348
- fetchStatus: _tanstack_react_query.FetchStatus;
349
- promise: Promise<Result>;
350
- refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<PostgrestSingleResponse<Result>, PostgrestError>>;
351
- count: number | null;
352
- };
353
-
354
- declare function useDbRealtime(key: string, query: string, table: string | {
355
- table: string;
356
- schema: string;
357
- }, primaryKeys: string[], options?: {
358
- filter?: string;
359
- enabled?: boolean;
360
- onChange?: (payload: RealtimePostgresChangesPayload<{
361
- [key: string]: any;
362
- }>) => any;
363
- }): "SUBSCRIBED" | "TIMED_OUT" | "CLOSED" | "CHANNEL_ERROR";
364
-
365
- type ConfigurationOptions<T> = {
366
- crossOrganization?: boolean;
367
- };
368
- type FilterOperator = "or" | "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "like" | "ilike" | "is" | "in" | "cs" | "cd" | "fts" | "plfts";
369
- type ValueType = number | string | boolean | null | Date | object;
370
- type FilterDefinition = {
371
- path: string;
372
- alias?: string;
373
- operator: FilterOperator;
374
- negate: boolean;
375
- value: ValueType;
376
- };
377
- type FilterDefinitions = (FilterComposite | FilterDefinition)[];
378
- type FilterComposite = {
379
- or?: FilterDefinitions;
380
- and?: FilterDefinitions;
381
- };
382
- type UseDbRealtimeQueryResult<T> = UseDbQuerySingleReturn<T> & {
383
- realtimeStatus: "SUBSCRIBED" | "TIMED_OUT" | "CLOSED" | "CHANNEL_ERROR" | "Loading...";
384
- isRealtimeConnected: boolean;
385
- isRealtimeLoading: boolean;
386
- };
387
- type DataType = Record<string, any>;
388
- declare function convertFilterToRealtimeQuery(filters: FilterDefinitions): string;
389
- declare function useDbRealtimeQuery<Result extends DataType>(query: PromiseLike<PostgrestSingleResponse<Result>>, config?: Omit<UseQueryOptions<PostgrestSingleResponse<Result>>, "queryKey" | "queryFn"> & ConfigurationOptions<Result>, primaryKeys?: (keyof ItemType$6<Result> & string)[]): UseDbRealtimeQueryResult<Result>;
390
-
391
- type ItemType$1<T> = T extends Array<infer U> ? U : T;
392
- type MutationOption$1 = Parameters<typeof useUpdateMutation>[3];
393
- declare function useDbUpdate<TableName extends string & keyof PublicSchema["Tables"], Table extends PublicSchema["Tables"][TableName], Schema extends keyof Database = "public", ReturnQuery extends string | undefined = undefined, PublicSchema extends GenericSchema = Database[Extract<keyof Database, Schema>], RelationName = unknown, Relationships = Table extends {
394
- Relationships: infer R;
395
- } ? R : unknown, RowResult = ReturnQuery extends undefined ? null : GetResult<PublicSchema, Table["Row"], RelationName, Relationships, Extract<ReturnQuery, string>>, ResultUpdate extends object = (Omit<GetResult<PublicSchema, Table["Update"], RelationName, Relationships, "*">, "id"> & {
396
- id: number;
397
- }) | Omit<GetResult<PublicSchema, Table["Update"], RelationName, Relationships, "*">, "id">>(relation: TableName | {
398
- table: TableName;
399
- schema: Schema;
400
- }, primaryKeys?: (keyof (ItemType$1<RowResult> | any) & string)[], query?: ReturnQuery, mutationOption?: MutationOption$1 & {
401
- crossOrganization?: boolean;
402
- }): _tanstack_react_query.UseMutationResult<RowResult, Error, ResultUpdate, unknown>;
403
-
404
35
  type RequestOptions = {
405
36
  onUploadProgress?: (bytesUploaded: number, bytesTotal: number) => any;
406
37
  };
@@ -416,177 +47,6 @@ declare function useDbAttachmentUpload(bucketId: string, options?: RequestOption
416
47
  onUploadProgress?: (bytesUploaded: number, bytesTotal: number) => any;
417
48
  } & FileOptions, unknown>;
418
49
 
419
- type ItemType<T> = T extends Array<infer U> ? U : T;
420
- type MutationOption = Parameters<typeof useUpdateMutation>[3];
421
- type useDbUpsertResponse = ReturnType<typeof useDbUpsert>;
422
- declare function useDbUpsert<TableName extends string & keyof PublicSchema["Tables"], Table extends PublicSchema["Tables"][TableName], Schema extends keyof Database = "public", ReturnQuery extends string | undefined = undefined, PublicSchema extends GenericSchema = Database[Extract<keyof Database, Schema>], RelationName = unknown, Relationships = Table extends {
423
- Relationships: infer R;
424
- } ? R : unknown, RowResult = ReturnQuery extends undefined ? null : GetResult<PublicSchema, Table["Row"], RelationName, Relationships, Extract<ReturnQuery, string>>, ResultInsert extends object = Omit<GetResult<PublicSchema, Table["Insert"], RelationName, Relationships, "*">, "id">, ResultUpdate extends object = Omit<GetResult<PublicSchema, Table["Update"], RelationName, Relationships, "*">, "id"> & {
425
- id?: any;
426
- }>(relation: TableName | {
427
- table: TableName;
428
- schema: Schema;
429
- }, primaryKeys?: (keyof (ItemType<RowResult> | any) & string)[], query?: ReturnQuery, mutationOption?: MutationOption & {
430
- crossOrganization?: boolean;
431
- }): _tanstack_react_query.UseMutationResult<RowResult, Error, ResultInsert | ResultUpdate, unknown>;
432
-
433
- interface UseMutationSuccessOptions {
434
- successMessage?: string;
435
- entityName?: string;
436
- enabled?: boolean;
437
- onSuccess?: () => void;
438
- }
439
- /**
440
- * Hook to automatically show success feedback after successful mutations
441
- * Works with both React Native and Web platforms
442
- */
443
- declare function useMutationSuccess<TData, TError, TVariables>(mutation: UseMutationResult<TData, TError, TVariables>, options?: UseMutationSuccessOptions): UseMutationResult<TData, TError, TVariables>;
444
- /**
445
- * Hook for React Native that uses native toast/alert system
446
- * @deprecated Use useMutationSuccess instead - it auto-detects platform
447
- */
448
- declare function useMutationSuccessRN<TData, TError, TVariables>(mutation: UseMutationResult<TData, TError, TVariables>, options?: UseMutationSuccessOptions): UseMutationResult<TData, TError, TVariables>;
449
-
450
- /**
451
- * V3 Data Layer - Supabase Adapter
452
- *
453
- * Implements the TableDataAdapter interface for direct Supabase/PostgREST queries.
454
- * This adapter is used for online-only data access without local caching.
455
- */
456
-
457
- /**
458
- * Adapter for querying Supabase directly via PostgREST API.
459
- *
460
- * This adapter:
461
- * - Queries Supabase directly (no local caching)
462
- * - Supports real-time subscriptions via Supabase Realtime
463
- * - Works only when online
464
- * - Uses Supabase's native select embedding for relations
465
- *
466
- * @example
467
- * ```typescript
468
- * const adapter = createSupabaseAdapter(supabaseClient, schema);
469
- *
470
- * // Query with relations
471
- * const result = await adapter.query<Project>("projects", {
472
- * select: "*, client:clients(*), tasks(*)",
473
- * where: { status: "active" },
474
- * orderBy: [{ field: "created_at", direction: "desc" }],
475
- * limit: 10
476
- * });
477
- * ```
478
- */
479
- declare class SupabaseAdapter implements TableDataAdapter, CapableDataAdapter {
480
- private supabase;
481
- private schema;
482
- readonly name = "supabase";
483
- readonly capabilities: AdapterCapabilities;
484
- constructor(supabase: SupabaseClient, schema: DatabaseSchema);
485
- /**
486
- * Parse a table identifier to extract schema and table name.
487
- * Handles schema-qualified names like "core.Profile" -> { schema: "core", tableName: "Profile" }
488
- *
489
- * @param table - The table name, optionally schema-qualified (e.g., "users" or "core.Profile")
490
- * @returns Object with schema (defaults to "public") and tableName
491
- */
492
- private parseTableIdentifier;
493
- /**
494
- * Execute a query and return results with optional count
495
- *
496
- * @param table - The table name to query
497
- * @param options - Query options (select, where, orderBy, limit, offset)
498
- * @returns Promise resolving to query results with optional count
499
- */
500
- query<T>(table: string, options: QueryOptions): Promise<AdapterQueryResult<T>>;
501
- /**
502
- * Query a single record by ID
503
- *
504
- * @param table - The table name to query
505
- * @param id - The record ID
506
- * @param options - Optional query options (mainly for select)
507
- * @returns Promise resolving to the record or null if not found
508
- */
509
- queryById<T>(table: string, id: string, options?: Pick<QueryOptions, "select">): Promise<T | null>;
510
- /**
511
- * Insert a new record
512
- *
513
- * @param table - The table name
514
- * @param data - The data to insert
515
- * @returns Promise resolving to the inserted record
516
- */
517
- insert<T>(table: string, data: Partial<T>): Promise<T>;
518
- /**
519
- * Update an existing record by ID
520
- *
521
- * @param table - The table name
522
- * @param id - The record ID to update
523
- * @param data - The data to update
524
- * @returns Promise resolving to the updated record
525
- */
526
- update<T>(table: string, id: string, data: Partial<T>): Promise<T>;
527
- /**
528
- * Upsert (insert or update) a record
529
- *
530
- * @param table - The table name
531
- * @param data - The data to upsert
532
- * @returns Promise resolving to the upserted record
533
- */
534
- upsert<T>(table: string, data: Partial<T>): Promise<T>;
535
- /**
536
- * Delete a record by ID
537
- *
538
- * @param table - The table name
539
- * @param id - The record ID to delete
540
- * @returns Promise that resolves when deletion is complete
541
- */
542
- delete(table: string, id: string): Promise<void>;
543
- /**
544
- * Subscribe to real-time changes on a query
545
- *
546
- * @param table - The table name to watch
547
- * @param options - Query options to filter what to watch
548
- * @param callback - Function called with updated data
549
- * @returns Unsubscribe function
550
- */
551
- subscribe<T>(table: string, options: QueryOptions, callback: (data: T[]) => void): () => void;
552
- /**
553
- * Apply where clause filters to a Supabase query
554
- *
555
- * Converts WhereClause to Supabase filter methods:
556
- * - Direct value: .eq(field, value)
557
- * - { in: [...] }: .in(field, values)
558
- * - { gt: n }: .gt(field, n)
559
- * - { gte: n }: .gte(field, n)
560
- * - { lt: n }: .lt(field, n)
561
- * - { lte: n }: .lte(field, n)
562
- * - { like: s }: .ilike(field, s)
563
- * - { is: null }: .is(field, null)
564
- * - { neq: v }: .neq(field, v) or .not(field, "is", null)
565
- * - { notIn: [...] }: .not().in(field, values)
566
- *
567
- * @param query - The Supabase query builder
568
- * @param where - The where clause to apply
569
- * @returns The query with filters applied
570
- */
571
- private applyWhereClause;
572
- }
573
- /**
574
- * Create a new SupabaseAdapter instance
575
- *
576
- * @param supabase - The Supabase client instance
577
- * @param schema - The database schema definition
578
- * @returns A new SupabaseAdapter instance
579
- *
580
- * @example
581
- * ```typescript
582
- * const adapter = createSupabaseAdapter(supabaseClient, databaseSchema);
583
- * const projects = await adapter.query<Project>("projects", {
584
- * where: { status: "active" }
585
- * });
586
- * ```
587
- */
588
- declare function createSupabaseAdapter(supabase: SupabaseClient, schema: DatabaseSchema): SupabaseAdapter;
589
-
590
50
  /**
591
51
  * PowerSync Adapter
592
52
  *
@@ -854,217 +314,6 @@ interface DataLayerProviderProps {
854
314
  */
855
315
  declare function DataLayerProvider({ config, children, powerSyncInstance, supabaseClient, queryClient, onInitialized, onError, }: DataLayerProviderProps): JSX.Element;
856
316
 
857
- declare function useSupabaseFunction(): {
858
- downloadFunctionResponse: (functionName: string, body?: any, name?: string) => Promise<void>;
859
- };
860
-
861
- declare function getErrorBody(response: FunctionsResponse<any>): Promise<any>;
862
-
863
- interface AIOptions {
864
- maxTokens?: number;
865
- temperature?: number;
866
- }
867
- interface AIResponse {
868
- success: boolean;
869
- data?: {
870
- response: string;
871
- };
872
- error?: string;
873
- }
874
- declare function useAI(): {
875
- generate: (prompt: string, context: Record<string, any>, options?: AIOptions) => Promise<string>;
876
- };
877
-
878
- interface ExtractedReceipt {
879
- merchantName: string;
880
- transactionDate: string | null;
881
- currency: string;
882
- subtotal: number | null;
883
- tax: number | null;
884
- total: number;
885
- lineItems: Array<{
886
- description: string;
887
- amount: number;
888
- quantity: number | null;
889
- suggestedCategory: string | null;
890
- }>;
891
- confidence: number;
892
- notes: string | null;
893
- }
894
- interface PendingExpense {
895
- id: string;
896
- file: File;
897
- status: "processing" | "ready" | "error" | "confirming";
898
- extractedData: ExtractedReceipt | null;
899
- error: string | null;
900
- duplicateWarning?: {
901
- existingExpenseId: number;
902
- reason: string;
903
- };
904
- }
905
- interface BatchAnalysisProgress {
906
- total: number;
907
- completed: number;
908
- processing: string[];
909
- }
910
- interface RecentExpenseContext {
911
- merchantName: string;
912
- category: string | null;
913
- amount: number;
914
- }
915
- interface UseReceiptAIOptions {
916
- recentExpenses?: RecentExpenseContext[];
917
- taxCategories?: Tables<"TaxCategory">[];
918
- }
919
- declare function useReceiptAI(options?: UseReceiptAIOptions): {
920
- analyzeReceipt: (file: File) => Promise<ExtractedReceipt | null>;
921
- analyzeMultipleReceipts: (files: File[], onProgress?: (progress: BatchAnalysisProgress) => void, onItemComplete?: (item: PendingExpense) => void) => Promise<PendingExpense[]>;
922
- isAnalyzing: boolean;
923
- batchProgress: BatchAnalysisProgress;
924
- error: string;
925
- extractedData: ExtractedReceipt;
926
- reset: () => void;
927
- };
928
-
929
- interface ServerAvailabilityState {
930
- isAvailable: boolean | null;
931
- isChecking: boolean;
932
- lastChecked: Date | null;
933
- error: Error | null;
934
- }
935
- /**
936
- * Hook to check if the Supabase server is available.
937
- * Performs periodic health checks and provides availability state.
938
- * Works without requiring Supabase context, making it safe to use at app initialization.
939
- */
940
- declare function useServerAvailability(options?: {
941
- enabled?: boolean;
942
- checkInterval?: number;
943
- timeout?: number;
944
- }): ServerAvailabilityState & {
945
- checkAvailability: () => Promise<void>;
946
- };
947
-
948
- declare function useSearchQuery<Result>(baseQuery: PromiseLike<PostgrestSingleResponse$1<Result>>, searchText: string, columns: ((string & keyof Result) | string)[], options?: {
949
- isOptional: boolean;
950
- additionCondition: (string | undefined)[];
951
- }): PromiseLike<PostgrestSingleResponse$1<Result>>;
952
-
953
- type PublicSchema$2 = Database[Extract<keyof Database, "public">];
954
- type TableRow<T> = T extends {
955
- Row: infer R extends Record<string, unknown>;
956
- } ? R : Record<string, unknown>;
957
- declare function useLiveChangeTracking<Relation extends GenericTable, TableName extends string & keyof PublicSchema$2["Tables"], Table extends PublicSchema$2["Tables"][TableName] = PublicSchema$2["Tables"][TableName], Query extends string = "*", RelationName = unknown, Relationships = Table extends {
958
- Relationships: infer R;
959
- } ? R : unknown, TItem = GetResult<PublicSchema$2, TableRow<Table>, RelationName, Relationships, Query>>(tableName: TableName, item: TItem, action?: (updates: Partial<TItem>, changeLog: DbChangeLog) => any): DbChangeLog;
960
-
961
- declare function useLatestOperationLog(tableName: string, recordId: number): UseDbQuerySingleReturn<unknown>;
962
-
963
- type PublicSchema$1 = Database[Extract<keyof Database, "public">];
964
- type TimeActivity = any;
965
- declare function newTimeActivity(date: Moment): TimeActivity;
966
- type AutosaveOptions<T> = UpdateOptions<T> & {
967
- delay: number;
968
- primaryKeys?: string[];
969
- transformBeforeMutation?: (item: T) => Partial<T>;
970
- };
971
- type UpdateOptions<T> = Partial<UseMutationOptions<T, Error, T, unknown>> & {
972
- updateCache?: boolean;
973
- };
974
- /**
975
- * Hook for managing autosave state with proper entity switching support.
976
- *
977
- * This hook provides three main functions:
978
- * 1. `updateValue` - For making changes to the current entity (with autosave)
979
- * 2. `setNewEntity` - For switching to a completely different entity (saves previous entity first)
980
- * 3. `setValue` - For setting a value without triggering autosave or change tracking
981
- *
982
- * @example
983
- * ```tsx
984
- * const [value, updateValue, mutation, setValue, setNewEntity] = useAutosaveState(
985
- * 'time_activities',
986
- * defaultTimeActivity,
987
- * {
988
- * delay: 500,
989
- * transformBeforeMutation: (item) => omitFields(item, ['computedField', 'uiOnlyField'])
990
- * }
991
- * );
992
- *
993
- * // For making changes to current entity (autosaves after delay)
994
- * updateValue(prev => ({ ...prev, description: 'New description' }));
995
- *
996
- * // For switching to a different entity (saves current entity first)
997
- * setNewEntity(differentTimeActivity);
998
- * ```
999
- */
1000
- declare function useAutosaveState<T extends TItem & {
1001
- id: number;
1002
- }, TableName extends string & keyof PublicSchema$1["Tables"] = any, Table extends PublicSchema$1["Tables"][TableName] = any, Query extends string = "*", RelationName = unknown, Relationships = Table extends {
1003
- Relationships: infer R;
1004
- } ? R : unknown, TItem = Omit<GetResult<PublicSchema$1, Table extends {
1005
- Row: infer R;
1006
- } ? R extends Record<string, unknown> ? R : any : any, RelationName, Relationships, Query>, "id"> & {
1007
- id: number;
1008
- }>(relation: TableName, defaultValue: T, options?: AutosaveOptions<T>): [
1009
- T,
1010
- React.Dispatch<React.SetStateAction<T>>,
1011
- UseMutationResult<PostgrestSingleResponse<T>, Error, T, unknown>,
1012
- React.Dispatch<React.SetStateAction<T>>,
1013
- (newEntity: T) => void,
1014
- () => Promise<void>
1015
- ];
1016
-
1017
- declare function useToastError<T>(mutation: useDbUpsertResponse): UseMutationResult<unknown, Error, object, unknown>;
1018
-
1019
- declare function executeAdvanceQuery<Result>(supabase: any, query: PromiseLike<PostgrestSingleResponse<Result>>, filterLayer: QueryState): Promise<{
1020
- data: any;
1021
- count: number | null;
1022
- error: any;
1023
- }>;
1024
-
1025
- type CustomPageQueryResult<T extends Record<string, any>[]> = ReturnType<typeof useDbPartialQuery<T>>;
1026
-
1027
- type Attachment = {
1028
- bucketId: string;
1029
- path: string;
1030
- };
1031
- declare function useStorageUrl(): {
1032
- fetchUrl: (entity: {
1033
- bucketId: string;
1034
- path: string;
1035
- }, options?: {
1036
- download?: string | boolean;
1037
- transform?: TransformOptions;
1038
- }) => Promise<string>;
1039
- fetchUrls: (entities: Attachment[], options?: {
1040
- download?: string | boolean;
1041
- transform?: TransformOptions;
1042
- }) => Promise<Map<string, string | undefined>>;
1043
- prefetchImage: (entity: Attachment, options?: {
1044
- download?: string | boolean;
1045
- transform?: TransformOptions;
1046
- }) => Promise<void>;
1047
- fetchPublicUrl: (entity: {
1048
- bucketId: string;
1049
- path: string;
1050
- }, options?: {
1051
- download?: string | boolean;
1052
- transform?: TransformOptions;
1053
- }) => Promise<string>;
1054
- expireCache: (entity: {
1055
- bucketId: string;
1056
- path: string;
1057
- }) => Promise<void>;
1058
- getCacheVersion: (entity: {
1059
- bucketId: string;
1060
- path: string;
1061
- }) => number;
1062
- subscribeToCacheVersion: (entity: {
1063
- bucketId: string;
1064
- path: string;
1065
- }, callback: () => void) => () => void;
1066
- };
1067
-
1068
317
  interface FileWithPreview extends File {
1069
318
  preview?: string;
1070
319
  errors: readonly FileError[];
@@ -1142,86 +391,6 @@ declare const useSupabaseUpload: (options: UseSupabaseUploadOptions) => {
1142
391
  allowedMimeTypes: string[];
1143
392
  };
1144
393
 
1145
- /**
1146
- * Metadata stored in storage.objects.metadata JSONB column
1147
- */
1148
- interface StorageObjectMetadata {
1149
- processingStatus: "None" | "Processing" | "Error";
1150
- contentType: string;
1151
- contentHeight?: number;
1152
- contentWidth?: number;
1153
- originalFileName?: string;
1154
- legacyAttachmentId?: number;
1155
- }
1156
- type UseStoragePathOptions = {
1157
- /** Whether to fetch metadata from storage.objects (default: true) */
1158
- fetchMetadata?: boolean;
1159
- /** Transform options for the URL */
1160
- transform?: {
1161
- width?: number;
1162
- height?: number;
1163
- quality?: number;
1164
- format?: "origin";
1165
- };
1166
- /** Whether to get a download URL */
1167
- download?: string | boolean;
1168
- };
1169
- type UseStoragePathResult = {
1170
- /** Signed URL for the storage object */
1171
- url: string | null;
1172
- /** Metadata from storage.objects.metadata JSONB */
1173
- metadata: StorageObjectMetadata | null;
1174
- /** Content type (from metadata or inferred from path) */
1175
- contentType: string;
1176
- /** Whether the URL or metadata is still loading */
1177
- isLoading: boolean;
1178
- /** Error if URL fetch failed */
1179
- error: Error | null;
1180
- };
1181
- /**
1182
- * Hook to get a signed URL and metadata for a storage path.
1183
- * Replaces useAttachment for the path-based storage approach.
1184
- *
1185
- * @param storagePath - The path within the bucket (e.g., "14/abc-123.jpg")
1186
- * @param bucketId - The storage bucket ID
1187
- * @param options - Optional configuration
1188
- *
1189
- * @example
1190
- * ```tsx
1191
- * const { url, contentType, isLoading } = useStoragePath(
1192
- * profile.profilePath,
1193
- * 'attachments'
1194
- * );
1195
- *
1196
- * if (isLoading) return <Spinner />;
1197
- * return <img src={url} />;
1198
- * ```
1199
- */
1200
- declare function useStoragePath(storagePath: string | undefined | null, bucketId: string, options?: UseStoragePathOptions): UseStoragePathResult;
1201
-
1202
- /**
1203
- * Storage bucket names for Supabase storage.
1204
- * Use these constants when calling storage APIs.
1205
- */
1206
- declare const BUCKETS: {
1207
- readonly AVATARS: "avatars";
1208
- readonly FIXTURE_CATALOG_COVER: "fixture-catalog-cover";
1209
- readonly FIXTURE_ATTACHMENTS: "fixture-attachments";
1210
- readonly UNIT_DOCUMENTATION: "unit-documentation-attachments";
1211
- readonly DATASHEETS: "datasheets";
1212
- readonly PATTERNS: "patterns";
1213
- readonly LOGOS: "logos";
1214
- readonly RECEIPTS: "receipts";
1215
- readonly TICKET_ATTACHMENTS: "ticket-attachment";
1216
- readonly PROCESS_RESULTS: "process-results";
1217
- readonly DATA_EXCHANGE_IMPORTS: "data-exchange-imports";
1218
- readonly EMAIL_TEMPLATES: "email-templates";
1219
- readonly EMAIL_TEMPLATES_ASSETS: "email-templates-assets";
1220
- };
1221
- type BucketName = (typeof BUCKETS)[keyof typeof BUCKETS];
1222
-
1223
- declare function createInCondition(column: string, values: (string | number)[]): string;
1224
-
1225
394
  /**
1226
395
  * Platform-aware network status utility
1227
396
  *
@@ -1261,226 +430,4 @@ declare function subscribeToNetworkChanges(callback: (isOnline: boolean) => void
1261
430
  */
1262
431
  declare function initializeNetworkMonitoring(): Promise<void>;
1263
432
 
1264
- declare const TIMEOUT_ERROR_MESSAGE = "Request timed out";
1265
- declare const DEFAULT_QUERY_TIMEOUT = 15000;
1266
- declare function isTimeoutError(error: Error | null | undefined): boolean;
1267
-
1268
- interface AlertProps {
1269
- title: string;
1270
- description: string;
1271
- }
1272
- interface Context {
1273
- lastModifiedUserName: string;
1274
- changeLog: DbChangeLog;
1275
- }
1276
- declare const LiveChangeContext: react.Context<Context>;
1277
- declare const LiveChangeContextProvider: ({ children, changeLog, }: {
1278
- children: ReactNode;
1279
- changeLog: DbChangeLog;
1280
- }) => react_jsx_runtime.JSX.Element;
1281
-
1282
- /**
1283
- * Upsert a changelog (create or update)
1284
- */
1285
- declare const useUpsertChangelog: () => _tanstack_react_query.UseMutationResult<any, Error, Omit<any, "id"> | (Omit<any, "id"> & {
1286
- id?: any;
1287
- }), unknown>;
1288
- /**
1289
- * Delete a changelog
1290
- * Note: Cascade delete will remove all associated entries and media
1291
- */
1292
- declare const useDeleteChangelog: () => _tanstack_react_query.UseMutationResult<any, Error, Partial<any>, unknown>;
1293
- /**
1294
- * Upsert a changelog entry (create or update)
1295
- */
1296
- declare const useUpsertChangelogEntry: () => _tanstack_react_query.UseMutationResult<any, Error, Omit<any, "id"> | (Omit<any, "id"> & {
1297
- id?: any;
1298
- }), unknown>;
1299
- /**
1300
- * Upsert multiple changelog entries at once
1301
- */
1302
- declare const useMultiUpsertChangelogEntries: () => _tanstack_react_query.UseMutationResult<any[], Error, any[], unknown>;
1303
- /**
1304
- * Delete a changelog entry
1305
- * Note: Cascade delete will remove all associated media
1306
- */
1307
- declare const useDeleteChangelogEntry: () => _tanstack_react_query.UseMutationResult<any, Error, Partial<any>, unknown>;
1308
- /**
1309
- * Delete multiple changelog entries at once
1310
- */
1311
- declare const useMultiDeleteChangelogEntries: () => _tanstack_react_query.UseMutationResult<Omit<any, "id">, Error, Omit<any, "id"> | Omit<any, "id">[], unknown>;
1312
- /**
1313
- * Upsert changelog media (create or update)
1314
- */
1315
- declare const useUpsertChangelogMedia: () => _tanstack_react_query.UseMutationResult<any, Error, Omit<any, "id"> | (Omit<any, "id"> & {
1316
- id?: any;
1317
- }), unknown>;
1318
- /**
1319
- * Delete changelog media
1320
- */
1321
- declare const useDeleteChangelogMedia: () => _tanstack_react_query.UseMutationResult<any, Error, Partial<any>, unknown>;
1322
- /**
1323
- * Upload media file for changelog entry
1324
- * Just returns a simple upload function - caller handles creating ChangelogMedia records
1325
- */
1326
- declare const useUploadChangelogMedia: () => {
1327
- mutateAsync: () => Promise<{
1328
- path: string;
1329
- publicUrl: string;
1330
- }>;
1331
- };
1332
-
1333
- /**
1334
- * Fetch all changelogs with their entries and media
1335
- * Ordered by release date (newest first)
1336
- */
1337
- declare const useChangelogs: (options?: {
1338
- realtime?: boolean;
1339
- }) => (Omit<_tanstack_react_query.QueryObserverRefetchErrorResult<any[], _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_tanstack_react_query.UseQueryResult<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, "count"> & {
1340
- data: any[];
1341
- count?: number | null;
1342
- }) | (Omit<_tanstack_react_query.QueryObserverSuccessResult<any[], _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_tanstack_react_query.UseQueryResult<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, "count"> & {
1343
- data: any[];
1344
- count?: number | null;
1345
- }) | (Omit<_tanstack_react_query.QueryObserverLoadingErrorResult<any[], _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_tanstack_react_query.UseQueryResult<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, "count"> & {
1346
- data: any[];
1347
- count?: number | null;
1348
- }) | (Omit<_tanstack_react_query.QueryObserverPendingResult<any[], _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_tanstack_react_query.UseQueryResult<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, "count"> & {
1349
- data: any[];
1350
- count?: number | null;
1351
- }) | (Omit<_tanstack_react_query.QueryObserverPlaceholderResult<any[], _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_tanstack_react_query.UseQueryResult<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, "count"> & {
1352
- data: any[];
1353
- count?: number | null;
1354
- });
1355
- /**
1356
- * Fetch published changelogs only
1357
- */
1358
- declare const usePublishedChangelogs: (options?: {
1359
- realtime?: boolean;
1360
- }) => (Omit<_tanstack_react_query.QueryObserverRefetchErrorResult<any[], _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_tanstack_react_query.UseQueryResult<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, "count"> & {
1361
- data: any[];
1362
- count?: number | null;
1363
- }) | (Omit<_tanstack_react_query.QueryObserverSuccessResult<any[], _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_tanstack_react_query.UseQueryResult<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, "count"> & {
1364
- data: any[];
1365
- count?: number | null;
1366
- }) | (Omit<_tanstack_react_query.QueryObserverLoadingErrorResult<any[], _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_tanstack_react_query.UseQueryResult<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, "count"> & {
1367
- data: any[];
1368
- count?: number | null;
1369
- }) | (Omit<_tanstack_react_query.QueryObserverPendingResult<any[], _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_tanstack_react_query.UseQueryResult<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, "count"> & {
1370
- data: any[];
1371
- count?: number | null;
1372
- }) | (Omit<_tanstack_react_query.QueryObserverPlaceholderResult<any[], _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_tanstack_react_query.UseQueryResult<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, _supabase_postgrest_js.PostgrestError>, "refetch"> & Pick<_supabase_postgrest_js.PostgrestSingleResponse<any[]>, "count"> & {
1373
- data: any[];
1374
- count?: number | null;
1375
- });
1376
- /**
1377
- * Fetch a single changelog by ID
1378
- */
1379
- declare const useChangelogById: (id: string | undefined) => UseDbQuerySingleReturn<any>;
1380
- /**
1381
- * Fetch a single changelog by slug
1382
- */
1383
- declare const useChangelogBySlug: (slug: string | undefined) => UseDbQuerySingleReturn<any>;
1384
- /**
1385
- * Fetch changelog entries for a specific changelog
1386
- */
1387
- declare const useChangelogEntries: (changelogId: string | undefined) => UseDbQuerySingleReturn<any[]>;
1388
- /**
1389
- * Fetch media for a specific changelog entry
1390
- */
1391
- declare const useChangelogMedia: (entryId: string | undefined) => UseDbQuerySingleReturn<any[]>;
1392
-
1393
- interface FeedbackListItem {
1394
- id: number;
1395
- userId: string | null;
1396
- table: string | null;
1397
- schema: string;
1398
- memoryType: string;
1399
- resolved: boolean;
1400
- resolvedAt: string | null;
1401
- resolvedBy: string | null;
1402
- createdAt: string;
1403
- updatedAt: string;
1404
- data: {
1405
- query: string;
1406
- queryHash?: string;
1407
- status?: "success" | "failure" | "needs_review" | "cache_hit";
1408
- statusMessage?: string;
1409
- confidence?: number;
1410
- filters?: any;
1411
- sql?: string;
1412
- sqlError?: string;
1413
- agentDecisions?: any;
1414
- context?: any;
1415
- trace?: any;
1416
- corrections?: {
1417
- domainTerm?: string;
1418
- domainFieldPath?: string;
1419
- fieldPath?: string;
1420
- filters?: any;
1421
- };
1422
- feedback?: string;
1423
- modelUsed?: string;
1424
- reasoningEffort?: "minimal" | "medium" | "high";
1425
- performance?: any;
1426
- resultCount?: number;
1427
- };
1428
- }
1429
- interface FeedbackListParams {
1430
- resolved?: boolean;
1431
- status?: string;
1432
- limit?: number;
1433
- offset?: number;
1434
- userId?: string;
1435
- startDate?: string;
1436
- endDate?: string;
1437
- }
1438
- declare function useFeedbackList(params?: FeedbackListParams): _tanstack_react_query.UseQueryResult<{
1439
- success: boolean;
1440
- data: FeedbackListItem[];
1441
- pagination: {
1442
- limit: number;
1443
- offset: number;
1444
- total: number;
1445
- };
1446
- }, Error>;
1447
-
1448
- interface SubmitFeedbackParams {
1449
- memoryId?: number;
1450
- query: string;
1451
- table: string;
1452
- schema?: string;
1453
- status?: "success" | "failure" | "needs_review";
1454
- corrections?: {
1455
- domainTerm?: string;
1456
- domainFieldPath?: string;
1457
- fieldPath?: string;
1458
- filters?: any;
1459
- };
1460
- feedback?: string;
1461
- }
1462
- declare function useSubmitFeedback(): _tanstack_react_query.UseMutationResult<{
1463
- success: boolean;
1464
- data: any;
1465
- }, Error, SubmitFeedbackParams, unknown>;
1466
-
1467
- declare function useApplyFeedback(): _tanstack_react_query.UseMutationResult<{
1468
- success: boolean;
1469
- data: any;
1470
- learningResults: Array<{
1471
- type: string;
1472
- id: number;
1473
- action: string;
1474
- }>;
1475
- }, Error, number, unknown>;
1476
-
1477
- declare function useResolveFeedback(): _tanstack_react_query.UseMutationResult<{
1478
- success: boolean;
1479
- data: any;
1480
- learningResults: Array<{
1481
- type: string;
1482
- id: number;
1483
- }>;
1484
- }, Error, number, unknown>;
1485
-
1486
- export { type AIOptions, type AIResponse, AdapterCapabilities, AdapterQueryResult, type AlertProps, BUCKETS, type BatchAnalysisProgress, type BucketName, CapableDataAdapter, type CustomPageQueryResult, DEFAULT_QUERY_TIMEOUT, DataLayerConfig, DataLayerContextValue, DataLayerProvider, type DataLayerProviderProps, DatabaseSchema, DbChangeLog, type ExtractedReceipt, type FeedbackListItem, type FeedbackListParams, GenericSchema, GenericTable, GetResult, LiveChangeContext, LiveChangeContextProvider, type MutationOption, type PendingExpense, PowerSyncAdapter, PowerSyncDatabase$1 as PowerSyncDatabase, QueryExecutor, QueryOptions, QueryState, type ServerAvailabilityState, type StorageObjectMetadata, type SubmitFeedbackParams, SupabaseAdapter, TIMEOUT_ERROR_MESSAGE, TableDataAdapter, Tables, type UpdateOptions, type UseDbPartialAdvanceQueryResult, type UseDbPartialQueryResult, UseDbQuerySingleReturn, type UseDbRealtimeQueryResult, type UseMutationSuccessOptions, type UseSupabaseUploadOptions, type UseSupabaseUploadReturn, convertFilterToRealtimeQuery, createInCondition, createPowerSyncAdapter, createSupabaseAdapter, executeAdvanceQuery, getErrorBody, getOnlineStatus, getOnlineStatusSync, getSupabaseUrl, initializeNetworkMonitoring, isReactNative, isTimeoutError, newTimeActivity, sanitizeStorageKey, setSupabaseUrl, subscribeToNetworkChanges, useAI, useApplyFeedback, useAutosaveState, useChangelogById, useChangelogBySlug, useChangelogEntries, useChangelogMedia, useChangelogs, useDbAdvanceFilterQuery, useDbAdvanceFilterQuery as useDbAdvanceQuery, useDbDelete, useDbInsert, useDbMultiDelete, useDbMultiUpsert, useDbPartialAdvanceQuery, useDbPartialQuery, useDbRealtime, useDbRealtimeQuery, useDbUpdate, useDbAttachmentUpload as useDbUpload, useDbUpsert, type useDbUpsertResponse, useDbDelete as useDelete, useDeleteChangelog, useDeleteChangelogEntry, useDeleteChangelogMedia, useFeedbackList, useDbInsert as useInsert, useLatestOperationLog, useLiveChangeTracking, useMultiDeleteChangelogEntries, useMultiUpsertChangelogEntries, useMutationSuccess, useMutationSuccessRN, usePublishedChangelogs, useDbRealtime as useRealtime, useDbRealtimeQuery as useRealtimeQuery, useReceiptAI, useResolveFeedback, useSearchQuery, useServerAvailability, useStoragePath, useStorageUrl, useSubmitFeedback, useSupabaseFunction, useSupabaseUpload, useToastError, useDbUpdate as useUpdate, useUploadChangelogMedia, useDbUpsert as useUpsert, useUpsertChangelog, useUpsertChangelogEntry, useUpsertChangelogMedia };
433
+ export { AdapterCapabilities, AdapterQueryResult, CapableDataAdapter, DataLayerConfig, DataLayerContextValue, DataLayerProvider, type DataLayerProviderProps, DatabaseSchema, PowerSyncAdapter, PowerSyncDatabase$1 as PowerSyncDatabase, QueryExecutor, QueryOptions, TableDataAdapter, type UseSupabaseUploadOptions, type UseSupabaseUploadReturn, createPowerSyncAdapter, getOnlineStatus, getOnlineStatusSync, initializeNetworkMonitoring, isReactNative, sanitizeStorageKey, subscribeToNetworkChanges, useDbAttachmentUpload as useDbUpload, useSupabaseUpload };