@salesforce/lds-adapters-commerce-search 1.134.7 → 1.134.9

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.
Files changed (31) hide show
  1. package/dist/es/es2018/commerce-search.js +62 -62
  2. package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +1 -7
  3. package/dist/es/es2018/types/src/generated/types/CommerceSearchIndexCollectionOutputRepresentation.d.ts +0 -1
  4. package/dist/es/es2018/types/src/generated/types/CommerceSearchIndexOutputRepresentation.d.ts +0 -1
  5. package/dist/es/es2018/types/src/generated/types/DistinctFacetValueRepresentation.d.ts +0 -1
  6. package/dist/es/es2018/types/src/generated/types/DistinctValueSearchFacetRepresentation.d.ts +0 -1
  7. package/dist/es/es2018/types/src/generated/types/FacetValueRepresentation.d.ts +0 -1
  8. package/dist/es/es2018/types/src/generated/types/FacetableAttributeInputRepresentation.d.ts +0 -1
  9. package/dist/es/es2018/types/src/generated/types/FacetableAttributeOutputRepresentation.d.ts +0 -1
  10. package/dist/es/es2018/types/src/generated/types/FacetableAttributesCollectionInputRepresentation.d.ts +0 -1
  11. package/dist/es/es2018/types/src/generated/types/FacetableAttributesCollectionOutputRepresentation.d.ts +0 -1
  12. package/dist/es/es2018/types/src/generated/types/ProductSearchInputRepresentation.d.ts +0 -1
  13. package/dist/es/es2018/types/src/generated/types/ProductSearchResultsRepresentation.d.ts +0 -1
  14. package/dist/es/es2018/types/src/generated/types/ProductSearchSuggestionsResultsRepresentation.d.ts +0 -1
  15. package/dist/es/es2018/types/src/generated/types/ProductSummaryCollectionRepresentation.d.ts +0 -1
  16. package/dist/es/es2018/types/src/generated/types/ProductSummaryRepresentation.d.ts +0 -1
  17. package/dist/es/es2018/types/src/generated/types/RefinementInputRepresentation.d.ts +0 -1
  18. package/dist/es/es2018/types/src/generated/types/SearchCategoryRepresentation.d.ts +0 -1
  19. package/dist/es/es2018/types/src/generated/types/SearchFacetRepresentation.d.ts +0 -1
  20. package/dist/es/es2018/types/src/generated/types/SearchProductSettingCollectionInputRepresentation.d.ts +0 -1
  21. package/dist/es/es2018/types/src/generated/types/SearchProductSettingCollectionOutputRepresentation.d.ts +0 -1
  22. package/dist/es/es2018/types/src/generated/types/SearchProductSettingInputRepresentation.d.ts +0 -1
  23. package/dist/es/es2018/types/src/generated/types/SearchProductSettingOutputRepresentation.d.ts +0 -1
  24. package/dist/es/es2018/types/src/generated/types/SearchableAttributeInputRepresentation.d.ts +0 -1
  25. package/dist/es/es2018/types/src/generated/types/SearchableAttributeOutputRepresentation.d.ts +0 -1
  26. package/dist/es/es2018/types/src/generated/types/SearchableAttributesCollectionInputRepresentation.d.ts +0 -1
  27. package/dist/es/es2018/types/src/generated/types/SearchableAttributesCollectionOutputRepresentation.d.ts +0 -1
  28. package/dist/es/es2018/types/src/generated/types/SuggestedCompletionRepresentation.d.ts +0 -1
  29. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +1 -8
  30. package/package.json +1 -1
  31. package/sfdc/index.js +63 -63
@@ -4,10 +4,11 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, StoreKeyMap } from '@luvio/engine';
7
+ import { serializeStructuredKey, StoreKeyMap, deepFreeze } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
- const { keys: ObjectKeys$1, freeze: ObjectFreeze$1, create: ObjectCreate$1 } = Object;
10
+ const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
11
+ const { stringify: JSONStringify$1 } = JSON;
11
12
  const { isArray: ArrayIsArray$1 } = Array;
