n8n
Version:
n8n Workflow Automation Tool
31 lines (30 loc) • 941 B
TypeScript
import type { McpClientConnectedPeriod } from '@n8n/api-types';
import { DataSource, Repository } from '@n8n/typeorm';
import { UserConsent } from '../entities/oauth-user-consent.entity';
type ConsentOwner = {
id: string;
firstName: string | null;
lastName: string | null;
email: string;
};
export type FindConnectedClientsOptions = {
userId?: string;
withOwner?: boolean;
name?: string;
ownerId?: string;
clientIds?: string[];
connected?: McpClientConnectedPeriod;
now: number;
skip?: number;
take?: number;
};
export declare class UserConsentRepository extends Repository<UserConsent> {
constructor(dataSource: DataSource);
findConnectedClients(options: FindConnectedClientsOptions): Promise<{
rows: UserConsent[];
total: number;
}>;
findConsentOwners(): Promise<ConsentOwner[]>;
countConnectedConsents(userId?: string): Promise<number>;
}
export {};