@salesforce/lds-runtime-mobile 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/main.js +197 -158
- package/package.json +16 -16
- package/sfdc/main.js +197 -158
package/dist/main.js
CHANGED
|
@@ -52,7 +52,7 @@ import ldsMetadataRefreshEnabled from '@salesforce/gate/lds.metadataRefreshEnabl
|
|
|
52
52
|
const { parse: parse$6, stringify: stringify$6 } = JSON;
|
|
53
53
|
const { join: join$2, push: push$2, unshift } = Array.prototype;
|
|
54
54
|
const { isArray: isArray$5 } = Array;
|
|
55
|
-
const { entries: entries$
|
|
55
|
+
const { entries: entries$5, keys: keys$8 } = Object;
|
|
56
56
|
|
|
57
57
|
const UI_API_BASE_URI = '/services/data/v62.0/ui-api';
|
|
58
58
|
|
|
@@ -364,7 +364,7 @@ function getFulfillingRequest(inflightRequests, resourceRequest) {
|
|
|
364
364
|
if (fulfill === undefined) {
|
|
365
365
|
return null;
|
|
366
366
|
}
|
|
367
|
-
const handlersMap = entries$
|
|
367
|
+
const handlersMap = entries$5(inflightRequests);
|
|
368
368
|
for (let i = 0, len = handlersMap.length; i < len; i += 1) {
|
|
369
369
|
const [transactionKey, handlers] = handlersMap[i];
|
|
370
370
|
// check fulfillment against only the first handler ([0]) because it's equal or
|
|
@@ -7177,7 +7177,7 @@ function isArrayLike(x) {
|
|
|
7177
7177
|
(x.length === 0 || (x.length > 0 && Object.prototype.hasOwnProperty.call(x, x.length - 1))));
|
|
7178
7178
|
}
|
|
7179
7179
|
|
|
7180
|
-
const { create: create$4, keys: keys$4, values: values$2, entries: entries$
|
|
7180
|
+
const { create: create$4, keys: keys$4, values: values$2, entries: entries$4, assign: assign$4 } = Object;
|
|
7181
7181
|
const { stringify: stringify$4, parse: parse$4 } = JSON;
|
|
7182
7182
|
const { isArray: isArray$2, from: from$2 } = Array;
|
|
7183
7183
|
|
|
@@ -7925,7 +7925,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
|
|
|
7925
7925
|
}
|
|
7926
7926
|
else {
|
|
7927
7927
|
//`field` match the filedInfo's apiName
|
|
7928
|
-
for (const [op, value] of entries$
|
|
7928
|
+
for (const [op, value] of entries$4(where[field])) {
|
|
7929
7929
|
const operator = operatorToSql(op);
|
|
7930
7930
|
/**
|
|
7931
7931
|
Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
|
|
@@ -9285,9 +9285,134 @@ function scopeToPredicates(scope = '', settings) {
|
|
|
9285
9285
|
];
|
|
9286
9286
|
}
|
|
9287
9287
|
|
|
9288
|
-
|
|
9289
|
-
|
|
9288
|
+
/*
|
|
9289
|
+
resolves connections...
|
|
9290
|
+
*/
|
|
9291
|
+
async function connectionResolver(obj, args, context, info) {
|
|
9292
|
+
let { recordRepresentation: parentRecord, ingestionTimestamp } = obj;
|
|
9293
|
+
if (!ingestionTimestamp)
|
|
9294
|
+
ingestionTimestamp = 0;
|
|
9295
|
+
if (!parentRecord && excludeStaleRecordsGate.isOpen({ fallback: false })) {
|
|
9296
|
+
// at our record query we fetch each ingestion time stamp and pass it down to each lower resolver to query against
|
|
9297
|
+
ingestionTimestamp = await fetchIngestionTimeStampFromDatabase(info.fieldName, info, args, context.query);
|
|
9298
|
+
}
|
|
9299
|
+
const { query, objectInfos, draftFunctions } = context;
|
|
9300
|
+
let joins = [];
|
|
9301
|
+
let alias = info.fieldName;
|
|
9302
|
+
let childRelationshipFieldName = undefined;
|
|
9303
|
+
if (parentRecord) {
|
|
9304
|
+
context.seenRecordIds.add(parentRecord.id);
|
|
9305
|
+
const parentApiName = parentRecord.apiName;
|
|
9306
|
+
const parentObjectInfo = objectInfos[parentApiName];
|
|
9307
|
+
const childRelationship = parentObjectInfo &&
|
|
9308
|
+
parentObjectInfo.childRelationships.find((rel) => rel.relationshipName === info.fieldName);
|
|
9309
|
+
// or emit/throw if we want to report it
|
|
9310
|
+
if (!childRelationship)
|
|
9311
|
+
return [];
|
|
9312
|
+
alias = childRelationship.childObjectApiName;
|
|
9313
|
+
childRelationshipFieldName = childRelationship.fieldName;
|
|
9314
|
+
}
|
|
9315
|
+
// Alias starts as entity's ApiName
|
|
9316
|
+
const predicates = [
|
|
9317
|
+
...filterToPredicates(args.where, alias, alias, context.objectInfos, joins, draftFunctions),
|
|
9318
|
+
...scopeToPredicates(args.scope, context.settings),
|
|
9319
|
+
...childRelationshipToPredicates(childRelationshipFieldName, parentRecord ? parentRecord.id : undefined),
|
|
9320
|
+
];
|
|
9321
|
+
const scopeJoins = scopeToJoins(args.scope, context.settings);
|
|
9322
|
+
joins.push(...scopeJoins);
|
|
9323
|
+
// Alias starts as entity's ApiName
|
|
9324
|
+
const queryConfig = {
|
|
9325
|
+
alias,
|
|
9326
|
+
joins,
|
|
9327
|
+
predicates,
|
|
9328
|
+
orderBy: orderByToPredicate(args.orderBy, alias, alias, context.objectInfos),
|
|
9329
|
+
limit: args.first,
|
|
9330
|
+
ingestionTimestamp,
|
|
9331
|
+
};
|
|
9332
|
+
const { sql, bindings } = buildQuery(queryConfig);
|
|
9333
|
+
const results = await query(sql, bindings);
|
|
9334
|
+
//map each sql result with the ingestion timestamp to pass it down a level
|
|
9335
|
+
return results.rows
|
|
9336
|
+
.map((row) => row[0])
|
|
9337
|
+
.map((record, index) => {
|
|
9338
|
+
return {
|
|
9339
|
+
record,
|
|
9340
|
+
ingestionTimestamp,
|
|
9341
|
+
index,
|
|
9342
|
+
};
|
|
9343
|
+
});
|
|
9344
|
+
}
|
|
9345
|
+
/**
|
|
9346
|
+
* Converts a childRelationship into a predicate
|
|
9347
|
+
* @param childRelationshipFieldName Reference ID field name to its parent record. A defined `childRelationshipFieldName` string indicates that a child relationship exists
|
|
9348
|
+
* and a relationship predicate needs to be put into place. For example, `ServiceAppointment` has a child relationship `ServiceResources`, whose entity name is `AssignedResource`.
|
|
9349
|
+
* 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`.
|
|
9350
|
+
* @param parentId prarent record Id
|
|
9351
|
+
* @returns predicate array consists at most 1 predicate
|
|
9352
|
+
*/
|
|
9353
|
+
function childRelationshipToPredicates(childRelationshipFieldName, parentId) {
|
|
9354
|
+
const predicates = [];
|
|
9355
|
+
if (childRelationshipFieldName !== undefined && parentId !== undefined) {
|
|
9356
|
+
predicates.push({
|
|
9357
|
+
type: PredicateType.single,
|
|
9358
|
+
leftPath: `$.fields.${childRelationshipFieldName}.value`,
|
|
9359
|
+
operator: '=',
|
|
9360
|
+
value: parentId,
|
|
9361
|
+
});
|
|
9362
|
+
}
|
|
9363
|
+
return predicates;
|
|
9290
9364
|
}
|
|
9365
|
+
/**
|
|
9366
|
+
* fetches a query level ingestion time stamp from the L2 cache
|
|
9367
|
+
* if no query has been seen then the timestamp is 0
|
|
9368
|
+
* @param apiName
|
|
9369
|
+
* @param info
|
|
9370
|
+
* @param args
|
|
9371
|
+
* @param query
|
|
9372
|
+
* @returns
|
|
9373
|
+
*/
|
|
9374
|
+
async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
9375
|
+
const { operation, variableValues } = info;
|
|
9376
|
+
// if we cannot find the query key in the database then default to 0 as we assume we have not seen the query
|
|
9377
|
+
// and all the data is not stale
|
|
9378
|
+
let ingestionTimestamp = 0;
|
|
9379
|
+
if (info.fieldNodes.length > 0 && info.fieldNodes[0].arguments !== undefined) {
|
|
9380
|
+
const key = buildKeyStringForRecordQuery(operation,
|
|
9381
|
+
// join varables passed from query to the argument variables given from the AST
|
|
9382
|
+
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
9383
|
+
return readIngestionTimestampForKey(key, query);
|
|
9384
|
+
}
|
|
9385
|
+
return ingestionTimestamp;
|
|
9386
|
+
}
|
|
9387
|
+
/**
|
|
9388
|
+
* Builds the top level record query key based on AST data
|
|
9389
|
+
* @param operation
|
|
9390
|
+
* @param variables
|
|
9391
|
+
* @param argumentNodes
|
|
9392
|
+
* @param currentFieldName
|
|
9393
|
+
* @returns
|
|
9394
|
+
*/
|
|
9395
|
+
function buildKeyStringForRecordQuery(operation, variables, argumentNodes, currentFieldName) {
|
|
9396
|
+
const queryKey = buildQueryTypeStringKey({
|
|
9397
|
+
luvio: {},
|
|
9398
|
+
keyPrefix: 'UiApi',
|
|
9399
|
+
schemaName: 'uiapi',
|
|
9400
|
+
queryTypeName: 'Query',
|
|
9401
|
+
operationNode: operation,
|
|
9402
|
+
variables,
|
|
9403
|
+
fragmentMap: {},
|
|
9404
|
+
});
|
|
9405
|
+
const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
9406
|
+
const argumentString = filteredArgumentNodes.length > 0
|
|
9407
|
+
? '__' + serializeFieldArguments(filteredArgumentNodes, variables)
|
|
9408
|
+
: '';
|
|
9409
|
+
return `${queryKey}__uiapi__query__${currentFieldName}${argumentString}`;
|
|
9410
|
+
}
|
|
9411
|
+
|
|
9412
|
+
function passThroughResolver(source) {
|
|
9413
|
+
return source;
|
|
9414
|
+
}
|
|
9415
|
+
|
|
9291
9416
|
/**
|
|
9292
9417
|
*
|
|
9293
9418
|
* @param schema GraphQL Schema generated from ObjectInfos
|
|
@@ -9320,13 +9445,13 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
9320
9445
|
}
|
|
9321
9446
|
if (type.name === 'Query') {
|
|
9322
9447
|
for (const field of fields) {
|
|
9323
|
-
field.resolve =
|
|
9448
|
+
field.resolve = passThroughResolver;
|
|
9324
9449
|
}
|
|
9325
9450
|
}
|
|
9326
9451
|
if (type.name === 'UIAPI') {
|
|
9327
9452
|
for (const field of fields) {
|
|
9328
9453
|
if (field.name === 'query') {
|
|
9329
|
-
field.resolve =
|
|
9454
|
+
field.resolve = passThroughResolver;
|
|
9330
9455
|
}
|
|
9331
9456
|
else {
|
|
9332
9457
|
const fieldName = field.name;
|
|
@@ -9353,23 +9478,7 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
9353
9478
|
// Fields of the `RecordQuery` type are the record queries for the entity types
|
|
9354
9479
|
// supported for the org
|
|
9355
9480
|
for (const recordQuery of fields) {
|
|
9356
|
-
recordQuery.resolve =
|
|
9357
|
-
const { name: currentFieldName } = recordQuery;
|
|
9358
|
-
let ingestionTimestamp = 0;
|
|
9359
|
-
if (excludeStaleRecordsGate.isOpen({ fallback: false })) {
|
|
9360
|
-
// at our record query we fetch each ingestion time stamp and pass it down to each lower resolver to query against
|
|
9361
|
-
ingestionTimestamp = await fetchIngestionTimeStampFromDatabase(currentFieldName, info, args, query);
|
|
9362
|
-
}
|
|
9363
|
-
// In the SF schema, the relevant arguments are passed into RecordQuery fields, but actually used
|
|
9364
|
-
// down in the edge resolvers. For this resolver, we can just return what was passed in
|
|
9365
|
-
// to make it available to the next execution step
|
|
9366
|
-
return {
|
|
9367
|
-
parentArgs: args,
|
|
9368
|
-
parentRecord: record,
|
|
9369
|
-
currentFieldName,
|
|
9370
|
-
ingestionTimestamp,
|
|
9371
|
-
};
|
|
9372
|
-
};
|
|
9481
|
+
recordQuery.resolve = connectionResolver;
|
|
9373
9482
|
}
|
|
9374
9483
|
}
|
|
9375
9484
|
if (type.name.endsWith('Connection')) {
|
|
@@ -9390,7 +9499,13 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
9390
9499
|
for (const field of fields) {
|
|
9391
9500
|
switch (field.name) {
|
|
9392
9501
|
case 'edges':
|
|
9393
|
-
field.resolve =
|
|
9502
|
+
field.resolve = passThroughResolver;
|
|
9503
|
+
break;
|
|
9504
|
+
case 'pageInfo':
|
|
9505
|
+
field.resolve = function (_value, _args, _context, _info) {
|
|
9506
|
+
// TODO [W-12390939]: implement resolver for PageInfo
|
|
9507
|
+
return {};
|
|
9508
|
+
};
|
|
9394
9509
|
break;
|
|
9395
9510
|
default:
|
|
9396
9511
|
field.resolve = defaultFieldResolver;
|
|
@@ -9538,16 +9653,7 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
9538
9653
|
else if (isObjectType(recordFieldType) &&
|
|
9539
9654
|
field.type.name.endsWith('Connection')) {
|
|
9540
9655
|
// spanning field to a connection
|
|
9541
|
-
field.resolve =
|
|
9542
|
-
seenRecordIds.add(recordRepresentation.id);
|
|
9543
|
-
const { name: currentFieldName } = field;
|
|
9544
|
-
return {
|
|
9545
|
-
parentArgs: args,
|
|
9546
|
-
parentRecord: recordRepresentation,
|
|
9547
|
-
currentFieldName,
|
|
9548
|
-
ingestionTimestamp,
|
|
9549
|
-
};
|
|
9550
|
-
};
|
|
9656
|
+
field.resolve = connectionResolver;
|
|
9551
9657
|
}
|
|
9552
9658
|
else {
|
|
9553
9659
|
field.resolve = function recordFieldResolver({ recordRepresentation: record, }) {
|
|
@@ -9602,123 +9708,10 @@ _, { objectInfos }) {
|
|
|
9602
9708
|
}
|
|
9603
9709
|
return null;
|
|
9604
9710
|
}
|
|
9605
|
-
async function connectionEdgeResolver(obj, _args, context) {
|
|
9606
|
-
const { parentArgs = {}, parentRecord, currentFieldName, ingestionTimestamp } = obj;
|
|
9607
|
-
const { query, objectInfos, draftFunctions } = context;
|
|
9608
|
-
let joins = [];
|
|
9609
|
-
let alias = currentFieldName;
|
|
9610
|
-
let childRelationshipFieldName = undefined;
|
|
9611
|
-
if (parentRecord.id) {
|
|
9612
|
-
const parentApiName = parentRecord.apiName;
|
|
9613
|
-
const parentObjectInfo = objectInfos[parentApiName];
|
|
9614
|
-
const childRelationship = parentObjectInfo &&
|
|
9615
|
-
parentObjectInfo.childRelationships.find((rel) => rel.relationshipName === currentFieldName);
|
|
9616
|
-
// or emit/throw if we want to report it
|
|
9617
|
-
if (!childRelationship)
|
|
9618
|
-
return [];
|
|
9619
|
-
alias = childRelationship.childObjectApiName;
|
|
9620
|
-
childRelationshipFieldName = childRelationship.fieldName;
|
|
9621
|
-
}
|
|
9622
|
-
// Alias starts as entity's ApiName
|
|
9623
|
-
const predicates = [
|
|
9624
|
-
...filterToPredicates(parentArgs.where, alias, alias, context.objectInfos, joins, draftFunctions),
|
|
9625
|
-
...scopeToPredicates(parentArgs.scope, context.settings),
|
|
9626
|
-
...childRelationshipToPredicates(childRelationshipFieldName, parentRecord.id),
|
|
9627
|
-
];
|
|
9628
|
-
const scopeJoins = scopeToJoins(parentArgs.scope, context.settings);
|
|
9629
|
-
joins.push(...scopeJoins);
|
|
9630
|
-
// Alias starts as entity's ApiName
|
|
9631
|
-
const queryConfig = {
|
|
9632
|
-
alias,
|
|
9633
|
-
joins,
|
|
9634
|
-
predicates,
|
|
9635
|
-
orderBy: orderByToPredicate(parentArgs.orderBy, alias, alias, context.objectInfos),
|
|
9636
|
-
limit: parentArgs.first,
|
|
9637
|
-
ingestionTimestamp,
|
|
9638
|
-
};
|
|
9639
|
-
const { sql, bindings } = buildQuery(queryConfig);
|
|
9640
|
-
const results = await query(sql, bindings);
|
|
9641
|
-
//map each sql result with the ingestion timestamp to pass it down a level
|
|
9642
|
-
return results.rows
|
|
9643
|
-
.map((row) => row[0])
|
|
9644
|
-
.map((record, index) => {
|
|
9645
|
-
return {
|
|
9646
|
-
record,
|
|
9647
|
-
ingestionTimestamp,
|
|
9648
|
-
index,
|
|
9649
|
-
};
|
|
9650
|
-
});
|
|
9651
|
-
}
|
|
9652
|
-
/**
|
|
9653
|
-
* Converts a childRelationship into a predicate
|
|
9654
|
-
* @param childRelationshipFieldName Reference ID field name to its parent record. A defined `childRelationshipFieldName` string indicates that a child relationship exists
|
|
9655
|
-
* and a relationship predicate needs to be put into place. For example, `ServiceAppointment` has a child relationship `ServiceResources`, whose entity name is `AssignedResource`.
|
|
9656
|
-
* 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`.
|
|
9657
|
-
* @param parentId prarent record Id
|
|
9658
|
-
* @returns predicate array consists at most 1 predicate
|
|
9659
|
-
*/
|
|
9660
|
-
function childRelationshipToPredicates(childRelationshipFieldName, parentId) {
|
|
9661
|
-
const predicates = [];
|
|
9662
|
-
if (childRelationshipFieldName !== undefined && parentId !== undefined) {
|
|
9663
|
-
predicates.push({
|
|
9664
|
-
type: PredicateType.single,
|
|
9665
|
-
leftPath: `$.fields.${childRelationshipFieldName}.value`,
|
|
9666
|
-
operator: '=',
|
|
9667
|
-
value: parentId,
|
|
9668
|
-
});
|
|
9669
|
-
}
|
|
9670
|
-
return predicates;
|
|
9671
|
-
}
|
|
9672
9711
|
function isRecordType(type) {
|
|
9673
9712
|
const interfaces = type.getInterfaces();
|
|
9674
9713
|
return Boolean(interfaces.find((iface) => iface.name === 'Record'));
|
|
9675
9714
|
}
|
|
9676
|
-
/**
|
|
9677
|
-
* Builds the top level record query key based on AST data
|
|
9678
|
-
* @param operation
|
|
9679
|
-
* @param variables
|
|
9680
|
-
* @param argumentNodes
|
|
9681
|
-
* @param currentFieldName
|
|
9682
|
-
* @returns
|
|
9683
|
-
*/
|
|
9684
|
-
function buildKeyStringForRecordQuery(operation, variables, argumentNodes, currentFieldName) {
|
|
9685
|
-
const queryKey = buildQueryTypeStringKey({
|
|
9686
|
-
luvio: {},
|
|
9687
|
-
keyPrefix: 'UiApi',
|
|
9688
|
-
schemaName: 'uiapi',
|
|
9689
|
-
queryTypeName: 'Query',
|
|
9690
|
-
operationNode: operation,
|
|
9691
|
-
variables,
|
|
9692
|
-
fragmentMap: {},
|
|
9693
|
-
});
|
|
9694
|
-
const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
9695
|
-
const argumentString = filteredArgumentNodes.length > 0
|
|
9696
|
-
? '__' + serializeFieldArguments(filteredArgumentNodes, variables)
|
|
9697
|
-
: '';
|
|
9698
|
-
return `${queryKey}__uiapi__query__${currentFieldName}${argumentString}`;
|
|
9699
|
-
}
|
|
9700
|
-
/**
|
|
9701
|
-
* fetches a query level ingestion time stamp from the L2 cache
|
|
9702
|
-
* if no query has been seen then the timestamp is 0
|
|
9703
|
-
* @param apiName
|
|
9704
|
-
* @param info
|
|
9705
|
-
* @param args
|
|
9706
|
-
* @param query
|
|
9707
|
-
* @returns
|
|
9708
|
-
*/
|
|
9709
|
-
async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
9710
|
-
const { operation, variableValues } = info;
|
|
9711
|
-
// if we cannot find the query key in the database then default to 0 as we assume we have not seen the query
|
|
9712
|
-
// and all the data is not stale
|
|
9713
|
-
let ingestionTimestamp = 0;
|
|
9714
|
-
if (info.fieldNodes.length > 0 && info.fieldNodes[0].arguments !== undefined) {
|
|
9715
|
-
const key = buildKeyStringForRecordQuery(operation,
|
|
9716
|
-
// join varables passed from query to the argument variables given from the AST
|
|
9717
|
-
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
9718
|
-
return readIngestionTimestampForKey(key, query);
|
|
9719
|
-
}
|
|
9720
|
-
return ingestionTimestamp;
|
|
9721
|
-
}
|
|
9722
9715
|
|
|
9723
9716
|
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";
|
|
9724
9717
|
|
|
@@ -11820,7 +11813,7 @@ function createFieldNode(nameValue, selectionSet) {
|
|
|
11820
11813
|
*/
|
|
11821
11814
|
|
|
11822
11815
|
|
|
11823
|
-
const { keys: keys$3, values: values$1, create: create$3, assign: assign$3, freeze } = Object;
|
|
11816
|
+
const { keys: keys$3, values: values$1, create: create$3, assign: assign$3, freeze, entries: entries$3 } = Object;
|
|
11824
11817
|
const { stringify: stringify$3, parse: parse$3 } = JSON;
|
|
11825
11818
|
const { shift } = Array.prototype;
|
|
11826
11819
|
const { isArray: isArray$1, from: from$1 } = Array;
|
|
@@ -13227,7 +13220,7 @@ function getDenormalizedKey(originalKey, recordId, luvio) {
|
|
|
13227
13220
|
}
|
|
13228
13221
|
return keyBuilderRecord(luvio, { recordId });
|
|
13229
13222
|
}
|
|
13230
|
-
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore) {
|
|
13223
|
+
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore, sqlStore) {
|
|
13231
13224
|
const getEntries = function (entries, segment) {
|
|
13232
13225
|
// this HOF only inspects records in the default segment
|
|
13233
13226
|
if (segment !== DefaultDurableSegment) {
|
|
@@ -13289,7 +13282,10 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
13289
13282
|
});
|
|
13290
13283
|
};
|
|
13291
13284
|
const denormalizeEntries = function (entries) {
|
|
13285
|
+
let hasEntries = false;
|
|
13286
|
+
let hasMetadata = false;
|
|
13292
13287
|
const putEntries = create$3(null);
|
|
13288
|
+
const putMetadata = create$3(null);
|
|
13293
13289
|
const keys$1 = keys$3(entries);
|
|
13294
13290
|
const putRecords = {};
|
|
13295
13291
|
const putRecordViews = {};
|
|
@@ -13332,6 +13328,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
13332
13328
|
putRecords[recordId] = true;
|
|
13333
13329
|
}
|
|
13334
13330
|
if (isStoreRecordError(record)) {
|
|
13331
|
+
hasEntries = true;
|
|
13335
13332
|
putEntries[recordKey] = value;
|
|
13336
13333
|
continue;
|
|
13337
13334
|
}
|
|
@@ -13344,24 +13341,43 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
13344
13341
|
}
|
|
13345
13342
|
const denormalizedRecord = buildDurableRecordRepresentation(record, storeRecords, recordEntries, store);
|
|
13346
13343
|
if (denormalizedRecord !== undefined) {
|
|
13344
|
+
hasEntries = true;
|
|
13347
13345
|
putEntries[recordKey] = {
|
|
13348
13346
|
data: denormalizedRecord,
|
|
13349
13347
|
metadata,
|
|
13350
13348
|
};
|
|
13349
|
+
// if undefined then it is pending
|
|
13350
|
+
// we should still update metadata on pending records
|
|
13351
|
+
}
|
|
13352
|
+
else {
|
|
13353
|
+
hasMetadata = true;
|
|
13354
|
+
metadata.expirationTimestamp = metadata.ingestionTimestamp;
|
|
13355
|
+
putMetadata[recordKey] = {
|
|
13356
|
+
metadata,
|
|
13357
|
+
};
|
|
13351
13358
|
}
|
|
13352
13359
|
}
|
|
13353
13360
|
else {
|
|
13361
|
+
hasEntries = true;
|
|
13354
13362
|
putEntries[key] = value;
|
|
13355
13363
|
}
|
|
13356
13364
|
}
|
|
13357
|
-
return putEntries;
|
|
13365
|
+
return { putEntries, putMetadata, hasEntries, hasMetadata };
|
|
13358
13366
|
};
|
|
13359
13367
|
const setEntries = function (entries, segment) {
|
|
13360
13368
|
if (segment !== DefaultDurableSegment) {
|
|
13361
13369
|
return durableStore.setEntries(entries, segment);
|
|
13362
13370
|
}
|
|
13363
|
-
const putEntries = denormalizeEntries(entries);
|
|
13364
|
-
|
|
13371
|
+
const { putEntries, putMetadata, hasEntries, hasMetadata } = denormalizeEntries(entries);
|
|
13372
|
+
const promises = [
|
|
13373
|
+
hasEntries ? durableStore.setEntries(putEntries, segment) : undefined,
|
|
13374
|
+
];
|
|
13375
|
+
if (sqlStore !== undefined && sqlStore.isBatchUpdateSupported()) {
|
|
13376
|
+
promises.push(hasMetadata && sqlStore !== undefined
|
|
13377
|
+
? durableStore.setMetadata(putMetadata, segment)
|
|
13378
|
+
: undefined);
|
|
13379
|
+
}
|
|
13380
|
+
return Promise.all(promises).then(() => { });
|
|
13365
13381
|
};
|
|
13366
13382
|
const batchOperations = function (operations) {
|
|
13367
13383
|
const operationsWithDenormedRecords = [];
|
|
@@ -13378,10 +13394,20 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
13378
13394
|
// this is determined by the plugin supporting update batch calls before it gets to this HOF.
|
|
13379
13395
|
// so we only need to check one entry to confirm this for performance
|
|
13380
13396
|
if (firstEntry.data !== undefined) {
|
|
13397
|
+
const { putEntries, putMetadata, hasMetadata } = denormalizeEntries(operation.entries);
|
|
13381
13398
|
operationsWithDenormedRecords.push({
|
|
13382
13399
|
...operation,
|
|
13383
|
-
entries:
|
|
13400
|
+
entries: putEntries,
|
|
13384
13401
|
});
|
|
13402
|
+
if (hasMetadata &&
|
|
13403
|
+
sqlStore !== undefined &&
|
|
13404
|
+
sqlStore.isBatchUpdateSupported() === true) {
|
|
13405
|
+
operationsWithDenormedRecords.push({
|
|
13406
|
+
...operation,
|
|
13407
|
+
entries: putMetadata,
|
|
13408
|
+
type: 'setMetadata',
|
|
13409
|
+
});
|
|
13410
|
+
}
|
|
13385
13411
|
}
|
|
13386
13412
|
else {
|
|
13387
13413
|
operationsWithDenormedRecords.push(operation);
|
|
@@ -13393,10 +13419,20 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
13393
13419
|
operationsWithDenormedRecords.push(operation);
|
|
13394
13420
|
continue;
|
|
13395
13421
|
}
|
|
13422
|
+
const { putEntries, putMetadata, hasMetadata } = denormalizeEntries(operation.entries);
|
|
13396
13423
|
operationsWithDenormedRecords.push({
|
|
13397
13424
|
...operation,
|
|
13398
|
-
entries:
|
|
13425
|
+
entries: putEntries,
|
|
13399
13426
|
});
|
|
13427
|
+
if (hasMetadata &&
|
|
13428
|
+
sqlStore !== undefined &&
|
|
13429
|
+
sqlStore.isBatchUpdateSupported() === true) {
|
|
13430
|
+
operationsWithDenormedRecords.push({
|
|
13431
|
+
...operation,
|
|
13432
|
+
entries: putMetadata,
|
|
13433
|
+
type: 'setMetadata',
|
|
13434
|
+
});
|
|
13435
|
+
}
|
|
13400
13436
|
}
|
|
13401
13437
|
return durableStore.batchOperations(operationsWithDenormedRecords);
|
|
13402
13438
|
};
|
|
@@ -16521,6 +16557,9 @@ class NimbusSqliteStore {
|
|
|
16521
16557
|
isEvalSupported() {
|
|
16522
16558
|
return true;
|
|
16523
16559
|
}
|
|
16560
|
+
isBatchUpdateSupported() {
|
|
16561
|
+
return this.supportsBatchUpdates;
|
|
16562
|
+
}
|
|
16524
16563
|
query(sql, params) {
|
|
16525
16564
|
return new Promise((resolve, reject) => {
|
|
16526
16565
|
this.plugin.query(sql, params, (result) => {
|
|
@@ -18208,7 +18247,7 @@ function getRuntime() {
|
|
|
18208
18247
|
let getIngestRecords;
|
|
18209
18248
|
let getIngestMetadata;
|
|
18210
18249
|
let getIngestStore;
|
|
18211
|
-
const recordDenormingStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => (getIngestRecords !== undefined ? getIngestRecords() : {}), () => (getIngestMetadata !== undefined ? getIngestMetadata() : {}), () => (getIngestStore !== undefined ? getIngestStore() : undefined));
|
|
18250
|
+
const recordDenormingStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => (getIngestRecords !== undefined ? getIngestRecords() : {}), () => (getIngestMetadata !== undefined ? getIngestMetadata() : {}), () => (getIngestStore !== undefined ? getIngestStore() : undefined), lazyBaseDurableStore);
|
|
18212
18251
|
const baseEnv = new Environment(store, lazyNetworkAdapter);
|
|
18213
18252
|
const gqlEnv = makeEnvironmentGraphqlAware(baseEnv);
|
|
18214
18253
|
const durableEnv = makeDurable(gqlEnv, {
|
|
@@ -18321,4 +18360,4 @@ register({
|
|
|
18321
18360
|
});
|
|
18322
18361
|
|
|
18323
18362
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
18324
|
-
// version: 1.
|
|
18363
|
+
// version: 1.293.0-5fab18553
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.293.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS runtime for mobile/hybrid environments.",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,25 +32,25 @@
|
|
|
32
32
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
36
|
-
"@salesforce/lds-bindings": "^1.
|
|
37
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
38
|
-
"@salesforce/lds-priming": "^1.
|
|
35
|
+
"@salesforce/lds-adapters-uiapi": "^1.293.0",
|
|
36
|
+
"@salesforce/lds-bindings": "^1.293.0",
|
|
37
|
+
"@salesforce/lds-instrumentation": "^1.293.0",
|
|
38
|
+
"@salesforce/lds-priming": "^1.293.0",
|
|
39
39
|
"@salesforce/user": "0.0.21",
|
|
40
40
|
"o11y": "250.7.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@salesforce/lds-adapters-graphql": "^1.
|
|
44
|
-
"@salesforce/lds-drafts": "^1.
|
|
45
|
-
"@salesforce/lds-drafts-adapters-uiapi": "^1.
|
|
46
|
-
"@salesforce/lds-graphql-eval": "^1.
|
|
47
|
-
"@salesforce/lds-network-adapter": "^1.
|
|
48
|
-
"@salesforce/lds-network-nimbus": "^1.
|
|
49
|
-
"@salesforce/lds-store-binary": "^1.
|
|
50
|
-
"@salesforce/lds-store-nimbus": "^1.
|
|
51
|
-
"@salesforce/lds-store-sql": "^1.
|
|
52
|
-
"@salesforce/lds-utils-adapters": "^1.
|
|
53
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
43
|
+
"@salesforce/lds-adapters-graphql": "^1.293.0",
|
|
44
|
+
"@salesforce/lds-drafts": "^1.293.0",
|
|
45
|
+
"@salesforce/lds-drafts-adapters-uiapi": "^1.293.0",
|
|
46
|
+
"@salesforce/lds-graphql-eval": "^1.293.0",
|
|
47
|
+
"@salesforce/lds-network-adapter": "^1.293.0",
|
|
48
|
+
"@salesforce/lds-network-nimbus": "^1.293.0",
|
|
49
|
+
"@salesforce/lds-store-binary": "^1.293.0",
|
|
50
|
+
"@salesforce/lds-store-nimbus": "^1.293.0",
|
|
51
|
+
"@salesforce/lds-store-sql": "^1.293.0",
|
|
52
|
+
"@salesforce/lds-utils-adapters": "^1.293.0",
|
|
53
|
+
"@salesforce/nimbus-plugin-lds": "^1.293.0",
|
|
54
54
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
55
55
|
"wait-for-expect": "^3.0.2"
|
|
56
56
|
},
|
package/sfdc/main.js
CHANGED
|
@@ -52,7 +52,7 @@ import ldsMetadataRefreshEnabled from '@salesforce/gate/lds.metadataRefreshEnabl
|
|
|
52
52
|
const { parse: parse$6, stringify: stringify$6 } = JSON;
|
|
53
53
|
const { join: join$2, push: push$2, unshift } = Array.prototype;
|
|
54
54
|
const { isArray: isArray$5 } = Array;
|
|
55
|
-
const { entries: entries$
|
|
55
|
+
const { entries: entries$5, keys: keys$8 } = Object;
|
|
56
56
|
|
|
57
57
|
const UI_API_BASE_URI = '/services/data/v62.0/ui-api';
|
|
58
58
|
|
|
@@ -364,7 +364,7 @@ function getFulfillingRequest(inflightRequests, resourceRequest) {
|
|
|
364
364
|
if (fulfill === undefined) {
|
|
365
365
|
return null;
|
|
366
366
|
}
|
|
367
|
-
const handlersMap = entries$
|
|
367
|
+
const handlersMap = entries$5(inflightRequests);
|
|
368
368
|
for (let i = 0, len = handlersMap.length; i < len; i += 1) {
|
|
369
369
|
const [transactionKey, handlers] = handlersMap[i];
|
|
370
370
|
// check fulfillment against only the first handler ([0]) because it's equal or
|
|
@@ -7177,7 +7177,7 @@ function isArrayLike(x) {
|
|
|
7177
7177
|
(x.length === 0 || (x.length > 0 && Object.prototype.hasOwnProperty.call(x, x.length - 1))));
|
|
7178
7178
|
}
|
|
7179
7179
|
|
|
7180
|
-
const { create: create$4, keys: keys$4, values: values$2, entries: entries$
|
|
7180
|
+
const { create: create$4, keys: keys$4, values: values$2, entries: entries$4, assign: assign$4 } = Object;
|
|
7181
7181
|
const { stringify: stringify$4, parse: parse$4 } = JSON;
|
|
7182
7182
|
const { isArray: isArray$2, from: from$2 } = Array;
|
|
7183
7183
|
|
|
@@ -7925,7 +7925,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
|
|
|
7925
7925
|
}
|
|
7926
7926
|
else {
|
|
7927
7927
|
//`field` match the filedInfo's apiName
|
|
7928
|
-
for (const [op, value] of entries$
|
|
7928
|
+
for (const [op, value] of entries$4(where[field])) {
|
|
7929
7929
|
const operator = operatorToSql(op);
|
|
7930
7930
|
/**
|
|
7931
7931
|
Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
|
|
@@ -9285,9 +9285,134 @@ function scopeToPredicates(scope = '', settings) {
|
|
|
9285
9285
|
];
|
|
9286
9286
|
}
|
|
9287
9287
|
|
|
9288
|
-
|
|
9289
|
-
|
|
9288
|
+
/*
|
|
9289
|
+
resolves connections...
|
|
9290
|
+
*/
|
|
9291
|
+
async function connectionResolver(obj, args, context, info) {
|
|
9292
|
+
let { recordRepresentation: parentRecord, ingestionTimestamp } = obj;
|
|
9293
|
+
if (!ingestionTimestamp)
|
|
9294
|
+
ingestionTimestamp = 0;
|
|
9295
|
+
if (!parentRecord && excludeStaleRecordsGate.isOpen({ fallback: false })) {
|
|
9296
|
+
// at our record query we fetch each ingestion time stamp and pass it down to each lower resolver to query against
|
|
9297
|
+
ingestionTimestamp = await fetchIngestionTimeStampFromDatabase(info.fieldName, info, args, context.query);
|
|
9298
|
+
}
|
|
9299
|
+
const { query, objectInfos, draftFunctions } = context;
|
|
9300
|
+
let joins = [];
|
|
9301
|
+
let alias = info.fieldName;
|
|
9302
|
+
let childRelationshipFieldName = undefined;
|
|
9303
|
+
if (parentRecord) {
|
|
9304
|
+
context.seenRecordIds.add(parentRecord.id);
|
|
9305
|
+
const parentApiName = parentRecord.apiName;
|
|
9306
|
+
const parentObjectInfo = objectInfos[parentApiName];
|
|
9307
|
+
const childRelationship = parentObjectInfo &&
|
|
9308
|
+
parentObjectInfo.childRelationships.find((rel) => rel.relationshipName === info.fieldName);
|
|
9309
|
+
// or emit/throw if we want to report it
|
|
9310
|
+
if (!childRelationship)
|
|
9311
|
+
return [];
|
|
9312
|
+
alias = childRelationship.childObjectApiName;
|
|
9313
|
+
childRelationshipFieldName = childRelationship.fieldName;
|
|
9314
|
+
}
|
|
9315
|
+
// Alias starts as entity's ApiName
|
|
9316
|
+
const predicates = [
|
|
9317
|
+
...filterToPredicates(args.where, alias, alias, context.objectInfos, joins, draftFunctions),
|
|
9318
|
+
...scopeToPredicates(args.scope, context.settings),
|
|
9319
|
+
...childRelationshipToPredicates(childRelationshipFieldName, parentRecord ? parentRecord.id : undefined),
|
|
9320
|
+
];
|
|
9321
|
+
const scopeJoins = scopeToJoins(args.scope, context.settings);
|
|
9322
|
+
joins.push(...scopeJoins);
|
|
9323
|
+
// Alias starts as entity's ApiName
|
|
9324
|
+
const queryConfig = {
|
|
9325
|
+
alias,
|
|
9326
|
+
joins,
|
|
9327
|
+
predicates,
|
|
9328
|
+
orderBy: orderByToPredicate(args.orderBy, alias, alias, context.objectInfos),
|
|
9329
|
+
limit: args.first,
|
|
9330
|
+
ingestionTimestamp,
|
|
9331
|
+
};
|
|
9332
|
+
const { sql, bindings } = buildQuery(queryConfig);
|
|
9333
|
+
const results = await query(sql, bindings);
|
|
9334
|
+
//map each sql result with the ingestion timestamp to pass it down a level
|
|
9335
|
+
return results.rows
|
|
9336
|
+
.map((row) => row[0])
|
|
9337
|
+
.map((record, index) => {
|
|
9338
|
+
return {
|
|
9339
|
+
record,
|
|
9340
|
+
ingestionTimestamp,
|
|
9341
|
+
index,
|
|
9342
|
+
};
|
|
9343
|
+
});
|
|
9344
|
+
}
|
|
9345
|
+
/**
|
|
9346
|
+
* Converts a childRelationship into a predicate
|
|
9347
|
+
* @param childRelationshipFieldName Reference ID field name to its parent record. A defined `childRelationshipFieldName` string indicates that a child relationship exists
|
|
9348
|
+
* and a relationship predicate needs to be put into place. For example, `ServiceAppointment` has a child relationship `ServiceResources`, whose entity name is `AssignedResource`.
|
|
9349
|
+
* 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`.
|
|
9350
|
+
* @param parentId prarent record Id
|
|
9351
|
+
* @returns predicate array consists at most 1 predicate
|
|
9352
|
+
*/
|
|
9353
|
+
function childRelationshipToPredicates(childRelationshipFieldName, parentId) {
|
|
9354
|
+
const predicates = [];
|
|
9355
|
+
if (childRelationshipFieldName !== undefined && parentId !== undefined) {
|
|
9356
|
+
predicates.push({
|
|
9357
|
+
type: PredicateType.single,
|
|
9358
|
+
leftPath: `$.fields.${childRelationshipFieldName}.value`,
|
|
9359
|
+
operator: '=',
|
|
9360
|
+
value: parentId,
|
|
9361
|
+
});
|
|
9362
|
+
}
|
|
9363
|
+
return predicates;
|
|
9290
9364
|
}
|
|
9365
|
+
/**
|
|
9366
|
+
* fetches a query level ingestion time stamp from the L2 cache
|
|
9367
|
+
* if no query has been seen then the timestamp is 0
|
|
9368
|
+
* @param apiName
|
|
9369
|
+
* @param info
|
|
9370
|
+
* @param args
|
|
9371
|
+
* @param query
|
|
9372
|
+
* @returns
|
|
9373
|
+
*/
|
|
9374
|
+
async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
9375
|
+
const { operation, variableValues } = info;
|
|
9376
|
+
// if we cannot find the query key in the database then default to 0 as we assume we have not seen the query
|
|
9377
|
+
// and all the data is not stale
|
|
9378
|
+
let ingestionTimestamp = 0;
|
|
9379
|
+
if (info.fieldNodes.length > 0 && info.fieldNodes[0].arguments !== undefined) {
|
|
9380
|
+
const key = buildKeyStringForRecordQuery(operation,
|
|
9381
|
+
// join varables passed from query to the argument variables given from the AST
|
|
9382
|
+
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
9383
|
+
return readIngestionTimestampForKey(key, query);
|
|
9384
|
+
}
|
|
9385
|
+
return ingestionTimestamp;
|
|
9386
|
+
}
|
|
9387
|
+
/**
|
|
9388
|
+
* Builds the top level record query key based on AST data
|
|
9389
|
+
* @param operation
|
|
9390
|
+
* @param variables
|
|
9391
|
+
* @param argumentNodes
|
|
9392
|
+
* @param currentFieldName
|
|
9393
|
+
* @returns
|
|
9394
|
+
*/
|
|
9395
|
+
function buildKeyStringForRecordQuery(operation, variables, argumentNodes, currentFieldName) {
|
|
9396
|
+
const queryKey = buildQueryTypeStringKey({
|
|
9397
|
+
luvio: {},
|
|
9398
|
+
keyPrefix: 'UiApi',
|
|
9399
|
+
schemaName: 'uiapi',
|
|
9400
|
+
queryTypeName: 'Query',
|
|
9401
|
+
operationNode: operation,
|
|
9402
|
+
variables,
|
|
9403
|
+
fragmentMap: {},
|
|
9404
|
+
});
|
|
9405
|
+
const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
9406
|
+
const argumentString = filteredArgumentNodes.length > 0
|
|
9407
|
+
? '__' + serializeFieldArguments(filteredArgumentNodes, variables)
|
|
9408
|
+
: '';
|
|
9409
|
+
return `${queryKey}__uiapi__query__${currentFieldName}${argumentString}`;
|
|
9410
|
+
}
|
|
9411
|
+
|
|
9412
|
+
function passThroughResolver(source) {
|
|
9413
|
+
return source;
|
|
9414
|
+
}
|
|
9415
|
+
|
|
9291
9416
|
/**
|
|
9292
9417
|
*
|
|
9293
9418
|
* @param schema GraphQL Schema generated from ObjectInfos
|
|
@@ -9320,13 +9445,13 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
9320
9445
|
}
|
|
9321
9446
|
if (type.name === 'Query') {
|
|
9322
9447
|
for (const field of fields) {
|
|
9323
|
-
field.resolve =
|
|
9448
|
+
field.resolve = passThroughResolver;
|
|
9324
9449
|
}
|
|
9325
9450
|
}
|
|
9326
9451
|
if (type.name === 'UIAPI') {
|
|
9327
9452
|
for (const field of fields) {
|
|
9328
9453
|
if (field.name === 'query') {
|
|
9329
|
-
field.resolve =
|
|
9454
|
+
field.resolve = passThroughResolver;
|
|
9330
9455
|
}
|
|
9331
9456
|
else {
|
|
9332
9457
|
const fieldName = field.name;
|
|
@@ -9353,23 +9478,7 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
9353
9478
|
// Fields of the `RecordQuery` type are the record queries for the entity types
|
|
9354
9479
|
// supported for the org
|
|
9355
9480
|
for (const recordQuery of fields) {
|
|
9356
|
-
recordQuery.resolve =
|
|
9357
|
-
const { name: currentFieldName } = recordQuery;
|
|
9358
|
-
let ingestionTimestamp = 0;
|
|
9359
|
-
if (excludeStaleRecordsGate.isOpen({ fallback: false })) {
|
|
9360
|
-
// at our record query we fetch each ingestion time stamp and pass it down to each lower resolver to query against
|
|
9361
|
-
ingestionTimestamp = await fetchIngestionTimeStampFromDatabase(currentFieldName, info, args, query);
|
|
9362
|
-
}
|
|
9363
|
-
// In the SF schema, the relevant arguments are passed into RecordQuery fields, but actually used
|
|
9364
|
-
// down in the edge resolvers. For this resolver, we can just return what was passed in
|
|
9365
|
-
// to make it available to the next execution step
|
|
9366
|
-
return {
|
|
9367
|
-
parentArgs: args,
|
|
9368
|
-
parentRecord: record,
|
|
9369
|
-
currentFieldName,
|
|
9370
|
-
ingestionTimestamp,
|
|
9371
|
-
};
|
|
9372
|
-
};
|
|
9481
|
+
recordQuery.resolve = connectionResolver;
|
|
9373
9482
|
}
|
|
9374
9483
|
}
|
|
9375
9484
|
if (type.name.endsWith('Connection')) {
|
|
@@ -9390,7 +9499,13 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
9390
9499
|
for (const field of fields) {
|
|
9391
9500
|
switch (field.name) {
|
|
9392
9501
|
case 'edges':
|
|
9393
|
-
field.resolve =
|
|
9502
|
+
field.resolve = passThroughResolver;
|
|
9503
|
+
break;
|
|
9504
|
+
case 'pageInfo':
|
|
9505
|
+
field.resolve = function (_value, _args, _context, _info) {
|
|
9506
|
+
// TODO [W-12390939]: implement resolver for PageInfo
|
|
9507
|
+
return {};
|
|
9508
|
+
};
|
|
9394
9509
|
break;
|
|
9395
9510
|
default:
|
|
9396
9511
|
field.resolve = defaultFieldResolver;
|
|
@@ -9538,16 +9653,7 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
9538
9653
|
else if (isObjectType(recordFieldType) &&
|
|
9539
9654
|
field.type.name.endsWith('Connection')) {
|
|
9540
9655
|
// spanning field to a connection
|
|
9541
|
-
field.resolve =
|
|
9542
|
-
seenRecordIds.add(recordRepresentation.id);
|
|
9543
|
-
const { name: currentFieldName } = field;
|
|
9544
|
-
return {
|
|
9545
|
-
parentArgs: args,
|
|
9546
|
-
parentRecord: recordRepresentation,
|
|
9547
|
-
currentFieldName,
|
|
9548
|
-
ingestionTimestamp,
|
|
9549
|
-
};
|
|
9550
|
-
};
|
|
9656
|
+
field.resolve = connectionResolver;
|
|
9551
9657
|
}
|
|
9552
9658
|
else {
|
|
9553
9659
|
field.resolve = function recordFieldResolver({ recordRepresentation: record, }) {
|
|
@@ -9602,123 +9708,10 @@ _, { objectInfos }) {
|
|
|
9602
9708
|
}
|
|
9603
9709
|
return null;
|
|
9604
9710
|
}
|
|
9605
|
-
async function connectionEdgeResolver(obj, _args, context) {
|
|
9606
|
-
const { parentArgs = {}, parentRecord, currentFieldName, ingestionTimestamp } = obj;
|
|
9607
|
-
const { query, objectInfos, draftFunctions } = context;
|
|
9608
|
-
let joins = [];
|
|
9609
|
-
let alias = currentFieldName;
|
|
9610
|
-
let childRelationshipFieldName = undefined;
|
|
9611
|
-
if (parentRecord.id) {
|
|
9612
|
-
const parentApiName = parentRecord.apiName;
|
|
9613
|
-
const parentObjectInfo = objectInfos[parentApiName];
|
|
9614
|
-
const childRelationship = parentObjectInfo &&
|
|
9615
|
-
parentObjectInfo.childRelationships.find((rel) => rel.relationshipName === currentFieldName);
|
|
9616
|
-
// or emit/throw if we want to report it
|
|
9617
|
-
if (!childRelationship)
|
|
9618
|
-
return [];
|
|
9619
|
-
alias = childRelationship.childObjectApiName;
|
|
9620
|
-
childRelationshipFieldName = childRelationship.fieldName;
|
|
9621
|
-
}
|
|
9622
|
-
// Alias starts as entity's ApiName
|
|
9623
|
-
const predicates = [
|
|
9624
|
-
...filterToPredicates(parentArgs.where, alias, alias, context.objectInfos, joins, draftFunctions),
|
|
9625
|
-
...scopeToPredicates(parentArgs.scope, context.settings),
|
|
9626
|
-
...childRelationshipToPredicates(childRelationshipFieldName, parentRecord.id),
|
|
9627
|
-
];
|
|
9628
|
-
const scopeJoins = scopeToJoins(parentArgs.scope, context.settings);
|
|
9629
|
-
joins.push(...scopeJoins);
|
|
9630
|
-
// Alias starts as entity's ApiName
|
|
9631
|
-
const queryConfig = {
|
|
9632
|
-
alias,
|
|
9633
|
-
joins,
|
|
9634
|
-
predicates,
|
|
9635
|
-
orderBy: orderByToPredicate(parentArgs.orderBy, alias, alias, context.objectInfos),
|
|
9636
|
-
limit: parentArgs.first,
|
|
9637
|
-
ingestionTimestamp,
|
|
9638
|
-
};
|
|
9639
|
-
const { sql, bindings } = buildQuery(queryConfig);
|
|
9640
|
-
const results = await query(sql, bindings);
|
|
9641
|
-
//map each sql result with the ingestion timestamp to pass it down a level
|
|
9642
|
-
return results.rows
|
|
9643
|
-
.map((row) => row[0])
|
|
9644
|
-
.map((record, index) => {
|
|
9645
|
-
return {
|
|
9646
|
-
record,
|
|
9647
|
-
ingestionTimestamp,
|
|
9648
|
-
index,
|
|
9649
|
-
};
|
|
9650
|
-
});
|
|
9651
|
-
}
|
|
9652
|
-
/**
|
|
9653
|
-
* Converts a childRelationship into a predicate
|
|
9654
|
-
* @param childRelationshipFieldName Reference ID field name to its parent record. A defined `childRelationshipFieldName` string indicates that a child relationship exists
|
|
9655
|
-
* and a relationship predicate needs to be put into place. For example, `ServiceAppointment` has a child relationship `ServiceResources`, whose entity name is `AssignedResource`.
|
|
9656
|
-
* 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`.
|
|
9657
|
-
* @param parentId prarent record Id
|
|
9658
|
-
* @returns predicate array consists at most 1 predicate
|
|
9659
|
-
*/
|
|
9660
|
-
function childRelationshipToPredicates(childRelationshipFieldName, parentId) {
|
|
9661
|
-
const predicates = [];
|
|
9662
|
-
if (childRelationshipFieldName !== undefined && parentId !== undefined) {
|
|
9663
|
-
predicates.push({
|
|
9664
|
-
type: PredicateType.single,
|
|
9665
|
-
leftPath: `$.fields.${childRelationshipFieldName}.value`,
|
|
9666
|
-
operator: '=',
|
|
9667
|
-
value: parentId,
|
|
9668
|
-
});
|
|
9669
|
-
}
|
|
9670
|
-
return predicates;
|
|
9671
|
-
}
|
|
9672
9711
|
function isRecordType(type) {
|
|
9673
9712
|
const interfaces = type.getInterfaces();
|
|
9674
9713
|
return Boolean(interfaces.find((iface) => iface.name === 'Record'));
|
|
9675
9714
|
}
|
|
9676
|
-
/**
|
|
9677
|
-
* Builds the top level record query key based on AST data
|
|
9678
|
-
* @param operation
|
|
9679
|
-
* @param variables
|
|
9680
|
-
* @param argumentNodes
|
|
9681
|
-
* @param currentFieldName
|
|
9682
|
-
* @returns
|
|
9683
|
-
*/
|
|
9684
|
-
function buildKeyStringForRecordQuery(operation, variables, argumentNodes, currentFieldName) {
|
|
9685
|
-
const queryKey = buildQueryTypeStringKey({
|
|
9686
|
-
luvio: {},
|
|
9687
|
-
keyPrefix: 'UiApi',
|
|
9688
|
-
schemaName: 'uiapi',
|
|
9689
|
-
queryTypeName: 'Query',
|
|
9690
|
-
operationNode: operation,
|
|
9691
|
-
variables,
|
|
9692
|
-
fragmentMap: {},
|
|
9693
|
-
});
|
|
9694
|
-
const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
9695
|
-
const argumentString = filteredArgumentNodes.length > 0
|
|
9696
|
-
? '__' + serializeFieldArguments(filteredArgumentNodes, variables)
|
|
9697
|
-
: '';
|
|
9698
|
-
return `${queryKey}__uiapi__query__${currentFieldName}${argumentString}`;
|
|
9699
|
-
}
|
|
9700
|
-
/**
|
|
9701
|
-
* fetches a query level ingestion time stamp from the L2 cache
|
|
9702
|
-
* if no query has been seen then the timestamp is 0
|
|
9703
|
-
* @param apiName
|
|
9704
|
-
* @param info
|
|
9705
|
-
* @param args
|
|
9706
|
-
* @param query
|
|
9707
|
-
* @returns
|
|
9708
|
-
*/
|
|
9709
|
-
async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
9710
|
-
const { operation, variableValues } = info;
|
|
9711
|
-
// if we cannot find the query key in the database then default to 0 as we assume we have not seen the query
|
|
9712
|
-
// and all the data is not stale
|
|
9713
|
-
let ingestionTimestamp = 0;
|
|
9714
|
-
if (info.fieldNodes.length > 0 && info.fieldNodes[0].arguments !== undefined) {
|
|
9715
|
-
const key = buildKeyStringForRecordQuery(operation,
|
|
9716
|
-
// join varables passed from query to the argument variables given from the AST
|
|
9717
|
-
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
9718
|
-
return readIngestionTimestampForKey(key, query);
|
|
9719
|
-
}
|
|
9720
|
-
return ingestionTimestamp;
|
|
9721
|
-
}
|
|
9722
9715
|
|
|
9723
9716
|
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";
|
|
9724
9717
|
|
|
@@ -11820,7 +11813,7 @@ function createFieldNode(nameValue, selectionSet) {
|
|
|
11820
11813
|
*/
|
|
11821
11814
|
|
|
11822
11815
|
|
|
11823
|
-
const { keys: keys$3, values: values$1, create: create$3, assign: assign$3, freeze } = Object;
|
|
11816
|
+
const { keys: keys$3, values: values$1, create: create$3, assign: assign$3, freeze, entries: entries$3 } = Object;
|
|
11824
11817
|
const { stringify: stringify$3, parse: parse$3 } = JSON;
|
|
11825
11818
|
const { shift } = Array.prototype;
|
|
11826
11819
|
const { isArray: isArray$1, from: from$1 } = Array;
|
|
@@ -13227,7 +13220,7 @@ function getDenormalizedKey(originalKey, recordId, luvio) {
|
|
|
13227
13220
|
}
|
|
13228
13221
|
return keyBuilderRecord(luvio, { recordId });
|
|
13229
13222
|
}
|
|
13230
|
-
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore) {
|
|
13223
|
+
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore, sqlStore) {
|
|
13231
13224
|
const getEntries = function (entries, segment) {
|
|
13232
13225
|
// this HOF only inspects records in the default segment
|
|
13233
13226
|
if (segment !== DefaultDurableSegment) {
|
|
@@ -13289,7 +13282,10 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
13289
13282
|
});
|
|
13290
13283
|
};
|
|
13291
13284
|
const denormalizeEntries = function (entries) {
|
|
13285
|
+
let hasEntries = false;
|
|
13286
|
+
let hasMetadata = false;
|
|
13292
13287
|
const putEntries = create$3(null);
|
|
13288
|
+
const putMetadata = create$3(null);
|
|
13293
13289
|
const keys$1 = keys$3(entries);
|
|
13294
13290
|
const putRecords = {};
|
|
13295
13291
|
const putRecordViews = {};
|
|
@@ -13332,6 +13328,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
13332
13328
|
putRecords[recordId] = true;
|
|
13333
13329
|
}
|
|
13334
13330
|
if (isStoreRecordError(record)) {
|
|
13331
|
+
hasEntries = true;
|
|
13335
13332
|
putEntries[recordKey] = value;
|
|
13336
13333
|
continue;
|
|
13337
13334
|
}
|
|
@@ -13344,24 +13341,43 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
13344
13341
|
}
|
|
13345
13342
|
const denormalizedRecord = buildDurableRecordRepresentation(record, storeRecords, recordEntries, store);
|
|
13346
13343
|
if (denormalizedRecord !== undefined) {
|
|
13344
|
+
hasEntries = true;
|
|
13347
13345
|
putEntries[recordKey] = {
|
|
13348
13346
|
data: denormalizedRecord,
|
|
13349
13347
|
metadata,
|
|
13350
13348
|
};
|
|
13349
|
+
// if undefined then it is pending
|
|
13350
|
+
// we should still update metadata on pending records
|
|
13351
|
+
}
|
|
13352
|
+
else {
|
|
13353
|
+
hasMetadata = true;
|
|
13354
|
+
metadata.expirationTimestamp = metadata.ingestionTimestamp;
|
|
13355
|
+
putMetadata[recordKey] = {
|
|
13356
|
+
metadata,
|
|
13357
|
+
};
|
|
13351
13358
|
}
|
|
13352
13359
|
}
|
|
13353
13360
|
else {
|
|
13361
|
+
hasEntries = true;
|
|
13354
13362
|
putEntries[key] = value;
|
|
13355
13363
|
}
|
|
13356
13364
|
}
|
|
13357
|
-
return putEntries;
|
|
13365
|
+
return { putEntries, putMetadata, hasEntries, hasMetadata };
|
|
13358
13366
|
};
|
|
13359
13367
|
const setEntries = function (entries, segment) {
|
|
13360
13368
|
if (segment !== DefaultDurableSegment) {
|
|
13361
13369
|
return durableStore.setEntries(entries, segment);
|
|
13362
13370
|
}
|
|
13363
|
-
const putEntries = denormalizeEntries(entries);
|
|
13364
|
-
|
|
13371
|
+
const { putEntries, putMetadata, hasEntries, hasMetadata } = denormalizeEntries(entries);
|
|
13372
|
+
const promises = [
|
|
13373
|
+
hasEntries ? durableStore.setEntries(putEntries, segment) : undefined,
|
|
13374
|
+
];
|
|
13375
|
+
if (sqlStore !== undefined && sqlStore.isBatchUpdateSupported()) {
|
|
13376
|
+
promises.push(hasMetadata && sqlStore !== undefined
|
|
13377
|
+
? durableStore.setMetadata(putMetadata, segment)
|
|
13378
|
+
: undefined);
|
|
13379
|
+
}
|
|
13380
|
+
return Promise.all(promises).then(() => { });
|
|
13365
13381
|
};
|
|
13366
13382
|
const batchOperations = function (operations) {
|
|
13367
13383
|
const operationsWithDenormedRecords = [];
|
|
@@ -13378,10 +13394,20 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
13378
13394
|
// this is determined by the plugin supporting update batch calls before it gets to this HOF.
|
|
13379
13395
|
// so we only need to check one entry to confirm this for performance
|
|
13380
13396
|
if (firstEntry.data !== undefined) {
|
|
13397
|
+
const { putEntries, putMetadata, hasMetadata } = denormalizeEntries(operation.entries);
|
|
13381
13398
|
operationsWithDenormedRecords.push({
|
|
13382
13399
|
...operation,
|
|
13383
|
-
entries:
|
|
13400
|
+
entries: putEntries,
|
|
13384
13401
|
});
|
|
13402
|
+
if (hasMetadata &&
|
|
13403
|
+
sqlStore !== undefined &&
|
|
13404
|
+
sqlStore.isBatchUpdateSupported() === true) {
|
|
13405
|
+
operationsWithDenormedRecords.push({
|
|
13406
|
+
...operation,
|
|
13407
|
+
entries: putMetadata,
|
|
13408
|
+
type: 'setMetadata',
|
|
13409
|
+
});
|
|
13410
|
+
}
|
|
13385
13411
|
}
|
|
13386
13412
|
else {
|
|
13387
13413
|
operationsWithDenormedRecords.push(operation);
|
|
@@ -13393,10 +13419,20 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
13393
13419
|
operationsWithDenormedRecords.push(operation);
|
|
13394
13420
|
continue;
|
|
13395
13421
|
}
|
|
13422
|
+
const { putEntries, putMetadata, hasMetadata } = denormalizeEntries(operation.entries);
|
|
13396
13423
|
operationsWithDenormedRecords.push({
|
|
13397
13424
|
...operation,
|
|
13398
|
-
entries:
|
|
13425
|
+
entries: putEntries,
|
|
13399
13426
|
});
|
|
13427
|
+
if (hasMetadata &&
|
|
13428
|
+
sqlStore !== undefined &&
|
|
13429
|
+
sqlStore.isBatchUpdateSupported() === true) {
|
|
13430
|
+
operationsWithDenormedRecords.push({
|
|
13431
|
+
...operation,
|
|
13432
|
+
entries: putMetadata,
|
|
13433
|
+
type: 'setMetadata',
|
|
13434
|
+
});
|
|
13435
|
+
}
|
|
13400
13436
|
}
|
|
13401
13437
|
return durableStore.batchOperations(operationsWithDenormedRecords);
|
|
13402
13438
|
};
|
|
@@ -16521,6 +16557,9 @@ class NimbusSqliteStore {
|
|
|
16521
16557
|
isEvalSupported() {
|
|
16522
16558
|
return true;
|
|
16523
16559
|
}
|
|
16560
|
+
isBatchUpdateSupported() {
|
|
16561
|
+
return this.supportsBatchUpdates;
|
|
16562
|
+
}
|
|
16524
16563
|
query(sql, params) {
|
|
16525
16564
|
return new Promise((resolve, reject) => {
|
|
16526
16565
|
this.plugin.query(sql, params, (result) => {
|
|
@@ -18208,7 +18247,7 @@ function getRuntime() {
|
|
|
18208
18247
|
let getIngestRecords;
|
|
18209
18248
|
let getIngestMetadata;
|
|
18210
18249
|
let getIngestStore;
|
|
18211
|
-
const recordDenormingStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => (getIngestRecords !== undefined ? getIngestRecords() : {}), () => (getIngestMetadata !== undefined ? getIngestMetadata() : {}), () => (getIngestStore !== undefined ? getIngestStore() : undefined));
|
|
18250
|
+
const recordDenormingStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => (getIngestRecords !== undefined ? getIngestRecords() : {}), () => (getIngestMetadata !== undefined ? getIngestMetadata() : {}), () => (getIngestStore !== undefined ? getIngestStore() : undefined), lazyBaseDurableStore);
|
|
18212
18251
|
const baseEnv = new Environment(store, lazyNetworkAdapter);
|
|
18213
18252
|
const gqlEnv = makeEnvironmentGraphqlAware(baseEnv);
|
|
18214
18253
|
const durableEnv = makeDurable(gqlEnv, {
|
|
@@ -18321,4 +18360,4 @@ register({
|
|
|
18321
18360
|
});
|
|
18322
18361
|
|
|
18323
18362
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
18324
|
-
// version: 1.
|
|
18363
|
+
// version: 1.293.0-5fab18553
|