新增空闲锁屏、修复401等问题,新增文件版本管理、共享库等占位符

This commit is contained in:
Cheng Zhou
2026-01-13 13:59:07 +08:00
parent b3cd8e03f2
commit 0c7c03069a
21 changed files with 829 additions and 40 deletions
+33
View File
@@ -0,0 +1,33 @@
import axios from "axios";
import type { AxiosResponse } from "axios";
const authClient = axios.create({
baseURL: "/",
timeout: 15000,
});
export type ExtendResponse = {
accessToken: string;
expiresAt: string;
};
export type UnlockResponse = {
accessToken: string;
expiresAt: string;
};
export const extendToken = (token: string): Promise<AxiosResponse<ExtendResponse>> =>
authClient.post<ExtendResponse>(
"/api/v1/auth/extend",
{},
{
headers: {
Authorization: `Bearer ${token}`,
},
}
);
export const unlockSession = (payload: { email: string; password: string }): Promise<AxiosResponse<UnlockResponse>> =>
authClient.post<UnlockResponse>("/api/v1/auth/unlock", payload);
export default authClient;