feat(editor): Workflow history [WIP]- create workflow history list component (no-changelog) (#7186)

Co-authored-by: Omar Ajoue <krynble@gmail.com>
This commit is contained in:
Csaba Tuncsik
2023-09-29 17:48:36 +02:00
committed by GitHub
parent ec0379378e
commit d1b6c7fd79
14 changed files with 1019 additions and 12 deletions

View File

@@ -0,0 +1,32 @@
import type { IRestApiContext } from '@/Interface';
import { get } from '@/utils';
import type {
WorkflowHistory,
WorkflowVersion,
WorkflowHistoryRequestParams,
} from '@/types/workflowHistory';
export const getWorkflowHistory = async (
context: IRestApiContext,
workflowId: string,
queryParams: WorkflowHistoryRequestParams,
): Promise<WorkflowHistory[]> => {
const { data } = await get(
context.baseUrl,
`/workflow-history/workflow/${workflowId}`,
queryParams,
);
return data;
};
export const getWorkflowVersion = async (
context: IRestApiContext,
workflowId: string,
versionId: string,
): Promise<WorkflowVersion> => {
const { data } = await get(
context.baseUrl,
`/workflow-history/workflow/${workflowId}/version/${versionId}`,
);
return data;
};