@salesforce/lds-worker-api 1.283.0 → 1.285.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 +60 -48
- package/dist/sfdc/es/types/executeAdapter.d.ts +16 -6
- package/dist/sfdc/es/types/main.d.ts +2 -2
- package/dist/standalone/es/lds-worker-api.js +333 -146
- package/dist/standalone/es/types/executeAdapter.d.ts +16 -6
- package/dist/standalone/es/types/main.d.ts +2 -2
- package/dist/standalone/umd/lds-worker-api.js +333 -145
- package/dist/standalone/umd/types/executeAdapter.d.ts +16 -6
- package/dist/standalone/umd/types/main.d.ts +2 -2
- package/package.json +12 -12
|
@@ -47,15 +47,25 @@ export declare function buildAdapterRequestContext(nativeRequestContext: NativeA
|
|
|
47
47
|
*/
|
|
48
48
|
export declare function subscribeToAdapter(adapterId: string, config: string, onSnapshot: NativeOnSnapshot, nativeAdapterRequestContext?: NativeAdapterRequestContext): Unsubscribe;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
50
|
+
* @deprecated There is no situation in which any consumer actually wants to replace the draft.
|
|
51
|
+
* call {@link invokeAdapterWithDraftToMerge} instead`.
|
|
52
|
+
* Keep it for now for app back compatibility.
|
|
53
|
+
* Will be removed in future, ideally 2 releases later.
|
|
54
|
+
*/
|
|
55
|
+
export declare function invokeAdapterWithDraftToReplace(adapterId: string, config: string, draftIdToReplace: string, onResponse: NativeOnResponse, nativeAdapterRequestContext?: NativeAdapterRequestContext): void;
|
|
56
|
+
/**
|
|
57
|
+
* Executes the specified adapter with the given @param dapterId and @param config. Then
|
|
58
|
+
* it merge the draft with the given id with the draft generated by
|
|
59
|
+
* the mutating adapter. Will call onResult callback once with data or error.
|
|
53
60
|
*
|
|
54
61
|
* This function throws an error if the given adapterId cannot be found, or if the
|
|
55
|
-
* adapterId is not a mutating adapter
|
|
56
|
-
* fails to parse the given config string.
|
|
62
|
+
* adapterId is not a mutating adapter if a draft isn't created, or
|
|
63
|
+
* if it fails to parse the given config string.
|
|
64
|
+
*
|
|
65
|
+
* If the @param adapterId is deleteRecod, the invocation of it will generate a delele draft.
|
|
66
|
+
* The newly generated delete draft will replace the draft specified by @param targetDraftId
|
|
57
67
|
*/
|
|
58
|
-
export declare function
|
|
68
|
+
export declare function invokeAdapterWithDraftToMerge(adapterId: string, config: string, targetDraftId: string, onResponse: NativeOnResponse, nativeAdapterRequestContext?: NativeAdapterRequestContext): void;
|
|
59
69
|
/**
|
|
60
70
|
* Executes the specified adapter with the given adapterId and config. Then
|
|
61
71
|
* it sets the given metadata on the draft created by the mutating adapter. Will call
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { subscribeToAdapter, invokeAdapter, invokeAdapterWithMetadata, invokeAdapterWithDraftToReplace, executeAdapter, executeMutatingAdapter } from './executeAdapter';
|
|
1
|
+
import { subscribeToAdapter, invokeAdapter, invokeAdapterWithMetadata, invokeAdapterWithDraftToReplace, invokeAdapterWithDraftToMerge, executeAdapter, executeMutatingAdapter } from './executeAdapter';
|
|
2
2
|
import { getImperativeAdapterNames } from './lightningAdapterApi';
|
|
3
3
|
import { nimbusDraftQueue } from './nimbusDraftQueue';
|
|
4
4
|
import { draftQueue, draftManager } from './draftQueueImplementation';
|
|
@@ -6,4 +6,4 @@ import { setUiApiRecordTTL, setMetadataTTL } from './ttl';
|
|
|
6
6
|
import { registerReportObserver } from '@salesforce/lds-runtime-mobile';
|
|
7
7
|
import { createPrimingSession } from './primingApi';
|
|
8
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, };
|
|
9
|
+
export { subscribeToAdapter, invokeAdapter, invokeAdapterWithMetadata, invokeAdapterWithDraftToReplace, invokeAdapterWithDraftToMerge, executeAdapter, executeMutatingAdapter, nimbusDraftQueue, draftQueue, draftManager, setUiApiRecordTTL, setMetadataTTL, registerReportObserver, getImperativeAdapterNames, createPrimingSession, evictCacheRecordsByIds, evictExpiredCacheEntries, stopEviction, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.285.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "dist/standalone/es/lds-worker-api.js",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@oat-sa/rollup-plugin-wildcard-external": "^1.0.0",
|
|
38
|
-
"@salesforce/lds-adapters-graphql": "^1.
|
|
39
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
40
|
-
"@salesforce/lds-default-luvio": "^1.
|
|
41
|
-
"@salesforce/lds-drafts": "^1.
|
|
42
|
-
"@salesforce/lds-graphql-parser": "^1.
|
|
43
|
-
"@salesforce/lds-luvio-engine": "^1.
|
|
44
|
-
"@salesforce/lds-priming": "^1.
|
|
45
|
-
"@salesforce/lds-runtime-mobile": "^1.
|
|
46
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
38
|
+
"@salesforce/lds-adapters-graphql": "^1.285.0",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.285.0",
|
|
40
|
+
"@salesforce/lds-default-luvio": "^1.285.0",
|
|
41
|
+
"@salesforce/lds-drafts": "^1.285.0",
|
|
42
|
+
"@salesforce/lds-graphql-parser": "^1.285.0",
|
|
43
|
+
"@salesforce/lds-luvio-engine": "^1.285.0",
|
|
44
|
+
"@salesforce/lds-priming": "^1.285.0",
|
|
45
|
+
"@salesforce/lds-runtime-mobile": "^1.285.0",
|
|
46
|
+
"@salesforce/nimbus-plugin-lds": "^1.285.0",
|
|
47
47
|
"ajv": "^8.11.0",
|
|
48
48
|
"glob": "^7.1.5",
|
|
49
49
|
"nimbus-types": "^2.0.0-alpha1",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
{
|
|
56
56
|
"path": "./dist/sfdc/es/ldsWorkerApi.js",
|
|
57
57
|
"maxSize": {
|
|
58
|
-
"none": "
|
|
58
|
+
"none": "45 kB",
|
|
59
59
|
"min": "17.8 kB",
|
|
60
|
-
"compressed": "
|
|
60
|
+
"compressed": "8 kB"
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
],
|