UNPKG

@symanticreative/vendure-admin-client

Version:

A TypeScript GraphQL client for Vendure Admin API to create custom dashboards

31 lines (30 loc) 958 B
import { AuthRepository } from '../repositories/auth.repository'; import { AuthCredentials, AuthResponse, CurrentUser } from '../models/auth.model'; /** * Service for authentication operations */ export declare class AuthService { private authRepository; constructor(authRepository: AuthRepository); /** * Login to the Vendure Admin API * @param credentials - Authentication credentials * @returns Promise resolving to auth response */ login(credentials: AuthCredentials): Promise<AuthResponse>; /** * Logout from the Vendure Admin API * @returns Promise resolving to void */ logout(): Promise<void>; /** * Get the current authenticated user * @returns Promise resolving to current user */ getCurrentUser(): Promise<CurrentUser>; /** * Check if the user is authenticated * @returns Boolean indicating if authenticated */ isAuthenticated(): boolean; }