12
13
  /**
13
14
  * Validates an adapter config is well-formed.
@@ -48,9 +49,64 @@ const snapshotRefreshOptions = {
48
49
  },
49
50
  }
50
51
  };
52
+ /**
53
+ * A deterministic JSON stringify implementation. Heavily adapted from https://github.com/epoberezkin/fast-json-stable-stringify.
54
+ * This is needed because insertion order for JSON.stringify(object) affects output:
55
+ * JSON.stringify({a: 1, b: 2})
56
+ * "{"a":1,"b":2}"
57
+ * JSON.stringify({b: 2, a: 1})
58
+ * "{"b":2,"a":1}"
59
+ * @param data Data to be JSON-stringified.
60
+ * @returns JSON.stringified value with consistent ordering of keys.
61
+ */
62
+ function stableJSONStringify(node) {
63
+ // This is for Date values.
64
+ if (node && node.toJSON && typeof node.toJSON === 'function') {
65
+ // eslint-disable-next-line no-param-reassign
66
+ node = node.toJSON();
67
+ }
68
+ if (node === undefined) {
69
+ return;
70
+ }
71
+ if (typeof node === 'number') {
72
+ return isFinite(node) ? '' + node : 'null';
73
+ }
74
+ if (typeof node !== 'object') {
75
+ return JSONStringify$1(node);
76
+ }
77
+ let i;
78
+ let out;
79
+ if (ArrayIsArray$1(node)) {
80
+ out = '[';
81
+ for (i = 0; i < node.length; i++) {
82
+ if (i) {
83
+ out += ',';
84
+ }
85
+ out += stableJSONStringify(node[i]) || 'null';
86
+ }
87
+ return out + ']';
88
+ }
89
+ if (node === null) {
90
+ return 'null';
91
+ }
92
+ const keys = ObjectKeys$1(node).sort();
93
+ out = '';
94
+ for (i = 0; i < keys.length; i++) {
95
+ const key = keys[i];
96
+ const value = stableJSONStringify(node[key]);
97
+ if (!value) {
98
+ continue;
99
+ }
100
+ if (out) {
101
+ out += ',';
102
+ }
103
+ out += JSONStringify$1(key) + ':' + value;
104
+ }
105
+ return '{' + out + '}';
106
+ }
51
107
  const keyPrefix = 'Commerce';
52
108
 
53
- const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
109
+ const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
54
110
  const { isArray: ArrayIsArray } = Array;
55
111
  const { stringify: JSONStringify } = JSON;
56
112
  function createLink(ref) {
@@ -87,15 +143,6 @@ function validate$6(obj, path = 'SearchCategoryRepresentation') {
87
143
  })();
88
144
  return v_error === undefined ? null : v_error;
89
145
  }
90
- function deepFreeze$6(input) {
91
- const input_children = input.children;
92
- for (let i = 0; i < input_children.length; i++) {
93
- const input_children_item = input_children[i];
94
- deepFreeze$6(input_children_item);
95
- }
96
- ObjectFreeze(input_children);
97
- ObjectFreeze(input);
98
- }
99
146
 
100
147
  var DiscriminatorValues$1;
101
148
  (function (DiscriminatorValues) {
@@ -148,9 +195,6 @@ function validate$5(obj, path = 'SearchFacetRepresentation') {
148
195
  })();
149
196
  return v_error === undefined ? null : v_error;
150
197
  }
151
- function deepFreeze$5(input) {
152
- ObjectFreeze(input);
153
- }
154
198
 
