| | |
| | | import type { |
| | | ChatRunHistoryResponse, |
| | | ConversationVariableResponse, |
| | | FetchWorkflowDraftPageResponse, |
| | | FetchWorkflowDraftResponse, |
| | | NodesDefaultConfigsResponse, |
| | | WorkflowRunHistoryResponse, |
| | |
| | | return `apps/${appId}/${isChatFlow ? 'advanced-chat/' : ''}workflows/draft/iteration/nodes/${nodeId}/run` |
| | | } |
| | | |
| | | export const getLoopSingleNodeRunUrl = (isChatFlow: boolean, appId: string, nodeId: string) => { |
| | | return `apps/${appId}/${isChatFlow ? 'advanced-chat/' : ''}workflows/draft/loop/nodes/${nodeId}/run` |
| | | export const publishWorkflow = (url: string) => { |
| | | return post<CommonResponse & { created_at: number }>(url) |
| | | } |
| | | |
| | | export const fetchPublishedWorkflow: Fetcher<FetchWorkflowDraftResponse, string> = (url) => { |
| | | return get<FetchWorkflowDraftResponse>(url) |
| | | } |
| | | |
| | | export const fetchPublishedAllWorkflow: Fetcher<FetchWorkflowDraftPageResponse, string> = (url) => { |
| | | return get<FetchWorkflowDraftPageResponse>(url) |
| | | } |
| | | |
| | | export const stopWorkflowRun = (url: string) => { |
| | | return post<CommonResponse>(url) |
| | | } |