@katlux/providers 0.1.1-alpha.101 → 0.1.1-alpha.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +381 -298
- package/dist/index.d.cts +49 -8
- package/dist/index.d.mts +49 -8
- package/dist/index.d.ts +49 -8
- package/dist/index.mjs +380 -298
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -47,7 +47,8 @@ declare enum EDataFilterOperator {
|
|
|
47
47
|
}
|
|
48
48
|
declare enum ECacheStrategy {
|
|
49
49
|
Application = "Application",
|
|
50
|
-
|
|
50
|
+
ServerSession = "ServerSession",
|
|
51
|
+
BrowserSession = "BrowserSession",
|
|
51
52
|
Memory = "Memory",
|
|
52
53
|
LocalStorage = "LocalStorage",
|
|
53
54
|
IndexedDB = "IndexedDB",
|
|
@@ -150,6 +151,8 @@ interface IDataProviderOptions {
|
|
|
150
151
|
contextKey?: string;
|
|
151
152
|
urlPageParam?: string;
|
|
152
153
|
refreshOnMutation?: boolean;
|
|
154
|
+
filterDebounce?: number;
|
|
155
|
+
sortDebounce?: number;
|
|
153
156
|
}
|
|
154
157
|
|
|
155
158
|
interface ITreeNode<TRow = TDataRow> {
|
|
@@ -293,7 +296,7 @@ declare abstract class ADataProvider<TRow = TDataRow> {
|
|
|
293
296
|
selectedRows: TRow[];
|
|
294
297
|
selectAll: boolean;
|
|
295
298
|
};
|
|
296
|
-
setFilter(filter: IDataFilter | null): void;
|
|
299
|
+
setFilter(filter: IDataFilter | null, immediate?: boolean): void;
|
|
297
300
|
setSortList(sortList: IDataSort[], immediate?: boolean): void;
|
|
298
301
|
setCurrentPage(currentPage: number): void;
|
|
299
302
|
setPageSize(pageSize: number): void;
|
|
@@ -308,10 +311,22 @@ declare abstract class ADataProvider<TRow = TDataRow> {
|
|
|
308
311
|
}
|
|
309
312
|
|
|
310
313
|
declare class CFlatClientDataProvider<TRow = TDataRow> extends ADataProvider<TRow> {
|
|
311
|
-
|
|
314
|
+
private _allData;
|
|
312
315
|
filteredData: TRow[];
|
|
316
|
+
private _rowMap;
|
|
317
|
+
private _filterDirty;
|
|
318
|
+
private _sortDirty;
|
|
313
319
|
constructor(options?: IDataProviderOptions);
|
|
320
|
+
get allData(): TRow[];
|
|
321
|
+
set allData(data: TRow[]);
|
|
322
|
+
get rowMap(): readonly TRow[];
|
|
314
323
|
setData(data: TRow[]): void;
|
|
324
|
+
setFilter(filter: IDataFilter | null, immediate?: boolean): void;
|
|
325
|
+
setSortList(sortList: IDataSort[], immediate?: boolean): void;
|
|
326
|
+
/**
|
|
327
|
+
* Explicitly rebuilds the reference map array if row properties inside allData were mutated in-place.
|
|
328
|
+
*/
|
|
329
|
+
updateMap(): void;
|
|
315
330
|
refreshData(options?: {
|
|
316
331
|
disableCache?: boolean;
|
|
317
332
|
}): Promise<void>;
|
|
@@ -439,7 +454,9 @@ declare class CTreeClientDataProvider<TRow extends TDataRow = TDataRow> extends
|
|
|
439
454
|
private _staticNodesCache;
|
|
440
455
|
private _nodeMapCache;
|
|
441
456
|
private _sortedNodeIdsCache;
|
|
457
|
+
private _filteredNodesCache;
|
|
442
458
|
invalidateStaticCache(): void;
|
|
459
|
+
setFilter(filter: IDataFilter | null, immediate?: boolean): void;
|
|
443
460
|
private get _staticNodes();
|
|
444
461
|
private get _nodeMap();
|
|
445
462
|
private get _sortedNodeIds();
|
|
@@ -622,9 +639,9 @@ declare class CacheProviderFactory {
|
|
|
622
639
|
static clearInstances(): void;
|
|
623
640
|
}
|
|
624
641
|
|
|
625
|
-
declare class
|
|
642
|
+
declare class CServerSessionCache extends ACacheProvider {
|
|
626
643
|
private static instance;
|
|
627
|
-
static getInstance():
|
|
644
|
+
static getInstance(): CServerSessionCache;
|
|
628
645
|
static get storage(): Map<string, Map<string, ICacheEntry<any>>>;
|
|
629
646
|
static getSnapshot(): Map<string, Map<string, ICacheEntry<any>>>;
|
|
630
647
|
static MAX_SERVER_SESSIONS: number;
|
|
@@ -634,7 +651,6 @@ declare class CSessionCache extends ACacheProvider {
|
|
|
634
651
|
*/
|
|
635
652
|
static purgeExpiredServerSessions(): void;
|
|
636
653
|
private sessionIdCache;
|
|
637
|
-
private sessionId;
|
|
638
654
|
private readonly SESSION_ID_KEY;
|
|
639
655
|
constructor();
|
|
640
656
|
/**
|
|
@@ -642,7 +658,8 @@ declare class CSessionCache extends ACacheProvider {
|
|
|
642
658
|
*/
|
|
643
659
|
private generateSessionId;
|
|
644
660
|
/**
|
|
645
|
-
* Get or create sessionId
|
|
661
|
+
* Get or create sessionId — server-only path.
|
|
662
|
+
* Returns '__no_session__' sentinel when no isolatable H3 event context is available.
|
|
646
663
|
*/
|
|
647
664
|
private getSessionId;
|
|
648
665
|
getKeyList(context?: any): Promise<Array<string>>;
|
|
@@ -654,6 +671,30 @@ declare class CSessionCache extends ACacheProvider {
|
|
|
654
671
|
cleanupExpired(): Promise<void>;
|
|
655
672
|
}
|
|
656
673
|
|
|
674
|
+
/**
|
|
675
|
+
* CBrowserSessionCache — client-side tab-lifetime cache backed by window.sessionStorage.
|
|
676
|
+
*
|
|
677
|
+
* - Server-side: all write operations store only into the SSR context payload for hydration
|
|
678
|
+
* transfer to the client. No server memory is allocated.
|
|
679
|
+
* - Client-side: reads and writes use window.sessionStorage exclusively.
|
|
680
|
+
* - Hydration: on the first client-side get() miss, checks the SSR payload and promotes
|
|
681
|
+
* the entry into sessionStorage for subsequent reads.
|
|
682
|
+
*
|
|
683
|
+
* Storage key prefix: 'bscache:' (distinct from the server session 'cache:' prefix)
|
|
684
|
+
*/
|
|
685
|
+
declare class CBrowserSessionCache extends ACacheProvider {
|
|
686
|
+
private static instance;
|
|
687
|
+
static getInstance(): CBrowserSessionCache;
|
|
688
|
+
private readonly PREFIX;
|
|
689
|
+
getKeyList(_context?: any): Promise<string[]>;
|
|
690
|
+
get<T>(key: string, context?: any): Promise<T | null>;
|
|
691
|
+
set<T>(key: string, data: T, lifetime: number, context?: any): Promise<void>;
|
|
692
|
+
remove(key: string, _context?: any): Promise<void>;
|
|
693
|
+
removeByPrefix(prefix: string, _context?: any): Promise<void>;
|
|
694
|
+
getRemainingTime(key: string, _context?: any): Promise<number | null>;
|
|
695
|
+
cleanupExpired(_context?: any): Promise<void>;
|
|
696
|
+
}
|
|
697
|
+
|
|
657
698
|
declare class CCookieCache extends ACacheProvider {
|
|
658
699
|
private static instance;
|
|
659
700
|
static getInstance(): CCookieCache;
|
|
@@ -1046,5 +1087,5 @@ declare function getAppRouter(): any;
|
|
|
1046
1087
|
*/
|
|
1047
1088
|
declare function onPlatformReady(cb: () => void): void;
|
|
1048
1089
|
|
|
1049
|
-
export { AAPIDataProvider, ADataProvider, CAPIFlatClientDataProvider, CAPIFlatServerDataProvider, CAPITreeClientDataProvider, CAPITreeServerDataProvider, CApplicationCache, CCookieCache, CFlatClientDataProvider, CFlatServerDataProvider, CIndexedDBCache, CLocalStorageCache, CMemoryCache,
|
|
1090
|
+
export { AAPIDataProvider, ADataProvider, CAPIFlatClientDataProvider, CAPIFlatServerDataProvider, CAPITreeClientDataProvider, CAPITreeServerDataProvider, CApplicationCache, CBrowserSessionCache, CCookieCache, CFlatClientDataProvider, CFlatServerDataProvider, CIndexedDBCache, CLocalStorageCache, CMemoryCache, CServerSessionCache, CTreeClientDataProvider, CTreeServerDataProvider, CacheProviderFactory, DefaultHydrationAdapter, ECacheStrategy, EDataFilterOperator, EQueueStorage, KatluxIndexedDB, QueueStorageFactory, RequestProvider, RequestProviderRegistry, RequestQueue, SENSITIVE_HEADER_KEYS, applyOperator, clearSSRData, compareAnd, compareEqual, compareIn, compareOr, compareValues, debounce, evaluateFilter, fetchWithSSR, filterData, filterTreeData, getAppRoute, getAppRouter, getHydrationAdapter, getPlatformApp, getSSRData, getSSRPayload, onPlatformReady, setHydrationAdapter, sortData, useDebounce, useFilterLogic, useSortLogic };
|
|
1050
1091
|
export type { CacheDriverLoader, ICacheEntry, IDataFilter, IDataProviderOptions, IDataResult, IDataSort, IDeadLetterItem, IDebouncedFunction, IFlushOptions, IKDatatableAction, IPlatformRouter, IQueueStorageAdapter, IQueuedOperation, IRequestOptions, ISSRHydrationAdapter, ITreeDataProvider, ITreeDataProviderOptions, ITreeNode, ITreeNodeStatic, KProductItemData, KProductRowAction, TDataProviderListener, TDataRow, TKatluxStore, TPageDataHandler, TQueueItemStatus, TTreePageDataHandler, TTreeRow, TUnsubscribe, TreePaginationMode };
|
package/dist/index.d.mts
CHANGED
|
@@ -47,7 +47,8 @@ declare enum EDataFilterOperator {
|
|
|
47
47
|
}
|
|
48
48
|
declare enum ECacheStrategy {
|
|
49
49
|
Application = "Application",
|
|
50
|
-
|
|
50
|
+
ServerSession = "ServerSession",
|
|
51
|
+
BrowserSession = "BrowserSession",
|
|
51
52
|
Memory = "Memory",
|
|
52
53
|
LocalStorage = "LocalStorage",
|
|
53
54
|
IndexedDB = "IndexedDB",
|
|
@@ -150,6 +151,8 @@ interface IDataProviderOptions {
|
|
|
150
151
|
contextKey?: string;
|
|
151
152
|
urlPageParam?: string;
|
|
152
153
|
refreshOnMutation?: boolean;
|
|
154
|
+
filterDebounce?: number;
|
|
155
|
+
sortDebounce?: number;
|
|
153
156
|
}
|
|
154
157
|
|
|
155
158
|
interface ITreeNode<TRow = TDataRow> {
|
|
@@ -293,7 +296,7 @@ declare abstract class ADataProvider<TRow = TDataRow> {
|
|
|
293
296
|
selectedRows: TRow[];
|
|
294
297
|
selectAll: boolean;
|
|
295
298
|
};
|
|
296
|
-
setFilter(filter: IDataFilter | null): void;
|
|
299
|
+
setFilter(filter: IDataFilter | null, immediate?: boolean): void;
|
|
297
300
|
setSortList(sortList: IDataSort[], immediate?: boolean): void;
|
|
298
301
|
setCurrentPage(currentPage: number): void;
|
|
299
302
|
setPageSize(pageSize: number): void;
|
|
@@ -308,10 +311,22 @@ declare abstract class ADataProvider<TRow = TDataRow> {
|
|
|
308
311
|
}
|
|
309
312
|
|
|
310
313
|
declare class CFlatClientDataProvider<TRow = TDataRow> extends ADataProvider<TRow> {
|
|
311
|
-
|
|
314
|
+
private _allData;
|
|
312
315
|
filteredData: TRow[];
|
|
316
|
+
private _rowMap;
|
|
317
|
+
private _filterDirty;
|
|
318
|
+
private _sortDirty;
|
|
313
319
|
constructor(options?: IDataProviderOptions);
|
|
320
|
+
get allData(): TRow[];
|
|
321
|
+
set allData(data: TRow[]);
|
|
322
|
+
get rowMap(): readonly TRow[];
|
|
314
323
|
setData(data: TRow[]): void;
|
|
324
|
+
setFilter(filter: IDataFilter | null, immediate?: boolean): void;
|
|
325
|
+
setSortList(sortList: IDataSort[], immediate?: boolean): void;
|
|
326
|
+
/**
|
|
327
|
+
* Explicitly rebuilds the reference map array if row properties inside allData were mutated in-place.
|
|
328
|
+
*/
|
|
329
|
+
updateMap(): void;
|
|
315
330
|
refreshData(options?: {
|
|
316
331
|
disableCache?: boolean;
|
|
317
332
|
}): Promise<void>;
|
|
@@ -439,7 +454,9 @@ declare class CTreeClientDataProvider<TRow extends TDataRow = TDataRow> extends
|
|
|
439
454
|
private _staticNodesCache;
|
|
440
455
|
private _nodeMapCache;
|
|
441
456
|
private _sortedNodeIdsCache;
|
|
457
|
+
private _filteredNodesCache;
|
|
442
458
|
invalidateStaticCache(): void;
|
|
459
|
+
setFilter(filter: IDataFilter | null, immediate?: boolean): void;
|
|
443
460
|
private get _staticNodes();
|
|
444
461
|
private get _nodeMap();
|
|
445
462
|
private get _sortedNodeIds();
|
|
@@ -622,9 +639,9 @@ declare class CacheProviderFactory {
|
|
|
622
639
|
static clearInstances(): void;
|
|
623
640
|
}
|
|
624
641
|
|
|
625
|
-
declare class
|
|
642
|
+
declare class CServerSessionCache extends ACacheProvider {
|
|
626
643
|
private static instance;
|
|
627
|
-
static getInstance():
|
|
644
|
+
static getInstance(): CServerSessionCache;
|
|
628
645
|
static get storage(): Map<string, Map<string, ICacheEntry<any>>>;
|
|
629
646
|
static getSnapshot(): Map<string, Map<string, ICacheEntry<any>>>;
|
|
630
647
|
static MAX_SERVER_SESSIONS: number;
|
|
@@ -634,7 +651,6 @@ declare class CSessionCache extends ACacheProvider {
|
|
|
634
651
|
*/
|
|
635
652
|
static purgeExpiredServerSessions(): void;
|
|
636
653
|
private sessionIdCache;
|
|
637
|
-
private sessionId;
|
|
638
654
|
private readonly SESSION_ID_KEY;
|
|
639
655
|
constructor();
|
|
640
656
|
/**
|
|
@@ -642,7 +658,8 @@ declare class CSessionCache extends ACacheProvider {
|
|
|
642
658
|
*/
|
|
643
659
|
private generateSessionId;
|
|
644
660
|
/**
|
|
645
|
-
* Get or create sessionId
|
|
661
|
+
* Get or create sessionId — server-only path.
|
|
662
|
+
* Returns '__no_session__' sentinel when no isolatable H3 event context is available.
|
|
646
663
|
*/
|
|
647
664
|
private getSessionId;
|
|
648
665
|
getKeyList(context?: any): Promise<Array<string>>;
|
|
@@ -654,6 +671,30 @@ declare class CSessionCache extends ACacheProvider {
|
|
|
654
671
|
cleanupExpired(): Promise<void>;
|
|
655
672
|
}
|
|
656
673
|
|
|
674
|
+
/**
|
|
675
|
+
* CBrowserSessionCache — client-side tab-lifetime cache backed by window.sessionStorage.
|
|
676
|
+
*
|
|
677
|
+
* - Server-side: all write operations store only into the SSR context payload for hydration
|
|
678
|
+
* transfer to the client. No server memory is allocated.
|
|
679
|
+
* - Client-side: reads and writes use window.sessionStorage exclusively.
|
|
680
|
+
* - Hydration: on the first client-side get() miss, checks the SSR payload and promotes
|
|
681
|
+
* the entry into sessionStorage for subsequent reads.
|
|
682
|
+
*
|
|
683
|
+
* Storage key prefix: 'bscache:' (distinct from the server session 'cache:' prefix)
|
|
684
|
+
*/
|
|
685
|
+
declare class CBrowserSessionCache extends ACacheProvider {
|
|
686
|
+
private static instance;
|
|
687
|
+
static getInstance(): CBrowserSessionCache;
|
|
688
|
+
private readonly PREFIX;
|
|
689
|
+
getKeyList(_context?: any): Promise<string[]>;
|
|
690
|
+
get<T>(key: string, context?: any): Promise<T | null>;
|
|
691
|
+
set<T>(key: string, data: T, lifetime: number, context?: any): Promise<void>;
|
|
692
|
+
remove(key: string, _context?: any): Promise<void>;
|
|
693
|
+
removeByPrefix(prefix: string, _context?: any): Promise<void>;
|
|
694
|
+
getRemainingTime(key: string, _context?: any): Promise<number | null>;
|
|
695
|
+
cleanupExpired(_context?: any): Promise<void>;
|
|
696
|
+
}
|
|
697
|
+
|
|
657
698
|
declare class CCookieCache extends ACacheProvider {
|
|
658
699
|
private static instance;
|
|
659
700
|
static getInstance(): CCookieCache;
|
|
@@ -1046,5 +1087,5 @@ declare function getAppRouter(): any;
|
|
|
1046
1087
|
*/
|
|
1047
1088
|
declare function onPlatformReady(cb: () => void): void;
|
|
1048
1089
|
|
|
1049
|
-
export { AAPIDataProvider, ADataProvider, CAPIFlatClientDataProvider, CAPIFlatServerDataProvider, CAPITreeClientDataProvider, CAPITreeServerDataProvider, CApplicationCache, CCookieCache, CFlatClientDataProvider, CFlatServerDataProvider, CIndexedDBCache, CLocalStorageCache, CMemoryCache,
|
|
1090
|
+
export { AAPIDataProvider, ADataProvider, CAPIFlatClientDataProvider, CAPIFlatServerDataProvider, CAPITreeClientDataProvider, CAPITreeServerDataProvider, CApplicationCache, CBrowserSessionCache, CCookieCache, CFlatClientDataProvider, CFlatServerDataProvider, CIndexedDBCache, CLocalStorageCache, CMemoryCache, CServerSessionCache, CTreeClientDataProvider, CTreeServerDataProvider, CacheProviderFactory, DefaultHydrationAdapter, ECacheStrategy, EDataFilterOperator, EQueueStorage, KatluxIndexedDB, QueueStorageFactory, RequestProvider, RequestProviderRegistry, RequestQueue, SENSITIVE_HEADER_KEYS, applyOperator, clearSSRData, compareAnd, compareEqual, compareIn, compareOr, compareValues, debounce, evaluateFilter, fetchWithSSR, filterData, filterTreeData, getAppRoute, getAppRouter, getHydrationAdapter, getPlatformApp, getSSRData, getSSRPayload, onPlatformReady, setHydrationAdapter, sortData, useDebounce, useFilterLogic, useSortLogic };
|
|
1050
1091
|
export type { CacheDriverLoader, ICacheEntry, IDataFilter, IDataProviderOptions, IDataResult, IDataSort, IDeadLetterItem, IDebouncedFunction, IFlushOptions, IKDatatableAction, IPlatformRouter, IQueueStorageAdapter, IQueuedOperation, IRequestOptions, ISSRHydrationAdapter, ITreeDataProvider, ITreeDataProviderOptions, ITreeNode, ITreeNodeStatic, KProductItemData, KProductRowAction, TDataProviderListener, TDataRow, TKatluxStore, TPageDataHandler, TQueueItemStatus, TTreePageDataHandler, TTreeRow, TUnsubscribe, TreePaginationMode };
|
package/dist/index.d.ts
CHANGED
|
@@ -47,7 +47,8 @@ declare enum EDataFilterOperator {
|
|
|
47
47
|
}
|
|
48
48
|
declare enum ECacheStrategy {
|
|
49
49
|
Application = "Application",
|
|
50
|
-
|
|
50
|
+
ServerSession = "ServerSession",
|
|
51
|
+
BrowserSession = "BrowserSession",
|
|
51
52
|
Memory = "Memory",
|
|
52
53
|
LocalStorage = "LocalStorage",
|
|
53
54
|
IndexedDB = "IndexedDB",
|
|
@@ -150,6 +151,8 @@ interface IDataProviderOptions {
|
|
|
150
151
|
contextKey?: string;
|
|
151
152
|
urlPageParam?: string;
|
|
152
153
|
refreshOnMutation?: boolean;
|
|
154
|
+
filterDebounce?: number;
|
|
155
|
+
sortDebounce?: number;
|
|
153
156
|
}
|
|
154
157
|
|
|
155
158
|
interface ITreeNode<TRow = TDataRow> {
|
|
@@ -293,7 +296,7 @@ declare abstract class ADataProvider<TRow = TDataRow> {
|
|
|
293
296
|
selectedRows: TRow[];
|
|
294
297
|
selectAll: boolean;
|
|
295
298
|
};
|
|
296
|
-
setFilter(filter: IDataFilter | null): void;
|
|
299
|
+
setFilter(filter: IDataFilter | null, immediate?: boolean): void;
|
|
297
300
|
setSortList(sortList: IDataSort[], immediate?: boolean): void;
|
|
298
301
|
setCurrentPage(currentPage: number): void;
|
|
299
302
|
setPageSize(pageSize: number): void;
|
|
@@ -308,10 +311,22 @@ declare abstract class ADataProvider<TRow = TDataRow> {
|
|
|
308
311
|
}
|
|
309
312
|
|
|
310
313
|
declare class CFlatClientDataProvider<TRow = TDataRow> extends ADataProvider<TRow> {
|
|
311
|
-
|
|
314
|
+
private _allData;
|
|
312
315
|
filteredData: TRow[];
|
|
316
|
+
private _rowMap;
|
|
317
|
+
private _filterDirty;
|
|
318
|
+
private _sortDirty;
|
|
313
319
|
constructor(options?: IDataProviderOptions);
|
|
320
|
+
get allData(): TRow[];
|
|
321
|
+
set allData(data: TRow[]);
|
|
322
|
+
get rowMap(): readonly TRow[];
|
|
314
323
|
setData(data: TRow[]): void;
|
|
324
|
+
setFilter(filter: IDataFilter | null, immediate?: boolean): void;
|
|
325
|
+
setSortList(sortList: IDataSort[], immediate?: boolean): void;
|
|
326
|
+
/**
|
|
327
|
+
* Explicitly rebuilds the reference map array if row properties inside allData were mutated in-place.
|
|
328
|
+
*/
|
|
329
|
+
updateMap(): void;
|
|
315
330
|
refreshData(options?: {
|
|
316
331
|
disableCache?: boolean;
|
|
317
332
|
}): Promise<void>;
|
|
@@ -439,7 +454,9 @@ declare class CTreeClientDataProvider<TRow extends TDataRow = TDataRow> extends
|
|
|
439
454
|
private _staticNodesCache;
|
|
440
455
|
private _nodeMapCache;
|
|
441
456
|
private _sortedNodeIdsCache;
|
|
457
|
+
private _filteredNodesCache;
|
|
442
458
|
invalidateStaticCache(): void;
|
|
459
|
+
setFilter(filter: IDataFilter | null, immediate?: boolean): void;
|
|
443
460
|
private get _staticNodes();
|
|
444
461
|
private get _nodeMap();
|
|
445
462
|
private get _sortedNodeIds();
|
|
@@ -622,9 +639,9 @@ declare class CacheProviderFactory {
|
|
|
622
639
|
static clearInstances(): void;
|
|
623
640
|
}
|
|
624
641
|
|
|
625
|
-
declare class
|
|
642
|
+
declare class CServerSessionCache extends ACacheProvider {
|
|
626
643
|
private static instance;
|
|
627
|
-
static getInstance():
|
|
644
|
+
static getInstance(): CServerSessionCache;
|
|
628
645
|
static get storage(): Map<string, Map<string, ICacheEntry<any>>>;
|
|
629
646
|
static getSnapshot(): Map<string, Map<string, ICacheEntry<any>>>;
|
|
630
647
|
static MAX_SERVER_SESSIONS: number;
|
|
@@ -634,7 +651,6 @@ declare class CSessionCache extends ACacheProvider {
|
|
|
634
651
|
*/
|
|
635
652
|
static purgeExpiredServerSessions(): void;
|
|
636
653
|
private sessionIdCache;
|
|
637
|
-
private sessionId;
|
|
638
654
|
private readonly SESSION_ID_KEY;
|
|
639
655
|
constructor();
|
|
640
656
|
/**
|
|
@@ -642,7 +658,8 @@ declare class CSessionCache extends ACacheProvider {
|
|
|
642
658
|
*/
|
|
643
659
|
private generateSessionId;
|
|
644
660
|
/**
|
|
645
|
-
* Get or create sessionId
|
|
661
|
+
* Get or create sessionId — server-only path.
|
|
662
|
+
* Returns '__no_session__' sentinel when no isolatable H3 event context is available.
|
|
646
663
|
*/
|
|
647
664
|
private getSessionId;
|
|
648
665
|
getKeyList(context?: any): Promise<Array<string>>;
|
|
@@ -654,6 +671,30 @@ declare class CSessionCache extends ACacheProvider {
|
|
|
654
671
|
cleanupExpired(): Promise<void>;
|
|
655
672
|
}
|
|
656
673
|
|
|
674
|
+
/**
|
|
675
|
+
* CBrowserSessionCache — client-side tab-lifetime cache backed by window.sessionStorage.
|
|
676
|
+
*
|
|
677
|
+
* - Server-side: all write operations store only into the SSR context payload for hydration
|
|
678
|
+
* transfer to the client. No server memory is allocated.
|
|
679
|
+
* - Client-side: reads and writes use window.sessionStorage exclusively.
|
|
680
|
+
* - Hydration: on the first client-side get() miss, checks the SSR payload and promotes
|
|
681
|
+
* the entry into sessionStorage for subsequent reads.
|
|
682
|
+
*
|
|
683
|
+
* Storage key prefix: 'bscache:' (distinct from the server session 'cache:' prefix)
|
|
684
|
+
*/
|
|
685
|
+
declare class CBrowserSessionCache extends ACacheProvider {
|
|
686
|
+
private static instance;
|
|
687
|
+
static getInstance(): CBrowserSessionCache;
|
|
688
|
+
private readonly PREFIX;
|
|
689
|
+
getKeyList(_context?: any): Promise<string[]>;
|
|
690
|
+
get<T>(key: string, context?: any): Promise<T | null>;
|
|
691
|
+
set<T>(key: string, data: T, lifetime: number, context?: any): Promise<void>;
|
|
692
|
+
remove(key: string, _context?: any): Promise<void>;
|
|
693
|
+
removeByPrefix(prefix: string, _context?: any): Promise<void>;
|
|
694
|
+
getRemainingTime(key: string, _context?: any): Promise<number | null>;
|
|
695
|
+
cleanupExpired(_context?: any): Promise<void>;
|
|
696
|
+
}
|
|
697
|
+
|
|
657
698
|
declare class CCookieCache extends ACacheProvider {
|
|
658
699
|
private static instance;
|
|
659
700
|
static getInstance(): CCookieCache;
|
|
@@ -1046,5 +1087,5 @@ declare function getAppRouter(): any;
|
|
|
1046
1087
|
*/
|
|
1047
1088
|
declare function onPlatformReady(cb: () => void): void;
|
|
1048
1089
|
|
|
1049
|
-
export { AAPIDataProvider, ADataProvider, CAPIFlatClientDataProvider, CAPIFlatServerDataProvider, CAPITreeClientDataProvider, CAPITreeServerDataProvider, CApplicationCache, CCookieCache, CFlatClientDataProvider, CFlatServerDataProvider, CIndexedDBCache, CLocalStorageCache, CMemoryCache,
|
|
1090
|
+
export { AAPIDataProvider, ADataProvider, CAPIFlatClientDataProvider, CAPIFlatServerDataProvider, CAPITreeClientDataProvider, CAPITreeServerDataProvider, CApplicationCache, CBrowserSessionCache, CCookieCache, CFlatClientDataProvider, CFlatServerDataProvider, CIndexedDBCache, CLocalStorageCache, CMemoryCache, CServerSessionCache, CTreeClientDataProvider, CTreeServerDataProvider, CacheProviderFactory, DefaultHydrationAdapter, ECacheStrategy, EDataFilterOperator, EQueueStorage, KatluxIndexedDB, QueueStorageFactory, RequestProvider, RequestProviderRegistry, RequestQueue, SENSITIVE_HEADER_KEYS, applyOperator, clearSSRData, compareAnd, compareEqual, compareIn, compareOr, compareValues, debounce, evaluateFilter, fetchWithSSR, filterData, filterTreeData, getAppRoute, getAppRouter, getHydrationAdapter, getPlatformApp, getSSRData, getSSRPayload, onPlatformReady, setHydrationAdapter, sortData, useDebounce, useFilterLogic, useSortLogic };
|
|
1050
1091
|
export type { CacheDriverLoader, ICacheEntry, IDataFilter, IDataProviderOptions, IDataResult, IDataSort, IDeadLetterItem, IDebouncedFunction, IFlushOptions, IKDatatableAction, IPlatformRouter, IQueueStorageAdapter, IQueuedOperation, IRequestOptions, ISSRHydrationAdapter, ITreeDataProvider, ITreeDataProviderOptions, ITreeNode, ITreeNodeStatic, KProductItemData, KProductRowAction, TDataProviderListener, TDataRow, TKatluxStore, TPageDataHandler, TQueueItemStatus, TTreePageDataHandler, TTreeRow, TUnsubscribe, TreePaginationMode };
|