@salesforce/lds-network-aura 1.124.1 → 1.124.3
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/ldsNetwork.js +2826 -2826
- package/dist/{AuraFetchResponse.d.ts → types/AuraFetchResponse.d.ts} +10 -10
- package/dist/{__mocks__ → types/__mocks__}/@salesforce/lds-environment-settings.d.ts +2 -2
- package/dist/{__mocks__ → types/__mocks__}/@salesforce/lds-instrumentation.d.ts +7 -7
- package/dist/{__mocks__ → types/__mocks__}/aura-storage.d.ts +19 -19
- package/dist/{__mocks__ → types/__mocks__}/aura.d.ts +3 -3
- package/dist/{__mocks__ → types/__mocks__}/instrumentation/service.d.ts +33 -33
- package/dist/{instrumentation.d.ts → types/instrumentation.d.ts} +30 -30
- package/dist/{main.d.ts → types/main.d.ts} +6 -6
- package/dist/{middlewares → types/middlewares}/analyticswaveprivate.d.ts +1 -1
- package/dist/{middlewares → types/middlewares}/apex.d.ts +1 -1
- package/dist/{middlewares → types/middlewares}/connect-base.d.ts +45 -45
- package/dist/{middlewares → types/middlewares}/connect.d.ts +1 -1
- package/dist/{middlewares → types/middlewares}/event-logging.d.ts +31 -31
- package/dist/{middlewares → types/middlewares}/execute-aggregate-ui.d.ts +16 -16
- package/dist/{middlewares → types/middlewares}/index.d.ts +11 -11
- package/dist/{middlewares → types/middlewares}/uiapi-actions.d.ts +1 -1
- package/dist/{middlewares → types/middlewares}/uiapi-apps.d.ts +1 -1
- package/dist/{middlewares → types/middlewares}/uiapi-base.d.ts +3 -3
- package/dist/{middlewares → types/middlewares}/uiapi-lists.d.ts +1 -1
- package/dist/{middlewares → types/middlewares}/uiapi-lookup.d.ts +1 -1
- package/dist/{middlewares → types/middlewares}/uiapi-mrulists.d.ts +1 -1
- package/dist/{middlewares → types/middlewares}/uiapi-records.d.ts +1 -1
- package/dist/{middlewares → types/middlewares}/uiapi-relatedlist.d.ts +1 -1
- package/dist/{middlewares → types/middlewares}/uiapi-search.d.ts +1 -1
- package/dist/{middlewares → types/middlewares}/utils.d.ts +86 -86
- package/dist/{router.d.ts → types/router.d.ts} +17 -17
- package/dist/{utils → types/utils}/language.d.ts +19 -19
- package/package.json +3 -3
|
@@ -1,86 +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 {};
|
|
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 {};
|
|
@@ -1,17 +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;
|
|
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;
|
|
@@ -1,19 +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, };
|
|
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
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-network-aura",
|
|
3
|
-
"version": "1.124.
|
|
3
|
+
"version": "1.124.3",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS Network Adapter for Aura Runtime",
|
|
6
6
|
"main": "dist/ldsNetwork.js",
|
|
7
7
|
"module": "dist/ldsNetwork.js",
|
|
8
|
-
"types": "dist/main.d.ts",
|
|
8
|
+
"types": "dist/types/main.d.ts",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
14
|
"import": "./dist/ldsNetwork.js",
|
|
15
|
-
"types": "./dist/main.d.ts",
|
|
15
|
+
"types": "./dist/types/main.d.ts",
|
|
16
16
|
"default": "./dist/ldsNetwork.js"
|
|
17
17
|
}
|
|
18
18
|
},
|