155
199
  function validate$4(obj, path = 'ProductSummaryRepresentation') {
156
200
  const v_error = (() => {
@@ -205,16 +249,6 @@ function validate$4(obj, path = 'ProductSummaryRepresentation') {
205
249
  })();
206
250
  return v_error === undefined ? null : v_error;
207
251
  }
208
- function deepFreeze$4(input) {
209
- const input_fields = input.fields;
210
- const input_fields_keys = Object.keys(input_fields);
211
- const input_fields_length = input_fields_keys.length;
212
- for (let i = 0; i < input_fields_length; i++) {
213
- input_fields_keys[i];
214
- }
215
- ObjectFreeze(input_fields);
216
- ObjectFreeze(input);
217
- }
218
252
 
219
253
  function validate$3(obj, path = 'ProductSummaryCollectionRepresentation') {
220
254
  const v_error = (() => {
@@ -256,15 +290,6 @@ function validate$3(obj, path = 'ProductSummaryCollectionRepresentation') {
256
290
  })();
257
291
  return v_error === undefined ? null : v_error;
258
292
  }
259
- function deepFreeze$3(input) {
260
- const input_products = input.products;
261
- for (let i = 0; i < input_products.length; i++) {
262
- const input_products_item = input_products[i];
263
- deepFreeze$4(input_products_item);
264
- }
265
- ObjectFreeze(input_products);
266
- ObjectFreeze(input);
267
- }
268
293
 
269
294
  const VERSION$1 = "605737e638033254bdffaf42f248c5b7";
270
295
  function validate$2(obj, path = 'ProductSearchResultsRepresentation') {
@@ -329,19 +354,6 @@ function equals$1(existing, incoming) {
329
354
  }
330
355
  return true;
331
356
  }
332
- function deepFreeze$2(input) {
333
- const input_categories = input.categories;
334
- deepFreeze$6(input_categories);
335
- const input_facets = input.facets;
336
- for (let i = 0; i < input_facets.length; i++) {
337
- const input_facets_item = input_facets[i];
338
- deepFreeze$5(input_facets_item);
339
- }
340
- ObjectFreeze(input_facets);
341
- const input_productsPage = input.productsPage;
342
- deepFreeze$3(input_productsPage);
343
- ObjectFreeze(input);
344
- }
345
357
  const ingest$1 = function ProductSearchResultsRepresentationIngest(input, path, luvio, store, timestamp) {
346
358
  if (process.env.NODE_ENV !== 'production') {
347
359
  const validateError = validate$2(input);
@@ -358,7 +370,6 @@ const ingest$1 = function ProductSearchResultsRepresentationIngest(input, path,
358
370
  propertyName: path.propertyName,
359
371
  ttl: ttlToUse
360
372
  });
361
- deepFreeze$2(input);
362
373
  if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
363
374
  luvio.storePublish(key, incomingRecord);
364
375
  }
@@ -389,7 +400,7 @@ function select$2(luvio, params) {
389
400
  return select$3();
390
401
  }
391
402
  function keyBuilder$3(luvio, params) {
392
- return keyPrefix + '::ProductSearchResultsRepresentation:(' + 'effectiveAccountId:' + params.queryParams.effectiveAccountId + ',' + 'webstoreId:' + params.urlParams.webstoreId + ',' + 'categoryId:' + params.body.categoryId + '::' + 'fields:' + params.body.fields + '::' + 'page:' + params.body.page + '::' + 'pageSize:' + params.body.pageSize + '::' + 'refinements:' + params.body.refinements + '::' + 'searchTerm:' + params.body.searchTerm + '::' + 'sortOrderId:' + params.body.sortOrderId + ')';
403
+ return keyPrefix + '::ProductSearchResultsRepresentation:(' + 'effectiveAccountId:' + params.queryParams.effectiveAccountId + ',' + 'webstoreId:' + params.urlParams.webstoreId + ',' + 'categoryId:' + params.body.categoryId + '::' + 'fields:' + params.body.fields + '::' + 'page:' + params.body.page + '::' + 'pageSize:' + params.body.pageSize + '::' + '[' + params.body.refinements.map(element => stableJSONStringify(element)).join(',') + ']' + '::' + 'searchTerm:' + params.body.searchTerm + '::' + 'sortOrderId:' + params.body.sortOrderId + ')';
393
404
  }
394
405
  function getResponseCacheKeys$1(luvio, resourceParams, response) {
395
406
  return getTypeCacheKeys$1(luvio, response, () => keyBuilder$3(luvio, resourceParams));
@@ -408,6 +419,7 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
408
419
  throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
409
420
  }
410
421
  }
422
+ deepFreeze(snapshot.data);
411
423
  return snapshot;
412
424
  }
413
425
  function ingestError$1(luvio, params, error, snapshotRefresh) {
@@ -606,9 +618,6 @@ function validate$1(obj, path = 'SuggestedCompletionRepresentation') {
606
618
  })();
607
619
  return v_error === undefined ? null : v_error;
608
620
  }
609
- function deepFreeze$1(input) {
610
- ObjectFreeze(input);
611
- }
612
621
 
613
622
  const VERSION = "120685134083f097a5c3e15081721a8a";
614
623
  function validate(obj, path = 'ProductSearchSuggestionsResultsRepresentation') {
@@ -657,15 +666,6 @@ function equals(existing, incoming) {
657
666
  }
658
667
  return true;
659
668
  }
660
- function deepFreeze(input) {
661
- const input_completions = input.completions;
662
- for (let i = 0; i < input_completions.length; i++) {
663
- const input_completions_item = input_completions[i];
664
- deepFreeze$1(input_completions_item);
665
- }
666
- ObjectFreeze(input_completions);
667
- ObjectFreeze(input);
668
- }
669
669
  const ingest = function ProductSearchSuggestionsResultsRepresentationIngest(input, path, luvio, store, timestamp) {
670
670
  if (process.env.NODE_ENV !== 'production') {
671
671
  const validateError = validate(input);
@@ -682,7 +682,6 @@ const ingest = function ProductSearchSuggestionsResultsRepresentationIngest(inpu
682
682
  propertyName: path.propertyName,
683
683
  ttl: ttlToUse
684
684
  });
685
- deepFreeze(input);
686
685
  if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
687
686
  luvio.storePublish(key, incomingRecord);
688
687
  }
@@ -732,6 +731,7 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
732
731
  throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
733
732
  }
734
733
  }
734
+ deepFreeze(snapshot.data);
735
735
  return snapshot;
736
736
  }
