@be-link/request 1.2.0 → 1.3.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/callFunction.d.ts +36 -0
- package/dist/index.d.ts +2 -35
- package/dist/index.js +8 -1
- package/dist/request.d.ts +12 -0
- package/package.json +4 -3
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface INotData<T> {
|
|
2
|
+
apiName: string;
|
|
3
|
+
funcName: string;
|
|
4
|
+
param: T;
|
|
5
|
+
[str: string]: any;
|
|
6
|
+
operateUser?: Record<string, any>;
|
|
7
|
+
}
|
|
8
|
+
export interface IData<T> {
|
|
9
|
+
moduleName: string;
|
|
10
|
+
serviceName: string;
|
|
11
|
+
funcName: string;
|
|
12
|
+
param: T;
|
|
13
|
+
[str: string]: any;
|
|
14
|
+
operateUser?: Record<string, any>;
|
|
15
|
+
}
|
|
16
|
+
export interface ICallFunctionOptions<T> {
|
|
17
|
+
name: string;
|
|
18
|
+
data: IData<T> | INotData<T>;
|
|
19
|
+
query?: Record<string, any>;
|
|
20
|
+
search?: string;
|
|
21
|
+
parse?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface ICallFunctionResponse<K> {
|
|
24
|
+
requestId: string;
|
|
25
|
+
data?: {
|
|
26
|
+
response_data?: string;
|
|
27
|
+
};
|
|
28
|
+
result?: {
|
|
29
|
+
msg: string;
|
|
30
|
+
data: K;
|
|
31
|
+
errorCode: number;
|
|
32
|
+
success: boolean;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
declare function callFunction<T, K>(params: ICallFunctionOptions<T>): Promise<K>;
|
|
36
|
+
export default callFunction;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
funcName: string;
|
|
4
|
-
param: T;
|
|
5
|
-
[str: string]: any;
|
|
6
|
-
operateUser?: Record<string, any>;
|
|
7
|
-
}
|
|
8
|
-
export interface IData<T> {
|
|
9
|
-
moduleName: string;
|
|
10
|
-
serviceName: string;
|
|
11
|
-
funcName: string;
|
|
12
|
-
param: T;
|
|
13
|
-
[str: string]: any;
|
|
14
|
-
operateUser?: Record<string, any>;
|
|
15
|
-
}
|
|
16
|
-
export interface ICallFunctionOptions<T> {
|
|
17
|
-
name: string;
|
|
18
|
-
data: IData<T> | INotData<T>;
|
|
19
|
-
query?: Record<string, any>;
|
|
20
|
-
search?: string;
|
|
21
|
-
parse?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export interface ICallFunctionResponse<K> {
|
|
24
|
-
requestId: string;
|
|
25
|
-
data?: {
|
|
26
|
-
response_data?: string;
|
|
27
|
-
};
|
|
28
|
-
result?: {
|
|
29
|
-
msg: string;
|
|
30
|
-
data: K;
|
|
31
|
-
errorCode: number;
|
|
32
|
-
success: boolean;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export declare function callFunction<T, K>(params: ICallFunctionOptions<T>): Promise<K>;
|
|
1
|
+
export { default as callFunction } from './callFunction';
|
|
2
|
+
export { default as request } from './request';
|