@salesforce/lds-adapters-industries-eri 1.170.0 → 1.171.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, StoreKeyMap, deepFreeze } from '@luvio/engine';
7
+ import { serializeStructuredKey, deepFreeze, StoreKeyMap } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -360,8 +360,7 @@ const ingest = function ERIDigestOutputRepresentationIngest(input, path, luvio,
360
360
  }
361
361
  return createLink(key);
362
362
  };
363
- function getTypeCacheKeys(luvio, input, fullPathFactory) {
364
- const rootKeySet = new StoreKeyMap();
363
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
365
364
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
366
365
  const rootKey = keyBuilderFromType(luvio, input);
367
366
  rootKeySet.set(rootKey, {
@@ -369,14 +368,13 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
369
368
  representationName: RepresentationType,
370
369
  mergeable: false
371
370
  });
372
- return rootKeySet;
373
371
  }
374
372
 
375
373
  function select(luvio, params) {
376
374
  return select$1();
377
375
  }
378
- function getResponseCacheKeys(luvio, resourceParams, response) {
379
- return getTypeCacheKeys(luvio, response);
376
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
377
+ getTypeCacheKeys(storeKeyMap, luvio, response);
380
378
  }
381
379
  function ingestSuccess(luvio, resourceParams, response) {
382
380
  const { body } = response;
@@ -454,7 +452,11 @@ function buildNetworkSnapshot(luvio, config, options) {
454
452
  return luvio.handleSuccessResponse(() => {
455
453
  const snapshot = ingestSuccess(luvio, resourceParams, response);
456
454
  return luvio.storeBroadcast().then(() => snapshot);
457
- }, () => getResponseCacheKeys(luvio, resourceParams, response.body));
455
+ }, () => {
456
+ const cache = new StoreKeyMap();
457
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
458
+ return cache;
459
+ });
458
460
  }, (response) => {
459
461
  deepFreeze(response);
460
462
  throw response;
@@ -1,5 +1,5 @@
1
1
  import { ERIDigestInputRepresentation as types_ERIDigestInputRepresentation_ERIDigestInputRepresentation } from '../types/ERIDigestInputRepresentation';
2
- import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, FetchResponse as $64$luvio_engine_FetchResponse, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
2
+ import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, FetchResponse as $64$luvio_engine_FetchResponse, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
3
3
  import { ERIDigestOutputRepresentation as types_ERIDigestOutputRepresentation_ERIDigestOutputRepresentation } from '../types/ERIDigestOutputRepresentation';
4
4
  export interface ResourceRequestConfig {
5
5
  body: {
@@ -7,7 +7,7 @@ export interface ResourceRequestConfig {
7
7
  };
8
8
  }
9
9
  export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
10
- export declare function getResponseCacheKeys(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_ERIDigestOutputRepresentation_ERIDigestOutputRepresentation): $64$luvio_engine_DurableStoreKeyMetadataMap;
10
+ export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_ERIDigestOutputRepresentation_ERIDigestOutputRepresentation): void;
11
11
  export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_ERIDigestOutputRepresentation_ERIDigestOutputRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_ERIDigestOutputRepresentation_ERIDigestOutputRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_ERIDigestOutputRepresentation_ERIDigestOutputRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_ERIDigestOutputRepresentation_ERIDigestOutputRepresentation, any>;
12
12
  export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
13
13
  export default createResourceRequest;
@@ -1,4 +1,4 @@
1
- import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, BaseFragment as $64$luvio_engine_BaseFragment, ResourceIngest as $64$luvio_engine_ResourceIngest, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
1
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, BaseFragment as $64$luvio_engine_BaseFragment, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
2
  export declare const VERSION = "1b195c1743c167f786cfce25b5d46f7b";
3
3
  export declare function validate(obj: any, path?: string): TypeError | null;
4
4
  export declare const RepresentationType: string;
@@ -6,7 +6,7 @@ export declare function normalize(input: DigestNotification, existing: DigestNot
6
6
  export declare const select: () => $64$luvio_engine_BaseFragment;
7
7
  export declare function equals(existing: DigestNotificationNormalized, incoming: DigestNotificationNormalized): boolean;
8
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
9
- export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: DigestNotification, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
9
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: DigestNotification, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
10
10
  /**
11
11
  * Digest notification
12
12
  *
@@ -1,5 +1,5 @@
1
1
  import { FollowingInfoInputRepresentation as FollowingInfoInputRepresentation_FollowingInfoInputRepresentation } from './FollowingInfoInputRepresentation';
2
- import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
2
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
3
3
  export declare const VERSION = "4dbcf2a95858fb64733c314aec8b2401";
4
4
  export declare function validate(obj: any, path?: string): TypeError | null;
5
5
  export declare const RepresentationType: string;
@@ -7,7 +7,7 @@ export declare function normalize(input: ERIDigestInputRepresentation, existing:
7
7
  export declare const select: () => $64$luvio_engine_FragmentSelection;
8
8
  export declare function equals(existing: ERIDigestInputRepresentationNormalized, incoming: ERIDigestInputRepresentationNormalized): boolean;
9
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
- export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: ERIDigestInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
10
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: ERIDigestInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
11
11
  /**
12
12
  * An Input Representation for ERI digest
13
13
  *
@@ -1,5 +1,5 @@
1
1
  import { ERIDigestInputRepresentation as ERIDigestInputRepresentation_ERIDigestInputRepresentation } from './ERIDigestInputRepresentation';
2
- import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
2
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
3
3
  export declare const VERSION = "2960a9bd8b7f9a2434287718b36a3c8f";
4
4
  export declare function validate(obj: any, path?: string): TypeError | null;
5
5
  export declare const RepresentationType: string;
@@ -7,7 +7,7 @@ export declare function normalize(input: ERIDigestInputRepresentationWrapper, ex
7
7
  export declare const select: () => $64$luvio_engine_FragmentSelection;
8
8
  export declare function equals(existing: ERIDigestInputRepresentationWrapperNormalized, incoming: ERIDigestInputRepresentationWrapperNormalized): boolean;
9
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
- export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: ERIDigestInputRepresentationWrapper, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
10
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: ERIDigestInputRepresentationWrapper, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
11
11
  /**
12
12
  * Wrapper for ERI digest input representation
13
13
  *
@@ -18,7 +18,7 @@ export declare function normalize(input: ERIDigestOutputRepresentation, existing
18
18
  export declare const select: () => $64$luvio_engine_BaseFragment;
19
19
  export declare function equals(existing: ERIDigestOutputRepresentationNormalized, incoming: ERIDigestOutputRepresentationNormalized): boolean;
20
20
  export declare const ingest: $64$luvio_engine_ResourceIngest;
21
- export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: ERIDigestOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
21
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: ERIDigestOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
22
22
  /**
23
23
  * Output representation of a ERI Digest
24
24
  *
@@ -1,4 +1,4 @@
1
- import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
1
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
2
  export declare const VERSION = "f13216a55726dc792e111571a17425dd";
3
3
  export declare function validate(obj: any, path?: string): TypeError | null;
4
4
  export declare const RepresentationType: string;
@@ -6,7 +6,7 @@ export declare function normalize(input: FollowingInfo, existing: FollowingInfoN
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: FollowingInfoNormalized, incoming: FollowingInfoNormalized): boolean;
8
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
9
- export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FollowingInfo, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
9
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: FollowingInfo, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
10
10
  /**
11
11
  * following info
12
12
  *
@@ -1,4 +1,4 @@
1
- import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
1
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
2
  export declare const VERSION = "c19d9858fd94db6848f75214e264451e";
3
3
  export declare function validate(obj: any, path?: string): TypeError | null;
4
4
  export declare const RepresentationType: string;
@@ -6,7 +6,7 @@ export declare function normalize(input: FollowingInfoInputRepresentation, exist
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: FollowingInfoInputRepresentationNormalized, incoming: FollowingInfoInputRepresentationNormalized): boolean;
8
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
9
- export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FollowingInfoInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
9
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: FollowingInfoInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
10
10
  /**
11
11
  * An Input Representation following object
12
12
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-industries-eri",
3
- "version": "1.170.0",
3
+ "version": "1.171.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Einstein relationship insights",
6
6
  "main": "dist/es/es2018/industries-eri.js",
package/sfdc/index.js CHANGED
@@ -13,7 +13,7 @@
13
13
  */
14
14
  /* proxy-compat-disable */
15
15
  import { withDefaultLuvio } from 'force/ldsEngine';
16
- import { serializeStructuredKey, StoreKeyMap, deepFreeze } from 'force/luvioEngine';
16
+ import { serializeStructuredKey, deepFreeze, StoreKeyMap } from 'force/luvioEngine';
17
17
 
18
18
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
19
19
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -369,8 +369,7 @@ const ingest = function ERIDigestOutputRepresentationIngest(input, path, luvio,
369
369
  }
370
370
  return createLink(key);
371
371
  };
372
- function getTypeCacheKeys(luvio, input, fullPathFactory) {
373
- const rootKeySet = new StoreKeyMap();
372
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
374
373
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
375
374
  const rootKey = keyBuilderFromType(luvio, input);
376
375
  rootKeySet.set(rootKey, {
@@ -378,14 +377,13 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
378
377
  representationName: RepresentationType,
379
378
  mergeable: false
380
379
  });
381
- return rootKeySet;
382
380
  }
383
381
 
384
382
  function select(luvio, params) {
385
383
  return select$1();
386
384
  }
387
- function getResponseCacheKeys(luvio, resourceParams, response) {
388
- return getTypeCacheKeys(luvio, response);
385
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
386
+ getTypeCacheKeys(storeKeyMap, luvio, response);
389
387
  }
390
388
  function ingestSuccess(luvio, resourceParams, response) {
391
389
  const { body } = response;
@@ -463,7 +461,11 @@ function buildNetworkSnapshot(luvio, config, options) {
463
461
  return luvio.handleSuccessResponse(() => {
464
462
  const snapshot = ingestSuccess(luvio, resourceParams, response);
465
463
  return luvio.storeBroadcast().then(() => snapshot);
466
- }, () => getResponseCacheKeys(luvio, resourceParams, response.body));
464
+ }, () => {
465
+ const cache = new StoreKeyMap();
466
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
467
+ return cache;
468
+ });
467
469
  }, (response) => {
468
470
  deepFreeze(response);
469
471
  throw response;
@@ -498,4 +500,4 @@ withDefaultLuvio((luvio) => {
498
500
  });
499
501
 
500
502
  export { getERIDigest };
501
- // version: 1.170.0-1813b78e7
503
+ // version: 1.171.0-c5e524eba