mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
feat(editor): Insights dashboard (#13739)
Co-authored-by: Guillaume Jacquart <jacquart.guillaume@gmail.com> Co-authored-by: Raúl Gómez Morales <raul00gm@gmail.com>
This commit is contained in:
@@ -1,6 +1,20 @@
|
||||
import type { IRestApiContext } from '@/Interface';
|
||||
import { makeRestApiRequest } from '@/utils/apiUtils';
|
||||
import type { InsightsSummary } from '@n8n/api-types';
|
||||
import type { IRestApiContext } from '@/Interface';
|
||||
import type {
|
||||
InsightsSummary,
|
||||
InsightsByTime,
|
||||
InsightsByWorkflow,
|
||||
ListInsightsWorkflowQueryDto,
|
||||
} from '@n8n/api-types';
|
||||
|
||||
export const fetchInsightsSummary = async (context: IRestApiContext): Promise<InsightsSummary> =>
|
||||
await makeRestApiRequest<InsightsSummary>(context, 'GET', '/insights/summary');
|
||||
await makeRestApiRequest(context, 'GET', '/insights/summary');
|
||||
|
||||
export const fetchInsightsByTime = async (context: IRestApiContext): Promise<InsightsByTime[]> =>
|
||||
await makeRestApiRequest(context, 'GET', '/insights/by-time');
|
||||
|
||||
export const fetchInsightsByWorkflow = async (
|
||||
context: IRestApiContext,
|
||||
filter?: ListInsightsWorkflowQueryDto,
|
||||
): Promise<InsightsByWorkflow> =>
|
||||
await makeRestApiRequest(context, 'GET', '/insights/by-workflow', filter);
|
||||
|
||||
Reference in New Issue
Block a user