@salesforce/lds-adapters-community-seo 1.214.2 → 1.216.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.
@@ -4,7 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckScalars, StoreKeyMap } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckConfig as typeCheckConfig$1, StoreKeyMap, createResourceParams as createResourceParams$1 } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -48,10 +48,13 @@ const snapshotRefreshOptions = {
48
48
  },
49
49
  }
50
50
  };
51
- function generateParamConfigMetadata(name, required, coerceFn) {
51
+ function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
52
52
  return {
53
53
  name,
54
54
  required,
55
+ resourceType,
56
+ typeCheckShape,
57
+ isArrayShape,
55
58
  coerceFn,
56
59
  };
57
60
  }
@@ -210,33 +213,19 @@ function createResourceRequest(config) {
210
213
 
211
214
  const adapterName = 'getRecordSeoProperties';
212
215
  const getRecordSeoProperties_ConfigPropertyMetadata = [
213
- generateParamConfigMetadata('communityId', true),
214
- generateParamConfigMetadata('recordId', true),
215
- generateParamConfigMetadata('fields', false),
216
+ generateParamConfigMetadata('communityId', true, 0 /* UrlParameter */, 0 /* String */),
217
+ generateParamConfigMetadata('recordId', true, 0 /* UrlParameter */, 0 /* String */),
218
+ generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */),
216
219
  ];
217
220
  const getRecordSeoProperties_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getRecordSeoProperties_ConfigPropertyMetadata);
218
- function createResourceParams(config) {
219
- const resourceParams = {
220
- urlParams: {
221
- communityId: config.communityId, recordId: config.recordId
222
- },
223
- queryParams: {
224
- fields: config.fields
225
- }
226
- };
227
- return resourceParams;
228
- }
221
+ const createResourceParams = /*#__PURE__*/ createResourceParams$1(getRecordSeoProperties_ConfigPropertyMetadata);
229
222
  function keyBuilder(luvio, config) {
230
223
  const resourceParams = createResourceParams(config);
231
224
  return keyBuilder$1(luvio, resourceParams);
232
225
  }
233
226
  function typeCheckConfig(untrustedConfig) {
234
227
  const config = {};
235
- typeCheckScalars(untrustedConfig, config, {
236
- communityId: 0 /* String */,
237
- recordId: 0 /* String */,
238
- fields: 0 /* String */,
239
- });
228
+ typeCheckConfig$1(untrustedConfig, config, getRecordSeoProperties_ConfigPropertyMetadata);
240
229
  return config;
241
230
  }
242
231
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -57,6 +57,6 @@ export declare const snapshotRefreshOptions: {
57
57
  export declare function stableJSONStringify(node: any): string | undefined;
58
58
  export declare function getFetchResponseStatusText(status: number): string;
59
59
  export declare function isUnfulfilledSnapshot<T, U>(snapshot: $64$luvio_engine_Snapshot<T, U>): snapshot is $64$luvio_engine_UnfulfilledSnapshot<T, U>;
60
- export declare function generateParamConfigMetadata(name: string, required: boolean, coerceFn?: (v: unknown) => unknown): $64$luvio_engine_AdapterConfigMetadata;
60
+ export declare function generateParamConfigMetadata(name: string, required: boolean, resourceType: $64$luvio_engine_AdapterConfigMetadata['resourceType'], typeCheckShape: $64$luvio_engine_AdapterConfigMetadata['typeCheckShape'], isArrayShape?: boolean, coerceFn?: (v: unknown) => unknown): $64$luvio_engine_AdapterConfigMetadata;
61
61
  export declare function buildAdapterValidationConfig(displayName: string, paramsMeta: $64$luvio_engine_AdapterConfigMetadata[]): AdapterValidationConfig;
62
62
  export declare const keyPrefix = "CommunitiesSeo";
@@ -10,7 +10,7 @@ export interface GetRecordSeoPropertiesConfig {
10
10
  recordId: string;
11
11
  fields?: string;
12
12
  }
13
- export declare function createResourceParams(config: GetRecordSeoPropertiesConfig): resources_getConnectCommunitiesSeoPropertiesByCommunityIdAndRecordId_ResourceRequestConfig;
13
+ export declare const createResourceParams: (config: GetRecordSeoPropertiesConfig) => resources_getConnectCommunitiesSeoPropertiesByCommunityIdAndRecordId_ResourceRequestConfig;
14
14
  export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetRecordSeoPropertiesConfig): string;
15
15
  export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetRecordSeoPropertiesConfig): $64$luvio_engine_NormalizedKeyMetadata;
16
16
  export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetRecordSeoPropertiesConfig>): adapter$45$utils_Untrusted<GetRecordSeoPropertiesConfig>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-community-seo",
3
- "version": "1.214.2",
3
+ "version": "1.216.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "APIs for various SEO features in experiences",
6
6
  "main": "dist/es/es2018/community-seo.js",
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, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckScalars, StoreKeyMap } from 'force/luvioEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckConfig as typeCheckConfig$1, StoreKeyMap, createResourceParams as createResourceParams$1 } from 'force/luvioEngine';
18
18
 
19
19
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
20
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -58,10 +58,13 @@ const snapshotRefreshOptions = {
58
58
  },
59
59
  }
60
60
  };
61
- function generateParamConfigMetadata(name, required, coerceFn) {
61
+ function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
62
62
  return {
63
63
  name,
64
64
  required,
65
+ resourceType,
66
+ typeCheckShape,
67
+ isArrayShape,
65
68
  coerceFn,
66
69
  };
67
70
  }
@@ -220,33 +223,19 @@ function createResourceRequest(config) {
220
223
 
221
224
  const adapterName = 'getRecordSeoProperties';
222
225
  const getRecordSeoProperties_ConfigPropertyMetadata = [
223
- generateParamConfigMetadata('communityId', true),
224
- generateParamConfigMetadata('recordId', true),
225
- generateParamConfigMetadata('fields', false),
226
+ generateParamConfigMetadata('communityId', true, 0 /* UrlParameter */, 0 /* String */),
227
+ generateParamConfigMetadata('recordId', true, 0 /* UrlParameter */, 0 /* String */),
228
+ generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */),
226
229
  ];
227
230
  const getRecordSeoProperties_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getRecordSeoProperties_ConfigPropertyMetadata);
228
- function createResourceParams(config) {
229
- const resourceParams = {
230
- urlParams: {
231
- communityId: config.communityId, recordId: config.recordId
232
- },
233
- queryParams: {
234
- fields: config.fields
235
- }
236
- };
237
- return resourceParams;
238
- }
231
+ const createResourceParams = /*#__PURE__*/ createResourceParams$1(getRecordSeoProperties_ConfigPropertyMetadata);
239
232
  function keyBuilder(luvio, config) {
240
233
  const resourceParams = createResourceParams(config);
241
234
  return keyBuilder$1(luvio, resourceParams);
242
235
  }
243
236
  function typeCheckConfig(untrustedConfig) {
244
237
  const config = {};
245
- typeCheckScalars(untrustedConfig, config, {
246
- communityId: 0 /* String */,
247
- recordId: 0 /* String */,
248
- fields: 0 /* String */,
249
- });
238
+ typeCheckConfig$1(untrustedConfig, config, getRecordSeoProperties_ConfigPropertyMetadata);
250
239
  return config;
251
240
  }
252
241
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -342,4 +331,4 @@ withDefaultLuvio((luvio) => {
342
331
  });
343
332
 
344
333
  export { getRecordSeoProperties, getRecordSeoProperties_imperative };
345
- // version: 1.214.2-2e2871620
334
+ // version: 1.216.0-1d57d45fe