feat: 前端集成 Prettier 代码格式化
This commit is contained in:
@@ -1,84 +1,80 @@
|
||||
export interface Provider {
|
||||
id: string;
|
||||
name: string;
|
||||
apiKey: string;
|
||||
baseUrl: string;
|
||||
protocol: 'openai' | 'anthropic';
|
||||
enabled: boolean;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
id: string
|
||||
name: string
|
||||
apiKey: string
|
||||
baseUrl: string
|
||||
protocol: 'openai' | 'anthropic'
|
||||
enabled: boolean
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export interface Model {
|
||||
id: string;
|
||||
providerId: string;
|
||||
modelName: string;
|
||||
enabled: boolean;
|
||||
createdAt: string;
|
||||
unifiedId?: string;
|
||||
id: string
|
||||
providerId: string
|
||||
modelName: string
|
||||
enabled: boolean
|
||||
createdAt: string
|
||||
unifiedId?: string
|
||||
}
|
||||
|
||||
export interface UsageStats {
|
||||
id: number;
|
||||
providerId: string;
|
||||
modelName: string;
|
||||
requestCount: number;
|
||||
date: string;
|
||||
id: number
|
||||
providerId: string
|
||||
modelName: string
|
||||
requestCount: number
|
||||
date: string
|
||||
}
|
||||
|
||||
export interface CreateProviderInput {
|
||||
id: string;
|
||||
name: string;
|
||||
apiKey: string;
|
||||
baseUrl: string;
|
||||
protocol: 'openai' | 'anthropic';
|
||||
enabled: boolean;
|
||||
id: string
|
||||
name: string
|
||||
apiKey: string
|
||||
baseUrl: string
|
||||
protocol: 'openai' | 'anthropic'
|
||||
enabled: boolean
|
||||
}
|
||||
|
||||
export interface UpdateProviderInput {
|
||||
name?: string;
|
||||
apiKey?: string;
|
||||
baseUrl?: string;
|
||||
protocol?: 'openai' | 'anthropic';
|
||||
enabled?: boolean;
|
||||
name?: string
|
||||
apiKey?: string
|
||||
baseUrl?: string
|
||||
protocol?: 'openai' | 'anthropic'
|
||||
enabled?: boolean
|
||||
}
|
||||
|
||||
export interface CreateModelInput {
|
||||
providerId: string;
|
||||
modelName: string;
|
||||
enabled: boolean;
|
||||
providerId: string
|
||||
modelName: string
|
||||
enabled: boolean
|
||||
}
|
||||
|
||||
export interface UpdateModelInput {
|
||||
providerId?: string;
|
||||
modelName?: string;
|
||||
enabled?: boolean;
|
||||
providerId?: string
|
||||
modelName?: string
|
||||
enabled?: boolean
|
||||
}
|
||||
|
||||
export interface StatsQueryParams {
|
||||
providerId?: string;
|
||||
modelName?: string;
|
||||
startDate?: string;
|
||||
endDate?: string;
|
||||
providerId?: string
|
||||
modelName?: string
|
||||
startDate?: string
|
||||
endDate?: string
|
||||
}
|
||||
|
||||
export class ApiError extends Error {
|
||||
status: number;
|
||||
code?: string;
|
||||
status: number
|
||||
code?: string
|
||||
|
||||
constructor(
|
||||
status: number,
|
||||
message: string,
|
||||
code?: string,
|
||||
) {
|
||||
super(message);
|
||||
this.name = 'ApiError';
|
||||
this.status = status;
|
||||
this.code = code;
|
||||
constructor(status: number, message: string, code?: string) {
|
||||
super(message)
|
||||
this.name = 'ApiError'
|
||||
this.status = status
|
||||
this.code = code
|
||||
}
|
||||
}
|
||||
|
||||
export interface ApiErrorResponse {
|
||||
error: string;
|
||||
code?: string;
|
||||
error: string
|
||||
code?: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user