@salesforce/lds-worker-api 1.198.0 → 1.199.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.
@@ -26,11 +26,11 @@
26
26
  SnapshotState["Stale"] = "Stale";
27
27
  })(SnapshotState$3 || (SnapshotState$3 = {}));
28
28
 
29
- const { create: create$a, entries: entries$4, freeze: freeze$5, keys: keys$b, values: values$4 } = Object;
29
+ const { create: create$b, entries: entries$5, freeze: freeze$5, keys: keys$c, values: values$4 } = Object;
30
30
  const { hasOwnProperty: hasOwnProperty$3 } = Object.prototype;
31
31
  const { isArray: isArray$9 } = Array;
32
32
  const { push: push$4, indexOf, slice: slice$2 } = Array.prototype;
33
- const { parse: parse$9, stringify: stringify$9 } = JSON;
33
+ const { parse: parse$a, stringify: stringify$a } = JSON;
34
34
 
35
35
  function deepFreeze(value) {
36
36
  // No need to freeze primitives
@@ -43,7 +43,7 @@
43
43
  }
44
44
  }
45
45
  else {
46
- const keys$1 = keys$b(value);
46
+ const keys$1 = keys$c(value);
47
47
  for (let i = 0, len = keys$1.length; i < len; i += 1) {
48
48
  deepFreeze(value[keys$1[i]]);
49
49
  }
@@ -287,7 +287,7 @@
287
287
  return isFinite(node) ? '' + node : 'null';
288
288
  }
289
289
  if (typeof node !== 'object') {
290
- return stringify$9(node);
290
+ return stringify$a(node);
291
291
  }
292
292
  let i;
293
293
  let out;
@@ -304,7 +304,7 @@
304
304
  if (node === null) {
305
305
  return 'null';
306
306
  }
307
- const keys$1 = keys$b(node).sort();
307
+ const keys$1 = keys$c(node).sort();
308
308
  out = '';
309
309
  for (i = 0; i < keys$1.length; i++) {
310
310
  const key = keys$1[i];
@@ -315,7 +315,7 @@
315
315
  if (out) {
316
316
  out += ',';
317
317
  }
318
- out += stringify$9(key) + ':' + value;
318
+ out += stringify$a(key) + ':' + value;
319
319
  }
320
320
  return '{' + out + '}';
321
321
  }
@@ -552,13 +552,13 @@
552
552
  class StringKeyInMemoryStore {
553
553
  constructor(options = {}) {
554
554
  // public, in memory properties
555
- this.records = create$a(null);
556
- this.metadata = create$a(null);
557
- this.visitedIds = create$a(null);
558
- this.refreshedIds = create$a(null);
559
- this.redirectKeys = create$a(null);
560
- this.retainedIds = create$a(null);
561
- this.ttlOverrides = create$a(null);
555
+ this.records = create$b(null);
556
+ this.metadata = create$b(null);
557
+ this.visitedIds = create$b(null);
558
+ this.refreshedIds = create$b(null);
559
+ this.redirectKeys = create$b(null);
560
+ this.retainedIds = create$b(null);
561
+ this.ttlOverrides = create$b(null);
562
562
  this.snapshotSubscriptions = [];
563
563
  this.trimTask = null;
564
564
  this.pendingTrimKeys = new Set();
@@ -566,8 +566,8 @@
566
566
  this.watchSubscriptions = [];
567
567
  this.eventObservers = [];
568
568
  // private/protected
569
- this.insertedIds = create$a(null);
570
- this.reverseRedirectKeys = create$a(null);
569
+ this.insertedIds = create$b(null);
570
+ this.reverseRedirectKeys = create$b(null);
571
571
  this.scheduler = options.scheduler || buildDefaultScheduler();
572
572
  }
573
573
  // interface methods
@@ -575,13 +575,13 @@
575
575
  return this.records[this.getCanonicalRecordId(key)];
576
576
  }
577
577
  getNumEntries() {
578
- return keys$b(this.records).length;
578
+ return keys$c(this.records).length;
579
579
  }
580
580
  readMetadata(key) {
581
581
  return this.metadata[this.getCanonicalRecordId(key)];
582
582
  }
583
583
  readMetadataWhere(query) {
584
- const keys$1 = keys$b(this.metadata);
584
+ const keys$1 = keys$c(this.metadata);
585
585
  const results = [];
586
586
  const hasNamespaceQuery = hasOwnProperty$3.call(query, 'namespace');
587
587
  const hasRepresentationNameQuery = hasOwnProperty$3.call(query, 'representationName');
@@ -678,8 +678,8 @@
678
678
  // Note: we should always get the subscription references from this at the beginning
679
679
  // of the function, in case the reference changes (because of an unsubscribe)
680
680
  const { snapshotSubscriptions, watchSubscriptions, visitedIds, refreshedIds, insertedIds } = this;
681
- const allVisitedIds = keys$b(visitedIds);
682
- const allRefreshedIds = keys$b(refreshedIds);
681
+ const allVisitedIds = keys$c(visitedIds);
682
+ const allRefreshedIds = keys$c(refreshedIds);
683
683
  // Early exit if nothing has changed
684
684
  if (allVisitedIds.length === 0 && allRefreshedIds.length === 0) {
685
685
  return Promise.resolve();
@@ -716,9 +716,9 @@
716
716
  callback(watchCallbackEntries);
717
717
  }
718
718
  }
719
- this.visitedIds = create$a(null);
720
- this.refreshedIds = create$a(null);
721
- this.insertedIds = create$a(null);
719
+ this.visitedIds = create$b(null);
720
+ this.refreshedIds = create$b(null);
721
+ this.insertedIds = create$b(null);
722
722
  // the .then removes the return of an array of voids to a single void
723
723
  return Promise.all(snapshotSubPromises).then(() => { });
724
724
  }
@@ -883,18 +883,18 @@
883
883
  return this.defaultTTLOverride;
884
884
  }
885
885
  reset() {
886
- this.records = create$a(null);
886
+ this.records = create$b(null);
887
887
  this.snapshotSubscriptions = [];
888
888
  this.watchSubscriptions = [];
889
- this.visitedIds = create$a(null);
890
- this.refreshedIds = create$a(null);
891
- this.insertedIds = create$a(null);
892
- this.redirectKeys = create$a(null);
893
- this.reverseRedirectKeys = create$a(null);
894
- this.retainedIds = create$a(null);
895
- this.ttlOverrides = create$a(null);
889
+ this.visitedIds = create$b(null);
890
+ this.refreshedIds = create$b(null);
891
+ this.insertedIds = create$b(null);
892
+ this.redirectKeys = create$b(null);
893
+ this.reverseRedirectKeys = create$b(null);
894
+ this.retainedIds = create$b(null);
895
+ this.ttlOverrides = create$b(null);
896
896
  this.trimTask = null;
897
- this.metadata = create$a(null);
897
+ this.metadata = create$b(null);
898
898
  this.defaultTTLOverride = undefined;
899
899
  emitLuvioStoreEvent({ type: 'store-reset', timestamp: Date.now() }, this.eventObservers);
900
900
  }
@@ -1126,7 +1126,7 @@
1126
1126
  hasOverlappingIds(snapshot, visitedIds) === false);
1127
1127
  }
1128
1128
  function getMatchingIds(partialKey, visitedIds) {
1129
- const keys$1 = keys$b(partialKey);
1129
+ const keys$1 = keys$c(partialKey);
1130
1130
  return visitedIds.filter((visitedId) => {
1131
1131
  return keys$1.every((key) => {
1132
1132
  return partialKey[key] === visitedId[key];
@@ -1753,8 +1753,8 @@
1753
1753
  } while (redirectKey !== undefined);
1754
1754
  }
1755
1755
  isUsingStringKeys() {
1756
- return (keys$b(this.fallbackStringKeyInMemoryStore.visitedIds).length !== 0 ||
1757
- keys$b(this.fallbackStringKeyInMemoryStore.refreshedIds).length !== 0);
1756
+ return (keys$c(this.fallbackStringKeyInMemoryStore.visitedIds).length !== 0 ||
1757
+ keys$c(this.fallbackStringKeyInMemoryStore.refreshedIds).length !== 0);
1758
1758
  }
1759
1759
  delegateToFallbackStringKeyStore(snapshot) {
1760
1760
  return !isErrorSnapshot$3(snapshot) && typeof snapshot.recordId === 'string';
@@ -1796,7 +1796,7 @@
1796
1796
  buildKeySchema(keyMetadata) {
1797
1797
  // pull NamespacedType type out of NormalizedKeyMetadata
1798
1798
  const { namespace: _ns, representationName: _rn, ...keyParamValues } = keyMetadata;
1799
- const keySchema = keys$b(keyParamValues).sort();
1799
+ const keySchema = keys$c(keyParamValues).sort();
1800
1800
  return ['namespace', 'representationName', ...keySchema];
1801
1801
  }
1802
1802
  }
@@ -2084,7 +2084,7 @@
2084
2084
  return value;
2085
2085
  }
2086
2086
  keys() {
2087
- return keys$b(this.data);
2087
+ return keys$c(this.data);
2088
2088
  }
2089
2089
  isScalar(propertyName) {
2090
2090
  // TODO W-6900046 - merge.ts casts these to any and manually sets `data`
@@ -2125,7 +2125,7 @@
2125
2125
  if (hasOwnProperty$3.call(argValues, _argName)) {
2126
2126
  var value = argValues[_argName];
2127
2127
  if (value !== null || value !== undefined) {
2128
- values.push(_argName + ':' + stringify$9(value));
2128
+ values.push(_argName + ':' + stringify$a(value));
2129
2129
  }
2130
2130
  }
2131
2131
  }
@@ -2463,7 +2463,7 @@
2463
2463
  }
2464
2464
  }
2465
2465
  selectAllObject(record, data, visitedKeys) {
2466
- const recordKeys = keys$b(record);
2466
+ const recordKeys = keys$c(record);
2467
2467
  const { length } = recordKeys;
2468
2468
  for (let i = 0; i < length; i += 1) {
2469
2469
  const key = recordKeys[i];
@@ -2546,7 +2546,7 @@
2546
2546
  this.readScalar(propertyName, source, sink);
2547
2547
  return;
2548
2548
  }
2549
- throw new Error(`Invalid Link State. Link on "${this.currentPath.fullPath}" is null but selection is not nullable: \n${stringify$9(selection, null, 2)}`);
2549
+ throw new Error(`Invalid Link State. Link on "${this.currentPath.fullPath}" is null but selection is not nullable: \n${stringify$a(selection, null, 2)}`);
2550
2550
  case StoreLinkStateValues$2.Pending:
2551
2551
  this.markPending();
2552
2552
  return;
@@ -2644,7 +2644,7 @@
2644
2644
  }
2645
2645
  const { baseSnapshotValue } = this.currentPath;
2646
2646
  if (isDefined$1(baseSnapshotValue)) {
2647
- this.snapshotChanged = keys$1.length !== keys$b(baseSnapshotValue).length;
2647
+ this.snapshotChanged = keys$1.length !== keys$c(baseSnapshotValue).length;
2648
2648
  }
2649
2649
  }
2650
2650
  checkIfChanged(value) {
@@ -2682,7 +2682,7 @@
2682
2682
  return this.markMissing();
2683
2683
  }
2684
2684
  const sink = (data[propertyName] = {});
2685
- const keys$1 = keys$b(obj);
2685
+ const keys$1 = keys$c(obj);
2686
2686
  this.checkIfObjectKeysLengthChanged(keys$1);
2687
2687
  for (let i = 0, len = keys$1.length; i < len; i += 1) {
2688
2688
  const key = keys$1[i];
@@ -2693,7 +2693,7 @@
2693
2693
  }
2694
2694
  readLinkMap(propertyName, selection, record, data) {
2695
2695
  const map = record[propertyName];
2696
- const keys$1 = keys$b(map);
2696
+ const keys$1 = keys$c(map);
2697
2697
  const sink = {};
2698
2698
  this.checkIfObjectKeysLengthChanged(keys$1);
2699
2699
  for (let i = 0, len = keys$1.length; i < len; i += 1) {
@@ -2821,7 +2821,7 @@
2821
2821
  return;
2822
2822
  }
2823
2823
  const sink = (data[propertyName] = {});
2824
- const keys$1 = keys$b(obj);
2824
+ const keys$1 = keys$c(obj);
2825
2825
  this.checkIfObjectKeysLengthChanged(keys$1);
2826
2826
  for (let i = 0, len = keys$1.length; i < len; i += 1) {
2827
2827
  const key = keys$1[i];
@@ -3043,7 +3043,7 @@
3043
3043
  return error;
3044
3044
  }
3045
3045
  // anything else should get turned into an Error with the errorType set
3046
- const normalizedError = new Error(`NetworkAdapter rejected with non-Error object: ${typeof error === 'undefined' ? 'undefined' : stringify$9(error)}`);
3046
+ const normalizedError = new Error(`NetworkAdapter rejected with non-Error object: ${typeof error === 'undefined' ? 'undefined' : stringify$a(error)}`);
3047
3047
  normalizedError.errorType = 'networkAdapterError';
3048
3048
  return normalizedError;
3049
3049
  }
@@ -3054,8 +3054,8 @@
3054
3054
  this.defaultCachePolicy = { type: 'cache-then-network' };
3055
3055
  this.store = store;
3056
3056
  this.networkAdapter = networkAdapter;
