tsdf 17.0.0-alpha.8 → 17.0.0-beta.0

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.
Files changed (35) hide show
  1. package/dist/async-storage.d.ts +1 -1
  2. package/dist/async-storage.js +2 -1
  3. package/dist/asyncStorageAdapter-CGfnsd9m.js +1945 -0
  4. package/dist/{asyncStorageAdapter-kvAIhrBD.d.ts → asyncStorageAdapter-CMohMeKm.d.ts} +1 -1
  5. package/dist/asyncStorageAdapters-BpfM2_Y6.js +3 -0
  6. package/dist/indexed-db-storage.d.ts +4 -2
  7. package/dist/indexed-db-storage.js +2 -1
  8. package/dist/indexedDbPersistentStorage-DC9GsYHH.js +954 -0
  9. package/dist/main.d.ts +355 -414
  10. package/dist/main.js +16046 -1
  11. package/dist/opfs-storage.d.ts +1 -1
  12. package/dist/opfs-storage.js +2 -1
  13. package/dist/{opfsPersistentStorage-D_fecOJg.d.ts → opfsPersistentStorage-Ci0JcCo5.d.ts} +1 -1
  14. package/dist/opfsPersistentStorage-DqJXzF7M.js +892 -0
  15. package/dist/{types-DkNgE_f9.d.ts → types-D0ttVGmj.d.ts} +395 -65
  16. package/docs/README.md +16 -16
  17. package/docs/batch-fetching.md +1 -1
  18. package/docs/browser-tabs-sync.md +5 -2
  19. package/docs/collection-store.md +26 -24
  20. package/docs/document-store.md +8 -6
  21. package/docs/fetch-scheduling.md +18 -14
  22. package/docs/list-query-store.md +37 -35
  23. package/docs/mutations.md +2 -0
  24. package/docs/offline.md +2 -2
  25. package/docs/offset-pagination.md +1 -4
  26. package/docs/optimistic-list-updates.md +13 -17
  27. package/docs/partial-resources.md +26 -1
  28. package/docs/persistent-storage.md +4 -2
  29. package/docs/real-time-updates.md +7 -5
  30. package/docs/store-manager.md +41 -14
  31. package/package.json +6 -3
  32. package/dist/asyncStorageAdapter-CgG3vm0t.js +0 -1
  33. package/dist/asyncStorageAdapters-eagaD77Y.js +0 -1
  34. package/dist/indexedDbPersistentStorage-JYXvMjTG.js +0 -1
  35. package/dist/opfsPersistentStorage-DS-SWDSq.js +0 -1
@@ -1,8 +1,32 @@
1
1
  import { __LEGIT_ANY__ } from "@ls-stack/utils/saferTyping";
2
- import { Result } from "t-result";
2
+ import { Result, ResultValidErrors } from "t-result";
3
3
  import { RcType } from "runcheck";
4
4
  import { StandardSchemaV1 } from "@standard-schema/spec";
5
5
 
6
+ //#region src/debug.d.ts
7
+ /** Debug log severity used to choose the default console method. */
8
+ type TSDFDebugLogLevel = 'log' | 'warn' | 'error';
9
+ /** Internal subsystem that emitted a debug log entry. */
10
+ type TSDFDebugLogArea = 'browser-tabs' | 'focus' | 'persistent-storage';
11
+ /** Operations emitted by focus lifecycle handling. */
12
+ type TSDFFocusDebugOperation = 'window-focus-revalidate';
13
+ /** Operations emitted by the persistent storage subsystem. */
14
+ type TSDFPersistentStorageDebugOperation = 'clear' | 'commit' | 'list-keys' | 'list-metadata' | 'list-metadata-by-filter' | 'load' | 'load-many' | 'adapter-operation' | 'quota-cleanup' | 'read-entry' | 'read-protected-keys' | 'remove' | 'save' | 'schedule-save' | 'sync-load' | 'sync-protected-keys' | 'write';
15
+ /** Operations emitted by the browser-tab sync subsystem. */
16
+ type TSDFBrowserTabsDebugOperation = 'leader-change' | 'publish' | 'publish-skipped' | 'receive' | 'receive-skipped' | 'session-change' | 'transport-close' | 'transport-open' | 'transport-unavailable';
17
+ /** Structured debug log entry emitted by TSDF internals. */
18
+ type TSDFDebugLogEntry = {
19
+ /** Subsystem that emitted the entry. */area: TSDFDebugLogArea; /** Severity of the entry. */
20
+ level: TSDFDebugLogLevel; /** Human-readable summary of the operation. */
21
+ message: string; /** Stable operation id, such as `publish`, `load`, or `write`. */
22
+ operation: TSDFFocusDebugOperation | TSDFPersistentStorageDebugOperation | TSDFBrowserTabsDebugOperation; /** Structured operation metadata for filtering and diagnostics. */
23
+ details?: Readonly<Record<string, unknown>>;
24
+ };
25
+ /** Custom debug logger invoked for each emitted TSDF debug entry. */
26
+ type TSDFDebugLogger = (entry: TSDFDebugLogEntry) => void;
27
+ /** Logger option used by manager-wide debug and production-signal logging. */
28
+ type TSDFLoggerOptions = boolean | TSDFDebugLogger;
29
+ //#endregion
6
30
  //#region src/requestScheduler.d.ts
7
31
  type RequestSchedulerEvents = 'scheduled-fetch-started' | 'rt-fetch-scheduled' | 'rt-fetch-cancelled' | 'scheduled-rt-fetch-started' | 'medium-priority-scheduled' | 'medium-priority-fetch-started' | 'medium-priority-cancelled' | 'batch-size-triggered';
8
32
  type RequestSchedulerEventData = {
@@ -15,9 +39,20 @@ type ScheduleFetchOptions = {
15
39
  };
16
40
  //#endregion
17
41
  //#region src/utils/storeShared.d.ts
42
+ /** Shared fetch lifecycle status used by TSDF stores and hooks. */
18
43
  type TSDFStatus = 'loading' | 'error' | 'refetching' | 'success';
44
+ /** Payload shapes supported by store keying and fetch APIs. */
19
45
  type ValidPayload = number | string | Record<string, unknown>;
46
+ /** State shapes supported by TSDF caches. */
20
47
  type ValidStoreState = Record<string, unknown> | unknown[];
48
+ type UnwrapTSDFResult<T> = T extends {
49
+ ok: true;
50
+ value: infer Value;
51
+ } ? Value : T extends {
52
+ ok: false;
53
+ error: ResultValidErrors;
54
+ } ? never : T;
55
+ type MaybeTSDFResult<T> = T | Result<T, ResultValidErrors>;
21
56
  /**
22
57
  * Debounce settings for payload-driven automatic fetches in store hooks.
23
58
  *
@@ -38,16 +73,18 @@ type PayloadDebounce = {
38
73
  */
39
74
  leading?: boolean;
40
75
  };
76
+ /** Normalized error shape used by fetch and mutation APIs. */
41
77
  type StoreError = {
42
- code: number;
43
- id: string;
44
- message: string;
45
- path?: string;
78
+ /** Numeric application or transport error code. */code: number; /** Stable machine-readable error id. */
79
+ id: string; /** Human-readable error message. */
80
+ message: string; /** Optional request path associated with the failure. */
81
+ path?: string; /** Optional HTTP method associated with the failure. */
46
82
  method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
47
83
  };
