mcp-user-system 1.0.5 → 2.0.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.
@@ -0,0 +1,149 @@
1
+ export declare const tools: ({
2
+ name: string;
3
+ description: string;
4
+ inputSchema: {
5
+ type: "object";
6
+ properties: {
7
+ timeRange: {
8
+ type: string;
9
+ description: string;
10
+ };
11
+ startDate: {
12
+ type: string;
13
+ description: string;
14
+ };
15
+ endDate: {
16
+ type: string;
17
+ description: string;
18
+ };
19
+ sortBy?: undefined;
20
+ deptId?: undefined;
21
+ type?: undefined;
22
+ keyword?: undefined;
23
+ pageNum?: undefined;
24
+ pageSize?: undefined;
25
+ };
26
+ required: never[];
27
+ };
28
+ } | {
29
+ name: string;
30
+ description: string;
31
+ inputSchema: {
32
+ type: "object";
33
+ properties: {
34
+ timeRange: {
35
+ type: string;
36
+ description: string;
37
+ };
38
+ startDate: {
39
+ type: string;
40
+ description: string;
41
+ };
42
+ endDate: {
43
+ type: string;
44
+ description: string;
45
+ };
46
+ sortBy: {
47
+ type: string;
48
+ description: string;
49
+ };
50
+ deptId?: undefined;
51
+ type?: undefined;
52
+ keyword?: undefined;
53
+ pageNum?: undefined;
54
+ pageSize?: undefined;
55
+ };
56
+ required: never[];
57
+ };
58
+ } | {
59
+ name: string;
60
+ description: string;
61
+ inputSchema: {
62
+ type: "object";
63
+ properties: {
64
+ timeRange: {
65
+ type: string;
66
+ description: string;
67
+ };
68
+ startDate: {
69
+ type: string;
70
+ description: string;
71
+ };
72
+ endDate: {
73
+ type: string;
74
+ description: string;
75
+ };
76
+ deptId: {
77
+ type: string;
78
+ description: string;
79
+ };
80
+ sortBy?: undefined;
81
+ type?: undefined;
82
+ keyword?: undefined;
83
+ pageNum?: undefined;
84
+ pageSize?: undefined;
85
+ };
86
+ required: never[];
87
+ };
88
+ } | {
89
+ name: string;
90
+ description: string;
91
+ inputSchema: {
92
+ type: "object";
93
+ properties: {
94
+ deptId: {
95
+ type: string;
96
+ description: string;
97
+ };
98
+ timeRange?: undefined;
99
+ startDate?: undefined;
100
+ endDate?: undefined;
101
+ sortBy?: undefined;
102
+ type?: undefined;
103
+ keyword?: undefined;
104
+ pageNum?: undefined;
105
+ pageSize?: undefined;
106
+ };
107
+ required: never[];
108
+ };
109
+ } | {
110
+ name: string;
111
+ description: string;
112
+ inputSchema: {
113
+ type: "object";
114
+ properties: {
115
+ timeRange: {
116
+ type: string;
117
+ description: string;
118
+ };
119
+ startDate: {
120
+ type: string;
121
+ description: string;
122
+ };
123
+ endDate: {
124
+ type: string;
125
+ description: string;
126
+ };
127
+ type: {
128
+ type: string;
129
+ description: string;
130
+ };
131
+ keyword: {
132
+ type: string;
133
+ description: string;
134
+ };
135
+ pageNum: {
136
+ type: string;
137
+ description: string;
138
+ };
139
+ pageSize: {
140
+ type: string;
141
+ description: string;
142
+ };
143
+ sortBy?: undefined;
144
+ deptId?: undefined;
145
+ };
146
+ required: never[];
147
+ };
148
+ })[];
149
+ export declare function handle(name: string, args: Record<string, string>): Promise<unknown>;
@@ -0,0 +1,184 @@
1
+ import { apiGet, apiGetPage } from "./client.js";
2
+ export const tools = [
3
+ {
4
+ name: "dashboard_stats",
5
+ description: "数据看板-统计卡片(已用额度、消费、请求数、活跃用户等)",
6
+ inputSchema: {
7
+ type: "object",
8
+ properties: {
9
+ timeRange: { type: "string", description: "时间范围: 0=自定义,1=近3天,2=近一周,3=近一月,4=本月,5=去年,6=今天,7=本周,8=今年" },
10
+ startDate: { type: "string", description: "开始日期(yyyy-MM-dd), timeRange=0时必填" },
11
+ endDate: { type: "string", description: "结束日期(yyyy-MM-dd), timeRange=0时必填" },
12
+ },
13
+ required: [],
14
+ },
15
+ },
16
+ {
17
+ name: "dashboard_quota",
18
+ description: "数据看板-配额/预算概览",
19
+ inputSchema: {
20
+ type: "object",
21
+ properties: {
22
+ timeRange: { type: "string", description: "时间范围: 0=自定义,1=近3天,2=近一周,3=近一月,4=本月,5=去年,6=今天,7=本周,8=今年" },
23
+ startDate: { type: "string", description: "开始日期(yyyy-MM-dd)" },
24
+ endDate: { type: "string", description: "结束日期(yyyy-MM-dd)" },
25
+ },
26
+ required: [],
27
+ },
28
+ },
29
+ {
30
+ name: "dashboard_trend",
31
+ description: "数据看板-消费趋势数据",
32
+ inputSchema: {
33
+ type: "object",
34
+ properties: {
35
+ timeRange: { type: "string", description: "时间范围: 0=自定义,1=近3天,2=近一周,3=近一月,4=本月,5=去年,6=今天,7=本周,8=今年" },
36
+ startDate: { type: "string", description: "开始日期(yyyy-MM-dd)" },
37
+ endDate: { type: "string", description: "结束日期(yyyy-MM-dd)" },
38
+ },
39
+ required: [],
40
+ },
41
+ },
42
+ {
43
+ name: "dashboard_model_stats",
44
+ description: "数据看板-模型使用统计(调用次数、Token消耗、费用等)",
45
+ inputSchema: {
46
+ type: "object",
47
+ properties: {
48
+ timeRange: { type: "string", description: "时间范围: 0=自定义,1=近3天,2=近一周,3=近一月,4=本月,5=去年,6=今天,7=本周,8=今年" },
49
+ startDate: { type: "string", description: "开始日期(yyyy-MM-dd)" },
50
+ endDate: { type: "string", description: "结束日期(yyyy-MM-dd)" },
51
+ sortBy: { type: "string", description: "排序字段" },
52
+ },
53
+ required: [],
54
+ },
55
+ },
56
+ {
57
+ name: "dashboard_team_model_matrix",
58
+ description: "数据看板-团队×模型消耗矩阵",
59
+ inputSchema: {
60
+ type: "object",
61
+ properties: {
62
+ timeRange: { type: "string", description: "时间范围" },
63
+ startDate: { type: "string", description: "开始日期(yyyy-MM-dd)" },
64
+ endDate: { type: "string", description: "结束日期(yyyy-MM-dd)" },
65
+ deptId: { type: "string", description: "部门ID" },
66
+ },
67
+ required: [],
68
+ },
69
+ },
70
+ {
71
+ name: "dashboard_budget_progress",
72
+ description: "数据看板-预算消耗进度",
73
+ inputSchema: {
74
+ type: "object",
75
+ properties: {
76
+ timeRange: { type: "string", description: "时间范围" },
77
+ startDate: { type: "string", description: "开始日期(yyyy-MM-dd)" },
78
+ endDate: { type: "string", description: "结束日期(yyyy-MM-dd)" },
79
+ },
80
+ required: [],
81
+ },
82
+ },
83
+ {
84
+ name: "dashboard_ranking",
85
+ description: "数据看板-使用排名明细",
86
+ inputSchema: {
87
+ type: "object",
88
+ properties: {
89
+ timeRange: { type: "string", description: "时间范围" },
90
+ startDate: { type: "string", description: "开始日期(yyyy-MM-dd)" },
91
+ endDate: { type: "string", description: "结束日期(yyyy-MM-dd)" },
92
+ },
93
+ required: [],
94
+ },
95
+ },
96
+ {
97
+ name: "dashboard_member_usage",
98
+ description: "数据看板-成员使用情况",
99
+ inputSchema: {
100
+ type: "object",
101
+ properties: {
102
+ timeRange: { type: "string", description: "时间范围" },
103
+ startDate: { type: "string", description: "开始日期(yyyy-MM-dd)" },
104
+ endDate: { type: "string", description: "结束日期(yyyy-MM-dd)" },
105
+ },
106
+ required: [],
107
+ },
108
+ },
109
+ {
110
+ name: "dashboard_users",
111
+ description: "数据看板-用户下拉选项",
112
+ inputSchema: {
113
+ type: "object",
114
+ properties: {
115
+ deptId: { type: "string", description: "部门ID(可选)" },
116
+ },
117
+ required: [],
118
+ },
119
+ },
120
+ {
121
+ name: "dashboard_orders",
122
+ description: "数据看板-API调用明细记录列表(分页)",
123
+ inputSchema: {
124
+ type: "object",
125
+ properties: {
126
+ timeRange: { type: "string", description: "时间范围: 0=自定义,1=近3天,2=近一周,3=近一月,4=本月,5=去年,6=今天,7=本周,8=今年" },
127
+ startDate: { type: "string", description: "开始日期(yyyy-MM-dd)" },
128
+ endDate: { type: "string", description: "结束日期(yyyy-MM-dd)" },
129
+ type: { type: "string", description: "调用类型" },
130
+ keyword: { type: "string", description: "搜索关键字" },
131
+ pageNum: { type: "string", description: "页码" },
132
+ pageSize: { type: "string", description: "每页条数" },
133
+ },
134
+ required: [],
135
+ },
136
+ },
137
+ // /console/dashboard/team-usage — 后端已弃用,不纳入 MCP
138
+ ];
139
+ export async function handle(name, args) {
140
+ switch (name) {
141
+ case "dashboard_stats":
142
+ return apiGet("/console/dashboard/stats", {
143
+ timeRange: args.timeRange, startDate: args.startDate, endDate: args.endDate,
144
+ });
145
+ case "dashboard_quota":
146
+ return apiGet("/console/dashboard/quota", {
147
+ timeRange: args.timeRange, startDate: args.startDate, endDate: args.endDate,
148
+ });
149
+ case "dashboard_trend":
150
+ return apiGet("/console/dashboard/trend", {
151
+ timeRange: args.timeRange, startDate: args.startDate, endDate: args.endDate,
152
+ });
153
+ case "dashboard_model_stats":
154
+ return apiGet("/console/dashboard/model-stats", {
155
+ timeRange: args.timeRange, startDate: args.startDate, endDate: args.endDate, sortBy: args.sortBy,
156
+ });
157
+ case "dashboard_team_model_matrix":
158
+ return apiGet("/console/dashboard/team-model-matrix", {
159
+ timeRange: args.timeRange, startDate: args.startDate, endDate: args.endDate, deptId: args.deptId,
160
+ });
161
+ case "dashboard_budget_progress":
162
+ return apiGet("/console/dashboard/budget-progress", {
163
+ timeRange: args.timeRange, startDate: args.startDate, endDate: args.endDate,
164
+ });
165
+ case "dashboard_ranking":
166
+ return apiGet("/console/dashboard/ranking", {
167
+ timeRange: args.timeRange, startDate: args.startDate, endDate: args.endDate,
168
+ });
169
+ case "dashboard_member_usage":
170
+ return apiGet("/console/dashboard/member-usage", {
171
+ timeRange: args.timeRange, startDate: args.startDate, endDate: args.endDate,
172
+ });
173
+ case "dashboard_users":
174
+ return apiGet("/console/dashboard/users", { deptId: args.deptId });
175
+ case "dashboard_orders":
176
+ return apiGetPage("/console/dashboard/orders", {
177
+ timeRange: args.timeRange, startDate: args.startDate, endDate: args.endDate,
178
+ type: args.type, keyword: args.keyword, pageNum: args.pageNum, pageSize: args.pageSize,
179
+ });
180
+ default:
181
+ throw new Error(`Unknown tool: ${name}`);
182
+ }
183
+ }
184
+ //# sourceMappingURL=dashboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/tools/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,M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,OAAO,EAAE,IAAI,CAAC,OAAO;gBAC3E,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACvF,CAAC,CAAC;QACL;YACE,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC"}
@@ -0,0 +1,47 @@
1
+ export declare const tools: ({
2
+ name: string;
3
+ description: string;
4
+ inputSchema: {
5
+ type: "object";
6
+ properties: {
7
+ pageNum?: undefined;
8
+ pageSize?: undefined;
9
+ applicationId?: undefined;
10
+ };
11
+ required: never[];
12
+ };
13
+ } | {
14
+ name: string;
15
+ description: string;
16
+ inputSchema: {
17
+ type: "object";
18
+ properties: {
19
+ pageNum: {
20
+ type: string;
21
+ description: string;
22
+ };
23
+ pageSize: {
24
+ type: string;
25
+ description: string;
26
+ };
27
+ applicationId?: undefined;
28
+ };
29
+ required: never[];
30
+ };
31
+ } | {
32
+ name: string;
33
+ description: string;
34
+ inputSchema: {
35
+ type: "object";
36
+ properties: {
37
+ applicationId: {
38
+ type: string;
39
+ description: string;
40
+ };
41
+ pageNum?: undefined;
42
+ pageSize?: undefined;
43
+ };
44
+ required: string[];
45
+ };
46
+ })[];
47
+ export declare function handle(name: string, args: Record<string, string>): Promise<unknown>;
@@ -0,0 +1,53 @@
1
+ import { apiGet, apiGetPage } from "./client.js";
2
+ export const tools = [
3
+ {
4
+ name: "invoice_info",
5
+ description: "查看发票设置信息",
6
+ inputSchema: { type: "object", properties: {}, required: [] },
7
+ },
8
+ {
9
+ name: "invoice_prepare",
10
+ description: "申请开票前的回显数据(可开票金额等)",
11
+ inputSchema: { type: "object", properties: {}, required: [] },
12
+ },
13
+ {
14
+ name: "invoice_application_list",
15
+ description: "发票申请记录分页列表",
16
+ inputSchema: {
17
+ type: "object",
18
+ properties: {
19
+ pageNum: { type: "string", description: "页码" },
20
+ pageSize: { type: "string", description: "每页条数" },
21
+ },
22
+ required: [],
23
+ },
24
+ },
25
+ {
26
+ name: "invoice_application_detail",
27
+ description: "发票申请详情",
28
+ inputSchema: {
29
+ type: "object",
30
+ properties: {
31
+ applicationId: { type: "string", description: "申请ID" },
32
+ },
33
+ required: ["applicationId"],
34
+ },
35
+ },
36
+ ];
37
+ export async function handle(name, args) {
38
+ switch (name) {
39
+ case "invoice_info":
40
+ return apiGet("/console/invoice/info");
41
+ case "invoice_prepare":
42
+ return apiGet("/console/invoice/application/prepare");
43
+ case "invoice_application_list":
44
+ return apiGetPage("/console/invoice/application/list", {
45
+ pageNum: args.pageNum, pageSize: args.pageSize,
46
+ });
47
+ case "invoice_application_detail":
48
+ return apiGet(`/console/invoice/application/detail/${args.applicationId}`);
49
+ default:
50
+ throw new Error(`Unknown tool: ${name}`);
51
+ }
52
+ }
53
+ //# sourceMappingURL=invoice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoice.js","sourceRoot":"","sources":["../../src/tools/invoice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB;QACE,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,UAAU;QACvB,WAAW,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;KACvE;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,oBAAoB;QACjC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;KACvE;IACD;QACE,IAAI,EAAE,0BAA0B;QAChC,WAAW,EAAE,YAAY;QACzB,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE;gBAC9C,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE;aAClD;YACD,QAAQ,EAAE,EAAE;SACb;KACF;IACD;QACE,IAAI,EAAE,4BAA4B;QAClC,WAAW,EAAE,QAAQ;QACrB,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE;aACvD;YACD,QAAQ,EAAE,CAAC,eAAe,CAAC;SAC5B;KACF;CACF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAY,EAAE,IAA4B;IACrE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,cAAc;YACjB,OAAO,MAAM,CAAC,uBAAuB,CAAC,CAAC;QACzC,KAAK,iBAAiB;YACpB,OAAO,MAAM,CAAC,sCAAsC,CAAC,CAAC;QACxD,KAAK,0BAA0B;YAC7B,OAAO,UAAU,CAAC,mCAAmC,EAAE;gBACrD,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ;aAC/C,CAAC,CAAC;QACL,KAAK,4BAA4B;YAC/B,OAAO,MAAM,CAAC,uCAAuC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QAC7E;YACE,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC"}
@@ -0,0 +1,240 @@
1
+ export declare const tools: ({
2
+ name: string;
3
+ description: string;
4
+ inputSchema: {
5
+ type: "object";
6
+ properties: {
7
+ orderNo?: undefined;
8
+ amount?: undefined;
9
+ monthType?: undefined;
10
+ deptId?: undefined;
11
+ targetType?: undefined;
12
+ targetId?: undefined;
13
+ targetDeptId?: undefined;
14
+ limitType?: undefined;
15
+ quotaTotal?: undefined;
16
+ groupId?: undefined;
17
+ category?: undefined;
18
+ status?: undefined;
19
+ pageNum?: undefined;
20
+ pageSize?: undefined;
21
+ };
22
+ required: never[];
23
+ };
24
+ } | {
25
+ name: string;
26
+ description: string;
27
+ inputSchema: {
28
+ type: "object";
29
+ properties: {
30
+ orderNo: {
31
+ type: string;
32
+ description: string;
33
+ };
34
+ amount?: undefined;
35
+ monthType?: undefined;
36
+ deptId?: undefined;
37
+ targetType?: undefined;
38
+ targetId?: undefined;
39
+ targetDeptId?: undefined;
40
+ limitType?: undefined;
41
+ quotaTotal?: undefined;
42
+ groupId?: undefined;
43
+ category?: undefined;
44
+ status?: undefined;
45
+ pageNum?: undefined;
46
+ pageSize?: undefined;
47
+ };
48
+ required: string[];
49
+ };
50
+ } | {
51
+ name: string;
52
+ description: string;
53
+ inputSchema: {
54
+ type: "object";
55
+ properties: {
56
+ amount: {
57
+ type: string;
58
+ description: string;
59
+ };
60
+ orderNo?: undefined;
61
+ monthType?: undefined;
62
+ deptId?: undefined;
63
+ targetType?: undefined;
64
+ targetId?: undefined;
65
+ targetDeptId?: undefined;
66
+ limitType?: undefined;
67
+ quotaTotal?: undefined;
68
+ groupId?: undefined;
69
+ category?: undefined;
70
+ status?: undefined;
71
+ pageNum?: undefined;
72
+ pageSize?: undefined;
73
+ };
74
+ required: string[];
75
+ };
76
+ } | {
77
+ name: string;
78
+ description: string;
79
+ inputSchema: {
80
+ type: "object";
81
+ properties: {
82
+ monthType: {
83
+ type: string;
84
+ description: string;
85
+ };
86
+ deptId: {
87
+ type: string;
88
+ description: string;
89
+ };
90
+ orderNo?: undefined;
91
+ amount?: undefined;
92
+ targetType?: undefined;
93
+ targetId?: undefined;
94
+ targetDeptId?: undefined;
95
+ limitType?: undefined;
96
+ quotaTotal?: undefined;
97
+ groupId?: undefined;
98
+ category?: undefined;
99
+ status?: undefined;
100
+ pageNum?: undefined;
101
+ pageSize?: undefined;
102
+ };
103
+ required: never[];
104
+ };
105
+ } | {
106
+ name: string;
107
+ description: string;
108
+ inputSchema: {
109
+ type: "object";
110
+ properties: {
111
+ targetType: {
112
+ type: string;
113
+ description: string;
114
+ };
115
+ targetId: {
116
+ type: string;
117
+ description: string;
118
+ };
119
+ targetDeptId: {
120
+ type: string;
121
+ description: string;
122
+ };
123
+ limitType: {
124
+ type: string;
125
+ description: string;
126
+ };
127
+ quotaTotal: {
128
+ type: string;
129
+ description: string;
130
+ };
131
+ orderNo?: undefined;
132
+ amount?: undefined;
133
+ monthType?: undefined;
134
+ deptId?: undefined;
135
+ groupId?: undefined;
136
+ category?: undefined;
137
+ status?: undefined;
138
+ pageNum?: undefined;
139
+ pageSize?: undefined;
140
+ };
141
+ required: never[];
142
+ };
143
+ } | {
144
+ name: string;
145
+ description: string;
146
+ inputSchema: {
147
+ type: "object";
148
+ properties: {
149
+ monthType: {
150
+ type: string;
151
+ description: string;
152
+ };
153
+ targetType: {
154
+ type: string;
155
+ description: string;
156
+ };
157
+ targetId: {
158
+ type: string;
159
+ description: string;
160
+ };
161
+ deptId: {
162
+ type: string;
163
+ description: string;
164
+ };
165
+ orderNo?: undefined;
166
+ amount?: undefined;
167
+ targetDeptId?: undefined;
168
+ limitType?: undefined;
169
+ quotaTotal?: undefined;
170
+ groupId?: undefined;
171
+ category?: undefined;
172
+ status?: undefined;
173
+ pageNum?: undefined;
174
+ pageSize?: undefined;
175
+ };
176
+ required: never[];
177
+ };
178
+ } | {
179
+ name: string;
180
+ description: string;
181
+ inputSchema: {
182
+ type: "object";
183
+ properties: {
184
+ groupId: {
185
+ type: string;
186
+ description: string;
187
+ };
188
+ orderNo?: undefined;
189
+ amount?: undefined;
190
+ monthType?: undefined;
191
+ deptId?: undefined;
192
+ targetType?: undefined;
193
+ targetId?: undefined;
194
+ targetDeptId?: undefined;
195
+ limitType?: undefined;
196
+ quotaTotal?: undefined;
197
+ category?: undefined;
198
+ status?: undefined;
199
+ pageNum?: undefined;
200
+ pageSize?: undefined;
201
+ };
202
+ required: string[];
203
+ };
204
+ } | {
205
+ name: string;
206
+ description: string;
207
+ inputSchema: {
208
+ type: "object";
209
+ properties: {
210
+ category: {
211
+ type: string;
212
+ description: string;
213
+ };
214
+ status: {
215
+ type: string;
216
+ description: string;
217
+ };
218
+ pageNum: {
219
+ type: string;
220
+ description: string;
221
+ };
222
+ pageSize: {
223
+ type: string;
224
+ description: string;
225
+ };
226
+ orderNo?: undefined;
227
+ amount?: undefined;
228
+ monthType?: undefined;
229
+ deptId?: undefined;
230
+ targetType?: undefined;
231
+ targetId?: undefined;
232
+ targetDeptId?: undefined;
233
+ limitType?: undefined;
234
+ quotaTotal?: undefined;
235
+ groupId?: undefined;
236
+ };
237
+ required: never[];
238
+ };
239
+ })[];
240
+ export declare function handle(name: string, args: Record<string, string>): Promise<unknown>;