@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.
- package/dist/sfdc/es/ldsWorkerApi.js +1 -1
- package/dist/standalone/es/lds-worker-api.js +406 -251
- package/dist/standalone/umd/lds-worker-api.js +406 -251
- package/package.json +10 -10
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
SnapshotState["Stale"] = "Stale";
|
|
27
27
|
})(SnapshotState$3 || (SnapshotState$3 = {}));
|
|
28
28
|
|
|
29
|
-
const { create: create$b, entries: entries$
|
|
29
|
+
const { create: create$b, entries: entries$6, freeze: freeze$6, keys: keys$c, values: values$5, assign: assign$a } = Object;
|
|
30
30
|
const { hasOwnProperty: hasOwnProperty$3 } = Object.prototype;
|
|
31
31
|
const { isArray: isArray$9 } = Array;
|
|
32
32
|
const { push: push$5, indexOf, slice: slice$2 } = Array.prototype;
|
|
@@ -904,6 +904,9 @@
|
|
|
904
904
|
delete this.records[canonicalKey];
|
|
905
905
|
this.markVisited(canonicalKey);
|
|
906
906
|
}
|
|
907
|
+
cleanup() {
|
|
908
|
+
this.scheduleTrim();
|
|
909
|
+
}
|
|
907
910
|
/**
|
|
908
911
|
* Deallocates data at the canonical key location for in-memory (L1) cache
|
|
909
912
|
* @param key key to deallocate
|
|
@@ -1606,6 +1609,11 @@
|
|
|
1606
1609
|
this.recordsMap.delete(canonicalKey);
|
|
1607
1610
|
this.markVisited(canonicalKey);
|
|
1608
1611
|
}
|
|
1612
|
+
cleanup() {
|
|
1613
|
+
if (this.fallbackStringKeyInMemoryStore.pendingTrimKeys.size > 0) {
|
|
1614
|
+
this.fallbackStringKeyInMemoryStore.cleanup();
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1609
1617
|
/**
|
|
1610
1618
|
* Deallocates data at the canonical key location for in-memory (L1) cache
|
|
1611
1619
|
* @param key key to deallocate
|
|
@@ -3411,6 +3419,9 @@
|
|
|
3411
3419
|
storeLookup(sel, createSnapshot, refresh, ttlStrategy) {
|
|
3412
3420
|
return this.store.lookup(sel, createSnapshot, refresh, ttlStrategy);
|
|
3413
3421
|
}
|
|
3422
|
+
storeCleanup() {
|
|
3423
|
+
this.store.cleanup();
|
|
3424
|
+
}
|
|
3414
3425
|
storeEvict(key) {
|
|
3415
3426
|
this.store.evict(key);
|
|
3416
3427
|
}
|
|
@@ -3680,6 +3691,9 @@
|
|
|
3680
3691
|
storeEvict(key) {
|
|
3681
3692
|
this.environment.storeEvict(key);
|
|
3682
3693
|
}
|
|
3694
|
+
storeCleanup() {
|
|
3695
|
+
this.environment.storeCleanup();
|
|
3696
|
+
}
|
|
3683
3697
|
createSnapshot(selector, refresh) {
|
|
3684
3698
|
return this.environment.createSnapshot(selector, refresh);
|
|
3685
3699
|
}
|
|
@@ -4068,7 +4082,7 @@
|
|
|
4068
4082
|
}
|
|
4069
4083
|
return resourceParams;
|
|
4070
4084
|
}
|
|
4071
|
-
// engine version: 0.154.
|
|
4085
|
+
// engine version: 0.154.20-1c52d927
|
|
4072
4086
|
|
|
4073
4087
|
/**
|
|
4074
4088
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4196,7 +4210,7 @@
|
|
|
4196
4210
|
}
|
|
4197
4211
|
callbacks.push(callback);
|
|
4198
4212
|
}
|
|
4199
|
-
// version: 1.
|
|
4213
|
+
// version: 1.294.0-06a44f23f
|
|
4200
4214
|
|
|
4201
4215
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4202
4216
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15704,7 +15718,7 @@
|
|
|
15704
15718
|
}
|
|
15705
15719
|
return superResult;
|
|
15706
15720
|
}
|
|
15707
|
-
// version: 1.
|
|
15721
|
+
// version: 1.294.0-06a44f23f
|
|
15708
15722
|
|
|
15709
15723
|
function unwrap(data) {
|
|
15710
15724
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16362,12 +16376,16 @@
|
|
|
16362
16376
|
callback(snapshotToTuple$1(snapshotOrPromise));
|
|
16363
16377
|
return;
|
|
16364
16378
|
}
|
|
16365
|
-
snapshotOrPromise
|
|
16379
|
+
snapshotOrPromise
|
|
16380
|
+
.then((snapshot) => {
|
|
16366
16381
|
if (snapshot === null) {
|
|
16367
16382
|
callback(createInvalidConfigError$1());
|
|
16368
16383
|
return;
|
|
16369
16384
|
}
|
|
16370
16385
|
callback(snapshotToTuple$1(snapshot));
|
|
16386
|
+
})
|
|
16387
|
+
.finally(() => {
|
|
16388
|
+
luvio.storeCleanup();
|
|
16371
16389
|
});
|
|
16372
16390
|
};
|
|
16373
16391
|
defineProperty(imperativeAdapterInvoke, 'name', {
|
|
@@ -16629,7 +16647,7 @@
|
|
|
16629
16647
|
const { apiFamily, name } = metadata;
|
|
16630
16648
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16631
16649
|
}
|
|
16632
|
-
// version: 1.
|
|
16650
|
+
// version: 1.294.0-06a44f23f
|
|
16633
16651
|
|
|
16634
16652
|
/**
|
|
16635
16653
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -16728,7 +16746,7 @@
|
|
|
16728
16746
|
TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
|
|
16729
16747
|
TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
|
|
16730
16748
|
})(TypeCheckShapes || (TypeCheckShapes = {}));
|
|
16731
|
-
// engine version: 0.154.
|
|
16749
|
+
// engine version: 0.154.20-1c52d927
|
|
16732
16750
|
|
|
16733
16751
|
const { keys: ObjectKeys$3, create: ObjectCreate$3 } = Object;
|
|
16734
16752
|
|
|
@@ -17718,20 +17736,23 @@
|
|
|
17718
17736
|
});
|
|
17719
17737
|
}
|
|
17720
17738
|
|
|
17739
|
+
const keyBuilderFromType$E = function ListInfoRepresentationKeyBuilderFromType(luvio, object) {
|
|
17740
|
+
const keyParams = {
|
|
17741
|
+
listViewApiName: object.listReference.listViewApiName
|
|
17742
|
+
? object.listReference.listViewApiName.toLowerCase()
|
|
17743
|
+
: object.listReference.listViewApiName,
|
|
17744
|
+
objectApiName: object.listReference.objectApiName.toLowerCase(),
|
|
17745
|
+
type: object.listReference.type,
|
|
17746
|
+
};
|
|
17747
|
+
return keyBuilder$27(luvio, keyParams);
|
|
17748
|
+
};
|
|
17749
|
+
|
|
17721
17750
|
const TTL$A = 900000;
|
|
17722
17751
|
const VERSION$1e$1 = "c658fe1591386d570e214eaed0daadd1";
|
|
17723
17752
|
const RepresentationType$X = 'ListInfoRepresentation';
|
|
17724
17753
|
function keyBuilder$27(luvio, config) {
|
|
17725
17754
|
return keyPrefix$2 + '::' + RepresentationType$X + ':' + (config.listViewApiName === null ? '' : config.listViewApiName) + ':' + config.objectApiName + ':' + config.type;
|
|
17726
17755
|
}
|
|
17727
|
-
function keyBuilderFromType$E(luvio, object) {
|
|
17728
|
-
const keyParams = {
|
|
17729
|
-
listViewApiName: object.listReference.listViewApiName,
|
|
17730
|
-
objectApiName: object.listReference.objectApiName,
|
|
17731
|
-
type: object.listReference.type
|
|
17732
|
-
};
|
|
17733
|
-
return keyBuilder$27(luvio, keyParams);
|
|
17734
|
-
}
|
|
17735
17756
|
function normalize$Q(input, existing, path, luvio, store, timestamp) {
|
|
17736
17757
|
const input_displayColumns = input.displayColumns;
|
|
17737
17758
|
const input_displayColumns_id = path.fullPath + '__displayColumns';
|
|
@@ -21719,21 +21740,24 @@
|
|
|
21719
21740
|
return [tokenResult, offsetResult];
|
|
21720
21741
|
}
|
|
21721
21742
|
|
|
21722
|
-
const
|
|
21723
|
-
const VERSION$18$1 = "e5c90c4081cd557f8ffec53028ede1e8";
|
|
21724
|
-
const RepresentationType$T = 'ListRecordCollectionRepresentation';
|
|
21725
|
-
function keyBuilder$23(luvio, config) {
|
|
21726
|
-
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);
|
|
21727
|
-
}
|
|
21728
|
-
function keyBuilderFromType$B(luvio, object) {
|
|
21743
|
+
const keyBuilderFromType$B = function ListRecordCollectionRepresentationKeyBuilderFromType(luvio, object) {
|
|
21729
21744
|
const keyParams = {
|
|
21730
|
-
objectApiName: object.listReference.objectApiName,
|
|
21745
|
+
objectApiName: object.listReference.objectApiName.toLowerCase(),
|
|
21731
21746
|
searchTerm: object.searchTerm,
|
|
21732
21747
|
sortBy: object.sortBy,
|
|
21733
21748
|
where: object.where,
|
|
21734
21749
|
listViewApiName: object.listReference.listViewApiName
|
|
21750
|
+
? object.listReference.listViewApiName.toLowerCase()
|
|
21751
|
+
: object.listReference.listViewApiName,
|
|
21735
21752
|
};
|
|
21736
21753
|
return keyBuilder$23(luvio, keyParams);
|
|
21754
|
+
};
|
|
21755
|
+
|
|
21756
|
+
const TTL$x = 30000;
|
|
21757
|
+
const VERSION$18$1 = "e5c90c4081cd557f8ffec53028ede1e8";
|
|
21758
|
+
const RepresentationType$T = 'ListRecordCollectionRepresentation';
|
|
21759
|
+
function keyBuilder$23(luvio, config) {
|
|
21760
|
+
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);
|
|
21737
21761
|
}
|
|
21738
21762
|
function paginationKeyBuilder(luvio, config) {
|
|
21739
21763
|
return keyBuilder$23(luvio, config) + '__pagination';
|
|
@@ -22743,8 +22767,8 @@
|
|
|
22743
22767
|
let listRecordCollectionCache = new Map();
|
|
22744
22768
|
let listSummaryCollectionCache = new Map();
|
|
22745
22769
|
function getListRecordCollectionKeys(objectApiName, listViewApiName) {
|
|
22746
|
-
const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName) || new Map();
|
|
22747
|
-
const keys = cacheEntriesByObjectApiName.get(listViewApiName) || [];
|
|
22770
|
+
const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName.toLowerCase()) || new Map();
|
|
22771
|
+
const keys = cacheEntriesByObjectApiName.get(listViewApiName.toLowerCase()) || [];
|
|
22748
22772
|
return [...keys];
|
|
22749
22773
|
}
|
|
22750
22774
|
function getListSummaryCollectionKeys(objectApiName, recentLists = undefined) {
|
|
@@ -22776,8 +22800,8 @@
|
|
|
22776
22800
|
keys.add(key);
|
|
22777
22801
|
}
|
|
22778
22802
|
function removeListRecordCollectionKeys(objectApiName, listViewApiName) {
|
|
22779
|
-
const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName) || new Map();
|
|
22780
|
-
cacheEntriesByObjectApiName.delete(listViewApiName);
|
|
22803
|
+
const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName.toLowerCase()) || new Map();
|
|
22804
|
+
cacheEntriesByObjectApiName.delete(listViewApiName.toLowerCase());
|
|
22781
22805
|
}
|
|
22782
22806
|
function removeListSummaryCollectionKeys(objectApiName, recentLists = undefined) {
|
|
22783
22807
|
const cacheEntriesByObjectApiName = listSummaryCollectionCache.get(objectApiName) || new Map();
|
|
@@ -22829,7 +22853,7 @@
|
|
|
22829
22853
|
return `listReferenceById::${listViewId}`;
|
|
22830
22854
|
}
|
|
22831
22855
|
function buildListRefByApiNameContextKey(objectApiName, listViewApiName) {
|
|
22832
|
-
return `listReferenceByApiName::${objectApiName}:${listViewApiName}`;
|
|
22856
|
+
return `listReferenceByApiName::${objectApiName.toLowerCase()}:${listViewApiName.toLowerCase()}`;
|
|
22833
22857
|
}
|
|
22834
22858
|
/**
|
|
22835
22859
|
* Adds a list reference so it can be retrieved with #getListReference later.
|
|
@@ -22885,7 +22909,12 @@
|
|
|
22885
22909
|
* @param luvio Luvio
|
|
22886
22910
|
*/
|
|
22887
22911
|
function getListInfo(luvio, listRef, storeLookup) {
|
|
22888
|
-
|
|
22912
|
+
let mutatedListRef = { ...listRef };
|
|
22913
|
+
mutatedListRef.objectApiName = mutatedListRef.objectApiName.toLowerCase();
|
|
22914
|
+
mutatedListRef.listViewApiName = mutatedListRef.listViewApiName
|
|
22915
|
+
? mutatedListRef.listViewApiName.toLowerCase()
|
|
22916
|
+
: mutatedListRef.listViewApiName;
|
|
22917
|
+
const key = keyBuilder$27(luvio, { ...mutatedListRef });
|
|
22889
22918
|
return storeLookup({
|
|
22890
22919
|
recordId: key,
|
|
22891
22920
|
node: {
|
|
@@ -22899,7 +22928,7 @@
|
|
|
22899
22928
|
}
|
|
22900
22929
|
function buildDefaultsKey(listRef) {
|
|
22901
22930
|
const { objectApiName, listViewApiName } = listRef;
|
|
22902
|
-
return `defaults::${objectApiName}:${listViewApiName}`;
|
|
22931
|
+
return `defaults::${objectApiName.toLowerCase()}:${listViewApiName ? listViewApiName.toLowerCase() : listViewApiName}`;
|
|
22903
22932
|
}
|
|
22904
22933
|
/**
|
|
22905
22934
|
* Update the default values based on a server response.
|
|
@@ -23074,9 +23103,11 @@
|
|
|
23074
23103
|
context$1 = adapterContext;
|
|
23075
23104
|
}
|
|
23076
23105
|
function keyBuilder$1$(luvio, params) {
|
|
23106
|
+
// lists data can now be fetched using case insensitive urlParams therefore
|
|
23107
|
+
// also changing contextStore to use lowercase caching
|
|
23077
23108
|
const query = {
|
|
23078
|
-
objectApiName: params.urlParams.objectApiName,
|
|
23079
|
-
listViewApiName: params.urlParams.listViewApiName,
|
|
23109
|
+
objectApiName: params.urlParams.objectApiName.toLowerCase(),
|
|
23110
|
+
listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
|
|
23080
23111
|
};
|
|
23081
23112
|
// Fetch listReference from internal store to better ensure a cache hit regardless of listViewApiName or listViewId
|
|
23082
23113
|
const listReference = getListReference(query, context$1);
|
|
@@ -23086,8 +23117,10 @@
|
|
|
23086
23117
|
const defaults = getServerDefaults(config, context$1);
|
|
23087
23118
|
// Use default values when sortBy is undefined or an empty Array []
|
|
23088
23119
|
return keyBuilder$23(luvio, {
|
|
23089
|
-
objectApiName: listReference.objectApiName,
|
|
23090
|
-
listViewApiName: listReference.listViewApiName
|
|
23120
|
+
objectApiName: listReference.objectApiName.toLowerCase(),
|
|
23121
|
+
listViewApiName: listReference.listViewApiName
|
|
23122
|
+
? listReference.listViewApiName.toLowerCase()
|
|
23123
|
+
: listReference.listViewApiName,
|
|
23091
23124
|
// # removing listViewId from key only supporing getting records using api name
|
|
23092
23125
|
// listViewId: listReference.id,
|
|
23093
23126
|
searchTerm: params.body.searchTerm || null,
|
|
@@ -23100,8 +23133,8 @@
|
|
|
23100
23133
|
// If there are no matching entries in the store, then we haven't fetched any data for this list view yet.
|
|
23101
23134
|
// Assuming that listViewId is empty and continue on
|
|
23102
23135
|
return keyBuilder$23(luvio, {
|
|
23103
|
-
objectApiName: params.urlParams.objectApiName,
|
|
23104
|
-
listViewApiName: params.urlParams.listViewApiName,
|
|
23136
|
+
objectApiName: params.urlParams.objectApiName.toLowerCase(),
|
|
23137
|
+
listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
|
|
23105
23138
|
// # removing listViewId from key only supporing getting records using api name
|
|
23106
23139
|
// listViewId: '',
|
|
23107
23140
|
searchTerm: params.body.searchTerm || null,
|
|
@@ -24048,8 +24081,10 @@
|
|
|
24048
24081
|
searchTerm: null,
|
|
24049
24082
|
where: null,
|
|
24050
24083
|
sortBy: config.sortBy === undefined ? null : config.sortBy,
|
|
24051
|
-
objectApiName: listInfo.listReference.objectApiName,
|
|
24052
|
-
listViewApiName: listInfo.listReference.listViewApiName
|
|
24084
|
+
objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
|
|
24085
|
+
listViewApiName: listInfo.listReference.listViewApiName
|
|
24086
|
+
? listInfo.listReference.listViewApiName.toLowerCase()
|
|
24087
|
+
: listInfo.listReference.listViewApiName,
|
|
24053
24088
|
});
|
|
24054
24089
|
const selector = {
|
|
24055
24090
|
recordId: paginationKey,
|
|
@@ -24096,8 +24131,10 @@
|
|
|
24096
24131
|
searchTerm: null,
|
|
24097
24132
|
where: null,
|
|
24098
24133
|
sortBy: body.sortBy,
|
|
24099
|
-
objectApiName: listInfo.listReference.objectApiName,
|
|
24100
|
-
listViewApiName: listInfo.listReference.listViewApiName
|
|
24134
|
+
objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
|
|
24135
|
+
listViewApiName: listInfo.listReference.listViewApiName
|
|
24136
|
+
? listInfo.listReference.listViewApiName.toLowerCase()
|
|
24137
|
+
: listInfo.listReference.listViewApiName,
|
|
24101
24138
|
}), ingest$M$1, body);
|
|
24102
24139
|
const snapshot = buildCachedSnapshot$8(luvio, luvio.storeLookup.bind(luvio), config, listInfo, fields);
|
|
24103
24140
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
@@ -24145,7 +24182,7 @@
|
|
|
24145
24182
|
return getListInfo(luvio, {
|
|
24146
24183
|
id: null,
|
|
24147
24184
|
listViewApiName: null,
|
|
24148
|
-
objectApiName: config.objectApiName,
|
|
24185
|
+
objectApiName: config.objectApiName.toLowerCase(),
|
|
24149
24186
|
type: 'mru',
|
|
24150
24187
|
}, storeLookup);
|
|
24151
24188
|
}
|
|
@@ -24431,8 +24468,10 @@
|
|
|
24431
24468
|
searchTerm: null,
|
|
24432
24469
|
where: null,
|
|
24433
24470
|
sortBy: getSortBy(config, context),
|
|
24434
|
-
objectApiName: listInfo.listReference.objectApiName,
|
|
24435
|
-
listViewApiName: listInfo.listReference.listViewApiName
|
|
24471
|
+
objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
|
|
24472
|
+
listViewApiName: listInfo.listReference.listViewApiName
|
|
24473
|
+
? listInfo.listReference.listViewApiName.toLowerCase()
|
|
24474
|
+
: listInfo.listReference.listViewApiName,
|
|
24436
24475
|
});
|
|
24437
24476
|
const selector = {
|
|
24438
24477
|
recordId: paginationKey,
|
|
@@ -24482,8 +24521,10 @@
|
|
|
24482
24521
|
searchTerm: null,
|
|
24483
24522
|
where: null,
|
|
24484
24523
|
sortBy: body.sortBy,
|
|
24485
|
-
objectApiName: listInfo.listReference.objectApiName,
|
|
24486
|
-
listViewApiName: listInfo.listReference.listViewApiName
|
|
24524
|
+
objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
|
|
24525
|
+
listViewApiName: listInfo.listReference.listViewApiName
|
|
24526
|
+
? listInfo.listReference.listViewApiName.toLowerCase()
|
|
24527
|
+
: listInfo.listReference.listViewApiName,
|
|
24487
24528
|
}), ingest$M$1, body);
|
|
24488
24529
|
const snapshot = buildCachedSnapshot$7(luvio, luvio.storeLookup.bind(luvio), context, config, listInfo, fields);
|
|
24489
24530
|
releaseKeys();
|
|
@@ -26414,8 +26455,14 @@
|
|
|
26414
26455
|
// We automatically set the type based on the listViewApiName, and we need to do the same
|
|
26415
26456
|
// here for key matching and validation
|
|
26416
26457
|
configs.forEach((config) => {
|
|
26458
|
+
config.listViewApiName = config.listViewApiName
|
|
26459
|
+
? config.listViewApiName.toLowerCase()
|
|
26460
|
+
: config.listViewApiName;
|
|
26461
|
+
config.objectApiName = config.objectApiName
|
|
26462
|
+
? config.objectApiName.toLowerCase()
|
|
26463
|
+
: config.objectApiName;
|
|
26417
26464
|
if (!config.type) {
|
|
26418
|
-
config.type = config.listViewApiName === '
|
|
26465
|
+
config.type = config.listViewApiName === '__recent' ? 'mru' : 'listView';
|
|
26419
26466
|
}
|
|
26420
26467
|
});
|
|
26421
26468
|
return generated_notifyUpdateAvailable(configs);
|
|
@@ -30966,9 +31013,9 @@
|
|
|
30966
31013
|
|
|
30967
31014
|
function keyBuilder$1c$1(luvio, params) {
|
|
30968
31015
|
return keyBuilder$27(luvio, {
|
|
30969
|
-
objectApiName: params.urlParams.objectApiName,
|
|
30970
|
-
listViewApiName: params.urlParams.listViewApiName,
|
|
30971
|
-
type: params.urlParams.listViewApiName === '
|
|
31016
|
+
objectApiName: params.urlParams.objectApiName.toLowerCase(),
|
|
31017
|
+
listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
|
|
31018
|
+
type: params.urlParams.listViewApiName.toLowerCase() === '__recent' ? 'mru' : 'listView',
|
|
30972
31019
|
});
|
|
30973
31020
|
}
|
|
30974
31021
|
|
|
@@ -44226,7 +44273,7 @@
|
|
|
44226
44273
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44227
44274
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44228
44275
|
});
|
|
44229
|
-
// version: 1.
|
|
44276
|
+
// version: 1.294.0-e7eb16228
|
|
44230
44277
|
|
|
44231
44278
|
var ldsIdempotencyWriteDisabled = {
|
|
44232
44279
|
isOpen: function (e) {
|
|
@@ -44411,7 +44458,7 @@
|
|
|
44411
44458
|
const { parse: parse$6, stringify: stringify$6 } = JSON;
|
|
44412
44459
|
const { join: join$2, push: push$2, unshift } = Array.prototype;
|
|
44413
44460
|
const { isArray: isArray$5 } = Array;
|
|
44414
|
-
const { entries: entries$
|
|
44461
|
+
const { entries: entries$5, keys: keys$8 } = Object;
|
|
44415
44462
|
|
|
44416
44463
|
const UI_API_BASE_URI = '/services/data/v62.0/ui-api';
|
|
44417
44464
|
|
|
@@ -44718,7 +44765,7 @@
|
|
|
44718
44765
|
if (fulfill === undefined) {
|
|
44719
44766
|
return null;
|
|
44720
44767
|
}
|
|
44721
|
-
const handlersMap = entries$
|
|
44768
|
+
const handlersMap = entries$5(inflightRequests);
|
|
44722
44769
|
for (let i = 0, len = handlersMap.length; i < len; i += 1) {
|
|
44723
44770
|
const [transactionKey, handlers] = handlersMap[i];
|
|
44724
44771
|
// check fulfillment against only the first handler ([0]) because it's equal or
|
|
@@ -51509,7 +51556,7 @@
|
|
|
51509
51556
|
(x.length === 0 || (x.length > 0 && Object.prototype.hasOwnProperty.call(x, x.length - 1))));
|
|
51510
51557
|
}
|
|
51511
51558
|
|
|
51512
|
-
const { create: create$4, keys: keys$4, values: values$2, entries: entries$
|
|
51559
|
+
const { create: create$4, keys: keys$4, values: values$2, entries: entries$4, assign: assign$4 } = Object;
|
|
51513
51560
|
const { stringify: stringify$4, parse: parse$4 } = JSON;
|
|
51514
51561
|
const { isArray: isArray$2$1, from: from$2 } = Array;
|
|
51515
51562
|
|
|
@@ -52257,7 +52304,7 @@
|
|
|
52257
52304
|
}
|
|
52258
52305
|
else {
|
|
52259
52306
|
//`field` match the filedInfo's apiName
|
|
52260
|
-
for (const [op, value] of entries$
|
|
52307
|
+
for (const [op, value] of entries$4(where[field])) {
|
|
52261
52308
|
const operator = operatorToSql(op);
|
|
52262
52309
|
/**
|
|
52263
52310
|
Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
|
|
@@ -52716,6 +52763,7 @@
|
|
|
52716
52763
|
${predicates.sql}
|
|
52717
52764
|
${orderBy.sql}
|
|
52718
52765
|
LIMIT ?
|
|
52766
|
+
OFFSET ?
|
|
52719
52767
|
`
|
|
52720
52768
|
.split('\n')
|
|
52721
52769
|
.map((line) => line.trim())
|
|
@@ -52728,6 +52776,7 @@
|
|
|
52728
52776
|
...predicates.bindings,
|
|
52729
52777
|
// limit binding
|
|
52730
52778
|
config.limit || 10,
|
|
52779
|
+
config.offset || 0,
|
|
52731
52780
|
];
|
|
52732
52781
|
return { sql: sql.trim(), bindings };
|
|
52733
52782
|
}
|
|
@@ -53445,32 +53494,6 @@
|
|
|
53445
53494
|
return ingestionTimestamp;
|
|
53446
53495
|
}
|
|
53447
53496
|
|
|
53448
|
-
// Code lifted from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
|
|
53449
|
-
// base64 character set, plus padding character (=)
|
|
53450
|
-
const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
53451
|
-
function btoaPolyfill(input) {
|
|
53452
|
-
let bitmap, a, b, c;
|
|
53453
|
-
let result = '', i = 0;
|
|
53454
|
-
const rest = input.length % 3; // To determine the final padding
|
|
53455
|
-
for (; i < input.length;) {
|
|
53456
|
-
if ((a = input.charCodeAt(i++)) > 255 ||
|
|
53457
|
-
(b = input.charCodeAt(i++)) > 255 ||
|
|
53458
|
-
(c = input.charCodeAt(i++)) > 255) {
|
|
53459
|
-
throw new TypeError('Failed base64ToAscii encoding: The string to be encoded contains characters outside of the Latin1 range. ' +
|
|
53460
|
-
input);
|
|
53461
|
-
}
|
|
53462
|
-
bitmap = (a << 16) | (b << 8) | c;
|
|
53463
|
-
result +=
|
|
53464
|
-
b64.charAt((bitmap >> 18) & 63) +
|
|
53465
|
-
b64.charAt((bitmap >> 12) & 63) +
|
|
53466
|
-
b64.charAt((bitmap >> 6) & 63) +
|
|
53467
|
-
b64.charAt(bitmap & 63);
|
|
53468
|
-
}
|
|
53469
|
-
// If there's need of padding, replace the last 'A's with equal signs
|
|
53470
|
-
return rest ? result.slice(0, rest - 3) + '==='.substring(rest) : result;
|
|
53471
|
-
}
|
|
53472
|
-
const base64encode = typeof btoa === 'function' ? btoa : btoaPolyfill;
|
|
53473
|
-
|
|
53474
53497
|
function findSpanningField(name) {
|
|
53475
53498
|
return (field) => {
|
|
53476
53499
|
return (field.apiName === name ||
|
|
@@ -53617,9 +53640,228 @@
|
|
|
53617
53640
|
];
|
|
53618
53641
|
}
|
|
53619
53642
|
|
|
53620
|
-
|
|
53621
|
-
|
|
53643
|
+
// Code lifted from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
|
|
53644
|
+
// base64 character set, plus padding character (=)
|
|
53645
|
+
const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
53646
|
+
const b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
|
|
53647
|
+
function btoaPolyfill(input) {
|
|
53648
|
+
let bitmap, a, b, c;
|
|
53649
|
+
let result = '', i = 0;
|
|
53650
|
+
const rest = input.length % 3; // To determine the final padding
|
|
53651
|
+
for (; i < input.length;) {
|
|
53652
|
+
if ((a = input.charCodeAt(i++)) > 255 ||
|
|
53653
|
+
(b = input.charCodeAt(i++)) > 255 ||
|
|
53654
|
+
(c = input.charCodeAt(i++)) > 255) {
|
|
53655
|
+
throw new TypeError('Failed base64ToAscii encoding: The string to be encoded contains characters outside of the Latin1 range. ' +
|
|
53656
|
+
input);
|
|
53657
|
+
}
|
|
53658
|
+
bitmap = (a << 16) | (b << 8) | c;
|
|
53659
|
+
result +=
|
|
53660
|
+
b64.charAt((bitmap >> 18) & 63) +
|
|
53661
|
+
b64.charAt((bitmap >> 12) & 63) +
|
|
53662
|
+
b64.charAt((bitmap >> 6) & 63) +
|
|
53663
|
+
b64.charAt(bitmap & 63);
|
|
53664
|
+
}
|
|
53665
|
+
// If there's need of padding, replace the last 'A's with equal signs
|
|
53666
|
+
return rest ? result.slice(0, rest - 3) + '==='.substring(rest) : result;
|
|
53667
|
+
}
|
|
53668
|
+
function atobPolyfill(data) {
|
|
53669
|
+
// atob can work with strings with whitespaces, even inside the encoded part,
|
|
53670
|
+
// but only \t, \n, \f, \r and ' ', which can be stripped.
|
|
53671
|
+
let string = String(data).replace(/[\t\n\f\r ]+/g, '');
|
|
53672
|
+
if (!b64re.test(string))
|
|
53673
|
+
throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
|
|
53674
|
+
// Adding the padding if missing, for semplicity
|
|
53675
|
+
string += '=='.slice(2 - (string.length & 3));
|
|
53676
|
+
var bitmap, result = '', r1, r2, i = 0;
|
|
53677
|
+
for (; i < string.length;) {
|
|
53678
|
+
bitmap =
|
|
53679
|
+
(b64.indexOf(string.charAt(i++)) << 18) |
|
|
53680
|
+
(b64.indexOf(string.charAt(i++)) << 12) |
|
|
53681
|
+
((r1 = b64.indexOf(string.charAt(i++))) << 6) |
|
|
53682
|
+
(r2 = b64.indexOf(string.charAt(i++)));
|
|
53683
|
+
result +=
|
|
53684
|
+
r1 === 64
|
|
53685
|
+
? String.fromCharCode((bitmap >> 16) & 255)
|
|
53686
|
+
: r2 === 64
|
|
53687
|
+
? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255)
|
|
53688
|
+
: String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255, bitmap & 255);
|
|
53689
|
+
}
|
|
53690
|
+
return result;
|
|
53691
|
+
}
|
|
53692
|
+
const base64encode = typeof btoa === 'function' ? btoa : btoaPolyfill;
|
|
53693
|
+
const base64decode = typeof atob === 'function' ? atob : atobPolyfill;
|
|
53694
|
+
|
|
53695
|
+
function cursorResolver(source) {
|
|
53696
|
+
return encodeV1Cursor(source.index);
|
|
53697
|
+
}
|
|
53698
|
+
function pageInfoResolver(source) {
|
|
53699
|
+
if (source.length === 0) {
|
|
53700
|
+
return {
|
|
53701
|
+
startCursor: null,
|
|
53702
|
+
endCursor: null,
|
|
53703
|
+
};
|
|
53704
|
+
}
|
|
53705
|
+
let startIndex = source[0].index;
|
|
53706
|
+
let endIndex = source[source.length - 1].index;
|
|
53707
|
+
return {
|
|
53708
|
+
startCursor: encodeV1Cursor(startIndex),
|
|
53709
|
+
endCursor: encodeV1Cursor(endIndex),
|
|
53710
|
+
};
|
|
53711
|
+
}
|
|
53712
|
+
function pageResultCountResolver(source) {
|
|
53713
|
+
return source.length;
|
|
53714
|
+
}
|
|
53715
|
+
function encodeV1Cursor(index) {
|
|
53716
|
+
return base64encode(`v1:${index}`);
|
|
53717
|
+
}
|
|
53718
|
+
const cursorRegex = /^v1:(?<index>\d+)$/;
|
|
53719
|
+
function decodeV1Cursor(base64cursor) {
|
|
53720
|
+
const cursor = base64decode(base64cursor);
|
|
53721
|
+
if (!cursor) {
|
|
53722
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
53723
|
+
throw new Error('Unable to parse cursor');
|
|
53724
|
+
}
|
|
53725
|
+
const found = cursor.match(cursorRegex);
|
|
53726
|
+
if (!found || !found.groups) {
|
|
53727
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
53728
|
+
throw new Error('Unable to parse cursor');
|
|
53729
|
+
}
|
|
53730
|
+
return Number(found.groups.index);
|
|
53731
|
+
}
|
|
53732
|
+
|
|
53733
|
+
/*
|
|
53734
|
+
resolves connections...
|
|
53735
|
+
*/
|
|
53736
|
+
async function connectionResolver(obj, args, context, info) {
|
|
53737
|
+
let { recordRepresentation: parentRecord, ingestionTimestamp = 0 } = obj;
|
|
53738
|
+
if (!parentRecord && excludeStaleRecordsGate.isOpen({ fallback: false })) {
|
|
53739
|
+
// at our record query we fetch each ingestion time stamp and pass it down to each lower resolver to query against
|
|
53740
|
+
ingestionTimestamp = await fetchIngestionTimeStampFromDatabase(info.fieldName, info, args, context.query);
|
|
53741
|
+
}
|
|
53742
|
+
const { query, objectInfos, draftFunctions } = context;
|
|
53743
|
+
let joins = [];
|
|
53744
|
+
let alias = info.fieldName;
|
|
53745
|
+
let childRelationshipFieldName = undefined;
|
|
53746
|
+
if (parentRecord) {
|
|
53747
|
+
context.seenRecordIds.add(parentRecord.id);
|
|
53748
|
+
const parentApiName = parentRecord.apiName;
|
|
53749
|
+
const parentObjectInfo = objectInfos[parentApiName];
|
|
53750
|
+
const childRelationship = parentObjectInfo &&
|
|
53751
|
+
parentObjectInfo.childRelationships.find((rel) => rel.relationshipName === info.fieldName);
|
|
53752
|
+
// or emit/throw if we want to report it
|
|
53753
|
+
if (!childRelationship)
|
|
53754
|
+
return [];
|
|
53755
|
+
alias = childRelationship.childObjectApiName;
|
|
53756
|
+
childRelationshipFieldName = childRelationship.fieldName;
|
|
53757
|
+
}
|
|
53758
|
+
// Alias starts as entity's ApiName
|
|
53759
|
+
const predicates = [
|
|
53760
|
+
...filterToPredicates(args.where, alias, alias, context.objectInfos, joins, draftFunctions),
|
|
53761
|
+
...scopeToPredicates(args.scope, context.settings),
|
|
53762
|
+
...childRelationshipToPredicates(childRelationshipFieldName, parentRecord ? parentRecord.id : undefined),
|
|
53763
|
+
];
|
|
53764
|
+
const scopeJoins = scopeToJoins(args.scope, context.settings);
|
|
53765
|
+
joins.push(...scopeJoins);
|
|
53766
|
+
let offset = 0;
|
|
53767
|
+
if (args.after) {
|
|
53768
|
+
offset = decodeV1Cursor(args.after) + 1;
|
|
53769
|
+
}
|
|
53770
|
+
// Alias starts as entity's ApiName
|
|
53771
|
+
const queryConfig = {
|
|
53772
|
+
alias,
|
|
53773
|
+
joins,
|
|
53774
|
+
predicates,
|
|
53775
|
+
orderBy: orderByToPredicate(args.orderBy, alias, alias, context.objectInfos),
|
|
53776
|
+
limit: args.first,
|
|
53777
|
+
offset: offset,
|
|
53778
|
+
ingestionTimestamp,
|
|
53779
|
+
};
|
|
53780
|
+
const { sql, bindings } = buildQuery(queryConfig);
|
|
53781
|
+
const results = await query(sql, bindings);
|
|
53782
|
+
//map each sql result with the ingestion timestamp to pass it down a level
|
|
53783
|
+
return results.rows
|
|
53784
|
+
.map((row) => parse$4(row[0]))
|
|
53785
|
+
.map((recordRepresentation, index) => {
|
|
53786
|
+
context.seenRecordIds.add(recordRepresentation.id);
|
|
53787
|
+
return {
|
|
53788
|
+
recordRepresentation,
|
|
53789
|
+
ingestionTimestamp,
|
|
53790
|
+
index: index + offset,
|
|
53791
|
+
};
|
|
53792
|
+
});
|
|
53793
|
+
}
|
|
53794
|
+
/**
|
|
53795
|
+
* Converts a childRelationship into a predicate
|
|
53796
|
+
* @param childRelationshipFieldName Reference ID field name to its parent record. A defined `childRelationshipFieldName` string indicates that a child relationship exists
|
|
53797
|
+
* and a relationship predicate needs to be put into place. For example, `ServiceAppointment` has a child relationship `ServiceResources`, whose entity name is `AssignedResource`.
|
|
53798
|
+
* 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`.
|
|
53799
|
+
* @param parentId prarent record Id
|
|
53800
|
+
* @returns predicate array consists at most 1 predicate
|
|
53801
|
+
*/
|
|
53802
|
+
function childRelationshipToPredicates(childRelationshipFieldName, parentId) {
|
|
53803
|
+
const predicates = [];
|
|
53804
|
+
if (childRelationshipFieldName !== undefined && parentId !== undefined) {
|
|
53805
|
+
predicates.push({
|
|
53806
|
+
type: PredicateType.single,
|
|
53807
|
+
leftPath: `$.fields.${childRelationshipFieldName}.value`,
|
|
53808
|
+
operator: '=',
|
|
53809
|
+
value: parentId,
|
|
53810
|
+
});
|
|
53811
|
+
}
|
|
53812
|
+
return predicates;
|
|
53813
|
+
}
|
|
53814
|
+
/**
|
|
53815
|
+
* fetches a query level ingestion time stamp from the L2 cache
|
|
53816
|
+
* if no query has been seen then the timestamp is 0
|
|
53817
|
+
* @param apiName
|
|
53818
|
+
* @param info
|
|
53819
|
+
* @param args
|
|
53820
|
+
* @param query
|
|
53821
|
+
* @returns
|
|
53822
|
+
*/
|
|
53823
|
+
async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
53824
|
+
const { operation, variableValues } = info;
|
|
53825
|
+
// if we cannot find the query key in the database then default to 0 as we assume we have not seen the query
|
|
53826
|
+
// and all the data is not stale
|
|
53827
|
+
let ingestionTimestamp = 0;
|
|
53828
|
+
if (info.fieldNodes.length > 0 && info.fieldNodes[0].arguments !== undefined) {
|
|
53829
|
+
const key = buildKeyStringForRecordQuery(operation,
|
|
53830
|
+
// join varables passed from query to the argument variables given from the AST
|
|
53831
|
+
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
53832
|
+
return readIngestionTimestampForKey(key, query);
|
|
53833
|
+
}
|
|
53834
|
+
return ingestionTimestamp;
|
|
53835
|
+
}
|
|
53836
|
+
/**
|
|
53837
|
+
* Builds the top level record query key based on AST data
|
|
53838
|
+
* @param operation
|
|
53839
|
+
* @param variables
|
|
53840
|
+
* @param argumentNodes
|
|
53841
|
+
* @param currentFieldName
|
|
53842
|
+
* @returns
|
|
53843
|
+
*/
|
|
53844
|
+
function buildKeyStringForRecordQuery(operation, variables, argumentNodes, currentFieldName) {
|
|
53845
|
+
const queryKey = buildQueryTypeStringKey$1({
|
|
53846
|
+
luvio: {},
|
|
53847
|
+
keyPrefix: 'UiApi',
|
|
53848
|
+
schemaName: 'uiapi',
|
|
53849
|
+
queryTypeName: 'Query',
|
|
53850
|
+
operationNode: operation,
|
|
53851
|
+
variables,
|
|
53852
|
+
fragmentMap: {},
|
|
53853
|
+
});
|
|
53854
|
+
const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
53855
|
+
const argumentString = filteredArgumentNodes.length > 0
|
|
53856
|
+
? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
|
|
53857
|
+
: '';
|
|
53858
|
+
return `${queryKey}__uiapi__query__${currentFieldName}${argumentString}`;
|
|
53859
|
+
}
|
|
53860
|
+
|
|
53861
|
+
function passThroughResolver(source) {
|
|
53862
|
+
return source;
|
|
53622
53863
|
}
|
|
53864
|
+
|
|
53623
53865
|
/**
|
|
53624
53866
|
*
|
|
53625
53867
|
* @param schema GraphQL Schema generated from ObjectInfos
|
|
@@ -53652,13 +53894,13 @@
|
|
|
53652
53894
|
}
|
|
53653
53895
|
if (type.name === 'Query') {
|
|
53654
53896
|
for (const field of fields) {
|
|
53655
|
-
field.resolve =
|
|
53897
|
+
field.resolve = passThroughResolver;
|
|
53656
53898
|
}
|
|
53657
53899
|
}
|
|
53658
53900
|
if (type.name === 'UIAPI') {
|
|
53659
53901
|
for (const field of fields) {
|
|
53660
53902
|
if (field.name === 'query') {
|
|
53661
|
-
field.resolve =
|
|
53903
|
+
field.resolve = passThroughResolver;
|
|
53662
53904
|
}
|
|
53663
53905
|
else {
|
|
53664
53906
|
const fieldName = field.name;
|
|
@@ -53685,23 +53927,7 @@
|
|
|
53685
53927
|
// Fields of the `RecordQuery` type are the record queries for the entity types
|
|
53686
53928
|
// supported for the org
|
|
53687
53929
|
for (const recordQuery of fields) {
|
|
53688
|
-
recordQuery.resolve =
|
|
53689
|
-
const { name: currentFieldName } = recordQuery;
|
|
53690
|
-
let ingestionTimestamp = 0;
|
|
53691
|
-
if (excludeStaleRecordsGate.isOpen({ fallback: false })) {
|
|
53692
|
-
// at our record query we fetch each ingestion time stamp and pass it down to each lower resolver to query against
|
|
53693
|
-
ingestionTimestamp = await fetchIngestionTimeStampFromDatabase(currentFieldName, info, args, query);
|
|
53694
|
-
}
|
|
53695
|
-
// In the SF schema, the relevant arguments are passed into RecordQuery fields, but actually used
|
|
53696
|
-
// down in the edge resolvers. For this resolver, we can just return what was passed in
|
|
53697
|
-
// to make it available to the next execution step
|
|
53698
|
-
return {
|
|
53699
|
-
parentArgs: args,
|
|
53700
|
-
parentRecord: record,
|
|
53701
|
-
currentFieldName,
|
|
53702
|
-
ingestionTimestamp,
|
|
53703
|
-
};
|
|
53704
|
-
};
|
|
53930
|
+
recordQuery.resolve = connectionResolver;
|
|
53705
53931
|
}
|
|
53706
53932
|
}
|
|
53707
53933
|
if (type.name.endsWith('Connection')) {
|
|
@@ -53722,7 +53948,13 @@
|
|
|
53722
53948
|
for (const field of fields) {
|
|
53723
53949
|
switch (field.name) {
|
|
53724
53950
|
case 'edges':
|
|
53725
|
-
field.resolve =
|
|
53951
|
+
field.resolve = passThroughResolver;
|
|
53952
|
+
break;
|
|
53953
|
+
case 'pageInfo':
|
|
53954
|
+
field.resolve = pageInfoResolver;
|
|
53955
|
+
break;
|
|
53956
|
+
case 'pageResultCount':
|
|
53957
|
+
field.resolve = pageResultCountResolver;
|
|
53726
53958
|
break;
|
|
53727
53959
|
default:
|
|
53728
53960
|
field.resolve = defaultFieldResolver;
|
|
@@ -53745,17 +53977,10 @@
|
|
|
53745
53977
|
// }
|
|
53746
53978
|
for (const field of fields) {
|
|
53747
53979
|
if (field.name === 'node') {
|
|
53748
|
-
field.resolve =
|
|
53749
|
-
const { record, ingestionTimestamp } = obj;
|
|
53750
|
-
const recordRepresentation = parse$4(record);
|
|
53751
|
-
seenRecordIds.add(recordRepresentation.id);
|
|
53752
|
-
return { recordRepresentation, ingestionTimestamp };
|
|
53753
|
-
};
|
|
53980
|
+
field.resolve = passThroughResolver;
|
|
53754
53981
|
}
|
|
53755
53982
|
else if (field.name === 'cursor') {
|
|
53756
|
-
field.resolve =
|
|
53757
|
-
return base64encode(`v1:${index}`);
|
|
53758
|
-
};
|
|
53983
|
+
field.resolve = cursorResolver;
|
|
53759
53984
|
}
|
|
53760
53985
|
}
|
|
53761
53986
|
}
|
|
@@ -53870,16 +54095,7 @@
|
|
|
53870
54095
|
else if (isObjectType$1(recordFieldType) &&
|
|
53871
54096
|
field.type.name.endsWith('Connection')) {
|
|
53872
54097
|
// spanning field to a connection
|
|
53873
|
-
field.resolve =
|
|
53874
|
-
seenRecordIds.add(recordRepresentation.id);
|
|
53875
|
-
const { name: currentFieldName } = field;
|
|
53876
|
-
return {
|
|
53877
|
-
parentArgs: args,
|
|
53878
|
-
parentRecord: recordRepresentation,
|
|
53879
|
-
currentFieldName,
|
|
53880
|
-
ingestionTimestamp,
|
|
53881
|
-
};
|
|
53882
|
-
};
|
|
54098
|
+
field.resolve = connectionResolver;
|
|
53883
54099
|
}
|
|
53884
54100
|
else {
|
|
53885
54101
|
field.resolve = function recordFieldResolver({ recordRepresentation: record, }) {
|
|
@@ -53934,123 +54150,10 @@
|
|
|
53934
54150
|
}
|
|
53935
54151
|
return null;
|
|
53936
54152
|
}
|
|
53937
|
-
async function connectionEdgeResolver(obj, _args, context) {
|
|
53938
|
-
const { parentArgs = {}, parentRecord, currentFieldName, ingestionTimestamp } = obj;
|
|
53939
|
-
const { query, objectInfos, draftFunctions } = context;
|
|
53940
|
-
let joins = [];
|
|
53941
|
-
let alias = currentFieldName;
|
|
53942
|
-
let childRelationshipFieldName = undefined;
|
|
53943
|
-
if (parentRecord.id) {
|
|
53944
|
-
const parentApiName = parentRecord.apiName;
|
|
53945
|
-
const parentObjectInfo = objectInfos[parentApiName];
|
|
53946
|
-
const childRelationship = parentObjectInfo &&
|
|
53947
|
-
parentObjectInfo.childRelationships.find((rel) => rel.relationshipName === currentFieldName);
|
|
53948
|
-
// or emit/throw if we want to report it
|
|
53949
|
-
if (!childRelationship)
|
|
53950
|
-
return [];
|
|
53951
|
-
alias = childRelationship.childObjectApiName;
|
|
53952
|
-
childRelationshipFieldName = childRelationship.fieldName;
|
|
53953
|
-
}
|
|
53954
|
-
// Alias starts as entity's ApiName
|
|
53955
|
-
const predicates = [
|
|
53956
|
-
...filterToPredicates(parentArgs.where, alias, alias, context.objectInfos, joins, draftFunctions),
|
|
53957
|
-
...scopeToPredicates(parentArgs.scope, context.settings),
|
|
53958
|
-
...childRelationshipToPredicates(childRelationshipFieldName, parentRecord.id),
|
|
53959
|
-
];
|
|
53960
|
-
const scopeJoins = scopeToJoins(parentArgs.scope, context.settings);
|
|
53961
|
-
joins.push(...scopeJoins);
|
|
53962
|
-
// Alias starts as entity's ApiName
|
|
53963
|
-
const queryConfig = {
|
|
53964
|
-
alias,
|
|
53965
|
-
joins,
|
|
53966
|
-
predicates,
|
|
53967
|
-
orderBy: orderByToPredicate(parentArgs.orderBy, alias, alias, context.objectInfos),
|
|
53968
|
-
limit: parentArgs.first,
|
|
53969
|
-
ingestionTimestamp,
|
|
53970
|
-
};
|
|
53971
|
-
const { sql, bindings } = buildQuery(queryConfig);
|
|
53972
|
-
const results = await query(sql, bindings);
|
|
53973
|
-
//map each sql result with the ingestion timestamp to pass it down a level
|
|
53974
|
-
return results.rows
|
|
53975
|
-
.map((row) => row[0])
|
|
53976
|
-
.map((record, index) => {
|
|
53977
|
-
return {
|
|
53978
|
-
record,
|
|
53979
|
-
ingestionTimestamp,
|
|
53980
|
-
index,
|
|
53981
|
-
};
|
|
53982
|
-
});
|
|
53983
|
-
}
|
|
53984
|
-
/**
|
|
53985
|
-
* Converts a childRelationship into a predicate
|
|
53986
|
-
* @param childRelationshipFieldName Reference ID field name to its parent record. A defined `childRelationshipFieldName` string indicates that a child relationship exists
|
|
53987
|
-
* and a relationship predicate needs to be put into place. For example, `ServiceAppointment` has a child relationship `ServiceResources`, whose entity name is `AssignedResource`.
|
|
53988
|
-
* 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`.
|
|
53989
|
-
* @param parentId prarent record Id
|
|
53990
|
-
* @returns predicate array consists at most 1 predicate
|
|
53991
|
-
*/
|
|
53992
|
-
function childRelationshipToPredicates(childRelationshipFieldName, parentId) {
|
|
53993
|
-
const predicates = [];
|
|
53994
|
-
if (childRelationshipFieldName !== undefined && parentId !== undefined) {
|
|
53995
|
-
predicates.push({
|
|
53996
|
-
type: PredicateType.single,
|
|
53997
|
-
leftPath: `$.fields.${childRelationshipFieldName}.value`,
|
|
53998
|
-
operator: '=',
|
|
53999
|
-
value: parentId,
|
|
54000
|
-
});
|
|
54001
|
-
}
|
|
54002
|
-
return predicates;
|
|
54003
|
-
}
|
|
54004
54153
|
function isRecordType(type) {
|
|
54005
54154
|
const interfaces = type.getInterfaces();
|
|
54006
54155
|
return Boolean(interfaces.find((iface) => iface.name === 'Record'));
|
|
54007
54156
|
}
|
|
54008
|
-
/**
|
|
54009
|
-
* Builds the top level record query key based on AST data
|
|
54010
|
-
* @param operation
|
|
54011
|
-
* @param variables
|
|
54012
|
-
* @param argumentNodes
|
|
54013
|
-
* @param currentFieldName
|
|
54014
|
-
* @returns
|
|
54015
|
-
*/
|
|
54016
|
-
function buildKeyStringForRecordQuery(operation, variables, argumentNodes, currentFieldName) {
|
|
54017
|
-
const queryKey = buildQueryTypeStringKey$1({
|
|
54018
|
-
luvio: {},
|
|
54019
|
-
keyPrefix: 'UiApi',
|
|
54020
|
-
schemaName: 'uiapi',
|
|
54021
|
-
queryTypeName: 'Query',
|
|
54022
|
-
operationNode: operation,
|
|
54023
|
-
variables,
|
|
54024
|
-
fragmentMap: {},
|
|
54025
|
-
});
|
|
54026
|
-
const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
54027
|
-
const argumentString = filteredArgumentNodes.length > 0
|
|
54028
|
-
? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
|
|
54029
|
-
: '';
|
|
54030
|
-
return `${queryKey}__uiapi__query__${currentFieldName}${argumentString}`;
|
|
54031
|
-
}
|
|
54032
|
-
/**
|
|
54033
|
-
* fetches a query level ingestion time stamp from the L2 cache
|
|
54034
|
-
* if no query has been seen then the timestamp is 0
|
|
54035
|
-
* @param apiName
|
|
54036
|
-
* @param info
|
|
54037
|
-
* @param args
|
|
54038
|
-
* @param query
|
|
54039
|
-
* @returns
|
|
54040
|
-
*/
|
|
54041
|
-
async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
54042
|
-
const { operation, variableValues } = info;
|
|
54043
|
-
// if we cannot find the query key in the database then default to 0 as we assume we have not seen the query
|
|
54044
|
-
// and all the data is not stale
|
|
54045
|
-
let ingestionTimestamp = 0;
|
|
54046
|
-
if (info.fieldNodes.length > 0 && info.fieldNodes[0].arguments !== undefined) {
|
|
54047
|
-
const key = buildKeyStringForRecordQuery(operation,
|
|
54048
|
-
// join varables passed from query to the argument variables given from the AST
|
|
54049
|
-
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
54050
|
-
return readIngestionTimestampForKey(key, query);
|
|
54051
|
-
}
|
|
54052
|
-
return ingestionTimestamp;
|
|
54053
|
-
}
|
|
54054
54157
|
|
|
54055
54158
|
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";
|
|
54056
54159
|
|
|
@@ -54236,7 +54339,7 @@
|
|
|
54236
54339
|
// handles child relationship
|
|
54237
54340
|
const { spanningRecordConnections, typedScalars: spanningConnectionTypedScalars } = makeSpanningRecordConnections(schema, childRelationships, objectInfoMap, parentRelationshipFields);
|
|
54238
54341
|
typedScalars = new Set([...typedScalars, ...spanningConnectionTypedScalars]);
|
|
54239
|
-
const recordQueries = `${apiName}(first: Int, where: ${apiName}_Filter, orderBy: ${apiName}_OrderBy, scope: SupportedScopes): ${apiName}Connection\n`;
|
|
54342
|
+
const recordQueries = `${apiName}(first: Int, after: String, where: ${apiName}_Filter, orderBy: ${apiName}_OrderBy, scope: SupportedScopes): ${apiName}Connection\n`;
|
|
54240
54343
|
const isServiceAppointment = apiName === 'ServiceAppointment';
|
|
54241
54344
|
const recordConnections = /* GraphQL */ `
|
|
54242
54345
|
${isServiceAppointment ? `scalar ${apiName.toUpperCase()}_SCOPE` : ''}
|
|
@@ -54258,6 +54361,7 @@
|
|
|
54258
54361
|
edges: [${apiName}Edge]
|
|
54259
54362
|
pageInfo: PageInfo!
|
|
54260
54363
|
totalCount: Int!
|
|
54364
|
+
pageResultCount: Int!
|
|
54261
54365
|
}
|
|
54262
54366
|
|
|
54263
54367
|
type ${apiName}Edge {
|
|
@@ -54339,7 +54443,7 @@
|
|
|
54339
54443
|
}
|
|
54340
54444
|
if (objectInfoMap[childObjectApiName] !== undefined &&
|
|
54341
54445
|
!existingParentRelationships.has(relationshipName)) {
|
|
54342
|
-
spanningRecordConnections += `${relationshipName}(first: Int, where: ${childObjectApiName}_Filter, orderBy: ${childObjectApiName}_OrderBy, scope: SupportedScopes): ${childObjectApiName}Connection \n`;
|
|
54446
|
+
spanningRecordConnections += `${relationshipName}(first: Int, after: String, where: ${childObjectApiName}_Filter, orderBy: ${childObjectApiName}_OrderBy, scope: SupportedScopes): ${childObjectApiName}Connection \n`;
|
|
54343
54447
|
// if the record type has already been extended then these additional scalars have already been added
|
|
54344
54448
|
// to add them again would throw an error
|
|
54345
54449
|
const filterScalarType = schema.getType(`${childObjectApiName}_Filter`);
|
|
@@ -56152,7 +56256,7 @@
|
|
|
56152
56256
|
*/
|
|
56153
56257
|
|
|
56154
56258
|
|
|
56155
|
-
const { keys: keys$3$1, values: values$1, create: create$3$1, assign: assign$3, freeze: freeze$3 } = Object;
|
|
56259
|
+
const { keys: keys$3$1, values: values$1, create: create$3$1, assign: assign$3, freeze: freeze$3, entries: entries$3 } = Object;
|
|
56156
56260
|
const { stringify: stringify$3, parse: parse$3 } = JSON;
|
|
56157
56261
|
const { shift } = Array.prototype;
|
|
56158
56262
|
const { isArray: isArray$1$1, from: from$1 } = Array;
|
|
@@ -57559,7 +57663,7 @@
|
|
|
57559
57663
|
}
|
|
57560
57664
|
return keyBuilder$26(luvio, { recordId });
|
|
57561
57665
|
}
|
|
57562
|
-
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore) {
|
|
57666
|
+
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore, sqlStore) {
|
|
57563
57667
|
const getEntries = function (entries, segment) {
|
|
57564
57668
|
// this HOF only inspects records in the default segment
|
|
57565
57669
|
if (segment !== DefaultDurableSegment) {
|
|
@@ -57621,7 +57725,10 @@
|
|
|
57621
57725
|
});
|
|
57622
57726
|
};
|
|
57623
57727
|
const denormalizeEntries = function (entries) {
|
|
57728
|
+
let hasEntries = false;
|
|
57729
|
+
let hasMetadata = false;
|
|
57624
57730
|
const putEntries = create$3$1(null);
|
|
57731
|
+
const putMetadata = create$3$1(null);
|
|
57625
57732
|
const keys$1 = keys$3$1(entries);
|
|
57626
57733
|
const putRecords = {};
|
|
57627
57734
|
const putRecordViews = {};
|
|
@@ -57664,6 +57771,7 @@
|
|
|
57664
57771
|
putRecords[recordId] = true;
|
|
57665
57772
|
}
|
|
57666
57773
|
if (isStoreRecordError(record)) {
|
|
57774
|
+
hasEntries = true;
|
|
57667
57775
|
putEntries[recordKey] = value;
|
|
57668
57776
|
continue;
|
|
57669
57777
|
}
|
|
@@ -57676,24 +57784,43 @@
|
|
|
57676
57784
|
}
|
|
57677
57785
|
const denormalizedRecord = buildDurableRecordRepresentation(record, storeRecords, recordEntries, store);
|
|
57678
57786
|
if (denormalizedRecord !== undefined) {
|
|
57787
|
+
hasEntries = true;
|
|
57679
57788
|
putEntries[recordKey] = {
|
|
57680
57789
|
data: denormalizedRecord,
|
|
57681
57790
|
metadata,
|
|
57682
57791
|
};
|
|
57792
|
+
// if undefined then it is pending
|
|
57793
|
+
// we should still update metadata on pending records
|
|
57794
|
+
}
|
|
57795
|
+
else {
|
|
57796
|
+
hasMetadata = true;
|
|
57797
|
+
metadata.expirationTimestamp = metadata.ingestionTimestamp;
|
|
57798
|
+
putMetadata[recordKey] = {
|
|
57799
|
+
metadata,
|
|
57800
|
+
};
|
|
57683
57801
|
}
|
|
57684
57802
|
}
|
|
57685
57803
|
else {
|
|
57804
|
+
hasEntries = true;
|
|
57686
57805
|
putEntries[key] = value;
|
|
57687
57806
|
}
|
|
57688
57807
|
}
|
|
57689
|
-
return putEntries;
|
|
57808
|
+
return { putEntries, putMetadata, hasEntries, hasMetadata };
|
|
57690
57809
|
};
|
|
57691
57810
|
const setEntries = function (entries, segment) {
|
|
57692
57811
|
if (segment !== DefaultDurableSegment) {
|
|
57693
57812
|
return durableStore.setEntries(entries, segment);
|
|
57694
57813
|
}
|
|
57695
|
-
const putEntries = denormalizeEntries(entries);
|
|
57696
|
-
|
|
57814
|
+
const { putEntries, putMetadata, hasEntries, hasMetadata } = denormalizeEntries(entries);
|
|
57815
|
+
const promises = [
|
|
57816
|
+
hasEntries ? durableStore.setEntries(putEntries, segment) : undefined,
|
|
57817
|
+
];
|
|
57818
|
+
if (sqlStore !== undefined && sqlStore.isBatchUpdateSupported()) {
|
|
57819
|
+
promises.push(hasMetadata && sqlStore !== undefined
|
|
57820
|
+
? durableStore.setMetadata(putMetadata, segment)
|
|
57821
|
+
: undefined);
|
|
57822
|
+
}
|
|
57823
|
+
return Promise.all(promises).then(() => { });
|
|
57697
57824
|
};
|
|
57698
57825
|
const batchOperations = function (operations) {
|
|
57699
57826
|
const operationsWithDenormedRecords = [];
|
|
@@ -57710,10 +57837,20 @@
|
|
|
57710
57837
|
// this is determined by the plugin supporting update batch calls before it gets to this HOF.
|
|
57711
57838
|
// so we only need to check one entry to confirm this for performance
|
|
57712
57839
|
if (firstEntry.data !== undefined) {
|
|
57840
|
+
const { putEntries, putMetadata, hasMetadata } = denormalizeEntries(operation.entries);
|
|
57713
57841
|
operationsWithDenormedRecords.push({
|
|
57714
57842
|
...operation,
|
|
57715
|
-
entries:
|
|
57843
|
+
entries: putEntries,
|
|
57716
57844
|
});
|
|
57845
|
+
if (hasMetadata &&
|
|
57846
|
+
sqlStore !== undefined &&
|
|
57847
|
+
sqlStore.isBatchUpdateSupported() === true) {
|
|
57848
|
+
operationsWithDenormedRecords.push({
|
|
57849
|
+
...operation,
|
|
57850
|
+
entries: putMetadata,
|
|
57851
|
+
type: 'setMetadata',
|
|
57852
|
+
});
|
|
57853
|
+
}
|
|
57717
57854
|
}
|
|
57718
57855
|
else {
|
|
57719
57856
|
operationsWithDenormedRecords.push(operation);
|
|
@@ -57725,10 +57862,20 @@
|
|
|
57725
57862
|
operationsWithDenormedRecords.push(operation);
|
|
57726
57863
|
continue;
|
|
57727
57864
|
}
|
|
57865
|
+
const { putEntries, putMetadata, hasMetadata } = denormalizeEntries(operation.entries);
|
|
57728
57866
|
operationsWithDenormedRecords.push({
|
|
57729
57867
|
...operation,
|
|
57730
|
-
entries:
|
|
57868
|
+
entries: putEntries,
|
|
57731
57869
|
});
|
|
57870
|
+
if (hasMetadata &&
|
|
57871
|
+
sqlStore !== undefined &&
|
|
57872
|
+
sqlStore.isBatchUpdateSupported() === true) {
|
|
57873
|
+
operationsWithDenormedRecords.push({
|
|
57874
|
+
...operation,
|
|
57875
|
+
entries: putMetadata,
|
|
57876
|
+
type: 'setMetadata',
|
|
57877
|
+
});
|
|
57878
|
+
}
|
|
57732
57879
|
}
|
|
57733
57880
|
return durableStore.batchOperations(operationsWithDenormedRecords);
|
|
57734
57881
|
};
|
|
@@ -60710,6 +60857,9 @@
|
|
|
60710
60857
|
isEvalSupported() {
|
|
60711
60858
|
return true;
|
|
60712
60859
|
}
|
|
60860
|
+
isBatchUpdateSupported() {
|
|
60861
|
+
return this.supportsBatchUpdates;
|
|
60862
|
+
}
|
|
60713
60863
|
query(sql, params) {
|
|
60714
60864
|
return new Promise((resolve, reject) => {
|
|
60715
60865
|
this.plugin.query(sql, params, (result) => {
|
|
@@ -62395,7 +62545,7 @@
|
|
|
62395
62545
|
let getIngestRecords;
|
|
62396
62546
|
let getIngestMetadata;
|
|
62397
62547
|
let getIngestStore;
|
|
62398
|
-
const recordDenormingStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => (getIngestRecords !== undefined ? getIngestRecords() : {}), () => (getIngestMetadata !== undefined ? getIngestMetadata() : {}), () => (getIngestStore !== undefined ? getIngestStore() : undefined));
|
|
62548
|
+
const recordDenormingStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => (getIngestRecords !== undefined ? getIngestRecords() : {}), () => (getIngestMetadata !== undefined ? getIngestMetadata() : {}), () => (getIngestStore !== undefined ? getIngestStore() : undefined), lazyBaseDurableStore);
|
|
62399
62549
|
const baseEnv = new Environment(store, lazyNetworkAdapter);
|
|
62400
62550
|
const gqlEnv = makeEnvironmentGraphqlAware(baseEnv);
|
|
62401
62551
|
const durableEnv = makeDurable(gqlEnv, {
|
|
@@ -62505,7 +62655,7 @@
|
|
|
62505
62655
|
id: '@salesforce/lds-network-adapter',
|
|
62506
62656
|
instrument: instrument$2,
|
|
62507
62657
|
});
|
|
62508
|
-
// version: 1.
|
|
62658
|
+
// version: 1.294.0-06a44f23f
|
|
62509
62659
|
|
|
62510
62660
|
const { create: create$3, keys: keys$3 } = Object;
|
|
62511
62661
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -80960,6 +81110,11 @@
|
|
|
80960
81110
|
const parentRecordId = resolvedLink.recordId;
|
|
80961
81111
|
const totalEdges = source.edges !== undefined ? source.edges.length : 0;
|
|
80962
81112
|
const metadata = reader.resolveMetadata(source, PAGINATION_VERSION);
|
|
81113
|
+
if (metadata === undefined) {
|
|
81114
|
+
reader.markMissingLink(fieldData.__ref);
|
|
81115
|
+
reader.markMissing();
|
|
81116
|
+
return;
|
|
81117
|
+
}
|
|
80963
81118
|
const firstArg = (_a = sel.arguments) === null || _a === void 0 ? void 0 : _a.find(argument => { return argument.name.value === 'first'; });
|
|
80964
81119
|
const firstArgVal = evaluateArgumentValue(firstArg, 'IntValue', variables);
|
|
80965
81120
|
const pageSize = firstArgVal !== undefined ? firstArgVal : totalEdges;
|
|
@@ -80970,7 +81125,7 @@
|
|
|
80970
81125
|
token: afterArgVal
|
|
80971
81126
|
};
|
|
80972
81127
|
let { startOffset, endOffset } = getPageMetadata(metadata, paginationParams);
|
|
80973
|
-
const listIsComplete = (
|
|
81128
|
+
const listIsComplete = (metadata.__END__ !== undefined);
|
|
80974
81129
|
let trimmedEdges = [];
|
|
80975
81130
|
let maxOffset = undefined;
|
|
80976
81131
|
if (totalEdges === 0 && listIsComplete) {
|
|
@@ -80983,7 +81138,7 @@
|
|
|
80983
81138
|
}
|
|
80984
81139
|
}
|
|
80985
81140
|
else {
|
|
80986
|
-
if (
|
|
81141
|
+
if (startOffset === undefined || endOffset === undefined) {
|
|
80987
81142
|
reader.markMissingLink(fieldData.__ref);
|
|
80988
81143
|
reader.markMissing();
|
|
80989
81144
|
return;
|
|
@@ -82569,7 +82724,7 @@
|
|
|
82569
82724
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
82570
82725
|
instrument: instrument$1,
|
|
82571
82726
|
});
|
|
82572
|
-
// version: 1.
|
|
82727
|
+
// version: 1.294.0-e7eb16228
|
|
82573
82728
|
|
|
82574
82729
|
// On core the unstable adapters are re-exported with different names,
|
|
82575
82730
|
// we want to match them here.
|
|
@@ -84825,7 +84980,7 @@
|
|
|
84825
84980
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
84826
84981
|
graphQLImperative = ldsAdapter;
|
|
84827
84982
|
});
|
|
84828
|
-
// version: 1.
|
|
84983
|
+
// version: 1.294.0-e7eb16228
|
|
84829
84984
|
|
|
84830
84985
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
84831
84986
|
__proto__: null,
|
|
@@ -85563,7 +85718,7 @@
|
|
|
85563
85718
|
function register(r) {
|
|
85564
85719
|
callbacks$1.forEach((callback) => callback(r));
|
|
85565
85720
|
}
|
|
85566
|
-
// version: 1.
|
|
85721
|
+
// version: 1.294.0-06a44f23f
|
|
85567
85722
|
|
|
85568
85723
|
/**
|
|
85569
85724
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -90544,4 +90699,4 @@
|
|
|
90544
90699
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
90545
90700
|
|
|
90546
90701
|
}));
|
|
90547
|
-
// version: 1.
|
|
90702
|
+
// version: 1.294.0-06a44f23f
|