48
84
  declare const fetchTypePriority: Record<FetchType, number>;
85
+ /** Result error returned when a debounced or canceled mutation never runs. */
49
86
  type MutationSkipped = {
50
- kind: 'skipped';
87
+ /** Stable discriminator for skipped mutations. */kind: 'skipped';
51
88
  };
52
89
  declare const mutationSkipped: MutationSkipped;
53
90
  /** Options passed to mutation error handlers. */
@@ -61,75 +98,352 @@ type StoreMutationErrorOptions = {
61
98
  */
62
99
  silentErrors?: boolean;
63
100
  };
101
+ /** Error wrapper returned by mutation APIs after normalization. */
64
102
  declare class StoreMutationError extends Error {
103
+ /** Stable discriminator matching result-style mutation errors. */
65
104
  readonly kind = "error";
105
+ /** Numeric application or transport error code. */
66
106
  code: number;
107
+ /** Stable machine-readable error id. */
67
108
  id: string;
109
+ /** Optional request path associated with the failure. */
68
110
  path?: string;
111
+ /** Optional HTTP method associated with the failure. */
69
112
  method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
70
113
  constructor(error: StoreError, options?: ErrorOptions);
71
114
  }
115
+ /** Error wrapper returned by fetch APIs after normalization. */
72
116
  declare class StoreFetchError extends Error {
117
+ /** Numeric application or transport error code. */
73
118
  code: number;
119
+ /** Stable machine-readable error id. */
74
120
  id: string;
121
+ /** Fetch failure category. */
75
122
  type: 'fetch' | 'aborted' | 'timeout';
123
+ /** Optional request path associated with the failure. */
76
124
  path?: string;
125
+ /** Optional HTTP method associated with the failure. */
77
126
  method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
78
127
  constructor(error: StoreError, type: 'fetch' | 'aborted' | 'timeout');
79
128
  }
80
129
  //#endregion
