@salesforce/lds-adapters-industries-timeline 1.134.7 → 1.134.8

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,10 +4,10 @@
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, create: ObjectCreate } = Object;
11
11
  const { isArray: ArrayIsArray$1 } = Array;
12
12
  /**
13
13
  * Validates an adapter config is well-formed.
@@ -31,7 +31,7 @@ function validateConfig(config, adapter, oneOf) {
31
31
  throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
32
32
  }
33
33
  const supported = required.concat(optional);
34
- if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
34
+ if (ObjectKeys(config).some(key => !supported.includes(key))) {
35
35
  throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
36
36
  }
37
37
  }
@@ -50,7 +50,6 @@ const snapshotRefreshOptions = {
50
50
  };
51
51
  const keyPrefix = 'Timeline';
52
52
 
53
- const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
54
53
  const { isArray: ArrayIsArray } = Array;
55
54
  const { stringify: JSONStringify } = JSON;
56
55
  function createLink(ref) {
@@ -119,9 +118,6 @@ function validate$9(obj, path = 'TimelineErrorRepresentation') {
119
118
  })();
120
119
  return v_error === undefined ? null : v_error;
121
120
  }
122
- function deepFreeze$9(input) {
123
- ObjectFreeze(input);
124
- }
125
121
 
126
122
  function validate$8(obj, path = 'TimelineEventTypeRepresentation') {
127
123
  const v_error = (() => {
@@ -183,9 +179,6 @@ function validate$8(obj, path = 'TimelineEventTypeRepresentation') {
183
179
  })();
184
180
  return v_error === undefined ? null : v_error;
185
181
  }
186
- function deepFreeze$8(input) {
187
- ObjectFreeze(input);
188
- }
189
182
 
190
183
  function validate$7(obj, path = 'TimelineEventFieldRepresentation') {
191
184
  const v_error = (() => {
@@ -247,9 +240,6 @@ function validate$7(obj, path = 'TimelineEventFieldRepresentation') {
247
240
  })();
248
241
  return v_error === undefined ? null : v_error;
249
242
  }
250
- function deepFreeze$7(input) {
251
- ObjectFreeze(input);
252
- }
253
243
 
254
244
  function validate$6(obj, path = 'TimelineEventRepresentation') {
255
245
  const v_error = (() => {
@@ -406,17 +396,6 @@ function validate$6(obj, path = 'TimelineEventRepresentation') {
406
396
  })();
407
397
  return v_error === undefined ? null : v_error;
408
398
  }
409
- function deepFreeze$6(input) {
410
- const input_fields = input.fields;
411
- if (input_fields !== undefined) {
412
- for (let i = 0; i < input_fields.length; i++) {
413
- const input_fields_item = input_fields[i];
414
- deepFreeze$7(input_fields_item);
415
- }
416
- ObjectFreeze(input_fields);
417
- }
418
- ObjectFreeze(input);
419
- }
420
399
 
421
400
  const TTL$1 = 500;
422
401
  const VERSION$1 = "fdc9f6f24a05bf6064b5dd39db6e4e4d";
@@ -511,33 +490,6 @@ function equals$1(existing, incoming) {
511
490
  }
512
491
  return true;
513
492
  }
514
- function deepFreeze$5(input) {
515
- const input_errors = input.errors;
516
- if (input_errors !== undefined) {
517
- for (let i = 0; i < input_errors.length; i++) {
518
- const input_errors_item = input_errors[i];
519
- deepFreeze$9(input_errors_item);
520
- }
521
- ObjectFreeze(input_errors);
522
- }
523
- const input_eventTypes = input.eventTypes;
524
- if (input_eventTypes !== undefined) {
525
- for (let i = 0; i < input_eventTypes.length; i++) {
526
- const input_eventTypes_item = input_eventTypes[i];
527
- deepFreeze$8(input_eventTypes_item);
528
- }
529
- ObjectFreeze(input_eventTypes);
530
- }
531
- const input_events = input.events;
532
- if (input_events !== undefined) {
533
- for (let i = 0; i < input_events.length; i++) {
534
- const input_events_item = input_events[i];
535
- deepFreeze$6(input_events_item);
536
- }
537
- ObjectFreeze(input_events);
538
- }
539
- ObjectFreeze(input);
540
- }
541
493
  const ingest$1 = function TimelineDataGetResultRepresentationIngest(input, path, luvio, store, timestamp) {
542
494
  if (process.env.NODE_ENV !== 'production') {
543
495
  const validateError = validate$5(input);
@@ -554,7 +506,6 @@ const ingest$1 = function TimelineDataGetResultRepresentationIngest(input, path,
554
506
  propertyName: path.propertyName,
555
507
  ttl: ttlToUse
556
508
  });
557
- deepFreeze$5(input);
558
509
  if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
559
510
  luvio.storePublish(key, incomingRecord);
560
511
  }
@@ -604,6 +555,7 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
604
555
  throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
605
556
  }
606
557
  }
558
+ deepFreeze(snapshot.data);
607
559
  return snapshot;
608
560
  }
609
561
  function ingestError$1(luvio, params, error, snapshotRefresh) {
@@ -912,9 +864,6 @@ function validate$4(obj, path = 'TimelineEntityRepresentation') {
912
864
  })();
913
865
  return v_error === undefined ? null : v_error;
914
866
  }
915
- function deepFreeze$4(input) {
916
- ObjectFreeze(input);
917
- }
918
867
 
919
868
  function validate$3(obj, path = 'TimelineElementRepresentation') {
920
869
  const v_error = (() => {
@@ -1002,9 +951,6 @@ function validate$3(obj, path = 'TimelineElementRepresentation') {
1002
951
  })();
1003
952
  return v_error === undefined ? null : v_error;
1004
953
  }
1005
- function deepFreeze$3(input) {
1006
- ObjectFreeze(input);
1007
- }
1008
954
 
1009
955
  function validate$2(obj, path = 'TimelineEventTypeMetadataRepresentation') {
1010
956
  const v_error = (() => {
@@ -1166,41 +1112,6 @@ function validate$2(obj, path = 'TimelineEventTypeMetadataRepresentation') {
1166
1112
  })();
1167
1113
  return v_error === undefined ? null : v_error;
1168
1114
  }
1169
- function deepFreeze$2(input) {
1170
- const input_anchorReferenceField = input.anchorReferenceField;
1171
- if (input_anchorReferenceField !== undefined) {
1172
- deepFreeze$3(input_anchorReferenceField);
1173
- }
1174
- const input_fieldsToDisplay = input.fieldsToDisplay;
1175
- if (input_fieldsToDisplay !== undefined) {
1176
- for (let i = 0; i < input_fieldsToDisplay.length; i++) {
1177
- const input_fieldsToDisplay_item = input_fieldsToDisplay[i];
1178
- deepFreeze$3(input_fieldsToDisplay_item);
1179
- }
1180
- ObjectFreeze(input_fieldsToDisplay);
1181
- }
1182
- const input_relatedlistsToDisplay = input.relatedlistsToDisplay;
1183
- if (input_relatedlistsToDisplay !== undefined) {
1184
- for (let i = 0; i < input_relatedlistsToDisplay.length; i++) {
1185
- const input_relatedlistsToDisplay_item = input_relatedlistsToDisplay[i];
1186
- deepFreeze$3(input_relatedlistsToDisplay_item);
1187
- }
1188
- ObjectFreeze(input_relatedlistsToDisplay);
1189
- }
1190
- const input_sortField = input.sortField;
1191
- if (input_sortField !== undefined) {
1192
- deepFreeze$3(input_sortField);
1193
- }
1194
- const input_subTitle = input.subTitle;
1195
- if (input_subTitle !== undefined) {
1196
- deepFreeze$3(input_subTitle);
1197
- }
1198
- const input_title = input.title;
1199
- if (input_title !== undefined) {
1200
- deepFreeze$3(input_title);
1201
- }
1202
- ObjectFreeze(input);
1203
- }
1204
1115
 
1205
1116
  function validate$1(obj, path = 'TimelineMetadataDefinitionRepresentation') {
1206
1117
  const v_error = (() => {
@@ -1296,21 +1207,6 @@ function validate$1(obj, path = 'TimelineMetadataDefinitionRepresentation') {
1296
1207
  })();
1297
1208
  return v_error === undefined ? null : v_error;
1298
1209
  }
1299
- function deepFreeze$1(input) {
1300
- const input_anchorObject = input.anchorObject;
1301
- if (input_anchorObject !== undefined) {
1302
- deepFreeze$4(input_anchorObject);
1303
- }
1304
- const input_eventTypes = input.eventTypes;
1305
- if (input_eventTypes !== undefined) {
1306
- for (let i = 0; i < input_eventTypes.length; i++) {
1307
- const input_eventTypes_item = input_eventTypes[i];
1308
- deepFreeze$2(input_eventTypes_item);
1309
- }
1310
- ObjectFreeze(input_eventTypes);
1311
- }
1312
- ObjectFreeze(input);
1313
- }
1314
1210
 
1315
1211
  const TTL = 500;
1316
1212
  const VERSION = "73eb5de038a20239e23e31b0a0bb3cdc";
@@ -1400,25 +1296,6 @@ function equals(existing, incoming) {
1400
1296
  }
1401
1297
  return true;
1402
1298
  }
1403
- function deepFreeze(input) {
1404
- const input_definitions = input.definitions;
1405
- if (input_definitions !== undefined) {
1406
- for (let i = 0; i < input_definitions.length; i++) {
1407
- const input_definitions_item = input_definitions[i];
1408
- deepFreeze$1(input_definitions_item);
1409
- }
1410
- ObjectFreeze(input_definitions);
1411
- }
1412
- const input_errors = input.errors;
1413
- if (input_errors !== undefined) {
1414
- for (let i = 0; i < input_errors.length; i++) {
1415
- const input_errors_item = input_errors[i];
1416
- deepFreeze$9(input_errors_item);
1417
- }
1418
- ObjectFreeze(input_errors);
1419
- }
1420
- ObjectFreeze(input);
1421
- }
1422
1299
  const ingest = function TimelineMetadataResultRepresentationIngest(input, path, luvio, store, timestamp) {
1423
1300
  if (process.env.NODE_ENV !== 'production') {
1424
1301
  const validateError = validate(input);
@@ -1435,7 +1312,6 @@ const ingest = function TimelineMetadataResultRepresentationIngest(input, path,
1435
1312
  propertyName: path.propertyName,
1436
1313
  ttl: ttlToUse
1437
1314
  });
1438
- deepFreeze(input);
1439
1315
  if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
1440
1316
  luvio.storePublish(key, incomingRecord);
1441
1317
  }
@@ -1485,6 +1361,7 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1485
1361
  throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1486
1362
  }
1487
1363
  }
1364
+ deepFreeze(snapshot.data);
1488
1365
  return snapshot;
1489
1366
  }
1490
1367
  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 {
@@ -9,7 +9,6 @@ export declare const RepresentationType: string;
9
9
  export declare function normalize(input: TimelineDataGetResultRepresentation, existing: TimelineDataGetResultRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): TimelineDataGetResultRepresentationNormalized;
10
10
  export declare const select: () => $64$luvio_engine_BaseFragment;
11
11
  export declare function equals(existing: TimelineDataGetResultRepresentationNormalized, incoming: TimelineDataGetResultRepresentationNormalized): boolean;
12
- export declare function deepFreeze(input: TimelineDataGetResultRepresentation): void;
13
12
  export declare const ingest: $64$luvio_engine_ResourceIngest;
14
13
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: TimelineDataGetResultRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
15
14
  /**
@@ -5,7 +5,6 @@ export declare const RepresentationType: string;
5
5
  export declare function normalize(input: TimelineElementRepresentation, existing: TimelineElementRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): TimelineElementRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: TimelineElementRepresentationNormalized, incoming: TimelineElementRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: TimelineElementRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: TimelineElementRepresentation, 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: TimelineEntityRepresentation, existing: TimelineEntityRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): TimelineEntityRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: TimelineEntityRepresentationNormalized, incoming: TimelineEntityRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: TimelineEntityRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: TimelineEntityRepresentation, 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: TimelineErrorRepresentation, existing: TimelineErrorRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): TimelineErrorRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: TimelineErrorRepresentationNormalized, incoming: TimelineErrorRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: TimelineErrorRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: TimelineErrorRepresentation, 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: TimelineEventFieldRepresentation, existing: TimelineEventFieldRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): TimelineEventFieldRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: TimelineEventFieldRepresentationNormalized, incoming: TimelineEventFieldRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: TimelineEventFieldRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: TimelineEventFieldRepresentation, 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: TimelineEventRepresentation, existing: TimelineEventRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): TimelineEventRepresentationNormalized;
7
7
  export declare const select: () => $64$luvio_engine_FragmentSelection;
8
8
  export declare function equals(existing: TimelineEventRepresentationNormalized, incoming: TimelineEventRepresentationNormalized): boolean;
9
- export declare function deepFreeze(input: TimelineEventRepresentation): void;
10
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
11
10
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: TimelineEventRepresentation, 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: TimelineEventTypeMetadataRepresentation, existing: TimelineEventTypeMetadataRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): TimelineEventTypeMetadataRepresentationNormalized;
7
7
  export declare const select: () => $64$luvio_engine_FragmentSelection;
8
8
  export declare function equals(existing: TimelineEventTypeMetadataRepresentationNormalized, incoming: TimelineEventTypeMetadataRepresentationNormalized): boolean;
9
- export declare function deepFreeze(input: TimelineEventTypeMetadataRepresentation): void;
10
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
11
10
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: TimelineEventTypeMetadataRepresentation, 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: TimelineEventTypeRepresentation, existing: TimelineEventTypeRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): TimelineEventTypeRepresentationNormalized;
6
6
  export declare const select: () => $64$luvio_engine_FragmentSelection;
7
7
  export declare function equals(existing: TimelineEventTypeRepresentationNormalized, incoming: TimelineEventTypeRepresentationNormalized): boolean;
8
- export declare function deepFreeze(input: TimelineEventTypeRepresentation): void;
9
8
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
9
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: TimelineEventTypeRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
11
10
  /**
@@ -7,7 +7,6 @@ export declare const RepresentationType: string;
7
7
  export declare function normalize(input: TimelineMetadataDefinitionRepresentation, existing: TimelineMetadataDefinitionRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): TimelineMetadataDefinitionRepresentationNormalized;
8
8
  export declare const select: () => $64$luvio_engine_FragmentSelection;
9
9
  export declare function equals(existing: TimelineMetadataDefinitionRepresentationNormalized, incoming: TimelineMetadataDefinitionRepresentationNormalized): boolean;
10
- export declare function deepFreeze(input: TimelineMetadataDefinitionRepresentation): void;
11
10
  export declare const ingest: $64$luvio_engine_ResourceIngest;
12
11
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: TimelineMetadataDefinitionRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
13
12
  /**
@@ -8,7 +8,6 @@ export declare const RepresentationType: string;
8
8
  export declare function normalize(input: TimelineMetadataResultRepresentation, existing: TimelineMetadataResultRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): TimelineMetadataResultRepresentationNormalized;
9
9
  export declare const select: () => $64$luvio_engine_BaseFragment;
10
10
  export declare function equals(existing: TimelineMetadataResultRepresentationNormalized, incoming: TimelineMetadataResultRepresentationNormalized): boolean;
11
- export declare function deepFreeze(input: TimelineMetadataResultRepresentation): void;
12
11
  export declare const ingest: $64$luvio_engine_ResourceIngest;
13
12
  export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: TimelineMetadataResultRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): $64$luvio_engine_DurableStoreKeyMetadataMap;
14
13
  /**
@@ -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-industries-timeline",
3
- "version": "1.134.7",
3
+ "version": "1.134.8",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": " GET Resource to get the Timeline Data",
6
6
  "main": "dist/es/es2018/industries-timeline.js",
package/sfdc/index.js CHANGED
@@ -14,10 +14,10 @@
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, create: ObjectCreate } = Object;
21
21
  const { isArray: ArrayIsArray$1 } = Array;
22
22
  /**
23
23
  * Validates an adapter config is well-formed.
@@ -41,7 +41,7 @@ function validateConfig(config, adapter, oneOf) {
41
41
  throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
42
42
  }
43
43
  const supported = required.concat(optional);
44
- if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
44
+ if (ObjectKeys(config).some(key => !supported.includes(key))) {
45
45
  throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
46
46
  }
47
47
  }
@@ -60,7 +60,6 @@ const snapshotRefreshOptions = {
60
60
  };
61
61
  const keyPrefix = 'Timeline';
62
62
 
63
- const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
64
63
  const { isArray: ArrayIsArray } = Array;
65
64
  const { stringify: JSONStringify } = JSON;
66
65
  function createLink(ref) {
@@ -129,9 +128,6 @@ function validate$9(obj, path = 'TimelineErrorRepresentation') {
129
128
  })();
130
129
  return v_error === undefined ? null : v_error;
131
130
  }
132
- function deepFreeze$9(input) {
133
- ObjectFreeze(input);
134
- }
135
131
 
136
132
  function validate$8(obj, path = 'TimelineEventTypeRepresentation') {
137
133
  const v_error = (() => {
@@ -193,9 +189,6 @@ function validate$8(obj, path = 'TimelineEventTypeRepresentation') {
193
189
  })();
194
190
  return v_error === undefined ? null : v_error;
195
191
  }
196
- function deepFreeze$8(input) {
197
- ObjectFreeze(input);
198
- }
199
192
 
200
193
  function validate$7(obj, path = 'TimelineEventFieldRepresentation') {
201
194
  const v_error = (() => {
@@ -257,9 +250,6 @@ function validate$7(obj, path = 'TimelineEventFieldRepresentation') {
257
250
  })();
258
251
  return v_error === undefined ? null : v_error;
259
252
  }
260
- function deepFreeze$7(input) {
261
- ObjectFreeze(input);
262
- }
263
253
 
264
254
  function validate$6(obj, path = 'TimelineEventRepresentation') {
265
255
  const v_error = (() => {
@@ -416,17 +406,6 @@ function validate$6(obj, path = 'TimelineEventRepresentation') {
416
406
  })();
417
407
  return v_error === undefined ? null : v_error;
418
408
  }
419
- function deepFreeze$6(input) {
420
- const input_fields = input.fields;
421
- if (input_fields !== undefined) {
422
- for (let i = 0; i < input_fields.length; i++) {
423
- const input_fields_item = input_fields[i];
424
- deepFreeze$7(input_fields_item);
425
- }
426
- ObjectFreeze(input_fields);
427
- }
428
- ObjectFreeze(input);
429
- }
430
409
 
431
410
  const TTL$1 = 500;
432
411
  const VERSION$1 = "fdc9f6f24a05bf6064b5dd39db6e4e4d";
@@ -521,33 +500,6 @@ function equals$1(existing, incoming) {
521
500
  }
522
501
  return true;
523
502
  }
524
- function deepFreeze$5(input) {
525
- const input_errors = input.errors;
526
- if (input_errors !== undefined) {
527
- for (let i = 0; i < input_errors.length; i++) {
528
- const input_errors_item = input_errors[i];
529
- deepFreeze$9(input_errors_item);
530
- }
531
- ObjectFreeze(input_errors);
532
- }
533
- const input_eventTypes = input.eventTypes;
534
- if (input_eventTypes !== undefined) {
535
- for (let i = 0; i < input_eventTypes.length; i++) {
536
- const input_eventTypes_item = input_eventTypes[i];
537
- deepFreeze$8(input_eventTypes_item);
538
- }
539
- ObjectFreeze(input_eventTypes);
540
- }
541
- const input_events = input.events;
542
- if (input_events !== undefined) {
543
- for (let i = 0; i < input_events.length; i++) {
544
- const input_events_item = input_events[i];
545
- deepFreeze$6(input_events_item);
546
- }
547
- ObjectFreeze(input_events);
548
- }
549
- ObjectFreeze(input);
550
- }
551
503
  const ingest$1 = function TimelineDataGetResultRepresentationIngest(input, path, luvio, store, timestamp) {
552
504
  if (process.env.NODE_ENV !== 'production') {
553
505
  const validateError = validate$5(input);
@@ -564,7 +516,6 @@ const ingest$1 = function TimelineDataGetResultRepresentationIngest(input, path,
564
516
  propertyName: path.propertyName,
565
517
  ttl: ttlToUse
566
518
  });
567
- deepFreeze$5(input);
568
519
  if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
569
520
  luvio.storePublish(key, incomingRecord);
570
521
  }
@@ -614,6 +565,7 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
614
565
  throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
615
566
  }
616
567
  }
568
+ deepFreeze(snapshot.data);
617
569
  return snapshot;
618
570
  }
619
571
  function ingestError$1(luvio, params, error, snapshotRefresh) {
@@ -922,9 +874,6 @@ function validate$4(obj, path = 'TimelineEntityRepresentation') {
922
874
  })();
923
875
  return v_error === undefined ? null : v_error;
924
876
  }
925
- function deepFreeze$4(input) {
926
- ObjectFreeze(input);
927
- }
928
877
 
929
878
  function validate$3(obj, path = 'TimelineElementRepresentation') {
930
879
  const v_error = (() => {
@@ -1012,9 +961,6 @@ function validate$3(obj, path = 'TimelineElementRepresentation') {
1012
961
  })();
1013
962
  return v_error === undefined ? null : v_error;
1014
963
  }
1015
- function deepFreeze$3(input) {
1016
- ObjectFreeze(input);
1017
- }
1018
964
 
1019
965
  function validate$2(obj, path = 'TimelineEventTypeMetadataRepresentation') {
1020
966
  const v_error = (() => {
@@ -1176,41 +1122,6 @@ function validate$2(obj, path = 'TimelineEventTypeMetadataRepresentation') {
1176
1122
  })();
1177
1123
  return v_error === undefined ? null : v_error;
1178
1124
  }
1179
- function deepFreeze$2(input) {
1180
- const input_anchorReferenceField = input.anchorReferenceField;
1181
- if (input_anchorReferenceField !== undefined) {
1182
- deepFreeze$3(input_anchorReferenceField);
1183
- }
1184
- const input_fieldsToDisplay = input.fieldsToDisplay;
1185
- if (input_fieldsToDisplay !== undefined) {
1186
- for (let i = 0; i < input_fieldsToDisplay.length; i++) {
1187
- const input_fieldsToDisplay_item = input_fieldsToDisplay[i];
1188
- deepFreeze$3(input_fieldsToDisplay_item);
1189
- }
1190
- ObjectFreeze(input_fieldsToDisplay);
1191
- }
1192
- const input_relatedlistsToDisplay = input.relatedlistsToDisplay;
1193
- if (input_relatedlistsToDisplay !== undefined) {
1194
- for (let i = 0; i < input_relatedlistsToDisplay.length; i++) {
1195
- const input_relatedlistsToDisplay_item = input_relatedlistsToDisplay[i];
1196
- deepFreeze$3(input_relatedlistsToDisplay_item);
1197
- }
1198
- ObjectFreeze(input_relatedlistsToDisplay);
1199
- }
1200
- const input_sortField = input.sortField;
1201
- if (input_sortField !== undefined) {
1202
- deepFreeze$3(input_sortField);
1203
- }
1204
- const input_subTitle = input.subTitle;
1205
- if (input_subTitle !== undefined) {
1206
- deepFreeze$3(input_subTitle);
1207
- }
1208
- const input_title = input.title;
1209
- if (input_title !== undefined) {
1210
- deepFreeze$3(input_title);
1211
- }
1212
- ObjectFreeze(input);
1213
- }
1214
1125
 
1215
1126
  function validate$1(obj, path = 'TimelineMetadataDefinitionRepresentation') {
1216
1127
  const v_error = (() => {
@@ -1306,21 +1217,6 @@ function validate$1(obj, path = 'TimelineMetadataDefinitionRepresentation') {
1306
1217
  })();
1307
1218
  return v_error === undefined ? null : v_error;
1308
1219
  }
1309
- function deepFreeze$1(input) {
1310
- const input_anchorObject = input.anchorObject;
1311
- if (input_anchorObject !== undefined) {
1312
- deepFreeze$4(input_anchorObject);
1313
- }
1314
- const input_eventTypes = input.eventTypes;
1315
- if (input_eventTypes !== undefined) {
1316
- for (let i = 0; i < input_eventTypes.length; i++) {
1317
- const input_eventTypes_item = input_eventTypes[i];
1318
- deepFreeze$2(input_eventTypes_item);
1319
- }
1320
- ObjectFreeze(input_eventTypes);
1321
- }
1322
- ObjectFreeze(input);
1323
- }
1324
1220
 
1325
1221
  const TTL = 500;
1326
1222
  const VERSION = "73eb5de038a20239e23e31b0a0bb3cdc";
@@ -1410,25 +1306,6 @@ function equals(existing, incoming) {
1410
1306
  }
1411
1307
  return true;
1412
1308
  }
1413
- function deepFreeze(input) {
1414
- const input_definitions = input.definitions;
1415
- if (input_definitions !== undefined) {
1416
- for (let i = 0; i < input_definitions.length; i++) {
1417
- const input_definitions_item = input_definitions[i];
1418
- deepFreeze$1(input_definitions_item);
1419
- }
1420
- ObjectFreeze(input_definitions);
1421
- }
1422
- const input_errors = input.errors;
1423
- if (input_errors !== undefined) {
1424
- for (let i = 0; i < input_errors.length; i++) {
1425
- const input_errors_item = input_errors[i];
1426
- deepFreeze$9(input_errors_item);
1427
- }
1428
- ObjectFreeze(input_errors);
1429
- }
1430
- ObjectFreeze(input);
1431
- }
1432
1309
  const ingest = function TimelineMetadataResultRepresentationIngest(input, path, luvio, store, timestamp) {
1433
1310
  if (process.env.NODE_ENV !== 'production') {
1434
1311
  const validateError = validate(input);
@@ -1445,7 +1322,6 @@ const ingest = function TimelineMetadataResultRepresentationIngest(input, path,
1445
1322
  propertyName: path.propertyName,
1446
1323
  ttl: ttlToUse
1447
1324
  });
1448
- deepFreeze(input);
1449
1325
  if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
1450
1326
  luvio.storePublish(key, incomingRecord);
1451
1327
  }
@@ -1495,6 +1371,7 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1495
1371
  throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1496
1372
  }
1497
1373
  }
1374
+ deepFreeze(snapshot.data);
1498
1375
  return snapshot;
1499
1376
  }
1500
1377
  function ingestError(luvio, params, error, snapshotRefresh) {
@@ -1668,4 +1545,4 @@ withDefaultLuvio((luvio) => {
1668
1545
  });
1669
1546
 
1670
1547
  export { getTimelineData, getTimelineData_imperative, getTimelineMetadata, getTimelineMetadata_imperative };
1671
- // version: 1.134.7-ed0df45ef
1548
+ // version: 1.134.8-c3d6d2cfc