@salesforce/lds-worker-api 1.292.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 +227 -170
- package/dist/standalone/umd/lds-worker-api.js +227 -170
- package/package.json +10 -10
|
@@ -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
|
|
|
@@ -44220,7 +44238,7 @@ withDefaultLuvio((luvio) => {
|
|
|
44220
44238
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44221
44239
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44222
44240
|
});
|
|
44223
|
-
// version: 1.
|
|
44241
|
+
// version: 1.293.0-c036bce5d
|
|
44224
44242
|
|
|
44225
44243
|
var ldsIdempotencyWriteDisabled = {
|
|
44226
44244
|
isOpen: function (e) {
|
|
@@ -44405,7 +44423,7 @@ var ldsMetadataRefreshEnabled = {
|
|
|
44405
44423
|
const { parse: parse$6, stringify: stringify$6 } = JSON;
|
|
44406
44424
|
const { join: join$2, push: push$2, unshift } = Array.prototype;
|
|
44407
44425
|
const { isArray: isArray$5 } = Array;
|
|
44408
|
-
const { entries: entries$
|
|
44426
|
+
const { entries: entries$5, keys: keys$8 } = Object;
|
|
44409
44427
|
|
|
44410
44428
|
const UI_API_BASE_URI = '/services/data/v62.0/ui-api';
|
|
44411
44429
|
|
|
@@ -44712,7 +44730,7 @@ function getFulfillingRequest(inflightRequests, resourceRequest) {
|
|
|
44712
44730
|
if (fulfill === undefined) {
|
|
44713
44731
|
return null;
|
|
44714
44732
|
}
|
|
44715
|
-
const handlersMap = entries$
|
|
44733
|
+
const handlersMap = entries$5(inflightRequests);
|
|
44716
44734
|
for (let i = 0, len = handlersMap.length; i < len; i += 1) {
|
|
44717
44735
|
const [transactionKey, handlers] = handlersMap[i];
|
|
44718
44736
|
// check fulfillment against only the first handler ([0]) because it's equal or
|
|
@@ -51503,7 +51521,7 @@ function isArrayLike(x) {
|
|
|
51503
51521
|
(x.length === 0 || (x.length > 0 && Object.prototype.hasOwnProperty.call(x, x.length - 1))));
|
|
51504
51522
|
}
|
|
51505
51523
|
|
|
51506
|
-
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;
|
|
51507
51525
|
const { stringify: stringify$4, parse: parse$4 } = JSON;
|
|
51508
51526
|
const { isArray: isArray$2$1, from: from$2 } = Array;
|
|
51509
51527
|
|
|
@@ -52251,7 +52269,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
|
|
|
52251
52269
|
}
|
|
52252
52270
|
else {
|
|
52253
52271
|
//`field` match the filedInfo's apiName
|
|
52254
|
-
for (const [op, value] of entries$
|
|
52272
|
+
for (const [op, value] of entries$4(where[field])) {
|
|
52255
52273
|
const operator = operatorToSql(op);
|
|
52256
52274
|
/**
|
|
52257
52275
|
Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
|
|
@@ -53611,9 +53629,134 @@ function scopeToPredicates(scope = '', settings) {
|
|
|
53611
53629
|
];
|
|
53612
53630
|
}
|
|
53613
53631
|
|
|
53614
|
-
|
|
53615
|
-
|
|
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
|
+
});
|
|
53616
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;
|
|
53758
|
+
}
|
|
53759
|
+
|
|
53617
53760
|
/**
|
|
53618
53761
|
*
|
|
53619
53762
|
* @param schema GraphQL Schema generated from ObjectInfos
|
|
@@ -53646,13 +53789,13 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
53646
53789
|
}
|
|
53647
53790
|
if (type.name === 'Query') {
|
|
53648
53791
|
for (const field of fields) {
|
|
53649
|
-
field.resolve =
|
|
53792
|
+
field.resolve = passThroughResolver;
|
|
53650
53793
|
}
|
|
53651
53794
|
}
|
|
53652
53795
|
if (type.name === 'UIAPI') {
|
|
53653
53796
|
for (const field of fields) {
|
|
53654
53797
|
if (field.name === 'query') {
|
|
53655
|
-
field.resolve =
|
|
53798
|
+
field.resolve = passThroughResolver;
|
|
53656
53799
|
}
|
|
53657
53800
|
else {
|
|
53658
53801
|
const fieldName = field.name;
|
|
@@ -53679,23 +53822,7 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
53679
53822
|
// Fields of the `RecordQuery` type are the record queries for the entity types
|
|
53680
53823
|
// supported for the org
|
|
53681
53824
|
for (const recordQuery of fields) {
|
|
53682
|
-
recordQuery.resolve =
|
|
53683
|
-
const { name: currentFieldName } = recordQuery;
|
|
53684
|
-
let ingestionTimestamp = 0;
|
|
53685
|
-
if (excludeStaleRecordsGate.isOpen({ fallback: false })) {
|
|
53686
|
-
// at our record query we fetch each ingestion time stamp and pass it down to each lower resolver to query against
|
|
53687
|
-
ingestionTimestamp = await fetchIngestionTimeStampFromDatabase(currentFieldName, info, args, query);
|
|
53688
|
-
}
|
|
53689
|
-
// In the SF schema, the relevant arguments are passed into RecordQuery fields, but actually used
|
|
53690
|
-
// down in the edge resolvers. For this resolver, we can just return what was passed in
|
|
53691
|
-
// to make it available to the next execution step
|
|
53692
|
-
return {
|
|
53693
|
-
parentArgs: args,
|
|
53694
|
-
parentRecord: record,
|
|
53695
|
-
currentFieldName,
|
|
53696
|
-
ingestionTimestamp,
|
|
53697
|
-
};
|
|
53698
|
-
};
|
|
53825
|
+
recordQuery.resolve = connectionResolver;
|
|
53699
53826
|
}
|
|
53700
53827
|
}
|
|
53701
53828
|
if (type.name.endsWith('Connection')) {
|
|
@@ -53716,7 +53843,13 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
53716
53843
|
for (const field of fields) {
|
|
53717
53844
|
switch (field.name) {
|
|
53718
53845
|
case 'edges':
|
|
53719
|
-
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
|
+
};
|
|
53720
53853
|
break;
|
|
53721
53854
|
default:
|
|
53722
53855
|
field.resolve = defaultFieldResolver;
|
|
@@ -53864,16 +53997,7 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
53864
53997
|
else if (isObjectType$1(recordFieldType) &&
|
|
53865
53998
|
field.type.name.endsWith('Connection')) {
|
|
53866
53999
|
// spanning field to a connection
|
|
53867
|
-
field.resolve =
|
|
53868
|
-
seenRecordIds.add(recordRepresentation.id);
|
|
53869
|
-
const { name: currentFieldName } = field;
|
|
53870
|
-
return {
|
|
53871
|
-
parentArgs: args,
|
|
53872
|
-
parentRecord: recordRepresentation,
|
|
53873
|
-
currentFieldName,
|
|
53874
|
-
ingestionTimestamp,
|
|
53875
|
-
};
|
|
53876
|
-
};
|
|
54000
|
+
field.resolve = connectionResolver;
|
|
53877
54001
|
}
|
|
53878
54002
|
else {
|
|
53879
54003
|
field.resolve = function recordFieldResolver({ recordRepresentation: record, }) {
|
|
@@ -53928,123 +54052,10 @@ _, { objectInfos }) {
|
|
|
53928
54052
|
}
|
|
53929
54053
|
return null;
|
|
53930
54054
|
}
|
|
53931
|
-
async function connectionEdgeResolver(obj, _args, context) {
|
|
53932
|
-
const { parentArgs = {}, parentRecord, currentFieldName, ingestionTimestamp } = obj;
|
|
53933
|
-
const { query, objectInfos, draftFunctions } = context;
|
|
53934
|
-
let joins = [];
|
|
53935
|
-
let alias = currentFieldName;
|
|
53936
|
-
let childRelationshipFieldName = undefined;
|
|
53937
|
-
if (parentRecord.id) {
|
|
53938
|
-
const parentApiName = parentRecord.apiName;
|
|
53939
|
-
const parentObjectInfo = objectInfos[parentApiName];
|
|
53940
|
-
const childRelationship = parentObjectInfo &&
|
|
53941
|
-
parentObjectInfo.childRelationships.find((rel) => rel.relationshipName === currentFieldName);
|
|
53942
|
-
// or emit/throw if we want to report it
|
|
53943
|
-
if (!childRelationship)
|
|
53944
|
-
return [];
|
|
53945
|
-
alias = childRelationship.childObjectApiName;
|
|
53946
|
-
childRelationshipFieldName = childRelationship.fieldName;
|
|
53947
|
-
}
|
|
53948
|
-
// Alias starts as entity's ApiName
|
|
53949
|
-
const predicates = [
|
|
53950
|
-
...filterToPredicates(parentArgs.where, alias, alias, context.objectInfos, joins, draftFunctions),
|
|
53951
|
-
...scopeToPredicates(parentArgs.scope, context.settings),
|
|
53952
|
-
...childRelationshipToPredicates(childRelationshipFieldName, parentRecord.id),
|
|
53953
|
-
];
|
|
53954
|
-
const scopeJoins = scopeToJoins(parentArgs.scope, context.settings);
|
|
53955
|
-
joins.push(...scopeJoins);
|
|
53956
|
-
// Alias starts as entity's ApiName
|
|
53957
|
-
const queryConfig = {
|
|
53958
|
-
alias,
|
|
53959
|
-
joins,
|
|
53960
|
-
predicates,
|
|
53961
|
-
orderBy: orderByToPredicate(parentArgs.orderBy, alias, alias, context.objectInfos),
|
|
53962
|
-
limit: parentArgs.first,
|
|
53963
|
-
ingestionTimestamp,
|
|
53964
|
-
};
|
|
53965
|
-
const { sql, bindings } = buildQuery(queryConfig);
|
|
53966
|
-
const results = await query(sql, bindings);
|
|
53967
|
-
//map each sql result with the ingestion timestamp to pass it down a level
|
|
53968
|
-
return results.rows
|
|
53969
|
-
.map((row) => row[0])
|
|
53970
|
-
.map((record, index) => {
|
|
53971
|
-
return {
|
|
53972
|
-
record,
|
|
53973
|
-
ingestionTimestamp,
|
|
53974
|
-
index,
|
|
53975
|
-
};
|
|
53976
|
-
});
|
|
53977
|
-
}
|
|
53978
|
-
/**
|
|
53979
|
-
* Converts a childRelationship into a predicate
|
|
53980
|
-
* @param childRelationshipFieldName Reference ID field name to its parent record. A defined `childRelationshipFieldName` string indicates that a child relationship exists
|
|
53981
|
-
* and a relationship predicate needs to be put into place. For example, `ServiceAppointment` has a child relationship `ServiceResources`, whose entity name is `AssignedResource`.
|
|
53982
|
-
* Once the parent `ServiceAppointment` record comes back, its child connection starts to resolve. Child `AssignedResource` record needs to reference to parent Id using field `ServiceAppointmentId`.
|
|
53983
|
-
* @param parentId prarent record Id
|
|
53984
|
-
* @returns predicate array consists at most 1 predicate
|
|
53985
|
-
*/
|
|
53986
|
-
function childRelationshipToPredicates(childRelationshipFieldName, parentId) {
|
|
53987
|
-
const predicates = [];
|
|
53988
|
-
if (childRelationshipFieldName !== undefined && parentId !== undefined) {
|
|
53989
|
-
predicates.push({
|
|
53990
|
-
type: PredicateType.single,
|
|
53991
|
-
leftPath: `$.fields.${childRelationshipFieldName}.value`,
|
|
53992
|
-
operator: '=',
|
|
53993
|
-
value: parentId,
|
|
53994
|
-
});
|
|
53995
|
-
}
|
|
53996
|
-
return predicates;
|
|
53997
|
-
}
|
|
53998
54055
|
function isRecordType(type) {
|
|
53999
54056
|
const interfaces = type.getInterfaces();
|
|
54000
54057
|
return Boolean(interfaces.find((iface) => iface.name === 'Record'));
|
|
54001
54058
|
}
|
|
54002
|
-
/**
|
|
54003
|
-
* Builds the top level record query key based on AST data
|
|
54004
|
-
* @param operation
|
|
54005
|
-
* @param variables
|
|
54006
|
-
* @param argumentNodes
|
|
54007
|
-
* @param currentFieldName
|
|
54008
|
-
* @returns
|
|
54009
|
-
*/
|
|
54010
|
-
function buildKeyStringForRecordQuery(operation, variables, argumentNodes, currentFieldName) {
|
|
54011
|
-
const queryKey = buildQueryTypeStringKey$1({
|
|
54012
|
-
luvio: {},
|
|
54013
|
-
keyPrefix: 'UiApi',
|
|
54014
|
-
schemaName: 'uiapi',
|
|
54015
|
-
queryTypeName: 'Query',
|
|
54016
|
-
operationNode: operation,
|
|
54017
|
-
variables,
|
|
54018
|
-
fragmentMap: {},
|
|
54019
|
-
});
|
|
54020
|
-
const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
54021
|
-
const argumentString = filteredArgumentNodes.length > 0
|
|
54022
|
-
? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
|
|
54023
|
-
: '';
|
|
54024
|
-
return `${queryKey}__uiapi__query__${currentFieldName}${argumentString}`;
|
|
54025
|
-
}
|
|
54026
|
-
/**
|
|
54027
|
-
* fetches a query level ingestion time stamp from the L2 cache
|
|
54028
|
-
* if no query has been seen then the timestamp is 0
|
|
54029
|
-
* @param apiName
|
|
54030
|
-
* @param info
|
|
54031
|
-
* @param args
|
|
54032
|
-
* @param query
|
|
54033
|
-
* @returns
|
|
54034
|
-
*/
|
|
54035
|
-
async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
54036
|
-
const { operation, variableValues } = info;
|
|
54037
|
-
// if we cannot find the query key in the database then default to 0 as we assume we have not seen the query
|
|
54038
|
-
// and all the data is not stale
|
|
54039
|
-
let ingestionTimestamp = 0;
|
|
54040
|
-
if (info.fieldNodes.length > 0 && info.fieldNodes[0].arguments !== undefined) {
|
|
54041
|
-
const key = buildKeyStringForRecordQuery(operation,
|
|
54042
|
-
// join varables passed from query to the argument variables given from the AST
|
|
54043
|
-
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
54044
|
-
return readIngestionTimestampForKey(key, query);
|
|
54045
|
-
}
|
|
54046
|
-
return ingestionTimestamp;
|
|
54047
|
-
}
|
|
54048
54059
|
|
|
54049
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";
|
|
54050
54061
|
|
|
@@ -56146,7 +56157,7 @@ function createFieldNode(nameValue, selectionSet) {
|
|
|
56146
56157
|
*/
|
|
56147
56158
|
|
|
56148
56159
|
|
|
56149
|
-
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;
|
|
56150
56161
|
const { stringify: stringify$3, parse: parse$3 } = JSON;
|
|
56151
56162
|
const { shift } = Array.prototype;
|
|
56152
56163
|
const { isArray: isArray$1$1, from: from$1 } = Array;
|
|
@@ -57553,7 +57564,7 @@ function getDenormalizedKey(originalKey, recordId, luvio) {
|
|
|
57553
57564
|
}
|
|
57554
57565
|
return keyBuilder$26(luvio, { recordId });
|
|
57555
57566
|
}
|
|
57556
|
-
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore) {
|
|
57567
|
+
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore, sqlStore) {
|
|
57557
57568
|
const getEntries = function (entries, segment) {
|
|
57558
57569
|
// this HOF only inspects records in the default segment
|
|
57559
57570
|
if (segment !== DefaultDurableSegment) {
|
|
@@ -57615,7 +57626,10 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
57615
57626
|
});
|
|
57616
57627
|
};
|
|
57617
57628
|
const denormalizeEntries = function (entries) {
|
|
57629
|
+
let hasEntries = false;
|
|
57630
|
+
let hasMetadata = false;
|
|
57618
57631
|
const putEntries = create$3$1(null);
|
|
57632
|
+
const putMetadata = create$3$1(null);
|
|
57619
57633
|
const keys$1 = keys$3$1(entries);
|
|
57620
57634
|
const putRecords = {};
|
|
57621
57635
|
const putRecordViews = {};
|
|
@@ -57658,6 +57672,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
57658
57672
|
putRecords[recordId] = true;
|
|
57659
57673
|
}
|
|
57660
57674
|
if (isStoreRecordError(record)) {
|
|
57675
|
+
hasEntries = true;
|
|
57661
57676
|
putEntries[recordKey] = value;
|
|
57662
57677
|
continue;
|
|
57663
57678
|
}
|
|
@@ -57670,24 +57685,43 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
57670
57685
|
}
|
|
57671
57686
|
const denormalizedRecord = buildDurableRecordRepresentation(record, storeRecords, recordEntries, store);
|
|
57672
57687
|
if (denormalizedRecord !== undefined) {
|
|
57688
|
+
hasEntries = true;
|
|
57673
57689
|
putEntries[recordKey] = {
|
|
57674
57690
|
data: denormalizedRecord,
|
|
57675
57691
|
metadata,
|
|
57676
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
|
+
};
|
|
57677
57702
|
}
|
|
57678
57703
|
}
|
|
57679
57704
|
else {
|
|
57705
|
+
hasEntries = true;
|
|
57680
57706
|
putEntries[key] = value;
|
|
57681
57707
|
}
|
|
57682
57708
|
}
|
|
57683
|
-
return putEntries;
|
|
57709
|
+
return { putEntries, putMetadata, hasEntries, hasMetadata };
|
|
57684
57710
|
};
|
|
57685
57711
|
const setEntries = function (entries, segment) {
|
|
57686
57712
|
if (segment !== DefaultDurableSegment) {
|
|
57687
57713
|
return durableStore.setEntries(entries, segment);
|
|
57688
57714
|
}
|
|
57689
|
-
const putEntries = denormalizeEntries(entries);
|
|
57690
|
-
|
|
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(() => { });
|
|
57691
57725
|
};
|
|
57692
57726
|
const batchOperations = function (operations) {
|
|
57693
57727
|
const operationsWithDenormedRecords = [];
|
|
@@ -57704,10 +57738,20 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
57704
57738
|
// this is determined by the plugin supporting update batch calls before it gets to this HOF.
|
|
57705
57739
|
// so we only need to check one entry to confirm this for performance
|
|
57706
57740
|
if (firstEntry.data !== undefined) {
|
|
57741
|
+
const { putEntries, putMetadata, hasMetadata } = denormalizeEntries(operation.entries);
|
|
57707
57742
|
operationsWithDenormedRecords.push({
|
|
57708
57743
|
...operation,
|
|
57709
|
-
entries:
|
|
57744
|
+
entries: putEntries,
|
|
57710
57745
|
});
|
|
57746
|
+
if (hasMetadata &&
|
|
57747
|
+
sqlStore !== undefined &&
|
|
57748
|
+
sqlStore.isBatchUpdateSupported() === true) {
|
|
57749
|
+
operationsWithDenormedRecords.push({
|
|
57750
|
+
...operation,
|
|
57751
|
+
entries: putMetadata,
|
|
57752
|
+
type: 'setMetadata',
|
|
57753
|
+
});
|
|
57754
|
+
}
|
|
57711
57755
|
}
|
|
57712
57756
|
else {
|
|
57713
57757
|
operationsWithDenormedRecords.push(operation);
|
|
@@ -57719,10 +57763,20 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
57719
57763
|
operationsWithDenormedRecords.push(operation);
|
|
57720
57764
|
continue;
|
|
57721
57765
|
}
|
|
57766
|
+
const { putEntries, putMetadata, hasMetadata } = denormalizeEntries(operation.entries);
|
|
57722
57767
|
operationsWithDenormedRecords.push({
|
|
57723
57768
|
...operation,
|
|
57724
|
-
entries:
|
|
57769
|
+
entries: putEntries,
|
|
57725
57770
|
});
|
|
57771
|
+
if (hasMetadata &&
|
|
57772
|
+
sqlStore !== undefined &&
|
|
57773
|
+
sqlStore.isBatchUpdateSupported() === true) {
|
|
57774
|
+
operationsWithDenormedRecords.push({
|
|
57775
|
+
...operation,
|
|
57776
|
+
entries: putMetadata,
|
|
57777
|
+
type: 'setMetadata',
|
|
57778
|
+
});
|
|
57779
|
+
}
|
|
57726
57780
|
}
|
|
57727
57781
|
return durableStore.batchOperations(operationsWithDenormedRecords);
|
|
57728
57782
|
};
|
|
@@ -60704,6 +60758,9 @@ class NimbusSqliteStore {
|
|
|
60704
60758
|
isEvalSupported() {
|
|
60705
60759
|
return true;
|
|
60706
60760
|
}
|
|
60761
|
+
isBatchUpdateSupported() {
|
|
60762
|
+
return this.supportsBatchUpdates;
|
|
60763
|
+
}
|
|
60707
60764
|
query(sql, params) {
|
|
60708
60765
|
return new Promise((resolve, reject) => {
|
|
60709
60766
|
this.plugin.query(sql, params, (result) => {
|
|
@@ -62389,7 +62446,7 @@ function getRuntime() {
|
|
|
62389
62446
|
let getIngestRecords;
|
|
62390
62447
|
let getIngestMetadata;
|
|
62391
62448
|
let getIngestStore;
|
|
62392
|
-
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);
|
|
62393
62450
|
const baseEnv = new Environment(store, lazyNetworkAdapter);
|
|
62394
62451
|
const gqlEnv = makeEnvironmentGraphqlAware(baseEnv);
|
|
62395
62452
|
const durableEnv = makeDurable(gqlEnv, {
|
|
@@ -62499,7 +62556,7 @@ register$1({
|
|
|
62499
62556
|
id: '@salesforce/lds-network-adapter',
|
|
62500
62557
|
instrument: instrument$2,
|
|
62501
62558
|
});
|
|
62502
|
-
// version: 1.
|
|
62559
|
+
// version: 1.293.0-5fab18553
|
|
62503
62560
|
|
|
62504
62561
|
const { create: create$3, keys: keys$3 } = Object;
|
|
62505
62562
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -82563,7 +82620,7 @@ register$1({
|
|
|
82563
82620
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
82564
82621
|
instrument: instrument$1,
|
|
82565
82622
|
});
|
|
82566
|
-
// version: 1.
|
|
82623
|
+
// version: 1.293.0-c036bce5d
|
|
82567
82624
|
|
|
82568
82625
|
// On core the unstable adapters are re-exported with different names,
|
|
82569
82626
|
// we want to match them here.
|
|
@@ -84819,7 +84876,7 @@ withDefaultLuvio((luvio) => {
|
|
|
84819
84876
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
84820
84877
|
graphQLImperative = ldsAdapter;
|
|
84821
84878
|
});
|
|
84822
|
-
// version: 1.
|
|
84879
|
+
// version: 1.293.0-c036bce5d
|
|
84823
84880
|
|
|
84824
84881
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
84825
84882
|
__proto__: null,
|
|
@@ -85557,7 +85614,7 @@ const callbacks$1 = [];
|
|
|
85557
85614
|
function register(r) {
|
|
85558
85615
|
callbacks$1.forEach((callback) => callback(r));
|
|
85559
85616
|
}
|
|
85560
|
-
// version: 1.
|
|
85617
|
+
// version: 1.293.0-5fab18553
|
|
85561
85618
|
|
|
85562
85619
|
/**
|
|
85563
85620
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -90519,4 +90576,4 @@ const { luvio } = getRuntime();
|
|
|
90519
90576
|
setDefaultLuvio({ luvio });
|
|
90520
90577
|
|
|
90521
90578
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
90522
|
-
// version: 1.
|
|
90579
|
+
// version: 1.293.0-5fab18553
|