@salesforce/lds-worker-api 1.199.0 → 1.200.0

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.199.0-017661a18
3808
+ // version: 1.200.0-c4cb94fd9
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.199.0-017661a18
15241
+ // version: 1.200.0-c4cb94fd9
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.199.0-017661a18
16154
+ // version: 1.200.0-c4cb94fd9
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];
@@ -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) {
@@ -24891,7 +24891,7 @@
24891
24891
  const lookupFields = {};
24892
24892
  const { apiName, fields: recordFields } = record;
24893
24893
  const { fields: objectInfoFields } = objectInfo;
24894
- const objectInfoFieldNames = keys$9(objectInfoFields);
24894
+ const objectInfoFieldNames = keys$a(objectInfoFields);
24895
24895
  for (let i = 0, len = objectInfoFieldNames.length; i < len; i += 1) {
24896
24896
  const fieldName = objectInfoFieldNames[i];
24897
24897
  const field = objectInfoFields[fieldName];
@@ -24910,12 +24910,12 @@
24910
24910
  const nameField = `${apiName}.${relationshipName}.${getNameField(objectInfo, fieldName)}`;
24911
24911
  lookupFields[nameField] = true;
24912
24912
  }
24913
- return keys$9(lookupFields);
24913
+ return keys$a(lookupFields);
24914
24914
  }
