mcp-user-system 2.1.2 → 2.2.1
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/dist/index.js +1 -1
- package/dist/tools/client.d.ts +2 -4
- package/dist/tools/client.js +9 -7
- package/dist/tools/client.js.map +1 -1
- package/dist/tools/dashboard.d.ts +34 -0
- package/dist/tools/dashboard.js +39 -19
- package/dist/tools/dashboard.js.map +1 -1
- package/dist/tools/invoice.d.ts +18 -0
- package/dist/tools/invoice.js +4 -0
- package/dist/tools/invoice.js.map +1 -1
- package/dist/tools/misc.d.ts +43 -14
- package/dist/tools/misc.js +15 -6
- package/dist/tools/misc.js.map +1 -1
- package/dist/tools/team.d.ts +64 -7
- package/dist/tools/team.js +120 -27
- package/dist/tools/team.js.map +1 -1
- package/dist/tools/wallet.d.ts +24 -6
- package/dist/tools/wallet.js +16 -13
- package/dist/tools/wallet.js.map +1 -1
- package/package.json +1 -1
package/dist/tools/misc.d.ts
CHANGED
|
@@ -4,6 +4,14 @@ export declare const tools: ({
|
|
|
4
4
|
inputSchema: {
|
|
5
5
|
type: "object";
|
|
6
6
|
properties: {
|
|
7
|
+
pageNum: {
|
|
8
|
+
type: string;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
pageSize: {
|
|
12
|
+
type: string;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
7
15
|
orderNo?: undefined;
|
|
8
16
|
amount?: undefined;
|
|
9
17
|
monthType?: undefined;
|
|
@@ -16,8 +24,6 @@ export declare const tools: ({
|
|
|
16
24
|
groupId?: undefined;
|
|
17
25
|
category?: undefined;
|
|
18
26
|
status?: undefined;
|
|
19
|
-
pageNum?: undefined;
|
|
20
|
-
pageSize?: undefined;
|
|
21
27
|
};
|
|
22
28
|
required: never[];
|
|
23
29
|
};
|
|
@@ -31,6 +37,8 @@ export declare const tools: ({
|
|
|
31
37
|
type: string;
|
|
32
38
|
description: string;
|
|
33
39
|
};
|
|
40
|
+
pageNum?: undefined;
|
|
41
|
+
pageSize?: undefined;
|
|
34
42
|
amount?: undefined;
|
|
35
43
|
monthType?: undefined;
|
|
36
44
|
deptId?: undefined;
|
|
@@ -42,8 +50,6 @@ export declare const tools: ({
|
|
|
42
50
|
groupId?: undefined;
|
|
43
51
|
category?: undefined;
|
|
44
52
|
status?: undefined;
|
|
45
|
-
pageNum?: undefined;
|
|
46
|
-
pageSize?: undefined;
|
|
47
53
|
};
|
|
48
54
|
required: string[];
|
|
49
55
|
};
|
|
@@ -57,6 +63,8 @@ export declare const tools: ({
|
|
|
57
63
|
type: string;
|
|
58
64
|
description: string;
|
|
59
65
|
};
|
|
66
|
+
pageNum?: undefined;
|
|
67
|
+
pageSize?: undefined;
|
|
60
68
|
orderNo?: undefined;
|
|
61
69
|
monthType?: undefined;
|
|
62
70
|
deptId?: undefined;
|
|
@@ -68,8 +76,6 @@ export declare const tools: ({
|
|
|
68
76
|
groupId?: undefined;
|
|
69
77
|
category?: undefined;
|
|
70
78
|
status?: undefined;
|
|
71
|
-
pageNum?: undefined;
|
|
72
|
-
pageSize?: undefined;
|
|
73
79
|
};
|
|
74
80
|
required: string[];
|
|
75
81
|
};
|
|
@@ -87,6 +93,8 @@ export declare const tools: ({
|
|
|
87
93
|
type: string;
|
|
88
94
|
description: string;
|
|
89
95
|
};
|
|
96
|
+
pageNum?: undefined;
|
|
97
|
+
pageSize?: undefined;
|
|
90
98
|
orderNo?: undefined;
|
|
91
99
|
amount?: undefined;
|
|
92
100
|
targetType?: undefined;
|
|
@@ -97,10 +105,8 @@ export declare const tools: ({
|
|
|
97
105
|
groupId?: undefined;
|
|
98
106
|
category?: undefined;
|
|
99
107
|
status?: undefined;
|
|
100
|
-
pageNum?: undefined;
|
|
101
|
-
pageSize?: undefined;
|
|
102
108
|
};
|
|
103
|
-
required:
|
|
109
|
+
required: string[];
|
|
104
110
|
};
|
|
105
111
|
} | {
|
|
106
112
|
name: string;
|
|
@@ -128,6 +134,8 @@ export declare const tools: ({
|
|
|
128
134
|
type: string;
|
|
129
135
|
description: string;
|
|
130
136
|
};
|
|
137
|
+
pageNum?: undefined;
|
|
138
|
+
pageSize?: undefined;
|
|
131
139
|
orderNo?: undefined;
|
|
132
140
|
amount?: undefined;
|
|
133
141
|
monthType?: undefined;
|
|
@@ -135,10 +143,8 @@ export declare const tools: ({
|
|
|
135
143
|
groupId?: undefined;
|
|
136
144
|
category?: undefined;
|
|
137
145
|
status?: undefined;
|
|
138
|
-
pageNum?: undefined;
|
|
139
|
-
pageSize?: undefined;
|
|
140
146
|
};
|
|
141
|
-
required:
|
|
147
|
+
required: string[];
|
|
142
148
|
};
|
|
143
149
|
} | {
|
|
144
150
|
name: string;
|
|
@@ -162,6 +168,8 @@ export declare const tools: ({
|
|
|
162
168
|
type: string;
|
|
163
169
|
description: string;
|
|
164
170
|
};
|
|
171
|
+
pageNum?: undefined;
|
|
172
|
+
pageSize?: undefined;
|
|
165
173
|
orderNo?: undefined;
|
|
166
174
|
amount?: undefined;
|
|
167
175
|
targetDeptId?: undefined;
|
|
@@ -170,8 +178,29 @@ export declare const tools: ({
|
|
|
170
178
|
groupId?: undefined;
|
|
171
179
|
category?: undefined;
|
|
172
180
|
status?: undefined;
|
|
181
|
+
};
|
|
182
|
+
required: string[];
|
|
183
|
+
};
|
|
184
|
+
} | {
|
|
185
|
+
name: string;
|
|
186
|
+
description: string;
|
|
187
|
+
inputSchema: {
|
|
188
|
+
type: "object";
|
|
189
|
+
properties: {
|
|
173
190
|
pageNum?: undefined;
|
|
174
191
|
pageSize?: undefined;
|
|
192
|
+
orderNo?: undefined;
|
|
193
|
+
amount?: undefined;
|
|
194
|
+
monthType?: undefined;
|
|
195
|
+
deptId?: undefined;
|
|
196
|
+
targetType?: undefined;
|
|
197
|
+
targetId?: undefined;
|
|
198
|
+
targetDeptId?: undefined;
|
|
199
|
+
limitType?: undefined;
|
|
200
|
+
quotaTotal?: undefined;
|
|
201
|
+
groupId?: undefined;
|
|
202
|
+
category?: undefined;
|
|
203
|
+
status?: undefined;
|
|
175
204
|
};
|
|
176
205
|
required: never[];
|
|
177
206
|
};
|
|
@@ -185,6 +214,8 @@ export declare const tools: ({
|
|
|
185
214
|
type: string;
|
|
186
215
|
description: string;
|
|
187
216
|
};
|
|
217
|
+
pageNum?: undefined;
|
|
218
|
+
pageSize?: undefined;
|
|
188
219
|
orderNo?: undefined;
|
|
189
220
|
amount?: undefined;
|
|
190
221
|
monthType?: undefined;
|
|
@@ -196,8 +227,6 @@ export declare const tools: ({
|
|
|
196
227
|
quotaTotal?: undefined;
|
|
197
228
|
category?: undefined;
|
|
198
229
|
status?: undefined;
|
|
199
|
-
pageNum?: undefined;
|
|
200
|
-
pageSize?: undefined;
|
|
201
230
|
};
|
|
202
231
|
required: string[];
|
|
203
232
|
};
|
package/dist/tools/misc.js
CHANGED
|
@@ -4,7 +4,14 @@ export const tools = [
|
|
|
4
4
|
{
|
|
5
5
|
name: "refund_list",
|
|
6
6
|
description: "退款订单列表",
|
|
7
|
-
inputSchema: {
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: "object",
|
|
9
|
+
properties: {
|
|
10
|
+
pageNum: { type: "number", description: "页码(默认1)" },
|
|
11
|
+
pageSize: { type: "number", description: "每页条数(默认10)" },
|
|
12
|
+
},
|
|
13
|
+
required: [],
|
|
14
|
+
},
|
|
8
15
|
},
|
|
9
16
|
{
|
|
10
17
|
name: "refund_detail",
|
|
@@ -38,7 +45,7 @@ export const tools = [
|
|
|
38
45
|
monthType: { type: "string", description: "月份类型" },
|
|
39
46
|
deptId: { type: "string", description: "部门ID(可选)" },
|
|
40
47
|
},
|
|
41
|
-
required: [],
|
|
48
|
+
required: ["monthType"],
|
|
42
49
|
},
|
|
43
50
|
},
|
|
44
51
|
{
|
|
@@ -53,7 +60,7 @@ export const tools = [
|
|
|
53
60
|
limitType: { type: "string", description: "限制类型" },
|
|
54
61
|
quotaTotal: { type: "string", description: "额度总量" },
|
|
55
62
|
},
|
|
56
|
-
required: [],
|
|
63
|
+
required: ["targetType", "targetId", "limitType"],
|
|
57
64
|
},
|
|
58
65
|
},
|
|
59
66
|
{
|
|
@@ -67,7 +74,7 @@ export const tools = [
|
|
|
67
74
|
targetId: { type: "string", description: "目标ID" },
|
|
68
75
|
deptId: { type: "string", description: "部门ID" },
|
|
69
76
|
},
|
|
70
|
-
required: [],
|
|
77
|
+
required: ["monthType", "targetType", "targetId"],
|
|
71
78
|
},
|
|
72
79
|
},
|
|
73
80
|
{
|
|
@@ -81,7 +88,7 @@ export const tools = [
|
|
|
81
88
|
targetId: { type: "string", description: "目标ID" },
|
|
82
89
|
deptId: { type: "string", description: "部门ID" },
|
|
83
90
|
},
|
|
84
|
-
required: [],
|
|
91
|
+
required: ["monthType", "targetType", "targetId"],
|
|
85
92
|
},
|
|
86
93
|
},
|
|
87
94
|
// ---- 预警 ----
|
|
@@ -141,7 +148,9 @@ export async function handle(name, args) {
|
|
|
141
148
|
switch (name) {
|
|
142
149
|
// ---- 退款 ----
|
|
143
150
|
case "refund_list":
|
|
144
|
-
return apiGetPage("/console/refund/list"
|
|
151
|
+
return apiGetPage("/console/refund/list", {
|
|
152
|
+
pageNum: args.pageNum, pageSize: args.pageSize,
|
|
153
|
+
});
|
|
145
154
|
case "refund_detail":
|
|
146
155
|
return apiGet(`/console/refund/${args.orderNo}`);
|
|
147
156
|
case "refund_preview":
|
package/dist/tools/misc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"misc.js","sourceRoot":"","sources":["../../src/tools/misc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,eAAe;IACf;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,QAAQ;QACrB,WAAW,EAAE,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"misc.js","sourceRoot":"","sources":["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,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ;aAC7F,CAAC,CAAC;QACL,KAAK,eAAe;YAClB,OAAO,MAAM,CAAC,wBAAwB,CAAC,CAAC;QAC1C,KAAK,eAAe;YAClB,OAAO,MAAM,CAAC,wBAAwB,CAAC,CAAC;QAC1C;YACE,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC"}
|
package/dist/tools/team.d.ts
CHANGED
|
@@ -9,7 +9,9 @@ export declare const tools: ({
|
|
|
9
9
|
keyword?: undefined;
|
|
10
10
|
roleId?: undefined;
|
|
11
11
|
status?: undefined;
|
|
12
|
-
|
|
12
|
+
pageNum?: undefined;
|
|
13
|
+
pageSize?: undefined;
|
|
14
|
+
days?: undefined;
|
|
13
15
|
phoneNumber?: undefined;
|
|
14
16
|
inviteCode?: undefined;
|
|
15
17
|
};
|
|
@@ -29,7 +31,9 @@ export declare const tools: ({
|
|
|
29
31
|
keyword?: undefined;
|
|
30
32
|
roleId?: undefined;
|
|
31
33
|
status?: undefined;
|
|
32
|
-
|
|
34
|
+
pageNum?: undefined;
|
|
35
|
+
pageSize?: undefined;
|
|
36
|
+
days?: undefined;
|
|
33
37
|
phoneNumber?: undefined;
|
|
34
38
|
inviteCode?: undefined;
|
|
35
39
|
};
|
|
@@ -49,12 +53,51 @@ export declare const tools: ({
|
|
|
49
53
|
keyword?: undefined;
|
|
50
54
|
roleId?: undefined;
|
|
51
55
|
status?: undefined;
|
|
52
|
-
|
|
56
|
+
pageNum?: undefined;
|
|
57
|
+
pageSize?: undefined;
|
|
58
|
+
days?: undefined;
|
|
53
59
|
phoneNumber?: undefined;
|
|
54
60
|
inviteCode?: undefined;
|
|
55
61
|
};
|
|
56
62
|
required: string[];
|
|
57
63
|
};
|
|
64
|
+
} | {
|
|
65
|
+
name: string;
|
|
66
|
+
description: string;
|
|
67
|
+
inputSchema: {
|
|
68
|
+
type: "object";
|
|
69
|
+
properties: {
|
|
70
|
+
keyword: {
|
|
71
|
+
type: string;
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
74
|
+
deptId: {
|
|
75
|
+
type: string;
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
roleId: {
|
|
79
|
+
type: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
status: {
|
|
83
|
+
type: string;
|
|
84
|
+
description: string;
|
|
85
|
+
};
|
|
86
|
+
pageNum: {
|
|
87
|
+
type: string;
|
|
88
|
+
description: string;
|
|
89
|
+
};
|
|
90
|
+
pageSize: {
|
|
91
|
+
type: string;
|
|
92
|
+
description: string;
|
|
93
|
+
};
|
|
94
|
+
userId?: undefined;
|
|
95
|
+
days?: undefined;
|
|
96
|
+
phoneNumber?: undefined;
|
|
97
|
+
inviteCode?: undefined;
|
|
98
|
+
};
|
|
99
|
+
required: never[];
|
|
100
|
+
};
|
|
58
101
|
} | {
|
|
59
102
|
name: string;
|
|
60
103
|
description: string;
|
|
@@ -78,7 +121,9 @@ export declare const tools: ({
|
|
|
78
121
|
description: string;
|
|
79
122
|
};
|
|
80
123
|
userId?: undefined;
|
|
81
|
-
|
|
124
|
+
pageNum?: undefined;
|
|
125
|
+
pageSize?: undefined;
|
|
126
|
+
days?: undefined;
|
|
82
127
|
phoneNumber?: undefined;
|
|
83
128
|
inviteCode?: undefined;
|
|
84
129
|
};
|
|
@@ -94,7 +139,7 @@ export declare const tools: ({
|
|
|
94
139
|
type: string;
|
|
95
140
|
description: string;
|
|
96
141
|
};
|
|
97
|
-
|
|
142
|
+
days: {
|
|
98
143
|
type: string;
|
|
99
144
|
description: string;
|
|
100
145
|
};
|
|
@@ -102,6 +147,8 @@ export declare const tools: ({
|
|
|
102
147
|
keyword?: undefined;
|
|
103
148
|
roleId?: undefined;
|
|
104
149
|
status?: undefined;
|
|
150
|
+
pageNum?: undefined;
|
|
151
|
+
pageSize?: undefined;
|
|
105
152
|
phoneNumber?: undefined;
|
|
106
153
|
inviteCode?: undefined;
|
|
107
154
|
};
|
|
@@ -125,10 +172,18 @@ export declare const tools: ({
|
|
|
125
172
|
type: string;
|
|
126
173
|
description: string;
|
|
127
174
|
};
|
|
175
|
+
pageNum: {
|
|
176
|
+
type: string;
|
|
177
|
+
description: string;
|
|
178
|
+
};
|
|
179
|
+
pageSize: {
|
|
180
|
+
type: string;
|
|
181
|
+
description: string;
|
|
182
|
+
};
|
|
128
183
|
userId?: undefined;
|
|
129
184
|
keyword?: undefined;
|
|
130
185
|
roleId?: undefined;
|
|
131
|
-
|
|
186
|
+
days?: undefined;
|
|
132
187
|
inviteCode?: undefined;
|
|
133
188
|
};
|
|
134
189
|
required: never[];
|
|
@@ -148,7 +203,9 @@ export declare const tools: ({
|
|
|
148
203
|
keyword?: undefined;
|
|
149
204
|
roleId?: undefined;
|
|
150
205
|
status?: undefined;
|
|
151
|
-
|
|
206
|
+
pageNum?: undefined;
|
|
207
|
+
pageSize?: undefined;
|
|
208
|
+
days?: undefined;
|
|
152
209
|
phoneNumber?: undefined;
|
|
153
210
|
};
|
|
154
211
|
required: string[];
|
package/dist/tools/team.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { apiGet,
|
|
1
|
+
import { apiGet, setToken } from "./client.js";
|
|
2
2
|
export const tools = [
|
|
3
3
|
{
|
|
4
4
|
name: "team_tree",
|
|
5
|
-
description: "
|
|
5
|
+
description: "获取当前团队的组织架构树,展示部门层级关系和成员分布。用于了解团队整体结构。",
|
|
6
6
|
inputSchema: { type: "object", properties: {}, required: [] },
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
name: "team_auth_info",
|
|
10
|
-
description: "
|
|
10
|
+
description: "获取当前团队的企业认证信息,包括认证状态、企业名称、统一社会信用代码等。用于确认团队是否已完成企业认证。",
|
|
11
11
|
inputSchema: { type: "object", properties: {}, required: [] },
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
name: "team_dissolve_info",
|
|
15
|
-
description: "
|
|
15
|
+
description: "查询团队解散相关信息。仅当团队处于解散流程中时才会返回有效数据。",
|
|
16
16
|
inputSchema: {
|
|
17
17
|
type: "object",
|
|
18
18
|
properties: {
|
|
@@ -23,7 +23,7 @@ export const tools = [
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
name: "team_ip_whitelist",
|
|
26
|
-
description: "
|
|
26
|
+
description: "获取指定部门的IP白名单列表。只有白名单内的IP地址才能访问该团队的相关服务。",
|
|
27
27
|
inputSchema: {
|
|
28
28
|
type: "object",
|
|
29
29
|
properties: {
|
|
@@ -34,7 +34,7 @@ export const tools = [
|
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
name: "team_ip_whitelist_by_user",
|
|
37
|
-
description: "通过用户ID
|
|
37
|
+
description: "通过用户ID查询该用户所属部门的IP白名单。",
|
|
38
38
|
inputSchema: {
|
|
39
39
|
type: "object",
|
|
40
40
|
properties: {
|
|
@@ -45,25 +45,27 @@ export const tools = [
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
name: "team_members",
|
|
48
|
-
description: "
|
|
48
|
+
description: "获取团队成员列表,支持按关键字、部门、角色、状态筛选,支持分页。返回成员的基本信息(姓名、手机号、角色、状态等)。",
|
|
49
49
|
inputSchema: {
|
|
50
50
|
type: "object",
|
|
51
51
|
properties: {
|
|
52
|
-
keyword: { type: "string", description: "
|
|
52
|
+
keyword: { type: "string", description: "搜索关键字(姓名或手机号)" },
|
|
53
53
|
deptId: { type: "string", description: "部门ID" },
|
|
54
54
|
roleId: { type: "string", description: "角色ID" },
|
|
55
55
|
status: { type: "string", description: "成员状态" },
|
|
56
|
+
pageNum: { type: "string", description: "页码(string, 默认1)" },
|
|
57
|
+
pageSize: { type: "string", description: "每页条数(string, 默认10)" },
|
|
56
58
|
},
|
|
57
59
|
required: [],
|
|
58
60
|
},
|
|
59
61
|
},
|
|
60
62
|
{
|
|
61
63
|
name: "team_members_all",
|
|
62
|
-
description: "
|
|
64
|
+
description: "获取团队成员全量列表(不分页),支持按关键字、部门、角色、状态筛选。适用于需要导出全部成员的场景。",
|
|
63
65
|
inputSchema: {
|
|
64
66
|
type: "object",
|
|
65
67
|
properties: {
|
|
66
|
-
keyword: { type: "string", description: "
|
|
68
|
+
keyword: { type: "string", description: "搜索关键字(姓名或手机号)" },
|
|
67
69
|
deptId: { type: "string", description: "部门ID" },
|
|
68
70
|
roleId: { type: "string", description: "角色ID" },
|
|
69
71
|
status: { type: "string", description: "成员状态" },
|
|
@@ -73,7 +75,7 @@ export const tools = [
|
|
|
73
75
|
},
|
|
74
76
|
{
|
|
75
77
|
name: "team_member_detail",
|
|
76
|
-
description: "
|
|
78
|
+
description: "获取指定成员的详细信息,包括用户ID、姓名、手机号、角色、所属部门、使用量等。",
|
|
77
79
|
inputSchema: {
|
|
78
80
|
type: "object",
|
|
79
81
|
properties: {
|
|
@@ -84,45 +86,49 @@ export const tools = [
|
|
|
84
86
|
},
|
|
85
87
|
{
|
|
86
88
|
name: "team_member_usage_trend",
|
|
87
|
-
description: "
|
|
89
|
+
description: "获取指定成员在指定时间范围内的使用量趋势数据(按天统计)。可用于分析成员的使用习惯和消耗情况。",
|
|
88
90
|
inputSchema: {
|
|
89
91
|
type: "object",
|
|
90
92
|
properties: {
|
|
91
93
|
userId: { type: "string", description: "用户ID" },
|
|
92
|
-
|
|
94
|
+
days: { type: "string", description: "查询天数(string, 默认30天)" },
|
|
93
95
|
},
|
|
94
96
|
required: ["userId"],
|
|
95
97
|
},
|
|
96
98
|
},
|
|
97
99
|
{
|
|
98
100
|
name: "team_member_pending_requests",
|
|
99
|
-
description: "
|
|
101
|
+
description: "获取待审批的成员加入申请列表,支持分页和按状态筛选。管理员可通过此接口查看并处理新成员的加入申请。",
|
|
100
102
|
inputSchema: {
|
|
101
103
|
type: "object",
|
|
102
104
|
properties: {
|
|
103
105
|
deptId: { type: "string", description: "部门ID" },
|
|
104
106
|
phoneNumber: { type: "string", description: "手机号" },
|
|
105
107
|
status: { type: "string", description: "状态" },
|
|
108
|
+
pageNum: { type: "string", description: "页码(string, 默认1)" },
|
|
109
|
+
pageSize: { type: "string", description: "每页条数(string, 默认10)" },
|
|
106
110
|
},
|
|
107
111
|
required: [],
|
|
108
112
|
},
|
|
109
113
|
},
|
|
110
114
|
{
|
|
111
115
|
name: "team_member_audit_requests",
|
|
112
|
-
description: "
|
|
116
|
+
description: "获取已审核的成员加入申请列表(包括已通过和已拒绝),支持分页和按状态筛选。",
|
|
113
117
|
inputSchema: {
|
|
114
118
|
type: "object",
|
|
115
119
|
properties: {
|
|
116
120
|
deptId: { type: "string", description: "部门ID" },
|
|
117
121
|
phoneNumber: { type: "string", description: "手机号" },
|
|
118
122
|
status: { type: "string", description: "状态" },
|
|
123
|
+
pageNum: { type: "string", description: "页码(string, 默认1)" },
|
|
124
|
+
pageSize: { type: "string", description: "每页条数(string, 默认10)" },
|
|
119
125
|
},
|
|
120
126
|
required: [],
|
|
121
127
|
},
|
|
122
128
|
},
|
|
123
129
|
{
|
|
124
130
|
name: "team_invite_links",
|
|
125
|
-
description: "
|
|
131
|
+
description: "获取团队邀请链接列表,支持分页和按角色、状态、关键字筛选。管理员可通过此接口查看和管理已创建的邀请链接。",
|
|
126
132
|
inputSchema: {
|
|
127
133
|
type: "object",
|
|
128
134
|
properties: {
|
|
@@ -130,18 +136,20 @@ export const tools = [
|
|
|
130
136
|
roleId: { type: "string", description: "角色ID" },
|
|
131
137
|
status: { type: "string", description: "状态" },
|
|
132
138
|
keyword: { type: "string", description: "关键字" },
|
|
139
|
+
pageNum: { type: "string", description: "页码(string, 默认1)" },
|
|
140
|
+
pageSize: { type: "string", description: "每页条数(string, 默认10)" },
|
|
133
141
|
},
|
|
134
142
|
required: [],
|
|
135
143
|
},
|
|
136
144
|
},
|
|
137
145
|
{
|
|
138
146
|
name: "team_roles",
|
|
139
|
-
description: "
|
|
147
|
+
description: "获取当前团队可用的角色列表,包括角色ID、名称和权限配置。用于了解团队内有哪些角色可供选择。",
|
|
140
148
|
inputSchema: { type: "object", properties: {}, required: [] },
|
|
141
149
|
},
|
|
142
150
|
{
|
|
143
151
|
name: "team_join_info",
|
|
144
|
-
description: "
|
|
152
|
+
description: "通过邀请码查询团队加入信息,可获知目标团队的名称、部门ID等基本信息,供用户确认是否加入。",
|
|
145
153
|
inputSchema: {
|
|
146
154
|
type: "object",
|
|
147
155
|
properties: {
|
|
@@ -150,7 +158,82 @@ export const tools = [
|
|
|
150
158
|
required: ["inviteCode"],
|
|
151
159
|
},
|
|
152
160
|
},
|
|
161
|
+
{
|
|
162
|
+
name: "team_list",
|
|
163
|
+
description: "获取当前用户可切换的所有团队(工作台)列表,显示团队名称和角色。可用于确定要切换到哪个团队。",
|
|
164
|
+
inputSchema: {
|
|
165
|
+
type: "object",
|
|
166
|
+
properties: {},
|
|
167
|
+
required: [],
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: "team_current",
|
|
172
|
+
description: "查看当前所在团队的详细信息,包括团队ID、名称、角色、权限概要等。",
|
|
173
|
+
inputSchema: {
|
|
174
|
+
type: "object",
|
|
175
|
+
properties: {},
|
|
176
|
+
required: [],
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: "team_switch",
|
|
181
|
+
description: "切换到指定团队。切换后当前请求的认证令牌会自动更新为新团队的令牌,后续所有请求将在新团队上下文中执行。需先从 team_list 获取可用的 deptId。",
|
|
182
|
+
inputSchema: {
|
|
183
|
+
type: "object",
|
|
184
|
+
properties: {
|
|
185
|
+
deptId: { type: "string", description: "要切换到的目标团队ID(从 team_list 获取)" },
|
|
186
|
+
},
|
|
187
|
+
required: ["deptId"],
|
|
188
|
+
},
|
|
189
|
+
},
|
|
153
190
|
];
|
|
191
|
+
// 提取分页响应中的 rows 和 total
|
|
192
|
+
// apiGet 已解包 .data,所以响应可能是:
|
|
193
|
+
// 1. { total, rows } — 后端 data 为 TableDataInfo 时
|
|
194
|
+
// 2. { code, total, rows, msg } — 后端直接返回 TableDataInfo 时
|
|
195
|
+
// 3. 数组 — data 直接为列表时
|
|
196
|
+
function extractPageData(response) {
|
|
197
|
+
if (Array.isArray(response)) {
|
|
198
|
+
return { rows: response, total: response.length };
|
|
199
|
+
}
|
|
200
|
+
if (response && typeof response === "object") {
|
|
201
|
+
const obj = response;
|
|
202
|
+
if (Array.isArray(obj.rows)) {
|
|
203
|
+
return { rows: obj.rows, total: obj.total ?? obj.rows.length };
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return response;
|
|
207
|
+
}
|
|
208
|
+
async function doTeamList() {
|
|
209
|
+
return apiGet("/console/user/workbench");
|
|
210
|
+
}
|
|
211
|
+
async function doTeamCurrent() {
|
|
212
|
+
const info = await apiGet("/getInfo");
|
|
213
|
+
const user = info.user;
|
|
214
|
+
return {
|
|
215
|
+
groupId: user?.groupId,
|
|
216
|
+
groupName: user?.groupName,
|
|
217
|
+
roles: info.roles,
|
|
218
|
+
permissions: info.permissions,
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
async function doSwitchTeam(deptId) {
|
|
222
|
+
// apiGet 会解包 .data,如果后端返回 { code, token } 则 apiGet 返回整个对象
|
|
223
|
+
const response = await apiGet(`/console/user/workbench/switch/${deptId}`);
|
|
224
|
+
const token = response.token
|
|
225
|
+
?? response.data?.token
|
|
226
|
+
?? (typeof response.data === "string" ? response.data : undefined);
|
|
227
|
+
if (!token) {
|
|
228
|
+
throw new Error("切换团队成功但未返回新令牌");
|
|
229
|
+
}
|
|
230
|
+
setToken(token);
|
|
231
|
+
return {
|
|
232
|
+
success: true,
|
|
233
|
+
message: "团队切换成功,后续请求将在新团队上下文中执行",
|
|
234
|
+
deptId,
|
|
235
|
+
};
|
|
236
|
+
}
|
|
154
237
|
export async function handle(name, args) {
|
|
155
238
|
switch (name) {
|
|
156
239
|
case "team_tree":
|
|
@@ -164,9 +247,10 @@ export async function handle(name, args) {
|
|
|
164
247
|
case "team_ip_whitelist_by_user":
|
|
165
248
|
return apiGet("/console/team/ip-whitelist/user", { userId: args.userId });
|
|
166
249
|
case "team_members":
|
|
167
|
-
return
|
|
250
|
+
return extractPageData(await apiGet("/console/team/members", {
|
|
168
251
|
keyword: args.keyword, deptId: args.deptId, roleId: args.roleId, status: args.status,
|
|
169
|
-
|
|
252
|
+
pageNum: args.pageNum, pageSize: args.pageSize,
|
|
253
|
+
}));
|
|
170
254
|
case "team_members_all":
|
|
171
255
|
return apiGet("/console/team/members/all", {
|
|
172
256
|
keyword: args.keyword, deptId: args.deptId, roleId: args.roleId, status: args.status,
|
|
@@ -174,23 +258,32 @@ export async function handle(name, args) {
|
|
|
174
258
|
case "team_member_detail":
|
|
175
259
|
return apiGet(`/console/team/members/${args.userId}`);
|
|
176
260
|
case "team_member_usage_trend":
|
|
177
|
-
return apiGet(`/console/team/members/${args.userId}/usage-trend`, {
|
|
261
|
+
return apiGet(`/console/team/members/${args.userId}/usage-trend`, { days: args.days });
|
|
178
262
|
case "team_member_pending_requests":
|
|
179
|
-
return apiGet("/console/team/members/pending-requests", {
|
|
263
|
+
return extractPageData(await apiGet("/console/team/members/pending-requests", {
|
|
180
264
|
deptId: args.deptId, phoneNumber: args.phoneNumber, status: args.status,
|
|
181
|
-
|
|
265
|
+
pageNum: args.pageNum, pageSize: args.pageSize,
|
|
266
|
+
}));
|
|
182
267
|
case "team_member_audit_requests":
|
|
183
|
-
return apiGet("/console/team/members/audit-requests", {
|
|
268
|
+
return extractPageData(await apiGet("/console/team/members/audit-requests", {
|
|
184
269
|
deptId: args.deptId, phoneNumber: args.phoneNumber, status: args.status,
|
|
185
|
-
|
|
270
|
+
pageNum: args.pageNum, pageSize: args.pageSize,
|
|
271
|
+
}));
|
|
186
272
|
case "team_invite_links":
|
|
187
|
-
return apiGet("/console/team/invite-links", {
|
|
273
|
+
return extractPageData(await apiGet("/console/team/invite-links", {
|
|
188
274
|
deptId: args.deptId, roleId: args.roleId, status: args.status, keyword: args.keyword,
|
|
189
|
-
|
|
275
|
+
pageNum: args.pageNum, pageSize: args.pageSize,
|
|
276
|
+
}));
|
|
190
277
|
case "team_roles":
|
|
191
278
|
return apiGet("/console/team/roles");
|
|
192
279
|
case "team_join_info":
|
|
193
280
|
return apiGet("/console/team/join/info", { inviteCode: args.inviteCode });
|
|
281
|
+
case "team_list":
|
|
282
|
+
return doTeamList();
|
|
283
|
+
case "team_current":
|
|
284
|
+
return doTeamCurrent();
|
|
285
|
+
case "team_switch":
|
|
286
|
+
return doSwitchTeam(args.deptId);
|
|
194
287
|
default:
|
|
195
288
|
throw new Error(`Unknown tool: ${name}`);
|
|
196
289
|
}
|