complete reset async billing and upstream key rotation
This commit is contained in:
1 parent
b54b6a8ac4
commit
a80896e3c7
19 files changed
+531
-50
No files matched your search
@@ -27,6 +27,8 @@ export interface LoginInput {
|
||||
export interface AuthClient {
|
||||
verificationChannels(): Promise<{ email: boolean; phone: boolean }>
|
||||
sendVerificationCode(account: string, invitationCode: string): Promise<{ retryAfterSeconds: number }>
|
||||
sendPasswordResetCode(account: string): Promise<{ retryAfterSeconds: number }>
|
||||
resetPassword(input: { account: string; verificationCode: string; newPassword: string }): Promise<void>
|
||||
health(): Promise<{ status: 'ok'; service: string; capabilities: { verificationCode: boolean; passwordReset: boolean } }>
|
||||
login(input: LoginInput): Promise<AuthUser>
|
||||
register(input: RegisterInput): Promise<AuthUser>
|
||||
@@ -48,6 +50,18 @@ class HttpAuthClient implements AuthClient {
|
||||
})
|
||||
}
|
||||
|
||||
sendPasswordResetCode(account: string) {
|
||||
return this.request<{ retryAfterSeconds: number }>('/api/auth/password-reset/code', {
|
||||
method: 'POST', body: JSON.stringify({ account }),
|
||||
})
|
||||
}
|
||||
|
||||
async resetPassword(input: { account: string; verificationCode: string; newPassword: string }) {
|
||||
await this.request<void>('/api/auth/password-reset', {
|
||||
method: 'POST', body: JSON.stringify(input),
|
||||
})
|
||||
}
|
||||
|
||||
async health() {
|
||||
return this.request<{ status: 'ok'; service: string; capabilities: { verificationCode: boolean; passwordReset: boolean } }>('/health')
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ export interface CatalogModel {
|
||||
outputTypes: string[]
|
||||
capabilities: Record<string, unknown>
|
||||
pricing?: {
|
||||
price?: number
|
||||
input?: number
|
||||
output?: number
|
||||
cachedInput?: number
|
||||
@@ -41,6 +42,7 @@ export interface CatalogModel {
|
||||
listPriceUsd?: { input?: number; output?: number; cachedInput?: number }
|
||||
}
|
||||
pricingConfigured?: boolean
|
||||
billingReady?: boolean
|
||||
priority?: number
|
||||
maxConcurrency?: number
|
||||
executionReady?: boolean
|
||||
@@ -498,7 +500,7 @@ class HttpCatalogClient {
|
||||
return this.request<{ model: CatalogModel }>(`/api/admin/models${id ? `/${encodeURIComponent(id)}` : ''}`, { method: id ? 'PATCH' : 'POST', body: JSON.stringify(input) })
|
||||
}
|
||||
|
||||
async createAdminModel(input: { providerId: string; publicName: string; upstreamModel: string; modelKey?: string; sourceLabel?: string; type: CatalogModelType; mode: CatalogCallMode; description?: string; inputTypes?: string[]; outputTypes?: string[]; pricing?: { input?: number; output?: number; unit?: string }; priority?: number; maxConcurrency?: number }) {
|
||||
async createAdminModel(input: { providerId: string; publicName: string; upstreamModel: string; modelKey?: string; sourceLabel?: string; type: CatalogModelType; mode: CatalogCallMode; description?: string; inputTypes?: string[]; outputTypes?: string[]; pricing?: { price?: number; input?: number; output?: number; unit?: string }; priority?: number; maxConcurrency?: number }) {
|
||||
return this.request<{ model: CatalogModel }>('/api/admin/models', { method: 'POST', body: JSON.stringify(input) })
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user