@salesforce/lds-worker-api 1.243.0 → 1.245.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.
@@ -0,0 +1,39 @@
1
+ declare enum EvictStatus {
2
+ InProgress = "InProgress",
3
+ Succeeded = "Succeeded",
4
+ Error = "Error",
5
+ Cancelled = "Cancelled"
6
+ }
7
+ interface EvictInProgress {
8
+ status: EvictStatus.InProgress;
9
+ skippedEntries?: string[];
10
+ evictedEntries?: string[];
11
+ }
12
+ interface EvictSucceeded {
13
+ status: EvictStatus.Succeeded;
14
+ }
15
+ interface EvictError {
16
+ status: EvictStatus.Error;
17
+ message: string;
18
+ }
19
+ interface EvictCancelled {
20
+ status: EvictStatus.Cancelled;
21
+ }
22
+ export type EvictProgress = EvictInProgress | EvictSucceeded | EvictError | EvictCancelled;
23
+ export type ProgressUpdateCallback = (progess: EvictProgress) => void;
24
+ /**
25
+ * Purging records specified by an array of record id from durable store
26
+ * @param recordIds record id array
27
+ * @onProgressUpdate call back to report evict progress
28
+ *
29
+ * @returns a function to cancel the eviction
30
+ *
31
+ * The record will not be purged if the record has draft.
32
+ */
33
+ export declare function evictCacheRecordsByIds(recordIds: string[], onProgressUpdate: ProgressUpdateCallback): string;
34
+ /**
35
+ * Cancel the eviction by specified id.
36
+ * @param evictionId
37
+ */
38
+ export declare function cancelEviction(evictionId: string): void;
39
+ export {};
@@ -5,4 +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
- export { subscribeToAdapter, invokeAdapter, invokeAdapterWithMetadata, invokeAdapterWithDraftToReplace, executeAdapter, executeMutatingAdapter, nimbusDraftQueue, draftQueue, draftManager, setUiApiRecordTTL, setMetadataTTL, registerReportObserver, getImperativeAdapterNames, createPrimingSession, };
8
+ import { evictCacheRecordsByIds, cancelEviction } from './cachePurging';
9
+ export { subscribeToAdapter, invokeAdapter, invokeAdapterWithMetadata, invokeAdapterWithDraftToReplace, executeAdapter, executeMutatingAdapter, nimbusDraftQueue, draftQueue, draftManager, setUiApiRecordTTL, setMetadataTTL, registerReportObserver, getImperativeAdapterNames, createPrimingSession, evictCacheRecordsByIds, cancelEviction, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-worker-api",
3
- "version": "1.243.0",
3
+ "version": "1.245.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "",
6
6
  "main": "dist/standalone/es/lds-worker-api.js",
@@ -54,9 +54,9 @@
54
54
  {
55
55
  "path": "./dist/sfdc/es/ldsWorkerApi.js",
56
56
  "maxSize": {
57
- "none": "33 kB",
58
- "min": "13 kB",
59
- "compressed": "6 kB"
57
+ "none": "41.5 kB",
58
+ "min": "17 kB",
59
+ "compressed": "8 kB"
60
60
  }
61
61
  }
62
62
  ],