4.7.1-alpha (#1120)

Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
This commit is contained in:
Archer
2024-04-03 18:14:09 +08:00
committed by GitHub
parent 9ae581e09b
commit 8a46372418
76 changed files with 3129 additions and 2104 deletions

View File

@@ -0,0 +1,34 @@
import { GET, POST, PUT } from '@/web/common/api/lafRequest';
export const postLafPat2Token = (pat: string) => POST<string>(`/v1/auth/pat2token`, { pat });
export const getLafApplications = (token: string) =>
GET<
{
appid: string;
name: string;
state: 'Running' | 'Failed' | 'Stopped';
}[]
>(
`/v1/applications`,
{},
{
headers: {
Authorization: `Bearer ${token}`
}
}
);
export const getLafAppDetail = (appid: string) =>
GET<{
appid: string;
name: string;
openapi_token: string;
domain: {
_id: string;
appid: string;
domain: string;
state: string;
phase: string;
};
}>(`/v1/applications/${appid}`);