File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
modules/tool/packages/wecomCorpId/src Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 11import { z } from 'zod' ;
2- import { invoke } from '@/invoke' ;
3- import type { getCorpTokenResult } from '@/invoke/wecom/getAuthToken ' ;
2+ import { getCorpToken } from '@/invoke/wecom/getAuthToken ' ;
3+ import type { RunToolSecondParamsType } from '@tool/type/req ' ;
44
55export const InputType = z . object ( { } ) ;
66
@@ -9,9 +9,13 @@ export const OutputType = z.object({
99 expires_in : z . number ( )
1010} ) ;
1111
12- export async function tool ( ) : Promise < z . infer < typeof OutputType > > {
12+ export async function tool (
13+ _params : z . infer < typeof InputType > ,
14+ { systemVar } : RunToolSecondParamsType
15+ ) : Promise < z . infer < typeof OutputType > > {
1316 // 调用 wecom.getAuthToken 获取企业微信授权 token
14- const result = await invoke < getCorpTokenResult > ( 'wecom.getCorpToken' ) ;
17+ // const result = await invoke<getCorpTokenResult>('wecom.getCorpToken');
18+ const result = await getCorpToken ( { } , systemVar ) ;
1519
1620 return {
1721 access_token : result . access_token ,
You can’t perform that action at this time.
0 commit comments