@tencentcloud/sdk-mcp 1.0.3 → 1.0.4

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.
Files changed (114) hide show
  1. package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/config.d.ts +14 -14
  2. package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/global.d.ts +1 -1
  3. package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/index.d.ts +9 -9
  4. package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/report-ignore.d.ts +2 -2
  5. package/@tencent/aegis-node-sdk/lib/packages/core/src/core.d.ts +85 -85
  6. package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/afterRequestHooks.d.ts +3 -3
  7. package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/beforeRequestHooks.d.ts +9 -9
  8. package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/modifyRequestHooks.d.ts +3 -3
  9. package/@tencent/aegis-node-sdk/lib/packages/core/src/index.d.ts +9 -9
  10. package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/config.d.ts +62 -62
  11. package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/env.d.ts +11 -11
  12. package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/index.d.ts +4 -4
  13. package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/log.d.ts +130 -130
  14. package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/send.d.ts +34 -34
  15. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/format.d.ts +2 -2
  16. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/index.d.ts +18 -18
  17. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/length-limit.d.ts +8 -8
  18. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/pv.d.ts +8 -8
  19. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/remove-payload.d.ts +2 -2
  20. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/repeat-limit.d.ts +4 -4
  21. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/report.d.ts +10 -10
  22. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/sample.d.ts +3 -3
  23. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/throttle.d.ts +3 -3
  24. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/index.d.ts +34 -34
  25. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/jwt.d.ts +12 -12
  26. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/ot-js.d.ts +14 -14
  27. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/uuid.d.ts +2 -2
  28. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/whitelist.d.ts +12 -12
  29. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/write-before.d.ts +3 -3
  30. package/@tencent/aegis-node-sdk/lib/packages/core/src/plugin.d.ts +33 -33
  31. package/@tencent/aegis-node-sdk/lib/packages/core/src/util/destroy.d.ts +2 -2
  32. package/@tencent/aegis-node-sdk/lib/packages/core/src/util/event-emitter.d.ts +18 -18
  33. package/@tencent/aegis-node-sdk/lib/packages/core/src/util/index.d.ts +60 -60
  34. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/index.d.ts +15 -15
  35. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/interface/selector.d.ts +5 -5
  36. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/pipes/batch-report-pipe.d.ts +6 -6
  37. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_base.d.ts +18 -18
  38. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_http.d.ts +12 -12
  39. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/ip_selector.d.ts +10 -10
  40. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/polaris_selector.d.ts +20 -20
  41. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/selector_base.d.ts +27 -27
  42. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/util/eval_require.d.ts +2 -2
  43. package/mcp.json +9 -9
  44. package/package.json +1 -1
  45. package/resource/doc/chatuikit/android/client_api_android.md +1377 -0
  46. package/resource/doc/chatuikit/android/integrate_tuichat_only_android.md +382 -0
  47. package/resource/doc/chatuikit/android/integrate_tuikit_android.md +612 -0
  48. package/resource/doc/chatuikit/android/ui_api_android.md +418 -0
  49. package/resource/doc/chatuikit/faq/freq_qa.md +86 -0
  50. package/resource/doc/chatuikit/faq/sdk_qa.md +117 -0
  51. package/resource/doc/chatuikit/faq/vue_qa.md +344 -0
  52. package/resource/doc/chatuikit/faq/web_qa.md +118 -0
  53. package/resource/doc/chatuikit/flutter/client_api_Flutter.md +939 -0
  54. package/resource/doc/chatuikit/flutter/integrate_tuikit_Flutter.md +1432 -0
  55. package/resource/doc/chatuikit/iOS/client_api_iOS.md +1371 -0
  56. package/resource/doc/chatuikit/iOS/integrate_tuichat_only_iOS.md +993 -0
  57. package/resource/doc/chatuikit/iOS/integrate_tuikit_iOS.md +1427 -0
  58. package/resource/doc/chatuikit/iOS/ui_api_iOS.md +526 -0
  59. package/resource/doc/chatuikit/react/integrate_tuichat_only_react.md +185 -0
  60. package/resource/doc/chatuikit/react/integrate_tuichat_react.md +212 -0
  61. package/resource/doc/chatuikit/vue/integrate_tuichat_only_vue.md +149 -0
  62. package/resource/doc/chatuikit/vue/integrate_tuichat_vue.md +248 -0
  63. package/server.js +51 -27
  64. package/server.js.map +1 -1
  65. package/@tencent/polaris/node_modules/axios/CHANGELOG.md +0 -891
  66. package/@tencent/polaris/node_modules/axios/LICENSE +0 -19
  67. package/@tencent/polaris/node_modules/axios/README.md +0 -908
  68. package/@tencent/polaris/node_modules/axios/SECURITY.md +0 -5
  69. package/@tencent/polaris/node_modules/axios/UPGRADE_GUIDE.md +0 -168
  70. package/@tencent/polaris/node_modules/axios/dist/axios.js +0 -2277
  71. package/@tencent/polaris/node_modules/axios/dist/axios.map +0 -1
  72. package/@tencent/polaris/node_modules/axios/dist/axios.min.js +0 -4
  73. package/@tencent/polaris/node_modules/axios/dist/axios.min.map +0 -1
  74. package/@tencent/polaris/node_modules/axios/index.d.ts +0 -221
  75. package/@tencent/polaris/node_modules/axios/index.js +0 -1
  76. package/@tencent/polaris/node_modules/axios/lib/adapters/README.md +0 -37
  77. package/@tencent/polaris/node_modules/axios/lib/adapters/http.js +0 -388
  78. package/@tencent/polaris/node_modules/axios/lib/adapters/xhr.js +0 -212
  79. package/@tencent/polaris/node_modules/axios/lib/axios.js +0 -57
  80. package/@tencent/polaris/node_modules/axios/lib/cancel/Cancel.js +0 -19
  81. package/@tencent/polaris/node_modules/axios/lib/cancel/CancelToken.js +0 -119
  82. package/@tencent/polaris/node_modules/axios/lib/cancel/isCancel.js +0 -5
  83. package/@tencent/polaris/node_modules/axios/lib/core/Axios.js +0 -155
  84. package/@tencent/polaris/node_modules/axios/lib/core/InterceptorManager.js +0 -54
  85. package/@tencent/polaris/node_modules/axios/lib/core/README.md +0 -8
  86. package/@tencent/polaris/node_modules/axios/lib/core/buildFullPath.js +0 -20
  87. package/@tencent/polaris/node_modules/axios/lib/core/createError.js +0 -18
  88. package/@tencent/polaris/node_modules/axios/lib/core/dispatchRequest.js +0 -87
  89. package/@tencent/polaris/node_modules/axios/lib/core/enhanceError.js +0 -43
  90. package/@tencent/polaris/node_modules/axios/lib/core/mergeConfig.js +0 -99
  91. package/@tencent/polaris/node_modules/axios/lib/core/settle.js +0 -25
  92. package/@tencent/polaris/node_modules/axios/lib/core/transformData.js +0 -22
  93. package/@tencent/polaris/node_modules/axios/lib/defaults.js +0 -134
  94. package/@tencent/polaris/node_modules/axios/lib/env/README.md +0 -3
  95. package/@tencent/polaris/node_modules/axios/lib/env/data.js +0 -3
  96. package/@tencent/polaris/node_modules/axios/lib/helpers/README.md +0 -7
  97. package/@tencent/polaris/node_modules/axios/lib/helpers/bind.js +0 -11
  98. package/@tencent/polaris/node_modules/axios/lib/helpers/buildURL.js +0 -70
  99. package/@tencent/polaris/node_modules/axios/lib/helpers/combineURLs.js +0 -14
  100. package/@tencent/polaris/node_modules/axios/lib/helpers/cookies.js +0 -53
  101. package/@tencent/polaris/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -24
  102. package/@tencent/polaris/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
  103. package/@tencent/polaris/node_modules/axios/lib/helpers/isAxiosError.js +0 -13
  104. package/@tencent/polaris/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -68
  105. package/@tencent/polaris/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
  106. package/@tencent/polaris/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
  107. package/@tencent/polaris/node_modules/axios/lib/helpers/spread.js +0 -27
  108. package/@tencent/polaris/node_modules/axios/lib/helpers/toFormData.js +0 -55
  109. package/@tencent/polaris/node_modules/axios/lib/helpers/validator.js +0 -82
  110. package/@tencent/polaris/node_modules/axios/lib/utils.js +0 -349
  111. package/@tencent/polaris/node_modules/axios/package.json +0 -86
  112. package/@tencent/polaris/node_modules/axios/tsconfig.json +0 -14
  113. package/@tencent/polaris/node_modules/axios/tslint.json +0 -6
  114. package/resource/doc/tuicallkit/vue/api_TUICallObserver.md +0 -926
