@salesforce/lds-adapters-sales-eci 1.215.0 → 1.217.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, StoreKeyMap, typeCheckScalars, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$2, typeCheckConfig as typeCheckConfig$2, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$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
  }
@@ -289,22 +292,13 @@ function createResourceRequest$1(config) {
289
292
 
290
293
  const adapterName$1 = 'generateConversationSummary';
291
294
  const generateConversationSummary_ConfigPropertyMetadata = [
292
- generateParamConfigMetadata('conversationId', true),
295
+ generateParamConfigMetadata('conversationId', true, 0 /* UrlParameter */, 0 /* String */),
293
296
  ];
294
297
  const generateConversationSummary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, generateConversationSummary_ConfigPropertyMetadata);
295
- function createResourceParams$1(config) {
296
- const resourceParams = {
297
- urlParams: {
298
- conversationId: config.conversationId
299
- }
300
- };
301
- return resourceParams;
302
- }
298
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(generateConversationSummary_ConfigPropertyMetadata);
303
299
  function typeCheckConfig$1(untrustedConfig) {
304
300
  const config = {};
305
- typeCheckScalars(untrustedConfig, config, {
306
- conversationId: 0 /* String */,
307
- });
301
+ typeCheckConfig$2(untrustedConfig, config, generateConversationSummary_ConfigPropertyMetadata);
308
302
  return config;
309
303
  }
310
304
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -524,26 +518,17 @@ function createResourceRequest(config) {
524
518
 
525
519
  const adapterName = 'getConversationSummaryRelatedList';
526
520
  const getConversationSummaryRelatedList_ConfigPropertyMetadata = [
527
- generateParamConfigMetadata('id', true),
521
+ generateParamConfigMetadata('id', true, 0 /* UrlParameter */, 0 /* String */),
528
522
  ];
529
523
  const getConversationSummaryRelatedList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getConversationSummaryRelatedList_ConfigPropertyMetadata);
530
- function createResourceParams(config) {
531
- const resourceParams = {
532
- urlParams: {
533
- id: config.id
534
- }
535
- };
536
- return resourceParams;
537
- }
524
+ const createResourceParams = /*#__PURE__*/ createResourceParams$2(getConversationSummaryRelatedList_ConfigPropertyMetadata);
538
525
  function keyBuilder(luvio, config) {
539
526
  const resourceParams = createResourceParams(config);
540
527
  return keyBuilder$1(luvio, resourceParams);
541
528
  }
542
529
  function typeCheckConfig(untrustedConfig) {
543
530
  const config = {};
544
- typeCheckScalars(untrustedConfig, config, {
545
- id: 0 /* String */,
546
- });
531
+ typeCheckConfig$2(untrustedConfig, config, getConversationSummaryRelatedList_ConfigPropertyMetadata);
547
532
  return config;
548
533
  }
549
534
  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 = "eci";
@@ -8,7 +8,7 @@ export declare const generateConversationSummary_ConfigPropertyNames: adapter$45
8
8
  export interface GenerateConversationSummaryConfig {
9
9
  conversationId: string;
10
10
  }
11
- export declare function createResourceParams(config: GenerateConversationSummaryConfig): resources_postConversationSummaryAiGenerateByConversationId_ResourceRequestConfig;
11
+ export declare const createResourceParams: (config: GenerateConversationSummaryConfig) => resources_postConversationSummaryAiGenerateByConversationId_ResourceRequestConfig;
12
12
  export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GenerateConversationSummaryConfig>): adapter$45$utils_Untrusted<GenerateConversationSummaryConfig>;
13
13
  export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): GenerateConversationSummaryConfig | null;
14
14
  export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: GenerateConversationSummaryConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_ConversationSummaryRepresentation_ConversationSummaryRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_ConversationSummaryRepresentation_ConversationSummaryRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_ConversationSummaryRepresentation_ConversationSummaryRepresentation, any>>;
@@ -8,7 +8,7 @@ export declare const getConversationSummaryRelatedList_ConfigPropertyNames: adap
8
8
  export interface GetConversationSummaryRelatedListConfig {
9
9
  id: string;
10
10
  }
