@salesforce/lds-adapters-community-seo 1.170.0 → 1.171.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/es/es2018/community-seo.js +9 -7
- package/dist/es/es2018/types/src/generated/resources/getConnectCommunitiesSeoPropertiesByCommunityIdAndRecordId.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/RecordSeoPropertiesRepresentation.d.ts +2 -2
- 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$1, create: ObjectCreate$1 } = Object;
|
|
@@ -146,8 +146,7 @@ const ingest = function RecordSeoPropertiesRepresentationIngest(input, path, luv
|
|
|
146
146
|
}
|
|
147
147
|
return createLink(key);
|
|
148
148
|
};
|
|
149
|
-
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
150
|
-
const rootKeySet = new StoreKeyMap();
|
|
149
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
151
150
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
152
151
|
const rootKey = fullPathFactory();
|
|
153
152
|
rootKeySet.set(rootKey, {
|
|
@@ -155,7 +154,6 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
|
155
154
|
representationName: RepresentationType,
|
|
156
155
|
mergeable: false
|
|
157
156
|
});
|
|
158
|
-
return rootKeySet;
|
|
159
157
|
}
|
|
160
158
|
|
|
161
159
|
function select(luvio, params) {
|
|
@@ -164,8 +162,8 @@ function select(luvio, params) {
|
|
|
164
162
|
function keyBuilder$1(luvio, params) {
|
|
165
163
|
return keyPrefix + '::RecordSeoPropertiesRepresentation:(' + 'fields:' + params.queryParams.fields + ',' + 'communityId:' + params.urlParams.communityId + ',' + 'recordId:' + params.urlParams.recordId + ')';
|
|
166
164
|
}
|
|
167
|
-
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
168
|
-
|
|
165
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
166
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
169
167
|
}
|
|
170
168
|
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
171
169
|
const { body } = response;
|
|
@@ -284,7 +282,11 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
284
282
|
const request = createResourceRequest(resourceParams);
|
|
285
283
|
return luvio.dispatchResourceRequest(request, options)
|
|
286
284
|
.then((response) => {
|
|
287
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () =>
|
|
285
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
286
|
+
const cache = new StoreKeyMap();
|
|
287
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
288
|
+
return cache;
|
|
289
|
+
});
|
|
288
290
|
}, (response) => {
|
|
289
291
|
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
290
292
|
});
|
|
@@ -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 { RecordSeoPropertiesRepresentation as types_RecordSeoPropertiesRepresentation_RecordSeoPropertiesRepresentation } from '../types/RecordSeoPropertiesRepresentation';
|
|
3
3
|
export interface ResourceRequestConfig {
|
|
4
4
|
urlParams: {
|
|
@@ -12,7 +12,7 @@ export interface ResourceRequestConfig {
|
|
|
12
12
|
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
13
13
|
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): string;
|
|
14
14
|
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
15
|
-
export declare function getResponseCacheKeys(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_RecordSeoPropertiesRepresentation_RecordSeoPropertiesRepresentation):
|
|
15
|
+
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_RecordSeoPropertiesRepresentation_RecordSeoPropertiesRepresentation): void;
|
|
16
16
|
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_RecordSeoPropertiesRepresentation_RecordSeoPropertiesRepresentation>, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_RecordSeoPropertiesRepresentation_RecordSeoPropertiesRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_RecordSeoPropertiesRepresentation_RecordSeoPropertiesRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_RecordSeoPropertiesRepresentation_RecordSeoPropertiesRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_RecordSeoPropertiesRepresentation_RecordSeoPropertiesRepresentation, any>;
|
|
17
17
|
export declare function ingestError(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig, error: $64$luvio_engine_ErrorResponse, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_RecordSeoPropertiesRepresentation_RecordSeoPropertiesRepresentation>): $64$luvio_engine_ErrorSnapshot;
|
|
18
18
|
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, BaseFragment as $64$luvio_engine_BaseFragment, ResourceIngest as $64$luvio_engine_ResourceIngest,
|
|
1
|
+
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, BaseFragment as $64$luvio_engine_BaseFragment, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
2
2
|
export declare const TTL = 3600000;
|
|
3
3
|
export declare const VERSION = "90faea19574b714959a69d7deba72445";
|
|
4
4
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
@@ -7,7 +7,7 @@ export declare function normalize(input: RecordSeoPropertiesRepresentation, exis
|
|
|
7
7
|
export declare const select: () => $64$luvio_engine_BaseFragment;
|
|
8
8
|
export declare function equals(existing: RecordSeoPropertiesRepresentationNormalized, incoming: RecordSeoPropertiesRepresentationNormalized): boolean;
|
|
9
9
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
10
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: RecordSeoPropertiesRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
10
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: RecordSeoPropertiesRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
11
11
|
/**
|
|
12
12
|
* SEO properties for a record
|
|
13
13
|
*
|
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$1, create: ObjectCreate$1 } = Object;
|
|
@@ -156,8 +156,7 @@ const ingest = function RecordSeoPropertiesRepresentationIngest(input, path, luv
|
|
|
156
156
|
}
|
|
157
157
|
return createLink(key);
|
|
158
158
|
};
|
|
159
|
-
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
160
|
-
const rootKeySet = new StoreKeyMap();
|
|
159
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
161
160
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
162
161
|
const rootKey = fullPathFactory();
|
|
163
162
|
rootKeySet.set(rootKey, {
|
|
@@ -165,7 +164,6 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
|
165
164
|
representationName: RepresentationType,
|
|
166
165
|
mergeable: false
|
|
167
166
|
});
|
|
168
|
-
return rootKeySet;
|
|
169
167
|
}
|
|
170
168
|
|
|
171
169
|
function select(luvio, params) {
|
|
@@ -174,8 +172,8 @@ function select(luvio, params) {
|
|
|
174
172
|
function keyBuilder$1(luvio, params) {
|
|
175
173
|
return keyPrefix + '::RecordSeoPropertiesRepresentation:(' + 'fields:' + params.queryParams.fields + ',' + 'communityId:' + params.urlParams.communityId + ',' + 'recordId:' + params.urlParams.recordId + ')';
|
|
176
174
|
}
|
|
177
|
-
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
178
|
-
|
|
175
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
176
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
179
177
|
}
|
|
180
178
|
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
181
179
|
const { body } = response;
|
|
@@ -294,7 +292,11 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
294
292
|
const request = createResourceRequest(resourceParams);
|
|
295
293
|
return luvio.dispatchResourceRequest(request, options)
|
|
296
294
|
.then((response) => {
|
|
297
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () =>
|
|
295
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
296
|
+
const cache = new StoreKeyMap();
|
|
297
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
298
|
+
return cache;
|
|
299
|
+
});
|
|
298
300
|
}, (response) => {
|
|
299
301
|
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
300
302
|
});
|
|
@@ -361,4 +363,4 @@ withDefaultLuvio((luvio) => {
|
|
|
361
363
|
});
|
|
362
364
|
|
|
363
365
|
export { getRecordSeoProperties, getRecordSeoProperties_imperative };
|
|
364
|
-
// version: 1.
|
|
366
|
+
// version: 1.171.0-c5e524eba
|