@salesforce/lds-adapters-community-info 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, create: ObjectCreate } = 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
  }
@@ -993,26 +996,17 @@ function createResourceRequest(config) {
993
996
 
994
997
  const adapterName = 'getCommunity';
995
998
  const getCommunity_ConfigPropertyMetadata = [
996
- generateParamConfigMetadata('communityId', true),
999
+ generateParamConfigMetadata('communityId', true, 0 /* UrlParameter */, 0 /* String */),
997
1000
  ];
998
1001
  const getCommunity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getCommunity_ConfigPropertyMetadata);
999
- function createResourceParams(config) {
1000
- const resourceParams = {
1001
- urlParams: {
1002
- communityId: config.communityId
1003
- }
1004
- };
1005
- return resourceParams;
1006
- }
1002
+ const createResourceParams = /*#__PURE__*/ createResourceParams$1(getCommunity_ConfigPropertyMetadata);
1007
1003
  function keyBuilder(luvio, config) {
1008
1004
  const resourceParams = createResourceParams(config);
1009
1005
  return keyBuilder$1(luvio, resourceParams);
1010
1006
  }
1011
1007
  function typeCheckConfig(untrustedConfig) {
1012
1008
  const config = {};
1013
- typeCheckScalars(untrustedConfig, config, {
1014
- communityId: 0 /* String */,
1015
- });
1009
+ typeCheckConfig$1(untrustedConfig, config, getCommunity_ConfigPropertyMetadata);
1016
1010
  return config;
1017
1011
  }
1018
1012
  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 = "CommunityInfo";
@@ -8,7 +8,7 @@ export declare const getCommunity_ConfigPropertyNames: adapter$45$utils_AdapterV
8
8
  export interface GetCommunityConfig {
9
9
  communityId: string;
10
10
  }
11
- export declare function createResourceParams(config: GetCommunityConfig): resources_getConnectCommunitiesByCommunityId_ResourceRequestConfig;
11
+ export declare const createResourceParams: (config: GetCommunityConfig) => resources_getConnectCommunitiesByCommunityId_ResourceRequestConfig;
12
12
  export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetCommunityConfig): string;
13
13
  export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetCommunityConfig): $64$luvio_engine_NormalizedKeyMetadata;
14
14
  export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetCommunityConfig>): adapter$45$utils_Untrusted<GetCommunityConfig>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-community-info",
3
- "version": "1.214.2",
3
+ "version": "1.216.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Gets info about the community",
6
6
  "main": "dist/es/es2018/community-info.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, create: ObjectCreate } = 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
  }
@@ -1003,26 +1006,17 @@ function createResourceRequest(config) {
1003
1006
 
1004
1007
  const adapterName = 'getCommunity';
1005
1008
  const getCommunity_ConfigPropertyMetadata = [
1006
- generateParamConfigMetadata('communityId', true),
1009
+ generateParamConfigMetadata('communityId', true, 0 /* UrlParameter */, 0 /* String */),
1007
1010
  ];
1008
1011
  const getCommunity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getCommunity_ConfigPropertyMetadata);
1009
- function createResourceParams(config) {
1010
- const resourceParams = {
1011
- urlParams: {
1012
- communityId: config.communityId
1013
- }
1014
- };
1015
- return resourceParams;
1016
- }
1012
+ const createResourceParams = /*#__PURE__*/ createResourceParams$1(getCommunity_ConfigPropertyMetadata);
1017
1013
  function keyBuilder(luvio, config) {
1018
1014
  const resourceParams = createResourceParams(config);
1019
1015
  return keyBuilder$1(luvio, resourceParams);
1020
1016
  }
1021
1017
  function typeCheckConfig(untrustedConfig) {
1022
1018
  const config = {};
1023
- typeCheckScalars(untrustedConfig, config, {
1024
- communityId: 0 /* String */,
1025
- });
1019
+ typeCheckConfig$1(untrustedConfig, config, getCommunity_ConfigPropertyMetadata);
1026
1020
  return config;
1027
1021
  }
1028
1022
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -1118,4 +1112,4 @@ withDefaultLuvio((luvio) => {
1118
1112
  });
1119
1113
 
1120
1114
  export { getCommunity, getCommunity_imperative };
1121
- // version: 1.214.2-2e2871620
1115
+ // version: 1.216.0-1d57d45fe