@salesforce/lds-worker-api 1.292.0 → 1.294.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.
@@ -20,7 +20,7 @@ var SnapshotState$3;
20
20
  SnapshotState["Stale"] = "Stale";
21
21
  })(SnapshotState$3 || (SnapshotState$3 = {}));
22
22
 
23
- const { create: create$b, entries: entries$5, freeze: freeze$6, keys: keys$c, values: values$5, assign: assign$a } = Object;
23
+ const { create: create$b, entries: entries$6, freeze: freeze$6, keys: keys$c, values: values$5, assign: assign$a } = Object;
24
24
  const { hasOwnProperty: hasOwnProperty$3 } = Object.prototype;
25
25
  const { isArray: isArray$9 } = Array;
26
26
  const { push: push$5, indexOf, slice: slice$2 } = Array.prototype;
@@ -898,6 +898,9 @@ class StringKeyInMemoryStore {
898
898
  delete this.records[canonicalKey];
899
899
  this.markVisited(canonicalKey);
900
900
  }
901
+ cleanup() {
902
+ this.scheduleTrim();
903
+ }
901
904
  /**
902
905
  * Deallocates data at the canonical key location for in-memory (L1) cache
903
906
  * @param key key to deallocate
@@ -1600,6 +1603,11 @@ class InMemoryStore {
1600
1603
  this.recordsMap.delete(canonicalKey);
1601
1604
  this.markVisited(canonicalKey);
1602
1605
  }
1606
+ cleanup() {
1607
+ if (this.fallbackStringKeyInMemoryStore.pendingTrimKeys.size > 0) {
1608
+ this.fallbackStringKeyInMemoryStore.cleanup();
1609
+ }
1610
+ }
1603
1611
  /**
1604
1612
  * Deallocates data at the canonical key location for in-memory (L1) cache
1605
1613
  * @param key key to deallocate
@@ -3405,6 +3413,9 @@ class Environment {
3405
3413
  storeLookup(sel, createSnapshot, refresh, ttlStrategy) {
3406
3414
  return this.store.lookup(sel, createSnapshot, refresh, ttlStrategy);
3407
3415
  }
3416
+ storeCleanup() {
3417
+ this.store.cleanup();
3418
+ }
3408
3419
  storeEvict(key) {
3409
3420
  this.store.evict(key);
3410
3421
  }
@@ -3674,6 +3685,9 @@ class Luvio {
3674
3685
  storeEvict(key) {
3675
3686
  this.environment.storeEvict(key);
3676
3687
  }
3688
+ storeCleanup() {
3689
+ this.environment.storeCleanup();
3690
+ }
3677
3691
  createSnapshot(selector, refresh) {
3678
3692
  return this.environment.createSnapshot(selector, refresh);
3679
3693
  }
@@ -4062,7 +4076,7 @@ function createResourceParamsImpl(config, configMetadata) {
4062
4076
  }
4063
4077
  return resourceParams;
4064
4078
  }
4065
- // engine version: 0.154.18-b8141c42
4079
+ // engine version: 0.154.20-1c52d927
4066
4080
 
4067
4081
  /**
4068
4082
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -4190,7 +4204,7 @@ function withDefaultLuvio(callback) {
4190
4204
  }
4191
4205
  callbacks.push(callback);
4192
4206
  }
4193
- // version: 1.292.0-db5dc5800
4207
+ // version: 1.294.0-06a44f23f
4194
4208
 
4195
4209
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
4196
4210
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -15698,7 +15712,7 @@ function gql(literals, ...subs) {
15698
15712
  }
15699
15713
  return superResult;
15700
15714
  }
15701
- // version: 1.292.0-db5dc5800
15715
+ // version: 1.294.0-06a44f23f
15702
15716
 
15703
15717
  function unwrap(data) {
15704
15718
  // The lwc-luvio bindings import a function from lwc called "unwrap".
@@ -16356,12 +16370,16 @@ function createImperativeAdapter(luvio, adapter, metadata) {
16356
16370
  callback(snapshotToTuple$1(snapshotOrPromise));
16357
16371
  return;
16358
16372
  }
16359
- snapshotOrPromise.then((snapshot) => {
16373
+ snapshotOrPromise
16374
+ .then((snapshot) => {
16360
16375
  if (snapshot === null) {
16361
16376
  callback(createInvalidConfigError$1());
16362
16377
  return;
16363
16378
  }
16364
16379
  callback(snapshotToTuple$1(snapshot));
16380
+ })
16381
+ .finally(() => {
16382
+ luvio.storeCleanup();
16365
16383
  });
16366
16384
  };
16367
16385
  defineProperty(imperativeAdapterInvoke, 'name', {
@@ -16623,7 +16641,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
16623
16641
  const { apiFamily, name } = metadata;
16624
16642
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
16625
16643
  }
16626
- // version: 1.292.0-db5dc5800
16644
+ // version: 1.294.0-06a44f23f
16627
16645
 
16628
16646
  /**
16629
16647
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -16722,7 +16740,7 @@ var TypeCheckShapes;
16722
16740
  TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
16723
16741
  TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
16724
16742
  })(TypeCheckShapes || (TypeCheckShapes = {}));
16725
- // engine version: 0.154.18-b8141c42
16743
+ // engine version: 0.154.20-1c52d927
16726
16744
 
16727
16745
  const { keys: ObjectKeys$3, create: ObjectCreate$3 } = Object;
16728
16746
 
@@ -17712,20 +17730,23 @@ function getTypeCacheKeys$Z$1(rootKeySet, luvio, input, fullPathFactory) {
17712
17730
  });
17713
17731
  }
17714
17732
 
17733
+ const keyBuilderFromType$E = function ListInfoRepresentationKeyBuilderFromType(luvio, object) {
17734
+ const keyParams = {
17735
+ listViewApiName: object.listReference.listViewApiName
17736
+ ? object.listReference.listViewApiName.toLowerCase()
17737
+ : object.listReference.listViewApiName,
17738
+ objectApiName: object.listReference.objectApiName.toLowerCase(),
17739
+ type: object.listReference.type,
17740
+ };
17741
+ return keyBuilder$27(luvio, keyParams);
17742
+ };
17743
+
17715
17744
  const TTL$A = 900000;
17716
17745
  const VERSION$1e$1 = "c658fe1591386d570e214eaed0daadd1";
17717
17746
  const RepresentationType$X = 'ListInfoRepresentation';
17718
17747
  function keyBuilder$27(luvio, config) {
17719
17748
  return keyPrefix$2 + '::' + RepresentationType$X + ':' + (config.listViewApiName === null ? '' : config.listViewApiName) + ':' + config.objectApiName + ':' + config.type;
17720
17749
  }
17721
- function keyBuilderFromType$E(luvio, object) {
17722
- const keyParams = {
17723
- listViewApiName: object.listReference.listViewApiName,
17724
- objectApiName: object.listReference.objectApiName,
17725
- type: object.listReference.type
17726
- };
17727
- return keyBuilder$27(luvio, keyParams);
17728
- }
17729
17750
  function normalize$Q(input, existing, path, luvio, store, timestamp) {
17730
17751
  const input_displayColumns = input.displayColumns;
17731
17752
  const input_displayColumns_id = path.fullPath + '__displayColumns';
@@ -21713,21 +21734,24 @@ function tokenForAtMost$1(paginationMetadata, maxOffset) {
21713
21734
  return [tokenResult, offsetResult];
21714
21735
  }
21715
21736
 
21716
- const TTL$x = 30000;
21717
- const VERSION$18$1 = "e5c90c4081cd557f8ffec53028ede1e8";
21718
- const RepresentationType$T = 'ListRecordCollectionRepresentation';
21719
- function keyBuilder$23(luvio, config) {
21720
- return keyPrefix$2 + '::' + RepresentationType$T + ':' + config.objectApiName + ':' + (config.searchTerm === null ? '' : config.searchTerm) + ':' + (config.sortBy === null ? '' : '[' + config.sortBy.join(',') + ']') + ':' + (config.where === null ? '' : config.where) + ':' + (config.listViewApiName === null ? '' : config.listViewApiName);
21721
- }
21722
- function keyBuilderFromType$B(luvio, object) {
21737
+ const keyBuilderFromType$B = function ListRecordCollectionRepresentationKeyBuilderFromType(luvio, object) {
21723
21738
  const keyParams = {
21724
- objectApiName: object.listReference.objectApiName,
21739
+ objectApiName: object.listReference.objectApiName.toLowerCase(),
21725
21740
  searchTerm: object.searchTerm,
21726
21741
  sortBy: object.sortBy,
21727
21742
  where: object.where,
21728
21743
  listViewApiName: object.listReference.listViewApiName
21744
+ ? object.listReference.listViewApiName.toLowerCase()
21745
+ : object.listReference.listViewApiName,
21729
21746
  };
21730
21747
  return keyBuilder$23(luvio, keyParams);
21748
+ };
21749
+
21750
+ const TTL$x = 30000;
21751
+ const VERSION$18$1 = "e5c90c4081cd557f8ffec53028ede1e8";
21752
+ const RepresentationType$T = 'ListRecordCollectionRepresentation';
21753
+ function keyBuilder$23(luvio, config) {
21754
+ return keyPrefix$2 + '::' + RepresentationType$T + ':' + config.objectApiName + ':' + (config.searchTerm === null ? '' : config.searchTerm) + ':' + (config.sortBy === null ? '' : '[' + config.sortBy.join(',') + ']') + ':' + (config.where === null ? '' : config.where) + ':' + (config.listViewApiName === null ? '' : config.listViewApiName);
21731
21755
  }
21732
21756
  function paginationKeyBuilder(luvio, config) {
21733
21757
  return keyBuilder$23(luvio, config) + '__pagination';
@@ -22737,8 +22761,8 @@ const LIST_SUMMARY_PREFIX = keyPrefix$2 + '::' + RepresentationType$Q;
22737
22761
  let listRecordCollectionCache = new Map();
22738
22762
  let listSummaryCollectionCache = new Map();
22739
22763
  function getListRecordCollectionKeys(objectApiName, listViewApiName) {
22740
- const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName) || new Map();
22741
- const keys = cacheEntriesByObjectApiName.get(listViewApiName) || [];
22764
+ const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName.toLowerCase()) || new Map();
22765
+ const keys = cacheEntriesByObjectApiName.get(listViewApiName.toLowerCase()) || [];
22742
22766
  return [...keys];
22743
22767
  }
22744
22768
  function getListSummaryCollectionKeys(objectApiName, recentLists = undefined) {
@@ -22770,8 +22794,8 @@ function addListSummaryCollectionKey(objectApiName, recentLists, key) {
22770
22794
  keys.add(key);
22771
22795
  }
22772
22796
  function removeListRecordCollectionKeys(objectApiName, listViewApiName) {
22773
- const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName) || new Map();
22774
- cacheEntriesByObjectApiName.delete(listViewApiName);
22797
+ const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName.toLowerCase()) || new Map();
22798
+ cacheEntriesByObjectApiName.delete(listViewApiName.toLowerCase());
22775
22799
  }
22776
22800
  function removeListSummaryCollectionKeys(objectApiName, recentLists = undefined) {
22777
22801
  const cacheEntriesByObjectApiName = listSummaryCollectionCache.get(objectApiName) || new Map();
@@ -22823,7 +22847,7 @@ function buildListRefByIdContextKey(listViewId) {
22823
22847
  return `listReferenceById::${listViewId}`;
22824
22848
  }
22825
22849
  function buildListRefByApiNameContextKey(objectApiName, listViewApiName) {
22826
- return `listReferenceByApiName::${objectApiName}:${listViewApiName}`;
22850
+ return `listReferenceByApiName::${objectApiName.toLowerCase()}:${listViewApiName.toLowerCase()}`;
22827
22851
  }
22828
22852
  /**
22829
22853
  * Adds a list reference so it can be retrieved with #getListReference later.
@@ -22879,7 +22903,12 @@ const LIST_INFO_SELECTIONS_ETAG = [
22879
22903
  * @param luvio Luvio
22880
22904
  */
