dify/web/models/app.ts
-LAN- 9a5f214623
refactor: replace localStorage with HTTP-only cookies for auth tokens (#24365)
Signed-off-by: NeatGuyCoding <15627489+NeatGuyCoding@users.noreply.github.com>
Signed-off-by: lyzno1 <yuanyouhuilyz@gmail.com>
Signed-off-by: kenwoodjw <blackxin55+@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yunlu Wen <wylswz@163.com>
Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: GareArc <chen4851@purdue.edu>
Co-authored-by: NFish <douxc512@gmail.com>
Co-authored-by: Davide Delbianco <davide.delbianco@outlook.com>
Co-authored-by: minglu7 <1347866672@qq.com>
Co-authored-by: Ponder <ruan.lj@foxmail.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: heyszt <270985384@qq.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
Co-authored-by: Guangdong Liu <liugddx@gmail.com>
Co-authored-by: Eric Guo <eric.guocz@gmail.com>
Co-authored-by: NeatGuyCoding <15627489+NeatGuyCoding@users.noreply.github.com>
Co-authored-by: XlKsyt <caixuesen@outlook.com>
Co-authored-by: Dhruv Gorasiya <80987415+DhruvGorasiya@users.noreply.github.com>
Co-authored-by: crazywoola <427733928@qq.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: lyzno1 <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: hj24 <mambahj24@gmail.com>
Co-authored-by: GuanMu <ballmanjq@gmail.com>
Co-authored-by: 非法操作 <hjlarry@163.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Tonlo <123lzs123@gmail.com>
Co-authored-by: Yusuke Yamada <yamachu.dev@gmail.com>
Co-authored-by: Novice <novice12185727@gmail.com>
Co-authored-by: kenwoodjw <blackxin55+@gmail.com>
Co-authored-by: Ademílson Tonato <ademilsonft@outlook.com>
Co-authored-by: znn <jubinkumarsoni@gmail.com>
Co-authored-by: yangzheli <43645580+yangzheli@users.noreply.github.com>
2025-10-19 21:29:04 +08:00

114 lines
2.6 KiB
TypeScript

import type { AliyunConfig, ArizeConfig, LangFuseConfig, LangSmithConfig, OpikConfig, PhoenixConfig, TracingProvider, WeaveConfig } from '@/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/type'
import type { App, AppMode, AppTemplate, SiteConfig } from '@/types/app'
import type { Dependency } from '@/app/components/plugins/types'
export enum DSLImportMode {
YAML_CONTENT = 'yaml-content',
YAML_URL = 'yaml-url',
}
export enum DSLImportStatus {
COMPLETED = 'completed',
COMPLETED_WITH_WARNINGS = 'completed-with-warnings',
PENDING = 'pending',
FAILED = 'failed',
}
export type AppListResponse = {
data: App[]
has_more: boolean
limit: number
page: number
total: number
}
export type AppDetailResponse = App
export type DSLImportResponse = {
id: string
status: DSLImportStatus
app_mode: AppMode
app_id?: string
current_dsl_version?: string
imported_dsl_version?: string
error: string
leaked_dependencies: Dependency[]
}
export type AppTemplatesResponse = {
data: AppTemplate[]
}
export type CreateAppResponse = App
export type UpdateAppSiteCodeResponse = { app_id: string } & SiteConfig
export type AppDailyMessagesResponse = {
data: Array<{ date: string; message_count: number }>
}
export type AppDailyConversationsResponse = {
data: Array<{ date: string; conversation_count: number }>
}
export type WorkflowDailyConversationsResponse = {
data: Array<{ date: string; runs: number }>
}
export type AppStatisticsResponse = {
data: Array<{ date: string }>
}
export type AppDailyEndUsersResponse = {
data: Array<{ date: string; terminal_count: number }>
}
export type AppTokenCostsResponse = {
data: Array<{ date: string; token_count: number; total_price: number; currency: number }>
}
export type UpdateAppModelConfigResponse = { result: string }
export type ApiKeyItemResponse = {
id: string
token: string
last_used_at: string
created_at: string
}
export type ApiKeysListResponse = {
data: ApiKeyItemResponse[]
}
export type CreateApiKeyResponse = {
id: string
token: string
created_at: string
}
export type ValidateOpenAIKeyResponse = {
result: string
error?: string
}
export type UpdateOpenAIKeyResponse = ValidateOpenAIKeyResponse
export type GenerationIntroductionResponse = {
introduction: string
}
export type AppVoicesListResponse = [{
name: string
value: string
}]
export type TracingStatus = {
enabled: boolean
tracing_provider: TracingProvider | null
}
export type TracingConfig = {
tracing_provider: TracingProvider
tracing_config: ArizeConfig | PhoenixConfig | LangSmithConfig | LangFuseConfig | OpikConfig | WeaveConfig | AliyunConfig
}