@be-link/request 1.44.0 → 1.45.1-beta.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/README.md +366 -20
- package/dist/application/clients/BeLinkClient.d.ts +75 -0
- package/dist/application/clients/BeLinkClient.d.ts.map +1 -0
- package/dist/application/clients/HttpClient.d.ts +64 -0
- package/dist/application/clients/HttpClient.d.ts.map +1 -0
- package/dist/application/clients/LiveClient.d.ts +15 -0
- package/dist/application/clients/LiveClient.d.ts.map +1 -0
- package/dist/application/interceptors/AuthInterceptor.d.ts +23 -0
- package/dist/application/interceptors/AuthInterceptor.d.ts.map +1 -0
- package/dist/application/interceptors/TimeInterceptor.d.ts +21 -0
- package/dist/application/interceptors/TimeInterceptor.d.ts.map +1 -0
- package/dist/application/interceptors/TokenInterceptor.d.ts +24 -0
- package/dist/application/interceptors/TokenInterceptor.d.ts.map +1 -0
- package/dist/application/services/UserInfoService.d.ts +33 -0
- package/dist/application/services/UserInfoService.d.ts.map +1 -0
- package/dist/cloudbase/index.d.ts +27 -0
- package/dist/cloudbase/index.d.ts.map +1 -0
- package/dist/cloudbase/types.d.ts +63 -0
- package/dist/cloudbase/types.d.ts.map +1 -0
- package/dist/core/constants/index.d.ts +59 -0
- package/dist/core/constants/index.d.ts.map +1 -0
- package/dist/core/errors/index.d.ts +42 -0
- package/dist/core/errors/index.d.ts.map +1 -0
- package/dist/core/interfaces/IConfigManager.d.ts +31 -0
- package/dist/core/interfaces/IConfigManager.d.ts.map +1 -0
- package/dist/core/interfaces/IEncryptionService.d.ts +28 -0
- package/dist/core/interfaces/IEncryptionService.d.ts.map +1 -0
- package/dist/core/interfaces/IHttpClient.d.ts +43 -0
- package/dist/core/interfaces/IHttpClient.d.ts.map +1 -0
- package/dist/core/interfaces/index.d.ts +4 -0
- package/dist/core/interfaces/index.d.ts.map +1 -0
- package/dist/core/types/config.types.d.ts +57 -0
- package/dist/core/types/config.types.d.ts.map +1 -0
- package/dist/core/types/index.d.ts +5 -0
- package/dist/core/types/index.d.ts.map +1 -0
- package/dist/core/types/interceptor.types.d.ts +48 -0
- package/dist/core/types/interceptor.types.d.ts.map +1 -0
- package/dist/core/types/request.types.d.ts +65 -0
- package/dist/core/types/request.types.d.ts.map +1 -0
- package/dist/core/types/response.types.d.ts +29 -0
- package/dist/core/types/response.types.d.ts.map +1 -0
- package/dist/index.cjs.js +6266 -0
- package/dist/index.d.ts +39 -4
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +6235 -0
- package/dist/infrastructure/adapters/AxiosAdapter.d.ts +47 -0
- package/dist/infrastructure/adapters/AxiosAdapter.d.ts.map +1 -0
- package/dist/infrastructure/services/ConfigManager.d.ts +52 -0
- package/dist/infrastructure/services/ConfigManager.d.ts.map +1 -0
- package/dist/infrastructure/services/EncryptionService.d.ts +34 -0
- package/dist/infrastructure/services/EncryptionService.d.ts.map +1 -0
- package/dist/infrastructure/services/TimeSyncService.d.ts +44 -0
- package/dist/infrastructure/services/TimeSyncService.d.ts.map +1 -0
- package/dist/infrastructure/utils/env.utils.d.ts +13 -0
- package/dist/infrastructure/utils/env.utils.d.ts.map +1 -0
- package/dist/presets/belink.preset.d.ts +4 -0
- package/dist/presets/belink.preset.d.ts.map +1 -0
- package/dist/presets/index.d.ts +4 -0
- package/dist/presets/index.d.ts.map +1 -0
- package/dist/presets/live.preset.d.ts +4 -0
- package/dist/presets/live.preset.d.ts.map +1 -0
- package/dist/presets/request.preset.d.ts +9 -0
- package/dist/presets/request.preset.d.ts.map +1 -0
- package/package.json +37 -35
- package/dist/beLinkRequest.d.ts +0 -43
- package/dist/callFunction.d.ts +0 -36
- package/dist/config.d.ts +0 -5
- package/dist/createInit.d.ts +0 -14
- package/dist/index.js +0 -1
- package/dist/request.d.ts +0 -14
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @be-link/request
|
|
3
|
+
*
|
|
4
|
+
* 共比邻 HTTP 请求库
|
|
5
|
+
* 提供企业级的 HTTP 请求封装和云函数调用功能
|
|
6
|
+
*/
|
|
7
|
+
/** 基础请求函数 */
|
|
8
|
+
export { default as request } from './presets/request.preset';
|
|
9
|
+
/** BeLink 企业级请求客户端 */
|
|
10
|
+
export { default as beLinkRequest } from './presets/belink.preset';
|
|
11
|
+
/** BeLink 直播请求客户端 */
|
|
12
|
+
export { default as beLinkLiveRequest } from './presets/live.preset';
|
|
13
|
+
/** 云函数调用 */
|
|
14
|
+
export { default as callFunction } from './cloudbase';
|
|
15
|
+
/** 用户信息管理 */
|
|
16
|
+
export { default as beLinkUserInfo } from './application/services/UserInfoService';
|
|
17
|
+
export { HttpClient } from './application/clients/HttpClient';
|
|
18
|
+
export { BeLinkClient } from './application/clients/BeLinkClient';
|
|
19
|
+
export { LiveClient } from './application/clients/LiveClient';
|
|
20
|
+
export { TokenInterceptor } from './application/interceptors/TokenInterceptor';
|
|
21
|
+
export { TimeInterceptor } from './application/interceptors/TimeInterceptor';
|
|
22
|
+
export { AuthInterceptor } from './application/interceptors/AuthInterceptor';
|
|
23
|
+
export { ConfigManager } from './infrastructure/services/ConfigManager';
|
|
24
|
+
export { EncryptionService } from './infrastructure/services/EncryptionService';
|
|
25
|
+
export { TimeSyncService } from './infrastructure/services/TimeSyncService';
|
|
26
|
+
export { AxiosAdapter } from './infrastructure/adapters/AxiosAdapter';
|
|
27
|
+
export type { RequestConfig, RequestContext, IConfig } from './core/types/request.types';
|
|
28
|
+
export { HttpMethod } from './core/types/request.types';
|
|
29
|
+
export type { ApiResponse, ResponseContext } from './core/types/response.types';
|
|
30
|
+
export type { RequestInterceptor, ResponseInterceptor, InterceptorIds, RequestError, } from './core/types/interceptor.types';
|
|
31
|
+
export type { AppConfig, EncryptionConfig, TimeSyncConfig, CloudbaseConfig } from './core/types/config.types';
|
|
32
|
+
export type { CloudFunctionOptions, CloudFunctionResponse, CloudFunctionData, IData, INotData, ICallFunctionOptions, ICallFunctionResponse, } from './cloudbase/types';
|
|
33
|
+
export type { IHttpClient } from './core/interfaces/IHttpClient';
|
|
34
|
+
export type { IEncryptionService } from './core/interfaces/IEncryptionService';
|
|
35
|
+
export type { IConfigManager } from './core/interfaces/IConfigManager';
|
|
36
|
+
export { BaseError, HttpError, AuthError, TimeoutError, ConfigError, NetworkError } from './core/errors';
|
|
37
|
+
export { HTTP_STATUS, DEFAULT_TIMEOUT, TOKEN_HEADER, TIME_SYNC_HEADERS, STORAGE_KEYS, ContentType, } from './core/constants';
|
|
38
|
+
export { detectEnvironment, isBrowser, isNode } from './infrastructure/utils/env.utils';
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,aAAa;AACb,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAE9D,sBAAsB;AACtB,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEnE,qBAAqB;AACrB,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAErE,YAAY;AACZ,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AAEtD,aAAa;AACb,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAMnF,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAM9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,eAA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