wwf
4 天以前 73210a869048d6468b55717660d0ca558d0c2aab
models/common.ts
@@ -1,8 +1,17 @@
import type { I18nText } from '@/i18n/language'
import type { Model } from '@/types/app'
export type CommonResponse = {
  result: 'success' | 'fail'
}
export type RegAndLoginResponse = {
  result: 'success' | 'fail'
  data: RegAndLoginData
}
type RegAndLoginData = {
  access_token: string
  refresh_token: string
}
export type OauthResponse = {
@@ -130,6 +139,7 @@
export type ICurrentWorkspace = Omit<IWorkspace, 'current'> & {
  role: 'owner' | 'admin' | 'editor' | 'dataset_operator' | 'normal'
  providers: Provider[]
  in_trail: boolean
  trial_end_reason?: string
  custom_config?: {
    remove_webapp_brand?: boolean
@@ -179,15 +189,9 @@
export enum DataSourceProvider {
  fireCrawl = 'firecrawl',
  jinaReader = 'jinareader',
  waterCrawl = 'watercrawl',
}
export type FirecrawlConfig = {
  api_key: string
  base_url: string
}
export type WatercrawlConfig = {
  api_key: string
  base_url: string
}
@@ -292,13 +296,3 @@
    text: string
  }
) => Promise<ModerateResponse>
export type StructuredOutputRulesRequestBody = {
  instruction: string
  model_config: Model
}
export type StructuredOutputRulesResponse = {
  output: string
  error?: string
}