@salesforce/lds-runtime-aura 1.312.0 → 1.313.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.
@@ -21,7 +21,7 @@ import useCmpDefPredictions from '@salesforce/gate/lds.pdl.useCmpDefPredictions'
21
21
  import applyPredictionRequestLimit from '@salesforce/gate/lds.pdl.applyRequestLimit';
22
22
  import useExactMatchesPlusGate from '@salesforce/gate/lds.pdl.useExactMatchesPlus';
23
23
  import { GetApexWireAdapterFactory, registerPrefetcher as registerPrefetcher$1 } from 'force/ldsAdaptersApex';
24
- import { instrument, getRecordAvatarsAdapterFactory, getRecordAdapterFactory, coerceFieldIdArray, getRecordsAdapterFactory, getRecordActionsAdapterFactory, getObjectInfosAdapterFactory, coerceObjectIdArray, getObjectInfoAdapterFactory, coerceObjectId, getRelatedListsActionsAdapterFactory, getRelatedListInfoBatchAdapterFactory, getRelatedListRecordsBatchAdapterFactory, getRelatedListRecordsAdapterFactory, getListInfoByNameAdapterFactory, getListInfosByObjectNameAdapterFactory, getListRecordsByNameAdapterFactory, getListObjectInfoAdapterFactory, configuration, InMemoryRecordRepresentationQueryEvaluator, UiApiNamespace, RecordRepresentationRepresentationType, registerPrefetcher } from 'force/ldsAdaptersUiapi';
24
+ import { instrument, getRecordAvatarsAdapterFactory, getRecordAdapterFactory, coerceFieldIdArray, getRecordsAdapterFactory, getRecordActionsAdapterFactory, getObjectInfosAdapterFactory, coerceObjectIdArray, getObjectInfoAdapterFactory, coerceObjectId, getRelatedListsActionsAdapterFactory, getRelatedListInfoBatchAdapterFactory, getRelatedListInfoAdapterFactory, getRelatedListRecordsBatchAdapterFactory, getRelatedListRecordsAdapterFactory, getListInfoByNameAdapterFactory, getListInfosByObjectNameAdapterFactory, getListRecordsByNameAdapterFactory, getListObjectInfoAdapterFactory, configuration, InMemoryRecordRepresentationQueryEvaluator, UiApiNamespace, RecordRepresentationRepresentationType, registerPrefetcher } from 'force/ldsAdaptersUiapi';
25
25
  import { BaseCommand, convertAuraResponseToData, convertFetchResponseToData } from 'force/luvioRuntime5';
26
26
  import { serviceBroker } from 'force/luvioServiceBroker5';
27
27
  import oneStoreEnabled from '@salesforce/gate/lds.oneStoreEnabled.ltng';