130
+ //#region src/listQueryStore/types.d.ts
131
+ /** Lifecycle status for a list query or list item query. */
132
+ type QueryStatus = TSDFStatus | 'loadingMore';
133
+ /** Raw cached state for one list query. */
134
+ type TSFDListQuery<QueryPayload extends ValidPayload> = {
135
+ /** Last fetch error for this query, when the latest fetch failed. */error: StoreError | null; /** Current fetch lifecycle status for this query. */
136
+ status: QueryStatus; /** Payload used to identify and fetch this query. */
137
+ payload: QueryPayload; /** Whether another page is available. */
138
+ hasMore: boolean; /** Whether this query has ever loaded successfully. */
139
+ wasLoaded: boolean; /** Pending automatic refetch priority for stale data mounted by hooks. */
140
+ refetchOnMount: false | FetchType; /** Ordered item keys included in the cached query page. */
141
+ items: string[];
142
+ };
143
+ /** Raw cached state for one item query in a list-query store. */
144
+ type TSDFItemQuery<ItemPayload extends ValidPayload> = {
145
+ /** Last item fetch error, if any. */error: StoreError | null; /** Current fetch lifecycle status for this item. */
146
+ status: Exclude<QueryStatus, 'loadingMore'>; /** Whether this item has ever loaded successfully. */
147
+ wasLoaded: boolean; /** Pending automatic refetch priority for stale data mounted by hooks. */
148
+ refetchOnMount: false | FetchType; /** Payload used to identify and fetch this item. */
149
+ payload: ItemPayload;
150
+ };
151
+ /** Loaded partial-resource fields for one item, or `'*'` when fully loaded. */
152
+ type ItemLoadedFields = string[] | '*';
153
+ /** Raw t-state shape used by a list-query store. */
154
+ type TSFDListQueryState<ItemState extends ValidStoreState, QueryPayload extends ValidPayload, ItemPayload extends ValidPayload> = {
155
+ /** Item data records keyed by item store key. */items: Record<string, ItemState | null>; /** List query records keyed by query store key. */
156
+ queries: Record<string, TSFDListQuery<QueryPayload>>; /** Item query records keyed by item store key. */
157
+ itemQueries: Record<string, TSDFItemQuery<ItemPayload> | null>; /** Loaded partial-resource fields for each item key. */
158
+ itemLoadedFields: Record<string, ItemLoadedFields>; /** Pending field invalidations for each item key. */
159
+ itemFieldInvalidationFields: Record<string, string[]>;
160
+ };
161
+ /**
162
+ * Partial-resource fields to request.
163
+ *
164
+ * Pass a field-name array to load only those fields, or `'*'` to load the
165
+ * complete item.
166
+ */
167
+ type FieldsInput = string[] | '*';
168
+ /** Value returned by `ListQueryStore.useListQuery(...)` and `useMultipleListQueries(...)`. */
169
+ type TSFDUseListQueryReturn<Selected, QueryPayload, QueryMetadata extends undefined | Record<string, unknown> = undefined, HasPartialResources extends boolean = false> = {
170
+ /** Selected items included in the current query result. */items: Selected[]; /** Hook-visible query status, including `idle` before a query runs. */
171
+ status: QueryStatus | 'idle'; /** Query payload for this result, unless omitted or unavailable. */
172
+ payload: QueryPayload | undefined; /** Requested partial-resource fields for this query result. */
173
+ fields: HasPartialResources extends true ? FieldsInput : FieldsInput | undefined; /** Requested partial-resource fields that are still pending. */
174
+ loadingFields?: string[]; /** Last query fetch error, if any. */
175
+ error: StoreError | null; /** Stable store key for the current query payload. */
176
+ queryKey: string; /** Whether another page is available. */
177
+ hasMore: boolean; /** Whether this result was derived from local items instead of fetched directly. */
178
+ isDerived: boolean; /** Convenience flag for `loading` or `refetching` states. */
179
+ isLoading: boolean; /** Whether a `loadMore(...)` request is currently active. */
180
+ isLoadingMore: boolean; /** Whether this result has local offline changes that still need to sync to the server. */
181
+ pendingSync: boolean; /** Caller-provided metadata copied from the query descriptor. */
182
+ queryMetadata: QueryMetadata;
183
+ };
184
+ /** Value returned by `ListQueryStore.useItem(...)` and `useMultipleItems(...)`. */
185
+ type TSFDUseListItemReturn<Selected, ItemPayload, QueryMetadata extends undefined | Record<string, unknown> = undefined> = {
186
+ /** Selected item data. Defaults to the full item or `null`. */data: Selected; /** Hook-visible item status, including idle/deleted states for hook ergonomics. */
187
+ status: QueryStatus | 'idle' | 'deleted'; /** Item payload for this result, or `null` when unavailable. */
188
+ payload: ItemPayload | null; /** Requested partial-resource fields that are still pending. */
189
+ loadingFields?: string[]; /** Last item fetch error, if any. */
190
+ error: StoreError | null; /** Convenience flag for `loading` or `refetching` states. */
191
+ isLoading: boolean; /** Stable store key for the current item payload. */
192
+ itemStateKey: string; /** Whether this result has local offline changes that still need to sync to the server. */
193
+ pendingSync: boolean; /** Caller-provided metadata copied from the query descriptor. */
194
+ queryMetadata: QueryMetadata;
195
+ };
196
+ /** Value returned by `ListQueryStore.usePendingOfflineItems(...)`. */
197
+ type TSFDUsePendingOfflineItemsReturn<Selected, ItemPayload extends ValidPayload> = {
198
+ /** Locally created or updated offline items selected by the hook. */items: Selected[]; /** Payloads for locally deleted offline items. */
199
+ deletedItems: ItemPayload[];
200
+ };
201
+ /** One item returned from a list query fetch function. */
202
+ type FetchListFnReturnItem<ItemPayload extends ValidPayload, ItemState extends ValidStoreState> = {
203
+ /** Item payload used to key and refetch the returned item. */itemPayload: ItemPayload; /** Item data returned by the server. */
204
+ data: ItemState;
205
+ };
206
+ /** Return shape for list query fetch functions. */
207
+ type FetchListFnReturn<ItemState extends ValidStoreState, ItemPayload extends ValidPayload> = {
208
+ /** Items included in the fetched page. */items: FetchListFnReturnItem<ItemPayload, ItemState>[]; /** Whether the query has another page available. */
209
+ hasMore: boolean;
210
+ };
211
+ /** Item descriptor accepted by `ListQueryStore.useMultipleItems(...)`. */
212
+ type ListQueryUseMultipleItemsQuery<ItemPayload extends ValidPayload, QueryMetadata extends undefined | Record<string, unknown> = undefined> = {
213
+ /** Item payload to subscribe to and fetch when needed. */payload: ItemPayload;
214
+ /**
215
+ * Partial-resource fields to request for this item.
216
+ *
217
+ * Pass `'*'` to fetch the complete item. This option is required when
218
+ * `partialResources` is enabled and optional otherwise.
219
+ */
220
+ fields?: FieldsInput; /** Metadata returned with this item result for caller-side bookkeeping. */
221
+ queryMetadata?: QueryMetadata;
222
+ /**
223
+ * Only fetches when the item is missing from state, skipping stale-state and
224
+ * invalidation refetches.
225
+ */
226
+ disableRefetches?: boolean; /** Prevents the automatic mount refetch for stale loaded data. */
227
+ disableRefetchOnMount?: boolean; /** Returns `idle` instead of `loading` while the item has not been fetched. */
228
+ returnIdleStatus?: boolean; /** Returns `refetching` instead of keeping `loaded` status during refetches. */
229
+ returnRefetchingStatus?: boolean;
230
+ /**
231
+ * When requested fields are missing but cached partial data exists, return
232
+ * `refetching` instead of `loading`.
233
+ */
234
+ showPartialAsRefetching?: boolean; /** Marks this subscription as off-screen, lowering automatic fetch priority. */
235
+ isOffScreen?: boolean;
236
+ };
237
+ /** Query descriptor accepted by `ListQueryStore.useMultipleListQueries(...)`. */
238
+ type ListQueryUseMultipleListQueriesQuery<QueryPayload extends ValidPayload, QueryMetadata extends undefined | Record<string, unknown> = undefined> = {
239
+ /** Query payload to subscribe to and fetch when needed. */payload: QueryPayload;
240
+ /**
241
+ * Partial-resource fields to request for each item in this query.
242
+ *
243
+ * Pass `'*'` to fetch complete items. This option is required when
244
+ * `partialResources` is enabled and optional otherwise.
245
+ */
246
+ fields?: FieldsInput; /** Metadata returned with this query result for caller-side bookkeeping. */
247
+ queryMetadata?: QueryMetadata; /** Omits `payload` from this query result. */
248
+ omitPayload?: boolean;
249
+ /**
250
+ * Only fetches when the query is missing from state, skipping stale-state and
251
+ * invalidation refetches.
252
+ */
253
+ disableRefetches?: boolean; /** Prevents the automatic mount refetch for stale loaded data. */
254
+ disableRefetchOnMount?: boolean; /** Returns `idle` instead of `loading` while the query has not been fetched. */
255
+ returnIdleStatus?: boolean; /** Returns `refetching` instead of keeping `loaded` status during refetches. */
256
+ returnRefetchingStatus?: boolean;
257
+ /**
258
+ * When requested fields are missing but cached partial data exists, return
259
+ * `refetching` instead of `loading`.
260
+ */
261
+ showPartialAsRefetching?: boolean; /** Marks this subscription as off-screen, lowering automatic fetch priority. */
262
+ isOffScreen?: boolean; /** Number of items to request when fetching this query page. */
263
+ loadSize?: number;
264
+ };
265
+ /** Callback invoked when an already-loaded list query is invalidated. */
266
+ type OnListQueryInvalidate<QueryPayload extends ValidPayload> = (query: QueryPayload, priority: FetchType) => void;
267
+ /** Callback invoked when an already-loaded list-query item is invalidated. */
268
+ type OnListQueryItemInvalidate<ItemState extends ValidStoreState, ItemPayload extends ValidPayload> = (props: {
269
+ /** Current cached item state at invalidation time. */itemState: ItemState; /** Payload of the invalidated item. */
270
+ payload: ItemPayload; /** Fetch priority requested for the invalidation. */
271
+ priority: FetchType;
272
+ }) => void;
273
+ /** Rule for keeping cached list query membership in sync after item updates. */
274
+ type OptimisticListUpdate<ItemState extends ValidStoreState, QueryPayload extends ValidPayload, ItemPayload extends ValidPayload> = {
275
+ /** Query payloads, or a predicate over query payloads, affected by this rule. */queries: QueryPayload | ((query: QueryPayload) => boolean) | QueryPayload[]; /** Restricts this rule to items that should belong in the affected query set. */
276
+ filterItem?: (item: ItemState) => boolean | null; /** Where newly matching items should be inserted in affected query pages. */
277
+ appendNewTo?: 'start' | 'end';
278
+ /**
279
+ * Schedules a background refetch of queries this rule mutated. Leave off
280
+ * unless the optimistic update can't represent the final server state —
281
+ * e.g. server-assigned sort fields (`updatedAt`, computed scores), server-
282
+ * only membership data (permissions), or cursor pagination shifts.
283
+ */
284
+ invalidateQueries?: boolean; /** Sort order to maintain inside affected query pages. */
285
+ sort?: {
286
+ /** Selects sortable values from an item. */sortBy: (item: ItemState, itemPayload: ItemPayload) => string | number | (string | number)[]; /** Sort direction for each `sortBy` value. */
287
+ order?: 'asc' | 'desc' | ('asc' | 'desc')[];
288
+ };
289
+ };
290
+ /** Payload passed to list fetch functions. */
291
+ type QueryFetchPayload<QueryPayload extends ValidPayload> = {
292
+ /** Whether this request loads the first page or a later page. */type: 'load' | 'loadMore'; /** Query payload being fetched. */
293
+ payload: QueryPayload; /** Offset used for offset-paginated fetches. */
294
+ offset: number; /** Maximum number of items requested. */
295
+ limit: number; /** Partial-resource fields requested for each item in the fetched query. */
296
+ fields?: string[];
297
+ };
298
+ /** Options for offset-based list pagination. */
299
+ type OffsetPaginationConfig = {
300
+ /** Largest item count requested when refetching invalidated offset queries. */maxInvalidationLimit: number; /** Max parallel chunk requests during chunked invalidation (default: 3) */
301
+ maxParallel?: number;
302
+ };
303
+ /** Partial-resource helpers used to merge and select field subsets. */
304
+ type PartialResourcesConfig<ItemState extends ValidStoreState> = {
305
+ /** Merges a partial fetch result into an existing item snapshot. */mergeItems: (prev: ItemState | undefined, fetched: ItemState) => ItemState; /** Returns an item containing only the requested fields. */
306
+ selectFields: (fields: string[], item: ItemState) => ItemState;
307
+ /**
308
+ * Reports which logical fields are genuinely present in an item snapshot,
309
+ * or `'*'` when the snapshot is complete.
310
+ *
311
+ * It is the only availability signal for snapshots without loaded-field
312
+ * metadata (manually inserted items, persisted fallback snapshots, offline
313
+ * optimistic rows), but it is also consulted for metadata-tracked items:
314
+ * metadata only records what fetches delivered, so `inferFields` can vouch
315
+ * for fields present beyond the tracked list (e.g. written by a mutation)
316
+ * and avoid refetching data that is already there.
317
+ *
318
+ * Because it can vouch for any snapshot, it must only report fields whose
319
+ * data is genuinely usable — never return `'*'` unconditionally unless
320
+ * every snapshot the store can hold is complete. Staleness is handled by
321
+ * TSDF: fields awaiting an invalidation refetch are excluded before
322
+ * `inferFields` is consulted.
323
+ */
324
+ inferFields: (item: ItemState) => ItemLoadedFields;
325
+ };
326
+ type DerivedQuerySummary<QueryPayload extends ValidPayload> = {
327
+ payload: QueryPayload;
328
+ hasMore: boolean;
329
+ itemCount: number;
330
+ };
331
+ type DerivedQueryItem<ItemState extends ValidStoreState> = {
332
+ key: string;
333
+ data: ItemState;
334
+ };
335
+ /** Why a derived query is currently being resolved. */
336
+ type DerivedQuerySource = 'online' | 'offline' | 'sticky-offline';
337
+ /** Runtime context passed to `derivedQueries.deriveQuery(...)`. */
338
+ type DerivedQueryContext = {
339
+ /** The requested hook fields for this query, when partial resources are enabled. */fields: FieldsInput | undefined; /** Whether the store is currently in offline mode. */
340
+ isOfflineMode: boolean;
341
+ /**
342
+ * What caused derivation to run.
343
+ * `sticky-offline` means a query that was derived offline is still sticking
344
+ * to the local derived view after reconnect, until explicit invalidation.
345
+ */
346
+ deriveSource: DerivedQuerySource;
347
+ };
348
+ /** Configuration for deriving query membership from locally materialized items. */
349
+ type DerivedQueriesConfig<ItemState extends ValidStoreState, QueryPayload extends ValidPayload, ItemPayload extends ValidPayload> = {
350
+ /** Extracts the domain/group key for a query payload. */getQueryGroup: (queryPayload: QueryPayload) => string; /** Extracts the domain/group key for a materialized item. */
351
+ getItemGroup: (item: ItemState, itemPayload: ItemPayload) => string;
352
+ /**
353
+ * Returns whether the local data for the query group is complete enough to
354
+ * derive from while online.
355
+ */
356
+ isComplete: (queryPayload: QueryPayload, context: {
357
+ queries: DerivedQuerySummary<QueryPayload>[];
358
+ }) => boolean;
359
+ /**
360
+ * Computes a derived ordered list of item keys for a query, or `false` to
361
+ * fall back to the regular fetch/cache path. `context.fields` lets the
362
+ * callback decide whether partial-resource queries should still derive.
363
+ */
364
+ deriveQuery: (queryPayload: QueryPayload, items: DerivedQueryItem<ItemState>[], context: DerivedQueryContext) => string[] | false;
365
+ };
366
+ /** Field option shape used by APIs that are conditional on `partialResources`. */
367
+ type FieldsOption<HasPartialResources extends boolean> = HasPartialResources extends true ? {
368
+ /**
369
+ * Partial-resource fields to request.
370
+ *
371
+ * Pass `'*'` to fetch complete items. This option is required when
372
+ * `partialResources` is enabled.
373
+ */
374
+ fields: FieldsInput;
375
+ } : {
376
+ /**
377
+ * Partial-resource fields to request.
378
+ *
379
+ * Pass `'*'` to fetch complete items. This option is optional when
380
+ * `partialResources` is not enabled.
381
+ */
382
+ fields?: FieldsInput;
383
+ };
384
+ //#endregion
81
385
  //#region src/persistentStorage/offlineUploadTypes.d.ts
