tsdf 18.1.1 → 18.3.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.
@@ -1,2 +1,2 @@
1
- import { t as createAsyncStorageAdapter } from "./asyncStorageAdapter-DgsuE-T8.js";
1
+ import { t as createAsyncStorageAdapter } from "./asyncStorageAdapter-BDWpJ1vC.js";
2
2
  export { createAsyncStorageAdapter };
@@ -1,2 +1,2 @@
1
- import { i as createAsyncStorageAdapter } from "./asyncStorageAdapter-CxDIO_Pv.js";
1
+ import { i as createAsyncStorageAdapter } from "./asyncStorageAdapter-NrI38v4g.js";
2
2
  export { createAsyncStorageAdapter };
@@ -1,4 +1,4 @@
1
- import { r as AsyncStorageDriver, t as AsyncStorageAdapter } from "./types-BlyGC_PO.js";
1
+ import { r as AsyncStorageDriver, t as AsyncStorageAdapter } from "./types-2UJIjziu.js";
2
2
 
3
3
  //#region src/persistentStorage/asyncStorageAdapter.d.ts
4
4
  declare function createAsyncStorageAdapter(driver: AsyncStorageDriver): AsyncStorageAdapter;
@@ -358,6 +358,30 @@ var OfflineResolutionConflictParseError = class extends Error {
358
358
  this.validationError = args.validationError;
359
359
  }
360
360
  };
361
+ const offlineResolutionActionErrorMessages = {
362
+ "offline-not-configured": "Offline is not configured for this manager",
363
+ "resolution-not-found": "Offline resolution not found in the active session",
364
+ "store-not-registered": "The store that owns this offline resolution is not registered in this manager",
365
+ "retry-not-supported": "Only retry-exhausted offline resolutions can be retried",
366
+ "resolution-blocked": "Cannot resolve a blocked offline resolution before its blocking dependencies are cleared",
367
+ "action-failed": "Failed to apply the offline resolution action"
368
+ };
369
+ /** Error returned when a manager-level offline resolution action is not applied. */
370
+ var OfflineResolutionActionError = class extends Error {
371
+ /** Reason the action was not applied. */
372
+ code;
373
+ /** Resolution id the action was requested for. */
374
+ resolutionId;
375
+ /** Store that owns the resolution, when the resolution was found. */
376
+ storeName;
377
+ constructor(code, resolutionId, storeName, cause) {
378
+ super(`[tsdf] ${offlineResolutionActionErrorMessages[code]}${cause ? `: ${cause.message}` : ""}`, cause && { cause });
379
+ this.name = "OfflineResolutionActionError";
380
+ this.code = code;
381
+ this.resolutionId = resolutionId;
382
+ this.storeName = storeName;
383
+ }
384
+ };
361
385
  //#endregion
362
386
  //#region src/persistentStorage/persistenceUtils.ts
363
387
  const MAINTENANCE_SORT_CHUNK_SIZE = 100;
