UNPKG

@n8n/n8n-benchmark

Version:

Cli for running benchmark tests for n8n

30 lines 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WorkflowApiClient = void 0; class WorkflowApiClient { constructor(apiClient) { this.apiClient = apiClient; } async getAllWorkflows() { const response = await this.apiClient.get('/workflows'); return response.data.data; } async createWorkflow(workflow) { const response = await this.apiClient.post('/workflows', workflow); return response.data.data; } async activateWorkflow(workflow) { const response = await this.apiClient.post(`/workflows/${workflow.id}/activate`, { versionId: workflow.versionId, }); return response.data.data; } async archiveWorkflow(workflowId) { await this.apiClient.post(`/workflows/${workflowId}/archive`, {}); } async deleteWorkflow(workflowId) { await this.apiClient.delete(`/workflows/${workflowId}`); } } exports.WorkflowApiClient = WorkflowApiClient; //# sourceMappingURL=workflows-api-client.js.map