386
+ /** Lifecycle state for a session-scoped offline upload. */
82
387
  type OfflineUploadState = 'pending' | 'uploading' | 'uploaded' | 'failed';
388
+ /** Source that created a staged offline upload. */
83
389
  type OfflineUploadSource = 'manual' | 'mutation';
390
+ /** Progress snapshot reported while uploading a staged file. */
84
391
  type OfflineUploadProgress = {
85
- progress: number;
86
- loadedBytes?: number;
392
+ /** Normalized progress from `0` to `1`. */progress: number; /** Loaded byte count, when available from the transport. */
393
+ loadedBytes?: number; /** Total byte count, when available from the transport. */
87
394
  totalBytes?: number;
88
395
  };
396
+ /** Public metadata for a file staged for offline mutation replay. */
89
397
  type OfflineUpload<TResolvedRef extends ValidPayload = ValidPayload> = {
90
- id: string;
91
- sessionKey: string;
92
- source: OfflineUploadSource;
93
- state: OfflineUploadState;
94
- fileName: string;
95
- mimeType: string;
96
- sizeBytes: number;
97
- createdAt: number;
98
- updatedAt: number;
99
- resolvedRef?: TResolvedRef;
100
- progress?: OfflineUploadProgress;
398
+ /** Stable upload id used by offline operation inputs. */id: string; /** Session key that owns this upload. */
399
+ sessionKey: string; /** Source that created this upload. */
400
+ source: OfflineUploadSource; /** Current upload lifecycle state. */
401
+ state: OfflineUploadState; /** Original file name. */
402
+ fileName: string; /** MIME type recorded for the staged file. */
403
+ mimeType: string; /** File size in bytes. */
404
+ sizeBytes: number; /** Epoch timestamp when the upload was staged. */
405
+ createdAt: number; /** Epoch timestamp for the latest upload metadata change. */
406
+ updatedAt: number; /** Final server-side reference after upload completes. */
407
+ resolvedRef?: TResolvedRef; /** Latest upload progress snapshot. */
408
+ progress?: OfflineUploadProgress; /** Last upload failure message, when any. */
101
409
  lastError?: {
102
410
  message: string;
103
411
  };
104
412
  };
