@salesforce/lds-runtime-mobile 1.433.0 → 1.435.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 +175 -100
- package/dist/types/adapters/util/records.d.ts +0 -1
- package/dist/types/drafts/quickActions/AbstractQuickActionHandler.d.ts +5 -5
- package/dist/types/drafts/quickActions/QuickActionExecutionRepresentationHandler.d.ts +2 -3
- package/dist/types/drafts/records/draftAwareAdapters/updateRecord.d.ts +1 -1
- package/dist/types/onestore/index.d.ts +2 -2
- package/dist/types/onestore/nimbusDurableCacheInclusionPolicy.d.ts +1 -1
- package/dist/types/onestore/nimbusNetworkDescriptor.d.ts +1 -1
- package/dist/types/sfs/ProductConsumedSideEffects.d.ts +2 -2
- package/dist/types/sfs/sfsCustomSideEffects.d.ts +1 -1
- package/package.json +34 -34
- package/sfdc/main.js +175 -100
- package/sfdc/types/adapters/util/records.d.ts +0 -1
- package/sfdc/types/drafts/quickActions/AbstractQuickActionHandler.d.ts +5 -5
- package/sfdc/types/drafts/quickActions/QuickActionExecutionRepresentationHandler.d.ts +2 -3
- package/sfdc/types/drafts/records/draftAwareAdapters/updateRecord.d.ts +1 -1
- package/sfdc/types/onestore/index.d.ts +2 -2
- package/sfdc/types/onestore/nimbusDurableCacheInclusionPolicy.d.ts +1 -1
- package/sfdc/types/onestore/nimbusNetworkDescriptor.d.ts +1 -1
- package/sfdc/types/sfs/ProductConsumedSideEffects.d.ts +2 -2
- package/sfdc/types/sfs/sfsCustomSideEffects.d.ts +1 -1
package/dist/main.js
CHANGED
|
@@ -46,7 +46,7 @@ import graphqlL2AdapterGate from '@salesforce/gate/lmr.graphqlL2Adapter';
|
|
|
46
46
|
import useOneStore from '@salesforce/gate/lmr.useOneStore';
|
|
47
47
|
import { setServices } from '@conduit-client/service-provisioner/v1';
|
|
48
48
|
import '@conduit-client/type-normalization/v1';
|
|
49
|
-
import { Kind as Kind$2, visit as visit$2, print as print$1, resolveAndValidateGraphQLConfig } from '@conduit-client/onestore-graphql-parser/v1';
|
|
49
|
+
import { Kind as Kind$2, visit as visit$2, print as print$1, resolveAndValidateGraphQLConfig, toGraphQLErrorResponse } from '@conduit-client/onestore-graphql-parser/v1';
|
|
50
50
|
import productConsumedSideEffects from '@salesforce/gate/com.salesforce.fieldservice.vanStockLDSBypass256';
|
|
51
51
|
import reviveOnlyRequestedFields from '@salesforce/gate/lmr.reviveOnlyRequestedFields';
|
|
52
52
|
|
|
@@ -272,7 +272,11 @@ function buildAndDispatchGetRecordAggregateUi(recordId, req, params) {
|
|
|
272
272
|
queryParams: {},
|
|
273
273
|
headers: {},
|
|
274
274
|
};
|
|
275
|
-
|
|
275
|
+
// Re-enter the composed adapter (when registered) so routing and interceptors
|
|
276
|
+
// apply to the synthesized aggregate-ui sub-request. Fall back to the base
|
|
277
|
+
// adapter when unregistered (e.g. in lds-network-adapter unit tests).
|
|
278
|
+
const subRequestAdapter = networkAdapter;
|
|
279
|
+
return dispatchSplitRecordAggregateUiAction(recordId, subRequestAdapter, aggregateUiResourceRequest, resourceRequestContext);
|
|
276
280
|
}
|
|
277
281
|
const getRecordDispatcher = (req) => {
|
|
278
282
|
const { resourceRequest, networkAdapter, resourceRequestContext } = req;
|
|
@@ -333,7 +337,6 @@ function matchRecordsHandlers(path, resourceRequest) {
|
|
|
333
337
|
}
|
|
334
338
|
return null;
|
|
335
339
|
}
|
|
336
|
-
|
|
337
340
|
const defaultDispatcher = (req) => {
|
|
338
341
|
const { networkAdapter, resourceRequest, resourceRequestContext } = req;
|
|
339
342
|
return networkAdapter(resourceRequest, resourceRequestContext);
|
|
@@ -7729,7 +7732,6 @@ function prepareRequest$5(luvio, config) {
|
|
|
7729
7732
|
const key = keyBuilder$1M(luvio, createResourceParams$g(config));
|
|
7730
7733
|
const allTrackedFields = getTrackedFields(key, luvio.getNode(key), {
|
|
7731
7734
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
7732
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
7733
7735
|
}, config.optionalFields);
|
|
7734
7736
|
const optionalFields = fields === undefined ? allTrackedFields : difference(allTrackedFields, fields);
|
|
7735
7737
|
const resourceParams = createResourceParams$g({
|
|
@@ -7856,7 +7858,6 @@ function ingestSuccessChildResourceParams$2(luvio, childResourceParamsArray, chi
|
|
|
7856
7858
|
};
|
|
7857
7859
|
const childTrackedFields = getTrackedFields(childKey, luvio.getNode(childKey), {
|
|
7858
7860
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
7859
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
7860
7861
|
}, childResourceParams.queryParams.optionalFields);
|
|
7861
7862
|
const childSnapshot = ingestSuccess$8(luvio, {
|
|
7862
7863
|
recordId: childResourceParams.urlParams.recordId,
|
|
@@ -16191,7 +16192,6 @@ function buildNetworkSnapshot$c(luvio, config, options) {
|
|
|
16191
16192
|
const key = keyBuilder$1w(luvio, config);
|
|
16192
16193
|
const trackedFieldsConfig = {
|
|
16193
16194
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
16194
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
16195
16195
|
};
|
|
16196
16196
|
const optionalFieldsTrie = convertFieldsToTrie(getTrackedFields(key, luvio.getNode(key), trackedFieldsConfig, config.optionalFields));
|
|
16197
16197
|
const fieldsTrie = BLANK_RECORD_FIELDS_TRIE;
|
|
@@ -22521,7 +22521,6 @@ const buildNetworkSnapshot$3 = (luvio, context, config, options) => {
|
|
|
22521
22521
|
...resourceRequest.queryParams,
|
|
22522
22522
|
optionalFields: getTrackedFields(templateRecordKey, luvio.getNode(templateRecordKey), {
|
|
22523
22523
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
22524
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
22525
22524
|
}, config.optionalFields),
|
|
22526
22525
|
},
|
|
22527
22526
|
});
|
|
@@ -23221,7 +23220,6 @@ function prepareRequest(luvio, context, config) {
|
|
|
23221
23220
|
...resourceRequest.queryParams,
|
|
23222
23221
|
optionalFields: getTrackedFields(recordTemplateKey, luvio.getNode(recordTemplateKey), {
|
|
23223
23222
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
23224
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
23225
23223
|
}, config.optionalFields),
|
|
23226
23224
|
},
|
|
23227
23225
|
});
|
|
@@ -23241,7 +23239,6 @@ function onFetchResponseSuccess$2(luvio, context, config, request, response, res
|
|
|
23241
23239
|
});
|
|
23242
23240
|
const allTrackedFields = getTrackedFields(templateRecordKey, luvio.getNode(templateRecordKey), {
|
|
23243
23241
|
maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
|
|
23244
|
-
onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
23245
23242
|
}, optionalFields);
|
|
23246
23243
|
const allTrackedFieldsTrie = convertFieldsToTrie(allTrackedFields, true);
|
|
23247
23244
|
const ingest = createFieldsIngestSuccess({
|
|
@@ -43083,6 +43080,7 @@ class AbstractQuickActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
43083
43080
|
}
|
|
43084
43081
|
async buildPendingAction(request, queue) {
|
|
43085
43082
|
this.resolveResourceRequestBody(request.body);
|
|
43083
|
+
// eslint-disable-next-line no-return-await
|
|
43086
43084
|
return await super.buildPendingAction(request, queue);
|
|
43087
43085
|
}
|
|
43088
43086
|
resolveResourceRequestBody(body) {
|
|
@@ -43517,8 +43515,6 @@ function isCreateContentDocumentAndVersionDraftAdapterEvent(customEvent) {
|
|
|
43517
43515
|
return customEvent.namespace === CONTENT_DOCUMENT_AND_VERSION_NAMESPACE;
|
|
43518
43516
|
}
|
|
43519
43517
|
|
|
43520
|
-
// so eslint doesn't complain about nimbus
|
|
43521
|
-
/* global __nimbus */
|
|
43522
43518
|
function chunkToBase64(chunk) {
|
|
43523
43519
|
const bytes = new Uint8Array(chunk);
|
|
43524
43520
|
const CHUNK_SIZE = 64 * 1024; // 64kb, any bigger and fromCharCode() can error out with an overflow.
|
|
@@ -49603,6 +49599,7 @@ function isPolymorphicFieldPath(path, pathToObjectApiNamesMap, objectInfos) {
|
|
|
49603
49599
|
const parentObjectInfo = objectInfos[parentObjectApiNames[0]];
|
|
49604
49600
|
// this should not be undefined, but lets catch it if we do end up in that state.
|
|
49605
49601
|
if (parentObjectInfo === undefined) {
|
|
49602
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
49606
49603
|
throw new Error(`ObjectInfo is missing for ${parentObjectApiNames[0]} for ${parentApiPath}`);
|
|
49607
49604
|
}
|
|
49608
49605
|
const relationshipField = referenceIdFieldForRelationship(lastSegment);
|
|
@@ -50975,6 +50972,7 @@ function checkForEmptyData(gqlResult) {
|
|
|
50975
50972
|
}
|
|
50976
50973
|
const query = data.uiapi.query;
|
|
50977
50974
|
// Check all entity types in the query for edges - using for...in to avoid array allocation
|
|
50975
|
+
// eslint-disable-next-line guard-for-in
|
|
50978
50976
|
for (const entityType in query) {
|
|
50979
50977
|
const entity = query[entityType];
|
|
50980
50978
|
if (entity && entity.edges && isArray$3(entity.edges) && entity.edges.length > 0) {
|
|
@@ -52486,6 +52484,7 @@ function extractApiNameFromConfig(adapterName, config, completedNetworkRequests)
|
|
|
52486
52484
|
case 'getRecord':
|
|
52487
52485
|
// getRecord config has fields/optionalFields like "Account.Name"
|
|
52488
52486
|
// Extract apiName from first field in config
|
|
52487
|
+
// eslint-disable-next-line no-case-declarations
|
|
52489
52488
|
const objectName = extractObjectNameFromFields(parsedConfig);
|
|
52490
52489
|
if (objectName) {
|
|
52491
52490
|
apiName = objectName;
|
|
@@ -53023,7 +53022,9 @@ class NimbusSqliteStore {
|
|
|
53023
53022
|
}
|
|
53024
53023
|
instrumentation$2.trackValue(GRAPHQL_QUERY_ROOT_METRIC_NAME, row[1].length);
|
|
53025
53024
|
}
|
|
53026
|
-
catch {
|
|
53025
|
+
catch {
|
|
53026
|
+
// intentionally do nothing
|
|
53027
|
+
}
|
|
53027
53028
|
}
|
|
53028
53029
|
}
|
|
53029
53030
|
|
|
@@ -53732,6 +53733,7 @@ class PrimingSession extends EventEmitter {
|
|
|
53732
53733
|
const userData = {
|
|
53733
53734
|
...stats,
|
|
53734
53735
|
};
|
|
53736
|
+
// eslint-disable-next-line guard-for-in
|
|
53735
53737
|
for (const error in errors) {
|
|
53736
53738
|
activity.error(error);
|
|
53737
53739
|
}
|
|
@@ -53912,6 +53914,7 @@ class PrimingSession extends EventEmitter {
|
|
|
53912
53914
|
let limitedResult = this.applyRetryLimits(result.additionalWork);
|
|
53913
53915
|
this.enqueue(limitedResult.additionalWork);
|
|
53914
53916
|
if (limitedResult.recordsNeedingRefetch.size > 0) {
|
|
53917
|
+
// eslint-disable-next-line guard-for-in
|
|
53915
53918
|
for (const key in keys$3(limitedResult.recordsNeedingRefetch)) {
|
|
53916
53919
|
const value = limitedResult.recordsNeedingRefetch.get(key);
|
|
53917
53920
|
if (result.recordsNeedingRefetch.has(key)) {
|
|
@@ -56198,6 +56201,7 @@ class DurableRecordStore {
|
|
|
56198
56201
|
async exists(key) {
|
|
56199
56202
|
const result = await this.durableStore.query('SELECT EXISTS(SELECT 1 FROM lds_data WHERE key = ?)', [key]);
|
|
56200
56203
|
const exists = result.rows[0][0];
|
|
56204
|
+
// eslint-disable-next-line eqeqeq
|
|
56201
56205
|
return exists == true;
|
|
56202
56206
|
}
|
|
56203
56207
|
async getRecord(key) {
|
|
@@ -56412,7 +56416,7 @@ var CounterResult;
|
|
|
56412
56416
|
CounterResult["Error"] = "Error";
|
|
56413
56417
|
})(CounterResult || (CounterResult = {}));
|
|
56414
56418
|
function incrementCounter(name, result) {
|
|
56415
|
-
instrumentation.incrementCounter('SFSSideEffect', 1, result
|
|
56419
|
+
instrumentation.incrementCounter('SFSSideEffect', 1, result === CounterResult.Error, {
|
|
56416
56420
|
Name: name,
|
|
56417
56421
|
Result: result,
|
|
56418
56422
|
});
|
|
@@ -59000,7 +59004,7 @@ function buildServiceDescriptor$b(luvio) {
|
|
|
59000
59004
|
},
|
|
59001
59005
|
};
|
|
59002
59006
|
}
|
|
59003
|
-
// version: 1.
|
|
59007
|
+
// version: 1.435.0-5818ce3c48
|
|
59004
59008
|
|
|
59005
59009
|
/**
|
|
59006
59010
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -59026,7 +59030,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
59026
59030
|
},
|
|
59027
59031
|
};
|
|
59028
59032
|
}
|
|
59029
|
-
// version: 1.
|
|
59033
|
+
// version: 1.435.0-5818ce3c48
|
|
59030
59034
|
|
|
59031
59035
|
/*!
|
|
59032
59036
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -59511,6 +59515,9 @@ function invalidSchemaResponseWithError(error) {
|
|
|
59511
59515
|
return err$1([error]);
|
|
59512
59516
|
}
|
|
59513
59517
|
function validateJsonSchema(data, schema, path = "$", document = schema) {
|
|
59518
|
+
return validateJsonSchemaInternal(data, schema, path, document, /* @__PURE__ */ new Map());
|
|
59519
|
+
}
|
|
59520
|
+
function validateJsonSchemaInternal(data, schema, path, document, visited) {
|
|
59514
59521
|
if (schema === true) return validSchemaResponse();
|
|
59515
59522
|
if (schema === false)
|
|
59516
59523
|
return invalidSchemaResponseWithError(
|
|
@@ -59519,22 +59526,22 @@ function validateJsonSchema(data, schema, path = "$", document = schema) {
|
|
|
59519
59526
|
const dataType = data === null ? "null" : Array.isArray(data) ? "array" : typeof data;
|
|
59520
59527
|
const errorCollector = new JsonSchemaErrorCollector();
|
|
59521
59528
|
if ("anyOf" in schema) {
|
|
59522
|
-
errorCollector.append(validateAnyOf(data, schema, path, document));
|
|
59529
|
+
errorCollector.append(validateAnyOf(data, schema, path, document, visited));
|
|
59523
59530
|
} else if ("oneOf" in schema) {
|
|
59524
|
-
errorCollector.append(validateOneOf(data, schema, path, document));
|
|
59531
|
+
errorCollector.append(validateOneOf(data, schema, path, document, visited));
|
|
59525
59532
|
} else if ("allOf" in schema) {
|
|
59526
|
-
errorCollector.append(validateAllOf(data, schema, path, document));
|
|
59533
|
+
errorCollector.append(validateAllOf(data, schema, path, document, visited));
|
|
59527
59534
|
} else if ("not" in schema) {
|
|
59528
|
-
errorCollector.append(validateNot(data, schema, path, document));
|
|
59535
|
+
errorCollector.append(validateNot(data, schema, path, document, visited));
|
|
59529
59536
|
} else if ("$ref" in schema) {
|
|
59530
|
-
errorCollector.append(validateRef(data, schema, path, document));
|
|
59537
|
+
errorCollector.append(validateRef(data, schema, path, document, visited));
|
|
59531
59538
|
} else if ("type" in schema) {
|
|
59532
59539
|
if (schema.type === "object") {
|
|
59533
59540
|
if (dataType !== "object") {
|
|
59534
59541
|
errorCollector.add(incorrectTypeError("object", dataType, path));
|
|
59535
59542
|
} else {
|
|
59536
59543
|
errorCollector.append(
|
|
59537
|
-
validateObject(data, schema, path, document)
|
|
59544
|
+
validateObject(data, schema, path, document, visited)
|
|
59538
59545
|
);
|
|
59539
59546
|
}
|
|
59540
59547
|
} else if (schema.type === "array") {
|
|
@@ -59542,7 +59549,7 @@ function validateJsonSchema(data, schema, path = "$", document = schema) {
|
|
|
59542
59549
|
errorCollector.add(incorrectTypeError("array", dataType, path));
|
|
59543
59550
|
} else {
|
|
59544
59551
|
errorCollector.append(
|
|
59545
|
-
validateArray(data, schema, path, document)
|
|
59552
|
+
validateArray(data, schema, path, document, visited)
|
|
59546
59553
|
);
|
|
59547
59554
|
}
|
|
59548
59555
|
} else {
|
|
@@ -59559,16 +59566,17 @@ function validateJsonSchema(data, schema, path = "$", document = schema) {
|
|
|
59559
59566
|
}
|
|
59560
59567
|
return errorCollector.toValidationResponse();
|
|
59561
59568
|
}
|
|
59562
|
-
function validateAnyOf(data, schema, path, document) {
|
|
59569
|
+
function validateAnyOf(data, schema, path, document, visited) {
|
|
59563
59570
|
let isValid = false;
|
|
59564
59571
|
const errorCollector = new JsonSchemaErrorCollector();
|
|
59565
59572
|
for (let i = 0, { length } = schema.anyOf; i < length; i++) {
|
|
59566
59573
|
const element = schema.anyOf[i];
|
|
59567
|
-
const validationResponse =
|
|
59574
|
+
const validationResponse = validateJsonSchemaInternal(
|
|
59568
59575
|
data,
|
|
59569
59576
|
element,
|
|
59570
59577
|
`${path}.anyOf[${i}]`,
|
|
59571
|
-
document
|
|
59578
|
+
document,
|
|
59579
|
+
visited
|
|
59572
59580
|
);
|
|
59573
59581
|
if (validationResponse.isOk()) {
|
|
59574
59582
|
isValid = true;
|
|
@@ -59585,13 +59593,22 @@ function validateAnyOf(data, schema, path, document) {
|
|
|
59585
59593
|
}
|
|
59586
59594
|
return validSchemaResponse();
|
|
59587
59595
|
}
|
|
59588
|
-
function validateOneOf(data, schema, path, document) {
|
|
59596
|
+
function validateOneOf(data, schema, path, document, visited) {
|
|
59597
|
+
if (schema.discriminator !== void 0) {
|
|
59598
|
+
return validateDiscriminatedOneOf(data, schema.discriminator, path, document, visited);
|
|
59599
|
+
}
|
|
59589
59600
|
let validSubShemaPaths = [];
|
|
59590
59601
|
const errorCollector = new JsonSchemaErrorCollector();
|
|
59591
59602
|
for (let i = 0, { length } = schema.oneOf; i < length; i++) {
|
|
59592
59603
|
const element = schema.oneOf[i];
|
|
59593
59604
|
const oneOfPath = `${path}.oneOf[${i}]`;
|
|
59594
|
-
const validationResponse =
|
|
59605
|
+
const validationResponse = validateJsonSchemaInternal(
|
|
59606
|
+
data,
|
|
59607
|
+
element,
|
|
59608
|
+
oneOfPath,
|
|
59609
|
+
document,
|
|
59610
|
+
visited
|
|
59611
|
+
);
|
|
59595
59612
|
if (validationResponse.isOk()) {
|
|
59596
59613
|
validSubShemaPaths.push(oneOfPath);
|
|
59597
59614
|
} else {
|
|
@@ -59613,16 +59630,45 @@ function validateOneOf(data, schema, path, document) {
|
|
|
59613
59630
|
}
|
|
59614
59631
|
return validSchemaResponse();
|
|
59615
59632
|
}
|
|
59616
|
-
function
|
|
59633
|
+
function validateDiscriminatedOneOf(data, discriminator, path, document, visited) {
|
|
59634
|
+
if (data === null || typeof data !== "object" || Array.isArray(data)) {
|
|
59635
|
+
return invalidSchemaResponseWithError(incorrectTypeError("object", typeof data, path));
|
|
59636
|
+
}
|
|
59637
|
+
const { propertyName, mapping } = discriminator;
|
|
59638
|
+
const discriminatorValue = data[propertyName];
|
|
59639
|
+
if (discriminatorValue === void 0) {
|
|
59640
|
+
return invalidSchemaResponseWithError(
|
|
59641
|
+
new MissingRequiredPropertyError(
|
|
59642
|
+
`Object at path '${path}' is missing required discriminator property '${propertyName}'.`
|
|
59643
|
+
)
|
|
59644
|
+
);
|
|
59645
|
+
}
|
|
59646
|
+
if (typeof discriminatorValue !== "string") {
|
|
59647
|
+
return invalidSchemaResponseWithError(
|
|
59648
|
+
incorrectTypeError("string", typeof discriminatorValue, `${path}.${propertyName}`)
|
|
59649
|
+
);
|
|
59650
|
+
}
|
|
59651
|
+
const targetRef = mapping[discriminatorValue];
|
|
59652
|
+
if (targetRef === void 0) {
|
|
59653
|
+
return invalidSchemaResponseWithError(
|
|
59654
|
+
new JsonSchemaViolationError(
|
|
59655
|
+
`Discriminator value '${discriminatorValue}' at '${path}.${propertyName}' is not in the mapping. Expected one of: [${Object.keys(mapping).join(", ")}].`
|
|
59656
|
+
)
|
|
59657
|
+
);
|
|
59658
|
+
}
|
|
59659
|
+
return validateJsonSchemaInternal(data, { $ref: targetRef }, path, document, visited);
|
|
59660
|
+
}
|
|
59661
|
+
function validateAllOf(data, schema, path, document, visited) {
|
|
59617
59662
|
let isValid = true;
|
|
59618
59663
|
const errorCollector = new JsonSchemaErrorCollector();
|
|
59619
59664
|
for (let i = 0, { length } = schema.allOf; i < length; i++) {
|
|
59620
59665
|
const element = schema.allOf[i];
|
|
59621
|
-
const validationResponse =
|
|
59666
|
+
const validationResponse = validateJsonSchemaInternal(
|
|
59622
59667
|
data,
|
|
59623
59668
|
element,
|
|
59624
59669
|
`${path}.allOf[${i}]`,
|
|
59625
|
-
document
|
|
59670
|
+
document,
|
|
59671
|
+
visited
|
|
59626
59672
|
);
|
|
59627
59673
|
if (!validationResponse.isOk()) {
|
|
59628
59674
|
errorCollector.append(validationResponse);
|
|
@@ -59636,8 +59682,14 @@ function validateAllOf(data, schema, path, document) {
|
|
|
59636
59682
|
}
|
|
59637
59683
|
return errorCollector.toValidationResponse();
|
|
59638
59684
|
}
|
|
59639
|
-
function validateNot(data, schema, path, document) {
|
|
59640
|
-
const validationResponse =
|
|
59685
|
+
function validateNot(data, schema, path, document, visited) {
|
|
59686
|
+
const validationResponse = validateJsonSchemaInternal(
|
|
59687
|
+
data,
|
|
59688
|
+
schema.not,
|
|
59689
|
+
path,
|
|
59690
|
+
document,
|
|
59691
|
+
visited
|
|
59692
|
+
);
|
|
59641
59693
|
if (validationResponse.isOk()) {
|
|
59642
59694
|
return invalidSchemaResponseWithError(
|
|
59643
59695
|
new JsonSchemaViolationError(
|
|
@@ -59647,7 +59699,7 @@ function validateNot(data, schema, path, document) {
|
|
|
59647
59699
|
}
|
|
59648
59700
|
return validSchemaResponse();
|
|
59649
59701
|
}
|
|
59650
|
-
function validateObject(data, schema, path, document) {
|
|
59702
|
+
function validateObject(data, schema, path, document, visited) {
|
|
59651
59703
|
const schemaKeys = Object.keys(schema.properties);
|
|
59652
59704
|
const requiredKeys = new Set(schema.required);
|
|
59653
59705
|
const schemaKeySet = new Set(schemaKeys);
|
|
@@ -59655,11 +59707,12 @@ function validateObject(data, schema, path, document) {
|
|
|
59655
59707
|
Object.keys(data).forEach((key) => {
|
|
59656
59708
|
if (!schemaKeySet.has(key)) {
|
|
59657
59709
|
errorCollector.append(
|
|
59658
|
-
|
|
59710
|
+
validateJsonSchemaInternal(
|
|
59659
59711
|
data[key],
|
|
59660
59712
|
schema.additionalProperties,
|
|
59661
59713
|
`${path}.additionalProperties[${key}]`,
|
|
59662
|
-
document
|
|
59714
|
+
document,
|
|
59715
|
+
visited
|
|
59663
59716
|
)
|
|
59664
59717
|
);
|
|
59665
59718
|
}
|
|
@@ -59676,18 +59729,19 @@ function validateObject(data, schema, path, document) {
|
|
|
59676
59729
|
}
|
|
59677
59730
|
if (keyInData) {
|
|
59678
59731
|
errorCollector.append(
|
|
59679
|
-
|
|
59732
|
+
validateJsonSchemaInternal(
|
|
59680
59733
|
data[key],
|
|
59681
59734
|
schema.properties[key],
|
|
59682
59735
|
`${path}.${key}`,
|
|
59683
|
-
document
|
|
59736
|
+
document,
|
|
59737
|
+
visited
|
|
59684
59738
|
)
|
|
59685
59739
|
);
|
|
59686
59740
|
}
|
|
59687
59741
|
}
|
|
59688
59742
|
return errorCollector.toValidationResponse();
|
|
59689
59743
|
}
|
|
59690
|
-
function validateArray(data, schema, path, document) {
|
|
59744
|
+
function validateArray(data, schema, path, document, visited) {
|
|
59691
59745
|
if (schema.minItems !== void 0 && data.length < schema.minItems) {
|
|
59692
59746
|
return invalidSchemaResponseWithError(
|
|
59693
59747
|
new MinItemsViolationError(
|
|
@@ -59705,7 +59759,13 @@ function validateArray(data, schema, path, document) {
|
|
|
59705
59759
|
const errorCollector = new JsonSchemaErrorCollector();
|
|
59706
59760
|
data.forEach(
|
|
59707
59761
|
(element, index) => errorCollector.append(
|
|
59708
|
-
|
|
59762
|
+
validateJsonSchemaInternal(
|
|
59763
|
+
element,
|
|
59764
|
+
schema.items,
|
|
59765
|
+
`${path}[${index}]`,
|
|
59766
|
+
document,
|
|
59767
|
+
visited
|
|
59768
|
+
)
|
|
59709
59769
|
)
|
|
59710
59770
|
);
|
|
59711
59771
|
return errorCollector.toValidationResponse();
|
|
@@ -59740,7 +59800,7 @@ function validateScalar(data, schema, path) {
|
|
|
59740
59800
|
}
|
|
59741
59801
|
return validSchemaResponse();
|
|
59742
59802
|
}
|
|
59743
|
-
function validateRef(data, schema, path, document) {
|
|
59803
|
+
function validateRef(data, schema, path, document, visited) {
|
|
59744
59804
|
if (!schema.$ref.startsWith("#")) {
|
|
59745
59805
|
return invalidSchemaResponseWithError(
|
|
59746
59806
|
new InvalidRefError(
|
|
@@ -59748,11 +59808,23 @@ function validateRef(data, schema, path, document) {
|
|
|
59748
59808
|
)
|
|
59749
59809
|
);
|
|
59750
59810
|
}
|
|
59811
|
+
let refsForData = visited.get(data);
|
|
59812
|
+
if (refsForData !== void 0 && refsForData.has(schema.$ref)) {
|
|
59813
|
+
return validSchemaResponse();
|
|
59814
|
+
}
|
|
59815
|
+
if (refsForData === void 0) {
|
|
59816
|
+
refsForData = /* @__PURE__ */ new Set();
|
|
59817
|
+
visited.set(data, refsForData);
|
|
59818
|
+
}
|
|
59819
|
+
refsForData.add(schema.$ref);
|
|
59751
59820
|
try {
|
|
59752
59821
|
const schemaToValidate = findSchemaAtPath(document, schema.$ref);
|
|
59753
|
-
return
|
|
59822
|
+
return validateJsonSchemaInternal(data, schemaToValidate, path, document, visited);
|
|
59754
59823
|
} catch (e) {
|
|
59755
59824
|
return invalidSchemaResponseWithError(e);
|
|
59825
|
+
} finally {
|
|
59826
|
+
refsForData.delete(schema.$ref);
|
|
59827
|
+
if (refsForData.size === 0) visited.delete(data);
|
|
59756
59828
|
}
|
|
59757
59829
|
}
|
|
59758
59830
|
function validateEnum(data, enumValue, path) {
|
|
@@ -60042,13 +60114,7 @@ class GraphQLImperativeBindingsService {
|
|
|
60042
60114
|
}
|
|
60043
60115
|
return await buildBaseImperativeInvoker(getCommand, (result) => this.transformResult(result, exposeRefresh))(...params);
|
|
60044
60116
|
} catch (error) {
|
|
60045
|
-
|
|
60046
|
-
return {
|
|
60047
|
-
data: void 0,
|
|
60048
|
-
errors: [
|
|
60049
|
-
{ message: "Internal error in GraphQL adapter occurred", locations: [] }
|
|
60050
|
-
]
|
|
60051
|
-
};
|
|
60117
|
+
return toGraphQLErrorResponse(error);
|
|
60052
60118
|
}
|
|
60053
60119
|
};
|
|
60054
60120
|
}
|
|
@@ -60142,8 +60208,8 @@ class GraphQLLegacyImperativeBindingsService {
|
|
|
60142
60208
|
config = result.value;
|
|
60143
60209
|
}
|
|
60144
60210
|
}
|
|
60145
|
-
const command = getCommand({ config, assertIsValid });
|
|
60146
60211
|
try {
|
|
60212
|
+
const command = getCommand({ config, assertIsValid });
|
|
60147
60213
|
const overrides = getOverridesForLegacyRequestContext(requestContext);
|
|
60148
60214
|
const result = await command.execute(overrides);
|
|
60149
60215
|
const consumerEmittedData = {
|
|
@@ -60160,13 +60226,7 @@ class GraphQLLegacyImperativeBindingsService {
|
|
|
60160
60226
|
}
|
|
60161
60227
|
callback(consumerEmittedData);
|
|
60162
60228
|
} catch (error) {
|
|
60163
|
-
|
|
60164
|
-
callback({
|
|
60165
|
-
data: void 0,
|
|
60166
|
-
errors: [
|
|
60167
|
-
{ message: "Internal error in GraphQL adapter occurred", locations: [] }
|
|
60168
|
-
]
|
|
60169
|
-
});
|
|
60229
|
+
callback(toGraphQLErrorResponse(error));
|
|
60170
60230
|
}
|
|
60171
60231
|
};
|
|
60172
60232
|
const subscribe = (config, requestContext, callback) => {
|
|
@@ -60184,35 +60244,41 @@ class GraphQLLegacyImperativeBindingsService {
|
|
|
60184
60244
|
config = result.value;
|
|
60185
60245
|
}
|
|
60186
60246
|
}
|
|
60187
|
-
const command = getCommand({ config, assertIsValid });
|
|
60188
60247
|
let unsubscribe = () => {
|
|
60189
60248
|
};
|
|
60190
|
-
|
|
60191
|
-
|
|
60192
|
-
const
|
|
60193
|
-
|
|
60194
|
-
|
|
60195
|
-
|
|
60196
|
-
|
|
60197
|
-
|
|
60198
|
-
|
|
60199
|
-
|
|
60200
|
-
|
|
60201
|
-
|
|
60202
|
-
|
|
60203
|
-
|
|
60204
|
-
|
|
60205
|
-
|
|
60206
|
-
|
|
60207
|
-
|
|
60208
|
-
|
|
60209
|
-
|
|
60210
|
-
|
|
60211
|
-
|
|
60212
|
-
|
|
60213
|
-
|
|
60214
|
-
|
|
60215
|
-
|
|
60249
|
+
try {
|
|
60250
|
+
const command = getCommand({ config, assertIsValid });
|
|
60251
|
+
const overrides = getOverridesForLegacyRequestContext(requestContext);
|
|
60252
|
+
command.execute(overrides).then((result) => {
|
|
60253
|
+
const consumerEmittedData = {
|
|
60254
|
+
data: void 0,
|
|
60255
|
+
errors: void 0
|
|
60256
|
+
};
|
|
60257
|
+
if (result.isOk()) {
|
|
60258
|
+
deepFreeze(result.value);
|
|
60259
|
+
consumerEmittedData.data = result.value.data.data;
|
|
60260
|
+
unsubscribe = result.value.subscribe(
|
|
60261
|
+
(res) => {
|
|
60262
|
+
handleEmit(res, callback);
|
|
60263
|
+
}
|
|
60264
|
+
);
|
|
60265
|
+
} else {
|
|
60266
|
+
const { data, errors } = toGraphQLResponseFromFailure$1(
|
|
60267
|
+
result.error.failure
|
|
60268
|
+
);
|
|
60269
|
+
consumerEmittedData.data = data;
|
|
60270
|
+
consumerEmittedData.errors = errors;
|
|
60271
|
+
unsubscribe = result.error.subscribe(
|
|
60272
|
+
(res) => {
|
|
60273
|
+
handleEmit(res, callback);
|
|
60274
|
+
}
|
|
60275
|
+
);
|
|
60276
|
+
}
|
|
60277
|
+
callback(consumerEmittedData);
|
|
60278
|
+
});
|
|
60279
|
+
} catch (error) {
|
|
60280
|
+
callback(toGraphQLErrorResponse(error));
|
|
60281
|
+
}
|
|
60216
60282
|
return () => {
|
|
60217
60283
|
unsubscribe();
|
|
60218
60284
|
};
|
|
@@ -60255,13 +60321,7 @@ class GraphQLMutationBindingsService {
|
|
|
60255
60321
|
return toGraphQLResponseFromFailure$1(result.error.failure);
|
|
60256
60322
|
}
|
|
60257
60323
|
} catch (error) {
|
|
60258
|
-
|
|
60259
|
-
return {
|
|
60260
|
-
data: void 0,
|
|
60261
|
-
errors: [
|
|
60262
|
-
{ message: "Internal error in GraphQL adapter occurred", locations: [] }
|
|
60263
|
-
]
|
|
60264
|
-
};
|
|
60324
|
+
return toGraphQLErrorResponse(error);
|
|
60265
60325
|
}
|
|
60266
60326
|
};
|
|
60267
60327
|
}
|
|
@@ -60421,6 +60481,10 @@ class CommandWireAdapterConstructor {
|
|
|
60421
60481
|
if (isIncompleteConfigError(err)) {
|
|
60422
60482
|
return;
|
|
60423
60483
|
}
|
|
60484
|
+
if (err instanceof JsonSchemaViolationError) {
|
|
60485
|
+
this.handleConfigSchemaViolation(err);
|
|
60486
|
+
return;
|
|
60487
|
+
}
|
|
60424
60488
|
throw err;
|
|
60425
60489
|
}
|
|
60426
60490
|
}
|
|
@@ -60473,6 +60537,16 @@ class CommandWireAdapterConstructor {
|
|
|
60473
60537
|
handleExecutionThrow(error) {
|
|
60474
60538
|
emitError(this.callback, error);
|
|
60475
60539
|
}
|
|
60540
|
+
/**
|
|
60541
|
+
* Hook for subclasses to handle a JsonSchemaViolationError from the config
|
|
60542
|
+
* schema assertion. The default re-throws so legacy non-GraphQL wire
|
|
60543
|
+
* adapters keep their existing throw behavior. Overrides are expected to
|
|
60544
|
+
* either emit an error result or re-throw — silently returning will
|
|
60545
|
+
* swallow the error.
|
|
60546
|
+
*/
|
|
60547
|
+
handleConfigSchemaViolation(error) {
|
|
60548
|
+
throw error;
|
|
60549
|
+
}
|
|
60476
60550
|
unsubscribe() {
|
|
60477
60551
|
if (this.unsubscriber) {
|
|
60478
60552
|
this.unsubscriber();
|
|
@@ -60565,16 +60639,14 @@ class GraphQLCommandWireAdapterConstructor extends CommandWireAdapterConstructor
|
|
|
60565
60639
|
this.callback(consumerEmittedData);
|
|
60566
60640
|
}
|
|
60567
60641
|
} catch (e) {
|
|
60568
|
-
logError$1(e);
|
|
60569
60642
|
this.handleExecutionThrow(e);
|
|
60570
60643
|
}
|
|
60571
60644
|
}
|
|
60572
|
-
handleExecutionThrow(
|
|
60573
|
-
|
|
60574
|
-
|
|
60575
|
-
|
|
60576
|
-
|
|
60577
|
-
});
|
|
60645
|
+
handleExecutionThrow(error) {
|
|
60646
|
+
this.callback(toGraphQLErrorResponse(error));
|
|
60647
|
+
}
|
|
60648
|
+
handleConfigSchemaViolation(error) {
|
|
60649
|
+
this.handleExecutionThrow(error);
|
|
60578
60650
|
}
|
|
60579
60651
|
update(config, _context) {
|
|
60580
60652
|
this.unsubscribe();
|
|
@@ -61226,9 +61298,11 @@ class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
|
|
|
61226
61298
|
return entries.length > 0 ? this.store.setEntries(entries) : Promise.resolve();
|
|
61227
61299
|
}
|
|
61228
61300
|
find(_query) {
|
|
61301
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
61229
61302
|
throw new Error('find not supported on the NimbusDurableCacheInclusionPolicy');
|
|
61230
61303
|
}
|
|
61231
61304
|
findAndModify(_query, _cacheUpdate) {
|
|
61305
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
61232
61306
|
throw new Error('findAndModify not supported on the NimbusDurableCacheInclusionPolicy');
|
|
61233
61307
|
}
|
|
61234
61308
|
registerListener() {
|
|
@@ -61254,7 +61328,7 @@ class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
|
|
|
61254
61328
|
});
|
|
61255
61329
|
});
|
|
61256
61330
|
}
|
|
61257
|
-
// TODO: onestore doesnt support cache eviction yet
|
|
61331
|
+
// TODO [W-19368859]: onestore doesnt support cache eviction yet
|
|
61258
61332
|
// if (evictKeys.size > 0) {
|
|
61259
61333
|
// evictKeys.forEach((key) => {
|
|
61260
61334
|
// this.services.cache.evict(key);
|
|
@@ -61349,6 +61423,7 @@ class NimbusSqliteOneStoreCache {
|
|
|
61349
61423
|
batchQuery(operations) {
|
|
61350
61424
|
return new Promise((resolve, reject) => {
|
|
61351
61425
|
this.sqlStore.batchOperations(operations, (error) => {
|
|
61426
|
+
// eslint-disable-next-line no-unused-expressions
|
|
61352
61427
|
error ? reject(error) : resolve();
|
|
61353
61428
|
});
|
|
61354
61429
|
});
|
|
@@ -61424,7 +61499,7 @@ function initializeOneStore(sqliteStore, luvio) {
|
|
|
61424
61499
|
buildServiceDescriptor$7(),
|
|
61425
61500
|
buildServiceDescriptor$1$1(),
|
|
61426
61501
|
buildServiceDescriptor$2(),
|
|
61427
|
-
// TODO[
|
|
61502
|
+
// TODO [W-18753648]: See note above.
|
|
61428
61503
|
// buildStreamingCommandServiceDescriptor(),
|
|
61429
61504
|
// buildNdJsonServiceDescriptor(),
|
|
61430
61505
|
// buildSseCommandServiceDescriptor(),
|
|
@@ -61686,4 +61761,4 @@ register({
|
|
|
61686
61761
|
});
|
|
61687
61762
|
|
|
61688
61763
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
|
|
61689
|
-
// version: 1.
|
|
61764
|
+
// version: 1.435.0-5818ce3c48
|
|
@@ -31,7 +31,6 @@ export interface RecordFieldTrie {
|
|
|
31
31
|
}
|
|
32
32
|
export interface TrackedFieldsConfig {
|
|
33
33
|
maxDepth: number;
|
|
34
|
-
onlyFetchLeafNodeIdAndName: boolean;
|
|
35
34
|
}
|
|
36
35
|
export declare function isGraphNode(node: ProxyGraphNode<unknown>): node is GraphNode<unknown>;
|
|
37
36
|
export declare function extractTrackedFieldsToTrie(recordId: string | NormalizedKeyMetadata, node: ProxyGraphNode<FieldMapRepresentationNormalized, FieldMapRepresentation>, root: RecordFieldTrie): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AbstractResourceRequestActionHandler } from '../AbstractResourceRequestActionHandler';
|
|
2
|
-
import { QuickActionExecutionRepresentation } from '@salesforce/lds-adapters-uiapi';
|
|
3
|
-
import { NetworkAdapter, ResourceRequest } from '@luvio/engine';
|
|
4
|
-
import { DraftAction, DraftQueue, PendingDraftAction } from '@salesforce/lds-drafts';
|
|
5
|
-
import { Luvio } from '@luvio/engine';
|
|
6
|
-
import { UiApiDraftRecordService } from '../UiApiDraftRecordService';
|
|
2
|
+
import type { QuickActionExecutionRepresentation } from '@salesforce/lds-adapters-uiapi';
|
|
3
|
+
import type { NetworkAdapter, ResourceRequest } from '@luvio/engine';
|
|
4
|
+
import type { DraftAction, DraftQueue, PendingDraftAction } from '@salesforce/lds-drafts';
|
|
5
|
+
import type { Luvio } from '@luvio/engine';
|
|
6
|
+
import type { UiApiDraftRecordService } from '../UiApiDraftRecordService';
|
|
7
7
|
export declare abstract class AbstractQuickActionHandler extends AbstractResourceRequestActionHandler<QuickActionExecutionRepresentation> {
|
|
8
8
|
constructor(draftQueue: DraftQueue, networkAdapter: NetworkAdapter, getLuvio: () => Luvio, recordService: UiApiDraftRecordService);
|
|
9
9
|
buildPendingAction(request: ResourceRequest, queue: DraftAction<unknown, unknown>[]): Promise<PendingDraftAction<ResourceRequest>>;
|