easy-soft-utility 2.7.19 → 2.7.21
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/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/utils/accessWayAssist.d.ts +8 -8
- package/es/utils/applicationAssist.d.ts +26 -26
- package/es/utils/arrayAssist.d.ts +5 -5
- package/es/utils/authorityCacheAssist.d.ts +16 -16
- package/es/utils/authorityLocalAssist.d.ts +10 -10
- package/es/utils/base64.d.ts +11 -11
- package/es/utils/cacheAssist.d.ts +77 -77
- package/es/utils/calculate.d.ts +5 -5
- package/es/utils/checkAssist.d.ts +121 -121
- package/es/utils/colorAssist.d.ts +31 -31
- package/es/utils/common.d.ts +107 -107
- package/es/utils/componentAssist.d.ts +17 -17
- package/es/utils/constants.d.ts +192 -192
- package/es/utils/convertAssist.d.ts +58 -58
- package/es/utils/convertExtraAssist.d.ts +15 -15
- package/es/utils/currentOperatorAssist.d.ts +17 -17
- package/es/utils/datetime.d.ts +66 -66
- package/es/utils/definition.d.ts +4 -4
- package/es/utils/dvaAssist.d.ts +43 -43
- package/es/utils/formatAssist.d.ts +44 -44
- package/es/utils/htmlAssist.d.ts +4 -4
- package/es/utils/httpAssist.d.ts +1 -1
- package/es/utils/index.d.ts +40 -40
- package/es/utils/localMetaDataAssist.d.ts +17 -17
- package/es/utils/localStorageAssist.d.ts +57 -57
- package/es/utils/lodashTools.d.ts +87 -87
- package/es/utils/loggerAssist.d.ts +173 -173
- package/es/utils/messagePromptAssist.d.ts +212 -212
- package/es/utils/meta.d.ts +85 -85
- package/es/utils/modelAssist.d.ts +41 -41
- package/es/utils/navigationAssist.d.ts +14 -14
- package/es/utils/nearestLocalhostNotify.d.ts +9 -9
- package/es/utils/notificationPromptAssist.d.ts +177 -177
- package/es/utils/parametersDataAssist.d.ts +16 -16
- package/es/utils/progressAssist.d.ts +18 -18
- package/es/utils/promptAssist.d.ts +35 -35
- package/es/utils/queryString.d.ts +8 -8
- package/es/utils/requestAssist.d.ts +218 -218
- package/es/utils/runtimeAssist.d.ts +15 -15
- package/es/utils/sessionStorageAssist.d.ts +57 -57
- package/es/utils/tokenAssist.d.ts +21 -21
- package/es/utils/tools.d.ts +21 -21
- package/es/utils/userInterfaceGenerate.d.ts +17 -17
- package/package.json +32 -32
|
@@ -1,218 +1,218 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Set request success code
|
|
3
|
-
* @param {number} code success code
|
|
4
|
-
*/
|
|
5
|
-
export function setSuccessCode(code: number): void;
|
|
6
|
-
/**
|
|
7
|
-
* Set request authentication fail code
|
|
8
|
-
* @param {number} code authentication fail code
|
|
9
|
-
*/
|
|
10
|
-
export function setAuthenticationFailCode(code: number): void;
|
|
11
|
-
/**
|
|
12
|
-
* Set prompt simulative request
|
|
13
|
-
* @param {boolean} value whether prompt simulative request
|
|
14
|
-
*/
|
|
15
|
-
export function setPromptSimulation(value: boolean): void;
|
|
16
|
-
/**
|
|
17
|
-
* Set the url global prefix
|
|
18
|
-
* @param {string} globalPrefix url global prefix, eg "V1" like api version
|
|
19
|
-
*/
|
|
20
|
-
export function setUrlGlobalPrefix(globalPrefix: string): void;
|
|
21
|
-
/**
|
|
22
|
-
* Set the real request handler
|
|
23
|
-
* @param {Function} handler handle real request
|
|
24
|
-
*/
|
|
25
|
-
export function setRequestHandler(handler: Function): void;
|
|
26
|
-
/**
|
|
27
|
-
* Set the authentication fail handler
|
|
28
|
-
* @param {Function} handler handle authentication fail
|
|
29
|
-
*/
|
|
30
|
-
export function setAuthenticationFailHandler(handler: Function): void;
|
|
31
|
-
/**
|
|
32
|
-
* Set the simulation authorize extra handler
|
|
33
|
-
* @param {Function} handler handle simulation authorize extra
|
|
34
|
-
*/
|
|
35
|
-
export function setSimulationAuthorizeExtraHandler(handler: Function): void;
|
|
36
|
-
/**
|
|
37
|
-
* Set the global header handler supplement
|
|
38
|
-
* @param {Function} handler handle global header handler supplement
|
|
39
|
-
*/
|
|
40
|
-
export function setGlobalHeaderSupplementHandler(handler: Function): void;
|
|
41
|
-
/**
|
|
42
|
-
* Pretreatment remote object data
|
|
43
|
-
* @param {Object} options request options
|
|
44
|
-
* @param {Object} options.source source object data
|
|
45
|
-
* @param {Function|null} options.pretreatment pretreatment source object data
|
|
46
|
-
* @param {Function|null} options.successCallback success callback handler
|
|
47
|
-
* @param {Function|null} options.failCallback fail callback handler
|
|
48
|
-
*/
|
|
49
|
-
export function pretreatmentRemoteSingleData({ source, pretreatment, successCallback, failCallback, }: {
|
|
50
|
-
source: Object;
|
|
51
|
-
pretreatment: Function | null;
|
|
52
|
-
successCallback: Function | null;
|
|
53
|
-
failCallback: Function | null;
|
|
54
|
-
}): {};
|
|
55
|
-
/**
|
|
56
|
-
* Pretreatment remote list data
|
|
57
|
-
* @param {Object} options handler options
|
|
58
|
-
* @param {Array} options.source source list data
|
|
59
|
-
* @param {Function|null} options.pretreatment pretreatment source list data
|
|
60
|
-
* @param {Function|null} options.itemPretreatment pretreatment source list data item
|
|
61
|
-
* @param {Function|null} options.successCallback success callback handler
|
|
62
|
-
* @param {Function|null} options.failCallback fail callback handler
|
|
63
|
-
*/
|
|
64
|
-
export function pretreatmentRemoteListData({ source, pretreatment, itemPretreatment, successCallback, failCallback, }: {
|
|
65
|
-
source: any[];
|
|
66
|
-
pretreatment: Function | null;
|
|
67
|
-
itemPretreatment: Function | null;
|
|
68
|
-
successCallback: Function | null;
|
|
69
|
-
failCallback: Function | null;
|
|
70
|
-
}): {};
|
|
71
|
-
/**
|
|
72
|
-
* Pretreatment remote page list data
|
|
73
|
-
* @param {Object} options handler options
|
|
74
|
-
* @param {Array} options.source source page list data
|
|
75
|
-
* @param {Function|null} options.pretreatment pretreatment source page list data
|
|
76
|
-
* @param {Function|null} options.itemPretreatment pretreatment source page list data item
|
|
77
|
-
* @param {Function|null} options.successCallback success callback handler
|
|
78
|
-
* @param {Function|null} options.failCallback fail callback handler
|
|
79
|
-
*/
|
|
80
|
-
export function pretreatmentRemotePageListData({ source, pretreatment, itemPretreatment, successCallback, failCallback, }: {
|
|
81
|
-
source: any[];
|
|
82
|
-
pretreatment: Function | null;
|
|
83
|
-
itemPretreatment: Function | null;
|
|
84
|
-
successCallback: Function | null;
|
|
85
|
-
failCallback: Function | null;
|
|
86
|
-
}): {};
|
|
87
|
-
/**
|
|
88
|
-
* Pretreatment request parameters
|
|
89
|
-
* @param {Object} parameters the parameters will pretreatment
|
|
90
|
-
* @param {Function} customHandle custom handler
|
|
91
|
-
*/
|
|
92
|
-
export function pretreatmentRequestParameters(parameters: Object, customHandle: Function): {
|
|
93
|
-
constructor: Function;
|
|
94
|
-
toString(): string;
|
|
95
|
-
toLocaleString(): string;
|
|
96
|
-
valueOf(): Object;
|
|
97
|
-
hasOwnProperty(v: PropertyKey): boolean;
|
|
98
|
-
isPrototypeOf(v: Object): boolean;
|
|
99
|
-
propertyIsEnumerable(v: PropertyKey): boolean;
|
|
100
|
-
};
|
|
101
|
-
/**
|
|
102
|
-
* handle list data assist
|
|
103
|
-
* @param {Object} state state
|
|
104
|
-
* @param {Object} action action
|
|
105
|
-
* @param {string} namespace model namespace
|
|
106
|
-
*/
|
|
107
|
-
export function handleListDataAssist(state: Object, action: Object, namespace: string): {
|
|
108
|
-
data: {};
|
|
109
|
-
constructor: Function;
|
|
110
|
-
toString(): string;
|
|
111
|
-
toLocaleString(): string;
|
|
112
|
-
valueOf(): Object;
|
|
113
|
-
hasOwnProperty(v: PropertyKey): boolean;
|
|
114
|
-
isPrototypeOf(v: Object): boolean;
|
|
115
|
-
propertyIsEnumerable(v: PropertyKey): boolean;
|
|
116
|
-
} | {
|
|
117
|
-
constructor: Function;
|
|
118
|
-
toString(): string;
|
|
119
|
-
toLocaleString(): string;
|
|
120
|
-
valueOf(): Object;
|
|
121
|
-
hasOwnProperty(v: PropertyKey): boolean;
|
|
122
|
-
isPrototypeOf(v: Object): boolean;
|
|
123
|
-
propertyIsEnumerable(v: PropertyKey): boolean;
|
|
124
|
-
};
|
|
125
|
-
export function handlePageListDataAssist(state: any, action: any, namespace: any): any;
|
|
126
|
-
export function handleAuthenticationFail(): void;
|
|
127
|
-
export function handleSimulationAuthorizeExtra(): boolean;
|
|
128
|
-
/**
|
|
129
|
-
* Begin request(remote request / local simulate requests)
|
|
130
|
-
* @param {Object} option request option
|
|
131
|
-
* @param {string} option.api request address
|
|
132
|
-
* @param {Object} option.params request params
|
|
133
|
-
* @param {Object} option.header request header
|
|
134
|
-
* @param {string} option.method "GET"/"POST"/"PUT"/"DELETE", default is requestMethod.post
|
|
135
|
-
* @param {string} option.mode request mode, default is requestMode.real
|
|
136
|
-
* @param {boolean} option.promptSimulation whether display simulate request message prompt
|
|
137
|
-
* @param {number} option.promptSimulationDelay display simulate request message prompt delay time, default is 500
|
|
138
|
-
* @param {number} option.simulateRequestDelay simulate request delay time, default is 0
|
|
139
|
-
* @param {Object} option.simulativeSuccessResponse simulate request success response
|
|
140
|
-
* @param {Object} option.simulativeFailResponse simulate request fail response
|
|
141
|
-
* @param {boolean} option.simulateRequestResult specifies whether the result is successful, generally used to debug
|
|
142
|
-
* @param {boolean} option.simulativeAuthorize set simulate request whether check token, only check mull or empty, generally used to debug
|
|
143
|
-
*/
|
|
144
|
-
export function request({ api, urlParams: urlParameters, params: parameters, header, method, mode, promptSimulation, promptSimulationDelay, simulateRequestDelay, simulativeSuccessResponse, simulativeFailResponse, simulateRequestResult, simulativeAuthorize, }: {
|
|
145
|
-
api: string;
|
|
146
|
-
params: Object;
|
|
147
|
-
header: Object;
|
|
148
|
-
method: string;
|
|
149
|
-
mode: string;
|
|
150
|
-
promptSimulation: boolean;
|
|
151
|
-
promptSimulationDelay: number;
|
|
152
|
-
simulateRequestDelay: number;
|
|
153
|
-
simulativeSuccessResponse: Object;
|
|
154
|
-
simulativeFailResponse: Object;
|
|
155
|
-
simulateRequestResult: boolean;
|
|
156
|
-
simulativeAuthorize: boolean;
|
|
157
|
-
}): Promise<void | {}>;
|
|
158
|
-
/**
|
|
159
|
-
* 封装模拟的错误返回
|
|
160
|
-
*/
|
|
161
|
-
export function buildSimulateRequestFailResponse({ response, code, message, needAuthorize, }: {
|
|
162
|
-
response: any;
|
|
163
|
-
code: any;
|
|
164
|
-
message: any;
|
|
165
|
-
needAuthorize?: boolean | undefined;
|
|
166
|
-
}): any;
|
|
167
|
-
/**
|
|
168
|
-
* 封装模拟的正确返回
|
|
169
|
-
*/
|
|
170
|
-
export function buildSimulateRequestSuccessResponse({ response, needAuthorize, }: {
|
|
171
|
-
response: any;
|
|
172
|
-
needAuthorize?: boolean | undefined;
|
|
173
|
-
}): any;
|
|
174
|
-
/**
|
|
175
|
-
* 封装正确的虚拟访问
|
|
176
|
-
*/
|
|
177
|
-
export function simulateSuccessRequest({ remoteResponse, needAuthorize, }: {
|
|
178
|
-
remoteResponse: any;
|
|
179
|
-
needAuthorize?: boolean | undefined;
|
|
180
|
-
}): Promise<{}>;
|
|
181
|
-
/**
|
|
182
|
-
* 封装失败的虚拟访问
|
|
183
|
-
*/
|
|
184
|
-
export function simulateFailRequest({ remoteResponse, needAuthorize, }: {
|
|
185
|
-
remoteResponse: any;
|
|
186
|
-
needAuthorize?: boolean | undefined;
|
|
187
|
-
}): Promise<{}>;
|
|
188
|
-
/**
|
|
189
|
-
* 封装模拟访问
|
|
190
|
-
*/
|
|
191
|
-
export function simulateRequest({ api, simulateRequestDelay, dataBuild, }: {
|
|
192
|
-
api?: string | undefined;
|
|
193
|
-
simulateRequestDelay?: number | undefined;
|
|
194
|
-
dataBuild: any;
|
|
195
|
-
}): Promise<{}>;
|
|
196
|
-
export namespace requestConfiguration {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
function handleSupplementGlobalHeader(): {};
|
|
205
|
-
|
|
206
|
-
function handleRequest({ url, method, data, header, option, }: {
|
|
207
|
-
url: any;
|
|
208
|
-
method?: string | undefined;
|
|
209
|
-
data?: {} | undefined;
|
|
210
|
-
header?: any[] | undefined;
|
|
211
|
-
option?: {} | undefined;
|
|
212
|
-
}): Promise<void>;
|
|
213
|
-
|
|
214
|
-
function handleAuthenticationFail(): void;
|
|
215
|
-
|
|
216
|
-
function handleSimulationAuthorizeExtra(): boolean;
|
|
217
|
-
|
|
218
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Set request success code
|
|
3
|
+
* @param {number} code success code
|
|
4
|
+
*/
|
|
5
|
+
export function setSuccessCode(code: number): void;
|
|
6
|
+
/**
|
|
7
|
+
* Set request authentication fail code
|
|
8
|
+
* @param {number} code authentication fail code
|
|
9
|
+
*/
|
|
10
|
+
export function setAuthenticationFailCode(code: number): void;
|
|
11
|
+
/**
|
|
12
|
+
* Set prompt simulative request
|
|
13
|
+
* @param {boolean} value whether prompt simulative request
|
|
14
|
+
*/
|
|
15
|
+
export function setPromptSimulation(value: boolean): void;
|
|
16
|
+
/**
|
|
17
|
+
* Set the url global prefix
|
|
18
|
+
* @param {string} globalPrefix url global prefix, eg "V1" like api version
|
|
19
|
+
*/
|
|
20
|
+
export function setUrlGlobalPrefix(globalPrefix: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* Set the real request handler
|
|
23
|
+
* @param {Function} handler handle real request
|
|
24
|
+
*/
|
|
25
|
+
export function setRequestHandler(handler: Function): void;
|
|
26
|
+
/**
|
|
27
|
+
* Set the authentication fail handler
|
|
28
|
+
* @param {Function} handler handle authentication fail
|
|
29
|
+
*/
|
|
30
|
+
export function setAuthenticationFailHandler(handler: Function): void;
|
|
31
|
+
/**
|
|
32
|
+
* Set the simulation authorize extra handler
|
|
33
|
+
* @param {Function} handler handle simulation authorize extra
|
|
34
|
+
*/
|
|
35
|
+
export function setSimulationAuthorizeExtraHandler(handler: Function): void;
|
|
36
|
+
/**
|
|
37
|
+
* Set the global header handler supplement
|
|
38
|
+
* @param {Function} handler handle global header handler supplement
|
|
39
|
+
*/
|
|
40
|
+
export function setGlobalHeaderSupplementHandler(handler: Function): void;
|
|
41
|
+
/**
|
|
42
|
+
* Pretreatment remote object data
|
|
43
|
+
* @param {Object} options request options
|
|
44
|
+
* @param {Object} options.source source object data
|
|
45
|
+
* @param {Function|null} options.pretreatment pretreatment source object data
|
|
46
|
+
* @param {Function|null} options.successCallback success callback handler
|
|
47
|
+
* @param {Function|null} options.failCallback fail callback handler
|
|
48
|
+
*/
|
|
49
|
+
export function pretreatmentRemoteSingleData({ source, pretreatment, successCallback, failCallback, }: {
|
|
50
|
+
source: Object;
|
|
51
|
+
pretreatment: Function | null;
|
|
52
|
+
successCallback: Function | null;
|
|
53
|
+
failCallback: Function | null;
|
|
54
|
+
}): {};
|
|
55
|
+
/**
|
|
56
|
+
* Pretreatment remote list data
|
|
57
|
+
* @param {Object} options handler options
|
|
58
|
+
* @param {Array} options.source source list data
|
|
59
|
+
* @param {Function|null} options.pretreatment pretreatment source list data
|
|
60
|
+
* @param {Function|null} options.itemPretreatment pretreatment source list data item
|
|
61
|
+
* @param {Function|null} options.successCallback success callback handler
|
|
62
|
+
* @param {Function|null} options.failCallback fail callback handler
|
|
63
|
+
*/
|
|
64
|
+
export function pretreatmentRemoteListData({ source, pretreatment, itemPretreatment, successCallback, failCallback, }: {
|
|
65
|
+
source: any[];
|
|
66
|
+
pretreatment: Function | null;
|
|
67
|
+
itemPretreatment: Function | null;
|
|
68
|
+
successCallback: Function | null;
|
|
69
|
+
failCallback: Function | null;
|
|
70
|
+
}): {};
|
|
71
|
+
/**
|
|
72
|
+
* Pretreatment remote page list data
|
|
73
|
+
* @param {Object} options handler options
|
|
74
|
+
* @param {Array} options.source source page list data
|
|
75
|
+
* @param {Function|null} options.pretreatment pretreatment source page list data
|
|
76
|
+
* @param {Function|null} options.itemPretreatment pretreatment source page list data item
|
|
77
|
+
* @param {Function|null} options.successCallback success callback handler
|
|
78
|
+
* @param {Function|null} options.failCallback fail callback handler
|
|
79
|
+
*/
|
|
80
|
+
export function pretreatmentRemotePageListData({ source, pretreatment, itemPretreatment, successCallback, failCallback, }: {
|
|
81
|
+
source: any[];
|
|
82
|
+
pretreatment: Function | null;
|
|
83
|
+
itemPretreatment: Function | null;
|
|
84
|
+
successCallback: Function | null;
|
|
85
|
+
failCallback: Function | null;
|
|
86
|
+
}): {};
|
|
87
|
+
/**
|
|
88
|
+
* Pretreatment request parameters
|
|
89
|
+
* @param {Object} parameters the parameters will pretreatment
|
|
90
|
+
* @param {Function} customHandle custom handler
|
|
91
|
+
*/
|
|
92
|
+
export function pretreatmentRequestParameters(parameters: Object, customHandle: Function): {
|
|
93
|
+
constructor: Function;
|
|
94
|
+
toString(): string;
|
|
95
|
+
toLocaleString(): string;
|
|
96
|
+
valueOf(): Object;
|
|
97
|
+
hasOwnProperty(v: PropertyKey): boolean;
|
|
98
|
+
isPrototypeOf(v: Object): boolean;
|
|
99
|
+
propertyIsEnumerable(v: PropertyKey): boolean;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* handle list data assist
|
|
103
|
+
* @param {Object} state state
|
|
104
|
+
* @param {Object} action action
|
|
105
|
+
* @param {string} namespace model namespace
|
|
106
|
+
*/
|
|
107
|
+
export function handleListDataAssist(state: Object, action: Object, namespace: string): {
|
|
108
|
+
data: {};
|
|
109
|
+
constructor: Function;
|
|
110
|
+
toString(): string;
|
|
111
|
+
toLocaleString(): string;
|
|
112
|
+
valueOf(): Object;
|
|
113
|
+
hasOwnProperty(v: PropertyKey): boolean;
|
|
114
|
+
isPrototypeOf(v: Object): boolean;
|
|
115
|
+
propertyIsEnumerable(v: PropertyKey): boolean;
|
|
116
|
+
} | {
|
|
117
|
+
constructor: Function;
|
|
118
|
+
toString(): string;
|
|
119
|
+
toLocaleString(): string;
|
|
120
|
+
valueOf(): Object;
|
|
121
|
+
hasOwnProperty(v: PropertyKey): boolean;
|
|
122
|
+
isPrototypeOf(v: Object): boolean;
|
|
123
|
+
propertyIsEnumerable(v: PropertyKey): boolean;
|
|
124
|
+
};
|
|
125
|
+
export function handlePageListDataAssist(state: any, action: any, namespace: any): any;
|
|
126
|
+
export function handleAuthenticationFail(): void;
|
|
127
|
+
export function handleSimulationAuthorizeExtra(): boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Begin request(remote request / local simulate requests)
|
|
130
|
+
* @param {Object} option request option
|
|
131
|
+
* @param {string} option.api request address
|
|
132
|
+
* @param {Object} option.params request params
|
|
133
|
+
* @param {Object} option.header request header
|
|
134
|
+
* @param {string} option.method "GET"/"POST"/"PUT"/"DELETE", default is requestMethod.post
|
|
135
|
+
* @param {string} option.mode request mode, default is requestMode.real
|
|
136
|
+
* @param {boolean} option.promptSimulation whether display simulate request message prompt
|
|
137
|
+
* @param {number} option.promptSimulationDelay display simulate request message prompt delay time, default is 500
|
|
138
|
+
* @param {number} option.simulateRequestDelay simulate request delay time, default is 0
|
|
139
|
+
* @param {Object} option.simulativeSuccessResponse simulate request success response
|
|
140
|
+
* @param {Object} option.simulativeFailResponse simulate request fail response
|
|
141
|
+
* @param {boolean} option.simulateRequestResult specifies whether the result is successful, generally used to debug
|
|
142
|
+
* @param {boolean} option.simulativeAuthorize set simulate request whether check token, only check mull or empty, generally used to debug
|
|
143
|
+
*/
|
|
144
|
+
export function request({ api, urlParams: urlParameters, params: parameters, header, method, mode, promptSimulation, promptSimulationDelay, simulateRequestDelay, simulativeSuccessResponse, simulativeFailResponse, simulateRequestResult, simulativeAuthorize, }: {
|
|
145
|
+
api: string;
|
|
146
|
+
params: Object;
|
|
147
|
+
header: Object;
|
|
148
|
+
method: string;
|
|
149
|
+
mode: string;
|
|
150
|
+
promptSimulation: boolean;
|
|
151
|
+
promptSimulationDelay: number;
|
|
152
|
+
simulateRequestDelay: number;
|
|
153
|
+
simulativeSuccessResponse: Object;
|
|
154
|
+
simulativeFailResponse: Object;
|
|
155
|
+
simulateRequestResult: boolean;
|
|
156
|
+
simulativeAuthorize: boolean;
|
|
157
|
+
}): Promise<void | {}>;
|
|
158
|
+
/**
|
|
159
|
+
* 封装模拟的错误返回
|
|
160
|
+
*/
|
|
161
|
+
export function buildSimulateRequestFailResponse({ response, code, message, needAuthorize, }: {
|
|
162
|
+
response: any;
|
|
163
|
+
code: any;
|
|
164
|
+
message: any;
|
|
165
|
+
needAuthorize?: boolean | undefined;
|
|
166
|
+
}): any;
|
|
167
|
+
/**
|
|
168
|
+
* 封装模拟的正确返回
|
|
169
|
+
*/
|
|
170
|
+
export function buildSimulateRequestSuccessResponse({ response, needAuthorize, }: {
|
|
171
|
+
response: any;
|
|
172
|
+
needAuthorize?: boolean | undefined;
|
|
173
|
+
}): any;
|
|
174
|
+
/**
|
|
175
|
+
* 封装正确的虚拟访问
|
|
176
|
+
*/
|
|
177
|
+
export function simulateSuccessRequest({ remoteResponse, needAuthorize, }: {
|
|
178
|
+
remoteResponse: any;
|
|
179
|
+
needAuthorize?: boolean | undefined;
|
|
180
|
+
}): Promise<{}>;
|
|
181
|
+
/**
|
|
182
|
+
* 封装失败的虚拟访问
|
|
183
|
+
*/
|
|
184
|
+
export function simulateFailRequest({ remoteResponse, needAuthorize, }: {
|
|
185
|
+
remoteResponse: any;
|
|
186
|
+
needAuthorize?: boolean | undefined;
|
|
187
|
+
}): Promise<{}>;
|
|
188
|
+
/**
|
|
189
|
+
* 封装模拟访问
|
|
190
|
+
*/
|
|
191
|
+
export function simulateRequest({ api, simulateRequestDelay, dataBuild, }: {
|
|
192
|
+
api?: string | undefined;
|
|
193
|
+
simulateRequestDelay?: number | undefined;
|
|
194
|
+
dataBuild: any;
|
|
195
|
+
}): Promise<{}>;
|
|
196
|
+
export namespace requestConfiguration {
|
|
197
|
+
let successCodeSetComplete: boolean;
|
|
198
|
+
let authenticationFailCodeSetComplete: boolean;
|
|
199
|
+
let successCode: number;
|
|
200
|
+
let authenticationFailCode: number;
|
|
201
|
+
let promptSimulation: boolean;
|
|
202
|
+
let promptSimulationSetComplete: boolean;
|
|
203
|
+
let urlGlobalPrefix: string;
|
|
204
|
+
function handleSupplementGlobalHeader(): {};
|
|
205
|
+
let handleSupplementGlobalHeaderSetComplete: boolean;
|
|
206
|
+
function handleRequest({ url, method, data, header, option, }: {
|
|
207
|
+
url: any;
|
|
208
|
+
method?: string | undefined;
|
|
209
|
+
data?: {} | undefined;
|
|
210
|
+
header?: any[] | undefined;
|
|
211
|
+
option?: {} | undefined;
|
|
212
|
+
}): Promise<void>;
|
|
213
|
+
let handleRequestSetComplete: boolean;
|
|
214
|
+
function handleAuthenticationFail(): void;
|
|
215
|
+
let handleAuthenticationFailSetComplete: boolean;
|
|
216
|
+
function handleSimulationAuthorizeExtra(): boolean;
|
|
217
|
+
let handleSimulationAuthorizeExtraSetComplete: boolean;
|
|
218
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Set cache mount target.
|
|
3
|
-
*/
|
|
4
|
-
export function setRuntimeDataStorage(mountTarget: any): void;
|
|
5
|
-
export function getRuntimeDataStorage(): null;
|
|
6
|
-
export function getLastRequestExceptionMessage(): any;
|
|
7
|
-
export function setLastRequestExceptionMessage({ code, message, time }: {
|
|
8
|
-
code: any;
|
|
9
|
-
message: any;
|
|
10
|
-
time: any;
|
|
11
|
-
}): void;
|
|
12
|
-
export namespace runtimeConfiguration {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Set cache mount target.
|
|
3
|
+
*/
|
|
4
|
+
export function setRuntimeDataStorage(mountTarget: any): void;
|
|
5
|
+
export function getRuntimeDataStorage(): null;
|
|
6
|
+
export function getLastRequestExceptionMessage(): any;
|
|
7
|
+
export function setLastRequestExceptionMessage({ code, message, time }: {
|
|
8
|
+
code: any;
|
|
9
|
+
message: any;
|
|
10
|
+
time: any;
|
|
11
|
+
}): void;
|
|
12
|
+
export namespace runtimeConfiguration {
|
|
13
|
+
let runtimeDataStorage: null;
|
|
14
|
+
let runtimeDataStorageSetComplete: boolean;
|
|
15
|
+
}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Set session storage getter
|
|
3
|
-
* @param {Function} handler the cache getter handler
|
|
4
|
-
*/
|
|
5
|
-
export function setSessionStorageGetter(handler: Function): void;
|
|
6
|
-
/**
|
|
7
|
-
* Set session storage setter
|
|
8
|
-
* @param {Function} handler the cache setter handler
|
|
9
|
-
*/
|
|
10
|
-
export function setSessionStorageSetter(handler: Function): void;
|
|
11
|
-
/**
|
|
12
|
-
* Set session storage remover
|
|
13
|
-
* @param {Function} handler the cache remover handler
|
|
14
|
-
*/
|
|
15
|
-
export function setSessionStorageRemover(handler: Function): void;
|
|
16
|
-
/**
|
|
17
|
-
* Set session storage remover
|
|
18
|
-
* @param {Function} handler the cache flusher handler
|
|
19
|
-
*/
|
|
20
|
-
export function setSessionStorageFlusher(handler: Function): void;
|
|
21
|
-
/**
|
|
22
|
-
* Get text to session storage with key
|
|
23
|
-
* @param {string} key the cache key
|
|
24
|
-
*/
|
|
25
|
-
export function getStringFromSessionStorage(key: string): void;
|
|
26
|
-
/**
|
|
27
|
-
* Get json to session storage with key
|
|
28
|
-
* @param {string} key the cache key
|
|
29
|
-
*/
|
|
30
|
-
export function getJsonFromSessionStorage(key: string): any;
|
|
31
|
-
/**
|
|
32
|
-
* Save text to session storage with key
|
|
33
|
-
* @param {string} key the cache key
|
|
34
|
-
* @param {string} text the test will be cached
|
|
35
|
-
*/
|
|
36
|
-
export function saveStringToSessionStorage(key: string, text: string): void;
|
|
37
|
-
/**
|
|
38
|
-
* Save json to session storage with key
|
|
39
|
-
* @param {string} key the cache key
|
|
40
|
-
* @param {Object} data the data will be cached
|
|
41
|
-
*/
|
|
42
|
-
export function saveJsonToSessionStorage(key: string, data: Object): void;
|
|
43
|
-
/**
|
|
44
|
-
* Remove session storage by key
|
|
45
|
-
* @param {string} key the cache key
|
|
46
|
-
*/
|
|
47
|
-
export function removeSessionStorage(key: string): void;
|
|
48
|
-
/**
|
|
49
|
-
* Flush session storage
|
|
50
|
-
*/
|
|
51
|
-
export function flushSessionStorage(): void;
|
|
52
|
-
export namespace sessionStorageAssist {
|
|
53
|
-
function getStorage(key: any): void;
|
|
54
|
-
function setStorage(key: any, value: any): void;
|
|
55
|
-
function removeStorage(key: any): void;
|
|
56
|
-
function flushStorage(): void;
|
|
57
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Set session storage getter
|
|
3
|
+
* @param {Function} handler the cache getter handler
|
|
4
|
+
*/
|
|
5
|
+
export function setSessionStorageGetter(handler: Function): void;
|
|
6
|
+
/**
|
|
7
|
+
* Set session storage setter
|
|
8
|
+
* @param {Function} handler the cache setter handler
|
|
9
|
+
*/
|
|
10
|
+
export function setSessionStorageSetter(handler: Function): void;
|
|
11
|
+
/**
|
|
12
|
+
* Set session storage remover
|
|
13
|
+
* @param {Function} handler the cache remover handler
|
|
14
|
+
*/
|
|
15
|
+
export function setSessionStorageRemover(handler: Function): void;
|
|
16
|
+
/**
|
|
17
|
+
* Set session storage remover
|
|
18
|
+
* @param {Function} handler the cache flusher handler
|
|
19
|
+
*/
|
|
20
|
+
export function setSessionStorageFlusher(handler: Function): void;
|
|
21
|
+
/**
|
|
22
|
+
* Get text to session storage with key
|
|
23
|
+
* @param {string} key the cache key
|
|
24
|
+
*/
|
|
25
|
+
export function getStringFromSessionStorage(key: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Get json to session storage with key
|
|
28
|
+
* @param {string} key the cache key
|
|
29
|
+
*/
|
|
30
|
+
export function getJsonFromSessionStorage(key: string): any;
|
|
31
|
+
/**
|
|
32
|
+
* Save text to session storage with key
|
|
33
|
+
* @param {string} key the cache key
|
|
34
|
+
* @param {string} text the test will be cached
|
|
35
|
+
*/
|
|
36
|
+
export function saveStringToSessionStorage(key: string, text: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* Save json to session storage with key
|
|
39
|
+
* @param {string} key the cache key
|
|
40
|
+
* @param {Object} data the data will be cached
|
|
41
|
+
*/
|
|
42
|
+
export function saveJsonToSessionStorage(key: string, data: Object): void;
|
|
43
|
+
/**
|
|
44
|
+
* Remove session storage by key
|
|
45
|
+
* @param {string} key the cache key
|
|
46
|
+
*/
|
|
47
|
+
export function removeSessionStorage(key: string): void;
|
|
48
|
+
/**
|
|
49
|
+
* Flush session storage
|
|
50
|
+
*/
|
|
51
|
+
export function flushSessionStorage(): void;
|
|
52
|
+
export namespace sessionStorageAssist {
|
|
53
|
+
function getStorage(key: any): void;
|
|
54
|
+
function setStorage(key: any, value: any): void;
|
|
55
|
+
function removeStorage(key: any): void;
|
|
56
|
+
function flushStorage(): void;
|
|
57
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get token catch key
|
|
3
|
-
*/
|
|
4
|
-
export function getTokenKeyName(): string;
|
|
5
|
-
/**
|
|
6
|
-
* Get token catch
|
|
7
|
-
*/
|
|
8
|
-
export function getToken(): void;
|
|
9
|
-
/**
|
|
10
|
-
* Set token catch
|
|
11
|
-
* @param {string} value
|
|
12
|
-
*/
|
|
13
|
-
export function setToken(value: string): void;
|
|
14
|
-
/**
|
|
15
|
-
* Remove token catch
|
|
16
|
-
*/
|
|
17
|
-
export function removeToken(): void;
|
|
18
|
-
/**
|
|
19
|
-
* build token object
|
|
20
|
-
*/
|
|
21
|
-
export function buildTokenData(): {};
|
|
1
|
+
/**
|
|
2
|
+
* Get token catch key
|
|
3
|
+
*/
|
|
4
|
+
export function getTokenKeyName(): string;
|
|
5
|
+
/**
|
|
6
|
+
* Get token catch
|
|
7
|
+
*/
|
|
8
|
+
export function getToken(): void;
|
|
9
|
+
/**
|
|
10
|
+
* Set token catch
|
|
11
|
+
* @param {string} value
|
|
12
|
+
*/
|
|
13
|
+
export function setToken(value: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* Remove token catch
|
|
16
|
+
*/
|
|
17
|
+
export function removeToken(): void;
|
|
18
|
+
/**
|
|
19
|
+
* build token object
|
|
20
|
+
*/
|
|
21
|
+
export function buildTokenData(): {};
|