@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
|
@@ -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.19-8ff414af
|
|
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.293.0-5fab18553
|
|
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.293.0-5fab18553
|
|
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.293.0-5fab18553
|
|
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.19-8ff414af
|
|
16732
16750
|
|
|
16733
16751
|
const { keys: ObjectKeys$3, create: ObjectCreate$3 } = Object;
|
|
16734
16752
|
|
|
@@ -24666,7 +24684,7 @@
|
|
|
24666
24684
|
};
|
|
24667
24685
|
|
|
24668
24686
|
const TTL$w = 900000;
|
|
24669
|
-
const VERSION$12$1 = "
|
|
24687
|
+
const VERSION$12$1 = "2302a71ca718abb60353eb88dedb1c12";
|
|
24670
24688
|
const RepresentationType$N = 'ObjectInfoRepresentation';
|
|
24671
24689
|
function keyBuilder$1V(luvio, config) {
|
|
24672
24690
|
return keyPrefix$2 + '::' + RepresentationType$N + ':' + config.apiName;
|
|
@@ -24705,6 +24723,10 @@
|
|
|
24705
24723
|
kind: 'Object',
|
|
24706
24724
|
opaque: true
|
|
24707
24725
|
},
|
|
24726
|
+
{
|
|
24727
|
+
name: 'compactLayoutable',
|
|
24728
|
+
kind: 'Scalar'
|
|
24729
|
+
},
|
|
24708
24730
|
{
|
|
24709
24731
|
name: 'createable',
|
|
24710
24732
|
kind: 'Scalar'
|
|
@@ -24769,6 +24791,10 @@
|
|
|
24769
24791
|
kind: 'Object',
|
|
24770
24792
|
opaque: true
|
|
24771
24793
|
},
|
|
24794
|
+
{
|
|
24795
|
+
name: 'searchLayoutable',
|
|
24796
|
+
kind: 'Scalar'
|
|
24797
|
+
},
|
|
24772
24798
|
{
|
|
24773
24799
|
name: 'searchable',
|
|
24774
24800
|
kind: 'Scalar'
|
|
@@ -29644,7 +29670,7 @@
|
|
|
29644
29670
|
}
|
|
29645
29671
|
|
|
29646
29672
|
const TTL$n = 300000;
|
|
29647
|
-
const VERSION$O$1 = "
|
|
29673
|
+
const VERSION$O$1 = "0cd492fdd6c713c206ef53dc02175f71";
|
|
29648
29674
|
const RepresentationType$x = 'AppRepresentation';
|
|
29649
29675
|
function keyBuilder$1k(luvio, config) {
|
|
29650
29676
|
return keyPrefix$2 + '::' + RepresentationType$x + ':' + (config.appId === null ? '' : config.appId);
|
|
@@ -29735,6 +29761,10 @@
|
|
|
29735
29761
|
name: 'isNavTabPersistenceDisabled',
|
|
29736
29762
|
kind: 'Scalar'
|
|
29737
29763
|
},
|
|
29764
|
+
{
|
|
29765
|
+
name: 'isOmniPinnedViewEnabled',
|
|
29766
|
+
kind: 'Scalar'
|
|
29767
|
+
},
|
|
29738
29768
|
{
|
|
29739
29769
|
name: 'label',
|
|
29740
29770
|
kind: 'Scalar'
|
|
@@ -29790,6 +29820,11 @@
|
|
|
29790
29820
|
if (!(existing_isNavTabPersistenceDisabled === incoming_isNavTabPersistenceDisabled)) {
|
|
29791
29821
|
return false;
|
|
29792
29822
|
}
|
|
29823
|
+
const existing_isOmniPinnedViewEnabled = existing.isOmniPinnedViewEnabled;
|
|
29824
|
+
const incoming_isOmniPinnedViewEnabled = incoming.isOmniPinnedViewEnabled;
|
|
29825
|
+
if (!(existing_isOmniPinnedViewEnabled === incoming_isOmniPinnedViewEnabled)) {
|
|
29826
|
+
return false;
|
|
29827
|
+
}
|
|
29793
29828
|
const existing_selected = existing.selected;
|
|
29794
29829
|
const incoming_selected = incoming.selected;
|
|
29795
29830
|
if (!(existing_selected === incoming_selected)) {
|
|
@@ -43169,23 +43204,11 @@
|
|
|
43169
43204
|
return config;
|
|
43170
43205
|
}
|
|
43171
43206
|
|
|
43172
|
-
const ISO8601_DATE_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+Z$/;
|
|
43173
43207
|
function getHeaders(clientOptions) {
|
|
43174
43208
|
const headers = {};
|
|
43175
43209
|
if (untrustedIsObject$2(clientOptions)) {
|
|
43176
43210
|
if (typeof clientOptions.ifUnmodifiedSince === 'string') {
|
|
43177
43211
|
headers.ifUnmodifiedSince = clientOptions.ifUnmodifiedSince;
|
|
43178
|
-
// HTTP standard format date is expected by UI-API
|
|
43179
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since
|
|
43180
|
-
// A component built for Connect API must use If-Unmodified-Since
|
|
43181
|
-
// dates formatted as ISO 8601, which does not match the HTTP spec.
|
|
43182
|
-
// For compatibility, convert the date to match the standard.
|
|
43183
|
-
if (headers.ifUnmodifiedSince.match(ISO8601_DATE_REGEX)) {
|
|
43184
|
-
const utcString = new Date(headers.ifUnmodifiedSince).toUTCString();
|
|
43185
|
-
if (utcString !== 'Invalid Date') {
|
|
43186
|
-
headers.ifUnmodifiedSince = utcString;
|
|
43187
|
-
}
|
|
43188
|
-
}
|
|
43189
43212
|
}
|
|
43190
43213
|
}
|
|
43191
43214
|
return headers;
|
|
@@ -44221,7 +44244,7 @@
|
|
|
44221
44244
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44222
44245
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44223
44246
|
});
|
|
44224
|
-
// version: 1.
|
|
44247
|
+
// version: 1.293.0-c036bce5d
|
|
44225
44248
|
|
|
44226
44249
|
var ldsIdempotencyWriteDisabled = {
|
|
44227
44250
|
isOpen: function (e) {
|
|
@@ -44406,7 +44429,7 @@
|
|
|
44406
44429
|
const { parse: parse$6, stringify: stringify$6 } = JSON;
|
|
44407
44430
|
const { join: join$2, push: push$2, unshift } = Array.prototype;
|
|
44408
44431
|
const { isArray: isArray$5 } = Array;
|
|
44409
|
-
const { entries: entries$
|
|
44432
|
+
const { entries: entries$5, keys: keys$8 } = Object;
|
|
44410
44433
|
|
|
44411
44434
|
const UI_API_BASE_URI = '/services/data/v62.0/ui-api';
|
|
44412
44435
|
|
|
@@ -44713,7 +44736,7 @@
|
|
|
44713
44736
|
if (fulfill === undefined) {
|
|
44714
44737
|
return null;
|
|
44715
44738
|
}
|
|
44716
|
-
const handlersMap = entries$
|
|
44739
|
+
const handlersMap = entries$5(inflightRequests);
|
|
44717
44740
|
for (let i = 0, len = handlersMap.length; i < len; i += 1) {
|
|
44718
44741
|
const [transactionKey, handlers] = handlersMap[i];
|
|
44719
44742
|
// check fulfillment against only the first handler ([0]) because it's equal or
|
|
@@ -51504,7 +51527,7 @@
|
|
|
51504
51527
|
(x.length === 0 || (x.length > 0 && Object.prototype.hasOwnProperty.call(x, x.length - 1))));
|
|
51505
51528
|
}
|
|
51506
51529
|
|
|
51507
|
-
const { create: create$4, keys: keys$4, values: values$2, entries: entries$
|
|
51530
|
+
const { create: create$4, keys: keys$4, values: values$2, entries: entries$4, assign: assign$4 } = Object;
|
|
51508
51531
|
const { stringify: stringify$4, parse: parse$4 } = JSON;
|
|
51509
51532
|
const { isArray: isArray$2$1, from: from$2 } = Array;
|
|
51510
51533
|
|
|
@@ -52252,7 +52275,7 @@
|
|
|
52252
52275
|
}
|
|
52253
52276
|
else {
|
|
52254
52277
|
//`field` match the filedInfo's apiName
|
|
52255
|
-
for (const [op, value] of entries$
|
|
52278
|
+
for (const [op, value] of entries$4(where[field])) {
|
|
52256
52279
|
const operator = operatorToSql(op);
|
|
52257
52280
|
/**
|
|
52258
52281
|
Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
|
|
@@ -53612,9 +53635,134 @@
|
|
|
53612
53635
|
];
|
|
53613
53636
|
}
|
|
53614
53637
|
|
|
53615
|
-
|
|
53616
|
-
|
|
53638
|
+
/*
|
|
53639
|
+
resolves connections...
|
|
53640
|
+
*/
|
|
53641
|
+
async function connectionResolver(obj, args, context, info) {
|
|
53642
|
+
let { recordRepresentation: parentRecord, ingestionTimestamp } = obj;
|
|
53643
|
+
if (!ingestionTimestamp)
|
|
53644
|
+
ingestionTimestamp = 0;
|
|
53645
|
+
if (!parentRecord && excludeStaleRecordsGate.isOpen({ fallback: false })) {
|
|
53646
|
+
// at our record query we fetch each ingestion time stamp and pass it down to each lower resolver to query against
|
|
53647
|
+
ingestionTimestamp = await fetchIngestionTimeStampFromDatabase(info.fieldName, info, args, context.query);
|
|
53648
|
+
}
|
|
53649
|
+
const { query, objectInfos, draftFunctions } = context;
|
|
53650
|
+
let joins = [];
|
|
53651
|
+
let alias = info.fieldName;
|
|
53652
|
+
let childRelationshipFieldName = undefined;
|
|
53653
|
+
if (parentRecord) {
|
|
53654
|
+
context.seenRecordIds.add(parentRecord.id);
|
|
53655
|
+
const parentApiName = parentRecord.apiName;
|
|
53656
|
+
const parentObjectInfo = objectInfos[parentApiName];
|
|
53657
|
+
const childRelationship = parentObjectInfo &&
|
|
53658
|
+
parentObjectInfo.childRelationships.find((rel) => rel.relationshipName === info.fieldName);
|
|
53659
|
+
// or emit/throw if we want to report it
|
|
53660
|
+
if (!childRelationship)
|
|
53661
|
+
return [];
|
|
53662
|
+
alias = childRelationship.childObjectApiName;
|
|
53663
|
+
childRelationshipFieldName = childRelationship.fieldName;
|
|
53664
|
+
}
|
|
53665
|
+
// Alias starts as entity's ApiName
|
|
53666
|
+
const predicates = [
|
|
53667
|
+
...filterToPredicates(args.where, alias, alias, context.objectInfos, joins, draftFunctions),
|
|
53668
|
+
...scopeToPredicates(args.scope, context.settings),
|
|
53669
|
+
...childRelationshipToPredicates(childRelationshipFieldName, parentRecord ? parentRecord.id : undefined),
|
|
53670
|
+
];
|
|
53671
|
+
const scopeJoins = scopeToJoins(args.scope, context.settings);
|
|
53672
|
+
joins.push(...scopeJoins);
|
|
53673
|
+
// Alias starts as entity's ApiName
|
|
53674
|
+
const queryConfig = {
|
|
53675
|
+
alias,
|
|
53676
|
+
joins,
|
|
53677
|
+
predicates,
|
|
53678
|
+
orderBy: orderByToPredicate(args.orderBy, alias, alias, context.objectInfos),
|
|
53679
|
+
limit: args.first,
|
|
53680
|
+
ingestionTimestamp,
|
|
53681
|
+
};
|
|
53682
|
+
const { sql, bindings } = buildQuery(queryConfig);
|
|
53683
|
+
const results = await query(sql, bindings);
|
|
53684
|
+
//map each sql result with the ingestion timestamp to pass it down a level
|
|
53685
|
+
return results.rows
|
|
53686
|
+
.map((row) => row[0])
|
|
53687
|
+
.map((record, index) => {
|
|
53688
|
+
return {
|
|
53689
|
+
record,
|
|
53690
|
+
ingestionTimestamp,
|
|
53691
|
+
index,
|
|
53692
|
+
};
|
|
53693
|
+
});
|
|
53694
|
+
}
|
|
53695
|
+
/**
|
|
53696
|
+
* Converts a childRelationship into a predicate
|
|
53697
|
+
* @param childRelationshipFieldName Reference ID field name to its parent record. A defined `childRelationshipFieldName` string indicates that a child relationship exists
|
|
53698
|
+
* and a relationship predicate needs to be put into place. For example, `ServiceAppointment` has a child relationship `ServiceResources`, whose entity name is `AssignedResource`.
|
|
53699
|
+
* 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`.
|
|
53700
|
+
* @param parentId prarent record Id
|
|
53701
|
+
* @returns predicate array consists at most 1 predicate
|
|
53702
|
+
*/
|
|
53703
|
+
function childRelationshipToPredicates(childRelationshipFieldName, parentId) {
|
|
53704
|
+
const predicates = [];
|
|
53705
|
+
if (childRelationshipFieldName !== undefined && parentId !== undefined) {
|
|
53706
|
+
predicates.push({
|
|
53707
|
+
type: PredicateType.single,
|
|
53708
|
+
leftPath: `$.fields.${childRelationshipFieldName}.value`,
|
|
53709
|
+
operator: '=',
|
|
53710
|
+
value: parentId,
|
|
53711
|
+
});
|
|
53712
|
+
}
|
|
53713
|
+
return predicates;
|
|
53714
|
+
}
|
|
53715
|
+
/**
|
|
53716
|
+
* fetches a query level ingestion time stamp from the L2 cache
|
|
53717
|
+
* if no query has been seen then the timestamp is 0
|
|
53718
|
+
* @param apiName
|
|
53719
|
+
* @param info
|
|
53720
|
+
* @param args
|
|
53721
|
+
* @param query
|
|
53722
|
+
* @returns
|
|
53723
|
+
*/
|
|
53724
|
+
async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
53725
|
+
const { operation, variableValues } = info;
|
|
53726
|
+
// if we cannot find the query key in the database then default to 0 as we assume we have not seen the query
|
|
53727
|
+
// and all the data is not stale
|
|
53728
|
+
let ingestionTimestamp = 0;
|
|
53729
|
+
if (info.fieldNodes.length > 0 && info.fieldNodes[0].arguments !== undefined) {
|
|
53730
|
+
const key = buildKeyStringForRecordQuery(operation,
|
|
53731
|
+
// join varables passed from query to the argument variables given from the AST
|
|
53732
|
+
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
53733
|
+
return readIngestionTimestampForKey(key, query);
|
|
53734
|
+
}
|
|
53735
|
+
return ingestionTimestamp;
|
|
53736
|
+
}
|
|
53737
|
+
/**
|
|
53738
|
+
* Builds the top level record query key based on AST data
|
|
53739
|
+
* @param operation
|
|
53740
|
+
* @param variables
|
|
53741
|
+
* @param argumentNodes
|
|
53742
|
+
* @param currentFieldName
|
|
53743
|
+
* @returns
|
|
53744
|
+
*/
|
|
53745
|
+
function buildKeyStringForRecordQuery(operation, variables, argumentNodes, currentFieldName) {
|
|
53746
|
+
const queryKey = buildQueryTypeStringKey$1({
|
|
53747
|
+
luvio: {},
|
|
53748
|
+
keyPrefix: 'UiApi',
|
|
53749
|
+
schemaName: 'uiapi',
|
|
53750
|
+
queryTypeName: 'Query',
|
|
53751
|
+
operationNode: operation,
|
|
53752
|
+
variables,
|
|
53753
|
+
fragmentMap: {},
|
|
53754
|
+
});
|
|
53755
|
+
const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
53756
|
+
const argumentString = filteredArgumentNodes.length > 0
|
|
53757
|
+
? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
|
|
53758
|
+
: '';
|
|
53759
|
+
return `${queryKey}__uiapi__query__${currentFieldName}${argumentString}`;
|
|
53760
|
+
}
|
|
53761
|
+
|
|
53762
|
+
function passThroughResolver(source) {
|
|
53763
|
+
return source;
|
|
53617
53764
|
}
|
|
53765
|
+
|
|
53618
53766
|
/**
|
|
53619
53767
|
*
|
|
53620
53768
|
* @param schema GraphQL Schema generated from ObjectInfos
|
|
@@ -53647,13 +53795,13 @@
|
|
|
53647
53795
|
}
|
|
53648
53796
|
if (type.name === 'Query') {
|
|
53649
53797
|
for (const field of fields) {
|
|
53650
|
-
field.resolve =
|
|
53798
|
+
field.resolve = passThroughResolver;
|
|
53651
53799
|
}
|
|
53652
53800
|
}
|
|
53653
53801
|
if (type.name === 'UIAPI') {
|
|
53654
53802
|
for (const field of fields) {
|
|
53655
53803
|
if (field.name === 'query') {
|
|
53656
|
-
field.resolve =
|
|
53804
|
+
field.resolve = passThroughResolver;
|
|
53657
53805
|
}
|
|
53658
53806
|
else {
|
|
53659
53807
|
const fieldName = field.name;
|
|
@@ -53680,23 +53828,7 @@
|
|
|
53680
53828
|
// Fields of the `RecordQuery` type are the record queries for the entity types
|
|
53681
53829
|
// supported for the org
|
|
53682
53830
|
for (const recordQuery of fields) {
|
|
53683
|
-
recordQuery.resolve =
|
|
53684
|
-
const { name: currentFieldName } = recordQuery;
|
|
53685
|
-
let ingestionTimestamp = 0;
|
|
53686
|
-
if (excludeStaleRecordsGate.isOpen({ fallback: false })) {
|
|
53687
|
-
// at our record query we fetch each ingestion time stamp and pass it down to each lower resolver to query against
|
|
53688
|
-
ingestionTimestamp = await fetchIngestionTimeStampFromDatabase(currentFieldName, info, args, query);
|
|
53689
|
-
}
|
|
53690
|
-
// In the SF schema, the relevant arguments are passed into RecordQuery fields, but actually used
|
|
53691
|
-
// down in the edge resolvers. For this resolver, we can just return what was passed in
|
|
53692
|
-
// to make it available to the next execution step
|
|
53693
|
-
return {
|
|
53694
|
-
parentArgs: args,
|
|
53695
|
-
parentRecord: record,
|
|
53696
|
-
currentFieldName,
|
|
53697
|
-
ingestionTimestamp,
|
|
53698
|
-
};
|
|
53699
|
-
};
|
|
53831
|
+
recordQuery.resolve = connectionResolver;
|
|
53700
53832
|
}
|
|
53701
53833
|
}
|
|
53702
53834
|
if (type.name.endsWith('Connection')) {
|
|
@@ -53717,7 +53849,13 @@
|
|
|
53717
53849
|
for (const field of fields) {
|
|
53718
53850
|
switch (field.name) {
|
|
53719
53851
|
case 'edges':
|
|
53720
|
-
field.resolve =
|
|
53852
|
+
field.resolve = passThroughResolver;
|
|
53853
|
+
break;
|
|
53854
|
+
case 'pageInfo':
|
|
53855
|
+
field.resolve = function (_value, _args, _context, _info) {
|
|
53856
|
+
// TODO [W-12390939]: implement resolver for PageInfo
|
|
53857
|
+
return {};
|
|
53858
|
+
};
|
|
53721
53859
|
break;
|
|
53722
53860
|
default:
|
|
53723
53861
|
field.resolve = defaultFieldResolver;
|
|
@@ -53865,16 +54003,7 @@
|
|
|
53865
54003
|
else if (isObjectType$1(recordFieldType) &&
|
|
53866
54004
|
field.type.name.endsWith('Connection')) {
|
|
53867
54005
|
// spanning field to a connection
|
|
53868
|
-
field.resolve =
|
|
53869
|
-
seenRecordIds.add(recordRepresentation.id);
|
|
53870
|
-
const { name: currentFieldName } = field;
|
|
53871
|
-
return {
|
|
53872
|
-
parentArgs: args,
|
|
53873
|
-
parentRecord: recordRepresentation,
|
|
53874
|
-
currentFieldName,
|
|
53875
|
-
ingestionTimestamp,
|
|
53876
|
-
};
|
|
53877
|
-
};
|
|
54006
|
+
field.resolve = connectionResolver;
|
|
53878
54007
|
}
|
|
53879
54008
|
else {
|
|
53880
54009
|
field.resolve = function recordFieldResolver({ recordRepresentation: record, }) {
|
|
@@ -53929,123 +54058,10 @@
|
|
|
53929
54058
|
}
|
|
53930
54059
|
return null;
|
|
53931
54060
|
}
|
|
53932
|
-
async function connectionEdgeResolver(obj, _args, context) {
|
|
53933
|
-
const { parentArgs = {}, parentRecord, currentFieldName, ingestionTimestamp } = obj;
|
|
53934
|
-
const { query, objectInfos, draftFunctions } = context;
|
|
53935
|
-
let joins = [];
|
|
53936
|
-
let alias = currentFieldName;
|
|
53937
|
-
let childRelationshipFieldName = undefined;
|
|
53938
|
-
if (parentRecord.id) {
|
|
53939
|
-
const parentApiName = parentRecord.apiName;
|
|
53940
|
-
const parentObjectInfo = objectInfos[parentApiName];
|
|
53941
|
-
const childRelationship = parentObjectInfo &&
|
|
53942
|
-
parentObjectInfo.childRelationships.find((rel) => rel.relationshipName === currentFieldName);
|
|
53943
|
-
// or emit/throw if we want to report it
|
|
53944
|
-
if (!childRelationship)
|
|
53945
|
-
return [];
|
|
53946
|
-
alias = childRelationship.childObjectApiName;
|
|
53947
|
-
childRelationshipFieldName = childRelationship.fieldName;
|
|
53948
|
-
}
|
|
53949
|
-
// Alias starts as entity's ApiName
|
|
53950
|
-
const predicates = [
|
|
53951
|
-
...filterToPredicates(parentArgs.where, alias, alias, context.objectInfos, joins, draftFunctions),
|
|
53952
|
-
...scopeToPredicates(parentArgs.scope, context.settings),
|
|
53953
|
-
...childRelationshipToPredicates(childRelationshipFieldName, parentRecord.id),
|
|
53954
|
-
];
|
|
53955
|
-
const scopeJoins = scopeToJoins(parentArgs.scope, context.settings);
|
|
53956
|
-
joins.push(...scopeJoins);
|
|
53957
|
-
// Alias starts as entity's ApiName
|
|
53958
|
-
const queryConfig = {
|
|
53959
|
-
alias,
|
|
53960
|
-
joins,
|
|
53961
|
-
predicates,
|
|
53962
|
-
orderBy: orderByToPredicate(parentArgs.orderBy, alias, alias, context.objectInfos),
|
|
53963
|
-
limit: parentArgs.first,
|
|
53964
|
-
ingestionTimestamp,
|
|
53965
|
-
};
|
|
53966
|
-
const { sql, bindings } = buildQuery(queryConfig);
|
|
53967
|
-
const results = await query(sql, bindings);
|
|
53968
|
-
//map each sql result with the ingestion timestamp to pass it down a level
|
|
53969
|
-
return results.rows
|
|
53970
|
-
.map((row) => row[0])
|
|
53971
|
-
.map((record, index) => {
|
|
53972
|
-
return {
|
|
53973
|
-
record,
|
|
53974
|
-
ingestionTimestamp,
|
|
53975
|
-
index,
|
|
53976
|
-
};
|
|
53977
|
-
});
|
|
53978
|
-
}
|
|
53979
|
-
/**
|
|
53980
|
-
* Converts a childRelationship into a predicate
|
|
53981
|
-
* @param childRelationshipFieldName Reference ID field name to its parent record. A defined `childRelationshipFieldName` string indicates that a child relationship exists
|
|
53982
|
-
* and a relationship predicate needs to be put into place. For example, `ServiceAppointment` has a child relationship `ServiceResources`, whose entity name is `AssignedResource`.
|
|
53983
|
-
* 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`.
|
|
53984
|
-
* @param parentId prarent record Id
|
|
53985
|
-
* @returns predicate array consists at most 1 predicate
|
|
53986
|
-
*/
|
|
53987
|
-
function childRelationshipToPredicates(childRelationshipFieldName, parentId) {
|
|
53988
|
-
const predicates = [];
|
|
53989
|
-
if (childRelationshipFieldName !== undefined && parentId !== undefined) {
|
|
53990
|
-
predicates.push({
|
|
53991
|
-
type: PredicateType.single,
|
|
53992
|
-
leftPath: `$.fields.${childRelationshipFieldName}.value`,
|
|
53993
|
-
operator: '=',
|
|
53994
|
-
value: parentId,
|
|
53995
|
-
});
|
|
53996
|
-
}
|
|
53997
|
-
return predicates;
|
|
53998
|
-
}
|
|
53999
54061
|
function isRecordType(type) {
|
|
54000
54062
|
const interfaces = type.getInterfaces();
|
|
54001
54063
|
return Boolean(interfaces.find((iface) => iface.name === 'Record'));
|
|
54002
54064
|
}
|
|
54003
|
-
/**
|
|
54004
|
-
* Builds the top level record query key based on AST data
|
|
54005
|
-
* @param operation
|
|
54006
|
-
* @param variables
|
|
54007
|
-
* @param argumentNodes
|
|
54008
|
-
* @param currentFieldName
|
|
54009
|
-
* @returns
|
|
54010
|
-
*/
|
|
54011
|
-
function buildKeyStringForRecordQuery(operation, variables, argumentNodes, currentFieldName) {
|
|
54012
|
-
const queryKey = buildQueryTypeStringKey$1({
|
|
54013
|
-
luvio: {},
|
|
54014
|
-
keyPrefix: 'UiApi',
|
|
54015
|
-
schemaName: 'uiapi',
|
|
54016
|
-
queryTypeName: 'Query',
|
|
54017
|
-
operationNode: operation,
|
|
54018
|
-
variables,
|
|
54019
|
-
fragmentMap: {},
|
|
54020
|
-
});
|
|
54021
|
-
const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
54022
|
-
const argumentString = filteredArgumentNodes.length > 0
|
|
54023
|
-
? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
|
|
54024
|
-
: '';
|
|
54025
|
-
return `${queryKey}__uiapi__query__${currentFieldName}${argumentString}`;
|
|
54026
|
-
}
|
|
54027
|
-
/**
|
|
54028
|
-
* fetches a query level ingestion time stamp from the L2 cache
|
|
54029
|
-
* if no query has been seen then the timestamp is 0
|
|
54030
|
-
* @param apiName
|
|
54031
|
-
* @param info
|
|
54032
|
-
* @param args
|
|
54033
|
-
* @param query
|
|
54034
|
-
* @returns
|
|
54035
|
-
*/
|
|
54036
|
-
async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
54037
|
-
const { operation, variableValues } = info;
|
|
54038
|
-
// if we cannot find the query key in the database then default to 0 as we assume we have not seen the query
|
|
54039
|
-
// and all the data is not stale
|
|
54040
|
-
let ingestionTimestamp = 0;
|
|
54041
|
-
if (info.fieldNodes.length > 0 && info.fieldNodes[0].arguments !== undefined) {
|
|
54042
|
-
const key = buildKeyStringForRecordQuery(operation,
|
|
54043
|
-
// join varables passed from query to the argument variables given from the AST
|
|
54044
|
-
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
54045
|
-
return readIngestionTimestampForKey(key, query);
|
|
54046
|
-
}
|
|
54047
|
-
return ingestionTimestamp;
|
|
54048
|
-
}
|
|
54049
54065
|
|
|
54050
54066
|
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";
|
|
54051
54067
|
|
|
@@ -56147,7 +56163,7 @@
|
|
|
56147
56163
|
*/
|
|
56148
56164
|
|
|
56149
56165
|
|
|
56150
|
-
const { keys: keys$3$1, values: values$1, create: create$3$1, assign: assign$3, freeze: freeze$3 } = Object;
|
|
56166
|
+
const { keys: keys$3$1, values: values$1, create: create$3$1, assign: assign$3, freeze: freeze$3, entries: entries$3 } = Object;
|
|
56151
56167
|
const { stringify: stringify$3, parse: parse$3 } = JSON;
|
|
56152
56168
|
const { shift } = Array.prototype;
|
|
56153
56169
|
const { isArray: isArray$1$1, from: from$1 } = Array;
|
|
@@ -57554,7 +57570,7 @@
|
|
|
57554
57570
|
}
|
|
57555
57571
|
return keyBuilder$26(luvio, { recordId });
|
|
57556
57572
|
}
|
|
57557
|
-
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore) {
|
|
57573
|
+
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore, sqlStore) {
|
|
57558
57574
|
const getEntries = function (entries, segment) {
|
|
57559
57575
|
// this HOF only inspects records in the default segment
|
|
57560
57576
|
if (segment !== DefaultDurableSegment) {
|
|
@@ -57616,7 +57632,10 @@
|
|
|
57616
57632
|
});
|
|
57617
57633
|
};
|
|
57618
57634
|
const denormalizeEntries = function (entries) {
|
|
57635
|
+
let hasEntries = false;
|
|
57636
|
+
let hasMetadata = false;
|
|
57619
57637
|
const putEntries = create$3$1(null);
|
|
57638
|
+
const putMetadata = create$3$1(null);
|
|
57620
57639
|
const keys$1 = keys$3$1(entries);
|
|
57621
57640
|
const putRecords = {};
|
|
57622
57641
|
const putRecordViews = {};
|
|
@@ -57659,6 +57678,7 @@
|
|
|
57659
57678
|
putRecords[recordId] = true;
|
|
57660
57679
|
}
|
|
57661
57680
|
if (isStoreRecordError(record)) {
|
|
57681
|
+
hasEntries = true;
|
|
57662
57682
|
putEntries[recordKey] = value;
|
|
57663
57683
|
continue;
|
|
57664
57684
|
}
|
|
@@ -57671,24 +57691,43 @@
|
|
|
57671
57691
|
}
|
|
57672
57692
|
const denormalizedRecord = buildDurableRecordRepresentation(record, storeRecords, recordEntries, store);
|
|
57673
57693
|
if (denormalizedRecord !== undefined) {
|
|
57694
|
+
hasEntries = true;
|
|
57674
57695
|
putEntries[recordKey] = {
|
|
57675
57696
|
data: denormalizedRecord,
|
|
57676
57697
|
metadata,
|
|
57677
57698
|
};
|
|
57699
|
+
// if undefined then it is pending
|
|
57700
|
+
// we should still update metadata on pending records
|
|
57701
|
+
}
|
|
57702
|
+
else {
|
|
57703
|
+
hasMetadata = true;
|
|
57704
|
+
metadata.expirationTimestamp = metadata.ingestionTimestamp;
|
|
57705
|
+
putMetadata[recordKey] = {
|
|
57706
|
+
metadata,
|
|
57707
|
+
};
|
|
57678
57708
|
}
|
|
57679
57709
|
}
|
|
57680
57710
|
else {
|
|
57711
|
+
hasEntries = true;
|
|
57681
57712
|
putEntries[key] = value;
|
|
57682
57713
|
}
|
|
57683
57714
|
}
|
|
57684
|
-
return putEntries;
|
|
57715
|
+
return { putEntries, putMetadata, hasEntries, hasMetadata };
|
|
57685
57716
|
};
|
|
57686
57717
|
const setEntries = function (entries, segment) {
|
|
57687
57718
|
if (segment !== DefaultDurableSegment) {
|
|
57688
57719
|
return durableStore.setEntries(entries, segment);
|
|
57689
57720
|
}
|
|
57690
|
-
const putEntries = denormalizeEntries(entries);
|
|
57691
|
-
|
|
57721
|
+
const { putEntries, putMetadata, hasEntries, hasMetadata } = denormalizeEntries(entries);
|
|
57722
|
+
const promises = [
|
|
57723
|
+
hasEntries ? durableStore.setEntries(putEntries, segment) : undefined,
|
|
57724
|
+
];
|
|
57725
|
+
if (sqlStore !== undefined && sqlStore.isBatchUpdateSupported()) {
|
|
57726
|
+
promises.push(hasMetadata && sqlStore !== undefined
|
|
57727
|
+
? durableStore.setMetadata(putMetadata, segment)
|
|
57728
|
+
: undefined);
|
|
57729
|
+
}
|
|
57730
|
+
return Promise.all(promises).then(() => { });
|
|
57692
57731
|
};
|
|
57693
57732
|
const batchOperations = function (operations) {
|
|
57694
57733
|
const operationsWithDenormedRecords = [];
|
|
@@ -57705,10 +57744,20 @@
|
|
|
57705
57744
|
// this is determined by the plugin supporting update batch calls before it gets to this HOF.
|
|
57706
57745
|
// so we only need to check one entry to confirm this for performance
|
|
57707
57746
|
if (firstEntry.data !== undefined) {
|
|
57747
|
+
const { putEntries, putMetadata, hasMetadata } = denormalizeEntries(operation.entries);
|
|
57708
57748
|
operationsWithDenormedRecords.push({
|
|
57709
57749
|
...operation,
|
|
57710
|
-
entries:
|
|
57750
|
+
entries: putEntries,
|
|
57711
57751
|
});
|
|
57752
|
+
if (hasMetadata &&
|
|
57753
|
+
sqlStore !== undefined &&
|
|
57754
|
+
sqlStore.isBatchUpdateSupported() === true) {
|
|
57755
|
+
operationsWithDenormedRecords.push({
|
|
57756
|
+
...operation,
|
|
57757
|
+
entries: putMetadata,
|
|
57758
|
+
type: 'setMetadata',
|
|
57759
|
+
});
|
|
57760
|
+
}
|
|
57712
57761
|
}
|
|
57713
57762
|
else {
|
|
57714
57763
|
operationsWithDenormedRecords.push(operation);
|
|
@@ -57720,10 +57769,20 @@
|
|
|
57720
57769
|
operationsWithDenormedRecords.push(operation);
|
|
57721
57770
|
continue;
|
|
57722
57771
|
}
|
|
57772
|
+
const { putEntries, putMetadata, hasMetadata } = denormalizeEntries(operation.entries);
|
|
57723
57773
|
operationsWithDenormedRecords.push({
|
|
57724
57774
|
...operation,
|
|
57725
|
-
entries:
|
|
57775
|
+
entries: putEntries,
|
|
57726
57776
|
});
|
|
57777
|
+
if (hasMetadata &&
|
|
57778
|
+
sqlStore !== undefined &&
|
|
57779
|
+
sqlStore.isBatchUpdateSupported() === true) {
|
|
57780
|
+
operationsWithDenormedRecords.push({
|
|
57781
|
+
...operation,
|
|
57782
|
+
entries: putMetadata,
|
|
57783
|
+
type: 'setMetadata',
|
|
57784
|
+
});
|
|
57785
|
+
}
|
|
57727
57786
|
}
|
|
57728
57787
|
return durableStore.batchOperations(operationsWithDenormedRecords);
|
|
57729
57788
|
};
|
|
@@ -60705,6 +60764,9 @@
|
|
|
60705
60764
|
isEvalSupported() {
|
|
60706
60765
|
return true;
|
|
60707
60766
|
}
|
|
60767
|
+
isBatchUpdateSupported() {
|
|
60768
|
+
return this.supportsBatchUpdates;
|
|
60769
|
+
}
|
|
60708
60770
|
query(sql, params) {
|
|
60709
60771
|
return new Promise((resolve, reject) => {
|
|
60710
60772
|
this.plugin.query(sql, params, (result) => {
|
|
@@ -62390,7 +62452,7 @@
|
|
|
62390
62452
|
let getIngestRecords;
|
|
62391
62453
|
let getIngestMetadata;
|
|
62392
62454
|
let getIngestStore;
|
|
62393
|
-
const recordDenormingStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => (getIngestRecords !== undefined ? getIngestRecords() : {}), () => (getIngestMetadata !== undefined ? getIngestMetadata() : {}), () => (getIngestStore !== undefined ? getIngestStore() : undefined));
|
|
62455
|
+
const recordDenormingStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => (getIngestRecords !== undefined ? getIngestRecords() : {}), () => (getIngestMetadata !== undefined ? getIngestMetadata() : {}), () => (getIngestStore !== undefined ? getIngestStore() : undefined), lazyBaseDurableStore);
|
|
62394
62456
|
const baseEnv = new Environment(store, lazyNetworkAdapter);
|
|
62395
62457
|
const gqlEnv = makeEnvironmentGraphqlAware(baseEnv);
|
|
62396
62458
|
const durableEnv = makeDurable(gqlEnv, {
|
|
@@ -62500,7 +62562,7 @@
|
|
|
62500
62562
|
id: '@salesforce/lds-network-adapter',
|
|
62501
62563
|
instrument: instrument$2,
|
|
62502
62564
|
});
|
|
62503
|
-
// version: 1.
|
|
62565
|
+
// version: 1.293.0-5fab18553
|
|
62504
62566
|
|
|
62505
62567
|
const { create: create$3, keys: keys$3 } = Object;
|
|
62506
62568
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -82564,7 +82626,7 @@
|
|
|
82564
82626
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
82565
82627
|
instrument: instrument$1,
|
|
82566
82628
|
});
|
|
82567
|
-
// version: 1.
|
|
82629
|
+
// version: 1.293.0-c036bce5d
|
|
82568
82630
|
|
|
82569
82631
|
// On core the unstable adapters are re-exported with different names,
|
|
82570
82632
|
// we want to match them here.
|
|
@@ -84820,7 +84882,7 @@
|
|
|
84820
84882
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
84821
84883
|
graphQLImperative = ldsAdapter;
|
|
84822
84884
|
});
|
|
84823
|
-
// version: 1.
|
|
84885
|
+
// version: 1.293.0-c036bce5d
|
|
84824
84886
|
|
|
84825
84887
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
84826
84888
|
__proto__: null,
|
|
@@ -85558,7 +85620,7 @@
|
|
|
85558
85620
|
function register(r) {
|
|
85559
85621
|
callbacks$1.forEach((callback) => callback(r));
|
|
85560
85622
|
}
|
|
85561
|
-
// version: 1.
|
|
85623
|
+
// version: 1.293.0-5fab18553
|
|
85562
85624
|
|
|
85563
85625
|
/**
|
|
85564
85626
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -90539,4 +90601,4 @@
|
|
|
90539
90601
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
90540
90602
|
|
|
90541
90603
|
}));
|
|
90542
|
-
// version: 1.
|
|
90604
|
+
// version: 1.293.0-5fab18553
|