import { gitPost } from "@/gitlab/request" ; interface IToken { access_token : string ; token_type : string ; refresh_token : string ; scope : string ; created_at : number ; } description param { string } username param { string } password return { * } export const getToken = async ( gitUrl , username , password ) : Promise < IToken > => { const token = await gitPost < IToken > ( { GIT_URL : gitUrl , url : '/oauth/token' , params : { grant_type : 'password' , username , password , } } ) ; return token ; } ;