@salesforce/lds-runtime-aura 1.294.0 → 1.296.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.
@@ -15,8 +15,10 @@
15
15
  import { HttpStatusCode, InMemoryStore as InMemoryStore$1, Environment, Luvio, InMemoryStoreQueryEvaluator } from 'force/luvioEngine';
16
16
  import ldsTrackedFieldsBehaviorGate from '@salesforce/gate/lds.useNewTrackedFieldBehavior';
17
17
  import usePredictiveLoading from '@salesforce/gate/lds.usePredictiveLoading';
18
+ import useApexPredictions from '@salesforce/gate/lds.pdl.useApexPredictions';
18
19
  import useRelatedListsPredictions from '@salesforce/gate/lds.pdl.useRelatedListsPredictions';
19
20
  import applyPredictionRequestLimit from '@salesforce/gate/lds.pdl.applyRequestLimit';
21
+ import { GetApexWireAdapterFactory, registerPrefetcher as registerPrefetcher$1 } from 'force/ldsAdaptersApex';
20
22
  import { instrument, getRecordAvatarsAdapterFactory, getRecordAdapterFactory, coerceFieldIdArray, getRecordsAdapterFactory, getRecordActionsAdapterFactory, getObjectInfosAdapterFactory, coerceObjectIdArray, getObjectInfoAdapterFactory, coerceObjectId, getRelatedListsActionsAdapterFactory, getRelatedListInfoBatchAdapterFactory, getRelatedListRecordsBatchAdapterFactory, getRelatedListRecordsAdapterFactory, configuration, InMemoryRecordRepresentationQueryEvaluator, UiApiNamespace, RecordRepresentationRepresentationType, registerPrefetcher } from 'force/ldsAdaptersUiapi';
21
23
  import { withRegistration as withRegistration$1 } from 'force/luvioRegistry3';
22
24
  import oneStoreEnabled from '@salesforce/gate/lds.oneStoreEnabled.ltng';
@@ -2293,6 +2295,22 @@ class GetRelatedListRecordsRequestStrategy extends LuvioAdapterRequestStrategy {
2293
2295
  }
2294
2296
  }
2295
2297
 
2298
+ function getApexPdlFactory(luvio) {
2299
+ return ({ invokerParams, config }) => {
2300
+ return GetApexWireAdapterFactory(luvio, invokerParams)(config);
2301
+ };
2302
+ }
2303
+ class GetApexRequestStrategy extends LuvioAdapterRequestStrategy {
2304
+ constructor() {
2305
+ super(...arguments);
2306
+ this.adapterName = 'getApex';
2307
+ this.adapterFactory = getApexPdlFactory;
2308
+ }
2309
+ buildConcreteRequest(similarRequest) {
2310
+ return similarRequest;
2311
+ }
2312
+ }
2313
+
2296
2314
  const LDS_PDL_CMP_IDENTIFIER = 'lds:pdl';
2297
2315
  class LexRequestRunner {
2298
2316
  constructor(luvio) {
@@ -2308,6 +2326,7 @@ class LexRequestRunner {
2308
2326
  getRelatedListInfoBatch: new GetRelatedListInfoBatchRequestStrategy(),
2309
2327
  getRelatedListRecords: new GetRelatedListRecordsRequestStrategy(),
2310
2328
  getRelatedListRecordsBatch: new GetRelatedListRecordsBatchRequestStrategy(),
2329
+ getApex: new GetApexRequestStrategy(),
2311
2330
  };
2312
2331
  }
2313
2332
  reduceRequests(requests) {
@@ -2569,10 +2588,14 @@ function setupPredictivePrefetcher(luvio) {
2569
2588
  getRelatedListRecords: new GetRelatedListRecordsRequestStrategy(),
2570
2589
  getRelatedListRecordsBatch: new GetRelatedListRecordsBatchRequestStrategy(),
2571
2590
  getRelatedListInfoBatch: new GetRelatedListInfoBatchRequestStrategy(),
2591
+ getApexStrategy: new GetApexRequestStrategy(),
2572
2592
  }, {
2573
2593
  inflightRequestLimit,
2574
2594
  });
2575
2595
  registerPrefetcher(luvio, prefetcher);
2596
+ if (useApexPredictions.isOpen({ fallback: false })) {
2597
+ registerPrefetcher$1(luvio, prefetcher);
2598
+ }
2576
2599
  __lexPrefetcher = prefetcher;
2577
2600
  }
