@salesforce/lds-adapters-industries-sustainability-reference-data 1.169.0 → 1.170.1
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/es/es2018/industries-sustainability-reference-data.js +9 -7
- package/dist/es/es2018/types/src/generated/resources/postConnectSustainabilityReferenceDataUploadByCategory.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/SCReferenceDataOutputRepresentation.d.ts +1 -1
- package/package.json +1 -1
- package/sfdc/index.js +10 -8
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey,
|
|
7
|
+
import { serializeStructuredKey, deepFreeze, StoreKeyMap } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -128,8 +128,7 @@ const ingest = function SCReferenceDataOutputRepresentationIngest(input, path, l
|
|
|
128
128
|
}
|
|
129
129
|
return createLink(key);
|
|
130
130
|
};
|
|
131
|
-
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
132
|
-
const rootKeySet = new StoreKeyMap();
|
|
131
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
133
132
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
134
133
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
135
134
|
rootKeySet.set(rootKey, {
|
|
@@ -137,14 +136,13 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
|
137
136
|
representationName: RepresentationType,
|
|
138
137
|
mergeable: false
|
|
139
138
|
});
|
|
140
|
-
return rootKeySet;
|
|
141
139
|
}
|
|
142
140
|
|
|
143
141
|
function select(luvio, params) {
|
|
144
142
|
return select$1();
|
|
145
143
|
}
|
|
146
|
-
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
147
|
-
|
|
144
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
145
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
148
146
|
}
|
|
149
147
|
function ingestSuccess(luvio, resourceParams, response) {
|
|
150
148
|
const { body } = response;
|
|
@@ -228,7 +226,11 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
228
226
|
return luvio.handleSuccessResponse(() => {
|
|
229
227
|
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
230
228
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
231
|
-
}, () =>
|
|
229
|
+
}, () => {
|
|
230
|
+
const cache = new StoreKeyMap();
|
|
231
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
232
|
+
return cache;
|
|
233
|
+
});
|
|
232
234
|
}, (response) => {
|
|
233
235
|
deepFreeze(response);
|
|
234
236
|
throw response;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment,
|
|
1
|
+
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, FetchResponse as $64$luvio_engine_FetchResponse, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
2
2
|
import { SCReferenceDataOutputRepresentation as types_SCReferenceDataOutputRepresentation_SCReferenceDataOutputRepresentation } from '../types/SCReferenceDataOutputRepresentation';
|
|
3
3
|
export interface ResourceRequestConfig {
|
|
4
4
|
urlParams: {
|
|
@@ -9,7 +9,7 @@ export interface ResourceRequestConfig {
|
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
11
|
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
12
|
-
export declare function getResponseCacheKeys(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_SCReferenceDataOutputRepresentation_SCReferenceDataOutputRepresentation):
|
|
12
|
+
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_SCReferenceDataOutputRepresentation_SCReferenceDataOutputRepresentation): void;
|
|
13
13
|
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_SCReferenceDataOutputRepresentation_SCReferenceDataOutputRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_SCReferenceDataOutputRepresentation_SCReferenceDataOutputRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_SCReferenceDataOutputRepresentation_SCReferenceDataOutputRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_SCReferenceDataOutputRepresentation_SCReferenceDataOutputRepresentation, any>;
|
|
14
14
|
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
15
15
|
export default createResourceRequest;
|
|
@@ -16,7 +16,7 @@ export declare function normalize(input: SCReferenceDataOutputRepresentation, ex
|
|
|
16
16
|
export declare const select: () => $64$luvio_engine_BaseFragment;
|
|
17
17
|
export declare function equals(existing: SCReferenceDataOutputRepresentationNormalized, incoming: SCReferenceDataOutputRepresentationNormalized): boolean;
|
|
18
18
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
19
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: SCReferenceDataOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
19
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: SCReferenceDataOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
20
20
|
/**
|
|
21
21
|
* Represents the response and its status
|
|
22
22
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-industries-sustainability-reference-data",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.170.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "Sustainability Reference Data",
|
|
6
6
|
"main": "dist/es/es2018/industries-sustainability-reference-data.js",
|
package/sfdc/index.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
16
|
-
import { serializeStructuredKey,
|
|
16
|
+
import { serializeStructuredKey, deepFreeze, StoreKeyMap } from 'force/luvioEngine';
|
|
17
17
|
|
|
18
18
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
19
19
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -137,8 +137,7 @@ const ingest = function SCReferenceDataOutputRepresentationIngest(input, path, l
|
|
|
137
137
|
}
|
|
138
138
|
return createLink(key);
|
|
139
139
|
};
|
|
140
|
-
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
141
|
-
const rootKeySet = new StoreKeyMap();
|
|
140
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
142
141
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
143
142
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
144
143
|
rootKeySet.set(rootKey, {
|
|
@@ -146,14 +145,13 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
|
146
145
|
representationName: RepresentationType,
|
|
147
146
|
mergeable: false
|
|
148
147
|
});
|
|
149
|
-
return rootKeySet;
|
|
150
148
|
}
|
|
151
149
|
|
|
152
150
|
function select(luvio, params) {
|
|
153
151
|
return select$1();
|
|
154
152
|
}
|
|
155
|
-
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
156
|
-
|
|
153
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
154
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
157
155
|
}
|
|
158
156
|
function ingestSuccess(luvio, resourceParams, response) {
|
|
159
157
|
const { body } = response;
|
|
@@ -237,7 +235,11 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
237
235
|
return luvio.handleSuccessResponse(() => {
|
|
238
236
|
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
239
237
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
240
|
-
}, () =>
|
|
238
|
+
}, () => {
|
|
239
|
+
const cache = new StoreKeyMap();
|
|
240
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
241
|
+
return cache;
|
|
242
|
+
});
|
|
241
243
|
}, (response) => {
|
|
242
244
|
deepFreeze(response);
|
|
243
245
|
throw response;
|
|
@@ -272,4 +274,4 @@ withDefaultLuvio((luvio) => {
|
|
|
272
274
|
});
|
|
273
275
|
|
|
274
276
|
export { uploadReferenceData };
|
|
275
|
-
// version: 1.
|
|
277
|
+
// version: 1.170.1-5fb216cf1
|