737
737
  function ingestError(luvio, params, error, snapshotRefresh) {
@@ -3,17 +3,11 @@ export declare const ObjectPrototypeHasOwnProperty: (v: PropertyKey) => boolean;
3
3
  declare const ObjectKeys: {
4
4
  (o: object): string[];
5
5
  (o: {}): string[];
6
- }, ObjectFreeze: {
7
- <T extends Function>(f: T): T;
8
- <T_1 extends {
9
- [idx: string]: object | U | null | undefined;
10
- }, U extends string | number | bigint | boolean | symbol>(o: T_1): Readonly<T_1>;
11
- <T_2>(o: T_2): Readonly<T_2>;
12
6
  }, ObjectCreate: {
13
7
  (o: object | null): any;
14
8
  (o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
15
9
  };
16
- export { ObjectFreeze, ObjectCreate, ObjectKeys };
10
+ export { ObjectCreate, ObjectKeys };
17
11
  export declare const ArrayIsArray: (arg: any) => arg is any[];
18
12
  export declare const ArrayPrototypePush: (...items: any[]) => number;
19
13
  export interface AdapterValidationConfig {
@@ -6,7 +6,6 @@ export declare const RepresentationType: string;
6
6
  export declare function normalize(input: CommerceSearchIndexCollectionOutputRepresentation, existing: CommerceSearchIndexCollectionOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): CommerceSearchIndexCollectionOutputRepresentationNormalized;
7
7
  export declare const select: () => $64$luvio_engine_FragmentSelection;
8
8
  export declare function equals(existing: CommerceSearchIndexCollectionOutputRepresentationNormalized, incoming: CommerceSearchIndexCollectionOutputRepresentationNormalized): boolean;
9
- export declare function deepFreeze(input: CommerceSearchIndexCollectionOutputRepresentation): void;
10
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
11
10
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: CommerceSearchIndexCollectionOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
12
11
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: CommerceSearchIndexOutputRepresentation, existing: CommerceSearchIndexOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): CommerceSearchIndexOutputRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: CommerceSearchIndexOutputRepresentationNormalized, incoming: CommerceSearchIndexOutputRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: CommerceSearchIndexOutputRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: CommerceSearchIndexOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -6,7 +6,6 @@ export declare const RepresentationType: string;
6
6
  export declare function normalize(input: DistinctFacetValueRepresentation, existing: DistinctFacetValueRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): DistinctFacetValueRepresentationNormalized;
7
7
  export declare const select: () => $64$luvio_engine_FragmentSelection;
8
8
  export declare function equals(existing: DistinctFacetValueRepresentationNormalized, incoming: DistinctFacetValueRepresentationNormalized): boolean;
9
- export declare function deepFreeze(input: DistinctFacetValueRepresentation): void;
10
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
11
10
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: DistinctFacetValueRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
12
11
  /**
@@ -7,7 +7,6 @@ export declare const RepresentationType: string;
7
7
  export declare function normalize(input: DistinctValueSearchFacetRepresentation, existing: DistinctValueSearchFacetRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): DistinctValueSearchFacetRepresentationNormalized;
8
8
  export declare const select: () => $64$luvio_engine_FragmentSelection;
9
9
  export declare function equals(existing: DistinctValueSearchFacetRepresentationNormalized, incoming: DistinctValueSearchFacetRepresentationNormalized): boolean;
10
- export declare function deepFreeze(input: DistinctValueSearchFacetRepresentation): void;
11
10
  export declare const ingest: $64$luvio_engine_ResourceIngest;
12
11
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: DistinctValueSearchFacetRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
13
12
  /**
@@ -9,7 +9,6 @@ export declare function normalize(input: FacetValueRepresentation, existing: Fac
9
9
  export declare const selectChildren: () => $64$luvio_engine_FragmentUnionSelection;
10
10
  export declare const select: () => $64$luvio_engine_FragmentSelection;
11
11
  export declare function equals(existing: FacetValueRepresentationNormalized, incoming: FacetValueRepresentationNormalized): boolean;
12
- export declare function deepFreeze(input: FacetValueRepresentation): void;
13
12
  export declare const ingest: $64$luvio_engine_ResourceIngest;
14
13
  export declare const discriminatorIngest: $64$luvio_engine_ResourceIngest;
15
14
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FacetValueRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: FacetableAttributeInputRepresentation, existing: FacetableAttributeInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FacetableAttributeInputRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: FacetableAttributeInputRepresentationNormalized, incoming: FacetableAttributeInputRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: FacetableAttributeInputRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FacetableAttributeInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: FacetableAttributeOutputRepresentation, existing: FacetableAttributeOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FacetableAttributeOutputRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: FacetableAttributeOutputRepresentationNormalized, incoming: FacetableAttributeOutputRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: FacetableAttributeOutputRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FacetableAttributeOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: FacetableAttributesCollectionInputRepresentation, existing: FacetableAttributesCollectionInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FacetableAttributesCollectionInputRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: FacetableAttributesCollectionInputRepresentationNormalized, incoming: FacetableAttributesCollectionInputRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: FacetableAttributesCollectionInputRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FacetableAttributesCollectionInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -6,7 +6,6 @@ export declare const RepresentationType: string;
6
6
  export declare function normalize(input: FacetableAttributesCollectionOutputRepresentation, existing: FacetableAttributesCollectionOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FacetableAttributesCollectionOutputRepresentationNormalized;
7
7
  export declare const select: () => $64$luvio_engine_FragmentSelection;
8
8
  export declare function equals(existing: FacetableAttributesCollectionOutputRepresentationNormalized, incoming: FacetableAttributesCollectionOutputRepresentationNormalized): boolean;
9
- export declare function deepFreeze(input: FacetableAttributesCollectionOutputRepresentation): void;
10
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
11
10
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: FacetableAttributesCollectionOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
12
11
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: ProductSearchInputRepresentation, existing: ProductSearchInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ProductSearchInputRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: ProductSearchInputRepresentationNormalized, incoming: ProductSearchInputRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: ProductSearchInputRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: ProductSearchInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -9,7 +9,6 @@ export declare const RepresentationType: string;
9
9
  export declare function normalize(input: ProductSearchResultsRepresentation, existing: ProductSearchResultsRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ProductSearchResultsRepresentationNormalized;
10
10
  export declare const select: () => $64$luvio_engine_BaseFragment;
11
11
  export declare function equals(existing: ProductSearchResultsRepresentationNormalized, incoming: ProductSearchResultsRepresentationNormalized): boolean;
12
- export declare function deepFreeze(input: ProductSearchResultsRepresentation): void;
13
12
  export declare const ingest: $64$luvio_engine_ResourceIngest;
14
13
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: ProductSearchResultsRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
15
14
  /**
@@ -6,7 +6,6 @@ export declare const RepresentationType: string;
6
6
  export declare function normalize(input: ProductSearchSuggestionsResultsRepresentation, existing: ProductSearchSuggestionsResultsRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ProductSearchSuggestionsResultsRepresentationNormalized;
7
7
  export declare const select: () => $64$luvio_engine_BaseFragment;
8
8
  export declare function equals(existing: ProductSearchSuggestionsResultsRepresentationNormalized, incoming: ProductSearchSuggestionsResultsRepresentationNormalized): boolean;
9
- export declare function deepFreeze(input: ProductSearchSuggestionsResultsRepresentation): void;
10
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
11
10
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: ProductSearchSuggestionsResultsRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
12
11
  /**
@@ -6,7 +6,6 @@ export declare const RepresentationType: string;
6
6
  export declare function normalize(input: ProductSummaryCollectionRepresentation, existing: ProductSummaryCollectionRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ProductSummaryCollectionRepresentationNormalized;
7
7
  export declare const select: () => $64$luvio_engine_FragmentSelection;
8
8
  export declare function equals(existing: ProductSummaryCollectionRepresentationNormalized, incoming: ProductSummaryCollectionRepresentationNormalized): boolean;
9
- export declare function deepFreeze(input: ProductSummaryCollectionRepresentation): void;
10
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
11
10
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: ProductSummaryCollectionRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
12
11
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: ProductSummaryRepresentation, existing: ProductSummaryRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ProductSummaryRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: ProductSummaryRepresentationNormalized, incoming: ProductSummaryRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: ProductSummaryRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: ProductSummaryRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: RefinementInputRepresentation, existing: RefinementInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): RefinementInputRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: RefinementInputRepresentationNormalized, incoming: RefinementInputRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: RefinementInputRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: RefinementInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: SearchCategoryRepresentation, existing: SearchCategoryRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SearchCategoryRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: SearchCategoryRepresentationNormalized, incoming: SearchCategoryRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: SearchCategoryRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: SearchCategoryRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -9,7 +9,6 @@ export declare function normalize(input: SearchFacetRepresentation, existing: Se
9
9
  export declare const selectChildren: () => $64$luvio_engine_FragmentUnionSelection;
10
10
  export declare const select: () => $64$luvio_engine_FragmentSelection;
11
11
  export declare function equals(existing: SearchFacetRepresentationNormalized, incoming: SearchFacetRepresentationNormalized): boolean;
12
- export declare function deepFreeze(input: SearchFacetRepresentation): void;
13
12
  export declare const ingest: $64$luvio_engine_ResourceIngest;
14
13
  export declare const discriminatorIngest: $64$luvio_engine_ResourceIngest;
15
14
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: SearchFacetRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: SearchProductSettingCollectionInputRepresentation, existing: SearchProductSettingCollectionInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SearchProductSettingCollectionInputRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: SearchProductSettingCollectionInputRepresentationNormalized, incoming: SearchProductSettingCollectionInputRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: SearchProductSettingCollectionInputRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: SearchProductSettingCollectionInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -6,7 +6,6 @@ export declare const RepresentationType: string;
6
6
  export declare function normalize(input: SearchProductSettingCollectionOutputRepresentation, existing: SearchProductSettingCollectionOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SearchProductSettingCollectionOutputRepresentationNormalized;
7
7
  export declare const select: () => $64$luvio_engine_FragmentSelection;
8
8
  export declare function equals(existing: SearchProductSettingCollectionOutputRepresentationNormalized, incoming: SearchProductSettingCollectionOutputRepresentationNormalized): boolean;
9
- export declare function deepFreeze(input: SearchProductSettingCollectionOutputRepresentation): void;
10
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
11
10
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: SearchProductSettingCollectionOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
12
11
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: SearchProductSettingInputRepresentation, existing: SearchProductSettingInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SearchProductSettingInputRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: SearchProductSettingInputRepresentationNormalized, incoming: SearchProductSettingInputRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: SearchProductSettingInputRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: SearchProductSettingInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: SearchProductSettingOutputRepresentation, existing: SearchProductSettingOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SearchProductSettingOutputRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: SearchProductSettingOutputRepresentationNormalized, incoming: SearchProductSettingOutputRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: SearchProductSettingOutputRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: SearchProductSettingOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: SearchableAttributeInputRepresentation, existing: SearchableAttributeInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SearchableAttributeInputRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: SearchableAttributeInputRepresentationNormalized, incoming: SearchableAttributeInputRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: SearchableAttributeInputRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: SearchableAttributeInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: SearchableAttributeOutputRepresentation, existing: SearchableAttributeOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SearchableAttributeOutputRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: SearchableAttributeOutputRepresentationNormalized, incoming: SearchableAttributeOutputRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: SearchableAttributeOutputRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: SearchableAttributeOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: SearchableAttributesCollectionInputRepresentation, existing: SearchableAttributesCollectionInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SearchableAttributesCollectionInputRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: SearchableAttributesCollectionInputRepresentationNormalized, incoming: SearchableAttributesCollectionInputRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: SearchableAttributesCollectionInputRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: SearchableAttributesCollectionInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -6,7 +6,6 @@ export declare const RepresentationType: string;
6
6
  export declare function normalize(input: SearchableAttributesCollectionOutputRepresentation, existing: SearchableAttributesCollectionOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SearchableAttributesCollectionOutputRepresentationNormalized;
7
7
  export declare const select: () => $64$luvio_engine_FragmentSelection;
8
8
  export declare function equals(existing: SearchableAttributesCollectionOutputRepresentationNormalized, incoming: SearchableAttributesCollectionOutputRepresentationNormalized): boolean;
9
- export declare function deepFreeze(input: SearchableAttributesCollectionOutputRepresentation): void;
10
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
11
10
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: SearchableAttributesCollectionOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
12
11
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: SuggestedCompletionRepresentation, existing: SuggestedCompletionRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SuggestedCompletionRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: SuggestedCompletionRepresentationNormalized, incoming: SuggestedCompletionRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: SuggestedCompletionRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: SuggestedCompletionRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -1,11 +1,5 @@
1
1
  import { NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
- export declare const ObjectFreeze: {
3
- <T extends Function>(f: T): T;
4
- <T_1 extends {
5
- [idx: string]: object | U | null | undefined;
6
- }, U extends string | number | bigint | boolean | symbol>(o: T_1): Readonly<T_1>;
7
- <T_2>(o: T_2): Readonly<T_2>;
8
- }, ObjectKeys: {
2
+ export declare const ObjectKeys: {
9
3
  (o: object): string[];
10
4
  (o: {}): string[];
11
5
  }, ObjectCreate: {
@@ -31,7 +25,6 @@ export declare function equalsArray<U, V extends U[]>(a: V, b: V, equalsItem: (i
31
25
  export declare function equalsObject<U, V extends {
32
26
  [key: string]: U;
33
27
  }>(a: V, b: V, equalsProp: (propA: U, propB: U) => boolean | void): boolean;
34
- export declare function deepFreeze(value: any): void;
35
28
  export declare function createLink(ref: string | $64$luvio_engine_NormalizedKeyMetadata): {
36
29
  __ref: string;
37
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-commerce-search",
3
- "version": "1.134.7",
3
+ "version": "1.134.9",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Wire adapters Community Navigation Menu",
6
6
  "main": "dist/es/es2018/commerce-search.js",
package/sfdc/index.js CHANGED
@@ -14,10 +14,11 @@
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, StoreKeyMap } from 'force/luvioEngine';
17
+ import { serializeStructuredKey, StoreKeyMap, deepFreeze } from 'force/luvioEngine';
18
18
 
19
19
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
- const { keys: ObjectKeys$1, freeze: ObjectFreeze$1, create: ObjectCreate$1 } = Object;
20
+ const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
21
+ const { stringify: JSONStringify$1 } = JSON;
21
22
  const { isArray: ArrayIsArray$1 } = Array;
22
23
  /**
23
24
  * Validates an adapter config is well-formed.
@@ -58,9 +59,64 @@ const snapshotRefreshOptions = {
58
59
  },
59
60
  }
60
61
  };
62
+ /**
63
+ * A deterministic JSON stringify implementation. Heavily adapted from https://github.com/epoberezkin/fast-json-stable-stringify.
64
+ * This is needed because insertion order for JSON.stringify(object) affects output:
65
+ * JSON.stringify({a: 1, b: 2})
66
+ * "{"a":1,"b":2}"
67
+ * JSON.stringify({b: 2, a: 1})
68
+ * "{"b":2,"a":1}"
69
+ * @param data Data to be JSON-stringified.
70
+ * @returns JSON.stringified value with consistent ordering of keys.
71
+ */
72
+ function stableJSONStringify(node) {
73
+ // This is for Date values.
74
+ if (node && node.toJSON && typeof node.toJSON === 'function') {
75
+ // eslint-disable-next-line no-param-reassign
76
+ node = node.toJSON();
77
+ }
78
+ if (node === undefined) {
79
+ return;
80
+ }
81
+ if (typeof node === 'number') {
82
+ return isFinite(node) ? '' + node : 'null';
83
+ }
84
+ if (typeof node !== 'object') {
85
+ return JSONStringify$1(node);
86
+ }
87
+ let i;
88
+ let out;
89
+ if (ArrayIsArray$1(node)) {
90
+ out = '[';
91
+ for (i = 0; i < node.length; i++) {
92
+ if (i) {
93
+ out += ',';
94
+ }
95
+ out += stableJSONStringify(node[i]) || 'null';
96
+ }
97
+ return out + ']';
98
+ }
99
+ if (node === null) {
100
+ return 'null';
101
+ }
102
+ const keys = ObjectKeys$1(node).sort();
103
+ out = '';
104
+ for (i = 0; i < keys.length; i++) {
105
+ const key = keys[i];
106
+ const value = stableJSONStringify(node[key]);
107
+ if (!value) {
108
+ continue;
109
+ }
110
+ if (out) {
111
+ out += ',';
112
+ }
113
+ out += JSONStringify$1(key) + ':' + value;
114
+ }
115
+ return '{' + out + '}';
116
+ }
61
117
  const keyPrefix = 'Commerce';
62
118
 
63
- const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
119
+ const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
64
120
  const { isArray: ArrayIsArray } = Array;
65
121
  const { stringify: JSONStringify } = JSON;
66
122
  function createLink(ref) {
@@ -82,9 +138,6 @@ function validate$6(obj, path = 'SuggestedCompletionRepresentation') {
82
138
  })();
83
139
  return v_error === undefined ? null : v_error;
84
140
  }
85
- function deepFreeze$6(input) {
86
- ObjectFreeze(input);
87
- }
88
141
 
89
142
  const VERSION$1 = "120685134083f097a5c3e15081721a8a";
90
143
  function validate$5(obj, path = 'ProductSearchSuggestionsResultsRepresentation') {
@@ -133,15 +186,6 @@ function equals$1(existing, incoming) {
133
186
  }
134
187
  return true;
135
188
  }
136
- function deepFreeze$5(input) {
137
- const input_completions = input.completions;
138
- for (let i = 0; i < input_completions.length; i++) {
139
- const input_completions_item = input_completions[i];
140
- deepFreeze$6(input_completions_item);
141
- }
142
- ObjectFreeze(input_completions);
143
- ObjectFreeze(input);
144
- }
145
189
  const ingest$1 = function ProductSearchSuggestionsResultsRepresentationIngest(input, path, luvio, store, timestamp) {
146
190
  if (process.env.NODE_ENV !== 'production') {
147
191
  const validateError = validate$5(input);
@@ -158,7 +202,6 @@ const ingest$1 = function ProductSearchSuggestionsResultsRepresentationIngest(in
158
202
  propertyName: path.propertyName,
159
203
  ttl: ttlToUse
160
204
  });
161
- deepFreeze$5(input);
162
205
  if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
163
206
  luvio.storePublish(key, incomingRecord);
164
207
  }
@@ -208,6 +251,7 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
208
251
  throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
209
252
  }
