import { DataSource, Repository } from '@n8n/typeorm'; import type { IDataObject } from 'n8n-workflow'; import { ActivityEvent } from '../entities'; import type { ActivityResourceType } from '../entities'; export declare const activityResourceNameMaxLength = 128; export declare const activityDataMaxLength = 512; export type ActivityEventInput = Pick & Partial> & { resourceName?: string | null; data?: IDataObject | null; }; export type ActivityProjectScope = string[] | 'all-projects'; export type ActivityFeedQuery = { limit: number; projectIds: ActivityProjectScope; userId?: string; resourceId?: string; filterCategory?: ActivityEvent['category']; allowedCategories: Array; afterId?: number; beforeId?: number; }; export interface AttributedActivity { userId: string; at: Date; } export declare class ActivityEventRepository extends Repository { constructor(dataSource: DataSource); record(input: ActivityEventInput): Promise; findFeed(query: ActivityFeedQuery): Promise; findEntry(query: { id: number; projectIds: ActivityProjectScope; allowedCategories: Array; }): Promise; findByResource(query: { resourceType: ActivityResourceType; resourceId: string; projectIds: ActivityProjectScope; limit: number; }): Promise; findRecentAttributedByResource(resourceType: ActivityResourceType, resourceIds: string[], perResource: number): Promise>; deleteOlderThan(cutoff: Date, signal?: AbortSignal): Promise; deleteBeyondNewest(keep: number, signal?: AbortSignal): Promise; private deleteInBatches; }