@salesforce/lds-adapters-sales-automation-rules 1.170.0 → 1.170.1

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, create: ObjectCreate } = Object;
@@ -186,8 +186,7 @@ const ingest = function AutomatedActionApplyReminderRepresentationIngest(input,
186
186
  }
187
187
  return createLink(key);
188
188
  };
189
- function getTypeCacheKeys(luvio, input, fullPathFactory) {
190
- const rootKeySet = new StoreKeyMap();
189
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
191
190
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
192
191
  const rootKey = keyBuilderFromType(luvio, input);
193
192
  rootKeySet.set(rootKey, {
@@ -195,14 +194,13 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
195
194
  representationName: RepresentationType,
196
195
  mergeable: false
197
196
  });
198
- return rootKeySet;
199
197
  }
200
198
 
201
199
  function select(luvio, params) {
202
200
  return select$1();
203
201
  }
204
- function getResponseCacheKeys(luvio, resourceParams, response) {
205
- return getTypeCacheKeys(luvio, response);
202
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
203
+ getTypeCacheKeys(storeKeyMap, luvio, response);
206
204
  }
207
205
  function ingestSuccess(luvio, resourceParams, response) {
208
206
  const { body } = response;
@@ -280,7 +278,11 @@ function buildNetworkSnapshot(luvio, config, options) {
280
278
  return luvio.handleSuccessResponse(() => {
281
279
  const snapshot = ingestSuccess(luvio, resourceParams, response);
282
280
  return luvio.storeBroadcast().then(() => snapshot);
283
- }, () => getResponseCacheKeys(luvio, resourceParams, response.body));
281
+ }, () => {
282
+ const cache = new StoreKeyMap();
283
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
284
+ return cache;
285
+ });
284
286
  }, (response) => {
285
287
  deepFreeze(response);
286
288
  throw response;
@@ -1,5 +1,5 @@
1
1
  import { AutomatedActionApplyReminderInputRepresentation as types_AutomatedActionApplyReminderInputRepresentation_AutomatedActionApplyReminderInputRepresentation } from '../types/AutomatedActionApplyReminderInputRepresentation';
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 { AutomatedActionApplyReminderRepresentation as types_AutomatedActionApplyReminderRepresentation_AutomatedActionApplyReminderRepresentation } from '../types/AutomatedActionApplyReminderRepresentation';
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_AutomatedActionApplyReminderRepresentation_AutomatedActionApplyReminderRepresentation): $64$luvio_engine_DurableStoreKeyMetadataMap;
10
+ export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_AutomatedActionApplyReminderRepresentation_AutomatedActionApplyReminderRepresentation): void;
11
11
  export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_AutomatedActionApplyReminderRepresentation_AutomatedActionApplyReminderRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_AutomatedActionApplyReminderRepresentation_AutomatedActionApplyReminderRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_AutomatedActionApplyReminderRepresentation_AutomatedActionApplyReminderRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_AutomatedActionApplyReminderRepresentation_AutomatedActionApplyReminderRepresentation, 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, 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 = "4b4b91fb58d566385f77c583893bb51d";
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: AutomatedActionApplyReminderInputRepres
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: AutomatedActionApplyReminderInputRepresentationNormalized, incoming: AutomatedActionApplyReminderInputRepresentationNormalized): boolean;
8
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
9
- export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: AutomatedActionApplyReminderInputRepresentation, 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: AutomatedActionApplyReminderInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
10
10
  /**
11
11
  * AutomatedActionApplyReminderInput representation
12
12
  *
@@ -1,5 +1,5 @@
1
1
  import { AutomatedActionApplyReminderInputRepresentation as AutomatedActionApplyReminderInputRepresentation_AutomatedActionApplyReminderInputRepresentation } from './AutomatedActionApplyReminderInputRepresentation';
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 = "5c248afe8f7f4529cf1a26804ba375b8";
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: AutomatedActionApplyReminderInputWrappe
7
7
  export declare const select: () => $64$luvio_engine_FragmentSelection;
8
8
  export declare function equals(existing: AutomatedActionApplyReminderInputWrapperRepresentationNormalized, incoming: AutomatedActionApplyReminderInputWrapperRepresentationNormalized): boolean;
9
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
- export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: AutomatedActionApplyReminderInputWrapperRepresentation, 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: AutomatedActionApplyReminderInputWrapperRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
11
11
  /**
12
12
  * Wrapper for applying a reminder input representation
13
13
  *
@@ -15,7 +15,7 @@ export declare function normalize(input: AutomatedActionApplyReminderRepresentat
15
15
  export declare const select: () => $64$luvio_engine_FragmentSelection;
16
16
  export declare function equals(existing: AutomatedActionApplyReminderRepresentationNormalized, incoming: AutomatedActionApplyReminderRepresentationNormalized): boolean;
17
17
  export declare const ingest: $64$luvio_engine_ResourceIngest;
18
- export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: AutomatedActionApplyReminderRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
18
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: AutomatedActionApplyReminderRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
19
19
  /**
20
20
  * Automated Action apply reminder result
21
21
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-sales-automation-rules",
3
- "version": "1.170.0",
3
+ "version": "1.170.1",
4
4
  "description": "APIs for the Automation Rules feature in Sales",
5
5
  "license": "MIT",
6
6
  "main": "dist/es/es2018/sales-automation-rules.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, create: ObjectCreate } = Object;
@@ -195,8 +195,7 @@ const ingest = function AutomatedActionApplyReminderRepresentationIngest(input,
195
195
  }
196
196
  return createLink(key);
197
197
  };
198
- function getTypeCacheKeys(luvio, input, fullPathFactory) {
199
- const rootKeySet = new StoreKeyMap();
198
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
200
199
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
201
200
  const rootKey = keyBuilderFromType(luvio, input);
202
201
  rootKeySet.set(rootKey, {
@@ -204,14 +203,13 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
204
203
  representationName: RepresentationType,
205
204
  mergeable: false
206
205
  });
207
- return rootKeySet;
208
206
  }
209
207
 
210
208
  function select(luvio, params) {
211
209
  return select$1();
212
210
  }
213
- function getResponseCacheKeys(luvio, resourceParams, response) {
214
- return getTypeCacheKeys(luvio, response);
211
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
212
+ getTypeCacheKeys(storeKeyMap, luvio, response);
215
213
  }
216
214
  function ingestSuccess(luvio, resourceParams, response) {
217
215
  const { body } = response;
@@ -289,7 +287,11 @@ function buildNetworkSnapshot(luvio, config, options) {
289
287
  return luvio.handleSuccessResponse(() => {
290
288
  const snapshot = ingestSuccess(luvio, resourceParams, response);
291
289
  return luvio.storeBroadcast().then(() => snapshot);
292
- }, () => getResponseCacheKeys(luvio, resourceParams, response.body));
290
+ }, () => {
291
+ const cache = new StoreKeyMap();
292
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
293
+ return cache;
294
+ });
293
295
  }, (response) => {
294
296
  deepFreeze(response);
295
297
  throw response;
@@ -324,4 +326,4 @@ withDefaultLuvio((luvio) => {
324
326
  });
325
327
 
326
328
  export { applyReminder };
327
- // version: 1.170.0-1813b78e7
329
+ // version: 1.170.1-5fb216cf1