3057
- this.adapterContextMap = create$a(null);
3058
- this.typeQueryEvaluatorMap = create$a(null);
3057
+ this.adapterContextMap = create$b(null);
3058
+ this.typeQueryEvaluatorMap = create$b(null);
3059
3059
  // bind these methods so when they get passed into the
3060
3060
  // Store, the this reference is preserved
3061
3061
  this.createSnapshot = this.createSnapshot.bind(this);
@@ -3249,7 +3249,7 @@
3249
3249
  // retrieve from adapterContextMap if contextId is supplied
3250
3250
  // we will only track context of adapters that explicitly provide a contextId
3251
3251
  if (this.adapterContextMap[contextId] === undefined) {
3252
- this.adapterContextMap[contextId] = create$a(null);
3252
+ this.adapterContextMap[contextId] = create$b(null);
3253
3253
  }
3254
3254
  const contextStore = this.adapterContextMap[contextId];
3255
3255
  const context = {
@@ -3505,13 +3505,13 @@
3505
3505
  // undefined values on the injected networkAdapter. So we do it here, on
3506
3506
  // the API that those adapters call to dispatch their ResourceRequests.
3507
3507
  const { queryParams, urlParams } = mergedResourceRequest;
3508
- for (const paramKey of keys$b(queryParams)) {
3508
+ for (const paramKey of keys$c(queryParams)) {
3509
3509
  const value = queryParams[paramKey];
3510
3510
  if (value === undefined) {
3511
3511
  delete queryParams[paramKey];
3512
3512
  }
3513
3513
  }
3514
- for (const paramKey of keys$b(urlParams)) {
3514
+ for (const paramKey of keys$c(urlParams)) {
3515
3515
  const value = urlParams[paramKey];
3516
3516
  if (value === undefined) {
3517
3517
  delete urlParams[paramKey];
@@ -3805,7 +3805,7 @@
3805
3805
  }
3806
3806
  callbacks.push(callback);
3807
3807
  }
3808
- // version: 1.198.0-ead7de735
3808
+ // version: 1.199.1-4bf260c39
3809
3809
 
3810
3810
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
3811
3811
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -5458,7 +5458,7 @@
5458
5458
  * Given a GraphQL source, parses it into a Document.
5459
5459
  * Throws GraphQLError if a syntax error is encountered.
5460
5460
  */
5461
- function parse$8(source, options) {
5461
+ function parse$9(source, options) {
5462
5462
  var parser = new Parser(source, options);
5463
5463
  return parser.parseDocument();
5464
5464
  }
@@ -14420,7 +14420,7 @@
14420
14420
  */
14421
14421
 
14422
14422
  function buildSchema(source, options) {
14423
- var document = parse$8(source, {
14423
+ var document = parse$9(source, {
14424
14424
  noLocation: options === null || options === void 0 ? void 0 : options.noLocation,
14425
14425
  allowLegacySDLEmptyFields: options === null || options === void 0 ? void 0 : options.allowLegacySDLEmptyFields,
14426
14426
  allowLegacySDLImplementsInterfaces: options === null || options === void 0 ? void 0 : options.allowLegacySDLImplementsInterfaces,
@@ -14971,7 +14971,7 @@
14971
14971
  return cachedDoc;
14972
14972
  }
14973
14973
  // parse throws an GraphQLError in case of invalid query, should this be in try/catch?
14974
- const parsedDoc = parse$8(inputString, { noLocation: true });
14974
+ const parsedDoc = parse$9(inputString, { noLocation: true });
14975
14975
  if (!parsedDoc || parsedDoc.kind !== 'Document') {
14976
14976
  return null;
14977
14977
  }
@@ -15229,7 +15229,7 @@
15229
15229
  * @deprecated In favor of gql tagged template literal
15230
15230
  */
15231
15231
  function parseAndVisit(source) {
15232
- const ast = parse$8(source, { noLocation: true });
15232
+ const ast = parse$9(source, { noLocation: true });
15233
15233
  const luvioDocumentNode = transform$c(ast);
15234
15234
  // In-place substitution of metaschema annotations
15235
15235
  metaschemaMapper(ast);
@@ -15238,7 +15238,7 @@
15238
15238
  updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
15239
15239
  return luvioDocumentNode;
15240
15240
  }
15241
- // version: 1.198.0-ead7de735
15241
+ // version: 1.199.1-4bf260c39
15242
15242
 
15243
15243
  function unwrap(data) {
15244
15244
  // The lwc-luvio bindings import a function from lwc called "unwrap".
@@ -15340,7 +15340,7 @@
15340
15340
  });
15341
15341
  }
15342
15342
  const { isArray: isArray$8 } = Array;
15343
- const { stringify: stringify$8 } = JSON;
15343
+ const { stringify: stringify$9 } = JSON;
15344
15344
 
15345
15345
  function isPromise$1(value) {
15346
15346
  // check for Thenable due to test frameworks using custom Promise impls
@@ -15358,7 +15358,7 @@
15358
15358
  error.message = `${messagePrefix}\n[${error.message}]`;
15359
15359
  throw error;
15360
15360
  }
15361
- throw new Error(`${messagePrefix}\n[${stringify$8(error)}]`);
15361
+ throw new Error(`${messagePrefix}\n[${stringify$9(error)}]`);
15362
15362
  }
15363
15363
 
15364
15364
  class Sanitizer {
@@ -15374,7 +15374,7 @@
15374
15374
  }
15375
15375
  sanitize() {
15376
15376
  const sanitizer = this;
15377
- stringify$8(this.obj, function (key, value) {
15377
+ stringify$9(this.obj, function (key, value) {
15378
15378
  if (key === '') {
15379
15379
  return value;
15380
15380
  }
@@ -15816,7 +15816,7 @@
15816
15816
  return factory(luvio);
15817
15817
  }
15818
15818
 
15819
- const { create: create$9, defineProperty, defineProperties } = Object;
15819
+ const { create: create$a, defineProperty, defineProperties } = Object;
15820
15820
 
15821
15821
  var SnapshotState$2;
15822
15822
  (function (SnapshotState) {
@@ -16151,7 +16151,7 @@
16151
16151
  const { apiFamily, name } = metadata;
16152
16152
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
16153
16153
  }
16154
- // version: 1.198.0-ead7de735
16154
+ // version: 1.199.1-4bf260c39
16155
16155
 
16156
16156
  /**
16157
16157
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -16238,7 +16238,7 @@
16238
16238
 
16239
16239
  const { keys: ObjectKeys$3, create: ObjectCreate$3 } = Object;
16240
16240
 
16241
- const { assign: assign$8, create: create$8, freeze: freeze$4, keys: keys$a } = Object;
16241
+ const { assign: assign$9, create: create$9, freeze: freeze$4, keys: keys$b } = Object;
16242
16242
 
16243
16243
  ObjectCreate$3(null);
16244
16244
 
@@ -17306,12 +17306,12 @@
17306
17306
  }
17307
17307
  }
17308
17308
 
17309
- const { assign: assign$7, create: create$7, freeze: freeze$3, keys: keys$9 } = Object;
17309
+ const { assign: assign$8, create: create$8, freeze: freeze$3, keys: keys$a } = Object;
17310
17310
  const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
17311
17311
  const { split, endsWith } = String.prototype;
17312
17312
  const { isArray: isArray$7 } = Array;
17313
17313
  const { concat, filter: filter$1, includes: includes$1, push: push$3, reduce } = Array.prototype;
17314
- const { parse: parse$7, stringify: stringify$7 } = JSON;
17314
+ const { parse: parse$8, stringify: stringify$8 } = JSON;
17315
17315
 
17316
17316
  // we override the generated so we can set "mergeable: true" on the root key
17317
17317
  const getTypeCacheKeys$P$1 = (rootKeySet, luvio, input, _fullPathFactory) => {
@@ -17323,14 +17323,14 @@
17323
17323
  mergeable: true,
17324
17324
  });
17325
17325
  const input_childRelationships = input.childRelationships;
17326
- const input_childRelationships_keys = keys$9(input_childRelationships);
17326
+ const input_childRelationships_keys = keys$a(input_childRelationships);
17327
17327
  const input_childRelationships_length = input_childRelationships_keys.length;
17328
17328
  for (let i = 0; i < input_childRelationships_length; i++) {
17329
17329
  const key = input_childRelationships_keys[i];
17330
17330
  getTypeCacheKeys$O$1(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
17331
17331
  }
17332
17332
  const input_fields = input.fields;
17333
- const input_fields_keys = keys$9(input_fields);
17333
+ const input_fields_keys = keys$a(input_fields);
17334
17334
  const input_fields_length = input_fields_keys.length;
17335
17335
  for (let i = 0; i < input_fields_length; i++) {
17336
17336
  const key = input_fields_keys[i];
@@ -17761,7 +17761,7 @@
17761
17761
  getTypeCacheKeys$Q$1(rootKeySet, luvio, input_fields[key], () => rootKey + "__fields" + "__" + key);
17762
17762
  }
17763
17763
  }
17764
- const notifyUpdateAvailableFactory = (luvio) => {
17764
+ const notifyUpdateAvailableFactory$1 = (luvio) => {
17765
17765
  return function notifyRecordUpdateAvailable(configs) {
17766
17766
  const keys = configs.map(c => keyBuilder$1R(luvio, c));
17767
17767
  return luvio.notifyStoreUpdateAvailable(keys);
@@ -17790,7 +17790,7 @@
17790
17790
  for (let i = 0, len = value.length; i < len; i += 1) {
17791
17791
  result[value[i]] = true;
17792
17792
  }
17793
- return keys$9(result);
17793
+ return keys$a(result);
17794
17794
  }
17795
17795
  /**
17796
17796
  * @param source The array of string to filter
@@ -19238,7 +19238,7 @@
19238
19238
  function createPathSelection(propertyName, fieldDefinition) {
19239
19239
  const fieldsSelection = [];
19240
19240
  const { children } = fieldDefinition;
19241
- const childrenKeys = keys$9(children);
19241
+ const childrenKeys = keys$a(children);
19242
19242
  for (let i = 0, len = childrenKeys.length; i < len; i += 1) {
19243
19243
  const childKey = childrenKeys[i];
19244
19244
  const childFieldDefinition = children[childKey];
@@ -19283,7 +19283,7 @@
19283
19283
  */
19284
19284
  function createPathSelectionFromValue(fields) {
19285
19285
  const fieldsSelection = [];
19286
- const fieldNames = keys$9(fields);
19286
+ const fieldNames = keys$a(fields);
19287
19287
  for (let i = 0, len = fieldNames.length; i < len; i++) {
19288
19288
  const fieldName = fieldNames[i];
19289
19289
  const { value: fieldValue } = fields[fieldName];
@@ -19322,7 +19322,7 @@
19322
19322
  }
19323
19323
  function extractRecordFieldsRecursively(record) {
19324
19324
  const fields = [];
19325
- const fieldNames = keys$9(record.fields);
19325
+ const fieldNames = keys$a(record.fields);
19326
19326
  for (let i = 0, len = fieldNames.length; i < len; i++) {
19327
19327
  const fieldName = fieldNames[i];
19328
19328
  const { value: fieldValue } = record.fields[fieldName];
@@ -19510,7 +19510,7 @@
19510
19510
  continue;
19511
19511
  }
19512
19512
  extractTrackedFieldsToTrie(spanningLink.data.__ref, spanning, next, config, spanningVisitedRecordIds, depth + 1);
19513
- if (keys$9(next.children).length > 0) {
19513
+ if (keys$a(next.children).length > 0) {
19514
19514
  current.children[key] = next;
19515
19515
  }
19516
19516
  else {
@@ -19562,13 +19562,13 @@
19562
19562
  return endsWith.call(spanningNode.scalar('apiName'), CUSTOM_EXTERNAL_OBJECT_FIELD_SUFFIX);
19563
19563
  }
19564
19564
  function convertTrieToFields(root) {
19565
- if (keys$9(root.children).length === 0) {
19565
+ if (keys$a(root.children).length === 0) {
19566
19566
  return [];
19567
19567
  }
19568
19568
  return convertTrieToFieldsRecursively(root);
19569
19569
  }
19570
19570
  function convertTrieToFieldsRecursively(root) {
19571
- const childKeys = keys$9(root.children);
19571
+ const childKeys = keys$a(root.children);
19572
19572
  if (childKeys.length === 0) {
19573
19573
  if (root.name === '') {
19574
19574
  return [];
@@ -19605,7 +19605,7 @@
19605
19605
  function mergeFieldsTries(rootA, rootB) {
19606
19606
  const rootAchildren = rootA.children;
19607
19607
  const rootBchildren = rootB.children;
19608
- const childBKeys = keys$9(rootBchildren);
19608
+ const childBKeys = keys$a(rootBchildren);
19609
19609
  for (let i = 0, len = childBKeys.length; i < len; i++) {
19610
19610
  const childBKey = childBKeys[i];
19611
19611
  if (rootAchildren[childBKey] === undefined) {
@@ -19758,8 +19758,8 @@
19758
19758
  }
19759
19759
  const childrenA = a.children;
19760
19760
  const childrenB = b.children;
19761
- const childKeysA = keys$9(childrenA);
19762
- const childKeysB = keys$9(childrenB);
19761
+ const childKeysA = keys$a(childrenA);
19762
+ const childKeysB = keys$a(childrenB);
19763
19763
  const childKeysBLength = childKeysB.length;
19764
19764
  if (childKeysBLength > childKeysA.length) {
19765
19765
  return false;
@@ -19783,7 +19783,7 @@
19783
19783
  // RecordRepresentationNormalized['fields'] to include `pending:true` property
19784
19784
  const mergedFields = { ...newRecord.fields };
19785
19785
  const merged = { ...newRecord, fields: mergedFields };
19786
- const existingFields = keys$9(oldRecord.fields);
19786
+ const existingFields = keys$a(oldRecord.fields);
19787
19787
  for (let i = 0, len = existingFields.length; i < len; i += 1) {
19788
19788
  const spanningFieldName = existingFields[i];
19789
19789
  if (newRecord.fields[spanningFieldName] === undefined) {
@@ -19916,7 +19916,7 @@
19916
19916
  if (isGraphNode(node)) {
19917
19917
  const dependencies = node.retrieve();
19918
19918
  if (dependencies !== null) {
19919
- const depKeys = keys$9(dependencies);
19919
+ const depKeys = keys$a(dependencies);
19920
19920
  for (let i = 0, len = depKeys.length; i < len; i++) {
19921
19921
  luvio.storeEvict(depKeys[i]);
19922
19922
  }
@@ -20063,7 +20063,7 @@
20063
20063
  }
20064
20064
  for (let i = 0; i < fieldSubtries.length; i++) {
20065
20065
  const subtrie = fieldSubtries[i];
20066
- const fieldNames = keys$9(subtrie.children);
20066
+ const fieldNames = keys$a(subtrie.children);
20067
20067
  for (let i = 0; i < fieldNames.length; i++) {
20068
20068
  const fieldName = fieldNames[i];
20069
20069
  const childTrie = subtrie.children[fieldName];
@@ -20175,9 +20175,9 @@
20175
20175
  return false;
20176
20176
  }
20177
20177
  }
20178
- const headersKeys = keys$9(headers);
20178
+ const headersKeys = keys$a(headers);
20179
20179
  const headersKeyLength = headersKeys.length;
20180
- if (headersKeyLength !== keys$9(existingHeaders).length) {
20180
+ if (headersKeyLength !== keys$a(existingHeaders).length) {
20181
20181
  return false;
20182
20182
  }
20183
20183
  for (let i = 0, len = headersKeyLength; i < len; i++) {
@@ -20953,7 +20953,7 @@
20953
20953
 
20954
20954
  // iterate through the map to build configs for network calls
20955
20955
  function resolveConflict(luvio, map) {
20956
- const ids = keys$9(map.conflicts);
20956
+ const ids = keys$a(map.conflicts);
20957
20957
  if (ids.length === 0) {
20958
20958
  instrumentation$2.recordConflictsResolved(map.serverRequestCount);
20959
20959
  return;
@@ -22127,18 +22127,18 @@
22127
22127
  return {
22128
22128
  getRecordSelectionFieldSets() {
22129
22129
  const optionalPlusDefaultFields = { ...optionalFields_ };
22130
- const fields = keys$9(defaultFields_);
22130
+ const fields = keys$a(defaultFields_);
22131
22131
  for (let i = 0; i < fields.length; ++i) {
22132
22132
  const field = fields[i];
22133
22133
  if (!fields_[field] && !defaultServerFieldStatus.missingFields[field]) {
22134
22134
  optionalPlusDefaultFields[field] = true;
22135
22135
  }
22136
22136
  }
22137
- return [keys$9(fields_).sort(), keys$9(optionalPlusDefaultFields).sort()];
22137
+ return [keys$a(fields_).sort(), keys$a(optionalPlusDefaultFields).sort()];
22138
22138
  },
22139
22139
  processRecords(records) {
22140
22140
  const { missingFields } = defaultServerFieldStatus;
22141
- const fields = keys$9(missingFields);
22141
+ const fields = keys$a(missingFields);
22142
22142
  for (let i = 0; i < fields.length; ++i) {
22143
22143
  const field = fields[i], splitField = field.split('.').slice(1);
22144
22144
  for (let i = 0; i < records.length; ++i) {
@@ -22694,6 +22694,12 @@
22694
22694
  getTypeCacheKeys$K$1(rootKeySet, luvio, input.lists[i]);
22695
22695
  }
22696
22696
  }
22697
+ const notifyUpdateAvailableFactory = (luvio) => {
22698
+ return function notifyListViewSummaryUpdateAvailable(configs) {
22699
+ const keys = configs.map(c => keyBuilder$1K(luvio, c));
22700
+ return luvio.notifyStoreUpdateAvailable(keys);
22701
+ };
22702
+ };
22697
22703
 
22698
22704
  function createPaginationParams$2(params) {
22699
22705
  const { queryParams } = params;
@@ -24885,7 +24891,7 @@
24885
24891
  const lookupFields = {};
24886
24892
  const { apiName, fields: recordFields } = record;
24887
24893
  const { fields: objectInfoFields } = objectInfo;
24888
- const objectInfoFieldNames = keys$9(objectInfoFields);
24894
+ const objectInfoFieldNames = keys$a(objectInfoFields);
24889
24895
  for (let i = 0, len = objectInfoFieldNames.length; i < len; i += 1) {
24890
24896
  const fieldName = objectInfoFieldNames[i];
24891
24897
  const field = objectInfoFields[fieldName];
@@ -24904,12 +24910,12 @@
24904
24910
  const nameField = `${apiName}.${relationshipName}.${getNameField(objectInfo, fieldName)}`;
24905
24911
  lookupFields[nameField] = true;
24906
24912
  }
24907
- return keys$9(lookupFields);
24913
+ return keys$a(lookupFields);
24908
24914
  }
24909
24915
  function getRecordUiMissingRecordLookupFields(recordUi) {
24910
24916
  const { records, objectInfos } = recordUi;
24911
24917
  const recordLookupFields = {};
24912
- const recordIds = keys$9(records);
24918
+ const recordIds = keys$a(records);
24913
24919
  for (let i = 0, len = recordIds.length; i < len; i += 1) {
24914
24920
  const recordId = recordIds[i];
24915
24921
  const recordData = records[recordId];
@@ -24947,19 +24953,19 @@
24947
24953
  }
24948
24954
  function eachLayout(recordUi, cb) {
24949
24955
  const { layouts } = recordUi;
24950
- const layoutApiNames = keys$9(layouts);
24956
+ const layoutApiNames = keys$a(layouts);
24951
24957
  for (let a = 0, len = layoutApiNames.length; a < len; a += 1) {
24952
24958
  const apiName = layoutApiNames[a];
24953
24959
  const apiNameData = layouts[apiName];
24954
- const recordTypeIds = keys$9(apiNameData);
24960
+ const recordTypeIds = keys$a(apiNameData);
24955
24961
  for (let b = 0, recordTypeIdsLen = recordTypeIds.length; b < recordTypeIdsLen; b += 1) {
24956
24962
  const recordTypeId = recordTypeIds[b];
24957
24963
  const recordTypeData = apiNameData[recordTypeId];
24958
- const layoutTypes = keys$9(recordTypeData);
24964
+ const layoutTypes = keys$a(recordTypeData);
24959
24965
  for (let c = 0, layoutTypesLen = layoutTypes.length; c < layoutTypesLen; c += 1) {
24960
24966
  const layoutType = layoutTypes[c];
24961
24967
  const layoutTypeData = recordTypeData[layoutType];
24962
- const modes = keys$9(layoutTypeData);
24968
+ const modes = keys$a(layoutTypeData);
24963
24969
  for (let d = 0, modesLen = modes.length; d < modesLen; d += 1) {
24964
24970
  const mode = modes[d];
24965
24971
  const layout = layoutTypeData[mode];
@@ -25035,7 +25041,7 @@
25035
25041
  // we have to run ingest code and look at the resulting snapshot's seenRecords.
25036
25042
  function getCacheKeys(keySet, luvio, config, key, originalResponseBody) {
25037
25043
  const { recordIds, layoutTypes, modes } = config;
25038
- const responseBody = parse$7(stringify$7(originalResponseBody));
25044
+ const responseBody = parse$8(stringify$8(originalResponseBody));
25039
25045
  eachLayout(responseBody, (apiName, recordTypeId, layout) => {
25040
25046
  if (layout.id === null) {
25041
25047
  return;
@@ -25165,14 +25171,14 @@
25165
25171
  function publishDependencies(luvio, recordIds, depKeys) {
25166
25172
  for (let i = 0, len = recordIds.length; i < len; i += 1) {
25167
25173
  const recordDepKey = dependencyKeyBuilder({ recordId: recordIds[i] });
25168
- const dependencies = create$7(null);
25174
+ const dependencies = create$8(null);
25169
25175
  for (let j = 0, len = depKeys.length; j < len; j++) {
25170
25176
  dependencies[depKeys[j]] = true;
25171
25177
  }
25172
25178
  const node = luvio.getNode(recordDepKey);
25173
25179
  if (isGraphNode(node)) {
25174
25180
  const recordDeps = node.retrieve();
25175
- assign$7(dependencies, recordDeps);
25181
+ assign$8(dependencies, recordDeps);
25176
25182
  }
25177
25183
  luvio.storePublish(recordDepKey, dependencies);
25178
25184
  }
@@ -25355,11 +25361,11 @@
25355
25361
  ];
25356
25362
  function getFieldsFromLayoutMap(layoutMap, objectInfo) {
25357
25363
  let fields = [];
25358
- const layoutTypes = keys$9(layoutMap);
25364
+ const layoutTypes = keys$a(layoutMap);
25359
25365
  for (let i = 0, layoutTypesLen = layoutTypes.length; i < layoutTypesLen; i += 1) {
25360
25366
  const layoutType = layoutTypes[i];
25361
25367
  const modesMap = layoutMap[layoutType];
25362
- const modes = keys$9(modesMap);
25368
+ const modes = keys$a(modesMap);
25363
25369
  for (let m = 0, modesLen = modes.length; m < modesLen; m += 1) {
25364
25370
  const mode = modes[m];
25365
25371
  const modeKeys = getQualifiedFieldApiNamesFromLayout(modesMap[mode], objectInfo);
@@ -25373,7 +25379,7 @@
25373
25379
  return getRecord$1(luvio, refresh, recordId, fields, configOptionalFields);
25374
25380
  }
25375
25381
  function getRecordForNonLayoutableEntities(luvio, adapterContext, refresh, recordId, objectInfo, configOptionalFields, configFields) {
25376
- const fields = keys$9(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
25382
+ const fields = keys$a(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
25377
25383
  // W-12697744
25378
25384
  // Set the implicit fields received from the server in adapter context
25379
25385
  // This ensures that the implicit fields are available when data is read locally or from durable store
@@ -25601,7 +25607,7 @@
25601
25607
  }
25602
25608
  const { layoutType, mode, snapshot } = container;
25603
25609
  if (wrapper.layoutMap[layoutType] === undefined) {
25604
- wrapper.layoutMap = assign$7({}, wrapper.layoutMap, {
25610
+ wrapper.layoutMap = assign$8({}, wrapper.layoutMap, {
25605
25611
  [layoutType]: {},
25606
25612
  });
25607
25613
  }
@@ -34623,7 +34629,7 @@
34623
34629
  }
34624
34630
  }
34625
34631
  if (records.length > 0) {
34626
- assign$7(config, { records });
34632
+ assign$8(config, { records });
34627
34633
  }
34628
34634
  }
34629
34635
  return config;
@@ -40592,7 +40598,7 @@
40592
40598
  });
40593
40599
  }
40594
40600
  function clone$2(userLayoutState) {
40595
- return parse$7(stringify$7(userLayoutState));
40601
+ return parse$8(stringify$8(userLayoutState));
40596
40602
  }
40597
40603
  // Applies optimisticUpdate to layoutUserState
40598
40604
  // If the optimistic update can be applied, returns RecordLayoutUserStateRepresentation
@@ -40604,7 +40610,7 @@
40604
40610
  let clonedLayoutUserStateSections;
40605
40611
  const { sectionUserStates } = layoutUserStateInput;
40606
40612
  const { sectionUserStates: cachedSectionUserStates } = cachedLayoutUserState;
40607
- const sectionUserStateKeys = keys$9(sectionUserStates);
40613
+ const sectionUserStateKeys = keys$a(sectionUserStates);
40608
40614
  for (let i = 0, len = sectionUserStateKeys.length; i < len; i += 1) {
40609
40615
  const sectionId = sectionUserStateKeys[i];
40610
40616
  if (cachedSectionUserStates[sectionId] === undefined) {
@@ -40627,7 +40633,7 @@
40627
40633
  const config = validateAdapterConfig$E(untrusted, getLayoutUserState_ConfigPropertyNames);
40628
40634
  if (config === null) {
40629
40635
  // eslint-disable-next-line @salesforce/lds/no-error-in-production
40630
- throw new Error(`@wire(updateLayoutUserState) invalid configuration ${stringify$7(untrusted)}`);
40636
+ throw new Error(`@wire(updateLayoutUserState) invalid configuration ${stringify$8(untrusted)}`);
40631
40637
  }
40632
40638
  // This will throw if layoutUserStateInput is not a valid input
40633
40639
  validate$7(layoutUserStateInput, 'layoutUserStateInput');
@@ -44502,12 +44508,13 @@
44502
44508
  allowFunction: instrumentation$2.getRecordNotifyChangeAllowed,
44503
44509
  dropFunction: instrumentation$2.getRecordNotifyChangeDropped,
44504
44510
  });
44505
- throttle(60, 60000, createLDSAdapter(luvio, 'notifyRecordUpdateAvailable', notifyUpdateAvailableFactory), {
44511
+ throttle(60, 60000, createLDSAdapter(luvio, 'notifyRecordUpdateAvailable', notifyUpdateAvailableFactory$1), {
44506
44512
  allowFunction: instrumentation$2.notifyRecordUpdateAvailableAllowed,
44507
44513
  dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
44508
44514
  });
44515
+ throttle(60, 60000, createLDSAdapter(luvio, 'notifyListViewSummaryUpdateAvailable', notifyUpdateAvailableFactory));
44509
44516
  });
44510
- // version: 1.198.0-caa871e32
44517
+ // version: 1.199.1-844bcf9ee
44511
44518
 
44512
44519
  var caseSensitiveUserId = '005B0000000GR4OIAW';
44513
44520
 
@@ -44639,10 +44646,10 @@
44639
44646
  * For full license text, see the LICENSE.txt file
44640
44647
  */
44641
44648
 
44642
- const { parse: parse$5, stringify: stringify$5 } = JSON;
44649
+ const { parse: parse$6, stringify: stringify$6 } = JSON;
44643
44650
  const { join: join$2, push: push$2, unshift } = Array.prototype;
44644
44651
  const { isArray: isArray$5 } = Array;
44645
- const { entries: entries$3, keys: keys$7 } = Object;
44652
+ const { entries: entries$4, keys: keys$8 } = Object;
44646
44653
 
44647
44654
  const UI_API_BASE_URI = '/services/data/v59.0/ui-api';
44648
44655
 
@@ -44707,7 +44714,7 @@
44707
44714
  function mergeRecordFields$1(first, second) {
44708
44715
  const { fields: targetFields } = first;
44709
44716
  const { fields: sourceFields } = second;
44710
- const fieldNames = keys$7(sourceFields);
44717
+ const fieldNames = keys$8(sourceFields);
44711
44718
  for (let i = 0, len = fieldNames.length; i < len; i += 1) {
44712
44719
  const fieldName = fieldNames[i];
44713
44720
  const sourceField = sourceFields[fieldName];
@@ -44937,10 +44944,10 @@
44937
44944
  const { resourceRequest } = req;
44938
44945
  const { baseUri, basePath, queryParams, headers } = resourceRequest;
44939
44946
  const path = `${baseUri}${basePath}`;
44940
- const queryParamsString = queryParams ? stringify$5(queryParams) : EMPTY_STRING;
44941
- const headersString = stringify$5(headers);
44947
+ const queryParamsString = queryParams ? stringify$6(queryParams) : EMPTY_STRING;
44948
+ const headersString = stringify$6(headers);
44942
44949
  const bodyString = resourceRequest.body && isResourceRequestDedupable(req)
44943
- ? stringify$5(resourceRequest.body)
44950
+ ? stringify$6(resourceRequest.body)
44944
44951
  : EMPTY_STRING;
44945
44952
  return `${path}${TRANSACTION_KEY_SEP}${headersString}${TRANSACTION_KEY_SEP}${queryParamsString}${bodyString}`;
44946
44953
  }
@@ -44949,7 +44956,7 @@
44949
44956
  if (fulfill === undefined) {
44950
44957
  return null;
44951
44958
  }
44952
- const handlersMap = entries$3(inflightRequests);
44959
+ const handlersMap = entries$4(inflightRequests);
44953
44960
  for (let i = 0, len = handlersMap.length; i < len; i += 1) {
44954
44961
  const [transactionKey, handlers] = handlersMap[i];
44955
44962
  // check fulfillment against only the first handler ([0]) because it's equal or
@@ -45006,7 +45013,7 @@
45006
45013
  // extra clone (particularly when there's only 1 handler).
45007
45014
  for (let i = 1, len = handlers.length; i < len; i++) {
45008
45015
  const handler = handlers[i];
45009
- handler.resolve(parse$5(stringify$5(response)));
45016
+ handler.resolve(parse$6(stringify$6(response)));
45010
45017
  }
45011
45018
  handlers[0].resolve(response);
45012
45019
  }, (error) => {
@@ -45112,7 +45119,7 @@
45112
45119
  const DefaultDurableSegment = 'DEFAULT';
45113
45120
  const RedirectDurableSegment = 'REDIRECT_KEYS';
45114
45121
 
45115
- const { keys: keys$6, create: create$5, assign: assign$5, freeze: freeze$1$1 } = Object;
45122
+ const { keys: keys$7, create: create$6, assign: assign$6, freeze: freeze$1$1 } = Object;
45116
45123
 
45117
45124
  //Durable store error instrumentation key
45118
45125
  const DURABLE_STORE_ERROR = 'durable-store-error';
@@ -45156,7 +45163,7 @@
45156
45163
  if (durableRecords === undefined) {
45157
45164
  return { revivedKeys, hadUnexpectedShape };
45158
45165
  }
45159
- const durableKeys = keys$6(durableRecords);
45166
+ const durableKeys = keys$7(durableRecords);
45160
45167
  if (durableKeys.length === 0) {
45161
45168
  // no records to revive
45162
45169
  return { revivedKeys, hadUnexpectedShape };
@@ -45330,7 +45337,7 @@
45330
45337
  overrides,
45331
45338
  };
45332
45339
  }
45333
- const keys$1 = keys$6(entries);
45340
+ const keys$1 = keys$7(entries);
45334
45341
  for (let i = 0, len = keys$1.length; i < len; i++) {
45335
45342
  const key = keys$1[i];
45336
45343
  const entry = entries[key];
@@ -45352,13 +45359,13 @@
45352
45359
  }
45353
45360
 
45354
45361
  function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler, redirects, additionalDurableStoreOperations = []) {
45355
- const durableRecords = create$5(null);
45356
- const evictedRecords = create$5(null);
45362
+ const durableRecords = create$6(null);
45363
+ const evictedRecords = create$6(null);
45357
45364
  const { records, metadata: storeMetadata, visitedIds, refreshedIds, } = store.fallbackStringKeyInMemoryStore;
45358
45365
  // TODO: W-8909393 Once metadata is stored in its own segment we need to
45359
45366
  // call setEntries for the visitedIds on default segment and call setEntries
45360
45367
  // on the metadata segment for the refreshedIds
45361
- const keys$1 = keys$6({ ...visitedIds, ...refreshedIds });
45368
+ const keys$1 = keys$7({ ...visitedIds, ...refreshedIds });
45362
45369
  for (let i = 0, len = keys$1.length; i < len; i += 1) {
45363
45370
  const key = keys$1[i];
45364
45371
  const record = records[key];
@@ -45380,7 +45387,7 @@
45380
45387
  }
45381
45388
  const durableStoreOperations = additionalDurableStoreOperations;
45382
45389
  // publishes
45383
- const recordKeys = keys$6(durableRecords);
45390
+ const recordKeys = keys$7(durableRecords);
45384
45391
  if (recordKeys.length > 0) {
45385
45392
  durableStoreOperations.push({
45386
45393
  type: 'setEntries',
@@ -45401,7 +45408,7 @@
45401
45408
  });
45402
45409
  });
45403
45410
  // evicts
45404
- const evictedKeys = keys$6(evictedRecords);
45411
+ const evictedKeys = keys$7(evictedRecords);
45405
45412
  if (evictedKeys.length > 0) {
45406
45413
  durableStoreOperations.push({
45407
45414
  type: 'evictEntries',
@@ -45462,7 +45469,7 @@
45462
45469
  const ADAPTER_CONTEXT_ID_SUFFIX = '__NAMED_CONTEXT';
45463
45470
  async function reviveOrCreateContext(adapterId, durableStore, durableStoreErrorHandler, contextStores, pendingContextStoreKeys, onContextLoaded) {
45464
45471
  // initialize empty context store
45465
- contextStores[adapterId] = create$5(null);
45472
+ contextStores[adapterId] = create$6(null);
45466
45473
  const context = {
45467
45474
  set(key, value) {
45468
45475
  contextStores[adapterId][key] = value;
@@ -45523,7 +45530,7 @@
45523
45530
  const pendingContextStoreKeys = new Set();
45524
45531
  // redirects that need to be flushed to the durable store
45525
45532
  const pendingStoreRedirects = new Map();
45526
- const contextStores = create$5(null);
45533
+ const contextStores = create$6(null);
45527
45534
  let initializationPromise = new Promise((resolve) => {
45528
45535
  const finish = () => {
45529
45536
  resolve();
@@ -45590,7 +45597,7 @@
45590
45597
  try {
45591
45598
  const entries = await durableStore.getEntries(adapterContextKeysFromDifferentInstance, AdapterContextSegment);
45592
45599
  if (entries !== undefined) {
45593
- const entryKeys = keys$6(entries);
45600
+ const entryKeys = keys$7(entries);
45594
45601
  for (let i = 0, len = entryKeys.length; i < len; i++) {
45595
45602
  const entryKey = entryKeys[i];
45596
45603
  const entry = entries[entryKey];
@@ -45959,7 +45966,7 @@
45959
45966
  type: 'stale-while-revalidate',
45960
45967
  staleDurationSeconds: Number.MAX_SAFE_INTEGER,
45961
45968
  });
45962
- return create$5(environment, {
45969
+ return create$6(environment, {
45963
45970
  publishStoreMetadata: { value: publishStoreMetadata },
45964
45971
  storeIngest: { value: storeIngest },
45965
45972
  storeIngestError: { value: storeIngestError },
@@ -47198,7 +47205,7 @@
47198
47205
  }
47199
47206
 
47200
47207
  const { isArray: isArray$4 } = Array;
47201
- const { keys: keys$5 } = Object;
47208
+ const { keys: keys$6 } = Object;
47202
47209
 
47203
47210
  function isListValueNode(node) {
47204
47211
  return node.kind === 'ListValue';
@@ -48830,7 +48837,7 @@
48830
48837
  switch (valueNode.kind) {
48831
48838
  case Kind.OBJECT: {
48832
48839
  // For example, `{ Id: { eq: $draftId } }` is a `ObjectValueNode`, which has field keys 'Id'
48833
- const resultQuery = keys$5(valueNode.fields)
48840
+ const resultQuery = keys$6(valueNode.fields)
48834
48841
  .map((key) => generateVariableSubQuery(valueNode.fields[key], key, type, variables))
48835
48842
  .filter((subquery) => subquery.length > 0)
48836
48843
  .join(',');
@@ -48906,7 +48913,7 @@
48906
48913
  }
48907
48914
  function swapValueNodeWithVariableNodes(original, swapped) {
48908
48915
  if (original.kind === Kind.OBJECT) {
48909
- for (const key of keys$5(original.fields)) {
48916
+ for (const key of keys$6(original.fields)) {
48910
48917
  if (isObjectValueNode$1(swapped) && swapped.fields[key]) {
48911
48918
  if (is(original.fields[key], 'Variable')) {
48912
48919
  original.fields[key] = swapped.fields[key];
@@ -49488,12 +49495,12 @@
49488
49495
  return new DraftErrorFetchResponse(HttpStatusCode$1.BadRequest, error);
49489
49496
  }
49490
49497
 
49491
- const { keys: keys$4, create: create$4, assign: assign$4, values: values$2 } = Object;
49492
- const { stringify: stringify$4, parse: parse$4 } = JSON;
49498
+ const { keys: keys$5, create: create$5, assign: assign$5, values: values$2 } = Object;
49499
+ const { stringify: stringify$5, parse: parse$5 } = JSON;
49493
49500
  const { isArray: isArray$3 } = Array;
49494
49501
 
49495
49502
  function clone$1(obj) {
49496
- return parse$4(stringify$4(obj));
49503
+ return parse$5(stringify$5(obj));
49497
49504
  }
49498
49505
 
49499
49506
  /**
@@ -49600,13 +49607,13 @@
49600
49607
  }
49601
49608
  softEvict(key);
49602
49609
  };
49603
- return create$4(luvio, {
49610
+ return create$5(luvio, {
49604
49611
  dispatchResourceRequest: { value: dispatchResourceRequest },
49605
49612
  publishStoreMetadata: { value: publishStoreMetadata },
49606
49613
  storeEvict: { value: storeEvict },
49607
49614
  });
49608
49615
  }
49609
- return create$4(luvio, {
49616
+ return create$5(luvio, {
49610
49617
  dispatchResourceRequest: { value: dispatchResourceRequest },
49611
49618
  publishStoreMetadata: { value: publishStoreMetadata },
49612
49619
  });
@@ -49640,7 +49647,7 @@
49640
49647
  if (entries === undefined) {
49641
49648
  return mappings;
49642
49649
  }
49643
- const keys$1 = keys$4(entries);
49650
+ const keys$1 = keys$5(entries);
49644
49651
  for (const key of keys$1) {
49645
49652
  const entry = entries[key].data;
49646
49653
  if (isLegacyDraftIdMapping(key)) {
@@ -49658,7 +49665,7 @@
49658
49665
  async function clearDraftIdSegment(durableStore) {
49659
49666
  const entries = await durableStore.getAllEntries(DRAFT_ID_MAPPINGS_SEGMENT);
49660
49667
  if (entries) {
49661
- const keys$1 = keys$4(entries);
49668
+ const keys$1 = keys$5(entries);
49662
49669
  if (keys$1.length > 0) {
49663
49670
  await durableStore.evictEntries(keys$1, DRAFT_ID_MAPPINGS_SEGMENT);
49664
49671
  }
@@ -50065,7 +50072,7 @@
50065
50072
  return this.replaceOrMergeActions(targetActionId, sourceActionId, true);
50066
50073
  }
50067
50074
  async setMetadata(actionId, metadata) {
50068
- const keys$1 = keys$4(metadata);
50075
+ const keys$1 = keys$5(metadata);
50069
50076
  const compatibleKeys = keys$1.filter((key) => {
50070
50077
  const value = metadata[key];
50071
50078
  return typeof key === 'string' && typeof value === 'string';
@@ -50215,7 +50222,7 @@
50215
50222
  const waitForOngoingSync = this.syncPromise || Promise.resolve();
50216
50223
  return waitForOngoingSync.then(() => {
50217
50224
  const { draftStore } = this;
50218
- const keys$1 = keys$4(draftStore);
50225
+ const keys$1 = keys$5(draftStore);
50219
50226
  const actionArray = [];
50220
50227
  for (let i = 0, len = keys$1.length; i < len; i++) {
50221
50228
  const key = keys$1[i];
@@ -50239,7 +50246,7 @@
50239
50246
  deleteByTag(tag) {
50240
50247
  const deleteAction = () => {
50241
50248
  const { draftStore } = this;
50242
- const keys$1 = keys$4(draftStore);
50249
+ const keys$1 = keys$5(draftStore);
50243
50250
  const durableKeys = [];
50244
50251
  for (let i = 0, len = keys$1.length; i < len; i++) {
50245
50252
  const key = keys$1[i];
@@ -50329,7 +50336,7 @@
50329
50336
  return this.runQueuedOperations();
50330
50337
  }
50331
50338
  const { draftStore } = this;
50332
- const keys$1 = keys$4(durableEntries);
50339
+ const keys$1 = keys$5(durableEntries);
50333
50340
  for (let i = 0, len = keys$1.length; i < len; i++) {
50334
50341
  const entry = durableEntries[keys$1[i]];
50335
50342
  const action = entry.data;
@@ -50499,7 +50506,7 @@
50499
50506
  let updatedActionTargetId = undefined;
50500
50507
  const { tag: queueActionTag, data: queueActionRequest, id: queueActionId, } = queueAction;
50501
50508
  let { basePath, body } = queueActionRequest;
50502
- let stringifiedBody = stringify$4(body);
50509
+ let stringifiedBody = stringify$5(body);
50503
50510
  // for each redirected ID/key we loop over the operation to see if it needs
50504
50511
  // to be updated
50505
50512
  for (const { draftId, draftKey, canonicalId, canonicalKey } of redirects) {
@@ -50524,7 +50531,7 @@
50524
50531
  data: {
50525
50532
  ...queueActionRequest,
50526
50533
  basePath: basePath,
50527
- body: parse$4(stringifiedBody),
50534
+ body: parse$5(stringifiedBody),
50528
50535
  },
50529
50536
  };
50530
50537
  // item needs to be replaced with a new item at the new record key
@@ -50543,7 +50550,7 @@
50543
50550
  data: {
50544
50551
  ...queueActionRequest,
50545
50552
  basePath: basePath,
50546
- body: parse$4(stringifiedBody),
50553
+ body: parse$5(stringifiedBody),
50547
50554
  },
50548
50555
  };
50549
50556
  // item needs to be updated
@@ -50953,7 +50960,7 @@
50953
50960
  // We should always return an array, if the body is just a dictionary,
50954
50961
  // stick it in an array
50955
50962
  const body = isArray$3(action.error.body) ? action.error.body : [action.error.body];
50956
- const bodyString = stringify$4(body);
50963
+ const bodyString = stringify$5(body);
50957
50964
  item.error = {
50958
50965
  status: action.error.status || 0,
50959
50966
  ok: action.error.ok || false,
@@ -51118,7 +51125,7 @@
51118
51125
  decrementRefCount(key);
51119
51126
  };
51120
51127
  // note the makeEnvironmentUiApiRecordDraftAware will eventually go away once the adapters become draft aware
51121
- return create$4(env, {
51128
+ return create$5(env, {
51122
51129
  storePublish: { value: storePublish },
51123
51130
  handleSuccessResponse: { value: handleSuccessResponse },
51124
51131
  softEvict: { value: softEvict },
@@ -51399,8 +51406,8 @@
51399
51406
  (x.length === 0 || (x.length > 0 && Object.prototype.hasOwnProperty.call(x, x.length - 1))));
51400
51407
  }
51401
51408
 
51402
- const { create: create$3, keys: keys$3, values: values$1, entries: entries$2, assign: assign$3 } = Object;
51403
- const { stringify: stringify$3, parse: parse$3 } = JSON;
51409
+ const { create: create$4, keys: keys$4, values: values$1, entries: entries$3, assign: assign$4 } = Object;
51410
+ const { stringify: stringify$4, parse: parse$4 } = JSON;
51404
51411
  const { isArray: isArray$2 } = Array;
51405
51412
 
51406
51413
  function recordLoaderFactory(query) {
@@ -51412,7 +51419,7 @@
51412
51419
  rows.forEach((row) => {
51413
51420
  if (!row[0])
51414
51421
  return null;
51415
- const record = parse$3(row[0]);
51422
+ const record = parse$4(row[0]);
51416
51423
  if (record.id === id) {
51417
51424
  foundRow = record;
51418
51425
  }
@@ -51742,11 +51749,11 @@
51742
51749
  return dateTimeRange(range, operator, field, alias);
51743
51750
  }
51744
51751
  // eslint-disable-next-line @salesforce/lds/no-error-in-production
51745
- throw new Error(`Where filter ${stringify$3(input)} is not supported`);
51752
+ throw new Error(`Where filter ${stringify$4(input)} is not supported`);
51746
51753
  }
51747
51754
  function dateTimeRange(input, op, field, alias) {
51748
51755
  const dateFunction = field.dataType === 'DateTime' ? 'datetime' : 'date';
51749
- const key = keys$3(input)[0];
51756
+ const key = keys$4(input)[0];
51750
51757
  let operator = op;
51751
51758
  if (operator === '=')
51752
51759
  operator = 'BETWEEN';
@@ -51852,7 +51859,7 @@
51852
51859
  if (!where)
51853
51860
  return [];
51854
51861
  let predicates = [];
51855
- const fields = keys$3(where);
51862
+ const fields = keys$4(where);
51856
51863
  for (const field of fields) {
51857
51864
  if (field === 'and' || field === 'or') {
51858
51865
  predicates.push(processCompoundPredicate(field, where[field], recordType, alias, objectInfoMap, joins));
@@ -51901,7 +51908,7 @@
51901
51908
  }
51902
51909
  else {
51903
51910
  // @W-12618378 polymorphic query sometimes does not work as expected on server. The GQL on certain entities could fail.
51904
- const entityNames = keys$3(where[field]);
51911
+ const entityNames = keys$4(where[field]);
51905
51912
  const polyPredicatesGroups = entityNames
51906
51913
  .filter((entityName) => fieldInfo.referenceToInfos.some((referenceInfo) => referenceInfo.apiName === entityName))
51907
51914
  .map((entityName) => {
@@ -51931,7 +51938,7 @@
51931
51938
  }
51932
51939
  else {
51933
51940
  //`field` match the filedInfo's apiName
51934
- for (const [op, value] of entries$2(where[field])) {
51941
+ for (const [op, value] of entries$3(where[field])) {
51935
51942
  const operator = operatorToSql(op);
51936
51943
  /**
51937
51944
  Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
@@ -53041,7 +53048,7 @@
53041
53048
  if (typeof json !== 'object') {
53042
53049
  return currentLevel;
53043
53050
  }
53044
- const keys$1 = keys$3(json);
53051
+ const keys$1 = keys$4(json);
53045
53052
  if (keys$1.length === 0)
53046
53053
  return 0;
53047
53054
  const depths = keys$1.map((key) => {
@@ -53070,7 +53077,7 @@
53070
53077
  return predicates;
53071
53078
  const isSpanning = depth(orderBy) > 2;
53072
53079
  if (isSpanning) {
53073
- const keys$1 = keys$3(orderBy);
53080
+ const keys$1 = keys$4(orderBy);
53074
53081
  for (let i = 0, len = keys$1.length; i < len; i++) {
53075
53082
  const key = keys$1[i];
53076
53083
  const parentFields = objectInfoMap[recordType].fields;
@@ -53100,7 +53107,7 @@
53100
53107
  }
53101
53108
  }
53102
53109
  else {
53103
- const keys$1 = keys$3(orderBy);
53110
+ const keys$1 = keys$4(orderBy);
53104
53111
  for (let i = 0, len = keys$1.length; i < len; i++) {
53105
53112
  const key = keys$1[i];
53106
53113
  if (!objectInfoMap[recordType])
@@ -53334,7 +53341,7 @@
53334
53341
  if (field.name === 'node') {
53335
53342
  field.resolve = function nodeResolver(obj, _args, { seenRecordIds }) {
53336
53343
  const { record, ingestionTimestamp } = obj;
53337
- const recordRepresentation = parse$3(record);
53344
+ const recordRepresentation = parse$4(record);
53338
53345
  seenRecordIds.add(recordRepresentation.id);
53339
53346
  return { recordRepresentation, ingestionTimestamp };
53340
53347
  };
@@ -53552,7 +53559,7 @@
53552
53559
  variables,
53553
53560
  fragmentMap: {},
53554
53561
  });
53555
- const filteredArgumentNodes = assign$3([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
53562
+ const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
53556
53563
  const argumentString = filteredArgumentNodes.length > 0
53557
53564
  ? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
53558
53565
  : '';
@@ -53607,7 +53614,7 @@
53607
53614
  * @returns Type definition string and entity type names which support polymorphism.
53608
53615
  */
53609
53616
  function generateTypeDefinitions(objectInfos) {
53610
- if (keys$3(objectInfos).length === 0)
53617
+ if (keys$4(objectInfos).length === 0)
53611
53618
  return { typeDefs: baseTypeDefinitions, polyFieldTypeNames: [] };
53612
53619
  const { recordQueries, recordConnections, polyFieldTypeNameArr } = generateRecordQueries(objectInfos);
53613
53620
  const typeDefs = `
@@ -54358,7 +54365,7 @@
54358
54365
  // eslint-disable-next-line
54359
54366
  throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
54360
54367
  }
54361
- if (keys$3(objectInfos).length < startNodes.size) {
54368
+ if (keys$4(objectInfos).length < startNodes.size) {
54362
54369
  // eslint-disable-next-line
54363
54370
  throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
54364
54371
  }
@@ -55315,7 +55322,7 @@
55315
55322
  // so we keep any other results that are not included in a record query
55316
55323
  const output = { ...result };
55317
55324
  const outputApiParent = output.data.uiapi.query;
55318
- const keys$1 = keys$3(nodeJson);
55325
+ const keys$1 = keys$4(nodeJson);
55319
55326
  keys$1.forEach((recordName) => {
55320
55327
  const outputApi = {};
55321
55328
  // Each connectionSelection's maps its name or alias to one of returned records. The record name could be `apiName' or alias
@@ -55335,7 +55342,7 @@
55335
55342
  * @param jsonOutput JsonObject which will be populated with properties. It would only contains properties defined in 'FieldNode'
55336
55343
  */
55337
55344
  function createUserJsonOutput(selection, jsonInput, jsonOutput) {
55338
- const keys$1 = keys$3(jsonInput);
55345
+ const keys$1 = keys$4(jsonInput);
55339
55346
  if (selection.selectionSet) {
55340
55347
  createjsonOutput(selection.selectionSet.selections, jsonInput, jsonOutput);
55341
55348
  }
@@ -55344,7 +55351,7 @@
55344
55351
  }
55345
55352
  }
55346
55353
  function createjsonOutput(selections, jsonInput, jsonOutput) {
55347
- const keys$1 = keys$3(jsonInput);
55354
+ const keys$1 = keys$4(jsonInput);
55348
55355
  selections.filter(isFieldNode).forEach((subSelection) => {
55349
55356
  const fieldName = subSelection.name.value;
55350
55357
  if (keys$1.includes(fieldName)) {
@@ -55404,8 +55411,8 @@
55404
55411
  * For full license text, see the LICENSE.txt file
55405
55412
  */
55406
55413
 
55407
- const { keys: keys$2$1, values, create: create$2$1, assign: assign$2, freeze: freeze$2 } = Object;
55408
- const { stringify: stringify$2, parse: parse$2 } = JSON;
55414
+ const { keys: keys$3, values, create: create$3, assign: assign$3, freeze: freeze$2 } = Object;
55415
+ const { stringify: stringify$3, parse: parse$3 } = JSON;
55409
55416
  const { shift } = Array.prototype;
55410
55417
  const { isArray: isArray$1$1 } = Array;
55411
55418
 
@@ -55471,7 +55478,7 @@
55471
55478
  */
55472
55479
  function filterOutReferenceFieldsAndLinks(record) {
55473
55480
  const filteredFields = {};
55474
- const fieldNames = keys$2$1(record.fields);
55481
+ const fieldNames = keys$3(record.fields);
55475
55482
  for (const fieldName of fieldNames) {
55476
55483
  const field = record.fields[fieldName];
55477
55484
  if (isFieldLink(field) === false) {
@@ -55572,7 +55579,7 @@
55572
55579
  const resolvedRequest = resolveResourceRequestIds(luvio, resourceRequest, canonicalKey);
55573
55580
  return env.dispatchResourceRequest(resolvedRequest, context, eventObservers);
55574
55581
  };
55575
- return create$2$1(env, {
55582
+ return create$3(env, {
55576
55583
  dispatchResourceRequest: { value: dispatchResourceRequest },
55577
55584
  });
55578
55585
  }
@@ -55750,7 +55757,7 @@
55750
55757
  return applyDraftsToBatchResponse(resourceRequest, response, removedDraftIds);
55751
55758
  }));
55752
55759
  };
55753
- return create$2$1(env, {
55760
+ return create$3(env, {
55754
55761
  dispatchResourceRequest: { value: dispatchResourceRequest },
55755
55762
  });
55756
55763
  }
@@ -55760,11 +55767,11 @@
55760
55767
  const adapterSpecificEnvironments = synthesizers.reduce((environment, synthesizer) => {
55761
55768
  return synthesizer(luvio, environment, options);
55762
55769
  }, env);
55763
- return create$2$1(adapterSpecificEnvironments, {});
55770
+ return create$3(adapterSpecificEnvironments, {});
55764
55771
  }
55765
55772
 
55766
55773
  function clone(obj) {
55767
- return parse$2(stringify$2(obj));
55774
+ return parse$3(stringify$3(obj));
55768
55775
  }
55769
55776
 
55770
55777
  const DEFAULT_FIELD_CREATED_BY_ID = 'CreatedById';
@@ -55887,7 +55894,7 @@
55887
55894
  LastModifiedDate: lastModifiedDate,
55888
55895
  };
55889
55896
  const draftFields = buildRecordFieldValueRepresentationsFromDraftFields(luvio, apiName, internalFields, objectInfos, referencedRecords, formatDisplayValue);
55890
- const fieldNames = keys$2$1(draftFields);
55897
+ const fieldNames = keys$3(draftFields);
55891
55898
  for (let i = 0, len = fieldNames.length; i < len; i++) {
55892
55899
  const fieldName = fieldNames[i];
55893
55900
  // don't apply server values to draft created records
@@ -55948,7 +55955,7 @@
55948
55955
  return undefined;
55949
55956
  }
55950
55957
  const updatedFields = {};
55951
- const fieldNames = keys$2$1(fields);
55958
+ const fieldNames = keys$3(fields);
55952
55959
  for (let i = 0, len = fieldNames.length; i < len; i++) {
55953
55960
  const fieldName = fieldNames[i];
55954
55961
  const field = fields[fieldName];
@@ -55995,7 +56002,7 @@
55995
56002
  * @param fields List of draft record fields
55996
56003
  */
55997
56004
  function buildRecordFieldValueRepresentationsFromDraftFields(luvio, apiName, fields, objectInfos, referencedRecords, formatDisplayValue) {
55998
- const fieldNames = keys$2$1(fields);
56005
+ const fieldNames = keys$3(fields);
55999
56006
  const recordFields = {};
56000
56007
  const objectInfo = objectInfos.get(apiName);
56001
56008
  for (let i = 0, len = fieldNames.length; i < len; i++) {
@@ -56064,7 +56071,7 @@
56064
56071
  draftFields[DEFAULT_FIELD_OWNER_ID] = { value: userId, displayValue: null };
56065
56072
  draftFields[DEFAULT_FIELD_ID] = { value: recordId, displayValue: null };
56066
56073
  if (objectInfo !== undefined) {
56067
- const allObjectFields = keys$2$1(objectInfo.fields);
56074
+ const allObjectFields = keys$3(objectInfo.fields);
56068
56075
  allObjectFields.forEach((fieldName) => {
56069
56076
  if (draftFields[fieldName] === undefined) {
56070
56077
  draftFields[fieldName] = { value: null, displayValue: null };
@@ -56188,7 +56195,7 @@
56188
56195
  this.isDraftId = isDraftId;
56189
56196
  this.recordService = recordService;
56190
56197
  this.handlerId = LDS_ACTION_HANDLER_ID;
56191
- this.collectedFields = create$2$1(null);
56198
+ this.collectedFields = create$3(null);
56192
56199
  recordService.registerRecordHandler(this);
56193
56200
  }
56194
56201
  async buildPendingAction(request, queue) {
@@ -56401,11 +56408,11 @@
56401
56408
  // otherwise we're a record
56402
56409
  if (draftMetadata === undefined) {
56403
56410
  // no drafts applied to this record, publish and be done
56404
- this.collectedFields = create$2$1(null);
56411
+ this.collectedFields = create$3(null);
56405
56412
  return publishData(key, data);
56406
56413
  }
56407
56414
  // create a denormalized record with the collected fields
56408
- const recordFieldNames = keys$2$1(data.fields);
56415
+ const recordFieldNames = keys$3(data.fields);
56409
56416
  const partialRecord = {
56410
56417
  ...data,
56411
56418
  fields: {},
@@ -56427,7 +56434,7 @@
56427
56434
  lastModifiedDate: recordWithDrafts.lastModifiedDate,
56428
56435
  lastModifiedById: recordWithDrafts.lastModifiedById,
56429
56436
  };
56430
- for (const fieldName of keys$2$1(recordWithSpanningRefLinks.fields)) {
56437
+ for (const fieldName of keys$3(recordWithSpanningRefLinks.fields)) {
56431
56438
  const fieldKey = buildRecordFieldStoreKey(key, fieldName);
56432
56439
  if (this.collectedFields[fieldKey] !== undefined) {
56433
56440
  const fieldData = recordWithSpanningRefLinks.fields[fieldName];
@@ -56444,7 +56451,7 @@
56444
56451
  // publish the normalized record
56445
56452
  publishData(key, normalizedRecord);
56446
56453
  // we've published the record, now clear the collected fields
56447
- this.collectedFields = create$2$1(null);
56454
+ this.collectedFields = create$3(null);
56448
56455
  }
56449
56456
  updateMetadata(existingMetadata, incomingMetadata) {
56450
56457
  // ensure the the api name cannot be overwritten in the incoming metadata
@@ -56481,7 +56488,7 @@
56481
56488
  let resolvedUrlParams = request.urlParams;
56482
56489
  if (request.method === 'post' || request.method === 'patch') {
56483
56490
  const bodyFields = resolvedBody.fields;
56484
- const fieldNames = keys$2$1(bodyFields);
56491
+ const fieldNames = keys$3(bodyFields);
56485
56492
  for (let i = 0, len = fieldNames.length; i < len; i++) {
56486
56493
  const fieldName = fieldNames[i];
56487
56494
  const fieldValue = bodyFields[fieldName];
@@ -56564,7 +56571,7 @@
56564
56571
  function normalizeRecordFields(key, entry) {
56565
56572
  const { data: record } = entry;
56566
56573
  const { fields, links } = record;
56567
- const linkNames = keys$2$1(links);
56574
+ const linkNames = keys$3(links);
56568
56575
  const normalizedFields = {};
56569
56576
  const returnEntries = {};
56570
56577
  for (let i = 0, len = linkNames.length; i < len; i++) {
@@ -56586,7 +56593,7 @@
56586
56593
  }
56587
56594
  }
56588
56595
  returnEntries[key] = {
56589
- data: assign$2(record, { fields: normalizedFields }),
56596
+ data: assign$3(record, { fields: normalizedFields }),
56590
56597
  metadata: entry.metadata,
56591
56598
  };
56592
56599
  return returnEntries;
@@ -56602,7 +56609,7 @@
56602
56609
  const fields = normalizedRecord.fields;
56603
56610
  const filteredFields = {};
56604
56611
  const links = {};
56605
- const fieldNames = keys$2$1(fields);
56612
+ const fieldNames = keys$3(fields);
56606
56613
  for (let i = 0, len = fieldNames.length; i < len; i++) {
56607
56614
  const fieldName = fieldNames[i];
56608
56615
  const field = fields[fieldName];
@@ -56689,8 +56696,8 @@
56689
56696
  if (durableEntries === undefined) {
56690
56697
  return undefined;
56691
56698
  }
56692
- const returnEntries = create$2$1(null);
56693
- const keys$1 = keys$2$1(durableEntries);
56699
+ const returnEntries = create$3(null);
56700
+ const keys$1 = keys$3(durableEntries);
56694
56701
  for (let i = 0, len = keys$1.length; i < len; i++) {
56695
56702
  const key = keys$1[i];
56696
56703
  const value = durableEntries[key];
@@ -56698,7 +56705,7 @@
56698
56705
  continue;
56699
56706
  }
56700
56707
  if (isEntryDurableRecordRepresentation(value, key)) {
56701
- assign$2(returnEntries, normalizeRecordFields(key, value));
56708
+ assign$3(returnEntries, normalizeRecordFields(key, value));
56702
56709
  }
56703
56710
  else {
56704
56711
  returnEntries[key] = value;
@@ -56708,8 +56715,8 @@
56708
56715
  });
56709
56716
  };
56710
56717
  const denormalizeEntries = function (entries) {
56711
- const putEntries = create$2$1(null);
56712
- const keys$1 = keys$2$1(entries);
56718
+ const putEntries = create$3(null);
56719
+ const keys$1 = keys$3(entries);
56713
56720
  const putRecords = {};
56714
56721
  const putRecordViews = {};
56715
56722
  const storeRecords = getStoreRecords !== undefined ? getStoreRecords() : {};
@@ -56818,7 +56825,7 @@
56818
56825
  return denormalizedRecord;
56819
56826
  });
56820
56827
  };
56821
- return create$2$1(durableStore, {
56828
+ return create$3(durableStore, {
56822
56829
  getEntries: { value: getEntries, writable: true },
56823
56830
  setEntries: { value: setEntries, writable: true },
56824
56831
  batchOperations: { value: batchOperations, writable: true },
@@ -56836,7 +56843,7 @@
56836
56843
  else if (typeof error === 'string') {
56837
56844
  return new Error(error);
56838
56845
  }
56839
- return new Error(stringify$2(error));
56846
+ return new Error(stringify$3(error));
56840
56847
  }
56841
56848
 
56842
56849
  const PERFORM_QUICK_ACTION_ENDPOINT_REGEX = /^\/ui-api\/actions\/perform-quick-action\/.*$/;
@@ -56864,7 +56871,7 @@
56864
56871
  }
56865
56872
  return createOkResponse(data);
56866
56873
  };
56867
- return create$2$1(env, {
56874
+ return create$3(env, {
56868
56875
  dispatchResourceRequest: { value: dispatchResourceRequest },
56869
56876
  });
56870
56877
  }
@@ -56931,7 +56938,7 @@
56931
56938
  };
56932
56939
  }
56933
56940
  objectInfoMap.set(apiName, objectInfo);
56934
- const fields = keys$2$1(operation.fields);
56941
+ const fields = keys$3(operation.fields);
56935
56942
  const unexpectedFields = [];
56936
56943
  for (const field of fields) {
56937
56944
  const fieldInfo = objectInfo.fields[field];
@@ -57217,7 +57224,7 @@
57217
57224
  }
57218
57225
  else if (typeof object === 'object' && object !== null) {
57219
57226
  let source = object;
57220
- return keys$2$1(source).reduce((acc, key) => {
57227
+ return keys$3(source).reduce((acc, key) => {
57221
57228
  acc[key] = replace(source[key]);
57222
57229
  return acc;
57223
57230
  }, {});
@@ -57226,7 +57233,7 @@
57226
57233
  return object;
57227
57234
  }
57228
57235
  };
57229
- let newVariables = keys$2$1(variables).reduce((acc, key) => {
57236
+ let newVariables = keys$3(variables).reduce((acc, key) => {
57230
57237
  acc[key] = replace(variables[key]);
57231
57238
  return acc;
57232
57239
  }, {});
@@ -57239,7 +57246,7 @@
57239
57246
  };
57240
57247
  return async function draftAwareGraphQLAdapter(config, buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy, requestContext = {}) {
57241
57248
  //create a copy to not accidentally modify the AST in the astResolver map of luvio
57242
- const copy = parse$2(stringify$2(config.query));
57249
+ const copy = parse$3(stringify$3(config.query));
57243
57250
  let injectedAST;
57244
57251
  let objectInfoNeeded = {};
57245
57252
  let unmappedDraftIDs;
@@ -57304,7 +57311,7 @@
57304
57311
  ({ result: gqlResult, seenRecordIds } = await evaluate({
57305
57312
  ...config,
57306
57313
  //need to create another copy of the ast for future writes
57307
- query: parse$2(stringify$2(injectedAST)),
57314
+ query: parse$3(stringify$3(injectedAST)),
57308
57315
  }, observers, { userId }, objectInfoNeeded, store, nonEvaluatedSnapshot));
57309
57316
  }
57310
57317
  catch (throwable) {
@@ -58058,16 +58065,16 @@
58058
58065
  * For full license text, see the LICENSE.txt file
58059
58066
  */
58060
58067
 
58061
- const { keys: keys$1$1, create: create$1$1, assign: assign$1, entries: entries$1 } = Object;
58062
- const { stringify: stringify$1$1, parse: parse$1$1 } = JSON;
58068
+ const { keys: keys$2$1, create: create$2$1, assign: assign$2, entries: entries$2 } = Object;
58069
+ const { stringify: stringify$2, parse: parse$2 } = JSON;
58063
58070
  const { push: push$1, join: join$1, slice: slice$1 } = Array.prototype;
58064
58071
  const { isArray: isArray$6, from } = Array;
58065
58072
 
58066
58073
  function ldsParamsToString(params) {
58067
- const returnParams = create$1$1(null);
58068
- const keys$1$1$1 = keys$1$1(params);
58069
- for (let i = 0, len = keys$1$1$1.length; i < len; i++) {
58070
- const key = keys$1$1$1[i];
58074
+ const returnParams = create$2$1(null);
58075
+ const keys$1 = keys$2$1(params);
58076
+ for (let i = 0, len = keys$1.length; i < len; i++) {
58077
+ const key = keys$1[i];
58071
58078
  const value = params[key];
58072
58079
  if (value === undefined) {
58073
58080
  // filter out params that have no value
@@ -58082,8 +58089,8 @@
58082
58089
  else {
58083
58090
  returnParams[key] = `${value}`;
58084
58091
  }
58085
- if (isObject(value) === true && keys$1$1(value).length > 0) {
58086
- returnParams[key] = stringify$1$1(value);
58092
+ if (isObject(value) === true && keys$2$1(value).length > 0) {
58093
+ returnParams[key] = stringify$2(value);
58087
58094
  }
58088
58095
  }
58089
58096
  return returnParams;
@@ -58142,13 +58149,13 @@
58142
58149
  if (value === undefined || value === null) {
58143
58150
  return null;
58144
58151
  }
58145
- return stringify$1$1(value);
58152
+ return stringify$2(value);
58146
58153
  }
58147
58154
  function parseIfPresent(value) {
58148
58155
  if (value === undefined || value === null || value === '') {
58149
58156
  return null;
58150
58157
  }
58151
- return parse$1$1(value);
58158
+ return parse$2(value);
58152
58159
  }
58153
58160
  function buildNimbusNetworkPluginRequest(resourceRequest, resourceRequestContext) {
58154
58161
  const { basePath, baseUri, method, headers, queryParams, body } = resourceRequest;
@@ -58478,7 +58485,7 @@
58478
58485
  optionalFields,
58479
58486
  };
58480
58487
  const queryString = [];
58481
- for (const [key, value] of entries$1(mergedParams)) {
58488
+ for (const [key, value] of entries$2(mergedParams)) {
58482
58489
  if (value !== undefined) {
58483
58490
  queryString.push(`${key}=${isArray$6(value) ? value.join(',') : value}`);
58484
58491
  }
@@ -58494,7 +58501,7 @@
58494
58501
  function mergeRecordFields(first, second) {
58495
58502
  const { fields: targetFields } = first;
58496
58503
  const { fields: sourceFields } = second;
58497
- const fieldNames = keys$1$1(sourceFields);
58504
+ const fieldNames = keys$2$1(sourceFields);
58498
58505
  for (let i = 0, len = fieldNames.length; i < len; i += 1) {
58499
58506
  const fieldName = fieldNames[i];
58500
58507
  const sourceField = sourceFields[fieldName];
@@ -58644,8 +58651,8 @@
58644
58651
  // Too much work to get exact length of the final url, so use stringified json to get the rough length.
58645
58652
  const roughUrlLengthWithoutFieldsAndOptionFields = request.basePath.length +
58646
58653
  request.baseUri.length +
58647
- (request.urlParams ? stringify$1$1(request.urlParams).length : 0) +
58648
- stringify$1$1({ ...request.queryParams, fields: {}, optionalFields: {} }).length;
58654
+ (request.urlParams ? stringify$2(request.urlParams).length : 0) +
58655
+ stringify$2({ ...request.queryParams, fields: {}, optionalFields: {} }).length;
58649
58656
  // MAX_URL_LENGTH - full lenght without fields, optionalFields
58650
58657
  return MAX_URL_LENGTH - roughUrlLengthWithoutFieldsAndOptionFields;
58651
58658
  }
@@ -58853,8 +58860,8 @@
58853
58860
  }, networkAdapter);
58854
58861
  }
58855
58862
 
58856
- const { keys: keys$8, create: create$6, assign: assign$6, entries } = Object;
58857
- const { stringify: stringify$6, parse: parse$6 } = JSON;
58863
+ const { keys: keys$1$1, create: create$1$1, assign: assign$1, entries: entries$1 } = Object;
58864
+ const { stringify: stringify$1$1, parse: parse$1$1 } = JSON;
58858
58865
  const { push, join, slice } = Array.prototype;
58859
58866
 
58860
58867
  // so eslint doesn't complain about nimbus
@@ -58871,10 +58878,10 @@
58871
58878
  if (callProxyMethod === undefined) {
58872
58879
  return Promise.reject(new Error('callProxyMethod not defined on the nimbus plugin'));
58873
58880
  }
58874
- const serializedAction = stringify$6([handlerId, data]);
58881
+ const serializedAction = stringify$1$1([handlerId, data]);
58875
58882
  return new Promise((resolve, reject) => {
58876
58883
  callProxyMethod('enqueue', serializedAction, (serializedActionResponse) => {
58877
- const response = parse$6(serializedActionResponse);
58884
+ const response = parse$1$1(serializedActionResponse);
58878
58885
  resolve(response);
58879
58886
  }, (errorMessage) => {
58880
58887
  reject(new Error(errorMessage));
@@ -58895,8 +58902,8 @@
58895
58902
  return Promise.reject(new Error('callProxyMethod not defined on the nimbus plugin'));
58896
58903
  }
58897
58904
  return new Promise((resolve, reject) => {
58898
- callProxyMethod('getQueueActions', stringify$6([]), (serializedQueue) => {
58899
- resolve(parse$6(serializedQueue));
58905
+ callProxyMethod('getQueueActions', stringify$1$1([]), (serializedQueue) => {
58906
+ resolve(parse$1$1(serializedQueue));
58900
58907
  }, (errorMessage) => {
58901
58908
  reject(new Error(errorMessage));
58902
58909
  });
@@ -58907,17 +58914,17 @@
58907
58914
  if (callProxyMethod === undefined) {
58908
58915
  return Promise.reject('callProxyMethod not defined on the nimbus plugin');
58909
58916
  }
58910
- const stringifiedArgs = stringify$6([action]);
58917
+ const stringifiedArgs = stringify$1$1([action]);
58911
58918
  return new Promise((resolve, reject) => {
58912
58919
  callProxyMethod('getDataForAction', stringifiedArgs, (data) => {
58913
58920
  if (data === undefined) {
58914
58921
  resolve(undefined);
58915
58922
  }
58916
58923
  else {
58917
- resolve(parse$6(data));
58924
+ resolve(parse$1$1(data));
58918
58925
  }
58919
58926
  }, (serializedError) => {
58920
- reject(parse$6(serializedError));
58927
+ reject(parse$1$1(serializedError));
58921
58928
  });
58922
58929
  });
58923
58930
  }
@@ -58981,7 +58988,7 @@
58981
58988
  else if (typeof err === 'string') {
58982
58989
  return new Error(err);
58983
58990
  }
58984
- return new Error(stringify$6(err));
58991
+ return new Error(stringify$1$1(err));
58985
58992
  }
58986
58993
  const DRAFT_QUEUE_TOTAL_MERGE_ACTIONS_CALLS = 'draft-queue-total-mergeActions-calls';
58987
58994
  const DRAFT_AWARE_CREATE_CONTENT_DOCUMENT_AND_VERSION_ERROR = 'draft-aware-create-content-document-and-version-error';
@@ -59079,7 +59086,7 @@
59079
59086
  logError: false,
59080
59087
  });
59081
59088
  };
59082
- return create$6(queue, { mergeActions: { value: mergeActions } });
59089
+ return create$1$1(queue, { mergeActions: { value: mergeActions } });
59083
59090
  }
59084
59091
 
59085
59092
  // so eslint doesn't complain about nimbus
@@ -59155,7 +59162,7 @@
59155
59162
  function dataIsObjectInfo(key, data) {
59156
59163
  return incomingObjectInfos.has(key);
59157
59164
  }
59158
- return create$6(env, {
59165
+ return create$1$1(env, {
59159
59166
  handleSuccessResponse: { value: handleSuccessResponse },
59160
59167
  storePublish: { value: storePublish },
59161
59168
  });
@@ -59261,7 +59268,7 @@
59261
59268
  this.getObjectInfosAdapter = getObjectInfosAdapter;
59262
59269
  this.durableStore = durableStore;
59263
59270
  // Local in-memory cache for ObjectInfo entries seen in DurableStore eg: {'Account': 001}
59264
- this.objectInfoMemoryCache = create$6(null);
59271
+ this.objectInfoMemoryCache = create$1$1(null);
59265
59272
  }
59266
59273
  /**
59267
59274
  * Size of return map not necessarily correlated with number of inputs. The
@@ -59367,6 +59374,9 @@
59367
59374
  };
59368
59375
  }
59369
59376
 
59377
+ const { keys: keys$9, create: create$7, assign: assign$7, entries } = Object;
59378
+ const { stringify: stringify$7, parse: parse$7 } = JSON;
59379
+
59370
59380
  function selectColumnsFromTableWhereKeyIn(columnNames, table, keyColumnName, whereIn) {
59371
59381
  const paramList = whereIn.map(() => '?').join(',');
59372
59382
  return `SELECT ${columnNames.join(',')} FROM ${table} WHERE ${keyColumnName} IN (${paramList})`;
@@ -59378,13 +59388,13 @@
59378
59388
 
59379
59389
  // These const values must be in sync with the latest
59380
59390
  // @salesforce/nimbus-plugin-lds/sql schema file
59381
- const TABLE_NAME$3 = 'lds_data';
59391
+ const TABLE_NAME$1$1 = 'lds_data';
59382
59392
  const COLUMN_NAME_KEY$2 = 'key';
59383
59393
  const COLUMN_NAME_DATA$2 = 'data';
59384
59394
  const COLUMN_NAME_METADATA$1 = 'metadata';
59385
59395
  class LdsDataTable {
59386
59396
  constructor(plugin) {
59387
- this.tableName = TABLE_NAME$3;
59397
+ this.tableName = TABLE_NAME$1$1;
59388
59398
  this.columnNames = [COLUMN_NAME_KEY$2, COLUMN_NAME_DATA$2, COLUMN_NAME_METADATA$1];
59389
59399
  this.conflictColumnNames = [COLUMN_NAME_KEY$2];
59390
59400
  this.getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName}`;
@@ -59415,10 +59425,10 @@
59415
59425
  },
59416
59426
  conflictColumns: this.conflictColumnNames,
59417
59427
  columns: this.columnNames,
59418
- rows: keys$8(entries).reduce((rows, key) => {
59428
+ rows: keys$9(entries).reduce((rows, key) => {
59419
59429
  const entry = entries[key];
59420
59430
  const { data, metadata } = entry;
59421
- const row = [key, stringify$6(data), metadata ? stringify$6(metadata) : null];
59431
+ const row = [key, stringify$7(data), metadata ? stringify$7(metadata) : null];
59422
59432
  rows.push(row);
59423
59433
  return rows;
59424
59434
  }, []),
@@ -59428,10 +59438,10 @@
59428
59438
  return sqliteResult.rows.reduce((entries, row) => {
59429
59439
  const [key, stringifiedData, stringifiedMetadata] = row;
59430
59440
  const durableStoreEntry = {
59431
- data: parse$6(stringifiedData),
59441
+ data: parse$7(stringifiedData),
59432
59442
  };
59433
59443
  if (stringifiedMetadata !== null) {
59434
- durableStoreEntry.metadata = parse$6(stringifiedMetadata);
59444
+ durableStoreEntry.metadata = parse$7(stringifiedMetadata);
59435
59445
  }
59436
59446
  entries[key] = durableStoreEntry;
59437
59447
  return entries;
@@ -59441,95 +59451,21 @@
59441
59451
 
59442
59452
  // These const values must be in sync with the latest
59443
59453
  // @salesforce/nimbus-plugin-lds/sql schema file
59454
+ const TABLE_NAME$2 = 'lds_internal';
59444
59455
  const COLUMN_NAME_KEY$1 = 'key';
59445
59456
  const COLUMN_NAME_DATA$1 = 'data';
59446
- class AbstractKeyValueDataTable {
59447
- constructor(plugin, tableName) {
59448
- this.columnNames = [COLUMN_NAME_KEY$1, COLUMN_NAME_DATA$1];
59449
- this.conflictColumnNames = [COLUMN_NAME_KEY$1];
59450
- this.plugin = plugin;
59451
- this.tableName = tableName;
59452
- }
59453
- getByKeys(keys) {
59454
- return new Promise((resolve, reject) => {
59455
- const getQuery = selectColumnsFromTableWhereKeyIn(this.columnNames, this.tableName, COLUMN_NAME_KEY$1, keys);
59456
- this.plugin.query(getQuery, keys, (x) => {
59457
- resolve(this.mapToDurableEntries(x));
59458
- }, reject);
59459
- });
59460
- }
59461
- getAll() {
59462
- const getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName}`;
59463
- return new Promise((resolve, reject) => {
59464
- this.plugin.query(getAllQuery, [], (x) => {
59465
- resolve(this.mapToDurableEntries(x));
59466
- }, reject);
59467
- });
59468
- }
59469
- entriesToUpsertOperations(entries, segment) {
59470
- return {
59471
- type: 'upsert',
59472
- table: this.tableName,
59473
- keyColumn: COLUMN_NAME_KEY$1,
59474
- context: {
59475
- segment,
59476
- },
59477
- conflictColumns: this.conflictColumnNames,
59478
- columns: this.columnNames,
59479
- rows: keys$8(entries).reduce((rows, key) => {
59480
- const entry = entries[key];
59481
- rows.push([key, stringify$6(entry.data)]);
59482
- return rows;
59483
- }, []),
59484
- };
59485
- }
59486
- mapToDurableEntries(sqliteResult) {
59487
- return sqliteResult.rows.reduce((entries, row) => {
59488
- const [key, stringifiedData] = row;
59489
- const durableStoreEntry = {
59490
- data: parse$6(stringifiedData),
59491
- };
59492
- entries[key] = durableStoreEntry;
59493
- return entries;
59494
- }, {});
59495
- }
59496
- }
59497
-
59498
- // These const values must be in sync with the latest
59499
- // @salesforce/nimbus-plugin-lds/sql schema file
59500
- const TABLE_NAME$2 = 'lds_env_drafts';
59501
- class LdsDraftsDataTable extends AbstractKeyValueDataTable {
59502
- constructor(plugin) {
59503
- super(plugin, TABLE_NAME$2);
59504
- }
59505
- }
59506
-
59507
- // These const values must be in sync with the latest
59508
- // @salesforce/nimbus-plugin-lds/sql schema file
59509
- const TABLE_NAME$1 = 'lds_env_draft_id_map';
59510
- class LdsDraftIdMapDataTable extends AbstractKeyValueDataTable {
59511
- constructor(plugin) {
59512
- super(plugin, TABLE_NAME$1);
59513
- }
59514
- }
59515
-
59516
- // These const values must be in sync with the latest
59517
- // @salesforce/nimbus-plugin-lds/sql schema file
59518
- const TABLE_NAME = 'lds_internal';
59519
- const COLUMN_NAME_KEY = 'key';
59520
- const COLUMN_NAME_DATA = 'data';
59521
59457
  const COLUMN_NAME_METADATA = 'metadata';
59522
59458
  const COLUMN_NAME_NAMESPACE = 'namespace';
59523
59459
  class LdsInternalDataTable {
59524
59460
  constructor(plugin) {
59525
- this.tableName = TABLE_NAME;
59461
+ this.tableName = TABLE_NAME$2;
59526
59462
  this.columnNames = [
59527
- COLUMN_NAME_KEY,
59528
- COLUMN_NAME_DATA,
59463
+ COLUMN_NAME_KEY$1,
59464
+ COLUMN_NAME_DATA$1,
59529
59465
  COLUMN_NAME_METADATA,
59530
59466
  COLUMN_NAME_NAMESPACE,
59531
59467
  ];
59532
- this.conflictColumnNames = [COLUMN_NAME_KEY, COLUMN_NAME_NAMESPACE];
59468
+ this.conflictColumnNames = [COLUMN_NAME_KEY$1, COLUMN_NAME_NAMESPACE];
59533
59469
  this.getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName} WHERE ${COLUMN_NAME_NAMESPACE} = ?`;
59534
59470
  this.plugin = plugin;
59535
59471
  }
@@ -59537,7 +59473,7 @@
59537
59473
  if (namespace === undefined) {
59538
59474
  throw Error('LdsInternalDataTable requires namespace');
59539
59475
  }
59540
- const getQuery = selectColumnsFromTableWhereKeyInNamespaced(this.columnNames, this.tableName, COLUMN_NAME_KEY, keys, COLUMN_NAME_NAMESPACE);
59476
+ const getQuery = selectColumnsFromTableWhereKeyInNamespaced(this.columnNames, this.tableName, COLUMN_NAME_KEY$1, keys, COLUMN_NAME_NAMESPACE);
59541
59477
  return new Promise((resolve, reject) => {
59542
59478
  this.plugin.query(getQuery, [namespace].concat(keys), (x) => {
59543
59479
  resolve(this.mapToDurableEntries(x));
@@ -59555,18 +59491,18 @@
59555
59491
  return {
59556
59492
  type: 'upsert',
59557
59493
  table: this.tableName,
59558
- keyColumn: COLUMN_NAME_KEY,
59494
+ keyColumn: COLUMN_NAME_KEY$1,
59559
59495
  context: {
59560
59496
  segment,
59561
59497
  },
59562
59498
  conflictColumns: this.conflictColumnNames,
59563
59499
  columns: this.columnNames,
59564
- rows: keys$8(entries).reduce((rows, key) => {
59500
+ rows: keys$9(entries).reduce((rows, key) => {
59565
59501
  const entry = entries[key];
59566
59502
  const { data, metadata } = entry;
59567
- const row = [key, stringify$6(data)];
59503
+ const row = [key, stringify$7(data)];
59568
59504
  if (metadata) {
59569
- row.push(stringify$6(metadata));
59505
+ row.push(stringify$7(metadata));
59570
59506
  }
59571
59507
  else {
59572
59508
  row.push(null);
@@ -59581,10 +59517,10 @@
59581
59517
  return sqliteResult.rows.reduce((entries, row) => {
59582
59518
  const [key, stringifiedData, stringifiedMetadata] = row;
59583
59519
  const durableStoreEntry = {
59584
- data: parse$6(stringifiedData),
59520
+ data: parse$7(stringifiedData),
59585
59521
  };
59586
59522
  if (stringifiedMetadata !== null) {
59587
- durableStoreEntry.metadata = parse$6(stringifiedMetadata);
59523
+ durableStoreEntry.metadata = parse$7(stringifiedMetadata);
59588
59524
  }
59589
59525
  entries[key] = durableStoreEntry;
59590
59526
  return entries;
@@ -59593,13 +59529,12 @@
59593
59529
  }
59594
59530
 
59595
59531
  class NimbusSqliteStore {
59596
- constructor(plugin) {
59532
+ constructor(plugin, additionalTableMap = {}) {
59597
59533
  this.plugin = plugin;
59598
59534
  this.internalDataTable = new LdsInternalDataTable(plugin);
59599
59535
  this.dataTableMap = {
59536
+ ...additionalTableMap,
59600
59537
  [DefaultDurableSegment]: new LdsDataTable(plugin),
59601
- [DRAFT_SEGMENT]: new LdsDraftsDataTable(plugin),
59602
- [DRAFT_ID_MAPPINGS_SEGMENT]: new LdsDraftIdMapDataTable(plugin),
59603
59538
  };
59604
59539
  }
59605
59540
  isEvalSupported() {
@@ -59696,11 +59631,90 @@
59696
59631
  }
59697
59632
  }
59698
59633
 
59634
+ // These const values must be in sync with the latest
59635
+ // @salesforce/nimbus-plugin-lds/sql schema file
59636
+ const COLUMN_NAME_KEY = 'key';
59637
+ const COLUMN_NAME_DATA = 'data';
59638
+ class AbstractKeyValueDataTable {
59639
+ constructor(plugin, tableName) {
59640
+ this.columnNames = [COLUMN_NAME_KEY, COLUMN_NAME_DATA];
59641
+ this.conflictColumnNames = [COLUMN_NAME_KEY];
59642
+ this.plugin = plugin;
59643
+ this.tableName = tableName;
59644
+ }
59645
+ getByKeys(keys) {
59646
+ return new Promise((resolve, reject) => {
59647
+ const getQuery = selectColumnsFromTableWhereKeyIn(this.columnNames, this.tableName, COLUMN_NAME_KEY, keys);
59648
+ this.plugin.query(getQuery, keys, (x) => {
59649
+ resolve(this.mapToDurableEntries(x));
59650
+ }, reject);
59651
+ });
59652
+ }
59653
+ getAll() {
59654
+ const getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName}`;
59655
+ return new Promise((resolve, reject) => {
59656
+ this.plugin.query(getAllQuery, [], (x) => {
59657
+ resolve(this.mapToDurableEntries(x));
59658
+ }, reject);
59659
+ });
59660
+ }
59661
+ entriesToUpsertOperations(entries, segment) {
59662
+ return {
59663
+ type: 'upsert',
59664
+ table: this.tableName,
59665
+ keyColumn: COLUMN_NAME_KEY,
59666
+ context: {
59667
+ segment,
59668
+ },
59669
+ conflictColumns: this.conflictColumnNames,
59670
+ columns: this.columnNames,
59671
+ rows: keys$9(entries).reduce((rows, key) => {
59672
+ const entry = entries[key];
59673
+ rows.push([key, stringify$7(entry.data)]);
59674
+ return rows;
59675
+ }, []),
59676
+ };
59677
+ }
59678
+ mapToDurableEntries(sqliteResult) {
59679
+ return sqliteResult.rows.reduce((entries, row) => {
59680
+ const [key, stringifiedData] = row;
59681
+ const durableStoreEntry = {
59682
+ data: parse$7(stringifiedData),
59683
+ };
59684
+ entries[key] = durableStoreEntry;
59685
+ return entries;
59686
+ }, {});
59687
+ }
59688
+ }
59689
+
59690
+ // These const values must be in sync with the latest
59691
+ // @salesforce/nimbus-plugin-lds/sql schema file
59692
+ const TABLE_NAME$1 = 'lds_env_drafts';
59693
+ class LdsDraftsDataTable extends AbstractKeyValueDataTable {
59694
+ constructor(plugin) {
59695
+ super(plugin, TABLE_NAME$1);
59696
+ }
59697
+ }
59698
+
59699
+ // These const values must be in sync with the latest
59700
+ // @salesforce/nimbus-plugin-lds/sql schema file
59701
+ const TABLE_NAME = 'lds_env_draft_id_map';
59702
+ class LdsDraftIdMapDataTable extends AbstractKeyValueDataTable {
59703
+ constructor(plugin) {
59704
+ super(plugin, TABLE_NAME);
59705
+ }
59706
+ }
59707
+
59699
59708
  // so eslint doesn't complain about nimbus
59700
59709
  let baseDurableStore;
59701
- function getNimbusDurableStore() {
59710
+ function getNimbusDurableStore(plugin) {
59702
59711
  if (baseDurableStore === undefined) {
59703
- baseDurableStore = new NimbusSqliteStore(__nimbus.plugins.LdsSqliteStore);
59712
+ const resolvedPlugin = plugin === undefined ? __nimbus.plugins.LdsSqliteStore : plugin;
59713
+ const draftDataTableMap = {
59714
+ [DRAFT_SEGMENT]: new LdsDraftsDataTable(resolvedPlugin),
59715
+ [DRAFT_ID_MAPPINGS_SEGMENT]: new LdsDraftIdMapDataTable(resolvedPlugin),
59716
+ };
59717
+ baseDurableStore = new NimbusSqliteStore(resolvedPlugin, draftDataTableMap);
59704
59718
  }
59705
59719
  return baseDurableStore;
59706
59720
  }
@@ -59841,7 +59855,7 @@
59841
59855
  }
59842
59856
  return environment.applyCachePolicy(luvio, adapterRequestContext, buildSnapshotContext, localBuildCachedSnapshot, buildNetworkSnapshot);
59843
59857
  };
59844
- return create$6(environment, {
59858
+ return create$1$1(environment, {
59845
59859
  rebuildSnapshot: { value: rebuildSnapshot },
59846
59860
  applyCachePolicy: { value: applyCachePolicy },
59847
59861
  setDefaultCachePolicy: { value: environment.setDefaultCachePolicy.bind(environment) },
@@ -59886,7 +59900,7 @@
59886
59900
  // eslint-disable-next-line no-undef
59887
59901
  globalThis.luvio = luvio;
59888
59902
  registerReportObserver((report) => {
59889
- __nimbus.plugins.LdsInspectorPlugin.sendAdapterReport(stringify$6(report));
59903
+ __nimbus.plugins.LdsInspectorPlugin.sendAdapterReport(stringify$1$1(report));
59890
59904
  });
59891
59905
  }
59892
59906
  }
@@ -60727,7 +60741,7 @@
60727
60741
  id: '@salesforce/lds-network-adapter',
60728
60742
  instrument: instrument$1,
60729
60743
  });
60730
- // version: 1.198.0-ead7de735
60744
+ // version: 1.199.1-4bf260c39
60731
60745
 
60732
60746
  const { create: create$2, keys: keys$2 } = Object;
60733
60747
  const { stringify: stringify$1, parse: parse$1 } = JSON;
@@ -77018,7 +77032,7 @@
77018
77032
  // Make a copy of the config before running transform to avoid mutating the original config
77019
77033
  const adapterConfigCopy = {
77020
77034
  ...config,
77021
- query: parse$8(print(config.query))
77035
+ query: parse$9(print(config.query))
77022
77036
  };
77023
77037
  return {
77024
77038
  ...adapterConfigCopy,
@@ -77558,7 +77572,7 @@
77558
77572
  const batchQueryTransformed = config.batchQuery.map((singleConfig) => {
77559
77573
  return {
77560
77574
  ...singleConfig,
77561
- query: applyMinimumFieldsToQuery(parse$8(print(singleConfig.query))), // Stringifies and parses again to avoid mutating original. Should we just JSON.stringify to avoid the dependency on the parser?
77575
+ query: applyMinimumFieldsToQuery(parse$9(print(singleConfig.query))), // Stringifies and parses again to avoid mutating original. Should we just JSON.stringify to avoid the dependency on the parser?
77562
77576
  };
77563
77577
  });
77564
77578
  return {
@@ -78070,7 +78084,7 @@
78070
78084
  configuration: { ...configurationForGraphQLAdapters },
78071
78085
  instrument,
78072
78086
  });
78073
- // version: 1.198.0-caa871e32
78087
+ // version: 1.199.1-844bcf9ee
78074
78088
 
78075
78089
  // On core the unstable adapters are re-exported with different names,
78076
78090
 
@@ -80317,7 +80331,7 @@
80317
80331
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
80318
80332
  graphQLImperative = ldsAdapter;
80319
80333
  });
80320
- // version: 1.198.0-caa871e32
80334
+ // version: 1.199.1-844bcf9ee
80321
80335
 
80322
80336
  var gqlApi = /*#__PURE__*/Object.freeze({
80323
80337
  __proto__: null,
@@ -81023,4 +81037,4 @@
81023
81037
  Object.defineProperty(exports, '__esModule', { value: true });
81024
81038
 
81025
81039
  }));
81026
- // version: 1.198.0-ead7de735
81040
+ // version: 1.199.1-4bf260c39