@salesforce/lds-adapters-community-info 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.
|
@@ -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;
|
|
@@ -927,8 +927,7 @@ const ingest = function CommunityRepresentationIngest(input, path, luvio, store,
|
|
|
927
927
|
}
|
|
928
928
|
return createLink(key);
|
|
929
929
|
};
|
|
930
|
-
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
931
|
-
const rootKeySet = new StoreKeyMap();
|
|
930
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
932
931
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
933
932
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
934
933
|
rootKeySet.set(rootKey, {
|
|
@@ -936,7 +935,6 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
|
936
935
|
representationName: RepresentationType,
|
|
937
936
|
mergeable: false
|
|
938
937
|
});
|
|
939
|
-
return rootKeySet;
|
|
940
938
|
}
|
|
941
939
|
|
|
942
940
|
function select(luvio, params) {
|
|
@@ -947,8 +945,8 @@ function keyBuilder$1(luvio, params) {
|
|
|
947
945
|
id: params.urlParams.communityId
|
|
948
946
|
});
|
|
949
947
|
}
|
|
950
|
-
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
951
|
-
|
|
948
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
949
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
952
950
|
}
|
|
953
951
|
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
954
952
|
const { body } = response;
|
|
@@ -1056,7 +1054,11 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1056
1054
|
const request = createResourceRequest(resourceParams);
|
|
1057
1055
|
return luvio.dispatchResourceRequest(request, options)
|
|
1058
1056
|
.then((response) => {
|
|
1059
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () =>
|
|
1057
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1058
|
+
const cache = new StoreKeyMap();
|
|
1059
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1060
|
+
return cache;
|
|
1061
|
+
});
|
|
1060
1062
|
}, (response) => {
|
|
1061
1063
|
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
1062
1064
|
});
|
package/dist/es/es2018/types/src/generated/resources/getConnectCommunitiesByCommunityId.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata,
|
|
1
|
+
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, FetchResponse as $64$luvio_engine_FetchResponse, SnapshotRefresh as $64$luvio_engine_SnapshotRefresh, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ErrorResponse as $64$luvio_engine_ErrorResponse, ErrorSnapshot as $64$luvio_engine_ErrorSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
2
2
|
import { CommunityRepresentation as types_CommunityRepresentation_CommunityRepresentation } from '../types/CommunityRepresentation';
|
|
3
3
|
export interface ResourceRequestConfig {
|
|
4
4
|
urlParams: {
|
|
@@ -8,7 +8,7 @@ export interface ResourceRequestConfig {
|
|
|
8
8
|
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
9
9
|
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): string;
|
|
10
10
|
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
11
|
-
export declare function getResponseCacheKeys(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_CommunityRepresentation_CommunityRepresentation):
|
|
11
|
+
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_CommunityRepresentation_CommunityRepresentation): void;
|
|
12
12
|
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_CommunityRepresentation_CommunityRepresentation>, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_CommunityRepresentation_CommunityRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_CommunityRepresentation_CommunityRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_CommunityRepresentation_CommunityRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_CommunityRepresentation_CommunityRepresentation, any>;
|
|
13
13
|
export declare function ingestError(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig, error: $64$luvio_engine_ErrorResponse, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_CommunityRepresentation_CommunityRepresentation>): $64$luvio_engine_ErrorSnapshot;
|
|
14
14
|
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
@@ -16,7 +16,7 @@ export declare function normalize(input: CommunityRepresentation, existing: Comm
|
|
|
16
16
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
17
17
|
export declare function equals(existing: CommunityRepresentationNormalized, incoming: CommunityRepresentationNormalized): boolean;
|
|
18
18
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
19
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: CommunityRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
19
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: CommunityRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
20
20
|
/**
|
|
21
21
|
* Communities are customizable public or private spaces for employees, customers, and partners to collaborate on best practices and business processes.
|
|
22
22
|
*
|
package/package.json
CHANGED
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey,
|
|
17
|
+
import { serializeStructuredKey, deepFreeze, StoreKeyMap } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -937,8 +937,7 @@ const ingest = function CommunityRepresentationIngest(input, path, luvio, store,
|
|
|
937
937
|
}
|
|
938
938
|
return createLink(key);
|
|
939
939
|
};
|
|
940
|
-
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
941
|
-
const rootKeySet = new StoreKeyMap();
|
|
940
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
942
941
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
943
942
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
944
943
|
rootKeySet.set(rootKey, {
|
|
@@ -946,7 +945,6 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
|
946
945
|
representationName: RepresentationType,
|
|
947
946
|
mergeable: false
|
|
948
947
|
});
|
|
949
|
-
return rootKeySet;
|
|
950
948
|
}
|
|
951
949
|
|
|
952
950
|
function select(luvio, params) {
|
|
@@ -957,8 +955,8 @@ function keyBuilder$1(luvio, params) {
|
|
|
957
955
|
id: params.urlParams.communityId
|
|
958
956
|
});
|
|
959
957
|
}
|
|
960
|
-
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
961
|
-
|
|
958
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
959
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
962
960
|
}
|
|
963
961
|
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
964
962
|
const { body } = response;
|
|
@@ -1066,7 +1064,11 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1066
1064
|
const request = createResourceRequest(resourceParams);
|
|
1067
1065
|
return luvio.dispatchResourceRequest(request, options)
|
|
1068
1066
|
.then((response) => {
|
|
1069
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () =>
|
|
1067
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1068
|
+
const cache = new StoreKeyMap();
|
|
1069
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1070
|
+
return cache;
|
|
1071
|
+
});
|
|
1070
1072
|
}, (response) => {
|
|
1071
1073
|
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
1072
1074
|
});
|
|
@@ -1133,4 +1135,4 @@ withDefaultLuvio((luvio) => {
|
|
|
1133
1135
|
});
|
|
1134
1136
|
|
|
1135
1137
|
export { getCommunity, getCommunity_imperative };
|
|
1136
|
-
// version: 1.
|
|
1138
|
+
// version: 1.170.1-5fb216cf1
|