413
+ /** Persisted offline upload record including the staged file object. */
105
414
  type OfflineStoredUploadRecord<TResolvedRef extends ValidPayload = ValidPayload> = OfflineUpload<TResolvedRef> & {
106
- file: File;
107
- lastOnlineSessionStartedAt?: number;
415
+ /** Staged file blob restored from the upload adapter. */file: File; /** Last online session start time seen before the upload was stored. */
416
+ lastOnlineSessionStartedAt?: number; /** File last-modified timestamp. */
108
417
  lastModified: number;
109
418
  };
419
+ /** Storage backend contract for session-scoped offline upload files. */
110
420
  type OfflineUploadAdapter = {
111
- save<TResolvedRef extends ValidPayload>(sessionKey: string, id: string, record: OfflineStoredUploadRecord<TResolvedRef>): Promise<void>;
112
- load<TResolvedRef extends ValidPayload>(sessionKey: string, id: string): Promise<OfflineStoredUploadRecord<TResolvedRef> | null>;
113
- list<TResolvedRef extends ValidPayload>(sessionKey: string): Promise<OfflineStoredUploadRecord<TResolvedRef>[]>;
114
- remove(sessionKey: string, id: string): Promise<void>;
115
- clearSession(sessionKey: string): Promise<void>;
421
+ /** Saves or replaces one staged upload record. */save<TResolvedRef extends ValidPayload>(sessionKey: string, id: string, record: OfflineStoredUploadRecord<TResolvedRef>): Promise<void>; /** Loads one staged upload record by id. */
422
+ load<TResolvedRef extends ValidPayload>(sessionKey: string, id: string): Promise<OfflineStoredUploadRecord<TResolvedRef> | null>; /** Lists all staged upload records for a session. */
423
+ list<TResolvedRef extends ValidPayload>(sessionKey: string): Promise<OfflineStoredUploadRecord<TResolvedRef>[]>; /** Removes one staged upload record. */
424
+ remove(sessionKey: string, id: string): Promise<void>; /** Removes all staged upload records for a session. */
425
+ clearSession(sessionKey: string): Promise<void>; /** Test-only reset hook used by TSDF internals. */
116
426
  resetForTests?(): void;
117
427
  };
428
+ /** Context passed to the configured offline upload transport. */
118
429
  type OfflineUploadTransportContext = {
119
- id: string;
120
- sessionKey: string;
121
- file: File;
430
+ /** Stable upload id being transported. */id: string; /** Session key that owns this upload. */
431
+ sessionKey: string; /** File to upload. */
432
+ file: File; /** Reports upload progress back to TSDF. */
122
433
  onProgress: (progress: OfflineUploadProgress) => void;
123
434
  };
435
+ /** Upload handling config for an offline session. */
124
436
  type OfflineSessionUploadsConfig<TResolvedRef extends ValidPayload = ValidPayload> = {
125
- adapter: OfflineUploadAdapter;
126
- upload: (ctx: OfflineUploadTransportContext) => Promise<TResolvedRef>;
437
+ /** Adapter used to persist staged files until replay can upload them. */adapter: OfflineUploadAdapter; /** Upload transport that returns the final server-side file reference. */
438
+ upload: (ctx: OfflineUploadTransportContext) => Promise<TResolvedRef>; /** Maximum number of concurrent upload transports. */
127
439
  concurrency?: number;
128
440
  };
441
+ /** Files attached to an offline-capable mutation call, keyed by upload id. */
129
442
  type OfflineMutationUploadsInput = Record<string, Blob | File>;
130
443
  type OfflineAttachedUploadIds = Record<string, string>;
444
+ /** Resolved upload files and references available while an offline operation replays. */
131
445
  type OfflineOperationUploadsContext<TResolvedRef extends ValidPayload = ValidPayload> = {
132
- filesById: Record<string, File>;
446
+ /** Locally staged files by upload id. */filesById: Record<string, File>; /** Final uploaded refs by upload id. */
133
447
  resolvedRefsById: Record<string, TResolvedRef>;
134
448
  };
135
449
  //#endregion
@@ -504,7 +818,7 @@ type OfflineQueueEntry<TInput = unknown, TConflict = unknown> = {
504
818
  };
505
819
  /** Built-in resolution actions for retry exhaustion records. */
506
820
  type OfflineRetryExhaustedResolutionAction = {
507
- action: 'retry';
821
+ /** Requeues the failed mutation for another replay attempt. */action: 'retry';
508
822
  /**
509
823
  * Controls whether retrying a resolution should also requeue retryable
510
824
  * descendants from the same temp-lifecycle dependency chain.
@@ -512,7 +826,7 @@ type OfflineRetryExhaustedResolutionAction = {
512
826
  */
513
827
  scope?: 'self' | 'self-and-descendants';
514
828
  } | {
515
- action: 'discard';
829
+ /** Discards the exhausted mutation and clears its resolution record. */action: 'discard';
516
830
  };
517
831
  /**
518
832
  * Built-in resolution actions for persisted conflict records.
@@ -525,12 +839,12 @@ type OfflineRetryExhaustedResolutionAction = {
525
839
  * @typeParam TResult - Result shape returned by the external conflict resolution call.
526
840
  */
527
841
  type OfflineConflictResolutionAction<TInput = unknown, TResult = unknown> = {
528
- action: 'discard';
842
+ /** Discards the conflict and clears its resolution record. */action: 'discard';
529
843
  } | {
530
- action: 'requeue';
844
+ /** Requeues the operation with replacement input. */action: 'requeue'; /** Replacement operation input. */
531
845
  input: TInput;
532
846
  } | {
533
- action: 'commit';
847
+ /** Commits an externally resolved conflict and clears bookkeeping. */action: 'commit'; /** Result returned by the external conflict resolution call, when needed for reconciliation. */
534
848
  result?: TResult;
535
849
  };
536
850
  /**
@@ -1155,9 +1469,9 @@ type ParsedOfflineResolutionConflictResultForStore<TOperations> = ParsedOfflineR
1155
1469
  * @typeParam TName - Operation name whose stored resolution shape should be extracted.
1156
1470
  */
1157
1471
  type OfflineResolutionRecordForOperation<TOperations, TName extends keyof TOperations & string> = (OfflineConflictResolutionRecord<OperationConflict<TOperations, TName>, OperationInput<TOperations, TName>> & {
1158
- operation: TName;
1472
+ /** Operation name associated with this resolution record. */operation: TName;
1159
1473
  }) | (OfflineRetryExhaustedResolutionRecord<OperationInput<TOperations, TName>> & {
1160
- operation: TName;
1474
+ /** Operation name associated with this resolution record. */operation: TName;
1161
1475
  });
1162
1476
  /**
1163
1477
  * Union of operation-aware offline resolution records for an operation registry.
@@ -1166,6 +1480,7 @@ type OfflineResolutionRecordForOperation<TOperations, TName extends keyof TOpera
1166
1480
  * @typeParam TName - Optional subset of operation names to include.
1167
1481
  */