2578
2601
  /**
@@ -2707,4 +2730,4 @@ function ldsEngineCreator() {
2707
2730
  }
2708
2731
 
2709
2732
  export { buildPredictorForContext, ldsEngineCreator as default, initializeLDS, initializeOneStore };
2710
- // version: 1.294.0-06a44f23f
2733
+ // version: 1.296.0-ad26368c0
@@ -1,5 +1,5 @@
1
1
  import type { LexContext } 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 } from '../request-strategy';
2
+ import type { GetRecordRequest, GetRecordsRequest, GetRecordRequestStrategy, GetRecordsRequestStrategy, GetRecordActionsRequestStrategy, GetRecordActionsRequest, GetRecordAvatarsRequest, GetRecordAvatarsRequestStrategy, GetObjectInfoRequest, GetObjectInfosRequest, GetObjectInfoRequestStrategy, GetObjectInfosRequestStrategy, GetRelatedListsActionsRequestStrategy, GetRelatedListsActionsRequest, GetRelatedListInfoBatchRequestStrategy, GetRelatedListInfoBatchRequest, GetRelatedListRecordsRequestStrategy, GetRelatedListRecordsRequest, GetRelatedListRecordsBatchRequestStrategy, GetRelatedListRecordsBatchRequest, GetApexRequest } from '../request-strategy';
3
3
  import { PredictivePrefetchPage } from './predictive-prefetch-page';
4
4
  export type RecordHomePageContext = {
5
5
  objectApiName: string;
@@ -7,7 +7,7 @@ export type RecordHomePageContext = {
7
7
  actionName: string;
8
8
  type: 'recordPage';
9
9
  };
10
- export type RecordHomePageRequest = GetRecordRequest | GetRecordsRequest | GetRecordActionsRequest | GetRecordAvatarsRequest | GetObjectInfoRequest | GetObjectInfosRequest | GetRelatedListsActionsRequest | GetRelatedListInfoBatchRequest | GetRelatedListRecordsRequest | GetRelatedListRecordsBatchRequest;
10
+ export type RecordHomePageRequest = GetRecordRequest | GetRecordsRequest | GetRecordActionsRequest | GetRecordAvatarsRequest | GetObjectInfoRequest | GetObjectInfosRequest | GetRelatedListsActionsRequest | GetRelatedListInfoBatchRequest | GetRelatedListRecordsRequest | GetRelatedListRecordsBatchRequest | GetApexRequest;
11
11
  export declare class RecordHomePage extends PredictivePrefetchPage<RecordHomePageRequest, RecordHomePageContext> {
12
12
  private requestStrategies;
13
13
  similarContext: RecordHomePageContext;
@@ -51,7 +51,7 @@ export declare class RecordHomePage extends PredictivePrefetchPage<RecordHomePag
51
51
  request: GetRelatedListRecordsBatchRequest;
52
52
  context: RecordHomePageContext;
53
53
  } | {
54
- request: GetRelatedListInfoBatchRequest;
54
+ request: GetRelatedListInfoBatchRequest | GetApexRequest;
55
55
  context: RecordHomePageContext;
56
56
  };
57
57
  resolveSimilarRequest(similarRequest: RecordHomePageRequest): RecordHomePageRequest;
@@ -1,7 +1,7 @@
1
1
  import type { DefaultPageContext, PredictivePrefetchPage } from '../pages';
2
2
  import type { PrefetcherOptions } from './predictive-prefetcher';
3
3
  import { ApplicationPredictivePrefetcher } from './predictive-prefetcher';
4
- import type { GetRecordActionsRequestStrategy, GetRecordAvatarsRequestStrategy, GetRecordRequestStrategy, GetRecordsRequestStrategy, GetObjectInfoRequestStrategy, GetObjectInfosRequestStrategy, GetRelatedListsActionsRequestStrategy, GetRelatedListInfoBatchRequestStrategy, GetRelatedListRecordsRequestStrategy, GetRelatedListRecordsBatchRequestStrategy } from '../request-strategy';
4
+ import type { GetRecordActionsRequestStrategy, GetRecordAvatarsRequestStrategy, GetRecordRequestStrategy, GetRecordsRequestStrategy, GetObjectInfoRequestStrategy, GetObjectInfosRequestStrategy, GetRelatedListsActionsRequestStrategy, GetRelatedListInfoBatchRequestStrategy, GetRelatedListRecordsRequestStrategy, GetRelatedListRecordsBatchRequestStrategy, GetApexRequestStrategy } from '../request-strategy';
5
5
  import type { RequestRunner } from '../request-runner';
6
6
  import type { PrefetchRepository } from '../repository/prefetch-repository';
7
7
  import type { RecordHomePageContext, RecordHomePageRequest } from '../pages/record-home-page';
@@ -20,6 +20,7 @@ export declare class LexPredictivePrefetcher extends ApplicationPredictivePrefet
20
20
  getRelatedListInfoBatch: GetRelatedListInfoBatchRequestStrategy;
21
21
  getRelatedListRecords: GetRelatedListRecordsRequestStrategy;
22
22
  getRelatedListRecordsBatch: GetRelatedListRecordsBatchRequestStrategy;
23
+ getApexStrategy: GetApexRequestStrategy;
23
24
  }, options: PrefetcherOptions);
24
25
  getPage(): PredictivePrefetchPage<LexRequest, LexContext>;
25
26
  }
@@ -0,0 +1,18 @@
1
+ import type { ApexInvokerParams } from '@salesforce/lds-adapters-apex';
2
+ import type { Luvio } from '@luvio/engine';
3
+ import { LuvioAdapterRequestStrategy } from './luvio-adapter-request-strategy';
4
+ export type GetApexConfig = {
5
+ name: string;
6
+ invokerParams: ApexInvokerParams;
7
+ config: Record<string, any>;
8
+ };
9
+ export type GetApexRequest = {
10
+ adapterName: 'getApex';
11
+ config: GetApexConfig;
12
+ };
13
+ export declare function getApexPdlFactory(luvio: Luvio): ({ invokerParams, config }: GetApexConfig) => import("@luvio/engine").Snapshot<any> | Promise<import("@luvio/engine").Snapshot<any>> | null;
14
+ export declare class GetApexRequestStrategy extends LuvioAdapterRequestStrategy<GetApexConfig, GetApexRequest, any> {
15
+ adapterName: string;
16
+ adapterFactory: typeof getApexPdlFactory;
17
+ buildConcreteRequest(similarRequest: GetApexRequest): GetApexRequest;
18
+ }
@@ -8,6 +8,7 @@ export * from './get-related-lists-actions-request-strategy';
8
8
  export * from './get-related-list-info-batch-request-strategy';
9
9
  export * from './get-related-list-records-request-strategy';
10
10
  export * from './get-related-list-records-batch-request-strategy';
11
+ export * from './get-apex-request-strategy';
11
12
  export * from './luvio-adapter-request-strategy';
12
13
  export * from './luvio-adapter-request';
13
14
  export * from './request-strategy';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-aura",
3
- "version": "1.294.0",
3
+ "version": "1.296.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for Aura runtime",
6
6
  "main": "dist/ldsEngineCreator.js",
@@ -44,17 +44,18 @@
44
44
  "@luvio/service-subscription": "^1.0.0",
45
45
  "@luvio/service-type-registry": "^1.0.0",
46
46
  "@luvio/utils": "^3.6.0",
47
- "@salesforce/lds-adapters-uiapi": "^1.294.0",
48
- "@salesforce/lds-ads-bridge": "^1.294.0",
49
- "@salesforce/lds-aura-storage": "^1.294.0",
50
- "@salesforce/lds-bindings": "^1.294.0",
51
- "@salesforce/lds-instrumentation": "^1.294.0",
52
- "@salesforce/lds-network-aura": "^1.294.0",
53
- "@salesforce/lds-network-fetch-with-jwt": "^1.294.0"
47
+ "@salesforce/lds-adapters-apex": "^1.296.0",
48
+ "@salesforce/lds-adapters-uiapi": "^1.296.0",
49
+ "@salesforce/lds-ads-bridge": "^1.296.0",
50
+ "@salesforce/lds-aura-storage": "^1.296.0",
51
+ "@salesforce/lds-bindings": "^1.296.0",
52
+ "@salesforce/lds-instrumentation": "^1.296.0",
53
+ "@salesforce/lds-network-aura": "^1.296.0",
54
+ "@salesforce/lds-network-fetch-with-jwt": "^1.296.0"
54
55
  },
55
56
  "dependencies": {
56
57
  "@luvio/network-adapter-composable": "0.154.20",
57
- "@salesforce/lds-adapters-uiapi-lex": "^1.294.0"
58
+ "@salesforce/lds-adapters-uiapi-lex": "^1.296.0"
58
59
  },
59
60
  "luvioBundlesize": [
60
61
  {