tsdf 8.0.0-beta.2 → 8.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs +1761 -1
- package/dist/main.d.ts +5 -5
- package/dist/main.js +1726 -1
- package/package.json +2 -2
package/dist/main.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { Store } from 't-state';
|
|
|
3
3
|
type FetchType = 'lowPriority' | 'highPriority' | 'realtimeUpdate';
|
|
4
4
|
type ScheduleFetchResults = 'skipped' | 'started' | 'scheduled' | 'rt-scheduled';
|
|
5
5
|
|
|
6
|
-
type
|
|
6
|
+
type TSDFStatus = 'loading' | 'error' | 'refetching' | 'success';
|
|
7
7
|
type ValidPayload = number | string | Record<string, unknown>;
|
|
8
8
|
type ValidStoreState = Record<string, unknown> | any[];
|
|
9
9
|
|
|
10
|
-
type DocumentStatus =
|
|
10
|
+
type DocumentStatus = TSDFStatus | 'idle';
|
|
11
11
|
type TSDFDocumentStoreState<State extends ValidStoreState, NError> = {
|
|
12
12
|
data: State | null;
|
|
13
13
|
error: NError | null;
|
|
@@ -54,7 +54,7 @@ declare function newTSDFDocumentStore<State extends ValidStoreState, NError>({ d
|
|
|
54
54
|
};
|
|
55
55
|
type TSDFDocumentStore<State extends ValidStoreState, NError> = ReturnType<typeof newTSDFDocumentStore<State, NError>>;
|
|
56
56
|
|
|
57
|
-
type CollectionItemStatus =
|
|
57
|
+
type CollectionItemStatus = TSDFStatus;
|
|
58
58
|
type TSFDCollectionItem<ItemState extends ValidStoreState, ItemPayload extends ValidPayload, NError> = {
|
|
59
59
|
data: ItemState | null;
|
|
60
60
|
error: NError | null;
|
|
@@ -122,7 +122,7 @@ declare function newTSDFCollectionStore<ItemState extends ValidStoreState, NErro
|
|
|
122
122
|
};
|
|
123
123
|
type TSDFCollectionStore<ItemState extends ValidStoreState, NError, FetchParams extends ValidPayload> = ReturnType<typeof newTSDFCollectionStore<ItemState, NError, FetchParams>>;
|
|
124
124
|
|
|
125
|
-
type QueryStatus =
|
|
125
|
+
type QueryStatus = TSDFStatus | 'loadingMore';
|
|
126
126
|
type TSFDListQuery<NError, QueryPayload extends ValidPayload> = {
|
|
127
127
|
error: NError | null;
|
|
128
128
|
status: QueryStatus;
|
|
@@ -266,4 +266,4 @@ declare function newTSDFListQueryStore<ItemState extends ValidStoreState, NError
|
|
|
266
266
|
};
|
|
267
267
|
type TSFDListQueryStore<ItemState extends ValidStoreState, NError, QueryPayload extends ValidPayload> = ReturnType<typeof newTSDFListQueryStore<ItemState, NError, QueryPayload>>;
|
|
268
268
|
|
|
269
|
-
export { TSDFCollectionStore, TSDFDocumentStore, TSDFDocumentStoreState, TSDFItemQuery, TSDFUseDocumentReturn, TSFDCollectionItem, TSFDCollectionState, TSFDListQuery, TSFDListQueryState, TSFDListQueryStore, TSFDUseCollectionItemReturn, TSFDUseItemReturn, TSFDUseListQueryReturn, newTSDFCollectionStore, newTSDFDocumentStore, newTSDFListQueryStore };
|
|
269
|
+
export { FetchListFnReturn, TSDFCollectionStore, TSDFDocumentStore, TSDFDocumentStoreState, TSDFItemQuery, TSDFStatus, TSDFUseDocumentReturn, TSFDCollectionItem, TSFDCollectionState, TSFDListQuery, TSFDListQueryState, TSFDListQueryStore, TSFDUseCollectionItemReturn, TSFDUseItemReturn, TSFDUseListQueryReturn, ValidPayload, ValidStoreState, newTSDFCollectionStore, newTSDFDocumentStore, newTSDFListQueryStore };
|