mirror of
https://github.com/HKUDS/OpenSpace.git
synced 2026-08-28 05:15:00 +00:00
14 lines
494 B
TypeScript
14 lines
494 B
TypeScript
import apiClient from './client';
|
|
import type { WorkflowDetail, WorkflowSummary } from './types';
|
|
|
|
export const workflowsApi = {
|
|
async listWorkflows(): Promise<WorkflowSummary[]> {
|
|
const response = await apiClient.get<{ items: WorkflowSummary[] }>('/workflows');
|
|
return response.data.items;
|
|
},
|
|
|
|
async getWorkflow(workflowId: string): Promise<WorkflowDetail> {
|
|
const response = await apiClient.get<WorkflowDetail>(`/workflows/${workflowId}`);
|
|
return response.data;
|
|
},
|
|
};
|