@tencentcloud/sdk-mcp 1.0.2 → 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.
- package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/config.d.ts +14 -14
- package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/global.d.ts +1 -1
- package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/index.d.ts +9 -9
- package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/report-ignore.d.ts +2 -2
- package/@tencent/aegis-node-sdk/lib/packages/core/src/core.d.ts +85 -85
- package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/afterRequestHooks.d.ts +3 -3
- package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/beforeRequestHooks.d.ts +9 -9
- package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/modifyRequestHooks.d.ts +3 -3
- package/@tencent/aegis-node-sdk/lib/packages/core/src/index.d.ts +9 -9
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/config.d.ts +62 -62
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/env.d.ts +11 -11
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/index.d.ts +4 -4
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/log.d.ts +130 -130
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/send.d.ts +34 -34
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/format.d.ts +2 -2
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/index.d.ts +18 -18
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/length-limit.d.ts +8 -8
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/pv.d.ts +8 -8
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/remove-payload.d.ts +2 -2
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/repeat-limit.d.ts +4 -4
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/report.d.ts +10 -10
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/sample.d.ts +3 -3
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/throttle.d.ts +3 -3
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/index.d.ts +34 -34
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/jwt.d.ts +12 -12
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/ot-js.d.ts +14 -14
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/uuid.d.ts +2 -2
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/whitelist.d.ts +12 -12
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/write-before.d.ts +3 -3
- package/@tencent/aegis-node-sdk/lib/packages/core/src/plugin.d.ts +33 -33
- package/@tencent/aegis-node-sdk/lib/packages/core/src/util/destroy.d.ts +2 -2
- package/@tencent/aegis-node-sdk/lib/packages/core/src/util/event-emitter.d.ts +18 -18
- package/@tencent/aegis-node-sdk/lib/packages/core/src/util/index.d.ts +60 -60
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/index.d.ts +15 -15
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/interface/selector.d.ts +5 -5
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/pipes/batch-report-pipe.d.ts +6 -6
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_base.d.ts +18 -18
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_http.d.ts +12 -12
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/ip_selector.d.ts +10 -10
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/polaris_selector.d.ts +20 -20
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/selector_base.d.ts +27 -27
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/util/eval_require.d.ts +2 -2
- package/mcp-server-prompt.png +0 -0
- package/mcp.json +9 -9
- package/package.json +1 -1
- package/resource/doc/chatuikit/android/client_api_android.md +1377 -0
- package/resource/doc/chatuikit/android/integrate_tuichat_only_android.md +382 -0
- package/resource/doc/chatuikit/android/integrate_tuikit_android.md +612 -0
- package/resource/doc/chatuikit/android/ui_api_android.md +418 -0
- package/resource/doc/chatuikit/faq/freq_qa.md +86 -0
- package/resource/doc/chatuikit/faq/sdk_qa.md +117 -0
- package/resource/doc/chatuikit/faq/vue_qa.md +344 -0
- package/resource/doc/chatuikit/faq/web_qa.md +118 -0
- package/resource/doc/chatuikit/flutter/client_api_Flutter.md +939 -0
- package/resource/doc/chatuikit/flutter/integrate_tuikit_Flutter.md +1432 -0
- package/resource/doc/chatuikit/iOS/client_api_iOS.md +1371 -0
- package/resource/doc/chatuikit/iOS/integrate_tuichat_only_iOS.md +993 -0
- package/resource/doc/chatuikit/iOS/integrate_tuikit_iOS.md +1427 -0
- package/resource/doc/chatuikit/iOS/ui_api_iOS.md +526 -0
- package/resource/doc/chatuikit/react/integrate_tuichat_only_react.md +185 -0
- package/resource/doc/chatuikit/react/integrate_tuichat_react.md +212 -0
- package/resource/doc/chatuikit/vue/integrate_tuichat_only_vue.md +149 -0
- package/resource/doc/chatuikit/vue/integrate_tuichat_vue.md +248 -0
- package/server.js +57 -33
- package/server.js.map +1 -1
- package/@tencent/polaris/node_modules/axios/CHANGELOG.md +0 -891
- package/@tencent/polaris/node_modules/axios/LICENSE +0 -19
- package/@tencent/polaris/node_modules/axios/README.md +0 -908
- package/@tencent/polaris/node_modules/axios/SECURITY.md +0 -5
- package/@tencent/polaris/node_modules/axios/UPGRADE_GUIDE.md +0 -168
- package/@tencent/polaris/node_modules/axios/dist/axios.js +0 -2277
- package/@tencent/polaris/node_modules/axios/dist/axios.map +0 -1
- package/@tencent/polaris/node_modules/axios/dist/axios.min.js +0 -4
- package/@tencent/polaris/node_modules/axios/dist/axios.min.map +0 -1
- package/@tencent/polaris/node_modules/axios/index.d.ts +0 -221
- package/@tencent/polaris/node_modules/axios/index.js +0 -1
- package/@tencent/polaris/node_modules/axios/lib/adapters/README.md +0 -37
- package/@tencent/polaris/node_modules/axios/lib/adapters/http.js +0 -388
- package/@tencent/polaris/node_modules/axios/lib/adapters/xhr.js +0 -212
- package/@tencent/polaris/node_modules/axios/lib/axios.js +0 -57
- package/@tencent/polaris/node_modules/axios/lib/cancel/Cancel.js +0 -19
- package/@tencent/polaris/node_modules/axios/lib/cancel/CancelToken.js +0 -119
- package/@tencent/polaris/node_modules/axios/lib/cancel/isCancel.js +0 -5
- package/@tencent/polaris/node_modules/axios/lib/core/Axios.js +0 -155
- package/@tencent/polaris/node_modules/axios/lib/core/InterceptorManager.js +0 -54
- package/@tencent/polaris/node_modules/axios/lib/core/README.md +0 -8
- package/@tencent/polaris/node_modules/axios/lib/core/buildFullPath.js +0 -20
- package/@tencent/polaris/node_modules/axios/lib/core/createError.js +0 -18
- package/@tencent/polaris/node_modules/axios/lib/core/dispatchRequest.js +0 -87
- package/@tencent/polaris/node_modules/axios/lib/core/enhanceError.js +0 -43
- package/@tencent/polaris/node_modules/axios/lib/core/mergeConfig.js +0 -99
- package/@tencent/polaris/node_modules/axios/lib/core/settle.js +0 -25
- package/@tencent/polaris/node_modules/axios/lib/core/transformData.js +0 -22
- package/@tencent/polaris/node_modules/axios/lib/defaults.js +0 -134
- package/@tencent/polaris/node_modules/axios/lib/env/README.md +0 -3
- package/@tencent/polaris/node_modules/axios/lib/env/data.js +0 -3
- package/@tencent/polaris/node_modules/axios/lib/helpers/README.md +0 -7
- package/@tencent/polaris/node_modules/axios/lib/helpers/bind.js +0 -11
- package/@tencent/polaris/node_modules/axios/lib/helpers/buildURL.js +0 -70
- package/@tencent/polaris/node_modules/axios/lib/helpers/combineURLs.js +0 -14
- package/@tencent/polaris/node_modules/axios/lib/helpers/cookies.js +0 -53
- package/@tencent/polaris/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -24
- package/@tencent/polaris/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
- package/@tencent/polaris/node_modules/axios/lib/helpers/isAxiosError.js +0 -13
- package/@tencent/polaris/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -68
- package/@tencent/polaris/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
- package/@tencent/polaris/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
- package/@tencent/polaris/node_modules/axios/lib/helpers/spread.js +0 -27
- package/@tencent/polaris/node_modules/axios/lib/helpers/toFormData.js +0 -55
- package/@tencent/polaris/node_modules/axios/lib/helpers/validator.js +0 -82
- package/@tencent/polaris/node_modules/axios/lib/utils.js +0 -349
- package/@tencent/polaris/node_modules/axios/package.json +0 -86
- package/@tencent/polaris/node_modules/axios/tsconfig.json +0 -14
- package/@tencent/polaris/node_modules/axios/tslint.json +0 -6
- package/resource/doc/tuicallkit/vue/api_TUICallObserver.md +0 -926
|
@@ -1,130 +1,130 @@
|
|
|
1
|
-
export declare enum LogType {
|
|
2
|
-
INFO_ALL = "-1",
|
|
3
|
-
API_RESPONSE = "1",
|
|
4
|
-
INFO = "2",
|
|
5
|
-
ERROR = "4",
|
|
6
|
-
PROMISE_ERROR = "8",
|
|
7
|
-
AJAX_ERROR = "16",
|
|
8
|
-
SCRIPT_ERROR = "32",
|
|
9
|
-
IMAGE_ERROR = "64",
|
|
10
|
-
CSS_ERROR = "128",
|
|
11
|
-
CONSOLE_ERROR = "256",
|
|
12
|
-
MEDIA_ERROR = "512",
|
|
13
|
-
RET_ERROR = "1024",
|
|
14
|
-
PAGE_LOAD = "1025",
|
|
15
|
-
SLOW_PAGE_LOAD = "1026",
|
|
16
|
-
SLOW_NET_REQUEST = "1027",
|
|
17
|
-
ASSERT_REQUEST = "1028",
|
|
18
|
-
SLOW_ASSET_REQUEST = "1029",
|
|
19
|
-
CLICK_EVENT = "1030",
|
|
20
|
-
CONSOLE_LOG = "1031",
|
|
21
|
-
REPORT = "2048",
|
|
22
|
-
PV = "4096",
|
|
23
|
-
EVENT = "8192",
|
|
24
|
-
SPEED_EVENT = "8193",
|
|
25
|
-
PAGE_NOT_FOUND_ERROR = "16384",
|
|
26
|
-
WEBSOCKET_ERROR = "32768",
|
|
27
|
-
BRIDGE_ERROR = "65536",
|
|
28
|
-
LAZY_LOAD_ERROR = "131072"
|
|
29
|
-
}
|
|
30
|
-
export declare enum PlatTypeNum {
|
|
31
|
-
android = 1,
|
|
32
|
-
ios = 2,
|
|
33
|
-
windows = 3,
|
|
34
|
-
macos = 4,
|
|
35
|
-
linux = 5,
|
|
36
|
-
devtools = 6,
|
|
37
|
-
other = 100
|
|
38
|
-
}
|
|
39
|
-
export declare enum NetworkTypeNum {
|
|
40
|
-
unknown = 100,
|
|
41
|
-
wifi = 1,
|
|
42
|
-
net2g = 2,
|
|
43
|
-
net3g = 3,
|
|
44
|
-
net4g = 4,
|
|
45
|
-
net5g = 5,
|
|
46
|
-
net6g = 6
|
|
47
|
-
}
|
|
48
|
-
export interface NormalLog {
|
|
49
|
-
msg: any;
|
|
50
|
-
level: LogType;
|
|
51
|
-
[key: string]: any;
|
|
52
|
-
}
|
|
53
|
-
export interface SpeedLog {
|
|
54
|
-
url: string;
|
|
55
|
-
isHttps: boolean;
|
|
56
|
-
method: string;
|
|
57
|
-
type: 'static' | 'fetch';
|
|
58
|
-
duration?: number;
|
|
59
|
-
nextHopProtocol?: string;
|
|
60
|
-
ret?: string | number | 'unknown';
|
|
61
|
-
status?: number;
|
|
62
|
-
isErr?: number;
|
|
63
|
-
payload?: any;
|
|
64
|
-
[key: string]: any;
|
|
65
|
-
}
|
|
66
|
-
export interface BridgeLog {
|
|
67
|
-
name: string;
|
|
68
|
-
type: 'bridge';
|
|
69
|
-
duration?: number;
|
|
70
|
-
ret?: string | number | 'unknown';
|
|
71
|
-
isErr?: number;
|
|
72
|
-
[key: string]: any;
|
|
73
|
-
}
|
|
74
|
-
export interface PagePerformanceLog {
|
|
75
|
-
dnsLookup: number;
|
|
76
|
-
tcp: number;
|
|
77
|
-
ssl: number;
|
|
78
|
-
ttfb: number;
|
|
79
|
-
contentDownload: number;
|
|
80
|
-
domParse: number;
|
|
81
|
-
resourceDownload: number;
|
|
82
|
-
firstScreenTiming: number;
|
|
83
|
-
[key: string]: any;
|
|
84
|
-
}
|
|
85
|
-
export interface PagePerformanceLogForHippy3 {
|
|
86
|
-
nativeInit: number;
|
|
87
|
-
jsEngineInit: number;
|
|
88
|
-
runApplication: number;
|
|
89
|
-
firstFrame: number;
|
|
90
|
-
executeSource: number;
|
|
91
|
-
loadSource: number;
|
|
92
|
-
[key: string]: any;
|
|
93
|
-
}
|
|
94
|
-
export interface HippyPagePerformanceLog {
|
|
95
|
-
engineInit: number;
|
|
96
|
-
bundleLoad: number;
|
|
97
|
-
firstScreenTiming: number;
|
|
98
|
-
firstScreenRequest: number;
|
|
99
|
-
loadEnd: number;
|
|
100
|
-
[key: string]: any;
|
|
101
|
-
}
|
|
102
|
-
export interface StaticAssetsLog {
|
|
103
|
-
url: string;
|
|
104
|
-
isHttps: boolean;
|
|
105
|
-
method: string;
|
|
106
|
-
type: 'static' | 'fetch';
|
|
107
|
-
duration?: number;
|
|
108
|
-
nextHopProtocol?: string;
|
|
109
|
-
ret?: string | 'unknown';
|
|
110
|
-
status?: number;
|
|
111
|
-
domainLookup: number;
|
|
112
|
-
connectTime: number;
|
|
113
|
-
urlQuery: string;
|
|
114
|
-
transferSize?: number;
|
|
115
|
-
}
|
|
116
|
-
export interface ReportTimeLog {
|
|
117
|
-
name: string;
|
|
118
|
-
duration: number;
|
|
119
|
-
ext1?: string;
|
|
120
|
-
ext2?: string;
|
|
121
|
-
ext3?: string;
|
|
122
|
-
from?: string;
|
|
123
|
-
}
|
|
124
|
-
export interface EventLog {
|
|
125
|
-
name: string;
|
|
126
|
-
ext1?: string;
|
|
127
|
-
ext2?: string;
|
|
128
|
-
ext3?: string;
|
|
129
|
-
from?: string;
|
|
130
|
-
}
|
|
1
|
+
export declare enum LogType {
|
|
2
|
+
INFO_ALL = "-1",
|
|
3
|
+
API_RESPONSE = "1",
|
|
4
|
+
INFO = "2",
|
|
5
|
+
ERROR = "4",
|
|
6
|
+
PROMISE_ERROR = "8",
|
|
7
|
+
AJAX_ERROR = "16",
|
|
8
|
+
SCRIPT_ERROR = "32",
|
|
9
|
+
IMAGE_ERROR = "64",
|
|
10
|
+
CSS_ERROR = "128",
|
|
11
|
+
CONSOLE_ERROR = "256",
|
|
12
|
+
MEDIA_ERROR = "512",
|
|
13
|
+
RET_ERROR = "1024",
|
|
14
|
+
PAGE_LOAD = "1025",
|
|
15
|
+
SLOW_PAGE_LOAD = "1026",
|
|
16
|
+
SLOW_NET_REQUEST = "1027",
|
|
17
|
+
ASSERT_REQUEST = "1028",
|
|
18
|
+
SLOW_ASSET_REQUEST = "1029",
|
|
19
|
+
CLICK_EVENT = "1030",
|
|
20
|
+
CONSOLE_LOG = "1031",
|
|
21
|
+
REPORT = "2048",
|
|
22
|
+
PV = "4096",
|
|
23
|
+
EVENT = "8192",
|
|
24
|
+
SPEED_EVENT = "8193",
|
|
25
|
+
PAGE_NOT_FOUND_ERROR = "16384",
|
|
26
|
+
WEBSOCKET_ERROR = "32768",
|
|
27
|
+
BRIDGE_ERROR = "65536",
|
|
28
|
+
LAZY_LOAD_ERROR = "131072"
|
|
29
|
+
}
|
|
30
|
+
export declare enum PlatTypeNum {
|
|
31
|
+
android = 1,
|
|
32
|
+
ios = 2,
|
|
33
|
+
windows = 3,
|
|
34
|
+
macos = 4,
|
|
35
|
+
linux = 5,
|
|
36
|
+
devtools = 6,
|
|
37
|
+
other = 100
|
|
38
|
+
}
|
|
39
|
+
export declare enum NetworkTypeNum {
|
|
40
|
+
unknown = 100,
|
|
41
|
+
wifi = 1,
|
|
42
|
+
net2g = 2,
|
|
43
|
+
net3g = 3,
|
|
44
|
+
net4g = 4,
|
|
45
|
+
net5g = 5,
|
|
46
|
+
net6g = 6
|
|
47
|
+
}
|
|
48
|
+
export interface NormalLog {
|
|
49
|
+
msg: any;
|
|
50
|
+
level: LogType;
|
|
51
|
+
[key: string]: any;
|
|
52
|
+
}
|
|
53
|
+
export interface SpeedLog {
|
|
54
|
+
url: string;
|
|
55
|
+
isHttps: boolean;
|
|
56
|
+
method: string;
|
|
57
|
+
type: 'static' | 'fetch';
|
|
58
|
+
duration?: number;
|
|
59
|
+
nextHopProtocol?: string;
|
|
60
|
+
ret?: string | number | 'unknown';
|
|
61
|
+
status?: number;
|
|
62
|
+
isErr?: number;
|
|
63
|
+
payload?: any;
|
|
64
|
+
[key: string]: any;
|
|
65
|
+
}
|
|
66
|
+
export interface BridgeLog {
|
|
67
|
+
name: string;
|
|
68
|
+
type: 'bridge';
|
|
69
|
+
duration?: number;
|
|
70
|
+
ret?: string | number | 'unknown';
|
|
71
|
+
isErr?: number;
|
|
72
|
+
[key: string]: any;
|
|
73
|
+
}
|
|
74
|
+
export interface PagePerformanceLog {
|
|
75
|
+
dnsLookup: number;
|
|
76
|
+
tcp: number;
|
|
77
|
+
ssl: number;
|
|
78
|
+
ttfb: number;
|
|
79
|
+
contentDownload: number;
|
|
80
|
+
domParse: number;
|
|
81
|
+
resourceDownload: number;
|
|
82
|
+
firstScreenTiming: number;
|
|
83
|
+
[key: string]: any;
|
|
84
|
+
}
|
|
85
|
+
export interface PagePerformanceLogForHippy3 {
|
|
86
|
+
nativeInit: number;
|
|
87
|
+
jsEngineInit: number;
|
|
88
|
+
runApplication: number;
|
|
89
|
+
firstFrame: number;
|
|
90
|
+
executeSource: number;
|
|
91
|
+
loadSource: number;
|
|
92
|
+
[key: string]: any;
|
|
93
|
+
}
|
|
94
|
+
export interface HippyPagePerformanceLog {
|
|
95
|
+
engineInit: number;
|
|
96
|
+
bundleLoad: number;
|
|
97
|
+
firstScreenTiming: number;
|
|
98
|
+
firstScreenRequest: number;
|
|
99
|
+
loadEnd: number;
|
|
100
|
+
[key: string]: any;
|
|
101
|
+
}
|
|
102
|
+
export interface StaticAssetsLog {
|
|
103
|
+
url: string;
|
|
104
|
+
isHttps: boolean;
|
|
105
|
+
method: string;
|
|
106
|
+
type: 'static' | 'fetch';
|
|
107
|
+
duration?: number;
|
|
108
|
+
nextHopProtocol?: string;
|
|
109
|
+
ret?: string | 'unknown';
|
|
110
|
+
status?: number;
|
|
111
|
+
domainLookup: number;
|
|
112
|
+
connectTime: number;
|
|
113
|
+
urlQuery: string;
|
|
114
|
+
transferSize?: number;
|
|
115
|
+
}
|
|
116
|
+
export interface ReportTimeLog {
|
|
117
|
+
name: string;
|
|
118
|
+
duration: number;
|
|
119
|
+
ext1?: string;
|
|
120
|
+
ext2?: string;
|
|
121
|
+
ext3?: string;
|
|
122
|
+
from?: string;
|
|
123
|
+
}
|
|
124
|
+
export interface EventLog {
|
|
125
|
+
name: string;
|
|
126
|
+
ext1?: string;
|
|
127
|
+
ext2?: string;
|
|
128
|
+
ext3?: string;
|
|
129
|
+
from?: string;
|
|
130
|
+
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
export interface SendOption {
|
|
2
|
-
url: string;
|
|
3
|
-
method?: 'get' | 'post';
|
|
4
|
-
contentType?: string;
|
|
5
|
-
data?: any;
|
|
6
|
-
addBean?: boolean;
|
|
7
|
-
from?: string;
|
|
8
|
-
beanFilter?: string[];
|
|
9
|
-
type?: SendType;
|
|
10
|
-
log?: any;
|
|
11
|
-
success?: (data: any) => void;
|
|
12
|
-
fail?: (err: any) => void;
|
|
13
|
-
sendBeacon?: boolean;
|
|
14
|
-
requestConfig?: {
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export declare enum SendType {
|
|
19
|
-
LOG = "log",
|
|
20
|
-
SPEED = "speed",
|
|
21
|
-
PERFORMANCE = "performance",
|
|
22
|
-
OFFLINE = "offline",
|
|
23
|
-
WHITE_LIST = "whiteList",
|
|
24
|
-
VITALS = "vitals",
|
|
25
|
-
PV = "pv",
|
|
26
|
-
CUSTOM_PV = "customPV",
|
|
27
|
-
EVENT = "event",
|
|
28
|
-
CUSTOM = "custom",
|
|
29
|
-
SDK_ERROR = "sdkError",
|
|
30
|
-
SET_DATA = "setData",
|
|
31
|
-
LOAD_PACKAGE = "loadPackage"
|
|
32
|
-
}
|
|
33
|
-
export declare type SendSuccess = (data: any) => void;
|
|
34
|
-
export declare type SendFail = (err: any) => void;
|
|
1
|
+
export interface SendOption {
|
|
2
|
+
url: string;
|
|
3
|
+
method?: 'get' | 'post';
|
|
4
|
+
contentType?: string;
|
|
5
|
+
data?: any;
|
|
6
|
+
addBean?: boolean;
|
|
7
|
+
from?: string;
|
|
8
|
+
beanFilter?: string[];
|
|
9
|
+
type?: SendType;
|
|
10
|
+
log?: any;
|
|
11
|
+
success?: (data: any) => void;
|
|
12
|
+
fail?: (err: any) => void;
|
|
13
|
+
sendBeacon?: boolean;
|
|
14
|
+
requestConfig?: {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare enum SendType {
|
|
19
|
+
LOG = "log",
|
|
20
|
+
SPEED = "speed",
|
|
21
|
+
PERFORMANCE = "performance",
|
|
22
|
+
OFFLINE = "offline",
|
|
23
|
+
WHITE_LIST = "whiteList",
|
|
24
|
+
VITALS = "vitals",
|
|
25
|
+
PV = "pv",
|
|
26
|
+
CUSTOM_PV = "customPV",
|
|
27
|
+
EVENT = "event",
|
|
28
|
+
CUSTOM = "custom",
|
|
29
|
+
SDK_ERROR = "sdkError",
|
|
30
|
+
SET_DATA = "setData",
|
|
31
|
+
LOAD_PACKAGE = "loadPackage"
|
|
32
|
+
}
|
|
33
|
+
export declare type SendSuccess = (data: any) => void;
|
|
34
|
+
export declare type SendFail = (err: any) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Pipe } from './index';
|
|
2
|
-
export declare const formatNormalLogPipe: Pipe;
|
|
1
|
+
import { Pipe } from './index';
|
|
2
|
+
export declare const formatNormalLogPipe: Pipe;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { createRandomSamplePipe } from './sample';
|
|
2
|
-
export { createWriteReportPipe } from './write-before';
|
|
3
|
-
export { createThrottlePipe } from './throttle';
|
|
4
|
-
export { formatNormalLogPipe } from './format';
|
|
5
|
-
export { createLimitLengthPipe } from './length-limit';
|
|
6
|
-
export { createWhitelistPipe } from './whitelist';
|
|
7
|
-
export { removePayloadPipe } from './remove-payload';
|
|
8
|
-
export { createPvPipe } from './pv';
|
|
9
|
-
export { createSpeedRepeatLimitPipe, createErrorLogLimitPipe } from './repeat-limit';
|
|
10
|
-
export { reportPipe, reportEventPipe, reportCustomPipe } from './report';
|
|
11
|
-
export { beforeRequestHooks } from '../hooks/beforeRequestHooks';
|
|
12
|
-
export { modifyRequestHooks } from '../hooks/modifyRequestHooks';
|
|
13
|
-
export { afterRequestHooks } from '../hooks/afterRequestHooks';
|
|
14
|
-
export * from './trace';
|
|
15
|
-
export declare type Pipe<M = any, N = any> = (msg: M, resolve: Resolve<N>) => void;
|
|
16
|
-
export declare type Resolve<M> = (msg: M) => void;
|
|
17
|
-
export declare type Pipeline<M = any, N = any> = (msg: M, end?: Resolve<N>) => any;
|
|
18
|
-
export declare const createPipeline: (pipeArr: Pipe[]) => Pipeline;
|
|
1
|
+
export { createRandomSamplePipe } from './sample';
|
|
2
|
+
export { createWriteReportPipe } from './write-before';
|
|
3
|
+
export { createThrottlePipe } from './throttle';
|
|
4
|
+
export { formatNormalLogPipe } from './format';
|
|
5
|
+
export { createLimitLengthPipe } from './length-limit';
|
|
6
|
+
export { createWhitelistPipe } from './whitelist';
|
|
7
|
+
export { removePayloadPipe } from './remove-payload';
|
|
8
|
+
export { createPvPipe } from './pv';
|
|
9
|
+
export { createSpeedRepeatLimitPipe, createErrorLogLimitPipe } from './repeat-limit';
|
|
10
|
+
export { reportPipe, reportEventPipe, reportCustomPipe } from './report';
|
|
11
|
+
export { beforeRequestHooks } from '../hooks/beforeRequestHooks';
|
|
12
|
+
export { modifyRequestHooks } from '../hooks/modifyRequestHooks';
|
|
13
|
+
export { afterRequestHooks } from '../hooks/afterRequestHooks';
|
|
14
|
+
export * from './trace';
|
|
15
|
+
export declare type Pipe<M = any, N = any> = (msg: M, resolve: Resolve<N>) => void;
|
|
16
|
+
export declare type Resolve<M> = (msg: M) => void;
|
|
17
|
+
export declare type Pipeline<M = any, N = any> = (msg: M, end?: Resolve<N>) => any;
|
|
18
|
+
export declare const createPipeline: (pipeArr: Pipe[]) => Pipeline;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Pipe } from './index';
|
|
2
|
-
import Core from '../core';
|
|
3
|
-
/**
|
|
4
|
-
* 限制每条日志的长度,解决上报日志过大的问题
|
|
5
|
-
* @param aegis
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export declare const createLimitLengthPipe: (aegis: Core) => Pipe;
|
|
1
|
+
import { Pipe } from './index';
|
|
2
|
+
import Core from '../core';
|
|
3
|
+
/**
|
|
4
|
+
* 限制每条日志的长度,解决上报日志过大的问题
|
|
5
|
+
* @param aegis
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const createLimitLengthPipe: (aegis: Core) => Pipe;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Pipe } from './index';
|
|
2
|
-
import Core from '../core';
|
|
3
|
-
/**
|
|
4
|
-
* 上报 pv 的 pipeline
|
|
5
|
-
* @param aegis
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export declare const createPvPipe: (aegis: Core) => Pipe;
|
|
1
|
+
import { Pipe } from './index';
|
|
2
|
+
import Core from '../core';
|
|
3
|
+
/**
|
|
4
|
+
* 上报 pv 的 pipeline
|
|
5
|
+
* @param aegis
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const createPvPipe: (aegis: Core) => Pipe;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Pipe } from './index';
|
|
2
|
-
export declare const removePayloadPipe: () => Pipe;
|
|
1
|
+
import { Pipe } from './index';
|
|
2
|
+
export declare const removePayloadPipe: () => Pipe;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Pipe } from './index';
|
|
2
|
-
import { Config } from '../interface';
|
|
3
|
-
export declare const createSpeedRepeatLimitPipe: (config: Config) => Pipe;
|
|
4
|
-
export declare const createErrorLogLimitPipe: (config: Config) => Pipe;
|
|
1
|
+
import { Pipe } from './index';
|
|
2
|
+
import { Config } from '../interface';
|
|
3
|
+
export declare const createSpeedRepeatLimitPipe: (config: Config) => Pipe;
|
|
4
|
+
export declare const createErrorLogLimitPipe: (config: Config) => Pipe;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Pipe } from './index';
|
|
2
|
-
import Core from '../core';
|
|
3
|
-
/**
|
|
4
|
-
* 上报
|
|
5
|
-
* @param aegis 实例
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export declare const reportPipe: (aegis: Core) => Pipe;
|
|
9
|
-
export declare const reportEventPipe: (aegis: Core) => Pipe;
|
|
10
|
-
export declare const reportCustomPipe: (aegis: Core) => Pipe;
|
|
1
|
+
import { Pipe } from './index';
|
|
2
|
+
import Core from '../core';
|
|
3
|
+
/**
|
|
4
|
+
* 上报
|
|
5
|
+
* @param aegis 实例
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const reportPipe: (aegis: Core) => Pipe;
|
|
9
|
+
export declare const reportEventPipe: (aegis: Core) => Pipe;
|
|
10
|
+
export declare const reportCustomPipe: (aegis: Core) => Pipe;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Pipe } from './index';
|
|
2
|
-
import Core from '../core';
|
|
3
|
-
export declare const createRandomSamplePipe: (aegis: Core) => Pipe;
|
|
1
|
+
import { Pipe } from './index';
|
|
2
|
+
import Core from '../core';
|
|
3
|
+
export declare const createRandomSamplePipe: (aegis: Core) => Pipe;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Pipe } from './index';
|
|
2
|
-
import Core from '../core';
|
|
3
|
-
export declare const createThrottlePipe: (aegis: Core, maxLength?: number | undefined) => Pipe;
|
|
1
|
+
import { Pipe } from './index';
|
|
2
|
+
import Core from '../core';
|
|
3
|
+
export declare const createThrottlePipe: (aegis: Core, maxLength?: number | undefined) => Pipe;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
export interface SWOptions {
|
|
2
|
-
host: string;
|
|
3
|
-
pathname: string;
|
|
4
|
-
}
|
|
5
|
-
export declare type TraceType = 'traceparent' | 'b3' | 'sw8' | 'sentry-trace';
|
|
6
|
-
/**
|
|
7
|
-
* 根据用户配置的参数构建 trace 协议
|
|
8
|
-
* 目前适配 opentelemetry,skywalking,sentry-trace,b3协议,后续可以自由扩展
|
|
9
|
-
*/
|
|
10
|
-
export declare class TraceRequestHeader {
|
|
11
|
-
private traceType;
|
|
12
|
-
private traceId;
|
|
13
|
-
private ignoreUrls;
|
|
14
|
-
private urls;
|
|
15
|
-
private url;
|
|
16
|
-
private traceFlag;
|
|
17
|
-
constructor(traceType: TraceType, ignoreUrls: Array<string | RegExp>, urls?: Array<string | RegExp> | null, traceFlag?: boolean | number | unknown);
|
|
18
|
-
generate(url: string, headers?: HeadersInit | any, options?: SWOptions): {
|
|
19
|
-
name: TraceType;
|
|
20
|
-
value: string;
|
|
21
|
-
} | undefined;
|
|
22
|
-
private createTraceparent;
|
|
23
|
-
private createB3;
|
|
24
|
-
private createSw8;
|
|
25
|
-
private createSentryTrace;
|
|
26
|
-
private isUrlIgnored;
|
|
27
|
-
private isUrlInTraceUrls;
|
|
28
|
-
private urlMatches;
|
|
29
|
-
}
|
|
30
|
-
export declare const isTraceHeader: (key: string) => boolean;
|
|
31
|
-
export declare const parseNormalTraceRequestHeader: (headers: HeadersInit | undefined) => string;
|
|
32
|
-
export * from './jwt';
|
|
33
|
-
export * from './ot-js';
|
|
34
|
-
export * from './uuid';
|
|
1
|
+
export interface SWOptions {
|
|
2
|
+
host: string;
|
|
3
|
+
pathname: string;
|
|
4
|
+
}
|
|
5
|
+
export declare type TraceType = 'traceparent' | 'b3' | 'sw8' | 'sentry-trace';
|
|
6
|
+
/**
|
|
7
|
+
* 根据用户配置的参数构建 trace 协议
|
|
8
|
+
* 目前适配 opentelemetry,skywalking,sentry-trace,b3协议,后续可以自由扩展
|
|
9
|
+
*/
|
|
10
|
+
export declare class TraceRequestHeader {
|
|
11
|
+
private traceType;
|
|
12
|
+
private traceId;
|
|
13
|
+
private ignoreUrls;
|
|
14
|
+
private urls;
|
|
15
|
+
private url;
|
|
16
|
+
private traceFlag;
|
|
17
|
+
constructor(traceType: TraceType, ignoreUrls: Array<string | RegExp>, urls?: Array<string | RegExp> | null, traceFlag?: boolean | number | unknown);
|
|
18
|
+
generate(url: string, headers?: HeadersInit | any, options?: SWOptions): {
|
|
19
|
+
name: TraceType;
|
|
20
|
+
value: string;
|
|
21
|
+
} | undefined;
|
|
22
|
+
private createTraceparent;
|
|
23
|
+
private createB3;
|
|
24
|
+
private createSw8;
|
|
25
|
+
private createSentryTrace;
|
|
26
|
+
private isUrlIgnored;
|
|
27
|
+
private isUrlInTraceUrls;
|
|
28
|
+
private urlMatches;
|
|
29
|
+
}
|
|
30
|
+
export declare const isTraceHeader: (key: string) => boolean;
|
|
31
|
+
export declare const parseNormalTraceRequestHeader: (headers: HeadersInit | undefined) => string;
|
|
32
|
+
export * from './jwt';
|
|
33
|
+
export * from './ot-js';
|
|
34
|
+
export * from './uuid';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* btoa 方法兼容,解决小程序不支持 btoa 的问题
|
|
3
|
-
* @param str
|
|
4
|
-
* @returns
|
|
5
|
-
*/
|
|
6
|
-
export declare const btoaPolyfill: (str: string) => string;
|
|
7
|
-
/**
|
|
8
|
-
* atob 方法兼容,解决小程序不支持 atob 的问题
|
|
9
|
-
* @param str
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
|
-
export declare const atobPolyfill: (str: string) => string;
|
|
1
|
+
/**
|
|
2
|
+
* btoa 方法兼容,解决小程序不支持 btoa 的问题
|
|
3
|
+
* @param str
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
export declare const btoaPolyfill: (str: string) => string;
|
|
7
|
+
/**
|
|
8
|
+
* atob 方法兼容,解决小程序不支持 atob 的问题
|
|
9
|
+
* @param str
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
export declare const atobPolyfill: (str: string) => string;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export declare const RandomIdGenerator: {
|
|
2
|
-
/**
|
|
3
|
-
* 生成 traceId
|
|
4
|
-
* Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex
|
|
5
|
-
* characters corresponding to 128 bits.
|
|
6
|
-
*/
|
|
7
|
-
generateTraceId: () => string;
|
|
8
|
-
/**
|
|
9
|
-
* 生成 spanId
|
|
10
|
-
* Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex
|
|
11
|
-
* characters corresponding to 64 bits.
|
|
12
|
-
*/
|
|
13
|
-
generateSpanId: () => string;
|
|
14
|
-
};
|
|
1
|
+
export declare const RandomIdGenerator: {
|
|
2
|
+
/**
|
|
3
|
+
* 生成 traceId
|
|
4
|
+
* Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex
|
|
5
|
+
* characters corresponding to 128 bits.
|
|
6
|
+
*/
|
|
7
|
+
generateTraceId: () => string;
|
|
8
|
+
/**
|
|
9
|
+
* 生成 spanId
|
|
10
|
+
* Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex
|
|
11
|
+
* characters corresponding to 64 bits.
|
|
12
|
+
*/
|
|
13
|
+
generateSpanId: () => string;
|
|
14
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function uuid4(): string;
|
|
2
|
-
export declare const generateAid: () => string;
|
|
1
|
+
export declare function uuid4(): string;
|
|
2
|
+
export declare const generateAid: () => string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Pipe } from './index';
|
|
2
|
-
import Core from '../core';
|
|
3
|
-
/**
|
|
4
|
-
* 白名单请求的 pipeline
|
|
5
|
-
* 白名单接口主要有三个作用
|
|
6
|
-
* 1. 判断当前用户是否是白名单
|
|
7
|
-
* 2. 获取当前应用的抽样率
|
|
8
|
-
* 3. 判断当前上报是否合法(参数不对,上报id不对,当前应用已经停止上报,用户欠费等)
|
|
9
|
-
* @param aegis
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
|
-
export declare const createWhitelistPipe: (aegis: Core) => Pipe;
|
|
1
|
+
import { Pipe } from './index';
|
|
2
|
+
import Core from '../core';
|
|
3
|
+
/**
|
|
4
|
+
* 白名单请求的 pipeline
|
|
5
|
+
* 白名单接口主要有三个作用
|
|
6
|
+
* 1. 判断当前用户是否是白名单
|
|
7
|
+
* 2. 获取当前应用的抽样率
|
|
8
|
+
* 3. 判断当前上报是否合法(参数不对,上报id不对,当前应用已经停止上报,用户欠费等)
|
|
9
|
+
* @param aegis
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
export declare const createWhitelistPipe: (aegis: Core) => Pipe;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Pipe } from './index';
|
|
2
|
-
import { Config } from '../interface';
|
|
3
|
-
export declare const createWriteReportPipe: (emit: Function, config: Config) => Pipe;
|
|
1
|
+
import { Pipe } from './index';
|
|
2
|
+
import { Config } from '../interface';
|
|
3
|
+
export declare const createWriteReportPipe: (emit: Function, config: Config) => Pipe;
|