@pol-studios/db 1.0.19 → 1.0.22
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/DataLayerContext-ZmLPYR_s.d.ts +825 -0
- package/dist/EntityPermissions-DwFt4tUd.d.ts +35 -0
- package/dist/FilterConfig-Bt2Ek74z.d.ts +99 -0
- package/dist/UserMetadataContext-B8gVWGMl.d.ts +35 -0
- package/dist/UserMetadataContext-DntmpK41.d.ts +33 -0
- package/dist/auth/context.d.ts +48 -0
- package/dist/auth/context.js +2 -2
- package/dist/auth/guards.d.ts +180 -0
- package/dist/auth/hooks.d.ts +312 -0
- package/dist/auth/hooks.js +3 -3
- package/dist/auth/index.d.ts +11 -0
- package/dist/auth/index.js +3 -3
- package/dist/{chunk-2T6WTCP4.js → chunk-3EVWXMUV.js} +54 -155
- package/dist/chunk-3EVWXMUV.js.map +1 -0
- package/dist/{chunk-YERWPV6B.js → chunk-3FHAKRDV.js} +145 -19
- package/dist/{chunk-YERWPV6B.js.map → chunk-3FHAKRDV.js.map} +1 -1
- package/dist/{chunk-X3HZLNBV.js → chunk-FKRACEHV.js} +2 -962
- package/dist/chunk-FKRACEHV.js.map +1 -0
- package/dist/{chunk-N26IEHZT.js → chunk-FZF26ZRB.js} +18 -2
- package/dist/{chunk-N26IEHZT.js.map → chunk-FZF26ZRB.js.map} +1 -1
- package/dist/chunk-HTJ2FQW5.js +963 -0
- package/dist/chunk-HTJ2FQW5.js.map +1 -0
- package/dist/{chunk-R5B2XMN5.js → chunk-I4BDZDHX.js} +1614 -2141
- package/dist/chunk-I4BDZDHX.js.map +1 -0
- package/dist/{chunk-36DVUMQD.js → chunk-LPC64MD4.js} +2 -2
- package/dist/{chunk-72WV3ALS.js → chunk-OUUQSI3Y.js} +2 -2
- package/dist/{chunk-RMRYGICS.js → chunk-WP6TIVPH.js} +4 -4
- package/dist/client/index.d.ts +16 -0
- package/dist/core/index.d.ts +568 -0
- package/dist/database.types-ChFCG-4M.d.ts +8604 -0
- package/dist/executor-CB4KHyYG.d.ts +507 -0
- package/dist/gen/index.d.ts +1099 -0
- package/dist/hooks/index.d.ts +119 -0
- package/dist/hooks/index.js +1 -1
- package/dist/index-2YySlz7X.d.ts +433 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +14 -95
- package/dist/index.native.d.ts +775 -0
- package/dist/index.native.js +17 -96
- package/dist/index.web.d.ts +438 -0
- package/dist/index.web.js +585 -46
- package/dist/index.web.js.map +1 -1
- package/dist/mutation/index.d.ts +58 -0
- package/dist/parser/index.d.ts +366 -0
- package/dist/powersync-bridge/index.d.ts +284 -0
- package/dist/powersync-bridge/index.js +1 -1
- package/dist/query/index.d.ts +723 -0
- package/dist/query/index.js +10 -8
- package/dist/realtime/index.d.ts +44 -0
- package/dist/select-query-parser-BwyHum1L.d.ts +352 -0
- package/dist/setupAuthContext-Kv-THH-h.d.ts +61 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types-CYr9JiUE.d.ts +62 -0
- package/dist/useBatchUpsert-9OYjibLh.d.ts +24 -0
- package/dist/useDbCount-s-aR9YeV.d.ts +1082 -0
- package/dist/useDbQuery-C-TL8jY1.d.ts +19 -0
- package/dist/useReceiptAI-6HkRpRml.d.ts +58 -0
- package/dist/useResolveFeedback-DTGcHpCs.d.ts +882 -0
- package/dist/useSupabase-DvWVuHHE.d.ts +28 -0
- package/dist/with-auth/index.d.ts +704 -0
- package/dist/with-auth/index.js +4 -4
- package/package.json +50 -1
- package/dist/chunk-2T6WTCP4.js.map +0 -1
- package/dist/chunk-R5B2XMN5.js.map +0 -1
- package/dist/chunk-X3HZLNBV.js.map +0 -1
- /package/dist/{chunk-36DVUMQD.js.map → chunk-LPC64MD4.js.map} +0 -0
- /package/dist/{chunk-72WV3ALS.js.map → chunk-OUUQSI3Y.js.map} +0 -0
- /package/dist/{chunk-RMRYGICS.js.map → chunk-WP6TIVPH.js.map} +0 -0
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
export { C as CompositeTypes, c as Constants, D as Database, E as Enums, J as Json, T as Tables, a as TablesInsert, b as TablesUpdate } from './database.types-ChFCG-4M.js';
|
|
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
|
+
import { u as useDbAdvanceFilterQuery, Q as QueryState } from './index-2YySlz7X.js';
|
|
4
|
+
export { r as BackendSelectionResult, B as BooleanOperator, k as ClarificationSuggestion, C as CombinedProviderStatus, j as ComputedSortConfig, n as DataLayerWithPowerSyncProps, D as DbChangeLog, E as EnhancedSyncControl, a as EnhancedSyncStatus, d as FilterConditionType, m as FilterContextType, g as FilterInput, h as FilterState, H as HasPowerSyncConfig, O as OrderColumn, P as PowerSyncEnabledConfig, b as PowerSyncEnabledContextValue, q as PowerSyncTables, U as UseDataLayerWithPowerSync, p as UseSyncControlWithPowerSync, o as UseSyncStatusWithPowerSync, V as ValueOrArrayForPropertyType, c as createCombinedStatus, s as normalizeFilter } from './index-2YySlz7X.js';
|
|
5
|
+
export { A as AIOptions, k as AIResponse, y as AlertProps, B as BUCKETS, v as BucketName, C as CustomPageQueryResult, D as DEFAULT_QUERY_TIMEOUT, Y as FeedbackListItem, Z as FeedbackListParams, L as LiveChangeContext, z as LiveChangeContextProvider, m as ServerAvailabilityState, t as StorageObjectMetadata, $ as SubmitFeedbackParams, S as SupabaseAdapter, T as TIMEOUT_ERROR_MESSAGE, q as UpdateOptions, a2 as UseDbPartialQueryResult, U as UseMutationSuccessOptions, w as createInCondition, i as createSupabaseAdapter, r as executeAdvanceQuery, j as getErrorBody, g as getSupabaseUrl, x as isTimeoutError, n as newTimeActivity, s as setSupabaseUrl, l as useAI, a0 as useApplyFeedback, b as useAutosaveState, Q as useChangelogById, R as useChangelogBySlug, V as useChangelogEntries, W as useChangelogMedia, O as useChangelogs, a3 as useDbPartialQuery, F as useDeleteChangelog, I as useDeleteChangelogEntry, M as useDeleteChangelogMedia, X as useFeedbackList, a as useLatestOperationLog, u as useLiveChangeTracking, J as useMultiDeleteChangelogEntries, H as useMultiUpsertChangelogEntries, f as useMutationSuccess, h as useMutationSuccessRN, P as usePublishedChangelogs, a1 as useResolveFeedback, p as useSearchQuery, o as useServerAvailability, e as useStoragePath, d as useStorageUrl, _ as useSubmitFeedback, c as useToastError, N as useUploadChangelogMedia, E as useUpsertChangelog, G as useUpsertChangelogEntry, K as useUpsertChangelogMedia } from './useResolveFeedback-DTGcHpCs.js';
|
|
6
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
7
|
+
import { UseInfiniteQueryOptions, InfiniteData, UseQueryOptions, QueryClient } from '@tanstack/react-query';
|
|
8
|
+
import { D as Database } from './useSupabase-DvWVuHHE.js';
|
|
9
|
+
export { C as ClientInstanceId, 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-DvWVuHHE.js';
|
|
10
|
+
import { G as GetResult } from './select-query-parser-BwyHum1L.js';
|
|
11
|
+
export { S as SelectQueryError } from './select-query-parser-BwyHum1L.js';
|
|
12
|
+
import { j as GenericSchema, G as GenericTable, h as GenericView } from './types-CYr9JiUE.js';
|
|
13
|
+
export { F as Fetch, i as GenericFunction, g as GenericNonUpdatableView, f as GenericUpdatableView, P as PostgrestError, d as PostgrestMaybeSingleResponse, e as PostgrestResponse, b as PostgrestResponseFailure, a as PostgrestResponseSuccess, c as PostgrestSingleResponse, k as Prettify } from './types-CYr9JiUE.js';
|
|
14
|
+
import { PostgrestSingleResponse, RealtimePostgresChangesPayload, SupabaseClient } from '@supabase/supabase-js';
|
|
15
|
+
import { useInsertMutation, useUpdateMutation } from '@supabase-cache-helpers/postgrest-react-query';
|
|
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$5 } from '@pol-studios/utils';
|
|
19
|
+
export { C as ClarificationQuestion, D as DatabaseTypes, F as Filter, x as FilterGroup, y as FilterOperator, z as Pagination, P as PublicTableNames, Q as QueryState, R as ResolveRowType, S as SchemaNames, l as SchemaTableNames, A as Sort, T as TableIdentifier, U as UseAdvanceQueryOptions, m as UseAdvanceQueryResult, n as UseDbCountOptions, o as UseDbCountResult, K as UseDbDeleteOptions, L as UseDbDeleteResult, p as UseDbInfiniteQueryOptions, q as UseDbInfiniteQueryResult, B as UseDbInsertOptions, E as UseDbInsertResult, v as UseDbQueryByIdOptions, w as UseDbQueryByIdResult, r as UseDbQueryOptions, s as UseDbQueryResult, G as UseDbUpdateOptions, H as UseDbUpdateResult, I as UseDbUpsertOptions, J as UseDbUpsertResult, u as useAdvanceQuery, a as useDataLayer, t as useDataLayerOptional, d as useDbCount, d as useDbCountV3, e as useDbDeleteV3, f as useDbInfiniteQueryV3, g as useDbInsertV3, i as useDbQueryById, h as useDbQueryV3, j as useDbUpdateV3, k as useDbUpsert, k as useDbUpsertV3, k as useUpsert } from './useDbCount-s-aR9YeV.js';
|
|
20
|
+
import { DataLayerConfig } from './core/index.js';
|
|
21
|
+
export { AdapterRegistry as AdapterRegistryInterface, AutoStrategy, BuiltQuery, CachedStrategy, ColumnInfo, ColumnType, ConnectionConfig, DataAdapter, DataLayerHooks, DatabaseSchema, DeleteMutationResult, ExtractInsert, ExtractRow, ExtractUpdate, HybridStrategy, MutationHookResult, MutationResult, OrderBy, ParsedSelect, PowerSyncStrategy, QueryOptions, 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';
|
|
22
|
+
export { u as useBatchDelete, a as useBatchUpsert } from './useBatchUpsert-9OYjibLh.js';
|
|
23
|
+
export { UsePartialAdvancedQueryResult, UsePartialQueryResult, UseQuerySingleReturn, extractColumnNames, extractRelationNames, getRelationSelect, hasRelation, parseSelect, stringifySelect, tokenizeTopLevel, useAdvancedFilterQuery, useAdvancedQuery, useInfiniteQuery, usePartialAdvancedQuery, usePartialQuery, useQuery } from './query/index.js';
|
|
24
|
+
export { P as PowerSyncDatabase, Q as QueryExecutor, 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';
|
|
25
|
+
import { p as DataLayerContextValue } from './DataLayerContext-ZmLPYR_s.js';
|
|
26
|
+
export { f as ADAPTER_STRATEGIES, i as AdapterAutoDetector, c as AdapterCapabilities, a as AdapterConfig, d as AdapterDependencies, b as AdapterFactory, A as AdapterQueryResult, g as AdapterRegistry, e as AdapterStrategyType, k as AutoDetectionResult, l as AutoDetectorOptions, m as BackendChangeListener, B as BackendStatus, C as CapableDataAdapter, D as DataLayerContext, s as DataLayerStatus, T as TableDataAdapter, j as createAdapterAutoDetector, h as createAdapterRegistry } from './DataLayerContext-ZmLPYR_s.js';
|
|
27
|
+
import { ReactNode, JSX } from 'react';
|
|
28
|
+
export { B as BatchAnalysisProgress, E as ExtractedReceipt, P as PendingExpense, a as useReceiptAI, u as useSupabaseFunction } from './useReceiptAI-6HkRpRml.js';
|
|
29
|
+
export { e as UserMetadataContextProvider, c as UserMetadataContextType, a as UserMetadataInsert, U as UserMetadataRow, b as UserMetadataUpdate, u as useLiveChangesIndicator, h as useSetUserMetadata, f as useUserMetadata, i as useUserMetadataState, g as useUserMetadataValue, d as userMetadataContext } from './UserMetadataContext-B8gVWGMl.js';
|
|
30
|
+
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';
|
|
31
|
+
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';
|
|
32
|
+
import 'moment';
|
|
33
|
+
import '@supabase/functions-js';
|
|
34
|
+
import '@supabase/postgrest-js';
|
|
35
|
+
import '@supabase/storage-js';
|
|
36
|
+
import 'react/jsx-runtime';
|
|
37
|
+
import '@supabase/supabase-js/dist/module/lib/types.js';
|
|
38
|
+
|
|
39
|
+
type ItemType$4<T> = T extends Array<infer U> ? U : T;
|
|
40
|
+
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 {
|
|
41
|
+
Relationships: infer R;
|
|
42
|
+
} ? R : unknown, RowResult extends object = GetResult<PublicSchema, Table["Row"], RelationName, Relationships, Query>>(relation: TableName | {
|
|
43
|
+
table: TableName;
|
|
44
|
+
schema: Schema;
|
|
45
|
+
}, primaryKeys?: (keyof ItemType$4<RowResult> & string)[]): _tanstack_react_query.UseMutationResult<RowResult, Error, Partial<RowResult>, unknown>;
|
|
46
|
+
|
|
47
|
+
type DataType$1 = Record<string, any>;
|
|
48
|
+
declare function useDbInfiniteQuery<Relation extends GenericTable | GenericView, Result extends DataType$1, Query extends string = "*", RelationName = unknown, Relationships = Relation extends {
|
|
49
|
+
Relationships: infer R;
|
|
50
|
+
} ? R : unknown, Builder = PromiseLike<PostgrestSingleResponse<Result>>>(query: PromiseLike<PostgrestSingleResponse<Result>>, countPerLoad: number, config?: Omit<UseInfiniteQueryOptions<PostgrestSingleResponse<Result>, Error, InfiniteData<PostgrestSingleResponse<Result>, number>>, "queryKey" | "queryFn" | "getNextPageParam" | "initialPageParam"> & {
|
|
51
|
+
crossOrganization?: boolean;
|
|
52
|
+
onQuery?: ({ pageParam, query }: {
|
|
53
|
+
pageParam: number;
|
|
54
|
+
query: Builder;
|
|
55
|
+
}) => any;
|
|
56
|
+
enableOnQuery?: boolean;
|
|
57
|
+
}): {
|
|
58
|
+
count: number;
|
|
59
|
+
data: Result;
|
|
60
|
+
error: Error;
|
|
61
|
+
isError: true;
|
|
62
|
+
isPending: false;
|
|
63
|
+
isLoading: false;
|
|
64
|
+
isLoadingError: false;
|
|
65
|
+
isRefetchError: true;
|
|
66
|
+
isSuccess: false;
|
|
67
|
+
isPlaceholderData: false;
|
|
68
|
+
status: "error";
|
|
69
|
+
fetchNextPage: (options?: _tanstack_react_query.FetchNextPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
70
|
+
fetchPreviousPage: (options?: _tanstack_react_query.FetchPreviousPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
71
|
+
hasNextPage: boolean;
|
|
72
|
+
hasPreviousPage: boolean;
|
|
73
|
+
isFetchNextPageError: boolean;
|
|
74
|
+
isFetchingNextPage: boolean;
|
|
75
|
+
isFetchPreviousPageError: boolean;
|
|
76
|
+
isFetchingPreviousPage: boolean;
|
|
77
|
+
dataUpdatedAt: number;
|
|
78
|
+
errorUpdatedAt: number;
|
|
79
|
+
failureCount: number;
|
|
80
|
+
failureReason: Error;
|
|
81
|
+
errorUpdateCount: number;
|
|
82
|
+
isFetched: boolean;
|
|
83
|
+
isFetchedAfterMount: boolean;
|
|
84
|
+
isFetching: boolean;
|
|
85
|
+
isInitialLoading: boolean;
|
|
86
|
+
isPaused: boolean;
|
|
87
|
+
isRefetching: boolean;
|
|
88
|
+
isStale: boolean;
|
|
89
|
+
isEnabled: boolean;
|
|
90
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
91
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
92
|
+
promise: Promise<InfiniteData<PostgrestSingleResponse<Result>, unknown>>;
|
|
93
|
+
} | {
|
|
94
|
+
count: number;
|
|
95
|
+
data: Result;
|
|
96
|
+
error: null;
|
|
97
|
+
isError: false;
|
|
98
|
+
isPending: false;
|
|
99
|
+
isLoading: false;
|
|
100
|
+
isLoadingError: false;
|
|
101
|
+
isRefetchError: false;
|
|
102
|
+
isFetchNextPageError: false;
|
|
103
|
+
isFetchPreviousPageError: false;
|
|
104
|
+
isSuccess: true;
|
|
105
|
+
isPlaceholderData: false;
|
|
106
|
+
status: "success";
|
|
107
|
+
fetchNextPage: (options?: _tanstack_react_query.FetchNextPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
108
|
+
fetchPreviousPage: (options?: _tanstack_react_query.FetchPreviousPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
109
|
+
hasNextPage: boolean;
|
|
110
|
+
hasPreviousPage: boolean;
|
|
111
|
+
isFetchingNextPage: boolean;
|
|
112
|
+
isFetchingPreviousPage: boolean;
|
|
113
|
+
dataUpdatedAt: number;
|
|
114
|
+
errorUpdatedAt: number;
|
|
115
|
+
failureCount: number;
|
|
116
|
+
failureReason: Error;
|
|
117
|
+
errorUpdateCount: number;
|
|
118
|
+
isFetched: boolean;
|
|
119
|
+
isFetchedAfterMount: boolean;
|
|
120
|
+
isFetching: boolean;
|
|
121
|
+
isInitialLoading: boolean;
|
|
122
|
+
isPaused: boolean;
|
|
123
|
+
isRefetching: boolean;
|
|
124
|
+
isStale: boolean;
|
|
125
|
+
isEnabled: boolean;
|
|
126
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
127
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
128
|
+
promise: Promise<InfiniteData<PostgrestSingleResponse<Result>, unknown>>;
|
|
129
|
+
} | {
|
|
130
|
+
count: number;
|
|
131
|
+
data: Result;
|
|
132
|
+
error: Error;
|
|
133
|
+
isError: true;
|
|
134
|
+
isPending: false;
|
|
135
|
+
isLoading: false;
|
|
136
|
+
isLoadingError: true;
|
|
137
|
+
isRefetchError: false;
|
|
138
|
+
isFetchNextPageError: false;
|
|
139
|
+
isFetchPreviousPageError: false;
|
|
140
|
+
isSuccess: false;
|
|
141
|
+
isPlaceholderData: false;
|
|
142
|
+
status: "error";
|
|
143
|
+
fetchNextPage: (options?: _tanstack_react_query.FetchNextPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
144
|
+
fetchPreviousPage: (options?: _tanstack_react_query.FetchPreviousPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
145
|
+
hasNextPage: boolean;
|
|
146
|
+
hasPreviousPage: boolean;
|
|
147
|
+
isFetchingNextPage: boolean;
|
|
148
|
+
isFetchingPreviousPage: boolean;
|
|
149
|
+
dataUpdatedAt: number;
|
|
150
|
+
errorUpdatedAt: number;
|
|
151
|
+
failureCount: number;
|
|
152
|
+
failureReason: Error;
|
|
153
|
+
errorUpdateCount: number;
|
|
154
|
+
isFetched: boolean;
|
|
155
|
+
isFetchedAfterMount: boolean;
|
|
156
|
+
isFetching: boolean;
|
|
157
|
+
isInitialLoading: boolean;
|
|
158
|
+
isPaused: boolean;
|
|
159
|
+
isRefetching: boolean;
|
|
160
|
+
isStale: boolean;
|
|
161
|
+
isEnabled: boolean;
|
|
162
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
163
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
164
|
+
promise: Promise<InfiniteData<PostgrestSingleResponse<Result>, unknown>>;
|
|
165
|
+
} | {
|
|
166
|
+
count: number;
|
|
167
|
+
data: Result;
|
|
168
|
+
error: null;
|
|
169
|
+
isError: false;
|
|
170
|
+
isPending: true;
|
|
171
|
+
isLoading: true;
|
|
172
|
+
isLoadingError: false;
|
|
173
|
+
isRefetchError: false;
|
|
174
|
+
isFetchNextPageError: false;
|
|
175
|
+
isFetchPreviousPageError: false;
|
|
176
|
+
isSuccess: false;
|
|
177
|
+
isPlaceholderData: false;
|
|
178
|
+
status: "pending";
|
|
179
|
+
fetchNextPage: (options?: _tanstack_react_query.FetchNextPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
180
|
+
fetchPreviousPage: (options?: _tanstack_react_query.FetchPreviousPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
181
|
+
hasNextPage: boolean;
|
|
182
|
+
hasPreviousPage: boolean;
|
|
183
|
+
isFetchingNextPage: boolean;
|
|
184
|
+
isFetchingPreviousPage: boolean;
|
|
185
|
+
dataUpdatedAt: number;
|
|
186
|
+
errorUpdatedAt: number;
|
|
187
|
+
failureCount: number;
|
|
188
|
+
failureReason: Error;
|
|
189
|
+
errorUpdateCount: number;
|
|
190
|
+
isFetched: boolean;
|
|
191
|
+
isFetchedAfterMount: boolean;
|
|
192
|
+
isFetching: boolean;
|
|
193
|
+
isInitialLoading: boolean;
|
|
194
|
+
isPaused: boolean;
|
|
195
|
+
isRefetching: boolean;
|
|
196
|
+
isStale: boolean;
|
|
197
|
+
isEnabled: boolean;
|
|
198
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
199
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
200
|
+
promise: Promise<InfiniteData<PostgrestSingleResponse<Result>, unknown>>;
|
|
201
|
+
} | {
|
|
202
|
+
count: number;
|
|
203
|
+
data: Result;
|
|
204
|
+
error: null;
|
|
205
|
+
isError: false;
|
|
206
|
+
isPending: true;
|
|
207
|
+
isLoadingError: false;
|
|
208
|
+
isRefetchError: false;
|
|
209
|
+
isFetchNextPageError: false;
|
|
210
|
+
isFetchPreviousPageError: false;
|
|
211
|
+
isSuccess: false;
|
|
212
|
+
isPlaceholderData: false;
|
|
213
|
+
status: "pending";
|
|
214
|
+
fetchNextPage: (options?: _tanstack_react_query.FetchNextPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
215
|
+
fetchPreviousPage: (options?: _tanstack_react_query.FetchPreviousPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
216
|
+
hasNextPage: boolean;
|
|
217
|
+
hasPreviousPage: boolean;
|
|
218
|
+
isFetchingNextPage: boolean;
|
|
219
|
+
isFetchingPreviousPage: boolean;
|
|
220
|
+
dataUpdatedAt: number;
|
|
221
|
+
errorUpdatedAt: number;
|
|
222
|
+
failureCount: number;
|
|
223
|
+
failureReason: Error;
|
|
224
|
+
errorUpdateCount: number;
|
|
225
|
+
isFetched: boolean;
|
|
226
|
+
isFetchedAfterMount: boolean;
|
|
227
|
+
isFetching: boolean;
|
|
228
|
+
isLoading: boolean;
|
|
229
|
+
isInitialLoading: boolean;
|
|
230
|
+
isPaused: boolean;
|
|
231
|
+
isRefetching: boolean;
|
|
232
|
+
isStale: boolean;
|
|
233
|
+
isEnabled: boolean;
|
|
234
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
235
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
236
|
+
promise: Promise<InfiniteData<PostgrestSingleResponse<Result>, unknown>>;
|
|
237
|
+
} | {
|
|
238
|
+
count: number;
|
|
239
|
+
data: Result;
|
|
240
|
+
isError: false;
|
|
241
|
+
error: null;
|
|
242
|
+
isPending: false;
|
|
243
|
+
isLoading: false;
|
|
244
|
+
isLoadingError: false;
|
|
245
|
+
isRefetchError: false;
|
|
246
|
+
isSuccess: true;
|
|
247
|
+
isPlaceholderData: true;
|
|
248
|
+
isFetchNextPageError: false;
|
|
249
|
+
isFetchPreviousPageError: false;
|
|
250
|
+
status: "success";
|
|
251
|
+
fetchNextPage: (options?: _tanstack_react_query.FetchNextPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
252
|
+
fetchPreviousPage: (options?: _tanstack_react_query.FetchPreviousPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
253
|
+
hasNextPage: boolean;
|
|
254
|
+
hasPreviousPage: boolean;
|
|
255
|
+
isFetchingNextPage: boolean;
|
|
256
|
+
isFetchingPreviousPage: boolean;
|
|
257
|
+
dataUpdatedAt: number;
|
|
258
|
+
errorUpdatedAt: number;
|
|
259
|
+
failureCount: number;
|
|
260
|
+
failureReason: Error;
|
|
261
|
+
errorUpdateCount: number;
|
|
262
|
+
isFetched: boolean;
|
|
263
|
+
isFetchedAfterMount: boolean;
|
|
264
|
+
isFetching: boolean;
|
|
265
|
+
isInitialLoading: boolean;
|
|
266
|
+
isPaused: boolean;
|
|
267
|
+
isRefetching: boolean;
|
|
268
|
+
isStale: boolean;
|
|
269
|
+
isEnabled: boolean;
|
|
270
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<InfiniteData<PostgrestSingleResponse<Result>, unknown>, Error>>;
|
|
271
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
272
|
+
promise: Promise<InfiniteData<PostgrestSingleResponse<Result>, unknown>>;
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
type ItemType$3<T> = T extends Array<infer U> ? U : T;
|
|
276
|
+
type MutationOption$1 = Parameters<typeof useInsertMutation>[3];
|
|
277
|
+
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 {
|
|
278
|
+
Relationships: infer R;
|
|
279
|
+
} ? 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 | {
|
|
280
|
+
table: TableName;
|
|
281
|
+
schema: Schema;
|
|
282
|
+
}, primaryKeys?: (keyof (ItemType$3<RowResult> | any) & string)[], query?: ReturnQuery, mutationOption?: MutationOption$1 & {
|
|
283
|
+
crossOrganization?: boolean;
|
|
284
|
+
}): _tanstack_react_query.UseMutationResult<RowResult, Error, ResultInsert, unknown>;
|
|
285
|
+
|
|
286
|
+
type ItemType$2<T> = T extends Array<infer U> ? U : T;
|
|
287
|
+
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 {
|
|
288
|
+
Relationships: infer R;
|
|
289
|
+
} ? R : unknown, RowResult extends object = Omit<GetResult<PublicSchema, Table["Update"], RelationName, Relationships, Query>, "id">>(relation: TableName | {
|
|
290
|
+
table: TableName;
|
|
291
|
+
schema: Schema;
|
|
292
|
+
}, primaryKeys?: (keyof ItemType$2<RowResult> & string)[]): _tanstack_react_query.UseMutationResult<RowResult, Error, RowResult | RowResult[], unknown>;
|
|
293
|
+
|
|
294
|
+
type ItemType$1<T> = T extends Array<infer U> ? U : T;
|
|
295
|
+
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 {
|
|
296
|
+
Relationships: infer R;
|
|
297
|
+
} ? 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"> & {
|
|
298
|
+
id: any;
|
|
299
|
+
}>(relation: TableName | {
|
|
300
|
+
table: TableName;
|
|
301
|
+
schema: Schema;
|
|
302
|
+
}, primaryKeys?: (keyof (ItemType$1<RowResult> | any) & string)[], query?: string): _tanstack_react_query.UseMutationResult<RowResult[], Error, (ResultInsert | ResultUpdate)[], unknown>;
|
|
303
|
+
|
|
304
|
+
type UseDbPartialAdvanceQueryResult<T extends Record<string, any>> = ReturnType<typeof useDbPartialAdvanceQuery<T[]>>;
|
|
305
|
+
declare function useDbPartialAdvanceQuery<Result extends Record<string, any>[]>(query: PromiseLike<PostgrestSingleResponse<Result>>, itemCountPerPage: number, config?: Omit<UseQueryOptions<PostgrestSingleResponse<Result>>, "queryKey" | "queryFn"> & {
|
|
306
|
+
filterKey?: string;
|
|
307
|
+
timeout?: number;
|
|
308
|
+
}): [
|
|
309
|
+
ReturnType<typeof useDbAdvanceFilterQuery<Result>>[0] & {
|
|
310
|
+
currentPage: number;
|
|
311
|
+
setCurrentPage: (value: React.SetStateAction<number>) => void;
|
|
312
|
+
fetchNextPage: () => any;
|
|
313
|
+
fetchPreviousPage: () => any;
|
|
314
|
+
data: {
|
|
315
|
+
Items: Result;
|
|
316
|
+
CurrentPage: number;
|
|
317
|
+
ItemCount: number;
|
|
318
|
+
MaxCountPerPage: number;
|
|
319
|
+
PageCount: number;
|
|
320
|
+
};
|
|
321
|
+
pageCount: number;
|
|
322
|
+
hasNextPage: boolean;
|
|
323
|
+
hasPreviousPage: boolean;
|
|
324
|
+
count: number;
|
|
325
|
+
},
|
|
326
|
+
QueryState,
|
|
327
|
+
React.Dispatch<React.SetStateAction<QueryState>>
|
|
328
|
+
];
|
|
329
|
+
|
|
330
|
+
declare function useDbRealtime(key: string, query: string, table: string | {
|
|
331
|
+
table: string;
|
|
332
|
+
schema: string;
|
|
333
|
+
}, primaryKeys: string[], options?: {
|
|
334
|
+
filter?: string;
|
|
335
|
+
enabled?: boolean;
|
|
336
|
+
onChange?: (payload: RealtimePostgresChangesPayload<{
|
|
337
|
+
[key: string]: any;
|
|
338
|
+
}>) => any;
|
|
339
|
+
}): "SUBSCRIBED" | "TIMED_OUT" | "CLOSED" | "CHANNEL_ERROR";
|
|
340
|
+
|
|
341
|
+
type ConfigurationOptions<T> = {
|
|
342
|
+
crossOrganization?: boolean;
|
|
343
|
+
};
|
|
344
|
+
type FilterOperator = "or" | "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "like" | "ilike" | "is" | "in" | "cs" | "cd" | "fts" | "plfts";
|
|
345
|
+
type ValueType = number | string | boolean | null | Date | object;
|
|
346
|
+
type FilterDefinition = {
|
|
347
|
+
path: string;
|
|
348
|
+
alias?: string;
|
|
349
|
+
operator: FilterOperator;
|
|
350
|
+
negate: boolean;
|
|
351
|
+
value: ValueType;
|
|
352
|
+
};
|
|
353
|
+
type FilterDefinitions = (FilterComposite | FilterDefinition)[];
|
|
354
|
+
type FilterComposite = {
|
|
355
|
+
or?: FilterDefinitions;
|
|
356
|
+
and?: FilterDefinitions;
|
|
357
|
+
};
|
|
358
|
+
type UseDbRealtimeQueryResult<T> = UseDbQuerySingleReturn<T> & {
|
|
359
|
+
realtimeStatus: "SUBSCRIBED" | "TIMED_OUT" | "CLOSED" | "CHANNEL_ERROR" | "Loading...";
|
|
360
|
+
isRealtimeConnected: boolean;
|
|
361
|
+
isRealtimeLoading: boolean;
|
|
362
|
+
};
|
|
363
|
+
type DataType = Record<string, any>;
|
|
364
|
+
declare function convertFilterToRealtimeQuery(filters: FilterDefinitions): string;
|
|
365
|
+
declare function useDbRealtimeQuery<Result extends DataType>(query: PromiseLike<PostgrestSingleResponse<Result>>, config?: Omit<UseQueryOptions<PostgrestSingleResponse<Result>>, "queryKey" | "queryFn"> & ConfigurationOptions<Result>, primaryKeys?: (keyof ItemType$5<Result> & string)[]): UseDbRealtimeQueryResult<Result>;
|
|
366
|
+
|
|
367
|
+
type ItemType<T> = T extends Array<infer U> ? U : T;
|
|
368
|
+
type MutationOption = Parameters<typeof useUpdateMutation>[3];
|
|
369
|
+
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 {
|
|
370
|
+
Relationships: infer R;
|
|
371
|
+
} ? 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"> & {
|
|
372
|
+
id: number;
|
|
373
|
+
}) | Omit<GetResult<PublicSchema, Table["Update"], RelationName, Relationships, "*">, "id">>(relation: TableName | {
|
|
374
|
+
table: TableName;
|
|
375
|
+
schema: Schema;
|
|
376
|
+
}, primaryKeys?: (keyof (ItemType<RowResult> | any) & string)[], query?: ReturnQuery, mutationOption?: MutationOption & {
|
|
377
|
+
crossOrganization?: boolean;
|
|
378
|
+
}): _tanstack_react_query.UseMutationResult<RowResult, Error, ResultUpdate, unknown>;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* V3 Data Layer Provider - Web/Browser Version
|
|
382
|
+
*
|
|
383
|
+
* React context provider that initializes adapters and provides context for all V3 hooks.
|
|
384
|
+
* This is a browser-safe version that excludes PowerSync dependencies.
|
|
385
|
+
*
|
|
386
|
+
* For React Native apps that need PowerSync, use the default DataLayerProvider instead.
|
|
387
|
+
*/
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Props for DataLayerProvider (Web version)
|
|
391
|
+
*/
|
|
392
|
+
interface DataLayerProviderProps {
|
|
393
|
+
/** Data layer configuration */
|
|
394
|
+
config: DataLayerConfig;
|
|
395
|
+
/** Children to render */
|
|
396
|
+
children: ReactNode;
|
|
397
|
+
/** Supabase client (required) */
|
|
398
|
+
supabaseClient: SupabaseClient;
|
|
399
|
+
/** React Query client (required) */
|
|
400
|
+
queryClient: QueryClient;
|
|
401
|
+
/** Callback when initialization completes */
|
|
402
|
+
onInitialized?: (context: DataLayerContextValue) => void;
|
|
403
|
+
/** Callback when error occurs */
|
|
404
|
+
onError?: (error: Error) => void;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Provider component for the V3 data layer (Web/Browser version).
|
|
408
|
+
*
|
|
409
|
+
* This provider:
|
|
410
|
+
* - Creates and manages the AdapterRegistry
|
|
411
|
+
* - Initializes the AdapterAutoDetector for backend selection
|
|
412
|
+
* - Sets up Supabase adapter (PowerSync not supported in web builds)
|
|
413
|
+
* - Tracks online/offline status
|
|
414
|
+
* - Provides context for all V3 hooks
|
|
415
|
+
*
|
|
416
|
+
* Note: This is the browser-safe version that does NOT support PowerSync.
|
|
417
|
+
* For React Native apps that need PowerSync, use the default DataLayerProvider.
|
|
418
|
+
*
|
|
419
|
+
* @example
|
|
420
|
+
* ```tsx
|
|
421
|
+
* import { DataLayerProvider } from "@pol-studios/db/web";
|
|
422
|
+
*
|
|
423
|
+
* function App() {
|
|
424
|
+
* return (
|
|
425
|
+
* <DataLayerProvider
|
|
426
|
+
* config={dataLayerConfig}
|
|
427
|
+
* supabaseClient={supabase}
|
|
428
|
+
* queryClient={queryClient}
|
|
429
|
+
* >
|
|
430
|
+
* <YourApp />
|
|
431
|
+
* </DataLayerProvider>
|
|
432
|
+
* );
|
|
433
|
+
* }
|
|
434
|
+
* ```
|
|
435
|
+
*/
|
|
436
|
+
declare function DataLayerProvider({ config, children, supabaseClient, queryClient, onInitialized, onError, }: DataLayerProviderProps): JSX.Element;
|
|
437
|
+
|
|
438
|
+
export { DataLayerConfig, DataLayerContextValue, DataLayerProvider, type DataLayerProviderProps, GenericSchema, GenericTable, GenericView, GetResult, type UseDbPartialAdvanceQueryResult, UseDbQuerySingleReturn, type UseDbRealtimeQueryResult, convertFilterToRealtimeQuery, useDbAdvanceFilterQuery, useDbAdvanceFilterQuery as useDbAdvanceQuery, useDbDelete, useDbInfiniteQuery, useDbInsert, useDbMultiDelete, useDbMultiUpsert, useDbPartialAdvanceQuery, useDbRealtime, useDbRealtimeQuery, useDbUpdate, useDbDelete as useDelete, useDbInsert as useInsert, useDbRealtime as useRealtime, useDbRealtimeQuery as useRealtimeQuery, useDbUpdate as useUpdate };
|