@salesforce/lds-adapters-platform-data-provider 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
  }
@@ -195,30 +198,18 @@ function createResourceRequest(config) {
195
198
 
196
199
  const adapterName = 'getSchema';
197
200
  const getSchema_ConfigPropertyMetadata = [
198
- generateParamConfigMetadata('dataProviderFullyQualifiedName', true),
199
- generateParamConfigMetadata('schema', true),
201
+ generateParamConfigMetadata('dataProviderFullyQualifiedName', true, 0 /* UrlParameter */, 0 /* String */),
202
+ generateParamConfigMetadata('schema', true, 2 /* Body */, 4 /* Unsupported */),
200
203
  ];
201
204
  const getSchema_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getSchema_ConfigPropertyMetadata);
202
- function createResourceParams(config) {
203
- const resourceParams = {
204
- urlParams: {
205
- dataProviderFullyQualifiedName: config.dataProviderFullyQualifiedName
206
- },
207
- body: {
208
- schema: config.schema
209
- }
210
- };
211
- return resourceParams;
212
- }
205
+ const createResourceParams = /*#__PURE__*/ createResourceParams$1(getSchema_ConfigPropertyMetadata);
213
206
  function keyBuilder(luvio, config) {
214
207
  const resourceParams = createResourceParams(config);
215
208
  return keyBuilder$1(luvio, resourceParams);
216
209
  }
217
210
  function typeCheckConfig(untrustedConfig) {
218
211
  const config = {};
219
- typeCheckScalars(untrustedConfig, config, {
220
- dataProviderFullyQualifiedName: 0 /* String */,
221
- });
212
+ typeCheckConfig$1(untrustedConfig, config, getSchema_ConfigPropertyMetadata);
222
213
  const untrustedConfig_schema = untrustedConfig.schema;
223
214
  config.schema = untrustedConfig_schema;
224
215
  return config;
@@ -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 = "DataProviders";
@@ -9,7 +9,7 @@ export interface GetSchemaConfig {
9
9
  dataProviderFullyQualifiedName: string;
10
10
  schema: unknown;
11
11
  }
12
- export declare function createResourceParams(config: GetSchemaConfig): resources_postConnectDataProvidersSchemaByDataProviderFullyQualifiedName_ResourceRequestConfig;
12
+ export declare const createResourceParams: (config: GetSchemaConfig) => resources_postConnectDataProvidersSchemaByDataProviderFullyQualifiedName_ResourceRequestConfig;
13
13
  export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetSchemaConfig): string;
14
14
  export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetSchemaConfig): $64$luvio_engine_NormalizedKeyMetadata;
15
15
  export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetSchemaConfig>): adapter$45$utils_Untrusted<GetSchemaConfig>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-platform-data-provider",
3
- "version": "1.214.2",
3
+ "version": "1.216.0",
4
4
  "description": "Data Provider connect api resource family",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/es/es2018/platform-data-provider.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
  }
@@ -205,30 +208,18 @@ function createResourceRequest(config) {
205
208
 
206
209
  const adapterName = 'getSchema';
207
210
  const getSchema_ConfigPropertyMetadata = [
208
- generateParamConfigMetadata('dataProviderFullyQualifiedName', true),
209
- generateParamConfigMetadata('schema', true),
211
+ generateParamConfigMetadata('dataProviderFullyQualifiedName', true, 0 /* UrlParameter */, 0 /* String */),
212
+ generateParamConfigMetadata('schema', true, 2 /* Body */, 4 /* Unsupported */),
210
213
  ];
211
214
  const getSchema_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getSchema_ConfigPropertyMetadata);
212
- function createResourceParams(config) {
213
- const resourceParams = {
214
- urlParams: {
215
- dataProviderFullyQualifiedName: config.dataProviderFullyQualifiedName
216
- },
217
- body: {
218
- schema: config.schema
219
- }
220
- };
221
- return resourceParams;
222
- }
215
+ const createResourceParams = /*#__PURE__*/ createResourceParams$1(getSchema_ConfigPropertyMetadata);
223
216
  function keyBuilder(luvio, config) {
224
217
  const resourceParams = createResourceParams(config);
225
218
  return keyBuilder$1(luvio, resourceParams);
226
219
  }
227
220
  function typeCheckConfig(untrustedConfig) {
228
221
  const config = {};
229
- typeCheckScalars(untrustedConfig, config, {
230
- dataProviderFullyQualifiedName: 0 /* String */,
231
- });
222
+ typeCheckConfig$1(untrustedConfig, config, getSchema_ConfigPropertyMetadata);
232
223
  const untrustedConfig_schema = untrustedConfig.schema;
233
224
  config.schema = untrustedConfig_schema;
234
225
  return config;
@@ -326,4 +317,4 @@ withDefaultLuvio((luvio) => {
326
317
  });
327
318
 
328
319
  export { getSchema, getSchema_imperative };
329
- // version: 1.214.2-2e2871620
320
+ // version: 1.216.0-1d57d45fe