210
253
  }
254
+ deepFreeze(snapshot.data);
211
255
  return snapshot;
212
256
  }
213
257
  function ingestError$1(luvio, params, error, snapshotRefresh) {
@@ -381,15 +425,6 @@ function validate$4(obj, path = 'SearchCategoryRepresentation') {
381
425
  })();
382
426
  return v_error === undefined ? null : v_error;
383
427
  }
384
- function deepFreeze$4(input) {
385
- const input_children = input.children;
386
- for (let i = 0; i < input_children.length; i++) {
387
- const input_children_item = input_children[i];
388
- deepFreeze$4(input_children_item);
389
- }
390
- ObjectFreeze(input_children);
391
- ObjectFreeze(input);
392
- }
393
428
 
394
429
  var DiscriminatorValues$1;
395
430
  (function (DiscriminatorValues) {
@@ -442,9 +477,6 @@ function validate$3(obj, path = 'SearchFacetRepresentation') {
442
477
  })();
443
478
  return v_error === undefined ? null : v_error;
444
479
  }
445
- function deepFreeze$3(input) {
446
- ObjectFreeze(input);
447
- }
448
480
 
449
481
  function validate$2(obj, path = 'ProductSummaryRepresentation') {
450
482
  const v_error = (() => {
@@ -499,16 +531,6 @@ function validate$2(obj, path = 'ProductSummaryRepresentation') {
499
531
  })();
500
532
  return v_error === undefined ? null : v_error;
501
533
  }
502
- function deepFreeze$2(input) {
503
- const input_fields = input.fields;
504
- const input_fields_keys = Object.keys(input_fields);
505
- const input_fields_length = input_fields_keys.length;
506
- for (let i = 0; i < input_fields_length; i++) {
507
- input_fields_keys[i];
508
- }
509
- ObjectFreeze(input_fields);
510
- ObjectFreeze(input);
511
- }
512
534
 
513
535
  function validate$1(obj, path = 'ProductSummaryCollectionRepresentation') {
514
536
  const v_error = (() => {
@@ -550,15 +572,6 @@ function validate$1(obj, path = 'ProductSummaryCollectionRepresentation') {
550
572
  })();
551
573
  return v_error === undefined ? null : v_error;
552
574
  }
553
- function deepFreeze$1(input) {
554
- const input_products = input.products;
555
- for (let i = 0; i < input_products.length; i++) {
556
- const input_products_item = input_products[i];
557
- deepFreeze$2(input_products_item);
558
- }
559
- ObjectFreeze(input_products);
560
- ObjectFreeze(input);
561
- }
562
575
 
563
576
  const VERSION = "605737e638033254bdffaf42f248c5b7";
564
577
  function validate(obj, path = 'ProductSearchResultsRepresentation') {
@@ -623,19 +636,6 @@ function equals(existing, incoming) {
623
636
  }
624
637
  return true;
625
638
  }
626
- function deepFreeze(input) {
627
- const input_categories = input.categories;
628
- deepFreeze$4(input_categories);
629
- const input_facets = input.facets;
630
- for (let i = 0; i < input_facets.length; i++) {
631
- const input_facets_item = input_facets[i];
632
- deepFreeze$3(input_facets_item);
633
- }
634
- ObjectFreeze(input_facets);
635
- const input_productsPage = input.productsPage;
636
- deepFreeze$1(input_productsPage);
637
- ObjectFreeze(input);
638
- }
639
639
  const ingest = function ProductSearchResultsRepresentationIngest(input, path, luvio, store, timestamp) {
640
640
  if (process.env.NODE_ENV !== 'production') {
641
641
  const validateError = validate(input);
@@ -652,7 +652,6 @@ const ingest = function ProductSearchResultsRepresentationIngest(input, path, lu
652
652
  propertyName: path.propertyName,
653
653
  ttl: ttlToUse
654
654
  });
655
- deepFreeze(input);
656
655
  if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
657
656
  luvio.storePublish(key, incomingRecord);
658
657
  }
@@ -683,7 +682,7 @@ function select(luvio, params) {
683
682
  return select$1();
684
683
  }
685
684
  function keyBuilder$1(luvio, params) {
686
- return keyPrefix + '::ProductSearchResultsRepresentation:(' + 'effectiveAccountId:' + params.queryParams.effectiveAccountId + ',' + 'webstoreId:' + params.urlParams.webstoreId + ',' + 'categoryId:' + params.body.categoryId + '::' + 'fields:' + params.body.fields + '::' + 'page:' + params.body.page + '::' + 'pageSize:' + params.body.pageSize + '::' + 'refinements:' + params.body.refinements + '::' + 'searchTerm:' + params.body.searchTerm + '::' + 'sortOrderId:' + params.body.sortOrderId + ')';
685
+ return keyPrefix + '::ProductSearchResultsRepresentation:(' + 'effectiveAccountId:' + params.queryParams.effectiveAccountId + ',' + 'webstoreId:' + params.urlParams.webstoreId + ',' + 'categoryId:' + params.body.categoryId + '::' + 'fields:' + params.body.fields + '::' + 'page:' + params.body.page + '::' + 'pageSize:' + params.body.pageSize + '::' + '[' + params.body.refinements.map(element => stableJSONStringify(element)).join(',') + ']' + '::' + 'searchTerm:' + params.body.searchTerm + '::' + 'sortOrderId:' + params.body.sortOrderId + ')';
687
686
  }
688
687
  function getResponseCacheKeys(luvio, resourceParams, response) {
689
688
  return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
@@ -702,6 +701,7 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
702
701
  throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
703
702
  }
704
703
  }
704
+ deepFreeze(snapshot.data);
705
705
  return snapshot;
706
706
  }
707
707
  function ingestError(luvio, params, error, snapshotRefresh) {
@@ -917,4 +917,4 @@ withDefaultLuvio((luvio) => {
917
917
  });
918
918
 
919
919
  export { getSuggestions, getSuggestions_imperative, productSearch, productSearch_imperative };
920
- // version: 1.134.7-ed0df45ef
920
+ // version: 1.134.9-fd822024c