24915
24915
  function getRecordUiMissingRecordLookupFields(recordUi) {
24916
24916
  const { records, objectInfos } = recordUi;
24917
24917
  const recordLookupFields = {};
24918
- const recordIds = keys$9(records);
24918
+ const recordIds = keys$a(records);
24919
24919
  for (let i = 0, len = recordIds.length; i < len; i += 1) {
24920
24920
  const recordId = recordIds[i];
24921
24921
  const recordData = records[recordId];
@@ -24953,19 +24953,19 @@
24953
24953
  }
24954
24954
  function eachLayout(recordUi, cb) {
24955
24955
  const { layouts } = recordUi;
24956
- const layoutApiNames = keys$9(layouts);
24956
+ const layoutApiNames = keys$a(layouts);
24957
24957
  for (let a = 0, len = layoutApiNames.length; a < len; a += 1) {
24958
24958
  const apiName = layoutApiNames[a];
24959
24959
  const apiNameData = layouts[apiName];
24960
- const recordTypeIds = keys$9(apiNameData);
24960
+ const recordTypeIds = keys$a(apiNameData);
24961
24961
  for (let b = 0, recordTypeIdsLen = recordTypeIds.length; b < recordTypeIdsLen; b += 1) {
24962
24962
  const recordTypeId = recordTypeIds[b];
24963
24963
  const recordTypeData = apiNameData[recordTypeId];
24964
- const layoutTypes = keys$9(recordTypeData);
24964
+ const layoutTypes = keys$a(recordTypeData);
24965
24965
  for (let c = 0, layoutTypesLen = layoutTypes.length; c < layoutTypesLen; c += 1) {
24966
24966
  const layoutType = layoutTypes[c];
24967
24967
  const layoutTypeData = recordTypeData[layoutType];
24968
- const modes = keys$9(layoutTypeData);
24968
+ const modes = keys$a(layoutTypeData);
24969
24969
  for (let d = 0, modesLen = modes.length; d < modesLen; d += 1) {
24970
24970
  const mode = modes[d];
24971
24971
  const layout = layoutTypeData[mode];
@@ -25041,7 +25041,7 @@
25041
25041
  // we have to run ingest code and look at the resulting snapshot's seenRecords.
25042
25042
  function getCacheKeys(keySet, luvio, config, key, originalResponseBody) {
25043
25043
  const { recordIds, layoutTypes, modes } = config;
25044
- const responseBody = parse$7(stringify$7(originalResponseBody));
25044
+ const responseBody = parse$8(stringify$8(originalResponseBody));
25045
25045
  eachLayout(responseBody, (apiName, recordTypeId, layout) => {
25046
25046
  if (layout.id === null) {
25047
25047
  return;
@@ -25171,14 +25171,14 @@
25171
25171
  function publishDependencies(luvio, recordIds, depKeys) {
25172
25172
  for (let i = 0, len = recordIds.length; i < len; i += 1) {
25173
25173
  const recordDepKey = dependencyKeyBuilder({ recordId: recordIds[i] });
25174
- const dependencies = create$7(null);
25174
+ const dependencies = create$8(null);
25175
25175
  for (let j = 0, len = depKeys.length; j < len; j++) {
25176
25176
  dependencies[depKeys[j]] = true;
25177
25177
  }
25178
25178
  const node = luvio.getNode(recordDepKey);
25179
25179
  if (isGraphNode(node)) {
25180
25180
  const recordDeps = node.retrieve();
25181
- assign$7(dependencies, recordDeps);
25181
+ assign$8(dependencies, recordDeps);
25182
25182
  }
25183
25183
  luvio.storePublish(recordDepKey, dependencies);
25184
25184
  }
@@ -25361,11 +25361,11 @@
25361
25361
  ];
25362
25362
  function getFieldsFromLayoutMap(layoutMap, objectInfo) {
25363
25363
  let fields = [];
25364
- const layoutTypes = keys$9(layoutMap);
25364
+ const layoutTypes = keys$a(layoutMap);
25365
25365
  for (let i = 0, layoutTypesLen = layoutTypes.length; i < layoutTypesLen; i += 1) {
25366
25366
  const layoutType = layoutTypes[i];
25367
25367
  const modesMap = layoutMap[layoutType];
25368
- const modes = keys$9(modesMap);
25368
+ const modes = keys$a(modesMap);
25369
25369
  for (let m = 0, modesLen = modes.length; m < modesLen; m += 1) {
25370
25370
  const mode = modes[m];
25371
25371
  const modeKeys = getQualifiedFieldApiNamesFromLayout(modesMap[mode], objectInfo);
@@ -25379,7 +25379,7 @@
25379
25379
  return getRecord$1(luvio, refresh, recordId, fields, configOptionalFields);
25380
25380
  }
25381
25381
  function getRecordForNonLayoutableEntities(luvio, adapterContext, refresh, recordId, objectInfo, configOptionalFields, configFields) {
25382
- const fields = keys$9(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
25382
+ const fields = keys$a(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
25383
25383
  // W-12697744
25384
25384
  // Set the implicit fields received from the server in adapter context
25385
25385
  // This ensures that the implicit fields are available when data is read locally or from durable store
@@ -25607,7 +25607,7 @@
25607
25607
  }
25608
25608
  const { layoutType, mode, snapshot } = container;
25609
25609
  if (wrapper.layoutMap[layoutType] === undefined) {
25610
- wrapper.layoutMap = assign$7({}, wrapper.layoutMap, {
25610
+ wrapper.layoutMap = assign$8({}, wrapper.layoutMap, {
25611
25611
  [layoutType]: {},
25612
25612
  });
25613
25613
  }
@@ -34629,7 +34629,7 @@
34629
34629
  }
34630
34630
  }
34631
34631
  if (records.length > 0) {
34632
- assign$7(config, { records });
34632
+ assign$8(config, { records });
34633
34633
  }
34634
34634
  }
34635
34635
  return config;
@@ -40598,7 +40598,7 @@
40598
40598
  });
40599
40599
  }
40600
40600
  function clone$2(userLayoutState) {
40601
- return parse$7(stringify$7(userLayoutState));
40601
+ return parse$8(stringify$8(userLayoutState));
40602
40602
  }
40603
40603
  // Applies optimisticUpdate to layoutUserState
40604
40604
  // If the optimistic update can be applied, returns RecordLayoutUserStateRepresentation
@@ -40610,7 +40610,7 @@
40610
40610
  let clonedLayoutUserStateSections;
40611
40611
  const { sectionUserStates } = layoutUserStateInput;
40612
40612
  const { sectionUserStates: cachedSectionUserStates } = cachedLayoutUserState;
40613
- const sectionUserStateKeys = keys$9(sectionUserStates);
40613
+ const sectionUserStateKeys = keys$a(sectionUserStates);
40614
40614
  for (let i = 0, len = sectionUserStateKeys.length; i < len; i += 1) {
40615
40615
  const sectionId = sectionUserStateKeys[i];
40616
40616
  if (cachedSectionUserStates[sectionId] === undefined) {
@@ -40633,7 +40633,7 @@
40633
40633
  const config = validateAdapterConfig$E(untrusted, getLayoutUserState_ConfigPropertyNames);
40634
40634
  if (config === null) {
40635
40635
  // eslint-disable-next-line @salesforce/lds/no-error-in-production
40636
- throw new Error(`@wire(updateLayoutUserState) invalid configuration ${stringify$7(untrusted)}`);
40636
+ throw new Error(`@wire(updateLayoutUserState) invalid configuration ${stringify$8(untrusted)}`);
40637
40637
  }
40638
40638
  // This will throw if layoutUserStateInput is not a valid input
40639
40639
  validate$7(layoutUserStateInput, 'layoutUserStateInput');
@@ -44514,7 +44514,7 @@
44514
44514
  });
44515
44515
  throttle(60, 60000, createLDSAdapter(luvio, 'notifyListViewSummaryUpdateAvailable', notifyUpdateAvailableFactory));
44516
44516
  });
44517
- // version: 1.199.0-66586ec50
44517
+ // version: 1.200.0-dab735b42
44518
44518
 
44519
44519
  var caseSensitiveUserId = '005B0000000GR4OIAW';
44520
44520
 
@@ -44646,10 +44646,10 @@
44646
44646
  * For full license text, see the LICENSE.txt file
44647
44647
  */
44648
44648
 
44649
- const { parse: parse$5, stringify: stringify$5 } = JSON;
44649
+ const { parse: parse$6, stringify: stringify$6 } = JSON;
44650
44650
  const { join: join$2, push: push$2, unshift } = Array.prototype;
44651
44651
  const { isArray: isArray$5 } = Array;
44652
- const { entries: entries$3, keys: keys$7 } = Object;
44652
+ const { entries: entries$4, keys: keys$8 } = Object;
44653
44653
 
44654
44654
  const UI_API_BASE_URI = '/services/data/v59.0/ui-api';
44655
44655
 
@@ -44714,7 +44714,7 @@
44714
44714
  function mergeRecordFields$1(first, second) {
44715
44715
  const { fields: targetFields } = first;
44716
44716
  const { fields: sourceFields } = second;
44717
- const fieldNames = keys$7(sourceFields);
44717
+ const fieldNames = keys$8(sourceFields);
44718
44718
  for (let i = 0, len = fieldNames.length; i < len; i += 1) {
44719
44719
  const fieldName = fieldNames[i];
44720
44720
  const sourceField = sourceFields[fieldName];
@@ -44944,10 +44944,10 @@
44944
44944
  const { resourceRequest } = req;
44945
44945
  const { baseUri, basePath, queryParams, headers } = resourceRequest;
44946
44946
  const path = `${baseUri}${basePath}`;
44947
- const queryParamsString = queryParams ? stringify$5(queryParams) : EMPTY_STRING;
44948
- const headersString = stringify$5(headers);
44947
+ const queryParamsString = queryParams ? stringify$6(queryParams) : EMPTY_STRING;
44948
+ const headersString = stringify$6(headers);
44949
44949
  const bodyString = resourceRequest.body && isResourceRequestDedupable(req)
44950
- ? stringify$5(resourceRequest.body)
44950
+ ? stringify$6(resourceRequest.body)
44951
44951
  : EMPTY_STRING;
44952
44952
  return `${path}${TRANSACTION_KEY_SEP}${headersString}${TRANSACTION_KEY_SEP}${queryParamsString}${bodyString}`;
44953
44953
  }
@@ -44956,7 +44956,7 @@
44956
44956
  if (fulfill === undefined) {
44957
44957
  return null;
44958
44958
  }
44959
- const handlersMap = entries$3(inflightRequests);
44959
+ const handlersMap = entries$4(inflightRequests);
44960
44960
  for (let i = 0, len = handlersMap.length; i < len; i += 1) {
44961
44961
  const [transactionKey, handlers] = handlersMap[i];
44962
44962
  // check fulfillment against only the first handler ([0]) because it's equal or
@@ -45013,7 +45013,7 @@
45013
45013
  // extra clone (particularly when there's only 1 handler).
45014
45014
  for (let i = 1, len = handlers.length; i < len; i++) {
45015
45015
  const handler = handlers[i];
45016
- handler.resolve(parse$5(stringify$5(response)));
45016
+ handler.resolve(parse$6(stringify$6(response)));
45017
45017
  }
45018
45018
  handlers[0].resolve(response);
45019
45019
  }, (error) => {
@@ -45119,7 +45119,7 @@
45119
45119
  const DefaultDurableSegment = 'DEFAULT';
45120
45120
  const RedirectDurableSegment = 'REDIRECT_KEYS';
45121
45121
 
45122
- 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;
45123
45123
 
45124
45124
  //Durable store error instrumentation key
45125
45125
  const DURABLE_STORE_ERROR = 'durable-store-error';
@@ -45163,7 +45163,7 @@
45163
45163
  if (durableRecords === undefined) {
45164
45164
  return { revivedKeys, hadUnexpectedShape };
45165
45165
  }
45166
- const durableKeys = keys$6(durableRecords);
45166
+ const durableKeys = keys$7(durableRecords);
45167
45167
  if (durableKeys.length === 0) {
45168
45168
  // no records to revive
45169
45169
  return { revivedKeys, hadUnexpectedShape };
@@ -45337,7 +45337,7 @@
45337
45337
  overrides,
45338
45338
  };
45339
45339
  }
45340
- const keys$1 = keys$6(entries);
45340
+ const keys$1 = keys$7(entries);
45341
45341
  for (let i = 0, len = keys$1.length; i < len; i++) {
45342
45342
  const key = keys$1[i];
45343
45343
  const entry = entries[key];
@@ -45359,13 +45359,13 @@
45359
45359
  }
45360
45360
 
45361
45361
  function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler, redirects, additionalDurableStoreOperations = []) {
45362
- const durableRecords = create$5(null);
45363
- const evictedRecords = create$5(null);
45362
+ const durableRecords = create$6(null);
45363
+ const evictedRecords = create$6(null);
45364
45364
  const { records, metadata: storeMetadata, visitedIds, refreshedIds, } = store.fallbackStringKeyInMemoryStore;
45365
45365
  // TODO: W-8909393 Once metadata is stored in its own segment we need to
45366
45366
  // call setEntries for the visitedIds on default segment and call setEntries
45367
45367
  // on the metadata segment for the refreshedIds
45368
- const keys$1 = keys$6({ ...visitedIds, ...refreshedIds });
45368
+ const keys$1 = keys$7({ ...visitedIds, ...refreshedIds });
45369
45369
  for (let i = 0, len = keys$1.length; i < len; i += 1) {
45370
45370
  const key = keys$1[i];
45371
45371
  const record = records[key];
@@ -45387,7 +45387,7 @@
45387
45387
  }
45388
45388
  const durableStoreOperations = additionalDurableStoreOperations;
45389
45389
  // publishes
45390
- const recordKeys = keys$6(durableRecords);
45390
+ const recordKeys = keys$7(durableRecords);
45391
45391
  if (recordKeys.length > 0) {
45392
45392
  durableStoreOperations.push({
45393
45393
  type: 'setEntries',
@@ -45408,7 +45408,7 @@
45408
45408
  });
45409
45409
  });
45410
45410
  // evicts
45411
- const evictedKeys = keys$6(evictedRecords);
45411
+ const evictedKeys = keys$7(evictedRecords);
45412
45412
  if (evictedKeys.length > 0) {
45413
45413
  durableStoreOperations.push({
45414
45414
  type: 'evictEntries',
@@ -45469,7 +45469,7 @@
45469
45469
  const ADAPTER_CONTEXT_ID_SUFFIX = '__NAMED_CONTEXT';
45470
45470
  async function reviveOrCreateContext(adapterId, durableStore, durableStoreErrorHandler, contextStores, pendingContextStoreKeys, onContextLoaded) {
45471
45471
  // initialize empty context store
45472
- contextStores[adapterId] = create$5(null);
45472
+ contextStores[adapterId] = create$6(null);
45473
45473
  const context = {
45474
45474
  set(key, value) {
45475
45475
  contextStores[adapterId][key] = value;
@@ -45530,7 +45530,7 @@
45530
45530
  const pendingContextStoreKeys = new Set();
45531
45531
  // redirects that need to be flushed to the durable store
45532
45532
  const pendingStoreRedirects = new Map();
45533
- const contextStores = create$5(null);
45533
+ const contextStores = create$6(null);
45534
45534
  let initializationPromise = new Promise((resolve) => {
45535
45535
  const finish = () => {
45536
45536
  resolve();
@@ -45597,7 +45597,7 @@
45597
45597
  try {
45598
45598
  const entries = await durableStore.getEntries(adapterContextKeysFromDifferentInstance, AdapterContextSegment);
45599
45599
  if (entries !== undefined) {
45600
- const entryKeys = keys$6(entries);
45600
+ const entryKeys = keys$7(entries);
45601
45601
  for (let i = 0, len = entryKeys.length; i < len; i++) {
45602
45602
  const entryKey = entryKeys[i];
45603
45603
  const entry = entries[entryKey];
@@ -45966,7 +45966,7 @@
45966
45966
  type: 'stale-while-revalidate',
45967
45967
  staleDurationSeconds: Number.MAX_SAFE_INTEGER,
45968
45968
  });
45969
- return create$5(environment, {
45969
+ return create$6(environment, {
45970
45970
  publishStoreMetadata: { value: publishStoreMetadata },
45971
45971
  storeIngest: { value: storeIngest },
45972
45972
  storeIngestError: { value: storeIngestError },
@@ -47205,7 +47205,7 @@
47205
47205
  }
47206
47206
 
47207
47207
  const { isArray: isArray$4 } = Array;
47208
- const { keys: keys$5 } = Object;
47208
+ const { keys: keys$6 } = Object;
47209
47209
 
47210
47210
  function isListValueNode(node) {
47211
47211
  return node.kind === 'ListValue';
@@ -48837,7 +48837,7 @@
48837
48837
  switch (valueNode.kind) {
48838
48838
  case Kind.OBJECT: {
48839
48839
  // For example, `{ Id: { eq: $draftId } }` is a `ObjectValueNode`, which has field keys 'Id'
48840
- const resultQuery = keys$5(valueNode.fields)
48840
+ const resultQuery = keys$6(valueNode.fields)
48841
48841
  .map((key) => generateVariableSubQuery(valueNode.fields[key], key, type, variables))
48842
48842
  .filter((subquery) => subquery.length > 0)
48843
48843
  .join(',');
@@ -48913,7 +48913,7 @@
48913
48913
  }
48914
48914
  function swapValueNodeWithVariableNodes(original, swapped) {
48915
48915
  if (original.kind === Kind.OBJECT) {
48916
- for (const key of keys$5(original.fields)) {
48916
+ for (const key of keys$6(original.fields)) {
48917
48917
  if (isObjectValueNode$1(swapped) && swapped.fields[key]) {
48918
48918
  if (is(original.fields[key], 'Variable')) {
48919
48919
  original.fields[key] = swapped.fields[key];
@@ -49495,12 +49495,12 @@
49495
49495
  return new DraftErrorFetchResponse(HttpStatusCode$1.BadRequest, error);
49496
49496
  }
49497
49497
 
49498
- const { keys: keys$4, create: create$4, assign: assign$4, values: values$2 } = Object;
49499
- 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;
49500
49500
  const { isArray: isArray$3 } = Array;
49501
49501
 
49502
49502
  function clone$1(obj) {
49503
- return parse$4(stringify$4(obj));
49503
+ return parse$5(stringify$5(obj));
49504
49504
  }
49505
49505
 
49506
49506
  /**
@@ -49607,13 +49607,13 @@
49607
49607
  }
49608
49608
  softEvict(key);
49609
49609
  };
49610
- return create$4(luvio, {
49610
+ return create$5(luvio, {
49611
49611
  dispatchResourceRequest: { value: dispatchResourceRequest },
49612
49612
  publishStoreMetadata: { value: publishStoreMetadata },
49613
49613
  storeEvict: { value: storeEvict },
49614
49614
  });
49615
49615
  }
49616
- return create$4(luvio, {
49616
+ return create$5(luvio, {
49617
49617
  dispatchResourceRequest: { value: dispatchResourceRequest },
49618
49618
  publishStoreMetadata: { value: publishStoreMetadata },
49619
49619
  });
@@ -49647,7 +49647,7 @@
49647
49647
  if (entries === undefined) {
49648
49648
  return mappings;
49649
49649
  }
49650
- const keys$1 = keys$4(entries);
49650
+ const keys$1 = keys$5(entries);
49651
49651
  for (const key of keys$1) {
49652
49652
  const entry = entries[key].data;
49653
49653
  if (isLegacyDraftIdMapping(key)) {
@@ -49665,7 +49665,7 @@
49665
49665
  async function clearDraftIdSegment(durableStore) {
49666
49666
  const entries = await durableStore.getAllEntries(DRAFT_ID_MAPPINGS_SEGMENT);
49667
49667
  if (entries) {
49668
- const keys$1 = keys$4(entries);
49668
+ const keys$1 = keys$5(entries);
49669
49669
  if (keys$1.length > 0) {
49670
49670
  await durableStore.evictEntries(keys$1, DRAFT_ID_MAPPINGS_SEGMENT);
49671
49671
  }
@@ -50072,7 +50072,7 @@
50072
50072
  return this.replaceOrMergeActions(targetActionId, sourceActionId, true);
50073
50073
  }
50074
50074
  async setMetadata(actionId, metadata) {
50075
- const keys$1 = keys$4(metadata);
50075
+ const keys$1 = keys$5(metadata);
50076
50076
  const compatibleKeys = keys$1.filter((key) => {
50077
50077
  const value = metadata[key];
50078
50078
  return typeof key === 'string' && typeof value === 'string';
@@ -50222,7 +50222,7 @@
50222
50222
  const waitForOngoingSync = this.syncPromise || Promise.resolve();
50223
50223
  return waitForOngoingSync.then(() => {
50224
50224
  const { draftStore } = this;
50225
- const keys$1 = keys$4(draftStore);
50225
+ const keys$1 = keys$5(draftStore);
50226
50226
  const actionArray = [];
50227
50227
  for (let i = 0, len = keys$1.length; i < len; i++) {
50228
50228
  const key = keys$1[i];
@@ -50246,7 +50246,7 @@
50246
50246
  deleteByTag(tag) {
50247
50247
  const deleteAction = () => {
50248
50248
  const { draftStore } = this;
50249
- const keys$1 = keys$4(draftStore);
50249
+ const keys$1 = keys$5(draftStore);
50250
50250
  const durableKeys = [];
50251
50251
  for (let i = 0, len = keys$1.length; i < len; i++) {
50252
50252
  const key = keys$1[i];
@@ -50336,7 +50336,7 @@
50336
50336
  return this.runQueuedOperations();
50337
50337
  }
50338
50338
  const { draftStore } = this;
50339
- const keys$1 = keys$4(durableEntries);
50339
+ const keys$1 = keys$5(durableEntries);
50340
50340
  for (let i = 0, len = keys$1.length; i < len; i++) {
50341
50341
  const entry = durableEntries[keys$1[i]];
50342
50342
  const action = entry.data;
@@ -50506,7 +50506,7 @@
50506
50506
  let updatedActionTargetId = undefined;
50507
50507
  const { tag: queueActionTag, data: queueActionRequest, id: queueActionId, } = queueAction;
50508
50508
  let { basePath, body } = queueActionRequest;
50509
- let stringifiedBody = stringify$4(body);
50509
+ let stringifiedBody = stringify$5(body);
50510
50510
  // for each redirected ID/key we loop over the operation to see if it needs
50511
50511
  // to be updated
50512
50512
  for (const { draftId, draftKey, canonicalId, canonicalKey } of redirects) {
@@ -50531,7 +50531,7 @@
50531
50531
  data: {
50532
50532
  ...queueActionRequest,
50533
50533
  basePath: basePath,
50534
- body: parse$4(stringifiedBody),
50534
+ body: parse$5(stringifiedBody),
50535
50535
  },
50536
50536
  };
50537
50537
  // item needs to be replaced with a new item at the new record key
@@ -50550,7 +50550,7 @@
50550
50550
  data: {
50551
50551
  ...queueActionRequest,
50552
50552
  basePath: basePath,
50553
- body: parse$4(stringifiedBody),
50553
+ body: parse$5(stringifiedBody),
50554
50554
  },
50555
50555
  };
50556
50556
  // item needs to be updated
@@ -50960,7 +50960,7 @@
50960
50960
  // We should always return an array, if the body is just a dictionary,
50961
50961
  // stick it in an array
50962
50962
  const body = isArray$3(action.error.body) ? action.error.body : [action.error.body];
50963
- const bodyString = stringify$4(body);
50963
+ const bodyString = stringify$5(body);
50964
50964
  item.error = {
50965
50965
  status: action.error.status || 0,
50966
50966
  ok: action.error.ok || false,
@@ -51125,7 +51125,7 @@
51125
51125
  decrementRefCount(key);
51126
51126
  };
51127
51127
  // note the makeEnvironmentUiApiRecordDraftAware will eventually go away once the adapters become draft aware
51128
- return create$4(env, {
51128
+ return create$5(env, {
51129
51129
  storePublish: { value: storePublish },
51130
51130
  handleSuccessResponse: { value: handleSuccessResponse },
51131
51131
  softEvict: { value: softEvict },
@@ -51406,8 +51406,8 @@
51406
51406
  (x.length === 0 || (x.length > 0 && Object.prototype.hasOwnProperty.call(x, x.length - 1))));
51407
51407
  }
51408
51408
 
51409
- const { create: create$3, keys: keys$3, values: values$1, entries: entries$2, assign: assign$3 } = Object;
51410
- 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;
51411
51411
  const { isArray: isArray$2 } = Array;
51412
51412
 
51413
51413
  function recordLoaderFactory(query) {
@@ -51419,7 +51419,7 @@
51419
51419
  rows.forEach((row) => {
51420
51420
  if (!row[0])
51421
51421
  return null;
51422
- const record = parse$3(row[0]);
51422
+ const record = parse$4(row[0]);
51423
51423
  if (record.id === id) {
51424
51424
  foundRow = record;
51425
51425
  }
@@ -51749,11 +51749,11 @@
51749
51749
  return dateTimeRange(range, operator, field, alias);
51750
51750
  }
51751
51751
  // eslint-disable-next-line @salesforce/lds/no-error-in-production
51752
- throw new Error(`Where filter ${stringify$3(input)} is not supported`);
51752
+ throw new Error(`Where filter ${stringify$4(input)} is not supported`);
51753
51753
  }
51754
51754
  function dateTimeRange(input, op, field, alias) {
51755
51755
  const dateFunction = field.dataType === 'DateTime' ? 'datetime' : 'date';
51756
- const key = keys$3(input)[0];
51756
+ const key = keys$4(input)[0];
51757
51757
  let operator = op;
51758
51758
  if (operator === '=')
51759
51759
  operator = 'BETWEEN';
@@ -51859,7 +51859,7 @@
51859
51859
  if (!where)
51860
51860
  return [];
51861
51861
  let predicates = [];
51862
- const fields = keys$3(where);
51862
+ const fields = keys$4(where);
51863
51863
  for (const field of fields) {
51864
51864
  if (field === 'and' || field === 'or') {
51865
51865
  predicates.push(processCompoundPredicate(field, where[field], recordType, alias, objectInfoMap, joins));
@@ -51908,7 +51908,7 @@
51908
51908
  }
51909
51909
  else {
51910
51910
  // @W-12618378 polymorphic query sometimes does not work as expected on server. The GQL on certain entities could fail.
51911
- const entityNames = keys$3(where[field]);
51911
+ const entityNames = keys$4(where[field]);
51912
51912
  const polyPredicatesGroups = entityNames
51913
51913
  .filter((entityName) => fieldInfo.referenceToInfos.some((referenceInfo) => referenceInfo.apiName === entityName))
51914
51914
  .map((entityName) => {
@@ -51938,7 +51938,7 @@
51938
51938
  }
51939
51939
  else {
51940
51940
  //`field` match the filedInfo's apiName
51941
- for (const [op, value] of entries$2(where[field])) {
51941
+ for (const [op, value] of entries$3(where[field])) {
51942
51942
  const operator = operatorToSql(op);
51943
51943
  /**
51944
51944
  Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
@@ -53048,7 +53048,7 @@
53048
53048
  if (typeof json !== 'object') {
53049
53049
  return currentLevel;
53050
53050
  }
53051
- const keys$1 = keys$3(json);
53051
+ const keys$1 = keys$4(json);
53052
53052
  if (keys$1.length === 0)
53053
53053
  return 0;
53054
53054
  const depths = keys$1.map((key) => {
@@ -53077,7 +53077,7 @@
53077
53077
  return predicates;
53078
53078
  const isSpanning = depth(orderBy) > 2;
53079
53079
  if (isSpanning) {
53080
- const keys$1 = keys$3(orderBy);
53080
+ const keys$1 = keys$4(orderBy);
53081
53081
  for (let i = 0, len = keys$1.length; i < len; i++) {
53082
53082
  const key = keys$1[i];
53083
53083
  const parentFields = objectInfoMap[recordType].fields;
@@ -53107,7 +53107,7 @@
53107
53107
  }
53108
53108
  }
53109
53109
  else {
53110
- const keys$1 = keys$3(orderBy);
53110
+ const keys$1 = keys$4(orderBy);
53111
53111
  for (let i = 0, len = keys$1.length; i < len; i++) {
53112
53112
  const key = keys$1[i];
53113
53113
  if (!objectInfoMap[recordType])
@@ -53341,7 +53341,7 @@
53341
53341
  if (field.name === 'node') {
53342
53342
  field.resolve = function nodeResolver(obj, _args, { seenRecordIds }) {
53343
53343
  const { record, ingestionTimestamp } = obj;
53344
- const recordRepresentation = parse$3(record);
53344
+ const recordRepresentation = parse$4(record);
53345
53345
  seenRecordIds.add(recordRepresentation.id);
53346
53346
  return { recordRepresentation, ingestionTimestamp };
53347
53347
  };
@@ -53559,7 +53559,7 @@
53559
53559
  variables,
53560
53560
  fragmentMap: {},
53561
53561
  });
53562
- 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');
53563
53563
  const argumentString = filteredArgumentNodes.length > 0
53564
53564
  ? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
53565
53565
  : '';
@@ -53614,7 +53614,7 @@
53614
53614
  * @returns Type definition string and entity type names which support polymorphism.
53615
53615
  */
53616
53616
  function generateTypeDefinitions(objectInfos) {
53617
- if (keys$3(objectInfos).length === 0)
53617
+ if (keys$4(objectInfos).length === 0)
53618
53618
  return { typeDefs: baseTypeDefinitions, polyFieldTypeNames: [] };
53619
53619
  const { recordQueries, recordConnections, polyFieldTypeNameArr } = generateRecordQueries(objectInfos);
53620
53620
  const typeDefs = `
@@ -54365,7 +54365,7 @@
54365
54365
  // eslint-disable-next-line
54366
54366
  throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
54367
54367
  }
54368
- if (keys$3(objectInfos).length < startNodes.size) {
54368
+ if (keys$4(objectInfos).length < startNodes.size) {
54369
54369
  // eslint-disable-next-line
54370
54370
  throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
54371
54371
  }
@@ -55322,7 +55322,7 @@
55322
55322
  // so we keep any other results that are not included in a record query
55323
55323
  const output = { ...result };
55324
55324
  const outputApiParent = output.data.uiapi.query;
55325
- const keys$1 = keys$3(nodeJson);
55325
+ const keys$1 = keys$4(nodeJson);
55326
55326
  keys$1.forEach((recordName) => {
55327
55327
  const outputApi = {};
55328
55328
  // Each connectionSelection's maps its name or alias to one of returned records. The record name could be `apiName' or alias
@@ -55342,7 +55342,7 @@
55342
55342
  * @param jsonOutput JsonObject which will be populated with properties. It would only contains properties defined in 'FieldNode'
55343
55343
  */
55344
55344
  function createUserJsonOutput(selection, jsonInput, jsonOutput) {
55345
- const keys$1 = keys$3(jsonInput);
55345
+ const keys$1 = keys$4(jsonInput);
55346
55346
  if (selection.selectionSet) {
55347
55347
  createjsonOutput(selection.selectionSet.selections, jsonInput, jsonOutput);
55348
55348
  }
@@ -55351,7 +55351,7 @@
55351
55351
  }
55352
55352
  }
55353
55353
  function createjsonOutput(selections, jsonInput, jsonOutput) {
55354
- const keys$1 = keys$3(jsonInput);
55354
+ const keys$1 = keys$4(jsonInput);
55355
55355
  selections.filter(isFieldNode).forEach((subSelection) => {
55356
55356
  const fieldName = subSelection.name.value;
55357
55357
  if (keys$1.includes(fieldName)) {
@@ -55411,8 +55411,8 @@
55411
55411
  * For full license text, see the LICENSE.txt file
55412
55412
  */
55413
55413
 
55414
- const { keys: keys$2$1, values, create: create$2$1, assign: assign$2, freeze: freeze$2 } = Object;
55415
- 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;
55416
55416
  const { shift } = Array.prototype;
55417
55417
  const { isArray: isArray$1$1 } = Array;
55418
55418
 
@@ -55478,7 +55478,7 @@
55478
55478
  */
55479
55479
  function filterOutReferenceFieldsAndLinks(record) {
55480
55480
  const filteredFields = {};
55481
- const fieldNames = keys$2$1(record.fields);
55481
+ const fieldNames = keys$3(record.fields);
55482
55482
  for (const fieldName of fieldNames) {
55483
55483
  const field = record.fields[fieldName];
55484
55484
  if (isFieldLink(field) === false) {
@@ -55579,7 +55579,7 @@
55579
55579
  const resolvedRequest = resolveResourceRequestIds(luvio, resourceRequest, canonicalKey);
55580
55580
  return env.dispatchResourceRequest(resolvedRequest, context, eventObservers);
55581
55581
  };
55582
- return create$2$1(env, {
55582
+ return create$3(env, {
55583
55583
  dispatchResourceRequest: { value: dispatchResourceRequest },
55584
55584
  });
55585
55585
  }
@@ -55757,7 +55757,7 @@
55757
55757
  return applyDraftsToBatchResponse(resourceRequest, response, removedDraftIds);
55758
55758
  }));
55759
55759
  };
55760
- return create$2$1(env, {
55760
+ return create$3(env, {
55761
55761
  dispatchResourceRequest: { value: dispatchResourceRequest },
55762
55762
  });
55763
55763
  }
@@ -55767,11 +55767,11 @@
55767
55767
  const adapterSpecificEnvironments = synthesizers.reduce((environment, synthesizer) => {
55768
55768
  return synthesizer(luvio, environment, options);
55769
55769
  }, env);
55770
- return create$2$1(adapterSpecificEnvironments, {});
55770
+ return create$3(adapterSpecificEnvironments, {});
55771
55771
  }
55772
55772
 
55773
55773
  function clone(obj) {
55774
- return parse$2(stringify$2(obj));
55774
+ return parse$3(stringify$3(obj));
55775
55775
  }
55776
55776
 
55777
55777
  const DEFAULT_FIELD_CREATED_BY_ID = 'CreatedById';
@@ -55894,7 +55894,7 @@
55894
55894
  LastModifiedDate: lastModifiedDate,
55895
55895
  };
55896
55896
  const draftFields = buildRecordFieldValueRepresentationsFromDraftFields(luvio, apiName, internalFields, objectInfos, referencedRecords, formatDisplayValue);
55897
- const fieldNames = keys$2$1(draftFields);
55897
+ const fieldNames = keys$3(draftFields);
55898
55898
  for (let i = 0, len = fieldNames.length; i < len; i++) {
55899
55899
  const fieldName = fieldNames[i];
55900
55900
  // don't apply server values to draft created records
@@ -55955,7 +55955,7 @@
55955
55955
  return undefined;
55956
55956
  }
55957
55957
  const updatedFields = {};
55958
- const fieldNames = keys$2$1(fields);
55958
+ const fieldNames = keys$3(fields);
55959
55959
  for (let i = 0, len = fieldNames.length; i < len; i++) {
55960
55960
  const fieldName = fieldNames[i];
55961
55961
  const field = fields[fieldName];
@@ -56002,7 +56002,7 @@
56002
56002
  * @param fields List of draft record fields
56003
56003
  */
56004
56004
  function buildRecordFieldValueRepresentationsFromDraftFields(luvio, apiName, fields, objectInfos, referencedRecords, formatDisplayValue) {
56005
- const fieldNames = keys$2$1(fields);
56005
+ const fieldNames = keys$3(fields);
56006
56006
  const recordFields = {};
56007
56007
  const objectInfo = objectInfos.get(apiName);
56008
56008
  for (let i = 0, len = fieldNames.length; i < len; i++) {
@@ -56071,7 +56071,7 @@
56071
56071
  draftFields[DEFAULT_FIELD_OWNER_ID] = { value: userId, displayValue: null };
56072
56072
  draftFields[DEFAULT_FIELD_ID] = { value: recordId, displayValue: null };
56073
56073
  if (objectInfo !== undefined) {
56074
- const allObjectFields = keys$2$1(objectInfo.fields);
56074
+ const allObjectFields = keys$3(objectInfo.fields);
56075
56075
  allObjectFields.forEach((fieldName) => {
56076
56076
  if (draftFields[fieldName] === undefined) {
56077
56077
  draftFields[fieldName] = { value: null, displayValue: null };
@@ -56195,7 +56195,7 @@
56195
56195
  this.isDraftId = isDraftId;
56196
56196
  this.recordService = recordService;
56197
56197
  this.handlerId = LDS_ACTION_HANDLER_ID;
56198
- this.collectedFields = create$2$1(null);
56198
+ this.collectedFields = create$3(null);
56199
56199
  recordService.registerRecordHandler(this);
56200
56200
  }
56201
56201
  async buildPendingAction(request, queue) {
@@ -56408,11 +56408,11 @@
56408
56408
  // otherwise we're a record
56409
56409
  if (draftMetadata === undefined) {
56410
56410
  // no drafts applied to this record, publish and be done
56411
- this.collectedFields = create$2$1(null);
56411
+ this.collectedFields = create$3(null);
56412
56412
  return publishData(key, data);
56413
56413
  }
56414
56414
  // create a denormalized record with the collected fields
56415
- const recordFieldNames = keys$2$1(data.fields);
56415
+ const recordFieldNames = keys$3(data.fields);
56416
56416
  const partialRecord = {
56417
56417
  ...data,
56418
56418
  fields: {},
@@ -56434,7 +56434,7 @@
56434
56434
  lastModifiedDate: recordWithDrafts.lastModifiedDate,
56435
56435
  lastModifiedById: recordWithDrafts.lastModifiedById,
56436
56436
  };
56437
- for (const fieldName of keys$2$1(recordWithSpanningRefLinks.fields)) {
56437
+ for (const fieldName of keys$3(recordWithSpanningRefLinks.fields)) {
56438
56438
  const fieldKey = buildRecordFieldStoreKey(key, fieldName);
56439
56439
  if (this.collectedFields[fieldKey] !== undefined) {
56440
56440
  const fieldData = recordWithSpanningRefLinks.fields[fieldName];
@@ -56451,7 +56451,7 @@
56451
56451
  // publish the normalized record
56452
56452
  publishData(key, normalizedRecord);
56453
56453
  // we've published the record, now clear the collected fields
56454
- this.collectedFields = create$2$1(null);
56454
+ this.collectedFields = create$3(null);
56455
56455
  }
56456
56456
  updateMetadata(existingMetadata, incomingMetadata) {
56457
56457
  // ensure the the api name cannot be overwritten in the incoming metadata
@@ -56488,7 +56488,7 @@
56488
56488
  let resolvedUrlParams = request.urlParams;
56489
56489
  if (request.method === 'post' || request.method === 'patch') {
56490
56490
  const bodyFields = resolvedBody.fields;
56491
- const fieldNames = keys$2$1(bodyFields);
56491
+ const fieldNames = keys$3(bodyFields);
56492
56492
  for (let i = 0, len = fieldNames.length; i < len; i++) {
56493
56493
  const fieldName = fieldNames[i];
56494
56494
  const fieldValue = bodyFields[fieldName];
@@ -56571,7 +56571,7 @@
56571
56571
  function normalizeRecordFields(key, entry) {
56572
56572
  const { data: record } = entry;
56573
56573
  const { fields, links } = record;
56574
- const linkNames = keys$2$1(links);
56574
+ const linkNames = keys$3(links);
56575
56575
  const normalizedFields = {};
56576
56576
  const returnEntries = {};
56577
56577
  for (let i = 0, len = linkNames.length; i < len; i++) {
@@ -56593,7 +56593,7 @@
56593
56593
  }
56594
56594
  }
56595
56595
  returnEntries[key] = {
56596
- data: assign$2(record, { fields: normalizedFields }),
56596
+ data: assign$3(record, { fields: normalizedFields }),
56597
56597
  metadata: entry.metadata,
56598
56598
  };
56599
56599
  return returnEntries;
@@ -56609,7 +56609,7 @@
56609
56609
  const fields = normalizedRecord.fields;
56610
56610
  const filteredFields = {};
56611
56611
  const links = {};
56612
- const fieldNames = keys$2$1(fields);
56612
+ const fieldNames = keys$3(fields);
56613
56613
  for (let i = 0, len = fieldNames.length; i < len; i++) {
56614
56614
  const fieldName = fieldNames[i];
56615
56615
  const field = fields[fieldName];
@@ -56696,8 +56696,8 @@
56696
56696
  if (durableEntries === undefined) {
56697
56697
  return undefined;
56698
56698
  }
56699
- const returnEntries = create$2$1(null);
56700
- const keys$1 = keys$2$1(durableEntries);
56699
+ const returnEntries = create$3(null);
56700
+ const keys$1 = keys$3(durableEntries);
56701
56701
  for (let i = 0, len = keys$1.length; i < len; i++) {
56702
56702
  const key = keys$1[i];
56703
56703
  const value = durableEntries[key];
@@ -56705,7 +56705,7 @@
56705
56705
  continue;
56706
56706
  }
56707
56707
  if (isEntryDurableRecordRepresentation(value, key)) {
56708
- assign$2(returnEntries, normalizeRecordFields(key, value));
56708
+ assign$3(returnEntries, normalizeRecordFields(key, value));
56709
56709
  }
56710
56710
  else {
56711
56711
  returnEntries[key] = value;
@@ -56715,8 +56715,8 @@
56715
56715
  });
56716
56716
  };
56717
56717
  const denormalizeEntries = function (entries) {
56718
- const putEntries = create$2$1(null);
56719
- const keys$1 = keys$2$1(entries);
56718
+ const putEntries = create$3(null);
56719
+ const keys$1 = keys$3(entries);
56720
56720
  const putRecords = {};
56721
56721
  const putRecordViews = {};
56722
56722
  const storeRecords = getStoreRecords !== undefined ? getStoreRecords() : {};
@@ -56825,7 +56825,7 @@
56825
56825
  return denormalizedRecord;
56826
56826
  });
56827
56827
  };
56828
- return create$2$1(durableStore, {
56828
+ return create$3(durableStore, {
56829
56829
  getEntries: { value: getEntries, writable: true },
56830
56830
  setEntries: { value: setEntries, writable: true },
56831
56831
  batchOperations: { value: batchOperations, writable: true },
@@ -56843,7 +56843,7 @@
56843
56843
  else if (typeof error === 'string') {
56844
56844
  return new Error(error);
56845
56845
  }
56846
- return new Error(stringify$2(error));
56846
+ return new Error(stringify$3(error));
56847
56847
  }
56848
56848
 
56849
56849
  const PERFORM_QUICK_ACTION_ENDPOINT_REGEX = /^\/ui-api\/actions\/perform-quick-action\/.*$/;
@@ -56871,7 +56871,7 @@
56871
56871
  }
56872
56872
  return createOkResponse(data);
56873
56873
  };
56874
- return create$2$1(env, {
56874
+ return create$3(env, {
56875
56875
  dispatchResourceRequest: { value: dispatchResourceRequest },
56876
56876
  });
56877
56877
  }
@@ -56938,7 +56938,7 @@
56938
56938
  };
56939
56939
  }
56940
56940
  objectInfoMap.set(apiName, objectInfo);
56941
- const fields = keys$2$1(operation.fields);
56941
+ const fields = keys$3(operation.fields);
56942
56942
  const unexpectedFields = [];
56943
56943
  for (const field of fields) {
56944
56944
  const fieldInfo = objectInfo.fields[field];
@@ -57224,7 +57224,7 @@
57224
57224
  }
57225
57225
  else if (typeof object === 'object' && object !== null) {
57226
57226
  let source = object;
57227
- return keys$2$1(source).reduce((acc, key) => {
57227
+ return keys$3(source).reduce((acc, key) => {
57228
57228
  acc[key] = replace(source[key]);
57229
57229
  return acc;
57230
57230
  }, {});
@@ -57233,7 +57233,7 @@
57233
57233
  return object;
57234
57234
  }
57235
57235
  };
57236
- let newVariables = keys$2$1(variables).reduce((acc, key) => {
57236
+ let newVariables = keys$3(variables).reduce((acc, key) => {
57237
57237
  acc[key] = replace(variables[key]);
57238
57238
  return acc;
57239
57239
  }, {});
@@ -57246,7 +57246,7 @@
57246
57246
  };
57247
57247
  return async function draftAwareGraphQLAdapter(config, buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy, requestContext = {}) {
57248
57248
  //create a copy to not accidentally modify the AST in the astResolver map of luvio
57249
- const copy = parse$2(stringify$2(config.query));
57249
+ const copy = parse$3(stringify$3(config.query));
57250
57250
  let injectedAST;
57251
57251
  let objectInfoNeeded = {};
57252
57252
  let unmappedDraftIDs;
@@ -57311,7 +57311,7 @@
57311
57311
  ({ result: gqlResult, seenRecordIds } = await evaluate({
57312
57312
  ...config,
57313
57313
  //need to create another copy of the ast for future writes
57314
- query: parse$2(stringify$2(injectedAST)),
57314
+ query: parse$3(stringify$3(injectedAST)),
57315
57315
  }, observers, { userId }, objectInfoNeeded, store, nonEvaluatedSnapshot));
57316
57316
  }
57317
57317
  catch (throwable) {
@@ -58065,16 +58065,16 @@
58065
58065
  * For full license text, see the LICENSE.txt file
58066
58066
  */
58067
58067
 
58068
- const { keys: keys$1$1, create: create$1$1, assign: assign$1, entries: entries$1 } = Object;
58069
- 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;
58070
58070
  const { push: push$1, join: join$1, slice: slice$1 } = Array.prototype;
58071
58071
  const { isArray: isArray$6, from } = Array;
58072
58072
 
58073
58073
  function ldsParamsToString(params) {
58074
- const returnParams = create$1$1(null);
58075
- const keys$1$1$1 = keys$1$1(params);
58076
- for (let i = 0, len = keys$1$1$1.length; i < len; i++) {
58077
- 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];
58078
58078
  const value = params[key];
58079
58079
  if (value === undefined) {
58080
58080
  // filter out params that have no value
@@ -58089,8 +58089,8 @@
58089
58089
  else {
58090
58090
  returnParams[key] = `${value}`;
58091
58091
  }
58092
- if (isObject(value) === true && keys$1$1(value).length > 0) {
58093
- returnParams[key] = stringify$1$1(value);
58092
+ if (isObject(value) === true && keys$2$1(value).length > 0) {
58093
+ returnParams[key] = stringify$2(value);
58094
58094
  }
58095
58095
  }
58096
58096
  return returnParams;
@@ -58149,13 +58149,13 @@
58149
58149
  if (value === undefined || value === null) {
58150
58150
  return null;
58151
58151
  }
58152
- return stringify$1$1(value);
58152
+ return stringify$2(value);
58153
58153
  }
58154
58154
  function parseIfPresent(value) {
58155
58155
  if (value === undefined || value === null || value === '') {
58156
58156
  return null;
58157
58157
  }
58158
- return parse$1$1(value);
58158
+ return parse$2(value);
58159
58159
  }
58160
58160
  function buildNimbusNetworkPluginRequest(resourceRequest, resourceRequestContext) {
58161
58161
  const { basePath, baseUri, method, headers, queryParams, body } = resourceRequest;
@@ -58485,7 +58485,7 @@
58485
58485
  optionalFields,
58486
58486
  };
58487
58487
  const queryString = [];
58488
- for (const [key, value] of entries$1(mergedParams)) {
58488
+ for (const [key, value] of entries$2(mergedParams)) {
58489
58489
  if (value !== undefined) {
58490
58490
  queryString.push(`${key}=${isArray$6(value) ? value.join(',') : value}`);
58491
58491
  }
@@ -58501,7 +58501,7 @@
58501
58501
  function mergeRecordFields(first, second) {
58502
58502
  const { fields: targetFields } = first;
58503
58503
  const { fields: sourceFields } = second;
58504
- const fieldNames = keys$1$1(sourceFields);
58504
+ const fieldNames = keys$2$1(sourceFields);
58505
58505
  for (let i = 0, len = fieldNames.length; i < len; i += 1) {
58506
58506
  const fieldName = fieldNames[i];
58507
58507
  const sourceField = sourceFields[fieldName];
@@ -58651,8 +58651,8 @@
58651
58651
  // Too much work to get exact length of the final url, so use stringified json to get the rough length.
58652
58652
  const roughUrlLengthWithoutFieldsAndOptionFields = request.basePath.length +
58653
58653
  request.baseUri.length +
58654
- (request.urlParams ? stringify$1$1(request.urlParams).length : 0) +
58655
- 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;
58656
58656
  // MAX_URL_LENGTH - full lenght without fields, optionalFields
58657
58657
  return MAX_URL_LENGTH - roughUrlLengthWithoutFieldsAndOptionFields;
58658
58658
  }
@@ -58860,8 +58860,8 @@
58860
58860
  }, networkAdapter);
58861
58861
  }
58862
58862
 
58863
- const { keys: keys$8, create: create$6, assign: assign$6, entries } = Object;
58864
- 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;
58865
58865
  const { push, join, slice } = Array.prototype;
58866
58866
 
58867
58867
  // so eslint doesn't complain about nimbus
@@ -58878,10 +58878,10 @@
58878
58878
  if (callProxyMethod === undefined) {
58879
58879
  return Promise.reject(new Error('callProxyMethod not defined on the nimbus plugin'));
58880
58880
  }
58881
- const serializedAction = stringify$6([handlerId, data]);
58881
+ const serializedAction = stringify$1$1([handlerId, data]);
58882
58882
  return new Promise((resolve, reject) => {
58883
58883
  callProxyMethod('enqueue', serializedAction, (serializedActionResponse) => {
58884
- const response = parse$6(serializedActionResponse);
58884
+ const response = parse$1$1(serializedActionResponse);
58885
58885
  resolve(response);
58886
58886
  }, (errorMessage) => {
58887
58887
  reject(new Error(errorMessage));
@@ -58902,8 +58902,8 @@
58902
58902
  return Promise.reject(new Error('callProxyMethod not defined on the nimbus plugin'));
58903
58903
  }
58904
58904
  return new Promise((resolve, reject) => {
58905
- callProxyMethod('getQueueActions', stringify$6([]), (serializedQueue) => {
58906
- resolve(parse$6(serializedQueue));
58905
+ callProxyMethod('getQueueActions', stringify$1$1([]), (serializedQueue) => {
58906
+ resolve(parse$1$1(serializedQueue));
58907
58907
  }, (errorMessage) => {
58908
58908
  reject(new Error(errorMessage));
58909
58909
  });
@@ -58914,17 +58914,17 @@
58914
58914
  if (callProxyMethod === undefined) {
58915
58915
  return Promise.reject('callProxyMethod not defined on the nimbus plugin');
58916
58916
  }
58917
- const stringifiedArgs = stringify$6([action]);
58917
+ const stringifiedArgs = stringify$1$1([action]);
58918
58918
  return new Promise((resolve, reject) => {
58919
58919
  callProxyMethod('getDataForAction', stringifiedArgs, (data) => {
58920
58920
  if (data === undefined) {
58921
58921
  resolve(undefined);
58922
58922
  }
58923
58923
  else {
58924
- resolve(parse$6(data));
58924
+ resolve(parse$1$1(data));
58925
58925
  }
58926
58926
  }, (serializedError) => {
58927
- reject(parse$6(serializedError));
58927
+ reject(parse$1$1(serializedError));
58928
58928
  });
58929
58929
  });
58930
58930
  }
@@ -58988,7 +58988,7 @@
58988
58988
  else if (typeof err === 'string') {
58989
58989
  return new Error(err);
58990
58990
  }
58991
- return new Error(stringify$6(err));
58991
+ return new Error(stringify$1$1(err));
58992
58992
  }
58993
58993
  const DRAFT_QUEUE_TOTAL_MERGE_ACTIONS_CALLS = 'draft-queue-total-mergeActions-calls';
58994
58994
  const DRAFT_AWARE_CREATE_CONTENT_DOCUMENT_AND_VERSION_ERROR = 'draft-aware-create-content-document-and-version-error';
@@ -59086,7 +59086,7 @@
59086
59086
  logError: false,
59087
59087
  });
59088
59088
  };
59089
- return create$6(queue, { mergeActions: { value: mergeActions } });
59089
+ return create$1$1(queue, { mergeActions: { value: mergeActions } });
59090
59090
  }
59091
59091
 
59092
59092
  // so eslint doesn't complain about nimbus
@@ -59162,7 +59162,7 @@
59162
59162
  function dataIsObjectInfo(key, data) {
59163
59163
  return incomingObjectInfos.has(key);
59164
59164
  }
59165
- return create$6(env, {
59165
+ return create$1$1(env, {
59166
59166
  handleSuccessResponse: { value: handleSuccessResponse },
59167
59167
  storePublish: { value: storePublish },
59168
59168
  });
@@ -59268,7 +59268,7 @@
59268
59268
  this.getObjectInfosAdapter = getObjectInfosAdapter;
59269
59269
  this.durableStore = durableStore;
59270
59270
  // Local in-memory cache for ObjectInfo entries seen in DurableStore eg: {'Account': 001}
59271
- this.objectInfoMemoryCache = create$6(null);
59271
+ this.objectInfoMemoryCache = create$1$1(null);
59272
59272
  }
59273
59273
  /**
59274
59274
  * Size of return map not necessarily correlated with number of inputs. The
@@ -59374,6 +59374,9 @@
59374
59374
  };
59375
59375
  }
59376
59376
 
59377
+ const { keys: keys$9, create: create$7, assign: assign$7, entries } = Object;
59378
+ const { stringify: stringify$7, parse: parse$7 } = JSON;
59379
+
59377
59380
  function selectColumnsFromTableWhereKeyIn(columnNames, table, keyColumnName, whereIn) {
59378
59381
  const paramList = whereIn.map(() => '?').join(',');
59379
59382
  return `SELECT ${columnNames.join(',')} FROM ${table} WHERE ${keyColumnName} IN (${paramList})`;
@@ -59385,13 +59388,13 @@
59385
59388
 
59386
59389
  // These const values must be in sync with the latest
59387
59390
  // @salesforce/nimbus-plugin-lds/sql schema file
59388
- const TABLE_NAME$3 = 'lds_data';
59391
+ const TABLE_NAME$1$1 = 'lds_data';
59389
59392
  const COLUMN_NAME_KEY$2 = 'key';
59390
59393
  const COLUMN_NAME_DATA$2 = 'data';
59391
59394
  const COLUMN_NAME_METADATA$1 = 'metadata';
59392
59395
  class LdsDataTable {
59393
59396
  constructor(plugin) {
59394
- this.tableName = TABLE_NAME$3;
59397
+ this.tableName = TABLE_NAME$1$1;
59395
59398
  this.columnNames = [COLUMN_NAME_KEY$2, COLUMN_NAME_DATA$2, COLUMN_NAME_METADATA$1];
59396
59399
  this.conflictColumnNames = [COLUMN_NAME_KEY$2];
59397
59400
  this.getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName}`;
@@ -59422,10 +59425,10 @@
59422
59425
  },
59423
59426
  conflictColumns: this.conflictColumnNames,
59424
59427
  columns: this.columnNames,
59425
- rows: keys$8(entries).reduce((rows, key) => {
59428
+ rows: keys$9(entries).reduce((rows, key) => {
59426
59429
  const entry = entries[key];
59427
59430
  const { data, metadata } = entry;
59428
- const row = [key, stringify$6(data), metadata ? stringify$6(metadata) : null];
59431
+ const row = [key, stringify$7(data), metadata ? stringify$7(metadata) : null];
59429
59432
  rows.push(row);
59430
59433
  return rows;
59431
59434
  }, []),
@@ -59435,10 +59438,10 @@
59435
59438
  return sqliteResult.rows.reduce((entries, row) => {
59436
59439
  const [key, stringifiedData, stringifiedMetadata] = row;
59437
59440
  const durableStoreEntry = {
59438
- data: parse$6(stringifiedData),
59441
+ data: parse$7(stringifiedData),
59439
59442
  };
59440
59443
  if (stringifiedMetadata !== null) {
59441
- durableStoreEntry.metadata = parse$6(stringifiedMetadata);
59444
+ durableStoreEntry.metadata = parse$7(stringifiedMetadata);
59442
59445
  }
59443
59446
  entries[key] = durableStoreEntry;
59444
59447
  return entries;
@@ -59448,95 +59451,21 @@
59448
59451
 
59449
59452
  // These const values must be in sync with the latest
59450
59453
  // @salesforce/nimbus-plugin-lds/sql schema file
59454
+ const TABLE_NAME$2 = 'lds_internal';
59451
59455
  const COLUMN_NAME_KEY$1 = 'key';
59452
59456
  const COLUMN_NAME_DATA$1 = 'data';
59453
- class AbstractKeyValueDataTable {
59454
- constructor(plugin, tableName) {
59455
- this.columnNames = [COLUMN_NAME_KEY$1, COLUMN_NAME_DATA$1];
59456
- this.conflictColumnNames = [COLUMN_NAME_KEY$1];
59457
- this.plugin = plugin;
59458
- this.tableName = tableName;
59459
- }
59460
- getByKeys(keys) {
59461
- return new Promise((resolve, reject) => {
59462
- const getQuery = selectColumnsFromTableWhereKeyIn(this.columnNames, this.tableName, COLUMN_NAME_KEY$1, keys);
59463
- this.plugin.query(getQuery, keys, (x) => {
59464
- resolve(this.mapToDurableEntries(x));
59465
- }, reject);
59466
- });
59467
- }
59468
- getAll() {
59469
- const getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName}`;
59470
- return new Promise((resolve, reject) => {
59471
- this.plugin.query(getAllQuery, [], (x) => {
59472
- resolve(this.mapToDurableEntries(x));
59473
- }, reject);
59474
- });
59475
- }
59476
- entriesToUpsertOperations(entries, segment) {
59477
- return {
59478
- type: 'upsert',
59479
- table: this.tableName,
59480
- keyColumn: COLUMN_NAME_KEY$1,
59481
- context: {
59482
- segment,
59483
- },
59484
- conflictColumns: this.conflictColumnNames,
59485
- columns: this.columnNames,
59486
- rows: keys$8(entries).reduce((rows, key) => {
59487
- const entry = entries[key];
59488
- rows.push([key, stringify$6(entry.data)]);
59489
- return rows;
59490
- }, []),
59491
- };
59492
- }
59493
- mapToDurableEntries(sqliteResult) {
59494
- return sqliteResult.rows.reduce((entries, row) => {
59495
- const [key, stringifiedData] = row;
59496
- const durableStoreEntry = {
59497
- data: parse$6(stringifiedData),
59498
- };
59499
- entries[key] = durableStoreEntry;
59500
- return entries;
59501
- }, {});
59502
- }
59503
- }
59504
-
59505
- // These const values must be in sync with the latest
59506
- // @salesforce/nimbus-plugin-lds/sql schema file
59507
- const TABLE_NAME$2 = 'lds_env_drafts';
59508
- class LdsDraftsDataTable extends AbstractKeyValueDataTable {
59509
- constructor(plugin) {
59510
- super(plugin, TABLE_NAME$2);
59511
- }
59512
- }
59513
-
59514
- // These const values must be in sync with the latest
59515
- // @salesforce/nimbus-plugin-lds/sql schema file
59516
- const TABLE_NAME$1 = 'lds_env_draft_id_map';
59517
- class LdsDraftIdMapDataTable extends AbstractKeyValueDataTable {
59518
- constructor(plugin) {
59519
- super(plugin, TABLE_NAME$1);
59520
- }
59521
- }
59522
-
59523
- // These const values must be in sync with the latest
59524
- // @salesforce/nimbus-plugin-lds/sql schema file
59525
- const TABLE_NAME = 'lds_internal';
59526
- const COLUMN_NAME_KEY = 'key';
59527
- const COLUMN_NAME_DATA = 'data';
59528
59457
  const COLUMN_NAME_METADATA = 'metadata';
59529
59458
  const COLUMN_NAME_NAMESPACE = 'namespace';
59530
59459
  class LdsInternalDataTable {
59531
59460
  constructor(plugin) {
59532
- this.tableName = TABLE_NAME;
59461
+ this.tableName = TABLE_NAME$2;
59533
59462
  this.columnNames = [
59534
- COLUMN_NAME_KEY,
59535
- COLUMN_NAME_DATA,
59463
+ COLUMN_NAME_KEY$1,
59464
+ COLUMN_NAME_DATA$1,
59536
59465
  COLUMN_NAME_METADATA,
59537
59466
  COLUMN_NAME_NAMESPACE,
59538
59467
  ];
59539
- this.conflictColumnNames = [COLUMN_NAME_KEY, COLUMN_NAME_NAMESPACE];
59468
+ this.conflictColumnNames = [COLUMN_NAME_KEY$1, COLUMN_NAME_NAMESPACE];
59540
59469
  this.getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName} WHERE ${COLUMN_NAME_NAMESPACE} = ?`;
59541
59470
  this.plugin = plugin;
59542
59471
  }
@@ -59544,7 +59473,7 @@
59544
59473
  if (namespace === undefined) {
59545
59474
  throw Error('LdsInternalDataTable requires namespace');
59546
59475
  }
59547
- 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);
59548
59477
  return new Promise((resolve, reject) => {
59549
59478
  this.plugin.query(getQuery, [namespace].concat(keys), (x) => {
59550
59479
  resolve(this.mapToDurableEntries(x));
@@ -59562,18 +59491,18 @@
59562
59491
  return {
59563
59492
  type: 'upsert',
59564
59493
  table: this.tableName,
59565
- keyColumn: COLUMN_NAME_KEY,
59494
+ keyColumn: COLUMN_NAME_KEY$1,
59566
59495
  context: {
59567
59496
  segment,
59568
59497
  },
59569
59498
  conflictColumns: this.conflictColumnNames,
59570
59499
  columns: this.columnNames,
59571
- rows: keys$8(entries).reduce((rows, key) => {
59500
+ rows: keys$9(entries).reduce((rows, key) => {
59572
59501
  const entry = entries[key];
59573
59502
  const { data, metadata } = entry;
59574
- const row = [key, stringify$6(data)];
59503
+ const row = [key, stringify$7(data)];
59575
59504
  if (metadata) {
59576
- row.push(stringify$6(metadata));
59505
+ row.push(stringify$7(metadata));
59577
59506
  }
59578
59507
  else {
59579
59508
  row.push(null);
@@ -59588,10 +59517,10 @@
59588
59517
  return sqliteResult.rows.reduce((entries, row) => {
59589
59518
  const [key, stringifiedData, stringifiedMetadata] = row;
59590
59519
  const durableStoreEntry = {
59591
- data: parse$6(stringifiedData),
59520
+ data: parse$7(stringifiedData),
59592
59521
  };
59593
59522
  if (stringifiedMetadata !== null) {
59594
- durableStoreEntry.metadata = parse$6(stringifiedMetadata);
59523
+ durableStoreEntry.metadata = parse$7(stringifiedMetadata);
59595
59524
  }
59596
59525
  entries[key] = durableStoreEntry;
59597
59526
  return entries;
@@ -59600,13 +59529,12 @@
59600
59529
  }
59601
59530
 
59602
59531
  class NimbusSqliteStore {
59603
- constructor(plugin) {
59532
+ constructor(plugin, additionalTableMap = {}) {
59604
59533
  this.plugin = plugin;
59605
59534
  this.internalDataTable = new LdsInternalDataTable(plugin);
59606
59535
  this.dataTableMap = {
59536
+ ...additionalTableMap,
59607
59537
  [DefaultDurableSegment]: new LdsDataTable(plugin),
59608
- [DRAFT_SEGMENT]: new LdsDraftsDataTable(plugin),
59609
- [DRAFT_ID_MAPPINGS_SEGMENT]: new LdsDraftIdMapDataTable(plugin),
59610
59538
  };
59611
59539
  }
59612
59540
  isEvalSupported() {
@@ -59703,11 +59631,90 @@
59703
59631
  }
59704
59632
  }
59705
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
+
59706
59708
  // so eslint doesn't complain about nimbus
59707
59709
  let baseDurableStore;
59708
- function getNimbusDurableStore() {
59710
+ function getNimbusDurableStore(plugin) {
59709
59711
  if (baseDurableStore === undefined) {
59710
- 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);
59711
59718
  }
59712
59719
  return baseDurableStore;
59713
59720
  }
@@ -59848,7 +59855,7 @@
59848
59855
  }
59849
59856
  return environment.applyCachePolicy(luvio, adapterRequestContext, buildSnapshotContext, localBuildCachedSnapshot, buildNetworkSnapshot);
59850
59857
  };
59851
- return create$6(environment, {
59858
+ return create$1$1(environment, {
59852
59859
  rebuildSnapshot: { value: rebuildSnapshot },
59853
59860
  applyCachePolicy: { value: applyCachePolicy },
59854
59861
  setDefaultCachePolicy: { value: environment.setDefaultCachePolicy.bind(environment) },
@@ -59893,7 +59900,7 @@
59893
59900
  // eslint-disable-next-line no-undef
59894
59901
  globalThis.luvio = luvio;
59895
59902
  registerReportObserver((report) => {
59896
- __nimbus.plugins.LdsInspectorPlugin.sendAdapterReport(stringify$6(report));
59903
+ __nimbus.plugins.LdsInspectorPlugin.sendAdapterReport(stringify$1$1(report));
59897
59904
  });
59898
59905
  }
59899
59906
  }
@@ -60734,7 +60741,7 @@
60734
60741
  id: '@salesforce/lds-network-adapter',
60735
60742
  instrument: instrument$1,
60736
60743
  });
60737
- // version: 1.199.0-017661a18
60744
+ // version: 1.200.0-c4cb94fd9
60738
60745
 
60739
60746
  const { create: create$2, keys: keys$2 } = Object;
60740
60747
  const { stringify: stringify$1, parse: parse$1 } = JSON;
@@ -77025,7 +77032,7 @@
77025
77032
  // Make a copy of the config before running transform to avoid mutating the original config
77026
77033
  const adapterConfigCopy = {
77027
77034
  ...config,
77028
- query: parse$8(print(config.query))
77035
+ query: parse$9(print(config.query))
77029
77036
  };
77030
77037
  return {
77031
77038
  ...adapterConfigCopy,
@@ -77565,7 +77572,7 @@
77565
77572
  const batchQueryTransformed = config.batchQuery.map((singleConfig) => {
77566
77573
  return {
77567
77574
  ...singleConfig,
77568
- 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?
77569
77576
  };
77570
77577
  });
77571
77578
  return {
@@ -78077,7 +78084,7 @@
78077
78084
  configuration: { ...configurationForGraphQLAdapters },
78078
78085
  instrument,
78079
78086
  });
78080
- // version: 1.199.0-66586ec50
78087
+ // version: 1.200.0-dab735b42
78081
78088
 
78082
78089
  // On core the unstable adapters are re-exported with different names,
78083
78090
 
@@ -80324,7 +80331,7 @@
80324
80331
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
80325
80332
  graphQLImperative = ldsAdapter;
80326
80333
  });
80327
- // version: 1.199.0-66586ec50
80334
+ // version: 1.200.0-dab735b42
80328
80335
 
80329
80336
  var gqlApi = /*#__PURE__*/Object.freeze({
80330
80337
  __proto__: null,
@@ -81030,4 +81037,4 @@
81030
81037
  Object.defineProperty(exports, '__esModule', { value: true });
81031
81038
 
81032
81039
  }));
81033
- // version: 1.199.0-017661a18
81040
+ // version: 1.200.0-c4cb94fd9