選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

app.ts 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. import type { LangFuseConfig, LangSmithConfig, OpikConfig, TracingProvider, WeaveConfig } from '@/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/type'
  2. import type { App, AppSSO, AppTemplate, SiteConfig } from '@/types/app'
  3. import type { Dependency } from '@/app/components/plugins/types'
  4. export enum DSLImportMode {
  5. YAML_CONTENT = 'yaml-content',
  6. YAML_URL = 'yaml-url',
  7. }
  8. export enum DSLImportStatus {
  9. COMPLETED = 'completed',
  10. COMPLETED_WITH_WARNINGS = 'completed-with-warnings',
  11. PENDING = 'pending',
  12. FAILED = 'failed',
  13. }
  14. export type AppListResponse = {
  15. data: App[]
  16. has_more: boolean
  17. limit: number
  18. page: number
  19. total: number
  20. }
  21. export type AppDetailResponse = App
  22. export type DSLImportResponse = {
  23. id: string
  24. status: DSLImportStatus
  25. app_mode: AppMode
  26. app_id?: string
  27. current_dsl_version?: string
  28. imported_dsl_version?: string
  29. error: string
  30. leaked_dependencies: Dependency[]
  31. }
  32. export type AppSSOResponse = { enabled: AppSSO['enable_sso'] }
  33. export type AppTemplatesResponse = {
  34. data: AppTemplate[]
  35. }
  36. export type CreateAppResponse = App
  37. export type UpdateAppSiteCodeResponse = { app_id: string } & SiteConfig
  38. export type AppDailyMessagesResponse = {
  39. data: Array<{ date: string; message_count: number }>
  40. }
  41. export type AppDailyConversationsResponse = {
  42. data: Array<{ date: string; conversation_count: number }>
  43. }
  44. export type WorkflowDailyConversationsResponse = {
  45. data: Array<{ date: string; runs: number }>
  46. }
  47. export type AppStatisticsResponse = {
  48. data: Array<{ date: string }>
  49. }
  50. export type AppDailyEndUsersResponse = {
  51. data: Array<{ date: string; terminal_count: number }>
  52. }
  53. export type AppTokenCostsResponse = {
  54. data: Array<{ date: string; token_count: number; total_price: number; currency: number }>
  55. }
  56. export type UpdateAppModelConfigResponse = { result: string }
  57. export type ApiKeyItemResponse = {
  58. id: string
  59. token: string
  60. last_used_at: string
  61. created_at: string
  62. }
  63. export type ApiKeysListResponse = {
  64. data: ApiKeyItemResponse[]
  65. }
  66. export type CreateApiKeyResponse = {
  67. id: string
  68. token: string
  69. created_at: string
  70. }
  71. export type ValidateOpenAIKeyResponse = {
  72. result: string
  73. error?: string
  74. }
  75. export type UpdateOpenAIKeyResponse = ValidateOpenAIKeyResponse
  76. export type GenerationIntroductionResponse = {
  77. introduction: string
  78. }
  79. export type AppVoicesListResponse = [{
  80. name: string
  81. value: string
  82. }]
  83. export type TracingStatus = {
  84. enabled: boolean
  85. tracing_provider: TracingProvider | null
  86. }
  87. export type TracingConfig = {
  88. tracing_provider: TracingProvider
  89. tracing_config: LangSmithConfig | LangFuseConfig | OpikConfig | WeaveConfig
  90. }