11
- export declare function createResourceParams(config: GetConversationSummaryRelatedListConfig): resources_getConversationSummaryRelatedById_ResourceRequestConfig;
11
+ export declare const createResourceParams: (config: GetConversationSummaryRelatedListConfig) => resources_getConversationSummaryRelatedById_ResourceRequestConfig;
12
12
  export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetConversationSummaryRelatedListConfig): string;
13
13
  export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetConversationSummaryRelatedListConfig): $64$luvio_engine_NormalizedKeyMetadata;
14
14
  export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetConversationSummaryRelatedListConfig>): adapter$45$utils_Untrusted<GetConversationSummaryRelatedListConfig>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-sales-eci",
3
- "version": "1.215.0",
3
+ "version": "1.217.0",
4
4
  "description": "Einstein Conversation Insights",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/es/es2018/sales-eci.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, StoreKeyMap, typeCheckScalars, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1 } from 'force/luvioEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$2, typeCheckConfig as typeCheckConfig$2, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$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
  }
@@ -299,22 +302,13 @@ function createResourceRequest$1(config) {
299
302
 
300
303
  const adapterName$1 = 'generateConversationSummary';
301
304
  const generateConversationSummary_ConfigPropertyMetadata = [
302
- generateParamConfigMetadata('conversationId', true),
305
+ generateParamConfigMetadata('conversationId', true, 0 /* UrlParameter */, 0 /* String */),
303
306
  ];
304
307
  const generateConversationSummary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, generateConversationSummary_ConfigPropertyMetadata);
305
- function createResourceParams$1(config) {
306
- const resourceParams = {
307
- urlParams: {
308
- conversationId: config.conversationId
309
- }
310
- };
311
- return resourceParams;
312
- }
308
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(generateConversationSummary_ConfigPropertyMetadata);
313
309
  function typeCheckConfig$1(untrustedConfig) {
314
310
  const config = {};
315
- typeCheckScalars(untrustedConfig, config, {
316
- conversationId: 0 /* String */,
317
- });
311
+ typeCheckConfig$2(untrustedConfig, config, generateConversationSummary_ConfigPropertyMetadata);
318
312
  return config;
319
313
  }
320
314
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -541,26 +535,17 @@ function createResourceRequestFromRepresentation(representation) {
541
535
 
542
536
  const adapterName = 'getConversationSummaryRelatedList';
543
537
  const getConversationSummaryRelatedList_ConfigPropertyMetadata = [
544
- generateParamConfigMetadata('id', true),
538
+ generateParamConfigMetadata('id', true, 0 /* UrlParameter */, 0 /* String */),
545
539
  ];
546
540
  const getConversationSummaryRelatedList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getConversationSummaryRelatedList_ConfigPropertyMetadata);
547
- function createResourceParams(config) {
548
- const resourceParams = {
549
- urlParams: {
550
- id: config.id
551
- }
552
- };
553
- return resourceParams;
554
- }
541
+ const createResourceParams = /*#__PURE__*/ createResourceParams$2(getConversationSummaryRelatedList_ConfigPropertyMetadata);
555
542
  function keyBuilder(luvio, config) {
556
543
  const resourceParams = createResourceParams(config);
557
544
  return keyBuilder$1(luvio, resourceParams);
558
545
  }
559
546
  function typeCheckConfig(untrustedConfig) {
560
547
  const config = {};
561
- typeCheckScalars(untrustedConfig, config, {
562
- id: 0 /* String */,
563
- });
548
+ typeCheckConfig$2(untrustedConfig, config, getConversationSummaryRelatedList_ConfigPropertyMetadata);
564
549
  return config;
565
550
  }
566
551
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -699,4 +684,4 @@ withDefaultLuvio((luvio) => {
699
684
  });
700
685
 
701
686
  export { generateConversationSummary, getConversationSummaryRelatedList, getConversationSummaryRelatedListNotifyChange, getConversationSummaryRelatedList_imperative };
702
- // version: 1.215.0-dc8d4056e
687
+ // version: 1.217.0-a59ee1de5