@salesforce/lds-network-aura 1.100.2
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/LICENSE.txt +82 -0
- package/dist/AuraFetchResponse.d.ts +10 -0
- package/dist/__mocks__/@salesforce/lds-environment-settings.d.ts +2 -0
- package/dist/__mocks__/@salesforce/lds-instrumentation.d.ts +7 -0
- package/dist/__mocks__/aura-storage.d.ts +19 -0
- package/dist/__mocks__/aura.d.ts +3 -0
- package/dist/__mocks__/instrumentation/service.d.ts +33 -0
- package/dist/instrumentation.d.ts +30 -0
- package/dist/ldsNetwork.js +2811 -0
- package/dist/main.d.ts +6 -0
- package/dist/middlewares/analyticswaveprivate.d.ts +1 -0
- package/dist/middlewares/apex.d.ts +1 -0
- package/dist/middlewares/connect-base.d.ts +42 -0
- package/dist/middlewares/connect.d.ts +1 -0
- package/dist/middlewares/event-logging.d.ts +31 -0
- package/dist/middlewares/execute-aggregate-ui.d.ts +16 -0
- package/dist/middlewares/index.d.ts +11 -0
- package/dist/middlewares/uiapi-actions.d.ts +1 -0
- package/dist/middlewares/uiapi-apps.d.ts +1 -0
- package/dist/middlewares/uiapi-base.d.ts +3 -0
- package/dist/middlewares/uiapi-lists.d.ts +1 -0
- package/dist/middlewares/uiapi-lookup.d.ts +1 -0
- package/dist/middlewares/uiapi-mrulists.d.ts +1 -0
- package/dist/middlewares/uiapi-records.d.ts +1 -0
- package/dist/middlewares/uiapi-relatedlist.d.ts +1 -0
- package/dist/middlewares/uiapi-search.d.ts +1 -0
- package/dist/middlewares/utils.d.ts +86 -0
- package/dist/router.d.ts +17 -0
- package/dist/utils/language.d.ts +19 -0
- package/package.json +45 -0
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import './middlewares';
|
|
2
|
+
declare const _default: import("@luvio/engine").NetworkAdapter;
|
|
3
|
+
export default _default;
|
|
4
|
+
export { instrument, AuraNetworkInstrumentation } from './instrumentation';
|
|
5
|
+
export { instrument as ldsNetworkAdapterInstrument } from '@salesforce/lds-network-adapter';
|
|
6
|
+
export { forceRecordTransactionsDisabled } from './middlewares/event-logging';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LWR_APEX_BASE_URI = "/lwr/apex/v58.0";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const BASE_URI = "/services/data/v58.0";
|
|
2
|
+
export declare const CONNECT_BASE_URI: string;
|
|
3
|
+
export declare const COMMERCE_BASE_URI: string;
|
|
4
|
+
export declare const GUIDANCE_BASE_URI: string;
|
|
5
|
+
export declare const WAVE_BASE_URI: string;
|
|
6
|
+
export declare const SMART_DATA_DISCOVERY_BASE_URI: string;
|
|
7
|
+
export declare const CMS_BASE_URI: string;
|
|
8
|
+
export declare const CMS_NON_CONNECT_BASE_URI: string;
|
|
9
|
+
export declare const SCALECENTER_BASE_URI: string;
|
|
10
|
+
export declare const BILLING_BASE_URI: string;
|
|
11
|
+
export declare const INTERACTION_BASE_URI: string;
|
|
12
|
+
export declare const EXPLAINABILITY_BASE_URI: string;
|
|
13
|
+
export declare const SITES_BASE_URI: string;
|
|
14
|
+
export declare const CIB_BASE_URI: string;
|
|
15
|
+
export declare const RCG_TENANTMANAGEMENT_BASE_URI: string;
|
|
16
|
+
export declare const IDENTITY_VERIFICATION_BASE_URI: string;
|
|
17
|
+
export declare const PSS_SOCIAL_CARE_BASE_URI: string;
|
|
18
|
+
export declare const CLM_BASE_URI: string;
|
|
19
|
+
export declare const LEARNING_CONTENT_PLATFORM_BASE_URI: string;
|
|
20
|
+
export declare const ASSETCREATION_BASE_URI: string;
|
|
21
|
+
export declare const HEALTH_CLOUD_BASE_URI: string;
|
|
22
|
+
export declare const SALES_ENABLEMENT_BASE_URI: string;
|
|
23
|
+
export declare const NAMED_CREDENTIAL_BASE_URI: string;
|
|
24
|
+
export declare const EXTERNAL_SERVICES_BASE_URI: string;
|
|
25
|
+
export declare const E_SIGN_BASE_URI: string;
|
|
26
|
+
export declare const CLAUSE_LIBRARY_BASE_URI: string;
|
|
27
|
+
export declare const SERVICE_EXCELLENCE_BASE_URI: string;
|
|
28
|
+
export declare const EPC_BASE_URI: string;
|
|
29
|
+
export declare const ERI_BASE_URI: string;
|
|
30
|
+
export declare const EXPERIENCE_MODEL_BASE_URI: string;
|
|
31
|
+
export declare const TABLEAU_EMBEDDING_BASE_URI: string;
|
|
32
|
+
export declare const SERVICE_AUTOMATION_SERVIRCE_CATALOG_BASE_URI: string;
|
|
33
|
+
export declare const PEOPLE_API_BASE_URI: string;
|
|
34
|
+
export declare const SALES_EXCELLENCE_BASE_URI: string;
|
|
35
|
+
export declare const ENABLEMENT_BASE_URI: string;
|
|
36
|
+
export declare const EXTERNAL_DOC_BASE_URI: string;
|
|
37
|
+
export declare const I18N_BASE_URI: string;
|
|
38
|
+
export declare const GROUP_BASE_URI: string;
|
|
39
|
+
export declare const SCHEDULER_BASE_URI: string;
|
|
40
|
+
export declare const DATA_PROVIDER_BASE_URI: string;
|
|
41
|
+
export declare const CPQ_BASE_URI: string;
|
|
42
|
+
export declare const LIGHTNING_CARDS_BASE_URI: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { InstrumentationRejectCallback, InstrumentationResolveCallback } from './utils';
|
|
2
|
+
export declare enum CrudEventType {
|
|
3
|
+
CREATE = "create",
|
|
4
|
+
DELETE = "delete",
|
|
5
|
+
READ = "read",
|
|
6
|
+
READS = "reads",
|
|
7
|
+
UPDATE = "update"
|
|
8
|
+
}
|
|
9
|
+
export declare enum CrudEventState {
|
|
10
|
+
ERROR = "ERROR",
|
|
11
|
+
SUCCESS = "SUCCESS"
|
|
12
|
+
}
|
|
13
|
+
export declare const forceRecordTransactionsDisabled: boolean | undefined;
|
|
14
|
+
export interface RecordInstrumentationCallbacks {
|
|
15
|
+
createRecordRejectFunction: InstrumentationRejectCallback;
|
|
16
|
+
createRecordResolveFunction: InstrumentationResolveCallback;
|
|
17
|
+
deleteRecordRejectFunction: InstrumentationRejectCallback;
|
|
18
|
+
deleteRecordResolveFunction: InstrumentationResolveCallback;
|
|
19
|
+
getRecordAggregateRejectFunction: InstrumentationRejectCallback;
|
|
20
|
+
getRecordAggregateResolveFunction: InstrumentationResolveCallback;
|
|
21
|
+
getRecordRejectFunction: InstrumentationRejectCallback;
|
|
22
|
+
getRecordResolveFunction: InstrumentationResolveCallback;
|
|
23
|
+
updateRecordRejectFunction: InstrumentationRejectCallback;
|
|
24
|
+
updateRecordResolveFunction: InstrumentationResolveCallback;
|
|
25
|
+
}
|
|
26
|
+
export interface RelatedListInstrumentationCallbacks {
|
|
27
|
+
getRelatedListRecordsRejectFunction: InstrumentationRejectCallback;
|
|
28
|
+
getRelatedListRecordsResolveFunction: InstrumentationResolveCallback;
|
|
29
|
+
getRelatedListRecordsBatchRejectFunction: InstrumentationRejectCallback;
|
|
30
|
+
getRelatedListRecordsBatchResolveFunction: InstrumentationResolveCallback;
|
|
31
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DispatchActionConfig } from './utils';
|
|
2
|
+
import { AuraFetchResponse } from '../AuraFetchResponse';
|
|
3
|
+
interface AggregateUiParams {
|
|
4
|
+
input: {
|
|
5
|
+
compositeRequest: CompositeRequest[];
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export interface CompositeRequest {
|
|
9
|
+
url: string;
|
|
10
|
+
referenceId: string;
|
|
11
|
+
}
|
|
12
|
+
/** Invoke executeAggregateUi Aura controller. This is only to be used with large getRecord requests that
|
|
13
|
+
* would otherwise cause a query length exception.
|
|
14
|
+
*/
|
|
15
|
+
export declare function dispatchSplitRecordAggregateUiAction(endpoint: string, params: AggregateUiParams, config?: DispatchActionConfig): Promise<AuraFetchResponse<unknown>>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './analyticswaveprivate';
|
|
2
|
+
import './apex';
|
|
3
|
+
import './connect';
|
|
4
|
+
import './uiapi-records';
|
|
5
|
+
import './uiapi-actions';
|
|
6
|
+
import './uiapi-lists';
|
|
7
|
+
import './uiapi-lookup';
|
|
8
|
+
import './uiapi-mrulists';
|
|
9
|
+
import './uiapi-relatedlist';
|
|
10
|
+
import './uiapi-search';
|
|
11
|
+
import './uiapi-apps';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { ActionConfig } from 'aura';
|
|
2
|
+
import type { AuraStorage } from 'aura-storage';
|
|
3
|
+
import type { CacheStatsLogger } from 'instrumentation/service';
|
|
4
|
+
import type { FetchResponse, ResourceRequest } from '@luvio/engine';
|
|
5
|
+
import { AuraFetchResponse } from '../AuraFetchResponse';
|
|
6
|
+
import type { HttpVerb } from '../router';
|
|
7
|
+
export type ControllerInvoker = (resourceRequest: ResourceRequest, resourceKey: string) => Promise<FetchResponse<any>>;
|
|
8
|
+
interface CacheConfig {
|
|
9
|
+
storage: AuraStorage;
|
|
10
|
+
key: string;
|
|
11
|
+
statsLogger: CacheStatsLogger;
|
|
12
|
+
forceRefresh?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function registerLdsCacheStats(name: string): CacheStatsLogger;
|
|
15
|
+
export interface DispatchActionConfig {
|
|
16
|
+
action?: ActionConfig;
|
|
17
|
+
cache?: CacheConfig;
|
|
18
|
+
}
|
|
19
|
+
interface UiApiClientOptions {
|
|
20
|
+
ifModifiedSince?: string;
|
|
21
|
+
ifUnmodifiedSince?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface UiApiParams {
|
|
24
|
+
[name: string]: any;
|
|
25
|
+
clientOptions?: UiApiClientOptions;
|
|
26
|
+
}
|
|
27
|
+
interface UiApiBody {
|
|
28
|
+
[name: string]: any;
|
|
29
|
+
}
|
|
30
|
+
interface UiApiError {
|
|
31
|
+
errorCode: number;
|
|
32
|
+
message: string;
|
|
33
|
+
}
|
|
34
|
+
interface ConnectInJavaError {
|
|
35
|
+
data: {
|
|
36
|
+
errorCode: string;
|
|
37
|
+
message: string;
|
|
38
|
+
statusCode: number;
|
|
39
|
+
};
|
|
40
|
+
id: string;
|
|
41
|
+
message: string;
|
|
42
|
+
stackTrace: string;
|
|
43
|
+
}
|
|
44
|
+
interface AuraAction {
|
|
45
|
+
controller: string;
|
|
46
|
+
action?: ActionConfig;
|
|
47
|
+
}
|
|
48
|
+
interface Adapter {
|
|
49
|
+
method: HttpVerb;
|
|
50
|
+
predicate: (path: string) => boolean;
|
|
51
|
+
transport: AuraAction;
|
|
52
|
+
}
|
|
53
|
+
export type ApiFamily = Array<Adapter>;
|
|
54
|
+
interface InstrumentationConfig {
|
|
55
|
+
params: UiApiParams;
|
|
56
|
+
}
|
|
57
|
+
export interface InstrumentationResolveConfig extends InstrumentationConfig {
|
|
58
|
+
body: UiApiBody;
|
|
59
|
+
}
|
|
60
|
+
export interface InstrumentationRejectConfig extends InstrumentationConfig {
|
|
61
|
+
err?: UiApiError | ConnectInJavaError;
|
|
62
|
+
}
|
|
63
|
+
export type InstrumentationResolveCallback = (config: InstrumentationResolveConfig) => void;
|
|
64
|
+
export type InstrumentationRejectCallback = (config: InstrumentationRejectConfig) => void;
|
|
65
|
+
export interface InstrumentationCallbacks {
|
|
66
|
+
rejectFn?: InstrumentationRejectCallback;
|
|
67
|
+
resolveFn?: InstrumentationResolveCallback;
|
|
68
|
+
}
|
|
69
|
+
/** Invoke an Aura controller with the pass parameters. */
|
|
70
|
+
export declare function dispatchAction(endpoint: string, params: UiApiParams, config?: DispatchActionConfig, instrumentationCallbacks?: InstrumentationCallbacks): Promise<AuraFetchResponse<unknown>>;
|
|
71
|
+
/**
|
|
72
|
+
* All the methods exposed out of the UiApiController accept a clientOption config. This method
|
|
73
|
+
* adds methods returns a new params object with the client option if necessary, otherwise it
|
|
74
|
+
* returns the passed params object.
|
|
75
|
+
*/
|
|
76
|
+
export declare function buildUiApiParams(params: UiApiParams, resourceRequest: ResourceRequest): UiApiParams;
|
|
77
|
+
/**
|
|
78
|
+
* The connect generation code appends a "Param" suffix to certain parameter names when
|
|
79
|
+
* generating Aura controllers. This function accepts a set of UiApiParams and returns
|
|
80
|
+
* an equivalent UiApiParams suitable for passing to an Aura controller.
|
|
81
|
+
*/
|
|
82
|
+
export declare function fixParamsForAuraController(params: UiApiParams): UiApiParams;
|
|
83
|
+
/** Returns true if an action should ignore the network cache data. */
|
|
84
|
+
export declare function shouldForceRefresh(resourceRequest: ResourceRequest): boolean;
|
|
85
|
+
export declare function registerApiFamilyRoutes(apiFamily: ApiFamily): void;
|
|
86
|
+
export {};
|
package/dist/router.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ResourceRequest } from '@luvio/engine';
|
|
2
|
+
import type { ControllerInvoker } from './middlewares/utils';
|
|
3
|
+
type RoutePredicate = (path: string) => boolean;
|
|
4
|
+
export interface Route {
|
|
5
|
+
predicate: RoutePredicate;
|
|
6
|
+
handler: ControllerInvoker;
|
|
7
|
+
}
|
|
8
|
+
export type HttpVerb = 'delete' | 'get' | 'patch' | 'post' | 'put';
|
|
9
|
+
type HttpVerbMethod = {
|
|
10
|
+
[key in HttpVerb]: (predicate: RoutePredicate, handler: ControllerInvoker) => void;
|
|
11
|
+
};
|
|
12
|
+
interface Router {
|
|
13
|
+
methods: Record<string, Route[]>;
|
|
14
|
+
lookup: (resourceRequest: ResourceRequest) => ControllerInvoker | null;
|
|
15
|
+
}
|
|
16
|
+
declare const router: Router & HttpVerbMethod;
|
|
17
|
+
export default router;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const push: (...items: any[]) => number, join: (separator?: string | undefined) => string;
|
|
2
|
+
declare const isArray: (arg: any) => arg is any[];
|
|
3
|
+
declare const create: {
|
|
4
|
+
(o: object | null): any;
|
|
5
|
+
(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
|
|
6
|
+
}, entries: {
|
|
7
|
+
<T>(o: {
|
|
8
|
+
[s: string]: T;
|
|
9
|
+
} | ArrayLike<T>): [string, T][];
|
|
10
|
+
(o: {}): [string, any][];
|
|
11
|
+
}, keys: {
|
|
12
|
+
(o: object): string[];
|
|
13
|
+
(o: {}): string[];
|
|
14
|
+
};
|
|
15
|
+
declare const parse: (text: string, reviver?: ((this: any, key: string, value: any) => any) | undefined) => any, stringify: {
|
|
16
|
+
(value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
|
|
17
|
+
(value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
|
|
18
|
+
};
|
|
19
|
+
export { push as ArrayPrototypePush, join as ArrayPrototypeJoin, isArray as ArrayIsArray, create as ObjectCreate, entries as ObjectEntries, keys as ObjectKeys, parse as JSONParse, stringify as JSONStringify, };
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@salesforce/lds-network-aura",
|
|
3
|
+
"version": "1.100.2",
|
|
4
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
+
"description": "LDS Network Adapter for Aura Runtime",
|
|
6
|
+
"main": "dist/ldsNetwork.js",
|
|
7
|
+
"module": "dist/ldsNetwork.js",
|
|
8
|
+
"types": "dist/main.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/ldsNetwork.js",
|
|
15
|
+
"types": "./dist/main.d.ts",
|
|
16
|
+
"default": "./dist/ldsNetwork.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"sfdc": {
|
|
20
|
+
"path": "forcelds/ldsNetwork/",
|
|
21
|
+
"publishedFileName": "ldsNetwork.js",
|
|
22
|
+
"overrides": {
|
|
23
|
+
"artifactDirectory": "dist"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"prepare": "yarn build",
|
|
28
|
+
"build": "rollup --config rollup.config.js",
|
|
29
|
+
"clean": "rm -rf dist",
|
|
30
|
+
"test:perf": "best",
|
|
31
|
+
"test:unit": "jest",
|
|
32
|
+
"test:debug": "node --inspect-brk ../../node_modules/.bin/jest --runInBand",
|
|
33
|
+
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-network-aura"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@luvio/engine": "0.135.4"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.100.2",
|
|
40
|
+
"@salesforce/lds-aura-storage": "^1.100.2",
|
|
41
|
+
"@salesforce/lds-environment-settings": "^1.100.2",
|
|
42
|
+
"@salesforce/lds-instrumentation": "^1.100.2",
|
|
43
|
+
"@salesforce/lds-network-adapter": "^1.100.2"
|
|
44
|
+
}
|
|
45
|
+
}
|