feat(channel-monitor): 补全前端 API 模式类型

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
benjamin
2026-05-19 22:05:43 +08:00
co-authored by Sisyphus
parent 917bd877ae
commit b447ba6a0d
3 changed files with 18 additions and 2 deletions
+3
View File
@@ -8,11 +8,13 @@ import { apiClient } from '../client'
export type Provider = 'openai' | 'anthropic' | 'gemini'
export type MonitorStatus = 'operational' | 'degraded' | 'failed' | 'error'
export type BodyOverrideMode = 'off' | 'merge' | 'replace'
export type APIMode = 'chat_completions' | 'responses'
export interface ChannelMonitor {
id: number
name: string
provider: Provider
api_mode: APIMode
endpoint: string
api_key_masked: string
/**
@@ -70,6 +72,7 @@ export interface ListResponse {
export interface CreateParams {
name: string
provider: Provider
api_mode?: APIMode
endpoint: string
api_key: string
primary_model: string
@@ -6,12 +6,13 @@
*/
import { apiClient } from '../client'
import type { BodyOverrideMode, Provider } from './channelMonitor'
import type { APIMode, BodyOverrideMode, Provider } from './channelMonitor'
export interface ChannelMonitorTemplate {
id: number
name: string
provider: Provider
api_mode: APIMode
description: string
extra_headers: Record<string, string>
body_override_mode: BodyOverrideMode
@@ -24,6 +25,7 @@ export interface ChannelMonitorTemplate {
export interface ListParams {
provider?: Provider
api_mode?: APIMode
}
export interface ListResponse {
@@ -33,6 +35,7 @@ export interface ListResponse {
export interface CreateParams {
name: string
provider: Provider
api_mode?: APIMode
description?: string
extra_headers?: Record<string, string>
body_override_mode?: BodyOverrideMode
@@ -41,6 +44,7 @@ export interface CreateParams {
export interface UpdateParams {
name?: string
api_mode?: APIMode
description?: string
extra_headers?: Record<string, string>
body_override_mode?: BodyOverrideMode
@@ -55,6 +59,7 @@ export interface AssociatedMonitorBrief {
id: number
name: string
provider: Provider
api_mode: APIMode
enabled: boolean
}