@salesforce/lds-adapters-commerce-store-pricing 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.
- package/dist/es/es2018/commerce-store-pricing.js +9 -7
- package/dist/es/es2018/types/src/generated/resources/getCommerceWebstoresPricingProductsByProductIdAndWebstoreId.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/PriceAdjustmentScheduleRepresentation.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/PriceAdjustmentTierRepresentation.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/PricingInputRepresentation.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/PricingLineItemInputRepresentation.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/PricingLineItemInputRepresentationList.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/PricingResultLineItemRepresentation.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/PricingResultRepresentation.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/ProductPriceRepresentation.d.ts +2 -2
- package/package.json +1 -1
- package/sfdc/index.js +10 -8
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey,
|
|
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;
|
|
@@ -232,8 +232,7 @@ const ingest = function ProductPriceRepresentationIngest(input, path, luvio, sto
|
|
|
232
232
|
}
|
|
233
233
|
return createLink(key);
|
|
234
234
|
};
|
|
235
|
-
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
236
|
-
const rootKeySet = new StoreKeyMap();
|
|
235
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
237
236
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
238
237
|
const rootKey = fullPathFactory();
|
|
239
238
|
rootKeySet.set(rootKey, {
|
|
@@ -241,7 +240,6 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
|
241
240
|
representationName: RepresentationType,
|
|
242
241
|
mergeable: false
|
|
243
242
|
});
|
|
244
|
-
return rootKeySet;
|
|
245
243
|
}
|
|
246
244
|
|
|
247
245
|
function select(luvio, params) {
|
|
@@ -250,8 +248,8 @@ function select(luvio, params) {
|
|
|
250
248
|
function keyBuilder$1(luvio, params) {
|
|
251
249
|
return keyPrefix + '::ProductPriceRepresentation:(' + 'effectiveAccountId:' + params.queryParams.effectiveAccountId + ',' + 'productId:' + params.urlParams.productId + ',' + 'webstoreId:' + params.urlParams.webstoreId + ')';
|
|
252
250
|
}
|
|
253
|
-
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
254
|
-
|
|
251
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
252
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
255
253
|
}
|
|
256
254
|
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
257
255
|
const { body } = response;
|
|
@@ -364,7 +362,11 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
364
362
|
const request = createResourceRequest(resourceParams);
|
|
365
363
|
return luvio.dispatchResourceRequest(request, options)
|
|
366
364
|
.then((response) => {
|
|
367
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () =>
|
|
365
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
366
|
+
const cache = new StoreKeyMap();
|
|
367
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
368
|
+
return cache;
|
|
369
|
+
});
|
|
368
370
|
}, (response) => {
|
|
369
371
|
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
370
372
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata,
|
|
1
|
+
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, FetchResponse as $64$luvio_engine_FetchResponse, SnapshotRefresh as $64$luvio_engine_SnapshotRefresh, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ErrorResponse as $64$luvio_engine_ErrorResponse, ErrorSnapshot as $64$luvio_engine_ErrorSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
2
2
|
import { ProductPriceRepresentation as types_ProductPriceRepresentation_ProductPriceRepresentation } from '../types/ProductPriceRepresentation';
|
|
3
3
|
export interface ResourceRequestConfig {
|
|
4
4
|
urlParams: {
|
|
@@ -12,7 +12,7 @@ export interface ResourceRequestConfig {
|
|
|
12
12
|
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
13
13
|
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): string;
|
|
14
14
|
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
15
|
-
export declare function getResponseCacheKeys(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_ProductPriceRepresentation_ProductPriceRepresentation):
|
|
15
|
+
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_ProductPriceRepresentation_ProductPriceRepresentation): void;
|
|
16
16
|
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_ProductPriceRepresentation_ProductPriceRepresentation>, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_ProductPriceRepresentation_ProductPriceRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_ProductPriceRepresentation_ProductPriceRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_ProductPriceRepresentation_ProductPriceRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_ProductPriceRepresentation_ProductPriceRepresentation, any>;
|
|
17
17
|
export declare function ingestError(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig, error: $64$luvio_engine_ErrorResponse, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_ProductPriceRepresentation_ProductPriceRepresentation>): $64$luvio_engine_ErrorSnapshot;
|
|
18
18
|
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PriceAdjustmentTierRepresentation as PriceAdjustmentTierRepresentation_PriceAdjustmentTierRepresentation } from './PriceAdjustmentTierRepresentation';
|
|
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,
|
|
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 = "1d3675bd094b43c389f8a51aa4d2c254";
|
|
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: PriceAdjustmentScheduleRepresentation,
|
|
|
7
7
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
8
8
|
export declare function equals(existing: PriceAdjustmentScheduleRepresentationNormalized, incoming: PriceAdjustmentScheduleRepresentationNormalized): boolean;
|
|
9
9
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
10
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: PriceAdjustmentScheduleRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
10
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: PriceAdjustmentScheduleRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
11
11
|
/**
|
|
12
12
|
* Representation for the details of a single price adjustment schedule
|
|
13
13
|
*
|
|
@@ -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,
|
|
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 = "5fc4a2b617d0a5a863b35e2080aa462e";
|
|
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: PriceAdjustmentTierRepresentation, exis
|
|
|
6
6
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
7
|
export declare function equals(existing: PriceAdjustmentTierRepresentationNormalized, incoming: PriceAdjustmentTierRepresentationNormalized): boolean;
|
|
8
8
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
9
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: PriceAdjustmentTierRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
9
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: PriceAdjustmentTierRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
10
|
/**
|
|
11
11
|
* Representation for the details of a single price adjustment tier
|
|
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,
|
|
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 = "ca867b31f0be284e39d63e54c0108475";
|
|
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: PricingInputRepresentation, existing: P
|
|
|
6
6
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
7
|
export declare function equals(existing: PricingInputRepresentationNormalized, incoming: PricingInputRepresentationNormalized): boolean;
|
|
8
8
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
9
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: PricingInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
9
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: PricingInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
10
|
/**
|
|
11
11
|
* Representation of the request for multiple products pricing
|
|
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,
|
|
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 = "4b4dc90d94aa335689190eeb37d012a3";
|
|
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: PricingLineItemInputRepresentation, exi
|
|
|
6
6
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
7
|
export declare function equals(existing: PricingLineItemInputRepresentationNormalized, incoming: PricingLineItemInputRepresentationNormalized): boolean;
|
|
8
8
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
9
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: PricingLineItemInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
9
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: PricingLineItemInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
10
|
/**
|
|
11
11
|
* Representation of the Line Item portion the request for multiple products pricing
|
|
12
12
|
*
|
package/dist/es/es2018/types/src/generated/types/PricingLineItemInputRepresentationList.d.ts
CHANGED
|
@@ -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,
|
|
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 = "4aa2776cf501f41713a698810f1a6877";
|
|
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: PricingLineItemInputRepresentationList,
|
|
|
6
6
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
7
|
export declare function equals(existing: PricingLineItemInputRepresentationListNormalized, incoming: PricingLineItemInputRepresentationListNormalized): boolean;
|
|
8
8
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
9
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: PricingLineItemInputRepresentationList, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
9
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: PricingLineItemInputRepresentationList, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
10
|
/**
|
|
11
11
|
* Wraps a list of Pricing Line Items for Apex
|
|
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,
|
|
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 = "affb4cdaccf55a9a63ec2f335628d264";
|
|
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: PricingResultLineItemRepresentation, ex
|
|
|
6
6
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
7
|
export declare function equals(existing: PricingResultLineItemRepresentationNormalized, incoming: PricingResultLineItemRepresentationNormalized): boolean;
|
|
8
8
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
9
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: PricingResultLineItemRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
9
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: PricingResultLineItemRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
10
|
/**
|
|
11
11
|
* Representation of the Line Item portion of the response for multiple products pricing
|
|
12
12
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PricingResultLineItemRepresentation as PricingResultLineItemRepresentation_PricingResultLineItemRepresentation } from './PricingResultLineItemRepresentation';
|
|
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,
|
|
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 = "b588fd40734163f901439d9bf88b31c5";
|
|
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: PricingResultRepresentation, existing:
|
|
|
7
7
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
8
8
|
export declare function equals(existing: PricingResultRepresentationNormalized, incoming: PricingResultRepresentationNormalized): boolean;
|
|
9
9
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
10
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: PricingResultRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
10
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: PricingResultRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
11
11
|
/**
|
|
12
12
|
* Representation for the response for multiple products pricing
|
|
13
13
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PriceAdjustmentScheduleRepresentation as PriceAdjustmentScheduleRepresentation_PriceAdjustmentScheduleRepresentation } from './PriceAdjustmentScheduleRepresentation';
|
|
2
|
-
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,
|
|
2
|
+
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';
|
|
3
3
|
export declare const VERSION = "3e2882f4e8e38efd02e1a14114269e4c";
|
|
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: ProductPriceRepresentation, existing: P
|
|
|
7
7
|
export declare const select: () => $64$luvio_engine_BaseFragment;
|
|
8
8
|
export declare function equals(existing: ProductPriceRepresentationNormalized, incoming: ProductPriceRepresentationNormalized): boolean;
|
|
9
9
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
10
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: ProductPriceRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
10
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: ProductPriceRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
11
11
|
/**
|
|
12
12
|
* Representation for the details of a single product price
|
|
13
13
|
*
|
package/package.json
CHANGED
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,
|
|
17
|
+
import { serializeStructuredKey, deepFreeze, StoreKeyMap } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -242,8 +242,7 @@ const ingest = function ProductPriceRepresentationIngest(input, path, luvio, sto
|
|
|
242
242
|
}
|
|
243
243
|
return createLink(key);
|
|
244
244
|
};
|
|
245
|
-
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
246
|
-
const rootKeySet = new StoreKeyMap();
|
|
245
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
247
246
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
248
247
|
const rootKey = fullPathFactory();
|
|
249
248
|
rootKeySet.set(rootKey, {
|
|
@@ -251,7 +250,6 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
|
251
250
|
representationName: RepresentationType,
|
|
252
251
|
mergeable: false
|
|
253
252
|
});
|
|
254
|
-
return rootKeySet;
|
|
255
253
|
}
|
|
256
254
|
|
|
257
255
|
function select(luvio, params) {
|
|
@@ -260,8 +258,8 @@ function select(luvio, params) {
|
|
|
260
258
|
function keyBuilder$1(luvio, params) {
|
|
261
259
|
return keyPrefix + '::ProductPriceRepresentation:(' + 'effectiveAccountId:' + params.queryParams.effectiveAccountId + ',' + 'productId:' + params.urlParams.productId + ',' + 'webstoreId:' + params.urlParams.webstoreId + ')';
|
|
262
260
|
}
|
|
263
|
-
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
264
|
-
|
|
261
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
262
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
265
263
|
}
|
|
266
264
|
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
267
265
|
const { body } = response;
|
|
@@ -374,7 +372,11 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
374
372
|
const request = createResourceRequest(resourceParams);
|
|
375
373
|
return luvio.dispatchResourceRequest(request, options)
|
|
376
374
|
.then((response) => {
|
|
377
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () =>
|
|
375
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
376
|
+
const cache = new StoreKeyMap();
|
|
377
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
378
|
+
return cache;
|
|
379
|
+
});
|
|
378
380
|
}, (response) => {
|
|
379
381
|
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
380
382
|
});
|
|
@@ -441,4 +443,4 @@ withDefaultLuvio((luvio) => {
|
|
|
441
443
|
});
|
|
442
444
|
|
|
443
445
|
export { getProductPrice, getProductPrice_imperative };
|
|
444
|
-
// version: 1.170.
|
|
446
|
+
// version: 1.170.1-5fb216cf1
|