| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 | 
							- import type { Viewport } from 'reactflow'
 
- import type {
 
-   BlockEnum,
 
-   Edge,
 
-   Node,
 
- } from '@/app/components/workflow/types'
 
- export type NodeTracing = {
 
-   id: string
 
-   index: number
 
-   predecessor_node_id: string
 
-   node_id: string
 
-   node_type: BlockEnum
 
-   title: string
 
-   inputs: any
 
-   process_data: any
 
-   outputs?: any
 
-   status: string
 
-   error?: string
 
-   elapsed_time: number
 
-   execution_metadata: {
 
-     total_tokens: number
 
-     total_price: number
 
-     currency: string
 
-   }
 
-   created_at: number
 
-   created_by: {
 
-     id: string
 
-     name: string
 
-     email: string
 
-   }
 
-   finished_at: number
 
-   extras?: any
 
-   expand?: boolean // for UI
 
- }
 
- export type FetchWorkflowDraftResponse = {
 
-   id: string
 
-   graph: {
 
-     nodes: Node[]
 
-     edges: Edge[]
 
-     viewport?: Viewport
 
-   }
 
-   features?: any
 
-   created_at: number
 
-   created_by: {
 
-     id: string
 
-     name: string
 
-     email: string
 
-   }
 
-   updated_at: number
 
- }
 
- export type NodeTracingListResponse = {
 
-   data: NodeTracing[]
 
- }
 
- export type WorkflowStartedResponse = {
 
-   task_id: string
 
-   workflow_run_id: string
 
-   event: string
 
-   data: {
 
-     id: string
 
-     workflow_id: string
 
-     sequence_number: number
 
-     created_at: number
 
-   }
 
- }
 
- export type WorkflowFinishedResponse = {
 
-   task_id: string
 
-   workflow_run_id: string
 
-   event: string
 
-   data: {
 
-     id: string
 
-     workflow_id: string
 
-     status: string
 
-     outputs: any
 
-     error: string
 
-     elapsed_time: number
 
-     total_tokens: number
 
-     total_steps: number
 
-     created_at: number
 
-     finished_at: number
 
-   }
 
- }
 
- export type NodeStartedResponse = {
 
-   task_id: string
 
-   workflow_run_id: string
 
-   event: string
 
-   data: {
 
-     id: string
 
-     node_id: string
 
-     node_type: string
 
-     index: number
 
-     predecessor_node_id?: string
 
-     inputs: any
 
-     created_at: number
 
-     extras?: any
 
-   }
 
- }
 
- export type NodeFinishedResponse = {
 
-   task_id: string
 
-   workflow_run_id: string
 
-   event: string
 
-   data: {
 
-     id: string
 
-     node_id: string
 
-     node_type: string
 
-     index: number
 
-     predecessor_node_id?: string
 
-     inputs: any
 
-     process_data: any
 
-     outputs: any
 
-     status: string
 
-     error: string
 
-     elapsed_time: number
 
-     execution_metadata: {
 
-       total_tokens: number
 
-       total_price: number
 
-       currency: string
 
-     }
 
-     created_at: number
 
-   }
 
- }
 
- export type TextChunkResponse = {
 
-   task_id: string
 
-   workflow_run_id: string
 
-   event: string
 
-   data: {
 
-     text: string
 
-   }
 
- }
 
- export type TextReplaceResponse = {
 
-   task_id: string
 
-   workflow_run_id: string
 
-   event: string
 
-   data: {
 
-     text: string
 
-   }
 
- }
 
- export type WorkflowRunHistory = {
 
-   id: string
 
-   sequence_number: number
 
-   version: string
 
-   conversation_id?: string
 
-   message_id?: string
 
-   graph: {
 
-     nodes: Node[]
 
-     edges: Edge[]
 
-     viewport?: Viewport
 
-   }
 
-   inputs: Record<string, string>
 
-   status: string
 
-   outputs: Record<string, any>
 
-   error?: string
 
-   elapsed_time: number
 
-   total_tokens: number
 
-   total_steps: number
 
-   created_at: number
 
-   finished_at: number
 
-   created_by_account: {
 
-     id: string
 
-     name: string
 
-     email: string
 
-   }
 
- }
 
- export type WorkflowRunHistoryResponse = {
 
-   data: WorkflowRunHistory[]
 
- }
 
- export type ChatRunHistoryResponse = {
 
-   data: WorkflowRunHistory[]
 
- }
 
- export type NodesDefaultConfigsResponse = {
 
-   type: string
 
-   config: any
 
- }[]
 
 
  |