UNPKG

n8n

Version:

n8n Workflow Automation Tool

40 lines (39 loc) 1.82 kB
import { type RequestHandler, Response } from 'express'; import { AuthService } from '../auth/auth.service'; import { PasswordUtility } from '../services/password.utility'; import type { User } from '../databases/entities/User'; import { AuthenticatedRequest, MeRequest } from '../requests'; import type { PublicUser } from '../Interfaces'; import { UserService } from '../services/user.service'; import { Logger } from '../Logger'; import { ExternalHooks } from '../ExternalHooks'; import { InternalHooks } from '../InternalHooks'; import { UserRepository } from '../databases/repositories/user.repository'; export declare const isApiEnabledMiddleware: RequestHandler; export declare class MeController { private readonly logger; private readonly externalHooks; private readonly internalHooks; private readonly authService; private readonly userService; private readonly passwordUtility; private readonly userRepository; constructor(logger: Logger, externalHooks: ExternalHooks, internalHooks: InternalHooks, authService: AuthService, userService: UserService, passwordUtility: PasswordUtility, userRepository: UserRepository); updateCurrentUser(req: MeRequest.UserUpdate, res: Response): Promise<PublicUser>; updatePassword(req: MeRequest.Password, res: Response): Promise<{ success: boolean; }>; storeSurveyAnswers(req: MeRequest.SurveyAnswers): Promise<{ success: boolean; }>; createAPIKey(req: AuthenticatedRequest): Promise<{ apiKey: string; }>; getAPIKey(req: AuthenticatedRequest): Promise<{ apiKey: string | null | undefined; }>; deleteAPIKey(req: AuthenticatedRequest): Promise<{ success: boolean; }>; updateCurrentUserSettings(req: MeRequest.UserSettingsUpdate): Promise<User['settings']>; }