add a special token type for MCP

This commit is contained in:
MaysWind
2025-07-07 01:20:38 +08:00
parent fbaf6086e3
commit 0140fc7622
26 changed files with 424 additions and 17 deletions
+11
View File
@@ -2,8 +2,19 @@ import type { ApplicationCloudSetting } from '@/core/setting.ts';
import type { UserBasicInfo } from './user.ts';
export const TOKEN_TYPE_MCP: number = 5;
export const TOKEN_CLI_USER_AGENT: string = 'ezbookkeeping Cli';
export interface TokenGenerateMCPRequest {
readonly password: string;
}
export interface TokenGenerateMCPResponse {
readonly token: string;
readonly mcpUrl: string;
}
export interface TokenRefreshResponse {
readonly newToken?: string;
readonly oldTokenId?: string;