n8n
Version:
n8n Workflow Automation Tool
14 lines (13 loc) • 820 B
TypeScript
import { DataSource, Repository } from '@n8n/typeorm';
import { StatisticsNames, WorkflowStatistics } from '../entities/WorkflowStatistics';
import type { User } from '../../databases/entities/User';
type StatisticsInsertResult = 'insert' | 'failed' | 'alreadyExists';
type StatisticsUpsertResult = StatisticsInsertResult | 'update';
export declare class WorkflowStatisticsRepository extends Repository<WorkflowStatistics> {
private readonly dbType;
constructor(dataSource: DataSource);
insertWorkflowStatistics(eventName: StatisticsNames, workflowId: string): Promise<StatisticsInsertResult>;
upsertWorkflowStatistics(eventName: StatisticsNames, workflowId: string): Promise<StatisticsUpsertResult>;
queryNumWorkflowsUserHasWithFiveOrMoreProdExecs(userId: User['id']): Promise<number>;
}
export {};