import { apiClient } from './client'

interface SessionToFlowResponse {
  name: string
  description: string
  tree_type: string
  tags: string[]
  tree_structure: Record<string, unknown>
}

export const sessionToFlowApi = {
  generate: async (sessionId: string): Promise<SessionToFlowResponse> => {
    const { data } = await apiClient.post('/ai/session-to-flow', { session_id: sessionId })
    return data
  },
}
