@salesforce/lds-worker-api 1.247.0 → 1.249.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.
- package/dist/sfdc/es/ldsWorkerApi.js +49 -169
- package/dist/sfdc/es/types/cachePurging.d.ts +21 -14
- package/dist/sfdc/es/types/main.d.ts +2 -2
- package/dist/standalone/es/lds-worker-api.js +2540 -1986
- package/dist/standalone/es/types/cachePurging.d.ts +21 -14
- package/dist/standalone/es/types/main.d.ts +2 -2
- package/dist/standalone/umd/lds-worker-api.js +2542 -1988
- package/dist/standalone/umd/types/cachePurging.d.ts +21 -14
- package/dist/standalone/umd/types/main.d.ts +2 -2
- package/package.json +4 -4
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
declare enum EvictStatus {
|
|
2
|
-
|
|
2
|
+
Started = "Started",
|
|
3
|
+
Running = "Running",
|
|
4
|
+
Evicted = "Evicted",
|
|
3
5
|
Succeeded = "Succeeded",
|
|
4
6
|
Error = "Error",
|
|
5
|
-
|
|
7
|
+
Canceled = "Canceled"
|
|
6
8
|
}
|
|
7
|
-
interface
|
|
8
|
-
status: EvictStatus.
|
|
9
|
+
interface EvictStarted {
|
|
10
|
+
status: EvictStatus.Started;
|
|
11
|
+
}
|
|
12
|
+
interface EvictRunning {
|
|
13
|
+
status: EvictStatus.Running;
|
|
14
|
+
message: string;
|
|
15
|
+
}
|
|
16
|
+
interface BatchEvicted {
|
|
17
|
+
status: EvictStatus.Evicted;
|
|
9
18
|
skippedEntries?: string[];
|
|
10
19
|
evictedEntries?: string[];
|
|
11
20
|
}
|
|
@@ -17,35 +26,33 @@ interface EvictError {
|
|
|
17
26
|
message: string;
|
|
18
27
|
}
|
|
19
28
|
interface EvictCancelled {
|
|
20
|
-
status: EvictStatus.
|
|
29
|
+
status: EvictStatus.Canceled;
|
|
21
30
|
}
|
|
22
|
-
export type EvictProgress =
|
|
31
|
+
export type EvictProgress = BatchEvicted | EvictSucceeded | EvictError | EvictCancelled;
|
|
23
32
|
export type ProgressUpdateCallback = (progess: EvictProgress) => void;
|
|
24
33
|
/**
|
|
25
34
|
* Purging records specified by an array of record id from durable store
|
|
26
35
|
* @param recordIds record id array
|
|
27
36
|
* @onProgressUpdate call back to report evict progress
|
|
28
37
|
*
|
|
29
|
-
* @returns
|
|
38
|
+
* @returns started or already running based whether there's an active eviction going on or not.
|
|
30
39
|
*
|
|
31
40
|
* The record will not be purged if the record has draft.
|
|
32
41
|
*/
|
|
33
|
-
export declare function evictCacheRecordsByIds(recordIds: string[], onProgressUpdate: ProgressUpdateCallback):
|
|
42
|
+
export declare function evictCacheRecordsByIds(recordIds: string[], onProgressUpdate: ProgressUpdateCallback): EvictStarted | EvictRunning;
|
|
34
43
|
/**
|
|
35
44
|
* Purging the db entries which passed expired time by specified days
|
|
36
45
|
* from durable store.
|
|
37
46
|
* @param expiredByDays
|
|
38
47
|
* @param onProgressUpdate
|
|
39
48
|
*
|
|
40
|
-
* @returns
|
|
49
|
+
* @returns started or already running based whether there's an active eviction going on or not.
|
|
41
50
|
*
|
|
42
51
|
* Important: records with draft, objectInfo entries will not be purged even expired by the specified days.
|
|
43
52
|
*/
|
|
44
|
-
export declare function evictExpiredCacheEntries(expiredByDays: number, onProgressUpdate: ProgressUpdateCallback):
|
|
53
|
+
export declare function evictExpiredCacheEntries(expiredByDays: number, onProgressUpdate: ProgressUpdateCallback): EvictStarted | EvictRunning;
|
|
45
54
|
/**
|
|
46
|
-
*
|
|
47
|
-
* Signal to cancel the eviction if the eviction is going on.
|
|
48
|
-
* @param evictionId
|
|
55
|
+
* Signal to stop current eviction if there's an active eviction going on.
|
|
49
56
|
*/
|
|
50
|
-
export declare function
|
|
57
|
+
export declare function stopEviction(): void;
|
|
51
58
|
export {};
|
|
@@ -5,5 +5,5 @@ import { draftQueue, draftManager } from './draftQueueImplementation';
|
|
|
5
5
|
import { setUiApiRecordTTL, setMetadataTTL } from './ttl';
|
|
6
6
|
import { registerReportObserver } from '@salesforce/lds-runtime-mobile';
|
|
7
7
|
import { createPrimingSession } from './primingApi';
|
|
8
|
-
import { evictCacheRecordsByIds, evictExpiredCacheEntries,
|
|
9
|
-
export { subscribeToAdapter, invokeAdapter, invokeAdapterWithMetadata, invokeAdapterWithDraftToReplace, executeAdapter, executeMutatingAdapter, nimbusDraftQueue, draftQueue, draftManager, setUiApiRecordTTL, setMetadataTTL, registerReportObserver, getImperativeAdapterNames, createPrimingSession, evictCacheRecordsByIds, evictExpiredCacheEntries,
|
|
8
|
+
import { evictCacheRecordsByIds, evictExpiredCacheEntries, stopEviction } from './cachePurging';
|
|
9
|
+
export { subscribeToAdapter, invokeAdapter, invokeAdapterWithMetadata, invokeAdapterWithDraftToReplace, executeAdapter, executeMutatingAdapter, nimbusDraftQueue, draftQueue, draftManager, setUiApiRecordTTL, setMetadataTTL, registerReportObserver, getImperativeAdapterNames, createPrimingSession, evictCacheRecordsByIds, evictExpiredCacheEntries, stopEviction, };
|