22881
22905
  function getListInfo(luvio, listRef, storeLookup) {
22882
- const key = keyBuilder$27(luvio, { ...listRef });
22906
+ let mutatedListRef = { ...listRef };
22907
+ mutatedListRef.objectApiName = mutatedListRef.objectApiName.toLowerCase();
22908
+ mutatedListRef.listViewApiName = mutatedListRef.listViewApiName
22909
+ ? mutatedListRef.listViewApiName.toLowerCase()
22910
+ : mutatedListRef.listViewApiName;
22911
+ const key = keyBuilder$27(luvio, { ...mutatedListRef });
22883
22912
  return storeLookup({
22884
22913
  recordId: key,
22885
22914
  node: {
@@ -22893,7 +22922,7 @@ function getListInfo(luvio, listRef, storeLookup) {
22893
22922
  }
22894
22923
  function buildDefaultsKey(listRef) {
22895
22924
  const { objectApiName, listViewApiName } = listRef;
22896
- return `defaults::${objectApiName}:${listViewApiName}`;
22925
+ return `defaults::${objectApiName.toLowerCase()}:${listViewApiName ? listViewApiName.toLowerCase() : listViewApiName}`;
22897
22926
  }
22898
22927
  /**
22899
22928
  * Update the default values based on a server response.
@@ -23068,9 +23097,11 @@ function setContext$1(adapterContext) {
23068
23097
  context$1 = adapterContext;
23069
23098
  }
23070
23099
  function keyBuilder$1$(luvio, params) {
23100
+ // lists data can now be fetched using case insensitive urlParams therefore
23101
+ // also changing contextStore to use lowercase caching
23071
23102
  const query = {
23072
- objectApiName: params.urlParams.objectApiName,
23073
- listViewApiName: params.urlParams.listViewApiName,
23103
+ objectApiName: params.urlParams.objectApiName.toLowerCase(),
23104
+ listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
23074
23105
  };
23075
23106
  // Fetch listReference from internal store to better ensure a cache hit regardless of listViewApiName or listViewId
23076
23107
  const listReference = getListReference(query, context$1);
@@ -23080,8 +23111,10 @@ function keyBuilder$1$(luvio, params) {
23080
23111
  const defaults = getServerDefaults(config, context$1);
23081
23112
  // Use default values when sortBy is undefined or an empty Array []
23082
23113
  return keyBuilder$23(luvio, {
23083
- objectApiName: listReference.objectApiName,
23084
- listViewApiName: listReference.listViewApiName,
23114
+ objectApiName: listReference.objectApiName.toLowerCase(),
23115
+ listViewApiName: listReference.listViewApiName
23116
+ ? listReference.listViewApiName.toLowerCase()
23117
+ : listReference.listViewApiName,
23085
23118
  // # removing listViewId from key only supporing getting records using api name
23086
23119
  // listViewId: listReference.id,
23087
23120
  searchTerm: params.body.searchTerm || null,
@@ -23094,8 +23127,8 @@ function keyBuilder$1$(luvio, params) {
23094
23127
  // If there are no matching entries in the store, then we haven't fetched any data for this list view yet.
23095
23128
  // Assuming that listViewId is empty and continue on
23096
23129
  return keyBuilder$23(luvio, {
23097
- objectApiName: params.urlParams.objectApiName,
23098
- listViewApiName: params.urlParams.listViewApiName,
23130
+ objectApiName: params.urlParams.objectApiName.toLowerCase(),
23131
+ listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
23099
23132
  // # removing listViewId from key only supporing getting records using api name
23100
23133
  // listViewId: '',
23101
23134
  searchTerm: params.body.searchTerm || null,
@@ -24042,8 +24075,10 @@ function prepareRequest_getMruListRecords(luvio, config, listInfo, snapshot) {
24042
24075
  searchTerm: null,
24043
24076
  where: null,
24044
24077
  sortBy: config.sortBy === undefined ? null : config.sortBy,
24045
- objectApiName: listInfo.listReference.objectApiName,
24046
- listViewApiName: listInfo.listReference.listViewApiName,
24078
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
24079
+ listViewApiName: listInfo.listReference.listViewApiName
24080
+ ? listInfo.listReference.listViewApiName.toLowerCase()
24081
+ : listInfo.listReference.listViewApiName,
24047
24082
  });
24048
24083
  const selector = {
24049
24084
  recordId: paginationKey,
@@ -24090,8 +24125,10 @@ function onResourceSuccess_getMruListRecords(luvio, config, listInfo, response)
24090
24125
  searchTerm: null,
24091
24126
  where: null,
24092
24127
  sortBy: body.sortBy,
24093
- objectApiName: listInfo.listReference.objectApiName,
24094
- listViewApiName: listInfo.listReference.listViewApiName,
24128
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
24129
+ listViewApiName: listInfo.listReference.listViewApiName
24130
+ ? listInfo.listReference.listViewApiName.toLowerCase()
24131
+ : listInfo.listReference.listViewApiName,
24095
24132
  }), ingest$M$1, body);
24096
24133
  const snapshot = buildCachedSnapshot$8(luvio, luvio.storeLookup.bind(luvio), config, listInfo, fields);
24097
24134
  return luvio.storeBroadcast().then(() => snapshot);
@@ -24139,7 +24176,7 @@ function buildCachedListInfoSnapshot$1(context, storeLookup, luvio) {
24139
24176
  return getListInfo(luvio, {
24140
24177
  id: null,
24141
24178
  listViewApiName: null,
24142
- objectApiName: config.objectApiName,
24179
+ objectApiName: config.objectApiName.toLowerCase(),
24143
24180
  type: 'mru',
24144
24181
  }, storeLookup);
24145
24182
  }
@@ -24425,8 +24462,10 @@ function prepareRequest_getListRecords(luvio, context, config, listInfo, snapsho
24425
24462
  searchTerm: null,
24426
24463
  where: null,
24427
24464
  sortBy: getSortBy(config, context),
24428
- objectApiName: listInfo.listReference.objectApiName,
24429
- listViewApiName: listInfo.listReference.listViewApiName,
24465
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
24466
+ listViewApiName: listInfo.listReference.listViewApiName
24467
+ ? listInfo.listReference.listViewApiName.toLowerCase()
24468
+ : listInfo.listReference.listViewApiName,
24430
24469
  });
24431
24470
  const selector = {
24432
24471
  recordId: paginationKey,
@@ -24476,8 +24515,10 @@ function onResourceSuccess_getListRecords(luvio, context, config, listInfo, resp
24476
24515
  searchTerm: null,
24477
24516
  where: null,
24478
24517
  sortBy: body.sortBy,
24479
- objectApiName: listInfo.listReference.objectApiName,
24480
- listViewApiName: listInfo.listReference.listViewApiName,
24518
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
24519
+ listViewApiName: listInfo.listReference.listViewApiName
24520
+ ? listInfo.listReference.listViewApiName.toLowerCase()
24521
+ : listInfo.listReference.listViewApiName,
24481
24522
  }), ingest$M$1, body);
24482
24523
  const snapshot = buildCachedSnapshot$7(luvio, luvio.storeLookup.bind(luvio), context, config, listInfo, fields);
24483
24524
  releaseKeys();
@@ -26408,8 +26449,14 @@ const notifyUpdateAvailableFactory$1 = (luvio) => {
26408
26449
  // We automatically set the type based on the listViewApiName, and we need to do the same
26409
26450
  // here for key matching and validation
26410
26451
  configs.forEach((config) => {
26452
+ config.listViewApiName = config.listViewApiName
26453
+ ? config.listViewApiName.toLowerCase()
26454
+ : config.listViewApiName;
26455
+ config.objectApiName = config.objectApiName
26456
+ ? config.objectApiName.toLowerCase()
26457
+ : config.objectApiName;
26411
26458
  if (!config.type) {
26412
- config.type = config.listViewApiName === '__Recent' ? 'mru' : 'listView';
26459
+ config.type = config.listViewApiName === '__recent' ? 'mru' : 'listView';
26413
26460
  }
26414
26461
  });
26415
26462
  return generated_notifyUpdateAvailable(configs);
@@ -30960,9 +31007,9 @@ const getLayoutUserStateAdapterFactory = (luvio) => function UiApi__getLayoutUse
30960
31007
 
30961
31008
  function keyBuilder$1c$1(luvio, params) {
30962
31009
  return keyBuilder$27(luvio, {
30963
- objectApiName: params.urlParams.objectApiName,
30964
- listViewApiName: params.urlParams.listViewApiName,
30965
- type: params.urlParams.listViewApiName === '__Recent' ? 'mru' : 'listView',
31010
+ objectApiName: params.urlParams.objectApiName.toLowerCase(),
31011
+ listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
31012
+ type: params.urlParams.listViewApiName.toLowerCase() === '__recent' ? 'mru' : 'listView',
30966
31013
  });
30967
31014
  }
30968
31015
 
@@ -44220,7 +44267,7 @@ withDefaultLuvio((luvio) => {
44220
44267
  throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
44221
44268
  throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
44222
44269
  });
44223
- // version: 1.292.0-5ad1fe2ca
44270
+ // version: 1.294.0-e7eb16228
44224
44271
 
44225
44272
  var ldsIdempotencyWriteDisabled = {
44226
44273
  isOpen: function (e) {
@@ -44405,7 +44452,7 @@ var ldsMetadataRefreshEnabled = {
44405
44452
  const { parse: parse$6, stringify: stringify$6 } = JSON;
44406
44453
  const { join: join$2, push: push$2, unshift } = Array.prototype;
44407
44454
  const { isArray: isArray$5 } = Array;
44408
- const { entries: entries$4, keys: keys$8 } = Object;
44455
+ const { entries: entries$5, keys: keys$8 } = Object;
44409
44456
 
44410
44457
  const UI_API_BASE_URI = '/services/data/v62.0/ui-api';
44411
44458
 
@@ -44712,7 +44759,7 @@ function getFulfillingRequest(inflightRequests, resourceRequest) {
44712
44759
  if (fulfill === undefined) {
44713
44760
  return null;
44714
44761
  }
44715
- const handlersMap = entries$4(inflightRequests);
44762
+ const handlersMap = entries$5(inflightRequests);
44716
44763
  for (let i = 0, len = handlersMap.length; i < len; i += 1) {
44717
44764
  const [transactionKey, handlers] = handlersMap[i];
44718
44765
  // check fulfillment against only the first handler ([0]) because it's equal or
@@ -51503,7 +51550,7 @@ function isArrayLike(x) {
51503
51550
  (x.length === 0 || (x.length > 0 && Object.prototype.hasOwnProperty.call(x, x.length - 1))));
51504
51551
  }
51505
51552
 
51506
- const { create: create$4, keys: keys$4, values: values$2, entries: entries$3, assign: assign$4 } = Object;
51553
+ const { create: create$4, keys: keys$4, values: values$2, entries: entries$4, assign: assign$4 } = Object;
51507
51554
  const { stringify: stringify$4, parse: parse$4 } = JSON;
51508
51555
  const { isArray: isArray$2$1, from: from$2 } = Array;
51509
51556
 
@@ -52251,7 +52298,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
52251
52298
  }
52252
52299
  else {
52253
52300
  //`field` match the filedInfo's apiName
52254
- for (const [op, value] of entries$3(where[field])) {
52301
+ for (const [op, value] of entries$4(where[field])) {
52255
52302
  const operator = operatorToSql(op);
52256
52303
  /**
52257
52304
  Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
@@ -52710,6 +52757,7 @@ function buildQuery(config) {
52710
52757
  ${predicates.sql}
52711
52758
  ${orderBy.sql}
52712
52759
  LIMIT ?
52760
+ OFFSET ?
52713
52761
  `
52714
52762
  .split('\n')
52715
52763
  .map((line) => line.trim())
@@ -52722,6 +52770,7 @@ function buildQuery(config) {
52722
52770
  ...predicates.bindings,
52723
52771
  // limit binding
52724
52772
  config.limit || 10,
52773
+ config.offset || 0,
52725
52774
  ];
52726
52775
  return { sql: sql.trim(), bindings };
52727
52776
  }
@@ -53439,32 +53488,6 @@ async function readIngestionTimestampForKey(key, query) {
53439
53488
  return ingestionTimestamp;
53440
53489
  }
53441
53490
 
53442
- // Code lifted from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
53443
- // base64 character set, plus padding character (=)
53444
- const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
53445
- function btoaPolyfill(input) {
53446
- let bitmap, a, b, c;
53447
- let result = '', i = 0;
53448
- const rest = input.length % 3; // To determine the final padding
53449
- for (; i < input.length;) {
53450
- if ((a = input.charCodeAt(i++)) > 255 ||
53451
- (b = input.charCodeAt(i++)) > 255 ||
53452
- (c = input.charCodeAt(i++)) > 255) {
53453
- throw new TypeError('Failed base64ToAscii encoding: The string to be encoded contains characters outside of the Latin1 range. ' +
53454
- input);
53455
- }
53456
- bitmap = (a << 16) | (b << 8) | c;
53457
- result +=
53458
- b64.charAt((bitmap >> 18) & 63) +
53459
- b64.charAt((bitmap >> 12) & 63) +
53460
- b64.charAt((bitmap >> 6) & 63) +
53461
- b64.charAt(bitmap & 63);
53462
- }
53463
- // If there's need of padding, replace the last 'A's with equal signs
53464
- return rest ? result.slice(0, rest - 3) + '==='.substring(rest) : result;
53465
- }
53466
- const base64encode = typeof btoa === 'function' ? btoa : btoaPolyfill;
53467
-
53468
53491
  function findSpanningField(name) {
53469
53492
  return (field) => {
53470
53493
  return (field.apiName === name ||
@@ -53611,9 +53634,228 @@ function scopeToPredicates(scope = '', settings) {
53611
53634
  ];
53612
53635
  }
53613
53636
 
53614
- function noOp() {
53615
- return {};
53637
+ // Code lifted from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
53638
+ // base64 character set, plus padding character (=)
53639
+ const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
53640
+ const b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
53641
+ function btoaPolyfill(input) {
53642
+ let bitmap, a, b, c;
53643
+ let result = '', i = 0;
53644
+ const rest = input.length % 3; // To determine the final padding
53645
+ for (; i < input.length;) {
53646
+ if ((a = input.charCodeAt(i++)) > 255 ||
53647
+ (b = input.charCodeAt(i++)) > 255 ||
53648
+ (c = input.charCodeAt(i++)) > 255) {
53649
+ throw new TypeError('Failed base64ToAscii encoding: The string to be encoded contains characters outside of the Latin1 range. ' +
53650
+ input);
53651
+ }
53652
+ bitmap = (a << 16) | (b << 8) | c;
53653
+ result +=
53654
+ b64.charAt((bitmap >> 18) & 63) +
53655
+ b64.charAt((bitmap >> 12) & 63) +
53656
+ b64.charAt((bitmap >> 6) & 63) +
53657
+ b64.charAt(bitmap & 63);
53658
+ }
53659
+ // If there's need of padding, replace the last 'A's with equal signs
53660
+ return rest ? result.slice(0, rest - 3) + '==='.substring(rest) : result;
53661
+ }
53662
+ function atobPolyfill(data) {
53663
+ // atob can work with strings with whitespaces, even inside the encoded part,
53664
+ // but only \t, \n, \f, \r and ' ', which can be stripped.
53665
+ let string = String(data).replace(/[\t\n\f\r ]+/g, '');
53666
+ if (!b64re.test(string))
53667
+ throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
53668
+ // Adding the padding if missing, for semplicity
53669
+ string += '=='.slice(2 - (string.length & 3));
53670
+ var bitmap, result = '', r1, r2, i = 0;
53671
+ for (; i < string.length;) {
53672
+ bitmap =
53673
+ (b64.indexOf(string.charAt(i++)) << 18) |
53674
+ (b64.indexOf(string.charAt(i++)) << 12) |
53675
+ ((r1 = b64.indexOf(string.charAt(i++))) << 6) |
53676
+ (r2 = b64.indexOf(string.charAt(i++)));
53677
+ result +=
53678
+ r1 === 64
53679
+ ? String.fromCharCode((bitmap >> 16) & 255)
53680
+ : r2 === 64
53681
+ ? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255)
53682
+ : String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255, bitmap & 255);
53683
+ }
53684
+ return result;
53685
+ }
53686
+ const base64encode = typeof btoa === 'function' ? btoa : btoaPolyfill;
53687
+ const base64decode = typeof atob === 'function' ? atob : atobPolyfill;
53688
+
53689
+ function cursorResolver(source) {
53690
+ return encodeV1Cursor(source.index);
53691
+ }
53692
+ function pageInfoResolver(source) {
53693
+ if (source.length === 0) {
53694
+ return {
53695
+ startCursor: null,
53696
+ endCursor: null,
53697
+ };
53698
+ }
53699
+ let startIndex = source[0].index;
53700
+ let endIndex = source[source.length - 1].index;
53701
+ return {
53702
+ startCursor: encodeV1Cursor(startIndex),
53703
+ endCursor: encodeV1Cursor(endIndex),
53704
+ };
53705
+ }
53706
+ function pageResultCountResolver(source) {
53707
+ return source.length;
53708
+ }
53709
+ function encodeV1Cursor(index) {
53710
+ return base64encode(`v1:${index}`);
53711
+ }
53712
+ const cursorRegex = /^v1:(?<index>\d+)$/;
53713
+ function decodeV1Cursor(base64cursor) {
53714
+ const cursor = base64decode(base64cursor);
53715
+ if (!cursor) {
53716
+ // eslint-disable-next-line @salesforce/lds/no-error-in-production
53717
+ throw new Error('Unable to parse cursor');
53718
+ }
53719
+ const found = cursor.match(cursorRegex);
53720
+ if (!found || !found.groups) {
53721
+ // eslint-disable-next-line @salesforce/lds/no-error-in-production
53722
+ throw new Error('Unable to parse cursor');
53723
+ }
53724
+ return Number(found.groups.index);
53725
+ }
53726
+
53727
+ /*
53728
+ resolves connections...
53729
+ */
53730
+ async function connectionResolver(obj, args, context, info) {
53731
+ let { recordRepresentation: parentRecord, ingestionTimestamp = 0 } = obj;
53732
+ if (!parentRecord && excludeStaleRecordsGate.isOpen({ fallback: false })) {
53733
+ // at our record query we fetch each ingestion time stamp and pass it down to each lower resolver to query against
53734
+ ingestionTimestamp = await fetchIngestionTimeStampFromDatabase(info.fieldName, info, args, context.query);
53735
+ }
53736
+ const { query, objectInfos, draftFunctions } = context;
53737
+ let joins = [];
53738
+ let alias = info.fieldName;
53739
+ let childRelationshipFieldName = undefined;
53740
+ if (parentRecord) {
53741
+ context.seenRecordIds.add(parentRecord.id);
53742
+ const parentApiName = parentRecord.apiName;
53743
+ const parentObjectInfo = objectInfos[parentApiName];
53744
+ const childRelationship = parentObjectInfo &&
53745
+ parentObjectInfo.childRelationships.find((rel) => rel.relationshipName === info.fieldName);
53746
+ // or emit/throw if we want to report it
53747
+ if (!childRelationship)
53748
+ return [];
53749
+ alias = childRelationship.childObjectApiName;
53750
+ childRelationshipFieldName = childRelationship.fieldName;
53751
+ }
53752
+ // Alias starts as entity's ApiName
53753
+ const predicates = [
53754
+ ...filterToPredicates(args.where, alias, alias, context.objectInfos, joins, draftFunctions),
53755
+ ...scopeToPredicates(args.scope, context.settings),
53756
+ ...childRelationshipToPredicates(childRelationshipFieldName, parentRecord ? parentRecord.id : undefined),
53757
+ ];
53758
+ const scopeJoins = scopeToJoins(args.scope, context.settings);
53759
+ joins.push(...scopeJoins);
53760
+ let offset = 0;
53761
+ if (args.after) {
53762
+ offset = decodeV1Cursor(args.after) + 1;
53763
+ }
53764
+ // Alias starts as entity's ApiName
53765
+ const queryConfig = {
53766
+ alias,
53767
+ joins,
53768
+ predicates,
53769
+ orderBy: orderByToPredicate(args.orderBy, alias, alias, context.objectInfos),
53770
+ limit: args.first,
53771
+ offset: offset,
53772
+ ingestionTimestamp,
53773
+ };
53774
+ const { sql, bindings } = buildQuery(queryConfig);
53775
+ const results = await query(sql, bindings);
53776
+ //map each sql result with the ingestion timestamp to pass it down a level
53777
+ return results.rows
53778
+ .map((row) => parse$4(row[0]))
53779
+ .map((recordRepresentation, index) => {
53780
+ context.seenRecordIds.add(recordRepresentation.id);
53781
+ return {
53782
+ recordRepresentation,
53783
+ ingestionTimestamp,
53784
+ index: index + offset,
53785
+ };
53786
+ });
53787
+ }
53788
+ /**
53789
+ * Converts a childRelationship into a predicate
53790
+ * @param childRelationshipFieldName Reference ID field name to its parent record. A defined `childRelationshipFieldName` string indicates that a child relationship exists
53791
+ * and a relationship predicate needs to be put into place. For example, `ServiceAppointment` has a child relationship `ServiceResources`, whose entity name is `AssignedResource`.
53792
+ * Once the parent `ServiceAppointment` record comes back, its child connection starts to resolve. Child `AssignedResource` record needs to reference to parent Id using field `ServiceAppointmentId`.
53793
+ * @param parentId prarent record Id
53794
+ * @returns predicate array consists at most 1 predicate
53795
+ */
53796
+ function childRelationshipToPredicates(childRelationshipFieldName, parentId) {
53797
+ const predicates = [];
53798
+ if (childRelationshipFieldName !== undefined && parentId !== undefined) {
53799
+ predicates.push({
53800
+ type: PredicateType.single,
53801
+ leftPath: `$.fields.${childRelationshipFieldName}.value`,
53802
+ operator: '=',
53803
+ value: parentId,
53804
+ });
53805
+ }
53806
+ return predicates;
53807
+ }
53808
+ /**
53809
+ * fetches a query level ingestion time stamp from the L2 cache
53810
+ * if no query has been seen then the timestamp is 0
53811
+ * @param apiName
53812
+ * @param info
53813
+ * @param args
53814
+ * @param query
53815
+ * @returns
53816
+ */
53817
+ async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
53818
+ const { operation, variableValues } = info;
53819
+ // if we cannot find the query key in the database then default to 0 as we assume we have not seen the query
53820
+ // and all the data is not stale
53821
+ let ingestionTimestamp = 0;
53822
+ if (info.fieldNodes.length > 0 && info.fieldNodes[0].arguments !== undefined) {
53823
+ const key = buildKeyStringForRecordQuery(operation,
53824
+ // join varables passed from query to the argument variables given from the AST
53825
+ { ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
53826
+ return readIngestionTimestampForKey(key, query);
53827
+ }
53828
+ return ingestionTimestamp;
53829
+ }
53830
+ /**
53831
+ * Builds the top level record query key based on AST data
53832
+ * @param operation
53833
+ * @param variables
53834
+ * @param argumentNodes
53835
+ * @param currentFieldName
53836
+ * @returns
53837
+ */
53838
+ function buildKeyStringForRecordQuery(operation, variables, argumentNodes, currentFieldName) {
53839
+ const queryKey = buildQueryTypeStringKey$1({
53840
+ luvio: {},
53841
+ keyPrefix: 'UiApi',
53842
+ schemaName: 'uiapi',
53843
+ queryTypeName: 'Query',
53844
+ operationNode: operation,
53845
+ variables,
53846
+ fragmentMap: {},
53847
+ });
53848
+ const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
53849
+ const argumentString = filteredArgumentNodes.length > 0
53850
+ ? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
53851
+ : '';
53852
+ return `${queryKey}__uiapi__query__${currentFieldName}${argumentString}`;
53853
+ }
53854
+
53855
+ function passThroughResolver(source) {
53856
+ return source;
53616
53857
  }
53858
+
53617
53859
  /**
53618
53860
  *
53619
53861
  * @param schema GraphQL Schema generated from ObjectInfos
@@ -53646,13 +53888,13 @@ function addResolversToSchema(schema, polyFields) {
53646
53888
  }
53647
53889
  if (type.name === 'Query') {
53648
53890
  for (const field of fields) {
53649
- field.resolve = noOp;
53891
+ field.resolve = passThroughResolver;
53650
53892
  }
53651
53893
  }
53652
53894
  if (type.name === 'UIAPI') {
53653
53895
  for (const field of fields) {
53654
53896
  if (field.name === 'query') {
53655
- field.resolve = noOp;
53897
+ field.resolve = passThroughResolver;
53656
53898
  }
53657
53899
  else {
53658
53900
  const fieldName = field.name;
@@ -53679,23 +53921,7 @@ function addResolversToSchema(schema, polyFields) {
53679
53921
  // Fields of the `RecordQuery` type are the record queries for the entity types
53680
53922
  // supported for the org
53681
53923
  for (const recordQuery of fields) {
53682
- recordQuery.resolve = async function recordConnectionResolver(record, args, { query }, info) {
53683
- const { name: currentFieldName } = recordQuery;
53684
- let ingestionTimestamp = 0;
53685
- if (excludeStaleRecordsGate.isOpen({ fallback: false })) {
53686
- // at our record query we fetch each ingestion time stamp and pass it down to each lower resolver to query against
53687
- ingestionTimestamp = await fetchIngestionTimeStampFromDatabase(currentFieldName, info, args, query);
53688
- }
53689
- // In the SF schema, the relevant arguments are passed into RecordQuery fields, but actually used
53690
- // down in the edge resolvers. For this resolver, we can just return what was passed in
53691
- // to make it available to the next execution step
53692
- return {
53693
- parentArgs: args,
53694
- parentRecord: record,
53695
- currentFieldName,
53696
- ingestionTimestamp,
53697
- };
53698
- };
53924
+ recordQuery.resolve = connectionResolver;
53699
53925
  }
53700
53926
  }
53701
53927
  if (type.name.endsWith('Connection')) {
@@ -53716,7 +53942,13 @@ function addResolversToSchema(schema, polyFields) {
53716
53942
  for (const field of fields) {
53717
53943
  switch (field.name) {
53718
53944
  case 'edges':
53719
- field.resolve = connectionEdgeResolver;
53945
+ field.resolve = passThroughResolver;
53946
+ break;
53947
+ case 'pageInfo':
53948
+ field.resolve = pageInfoResolver;
53949
+ break;
53950
+ case 'pageResultCount':
53951
+ field.resolve = pageResultCountResolver;
53720
53952
  break;
53721
53953
  default:
53722
53954
  field.resolve = defaultFieldResolver;
@@ -53739,17 +53971,10 @@ function addResolversToSchema(schema, polyFields) {
53739
53971
  // }
53740
53972
  for (const field of fields) {
53741
53973
  if (field.name === 'node') {
53742
- field.resolve = function nodeResolver(obj, _args, { seenRecordIds }) {
53743
- const { record, ingestionTimestamp } = obj;
53744
- const recordRepresentation = parse$4(record);
53745
- seenRecordIds.add(recordRepresentation.id);
53746
- return { recordRepresentation, ingestionTimestamp };
53747
- };
53974
+ field.resolve = passThroughResolver;
53748
53975
  }
53749
53976
  else if (field.name === 'cursor') {
53750
- field.resolve = function ({ index }) {
53751
- return base64encode(`v1:${index}`);
53752
- };
53977
+ field.resolve = cursorResolver;
53753
53978
  }
53754
53979
  }
53755
53980
  }
@@ -53864,16 +54089,7 @@ function addResolversToSchema(schema, polyFields) {
53864
54089
  else if (isObjectType$1(recordFieldType) &&
53865
54090
  field.type.name.endsWith('Connection')) {
53866
54091
  // spanning field to a connection
53867
- field.resolve = async ({ recordRepresentation, ingestionTimestamp }, args, { seenRecordIds }) => {
53868
- seenRecordIds.add(recordRepresentation.id);
53869
- const { name: currentFieldName } = field;
53870
- return {
53871
- parentArgs: args,
53872
- parentRecord: recordRepresentation,
53873
- currentFieldName,
53874
- ingestionTimestamp,
53875
- };
53876
- };
54092
+ field.resolve = connectionResolver;
53877
54093
  }
53878
54094
  else {
53879
54095
  field.resolve = function recordFieldResolver({ recordRepresentation: record, }) {
@@ -53928,123 +54144,10 @@ _, { objectInfos }) {
53928
54144
  }
53929
54145
  return null;
53930
54146
  }
53931
- async function connectionEdgeResolver(obj, _args, context) {
53932
- const { parentArgs = {}, parentRecord, currentFieldName, ingestionTimestamp } = obj;
53933
- const { query, objectInfos, draftFunctions } = context;
53934
- let joins = [];
53935
- let alias = currentFieldName;
53936
- let childRelationshipFieldName = undefined;
53937
- if (parentRecord.id) {
53938
- const parentApiName = parentRecord.apiName;
53939
- const parentObjectInfo = objectInfos[parentApiName];
53940
- const childRelationship = parentObjectInfo &&
53941
- parentObjectInfo.childRelationships.find((rel) => rel.relationshipName === currentFieldName);
53942
- // or emit/throw if we want to report it
53943
- if (!childRelationship)
53944
- return [];
53945
- alias = childRelationship.childObjectApiName;
53946
- childRelationshipFieldName = childRelationship.fieldName;
53947
- }
53948
- // Alias starts as entity's ApiName
53949
- const predicates = [
53950
- ...filterToPredicates(parentArgs.where, alias, alias, context.objectInfos, joins, draftFunctions),
53951
- ...scopeToPredicates(parentArgs.scope, context.settings),
53952
- ...childRelationshipToPredicates(childRelationshipFieldName, parentRecord.id),
53953
- ];
53954
- const scopeJoins = scopeToJoins(parentArgs.scope, context.settings);
53955
- joins.push(...scopeJoins);
53956
- // Alias starts as entity's ApiName
53957
- const queryConfig = {
53958
- alias,
53959
- joins,
53960
- predicates,
53961
- orderBy: orderByToPredicate(parentArgs.orderBy, alias, alias, context.objectInfos),
53962
- limit: parentArgs.first,
53963
- ingestionTimestamp,
53964
- };
53965
- const { sql, bindings } = buildQuery(queryConfig);
53966
- const results = await query(sql, bindings);
53967
- //map each sql result with the ingestion timestamp to pass it down a level
53968
- return results.rows
53969
- .map((row) => row[0])
53970
- .map((record, index) => {
53971
- return {
53972
- record,
53973
- ingestionTimestamp,
53974
- index,
53975
- };
53976
- });
53977
- }
53978
- /**
53979
- * Converts a childRelationship into a predicate
53980
- * @param childRelationshipFieldName Reference ID field name to its parent record. A defined `childRelationshipFieldName` string indicates that a child relationship exists
53981
- * and a relationship predicate needs to be put into place. For example, `ServiceAppointment` has a child relationship `ServiceResources`, whose entity name is `AssignedResource`.
53982
- * Once the parent `ServiceAppointment` record comes back, its child connection starts to resolve. Child `AssignedResource` record needs to reference to parent Id using field `ServiceAppointmentId`.
53983
- * @param parentId prarent record Id
53984
- * @returns predicate array consists at most 1 predicate
53985
- */
53986
- function childRelationshipToPredicates(childRelationshipFieldName, parentId) {
53987
- const predicates = [];
53988
- if (childRelationshipFieldName !== undefined && parentId !== undefined) {
53989
- predicates.push({
53990
- type: PredicateType.single,
53991
- leftPath: `$.fields.${childRelationshipFieldName}.value`,
53992
- operator: '=',
53993
- value: parentId,
53994
- });
53995
- }
53996
- return predicates;
53997
- }
53998
54147
  function isRecordType(type) {
53999
54148
  const interfaces = type.getInterfaces();
54000
54149
  return Boolean(interfaces.find((iface) => iface.name === 'Record'));
54001
54150
  }
54002
- /**
54003
- * Builds the top level record query key based on AST data
54004
- * @param operation
54005
- * @param variables
54006
- * @param argumentNodes
54007
- * @param currentFieldName
54008
- * @returns
54009
- */
54010
- function buildKeyStringForRecordQuery(operation, variables, argumentNodes, currentFieldName) {
54011
- const queryKey = buildQueryTypeStringKey$1({
54012
- luvio: {},
54013
- keyPrefix: 'UiApi',
54014
- schemaName: 'uiapi',
54015
- queryTypeName: 'Query',
54016
- operationNode: operation,
54017
- variables,
54018
- fragmentMap: {},
54019
- });
54020
- const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
54021
- const argumentString = filteredArgumentNodes.length > 0
54022
- ? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
54023
- : '';
54024
- return `${queryKey}__uiapi__query__${currentFieldName}${argumentString}`;
54025
- }
54026
- /**
54027
- * fetches a query level ingestion time stamp from the L2 cache
54028
- * if no query has been seen then the timestamp is 0
54029
- * @param apiName
54030
- * @param info
54031
- * @param args
54032
- * @param query
54033
- * @returns
54034
- */
54035
- async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
54036
- const { operation, variableValues } = info;
54037
- // if we cannot find the query key in the database then default to 0 as we assume we have not seen the query
54038
- // and all the data is not stale
54039
- let ingestionTimestamp = 0;
54040
- if (info.fieldNodes.length > 0 && info.fieldNodes[0].arguments !== undefined) {
54041
- const key = buildKeyStringForRecordQuery(operation,
54042
- // join varables passed from query to the argument variables given from the AST
54043
- { ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
54044
- return readIngestionTimestampForKey(key, query);
54045
- }
54046
- return ingestionTimestamp;
54047
- }
54048
54151
 
54049
54152
  var uiapiSchemaString = "scalar String\nscalar DateTime\nscalar Currency\nscalar ID\nscalar Boolean\nscalar Longitude\nscalar Float\nscalar MultiPicklist\nscalar Base64\nscalar Url\nscalar PhoneNumber\nscalar Email\nscalar TextArea\nscalar Latitude\nscalar Picklist\nscalar RichTextArea\nscalar EncryptedString\nscalar Double\nscalar Long\nscalar JSON\nscalar Time\nscalar Int\nscalar Percent\nscalar LongTextArea\nscalar IdOrRef\nscalar Date\ntype PercentAggregate implements FieldValue {\n value: Percent\n displayValue: String\n avg: DoubleValue\n count: LongValue\n countDistinct: LongValue\n format: String\n max: PercentValue\n min: PercentValue\n sum: PercentValue\n}\n\ntype StringAggregate implements FieldValue {\n value: String\n displayValue: String\n count: LongValue\n countDistinct: LongValue\n grouping: IntValue\n label: String\n max: StringValue\n min: StringValue\n}\n\ntype Query {\n uiapi: UIAPI!\n setup: Setup__Setup!\n}\n\ninput EmailOperators {\n eq: Email\n ne: Email\n like: Email\n lt: Email\n gt: Email\n lte: Email\n gte: Email\n in: [Email]\n nin: [Email]\n}\n\ninput PolymorphicParentRelationshipRecordOrderBy @generic {\n RecordOrderBy: RecordOrderBy @fieldCategory\n}\n\ninput DoubleOperators {\n eq: Double\n ne: Double\n lt: Double\n gt: Double\n lte: Double\n gte: Double\n in: [Double]\n nin: [Double]\n}\n\ntype DateOnlyAggregation {\n value: Date\n format: String\n}\n\ntype RecordCreatePayload @generic {\n Record: RecordRepresentation\n}\n\ntype DateAggregate implements FieldValue {\n value: Date\n displayValue: String\n calendarMonth: DateFunctionAggregation\n calendarQuarter: DateFunctionAggregation\n calendarYear: DateFunctionAggregation\n count: LongValue\n countDistinct: LongValue\n dayInMonth: DateFunctionAggregation\n dayInWeek: DateFunctionAggregation\n dayInYear: DateFunctionAggregation\n fiscalMonth: DateFunctionAggregation\n fiscalQuarter: DateFunctionAggregation\n fiscalYear: DateFunctionAggregation\n format: String\n grouping: IntValue\n max: DateValue\n min: DateValue\n weekInMonth: DateFunctionAggregation\n weekInYear: DateFunctionAggregation\n}\n\ninput PolymorphicParentRelationshipGroupBy @generic {\n RecordGroupBy: RecordGroupBy @fieldCategory\n}\n\nenum GroupByFunction {\n DAY_IN_WEEK\n DAY_IN_MONTH\n DAY_IN_YEAR\n WEEK_IN_MONTH\n WEEK_IN_YEAR\n CALENDAR_MONTH\n CALENDAR_QUARTER\n CALENDAR_YEAR\n FISCAL_MONTH\n FISCAL_QUARTER\n FISCAL_YEAR\n DAY_ONLY\n HOUR_IN_DAY\n}\n\ntype RecordTypeInfo {\n available: Boolean!\n defaultRecordTypeMapping: Boolean!\n master: Boolean!\n name: String\n recordTypeId: ID\n}\n\ninput UIAPIMutationsInput {\n allOrNone: Boolean = true\n}\n\ntype BooleanValue implements FieldValue {\n value: Boolean\n displayValue: String\n}\n\ntype ReferenceToInfo {\n ApiName: String!\n nameFields: [String]!\n objectInfo: ObjectInfo\n}\n\ninterface FieldValue {\n displayValue: String\n}\n\ntype LongitudeValue implements FieldValue {\n value: Longitude\n displayValue: String\n}\n\ntype StringValue implements FieldValue {\n value: String\n displayValue: String\n label: String\n}\n\ntype IntValue implements FieldValue {\n value: Int\n displayValue: String\n format: String\n}\n\ntype UrlValue implements FieldValue {\n value: Url\n displayValue: String\n}\n\ninput IdOperators {\n eq: ID\n ne: ID\n lt: ID\n gt: ID\n lte: ID\n gte: ID\n in: [ID]\n nin: [ID]\n inq: JoinInput\n ninq: JoinInput\n}\n\ninput Setup__SetupOrderBy @generic {\n orderableField: OrderByClause @fieldCategory\n orderableGeolocationField: OrderByGeolocationClause @fieldCategory\n orderableParentRelationship: Setup__SetupOrderBy @fieldCategory\n orderablePolymorphicParentRelationship: Setup__SetupPolymorphicParentRelationshipRecordOrderBy @fieldCategory\n}\n\ntype LongAggregate implements FieldValue {\n value: Long\n displayValue: String\n avg: DoubleValue\n count: LongValue\n countDistinct: LongValue\n format: String\n grouping: IntValue\n max: LongValue\n min: LongValue\n sum: LongValue\n}\n\ntype PhoneNumberAggregate implements FieldValue {\n value: PhoneNumber\n displayValue: String\n count: LongValue\n countDistinct: LongValue\n grouping: IntValue\n max: PhoneNumberValue\n min: PhoneNumberValue\n}\n\ninput TimeOperators {\n eq: Time\n ne: Time\n lt: Time\n gt: Time\n lte: Time\n gte: Time\n in: [Time]\n nin: [Time]\n}\n\ntype PicklistValue implements FieldValue {\n value: Picklist\n displayValue: String\n label: String\n}\n\ntype CurrencyAggregate implements FieldValue {\n value: Currency\n displayValue: String\n avg: DoubleValue\n count: LongValue\n countDistinct: LongValue\n format: String\n max: CurrencyValue\n min: CurrencyValue\n sum: CurrencyValue\n}\n\ntype RelatedListInfo {\n childApiName: String!\n relatedListName: String!\n label: String!\n displayColumns: [ListColumn!]!\n orderedByInfo: [ListOrder!]!\n parentApiName: String!\n fieldApiName: String!\n}\n\ninput StringOperators {\n eq: String\n ne: String\n like: String\n lt: String\n gt: String\n lte: String\n gte: String\n in: [String]\n nin: [String]\n}\n\ntype UIAPI {\n query: RecordQuery!\n aggregate: RecordQueryAggregate!\n objectInfos(apiNames: [String], locale: String): [ObjectInfo]\n relatedListByName(parentApiName: String!, relatedListName: String!): RelatedListInfo\n}\n\ninput MultiPicklistOperators {\n eq: MultiPicklist\n ne: MultiPicklist\n includes: [MultiPicklist]\n excludes: [MultiPicklist]\n}\n\ntype DateTimeAggregate implements FieldValue {\n value: DateTime\n displayValue: String\n calendarMonth: DateFunctionAggregation\n calendarQuarter: DateFunctionAggregation\n calendarYear: DateFunctionAggregation\n count: LongValue\n countDistinct: LongValue\n dayInMonth: DateFunctionAggregation\n dayInWeek: DateFunctionAggregation\n dayInYear: DateFunctionAggregation\n dayOnly: DateOnlyAggregation\n fiscalMonth: DateFunctionAggregation\n fiscalQuarter: DateFunctionAggregation\n fiscalYear: DateFunctionAggregation\n format: String\n hourInDay: DateFunctionAggregation\n max: DateTimeValue\n min: DateTimeValue\n weekInMonth: DateFunctionAggregation\n weekInYear: DateFunctionAggregation\n}\n\ninput BooleanOperators {\n eq: Boolean\n ne: Boolean\n}\n\ntype EmailAggregate implements FieldValue {\n value: Email\n displayValue: String\n count: LongValue\n countDistinct: LongValue\n grouping: IntValue\n max: EmailValue\n min: EmailValue\n}\n\n#enum OrderByType {\n#}\n\ninput GroupByDateFunction {\n function: GroupByFunction\n}\n\ntype RichTextAreaValue implements FieldValue {\n value: RichTextArea\n displayValue: String\n}\n\ntype MultiPicklistValue implements FieldValue {\n value: MultiPicklist\n displayValue: String\n label: String\n}\n\ntype Setup__SetupEdge @generic {\n node: Setup__EntityRepresentation\n cursor: String!\n}\n\ninput DatePrimitiveOperators {\n eq: Date\n ne: Date\n lt: Date\n gt: Date\n lte: Date\n gte: Date\n in: [Date]\n nin: [Date]\n}\n\ntype TimeAggregate implements FieldValue {\n value: Time\n displayValue: String\n format: String\n hourInDay: DateFunctionAggregation\n}\n\ntype __Type {\n kind: __TypeKind!\n name: String\n description: String\n fields(includeDeprecated: Boolean = false): [__Field!]\n interfaces: [__Type!]\n possibleTypes: [__Type!]\n enumValues(includeDeprecated: Boolean = false): [__EnumValue!]\n inputFields: [__InputValue!]\n ofType: __Type\n}\n\ntype ListColumn {\n fieldApiName: String!\n label: String!\n lookupId: String\n sortable: Boolean\n}\n\ntype Setup__SetupQuery {\n recordQuery(first: Int, after: String, where: Setup__SetupFilter, orderBy: Setup__SetupOrderBy, scope: String, upperBound: Int): Setup__SetupConnection @fieldCategory\n}\n\ntype Setup__EntityRepresentation @generic {\n Id: ID!\n ApiName: String!\n IntValue: IntValue @fieldCategory\n StringValue: StringValue @fieldCategory\n BooleanValue: BooleanValue @fieldCategory\n IDValue: IDValue @fieldCategory\n DateTimeValue: DateTimeValue @fieldCategory\n TimeValue: TimeValue @fieldCategory\n DateValue: DateValue @fieldCategory\n TextAreaValue: TextAreaValue @fieldCategory\n LongTextAreaValue: LongTextAreaValue @fieldCategory\n RichTextAreaValue: RichTextAreaValue @fieldCategory\n PhoneNumberValue: PhoneNumberValue @fieldCategory\n EmailValue: EmailValue @fieldCategory\n UrlValue: UrlValue @fieldCategory\n EncryptedStringValue: EncryptedStringValue @fieldCategory\n CurrencyValue: CurrencyValue @fieldCategory\n LongitudeValue: LongitudeValue @fieldCategory\n LatitudeValue: LatitudeValue @fieldCategory\n PicklistValue: PicklistValue @fieldCategory\n MultiPicklistValue: MultiPicklistValue @fieldCategory\n LongValue: LongValue @fieldCategory\n DoubleValue: DoubleValue @fieldCategory\n PercentValue: PercentValue @fieldCategory\n Base64Value: Base64Value @fieldCategory\n JSONValue: JSONValue @fieldCategory\n parentRelationship: Setup__EntityRepresentation @fieldCategory\n polymorphicParentRelationship: Setup__SetupPolymorphicParentRelationship @fieldCategory\n childRelationship(first: Int, after: String, where: Setup__SetupFilter, orderBy: Setup__SetupOrderBy, upperBound: Int): Setup__SetupConnection @fieldCategory\n CompoundField: CompoundField @fieldCategory\n}\n\ntype LatitudeAggregate implements FieldValue {\n value: Latitude\n displayValue: String\n avg: DoubleValue\n count: LongValue\n countDistinct: LongValue\n max: LatitudeValue\n min: LatitudeValue\n sum: DoubleValue\n}\n\ninput CurrencyOperators {\n eq: Currency\n ne: Currency\n lt: Currency\n gt: Currency\n lte: Currency\n gte: Currency\n in: [Currency]\n nin: [Currency]\n}\n\ninput DistanceInput {\n latitude: Latitude!\n longitude: Longitude!\n}\n\nunion PolymorphicParentRelationship @generic = RecordRepresentation\n\nenum AggregateOrderByNumberFunction {\n AVG\n COUNT\n COUNT_DISTINCT\n MAX\n MIN\n SUM\n}\n\ntype LongTextAreaValue implements FieldValue {\n value: LongTextArea\n displayValue: String\n}\n\ntype LatitudeValue implements FieldValue {\n value: Latitude\n displayValue: String\n}\n\ninput OrderByClause {\n order: ResultOrder\n nulls: NullOrder\n}\n\ninput AggregateOrderBy @generic {\n orderableNumberField: AggregateOrderByNumberClause @fieldCategory\n orderableStringField: AggregateOrderByStringClause @fieldCategory\n orderableField: NoFunctionAggregateOrderByClause @fieldCategory\n orderableGeolocationField: OrderByGeolocationClause @fieldCategory\n orderableParentRelationship: AggregateOrderBy @fieldCategory\n orderablePolymorphicParentRelationship: PolymorphicParentRelationshipOrderBy @fieldCategory\n type: String = ORDER_BY\n}\n\ninput GroupByClause {\n group: Boolean\n}\n\ntype RecordAggregateConnection @generic {\n edges: [RecordAggregateEdge]\n pageInfo: PageInfo!\n totalCount: Int!\n}\n\ntype LongitudeAggregate implements FieldValue {\n value: Longitude\n displayValue: String\n avg: DoubleValue\n count: LongValue\n countDistinct: LongValue\n max: LongitudeValue\n min: LongitudeValue\n sum: DoubleValue\n}\n\ntype RecordEdge @generic {\n node: RecordRepresentation\n cursor: String!\n}\n\nunion Setup__SetupPolymorphicParentRelationship @generic = Setup__EntityRepresentation\n\ntype DateValue implements FieldValue {\n value: Date\n displayValue: String\n format: String\n}\n\ninput URLOperators {\n eq: Url\n ne: Url\n like: Url\n lt: Url\n gt: Url\n lte: Url\n gte: Url\n in: [Url]\n nin: [Url]\n}\n\ninput LongOperators {\n eq: Long\n ne: Long\n lt: Long\n gt: Long\n lte: Long\n gte: Long\n in: [Long]\n nin: [Long]\n}\n\nenum DataType {\n STRING\n TEXTAREA\n PHONE\n EMAIL\n URL\n ENCRYPTEDSTRING\n BOOLEAN\n CURRENCY\n INT\n LONG\n DOUBLE\n PERCENT\n DATETIME\n TIME\n DATE\n REFERENCE\n PICKLIST\n MULTIPICKLIST\n ADDRESS\n LOCATION\n BASE64\n COMPLEXVALUE\n COMBOBOX\n JSON\n JUNCTIONIDLIST\n ANYTYPE\n}\n\nenum NullOrder {\n FIRST\n LAST\n}\n\ntype PhoneNumberValue implements FieldValue {\n value: PhoneNumber\n displayValue: String\n}\n\n# Cannot have empty enum\n# enum RecordScope @generic {\n# }\n\ninput Setup__SetupFilter @generic {\n and: [Setup__SetupFilter]\n or: [Setup__SetupFilter]\n not: Setup__SetupFilter\n parentRelationshipRecordFilter: Setup__SetupFilter @fieldCategory\n polymorphicParentRelationshipRecordFilter: Setup__SetupPolymorphicParentRelationshipRecordFilter @fieldCategory\n IntegerOperator: IntegerOperators @fieldCategory\n LongOperator: LongOperators @fieldCategory\n StringOperator: StringOperators @fieldCategory\n DoubleOperator: DoubleOperators @fieldCategory\n PercentOperator: PercentOperators @fieldCategory\n LongitudeOperator: LongitudeOperators @fieldCategory\n LatitudeOperator: LatitudeOperators @fieldCategory\n EmailOperator: EmailOperators @fieldCategory\n TextAreaOperator: TextAreaOperators @fieldCategory\n LongTextAreaOperator: LongTextAreaOperators @fieldCategory\n URLOperator: URLOperators @fieldCategory\n PhoneNumberOperator: PhoneNumberOperators @fieldCategory\n BooleanOperator: BooleanOperators @fieldCategory\n Setup__IdOperator: Setup__IdOperators @fieldCategory\n CurrencyOperator: CurrencyOperators @fieldCategory\n TimeOperator: TimeOperators @fieldCategory\n DateOperator: DateOperators @fieldCategory\n DateTimeOperator: DateTimeOperators @fieldCategory\n PicklistOperator: PicklistOperators @fieldCategory\n MultiPicklistOperator: MultiPicklistOperators @fieldCategory\n GeolocationOperator: GeolocationOperators @fieldCategory\n}\n\ntype DoubleAggregate implements FieldValue {\n value: Double\n displayValue: String\n avg: DoubleValue\n count: LongValue\n countDistinct: LongValue\n format: String\n max: DoubleValue\n min: DoubleValue\n sum: DoubleValue\n}\n\ntype __Field {\n name: String!\n description: String\n args: [__InputValue!]!\n type: __Type!\n isDeprecated: Boolean!\n deprecationReason: String\n}\n\ninput DateOperators {\n eq: DateInput\n ne: DateInput\n lt: DateInput\n gt: DateInput\n lte: DateInput\n gte: DateInput\n in: [DateInput]\n nin: [DateInput]\n DAY_IN_WEEK: DateFunctionInput\n DAY_IN_MONTH: DateFunctionInput\n DAY_IN_YEAR: DateFunctionInput\n WEEK_IN_MONTH: DateFunctionInput\n WEEK_IN_YEAR: DateFunctionInput\n CALENDAR_MONTH: DateFunctionInput\n CALENDAR_QUARTER: DateFunctionInput\n CALENDAR_YEAR: DateFunctionInput\n FISCAL_MONTH: DateFunctionInput\n FISCAL_QUARTER: DateFunctionInput\n FISCAL_YEAR: DateFunctionInput\n}\n\ninput GeolocationInput {\n latitude: Latitude!\n longitude: Longitude!\n radius: Float!\n unit: Unit!\n}\n\ninput JoinInput {\n Record: RecordFilter @fieldCategory\n ApiName: String\n}\n\ninput TextAreaOperators {\n eq: TextArea\n ne: TextArea\n like: TextArea\n lt: TextArea\n gt: TextArea\n lte: TextArea\n gte: TextArea\n in: [TextArea]\n nin: [TextArea]\n}\n\ntype TextAreaValue implements FieldValue {\n value: TextArea\n displayValue: String\n}\n\ntype RecordUpdatePayload @generic {\n success: Boolean\n}\n\ninput PercentOperators {\n eq: Percent\n ne: Percent\n lt: Percent\n gt: Percent\n lte: Percent\n gte: Percent\n in: [Percent]\n nin: [Percent]\n}\n\ninput Setup__SetupPolymorphicParentRelationshipRecordOrderBy @generic {\n Setup__SetupOrderBy: Setup__SetupOrderBy @fieldCategory\n}\n\ntype DoubleValue implements FieldValue {\n value: Double\n displayValue: String\n format: String\n}\n\ntype IDAggregate implements FieldValue {\n value: ID\n displayValue: String\n count: LongValue\n countDistinct: LongValue\n grouping: IntValue\n max: IDValue\n min: IDValue\n}\n\ntype __InputValue {\n name: String!\n description: String\n type: __Type!\n defaultValue: String\n}\n\ntype RecordAggregateEdge @generic {\n node: RecordResult\n cursor: String!\n}\n\ntype __Directive {\n name: String\n description: String\n locations: [__DirectiveLocation!]\n args: [__InputValue!]!\n}\n\ninput RecordCreateInput @generic {\n record: RecordCreateRepresentation! @fieldCategory\n}\n\ntype ThemeInfo {\n color: String\n iconUrl: String\n}\n\ninput AggregateOrderByStringClause {\n function: AggregateOrderByStringFunction\n order: ResultsOrder\n nulls: NullsOrder\n}\n\ntype RecordDeletePayload {\n Id: ID\n}\n\ntype UrlAggregate implements FieldValue {\n value: Url\n displayValue: String\n count: LongValue\n countDistinct: LongValue\n grouping: IntValue\n max: UrlValue\n min: UrlValue\n}\n\nenum DateLiteral {\n LAST_YEAR\n LAST_WEEK\n THIS_QUARTER\n NEXT_FISCAL_YEAR\n LAST_QUARTER\n TOMORROW\n NEXT_FISCAL_QUARTER\n YESTERDAY\n NEXT_QUARTER\n THIS_FISCAL_QUARTER\n THIS_WEEK\n LAST_MONTH\n LAST_90_DAYS\n NEXT_90_DAYS\n THIS_FISCAL_YEAR\n NEXT_WEEK\n TODAY\n NEXT_YEAR\n NEXT_MONTH\n LAST_FISCAL_QUARTER\n THIS_MONTH\n LAST_FISCAL_YEAR\n THIS_YEAR\n}\n\ntype __EnumValue {\n name: String!\n description: String\n isDeprecated: Boolean!\n deprecationReason: String\n}\n\ntype RecordRepresentation implements Record @generic {\n Id: ID!\n ApiName: String!\n WeakEtag: Long!\n DisplayValue: String\n LastModifiedById: IDValue\n LastModifiedDate: DateTimeValue\n SystemModstamp: DateTimeValue\n RecordTypeId(fallback: Boolean): IDValue\n IntValue: IntValue @fieldCategory\n StringValue: StringValue @fieldCategory\n BooleanValue: BooleanValue @fieldCategory\n IDValue: IDValue @fieldCategory\n DateTimeValue: DateTimeValue @fieldCategory\n TimeValue: TimeValue @fieldCategory\n DateValue: DateValue @fieldCategory\n TextAreaValue: TextAreaValue @fieldCategory\n LongTextAreaValue: LongTextAreaValue @fieldCategory\n RichTextAreaValue: RichTextAreaValue @fieldCategory\n PhoneNumberValue: PhoneNumberValue @fieldCategory\n EmailValue: EmailValue @fieldCategory\n UrlValue: UrlValue @fieldCategory\n EncryptedStringValue: EncryptedStringValue @fieldCategory\n CurrencyValue: CurrencyValue @fieldCategory\n LongitudeValue: LongitudeValue @fieldCategory\n LatitudeValue: LatitudeValue @fieldCategory\n PicklistValue: PicklistValue @fieldCategory\n MultiPicklistValue: MultiPicklistValue @fieldCategory\n LongValue: LongValue @fieldCategory\n DoubleValue: DoubleValue @fieldCategory\n PercentValue: PercentValue @fieldCategory\n Base64Value: Base64Value @fieldCategory\n JSONValue: JSONValue @fieldCategory\n parentRelationship: RecordRepresentation @fieldCategory\n polymorphicParentRelationship: PolymorphicParentRelationship @fieldCategory\n childRelationship(first: Int, after: String, where: RecordFilter, orderBy: RecordOrderBy, upperBound: Int): RecordConnection @fieldCategory\n CompoundField: CompoundField @fieldCategory\n}\n\ntype IDValue implements FieldValue {\n value: ID\n displayValue: String\n}\n\nenum Unit {\n MI\n KM\n}\n\ninput PolymorphicParentRelationshipOrderBy @generic {\n AggregateOrderBy: AggregateOrderBy @fieldCategory\n}\n\ninput OrderByGeolocationClause {\n distance: DistanceInput\n order: ResultOrder\n nulls: NullOrder\n}\n\ninput Setup__IdOperators {\n eq: ID\n ne: ID\n lt: ID\n gt: ID\n lte: ID\n gte: ID\n in: [ID]\n nin: [ID]\n inq: Setup__JoinInput\n ninq: Setup__JoinInput\n}\n\nenum NullsOrder {\n FIRST\n LAST\n}\n\ntype TextAreaAggregate implements FieldValue {\n value: TextArea\n displayValue: String\n count: LongValue\n countDistinct: LongValue\n grouping: IntValue\n max: TextAreaValue\n min: TextAreaValue\n}\n\nenum GroupByType {\n GROUP_BY\n ROLLUP\n CUBE\n}\n\nenum ResultOrder {\n ASC\n DESC\n}\n\ninput RecordOrderBy @generic {\n orderableField: OrderByClause @fieldCategory\n orderableGeolocationField: OrderByGeolocationClause @fieldCategory\n orderableParentRelationship: RecordOrderBy @fieldCategory\n orderablePolymorphicParentRelationship: PolymorphicParentRelationshipRecordOrderBy @fieldCategory\n}\n\ninput Setup__JoinInput {\n Record: Setup__SetupFilter @fieldCategory\n ApiName: String\n}\n\ninput PicklistOperators {\n eq: Picklist\n ne: Picklist\n in: [Picklist]\n nin: [Picklist]\n like: Picklist\n lt: Picklist\n gt: Picklist\n lte: Picklist\n gte: Picklist\n}\n\nenum ResultsOrder {\n ASC\n DESC\n}\n\ninput RecordFilter @generic {\n and: [RecordFilter]\n or: [RecordFilter]\n not: RecordFilter\n parentRelationshipRecordFilter: RecordFilter @fieldCategory\n polymorphicParentRelationshipRecordFilter: PolymorphicParentRelationshipRecordFilter @fieldCategory\n IntegerOperator: IntegerOperators @fieldCategory\n LongOperator: LongOperators @fieldCategory\n StringOperator: StringOperators @fieldCategory\n DoubleOperator: DoubleOperators @fieldCategory\n PercentOperator: PercentOperators @fieldCategory\n LongitudeOperator: LongitudeOperators @fieldCategory\n LatitudeOperator: LatitudeOperators @fieldCategory\n EmailOperator: EmailOperators @fieldCategory\n TextAreaOperator: TextAreaOperators @fieldCategory\n LongTextAreaOperator: LongTextAreaOperators @fieldCategory\n URLOperator: URLOperators @fieldCategory\n PhoneNumberOperator: PhoneNumberOperators @fieldCategory\n BooleanOperator: BooleanOperators @fieldCategory\n IdOperator: IdOperators @fieldCategory\n CurrencyOperator: CurrencyOperators @fieldCategory\n TimeOperator: TimeOperators @fieldCategory\n DateOperator: DateOperators @fieldCategory\n DateTimeOperator: DateTimeOperators @fieldCategory\n PicklistOperator: PicklistOperators @fieldCategory\n MultiPicklistOperator: MultiPicklistOperators @fieldCategory\n GeolocationOperator: GeolocationOperators @fieldCategory\n}\n\ntype TimeValue implements FieldValue {\n value: Time\n displayValue: String\n format: String\n}\n\ninput GeolocationOperators {\n lt: GeolocationInput\n gt: GeolocationInput\n}\n\ntype PicklistAggregate implements FieldValue {\n value: Picklist\n displayValue: String\n count: LongValue\n countDistinct: LongValue\n grouping: IntValue\n label: String\n max: PicklistValue\n min: PicklistValue\n}\n\ninput LatitudeOperators {\n eq: Latitude\n ne: Latitude\n lt: Latitude\n gt: Latitude\n lte: Latitude\n gte: Latitude\n in: [Latitude]\n nin: [Latitude]\n}\n\ninput RecordUpdateRepresentation @generic {\n Int: Int @fieldCategory\n String: String @fieldCategory\n Boolean: Boolean @fieldCategory\n ID: IdOrRef @fieldCategory\n DateTime: DateTime @fieldCategory\n Time: Time @fieldCategory\n Date: Date @fieldCategory\n TextArea: TextArea @fieldCategory\n LongTextArea: LongTextArea @fieldCategory\n RichTextArea: RichTextArea @fieldCategory\n PhoneNumber: PhoneNumber @fieldCategory\n Email: Email @fieldCategory\n Url: Url @fieldCategory\n EncryptedString: EncryptedString @fieldCategory\n Currency: Currency @fieldCategory\n Longitude: Longitude @fieldCategory\n Latitude: Latitude @fieldCategory\n Picklist: Picklist @fieldCategory\n MultiPicklist: MultiPicklist @fieldCategory\n Long: Long @fieldCategory\n Double: Double @fieldCategory\n Percent: Percent @fieldCategory\n Base64: Base64 @fieldCategory\n JSON: JSON @fieldCategory\n}\n\ntype DateTimeValue implements FieldValue {\n value: DateTime\n displayValue: String\n format: String\n}\n\ninput RecordDeleteInput {\n Id: IdOrRef!\n}\n\nenum __DirectiveLocation {\n QUERY\n MUTATION\n FIELD\n FRAGMENT_DEFINITION\n FRAGMENT_SPREAD\n INLINE_FRAGMENT\n SCHEMA\n SCALAR\n OBJECT\n FIELD_DEFINITION\n ARGUMENT_DEFINITION\n INTERFACE\n UNION\n ENUM\n ENUM_VALUE\n INPUT_OBJECT\n INPUT_FIELD_DEFINITION\n}\n\ntype IntAggregate implements FieldValue {\n value: Int\n displayValue: String\n avg: DoubleValue\n count: LongValue\n countDistinct: LongValue\n format: String\n grouping: IntValue\n max: IntValue\n min: IntValue\n sum: LongValue\n}\n\ntype ListOrder {\n fieldApiName: String!\n sortDirection: ResultOrder\n}\n\ntype RecordAggregate @generic {\n ApiName: String!\n BooleanAggregate: BooleanAggregate @fieldCategory\n CurrencyAggregate: CurrencyAggregate @fieldCategory\n DateAggregate: DateAggregate @fieldCategory\n DoubleAggregate: DoubleAggregate @fieldCategory\n EmailAggregate: EmailAggregate @fieldCategory\n IDAggregate: IDAggregate @fieldCategory\n IntAggregate: IntAggregate @fieldCategory\n LatitudeAggregate: LatitudeAggregate @fieldCategory\n LongitudeAggregate: LongitudeAggregate @fieldCategory\n LongAggregate: LongAggregate @fieldCategory\n PercentAggregate: PercentAggregate @fieldCategory\n PhoneNumberAggregate: PhoneNumberAggregate @fieldCategory\n PicklistAggregate: PicklistAggregate @fieldCategory\n StringAggregate: StringAggregate @fieldCategory\n TextAreaAggregate: TextAreaAggregate @fieldCategory\n TimeAggregate: TimeAggregate @fieldCategory\n UrlAggregate: UrlAggregate @fieldCategory\n}\n\ntype JSONValue implements FieldValue {\n value: JSON\n displayValue: String\n}\n\ntype EmailValue implements FieldValue {\n value: Email\n displayValue: String\n}\n\ntype Setup__Setup {\n query: Setup__SetupQuery!\n}\n\nenum AggregateOrderByStringFunction {\n COUNT\n COUNT_DISTINCT\n MAX\n MIN\n}\n\ntype LongValue implements FieldValue {\n value: Long\n displayValue: String\n format: String\n}\n\ninput DateFunctionInput {\n value: LongOperators\n convertTimezoneValue: LongOperators\n}\n\n# Mutations aren't supported yet.\n#type Mutation {\n# uiapi(input: UIAPIMutationsInput): UIAPIMutations!\n#}\n\ntype DependentField {\n controllingField: String!\n dependentFields: [String]!\n}\n\ninput LongTextAreaOperators {\n eq: LongTextArea\n ne: LongTextArea\n like: LongTextArea\n lt: LongTextArea\n gt: LongTextArea\n lte: LongTextArea\n gte: LongTextArea\n in: [LongTextArea]\n nin: [LongTextArea]\n}\n\nenum __TypeKind {\n SCALAR\n OBJECT\n INTERFACE\n UNION\n ENUM\n INPUT_OBJECT\n LIST\n NON_NULL\n}\n\ntype Setup__SetupConnection @generic {\n edges: [Setup__SetupEdge]\n pageInfo: PageInfo!\n totalCount: Int!\n pageResultCount: Int!\n}\n\ntype PercentValue implements FieldValue {\n value: Percent\n displayValue: String\n format: String\n}\n\ninput DateTimeOperators {\n eq: DateTimeInput\n ne: DateTimeInput\n lt: DateTimeInput\n gt: DateTimeInput\n lte: DateTimeInput\n gte: DateTimeInput\n in: [DateTimeInput]\n nin: [DateTimeInput]\n DAY_IN_WEEK: DateFunctionInput\n DAY_IN_MONTH: DateFunctionInput\n DAY_IN_YEAR: DateFunctionInput\n WEEK_IN_MONTH: DateFunctionInput\n WEEK_IN_YEAR: DateFunctionInput\n CALENDAR_MONTH: DateFunctionInput\n CALENDAR_QUARTER: DateFunctionInput\n CALENDAR_YEAR: DateFunctionInput\n FISCAL_MONTH: DateFunctionInput\n FISCAL_QUARTER: DateFunctionInput\n FISCAL_YEAR: DateFunctionInput\n DAY_ONLY: DateTimeFunctionInput\n HOUR_IN_DAY: DateFunctionInput\n}\n\ninput NoFunctionAggregateOrderByClause {\n order: ResultsOrder\n nulls: NullsOrder\n}\n\ntype BooleanAggregate implements FieldValue {\n value: Boolean\n displayValue: String\n grouping: IntValue\n}\n\ntype RecordQueryAggregate {\n # RecordScope is replaced with String\n recordQueryAggregate(first: Int, after: String, where: RecordFilter, orderBy: AggregateOrderBy, scope: String, groupBy: RecordGroupBy, upperBound: Int): RecordAggregateConnection @fieldCategory\n}\n\ntype RecordConnection @generic {\n edges: [RecordEdge]\n pageInfo: PageInfo!\n totalCount: Int!\n pageResultCount: Int!\n}\n\ntype FilteredLookupInfo {\n controllingFields: [String]!\n dependent: Boolean!\n optionalFilter: Boolean!\n}\n\ninput PhoneNumberOperators {\n eq: PhoneNumber\n ne: PhoneNumber\n like: PhoneNumber\n lt: PhoneNumber\n gt: PhoneNumber\n lte: PhoneNumber\n gte: PhoneNumber\n in: [PhoneNumber]\n nin: [PhoneNumber]\n}\n\ntype ObjectInfo {\n ApiName: String!\n childRelationships: [ChildRelationship]!\n createable: Boolean!\n custom: Boolean!\n defaultRecordTypeId: ID\n deletable: Boolean!\n dependentFields: [DependentField]!\n feedEnabled: Boolean!\n fields: [Field]!\n keyPrefix: String\n label: String\n labelPlural: String\n layoutable: Boolean!\n mruEnabled: Boolean!\n nameFields: [String]!\n queryable: Boolean!\n recordTypeInfos: [RecordTypeInfo]!\n searchable: Boolean!\n themeInfo: ThemeInfo\n updateable: Boolean!\n locale: String\n}\n\ninput LongitudeOperators {\n eq: Longitude\n ne: Longitude\n lt: Longitude\n gt: Longitude\n lte: Longitude\n gte: Longitude\n in: [Longitude]\n nin: [Longitude]\n}\n\ninput RecordCreateRepresentation @generic {\n Int: Int @fieldCategory\n String: String @fieldCategory\n Boolean: Boolean @fieldCategory\n ID: IdOrRef @fieldCategory\n DateTime: DateTime @fieldCategory\n Time: Time @fieldCategory\n Date: Date @fieldCategory\n TextArea: TextArea @fieldCategory\n LongTextArea: LongTextArea @fieldCategory\n RichTextArea: RichTextArea @fieldCategory\n PhoneNumber: PhoneNumber @fieldCategory\n Email: Email @fieldCategory\n Url: Url @fieldCategory\n EncryptedString: EncryptedString @fieldCategory\n Currency: Currency @fieldCategory\n Longitude: Longitude @fieldCategory\n Latitude: Latitude @fieldCategory\n Picklist: Picklist @fieldCategory\n MultiPicklist: MultiPicklist @fieldCategory\n Long: Long @fieldCategory\n Double: Double @fieldCategory\n Percent: Percent @fieldCategory\n Base64: Base64 @fieldCategory\n JSON: JSON @fieldCategory\n}\n\ntype Field {\n ApiName: String!\n calculated: Boolean!\n compound: Boolean!\n compoundComponentName: String\n compoundFieldName: String\n controllerName: String\n controllingFields: [String]!\n createable: Boolean!\n custom: Boolean!\n dataType: DataType\n extraTypeInfo: FieldExtraTypeInfo\n filterable: Boolean!\n filteredLookupInfo: FilteredLookupInfo\n highScaleNumber: Boolean!\n htmlFormatted: Boolean!\n inlineHelpText: String\n label: String\n nameField: Boolean!\n polymorphicForeignKey: Boolean!\n precision: Int\n reference: Boolean!\n referenceTargetField: String\n referenceToInfos: [ReferenceToInfo]!\n relationshipName: String\n required: Boolean!\n scale: Int\n searchPrefilterable: Boolean\n sortable: Boolean!\n updateable: Boolean!\n}\n\nenum FieldExtraTypeInfo {\n IMAGE_URL\n EXTERNAL_LOOKUP\n INDIRECT_LOOKUP\n PERSONNAME\n SWITCHABLE_PERSONNAME\n PLAINTEXTAREA\n RICHTEXTAREA\n}\n\ntype RateLimit {\n cost: Long\n limit: Long\n remaining: Long\n resetAt: DateTime\n}\n\ninput DateRange {\n last_n_days: Int\n next_n_days: Int\n last_n_weeks: Int\n next_n_weeks: Int\n last_n_months: Int\n next_n_months: Int\n last_n_quarters: Int\n next_n_quarters: Int\n last_n_fiscal_quarters: Int\n next_n_fiscal_quarters: Int\n last_n_years: Int\n next_n_years: Int\n last_n_fiscal_years: Int\n next_n_fiscal_years: Int\n n_days_ago: Int\n n_weeks_ago: Int\n n_months_ago: Int\n n_quarters_ago: Int\n n_years_ago: Int\n n_fiscal_quarters_ago: Int\n n_fiscal_years_ago: Int\n}\n\ntype UIAPIMutations {\n recordCreate(input: RecordCreateInput!): RecordCreatePayload @fieldCategory\n recordDelete(input: RecordDeleteInput!): RecordDeletePayload @fieldCategory\n recordUpdate(input: RecordUpdateInput!): RecordUpdatePayload @fieldCategory\n}\n\ninput DateTimeFunctionInput {\n value: DatePrimitiveOperators\n convertTimezoneValue: DatePrimitiveOperators\n}\n\ntype Base64Value implements FieldValue {\n value: Base64\n displayValue: String\n}\n\ninput IntegerOperators {\n eq: Int\n ne: Int\n lt: Int\n gt: Int\n lte: Int\n gte: Int\n in: [Int]\n nin: [Int]\n}\n\ntype EncryptedStringValue implements FieldValue {\n value: EncryptedString\n displayValue: String\n}\n\ninterface Record {\n Id: ID!\n ApiName: String!\n WeakEtag: Long!\n DisplayValue: String\n LastModifiedById: IDValue\n LastModifiedDate: DateTimeValue\n SystemModstamp: DateTimeValue\n RecordTypeId(fallback: Boolean): IDValue\n}\n\ninput PolymorphicParentRelationshipRecordFilter @generic {\n RecordFilter: RecordFilter @fieldCategory\n}\n\ninput AggregateOrderByNumberClause {\n function: AggregateOrderByNumberFunction\n order: ResultsOrder\n nulls: NullsOrder\n}\n\ntype __Schema {\n types: [__Type!]!\n queryType: __Type!\n mutationType: __Type\n directives: [__Directive!]!\n subscriptionType: __Type\n}\n\ninput Setup__SetupPolymorphicParentRelationshipRecordFilter @generic {\n Setup__SetupFilter: Setup__SetupFilter @fieldCategory\n}\n\ntype CompoundField @generic {\n IntValue: IntValue @fieldCategory\n StringValue: StringValue @fieldCategory\n BooleanValue: BooleanValue @fieldCategory\n IDValue: IDValue @fieldCategory\n DateTimeValue: DateTimeValue @fieldCategory\n TimeValue: TimeValue @fieldCategory\n DateValue: DateValue @fieldCategory\n TextAreaValue: TextAreaValue @fieldCategory\n LongTextAreaValue: LongTextAreaValue @fieldCategory\n RichTextAreaValue: RichTextAreaValue @fieldCategory\n PhoneNumberValue: PhoneNumberValue @fieldCategory\n EmailValue: EmailValue @fieldCategory\n UrlValue: UrlValue @fieldCategory\n EncryptedStringValue: EncryptedStringValue @fieldCategory\n CurrencyValue: CurrencyValue @fieldCategory\n LongitudeValue: LongitudeValue @fieldCategory\n LatitudeValue: LatitudeValue @fieldCategory\n PicklistValue: PicklistValue @fieldCategory\n MultiPicklistValue: MultiPicklistValue @fieldCategory\n LongValue: LongValue @fieldCategory\n DoubleValue: DoubleValue @fieldCategory\n PercentValue: PercentValue @fieldCategory\n Base64Value: Base64Value @fieldCategory\n JSONValue: JSONValue @fieldCategory\n}\n\ninput RecordUpdateInput @generic {\n Id: IdOrRef!\n record: RecordUpdateRepresentation! @fieldCategory\n}\n\ninput DateTimeInput {\n value: DateTime\n literal: DateLiteral\n range: DateRange\n}\n\ntype ChildRelationship {\n childObjectApiName: String!\n fieldName: String\n junctionIdListNames: [String]!\n junctionReferenceTo: [String]!\n relationshipName: String\n objectInfo: ObjectInfo\n}\n\ntype RecordResult @generic {\n aggregate: RecordAggregate\n}\n\ntype PageInfo {\n hasNextPage: Boolean!\n hasPreviousPage: Boolean!\n startCursor: String\n endCursor: String\n}\n\ntype CurrencyValue implements FieldValue {\n value: Currency\n displayValue: String\n format: String\n}\n\ninput DateInput {\n value: Date\n literal: DateLiteral\n range: DateRange\n}\n\ninput RecordGroupBy @generic {\n groupableField: GroupByClause @fieldCategory\n groupableDateField: GroupByDateFunction @fieldCategory\n groupableParentRelationship: RecordGroupBy @fieldCategory\n groupablePolymorphicParentRelationship: PolymorphicParentRelationshipGroupBy @fieldCategory\n type: GroupByType = GROUP_BY\n}\n\ntype DateFunctionAggregation {\n value: Long\n format: String\n}\n\ntype RecordQuery {\n # scope should be type RecordScope but that's empty enum.\n recordQuery(first: Int, after: String, where: RecordFilter, orderBy: RecordOrderBy, scope: String, upperBound: Int): RecordConnection @fieldCategory\n}\n\ndirective @generic on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT\ndirective @fieldCategory on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE\ndirective @category(name: String!) on FIELD";
54050
54153
 
@@ -54230,7 +54333,7 @@ function createNewRecordQuery(schema, objectInfo, objectInfoMap) {
54230
54333
  // handles child relationship
54231
54334
  const { spanningRecordConnections, typedScalars: spanningConnectionTypedScalars } = makeSpanningRecordConnections(schema, childRelationships, objectInfoMap, parentRelationshipFields);
54232
54335
  typedScalars = new Set([...typedScalars, ...spanningConnectionTypedScalars]);
54233
- const recordQueries = `${apiName}(first: Int, where: ${apiName}_Filter, orderBy: ${apiName}_OrderBy, scope: SupportedScopes): ${apiName}Connection\n`;
54336
+ const recordQueries = `${apiName}(first: Int, after: String, where: ${apiName}_Filter, orderBy: ${apiName}_OrderBy, scope: SupportedScopes): ${apiName}Connection\n`;
54234
54337
  const isServiceAppointment = apiName === 'ServiceAppointment';
54235
54338
  const recordConnections = /* GraphQL */ `
54236
54339
  ${isServiceAppointment ? `scalar ${apiName.toUpperCase()}_SCOPE` : ''}
@@ -54252,6 +54355,7 @@ function createNewRecordQuery(schema, objectInfo, objectInfoMap) {
54252
54355
  edges: [${apiName}Edge]
54253
54356
  pageInfo: PageInfo!
54254
54357
  totalCount: Int!
54358
+ pageResultCount: Int!
54255
54359
  }
54256
54360
 
54257
54361
  type ${apiName}Edge {
@@ -54333,7 +54437,7 @@ function makeSpanningRecordConnections(schema, childRelationships, objectInfoMap
54333
54437
  }
54334
54438
  if (objectInfoMap[childObjectApiName] !== undefined &&
54335
54439
  !existingParentRelationships.has(relationshipName)) {
54336
- spanningRecordConnections += `${relationshipName}(first: Int, where: ${childObjectApiName}_Filter, orderBy: ${childObjectApiName}_OrderBy, scope: SupportedScopes): ${childObjectApiName}Connection \n`;
54440
+ spanningRecordConnections += `${relationshipName}(first: Int, after: String, where: ${childObjectApiName}_Filter, orderBy: ${childObjectApiName}_OrderBy, scope: SupportedScopes): ${childObjectApiName}Connection \n`;
54337
54441
  // if the record type has already been extended then these additional scalars have already been added
54338
54442
  // to add them again would throw an error
54339
54443
  const filterScalarType = schema.getType(`${childObjectApiName}_Filter`);
@@ -56146,7 +56250,7 @@ function createFieldNode(nameValue, selectionSet) {
56146
56250
  */
56147
56251
 
56148
56252
 
56149
- const { keys: keys$3$1, values: values$1, create: create$3$1, assign: assign$3, freeze: freeze$3 } = Object;
56253
+ const { keys: keys$3$1, values: values$1, create: create$3$1, assign: assign$3, freeze: freeze$3, entries: entries$3 } = Object;
56150
56254
  const { stringify: stringify$3, parse: parse$3 } = JSON;
56151
56255
  const { shift } = Array.prototype;
56152
56256
  const { isArray: isArray$1$1, from: from$1 } = Array;
@@ -57553,7 +57657,7 @@ function getDenormalizedKey(originalKey, recordId, luvio) {
57553
57657
  }
57554
57658
  return keyBuilder$26(luvio, { recordId });
57555
57659
  }
57556
- function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore) {
57660
+ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore, sqlStore) {
57557
57661
  const getEntries = function (entries, segment) {
57558
57662
  // this HOF only inspects records in the default segment
57559
57663
  if (segment !== DefaultDurableSegment) {
@@ -57615,7 +57719,10 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
57615
57719
  });
57616
57720
  };
57617
57721
  const denormalizeEntries = function (entries) {
57722
+ let hasEntries = false;
57723
+ let hasMetadata = false;
57618
57724
  const putEntries = create$3$1(null);
57725
+ const putMetadata = create$3$1(null);
57619
57726
  const keys$1 = keys$3$1(entries);
57620
57727
  const putRecords = {};
57621
57728
  const putRecordViews = {};
@@ -57658,6 +57765,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
57658
57765
  putRecords[recordId] = true;
57659
57766
  }
57660
57767
  if (isStoreRecordError(record)) {
57768
+ hasEntries = true;
57661
57769
  putEntries[recordKey] = value;
57662
57770
  continue;
57663
57771
  }
@@ -57670,24 +57778,43 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
57670
57778
  }
57671
57779
  const denormalizedRecord = buildDurableRecordRepresentation(record, storeRecords, recordEntries, store);
57672
57780
  if (denormalizedRecord !== undefined) {
57781
+ hasEntries = true;
57673
57782
  putEntries[recordKey] = {
57674
57783
  data: denormalizedRecord,
57675
57784
  metadata,
57676
57785
  };
57786
+ // if undefined then it is pending
57787
+ // we should still update metadata on pending records
57788
+ }
57789
+ else {
57790
+ hasMetadata = true;
57791
+ metadata.expirationTimestamp = metadata.ingestionTimestamp;
57792
+ putMetadata[recordKey] = {
57793
+ metadata,
57794
+ };
57677
57795
  }
57678
57796
  }
57679
57797
  else {
57798
+ hasEntries = true;
57680
57799
  putEntries[key] = value;
57681
57800
  }
57682
57801
  }
57683
- return putEntries;
57802
+ return { putEntries, putMetadata, hasEntries, hasMetadata };
57684
57803
  };
57685
57804
  const setEntries = function (entries, segment) {
57686
57805
  if (segment !== DefaultDurableSegment) {
57687
57806
  return durableStore.setEntries(entries, segment);
57688
57807
  }
57689
- const putEntries = denormalizeEntries(entries);
57690
- return durableStore.setEntries(putEntries, segment);
57808
+ const { putEntries, putMetadata, hasEntries, hasMetadata } = denormalizeEntries(entries);
57809
+ const promises = [
57810
+ hasEntries ? durableStore.setEntries(putEntries, segment) : undefined,
57811
+ ];
57812
+ if (sqlStore !== undefined && sqlStore.isBatchUpdateSupported()) {
57813
+ promises.push(hasMetadata && sqlStore !== undefined
57814
+ ? durableStore.setMetadata(putMetadata, segment)
57815
+ : undefined);
57816
+ }
57817
+ return Promise.all(promises).then(() => { });
57691
57818
  };
57692
57819
  const batchOperations = function (operations) {
57693
57820
  const operationsWithDenormedRecords = [];
@@ -57704,10 +57831,20 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
57704
57831
  // this is determined by the plugin supporting update batch calls before it gets to this HOF.
57705
57832
  // so we only need to check one entry to confirm this for performance
57706
57833
  if (firstEntry.data !== undefined) {
57834
+ const { putEntries, putMetadata, hasMetadata } = denormalizeEntries(operation.entries);
57707
57835
  operationsWithDenormedRecords.push({
57708
57836
  ...operation,
57709
- entries: denormalizeEntries(operation.entries),
57837
+ entries: putEntries,
57710
57838
  });
57839
+ if (hasMetadata &&
57840
+ sqlStore !== undefined &&
57841
+ sqlStore.isBatchUpdateSupported() === true) {
57842
+ operationsWithDenormedRecords.push({
57843
+ ...operation,
57844
+ entries: putMetadata,
57845
+ type: 'setMetadata',
57846
+ });
57847
+ }
57711
57848
  }
57712
57849
  else {
57713
57850
  operationsWithDenormedRecords.push(operation);
@@ -57719,10 +57856,20 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
57719
57856
  operationsWithDenormedRecords.push(operation);
57720
57857
  continue;
57721
57858
  }
57859
+ const { putEntries, putMetadata, hasMetadata } = denormalizeEntries(operation.entries);
57722
57860
  operationsWithDenormedRecords.push({
57723
57861
  ...operation,
57724
- entries: denormalizeEntries(operation.entries),
57862
+ entries: putEntries,
57725
57863
  });
57864
+ if (hasMetadata &&
57865
+ sqlStore !== undefined &&
57866
+ sqlStore.isBatchUpdateSupported() === true) {
57867
+ operationsWithDenormedRecords.push({
57868
+ ...operation,
57869
+ entries: putMetadata,
57870
+ type: 'setMetadata',
57871
+ });
57872
+ }
57726
57873
  }
57727
57874
  return durableStore.batchOperations(operationsWithDenormedRecords);
57728
57875
  };
@@ -60704,6 +60851,9 @@ class NimbusSqliteStore {
60704
60851
  isEvalSupported() {
60705
60852
  return true;
60706
60853
  }
60854
+ isBatchUpdateSupported() {
60855
+ return this.supportsBatchUpdates;
60856
+ }
60707
60857
  query(sql, params) {
60708
60858
  return new Promise((resolve, reject) => {
60709
60859
  this.plugin.query(sql, params, (result) => {
@@ -62389,7 +62539,7 @@ function getRuntime() {
62389
62539
  let getIngestRecords;
62390
62540
  let getIngestMetadata;
62391
62541
  let getIngestStore;
62392
- const recordDenormingStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => (getIngestRecords !== undefined ? getIngestRecords() : {}), () => (getIngestMetadata !== undefined ? getIngestMetadata() : {}), () => (getIngestStore !== undefined ? getIngestStore() : undefined));
62542
+ const recordDenormingStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => (getIngestRecords !== undefined ? getIngestRecords() : {}), () => (getIngestMetadata !== undefined ? getIngestMetadata() : {}), () => (getIngestStore !== undefined ? getIngestStore() : undefined), lazyBaseDurableStore);
62393
62543
  const baseEnv = new Environment(store, lazyNetworkAdapter);
62394
62544
  const gqlEnv = makeEnvironmentGraphqlAware(baseEnv);
62395
62545
  const durableEnv = makeDurable(gqlEnv, {
@@ -62499,7 +62649,7 @@ register$1({
62499
62649
  id: '@salesforce/lds-network-adapter',
62500
62650
  instrument: instrument$2,
62501
62651
  });
62502
- // version: 1.292.0-db5dc5800
62652
+ // version: 1.294.0-06a44f23f
62503
62653
 
62504
62654
  const { create: create$3, keys: keys$3 } = Object;
62505
62655
  const { stringify: stringify$1, parse: parse$1 } = JSON;
@@ -80954,6 +81104,11 @@ function selectTypeLinkWithPagination(resolvedLink, sel, fieldData, reader, key,
80954
81104
  const parentRecordId = resolvedLink.recordId;
80955
81105
  const totalEdges = source.edges !== undefined ? source.edges.length : 0;
80956
81106
  const metadata = reader.resolveMetadata(source, PAGINATION_VERSION);
81107
+ if (metadata === undefined) {
81108
+ reader.markMissingLink(fieldData.__ref);
81109
+ reader.markMissing();
81110
+ return;
81111
+ }
80957
81112
  const firstArg = (_a = sel.arguments) === null || _a === void 0 ? void 0 : _a.find(argument => { return argument.name.value === 'first'; });
80958
81113
  const firstArgVal = evaluateArgumentValue(firstArg, 'IntValue', variables);
80959
81114
  const pageSize = firstArgVal !== undefined ? firstArgVal : totalEdges;
@@ -80964,7 +81119,7 @@ function selectTypeLinkWithPagination(resolvedLink, sel, fieldData, reader, key,
80964
81119
  token: afterArgVal
80965
81120
  };
80966
81121
  let { startOffset, endOffset } = getPageMetadata(metadata, paginationParams);
80967
- const listIsComplete = ((metadata === null || metadata === void 0 ? void 0 : metadata.__END__) !== undefined);
81122
+ const listIsComplete = (metadata.__END__ !== undefined);
80968
81123
  let trimmedEdges = [];
80969
81124
  let maxOffset = undefined;
80970
81125
  if (totalEdges === 0 && listIsComplete) {
@@ -80977,7 +81132,7 @@ function selectTypeLinkWithPagination(resolvedLink, sel, fieldData, reader, key,
80977
81132
  }
80978
81133
  }
80979
81134
  else {
80980
- if (metadata === undefined || startOffset === undefined || endOffset === undefined) {
81135
+ if (startOffset === undefined || endOffset === undefined) {
80981
81136
  reader.markMissingLink(fieldData.__ref);
80982
81137
  reader.markMissing();
80983
81138
  return;
@@ -82563,7 +82718,7 @@ register$1({
82563
82718
  configuration: { ...configurationForGraphQLAdapters$1 },
82564
82719
  instrument: instrument$1,
82565
82720
  });
82566
- // version: 1.292.0-5ad1fe2ca
82721
+ // version: 1.294.0-e7eb16228
82567
82722
 
82568
82723
  // On core the unstable adapters are re-exported with different names,
82569
82724
  // we want to match them here.
@@ -84819,7 +84974,7 @@ withDefaultLuvio((luvio) => {
84819
84974
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
84820
84975
  graphQLImperative = ldsAdapter;
84821
84976
  });
84822
- // version: 1.292.0-5ad1fe2ca
84977
+ // version: 1.294.0-e7eb16228
84823
84978
 
84824
84979
  var gqlApi = /*#__PURE__*/Object.freeze({
84825
84980
  __proto__: null,
@@ -85557,7 +85712,7 @@ const callbacks$1 = [];
85557
85712
  function register(r) {
85558
85713
  callbacks$1.forEach((callback) => callback(r));
85559
85714
  }
85560
- // version: 1.292.0-db5dc5800
85715
+ // version: 1.294.0-06a44f23f
85561
85716
 
85562
85717
  /**
85563
85718
  * Returns true if the value acts like a Promise, i.e. has a "then" function,
@@ -90519,4 +90674,4 @@ const { luvio } = getRuntime();
90519
90674
  setDefaultLuvio({ luvio });
90520
90675
 
90521
90676
  export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
90522
- // version: 1.292.0-db5dc5800
90677
+ // version: 1.294.0-06a44f23f