UNPKG

manifest

Version:

The backend for AI code editors

34 lines (33 loc) 1.51 kB
import { AuthenticableEntity } from '@repo/types'; import { ConfigService } from '@nestjs/config'; import { Request } from 'express'; import { EntityService } from '../entity/services/entity.service'; import { SignupAuthenticableEntityDto } from './dtos/signup-authenticable-entity.dto'; import { EntityManifestService } from '../manifest/services/entity-manifest.service'; import { CrudService } from '../crud/services/crud.service'; export declare class AuthService { private readonly configService; private readonly entityService; private readonly entityManifestService; private readonly crudService; constructor(configService: ConfigService, entityService: EntityService, entityManifestService: EntityManifestService, crudService: CrudService); createToken(entitySlug: string, signupUserDto: SignupAuthenticableEntityDto): Promise<{ token: string; }>; signup(entitySlug: string, signupUserDto: SignupAuthenticableEntityDto, byPassAdminCheck?: boolean): Promise<{ token: string; }>; getUserFromToken(token: string): Promise<{ user: AuthenticableEntity; entitySlug: string; }>; getUserFromRequest(req: Request): Promise<{ user: AuthenticableEntity; entitySlug: string; }>; isReqUserAdmin(req: Request): Promise<boolean>; isDefaultAdminExists(): Promise<{ exists: boolean; }>; findUserFromCredentials(entitySlug: string, email: string, password: string): Promise<AuthenticableEntity>; }