@salesforce/lds-runtime-mobile 1.432.0 → 1.434.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 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
 
@@ -7729,7 +7729,6 @@ function prepareRequest$5(luvio, config) {
7729
7729
  const key = keyBuilder$1M(luvio, createResourceParams$g(config));
7730
7730
  const allTrackedFields = getTrackedFields(key, luvio.getNode(key), {
7731
7731
  maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
7732
- onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
7733
7732
  }, config.optionalFields);
7734
7733
  const optionalFields = fields === undefined ? allTrackedFields : difference(allTrackedFields, fields);
7735
7734
  const resourceParams = createResourceParams$g({
@@ -7856,7 +7855,6 @@ function ingestSuccessChildResourceParams$2(luvio, childResourceParamsArray, chi
7856
7855
  };
7857
7856
  const childTrackedFields = getTrackedFields(childKey, luvio.getNode(childKey), {
7858
7857
  maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
7859
- onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
7860
7858
  }, childResourceParams.queryParams.optionalFields);
7861
7859
  const childSnapshot = ingestSuccess$8(luvio, {
7862
7860
  recordId: childResourceParams.urlParams.recordId,
@@ -16191,7 +16189,6 @@ function buildNetworkSnapshot$c(luvio, config, options) {
16191
16189
  const key = keyBuilder$1w(luvio, config);
16192
16190
  const trackedFieldsConfig = {
16193
16191
  maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
16194
- onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
16195
16192
  };
16196
16193
  const optionalFieldsTrie = convertFieldsToTrie(getTrackedFields(key, luvio.getNode(key), trackedFieldsConfig, config.optionalFields));
16197
16194
  const fieldsTrie = BLANK_RECORD_FIELDS_TRIE;
@@ -22521,7 +22518,6 @@ const buildNetworkSnapshot$3 = (luvio, context, config, options) => {
22521
22518
  ...resourceRequest.queryParams,
22522
22519
  optionalFields: getTrackedFields(templateRecordKey, luvio.getNode(templateRecordKey), {
22523
22520
  maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
22524
- onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
22525
22521
  }, config.optionalFields),
22526
22522
  },
22527
22523
  });
@@ -23221,7 +23217,6 @@ function prepareRequest(luvio, context, config) {
23221
23217
  ...resourceRequest.queryParams,
23222
23218
  optionalFields: getTrackedFields(recordTemplateKey, luvio.getNode(recordTemplateKey), {
23223
23219
  maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
23224
- onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
23225
23220
  }, config.optionalFields),
23226
23221
  },
23227
23222
  });
@@ -23241,7 +23236,6 @@ function onFetchResponseSuccess$2(luvio, context, config, request, response, res
23241
23236
  });
23242
23237
  const allTrackedFields = getTrackedFields(templateRecordKey, luvio.getNode(templateRecordKey), {
23243
23238
  maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
23244
- onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
23245
23239
  }, optionalFields);
23246
23240
  const allTrackedFieldsTrie = convertFieldsToTrie(allTrackedFields, true);
23247
23241
  const ingest = createFieldsIngestSuccess({
@@ -43083,6 +43077,7 @@ class AbstractQuickActionHandler extends AbstractResourceRequestActionHandler {
43083
43077
  }
43084
43078
  async buildPendingAction(request, queue) {
43085
43079
  this.resolveResourceRequestBody(request.body);
43080
+ // eslint-disable-next-line no-return-await
43086
43081
  return await super.buildPendingAction(request, queue);
43087
43082
  }
43088
43083
  resolveResourceRequestBody(body) {
@@ -43517,8 +43512,6 @@ function isCreateContentDocumentAndVersionDraftAdapterEvent(customEvent) {
43517
43512
  return customEvent.namespace === CONTENT_DOCUMENT_AND_VERSION_NAMESPACE;
43518
43513
  }
43519
43514
 
43520
- // so eslint doesn't complain about nimbus
43521
- /* global __nimbus */
43522
43515
  function chunkToBase64(chunk) {
43523
43516
  const bytes = new Uint8Array(chunk);
43524
43517
  const CHUNK_SIZE = 64 * 1024; // 64kb, any bigger and fromCharCode() can error out with an overflow.
@@ -49603,6 +49596,7 @@ function isPolymorphicFieldPath(path, pathToObjectApiNamesMap, objectInfos) {
49603
49596
  const parentObjectInfo = objectInfos[parentObjectApiNames[0]];
49604
49597
  // this should not be undefined, but lets catch it if we do end up in that state.
49605
49598
  if (parentObjectInfo === undefined) {
49599
+ // eslint-disable-next-line @salesforce/lds/no-error-in-production
49606
49600
  throw new Error(`ObjectInfo is missing for ${parentObjectApiNames[0]} for ${parentApiPath}`);
49607
49601
  }
49608
49602
  const relationshipField = referenceIdFieldForRelationship(lastSegment);
@@ -50975,6 +50969,7 @@ function checkForEmptyData(gqlResult) {
50975
50969
  }
50976
50970
  const query = data.uiapi.query;
50977
50971
  // Check all entity types in the query for edges - using for...in to avoid array allocation
50972
+ // eslint-disable-next-line guard-for-in
50978
50973
  for (const entityType in query) {
50979
50974
  const entity = query[entityType];
50980
50975
  if (entity && entity.edges && isArray$3(entity.edges) && entity.edges.length > 0) {
@@ -52486,6 +52481,7 @@ function extractApiNameFromConfig(adapterName, config, completedNetworkRequests)
52486
52481
  case 'getRecord':
52487
52482
  // getRecord config has fields/optionalFields like "Account.Name"
52488
52483
  // Extract apiName from first field in config
52484
+ // eslint-disable-next-line no-case-declarations
52489
52485
  const objectName = extractObjectNameFromFields(parsedConfig);
52490
52486
  if (objectName) {
52491
52487
  apiName = objectName;
@@ -53023,7 +53019,9 @@ class NimbusSqliteStore {
53023
53019
  }
53024
53020
  instrumentation$2.trackValue(GRAPHQL_QUERY_ROOT_METRIC_NAME, row[1].length);
53025
53021
  }
53026
- catch { }
53022
+ catch {
53023
+ // intentionally do nothing
53024
+ }
53027
53025
  }
53028
53026
  }
53029
53027
 
@@ -53732,6 +53730,7 @@ class PrimingSession extends EventEmitter {
53732
53730
  const userData = {
53733
53731
  ...stats,
53734
53732
  };
53733
+ // eslint-disable-next-line guard-for-in
53735
53734
  for (const error in errors) {
53736
53735
  activity.error(error);
53737
53736
  }
@@ -53912,6 +53911,7 @@ class PrimingSession extends EventEmitter {
53912
53911
  let limitedResult = this.applyRetryLimits(result.additionalWork);
53913
53912
  this.enqueue(limitedResult.additionalWork);
53914
53913
  if (limitedResult.recordsNeedingRefetch.size > 0) {
53914
+ // eslint-disable-next-line guard-for-in
53915
53915
  for (const key in keys$3(limitedResult.recordsNeedingRefetch)) {
53916
53916
  const value = limitedResult.recordsNeedingRefetch.get(key);
53917
53917
  if (result.recordsNeedingRefetch.has(key)) {
@@ -56198,6 +56198,7 @@ class DurableRecordStore {
56198
56198
  async exists(key) {
56199
56199
  const result = await this.durableStore.query('SELECT EXISTS(SELECT 1 FROM lds_data WHERE key = ?)', [key]);
56200
56200
  const exists = result.rows[0][0];
56201
+ // eslint-disable-next-line eqeqeq
56201
56202
  return exists == true;
56202
56203
  }
56203
56204
  async getRecord(key) {
@@ -56412,7 +56413,7 @@ var CounterResult;
56412
56413
  CounterResult["Error"] = "Error";
56413
56414
  })(CounterResult || (CounterResult = {}));
56414
56415
  function incrementCounter(name, result) {
56415
- instrumentation.incrementCounter('SFSSideEffect', 1, result == CounterResult.Error, {
56416
+ instrumentation.incrementCounter('SFSSideEffect', 1, result === CounterResult.Error, {
56416
56417
  Name: name,
56417
56418
  Result: result,
56418
56419
  });
@@ -56825,16 +56826,17 @@ class AuraNetworkCommand extends NetworkCommand$1 {
56825
56826
  }
56826
56827
  return ok$1(auraReturnValue);
56827
56828
  }).catch((error) => {
56828
- if (!error || !error.getError) {
56829
+ if (!error) {
56829
56830
  return err$1(toError("Failed to get error from response"));
56830
- } else {
56831
- const actionErrors = error.getError();
56832
- if (actionErrors.length > 0) {
56833
- return err$1(coerceError(actionErrors));
56834
- } else {
56835
- return err$1(toError("Error fetching component"));
56836
- }
56837
56831
  }
56832
+ if (!error.getError) {
56833
+ return err$1(toError(error));
56834
+ }
56835
+ const actionErrors = error.getError();
56836
+ if (actionErrors.length > 0) {
56837
+ return err$1(coerceError(actionErrors));
56838
+ }
56839
+ return err$1(toError("Error fetching component"));
56838
56840
  });
56839
56841
  }
56840
56842
  convertFetchResponseToData(response) {
@@ -57517,16 +57519,17 @@ let AuraCacheControlCommand$1 = class AuraCacheControlCommand extends CacheContr
57517
57519
  } catch {
57518
57520
  }
57519
57521
  }).catch((error) => {
57520
- if (!error || !error.getError) {
57522
+ if (!error) {
57521
57523
  return err$1(toError("Failed to get error from response"));
57522
- } else {
57523
- const actionErrors = error.getError();
57524
- if (actionErrors.length > 0) {
57525
- return err$1(coerceError(actionErrors));
57526
- } else {
57527
- return err$1(toError("Error fetching component"));
57528
- }
57529
57524
  }
57525
+ if (!error.getError) {
57526
+ return err$1(toError(error));
57527
+ }
57528
+ const actionErrors = error.getError();
57529
+ if (actionErrors.length > 0) {
57530
+ return err$1(coerceError(actionErrors));
57531
+ }
57532
+ return err$1(toError("Error fetching component"));
57530
57533
  });
57531
57534
  }
57532
57535
  convertFetchResponseToData(response) {
@@ -57661,16 +57664,17 @@ class AuraCacheControlCommand extends CacheControlCommand {
57661
57664
  } catch {
57662
57665
  }
57663
57666
  }).catch((error) => {
57664
- if (!error || !error.getError) {
57667
+ if (!error) {
57665
57668
  return err$1(toError("Failed to get error from response"));
57666
- } else {
57667
- const actionErrors = error.getError();
57668
- if (actionErrors.length > 0) {
57669
- return err$1(coerceError(actionErrors));
57670
- } else {
57671
- return err$1(toError("Error fetching component"));
57672
- }
57673
57669
  }
57670
+ if (!error.getError) {
57671
+ return err$1(toError(error));
57672
+ }
57673
+ const actionErrors = error.getError();
57674
+ if (actionErrors.length > 0) {
57675
+ return err$1(coerceError(actionErrors));
57676
+ }
57677
+ return err$1(toError("Error fetching component"));
57674
57678
  });
57675
57679
  }
57676
57680
  convertFetchResponseToData(response) {
@@ -58997,7 +59001,7 @@ function buildServiceDescriptor$b(luvio) {
58997
59001
  },
58998
59002
  };
58999
59003
  }
59000
- // version: 1.432.0-b99ba9d219
59004
+ // version: 1.434.0-6aa2dd15e3
59001
59005
 
59002
59006
  /**
59003
59007
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -59023,7 +59027,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
59023
59027
  },
59024
59028
  };
59025
59029
  }
59026
- // version: 1.432.0-b99ba9d219
59030
+ // version: 1.434.0-6aa2dd15e3
59027
59031
 
59028
59032
  /*!
59029
59033
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -60039,13 +60043,7 @@ class GraphQLImperativeBindingsService {
60039
60043
  }
60040
60044
  return await buildBaseImperativeInvoker(getCommand, (result) => this.transformResult(result, exposeRefresh))(...params);
60041
60045
  } catch (error) {
60042
- logError$1(error);
60043
- return {
60044
- data: void 0,
60045
- errors: [
60046
- { message: "Internal error in GraphQL adapter occurred", locations: [] }
60047
- ]
60048
- };
60046
+ return toGraphQLErrorResponse(error);
60049
60047
  }
60050
60048
  };
60051
60049
  }
@@ -60139,8 +60137,8 @@ class GraphQLLegacyImperativeBindingsService {
60139
60137
  config = result.value;
60140
60138
  }
60141
60139
  }
60142
- const command = getCommand({ config, assertIsValid });
60143
60140
  try {
60141
+ const command = getCommand({ config, assertIsValid });
60144
60142
  const overrides = getOverridesForLegacyRequestContext(requestContext);
60145
60143
  const result = await command.execute(overrides);
60146
60144
  const consumerEmittedData = {
@@ -60157,13 +60155,7 @@ class GraphQLLegacyImperativeBindingsService {
60157
60155
  }
60158
60156
  callback(consumerEmittedData);
60159
60157
  } catch (error) {
60160
- logError$1(error);
60161
- callback({
60162
- data: void 0,
60163
- errors: [
60164
- { message: "Internal error in GraphQL adapter occurred", locations: [] }
60165
- ]
60166
- });
60158
+ callback(toGraphQLErrorResponse(error));
60167
60159
  }
60168
60160
  };
60169
60161
  const subscribe = (config, requestContext, callback) => {
@@ -60181,35 +60173,41 @@ class GraphQLLegacyImperativeBindingsService {
60181
60173
  config = result.value;
60182
60174
  }
60183
60175
  }
60184
- const command = getCommand({ config, assertIsValid });
60185
60176
  let unsubscribe = () => {
60186
60177
  };
60187
- const overrides = getOverridesForLegacyRequestContext(requestContext);
60188
- command.execute(overrides).then((result) => {
60189
- const consumerEmittedData = {
60190
- data: void 0,
60191
- errors: void 0
60192
- };
60193
- if (result.isOk()) {
60194
- deepFreeze(result.value);
60195
- consumerEmittedData.data = result.value.data.data;
60196
- unsubscribe = result.value.subscribe(
60197
- (res) => {
60198
- handleEmit(res, callback);
60199
- }
60200
- );
60201
- } else {
60202
- const { data, errors } = toGraphQLResponseFromFailure$1(result.error.failure);
60203
- consumerEmittedData.data = data;
60204
- consumerEmittedData.errors = errors;
60205
- unsubscribe = result.error.subscribe(
60206
- (res) => {
60207
- handleEmit(res, callback);
60208
- }
60209
- );
60210
- }
60211
- callback(consumerEmittedData);
60212
- });
60178
+ try {
60179
+ const command = getCommand({ config, assertIsValid });
60180
+ const overrides = getOverridesForLegacyRequestContext(requestContext);
60181
+ command.execute(overrides).then((result) => {
60182
+ const consumerEmittedData = {
60183
+ data: void 0,
60184
+ errors: void 0
60185
+ };
60186
+ if (result.isOk()) {
60187
+ deepFreeze(result.value);
60188
+ consumerEmittedData.data = result.value.data.data;
60189
+ unsubscribe = result.value.subscribe(
60190
+ (res) => {
60191
+ handleEmit(res, callback);
60192
+ }
60193
+ );
60194
+ } else {
60195
+ const { data, errors } = toGraphQLResponseFromFailure$1(
60196
+ result.error.failure
60197
+ );
60198
+ consumerEmittedData.data = data;
60199
+ consumerEmittedData.errors = errors;
60200
+ unsubscribe = result.error.subscribe(
60201
+ (res) => {
60202
+ handleEmit(res, callback);
60203
+ }
60204
+ );
60205
+ }
60206
+ callback(consumerEmittedData);
60207
+ });
60208
+ } catch (error) {
60209
+ callback(toGraphQLErrorResponse(error));
60210
+ }
60213
60211
  return () => {
60214
60212
  unsubscribe();
60215
60213
  };
@@ -60252,13 +60250,7 @@ class GraphQLMutationBindingsService {
60252
60250
  return toGraphQLResponseFromFailure$1(result.error.failure);
60253
60251
  }
60254
60252
  } catch (error) {
60255
- logError$1(error);
60256
- return {
60257
- data: void 0,
60258
- errors: [
60259
- { message: "Internal error in GraphQL adapter occurred", locations: [] }
60260
- ]
60261
- };
60253
+ return toGraphQLErrorResponse(error);
60262
60254
  }
60263
60255
  };
60264
60256
  }
@@ -60418,6 +60410,10 @@ class CommandWireAdapterConstructor {
60418
60410
  if (isIncompleteConfigError(err)) {
60419
60411
  return;
60420
60412
  }
60413
+ if (err instanceof JsonSchemaViolationError) {
60414
+ this.handleConfigSchemaViolation(err);
60415
+ return;
60416
+ }
60421
60417
  throw err;
60422
60418
  }
60423
60419
  }
@@ -60470,6 +60466,16 @@ class CommandWireAdapterConstructor {
60470
60466
  handleExecutionThrow(error) {
60471
60467
  emitError(this.callback, error);
60472
60468
  }
60469
+ /**
60470
+ * Hook for subclasses to handle a JsonSchemaViolationError from the config
60471
+ * schema assertion. The default re-throws so legacy non-GraphQL wire
60472
+ * adapters keep their existing throw behavior. Overrides are expected to
60473
+ * either emit an error result or re-throw — silently returning will
60474
+ * swallow the error.
60475
+ */
60476
+ handleConfigSchemaViolation(error) {
60477
+ throw error;
60478
+ }
60473
60479
  unsubscribe() {
60474
60480
  if (this.unsubscriber) {
60475
60481
  this.unsubscriber();
@@ -60562,16 +60568,14 @@ class GraphQLCommandWireAdapterConstructor extends CommandWireAdapterConstructor
60562
60568
  this.callback(consumerEmittedData);
60563
60569
  }
60564
60570
  } catch (e) {
60565
- logError$1(e);
60566
60571
  this.handleExecutionThrow(e);
60567
60572
  }
60568
60573
  }
60569
- handleExecutionThrow(e) {
60570
- logError$1(e);
60571
- this.callback({
60572
- data: void 0,
60573
- errors: [{ message: "Internal error in GraphQL adapter occurred", locations: [] }]
60574
- });
60574
+ handleExecutionThrow(error) {
60575
+ this.callback(toGraphQLErrorResponse(error));
60576
+ }
60577
+ handleConfigSchemaViolation(error) {
60578
+ this.handleExecutionThrow(error);
60575
60579
  }
60576
60580
  update(config, _context) {
60577
60581
  this.unsubscribe();
@@ -61223,9 +61227,11 @@ class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
61223
61227
  return entries.length > 0 ? this.store.setEntries(entries) : Promise.resolve();
61224
61228
  }
61225
61229
  find(_query) {
61230
+ // eslint-disable-next-line @salesforce/lds/no-error-in-production
61226
61231
  throw new Error('find not supported on the NimbusDurableCacheInclusionPolicy');
61227
61232
  }
61228
61233
  findAndModify(_query, _cacheUpdate) {
61234
+ // eslint-disable-next-line @salesforce/lds/no-error-in-production
61229
61235
  throw new Error('findAndModify not supported on the NimbusDurableCacheInclusionPolicy');
61230
61236
  }
61231
61237
  registerListener() {
@@ -61251,7 +61257,7 @@ class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
61251
61257
  });
61252
61258
  });
61253
61259
  }
61254
- // TODO: onestore doesnt support cache eviction yet
61260
+ // TODO [W-19368859]: onestore doesnt support cache eviction yet
61255
61261
  // if (evictKeys.size > 0) {
61256
61262
  // evictKeys.forEach((key) => {
61257
61263
  // this.services.cache.evict(key);
@@ -61346,6 +61352,7 @@ class NimbusSqliteOneStoreCache {
61346
61352
  batchQuery(operations) {
61347
61353
  return new Promise((resolve, reject) => {
61348
61354
  this.sqlStore.batchOperations(operations, (error) => {
61355
+ // eslint-disable-next-line no-unused-expressions
61349
61356
  error ? reject(error) : resolve();
61350
61357
  });
61351
61358
  });
@@ -61421,7 +61428,7 @@ function initializeOneStore(sqliteStore, luvio) {
61421
61428
  buildServiceDescriptor$7(),
61422
61429
  buildServiceDescriptor$1$1(),
61423
61430
  buildServiceDescriptor$2(),
61424
- // TODO[@W-18753648]: See note above.
61431
+ // TODO [W-18753648]: See note above.
61425
61432
  // buildStreamingCommandServiceDescriptor(),
61426
61433
  // buildNdJsonServiceDescriptor(),
61427
61434
  // buildSseCommandServiceDescriptor(),
@@ -61683,4 +61690,4 @@ register({
61683
61690
  });
61684
61691
 
61685
61692
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
61686
- // version: 1.432.0-a57c62b660
61693
+ // version: 1.434.0-d8deb0d4ea
@@ -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>>;
@@ -1,13 +1,12 @@
1
1
  import type { CompletedDraftAction, QueueOperation, DraftAction, DraftQueue } from '@salesforce/lds-drafts';
2
2
  import { AbstractQuickActionHandler } from './AbstractQuickActionHandler';
3
- import type { PerformActionInputRepresentation, QuickActionExecutionRepresentation, RecordRepresentation } from '@salesforce/lds-adapters-uiapi';
4
- import { GetRecordConfig } from '@salesforce/lds-adapters-uiapi';
3
+ import type { PerformActionInputRepresentation, QuickActionExecutionRepresentation, RecordRepresentation, GetRecordConfig } from '@salesforce/lds-adapters-uiapi';
5
4
  import type { DurableStoreKeyMetadataMap, Luvio, NetworkAdapter, ResourceRequest, Adapter } from '@luvio/engine';
6
5
  import type { UiApiDraftRecordService } from '../UiApiDraftRecordService';
7
6
  import type { RecordEffectingHandler } from '../records/actionHandlers/RecordEffectingHandler';
8
7
  import { type SideEffectService } from '../sideEffects/SideEffectService';
9
8
  import { type SideEffect } from '../sideEffects';
10
- import { ObjectInfoService } from './../../utils/ObjectInfoService';
9
+ import type { ObjectInfoService } from './../../utils/ObjectInfoService';
11
10
  export declare const QUICK_ACTION_HANDLER = "QUICK_ACTION_HANDLER";
12
11
  interface PerformQuickActionResourceRequest extends Omit<ResourceRequest, 'body' | 'method'> {
13
12
  body: PerformActionInputRepresentation;
@@ -1,7 +1,7 @@
1
1
  import type { DraftAwareUpdateRecordAdapter } from '@salesforce/lds-adapters-uiapi';
2
2
  import type { UiApiActionHandler } from '../actionHandlers/UiApiRecordActionHandler';
3
3
  import type { DurableRecordStore } from 'src/durableStore/DurableRecordStore';
4
- import { ObjectInfoService } from '../../../utils/ObjectInfoService';
4
+ import type { ObjectInfoService } from '../../../utils/ObjectInfoService';
5
5
  /**
6
6
  * @param luvio The runtime's luvio instance
7
7
  * @param actionHandler The UIAPI Record action handler. NOTE: this adapter doesn't
@@ -1,5 +1,5 @@
1
- import { SqliteStorePlugin } from '@salesforce/nimbus-plugin-lds';
2
- import { Luvio } from '@luvio/engine';
1
+ import type { SqliteStorePlugin } from '@salesforce/nimbus-plugin-lds';
2
+ import type { Luvio } from '@luvio/engine';
3
3
  export declare function initializeOneStore(sqliteStore: SqliteStorePlugin, luvio: Luvio): void;
4
4
  /**
5
5
  * Manually purges the OneStore cache by days.
@@ -1,7 +1,7 @@
1
1
  import { type CacheInclusionPolicyServiceDescriptor, type CacheQuery, type CacheUpdate, DurableCacheInclusionPolicy } from '@conduit-client/service-cache-inclusion-policy/v1';
2
2
  import type { Cache, CacheEntry, Key, NamedCacheService } from '@conduit-client/service-cache/v1';
3
3
  import { type DeepReadonly, type SyncOrAsync } from '@conduit-client/utils';
4
- import { NimbusSqliteOneStoreCache } from './nimbusSqliteStoreCache';
4
+ import type { NimbusSqliteOneStoreCache } from './nimbusSqliteStoreCache';
5
5
  export declare class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
6
6
  private readonly services;
7
7
  private readonly store;
@@ -1,3 +1,3 @@
1
- import { IFetchService } from '@conduit-client/service-fetch-network/v1';
1
+ import type { IFetchService } from '@conduit-client/service-fetch-network/v1';
2
2
  import { type ServiceDescriptor } from '@conduit-client/utils';
3
3
  export declare function buildNimbusFetchServiceDescriptor(): ServiceDescriptor<IFetchService, 'fetch', '1.0'>;
@@ -1,6 +1,6 @@
1
- import { SideEffect } from '../drafts/sideEffects';
1
+ import type { SideEffect } from '../drafts/sideEffects';
2
2
  import type { CreateSideEffectHook, DeleteSideEffectHook, UpdateSideEffectHook } from '../drafts/records/actionHandlers/SideEffectHook';
3
- import { DurableRecordStore } from '../durableStore/DurableRecordStore';
3
+ import type { DurableRecordStore } from '../durableStore/DurableRecordStore';
4
4
  export declare const instrumentation: any;
5
5
  export declare class ProductConsumedCreatedHook implements CreateSideEffectHook {
6
6
  on: 'post';
@@ -1,3 +1,3 @@
1
- import { DurableRecordStore } from '../durableStore/DurableRecordStore';
1
+ import type { DurableRecordStore } from '../durableStore/DurableRecordStore';
2
2
  import type { SideEffectHook } from '../drafts/records/actionHandlers/SideEffectHook';
3
3
  export declare function createSfsSideEffectHooks(durableRecordStore: DurableRecordStore): SideEffectHook[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-mobile",
3
- "version": "1.432.0",
3
+ "version": "1.434.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS runtime for mobile/hybrid environments.",
6
6
  "main": "dist/main.js",
@@ -32,44 +32,44 @@
32
32
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
33
33
  },
34
34
  "dependencies": {
35
- "@conduit-client/service-bindings-imperative": "3.19.2",
36
- "@conduit-client/service-bindings-lwc": "3.19.2",
37
- "@conduit-client/service-provisioner": "3.19.2",
38
- "@salesforce/lds-adapters-uiapi": "^1.432.0",
39
- "@salesforce/lds-bindings": "^1.432.0",
40
- "@salesforce/lds-instrumentation": "^1.432.0",
41
- "@salesforce/lds-luvio-service": "^1.432.0",
42
- "@salesforce/lds-luvio-uiapi-records-service": "^1.432.0",
35
+ "@conduit-client/service-bindings-imperative": "3.19.4",
36
+ "@conduit-client/service-bindings-lwc": "3.19.4",
37
+ "@conduit-client/service-provisioner": "3.19.4",
38
+ "@salesforce/lds-adapters-uiapi": "^1.434.0",
39
+ "@salesforce/lds-bindings": "^1.434.0",
40
+ "@salesforce/lds-instrumentation": "^1.434.0",
41
+ "@salesforce/lds-luvio-service": "^1.434.0",
42
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.434.0",
43
43
  "@salesforce/user": "0.0.21",
44
44
  "o11y": "250.7.0",
45
45
  "o11y_schema": "256.126.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@conduit-client/command-aura-network": "3.19.2",
49
- "@conduit-client/command-aura-normalized-cache-control": "3.19.2",
50
- "@conduit-client/command-aura-resource-cache-control": "3.19.2",
51
- "@conduit-client/command-fetch-network": "3.19.2",
52
- "@conduit-client/command-http-normalized-cache-control": "3.19.2",
53
- "@conduit-client/command-network": "3.19.2",
54
- "@conduit-client/service-cache": "3.19.2",
55
- "@conduit-client/service-cache-control": "3.19.2",
56
- "@conduit-client/service-cache-inclusion-policy": "3.19.2",
57
- "@conduit-client/service-fetch-network": "3.19.2",
58
- "@conduit-client/service-instrument-command": "3.19.2",
59
- "@conduit-client/service-instrumentation": "3.19.2",
60
- "@conduit-client/service-pubsub": "3.19.2",
61
- "@conduit-client/service-store": "3.19.2",
62
- "@conduit-client/utils": "3.19.2",
63
- "@salesforce/lds-adapters-graphql": "^1.432.0",
64
- "@salesforce/lds-drafts": "^1.432.0",
65
- "@salesforce/lds-durable-records": "^1.432.0",
66
- "@salesforce/lds-network-adapter": "^1.432.0",
67
- "@salesforce/lds-network-nimbus": "^1.432.0",
68
- "@salesforce/lds-store-binary": "^1.432.0",
69
- "@salesforce/lds-store-nimbus": "^1.432.0",
70
- "@salesforce/lds-store-sql": "^1.432.0",
71
- "@salesforce/lds-utils-adapters": "^1.432.0",
72
- "@salesforce/nimbus-plugin-lds": "^1.432.0",
48
+ "@conduit-client/command-aura-network": "3.19.4",
49
+ "@conduit-client/command-aura-normalized-cache-control": "3.19.4",
50
+ "@conduit-client/command-aura-resource-cache-control": "3.19.4",
51
+ "@conduit-client/command-fetch-network": "3.19.4",
52
+ "@conduit-client/command-http-normalized-cache-control": "3.19.4",
53
+ "@conduit-client/command-network": "3.19.4",
54
+ "@conduit-client/service-cache": "3.19.4",
55
+ "@conduit-client/service-cache-control": "3.19.4",
56
+ "@conduit-client/service-cache-inclusion-policy": "3.19.4",
57
+ "@conduit-client/service-fetch-network": "3.19.4",
58
+ "@conduit-client/service-instrument-command": "3.19.4",
59
+ "@conduit-client/service-instrumentation": "3.19.4",
60
+ "@conduit-client/service-pubsub": "3.19.4",
61
+ "@conduit-client/service-store": "3.19.4",
62
+ "@conduit-client/utils": "3.19.4",
63
+ "@salesforce/lds-adapters-graphql": "^1.434.0",
64
+ "@salesforce/lds-drafts": "^1.434.0",
65
+ "@salesforce/lds-durable-records": "^1.434.0",
66
+ "@salesforce/lds-network-adapter": "^1.434.0",
67
+ "@salesforce/lds-network-nimbus": "^1.434.0",
68
+ "@salesforce/lds-store-binary": "^1.434.0",
69
+ "@salesforce/lds-store-nimbus": "^1.434.0",
70
+ "@salesforce/lds-store-sql": "^1.434.0",
71
+ "@salesforce/lds-utils-adapters": "^1.434.0",
72
+ "@salesforce/nimbus-plugin-lds": "^1.434.0",
73
73
  "babel-plugin-dynamic-import-node": "^2.3.3",
74
74
  "wait-for-expect": "^3.0.2"
75
75
  },
package/sfdc/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 'force/luvioServiceProvisioner1';
48
48
  import 'force/luvioTypeNormalization1';
49
- import { Kind as Kind$2, visit as visit$2, print as print$1, resolveAndValidateGraphQLConfig } from 'force/luvioOnestoreGraphqlParser';
49
+ import { Kind as Kind$2, visit as visit$2, print as print$1, resolveAndValidateGraphQLConfig, toGraphQLErrorResponse } from 'force/luvioOnestoreGraphqlParser';
50
50
  import productConsumedSideEffects from '@salesforce/gate/com.salesforce.fieldservice.vanStockLDSBypass256';
51
51
  import reviveOnlyRequestedFields from '@salesforce/gate/lmr.reviveOnlyRequestedFields';
52
52
 
@@ -7729,7 +7729,6 @@ function prepareRequest$5(luvio, config) {
7729
7729
  const key = keyBuilder$1M(luvio, createResourceParams$g(config));
7730
7730
  const allTrackedFields = getTrackedFields(key, luvio.getNode(key), {
7731
7731
  maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
7732
- onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
7733
7732
  }, config.optionalFields);
7734
7733
  const optionalFields = fields === undefined ? allTrackedFields : difference(allTrackedFields, fields);
7735
7734
  const resourceParams = createResourceParams$g({
@@ -7856,7 +7855,6 @@ function ingestSuccessChildResourceParams$2(luvio, childResourceParamsArray, chi
7856
7855
  };
7857
7856
  const childTrackedFields = getTrackedFields(childKey, luvio.getNode(childKey), {
7858
7857
  maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
7859
- onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
7860
7858
  }, childResourceParams.queryParams.optionalFields);
7861
7859
  const childSnapshot = ingestSuccess$8(luvio, {
7862
7860
  recordId: childResourceParams.urlParams.recordId,
@@ -16191,7 +16189,6 @@ function buildNetworkSnapshot$c(luvio, config, options) {
16191
16189
  const key = keyBuilder$1w(luvio, config);
16192
16190
  const trackedFieldsConfig = {
16193
16191
  maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
16194
- onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
16195
16192
  };
16196
16193
  const optionalFieldsTrie = convertFieldsToTrie(getTrackedFields(key, luvio.getNode(key), trackedFieldsConfig, config.optionalFields));
16197
16194
  const fieldsTrie = BLANK_RECORD_FIELDS_TRIE;
@@ -22521,7 +22518,6 @@ const buildNetworkSnapshot$3 = (luvio, context, config, options) => {
22521
22518
  ...resourceRequest.queryParams,
22522
22519
  optionalFields: getTrackedFields(templateRecordKey, luvio.getNode(templateRecordKey), {
22523
22520
  maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
22524
- onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
22525
22521
  }, config.optionalFields),
22526
22522
  },
22527
22523
  });
@@ -23221,7 +23217,6 @@ function prepareRequest(luvio, context, config) {
23221
23217
  ...resourceRequest.queryParams,
23222
23218
  optionalFields: getTrackedFields(recordTemplateKey, luvio.getNode(recordTemplateKey), {
23223
23219
  maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
23224
- onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
23225
23220
  }, config.optionalFields),
23226
23221
  },
23227
23222
  });
@@ -23241,7 +23236,6 @@ function onFetchResponseSuccess$2(luvio, context, config, request, response, res
23241
23236
  });
23242
23237
  const allTrackedFields = getTrackedFields(templateRecordKey, luvio.getNode(templateRecordKey), {
23243
23238
  maxDepth: configuration.getTrackedFieldDepthOnCacheMiss(),
23244
- onlyFetchLeafNodeIdAndName: configuration.getTrackedFieldLeafNodeIdAndNameOnly(),
23245
23239
  }, optionalFields);
23246
23240
  const allTrackedFieldsTrie = convertFieldsToTrie(allTrackedFields, true);
23247
23241
  const ingest = createFieldsIngestSuccess({
@@ -43083,6 +43077,7 @@ class AbstractQuickActionHandler extends AbstractResourceRequestActionHandler {
43083
43077
  }
43084
43078
  async buildPendingAction(request, queue) {
43085
43079
  this.resolveResourceRequestBody(request.body);
43080
+ // eslint-disable-next-line no-return-await
43086
43081
  return await super.buildPendingAction(request, queue);
43087
43082
  }
43088
43083
  resolveResourceRequestBody(body) {
@@ -43517,8 +43512,6 @@ function isCreateContentDocumentAndVersionDraftAdapterEvent(customEvent) {
43517
43512
  return customEvent.namespace === CONTENT_DOCUMENT_AND_VERSION_NAMESPACE;
43518
43513
  }
43519
43514
 
43520
- // so eslint doesn't complain about nimbus
43521
- /* global __nimbus */
43522
43515
  function chunkToBase64(chunk) {
43523
43516
  const bytes = new Uint8Array(chunk);
43524
43517
  const CHUNK_SIZE = 64 * 1024; // 64kb, any bigger and fromCharCode() can error out with an overflow.
@@ -49603,6 +49596,7 @@ function isPolymorphicFieldPath(path, pathToObjectApiNamesMap, objectInfos) {
49603
49596
  const parentObjectInfo = objectInfos[parentObjectApiNames[0]];
49604
49597
  // this should not be undefined, but lets catch it if we do end up in that state.
49605
49598
  if (parentObjectInfo === undefined) {
49599
+ // eslint-disable-next-line @salesforce/lds/no-error-in-production
49606
49600
  throw new Error(`ObjectInfo is missing for ${parentObjectApiNames[0]} for ${parentApiPath}`);
49607
49601
  }
49608
49602
  const relationshipField = referenceIdFieldForRelationship(lastSegment);
@@ -50975,6 +50969,7 @@ function checkForEmptyData(gqlResult) {
50975
50969
  }
50976
50970
  const query = data.uiapi.query;
50977
50971
  // Check all entity types in the query for edges - using for...in to avoid array allocation
50972
+ // eslint-disable-next-line guard-for-in
50978
50973
  for (const entityType in query) {
50979
50974
  const entity = query[entityType];
50980
50975
  if (entity && entity.edges && isArray$3(entity.edges) && entity.edges.length > 0) {
@@ -52486,6 +52481,7 @@ function extractApiNameFromConfig(adapterName, config, completedNetworkRequests)
52486
52481
  case 'getRecord':
52487
52482
  // getRecord config has fields/optionalFields like "Account.Name"
52488
52483
  // Extract apiName from first field in config
52484
+ // eslint-disable-next-line no-case-declarations
52489
52485
  const objectName = extractObjectNameFromFields(parsedConfig);
52490
52486
  if (objectName) {
52491
52487
  apiName = objectName;
@@ -53023,7 +53019,9 @@ class NimbusSqliteStore {
53023
53019
  }
53024
53020
  instrumentation$2.trackValue(GRAPHQL_QUERY_ROOT_METRIC_NAME, row[1].length);
53025
53021
  }
53026
- catch { }
53022
+ catch {
53023
+ // intentionally do nothing
53024
+ }
53027
53025
  }
53028
53026
  }
53029
53027
 
@@ -53732,6 +53730,7 @@ class PrimingSession extends EventEmitter {
53732
53730
  const userData = {
53733
53731
  ...stats,
53734
53732
  };
53733
+ // eslint-disable-next-line guard-for-in
53735
53734
  for (const error in errors) {
53736
53735
  activity.error(error);
53737
53736
  }
@@ -53912,6 +53911,7 @@ class PrimingSession extends EventEmitter {
53912
53911
  let limitedResult = this.applyRetryLimits(result.additionalWork);
53913
53912
  this.enqueue(limitedResult.additionalWork);
53914
53913
  if (limitedResult.recordsNeedingRefetch.size > 0) {
53914
+ // eslint-disable-next-line guard-for-in
53915
53915
  for (const key in keys$3(limitedResult.recordsNeedingRefetch)) {
53916
53916
  const value = limitedResult.recordsNeedingRefetch.get(key);
53917
53917
  if (result.recordsNeedingRefetch.has(key)) {
@@ -56198,6 +56198,7 @@ class DurableRecordStore {
56198
56198
  async exists(key) {
56199
56199
  const result = await this.durableStore.query('SELECT EXISTS(SELECT 1 FROM lds_data WHERE key = ?)', [key]);
56200
56200
  const exists = result.rows[0][0];
56201
+ // eslint-disable-next-line eqeqeq
56201
56202
  return exists == true;
56202
56203
  }
56203
56204
  async getRecord(key) {
@@ -56412,7 +56413,7 @@ var CounterResult;
56412
56413
  CounterResult["Error"] = "Error";
56413
56414
  })(CounterResult || (CounterResult = {}));
56414
56415
  function incrementCounter(name, result) {
56415
- instrumentation.incrementCounter('SFSSideEffect', 1, result == CounterResult.Error, {
56416
+ instrumentation.incrementCounter('SFSSideEffect', 1, result === CounterResult.Error, {
56416
56417
  Name: name,
56417
56418
  Result: result,
56418
56419
  });
@@ -56825,16 +56826,17 @@ class AuraNetworkCommand extends NetworkCommand$1 {
56825
56826
  }
56826
56827
  return ok$1(auraReturnValue);
56827
56828
  }).catch((error) => {
56828
- if (!error || !error.getError) {
56829
+ if (!error) {
56829
56830
  return err$1(toError("Failed to get error from response"));
56830
- } else {
56831
- const actionErrors = error.getError();
56832
- if (actionErrors.length > 0) {
56833
- return err$1(coerceError(actionErrors));
56834
- } else {
56835
- return err$1(toError("Error fetching component"));
56836
- }
56837
56831
  }
56832
+ if (!error.getError) {
56833
+ return err$1(toError(error));
56834
+ }
56835
+ const actionErrors = error.getError();
56836
+ if (actionErrors.length > 0) {
56837
+ return err$1(coerceError(actionErrors));
56838
+ }
56839
+ return err$1(toError("Error fetching component"));
56838
56840
  });
56839
56841
  }
56840
56842
  convertFetchResponseToData(response) {
@@ -57517,16 +57519,17 @@ let AuraCacheControlCommand$1 = class AuraCacheControlCommand extends CacheContr
57517
57519
  } catch {
57518
57520
  }
57519
57521
  }).catch((error) => {
57520
- if (!error || !error.getError) {
57522
+ if (!error) {
57521
57523
  return err$1(toError("Failed to get error from response"));
57522
- } else {
57523
- const actionErrors = error.getError();
57524
- if (actionErrors.length > 0) {
57525
- return err$1(coerceError(actionErrors));
57526
- } else {
57527
- return err$1(toError("Error fetching component"));
57528
- }
57529
57524
  }
57525
+ if (!error.getError) {
57526
+ return err$1(toError(error));
57527
+ }
57528
+ const actionErrors = error.getError();
57529
+ if (actionErrors.length > 0) {
57530
+ return err$1(coerceError(actionErrors));
57531
+ }
57532
+ return err$1(toError("Error fetching component"));
57530
57533
  });
57531
57534
  }
57532
57535
  convertFetchResponseToData(response) {
@@ -57661,16 +57664,17 @@ class AuraCacheControlCommand extends CacheControlCommand {
57661
57664
  } catch {
57662
57665
  }
57663
57666
  }).catch((error) => {
57664
- if (!error || !error.getError) {
57667
+ if (!error) {
57665
57668
  return err$1(toError("Failed to get error from response"));
57666
- } else {
57667
- const actionErrors = error.getError();
57668
- if (actionErrors.length > 0) {
57669
- return err$1(coerceError(actionErrors));
57670
- } else {
57671
- return err$1(toError("Error fetching component"));
57672
- }
57673
57669
  }
57670
+ if (!error.getError) {
57671
+ return err$1(toError(error));
57672
+ }
57673
+ const actionErrors = error.getError();
57674
+ if (actionErrors.length > 0) {
57675
+ return err$1(coerceError(actionErrors));
57676
+ }
57677
+ return err$1(toError("Error fetching component"));
57674
57678
  });
57675
57679
  }
57676
57680
  convertFetchResponseToData(response) {
@@ -58997,7 +59001,7 @@ function buildServiceDescriptor$b(luvio) {
58997
59001
  },
58998
59002
  };
58999
59003
  }
59000
- // version: 1.432.0-b99ba9d219
59004
+ // version: 1.434.0-6aa2dd15e3
59001
59005
 
59002
59006
  /**
59003
59007
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -59023,7 +59027,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
59023
59027
  },
59024
59028
  };
59025
59029
  }
59026
- // version: 1.432.0-b99ba9d219
59030
+ // version: 1.434.0-6aa2dd15e3
59027
59031
 
59028
59032
  /*!
59029
59033
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -60039,13 +60043,7 @@ class GraphQLImperativeBindingsService {
60039
60043
  }
60040
60044
  return await buildBaseImperativeInvoker(getCommand, (result) => this.transformResult(result, exposeRefresh))(...params);
60041
60045
  } catch (error) {
60042
- logError$1(error);
60043
- return {
60044
- data: void 0,
60045
- errors: [
60046
- { message: "Internal error in GraphQL adapter occurred", locations: [] }
60047
- ]
60048
- };
60046
+ return toGraphQLErrorResponse(error);
60049
60047
  }
60050
60048
  };
60051
60049
  }
@@ -60139,8 +60137,8 @@ class GraphQLLegacyImperativeBindingsService {
60139
60137
  config = result.value;
60140
60138
  }
60141
60139
  }
60142
- const command = getCommand({ config, assertIsValid });
60143
60140
  try {
60141
+ const command = getCommand({ config, assertIsValid });
60144
60142
  const overrides = getOverridesForLegacyRequestContext(requestContext);
60145
60143
  const result = await command.execute(overrides);
60146
60144
  const consumerEmittedData = {
@@ -60157,13 +60155,7 @@ class GraphQLLegacyImperativeBindingsService {
60157
60155
  }
60158
60156
  callback(consumerEmittedData);
60159
60157
  } catch (error) {
60160
- logError$1(error);
60161
- callback({
60162
- data: void 0,
60163
- errors: [
60164
- { message: "Internal error in GraphQL adapter occurred", locations: [] }
60165
- ]
60166
- });
60158
+ callback(toGraphQLErrorResponse(error));
60167
60159
  }
60168
60160
  };
60169
60161
  const subscribe = (config, requestContext, callback) => {
@@ -60181,35 +60173,41 @@ class GraphQLLegacyImperativeBindingsService {
60181
60173
  config = result.value;
60182
60174
  }
60183
60175
  }
60184
- const command = getCommand({ config, assertIsValid });
60185
60176
  let unsubscribe = () => {
60186
60177
  };
60187
- const overrides = getOverridesForLegacyRequestContext(requestContext);
60188
- command.execute(overrides).then((result) => {
60189
- const consumerEmittedData = {
60190
- data: void 0,
60191
- errors: void 0
60192
- };
60193
- if (result.isOk()) {
60194
- deepFreeze(result.value);
60195
- consumerEmittedData.data = result.value.data.data;
60196
- unsubscribe = result.value.subscribe(
60197
- (res) => {
60198
- handleEmit(res, callback);
60199
- }
60200
- );
60201
- } else {
60202
- const { data, errors } = toGraphQLResponseFromFailure$1(result.error.failure);
60203
- consumerEmittedData.data = data;
60204
- consumerEmittedData.errors = errors;
60205
- unsubscribe = result.error.subscribe(
60206
- (res) => {
60207
- handleEmit(res, callback);
60208
- }
60209
- );
60210
- }
60211
- callback(consumerEmittedData);
60212
- });
60178
+ try {
60179
+ const command = getCommand({ config, assertIsValid });
60180
+ const overrides = getOverridesForLegacyRequestContext(requestContext);
60181
+ command.execute(overrides).then((result) => {
60182
+ const consumerEmittedData = {
60183
+ data: void 0,
60184
+ errors: void 0
60185
+ };
60186
+ if (result.isOk()) {
60187
+ deepFreeze(result.value);
60188
+ consumerEmittedData.data = result.value.data.data;
60189
+ unsubscribe = result.value.subscribe(
60190
+ (res) => {
60191
+ handleEmit(res, callback);
60192
+ }
60193
+ );
60194
+ } else {
60195
+ const { data, errors } = toGraphQLResponseFromFailure$1(
60196
+ result.error.failure
60197
+ );
60198
+ consumerEmittedData.data = data;
60199
+ consumerEmittedData.errors = errors;
60200
+ unsubscribe = result.error.subscribe(
60201
+ (res) => {
60202
+ handleEmit(res, callback);
60203
+ }
60204
+ );
60205
+ }
60206
+ callback(consumerEmittedData);
60207
+ });
60208
+ } catch (error) {
60209
+ callback(toGraphQLErrorResponse(error));
60210
+ }
60213
60211
  return () => {
60214
60212
  unsubscribe();
60215
60213
  };
@@ -60252,13 +60250,7 @@ class GraphQLMutationBindingsService {
60252
60250
  return toGraphQLResponseFromFailure$1(result.error.failure);
60253
60251
  }
60254
60252
  } catch (error) {
60255
- logError$1(error);
60256
- return {
60257
- data: void 0,
60258
- errors: [
60259
- { message: "Internal error in GraphQL adapter occurred", locations: [] }
60260
- ]
60261
- };
60253
+ return toGraphQLErrorResponse(error);
60262
60254
  }
60263
60255
  };
60264
60256
  }
@@ -60418,6 +60410,10 @@ class CommandWireAdapterConstructor {
60418
60410
  if (isIncompleteConfigError(err)) {
60419
60411
  return;
60420
60412
  }
60413
+ if (err instanceof JsonSchemaViolationError) {
60414
+ this.handleConfigSchemaViolation(err);
60415
+ return;
60416
+ }
60421
60417
  throw err;
60422
60418
  }
60423
60419
  }
@@ -60470,6 +60466,16 @@ class CommandWireAdapterConstructor {
60470
60466
  handleExecutionThrow(error) {
60471
60467
  emitError(this.callback, error);
60472
60468
  }
60469
+ /**
60470
+ * Hook for subclasses to handle a JsonSchemaViolationError from the config
60471
+ * schema assertion. The default re-throws so legacy non-GraphQL wire
60472
+ * adapters keep their existing throw behavior. Overrides are expected to
60473
+ * either emit an error result or re-throw — silently returning will
60474
+ * swallow the error.
60475
+ */
60476
+ handleConfigSchemaViolation(error) {
60477
+ throw error;
60478
+ }
60473
60479
  unsubscribe() {
60474
60480
  if (this.unsubscriber) {
60475
60481
  this.unsubscriber();
@@ -60562,16 +60568,14 @@ class GraphQLCommandWireAdapterConstructor extends CommandWireAdapterConstructor
60562
60568
  this.callback(consumerEmittedData);
60563
60569
  }
60564
60570
  } catch (e) {
60565
- logError$1(e);
60566
60571
  this.handleExecutionThrow(e);
60567
60572
  }
60568
60573
  }
60569
- handleExecutionThrow(e) {
60570
- logError$1(e);
60571
- this.callback({
60572
- data: void 0,
60573
- errors: [{ message: "Internal error in GraphQL adapter occurred", locations: [] }]
60574
- });
60574
+ handleExecutionThrow(error) {
60575
+ this.callback(toGraphQLErrorResponse(error));
60576
+ }
60577
+ handleConfigSchemaViolation(error) {
60578
+ this.handleExecutionThrow(error);
60575
60579
  }
60576
60580
  update(config, _context) {
60577
60581
  this.unsubscribe();
@@ -61223,9 +61227,11 @@ class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
61223
61227
  return entries.length > 0 ? this.store.setEntries(entries) : Promise.resolve();
61224
61228
  }
61225
61229
  find(_query) {
61230
+ // eslint-disable-next-line @salesforce/lds/no-error-in-production
61226
61231
  throw new Error('find not supported on the NimbusDurableCacheInclusionPolicy');
61227
61232
  }
61228
61233
  findAndModify(_query, _cacheUpdate) {
61234
+ // eslint-disable-next-line @salesforce/lds/no-error-in-production
61229
61235
  throw new Error('findAndModify not supported on the NimbusDurableCacheInclusionPolicy');
61230
61236
  }
61231
61237
  registerListener() {
@@ -61251,7 +61257,7 @@ class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
61251
61257
  });
61252
61258
  });
61253
61259
  }
61254
- // TODO: onestore doesnt support cache eviction yet
61260
+ // TODO [W-19368859]: onestore doesnt support cache eviction yet
61255
61261
  // if (evictKeys.size > 0) {
61256
61262
  // evictKeys.forEach((key) => {
61257
61263
  // this.services.cache.evict(key);
@@ -61346,6 +61352,7 @@ class NimbusSqliteOneStoreCache {
61346
61352
  batchQuery(operations) {
61347
61353
  return new Promise((resolve, reject) => {
61348
61354
  this.sqlStore.batchOperations(operations, (error) => {
61355
+ // eslint-disable-next-line no-unused-expressions
61349
61356
  error ? reject(error) : resolve();
61350
61357
  });
61351
61358
  });
@@ -61421,7 +61428,7 @@ function initializeOneStore(sqliteStore, luvio) {
61421
61428
  buildServiceDescriptor$7(),
61422
61429
  buildServiceDescriptor$1$1(),
61423
61430
  buildServiceDescriptor$2(),
61424
- // TODO[@W-18753648]: See note above.
61431
+ // TODO [W-18753648]: See note above.
61425
61432
  // buildStreamingCommandServiceDescriptor(),
61426
61433
  // buildNdJsonServiceDescriptor(),
61427
61434
  // buildSseCommandServiceDescriptor(),
@@ -61683,4 +61690,4 @@ register({
61683
61690
  });
61684
61691
 
61685
61692
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
61686
- // version: 1.432.0-a57c62b660
61693
+ // version: 1.434.0-d8deb0d4ea
@@ -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>>;
@@ -1,13 +1,12 @@
1
1
  import type { CompletedDraftAction, QueueOperation, DraftAction, DraftQueue } from '@salesforce/lds-drafts';
2
2
  import { AbstractQuickActionHandler } from './AbstractQuickActionHandler';
3
- import type { PerformActionInputRepresentation, QuickActionExecutionRepresentation, RecordRepresentation } from '@salesforce/lds-adapters-uiapi';
4
- import { GetRecordConfig } from '@salesforce/lds-adapters-uiapi';
3
+ import type { PerformActionInputRepresentation, QuickActionExecutionRepresentation, RecordRepresentation, GetRecordConfig } from '@salesforce/lds-adapters-uiapi';
5
4
  import type { DurableStoreKeyMetadataMap, Luvio, NetworkAdapter, ResourceRequest, Adapter } from '@luvio/engine';
6
5
  import type { UiApiDraftRecordService } from '../UiApiDraftRecordService';
7
6
  import type { RecordEffectingHandler } from '../records/actionHandlers/RecordEffectingHandler';
8
7
  import { type SideEffectService } from '../sideEffects/SideEffectService';
9
8
  import { type SideEffect } from '../sideEffects';
10
- import { ObjectInfoService } from './../../utils/ObjectInfoService';
9
+ import type { ObjectInfoService } from './../../utils/ObjectInfoService';
11
10
  export declare const QUICK_ACTION_HANDLER = "QUICK_ACTION_HANDLER";
12
11
  interface PerformQuickActionResourceRequest extends Omit<ResourceRequest, 'body' | 'method'> {
13
12
  body: PerformActionInputRepresentation;
@@ -1,7 +1,7 @@
1
1
  import type { DraftAwareUpdateRecordAdapter } from '@salesforce/lds-adapters-uiapi';
2
2
  import type { UiApiActionHandler } from '../actionHandlers/UiApiRecordActionHandler';
3
3
  import type { DurableRecordStore } from 'src/durableStore/DurableRecordStore';
4
- import { ObjectInfoService } from '../../../utils/ObjectInfoService';
4
+ import type { ObjectInfoService } from '../../../utils/ObjectInfoService';
5
5
  /**
6
6
  * @param luvio The runtime's luvio instance
7
7
  * @param actionHandler The UIAPI Record action handler. NOTE: this adapter doesn't
@@ -1,5 +1,5 @@
1
- import { SqliteStorePlugin } from '@salesforce/nimbus-plugin-lds';
2
- import { Luvio } from '@luvio/engine';
1
+ import type { SqliteStorePlugin } from '@salesforce/nimbus-plugin-lds';
2
+ import type { Luvio } from '@luvio/engine';
3
3
  export declare function initializeOneStore(sqliteStore: SqliteStorePlugin, luvio: Luvio): void;
4
4
  /**
5
5
  * Manually purges the OneStore cache by days.
@@ -1,7 +1,7 @@
1
1
  import { type CacheInclusionPolicyServiceDescriptor, type CacheQuery, type CacheUpdate, DurableCacheInclusionPolicy } from '@conduit-client/service-cache-inclusion-policy/v1';
2
2
  import type { Cache, CacheEntry, Key, NamedCacheService } from '@conduit-client/service-cache/v1';
3
3
  import { type DeepReadonly, type SyncOrAsync } from '@conduit-client/utils';
4
- import { NimbusSqliteOneStoreCache } from './nimbusSqliteStoreCache';
4
+ import type { NimbusSqliteOneStoreCache } from './nimbusSqliteStoreCache';
5
5
  export declare class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
6
6
  private readonly services;
7
7
  private readonly store;
@@ -1,3 +1,3 @@
1
- import { IFetchService } from '@conduit-client/service-fetch-network/v1';
1
+ import type { IFetchService } from '@conduit-client/service-fetch-network/v1';
2
2
  import { type ServiceDescriptor } from '@conduit-client/utils';
3
3
  export declare function buildNimbusFetchServiceDescriptor(): ServiceDescriptor<IFetchService, 'fetch', '1.0'>;
@@ -1,6 +1,6 @@
1
- import { SideEffect } from '../drafts/sideEffects';
1
+ import type { SideEffect } from '../drafts/sideEffects';
2
2
  import type { CreateSideEffectHook, DeleteSideEffectHook, UpdateSideEffectHook } from '../drafts/records/actionHandlers/SideEffectHook';
3
- import { DurableRecordStore } from '../durableStore/DurableRecordStore';
3
+ import type { DurableRecordStore } from '../durableStore/DurableRecordStore';
4
4
  export declare const instrumentation: any;
5
5
  export declare class ProductConsumedCreatedHook implements CreateSideEffectHook {
6
6
  on: 'post';
@@ -1,3 +1,3 @@
1
- import { DurableRecordStore } from '../durableStore/DurableRecordStore';
1
+ import type { DurableRecordStore } from '../durableStore/DurableRecordStore';
2
2
  import type { SideEffectHook } from '../drafts/records/actionHandlers/SideEffectHook';
3
3
  export declare function createSfsSideEffectHooks(durableRecordStore: DurableRecordStore): SideEffectHook[];