@salesforce/lds-runtime-mobile 1.245.0 → 1.247.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 +286 -119
- package/dist/types/priming/NimbusPrimingNetworkAdapter.d.ts +4 -1
- package/dist/types/priming/SqlitePrimingStore.d.ts +5 -0
- package/dist/types/utils/ObjectInfoService.d.ts +13 -18
- package/dist/types/utils/adapters.d.ts +2 -1
- package/package.json +1 -1
- package/sfdc/main.js +286 -119
- package/sfdc/types/priming/NimbusPrimingNetworkAdapter.d.ts +4 -1
- package/sfdc/types/priming/SqlitePrimingStore.d.ts +5 -0
- package/sfdc/types/utils/ObjectInfoService.d.ts +13 -18
- package/sfdc/types/utils/adapters.d.ts +2 -1
package/dist/main.js
CHANGED
|
@@ -16,7 +16,7 @@ import { setupInstrumentation, instrumentAdapter as instrumentAdapter$1, instrum
|
|
|
16
16
|
import { HttpStatusCode, StoreKeySet, serializeStructuredKey, StringKeyInMemoryStore, Reader, deepFreeze, emitAdapterEvent, createCustomAdapterEventEmitter, StoreKeyMap, isFileReference, Environment, Luvio, InMemoryStore } from '@luvio/engine';
|
|
17
17
|
import excludeStaleRecordsGate from '@salesforce/gate/lds.graphqlEvalExcludeStaleRecords';
|
|
18
18
|
import { parseAndVisit, Kind, visit, execute, buildSchema, isObjectType, defaultFieldResolver } from '@luvio/graphql-parser';
|
|
19
|
-
import { RECORD_ID_PREFIX, RECORD_FIELDS_KEY_JUNCTION, isStoreKeyRecordViewEntity, getRecordId18, RECORD_REPRESENTATION_NAME, extractRecordIdFromStoreKey, keyBuilderQuickActionExecutionRepresentation, ingestQuickActionExecutionRepresentation, keyBuilderContentDocumentCompositeRepresentation, getResponseCacheKeysContentDocumentCompositeRepresentation, keyBuilderFromTypeContentDocumentCompositeRepresentation, ingestContentDocumentCompositeRepresentation, keyBuilderRecord, RECORD_VIEW_ENTITY_ID_PREFIX, getTypeCacheKeysRecord, keyBuilderFromTypeRecordRepresentation, ingestRecord, RecordRepresentationRepresentationType, ObjectInfoRepresentationType, getRecordAdapterFactory, getObjectInfoAdapterFactory, getObjectInfosAdapterFactory, UiApiNamespace, RecordRepresentationType, RecordRepresentationTTL, RecordRepresentationVersion, getRecordsAdapterFactory } from '@salesforce/lds-adapters-uiapi';
|
|
19
|
+
import { RECORD_ID_PREFIX, RECORD_FIELDS_KEY_JUNCTION, isStoreKeyRecordViewEntity, getRecordId18, RECORD_REPRESENTATION_NAME, extractRecordIdFromStoreKey, keyBuilderQuickActionExecutionRepresentation, ingestQuickActionExecutionRepresentation, keyBuilderContentDocumentCompositeRepresentation, getResponseCacheKeysContentDocumentCompositeRepresentation, keyBuilderFromTypeContentDocumentCompositeRepresentation, ingestContentDocumentCompositeRepresentation, keyBuilderRecord, RECORD_VIEW_ENTITY_ID_PREFIX, getTypeCacheKeysRecord, keyBuilderFromTypeRecordRepresentation, ingestRecord, RecordRepresentationRepresentationType, ObjectInfoRepresentationType, getRecordAdapterFactory, getObjectInfoAdapterFactory, getObjectInfosAdapterFactory, getObjectInfoDirectoryAdapterFactory, UiApiNamespace, RecordRepresentationType, RecordRepresentationTTL, RecordRepresentationVersion, keyBuilderObjectInfo, ObjectInfoDirectoryEntryRepresentationType, getRecordsAdapterFactory } from '@salesforce/lds-adapters-uiapi';
|
|
20
20
|
import caseSensitiveUserId from '@salesforce/user/Id';
|
|
21
21
|
import { idleDetector, getInstrumentation } from 'o11y/client';
|
|
22
22
|
import ldsUseShortUrlGate from '@salesforce/gate/lds.useShortUrl';
|
|
@@ -5180,8 +5180,12 @@ function uuidv4() {
|
|
|
5180
5180
|
|
|
5181
5181
|
const HTTP_HEADER_RETRY_AFTER = 'Retry-After';
|
|
5182
5182
|
const HTTP_HEADER_IDEMPOTENCY_KEY = 'Idempotency-Key';
|
|
5183
|
+
const ERROR_CODE_IDEMPOTENCY_FEATURE_NOT_ENABLED = 'IDEMPOTENCY_FEATURE_NOT_ENABLED';
|
|
5184
|
+
const ERROR_CODE_IDEMPOTENCY_NOT_SUPPORTED = 'IDEMPOTENCY_NOT_SUPPORTED';
|
|
5183
5185
|
const ERROR_CODE_IDEMPOTENCY_KEY_USED_DIFFERENT_USER = 'IDEMPOTENCY_KEY_USED_DIFFERENT_USER';
|
|
5184
5186
|
const ERROR_CODE_IDEMPOTENCY_CONCURRENT_REQUEST = 'IDEMPOTENCY_CONCURRENT_REQUEST';
|
|
5187
|
+
const ERROR_CODE_IDEMPOTENCY_KEY_ALREADY_USED = 'IDEMPOTENCY_KEY_ALREADY_USED';
|
|
5188
|
+
const ERROR_CODE_IDEMPOTENCY_BACKEND_OPERATION_ERROR = 'IDEMPOTENCY_BACKEND_OPERATION_ERROR';
|
|
5185
5189
|
/**
|
|
5186
5190
|
* Get the retry after in milliseconds from the response headers, undefined if not specified.
|
|
5187
5191
|
* The header could have two different format.
|
|
@@ -5211,7 +5215,9 @@ function buildLuvioOverrideForDraftAdapters(luvio, handler, extractTargetIdFromC
|
|
|
5211
5215
|
const dispatchResourceRequest = async function (resourceRequest, _context) {
|
|
5212
5216
|
const resourceRequestCopy = clone$1(resourceRequest);
|
|
5213
5217
|
resourceRequestCopy.headers = resourceRequestCopy.headers || {};
|
|
5214
|
-
|
|
5218
|
+
if (handler.hasIdempotencySupport()) {
|
|
5219
|
+
resourceRequestCopy.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
5220
|
+
}
|
|
5215
5221
|
// enable return extra fields for record creation and record update http call
|
|
5216
5222
|
if (resourceRequest.basePath === '/ui-api/records' &&
|
|
5217
5223
|
(resourceRequest.method === 'post' || resourceRequest.method === 'patch')) {
|
|
@@ -6047,6 +6053,7 @@ class AbstractResourceRequestActionHandler {
|
|
|
6047
6053
|
// the luvio store redirect table, during which a new draft might be enqueued
|
|
6048
6054
|
// which would not see a necessary mapping.
|
|
6049
6055
|
this.ephemeralRedirects = {};
|
|
6056
|
+
this.isIdempotencySupported = true;
|
|
6050
6057
|
}
|
|
6051
6058
|
enqueue(data) {
|
|
6052
6059
|
return this.draftQueue.enqueue(this.handlerId, data);
|
|
@@ -6076,21 +6083,43 @@ class AbstractResourceRequestActionHandler {
|
|
|
6076
6083
|
retryDelayInMs = getRetryAfterInMs(response.headers);
|
|
6077
6084
|
shouldRetry = true;
|
|
6078
6085
|
break;
|
|
6079
|
-
case HttpStatusCode.ServerError:
|
|
6086
|
+
case HttpStatusCode.ServerError: {
|
|
6080
6087
|
shouldRetry = true;
|
|
6088
|
+
if (this.handleIdempotencyServerError(response.body, updatedAction, false, ERROR_CODE_IDEMPOTENCY_BACKEND_OPERATION_ERROR)) {
|
|
6089
|
+
this.isIdempotencySupported = false;
|
|
6090
|
+
retryDelayInMs = 0;
|
|
6091
|
+
actionDataChanged = true;
|
|
6092
|
+
}
|
|
6081
6093
|
break;
|
|
6094
|
+
}
|
|
6082
6095
|
case 409 /* IdempotentWriteSpecificHttpStatusCode.Conflict */: {
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6096
|
+
if (this.isUiApiErrors(response.body)) {
|
|
6097
|
+
const errorCode = response.body[0].errorCode;
|
|
6098
|
+
if (this.handleIdempotencyServerError(response.body, updatedAction, true, ERROR_CODE_IDEMPOTENCY_KEY_USED_DIFFERENT_USER)) {
|
|
6099
|
+
retryDelayInMs = 0;
|
|
6100
|
+
actionDataChanged = true;
|
|
6101
|
+
}
|
|
6102
|
+
else if (errorCode === ERROR_CODE_IDEMPOTENCY_CONCURRENT_REQUEST) {
|
|
6103
|
+
retryDelayInMs = getRetryAfterInMs(response.headers);
|
|
6104
|
+
}
|
|
6105
|
+
shouldRetry = true;
|
|
6106
|
+
}
|
|
6107
|
+
break;
|
|
6108
|
+
}
|
|
6109
|
+
case HttpStatusCode.BadRequest: {
|
|
6110
|
+
if (this.handleIdempotencyServerError(response.body, updatedAction, false, ERROR_CODE_IDEMPOTENCY_FEATURE_NOT_ENABLED, ERROR_CODE_IDEMPOTENCY_NOT_SUPPORTED)) {
|
|
6087
6111
|
retryDelayInMs = 0;
|
|
6088
6112
|
actionDataChanged = true;
|
|
6113
|
+
shouldRetry = true;
|
|
6089
6114
|
}
|
|
6090
|
-
|
|
6091
|
-
|
|
6115
|
+
break;
|
|
6116
|
+
}
|
|
6117
|
+
case 422 /* IdempotentWriteSpecificHttpStatusCode.UnProcessableEntity */: {
|
|
6118
|
+
if (this.handleIdempotencyServerError(response.body, updatedAction, true, ERROR_CODE_IDEMPOTENCY_KEY_ALREADY_USED)) {
|
|
6119
|
+
retryDelayInMs = 0;
|
|
6120
|
+
actionDataChanged = true;
|
|
6121
|
+
shouldRetry = true;
|
|
6092
6122
|
}
|
|
6093
|
-
shouldRetry = true;
|
|
6094
6123
|
break;
|
|
6095
6124
|
}
|
|
6096
6125
|
}
|
|
@@ -6109,6 +6138,27 @@ class AbstractResourceRequestActionHandler {
|
|
|
6109
6138
|
return ProcessActionResult.NETWORK_ERROR;
|
|
6110
6139
|
}
|
|
6111
6140
|
}
|
|
6141
|
+
// true if response is an idempotency server error. updates or deletes idempotency key if the reponse is idempotency related error. Idempotency related error is in format of UiApiError array.
|
|
6142
|
+
handleIdempotencyServerError(responseBody, action, updateIdempotencyKey, ...targetErrorCodes) {
|
|
6143
|
+
if (this.isUiApiErrors(responseBody)) {
|
|
6144
|
+
const errorCode = responseBody[0].errorCode;
|
|
6145
|
+
if (targetErrorCodes.includes(errorCode)) {
|
|
6146
|
+
action.data.headers = action.data.headers || {};
|
|
6147
|
+
if (updateIdempotencyKey) {
|
|
6148
|
+
action.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
6149
|
+
}
|
|
6150
|
+
else {
|
|
6151
|
+
delete action.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY];
|
|
6152
|
+
}
|
|
6153
|
+
return true;
|
|
6154
|
+
}
|
|
6155
|
+
}
|
|
6156
|
+
return false;
|
|
6157
|
+
}
|
|
6158
|
+
// checks if the body is an array of UiApiError. Sometimes the body has `enhancedErrorType` field as an error indicator(one example is the field validation failure). In such case Action being processed updates to an Error Action.
|
|
6159
|
+
isUiApiErrors(body) {
|
|
6160
|
+
return body !== undefined && Array.isArray(body) && body.length > 0 && body[0].errorCode;
|
|
6161
|
+
}
|
|
6112
6162
|
async buildPendingAction(request, queue) {
|
|
6113
6163
|
const targetId = await this.getIdFromRequest(request);
|
|
6114
6164
|
const tag = this.buildTagForTargetId(targetId);
|
|
@@ -6319,6 +6369,10 @@ class AbstractResourceRequestActionHandler {
|
|
|
6319
6369
|
...targetData,
|
|
6320
6370
|
body: this.mergeRequestBody(targetBody, sourceBody),
|
|
6321
6371
|
};
|
|
6372
|
+
// Updates Idempotency key if target has one
|
|
6373
|
+
if (targetData.headers && targetData.headers[HTTP_HEADER_IDEMPOTENCY_KEY]) {
|
|
6374
|
+
merged.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
6375
|
+
}
|
|
6322
6376
|
// overlay metadata
|
|
6323
6377
|
merged.metadata = { ...targetMetadata, ...sourceMetadata };
|
|
6324
6378
|
// put status back to pending to auto upload if queue is active and targed is at the head.
|
|
@@ -6355,6 +6409,9 @@ class AbstractResourceRequestActionHandler {
|
|
|
6355
6409
|
getDraftIdsFromAction(action) {
|
|
6356
6410
|
return [action.targetId];
|
|
6357
6411
|
}
|
|
6412
|
+
hasIdempotencySupport() {
|
|
6413
|
+
return this.isIdempotencySupported;
|
|
6414
|
+
}
|
|
6358
6415
|
async ingestResponses(responses, action) {
|
|
6359
6416
|
const luvio = this.getLuvio();
|
|
6360
6417
|
await luvio.handleSuccessResponse(() => {
|
|
@@ -9241,7 +9298,7 @@ async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
|
9241
9298
|
return ingestionTimestamp;
|
|
9242
9299
|
}
|
|
9243
9300
|
|
|
9244
|
-
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 rateLimit: RateLimit\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\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\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]): [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 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 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\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 LAST\n FIRST\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\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\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 TODAY\n LAST_90_DAYS\n LAST_YEAR\n NEXT_YEAR\n TOMORROW\n NEXT_QUARTER\n LAST_WEEK\n NEXT_90_DAYS\n THIS_YEAR\n LAST_FISCAL_QUARTER\n LAST_QUARTER\n THIS_FISCAL_YEAR\n THIS_MONTH\n THIS_FISCAL_QUARTER\n THIS_QUARTER\n NEXT_FISCAL_QUARTER\n NEXT_FISCAL_YEAR\n LAST_FISCAL_YEAR\n NEXT_WEEK\n YESTERDAY\n THIS_WEEK\n NEXT_MONTH\n LAST_MONTH\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\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 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\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: 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 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}\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}\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: DateTimePrimitiveOperators\n convertTimezoneValue: DateTimePrimitiveOperators\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\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\ninput DateTimePrimitiveOperators {\n eq: DateTime\n ne: DateTime\n lt: DateTime\n gt: DateTime\n lte: DateTime\n gte: DateTime\n in: [DateTime]\n nin: [DateTime]\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 it cannot currently be used\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 on FIELD";
|
|
9301
|
+
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}\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\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\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 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 # Handrolled\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\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\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\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 NEXT_QUARTER\n THIS_FISCAL_YEAR\n NEXT_FISCAL_YEAR\n THIS_WEEK\n LAST_YEAR\n NEXT_FISCAL_QUARTER\n THIS_MONTH\n THIS_YEAR\n LAST_FISCAL_YEAR\n LAST_WEEK\n LAST_90_DAYS\n THIS_FISCAL_QUARTER\n NEXT_YEAR\n NEXT_90_DAYS\n LAST_QUARTER\n LAST_FISCAL_QUARTER\n NEXT_WEEK\n TODAY\n YESTERDAY\n LAST_MONTH\n TOMORROW\n NEXT_MONTH\n THIS_QUARTER\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\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 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\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 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}\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\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";
|
|
9245
9302
|
|
|
9246
9303
|
// Define additional schema that is missing from uiapi that we use in local evaluation
|
|
9247
9304
|
const additionalSchemaDefinitions = /* GraphQL */ `
|
|
@@ -10316,16 +10373,18 @@ function injectFilter(filterNode, idState, parentPath, isParentPolymorphic, obje
|
|
|
10316
10373
|
if (!isIdField) {
|
|
10317
10374
|
let subSelectionNodes = [];
|
|
10318
10375
|
let subFieldsHasId = false;
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10376
|
+
if (isSpanning) {
|
|
10377
|
+
filterNode.value.fields.forEach((subFieldNode) => {
|
|
10378
|
+
// Check if the filter field has the 'Id'
|
|
10379
|
+
if (isFieldAnIdField(subFieldNode.name.value, objectInfos[objectInfoName])) {
|
|
10380
|
+
subFieldsHasId = true;
|
|
10381
|
+
updateIDInfo(subFieldNode, idState, draftFunctions);
|
|
10382
|
+
}
|
|
10383
|
+
// try injecting the fields within predicate no matter it has relation or not.
|
|
10384
|
+
let subResults = injectFilter(subFieldNode, idState, curPath, isPolymorphicField, objectInfos, pathToObjectApiNamesMap, draftFunctions, existingFields ? existingFields[0] : undefined);
|
|
10385
|
+
subSelectionNodes = subSelectionNodes.concat(subResults);
|
|
10386
|
+
});
|
|
10387
|
+
}
|
|
10329
10388
|
if (!subFieldsHasId) {
|
|
10330
10389
|
// Check if the query field has the 'Id'
|
|
10331
10390
|
const existingIdsInQuery = existingFields &&
|
|
@@ -10354,6 +10413,7 @@ function injectFilter(filterNode, idState, parentPath, isParentPolymorphic, obje
|
|
|
10354
10413
|
}
|
|
10355
10414
|
//Inject Conditions: 1. Same field does not exist 2. Same fields has different children. 3. Filter spanning field does not have Id. 4. InLineFragment does not have the '__typename' field
|
|
10356
10415
|
if (!existingFields ||
|
|
10416
|
+
existingFields.length === 0 ||
|
|
10357
10417
|
subSelectionNodes.length > 0 ||
|
|
10358
10418
|
(isSpanning && !subFieldsHasId) ||
|
|
10359
10419
|
(isInlineFragment && !isTypeNameExisting)) {
|
|
@@ -13079,7 +13139,7 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
|
|
|
13079
13139
|
// Fulfilled snapshot (this only happens in this code path if
|
|
13080
13140
|
// the error is network error or 504), otherwise we spread over
|
|
13081
13141
|
// the non-eval'ed snapshot (which will be either Fulfilled or Stale)
|
|
13082
|
-
|
|
13142
|
+
const resultSnapshot = nonEvaluatedSnapshot.state === 'Error'
|
|
13083
13143
|
? createLocalEvalSnapshot(gqlResult, seenRecords, recordId, rebuildWithLocalEval)
|
|
13084
13144
|
: {
|
|
13085
13145
|
...nonEvaluatedSnapshot,
|
|
@@ -13088,6 +13148,22 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
|
|
|
13088
13148
|
seenRecords,
|
|
13089
13149
|
rebuildWithLocalEval,
|
|
13090
13150
|
};
|
|
13151
|
+
const { refresh, state } = resultSnapshot;
|
|
13152
|
+
if (state !== 'Error' && refresh) {
|
|
13153
|
+
// after refreshing a graphql snapshot, we want to force a rebuild regardless
|
|
13154
|
+
// of if the call failed or not or if the data changed or not because we want
|
|
13155
|
+
// to make sure any potential new drafts are picked up
|
|
13156
|
+
resultSnapshot.refresh = {
|
|
13157
|
+
...refresh,
|
|
13158
|
+
resolve: (config) => {
|
|
13159
|
+
return refresh.resolve(config).finally(() => {
|
|
13160
|
+
luvio.storePublish(resultSnapshot.recordId, undefined);
|
|
13161
|
+
luvio.storeBroadcast();
|
|
13162
|
+
});
|
|
13163
|
+
},
|
|
13164
|
+
};
|
|
13165
|
+
}
|
|
13166
|
+
return resultSnapshot;
|
|
13091
13167
|
};
|
|
13092
13168
|
}
|
|
13093
13169
|
|
|
@@ -15029,6 +15105,7 @@ function buildInternalAdapters(store, networkAdapter, durableStore, ensureObject
|
|
|
15029
15105
|
const getRecord = getRecordAdapterFactory(luvio);
|
|
15030
15106
|
const getObjectInfo = getObjectInfoAdapterFactory(luvio);
|
|
15031
15107
|
const getObjectInfos = getObjectInfosAdapterFactory(luvio);
|
|
15108
|
+
const getObjectInfoDirectory = getObjectInfoDirectoryAdapterFactory(luvio);
|
|
15032
15109
|
return {
|
|
15033
15110
|
luvio,
|
|
15034
15111
|
durableEnvironment,
|
|
@@ -15036,37 +15113,37 @@ function buildInternalAdapters(store, networkAdapter, durableStore, ensureObject
|
|
|
15036
15113
|
getRecord,
|
|
15037
15114
|
getObjectInfo,
|
|
15038
15115
|
getObjectInfos,
|
|
15116
|
+
getObjectInfoDirectory,
|
|
15039
15117
|
},
|
|
15040
15118
|
};
|
|
15041
15119
|
}
|
|
15042
15120
|
|
|
15043
|
-
const OBJECT_INFO_PREFIX_SEGMENT = 'OBJECT_INFO_PREFIX_SEGMENT';
|
|
15044
15121
|
class ObjectInfoService {
|
|
15045
|
-
constructor(getObjectInfoAdapter, getObjectInfosAdapter, durableStore) {
|
|
15122
|
+
constructor(getObjectInfoAdapter, getObjectInfosAdapter, getObjectInfoDirectoryAdapter, durableStore) {
|
|
15123
|
+
this.getObjectInfoAdapter = getObjectInfoAdapter;
|
|
15124
|
+
this.getObjectInfosAdapter = getObjectInfosAdapter;
|
|
15125
|
+
this.getObjectInfoDirectoryAdapter = getObjectInfoDirectoryAdapter;
|
|
15126
|
+
this.durableStore = durableStore;
|
|
15046
15127
|
this.apiNameForPrefix = async (prefix) => {
|
|
15047
|
-
|
|
15048
|
-
|
|
15049
|
-
if (entries === undefined) {
|
|
15050
|
-
throw missingError;
|
|
15128
|
+
if (this.keyPrefixToApiNameMemoryCache[prefix] !== undefined) {
|
|
15129
|
+
return this.keyPrefixToApiNameMemoryCache[prefix];
|
|
15051
15130
|
}
|
|
15052
|
-
|
|
15053
|
-
|
|
15054
|
-
|
|
15055
|
-
|
|
15056
|
-
return entry.data.apiName;
|
|
15057
|
-
}
|
|
15131
|
+
await this.loadObjectInfoMaps();
|
|
15132
|
+
const apiName = this.keyPrefixToApiNameMemoryCache[prefix];
|
|
15133
|
+
if (apiName === undefined) {
|
|
15134
|
+
throw Error(`ObjectInfo for ${prefix} prefix is not primed into the durable store`);
|
|
15058
15135
|
}
|
|
15059
|
-
|
|
15136
|
+
return apiName;
|
|
15060
15137
|
};
|
|
15061
15138
|
this.ensureObjectInfoCached = async (apiName, entry) => {
|
|
15139
|
+
if (entry !== undefined) {
|
|
15140
|
+
const { keyPrefix, apiName } = entry;
|
|
15141
|
+
return this.updateObjectInfoMapping(keyPrefix, apiName);
|
|
15142
|
+
}
|
|
15062
15143
|
const exists = await this.isObjectInfoInDurableStore(apiName);
|
|
15063
15144
|
if (exists) {
|
|
15064
15145
|
return;
|
|
15065
15146
|
}
|
|
15066
|
-
if (entry !== undefined) {
|
|
15067
|
-
// Since ObjectInfo is provided, no need to fetch the snapshot
|
|
15068
|
-
return this.createObjectInfoMapping(apiName, entry);
|
|
15069
|
-
}
|
|
15070
15147
|
// ObjectInfo is not present in Durable store. Fetch
|
|
15071
15148
|
const snapshot = await this.getObjectInfoAdapter({
|
|
15072
15149
|
objectApiName: apiName,
|
|
@@ -15075,46 +15152,34 @@ class ObjectInfoService {
|
|
|
15075
15152
|
throw Error(`No snapshot found for apiName ${apiName}`);
|
|
15076
15153
|
}
|
|
15077
15154
|
if (snapshot.data !== null && snapshot.data !== undefined) {
|
|
15078
|
-
|
|
15155
|
+
const { keyPrefix, apiName } = snapshot.data;
|
|
15156
|
+
return this.updateObjectInfoMapping(keyPrefix, apiName);
|
|
15079
15157
|
}
|
|
15080
15158
|
};
|
|
15081
|
-
/**
|
|
15082
|
-
* Caches ObjectInfo(ApiName and KeyPrefix) in Durable Store
|
|
15083
|
-
*
|
|
15084
|
-
* @param apiName eg: 'Account'
|
|
15085
|
-
* @param objectInfo Object Info
|
|
15086
|
-
*
|
|
15087
|
-
* @returns Promise
|
|
15088
|
-
*/
|
|
15089
|
-
this.createObjectInfoMapping = (apiName, objectInfo) => {
|
|
15090
|
-
const { keyPrefix } = objectInfo;
|
|
15091
|
-
const entries = {
|
|
15092
|
-
[apiName]: {
|
|
15093
|
-
data: {
|
|
15094
|
-
apiName,
|
|
15095
|
-
keyPrefix,
|
|
15096
|
-
},
|
|
15097
|
-
},
|
|
15098
|
-
};
|
|
15099
|
-
this.objectInfoMemoryCache[apiName] = keyPrefix;
|
|
15100
|
-
return this.durableStore.setEntries(entries, OBJECT_INFO_PREFIX_SEGMENT);
|
|
15101
|
-
};
|
|
15102
15159
|
this.isObjectInfoInDurableStore = async (apiName) => {
|
|
15103
|
-
if (this.
|
|
15160
|
+
if (this.apiNameToKeyPrefixMemoryCache[apiName] !== undefined) {
|
|
15104
15161
|
return Promise.resolve(true);
|
|
15105
15162
|
}
|
|
15106
|
-
|
|
15107
|
-
|
|
15108
|
-
|
|
15163
|
+
await this.loadObjectInfoMaps();
|
|
15164
|
+
return this.apiNameToKeyPrefixMemoryCache[apiName] !== undefined;
|
|
15165
|
+
};
|
|
15166
|
+
this.loadObjectInfoMaps = async () => {
|
|
15167
|
+
const rows = (await this.durableStore.query(`SELECT json_extract(data, '$.apiName') as ApiName, json_extract(data, '$.keyPrefix') as keyPrefix from lds_data where key like '%ObjectInfoRepresentation%'`, [])).rows;
|
|
15168
|
+
for (const row of rows) {
|
|
15169
|
+
const apiName = row[0];
|
|
15170
|
+
const keyPrefix = row[1];
|
|
15171
|
+
this.updateObjectInfoMapping(keyPrefix, apiName);
|
|
15109
15172
|
}
|
|
15110
|
-
this.objectInfoMemoryCache[apiName] = entries[apiName].data.keyPrefix;
|
|
15111
|
-
return true;
|
|
15112
15173
|
};
|
|
15113
|
-
this.
|
|
15114
|
-
|
|
15115
|
-
|
|
15116
|
-
|
|
15117
|
-
|
|
15174
|
+
this.updateObjectInfoMapping = (keyPrefix, apiName) => {
|
|
15175
|
+
this.apiNameToKeyPrefixMemoryCache[apiName] = keyPrefix;
|
|
15176
|
+
if (keyPrefix !== null) {
|
|
15177
|
+
this.keyPrefixToApiNameMemoryCache[keyPrefix] = apiName;
|
|
15178
|
+
}
|
|
15179
|
+
};
|
|
15180
|
+
// Local in-memory cache for apiName to key prefixes
|
|
15181
|
+
this.apiNameToKeyPrefixMemoryCache = create$1(null);
|
|
15182
|
+
this.keyPrefixToApiNameMemoryCache = create$1(null);
|
|
15118
15183
|
}
|
|
15119
15184
|
/**
|
|
15120
15185
|
* Size of return map not necessarily correlated with number of inputs. The
|
|
@@ -15134,10 +15199,20 @@ class ObjectInfoService {
|
|
|
15134
15199
|
for (const result of snapshot.data.results) {
|
|
15135
15200
|
if (result.statusCode === 200) {
|
|
15136
15201
|
objectInfos[result.result.apiName] = result.result;
|
|
15202
|
+
this.updateObjectInfoMapping(result.result.keyPrefix, result.result.apiName);
|
|
15137
15203
|
}
|
|
15138
15204
|
}
|
|
15139
15205
|
return objectInfos;
|
|
15140
15206
|
}
|
|
15207
|
+
async getObjectInfoDirectory() {
|
|
15208
|
+
const snapshot = await this.getObjectInfoDirectoryAdapter({});
|
|
15209
|
+
if (!snapshot ||
|
|
15210
|
+
!snapshot.data ||
|
|
15211
|
+
(snapshot.state !== 'Fulfilled' && snapshot.state !== 'Stale')) {
|
|
15212
|
+
return undefined;
|
|
15213
|
+
}
|
|
15214
|
+
return snapshot.data;
|
|
15215
|
+
}
|
|
15141
15216
|
}
|
|
15142
15217
|
|
|
15143
15218
|
function instrumentGraphQLEval(adapter) {
|
|
@@ -15481,6 +15556,7 @@ class NimbusSqliteStore {
|
|
|
15481
15556
|
...additionalTableMap,
|
|
15482
15557
|
[DefaultDurableSegment]: new LdsDataTable(plugin),
|
|
15483
15558
|
};
|
|
15559
|
+
this.supportsBatchUpdates = plugin.supportsBatchUpdates !== undefined;
|
|
15484
15560
|
}
|
|
15485
15561
|
isEvalSupported() {
|
|
15486
15562
|
return true;
|
|
@@ -15515,16 +15591,15 @@ class NimbusSqliteStore {
|
|
|
15515
15591
|
setMetadata(entries, segment) {
|
|
15516
15592
|
const table = this.getTable(segment);
|
|
15517
15593
|
let operation;
|
|
15518
|
-
if (this.
|
|
15519
|
-
|
|
15594
|
+
if (this.supportsBatchUpdates) {
|
|
15595
|
+
operation = table.metadataToUpdateOperations(entries, segment);
|
|
15596
|
+
}
|
|
15597
|
+
else {
|
|
15520
15598
|
operation = table.entriesToUpsertOperations(entries, segment);
|
|
15521
15599
|
// manually set the context type on the upsert so notifications do not notify rebuilds without
|
|
15522
15600
|
// plugin updates
|
|
15523
15601
|
operation.context.type = 'setMetadata';
|
|
15524
15602
|
}
|
|
15525
|
-
else {
|
|
15526
|
-
operation = table.metadataToUpdateOperations(entries, segment);
|
|
15527
|
-
}
|
|
15528
15603
|
return this.batchOperationAsPromise([operation]);
|
|
15529
15604
|
}
|
|
15530
15605
|
batchOperations(operations) {
|
|
@@ -15535,17 +15610,16 @@ class NimbusSqliteStore {
|
|
|
15535
15610
|
}
|
|
15536
15611
|
else if (cur.type === 'setMetadata') {
|
|
15537
15612
|
const table = this.getTable(cur.segment);
|
|
15538
|
-
if (this.
|
|
15539
|
-
|
|
15613
|
+
if (this.supportsBatchUpdates) {
|
|
15614
|
+
acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
|
|
15615
|
+
}
|
|
15616
|
+
else {
|
|
15540
15617
|
const upsert = table.entriesToUpsertOperations(cur.entries, cur.segment);
|
|
15541
15618
|
// manually set the context type on the upsert so notifications do not notify rebuilds without
|
|
15542
15619
|
// plugin updates
|
|
15543
15620
|
upsert.context.type = 'setMetadata';
|
|
15544
15621
|
acc.push(upsert);
|
|
15545
15622
|
}
|
|
15546
|
-
else {
|
|
15547
|
-
acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
|
|
15548
|
-
}
|
|
15549
15623
|
}
|
|
15550
15624
|
else {
|
|
15551
15625
|
acc.push(this.idsToDeleteOperation(cur.ids, cur.segment));
|
|
@@ -16721,17 +16795,34 @@ function instrumentPrimingSession(session) {
|
|
|
16721
16795
|
const apiVersion = `v60.0`;
|
|
16722
16796
|
const batchEndPointPath = `/services/data/${apiVersion}/graphql/batch`;
|
|
16723
16797
|
const endPointPath = `/services/data/${apiVersion}/graphql`;
|
|
16798
|
+
const batchObjectInfoEndpoint = `/services/data/${apiVersion}/ui-api/object-info/batch`;
|
|
16799
|
+
const objectInfoDirectoryEndpoint = `/services/data/${apiVersion}/ui-api/object-info`;
|
|
16724
16800
|
class NimbusPrimingNetworkAdapter {
|
|
16801
|
+
sendRequestWithAbort(request, abortController, onResponse, onError) {
|
|
16802
|
+
let listener;
|
|
16803
|
+
const unregisterListener = () => {
|
|
16804
|
+
if (listener) {
|
|
16805
|
+
abortController.removeEventListener(listener);
|
|
16806
|
+
}
|
|
16807
|
+
};
|
|
16808
|
+
return __nimbus.plugins.LdsNetworkAdapter
|
|
16809
|
+
.sendRequest(request, (response) => {
|
|
16810
|
+
unregisterListener();
|
|
16811
|
+
onResponse(response);
|
|
16812
|
+
}, (error) => {
|
|
16813
|
+
unregisterListener();
|
|
16814
|
+
onError(error);
|
|
16815
|
+
})
|
|
16816
|
+
.then((cancellationToken) => {
|
|
16817
|
+
listener = () => {
|
|
16818
|
+
__nimbus.plugins.LdsNetworkAdapter.cancelRequest(cancellationToken);
|
|
16819
|
+
};
|
|
16820
|
+
abortController.addEventListener(listener);
|
|
16821
|
+
});
|
|
16822
|
+
}
|
|
16725
16823
|
postBatchGraphQL(configs, abortController) {
|
|
16726
16824
|
return new Promise((resolve, reject) => {
|
|
16727
|
-
|
|
16728
|
-
const unregisterListener = () => {
|
|
16729
|
-
if (listener) {
|
|
16730
|
-
abortController.removeEventListener(listener);
|
|
16731
|
-
}
|
|
16732
|
-
};
|
|
16733
|
-
__nimbus.plugins.LdsNetworkAdapter
|
|
16734
|
-
.sendRequest({
|
|
16825
|
+
this.sendRequestWithAbort({
|
|
16735
16826
|
method: 'POST',
|
|
16736
16827
|
path: batchEndPointPath,
|
|
16737
16828
|
body: JSON.stringify({
|
|
@@ -16741,8 +16832,7 @@ class NimbusPrimingNetworkAdapter {
|
|
|
16741
16832
|
queryParams: {},
|
|
16742
16833
|
priority: 'background',
|
|
16743
16834
|
observabilityContext: {},
|
|
16744
|
-
}, (response) => {
|
|
16745
|
-
unregisterListener();
|
|
16835
|
+
}, abortController, (response) => {
|
|
16746
16836
|
const { body } = response;
|
|
16747
16837
|
if (body) {
|
|
16748
16838
|
const { results } = JSON.parse(body);
|
|
@@ -16758,27 +16848,13 @@ class NimbusPrimingNetworkAdapter {
|
|
|
16758
16848
|
reject(new Error(`No body returned from ${batchEndPointPath} endpoint`));
|
|
16759
16849
|
}
|
|
16760
16850
|
}, (error) => {
|
|
16761
|
-
unregisterListener();
|
|
16762
16851
|
reject(error);
|
|
16763
|
-
})
|
|
16764
|
-
.then((cancellationToken) => {
|
|
16765
|
-
listener = () => {
|
|
16766
|
-
__nimbus.plugins.LdsNetworkAdapter.cancelRequest(cancellationToken);
|
|
16767
|
-
};
|
|
16768
|
-
abortController.addEventListener(listener);
|
|
16769
16852
|
});
|
|
16770
16853
|
});
|
|
16771
16854
|
}
|
|
16772
16855
|
postGraphQL(query, variables, abortController) {
|
|
16773
16856
|
return new Promise((resolve, reject) => {
|
|
16774
|
-
|
|
16775
|
-
const unregisterListener = () => {
|
|
16776
|
-
if (listener) {
|
|
16777
|
-
abortController.removeEventListener(listener);
|
|
16778
|
-
}
|
|
16779
|
-
};
|
|
16780
|
-
__nimbus.plugins.LdsNetworkAdapter
|
|
16781
|
-
.sendRequest({
|
|
16857
|
+
this.sendRequestWithAbort({
|
|
16782
16858
|
method: 'POST',
|
|
16783
16859
|
path: endPointPath,
|
|
16784
16860
|
body: JSON.stringify({
|
|
@@ -16789,8 +16865,7 @@ class NimbusPrimingNetworkAdapter {
|
|
|
16789
16865
|
queryParams: {},
|
|
16790
16866
|
priority: 'background',
|
|
16791
16867
|
observabilityContext: {},
|
|
16792
|
-
}, (response) => {
|
|
16793
|
-
unregisterListener();
|
|
16868
|
+
}, abortController, (response) => {
|
|
16794
16869
|
const { body } = response;
|
|
16795
16870
|
if (body) {
|
|
16796
16871
|
resolve(JSON.parse(body));
|
|
@@ -16799,14 +16874,64 @@ class NimbusPrimingNetworkAdapter {
|
|
|
16799
16874
|
reject(new Error(`No body returned from ${endPointPath} endpoint`));
|
|
16800
16875
|
}
|
|
16801
16876
|
}, (error) => {
|
|
16802
|
-
unregisterListener();
|
|
16803
16877
|
reject(error);
|
|
16804
|
-
})
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16878
|
+
});
|
|
16879
|
+
});
|
|
16880
|
+
}
|
|
16881
|
+
getObjectInfoDirectory(abortController) {
|
|
16882
|
+
return new Promise((resolve, reject) => {
|
|
16883
|
+
this.sendRequestWithAbort({
|
|
16884
|
+
method: 'GET',
|
|
16885
|
+
path: objectInfoDirectoryEndpoint,
|
|
16886
|
+
body: null,
|
|
16887
|
+
headers: {},
|
|
16888
|
+
queryParams: {},
|
|
16889
|
+
priority: 'background',
|
|
16890
|
+
observabilityContext: {},
|
|
16891
|
+
}, abortController, (response) => {
|
|
16892
|
+
const { body } = response;
|
|
16893
|
+
if (body) {
|
|
16894
|
+
resolve(JSON.parse(body).objects);
|
|
16895
|
+
}
|
|
16896
|
+
else {
|
|
16897
|
+
reject(new Error(`No body returned from ${endPointPath} endpoint`));
|
|
16898
|
+
}
|
|
16899
|
+
}, (error) => {
|
|
16900
|
+
reject(error);
|
|
16901
|
+
});
|
|
16902
|
+
});
|
|
16903
|
+
}
|
|
16904
|
+
getObjectInfos(apiName, abortController) {
|
|
16905
|
+
return new Promise((resolve, reject) => {
|
|
16906
|
+
const map = new Map();
|
|
16907
|
+
if (apiName.length === 0) {
|
|
16908
|
+
resolve(map);
|
|
16909
|
+
}
|
|
16910
|
+
this.sendRequestWithAbort({
|
|
16911
|
+
method: 'GET',
|
|
16912
|
+
path: `${batchObjectInfoEndpoint}/${apiName.join(',')}`,
|
|
16913
|
+
body: null,
|
|
16914
|
+
headers: {},
|
|
16915
|
+
queryParams: {},
|
|
16916
|
+
priority: 'background',
|
|
16917
|
+
observabilityContext: {},
|
|
16918
|
+
}, abortController, (response) => {
|
|
16919
|
+
const { body } = response;
|
|
16920
|
+
if (body) {
|
|
16921
|
+
const results = JSON.parse(body).results;
|
|
16922
|
+
results.forEach((result) => {
|
|
16923
|
+
// only populate the map if the status code is 200, caller needs to check for missing keys
|
|
16924
|
+
if (result.statusCode === 200) {
|
|
16925
|
+
map.set(result.result.apiName, result.result);
|
|
16926
|
+
}
|
|
16927
|
+
});
|
|
16928
|
+
resolve(map);
|
|
16929
|
+
}
|
|
16930
|
+
else {
|
|
16931
|
+
reject(new Error(`No body returned from ${endPointPath} endpoint`));
|
|
16932
|
+
}
|
|
16933
|
+
}, (error) => {
|
|
16934
|
+
reject(error);
|
|
16810
16935
|
});
|
|
16811
16936
|
});
|
|
16812
16937
|
}
|
|
@@ -16815,6 +16940,10 @@ class NimbusPrimingNetworkAdapter {
|
|
|
16815
16940
|
// ref: https://gnome.pages.gitlab.gnome.org/tracker/docs/developer/limits.html?gi-language=c
|
|
16816
16941
|
const SQLITE_MAX_VARIABLE_NUMBER = 999;
|
|
16817
16942
|
const PARAMS_PER_RECORD = 3;
|
|
16943
|
+
/**
|
|
16944
|
+
* No key builder (or adapter) exists for the object info directory, we need to build the key manually
|
|
16945
|
+
*/
|
|
16946
|
+
const ObjectInfoDirectoryKey = `${UiApiNamespace}::${ObjectInfoDirectoryEntryRepresentationType}:`;
|
|
16818
16947
|
// We need to batch the records to avoid hitting the SQLITE_MAX_VARIABLE_NUMBER limit. Each record has 3 parameters
|
|
16819
16948
|
const BATCH_SIZE = Math.floor(SQLITE_MAX_VARIABLE_NUMBER / PARAMS_PER_RECORD);
|
|
16820
16949
|
class SqlitePrimingStore {
|
|
@@ -16879,6 +17008,44 @@ class SqlitePrimingStore {
|
|
|
16879
17008
|
};
|
|
16880
17009
|
}
|
|
16881
17010
|
}
|
|
17011
|
+
async readObjectInfoDirectory() {
|
|
17012
|
+
const sql = 'SELECT data FROM lds_data WHERE key = ?';
|
|
17013
|
+
const params = [ObjectInfoDirectoryKey];
|
|
17014
|
+
const result = await this.store.query(sql, params);
|
|
17015
|
+
if (result.rows.length === 1) {
|
|
17016
|
+
return JSON.parse(result.rows[0][0]);
|
|
17017
|
+
}
|
|
17018
|
+
return undefined;
|
|
17019
|
+
}
|
|
17020
|
+
async readObjectApiNames() {
|
|
17021
|
+
const sql = 'SELECT key FROM lds_data WHERE key like ?';
|
|
17022
|
+
const params = [`%${ObjectInfoRepresentationType}%`];
|
|
17023
|
+
const result = await this.store.query(sql, params);
|
|
17024
|
+
const apiNames = new Set();
|
|
17025
|
+
result.rows.forEach((row) => {
|
|
17026
|
+
const key = row[0];
|
|
17027
|
+
const parts = key.split(':');
|
|
17028
|
+
apiNames.add(parts[parts.length - 1]);
|
|
17029
|
+
});
|
|
17030
|
+
return apiNames;
|
|
17031
|
+
}
|
|
17032
|
+
writeObjectInfoDirectory(directory) {
|
|
17033
|
+
const sql = 'INSERT or IGNORE into lds_data (key, data) values (?, ?)';
|
|
17034
|
+
const params = [ObjectInfoDirectoryKey, JSON.stringify(directory)];
|
|
17035
|
+
return this.store.query(sql, params).then(() => { });
|
|
17036
|
+
}
|
|
17037
|
+
writeObjectInfos(objectInfos) {
|
|
17038
|
+
const sql = `INSERT or IGNORE into lds_data (key, data) values ${objectInfos
|
|
17039
|
+
.map(() => '(?, ?)')
|
|
17040
|
+
.join(',')};`;
|
|
17041
|
+
const params = [];
|
|
17042
|
+
objectInfos.forEach((objectInfo) => {
|
|
17043
|
+
const key = keyBuilderObjectInfo(this.getLuvio(), { apiName: objectInfo.apiName });
|
|
17044
|
+
params.push(key);
|
|
17045
|
+
params.push(JSON.stringify(objectInfo));
|
|
17046
|
+
});
|
|
17047
|
+
return this.store.query(sql, params).then(() => { });
|
|
17048
|
+
}
|
|
16882
17049
|
}
|
|
16883
17050
|
function batchArray(arr, batchSize = BATCH_SIZE) {
|
|
16884
17051
|
const batches = [];
|
|
@@ -17003,13 +17170,13 @@ function getRuntime() {
|
|
|
17003
17170
|
: {}, () => getIngestMetadataForInternalAdapters !== undefined
|
|
17004
17171
|
? getIngestMetadataForInternalAdapters()
|
|
17005
17172
|
: {});
|
|
17006
|
-
const { adapters: { getObjectInfo, getObjectInfos, getRecord }, durableEnvironment: internalAdapterDurableEnvironment, luvio: internalLuvio, } = buildInternalAdapters(internalAdapterStore, lazyNetworkAdapter, internalAdapterDurableStore, (apiName, objectInfo) => lazyObjectInfoService.ensureObjectInfoCached(apiName, objectInfo));
|
|
17173
|
+
const { adapters: { getObjectInfo, getObjectInfos, getRecord, getObjectInfoDirectory }, durableEnvironment: internalAdapterDurableEnvironment, luvio: internalLuvio, } = buildInternalAdapters(internalAdapterStore, lazyNetworkAdapter, internalAdapterDurableStore, (apiName, objectInfo) => lazyObjectInfoService.ensureObjectInfoCached(apiName, objectInfo));
|
|
17007
17174
|
lazyInternalLuvio = internalLuvio;
|
|
17008
17175
|
getIngestRecordsForInternalAdapters =
|
|
17009
17176
|
internalAdapterDurableEnvironment.getIngestStagingStoreRecords;
|
|
17010
17177
|
getIngestMetadataForInternalAdapters =
|
|
17011
17178
|
internalAdapterDurableEnvironment.getIngestStagingStoreRecords;
|
|
17012
|
-
lazyObjectInfoService = new ObjectInfoService(getObjectInfo, getObjectInfos,
|
|
17179
|
+
lazyObjectInfoService = new ObjectInfoService(getObjectInfo, getObjectInfos, getObjectInfoDirectory, lazyBaseDurableStore);
|
|
17013
17180
|
// creates a durable store that denormalizes scalar fields for records
|
|
17014
17181
|
let getIngestRecords;
|
|
17015
17182
|
let getIngestMetadata;
|
|
@@ -17121,4 +17288,4 @@ register({
|
|
|
17121
17288
|
});
|
|
17122
17289
|
|
|
17123
17290
|
export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
17124
|
-
// version: 1.
|
|
17291
|
+
// version: 1.247.0-4fe38c091
|