halo-fe 1.0.5 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +3453 -2365
- package/dist/style.css +1 -1
- package/dist/{vendor-crypto-js-B6Qe-gIg.js → vendor-crypto-js-DWn5nTKL.js} +3 -1
- package/dist/vendor-xlsx-js-style-DMPNZPOx.js +11862 -0
- package/esm/coms/Code.vue.d.ts +1 -1
- package/esm/coms/Fill.vue.d.ts +15 -0
- package/esm/coms/RichText.vue.d.ts +24 -0
- package/esm/coms/Scroller.vue.d.ts +28 -0
- package/esm/coms/index.d.ts +5 -1
- package/esm/coms/types/RichTextOptions.d.ts +14 -0
- package/esm/coms/types/RichTextProps.d.ts +12 -0
- package/esm/coms/types/ScrollerProps.d.ts +15 -0
- package/esm/coms/types/index.d.ts +4 -1
- package/esm/drivers/IDisposable.d.ts +4 -0
- package/esm/drivers/bridges/index.d.ts +1 -0
- package/esm/drivers/cdns/index.d.ts +2 -2
- package/esm/drivers/driver-helper.d.ts +46 -0
- package/esm/drivers/encoders/Encoder.d.ts +6 -1
- package/esm/drivers/encoders/EncoderFactory.d.ts +0 -1
- package/esm/drivers/encoders/IEncoder.d.ts +7 -3
- package/esm/drivers/encoders/implement/Base64Encoder.d.ts +1 -1
- package/esm/drivers/encoders/index.d.ts +2 -2
- package/esm/drivers/excels/index.d.ts +2 -3
- package/esm/drivers/explainers/index.d.ts +1 -2
- package/esm/drivers/factories/Factories.d.ts +55 -0
- package/esm/drivers/factories/Factory.d.ts +9 -0
- package/esm/drivers/factories/IFactory.d.ts +4 -0
- package/esm/drivers/factories/implement/CdnFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/EncoderFactory.d.ts +17 -0
- package/esm/drivers/factories/implement/ExcelFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/ExplainerFactory.d.ts +6 -0
- package/esm/drivers/factories/implement/FeatureFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/HasherFactory.d.ts +11 -0
- package/esm/drivers/factories/implement/HttpFactory.d.ts +18 -0
- package/esm/drivers/factories/implement/ProviderFactory.d.ts +18 -0
- package/esm/drivers/factories/implement/SignerFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/SsoFactory.d.ts +17 -0
- package/esm/drivers/factories/implement/TaskFactory.d.ts +9 -0
- package/esm/drivers/factories/implement/VideoFactory.d.ts +3 -0
- package/esm/drivers/factories/implement/VoiceFactory.d.ts +6 -0
- package/esm/drivers/factories/implement/index.d.ts +11 -0
- package/esm/drivers/factories/index.d.ts +14 -26
- package/esm/drivers/features/index.d.ts +2 -3
- package/esm/drivers/hashers/HasherFactory.d.ts +0 -1
- package/esm/drivers/hashers/index.d.ts +2 -3
- package/esm/drivers/https/Http.d.ts +5 -5
- package/esm/drivers/https/HttpFactory.d.ts +0 -2
- package/esm/drivers/https/IHttp.d.ts +4 -4
- package/esm/drivers/https/entities/HttpResponse.d.ts +13 -1
- package/esm/drivers/https/implements/DefaultHttp.d.ts +1 -0
- package/esm/drivers/https/implements/HaloHttp.d.ts +28 -4
- package/esm/drivers/https/index.d.ts +2 -3
- package/esm/drivers/index.d.ts +7 -1
- package/esm/drivers/providers/implements/CookieProvider.d.ts +3 -0
- package/esm/drivers/providers/implements/StorageHelper.d.ts +34 -0
- package/esm/drivers/providers/index.d.ts +2 -3
- package/esm/drivers/requesters/IRequester.d.ts +25 -0
- package/esm/drivers/requesters/Requester.d.ts +13 -0
- package/esm/drivers/requesters/RequesterFactory.d.ts +21 -0
- package/esm/drivers/requesters/entities/HttpRequest.d.ts +34 -0
- package/esm/drivers/requesters/entities/HttpResponse.d.ts +19 -0
- package/esm/drivers/requesters/implements/DefaultRequester.d.ts +12 -0
- package/esm/drivers/requesters/implements/LocalRequester.d.ts +43 -0
- package/esm/drivers/requesters/implements/MkRequester.d.ts +40 -0
- package/esm/drivers/requesters/index.d.ts +5 -0
- package/esm/drivers/signers/implements/DefaultSigner.d.ts +0 -2
- package/esm/drivers/signers/index.d.ts +2 -3
- package/esm/drivers/ssos/index.d.ts +2 -3
- package/esm/drivers/tasks/ITask.d.ts +12 -0
- package/esm/drivers/tasks/Task.d.ts +10 -0
- package/esm/drivers/tasks/implement/MemoryTask.d.ts +11 -0
- package/esm/drivers/tasks/index.d.ts +2 -0
- package/esm/drivers/videos/VideoFactory.d.ts +3 -0
- package/esm/drivers/videos/index.d.ts +1 -0
- package/esm/drivers/voices/IVoice.d.ts +2 -1
- package/esm/drivers/voices/Voice.d.ts +8 -0
- package/esm/drivers/voices/VoiceFactory.d.ts +6 -1
- package/esm/drivers/voices/implement/DefaultVoice.d.ts +4 -2
- package/esm/drivers/voices/implement/TencentVoice.d.ts +4 -2
- package/esm/drivers/voices/index.d.ts +1 -0
- package/esm/helpers/ArrayHelper.d.ts +98 -0
- package/esm/helpers/BrowserHelper.d.ts +10 -0
- package/esm/helpers/ComponentHelper.d.ts +18 -0
- package/esm/helpers/DictionaryHelper.d.ts +18 -0
- package/esm/helpers/DomHelper.d.ts +95 -0
- package/esm/helpers/EventHelper.d.ts +30 -0
- package/esm/helpers/FileHelper.d.ts +22 -0
- package/esm/helpers/HtmlHelper.d.ts +14 -0
- package/esm/helpers/ImageHelper.d.ts +10 -0
- package/esm/helpers/JsonHelper.d.ts +35 -0
- package/esm/helpers/MathHelper.d.ts +54 -0
- package/esm/helpers/MicroHelper.d.ts +10 -0
- package/esm/helpers/MountHelper.d.ts +14 -0
- package/esm/helpers/ObjectHelper.d.ts +38 -0
- package/esm/helpers/ScriptHelper.d.ts +31 -0
- package/esm/helpers/ScrollHelper.d.ts +14 -0
- package/esm/helpers/SignHelper.d.ts +14 -0
- package/esm/helpers/StringHelper.d.ts +94 -0
- package/esm/helpers/TaskHelper.d.ts +26 -0
- package/esm/helpers/TimeHelper.d.ts +66 -0
- package/esm/helpers/TreeHelper.d.ts +54 -0
- package/esm/helpers/TypeHelper.d.ts +26 -0
- package/esm/helpers/UrlHelper.d.ts +88 -0
- package/esm/helpers/index.d.ts +25 -26
- package/esm/helpers/json-helper.d.ts +4 -12
- package/esm/helpers/object-helper.d.ts +0 -4
- package/esm/helpers/time-helper.d.ts +3 -7
- package/esm/helpers/types/TreeNodeProp.d.ts +6 -0
- package/esm/helpers/types/index.d.ts +2 -0
- package/esm/helpers/url-helper.d.ts +2 -2
- package/esm/main.d.ts +5 -4
- package/esm/plugins/index.d.ts +2 -2
- package/esm/plugins/types/IMessager.d.ts +1 -1
- package/esm/{services/types/IMessager.d.ts → plugins/types/IMessenger.d.ts} +4 -4
- package/esm/plugins/types/index.d.ts +8 -5
- package/esm/repos/SettingRepo.d.ts +11 -0
- package/esm/repos/index.d.ts +3 -0
- package/esm/services/index.d.ts +14 -1
- package/esm/servs/IServ.d.ts +6 -0
- package/esm/servs/Serv.d.ts +4 -0
- package/esm/servs/ServFactory.d.ts +11 -0
- package/esm/servs/implement/ConfigServ.d.ts +66 -0
- package/esm/servs/implement/DriverServ.d.ts +36 -0
- package/esm/servs/implement/EnvServ.d.ts +14 -0
- package/esm/servs/implement/LogServ.d.ts +19 -0
- package/esm/servs/implement/SettingServ.d.ts +42 -0
- package/esm/servs/implement/SocketServ.d.ts +38 -0
- package/esm/servs/implement/UserServ.d.ts +47 -0
- package/esm/servs/index.d.ts +15 -0
- package/esm/stores/config.d.ts +6 -10
- package/esm/stores/driver.d.ts +6 -2
- package/esm/stores/index.d.ts +2 -3
- package/esm/stores/setting.d.ts +4 -0
- package/esm/stores/user.d.ts +7 -3
- package/esm/svcs/ISvc.d.ts +6 -0
- package/esm/svcs/Svc.d.ts +4 -0
- package/esm/svcs/SvcFactory.d.ts +11 -0
- package/esm/svcs/implement/ConfigSvc.d.ts +75 -0
- package/esm/svcs/implement/DriverSvc.d.ts +36 -0
- package/esm/svcs/implement/EnvSvc.d.ts +14 -0
- package/esm/svcs/implement/LogSvc.d.ts +19 -0
- package/esm/svcs/implement/SettingSvc.d.ts +42 -0
- package/esm/svcs/implement/SocketSvc.d.ts +38 -0
- package/esm/svcs/implement/UserSvc.d.ts +47 -0
- package/esm/svcs/index.d.ts +34 -0
- package/esm/svcs/proxies/driverSvc.d.ts +18 -0
- package/esm/svcs/proxies/index.d.ts +2 -0
- package/esm/thirds/index.d.ts +8 -0
- package/esm/types/CreateOptions.d.ts +18 -0
- package/esm/types/index.d.ts +2 -0
- package/esm/utilities/EventUtility.d.ts +39 -8
- package/esm/utilities/index.d.ts +1 -0
- package/esm/utilities/types/DragEvent.d.ts +11 -0
- package/esm/utilities/types/DragOptions.d.ts +28 -0
- package/esm/utilities/types/Position.d.ts +15 -0
- package/esm/utilities/types/Range.d.ts +10 -0
- package/esm/utilities/types/Rect.d.ts +6 -0
- package/esm/utilities/types/index.d.ts +5 -0
- package/package.json +9 -8
- package/dist/vendor-@vue-l0sNRNKZ.js +0 -1
- package/dist/vendor-pinia-DVLspbiC.js +0 -310
- package/dist/vendor-vue-demi-CIhrFbpB.js +0 -17
- package/esm/services/types/IMessage.d.ts +0 -14
- package/esm/services/types/index.d.ts +0 -2
@@ -7,14 +7,14 @@ import HttpResponse from "./entities/HttpResponse";
|
|
7
7
|
declare abstract class Http implements IHttp {
|
8
8
|
type: string;
|
9
9
|
abstract open(conn: string): Promise<void>;
|
10
|
-
onRequest: (request: HttpRequest) => void
|
11
|
-
onResponse: (response: HttpResponse) => void
|
12
|
-
get(path: string): Promise<any>;
|
13
|
-
sendGet(path: string): Promise<HttpResponse>;
|
10
|
+
onRequest: (request: HttpRequest) => Promise<void>;
|
11
|
+
onResponse: (response: HttpResponse) => Promise<void>;
|
12
|
+
get(path: string, params?: any): Promise<any>;
|
13
|
+
sendGet(path: string, params?: any): Promise<HttpResponse>;
|
14
14
|
post(path: string, body: any): Promise<any>;
|
15
15
|
sendPost(path: string, body?: any): Promise<HttpResponse>;
|
16
16
|
patch(path: string): Promise<any>;
|
17
|
-
sendPatch(path: string, pairs
|
17
|
+
sendPatch(path: string, pairs?: any): Promise<HttpResponse>;
|
18
18
|
abstract send(request: HttpRequest): Promise<HttpResponse>;
|
19
19
|
/**
|
20
20
|
* 获取请求消息
|
@@ -5,12 +5,10 @@ import Factory from "../factories/Factory";
|
|
5
5
|
*/
|
6
6
|
declare class HttpFactory extends Factory<IHttp> {
|
7
7
|
getInstances(): IHttp[];
|
8
|
-
private _default;
|
9
8
|
/**
|
10
9
|
* 获取默认请求器
|
11
10
|
*/
|
12
11
|
getDefault(): Promise<IHttp>;
|
13
|
-
private halo;
|
14
12
|
/**
|
15
13
|
* 获取本地请求实例
|
16
14
|
* 获取完毕后,下游第一行代码就要配置消息服务
|
@@ -12,19 +12,19 @@ interface IHttp extends IDriver {
|
|
12
12
|
/**
|
13
13
|
* 请求时执行
|
14
14
|
*/
|
15
|
-
onRequest: (request: HttpRequest) => void
|
15
|
+
onRequest: (request: HttpRequest) => Promise<void>;
|
16
16
|
/**
|
17
17
|
* 响应时执行
|
18
18
|
*/
|
19
|
-
onResponse: (response: HttpResponse) => void
|
19
|
+
onResponse: (response: HttpResponse) => Promise<void>;
|
20
20
|
/**
|
21
21
|
* 发送GET请求,并得到响应体
|
22
22
|
*/
|
23
|
-
get(path: string): Promise<any>;
|
23
|
+
get(path: string, params?: any): Promise<any>;
|
24
24
|
/**
|
25
25
|
* 发送GET请求
|
26
26
|
*/
|
27
|
-
sendGet(path: string): Promise<HttpResponse>;
|
27
|
+
sendGet(path: string, params?: any): Promise<HttpResponse>;
|
28
28
|
/**
|
29
29
|
* 发送Post请求,并得到响应体
|
30
30
|
*/
|
@@ -5,9 +5,21 @@ import HttpMessage from "./HttpMessage";
|
|
5
5
|
*/
|
6
6
|
declare class HttpResponse extends HttpMessage {
|
7
7
|
/**
|
8
|
-
*
|
8
|
+
* 是否成功
|
9
|
+
*/
|
10
|
+
success: boolean;
|
11
|
+
/**
|
12
|
+
* 错误消息
|
13
|
+
*/
|
14
|
+
message: string;
|
15
|
+
/**
|
16
|
+
* 请求耗时(ms)
|
9
17
|
*/
|
10
18
|
elapsed: number;
|
19
|
+
/**
|
20
|
+
* 响应状态码
|
21
|
+
*/
|
22
|
+
status: number;
|
11
23
|
/**
|
12
24
|
* 对应的请求信息
|
13
25
|
*/
|
@@ -2,6 +2,8 @@ import Http from "../Http";
|
|
2
2
|
import HttpRequest from "../entities/HttpRequest";
|
3
3
|
import HttpResponse from "../entities/HttpResponse";
|
4
4
|
import IHttp from "../IHttp";
|
5
|
+
import { ISso } from "../../ssos";
|
6
|
+
import { ISigner } from "../../signers";
|
5
7
|
/**
|
6
8
|
* 框架请求器
|
7
9
|
*/
|
@@ -11,10 +13,34 @@ declare class HaloHttp extends Http {
|
|
11
13
|
* 基准地址
|
12
14
|
*/
|
13
15
|
baseUrl: string;
|
16
|
+
/**
|
17
|
+
* 当前用户信息
|
18
|
+
*/
|
19
|
+
user: any;
|
20
|
+
/**
|
21
|
+
* 请求语言
|
22
|
+
*/
|
23
|
+
language: string;
|
24
|
+
/**
|
25
|
+
* 当前环境
|
26
|
+
*/
|
27
|
+
env: string;
|
28
|
+
/**
|
29
|
+
* 当前终端
|
30
|
+
*/
|
31
|
+
platform: string;
|
14
32
|
/**
|
15
33
|
* 默认请求器
|
16
34
|
*/
|
17
35
|
http: IHttp;
|
36
|
+
/**
|
37
|
+
* 单点登录配置
|
38
|
+
*/
|
39
|
+
sso: ISso;
|
40
|
+
/**
|
41
|
+
* 单点登录配置
|
42
|
+
*/
|
43
|
+
signer: ISigner;
|
18
44
|
/**
|
19
45
|
* 开启
|
20
46
|
*/
|
@@ -24,11 +50,9 @@ declare class HaloHttp extends Http {
|
|
24
50
|
*/
|
25
51
|
send(request: HttpRequest): Promise<HttpResponse>;
|
26
52
|
/**
|
27
|
-
*
|
53
|
+
* 请求预处理
|
28
54
|
*/
|
29
|
-
|
30
|
-
[key: string]: string;
|
31
|
-
}>;
|
55
|
+
beforeRequest(request: HttpRequest): Promise<void>;
|
32
56
|
/**
|
33
57
|
* 处理网络错误和响应错误场景
|
34
58
|
*/
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import type IHttp from "./IHttp";
|
1
|
+
import IHttp from "./IHttp";
|
3
2
|
import HttpRequest from "./entities/HttpRequest";
|
4
3
|
import HttpResponse from "./entities/HttpResponse";
|
5
4
|
import HaloHttp from "./implements/HaloHttp";
|
6
|
-
export {
|
5
|
+
export { type IHttp, HttpRequest, HttpResponse, HaloHttp };
|
package/esm/drivers/index.d.ts
CHANGED
@@ -1,8 +1,14 @@
|
|
1
|
+
export * from "./bridges";
|
2
|
+
export * from "./cdns";
|
3
|
+
export * from "./encoders";
|
1
4
|
export * from "./excels";
|
5
|
+
export * from "./explainers";
|
2
6
|
export * from "./factories";
|
3
7
|
export * from "./features";
|
4
8
|
export * from "./hashers";
|
5
|
-
export * from "./providers";
|
6
9
|
export * from "./https";
|
10
|
+
export * from "./providers";
|
7
11
|
export * from "./signers";
|
8
12
|
export * from "./ssos";
|
13
|
+
export * from "./videos";
|
14
|
+
export * from "./voices";
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/**
|
2
|
+
* 存储帮助类
|
3
|
+
*/
|
4
|
+
declare class StorageHelper {
|
5
|
+
/**
|
6
|
+
* 获取本地存储
|
7
|
+
*/
|
8
|
+
static get: (key: string, value?: any) => any;
|
9
|
+
/**
|
10
|
+
* 设置本地存储
|
11
|
+
*/
|
12
|
+
static set: (key: string, value: string) => void;
|
13
|
+
/**
|
14
|
+
* 获取本地存储
|
15
|
+
*/
|
16
|
+
static getObject: (key: string) => any;
|
17
|
+
/**
|
18
|
+
* 设置本地存储
|
19
|
+
*/
|
20
|
+
static setObject: (key: string, value: any) => void;
|
21
|
+
/**
|
22
|
+
* 移除存储数据
|
23
|
+
*/
|
24
|
+
static remove: (key: string) => void;
|
25
|
+
/**
|
26
|
+
* 以5M为基准,获取剩余可用容量(KB)
|
27
|
+
*/
|
28
|
+
static getLeftStorage: () => number;
|
29
|
+
/**
|
30
|
+
* 判断指定值是否能够存储到storage中
|
31
|
+
*/
|
32
|
+
static canStorage: (value: object) => boolean;
|
33
|
+
}
|
34
|
+
export default StorageHelper;
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export { IProvider, ProviderFactory };
|
1
|
+
import IProvider from "./IProvider";
|
2
|
+
export { type IProvider, };
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import HttpRequest from "./entities/HttpRequest";
|
2
|
+
import HttpResponse from "./entities/HttpResponse";
|
3
|
+
import IDriver from "../IDriver";
|
4
|
+
/**
|
5
|
+
* 请求器接口
|
6
|
+
*/
|
7
|
+
interface IRequester extends IDriver {
|
8
|
+
/**
|
9
|
+
* 开启
|
10
|
+
*/
|
11
|
+
open(conn: string): void;
|
12
|
+
/**
|
13
|
+
* 发送Post请求
|
14
|
+
*/
|
15
|
+
post<T>(path: string, body: any): Promise<T>;
|
16
|
+
/**
|
17
|
+
* 发送Post请求
|
18
|
+
*/
|
19
|
+
post(path: string, body: any): Promise<HttpResponse>;
|
20
|
+
/**
|
21
|
+
* 发送请求
|
22
|
+
*/
|
23
|
+
send(request: HttpRequest): Promise<HttpResponse>;
|
24
|
+
}
|
25
|
+
export default IRequester;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import IRequester from "./IRequester";
|
2
|
+
import HttpRequest from "./entities/HttpRequest";
|
3
|
+
import HttpResponse from "./entities/HttpResponse";
|
4
|
+
/**
|
5
|
+
* 请求器基类
|
6
|
+
*/
|
7
|
+
declare abstract class Requester implements IRequester {
|
8
|
+
type: string;
|
9
|
+
abstract open(conn: string): void;
|
10
|
+
post(path: string, body: any): Promise<HttpResponse>;
|
11
|
+
abstract send(request: HttpRequest): Promise<HttpResponse>;
|
12
|
+
}
|
13
|
+
export default Requester;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import IRequester from "./IRequester";
|
2
|
+
import Factory from "../factories/Factory";
|
3
|
+
/**
|
4
|
+
* 请求器工厂类
|
5
|
+
*/
|
6
|
+
declare class RequesterFactory extends Factory<IRequester> {
|
7
|
+
getInstances(): IRequester[];
|
8
|
+
create(type: string, conn?: string): IRequester;
|
9
|
+
private _default;
|
10
|
+
/**
|
11
|
+
* 获取默认请求器
|
12
|
+
*/
|
13
|
+
getDefault(): IRequester;
|
14
|
+
private local;
|
15
|
+
/**
|
16
|
+
* 获取本地请求实例
|
17
|
+
* 获取完毕后,下游第一行代码就要配置消息服务
|
18
|
+
*/
|
19
|
+
getLocal(): IRequester;
|
20
|
+
}
|
21
|
+
export default RequesterFactory;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/**
|
2
|
+
* Http请求
|
3
|
+
*/
|
4
|
+
declare class HttpRequest {
|
5
|
+
/**
|
6
|
+
* 请求路径
|
7
|
+
*/
|
8
|
+
path: string;
|
9
|
+
/**
|
10
|
+
* 请求方法
|
11
|
+
*/
|
12
|
+
method: string;
|
13
|
+
/**
|
14
|
+
* 实际请求地址
|
15
|
+
*/
|
16
|
+
url?: string;
|
17
|
+
/**
|
18
|
+
* 请求头
|
19
|
+
*/
|
20
|
+
headers?: [string, string];
|
21
|
+
/**
|
22
|
+
* 内容类型
|
23
|
+
*/
|
24
|
+
contentType: string;
|
25
|
+
/**
|
26
|
+
* 请求数据
|
27
|
+
*/
|
28
|
+
data: any;
|
29
|
+
/**
|
30
|
+
* 请求体
|
31
|
+
*/
|
32
|
+
body: string;
|
33
|
+
}
|
34
|
+
export default HttpRequest;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import HttpRequest from "./HttpRequest";
|
2
|
+
/**
|
3
|
+
* Http响应
|
4
|
+
*/
|
5
|
+
declare class HttpResponse {
|
6
|
+
/**
|
7
|
+
* 请求耗时
|
8
|
+
*/
|
9
|
+
elapsed: number;
|
10
|
+
/**
|
11
|
+
* 请求体
|
12
|
+
*/
|
13
|
+
body: string;
|
14
|
+
/**
|
15
|
+
* 对应的请求信息
|
16
|
+
*/
|
17
|
+
request: HttpRequest;
|
18
|
+
}
|
19
|
+
export default HttpResponse;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import Requester from "../Requester";
|
2
|
+
import HttpRequest from "../entities/HttpRequest";
|
3
|
+
import HttpResponse from "../entities/HttpResponse";
|
4
|
+
/**
|
5
|
+
* 默认Http请求器
|
6
|
+
*/
|
7
|
+
declare class DefaultRequester extends Requester {
|
8
|
+
type: string;
|
9
|
+
open(conn: string): void;
|
10
|
+
send(request: HttpRequest): Promise<HttpResponse>;
|
11
|
+
}
|
12
|
+
export default DefaultRequester;
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { AxiosError, AxiosInstance, AxiosResponse } from "axios";
|
2
|
+
import Requester from "../Requester";
|
3
|
+
import HttpRequest from "../entities/HttpRequest";
|
4
|
+
import HttpResponse from "../entities/HttpResponse";
|
5
|
+
import { IMessageService } from "../../../services";
|
6
|
+
/**
|
7
|
+
* 本地请求器
|
8
|
+
*/
|
9
|
+
declare class LocalRequester extends Requester {
|
10
|
+
type: string;
|
11
|
+
request: AxiosInstance;
|
12
|
+
/**
|
13
|
+
* 消息服务实例
|
14
|
+
*/
|
15
|
+
messageService: IMessageService;
|
16
|
+
open(conn: string): void;
|
17
|
+
send(request: HttpRequest): Promise<HttpResponse>;
|
18
|
+
/**
|
19
|
+
* GET请求
|
20
|
+
*/
|
21
|
+
get(url: string, params?: any, headers?: object): Promise<any>;
|
22
|
+
/**
|
23
|
+
* POST请求
|
24
|
+
*/
|
25
|
+
post(url: string, body?: any, config?: any): Promise<any>;
|
26
|
+
/**
|
27
|
+
* PATCH请求
|
28
|
+
*/
|
29
|
+
patch(url: string, body?: any, config?: any): Promise<any>;
|
30
|
+
/**
|
31
|
+
* 处理响应信息 或 响应体信息
|
32
|
+
*/
|
33
|
+
handleResponse(res: AxiosResponse): Promise<any>;
|
34
|
+
/**
|
35
|
+
* 处理响应体信息,并自动添加响应通知
|
36
|
+
*/
|
37
|
+
handleResponseBody(body: any, tip?: boolean): Promise<any>;
|
38
|
+
/**
|
39
|
+
* 处理网络错误和响应错误场景
|
40
|
+
*/
|
41
|
+
handleError(error: AxiosError | any): Promise<never>;
|
42
|
+
}
|
43
|
+
export default LocalRequester;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import Requester from "../Requester";
|
2
|
+
import HttpRequest from "../entities/HttpRequest";
|
3
|
+
import HttpResponse from "../entities/HttpResponse";
|
4
|
+
import IRequester from "../IRequester";
|
5
|
+
import IHasher from "../../hashers/IHasher";
|
6
|
+
/**
|
7
|
+
* MK请求器
|
8
|
+
*/
|
9
|
+
declare class MkRequester extends Requester {
|
10
|
+
type: string;
|
11
|
+
/**
|
12
|
+
* 基准地址
|
13
|
+
*/
|
14
|
+
baseUrl: string;
|
15
|
+
/**
|
16
|
+
* AppId
|
17
|
+
*/
|
18
|
+
appId: string;
|
19
|
+
/**
|
20
|
+
* AppSecret
|
21
|
+
*/
|
22
|
+
appSecret: string;
|
23
|
+
/**
|
24
|
+
* 默认请求器
|
25
|
+
*/
|
26
|
+
requester: IRequester;
|
27
|
+
/**
|
28
|
+
* Hash计算器
|
29
|
+
*/
|
30
|
+
hasher: IHasher;
|
31
|
+
/**
|
32
|
+
* 危险操作,会暴露敏感信息
|
33
|
+
*/
|
34
|
+
open(conn: string): void;
|
35
|
+
/**
|
36
|
+
* 危险操作,会暴露敏感信息
|
37
|
+
*/
|
38
|
+
send(request: HttpRequest): Promise<HttpResponse>;
|
39
|
+
}
|
40
|
+
export default MkRequester;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import RequesterFactory from "./RequesterFactory";
|
2
|
+
import type IRequester from "./IRequester";
|
3
|
+
import type HttpRequest from "./entities/HttpRequest";
|
4
|
+
import type HttpResponse from "./entities/HttpResponse";
|
5
|
+
export { RequesterFactory, IRequester, HttpRequest, HttpResponse };
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export { SignerFactory, ISigner, };
|
1
|
+
import ISigner from "./ISigner";
|
2
|
+
export { type ISigner, };
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export { ISso, SsoFactory };
|
1
|
+
import ISso from "./ISso";
|
2
|
+
export { type ISso, };
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,6 +1,8 @@
|
|
1
|
-
import
|
2
|
-
export declare class DefaultVoice
|
1
|
+
import Voice from "../Voice";
|
2
|
+
export declare class DefaultVoice extends Voice {
|
3
|
+
type: string;
|
3
4
|
download(): void;
|
4
5
|
endRecord(): string;
|
5
6
|
startRecord(): string;
|
6
7
|
}
|
8
|
+
export default DefaultVoice;
|
@@ -1,9 +1,11 @@
|
|
1
|
-
import
|
1
|
+
import Voice from "../Voice";
|
2
2
|
/**
|
3
3
|
* 文档:https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html#23
|
4
4
|
*/
|
5
|
-
export declare class TencentVoice
|
5
|
+
export declare class TencentVoice extends Voice {
|
6
|
+
type: string;
|
6
7
|
download(): void;
|
7
8
|
endRecord(): string;
|
8
9
|
startRecord(): string;
|
9
10
|
}
|
11
|
+
export default TencentVoice;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|