1168
1482
  type OfflineResolutionRecordForStore<TOperations, TName extends keyof TOperations & string = keyof TOperations & string> = { [K in TName]: OfflineResolutionRecordForOperation<TOperations, K> }[TName];
1483
+ /** Failure code returned when parsing a stored offline conflict payload. */
1169
1484
  type OfflineResolutionConflictParseErrorCode = 'not-conflict' | 'offline-not-configured' | 'operation-not-found' | 'conflict-handling-missing' | 'invalid-conflict-payload';
1170
1485
  /** Error returned when decoding a stored offline conflict payload fails. */
1171
1486
  declare class OfflineResolutionConflictParseError extends Error {
@@ -1184,16 +1499,20 @@ declare class OfflineResolutionConflictParseError extends Error {
1184
1499
  }
1185
1500
  //#endregion
1186
1501
  //#region src/persistentStorage/types.d.ts
1502
+ /** Logical namespaces used by managed async persistent storage. */
1187
1503
  type AsyncStorageNamespaceKind = 'document' | 'collection.item' | 'listQuery.item' | 'listQuery.query' | 'offline.queue' | 'offline.conflict' | 'offline.entity' | '__internal.protected';
1504
+ /** Identifies one logical persistent-storage namespace. */
1188
1505
  type AsyncStorageNamespaceScope = {
1189
- sessionKey: string;
1190
- storeName: string;
1506
+ /** Session key owning this namespace. */sessionKey: string; /** Store id owning this namespace. */
1507
+ storeName: string; /** Type of records stored in this namespace. */
1191
1508
  kind: AsyncStorageNamespaceKind;
1192
1509
  };
1193
1510
  type AsyncStorageTouchMode = 'never' | 'coarse' | 'force';
1511
+ /** Read behavior for managed async namespace operations. */
1194
1512
  type AsyncStorageReadOptions = {
1195
- touch?: AsyncStorageTouchMode;
1513
+ /** Whether reading should update LRU access metadata. */touch?: AsyncStorageTouchMode;
1196
1514
  };
1515
+ /** Sort order for listing async storage metadata. */
1197
1516
  type AsyncStorageMetadataOrder = 'key' | 'lru-asc' | 'lru-desc';
1198
1517
  type AsyncStorageEntryMetadataBase = {
1199
1518
  key: string;
@@ -1206,45 +1525,53 @@ type AsyncStorageEntryMetadataBase = {
1206
1525
  type AsyncStorageEntryMetadata<TCustomMetadata extends Record<string, unknown> = Record<string, unknown>> = AsyncStorageEntryMetadataBase & {
1207
1526
  customMetadata: TCustomMetadata;
1208
1527
  };
1528
+ /** Value and metadata returned from a managed async namespace read. */
1209
1529
  type AsyncStorageNamespaceGetResult<TValue, TCustomMetadata extends Record<string, unknown> = Record<string, unknown>> = {
1210
- value: TValue;
1530
+ /** Stored value decoded from the namespace. */value: TValue; /** Managed metadata associated with the stored value. */
1211
1531
  metadata: AsyncStorageEntryMetadata<TCustomMetadata>;
1212
1532
  };
1533
+ /** Upsert entry committed to a managed async namespace. */
1213
1534
  type AsyncStorageNamespaceCommitUpsert<TValue, TCustomMetadata extends Record<string, unknown> = Record<string, unknown>> = {
1214
- key: string;
1215
- value: TValue;
1216
- serializedValue?: string;
1217
- sizeBytes?: number;
1218
- version: number;
1535
+ /** Raw namespace key to write. */key: string; /** Decoded value to store. */
1536
+ value: TValue; /** Pre-serialized JSON string, when the caller already has it. */
1537
+ serializedValue?: string; /** Serialized JSON size used for persistence budgeting. */
1538
+ sizeBytes?: number; /** Cache version associated with this value. */
1539
+ version: number; /** Custom metadata stored alongside the value. */
1219
1540
  metadata?: TCustomMetadata;
1220
1541
  };
1542
+ /** Touch entry committed to update managed async namespace LRU metadata. */
1221
1543
  type AsyncStorageNamespaceCommitTouch = {
1222
- key: string;
1544
+ /** Raw namespace key to touch. */key: string; /** Explicit access timestamp. Defaults to the adapter's current time. */
1223
1545
  lastAccessAt?: number;
1224
1546
  };
1225
1547
  type AsyncStorageNamespaceStaticPolicy = {
1226
1548
  maxBytes?: number;
1227
1549
  pinnedKeys?: string[];
1228
1550
  };
1551
+ /** Batched write/remove/touch operation for a managed async namespace. */
1229
1552
  type AsyncStorageNamespaceCommitArgs<TValue, TCustomMetadata extends Record<string, unknown> = Record<string, unknown>> = {
1230
- upserts?: AsyncStorageNamespaceCommitUpsert<TValue, TCustomMetadata>[];
1231
- removes?: string[];
1232
- staticPolicy?: AsyncStorageNamespaceStaticPolicy | null;
1553
+ /** Entries to create or replace. */upserts?: AsyncStorageNamespaceCommitUpsert<TValue, TCustomMetadata>[]; /** Raw namespace keys to remove. */
1554
+ removes?: string[]; /** Static cleanup policy applied during this commit. */
1555
+ staticPolicy?: AsyncStorageNamespaceStaticPolicy | null; /** Existing entries whose access metadata should be updated. */
1233
1556
  touches?: AsyncStorageNamespaceCommitTouch[];
1234
1557
  };
1558
+ /** Raw entry passed to low-level async storage driver bulk writes. */
1235
1559
  type AsyncStorageDriverSetEntry = {
1236
- key: string;
1237
- value: unknown;
1238
- serializedValue?: string;
1560
+ /** Raw record key to write. */key: string; /** Raw value to store. */
1561
+ value: unknown; /** Pre-serialized JSON string, when available. */
1562
+ serializedValue?: string; /** Serialized value size used for budgeting. */
1239
1563
  sizeBytes?: number;
1240
1564
  };
1565
+ /** Scope discovered by a low-level async storage driver. */
1241
1566
  type AsyncStorageDiscoveredScope = {
1242
- /** Known raw record keys for this scope. `null` if keys were not enumerated during discovery. */knownRecordKeys: string[] | null;
1567
+ /** Known raw record keys for this scope. `null` if keys were not enumerated during discovery. */knownRecordKeys: string[] | null; /** Discovered namespace scope. */
1243
1568
  scope: AsyncStorageNamespaceScope;
1244
1569
  };
1245
1570
  /** Low-level async backend contract implemented by custom storage drivers. */
1246
1571
  type AsyncStorageDriver = {
1247
- /** Read a single raw record from a logical namespace. */get(scope: AsyncStorageNamespaceScope, key: string): Promise<unknown>; /** Write a single raw record to a logical namespace. */
1572
+ /** Mutable debug logger used by concrete adapters to emit operation timings. */debugLogger?: TSDFDebugLogger; /** Mutable logger used for low-volume production signals. */
1573
+ logger?: TSDFDebugLogger; /** Read a single raw record from a logical namespace. */
1574
+ get(scope: AsyncStorageNamespaceScope, key: string): Promise<unknown>; /** Write a single raw record to a logical namespace. */
1248
1575
  set(scope: AsyncStorageNamespaceScope, key: string, value: unknown): Promise<void>; /** Remove a single raw record from a logical namespace. */
1249
1576
  remove(scope: AsyncStorageNamespaceScope, key: string): Promise<void>; /** List raw record keys within a logical namespace. */
1250
1577
  listKeys(scope: AsyncStorageNamespaceScope): Promise<string[]>; /** Remove every record from a logical namespace. */
@@ -1255,26 +1582,29 @@ type AsyncStorageDriver = {
1255
1582
  setMany(scope: AsyncStorageNamespaceScope, entries: AsyncStorageDriverSetEntry[]): Promise<void>; /** Bulk remove for multiple keys in a single call. */
1256
1583
  removeMany(scope: AsyncStorageNamespaceScope, keys: string[]): Promise<void>;
1257
1584
  };
1585
+ /** Managed namespace handle opened by an async storage adapter. */
1258
1586
  type AsyncStorageNamespaceHandle<TValue, TCustomMetadata extends Record<string, unknown> = Record<string, unknown>> = {
1259
- get(key: string, options?: AsyncStorageReadOptions): Promise<AsyncStorageNamespaceGetResult<TValue, TCustomMetadata> | null>;
1260
- getMany(keys: string[], options?: AsyncStorageReadOptions): Promise<Array<AsyncStorageNamespaceGetResult<TValue, TCustomMetadata> | null>>;
1261
- listKeys(): Promise<string[]>;
1262
- commit(args: AsyncStorageNamespaceCommitArgs<TValue, TCustomMetadata>): Promise<void>;
1587
+ /** Reads one decoded value and metadata by raw namespace key. */get(key: string, options?: AsyncStorageReadOptions): Promise<AsyncStorageNamespaceGetResult<TValue, TCustomMetadata> | null>; /** Reads many decoded values and metadata records by raw namespace key. */
1588
+ getMany(keys: string[], options?: AsyncStorageReadOptions): Promise<Array<AsyncStorageNamespaceGetResult<TValue, TCustomMetadata> | null>>; /** Lists raw record keys in this namespace. */
1589
+ listKeys(): Promise<string[]>; /** Applies batched writes, removes, touches, and cleanup policy changes. */
1590
+ commit(args: AsyncStorageNamespaceCommitArgs<TValue, TCustomMetadata>): Promise<void>; /** Lists metadata for all records in this namespace. */
1263
1591
  listMetadata(args?: {
1264
1592
  order?: AsyncStorageMetadataOrder;
1265
- }): Promise<AsyncStorageEntryMetadata<TCustomMetadata>[]>;
1593
+ }): Promise<AsyncStorageEntryMetadata<TCustomMetadata>[]>; /** Lists metadata matching a custom metadata equality filter. */
1266
1594
  listMetadataByFilter?(args: {
1267
1595
  filter: {
1268
1596
  equals: unknown;
1269
1597
  key: string;
1270
1598
  };
1271
1599
  order?: AsyncStorageMetadataOrder;
1272
- }): Promise<AsyncStorageEntryMetadata<TCustomMetadata>[]>;
1600
+ }): Promise<AsyncStorageEntryMetadata<TCustomMetadata>[]>; /** Removes every record in this namespace. */
1273
1601
  clear(): Promise<void>;
1274
1602
  };