@@ -1819,7 +1819,7 @@ class RecordHomePage extends LexDefaultPage {
1819
1819
  buildSaveRequestData(request) {
1820
1820
  const requestBuckets = [];
1821
1821
  const { adapterName } = request;
1822
- const matchingRequestStrategy = this.requestStrategies[adapterName];
1822
+ const matchingRequestStrategy = this.requestStrategies.get(adapterName);
1823
1823
  if (matchingRequestStrategy === undefined) {
1824
1824
  return [];
1825
1825
  }
@@ -1843,7 +1843,7 @@ class RecordHomePage extends LexDefaultPage {
1843
1843
  }
1844
1844
  resolveSimilarRequest(similarRequest) {
1845
1845
  const { adapterName } = similarRequest;
1846
- const matchingRequestStrategy = this.requestStrategies[adapterName];
1846
+ const matchingRequestStrategy = this.requestStrategies.get(adapterName);
1847
1847
  if (matchingRequestStrategy === undefined) {
1848
1848
  return similarRequest;
1849
1849
  }
@@ -1880,12 +1880,11 @@ class RecordHomePage extends LexDefaultPage {
1880
1880
  return true;
1881
1881
  }
1882
1882
  static handlesContext(context) {
1883
- const maybeRecordHomePageContext = context;
1884
- return (maybeRecordHomePageContext !== undefined &&
1885
- maybeRecordHomePageContext.actionName !== undefined &&
1886
- maybeRecordHomePageContext.objectApiName !== undefined &&
1887
- maybeRecordHomePageContext.recordId !== undefined &&
1888
- maybeRecordHomePageContext.type === 'recordPage');
1883
+ return (context !== undefined &&
1884
+ context.actionName !== undefined &&
1885
+ context.objectApiName !== undefined &&
1886
+ context.recordId !== undefined &&
1887
+ context.type === 'recordPage');
1889
1888
  }
1890
1889
  }
1891
1890
 
@@ -1899,7 +1898,7 @@ class ObjectHomePage extends LexDefaultPage {
1899
1898
  buildSaveRequestData(request) {
1900
1899
  const requestBuckets = [];
1901
1900
  const { adapterName } = request;
1902
- const matchingRequestStrategy = this.requestStrategies[adapterName];
1901
+ const matchingRequestStrategy = this.requestStrategies.get(adapterName);
1903
1902
  if (matchingRequestStrategy === undefined) {
1904
1903
  return [];
1905
1904
  }
@@ -1978,11 +1977,10 @@ class ObjectHomePage extends LexDefaultPage {
1978
1977
  }
1979
1978
  // Identifies a valid ObjectHomeContext
1980
1979
  static handlesContext(context) {
1981
- const maybeObjectHomePageContext = context;
1982
- return (maybeObjectHomePageContext !== undefined &&
1983
- maybeObjectHomePageContext.listViewApiName !== undefined &&
1984
- maybeObjectHomePageContext.objectApiName !== undefined &&
1985
- maybeObjectHomePageContext.type === 'objectHomePage');
1980
+ return (context !== undefined &&
1981
+ context.listViewApiName !== undefined &&
1982
+ context.objectApiName !== undefined &&
1983
+ context.type === 'objectHomePage');
1986
1984
  }
1987
1985
  }
1988
1986
 
@@ -2705,11 +2703,12 @@ async function runRequestsWithLimit(requests, runner, concurrentRequestsLimit, p
2705
2703
  await Promise.all(promises);
2706
2704
  }
2707
2705
 
2708
- function isCmpDefsRequest({ request: { adapterName } }) {
2709
- return adapterName === 'getComponentsDef';
2706
+ function isBoxcarableRequest({ request: { adapterName } }, strategyMap) {
2707
+ const strategy = strategyMap.get(adapterName);
2708
+ return strategy === undefined || strategy.isBoxcarable;
2710
2709
  }
2711
- function predictComponentDefs(cmpDefPredictions, requestRunner) {
2712
- const reducedPredictions = requestRunner.reduceRequests(cmpDefPredictions);
2710
+ function predictNonBoxcarableRequest(nonBoxcaredPredictions, requestRunner) {
2711
+ const reducedPredictions = requestRunner.reduceRequests(nonBoxcaredPredictions);
2713
2712
  reducedPredictions.map((request) => requestRunner.runRequest(request.request));
2714
2713
  }
2715
2714
  class LexPredictivePrefetcher extends ApplicationPredictivePrefetcher {
@@ -2718,16 +2717,16 @@ class LexPredictivePrefetcher extends ApplicationPredictivePrefetcher {
2718
2717
  // from scripts/lds-uiapi-plugin.js
2719
2718
  requestStrategies, options) {
2720
2719
  super(context, repository, requestRunner);
2721
- this.requestStrategies = requestStrategies;
2722
2720
  this.options = options;
2721
+ this.requestStrategyMap = new Map(requestStrategies.map((strategy) => [strategy.adapterName, strategy]));
2723
2722
  this.page = this.getPage();
2724
2723
  }
2725
2724
  getPage() {
2726
2725
  if (RecordHomePage.handlesContext(this.context)) {
2727
- return new RecordHomePage(this.context, this.requestStrategies, this.options);
2726
+ return new RecordHomePage(this.context, this.requestStrategyMap, this.options);
2728
2727
  }
2729
2728
  else if (ObjectHomePage.handlesContext(this.context)) {
2730
- return new ObjectHomePage(this.context, this.requestStrategies, this.options);
2729
+ return new ObjectHomePage(this.context, this.requestStrategyMap, this.options);
2731
2730
  }
2732
2731
  return new LexDefaultPage(this.context);
2733
2732
  }
@@ -2736,7 +2735,7 @@ class LexPredictivePrefetcher extends ApplicationPredictivePrefetcher {
2736
2735
  let similarPageRequests = this.getSimilarPageRequests();
2737
2736
  if (exactPageRequests.length > 0 && this.options.useExactMatchesPlus === true) {
2738
2737
  similarPageRequests = similarPageRequests.filter((requestEntry) => {
2739
- const strategy = this.requestStrategies[requestEntry.request.adapterName];
2738
+ const strategy = this.requestStrategyMap.get(requestEntry.request.adapterName);
2740
2739
  return strategy && strategy.onlySavedInSimilar;
2741
2740
  });
2742
2741
  }
@@ -2749,17 +2748,17 @@ class LexPredictivePrefetcher extends ApplicationPredictivePrefetcher {
2749
2748
  // requesting the cmpDef, we need to predict cmpDefs before we start watching
2750
2749
  // for predictions in the page. Having this code after an
2751
2750
  // await will make the predictions to be saved as predictions too.
2752
- predictComponentDefs(pageRequests.filter(isCmpDefsRequest), this.requestRunner);
2751
+ predictNonBoxcarableRequest(pageRequests.filter((r) => !isBoxcarableRequest(r, this.requestStrategyMap)), this.requestRunner);
2753
2752
  const alwaysRequestEntries = alwaysRequests.map((request) => {
2754
2753
  return {
2755
2754
  request,
2756
2755
  requestMetadata: { requestTime: 0 }, // ensures always requests are executed, and executed first.
2757
2756
  };
2758
2757
  });
2759
- const nonCmpDefPredictions = pageRequests.filter((r) => !isCmpDefsRequest(r));
2758
+ const boxcarablePredictions = pageRequests.filter((r) => isBoxcarableRequest(r, this.requestStrategyMap));
2760
2759
  const reducedPredictions = this.page.shouldReduceAlwaysRequestsWithPredictions()
2761
- ? this.requestRunner.reduceRequests([...nonCmpDefPredictions, ...alwaysRequestEntries])
2762
- : this.requestRunner.reduceRequests(nonCmpDefPredictions);
2760
+ ? this.requestRunner.reduceRequests([...boxcarablePredictions, ...alwaysRequestEntries])
2761
+ : this.requestRunner.reduceRequests(boxcarablePredictions);
2763
2762
  const predictedRequestsWithLimit = (this.page.shouldExecuteAlwaysRequestByThemself()
2764
2763
  ? [...alwaysRequestEntries, ...reducedPredictions]
2765
2764
  : reducedPredictions)
@@ -2927,6 +2926,27 @@ class PrefetchRepository {
2927
2926
  }
2928
2927
  }
2929
2928
 
2929
+ class LexRequestRunner {
2930
+ constructor() {
2931
+ this.requestStrategies = [];
2932
+ this.requestStrategiesByAdapterName = new Map();
2933
+ }
2934
+ setRequestStrategies(strategies) {
2935
+ this.requestStrategies = strategies;
2936
+ this.requestStrategiesByAdapterName = new Map(strategies.map((strategy) => [strategy.adapterName, strategy]));
2937
+ }
2938
+ reduceRequests(requests) {
2939
+ return this.requestStrategies.map((strategy) => strategy.reduce(requests)).flat();
2940
+ }
2941
+ runRequest(request) {
2942
+ const strategy = this.requestStrategiesByAdapterName.get(request.adapterName);
2943
+ if (strategy) {
2944
+ return Promise.resolve(strategy.execute(request.config)).then();
2945
+ }
2946
+ return Promise.resolve(undefined);
2947
+ }
2948
+ }
2949
+
2930
2950
  class RequestStrategy {
2931
2951
  /**
2932
2952
  * Perform any transformations required to prepare the request for saving.
@@ -3036,6 +3056,19 @@ class RequestStrategy {
3036
3056
  }
3037
3057
  }
3038
3058
 
3059
+ class LexRequestStrategy extends RequestStrategy {
3060
+ /**
3061
+ * Whether or not requests from this strategies can be boxcarred by Aura.
3062
+ * If they are, the lex prefetcher will run predictions of this strategy with a limit,
3063
+ * to avoid predictions being boxcared.
3064
+ *
3065
+ * @returns boolean
3066
+ */
3067
+ get isBoxcarable() {
3068
+ return true;
3069
+ }
3070
+ }
3071
+
3039
3072
  const noop = () => { };
3040
3073
  // Taken from https://sourcegraph.soma.salesforce.com/perforce.soma.salesforce.com/app/main/core/-/blob/ui-global-components/components/one/one/oneController.js?L75
3041
3074
  // In theory this should not be here, but for now, we don't have an alternative,
@@ -3150,7 +3183,7 @@ function requestComponents(config) {
3150
3183
  unstable_loadComponentDefs(descriptorsMap, noop);
3151
3184
  }
3152
3185
  }
3153
- class GetComponentsDefStrategy extends RequestStrategy {
3186
+ class GetComponentsDefStrategy extends LexRequestStrategy {
3154
3187
  constructor() {
3155
3188
  super(...arguments);
3156
3189
  this.adapterName = 'getComponentsDef';
@@ -3200,6 +3233,14 @@ class GetComponentsDefStrategy extends RequestStrategy {
3200
3233
  isContextDependent(_context, _request) {
3201
3234
  return true;
3202
3235
  }
3236
+ /**
3237
+ * Component predictions are not boxcared
3238
+ *
3239
+ * @returns false
3240
+ */
3241
+ get isBoxcarable() {
3242
+ return false;
3243
+ }
3203
3244
  }
3204
3245
 
3205
3246
  const LDS_PDL_CMP_IDENTIFIER = 'lds:pdl';
@@ -3213,7 +3254,7 @@ const DEFAULT_RESOURCE_CONTEXT = {
3213
3254
  },
3214
3255
  },
3215
3256
  };
3216
- class LuvioAdapterRequestStrategy extends RequestStrategy {
3257
+ class LuvioAdapterRequestStrategy extends LexRequestStrategy {
3217
3258
  constructor(luvio) {
3218
3259
  super();
3219
3260
  this.luvio = luvio;
@@ -3628,15 +3669,28 @@ class GetRelatedListsActionsRequestStrategy extends LuvioAdapterRequestStrategy
3628
3669
  }
3629
3670
  }
3630
3671
 
3672
+ const GET_RELATED_LIST_INFO_BATCH_ADAPTER_NAME = 'getRelatedListInfoBatch';
3631
3673
  class GetRelatedListInfoBatchRequestStrategy extends LuvioAdapterRequestStrategy {
3632
3674
  constructor() {
3633
3675
  super(...arguments);
3634
- this.adapterName = 'getRelatedListInfoBatch';
3676
+ this.adapterName = GET_RELATED_LIST_INFO_BATCH_ADAPTER_NAME;
3635
3677
  this.adapterFactory = getRelatedListInfoBatchAdapterFactory;
3636
3678
  }
3637
3679
  buildConcreteRequest(similarRequest, _context) {
3638
3680
  return similarRequest;
3639
3681
  }
3682
+ /**
3683
+ * @override
3684
+ */
3685
+ transformForSave(request) {
3686
+ return {
3687
+ ...request,
3688
+ config: {
3689
+ ...request.config,
3690
+ parentObjectApiName: coerceObjectId(request.config.parentObjectApiName),
3691
+ },
3692
+ };
3693
+ }
3640
3694
  canCombine(reqA, reqB) {
3641
3695
  return reqA.parentObjectApiName === reqB.parentObjectApiName;
3642
3696
  }
@@ -3647,6 +3701,95 @@ class GetRelatedListInfoBatchRequestStrategy extends LuvioAdapterRequestStrategy
3647
3701
  }
3648
3702
  }
3649
3703
 
3704
+ class GetRelatedListInfoRequestStrategy extends LuvioAdapterRequestStrategy {
3705
+ constructor() {
3706
+ super(...arguments);
3707
+ this.adapterName = 'getRelatedListInfo';
3708
+ this.adapterFactory = getRelatedListInfoAdapterFactory;
3709
+ }
3710
+ /**
3711
+ * @override
3712
+ */
3713
+ isContextDependent(context, request) {
3714
+ // we have a higher degree of confidence of being able to use a similar request when
3715
+ // optional config is not set AND the object type of the page context is the same as the
3716
+ // object type related list is for
3717
+ return (context.objectApiName === request.config.parentObjectApiName &&
3718
+ this.isRequiredOnlyConfig(request.config));
3719
+ }
3720
+ /**
3721
+ * @override
3722
+ */
3723
+ buildConcreteRequest(similarRequest, _context) {
3724
+ return similarRequest;
3725
+ }
3726
+ /**
3727
+ * @override
3728
+ */
3729
+ transformForSave(request) {
3730
+ return {
3731
+ ...request,
3732
+ config: {
3733
+ ...request.config,
3734
+ parentObjectApiName: coerceObjectId(request.config.parentObjectApiName),
3735
+ },
3736
+ };
3737
+ }
3738
+ /**
3739
+ * For performance reasons (fear of over-fetching), we only want to predict single requests which either are not
3740
+ * part of a batch request OR specify optional parameters (thus requiring data differing from that of a batch
3741
+ * request).
3742
+ *
3743
+ * ADG currently handles the batching of getRelatedListInfo -> getRelatedListInfoBatch
3744
+ * https://gitcore.soma.salesforce.com/core-2206/core-public/blob/p4/main/core/ui-laf-components/modules/laf/batchingPortable/reducers/RelatedListInfoBatchReducer.js
3745
+ *
3746
+ * @param unfilteredRequests
3747
+ * @returns GetRelatedListInfoRequest[]
3748
+ * @override
3749
+ */
3750
+ reduce(unfilteredRequests) {
3751
+ // using batch versions of request, map keys of parent record to values of related lists
3752
+ const batchRequests = unfilteredRequests.filter((entry) => entry.request.adapterName === GET_RELATED_LIST_INFO_BATCH_ADAPTER_NAME).reduce((result, entry) => {
3753
+ // pull batch request parameters that correspond to single request parameters
3754
+ const { parentObjectApiName, relatedListNames, recordTypeId } = entry.request.config;
3755
+ // key based off of parent object and its type
3756
+ const key = `${parentObjectApiName}_${recordTypeId}`;
3757
+ // make sure an entry exists for the record
3758
+ const relatedListIds = result.get(key) || new Set();
3759
+ result.set(key, relatedListIds);
3760
+ // add each related list to values for the record
3761
+ relatedListNames.forEach((list) => relatedListIds.add(list));
3762
+ return result;
3763
+ }, new Map());
3764
+ // return only the single requests that will NOT be covered by a batch request
3765
+ return this.filterRequests(unfilteredRequests).filter((entry) => {
3766
+ const config = entry.request.config;
3767
+ if (!this.isRequiredOnlyConfig(config, true)) {
3768
+ // requested data is customized beyond default; batch may not cover, so keep single request
3769
+ return true;
3770
+ }
3771
+ // key based off of parent object and its type
3772
+ const key = `${config.parentObjectApiName}_${config.recordTypeId}`;
3773
+ // keep only the lists that are not batched
3774
+ const batchLists = batchRequests.get(key);
3775
+ return !(batchLists && batchLists.has(config.relatedListId));
3776
+ });
3777
+ }
3778
+ /**
3779
+ * Return true if the request config doesn't specify values for any of the optional parameters.
3780
+ *
3781
+ * @param config
3782
+ * @param ignoreRecordType
3783
+ */
3784
+ isRequiredOnlyConfig(config, ignoreRecordType = false) {
3785
+ return ((ignoreRecordType || config.recordTypeId === undefined) &&
3786
+ (config.fields || []).length === 0 &&
3787
+ (config.optionalFields || []).length === 0 &&
3788
+ config.restrictColumnsToLayout !== false // default is true
3789
+ );
3790
+ }
3791
+ }
3792
+
3650
3793
  const GET_RELATED_LIST_RECORDS_BATCH_ADAPTER_NAME = 'getRelatedListRecordsBatch';
3651
3794
  class GetRelatedListRecordsBatchRequestStrategy extends LuvioAdapterRequestStrategy {
3652
3795
  constructor() {
@@ -3905,41 +4048,6 @@ class GetListObjectInfoRequestStrategy extends LuvioAdapterRequestStrategy {
3905
4048
  }
3906
4049
  }
3907
4050
 
3908
- class LexRequestRunner {
3909
- constructor(luvio) {
3910
- this.luvio = luvio;
3911
- this.requestStrategies = {
3912
- getRecord: new GetRecordRequestStrategy(luvio),
3913
- getRecords: new GetRecordsRequestStrategy(luvio),
3914
- getRecordActions: new GetRecordActionsRequestStrategy(luvio),
3915
- getRecordAvatars: new GetRecordAvatarsRequestStrategy(luvio),
3916
- getObjectInfo: new GetObjectInfoRequestStrategy(luvio),
3917
- getObjectInfos: new GetObjectInfosRequestStrategy(luvio),
3918
- getRelatedListsActions: new GetRelatedListsActionsRequestStrategy(luvio),
3919
- getRelatedListInfoBatch: new GetRelatedListInfoBatchRequestStrategy(luvio),
3920
- getRelatedListRecords: new GetRelatedListRecordsRequestStrategy(luvio),
3921
- getRelatedListRecordsBatch: new GetRelatedListRecordsBatchRequestStrategy(luvio),
3922
- getListInfoByName: new GetListInfoByNameRequestStrategy(luvio),
3923
- getListRecordsByName: new GetListRecordsByNameRequestStrategy(luvio),
3924
- getApex: new GetApexRequestStrategy(luvio),
3925
- getComponentsDef: new GetComponentsDefStrategy(),
3926
- getListInfosByObjectName: new GetListInfosByObjectNameRequestStrategy(luvio),
3927
- getListObjectInfo: new GetListObjectInfoRequestStrategy(luvio),
3928
- };
3929
- }
3930
- reduceRequests(requests) {
3931
- return Object.values(this.requestStrategies)
3932
- .map((strategy) => strategy.reduce(requests))
3933
- .flat();
3934
- }
3935
- runRequest(request) {
3936
- if (request.adapterName in this.requestStrategies) {
3937
- return Promise.resolve(this.requestStrategies[request.adapterName].execute(request.config)).then();
3938
- }
3939
- return Promise.resolve(undefined);
3940
- }
3941
- }
3942
-
3943
4051
  class InMemoryPrefetchStorage {
3944
4052
  constructor() {
3945
4053
  this.data = {};
@@ -4065,7 +4173,7 @@ function getEnvironmentSetting(name) {
4065
4173
  }
4066
4174
  return undefined;
4067
4175
  }
4068
- // version: 1.312.0-0d267bac6a
4176
+ // version: 1.313.0-19e9b0d234
4069
4177
 
4070
4178
  const forceRecordTransactionsDisabled = getEnvironmentSetting(EnvironmentSettings.ForceRecordTransactionsDisabled);
4071
4179
  //TODO: Some duplication here that can be most likely moved to a util class
@@ -4397,8 +4505,28 @@ function getInflightRequestLimit() {
4397
4505
  }
4398
4506
  }
4399
4507
  function setupPredictivePrefetcher(luvio) {
4508
+ const allStrategies = [
4509
+ new GetRecordRequestStrategy(luvio),
4510
+ new GetRecordsRequestStrategy(luvio),
4511
+ new GetRecordActionsRequestStrategy(luvio),
4512
+ new GetRecordAvatarsRequestStrategy(luvio),
4513
+ new GetObjectInfoRequestStrategy(luvio),
4514
+ new GetObjectInfosRequestStrategy(luvio),
4515
+ new GetRelatedListsActionsRequestStrategy(luvio),
4516
+ new GetRelatedListRecordsRequestStrategy(luvio),
4517
+ new GetRelatedListRecordsBatchRequestStrategy(luvio),
4518
+ new GetRelatedListInfoRequestStrategy(luvio),
4519
+ new GetRelatedListInfoBatchRequestStrategy(luvio),
4520
+ new GetListInfoByNameRequestStrategy(luvio),
4521
+ new GetListRecordsByNameRequestStrategy(luvio),
4522
+ new GetApexRequestStrategy(luvio),
4523
+ new GetComponentsDefStrategy(),
4524
+ new GetListInfosByObjectNameRequestStrategy(luvio),
4525
+ new GetListObjectInfoRequestStrategy(luvio),
4526
+ ];
4400
4527
  const storage = buildAuraPrefetchStorage();
4401
- const requestRunner = new LexRequestRunner(luvio);
4528
+ const requestRunner = new LexRequestRunner();
4529
+ requestRunner.setRequestStrategies(allStrategies);
4402
4530
  const repository = new PrefetchRepository(storage, {
4403
4531
  modifyBeforeSaveHook: (requests) => requestRunner.reduceRequests(requests),
4404
4532
  });
@@ -4410,24 +4538,7 @@ function setupPredictivePrefetcher(luvio) {
4410
4538
  inflightRequestLimit,
4411
4539
  useExactMatchesPlus,
4412
4540
  };
4413
- const prefetcher = new LexPredictivePrefetcher({ context: 'unknown' }, repository, requestRunner, {
4414
- getRecord: new GetRecordRequestStrategy(luvio),
4415
- getRecords: new GetRecordsRequestStrategy(luvio),
4416
- getRecordActions: new GetRecordActionsRequestStrategy(luvio),
4417
- getRecordAvatars: new GetRecordAvatarsRequestStrategy(luvio),
4418
- getObjectInfo: new GetObjectInfoRequestStrategy(luvio),
4419
- getObjectInfos: new GetObjectInfosRequestStrategy(luvio),
4420
- getRelatedListsActions: new GetRelatedListsActionsRequestStrategy(luvio),
4421
- getRelatedListRecords: new GetRelatedListRecordsRequestStrategy(luvio),
4422
- getRelatedListRecordsBatch: new GetRelatedListRecordsBatchRequestStrategy(luvio),
4423
- getRelatedListInfoBatch: new GetRelatedListInfoBatchRequestStrategy(luvio),
4424
- getListInfoByName: new GetListInfoByNameRequestStrategy(luvio),
4425
- getListRecordsByName: new GetListRecordsByNameRequestStrategy(luvio),
4426
- getApex: new GetApexRequestStrategy(luvio),
4427
- getComponentsDef: new GetComponentsDefStrategy(),
4428
- getListInfosByObjectName: new GetListInfosByObjectNameRequestStrategy(luvio),
4429
- getListObjectInfo: new GetListObjectInfoRequestStrategy(luvio),
4430
- }, prefetcherOptions);
4541
+ const prefetcher = new LexPredictivePrefetcher({ context: 'unknown' }, repository, requestRunner, allStrategies, prefetcherOptions);
4431
4542
  registerPrefetcher(luvio, prefetcher);
4432
4543
  if (useApexPredictions.isOpen({ fallback: false })) {
4433
4544
  registerPrefetcher$1(luvio, prefetcher);
@@ -4628,4 +4739,4 @@ function ldsEngineCreator() {
4628
4739
  }
4629
4740
 
4630
4741
  export { buildPredictorForContext, ldsEngineCreator as default, initializeLDS, initializeOneStore };
4631
- // version: 1.312.0-08241ccdd7
4742
+ // version: 1.313.0-bf88d762e3
@@ -0,0 +1,18 @@
1
+ import type { BaseAdapterRequest } from '../../predictive-loading';
2
+ import type { DefaultPageContext, ObjectHomePageContext, RecordHomePageContext } from '../pages';
3
+ /**
4
+ * Options for the predictive prefetcher.
5
+ */
6
+ export type LexPrefetcherOptions = {
7
+ /**
8
+ * Limit on the number of requests that can be inflight at any given time.
9
+ */
10
+ inflightRequestLimit: number;
11
+ /**
12
+ * When `true` requests will be saved in multiple context buckets and when exact matches contains predictions, only those will be used.
13
+ * Defaults to `false` (saves in one of them, predictions are built from similar + exact context buckets).
14
+ */
15
+ useExactMatchesPlus?: boolean;
16
+ };
17
+ export type LexRequest<Config = unknown> = BaseAdapterRequest<Config>;
18
+ export type LexContext = RecordHomePageContext | ObjectHomePageContext | DefaultPageContext;
@@ -1,7 +1,7 @@
1
- import type { LexRequest } from '../prefetcher';
1
+ import type { BaseAdapterRequest } from '../request-strategy';
2
2
  import { PredictivePrefetchPage } from './predictive-prefetch-page';
3
3
  export type DefaultPageContext = Record<string, any>;
4
- export declare class LexDefaultPage<Request extends LexRequest, Context extends DefaultPageContext> extends PredictivePrefetchPage<Request, Context> {
4
+ export declare class LexDefaultPage<Request extends BaseAdapterRequest, Context extends DefaultPageContext> extends PredictivePrefetchPage<Request, Context> {
5
5
  constructor(context: Context);
6
6
  buildSaveRequestData(request: Request): {
7
7
  context: Context;
@@ -1,29 +1,23 @@
1
- import type { LexContext, LexPrefetcherOptions } from '../prefetcher';
2
- import type { GetListInfoByNameRequestStrategy, GetListInfoByNameRequest, GetListRecordsByNameRequestStrategy, GetListRecordsByNameRequest, GetListInfosByObjectNameRequestStrategy, GetListInfosByObjectNameRequest, GetObjectInfosRequest, GetObjectInfosRequestStrategy, GetListObjectInfoRequest, GetListObjectInfoRequestStrategy } from '../request-strategy';
1
+ import type { LexPrefetcherOptions, LexRequest } from '../lex';
2
+ import type { LexRequestStrategy } from '../request-strategy/lex-request-strategy';
3
+ import type { DefaultPageContext } from './lex-default-page';
3
4
  import { LexDefaultPage } from './lex-default-page';
4
5
  export type ObjectHomePageContext = {
5
6
  objectApiName: string;
6
7
  listViewApiName: string;
7
8
  type: 'objectHomePage';
8
9
  };
9
- export type ObjectHomePageRequest = GetListInfoByNameRequest | GetListObjectInfoRequest | GetListRecordsByNameRequest | GetListInfosByObjectNameRequest | GetObjectInfosRequest;
10
- export declare class ObjectHomePage extends LexDefaultPage<ObjectHomePageRequest, ObjectHomePageContext> {
10
+ export declare class ObjectHomePage extends LexDefaultPage<LexRequest, ObjectHomePageContext> {
11
11
  private requestStrategies;
12
12
  private options;
13
13
  similarContext: ObjectHomePageContext;
14
- constructor(context: ObjectHomePageContext, requestStrategies: {
15
- getListInfoByName: GetListInfoByNameRequestStrategy;
16
- getListRecordsByName: GetListRecordsByNameRequestStrategy;
17
- getListInfosByObjectName: GetListInfosByObjectNameRequestStrategy;
18
- getObjectInfos: GetObjectInfosRequestStrategy;
19
- getListObjectInfo: GetListObjectInfoRequestStrategy;
20
- }, options: LexPrefetcherOptions);
21
- buildSaveRequestData(request: ObjectHomePageRequest): {
14
+ constructor(context: ObjectHomePageContext, requestStrategies: Map<string, LexRequestStrategy>, options: LexPrefetcherOptions);
15
+ buildSaveRequestData(request: LexRequest): {
22
16
  context: ObjectHomePageContext;
23
- request: any;
17
+ request: LexRequest<unknown>;
24
18
  }[];
25
- resolveSimilarRequest(similarRequest: ObjectHomePageRequest): ObjectHomePageRequest;
26
- getAlwaysRunRequests(): ObjectHomePageRequest[];
19
+ resolveSimilarRequest(similarRequest: LexRequest): LexRequest;
20
+ getAlwaysRunRequests(): LexRequest[];
27
21
  /**
28
22
  * AlwaysRequests must be reduced with predictions.
29
23
  *
@@ -38,5 +32,5 @@ export declare class ObjectHomePage extends LexDefaultPage<ObjectHomePageRequest
38
32
  * @returns false
39
33
  */
40
34
  shouldExecuteAlwaysRequestByThemself(): boolean;
41
- static handlesContext(context: LexContext): context is ObjectHomePageContext;
35
+ static handlesContext(context: DefaultPageContext): context is ObjectHomePageContext;
42
36
  }
@@ -1,38 +1,24 @@
1
- import type { LexContext, LexPrefetcherOptions } from '../prefetcher';
2
- import type { GetRecordRequest, GetRecordsRequest, GetRecordRequestStrategy, GetRecordsRequestStrategy, GetRecordActionsRequestStrategy, GetRecordActionsRequest, GetRecordAvatarsRequest, GetRecordAvatarsRequestStrategy, GetObjectInfoRequest, GetObjectInfosRequest, GetObjectInfoRequestStrategy, GetObjectInfosRequestStrategy, GetRelatedListsActionsRequestStrategy, GetRelatedListsActionsRequest, GetRelatedListInfoBatchRequestStrategy, GetRelatedListInfoBatchRequest, GetRelatedListRecordsRequestStrategy, GetRelatedListRecordsRequest, GetRelatedListRecordsBatchRequestStrategy, GetRelatedListRecordsBatchRequest, GetApexRequest, GetComponentsRequest, GetApexRequestStrategy, GetComponentsDefStrategy } from '../request-strategy';
1
+ import type { LexPrefetcherOptions, LexRequest } from '../lex';
2
+ import type { DefaultPageContext } from './lex-default-page';
3
3
  import { LexDefaultPage } from './lex-default-page';
4
+ import type { LexRequestStrategy } from '../request-strategy/lex-request-strategy';
4
5
  export type RecordHomePageContext = {
5
6
  objectApiName: string;
6
7
  recordId: string;
7
8
  actionName: string;
8
9
  type: 'recordPage';
9
10
  };
10
- export type RecordHomePageRequest = GetRecordRequest | GetRecordsRequest | GetRecordActionsRequest | GetRecordAvatarsRequest | GetObjectInfoRequest | GetObjectInfosRequest | GetRelatedListsActionsRequest | GetRelatedListInfoBatchRequest | GetRelatedListRecordsRequest | GetRelatedListRecordsBatchRequest | GetApexRequest | GetComponentsRequest;
11
- type RecordHomePageRequestStrategies = {
12
- getRecord: GetRecordRequestStrategy;
13
- getRecords: GetRecordsRequestStrategy;
14
- getRecordActions: GetRecordActionsRequestStrategy;
15
- getRecordAvatars: GetRecordAvatarsRequestStrategy;
16
- getObjectInfo: GetObjectInfoRequestStrategy;
17
- getObjectInfos: GetObjectInfosRequestStrategy;
18
- getRelatedListsActions: GetRelatedListsActionsRequestStrategy;
19
- getRelatedListInfoBatch: GetRelatedListInfoBatchRequestStrategy;
20
- getRelatedListRecords: GetRelatedListRecordsRequestStrategy;
21
- getRelatedListRecordsBatch: GetRelatedListRecordsBatchRequestStrategy;
22
- getApex: GetApexRequestStrategy;
23
- getComponentsDef: GetComponentsDefStrategy;
24
- };
25
- export declare class RecordHomePage extends LexDefaultPage<RecordHomePageRequest, RecordHomePageContext> {
11
+ export declare class RecordHomePage extends LexDefaultPage<LexRequest, RecordHomePageContext> {
26
12
  private requestStrategies;
27
13
  private options;
28
14
  similarContext: RecordHomePageContext;
29
- constructor(context: RecordHomePageContext, requestStrategies: RecordHomePageRequestStrategies, options: LexPrefetcherOptions);
30
- buildSaveRequestData(request: RecordHomePageRequest): {
15
+ constructor(context: RecordHomePageContext, requestStrategies: Map<string, LexRequestStrategy>, options: LexPrefetcherOptions);
16
+ buildSaveRequestData(request: LexRequest): {
31
17
  context: RecordHomePageContext;
32
- request: any;
18
+ request: LexRequest<unknown>;
33
19
  }[];
34
- resolveSimilarRequest(similarRequest: RecordHomePageRequest): RecordHomePageRequest;
35
- getAlwaysRunRequests(): RecordHomePageRequest[];
20
+ resolveSimilarRequest(similarRequest: LexRequest): LexRequest;
21
+ getAlwaysRunRequests(): LexRequest[];
36
22
  /**
37
23
  * In RH, we know that there will be predictions, and we want to reduce the always requests (getRecord(id, type))
38
24
  * with one of the predictions in case some request containing the fields was missed in the predictions.
@@ -46,6 +32,5 @@ export declare class RecordHomePage extends LexDefaultPage<RecordHomePageRequest
46
32
  * @returns true
47
33
  */
48
34
  shouldExecuteAlwaysRequestByThemself(): boolean;
49
- static handlesContext(context: LexContext): context is RecordHomePageContext;
35
+ static handlesContext(context: DefaultPageContext): context is RecordHomePageContext;
50
36
  }
51
- export {};
@@ -1,50 +1,15 @@
1
1
  import { ApplicationPredictivePrefetcher } from './predictive-prefetcher';
2
2
  import { LexDefaultPage } from '../pages/lex-default-page';
3
- import type { DefaultPageContext } from '../pages';
4
- import type { GetRecordActionsRequestStrategy, GetRecordAvatarsRequestStrategy, GetRecordRequestStrategy, GetRecordsRequestStrategy, GetObjectInfoRequestStrategy, GetObjectInfosRequestStrategy, GetRelatedListsActionsRequestStrategy, GetRelatedListInfoBatchRequestStrategy, GetRelatedListRecordsRequestStrategy, GetRelatedListRecordsBatchRequestStrategy, GetListInfoByNameRequestStrategy, GetListRecordsByNameRequestStrategy, GetApexRequestStrategy, GetComponentsDefStrategy, GetListInfosByObjectNameRequestStrategy, GetListObjectInfoRequestStrategy } from '../request-strategy';
5
3
  import type { RequestRunner } from '../request-runner';
6
4
  import type { PrefetchRepository } from '../repository/prefetch-repository';
7
- import type { RecordHomePageContext, RecordHomePageRequest } from '../pages/record-home-page';
8
5
  import type { RequestEntry } from '../common';
9
- import type { ObjectHomePageContext, ObjectHomePageRequest } from '../pages/object-home-page';
10
- export type LexRequest = RecordHomePageRequest | ObjectHomePageRequest;
11
- export type LexContext = RecordHomePageContext | ObjectHomePageContext | DefaultPageContext;
12
- /**
13
- * Options for the predictive prefetcher.
14
- */
15
- export type LexPrefetcherOptions = {
16
- /**
17
- * Limit on the number of requests that can be inflight at any given time.
18
- */
19
- inflightRequestLimit: number;
20
- /**
21
- * When `true` requests will be saved in multiple context buckets and when exact matches contains predictions, only those will be used.
22
- * Defaults to `false` (saves in one of them, predictions are built from similar + exact context buckets).
23
- */
24
- useExactMatchesPlus?: boolean;
25
- };
6
+ import type { LexRequestStrategy } from '../request-strategy/lex-request-strategy';
7
+ import type { LexContext, LexPrefetcherOptions, LexRequest } from '../lex';
26
8
  export declare class LexPredictivePrefetcher extends ApplicationPredictivePrefetcher<LexRequest, LexContext> {
27
- private requestStrategies;
28
9
  protected options: LexPrefetcherOptions;
29
10
  page: LexDefaultPage<LexRequest, LexContext>;
30
- constructor(context: LexContext, repository: PrefetchRepository, requestRunner: RequestRunner<LexRequest>, requestStrategies: {
31
- getRecord: GetRecordRequestStrategy;
32
- getRecords: GetRecordsRequestStrategy;
33
- getRecordActions: GetRecordActionsRequestStrategy;
34
- getRecordAvatars: GetRecordAvatarsRequestStrategy;
35
- getObjectInfo: GetObjectInfoRequestStrategy;
36
- getObjectInfos: GetObjectInfosRequestStrategy;
37
- getRelatedListsActions: GetRelatedListsActionsRequestStrategy;
38
- getRelatedListInfoBatch: GetRelatedListInfoBatchRequestStrategy;
39
- getRelatedListRecords: GetRelatedListRecordsRequestStrategy;
40
- getRelatedListRecordsBatch: GetRelatedListRecordsBatchRequestStrategy;
41
- getListInfoByName: GetListInfoByNameRequestStrategy;
42
- getListObjectInfo: GetListObjectInfoRequestStrategy;
43
- getListRecordsByName: GetListRecordsByNameRequestStrategy;
44
- getListInfosByObjectName: GetListInfosByObjectNameRequestStrategy;
45
- getApex: GetApexRequestStrategy;
46
- getComponentsDef: GetComponentsDefStrategy;
47
- }, options: LexPrefetcherOptions);
11
+ private requestStrategyMap;
12
+ constructor(context: LexContext, repository: PrefetchRepository, requestRunner: RequestRunner<LexRequest>, requestStrategies: LexRequestStrategy[], options: LexPrefetcherOptions);
48
13
  getPage(): LexDefaultPage<LexRequest, LexContext>;
49
14
  getAllPageRequests(): RequestEntry<LexRequest>[];
50
15
  predict(): Promise<void>;
@@ -1,11 +1,11 @@
1
- import type { Luvio } from '@luvio/engine';
2
- import type { LexRequest } from '../prefetcher';
3
1
  import type { RequestRunner } from './request-runner';
4
2
  import type { RequestEntry } from '../common';
3
+ import type { LexRequest } from '../lex';
4
+ import type { LexRequestStrategy } from '../request-strategy/lex-request-strategy';
5
5
  export declare class LexRequestRunner implements RequestRunner<LexRequest> {
6
- private luvio;
7
6
  private requestStrategies;
8
- constructor(luvio: Luvio);
7
+ private requestStrategiesByAdapterName;
8
+ setRequestStrategies(strategies: LexRequestStrategy[]): void;
9
9
  reduceRequests(requests: RequestEntry<LexRequest>[]): RequestEntry<LexRequest>[];
10
10
  runRequest(request: LexRequest): Promise<void>;
11
11
  }
@@ -1,4 +1,4 @@
1
- import { RequestStrategy } from './request-strategy';
1
+ import { LexRequestStrategy } from './lex-request-strategy';
2
2
  type DescriptorsMap = Record<string, unknown | string | undefined>;
3
3
  type NormalizedDescriptorsMap = Record<string, string>;
4
4
  export type GetComponentsRequest = {
@@ -12,7 +12,7 @@ export type NormalizedGetComponentsRequest = {
12
12
  export type GetComponentsContext = {
13
13
  objectApiName: string;
14
14
  };
15
- export declare class GetComponentsDefStrategy extends RequestStrategy<DescriptorsMap, GetComponentsRequest, GetComponentsContext> {
15
+ export declare class GetComponentsDefStrategy extends LexRequestStrategy<DescriptorsMap, GetComponentsRequest, GetComponentsContext> {
16
16
  adapterName: string;
17
17
  execute(config: NormalizedDescriptorsMap): void;
18
18
  buildConcreteRequest(similarRequest: GetComponentsRequest, _context: GetComponentsContext): GetComponentsRequest;
@@ -21,5 +21,11 @@ export declare class GetComponentsDefStrategy extends RequestStrategy<Descriptor
21
21
  combineRequests(reqA: NormalizedDescriptorsMap, reqB: NormalizedDescriptorsMap): NormalizedDescriptorsMap;
22
22
  get onlySavedInSimilar(): boolean;
23
23
  isContextDependent(_context: GetComponentsContext, _request: GetComponentsRequest): boolean;
24
+ /**
25
+ * Component predictions are not boxcared
26
+ *
27
+ * @returns false
28
+ */
29
+ get isBoxcarable(): boolean;
24
30
  }
25
31
  export {};
@@ -7,10 +7,15 @@ export type GetRelatedListInfoBatchRequest = {
7
7
  type GetRelatedListInfoBatchContext = {
8
8
  objectApiName: string;
9
9
  };
10
+ export declare const GET_RELATED_LIST_INFO_BATCH_ADAPTER_NAME = "getRelatedListInfoBatch";
10
11
  export declare class GetRelatedListInfoBatchRequestStrategy extends LuvioAdapterRequestStrategy<GetRelatedListInfoBatchConfig, GetRelatedListInfoBatchRequest, GetRelatedListInfoBatchContext> {
11
12
  adapterName: string;
12
13
  adapterFactory: import("@luvio/engine").AdapterFactory<GetRelatedListInfoBatchConfig, import("packages/lds-adapters-uiapi/dist/es/es2018/types/src/generated/types/RelatedListInfoBatchRepresentation").RelatedListInfoBatchRepresentation>;
13
14
  buildConcreteRequest(similarRequest: GetRelatedListInfoBatchRequest, _context: GetRelatedListInfoBatchContext): GetRelatedListInfoBatchRequest;
15
+ /**
16
+ * @override
17
+ */
18
+ transformForSave(request: GetRelatedListInfoBatchRequest): GetRelatedListInfoBatchRequest;
14
19
  canCombine(reqA: GetRelatedListInfoBatchConfig, reqB: GetRelatedListInfoBatchConfig): boolean;
15
20
  combineRequests(reqA: GetRelatedListInfoBatchConfig, reqB: GetRelatedListInfoBatchConfig): GetRelatedListInfoBatchConfig;
16
21
  }
@@ -0,0 +1,48 @@
1
+ import type { BaseAdapterRequest } from './request-strategy';
2
+ import type { GetRelatedListInfoConfig } from '@salesforce/lds-adapters-uiapi';
3
+ import type { RequestEntry } from '../common';
4
+ import { LuvioAdapterRequestStrategy } from './luvio-adapter-request-strategy';
5
+ export type GetRelatedListInfoRequest = {
6
+ adapterName: 'getRelatedListInfo';
7
+ config: GetRelatedListInfoConfig;
8
+ };
9
+ type GetRelatedListInfoContext = {
10
+ objectApiName: string;
11
+ };
12
+ export declare class GetRelatedListInfoRequestStrategy extends LuvioAdapterRequestStrategy<GetRelatedListInfoConfig, GetRelatedListInfoRequest, GetRelatedListInfoContext> {
13
+ adapterName: string;
14
+ adapterFactory: import("@luvio/engine").AdapterFactory<GetRelatedListInfoConfig, import("packages/lds-adapters-uiapi/dist/es/es2018/types/src/generated/types/RelatedListInfoRepresentation").RelatedListInfoRepresentation>;
15
+ /**
16
+ * @override
17
+ */
18
+ isContextDependent(context: GetRelatedListInfoContext, request: GetRelatedListInfoRequest): boolean;
19
+ /**
20
+ * @override
21
+ */
22
+ buildConcreteRequest(similarRequest: GetRelatedListInfoRequest, _context: GetRelatedListInfoContext): GetRelatedListInfoRequest;
23
+ /**
24
+ * @override
25
+ */
26
+ transformForSave(request: GetRelatedListInfoRequest): GetRelatedListInfoRequest;
27
+ /**
28
+ * For performance reasons (fear of over-fetching), we only want to predict single requests which either are not
29
+ * part of a batch request OR specify optional parameters (thus requiring data differing from that of a batch
30
+ * request).
31
+ *
32
+ * ADG currently handles the batching of getRelatedListInfo -> getRelatedListInfoBatch
33
+ * https://gitcore.soma.salesforce.com/core-2206/core-public/blob/p4/main/core/ui-laf-components/modules/laf/batchingPortable/reducers/RelatedListInfoBatchReducer.js
34
+ *
35
+ * @param unfilteredRequests
36
+ * @returns GetRelatedListInfoRequest[]
37
+ * @override
38
+ */
39
+ reduce(unfilteredRequests: RequestEntry<BaseAdapterRequest<unknown>>[]): RequestEntry<GetRelatedListInfoRequest>[];
40
+ /**
41
+ * Return true if the request config doesn't specify values for any of the optional parameters.
42
+ *
43
+ * @param config
44
+ * @param ignoreRecordType
45
+ */
46
+ isRequiredOnlyConfig(config: GetRelatedListInfoConfig, ignoreRecordType?: boolean): boolean;
47
+ }
48
+ export {};
@@ -6,6 +6,7 @@ export * from './get-record-actions-request-strategy';
6
6
  export * from './get-object-info-request-strategy';
7
7
  export * from './get-object-infos-request-strategy';
8
8
  export * from './get-related-lists-actions-request-strategy';
9
+ export * from './get-related-list-info-request-strategy';
9
10
  export * from './get-related-list-info-batch-request-strategy';
10
11
  export * from './get-related-list-records-request-strategy';
11
12
  export * from './get-related-list-records-batch-request-strategy';
@@ -0,0 +1,13 @@
1
+ import { RequestStrategy } from './request-strategy';
2
+ import type { LexContext, LexRequest } from '../lex';
3
+ import type { DefaultPageContext } from '../pages';
4
+ export declare abstract class LexRequestStrategy<Config = unknown, Request extends LexRequest<Config> = LexRequest<Config>, Context extends LexContext = DefaultPageContext> extends RequestStrategy<Config, Request, Context> {
5
+ /**
6
+ * Whether or not requests from this strategies can be boxcarred by Aura.
7
+ * If they are, the lex prefetcher will run predictions of this strategy with a limit,
8
+ * to avoid predictions being boxcared.
9
+ *
10
+ * @returns boolean
11
+ */
12
+ get isBoxcarable(): boolean;
13
+ }
@@ -1,6 +1,6 @@
1
1
  import type { AdapterFactory, AdapterRequestContext, Luvio, Snapshot } from '@luvio/engine';
2
- import type { BaseAdapterRequest } from './request-strategy';
3
- import { RequestStrategy } from './request-strategy';
2
+ import { LexRequestStrategy } from './lex-request-strategy';
3
+ import type { LexContext, LexRequest } from '../lex';
4
4
  export declare const DEFAULT_RESOURCE_CONTEXT: {
5
5
  sourceContext: {
6
6
  tagName: string;
@@ -11,7 +11,7 @@ export declare const DEFAULT_RESOURCE_CONTEXT: {
11
11
  };
12
12
  };
13
13
  };
14
- export declare abstract class LuvioAdapterRequestStrategy<AdapterConfig, Request extends BaseAdapterRequest<AdapterConfig>, Context> extends RequestStrategy<AdapterConfig, Request, Context> {
14
+ export declare abstract class LuvioAdapterRequestStrategy<AdapterConfig, Request extends LexRequest<AdapterConfig>, Context extends LexContext> extends LexRequestStrategy<AdapterConfig, Request, Context> {
15
15
  private luvio;
16
16
  constructor(luvio: Luvio);
17
17
  /**
@@ -1,5 +1,5 @@
1
1
  import type { RequestEntry } from '../common';
2
- export type BaseAdapterRequest<Config> = {
2
+ export type BaseAdapterRequest<Config = unknown> = {
3
3
  adapterName: string;
4
4
  config: Config;
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-aura",
3
- "version": "1.312.0",
3
+ "version": "1.313.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for Aura runtime",
6
6
  "main": "dist/ldsEngineCreator.js",
@@ -35,15 +35,15 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@luvio/service-broker": "5.3.1",
38
- "@salesforce/lds-adapters-apex": "^1.312.0",
39
- "@salesforce/lds-adapters-uiapi": "^1.312.0",
38
+ "@salesforce/lds-adapters-apex": "^1.313.0",
39
+ "@salesforce/lds-adapters-uiapi": "^1.313.0",
40
40
  "@salesforce/lds-adapters-uiapi-lex": "^1.302.0",
41
- "@salesforce/lds-ads-bridge": "^1.312.0",
42
- "@salesforce/lds-aura-storage": "^1.312.0",
43
- "@salesforce/lds-bindings": "^1.312.0",
44
- "@salesforce/lds-instrumentation": "^1.312.0",
45
- "@salesforce/lds-network-aura": "^1.312.0",
46
- "@salesforce/lds-network-fetch-with-jwt": "^1.312.0"
41
+ "@salesforce/lds-ads-bridge": "^1.313.0",
42
+ "@salesforce/lds-aura-storage": "^1.313.0",
43
+ "@salesforce/lds-bindings": "^1.313.0",
44
+ "@salesforce/lds-instrumentation": "^1.313.0",
45
+ "@salesforce/lds-network-aura": "^1.313.0",
46
+ "@salesforce/lds-network-fetch-with-jwt": "^1.313.0"
47
47
  },
48
48
  "dependencies": {
49
49
  "@luvio/command-aura-network": "5.3.1",
@@ -64,13 +64,13 @@
64
64
  "@luvio/service-subscription": "5.3.1",
65
65
  "@luvio/service-type-registry": "5.3.1",
66
66
  "@luvio/utils": "5.3.1",
67
- "@salesforce/lds-adapters-uiapi-lex": "^1.312.0"
67
+ "@salesforce/lds-adapters-uiapi-lex": "^1.313.0"
68
68
  },
69
69
  "luvioBundlesize": [
70
70
  {
71
71
  "path": "./dist/ldsEngineCreator.js",
72
72
  "maxSize": {
73
- "none": "175 kB",
73
+ "none": "178 kB",
74
74
  "min": "75 kB",
75
75
  "compressed": "32 kB"
76
76
  }