@salesforce/lds-adapters-industries-tearsheet 1.207.0 → 1.208.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, deepFreeze, StoreKeyMap } from '@luvio/engine';
7
+ import { serializeStructuredKey, deepFreeze, typeCheckScalars, StoreKeyMap } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -236,22 +236,12 @@ function keyBuilder(luvio, config) {
236
236
  }
237
237
  function typeCheckConfig(untrustedConfig) {
238
238
  const config = {};
239
- const untrustedConfig_accountId = untrustedConfig.accountId;
240
- if (typeof untrustedConfig_accountId === 'string') {
241
- config.accountId = untrustedConfig_accountId;
242
- }
243
- const untrustedConfig_limit = untrustedConfig.limit;
244
- if (typeof untrustedConfig_limit === 'number' && Math.floor(untrustedConfig_limit) === untrustedConfig_limit) {
245
- config.limit = untrustedConfig_limit;
246
- }
247
- const untrustedConfig_offset = untrustedConfig.offset;
248
- if (typeof untrustedConfig_offset === 'number' && Math.floor(untrustedConfig_offset) === untrustedConfig_offset) {
249
- config.offset = untrustedConfig_offset;
250
- }
251
- const untrustedConfig_templateType = untrustedConfig.templateType;
252
- if (typeof untrustedConfig_templateType === 'string') {
253
- config.templateType = untrustedConfig_templateType;
254
- }
239
+ typeCheckScalars(untrustedConfig, config, {
240
+ accountId: 0 /* String */,
241
+ limit: 3 /* Integer */,
242
+ offset: 3 /* Integer */,
243
+ templateType: 0 /* String */,
244
+ });
255
245
  return config;
256
246
  }
257
247
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-industries-tearsheet",
3
- "version": "1.207.0",
3
+ "version": "1.208.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "APIs for Tearsheets feature in FSC",
6
6
  "main": "dist/es/es2018/industries-tearsheet.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, deepFreeze, StoreKeyMap } from 'force/luvioEngine';
17
+ import { serializeStructuredKey, deepFreeze, typeCheckScalars, StoreKeyMap } from 'force/luvioEngine';
18
18
 
19
19
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
20
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -246,22 +246,12 @@ function keyBuilder(luvio, config) {
246
246
  }
247
247
  function typeCheckConfig(untrustedConfig) {
248
248
  const config = {};
249
- const untrustedConfig_accountId = untrustedConfig.accountId;
250
- if (typeof untrustedConfig_accountId === 'string') {
251
- config.accountId = untrustedConfig_accountId;
252
- }
253
- const untrustedConfig_limit = untrustedConfig.limit;
254
- if (typeof untrustedConfig_limit === 'number' && Math.floor(untrustedConfig_limit) === untrustedConfig_limit) {
255
- config.limit = untrustedConfig_limit;
256
- }
257
- const untrustedConfig_offset = untrustedConfig.offset;
258
- if (typeof untrustedConfig_offset === 'number' && Math.floor(untrustedConfig_offset) === untrustedConfig_offset) {
259
- config.offset = untrustedConfig_offset;
260
- }
261
- const untrustedConfig_templateType = untrustedConfig.templateType;
262
- if (typeof untrustedConfig_templateType === 'string') {
263
- config.templateType = untrustedConfig_templateType;
264
- }
249
+ typeCheckScalars(untrustedConfig, config, {
250
+ accountId: 0 /* String */,
251
+ limit: 3 /* Integer */,
252
+ offset: 3 /* Integer */,
253
+ templateType: 0 /* String */,
254
+ });
265
255
  return config;
266
256
  }
267
257
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -371,4 +361,4 @@ withDefaultLuvio((luvio) => {
371
361
  });
372
362
 
373
363
  export { getTearsheets, getTearsheets_imperative };
374
- // version: 1.207.0-d542abb81
364
+ // version: 1.208.0-027673bd6