mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
refactor(editor): Move editor-ui and design-system to frontend dir (no-changelog) (#13564)
This commit is contained in:
32
packages/frontend/editor-ui/src/api/workflowHistory.ts
Normal file
32
packages/frontend/editor-ui/src/api/workflowHistory.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import type { IRestApiContext } from '@/Interface';
|
||||
import { get } from '@/utils/apiUtils';
|
||||
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;
|
||||
};
|
||||
Reference in New Issue
Block a user