@@ -1,14 +1,14 @@
1
- import { Config } from '../interface';
2
- export declare const REPORT_TIMEOUT = 5000;
3
- export declare const MAX_FAIL_REQUEST_NUM = 60;
4
- export declare const MAX_LOG_LENGTH: number;
5
- export declare const MAX_FROM_LENGTH: number;
6
- export declare const TIMESTAMP_REG: RegExp;
7
- export declare const MAX_REPEAT_TIMES = 60;
8
- export declare const CLEAR_REPEAT_CACHE_TIMEOUT = 60000;
9
- export declare const MAX_CUSTOM_TIME = 2147483646;
10
- export declare const MAX_ERROR_COUNT = 5;
11
- export declare const FORBIDDEN_RESPONSE_DATA = "403 forbidden";
12
- export declare const MAX_PROMISE_ERROR_MSG_LENGTH = 150;
13
- export declare const getDefaultConfig: () => Config;
14
- export declare const setConfigUrl: (config: Config, hostUrl?: string) => Config;
1
+ import { Config } from '../interface';
2
+ export declare const REPORT_TIMEOUT = 5000;
3
+ export declare const MAX_FAIL_REQUEST_NUM = 60;
4
+ export declare const MAX_LOG_LENGTH: number;
5
+ export declare const MAX_FROM_LENGTH: number;
6
+ export declare const TIMESTAMP_REG: RegExp;
7
+ export declare const MAX_REPEAT_TIMES = 60;
8
+ export declare const CLEAR_REPEAT_CACHE_TIMEOUT = 60000;
9
+ export declare const MAX_CUSTOM_TIME = 2147483646;
10
+ export declare const MAX_ERROR_COUNT = 5;
11
+ export declare const FORBIDDEN_RESPONSE_DATA = "403 forbidden";
12
+ export declare const MAX_PROMISE_ERROR_MSG_LENGTH = 150;
13
+ export declare const getDefaultConfig: () => Config;
14
+ export declare const setConfigUrl: (config: Config, hostUrl?: string) => Config;
@@ -1 +1 @@
1
- export declare const globalAny: any;
1
+ export declare const globalAny: any;
@@ -1,9 +1,9 @@
1
- export { getDefaultConfig, setConfigUrl, REPORT_TIMEOUT, MAX_FAIL_REQUEST_NUM, MAX_LOG_LENGTH, MAX_FROM_LENGTH, MAX_REPEAT_TIMES, CLEAR_REPEAT_CACHE_TIMEOUT, FORBIDDEN_RESPONSE_DATA, TIMESTAMP_REG, MAX_CUSTOM_TIME, MAX_ERROR_COUNT, MAX_PROMISE_ERROR_MSG_LENGTH, } from './config';
2
- export { URL_SPEED_IGNORE, ERROR_MSG_IGNORE, } from './report-ignore';
3
- export declare const COMPLETION_KEYS: string[];
4
- export declare const RESOURCE_TYPE_STATIC = "static";
5
- export declare const RESOURCE_TYPE_FETCH = "fetch";
6
- export declare const RESOURCE_TYPE: string[];
7
- export declare const UNKNOWN = "unknown";
8
- export declare const UNKNOWN_CHINESE = "\u672A\u77E5";
9
- export * from './global';
1
+ export { getDefaultConfig, setConfigUrl, REPORT_TIMEOUT, MAX_FAIL_REQUEST_NUM, MAX_LOG_LENGTH, MAX_FROM_LENGTH, MAX_REPEAT_TIMES, CLEAR_REPEAT_CACHE_TIMEOUT, FORBIDDEN_RESPONSE_DATA, TIMESTAMP_REG, MAX_CUSTOM_TIME, MAX_ERROR_COUNT, MAX_PROMISE_ERROR_MSG_LENGTH, } from './config';
2
+ export { URL_SPEED_IGNORE, ERROR_MSG_IGNORE, } from './report-ignore';
3
+ export declare const COMPLETION_KEYS: string[];
4
+ export declare const RESOURCE_TYPE_STATIC = "static";
5
+ export declare const RESOURCE_TYPE_FETCH = "fetch";
6
+ export declare const RESOURCE_TYPE: string[];
7
+ export declare const UNKNOWN = "unknown";
8
+ export declare const UNKNOWN_CHINESE = "\u672A\u77E5";
9
+ export * from './global';
@@ -1,2 +1,2 @@
1
- export declare const URL_SPEED_IGNORE: string[];
2
- export declare const ERROR_MSG_IGNORE: string[];
1
+ export declare const URL_SPEED_IGNORE: string[];
2
+ export declare const ERROR_MSG_IGNORE: string[];
@@ -1,85 +1,85 @@
1
- import { InterfaceEventEmitter } from './util';
2
- import { Config, LogType, Environment, SendOption, SendSuccess, SendFail, SpeedLog, BridgeLog, ReportTimeLog, SendType, EventLog } from './interface';
3
- import Plugin from './plugin';
4
- import { Pipe } from './pipes';
5
- /**
6
- * Aegis 核心逻辑,所有平台的 Aegis 类都继承于 Core
7
- * 类似 linux 微内核的架构组织代码
8
- * 所有 Aegis 的功能都是基于 Core 实现
9
- * 1. 封装了 Aegis 的基本属性和方法
10
- * 2. 封装了 Aegis 的插件模型,Aegis 中所有数据采集的逻辑均基于插件体系实现
11
- * 3. 封装了 Aegis 的基础实例方法,包括 info report reportEvent 等,平台无需自己重复实现
12
- * 4. 封装了 Aegis 的生命周期,实现生命周期管理
13
- */
14
- export default class Core {
15
- static version: string;
16
- static instances: Core[];
17
- static logType: typeof LogType;
18
- static environment: typeof Environment;
19
- static installedPlugins: Plugin[];
20
- /**
21
- * 使用插件
22
- * @param plugin
23
- */
24
- static use(plugin: Plugin): void;
25
- /**
26
- * 销毁插件
27
- * @param plugin
28
- */
29
- static unuse(plugin: Plugin): void;
30
- isGetSample: boolean;
31
- isHidden: boolean;
32
- config: Config;
33
- isWhiteList: boolean;
34
- lifeCycle: InterfaceEventEmitter;
35
- bean: {
36
- [key: string]: string | number | boolean;
37
- };
38
- sendNow: boolean;
39
- normalLogPipeline: import("./pipes").Pipeline<any, any>;
40
- eventPipeline: import("./pipes").Pipeline<any, any>;
41
- customTimePipeline: import("./pipes").Pipeline<any, any>;
42
- private timeMap;
43
- private failRequestCount;
44
- /**
45
- * 构造函数
46
- * @param config
47
- */
48
- constructor(config: Config);
49
- /**
50
- * 初始化方法,用于记录用户传入参数和初始化 SDK 所有插件
51
- * @param config
52
- */
53
- init(config: Config): void;
54
- /**
55
- * 销毁 Aegis 实例,清空 Aegis 实例属性和方法,销毁插件
56
- * @param force
57
- */
58
- destroy(force?: boolean): void;
59
- /**
60
- * 设置属性,这个方法也暴露给用户,方便用户动态修改 SDK 属性
61
- * @param config
62
- * @returns
63
- */
64
- setConfig(config: Partial<Config>): Config;
65
- extendBean(key: string, value: string | number): void;
66
- send(options: SendOption, success?: SendSuccess, fail?: SendFail): any;
67
- sendSDKError(err: Error): void;
68
- sendPipeline(pipes: Pipe[], type: SendType): import("./pipes").Pipeline<any, any>;
69
- info(...msg: any): void;
70
- infoAll(...msg: any): void;
71
- report(...msg: any): void;
72
- error(...msg: any): void;
73
- reportEvent(event: string | EventLog): void;
74
- reportT(obj: ReportTimeLog): void;
75
- reportTime(key: string | ReportTimeLog, duration?: number): void;
76
- time(key: string): void;
77
- timeEnd(key: string): void;
78
- ready(_options: SendOption, _success?: SendSuccess, _fail?: SendFail): void;
79
- request(_options: SendOption, _success?: SendSuccess, _fail?: SendFail): void;
80
- speedLogPipeline(_log?: SpeedLog | SpeedLog[] | BridgeLog | BridgeLog[]): void;
81
- get __version__(): string;
82
- get LogType(): typeof LogType;
83
- reportPv(id: number): void;
84
- private submitCustomTime;
85
- }
1
+ import { InterfaceEventEmitter } from './util';
2
+ import { Config, LogType, Environment, SendOption, SendSuccess, SendFail, SpeedLog, BridgeLog, ReportTimeLog, SendType, EventLog } from './interface';
3
+ import Plugin from './plugin';
4
+ import { Pipe } from './pipes';
5
+ /**
6
+ * Aegis 核心逻辑,所有平台的 Aegis 类都继承于 Core
7
+ * 类似 linux 微内核的架构组织代码
8
+ * 所有 Aegis 的功能都是基于 Core 实现
9
+ * 1. 封装了 Aegis 的基本属性和方法
10
+ * 2. 封装了 Aegis 的插件模型,Aegis 中所有数据采集的逻辑均基于插件体系实现
11
+ * 3. 封装了 Aegis 的基础实例方法,包括 info report reportEvent 等,平台无需自己重复实现
12
+ * 4. 封装了 Aegis 的生命周期,实现生命周期管理
13
+ */
14
+ export default class Core {
15
+ static version: string;
16
+ static instances: Core[];
17
+ static logType: typeof LogType;
18
+ static environment: typeof Environment;
19
+ static installedPlugins: Plugin[];
20
+ /**
21
+ * 使用插件
22
+ * @param plugin
23
+ */
24
+ static use(plugin: Plugin): void;
25
+ /**
26
+ * 销毁插件
27
+ * @param plugin
28
+ */
29
+ static unuse(plugin: Plugin): void;
30
+ isGetSample: boolean;
31
+ isHidden: boolean;
32
+ config: Config;
33
+ isWhiteList: boolean;
34
+ lifeCycle: InterfaceEventEmitter;
35
+ bean: {
36
+ [key: string]: string | number | boolean;
37
+ };
38
+ sendNow: boolean;
39
+ normalLogPipeline: import("./pipes").Pipeline<any, any>;
40
+ eventPipeline: import("./pipes").Pipeline<any, any>;
41
+ customTimePipeline: import("./pipes").Pipeline<any, any>;
42
+ private timeMap;
43
+ private failRequestCount;
44
+ /**
45
+ * 构造函数
46
+ * @param config
47
+ */
48
+ constructor(config: Config);
49
+ /**
50
+ * 初始化方法,用于记录用户传入参数和初始化 SDK 所有插件
51
+ * @param config
52
+ */
53
+ init(config: Config): void;
54
+ /**
55
+ * 销毁 Aegis 实例,清空 Aegis 实例属性和方法,销毁插件
56
+ * @param force
57
+ */
58
+ destroy(force?: boolean): void;
59
+ /**
60
+ * 设置属性,这个方法也暴露给用户,方便用户动态修改 SDK 属性
61
+ * @param config
62
+ * @returns
63
+ */
64
+ setConfig(config: Partial<Config>): Config;
65
+ extendBean(key: string, value: string | number): void;
66
+ send(options: SendOption, success?: SendSuccess, fail?: SendFail): any;
67
+ sendSDKError(err: Error): void;
68
+ sendPipeline(pipes: Pipe[], type: SendType): import("./pipes").Pipeline<any, any>;
69
+ info(...msg: any): void;
70
+ infoAll(...msg: any): void;
71
+ report(...msg: any): void;
72
+ error(...msg: any): void;
73
+ reportEvent(event: string | EventLog): void;
74
+ reportT(obj: ReportTimeLog): void;
75
+ reportTime(key: string | ReportTimeLog, duration?: number): void;
76
+ time(key: string): void;
77
+ timeEnd(key: string): void;
78
+ ready(_options: SendOption, _success?: SendSuccess, _fail?: SendFail): void;
79
+ request(_options: SendOption, _success?: SendSuccess, _fail?: SendFail): void;
80
+ speedLogPipeline(_log?: SpeedLog | SpeedLog[] | BridgeLog | BridgeLog[]): void;
81
+ get __version__(): string;
82
+ get LogType(): typeof LogType;
83
+ reportPv(id: number): void;
84
+ private submitCustomTime;
85
+ }
@@ -1,3 +1,3 @@
1
- import Core from '../core';
2
- import { Pipe } from '../pipes';
3
- export declare const afterRequestHooks: (aegis: Core) => Pipe;
1
+ import Core from '../core';
2
+ import { Pipe } from '../pipes';
3
+ export declare const afterRequestHooks: (aegis: Core) => Pipe;
@@ -1,9 +1,9 @@
1
- import Core from '../core';
2
- import { SendType } from '../interface';
3
- import { Pipe } from '../pipes';
4
- /**
5
- * beforeRequest 是 Aegis SDK 中最重要的 hook,可以拦截和修改所有的上报
6
- * 当 beforeRequest 返回 false 的时候,这条日志就不会上报
7
- * 当 beforeRequest 返回正常的log结构体的时候,Aegis 会按照返回值里面的数据,自动上报相应的数据
8
- */
9
- export declare const beforeRequestHooks: (aegis: Core, logType: SendType | undefined) => Pipe;
1
+ import Core from '../core';
2
+ import { SendType } from '../interface';
3
+ import { Pipe } from '../pipes';
4
+ /**
5
+ * beforeRequest 是 Aegis SDK 中最重要的 hook,可以拦截和修改所有的上报
6
+ * 当 beforeRequest 返回 false 的时候,这条日志就不会上报
7
+ * 当 beforeRequest 返回正常的log结构体的时候,Aegis 会按照返回值里面的数据,自动上报相应的数据
8
+ */
9
+ export declare const beforeRequestHooks: (aegis: Core, logType: SendType | undefined) => Pipe;
@@ -1,3 +1,3 @@
1
- import Core from '../core';
2
- import { Pipe } from '../pipes';
3
- export declare const modifyRequestHooks: (aegis: Core) => Pipe;
1
+ import Core from '../core';
2
+ import { Pipe } from '../pipes';
3
+ export declare const modifyRequestHooks: (aegis: Core) => Pipe;
@@ -1,9 +1,9 @@
1
- import './polyfill';
2
- import Core from './core';
3
- import Plugin from './plugin';
4
- export { Plugin };
5
- export default Core;
6
- export { LogType, NormalLog, SpeedLog, BridgeLog, StaticAssetsLog, PagePerformanceLog, PagePerformanceLogForHippy3, HippyPagePerformanceLog, Config, CoreApiConfig, SendOption, SendSuccess, SendFail, SendType, PlatTypeNum, NetworkTypeNum, PagePerformanceStruct, } from './interface';
7
- export { getDefaultConfig, setConfigUrl, globalAny, REPORT_TIMEOUT, MAX_FROM_LENGTH, ERROR_MSG_IGNORE, URL_SPEED_IGNORE, RESOURCE_TYPE_FETCH, RESOURCE_TYPE_STATIC, UNKNOWN, RESOURCE_TYPE, MAX_PROMISE_ERROR_MSG_LENGTH, } from './constant';
8
- export * from './pipes';
9
- export * from './util';
1
+ import './polyfill';
2
+ import Core from './core';
3
+ import Plugin from './plugin';
4
+ export { Plugin };
5
+ export default Core;
6
+ export { LogType, NormalLog, SpeedLog, BridgeLog, StaticAssetsLog, PagePerformanceLog, PagePerformanceLogForHippy3, HippyPagePerformanceLog, Config, CoreApiConfig, SendOption, SendSuccess, SendFail, SendType, PlatTypeNum, NetworkTypeNum, PagePerformanceStruct, } from './interface';
7
+ export { getDefaultConfig, setConfigUrl, globalAny, REPORT_TIMEOUT, MAX_FROM_LENGTH, ERROR_MSG_IGNORE, URL_SPEED_IGNORE, RESOURCE_TYPE_FETCH, RESOURCE_TYPE_STATIC, UNKNOWN, RESOURCE_TYPE, MAX_PROMISE_ERROR_MSG_LENGTH, } from './constant';
8
+ export * from './pipes';
9
+ export * from './util';
@@ -1,62 +1,62 @@
1
- /**
2
- * 配置Interface
3
- */
4
- export declare type CoreApiConfig = {
5
- apiDetail?: boolean;
6
- reportRequest?: boolean;
7
- resourceTypeHandler?: Function | undefined;
8
- retCodeHandler?: Function | undefined;
9
- reqParamHandler?: Function | undefined;
10
- resBodyHandler?: Function | undefined;
11
- resHeaders?: Array<string>;
12
- reqHeaders?: Array<string>;
13
- };
14
- export interface Config {
15
- id?: string;
16
- uin?: number | string;
17
- aid?: boolean | string;
18
- onError?: boolean;
19
- device?: boolean;
20
- env?: string;
21
- version?: number | string;
22
- delay?: number;
23
- repeat?: number | object;
24
- random?: number;
25
- speedSample?: boolean;
26
- hostUrl?: string;
27
- url?: string;
28
- maxLength?: number;
29
- customTimeUrl?: string;
30
- whiteListUrl?: string;
31
- offlineUrl?: string;
32
- pvUrl?: string;
33
- speedUrl?: string;
34
- performanceUrl?: string;
35
- performanceUrlForHippy?: string;
36
- eventUrl?: string;
37
- webVitalsUrl?: string;
38
- setDataReportUrl?: string;
39
- pageUrl?: string;
40
- getNetworkType?: Function;
41
- websocketHack?: boolean;
42
- beforeReport?: Function;
43
- logCreated?: Function;
44
- onReport?: Function;
45
- onWhitelist?: Function;
46
- api?: CoreApiConfig;
47
- beforeReportSpeed?: Function;
48
- reportAssetSpeed?: boolean | object;
49
- beforeRequest?: Function;
50
- afterRequest?: Function;
51
- urlHandler?: Function;
52
- ext1?: string;
53
- ext2?: string;
54
- ext3?: string;
55
- destroy?: Function;
56
- pagePerformance?: boolean | PagePerformanceStruct;
57
- [key: string]: any;
58
- }
59
- export interface PagePerformanceStruct {
60
- firstScreenInfo?: false;
61
- urlHandler?: () => string;
62
- }
1
+ /**
2
+ * 配置Interface
3
+ */
4
+ export declare type CoreApiConfig = {
5
+ apiDetail?: boolean;
6
+ reportRequest?: boolean;
7
+ resourceTypeHandler?: Function | undefined;
8
+ retCodeHandler?: Function | undefined;
9
+ reqParamHandler?: Function | undefined;
10
+ resBodyHandler?: Function | undefined;
11
+ resHeaders?: Array<string>;
12
+ reqHeaders?: Array<string>;
13
+ };
14
+ export interface Config {
15
+ id?: string;
16
+ uin?: number | string;
17
+ aid?: boolean | string;
18
+ onError?: boolean;
19
+ device?: boolean;
20
+ env?: string;
21
+ version?: number | string;
22
+ delay?: number;
23
+ repeat?: number | object;
24
+ random?: number;
25
+ speedSample?: boolean;
26
+ hostUrl?: string;
27
+ url?: string;
28
+ maxLength?: number;
29
+ customTimeUrl?: string;
30
+ whiteListUrl?: string;
31
+ offlineUrl?: string;
32
+ pvUrl?: string;
33
+ speedUrl?: string;
34
+ performanceUrl?: string;
35
+ performanceUrlForHippy?: string;
36
+ eventUrl?: string;
37
+ webVitalsUrl?: string;
38
+ setDataReportUrl?: string;
39
+ pageUrl?: string;
40
+ getNetworkType?: Function;
41
+ websocketHack?: boolean;
42
+ beforeReport?: Function;
43
+ logCreated?: Function;
44
+ onReport?: Function;
45
+ onWhitelist?: Function;
46
+ api?: CoreApiConfig;
47
+ beforeReportSpeed?: Function;
48
+ reportAssetSpeed?: boolean | object;
49
+ beforeRequest?: Function;
50
+ afterRequest?: Function;
51
+ urlHandler?: Function;
52
+ ext1?: string;
53
+ ext2?: string;
54
+ ext3?: string;
55
+ destroy?: Function;
56
+ pagePerformance?: boolean | PagePerformanceStruct;
57
+ [key: string]: any;
58
+ }
59
+ export interface PagePerformanceStruct {
60
+ firstScreenInfo?: false;
61
+ urlHandler?: () => string;
62
+ }
@@ -1,11 +1,11 @@
1
- export declare enum Environment {
2
- production = "production",
3
- development = "development",
4
- gray = "gray",
5
- pre = "pre",
6
- daily = "daily",
7
- local = "local",
8
- test = "test",
9
- others = "others"
10
- }
11
- export declare const isEnvironment: (val: string) => boolean;
1
+ export declare enum Environment {
2
+ production = "production",
3
+ development = "development",
4
+ gray = "gray",
5
+ pre = "pre",
6
+ daily = "daily",
7
+ local = "local",
8
+ test = "test",
9
+ others = "others"
10
+ }
11
+ export declare const isEnvironment: (val: string) => boolean;
@@ -1,4 +1,4 @@
1
- export { Config, CoreApiConfig, PagePerformanceStruct } from './config';
2
- export { NormalLog, SpeedLog, BridgeLog, StaticAssetsLog, PagePerformanceLog, PagePerformanceLogForHippy3, HippyPagePerformanceLog, LogType, ReportTimeLog, EventLog, PlatTypeNum, NetworkTypeNum, } from './log';
3
- export { SendOption, SendSuccess, SendFail, SendType, } from './send';
4
- export { Environment, } from './env';
1
+ export { Config, CoreApiConfig, PagePerformanceStruct } from './config';
2
+ export { NormalLog, SpeedLog, BridgeLog, StaticAssetsLog, PagePerformanceLog, PagePerformanceLogForHippy3, HippyPagePerformanceLog, LogType, ReportTimeLog, EventLog, PlatTypeNum, NetworkTypeNum, } from './log';
3
+ export { SendOption, SendSuccess, SendFail, SendType, } from './send';
4
+ export { Environment, } from './env';