@salesforce/lds-worker-api 1.291.0 → 1.293.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 +246 -184
- package/dist/standalone/umd/lds-worker-api.js +246 -184
- package/package.json +10 -10
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/createRecord/objectInfos/Aircraft-objectInfo.network-mock.json +107 -75
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/createRecord/objectInfos/Pilot-objectInfo.network-mock.json +22 -2
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/Account.network-mock.json +138 -2
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/AssignedResource.network-mock.json +72 -7
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/Case.network-mock.json +168 -16
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/ServiceAppointment.network-mock.json +258 -23
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/ServiceResource.network-mock.json +106 -10
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/TimeSheetEntry.network-mock.json +52 -2
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/User.network-mock.json +440 -13
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/WorkOrder.network-mock.json +160 -2
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/WorkType.network-mock.json +48 -2
|
@@ -20,7 +20,7 @@ var SnapshotState$3;
|
|
|
20
20
|
SnapshotState["Stale"] = "Stale";
|
|
21
21
|
})(SnapshotState$3 || (SnapshotState$3 = {}));
|
|
22
22
|
|
|
23
|
-
const { create: create$b, entries: entries$
|
|
23
|
+
const { create: create$b, entries: entries$6, freeze: freeze$6, keys: keys$c, values: values$5, assign: assign$a } = Object;
|
|
24
24
|
const { hasOwnProperty: hasOwnProperty$3 } = Object.prototype;
|
|
25
25
|
const { isArray: isArray$9 } = Array;
|
|
26
26
|
const { push: push$5, indexOf, slice: slice$2 } = Array.prototype;
|
|
@@ -898,6 +898,9 @@ class StringKeyInMemoryStore {
|
|
|
898
898
|
delete this.records[canonicalKey];
|
|
899
899
|
this.markVisited(canonicalKey);
|
|
900
900
|
}
|
|
901
|
+
cleanup() {
|
|
902
|
+
this.scheduleTrim();
|
|
903
|
+
}
|
|
901
904
|
/**
|
|
902
905
|
* Deallocates data at the canonical key location for in-memory (L1) cache
|
|
903
906
|
* @param key key to deallocate
|
|
@@ -1600,6 +1603,11 @@ class InMemoryStore {
|
|
|
1600
1603
|
this.recordsMap.delete(canonicalKey);
|
|
1601
1604
|
this.markVisited(canonicalKey);
|
|
1602
1605
|
}
|
|
1606
|
+
cleanup() {
|
|
1607
|
+
if (this.fallbackStringKeyInMemoryStore.pendingTrimKeys.size > 0) {
|
|
1608
|
+
this.fallbackStringKeyInMemoryStore.cleanup();
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1603
1611
|
/**
|
|
1604
1612
|
* Deallocates data at the canonical key location for in-memory (L1) cache
|
|
1605
1613
|
* @param key key to deallocate
|
|
@@ -3405,6 +3413,9 @@ class Environment {
|
|
|
3405
3413
|
storeLookup(sel, createSnapshot, refresh, ttlStrategy) {
|
|
3406
3414
|
return this.store.lookup(sel, createSnapshot, refresh, ttlStrategy);
|
|
3407
3415
|
}
|
|
3416
|
+
storeCleanup() {
|
|
3417
|
+
this.store.cleanup();
|
|
3418
|
+
}
|
|
3408
3419
|
storeEvict(key) {
|
|
3409
3420
|
this.store.evict(key);
|
|
3410
3421
|
}
|
|
@@ -3674,6 +3685,9 @@ class Luvio {
|
|
|
3674
3685
|
storeEvict(key) {
|
|
3675
3686
|
this.environment.storeEvict(key);
|
|
3676
3687
|
}
|
|
3688
|
+
storeCleanup() {
|
|
3689
|
+
this.environment.storeCleanup();
|
|
3690
|
+
}
|
|
3677
3691
|
createSnapshot(selector, refresh) {
|
|
3678
3692
|
return this.environment.createSnapshot(selector, refresh);
|
|
3679
3693
|
}
|
|
@@ -4062,7 +4076,7 @@ function createResourceParamsImpl(config, configMetadata) {
|
|
|
4062
4076
|
}
|
|
4063
4077
|
return resourceParams;
|
|
4064
4078
|
}
|
|
4065
|
-
// engine version: 0.154.
|
|
4079
|
+
// engine version: 0.154.19-8ff414af
|
|
4066
4080
|
|
|
4067
4081
|
/**
|
|
4068
4082
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4190,7 +4204,7 @@ function withDefaultLuvio(callback) {
|
|
|
4190
4204
|
}
|
|
4191
4205
|
callbacks.push(callback);
|
|
4192
4206
|
}
|
|
4193
|
-
// version: 1.
|
|
4207
|
+
// version: 1.293.0-5fab18553
|
|
4194
4208
|
|
|
4195
4209
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4196
4210
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15698,7 +15712,7 @@ function gql(literals, ...subs) {
|
|
|
15698
15712
|
}
|
|
15699
15713
|
return superResult;
|
|
15700
15714
|
}
|
|
15701
|
-
// version: 1.
|
|
15715
|
+
// version: 1.293.0-5fab18553
|
|
15702
15716
|
|
|
15703
15717
|
function unwrap(data) {
|
|
15704
15718
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16356,12 +16370,16 @@ function createImperativeAdapter(luvio, adapter, metadata) {
|
|
|
16356
16370
|
callback(snapshotToTuple$1(snapshotOrPromise));
|
|
16357
16371
|
return;
|
|
16358
16372
|
}
|
|
16359
|
-
snapshotOrPromise
|
|
16373
|
+
snapshotOrPromise
|
|
16374
|
+
.then((snapshot) => {
|
|
16360
16375
|
if (snapshot === null) {
|
|
16361
16376
|
callback(createInvalidConfigError$1());
|
|
16362
16377
|
return;
|
|
16363
16378
|
}
|
|
16364
16379
|
callback(snapshotToTuple$1(snapshot));
|
|
16380
|
+
})
|
|
16381
|
+
.finally(() => {
|
|
16382
|
+
luvio.storeCleanup();
|
|
16365
16383
|
});
|
|
16366
16384
|
};
|
|
16367
16385
|
defineProperty(imperativeAdapterInvoke, 'name', {
|
|
@@ -16623,7 +16641,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16623
16641
|
const { apiFamily, name } = metadata;
|
|
16624
16642
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16625
16643
|
}
|
|
16626
|
-
// version: 1.
|
|
16644
|
+
// version: 1.293.0-5fab18553
|
|
16627
16645
|
|
|
16628
16646
|
/**
|
|
16629
16647
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -16722,7 +16740,7 @@ var TypeCheckShapes;
|
|
|
16722
16740
|
TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
|
|
16723
16741
|
TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
|
|
16724
16742
|
})(TypeCheckShapes || (TypeCheckShapes = {}));
|
|
16725
|
-
// engine version: 0.154.
|
|
16743
|
+
// engine version: 0.154.19-8ff414af
|
|
16726
16744
|
|
|
16727
16745
|
const { keys: ObjectKeys$3, create: ObjectCreate$3 } = Object;
|
|
16728
16746
|
|
|
@@ -24660,7 +24678,7 @@ const factory$h = (luvio) => {
|
|
|
24660
24678
|
};
|
|
24661
24679
|
|
|
24662
24680
|
const TTL$w = 900000;
|
|
24663
|
-
const VERSION$12$1 = "
|
|
24681
|
+
const VERSION$12$1 = "2302a71ca718abb60353eb88dedb1c12";
|
|
24664
24682
|
const RepresentationType$N = 'ObjectInfoRepresentation';
|
|
24665
24683
|
function keyBuilder$1V(luvio, config) {
|
|
24666
24684
|
return keyPrefix$2 + '::' + RepresentationType$N + ':' + config.apiName;
|
|
@@ -24699,6 +24717,10 @@ const select$1G = function ObjectInfoRepresentationSelect() {
|
|
|
24699
24717
|
kind: 'Object',
|
|
24700
24718
|
opaque: true
|
|
24701
24719
|
},
|
|
24720
|
+
{
|
|
24721
|
+
name: 'compactLayoutable',
|
|
24722
|
+
kind: 'Scalar'
|
|
24723
|
+
},
|
|
24702
24724
|
{
|
|
24703
24725
|
name: 'createable',
|
|
24704
24726
|
kind: 'Scalar'
|
|
@@ -24763,6 +24785,10 @@ const select$1G = function ObjectInfoRepresentationSelect() {
|
|
|
24763
24785
|
kind: 'Object',
|
|
24764
24786
|
opaque: true
|
|
24765
24787
|
},
|
|
24788
|
+
{
|
|
24789
|
+
name: 'searchLayoutable',
|
|
24790
|
+
kind: 'Scalar'
|
|
24791
|
+
},
|
|
24766
24792
|
{
|
|
24767
24793
|
name: 'searchable',
|
|
24768
24794
|
kind: 'Scalar'
|
|
@@ -29638,7 +29664,7 @@ function getTypeCacheKeys$z$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
29638
29664
|
}
|
|
29639
29665
|
|
|
29640
29666
|
const TTL$n = 300000;
|
|
29641
|
-
const VERSION$O$1 = "
|
|
29667
|
+
const VERSION$O$1 = "0cd492fdd6c713c206ef53dc02175f71";
|
|
29642
29668
|
const RepresentationType$x = 'AppRepresentation';
|
|
29643
29669
|
function keyBuilder$1k(luvio, config) {
|
|
29644
29670
|
return keyPrefix$2 + '::' + RepresentationType$x + ':' + (config.appId === null ? '' : config.appId);
|
|
@@ -29729,6 +29755,10 @@ const select$1g$1 = function AppRepresentationSelect() {
|
|
|
29729
29755
|
name: 'isNavTabPersistenceDisabled',
|
|
29730
29756
|
kind: 'Scalar'
|
|
29731
29757
|
},
|
|
29758
|
+
{
|
|
29759
|
+
name: 'isOmniPinnedViewEnabled',
|
|
29760
|
+
kind: 'Scalar'
|
|
29761
|
+
},
|
|
29732
29762
|
{
|
|
29733
29763
|
name: 'label',
|
|
29734
29764
|
kind: 'Scalar'
|
|
@@ -29784,6 +29814,11 @@ function equals$E(existing, incoming) {
|
|
|
29784
29814
|
if (!(existing_isNavTabPersistenceDisabled === incoming_isNavTabPersistenceDisabled)) {
|
|
29785
29815
|
return false;
|
|
29786
29816
|
}
|
|
29817
|
+
const existing_isOmniPinnedViewEnabled = existing.isOmniPinnedViewEnabled;
|
|
29818
|
+
const incoming_isOmniPinnedViewEnabled = incoming.isOmniPinnedViewEnabled;
|
|
29819
|
+
if (!(existing_isOmniPinnedViewEnabled === incoming_isOmniPinnedViewEnabled)) {
|
|
29820
|
+
return false;
|
|
29821
|
+
}
|
|
29787
29822
|
const existing_selected = existing.selected;
|
|
29788
29823
|
const incoming_selected = incoming.selected;
|
|
29789
29824
|
if (!(existing_selected === incoming_selected)) {
|
|
@@ -43163,23 +43198,11 @@ function validateAdapterConfig$2$1(untrustedConfig, configPropertyNames) {
|
|
|
43163
43198
|
return config;
|
|
43164
43199
|
}
|
|
43165
43200
|
|
|
43166
|
-
const ISO8601_DATE_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+Z$/;
|
|
43167
43201
|
function getHeaders(clientOptions) {
|
|
43168
43202
|
const headers = {};
|
|
43169
43203
|
if (untrustedIsObject$2(clientOptions)) {
|
|
43170
43204
|
if (typeof clientOptions.ifUnmodifiedSince === 'string') {
|
|
43171
43205
|
headers.ifUnmodifiedSince = clientOptions.ifUnmodifiedSince;
|
|
43172
|
-
// HTTP standard format date is expected by UI-API
|
|
43173
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since
|
|
43174
|
-
// A component built for Connect API must use If-Unmodified-Since
|
|
43175
|
-
// dates formatted as ISO 8601, which does not match the HTTP spec.
|
|
43176
|
-
// For compatibility, convert the date to match the standard.
|
|
43177
|
-
if (headers.ifUnmodifiedSince.match(ISO8601_DATE_REGEX)) {
|
|
43178
|
-
const utcString = new Date(headers.ifUnmodifiedSince).toUTCString();
|
|
43179
|
-
if (utcString !== 'Invalid Date') {
|
|
43180
|
-
headers.ifUnmodifiedSince = utcString;
|
|
43181
|
-
}
|
|
43182
|
-
}
|
|
43183
43206
|
}
|
|
43184
43207
|
}
|
|
43185
43208
|
return headers;
|
|
@@ -44215,7 +44238,7 @@ withDefaultLuvio((luvio) => {
|
|
|
44215
44238
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44216
44239
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44217
44240
|
});
|
|
44218
|
-
// version: 1.
|
|
44241
|
+
// version: 1.293.0-c036bce5d
|
|
44219
44242
|
|
|
44220
44243
|
var ldsIdempotencyWriteDisabled = {
|
|
44221
44244
|
isOpen: function (e) {
|
|
@@ -44400,7 +44423,7 @@ var ldsMetadataRefreshEnabled = {
|
|
|
44400
44423
|
const { parse: parse$6, stringify: stringify$6 } = JSON;
|
|
44401
44424
|
const { join: join$2, push: push$2, unshift } = Array.prototype;
|
|
44402
44425
|
const { isArray: isArray$5 } = Array;
|
|
44403
|
-
const { entries: entries$
|
|
44426
|
+
const { entries: entries$5, keys: keys$8 } = Object;
|
|
44404
44427
|
|
|
44405
44428
|
const UI_API_BASE_URI = '/services/data/v62.0/ui-api';
|
|
44406
44429
|
|
|
@@ -44707,7 +44730,7 @@ function getFulfillingRequest(inflightRequests, resourceRequest) {
|
|
|
44707
44730
|
if (fulfill === undefined) {
|
|
44708
44731
|
return null;
|
|
44709
44732
|
}
|
|
44710
|
-
const handlersMap = entries$
|
|
44733
|
+
const handlersMap = entries$5(inflightRequests);
|
|
44711
44734
|
for (let i = 0, len = handlersMap.length; i < len; i += 1) {
|
|
44712
44735
|
const [transactionKey, handlers] = handlersMap[i];
|
|
44713
44736
|
// check fulfillment against only the first handler ([0]) because it's equal or
|
|
@@ -51498,7 +51521,7 @@ function isArrayLike(x) {
|
|
|
51498
51521
|
(x.length === 0 || (x.length > 0 && Object.prototype.hasOwnProperty.call(x, x.length - 1))));
|
|
51499
51522
|
}
|
|
51500
51523
|
|
|
51501
|
-
const { create: create$4, keys: keys$4, values: values$2, entries: entries$
|
|
51524
|
+
const { create: create$4, keys: keys$4, values: values$2, entries: entries$4, assign: assign$4 } = Object;
|
|
51502
51525
|
const { stringify: stringify$4, parse: parse$4 } = JSON;
|
|
51503
51526
|
const { isArray: isArray$2$1, from: from$2 } = Array;
|
|
51504
51527
|
|
|
@@ -52246,7 +52269,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
|
|
|
52246
52269
|
}
|
|
52247
52270
|
else {
|
|
52248
52271
|
//`field` match the filedInfo's apiName
|
|
52249
|
-
for (const [op, value] of entries$
|
|
52272
|
+
for (const [op, value] of entries$4(where[field])) {
|
|
52250
52273
|
const operator = operatorToSql(op);
|
|
52251
52274
|
/**
|
|
52252
52275
|
Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
|
|
@@ -53606,9 +53629,134 @@ function scopeToPredicates(scope = '', settings) {
|
|
|
53606
53629
|
];
|
|
53607
53630
|
}
|
|
53608
53631
|
|
|
53609
|
-
|
|
53610
|
-
|
|
53632
|
+
/*
|
|
53633
|
+
resolves connections...
|
|
53634
|
+
*/
|
|
53635
|
+
async function connectionResolver(obj, args, context, info) {
|
|
53636
|
+
let { recordRepresentation: parentRecord, ingestionTimestamp } = obj;
|
|
53637
|
+
if (!ingestionTimestamp)
|
|
53638
|
+
ingestionTimestamp = 0;
|
|
53639
|
+
if (!parentRecord && excludeStaleRecordsGate.isOpen({ fallback: false })) {
|
|
53640
|
+
// at our record query we fetch each ingestion time stamp and pass it down to each lower resolver to query against
|
|
53641
|
+
ingestionTimestamp = await fetchIngestionTimeStampFromDatabase(info.fieldName, info, args, context.query);
|
|
53642
|
+
}
|
|
53643
|
+
const { query, objectInfos, draftFunctions } = context;
|
|
53644
|
+
let joins = [];
|
|
53645
|
+
let alias = info.fieldName;
|
|
53646
|
+
let childRelationshipFieldName = undefined;
|
|
53647
|
+
if (parentRecord) {
|
|
53648
|
+
context.seenRecordIds.add(parentRecord.id);
|
|
53649
|
+
const parentApiName = parentRecord.apiName;
|
|
53650
|
+
const parentObjectInfo = objectInfos[parentApiName];
|
|
53651
|
+
const childRelationship = parentObjectInfo &&
|
|
53652
|
+
parentObjectInfo.childRelationships.find((rel) => rel.relationshipName === info.fieldName);
|
|
53653
|
+
// or emit/throw if we want to report it
|
|
53654
|
+
if (!childRelationship)
|
|
53655
|
+
return [];
|
|
53656
|
+
alias = childRelationship.childObjectApiName;
|
|
53657
|
+
childRelationshipFieldName = childRelationship.fieldName;
|
|
53658
|
+
}
|
|
53659
|
+
// Alias starts as entity's ApiName
|
|
53660
|
+
const predicates = [
|
|
53661
|
+
...filterToPredicates(args.where, alias, alias, context.objectInfos, joins, draftFunctions),
|
|
53662
|
+
...scopeToPredicates(args.scope, context.settings),
|
|
53663
|
+
...childRelationshipToPredicates(childRelationshipFieldName, parentRecord ? parentRecord.id : undefined),
|
|
53664
|
+
];
|
|
53665
|
+
const scopeJoins = scopeToJoins(args.scope, context.settings);
|
|
53666
|
+
joins.push(...scopeJoins);
|
|
53667
|
+
// Alias starts as entity's ApiName
|
|
53668
|
+
const queryConfig = {
|
|
53669
|
+
alias,
|
|
53670
|
+
joins,
|
|
53671
|
+
predicates,
|
|
53672
|
+
orderBy: orderByToPredicate(args.orderBy, alias, alias, context.objectInfos),
|
|
53673
|
+
limit: args.first,
|
|
53674
|
+
ingestionTimestamp,
|
|
53675
|
+
};
|
|
53676
|
+
const { sql, bindings } = buildQuery(queryConfig);
|
|
53677
|
+
const results = await query(sql, bindings);
|
|
53678
|
+
//map each sql result with the ingestion timestamp to pass it down a level
|
|
53679
|
+
return results.rows
|
|
53680
|
+
.map((row) => row[0])
|
|
53681
|
+
.map((record, index) => {
|
|
53682
|
+
return {
|
|
53683
|
+
record,
|
|
53684
|
+
ingestionTimestamp,
|
|
53685
|
+
index,
|
|
53686
|
+
};
|
|
53687
|
+
});
|
|
53688
|
+
}
|
|
53689
|
+
/**
|
|
53690
|
+
* Converts a childRelationship into a predicate
|
|
53691
|
+
* @param childRelationshipFieldName Reference ID field name to its parent record. A defined `childRelationshipFieldName` string indicates that a child relationship exists
|
|
53692
|
+
* and a relationship predicate needs to be put into place. For example, `ServiceAppointment` has a child relationship `ServiceResources`, whose entity name is `AssignedResource`.
|
|
53693
|
+
* 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`.
|
|
53694
|
+
* @param parentId prarent record Id
|
|
53695
|
+
* @returns predicate array consists at most 1 predicate
|
|
53696
|
+
*/
|
|
53697
|
+
function childRelationshipToPredicates(childRelationshipFieldName, parentId) {
|
|
53698
|
+
const predicates = [];
|
|
53699
|
+
if (childRelationshipFieldName !== undefined && parentId !== undefined) {
|
|
53700
|
+
predicates.push({
|
|
53701
|
+
type: PredicateType.single,
|
|
53702
|
+
leftPath: `$.fields.${childRelationshipFieldName}.value`,
|
|
53703
|
+
operator: '=',
|
|
53704
|
+
value: parentId,
|
|
53705
|
+
});
|
|
53706
|
+
}
|
|
53707
|
+
return predicates;
|
|
53708
|
+
}
|
|
53709
|
+
/**
|
|
53710
|
+
* fetches a query level ingestion time stamp from the L2 cache
|
|
53711
|
+
* if no query has been seen then the timestamp is 0
|
|
53712
|
+
* @param apiName
|
|
53713
|
+
* @param info
|
|
53714
|
+
* @param args
|
|
53715
|
+
* @param query
|
|
53716
|
+
* @returns
|
|
53717
|
+
*/
|
|
53718
|
+
async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
53719
|
+
const { operation, variableValues } = info;
|
|
53720
|
+
// if we cannot find the query key in the database then default to 0 as we assume we have not seen the query
|
|
53721
|
+
// and all the data is not stale
|
|
53722
|
+
let ingestionTimestamp = 0;
|
|
53723
|
+
if (info.fieldNodes.length > 0 && info.fieldNodes[0].arguments !== undefined) {
|
|
53724
|
+
const key = buildKeyStringForRecordQuery(operation,
|
|
53725
|
+
// join varables passed from query to the argument variables given from the AST
|
|
53726
|
+
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
53727
|
+
return readIngestionTimestampForKey(key, query);
|
|
53728
|
+
}
|
|
53729
|
+
return ingestionTimestamp;
|
|
53730
|
+
}
|
|
53731
|
+
/**
|
|
53732
|
+
* Builds the top level record query key based on AST data
|
|
53733
|
+
* @param operation
|
|
53734
|
+
* @param variables
|
|
53735
|
+
* @param argumentNodes
|
|
53736
|
+
* @param currentFieldName
|
|
53737
|
+
* @returns
|
|
53738
|
+
*/
|
|
53739
|
+
function buildKeyStringForRecordQuery(operation, variables, argumentNodes, currentFieldName) {
|
|
53740
|
+
const queryKey = buildQueryTypeStringKey$1({
|
|
53741
|
+
luvio: {},
|
|
53742
|
+
keyPrefix: 'UiApi',
|
|
53743
|
+
schemaName: 'uiapi',
|
|
53744
|
+
queryTypeName: 'Query',
|
|
53745
|
+
operationNode: operation,
|
|
53746
|
+
variables,
|
|
53747
|
+
fragmentMap: {},
|
|
53748
|
+
});
|
|
53749
|
+
const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
53750
|
+
const argumentString = filteredArgumentNodes.length > 0
|
|
53751
|
+
? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
|
|
53752
|
+
: '';
|
|
53753
|
+
return `${queryKey}__uiapi__query__${currentFieldName}${argumentString}`;
|
|
53754
|
+
}
|
|
53755
|
+
|
|
53756
|
+
function passThroughResolver(source) {
|
|
53757
|
+
return source;
|
|
53611
53758
|
}
|
|
53759
|
+
|
|
53612
53760
|
/**
|
|
53613
53761
|
*
|
|
53614
53762
|
* @param schema GraphQL Schema generated from ObjectInfos
|
|
@@ -53641,13 +53789,13 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
53641
53789
|
}
|
|
53642
53790
|
if (type.name === 'Query') {
|
|
53643
53791
|
for (const field of fields) {
|
|
53644
|
-
field.resolve =
|
|
53792
|
+
field.resolve = passThroughResolver;
|
|
53645
53793
|
}
|
|
53646
53794
|
}
|
|
53647
53795
|
if (type.name === 'UIAPI') {
|
|
53648
53796
|
for (const field of fields) {
|
|
53649
53797
|
if (field.name === 'query') {
|
|
53650
|
-
field.resolve =
|
|
53798
|
+
field.resolve = passThroughResolver;
|
|
53651
53799
|
}
|
|
53652
53800
|
else {
|
|
53653
53801
|
const fieldName = field.name;
|
|
@@ -53674,23 +53822,7 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
53674
53822
|
// Fields of the `RecordQuery` type are the record queries for the entity types
|
|
53675
53823
|
// supported for the org
|
|
53676
53824
|
for (const recordQuery of fields) {
|
|
53677
|
-
recordQuery.resolve =
|
|
53678
|
-
const { name: currentFieldName } = recordQuery;
|
|
53679
|
-
let ingestionTimestamp = 0;
|
|
53680
|
-
if (excludeStaleRecordsGate.isOpen({ fallback: false })) {
|
|
53681
|
-
// at our record query we fetch each ingestion time stamp and pass it down to each lower resolver to query against
|
|
53682
|
-
ingestionTimestamp = await fetchIngestionTimeStampFromDatabase(currentFieldName, info, args, query);
|
|
53683
|
-
}
|
|
53684
|
-
// In the SF schema, the relevant arguments are passed into RecordQuery fields, but actually used
|
|
53685
|
-
// down in the edge resolvers. For this resolver, we can just return what was passed in
|
|
53686
|
-
// to make it available to the next execution step
|
|
53687
|
-
return {
|
|
53688
|
-
parentArgs: args,
|
|
53689
|
-
parentRecord: record,
|
|
53690
|
-
currentFieldName,
|
|
53691
|
-
ingestionTimestamp,
|
|
53692
|
-
};
|
|
53693
|
-
};
|
|
53825
|
+
recordQuery.resolve = connectionResolver;
|
|
53694
53826
|
}
|
|
53695
53827
|
}
|
|
53696
53828
|
if (type.name.endsWith('Connection')) {
|
|
@@ -53711,7 +53843,13 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
53711
53843
|
for (const field of fields) {
|
|
53712
53844
|
switch (field.name) {
|
|
53713
53845
|
case 'edges':
|
|
53714
|
-
field.resolve =
|
|
53846
|
+
field.resolve = passThroughResolver;
|
|
53847
|
+
break;
|
|
53848
|
+
case 'pageInfo':
|
|
53849
|
+
field.resolve = function (_value, _args, _context, _info) {
|
|
53850
|
+
// TODO [W-12390939]: implement resolver for PageInfo
|
|
53851
|
+
return {};
|
|
53852
|
+
};
|
|
53715
53853
|
break;
|
|
53716
53854
|
default:
|
|
53717
53855
|
field.resolve = defaultFieldResolver;
|
|
@@ -53859,16 +53997,7 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
53859
53997
|
else if (isObjectType$1(recordFieldType) &&
|
|
53860
53998
|
field.type.name.endsWith('Connection')) {
|
|
53861
53999
|
// spanning field to a connection
|
|
53862
|
-
field.resolve =
|
|
53863
|
-
seenRecordIds.add(recordRepresentation.id);
|
|
53864
|
-
const { name: currentFieldName } = field;
|
|
53865
|
-
return {
|
|
53866
|
-
parentArgs: args,
|
|
53867
|
-
parentRecord: recordRepresentation,
|
|
53868
|
-
currentFieldName,
|
|
53869
|
-
ingestionTimestamp,
|
|
53870
|
-
};
|
|
53871
|
-
};
|
|
54000
|
+
field.resolve = connectionResolver;
|
|
53872
54001
|
}
|
|
53873
54002
|
else {
|
|
53874
54003
|
field.resolve = function recordFieldResolver({ recordRepresentation: record, }) {
|
|
@@ -53923,123 +54052,10 @@ _, { objectInfos }) {
|
|
|
53923
54052
|
}
|
|
53924
54053
|
return null;
|
|
53925
54054
|
}
|
|
53926
|
-
async function connectionEdgeResolver(obj, _args, context) {
|
|
53927
|
-
const { parentArgs = {}, parentRecord, currentFieldName, ingestionTimestamp } = obj;
|
|
53928
|
-
const { query, objectInfos, draftFunctions } = context;
|
|
53929
|
-
let joins = [];
|
|
53930
|
-
let alias = currentFieldName;
|
|
53931
|
-
let childRelationshipFieldName = undefined;
|
|
53932
|
-
if (parentRecord.id) {
|
|
53933
|
-
const parentApiName = parentRecord.apiName;
|
|
53934
|
-
const parentObjectInfo = objectInfos[parentApiName];
|
|
53935
|
-
const childRelationship = parentObjectInfo &&
|
|
53936
|
-
parentObjectInfo.childRelationships.find((rel) => rel.relationshipName === currentFieldName);
|
|
53937
|
-
// or emit/throw if we want to report it
|
|
53938
|
-
if (!childRelationship)
|
|
53939
|
-
return [];
|
|
53940
|
-
alias = childRelationship.childObjectApiName;
|
|
53941
|
-
childRelationshipFieldName = childRelationship.fieldName;
|
|
53942
|
-
}
|
|
53943
|
-
// Alias starts as entity's ApiName
|
|
53944
|
-
const predicates = [
|
|
53945
|
-
...filterToPredicates(parentArgs.where, alias, alias, context.objectInfos, joins, draftFunctions),
|
|
53946
|
-
...scopeToPredicates(parentArgs.scope, context.settings),
|
|
53947
|
-
...childRelationshipToPredicates(childRelationshipFieldName, parentRecord.id),
|
|
53948
|
-
];
|
|
53949
|
-
const scopeJoins = scopeToJoins(parentArgs.scope, context.settings);
|
|
53950
|
-
joins.push(...scopeJoins);
|
|
53951
|
-
// Alias starts as entity's ApiName
|
|
53952
|
-
const queryConfig = {
|
|
53953
|
-
alias,
|
|
53954
|
-
joins,
|
|
53955
|
-
predicates,
|
|
53956
|
-
orderBy: orderByToPredicate(parentArgs.orderBy, alias, alias, context.objectInfos),
|
|
53957
|
-
limit: parentArgs.first,
|
|
53958
|
-
ingestionTimestamp,
|
|
53959
|
-
};
|
|
53960
|
-
const { sql, bindings } = buildQuery(queryConfig);
|
|
53961
|
-
const results = await query(sql, bindings);
|
|
53962
|
-
//map each sql result with the ingestion timestamp to pass it down a level
|
|
53963
|
-
return results.rows
|
|
53964
|
-
.map((row) => row[0])
|
|
53965
|
-
.map((record, index) => {
|
|
53966
|
-
return {
|
|
53967
|
-
record,
|
|
53968
|
-
ingestionTimestamp,
|
|
53969
|
-
index,
|
|
53970
|
-
};
|
|
53971
|
-
});
|
|
53972
|
-
}
|
|
53973
|
-
/**
|
|
53974
|
-
* Converts a childRelationship into a predicate
|
|
53975
|
-
* @param childRelationshipFieldName Reference ID field name to its parent record. A defined `childRelationshipFieldName` string indicates that a child relationship exists
|
|
53976
|
-
* and a relationship predicate needs to be put into place. For example, `ServiceAppointment` has a child relationship `ServiceResources`, whose entity name is `AssignedResource`.
|
|
53977
|
-
* 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`.
|
|
53978
|
-
* @param parentId prarent record Id
|
|
53979
|
-
* @returns predicate array consists at most 1 predicate
|
|
53980
|
-
*/
|
|
53981
|
-
function childRelationshipToPredicates(childRelationshipFieldName, parentId) {
|
|
53982
|
-
const predicates = [];
|
|
53983
|
-
if (childRelationshipFieldName !== undefined && parentId !== undefined) {
|
|
53984
|
-
predicates.push({
|
|
53985
|
-
type: PredicateType.single,
|
|
53986
|
-
leftPath: `$.fields.${childRelationshipFieldName}.value`,
|
|
53987
|
-
operator: '=',
|
|
53988
|
-
value: parentId,
|
|
53989
|
-
});
|
|
53990
|
-
}
|
|
53991
|
-
return predicates;
|
|
53992
|
-
}
|
|
53993
54055
|
function isRecordType(type) {
|
|
53994
54056
|
const interfaces = type.getInterfaces();
|
|
53995
54057
|
return Boolean(interfaces.find((iface) => iface.name === 'Record'));
|
|
53996
54058
|
}
|
|
53997
|
-
/**
|
|
53998
|
-
* Builds the top level record query key based on AST data
|
|
53999
|
-
* @param operation
|
|
54000
|
-
* @param variables
|
|
54001
|
-
* @param argumentNodes
|
|
54002
|
-
* @param currentFieldName
|
|
54003
|
-
* @returns
|
|
54004
|
-
*/
|
|
54005
|
-
function buildKeyStringForRecordQuery(operation, variables, argumentNodes, currentFieldName) {
|
|
54006
|
-
const queryKey = buildQueryTypeStringKey$1({
|
|
54007
|
-
luvio: {},
|
|
54008
|
-
keyPrefix: 'UiApi',
|
|
54009
|
-
schemaName: 'uiapi',
|
|
54010
|
-
queryTypeName: 'Query',
|
|
54011
|
-
operationNode: operation,
|
|
54012
|
-
variables,
|
|
54013
|
-
fragmentMap: {},
|
|
54014
|
-
});
|
|
54015
|
-
const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
54016
|
-
const argumentString = filteredArgumentNodes.length > 0
|
|
54017
|
-
? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
|
|
54018
|
-
: '';
|
|
54019
|
-
return `${queryKey}__uiapi__query__${currentFieldName}${argumentString}`;
|
|
54020
|
-
}
|
|
54021
|
-
/**
|
|
54022
|
-
* fetches a query level ingestion time stamp from the L2 cache
|
|
54023
|
-
* if no query has been seen then the timestamp is 0
|
|
54024
|
-
* @param apiName
|
|
54025
|
-
* @param info
|
|
54026
|
-
* @param args
|
|
54027
|
-
* @param query
|
|
54028
|
-
* @returns
|
|
54029
|
-
*/
|
|
54030
|
-
async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
54031
|
-
const { operation, variableValues } = info;
|
|
54032
|
-
// if we cannot find the query key in the database then default to 0 as we assume we have not seen the query
|
|
54033
|
-
// and all the data is not stale
|
|
54034
|
-
let ingestionTimestamp = 0;
|
|
54035
|
-
if (info.fieldNodes.length > 0 && info.fieldNodes[0].arguments !== undefined) {
|
|
54036
|
-
const key = buildKeyStringForRecordQuery(operation,
|
|
54037
|
-
// join varables passed from query to the argument variables given from the AST
|
|
54038
|
-
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
54039
|
-
return readIngestionTimestampForKey(key, query);
|
|
54040
|
-
}
|
|
54041
|
-
return ingestionTimestamp;
|
|
54042
|
-
}
|
|
54043
54059
|
|
|
54044
54060
|
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";
|
|
54045
54061
|
|
|
@@ -56141,7 +56157,7 @@ function createFieldNode(nameValue, selectionSet) {
|
|
|
56141
56157
|
*/
|
|
56142
56158
|
|
|
56143
56159
|
|
|
56144
|
-
const { keys: keys$3$1, values: values$1, create: create$3$1, assign: assign$3, freeze: freeze$3 } = Object;
|
|
56160
|
+
const { keys: keys$3$1, values: values$1, create: create$3$1, assign: assign$3, freeze: freeze$3, entries: entries$3 } = Object;
|
|
56145
56161
|
const { stringify: stringify$3, parse: parse$3 } = JSON;
|
|
56146
56162
|
const { shift } = Array.prototype;
|
|
56147
56163
|
const { isArray: isArray$1$1, from: from$1 } = Array;
|
|
@@ -57548,7 +57564,7 @@ function getDenormalizedKey(originalKey, recordId, luvio) {
|
|
|
57548
57564
|
}
|
|
57549
57565
|
return keyBuilder$26(luvio, { recordId });
|
|
57550
57566
|
}
|
|
57551
|
-
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore) {
|
|
57567
|
+
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore, sqlStore) {
|
|
57552
57568
|
const getEntries = function (entries, segment) {
|
|
57553
57569
|
// this HOF only inspects records in the default segment
|
|
57554
57570
|
if (segment !== DefaultDurableSegment) {
|
|
@@ -57610,7 +57626,10 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
57610
57626
|
});
|
|
57611
57627
|
};
|
|
57612
57628
|
const denormalizeEntries = function (entries) {
|
|
57629
|
+
let hasEntries = false;
|
|
57630
|
+
let hasMetadata = false;
|
|
57613
57631
|
const putEntries = create$3$1(null);
|
|
57632
|
+
const putMetadata = create$3$1(null);
|
|
57614
57633
|
const keys$1 = keys$3$1(entries);
|
|
57615
57634
|
const putRecords = {};
|
|
57616
57635
|
const putRecordViews = {};
|
|
@@ -57653,6 +57672,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
57653
57672
|
putRecords[recordId] = true;
|
|
57654
57673
|
}
|
|
57655
57674
|
if (isStoreRecordError(record)) {
|
|
57675
|
+
hasEntries = true;
|
|
57656
57676
|
putEntries[recordKey] = value;
|
|
57657
57677
|
continue;
|
|
57658
57678
|
}
|
|
@@ -57665,24 +57685,43 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
57665
57685
|
}
|
|
57666
57686
|
const denormalizedRecord = buildDurableRecordRepresentation(record, storeRecords, recordEntries, store);
|
|
57667
57687
|
if (denormalizedRecord !== undefined) {
|
|
57688
|
+
hasEntries = true;
|
|
57668
57689
|
putEntries[recordKey] = {
|
|
57669
57690
|
data: denormalizedRecord,
|
|
57670
57691
|
metadata,
|
|
57671
57692
|
};
|
|
57693
|
+
// if undefined then it is pending
|
|
57694
|
+
// we should still update metadata on pending records
|
|
57695
|
+
}
|
|
57696
|
+
else {
|
|
57697
|
+
hasMetadata = true;
|
|
57698
|
+
metadata.expirationTimestamp = metadata.ingestionTimestamp;
|
|
57699
|
+
putMetadata[recordKey] = {
|
|
57700
|
+
metadata,
|
|
57701
|
+
};
|
|
57672
57702
|
}
|
|
57673
57703
|
}
|
|
57674
57704
|
else {
|
|
57705
|
+
hasEntries = true;
|
|
57675
57706
|
putEntries[key] = value;
|
|
57676
57707
|
}
|
|
57677
57708
|
}
|
|
57678
|
-
return putEntries;
|
|
57709
|
+
return { putEntries, putMetadata, hasEntries, hasMetadata };
|
|
57679
57710
|
};
|
|
57680
57711
|
const setEntries = function (entries, segment) {
|
|
57681
57712
|
if (segment !== DefaultDurableSegment) {
|
|
57682
57713
|
return durableStore.setEntries(entries, segment);
|
|
57683
57714
|
}
|
|
57684
|
-
const putEntries = denormalizeEntries(entries);
|
|
57685
|
-
|
|
57715
|
+
const { putEntries, putMetadata, hasEntries, hasMetadata } = denormalizeEntries(entries);
|
|
57716
|
+
const promises = [
|
|
57717
|
+
hasEntries ? durableStore.setEntries(putEntries, segment) : undefined,
|
|
57718
|
+
];
|
|
57719
|
+
if (sqlStore !== undefined && sqlStore.isBatchUpdateSupported()) {
|
|
57720
|
+
promises.push(hasMetadata && sqlStore !== undefined
|
|
57721
|
+
? durableStore.setMetadata(putMetadata, segment)
|
|
57722
|
+
: undefined);
|
|
57723
|
+
}
|
|
57724
|
+
return Promise.all(promises).then(() => { });
|
|
57686
57725
|
};
|
|
57687
57726
|
const batchOperations = function (operations) {
|
|
57688
57727
|
const operationsWithDenormedRecords = [];
|
|
@@ -57699,10 +57738,20 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
57699
57738
|
// this is determined by the plugin supporting update batch calls before it gets to this HOF.
|
|
57700
57739
|
// so we only need to check one entry to confirm this for performance
|
|
57701
57740
|
if (firstEntry.data !== undefined) {
|
|
57741
|
+
const { putEntries, putMetadata, hasMetadata } = denormalizeEntries(operation.entries);
|
|
57702
57742
|
operationsWithDenormedRecords.push({
|
|
57703
57743
|
...operation,
|
|
57704
|
-
entries:
|
|
57744
|
+
entries: putEntries,
|
|
57705
57745
|
});
|
|
57746
|
+
if (hasMetadata &&
|
|
57747
|
+
sqlStore !== undefined &&
|
|
57748
|
+
sqlStore.isBatchUpdateSupported() === true) {
|
|
57749
|
+
operationsWithDenormedRecords.push({
|
|
57750
|
+
...operation,
|
|
57751
|
+
entries: putMetadata,
|
|
57752
|
+
type: 'setMetadata',
|
|
57753
|
+
});
|
|
57754
|
+
}
|
|
57706
57755
|
}
|
|
57707
57756
|
else {
|
|
57708
57757
|
operationsWithDenormedRecords.push(operation);
|
|
@@ -57714,10 +57763,20 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
57714
57763
|
operationsWithDenormedRecords.push(operation);
|
|
57715
57764
|
continue;
|
|
57716
57765
|
}
|
|
57766
|
+
const { putEntries, putMetadata, hasMetadata } = denormalizeEntries(operation.entries);
|
|
57717
57767
|
operationsWithDenormedRecords.push({
|
|
57718
57768
|
...operation,
|
|
57719
|
-
entries:
|
|
57769
|
+
entries: putEntries,
|
|
57720
57770
|
});
|
|
57771
|
+
if (hasMetadata &&
|
|
57772
|
+
sqlStore !== undefined &&
|
|
57773
|
+
sqlStore.isBatchUpdateSupported() === true) {
|
|
57774
|
+
operationsWithDenormedRecords.push({
|
|
57775
|
+
...operation,
|
|
57776
|
+
entries: putMetadata,
|
|
57777
|
+
type: 'setMetadata',
|
|
57778
|
+
});
|
|
57779
|
+
}
|
|
57721
57780
|
}
|
|
57722
57781
|
return durableStore.batchOperations(operationsWithDenormedRecords);
|
|
57723
57782
|
};
|
|
@@ -60699,6 +60758,9 @@ class NimbusSqliteStore {
|
|
|
60699
60758
|
isEvalSupported() {
|
|
60700
60759
|
return true;
|
|
60701
60760
|
}
|
|
60761
|
+
isBatchUpdateSupported() {
|
|
60762
|
+
return this.supportsBatchUpdates;
|
|
60763
|
+
}
|
|
60702
60764
|
query(sql, params) {
|
|
60703
60765
|
return new Promise((resolve, reject) => {
|
|
60704
60766
|
this.plugin.query(sql, params, (result) => {
|
|
@@ -62384,7 +62446,7 @@ function getRuntime() {
|
|
|
62384
62446
|
let getIngestRecords;
|
|
62385
62447
|
let getIngestMetadata;
|
|
62386
62448
|
let getIngestStore;
|
|
62387
|
-
const recordDenormingStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => (getIngestRecords !== undefined ? getIngestRecords() : {}), () => (getIngestMetadata !== undefined ? getIngestMetadata() : {}), () => (getIngestStore !== undefined ? getIngestStore() : undefined));
|
|
62449
|
+
const recordDenormingStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => (getIngestRecords !== undefined ? getIngestRecords() : {}), () => (getIngestMetadata !== undefined ? getIngestMetadata() : {}), () => (getIngestStore !== undefined ? getIngestStore() : undefined), lazyBaseDurableStore);
|
|
62388
62450
|
const baseEnv = new Environment(store, lazyNetworkAdapter);
|
|
62389
62451
|
const gqlEnv = makeEnvironmentGraphqlAware(baseEnv);
|
|
62390
62452
|
const durableEnv = makeDurable(gqlEnv, {
|
|
@@ -62494,7 +62556,7 @@ register$1({
|
|
|
62494
62556
|
id: '@salesforce/lds-network-adapter',
|
|
62495
62557
|
instrument: instrument$2,
|
|
62496
62558
|
});
|
|
62497
|
-
// version: 1.
|
|
62559
|
+
// version: 1.293.0-5fab18553
|
|
62498
62560
|
|
|
62499
62561
|
const { create: create$3, keys: keys$3 } = Object;
|
|
62500
62562
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -82558,7 +82620,7 @@ register$1({
|
|
|
82558
82620
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
82559
82621
|
instrument: instrument$1,
|
|
82560
82622
|
});
|
|
82561
|
-
// version: 1.
|
|
82623
|
+
// version: 1.293.0-c036bce5d
|
|
82562
82624
|
|
|
82563
82625
|
// On core the unstable adapters are re-exported with different names,
|
|
82564
82626
|
// we want to match them here.
|
|
@@ -84814,7 +84876,7 @@ withDefaultLuvio((luvio) => {
|
|
|
84814
84876
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
84815
84877
|
graphQLImperative = ldsAdapter;
|
|
84816
84878
|
});
|
|
84817
|
-
// version: 1.
|
|
84879
|
+
// version: 1.293.0-c036bce5d
|
|
84818
84880
|
|
|
84819
84881
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
84820
84882
|
__proto__: null,
|
|
@@ -85552,7 +85614,7 @@ const callbacks$1 = [];
|
|
|
85552
85614
|
function register(r) {
|
|
85553
85615
|
callbacks$1.forEach((callback) => callback(r));
|
|
85554
85616
|
}
|
|
85555
|
-
// version: 1.
|
|
85617
|
+
// version: 1.293.0-5fab18553
|
|
85556
85618
|
|
|
85557
85619
|
/**
|
|
85558
85620
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -90514,4 +90576,4 @@ const { luvio } = getRuntime();
|
|
|
90514
90576
|
setDefaultLuvio({ luvio });
|
|
90515
90577
|
|
|
90516
90578
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
90517
|
-
// version: 1.
|
|
90579
|
+
// version: 1.293.0-5fab18553
|