1275
1603
  /** Managed async adapter consumed by TSDF persistence internals. */
1276
1604
  type AsyncStorageAdapter = {
1277
- /** Adapter mode marker used by persistence internals to pick async behavior. */kind: 'async'; /** Open a logical namespace with managed batching and touch guarantees. */
1605
+ /** Adapter mode marker used by persistence internals to pick async behavior. */kind: 'async'; /** Mutable debug logger used by concrete adapters to emit operation timings. */
1606
+ debugLogger?: TSDFDebugLogger; /** Mutable logger used for low-volume production signals. */
1607
+ logger?: TSDFDebugLogger; /** Open a logical namespace with managed batching and touch guarantees. */
1278
1608
  openNamespace<TValue, TCustomMetadata extends Record<string, unknown> = Record<string, unknown>>(scope: AsyncStorageNamespaceScope): AsyncStorageNamespaceHandle<TValue, TCustomMetadata>; /** Reconstruct offline-protected entry refs for a session from persisted metadata. */
1279
1609
  readProtectedStorageKeys(sessionKey: string): Promise<Set<string>>; /** Eagerly sync offline protection changes into persisted metadata for already-cached entries. */
1280
1610
  syncSessionProtectedKeys(sessionKey: string, protectedKeys: Iterable<string>, previousProtectedKeys?: Iterable<string>): Promise<void>; /** Remove all namespaces for a session key. */
@@ -1403,4 +1733,4 @@ type ListQueryPersistentStorageFields<QueryPayload extends ValidPayload, ItemPay
1403
1733
  /** Persistent storage config for ListQueryStore. */
1404
1734
  type ListQueryPersistentStorageConfig<ItemState extends ValidStoreState, QueryPayload extends ValidPayload = ValidPayload, ItemPayload extends ValidPayload = ValidPayload, StorageState = unknown, TOfflineOperations extends ListQueryOfflineOperationsConfig<ItemState, QueryPayload, ItemPayload> = null> = StorePersistentStorageBaseConfig<ItemState, StorageState> & PublicStoreOfflineConfigField<TOfflineOperations> & ListQueryPersistentStorageFields<QueryPayload, ItemPayload>;
1405
1735
  //#endregion
1406
- export { OfflineResolutionRecord as $, DefineListQueryOfflineOperations as A, StoreError as At, OfflineEntityMutationKind as B, RequestSchedulerEventData as Bt, PersistentStorageSchema as C, OfflineUploadAdapter as Ct, CollectionOfflineOperationDefinition as D, OfflineUploadTransportContext as Dt, CollectionOfflineEntityRef as E, OfflineUploadState as Et, ListQueryOfflineEntityRef as F, ValidPayload as Ft, OfflineMutationQueueingPolicy as G, OfflineMutationInput as H, ScheduleFetchOptions as Ht, ListQueryOfflineOperationDefinition as I, ValidStoreState as It, OfflineReplayRetryConfig as J, OfflineOperationKind as K, OfflineAccumulationConfig as L, fetchTypePriority as Lt, DocumentOfflineOperationDefinition as M, StoreMutationError as Mt, GlobalOfflineEntity as N, StoreMutationErrorOptions as Nt, DefineCollectionOfflineOperations as O, MutationSkipped as Ot, GlobalOfflineStatus as P, TSDFStatus as Pt, OfflineResolutionConflictParseErrorCode as Q, OfflineAccumulationMergeContext as R, mutationSkipped as Rt, PersistentStoragePreloadResult as S, OfflineUpload as St, AnyOfflineOperationDefinition as T, OfflineUploadSource as Tt, OfflineMutationQueueingCause as U, ScheduleFetchResults as Ut, OfflineMutationDescriptor as V, RequestSchedulerEvents as Vt, OfflineMutationQueueingConfig as W, OfflineResolutionActionForOperation as X, OfflineResolutionAction as Y, OfflineResolutionConflictParseError as Z, ListQueryOfflineOperationsConfig as _, defaultOfflineRuntimeConfig as _t, AsyncStorageMetadataOrder as a, OfflineSession as at, PersistentStorageDataSchema as b, OfflineSessionUploadsConfig as bt, AsyncStorageNamespaceCommitUpsert as c, OfflineSyncState as ct, AsyncStorageNamespaceKind as d, OfflineTempEntityConfig as dt, OfflineResolutionRecordForOperation as et, AsyncStorageNamespaceScope as f, OfflineTempEntityPendingEntry as ft, DocumentPersistentStorageConfig as g, ParsedOfflineResolutionConflictResultForStore as gt, ConvertedPersistentStorageDataSchema as h, ParsedOfflineResolutionConflictResultForOperation as ht, AsyncStorageDriverSetEntry as i, OfflineRuntimeConfigUpdate as it, DefineOfflineOperation as j, StoreFetchError as jt, DefineDocumentOfflineOperations as k, PayloadDebounce as kt, AsyncStorageNamespaceGetResult as l, OfflineTempEntitiesConfig as lt, CollectionPersistentStorageConfig as m, OperationResult as mt, AsyncStorageDiscoveredScope as n, OfflineRetryExhaustedResolutionAction as nt, AsyncStorageNamespaceCommitArgs as o, OfflineSessionConfig as ot, AsyncStorageReadOptions as p, OperationConflict as pt, OfflineQueueEntry as q, AsyncStorageDriver as r, OfflineRuntimeConfig as rt, AsyncStorageNamespaceCommitTouch as s, OfflineSupersedeConfig as st, AsyncStorageAdapter as t, OfflineResolutionRecordForStore as tt, AsyncStorageNamespaceHandle as u, OfflineTempEntitiesReconciliation as ut, ListQueryPersistentStorageConfig as v, OfflineMutationUploadsInput as vt, StorageAdapter as w, OfflineUploadProgress as wt, PersistentStorageErrorHandler as x, OfflineStoredUploadRecord as xt, PersistentStorageBaseConfig as y, OfflineOperationUploadsContext as yt, OfflineConflictResolutionAction as z, FetchType as zt };
1736
+ export { OfflineResolutionRecord as $, StoreError as $t, DefineListQueryOfflineOperations as A, DerivedQuerySource as At, OfflineEntityMutationKind as B, OptimisticListUpdate as Bt, PersistentStorageSchema as C, OfflineUploadAdapter as Ct, CollectionOfflineOperationDefinition as D, OfflineUploadTransportContext as Dt, CollectionOfflineEntityRef as E, OfflineUploadState as Et, ListQueryOfflineEntityRef as F, ListQueryUseMultipleItemsQuery as Ft, OfflineMutationQueueingPolicy as G, TSFDListQuery as Gt, OfflineMutationInput as H, QueryFetchPayload as Ht, ListQueryOfflineOperationDefinition as I, ListQueryUseMultipleListQueriesQuery as It, OfflineReplayRetryConfig as J, TSFDUseListQueryReturn as Jt, OfflineOperationKind as K, TSFDListQueryState as Kt, OfflineAccumulationConfig as L, OffsetPaginationConfig as Lt, DocumentOfflineOperationDefinition as M, FetchListFnReturnItem as Mt, GlobalOfflineEntity as N, FieldsInput as Nt, DefineCollectionOfflineOperations as O, DerivedQueriesConfig as Ot, GlobalOfflineStatus as P, FieldsOption as Pt, OfflineResolutionConflictParseErrorCode as Q, PayloadDebounce as Qt, OfflineAccumulationMergeContext as R, OnListQueryInvalidate as Rt, PersistentStoragePreloadResult as S, OfflineUpload as St, AnyOfflineOperationDefinition as T, OfflineUploadSource as Tt, OfflineMutationQueueingCause as U, QueryStatus as Ut, OfflineMutationDescriptor as V, PartialResourcesConfig as Vt, OfflineMutationQueueingConfig as W, TSDFItemQuery as Wt, OfflineResolutionActionForOperation as X, MaybeTSDFResult as Xt, OfflineResolutionAction as Y, TSFDUsePendingOfflineItemsReturn as Yt, OfflineResolutionConflictParseError as Z, MutationSkipped as Zt, ListQueryOfflineOperationsConfig as _, TSDFDebugLogger as _n, defaultOfflineRuntimeConfig as _t, AsyncStorageMetadataOrder as a, ValidPayload as an, OfflineSession as at, PersistentStorageDataSchema as b, OfflineSessionUploadsConfig as bt, AsyncStorageNamespaceCommitUpsert as c, mutationSkipped as cn, OfflineSyncState as ct, AsyncStorageNamespaceKind as d, RequestSchedulerEvents as dn, OfflineTempEntityConfig as dt, StoreFetchError as en, OfflineResolutionRecordForOperation as et, AsyncStorageNamespaceScope as f, ScheduleFetchOptions as fn, OfflineTempEntityPendingEntry as ft, DocumentPersistentStorageConfig as g, TSDFDebugLogLevel as gn, ParsedOfflineResolutionConflictResultForStore as gt, ConvertedPersistentStorageDataSchema as h, TSDFDebugLogEntry as hn, ParsedOfflineResolutionConflictResultForOperation as ht, AsyncStorageDriverSetEntry as i, UnwrapTSDFResult as in, OfflineRuntimeConfigUpdate as it, DefineOfflineOperation as j, FetchListFnReturn as jt, DefineDocumentOfflineOperations as k, DerivedQueryContext as kt, AsyncStorageNamespaceGetResult as l, FetchType as ln, OfflineTempEntitiesConfig as lt, CollectionPersistentStorageConfig as m, TSDFDebugLogArea as mn, OperationResult as mt, AsyncStorageDiscoveredScope as n, StoreMutationErrorOptions as nn, OfflineRetryExhaustedResolutionAction as nt, AsyncStorageNamespaceCommitArgs as o, ValidStoreState as on, OfflineSessionConfig as ot, AsyncStorageReadOptions as p, ScheduleFetchResults as pn, OperationConflict as pt, OfflineQueueEntry as q, TSFDUseListItemReturn as qt, AsyncStorageDriver as r, TSDFStatus as rn, OfflineRuntimeConfig as rt, AsyncStorageNamespaceCommitTouch as s, fetchTypePriority as sn, OfflineSupersedeConfig as st, AsyncStorageAdapter as t, StoreMutationError as tn, OfflineResolutionRecordForStore as tt, AsyncStorageNamespaceHandle as u, RequestSchedulerEventData as un, OfflineTempEntitiesReconciliation as ut, ListQueryPersistentStorageConfig as v, TSDFFocusDebugOperation as vn, OfflineMutationUploadsInput as vt, StorageAdapter as w, OfflineUploadProgress as wt, PersistentStorageErrorHandler as x, OfflineStoredUploadRecord as xt, PersistentStorageBaseConfig as y, TSDFLoggerOptions as yn, OfflineOperationUploadsContext as yt, OfflineConflictResolutionAction as z, OnListQueryItemInvalidate as zt };