@@ -622,7 +646,6 @@ function getDefaultMaxBytesForScope(adapter, scopeKind) {
622
646
  //#region src/debug.ts
623
647
  function defaultConsoleDebugLogger(entry) {
624
648
  const consoleForLevel = globalThis.console[entry.level];
625
- if (typeof consoleForLevel !== "function") return;
626
649
  const details = entry.details ? {
627
650
  operation: entry.operation,
628
651
  ...entry.details
@@ -1527,6 +1550,48 @@ var ManagedAsyncStorageAdapter = class {
1527
1550
  if (managedCapabilities?.listManagedKeys !== void 0) return managedCapabilities.listManagedKeys(scope);
1528
1551
  return [...(await this.#readNamespaceIndexEntriesUsingDriver(this.#driver, scope)).keys()].sort((left, right) => left.localeCompare(right));
1529
1552
  }
1553
+ /** Stable id of the storage behind this adapter, if its driver has one. */
1554
+ get storageId() {
1555
+ return this.#driver.storageId;
1556
+ }
1557
+ /**
1558
+ * Lists every scope of the given stores, in every session. Uses the
1559
+ * isolated cleanup driver when available, so this full scan does not fill
1560
+ * the caches of the stores the app is using.
1561
+ */
1562
+ async #listStoreScopes(storeNames) {
1563
+ return (await this.#withCleanupDriver((driver) => this.#listDiscoveredScopes(void 0, driver))).filter((scope) => storeNames.has(scope.storeName));
1564
+ }
1565
+ /**
1566
+ * Removes every namespace of the given stores, in every session. Returns how
1567
+ * many queued offline mutations and pending resolutions each store lost, and
1568
+ * the first failure when some of their data could not be removed.
1569
+ */
1570
+ async removeStores(storeNames) {
1571
+ const unsentRecordsByStore = /* @__PURE__ */ new Map();
1572
+ let failure = null;
1573
+ for (const scope of await this.#listStoreScopes(storeNames)) try {
1574
+ const unsentRecords = await this.#runWithSessionWriterLock(scope.sessionKey, async () => {
1575
+ const count = scope.kind === "offline.queue" || scope.kind === "offline.conflict" ? (await this.listManagedKeys(scope)).length : 0;
1576
+ await this.#clearManagedNamespaceUnlocked(scope, true);
1577
+ return count;
1578
+ });
1579
+ unsentRecordsByStore.set(scope.storeName, (unsentRecordsByStore.get(scope.storeName) ?? 0) + unsentRecords);
1580
+ } catch (error) {
1581
+ failure ??= error;
1582
+ }
1583
+ if (failure === null) {
1584
+ const remainingScopes = await this.#listStoreScopes(storeNames);
1585
+ if (remainingScopes.length > 0) {
1586
+ const storesWithData = new Set(remainingScopes.map(({ storeName }) => `"${storeName}"`));
1587
+ failure = /* @__PURE__ */ new Error(`[tsdf] Some persisted data of removed store(s) ${[...storesWithData].join(", ")} could not be deleted. The cleanup retries on the next page load.`);
1588
+ }
1589
+ }
1590
+ return {
1591
+ unsentRecordsByStore,
1592
+ failure
1593
+ };
1594
+ }
1530
1595
  async clearManagedNamespace(scope) {
1531
1596
  await this.#runWithSessionWriterLock(scope.sessionKey, async () => {
1532
1597
  await this.#clearManagedNamespaceUnlocked(scope, true);
@@ -2223,6 +2288,22 @@ function createAsyncStorageAdapter(driver) {
2223
2288
  return new ManagedAsyncStorageAdapter(driver);
2224
2289
  }
2225
2290
  /**
2291
+ * Returns the adapter's managed implementation and the stable id of its
2292
+ * storage, or `null` when TSDF cannot clean removed stores from it: the
2293
+ * adapter was not created with `createAsyncStorageAdapter` (TSDF cannot list
2294
+ * its namespaces), or its driver has no `storageId` (TSDF cannot remember
2295
+ * across page loads that the cleanup already ran).
2296
+ */
2297
+ function getRemovableStoresAsyncStorage(adapter) {
2298
+ const managedAdapter = managedAsyncStorageAdapters.get(adapter);
2299
+ const storageId = managedAdapter?.storageId;
2300
+ if (managedAdapter === void 0 || storageId === void 0) return null;
2301
+ return {
2302
+ storageId,
2303
+ removeStores: (storeNames) => managedAdapter.removeStores(storeNames)
2304
+ };
2305
+ }
2306
+ /**
2226
2307
  * Drivers with a per-key managed commit (IndexedDB) keep each maintenance
2227
2308
  * transaction short. Drivers without one rewrite the whole namespace index on
2228
2309
  * every commit, so larger batches avoid repeating that work for every few
@@ -2261,4 +2342,4 @@ function serializeProtectedRef(ref) {
2261
2342
  return serializeProtectedRef$1(ref);
2262
2343
  }
2263
2344
  //#endregion
2264
- export { parseAsyncStorageRecordKey as $, serializeJsonForStorage as A, getSessionProtectedKeysSnapshot as B, createShouldIgnoreItemPredicate as C, keepEntriesWithinByteBudget as D, isQuotaExceededError as E, isModeEffectivelyActive as F, parseCompactLocalStorageEntry as G, getNavigatorLockManager as H, isOfflineModeStatusValue as I, getNamespaceId as J, compareMetadata as K, offlineItemEntityRefSchema as L, compactOfflineStatusSnapshotSchema as M, defaultOfflineRuntimeConfig as N, keepEntriesWithinByteBudgetDuringIdle as O, getIsOfflineModeFromStatus as P, normalizeStaticPolicy as Q, offlineResolutionRecordSchema as R, getDefaultMaxBytesForScope as S, getSerializedStringSize as T, warnIfNavigatorLockUnavailable as U, setSessionProtectedKeysSnapshot as V, createCompactLocalStorageEntry as W, getPersistedNamespaceId as X, getPayloadRecordKey as Y, matchesConditionalRemove as Z, getOfflineSessionStatusStorageKey as _, estimateManagedAsyncStorageEntrySizeBytes as a, getTSDFDebugTimingMs as b, isAsyncStorageMetadataOfflineProtected as c, registerAsyncStartupStoreCleanup as d, parsePersistedAsyncNamespaceKind as et, removeAsyncStorageNamespaceEntriesIfUnchanged as f, OFFLINE_SESSION_STATUS_STORE_NAME as g, parseAsyncStorageNamespaceKind as h, createAsyncStorageAdapter as i, scheduleIdleCleanup as it, OfflineResolutionConflictParseError as j, removeAsyncMaintenanceEntriesIfUnchanged as k, mergeManagedAsyncStorageCustomMetadata as l, unregisterAsyncStartupStoreCleanup as m, ASYNC_STORAGE_MAX_AGE_MS as n, INITIAL_MAINTENANCE_CLEANUP_DELAY_MS as nt, getAsyncStorageMaintenanceRemoveBatchSize as o, serializeProtectedRef as p, encodePersistedAsyncNamespaceKind as q, buildPersistedStaticPolicy as r, createIdleCleanupContext as rt, getProtectedKeysFromMetadata as s, ASYNC_MAINTENANCE_LOCAL_STORAGE_KEY as t, serializeProtectedRef$1 as tt, readAsyncStorageNamespaceIndexStateUsingDriver as u, logPersistentStorageQuotaCleanup as v, createTimedKeySet as w, resolveTSDFLogger as x, emitTSDFDebugLog as y, clearSessionProtectedKeysSnapshot as z };
2345
+ export { matchesConditionalRemove as $, removeAsyncMaintenanceEntriesIfUnchanged as A, offlineResolutionRecordSchema as B, getDefaultMaxBytesForScope as C, isQuotaExceededError as D, getSerializedStringSize as E, defaultOfflineRuntimeConfig as F, warnIfNavigatorLockUnavailable as G, getSessionProtectedKeysSnapshot as H, getIsOfflineModeFromStatus as I, compareMetadata as J, createCompactLocalStorageEntry as K, isModeEffectivelyActive as L, OfflineResolutionActionError as M, OfflineResolutionConflictParseError as N, keepEntriesWithinByteBudget as O, compactOfflineStatusSnapshotSchema as P, getPersistedNamespaceId as Q, isOfflineModeStatusValue as R, resolveTSDFLogger as S, createTimedKeySet as T, setSessionProtectedKeysSnapshot as U, clearSessionProtectedKeysSnapshot as V, getNavigatorLockManager as W, getNamespaceId as X, encodePersistedAsyncNamespaceKind as Y, getPayloadRecordKey as Z, OFFLINE_SESSION_STATUS_STORE_NAME as _, estimateManagedAsyncStorageEntrySizeBytes as a, createIdleCleanupContext as at, emitTSDFDebugLog as b, getRemovableStoresAsyncStorage as c, readAsyncStorageNamespaceIndexStateUsingDriver as d, normalizeStaticPolicy as et, registerAsyncStartupStoreCleanup as f, parseAsyncStorageNamespaceKind as g, unregisterAsyncStartupStoreCleanup as h, createAsyncStorageAdapter as i, INITIAL_MAINTENANCE_CLEANUP_DELAY_MS as it, serializeJsonForStorage as j, keepEntriesWithinByteBudgetDuringIdle as k, isAsyncStorageMetadataOfflineProtected as l, serializeProtectedRef as m, ASYNC_STORAGE_MAX_AGE_MS as n, parsePersistedAsyncNamespaceKind as nt, getAsyncStorageMaintenanceRemoveBatchSize as o, scheduleIdleCleanup as ot, removeAsyncStorageNamespaceEntriesIfUnchanged as p, parseCompactLocalStorageEntry as q, buildPersistedStaticPolicy as r, serializeProtectedRef$1 as rt, getProtectedKeysFromMetadata as s, scheduleInitialMaintenanceCleanup as st, ASYNC_MAINTENANCE_LOCAL_STORAGE_KEY as t, parseAsyncStorageRecordKey as tt, mergeManagedAsyncStorageCustomMetadata as u, getOfflineSessionStatusStorageKey as v, createShouldIgnoreItemPredicate as w, getTSDFDebugTimingMs as x, logPersistentStorageQuotaCleanup as y, offlineItemEntityRefSchema as z };
@@ -1,3 +1,3 @@
1
- import { t as opfsPersistentStorage } from "./opfsPersistentStorage-CZThibFg.js";
2
- import { n as indexedDbPersistentStorage } from "./indexedDbPersistentStorage-BEJA8z8c.js";
1
+ import { t as opfsPersistentStorage } from "./opfsPersistentStorage-amwSWm_p.js";
2
+ import { n as indexedDbPersistentStorage } from "./indexedDbPersistentStorage-JJdUGGI8.js";
3
3
  export { indexedDbPersistentStorage, opfsPersistentStorage };
@@ -1,14 +1,12 @@
1
- import { t as AsyncStorageAdapter } from "./types-BlyGC_PO.js";
1
+ import { t as AsyncStorageAdapter } from "./types-2UJIjziu.js";
2
2
  //#region src/persistentStorage/indexedDbAsyncStorageAdapter.d.ts
3
3
  /** Options for creating the IndexedDB persistent storage adapter. */
4
- type IndexedDbPersistentStorageOptions$1 = {
4
+ type IndexedDbPersistentStorageOptions = {
5
5
  /** IndexedDB database name used by the adapter. */databaseName?: string;
6
6
  };
7
7
  //#endregion
8
8
  //#region src/persistentStorage/indexedDbPersistentStorage.d.ts
9
9
  declare const indexedDbPersistentStorage: AsyncStorageAdapter;
10
- /** Options for creating the IndexedDB persistent storage adapter. */
11
- type IndexedDbPersistentStorageOptions = IndexedDbPersistentStorageOptions$1;
12
10
  declare function createIndexedDbPersistentStorage(options?: IndexedDbPersistentStorageOptions): AsyncStorageAdapter;
13
11
  //#endregion
14
12
  export { type IndexedDbPersistentStorageOptions, createIndexedDbPersistentStorage, indexedDbPersistentStorage };
@@ -1,2 +1,2 @@
1
- import { n as indexedDbPersistentStorage, t as createIndexedDbPersistentStorage } from "./indexedDbPersistentStorage-BEJA8z8c.js";
1
+ import { n as indexedDbPersistentStorage, t as createIndexedDbPersistentStorage } from "./indexedDbPersistentStorage-JJdUGGI8.js";
2
2
  export { createIndexedDbPersistentStorage, indexedDbPersistentStorage };
@@ -1,4 +1,4 @@
1
- import { $ as parseAsyncStorageRecordKey, A as serializeJsonForStorage, J as getNamespaceId, K as compareMetadata, Q as normalizeStaticPolicy, X as getPersistedNamespaceId, Y as getPayloadRecordKey, Z as matchesConditionalRemove, a as estimateManagedAsyncStorageEntrySizeBytes, b as getTSDFDebugTimingMs, et as parsePersistedAsyncNamespaceKind, i as createAsyncStorageAdapter, q as encodePersistedAsyncNamespaceKind, tt as serializeProtectedRef, y as emitTSDFDebugLog } from "./asyncStorageAdapter-CxDIO_Pv.js";
1
+ import { $ as matchesConditionalRemove, J as compareMetadata, Q as getPersistedNamespaceId, X as getNamespaceId, Y as encodePersistedAsyncNamespaceKind, Z as getPayloadRecordKey, a as estimateManagedAsyncStorageEntrySizeBytes, b as emitTSDFDebugLog, et as normalizeStaticPolicy, i as createAsyncStorageAdapter, j as serializeJsonForStorage, nt as parsePersistedAsyncNamespaceKind, rt as serializeProtectedRef, tt as parseAsyncStorageRecordKey, x as getTSDFDebugTimingMs } from "./asyncStorageAdapter-NrI38v4g.js";
2
2
  import { __LEGIT_CAST__ } from "@ls-stack/utils/saferTyping";
3
3
  import { isObject } from "@ls-stack/utils/typeGuards";
4
4
  //#region src/persistentStorage/indexedDbAsyncStorageAdapter.ts
@@ -256,8 +256,10 @@ var IndexedDbAsyncStorageDriver = class {
256
256
  #databasePromise = null;
257
257
  #instrumentation;
258
258
  databaseName;
259
+ storageId;
259
260
  constructor(databaseName = DEFAULT_INDEXED_DB_NAME, instrumentation = void 0) {
260
261
  this.databaseName = databaseName;
262
+ this.storageId = `indexedDb:${databaseName}`;
261
263
  this.#instrumentation = instrumentation;
262
264
  }
263
265
  async get(scope, key) {
@@ -369,11 +371,11 @@ var IndexedDbAsyncStorageDriver = class {
369
371
  const entryStore = transaction.objectStore(INDEXED_DB_ENTRY_STORE);
370
372
  const policyStore = transaction.objectStore(INDEXED_DB_NAMESPACE_POLICY_STORE);
371
373
  const discoveredScopes = [];
372
- await iterateCursor(sessionKey === void 0 ? policyStore.openCursor() : policyStore.index("bySession").openCursor(IDBKeyRange.only(sessionKey)), async (cursor) => {
374
+ await iterateCursor(sessionKey === void 0 ? policyStore.openKeyCursor() : policyStore.index("bySession").openKeyCursor(IDBKeyRange.only(sessionKey)), async (cursor) => {
373
375
  const scope = getScopeFromPrimaryKey(cursor.primaryKey);
374
376
  if (scope === null) return;
375
377
  const keys = new Set(["_i"]);
376
- await iterateCursor(entryStore.openCursor(createScopeKeyRange(scope)), (entryCursor) => {
378
+ await iterateCursor(entryStore.openKeyCursor(createScopeKeyRange(scope)), (entryCursor) => {
377
379
  const entryKey = getEntryKeyFromPrimaryKey(entryCursor.primaryKey);
378
380
  if (entryKey === null) return;
379
381
  keys.add(getPayloadRecordKey(entryKey));
package/dist/main.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as OfflineResolutionRecord, $t as StoreError, A as DefineListQueryOfflineOperations, At as DerivedQuerySource, B as OfflineEntityMutationKind, Bt as OptimisticListUpdate, C as PersistentStorageSchema, Ct as OfflineUploadAdapter, D as CollectionOfflineOperationDefinition, Dt as OfflineUploadTransportContext, E as CollectionOfflineEntityRef, Et as OfflineUploadState, F as ListQueryOfflineEntityRef, Ft as ListQueryUseMultipleItemsQuery, G as OfflineMutationQueueingPolicy, Gt as TSFDListQuery, H as OfflineMutationInput, Ht as QueryFetchPayload, I as ListQueryOfflineOperationDefinition, It as ListQueryUseMultipleListQueriesQuery, J as OfflineReplayRetryConfig, Jt as TSFDUseListQueryReturn, K as OfflineOperationKind, Kt as TSFDListQueryState, L as OfflineAccumulationConfig, Lt as OffsetPaginationConfig, M as DocumentOfflineOperationDefinition, Mt as FetchListFnReturnItem, N as GlobalOfflineEntity, Nt as FieldsInput, O as DefineCollectionOfflineOperations, Ot as DerivedQueriesConfig, P as GlobalOfflineStatus, Pt as FieldsOption, Q as OfflineResolutionConflictParseErrorCode, Qt as PayloadDebounce, R as OfflineAccumulationMergeContext, Rt as OnListQueryInvalidate, S as PersistentStoragePreloadResult, St as OfflineUpload, T as AnyOfflineOperationDefinition, Tt as OfflineUploadSource, U as OfflineMutationQueueingCause, Ut as QueryStatus, V as OfflineMutationDescriptor, Vt as PartialResourcesConfig, W as OfflineMutationQueueingConfig, Wt as TSDFItemQuery, X as OfflineResolutionActionForOperation, Xt as MaybeTSDFResult, Y as OfflineResolutionAction, Yt as TSFDUsePendingOfflineItemsReturn, Z as OfflineResolutionConflictParseError, Zt as MutationSkipped, _ as ListQueryOfflineOperationsConfig, _n as TSDFDebugLogger, _t as defaultOfflineRuntimeConfig, a as AsyncStorageMetadataOrder, an as ValidPayload, at as OfflineSession, b as PersistentStorageDataSchema, bt as OfflineSessionUploadsConfig, c as AsyncStorageNamespaceCommitUpsert, cn as mutationSkipped, ct as OfflineSyncState, d as AsyncStorageNamespaceKind, dn as RequestSchedulerEvents, dt as OfflineTempEntityConfig, en as StoreFetchError, et as OfflineResolutionRecordForOperation, f as AsyncStorageNamespaceScope, fn as ScheduleFetchOptions, ft as OfflineTempEntityPendingEntry, g as DocumentPersistentStorageConfig, gn as TSDFDebugLogLevel, gt as ParsedOfflineResolutionConflictResultForStore, h as ConvertedPersistentStorageDataSchema, hn as TSDFDebugLogEntry, ht as ParsedOfflineResolutionConflictResultForOperation, i as AsyncStorageDriverSetEntry, in as UnwrapTSDFResult, it as OfflineRuntimeConfigUpdate, j as DefineOfflineOperation, jt as FetchListFnReturn, k as DefineDocumentOfflineOperations, kt as DerivedQueryContext, l as AsyncStorageNamespaceGetResult, ln as FetchType, lt as OfflineTempEntitiesConfig, m as CollectionPersistentStorageConfig, mn as TSDFDebugLogArea, mt as OperationResult, n as AsyncStorageDiscoveredScope, nn as StoreMutationErrorOptions, nt as OfflineRetryExhaustedResolutionAction, o as AsyncStorageNamespaceCommitArgs, on as ValidStoreState, ot as OfflineSessionConfig, p as AsyncStorageReadOptions, pn as ScheduleFetchResults, pt as OperationConflict, q as OfflineQueueEntry, qt as TSFDUseListItemReturn, r as AsyncStorageDriver, rn as TSDFStatus, rt as OfflineRuntimeConfig, s as AsyncStorageNamespaceCommitTouch, sn as fetchTypePriority, st as OfflineSupersedeConfig, t as AsyncStorageAdapter, tn as StoreMutationError, tt as OfflineResolutionRecordForStore, u as AsyncStorageNamespaceHandle, un as RequestSchedulerEventData, ut as OfflineTempEntitiesReconciliation, v as ListQueryPersistentStorageConfig, vn as TSDFFocusDebugOperation, vt as OfflineMutationUploadsInput, w as StorageAdapter, wt as OfflineUploadProgress, x as PersistentStorageErrorHandler, xt as OfflineStoredUploadRecord, y as PersistentStorageBaseConfig, yn as TSDFLoggerOptions, yt as OfflineOperationUploadsContext, z as OfflineConflictResolutionAction, zt as OnListQueryItemInvalidate } from "./types-BlyGC_PO.js";
1
+ import { $ as OfflineResolutionConflictParseError, $t as TSFDUseListQueryReturn, A as DefineListQueryOfflineOperations, At as OfflineUploadTransportContext, B as OfflineEntityMutationKind, Bt as ListQueryUseMultipleItemsQuery, C as PersistentStorageSchema, Cn as TSDFFocusDebugOperation, Ct as OfflineSessionUploadsConfig, D as CollectionOfflineOperationDefinition, Dt as OfflineUploadProgress, E as CollectionOfflineEntityRef, Et as OfflineUploadAdapter, F as ListQueryOfflineEntityRef, Ft as DerivedQuerySource, G as OfflineMutationQueueingPolicy, Gt as OptimisticListUpdate, H as OfflineMutationInput, Ht as OffsetPaginationConfig, I as ListQueryOfflineOperationDefinition, It as FetchListFnReturn, J as OfflineReplayRetryConfig, Jt as QueryStatus, K as OfflineOperationKind, Kt as PartialResourcesConfig, L as OfflineAccumulationConfig, Lt as FetchListFnReturnItem, M as DocumentOfflineOperationDefinition, Mt as SaveOfflineUploadArgs, N as GlobalOfflineEntity, Nt as DerivedQueriesConfig, O as DefineCollectionOfflineOperations, Ot as OfflineUploadSource, P as GlobalOfflineStatus, Pt as DerivedQueryContext, Q as OfflineResolutionActionForOperation, Qt as TSFDUseListItemReturn, R as OfflineAccumulationMergeContext, Rt as FieldsInput, S as PersistentStoragePreloadResult, Sn as TSDFDebugLogger, St as OfflineOperationUploadsContext, T as AnyOfflineOperationDefinition, Tt as OfflineUpload, U as OfflineMutationQueueingCause, Ut as OnListQueryInvalidate, V as OfflineMutationDescriptor, Vt as ListQueryUseMultipleListQueriesQuery, W as OfflineMutationQueueingConfig, Wt as OnListQueryItemInvalidate, X as OfflineResolutionActionError, Xt as TSFDListQuery, Y as OfflineResolutionAction, Yt as TSDFItemQuery, Z as OfflineResolutionActionErrorCode, Zt as TSFDListQueryState, _ as ListQueryOfflineOperationsConfig, _n as ScheduleFetchOptions, _t as OperationResult, a as AsyncStorageMetadataOrder, an as StoreFetchError, at as OfflineRetryExhaustedResolutionAction, b as PersistentStorageDataSchema, bn as TSDFDebugLogEntry, bt as defaultOfflineRuntimeConfig, c as AsyncStorageNamespaceCommitUpsert, cn as TSDFStatus, ct as OfflineSession, d as AsyncStorageNamespaceKind, dn as ValidStoreState, dt as OfflineSyncState, en as TSFDUsePendingOfflineItemsReturn, et as OfflineResolutionConflictParseErrorCode, f as AsyncStorageNamespaceScope, fn as fetchTypePriority, ft as OfflineTempEntitiesConfig, g as DocumentPersistentStorageConfig, gn as RequestSchedulerEvents, gt as OperationConflict, h as ConvertedPersistentStorageDataSchema, hn as RequestSchedulerEventData, ht as OfflineTempEntityPendingEntry, i as AsyncStorageDriverSetEntry, in as StoreError, it as OfflineResolutionRecordForStore, j as DefineOfflineOperation, jt as ReplaceOfflineUploadArgs, k as DefineDocumentOfflineOperations, kt as OfflineUploadState, l as AsyncStorageNamespaceGetResult, ln as UnwrapTSDFResult, lt as OfflineSessionConfig, m as CollectionPersistentStorageConfig, mn as FetchType, mt as OfflineTempEntityConfig, n as AsyncStorageDiscoveredScope, nn as MutationSkipped, nt as OfflineResolutionRecord, o as AsyncStorageNamespaceCommitArgs, on as StoreMutationError, ot as OfflineRuntimeConfig, p as AsyncStorageReadOptions, pn as mutationSkipped, pt as OfflineTempEntitiesReconciliation, q as OfflineQueueEntry, qt as QueryFetchPayload, r as AsyncStorageDriver, rn as PayloadDebounce, rt as OfflineResolutionRecordForOperation, s as AsyncStorageNamespaceCommitTouch, sn as StoreMutationErrorOptions, st as OfflineRuntimeConfigUpdate, t as AsyncStorageAdapter, tn as MaybeTSDFResult, tt as OfflineResolutionGenericAction, u as AsyncStorageNamespaceHandle, un as ValidPayload, ut as OfflineSupersedeConfig, v as ListQueryPersistentStorageConfig, vn as ScheduleFetchResults, vt as ParsedOfflineResolutionConflictResultForOperation, w as StorageAdapter, wn as TSDFLoggerOptions, wt as OfflineStoredUploadRecord, x as PersistentStorageErrorHandler, xn as TSDFDebugLogLevel, xt as OfflineMutationUploadsInput, y as PersistentStorageBaseConfig, yn as TSDFDebugLogArea, yt as ParsedOfflineResolutionConflictResultForStore, z as OfflineConflictResolutionAction, zt as FieldsOption } from "./types-2UJIjziu.js";
2
2
  import { __LEGIT_ANY__ } from "@ls-stack/utils/saferTyping";
3
3
  import { Emitter } from "evtmitter";
4
4
  import { Context } from "react";
@@ -19,6 +19,19 @@ type OfflineMutationResult<T> = {
19
19
  /** The mutation was durably queued for offline replay. */kind: 'queued';
20
20
  };
21
21
  //#endregion
22
+ //#region src/persistentStorage/removedStoresCleanup.d.ts
23
+ /** A store deleted from the app, declared in `createStoreManager({ removedStores })`. */
24
+ type RemovedStore = {
25
+ /** Id the deleted store used. */readonly id: string;
26
+ /**
27
+ * Adapter the deleted store persisted its data with. Add one entry per
28
+ * adapter when the store used more than one. Custom async adapters must be
29
+ * created with `createAsyncStorageAdapter` from a driver with a
30
+ * `storageId`.
31
+ */
32
+ readonly adapter: StorageAdapter;
33
+ };
34
+ //#endregion
22
35
  //#region src/utils/performMutation.d.ts
23
36
  /** Starts a temporary window-close block while a mutation is in progress. */
24
37
  type BlockWindowCloseHandler = () => {
@@ -56,18 +69,29 @@ type StoreManagerOfflineApi<TUploadRef extends ValidPayload = ValidPayload> = {
56
69
  resetOfflineRuntimeConfig: () => void; /** Returns the latest aggregated offline status for this manager. */
57
70
  getOfflineStatus: () => GlobalOfflineStatus; /** Returns the latest aggregated offline entities for this manager. */
58
71
  getOfflineEntities: () => readonly GlobalOfflineEntity[]; /** Returns the latest aggregated offline resolutions for this manager. */
59
- getOfflineResolutions: () => readonly OfflineResolutionRecord[]; /** Returns the latest session-scoped offline uploads for this manager. */
72
+ getOfflineResolutions: () => readonly OfflineResolutionRecord[];
73
+ /**
74
+ * Applies a generic `retry` / `discard` action to any resolution listed by
75
+ * `getOfflineResolutions()` / `useOfflineResolutions()`, delegating to the
76
+ * store that owns it. Equivalent to calling that store's
77
+ * `resolveOfflineResolution(id, operation, { action })`, without needing the
78
+ * store instance or the operation name.
79
+ *
80
+ * Failures are returned instead of thrown: when the action is not applied,
81
+ * the result is an `OfflineResolutionActionError` whose `code` says why
82
+ * (unknown id, owning store not created with this manager, `retry` on a
83
+ * conflict, blocked resolution, ...). `requeue` and `commit` need
84
+ * operation-typed input and stay on the owning store API.
85
+ *
86
+ * A record can be retried when `kind === 'retry-exhausted'`, and can be
87
+ * retried or discarded only while `blockedResolutionCount === 0`.
88
+ */
89
+ resolveOfflineResolution: (resolutionId: string, action: OfflineResolutionGenericAction) => Promise<Result<void, OfflineResolutionActionError>>; /** Returns the latest session-scoped offline uploads for this manager. */
60
90
  getOfflineUploads: () => readonly OfflineUpload<TUploadRef>[]; /** Resolves a staged upload id to its latest final ref, uploading first if needed. */
61
91
  resolveOfflineUpload: (id: string) => Promise<Result<TUploadRef, Error>>; /** Resolves multiple staged upload ids to their latest final refs. */
62
92
  resolveOfflineUploads: (ids: readonly string[]) => Promise<Result<Record<string, TUploadRef>, Error>>; /** Saves a session-scoped upload locally for later dependency resolution. */
63
- saveOfflineUpload: (args: {
64
- id: string;
65
- file: Blob | File;
66
- }) => Promise<Result<void, Error>>; /** Replaces a previously stored session-scoped upload. */
67
- replaceOfflineUpload: (args: {
68
- id: string;
69
- file: Blob | File;
70
- }) => Promise<Result<void, Error>>; /** Loads a previously stored session-scoped upload. */
93
+ saveOfflineUpload: (args: SaveOfflineUploadArgs) => Promise<Result<void, Error>>; /** Replaces a previously stored session-scoped upload, keeping its metadata unless new metadata is passed. */
94
+ replaceOfflineUpload: (args: ReplaceOfflineUploadArgs) => Promise<Result<void, Error>>; /** Loads a previously stored session-scoped upload. */
71
95
  loadOfflineUpload: (id: string) => Promise<Result<File | null, Error>>; /** Deletes a stored upload when it is no longer referenced. */
72
96
  deleteOfflineUpload: (id: string) => Promise<Result<void, Error>>; /** React hook subscribing to the manager's aggregated offline status. */
73
97
  useOfflineStatus: () => GlobalOfflineStatus; /** React hook subscribing to the manager's aggregated offline entities. */
@@ -85,7 +109,14 @@ type StoreManager<TUploadRef extends ValidPayload = ValidPayload> = {
85
109
  onMutationError: StoreManagerMutationErrorHandler | undefined; /** Shared defaults used by attached stores unless a store-level override exists. */
86
110
  storeDefaults: StoreManagerStoreDefaults; /** Returns the unique ids of all currently registered store instances. */
87
111
  getAllStoreIds: () => string[]; /** Resets all registered stores except the ignored logical ids. */
88
- resetAll: (ignoreStores: string[]) => void; /** Signals a shared real-time transport reconnect to all registered stores. */
112
+ resetAll: (ignoreStores: string[]) => void;
113
+ /**
114
+ * Signals a shared real-time transport reconnect to all registered stores.
115
+ * While the offline session is in offline mode it only re-checks
116
+ * connectivity instead: each store is revalidated when it recovers (the session is back online, its queued
117
+ * mutations finished replaying and the store has nothing left waiting for
118
+ * a manual resolution).
119
+ */
89
120
  onTransportReconnect: () => void;
90
121
  } & StoreManagerOfflineApi<TUploadRef>;
91
122
  /** Options used to create a shared TSDF store manager. */
@@ -114,6 +145,32 @@ type CreateStoreManagerOptions<TUploadRef extends ValidPayload = ValidPayload> =
114
145
  debugLogger?: TSDFLoggerOptions; /** Enables low-volume production-safe logs. Defaults to console logging; pass `false` to disable. */
115
146
  logger?: TSDFLoggerOptions; /** Optional shared offline session config for every attached store. */
116
147
  offlineSession?: OfflineSessionConfig<TUploadRef>;
148
+ /**
149
+ * Stores deleted from the app whose persisted data should be removed.
150
+ *
151
+ * Once, during idle time after startup, TSDF removes everything each listed
152
+ * store persisted with its adapter, in every session: cached data, offline
153
+ * entity records, and any queued offline mutations or pending resolutions,
154
+ * which no store can replay anymore. Unsent records it deletes are reported
155
+ * once through `onPersistentStorageError`. Later startups only read a small
156
+ * marker listing the id and adapter pairs already cleaned, so entries can be
157
+ * removed from this list once every user has run a version that includes
158
+ * them. An adapter that fails is reported and retried on the next startup.
159
+ *
160
+ * A listed id cannot be used by a store attached to this manager.
161
+ *
162
+ * @example
163
+ * ```ts
164
+ * createStoreManager({
165
+ * // ...
166
+ * removedStores: [
167
+ * { id: 'legacy-settings', adapter: 'local-sync' },
168
+ * { id: 'old-feed', adapter: indexedDbPersistentStorage },
169
+ * ],
170
+ * });
171
+ * ```
172
+ */
173
+ removedStores?: readonly RemovedStore[];
117
174
  };
118
175
  declare function createStoreManager<TUploadRef extends ValidPayload = ValidPayload>(options: CreateStoreManagerOptions<TUploadRef>): StoreManager<TUploadRef>;
119
176
  //#endregion
@@ -248,7 +305,9 @@ type CollectionStoreOptions<ItemState extends ValidStoreState, ItemPayload exten
248
305
  revalidateOnWindowFocus?: boolean | (() => boolean);
249
306
  /** Reconnect-specific cooldown. Defaults to 2,000ms. The first reconnect revalidates immediately;
250
307
  * additional reconnects within the cooldown are coalesced into one trailing
251
- * revalidation. Set to `0` to disable this cooldown. */
308
+ * revalidation. Recovering from offline mode waits one cooldown for a
309
+ * reconnect before revalidating, so the two share one revalidation. Set to
310
+ * `0` to disable this cooldown. */
252
311
  transportReconnectCooldownMs?: number; /** Called when an already-loaded item is invalidated. */
253
312
  onInvalidate?: OnCollectionItemInvalidate<ItemState, ItemPayload>; /** Observes request scheduler lifecycle events for this store. */
254
313
  onSchedulerEvent?: (event: RequestSchedulerEvents, data?: RequestSchedulerEventData) => void;
@@ -475,7 +534,9 @@ type DocumentStoreOptions<State extends ValidStoreState, TOfflineOperations exte
475
534
  revalidateOnWindowFocus?: boolean | (() => boolean);
476
535
  /** Reconnect-specific cooldown. Defaults to 2,000ms. The first reconnect revalidates immediately;
477
536
  * additional reconnects within the cooldown are coalesced into one trailing
478
- * revalidation. Set to `0` to disable this cooldown. */
537
+ * revalidation. Recovering from offline mode waits one cooldown for a
538
+ * reconnect before revalidating, so the two share one revalidation. Set to
539
+ * `0` to disable this cooldown. */
479
540
  transportReconnectCooldownMs?: number; /** Delay applied to medium-priority requests before they enter the scheduler. */
480
541
  mediumPriorityDelayMs?: number; /** Observes request scheduler lifecycle events for this store. */
481
542
  onSchedulerEvent?: (event: RequestSchedulerEvents, data?: RequestSchedulerEventData) => void;
@@ -1111,7 +1172,9 @@ type ListQueryStoreOptionsBase<ItemState extends ValidStoreState, QueryPayload e
1111
1172
  revalidateOnWindowFocus?: boolean | (() => boolean);
1112
1173
  /** Reconnect-specific cooldown. Defaults to 2,000ms. The first reconnect revalidates immediately;
1113
1174
  * additional reconnects within the cooldown are coalesced into one trailing
1114
- * revalidation. Set to `0` to disable this cooldown. */
1175
+ * revalidation. Recovering from offline mode waits one cooldown for a
1176
+ * reconnect before revalidating, so the two share one revalidation. Set to
1177
+ * `0` to disable this cooldown. */
1115
1178
  transportReconnectCooldownMs?: number; /** Rules that keep cached query membership in sync after item updates. */
1116
1179
  optimisticListUpdates?: OptimisticListUpdate<ItemState, QueryPayload, ItemPayload>[]; /** Called when an already-loaded query is invalidated. */
1117
1180
  onInvalidateQuery?: OnListQueryInvalidate<QueryPayload>; /** Called when an already-loaded item is invalidated. */
@@ -1318,4 +1381,4 @@ declare function clearAllSessionStorage(sessionKey: string): Promise<void>;
1318
1381
  //#region src/persistentStorage/opfsOfflineUploadAdapter.d.ts
1319
1382
  declare const opfsOfflineUploadAdapter: OfflineUploadAdapter;
1320
1383
  //#endregion
1321
- export { type AsyncStorageAdapter, type AsyncStorageDiscoveredScope, type AsyncStorageDriver, type AsyncStorageDriverSetEntry, type AsyncStorageMetadataOrder, type AsyncStorageNamespaceCommitArgs, type AsyncStorageNamespaceCommitTouch, type AsyncStorageNamespaceCommitUpsert, type AsyncStorageNamespaceGetResult, type AsyncStorageNamespaceHandle, type AsyncStorageNamespaceKind, type AsyncStorageNamespaceScope, type AsyncStorageReadOptions, type BlockWindowCloseHandler, CollectionItemStatus, type CollectionOfflineEntityRef, type CollectionOfflineOperationDefinition, type CollectionPersistentStorageConfig, CollectionStateCleanup, CollectionStore, CollectionStoreEvents, CollectionStoreOptions, CollectionStoreStoreEvents, CollectionUseMultipleItemsQuery, type ConvertedPersistentStorageDataSchema, type CreateStoreManagerOptions, type DefineCollectionOfflineOperations, type DefineDocumentOfflineOperations, type DefineListQueryOfflineOperations, type DefineOfflineOperation, type DerivedQueriesConfig, type DerivedQueryContext, type DerivedQuerySource, type DocumentOfflineOperationDefinition, type DocumentPersistentStorageConfig, DocumentStatus, DocumentStore, DocumentStoreOptions, DocumentStoreState, DocumentStoreStoreEvents, type DynamicRealtimeThrottleMs, type FetchListFnReturn, type FetchListFnReturnItem, type FieldsInput, type FieldsOption, GET_ALL, type GlobalOfflineEntity, type GlobalOfflineStatus, IsOffScreenContext, type ListQueryOfflineEntityRef, type ListQueryOfflineOperationDefinition, type ListQueryPersistentStorageConfig, type ListQueryStore, type ListQueryStoreEvents, type ListQueryStoreOptions, type ListQueryUseMultipleItemsQuery, type ListQueryUseMultipleListQueriesQuery, type MaybeTSDFResult, type MutationDebounce, type MutationSkipped, type OfflineAccumulationConfig, type OfflineAccumulationMergeContext, type OfflineConflictResolutionAction, type OfflineEntityMutationKind, type OfflineMutationDescriptor, type OfflineMutationInput, type OfflineMutationQueueingCause, type OfflineMutationQueueingConfig, type OfflineMutationQueueingPolicy, type OfflineMutationResult, type OfflineMutationUploadsInput, type OfflineOperationKind, type OfflineOperationUploadsContext, type OfflineQueueEntry, type OfflineReplayRetryConfig, type OfflineResolutionAction, type OfflineResolutionActionForOperation, type OfflineResolutionConflictParseError, type OfflineResolutionConflictParseErrorCode, type OfflineResolutionRecord, type OfflineResolutionRecordForOperation, type OfflineResolutionRecordForStore, type OfflineRetryExhaustedResolutionAction, type OfflineRuntimeConfig, type OfflineRuntimeConfigUpdate, type OfflineSession, type OfflineSessionConfig, type OfflineSessionUploadsConfig, type OfflineStoredUploadRecord, type OfflineSupersedeConfig, type OfflineSyncState, type OfflineTempEntitiesConfig, type OfflineTempEntitiesReconciliation, type OfflineTempEntityConfig, type OfflineTempEntityPendingEntry, type OfflineUpload, type OfflineUploadAdapter, type OfflineUploadProgress, type OfflineUploadSource, type OfflineUploadState, type OfflineUploadTransportContext, type OffsetPaginationConfig, OnCollectionItemInvalidate, OnDocumentInvalidate, type OnListQueryInvalidate, type OnListQueryItemInvalidate, type OperationConflict, type OperationResult, type OptimisticListUpdate, type ParsedOfflineResolutionConflictResultForOperation, type PartialResourcesConfig, type PayloadDebounce, type PersistentStorageBaseConfig, type PersistentStorageDataSchema, type PersistentStoragePreloadResult, type PersistentStorageSchema, type QueryFetchPayload, type QueryStatus, type StorageAdapter, type StoreError, StoreFetchError, type StoreManager, StoreMutationError, type StoreMutationErrorOptions, type TSDFDebugLogArea, type TSDFDebugLogEntry, type TSDFDebugLogLevel, type TSDFDebugLogger, type TSDFFocusDebugOperation, type TSDFItemQuery, type TSDFLoggerOptions, type TSDFStatus, TSDFUseDocumentReturn, TSFDCollectionItem, TSFDCollectionState, type TSFDListQuery, type TSFDListQueryState, TSFDUseCollectionItemReturn, type TSFDUseListItemReturn, type TSFDUseListQueryReturn, type TSFDUsePendingOfflineItemsReturn, type ValidPayload, type ValidStoreState, clearAllSessionStorage, clearSessionStorage, createCollectionStore, createDocumentStore, createListQueryStore, createStoreManager, defaultOfflineRuntimeConfig, fetchTypePriority, getGlobalOfflineEntities, getGlobalOfflineResolutions, getGlobalOfflineStatus, localPersistentStorage, mutationSkipped, opfsOfflineUploadAdapter, useGlobalOfflineEntities, useGlobalOfflineResolutions, useGlobalOfflineStatus };
1384
+ export { type AsyncStorageAdapter, type AsyncStorageDiscoveredScope, type AsyncStorageDriver, type AsyncStorageDriverSetEntry, type AsyncStorageMetadataOrder, type AsyncStorageNamespaceCommitArgs, type AsyncStorageNamespaceCommitTouch, type AsyncStorageNamespaceCommitUpsert, type AsyncStorageNamespaceGetResult, type AsyncStorageNamespaceHandle, type AsyncStorageNamespaceKind, type AsyncStorageNamespaceScope, type AsyncStorageReadOptions, type BlockWindowCloseHandler, type CollectionOfflineEntityRef, type CollectionOfflineOperationDefinition, type CollectionPersistentStorageConfig, CollectionStateCleanup, CollectionStore, CollectionStoreEvents, CollectionStoreOptions, CollectionStoreStoreEvents, CollectionUseMultipleItemsQuery, type ConvertedPersistentStorageDataSchema, type CreateStoreManagerOptions, type DefineCollectionOfflineOperations, type DefineDocumentOfflineOperations, type DefineListQueryOfflineOperations, type DefineOfflineOperation, type DerivedQueriesConfig, type DerivedQueryContext, type DerivedQuerySource, type DocumentOfflineOperationDefinition, type DocumentPersistentStorageConfig, DocumentStatus, DocumentStore, DocumentStoreOptions, DocumentStoreState, DocumentStoreStoreEvents, type DynamicRealtimeThrottleMs, type FetchListFnReturn, type FetchListFnReturnItem, type FieldsInput, type FieldsOption, GET_ALL, type GlobalOfflineEntity, type GlobalOfflineStatus, IsOffScreenContext, type ListQueryOfflineEntityRef, type ListQueryOfflineOperationDefinition, type ListQueryPersistentStorageConfig, type ListQueryStore, type ListQueryStoreEvents, type ListQueryStoreOptions, type ListQueryUseMultipleItemsQuery, type ListQueryUseMultipleListQueriesQuery, type MaybeTSDFResult, type MutationDebounce, type MutationSkipped, type OfflineAccumulationConfig, type OfflineAccumulationMergeContext, type OfflineConflictResolutionAction, type OfflineEntityMutationKind, type OfflineMutationDescriptor, type OfflineMutationInput, type OfflineMutationQueueingCause, type OfflineMutationQueueingConfig, type OfflineMutationQueueingPolicy, type OfflineMutationResult, type OfflineMutationUploadsInput, type OfflineOperationKind, type OfflineOperationUploadsContext, type OfflineQueueEntry, type OfflineReplayRetryConfig, type OfflineResolutionAction, type OfflineResolutionActionError, type OfflineResolutionActionErrorCode, type OfflineResolutionActionForOperation, type OfflineResolutionConflictParseError, type OfflineResolutionConflictParseErrorCode, type OfflineResolutionGenericAction, type OfflineResolutionRecord, type OfflineResolutionRecordForOperation, type OfflineResolutionRecordForStore, type OfflineRetryExhaustedResolutionAction, type OfflineRuntimeConfig, type OfflineRuntimeConfigUpdate, type OfflineSession, type OfflineSessionConfig, type OfflineSessionUploadsConfig, type OfflineStoredUploadRecord, type OfflineSupersedeConfig, type OfflineSyncState, type OfflineTempEntitiesConfig, type OfflineTempEntitiesReconciliation, type OfflineTempEntityConfig, type OfflineTempEntityPendingEntry, type OfflineUpload, type OfflineUploadAdapter, type OfflineUploadProgress, type OfflineUploadSource, type OfflineUploadState, type OfflineUploadTransportContext, type OffsetPaginationConfig, OnCollectionItemInvalidate, OnDocumentInvalidate, type OnListQueryInvalidate, type OnListQueryItemInvalidate, type OperationConflict, type OperationResult, type OptimisticListUpdate, type ParsedOfflineResolutionConflictResultForOperation, type PartialResourcesConfig, type PayloadDebounce, type PersistentStorageBaseConfig, type PersistentStorageDataSchema, type PersistentStoragePreloadResult, type PersistentStorageSchema, type QueryFetchPayload, type QueryStatus, type RemovedStore, type ReplaceOfflineUploadArgs, type SaveOfflineUploadArgs, type StorageAdapter, type StoreError, StoreFetchError, type StoreManager, StoreMutationError, type StoreMutationErrorOptions, type TSDFDebugLogArea, type TSDFDebugLogEntry, type TSDFDebugLogLevel, type TSDFDebugLogger, type TSDFFocusDebugOperation, type TSDFItemQuery, type TSDFLoggerOptions, type TSDFStatus, TSDFUseDocumentReturn, TSFDCollectionItem, TSFDCollectionState, type TSFDListQuery, type TSFDListQueryState, TSFDUseCollectionItemReturn, type TSFDUseListItemReturn, type TSFDUseListQueryReturn, type TSFDUsePendingOfflineItemsReturn, type ValidPayload, type ValidStoreState, clearAllSessionStorage, clearSessionStorage, createCollectionStore, createDocumentStore, createListQueryStore, createStoreManager, defaultOfflineRuntimeConfig, fetchTypePriority, getGlobalOfflineEntities, getGlobalOfflineResolutions, getGlobalOfflineStatus, localPersistentStorage, mutationSkipped, opfsOfflineUploadAdapter, useGlobalOfflineEntities, useGlobalOfflineResolutions, useGlobalOfflineStatus };