feat: add ai gateway local core flow

This commit is contained in:
2026-05-09 16:51:28 +08:00
parent 5b20f017eb
commit c0335bd5d0
20 changed files with 2332 additions and 156 deletions
+20 -5
View File
@@ -30,8 +30,6 @@ export interface LocalRegisterRequest {
email?: string;
password: string;
displayName?: string;
tenantKey?: string;
tenantName?: string;
invitationCode?: string;
}
@@ -42,10 +40,7 @@ export interface LocalLoginRequest {
export interface GatewayInvitation {
id: string;
tenantId: string;
inviteCode: string;
role: 'user' | 'creator' | 'operator' | 'admin' | string;
userGroupId?: string;
maxUses?: number;
usedCount: number;
expiresAt?: string;
@@ -229,6 +224,11 @@ export interface GatewayApiKey {
updatedAt: string;
}
export interface CreatedGatewayApiKey {
apiKey: GatewayApiKey;
secret: string;
}
export interface GatewayWalletAccount {
id: string;
gatewayTenantId?: string;
@@ -341,6 +341,7 @@ export interface RateLimitWindow {
export interface GatewayTask {
id: string;
kind: string;
runMode?: 'production' | 'simulation' | string;
userId: string;
gatewayUserId?: string;
userSource?: 'gateway' | 'server-main' | 'sync' | string;
@@ -360,6 +361,20 @@ export interface GatewayTask {
updatedAt: string;
}
export interface GatewayTaskEvent {
id: string;
taskId: string;
seq: number;
eventType: string;
status?: string;
phase?: string;
progress?: number;
message?: string;
payload?: Record<string, unknown>;
simulated: boolean;
createdAt: string;
}
export interface ListResponse<T> {
items: T[];
}