UNPKG

kotanipay-sdk

Version:

Official Kotani Pay SDK for Node.js and Browser

37 lines 1.13 kB
import { HttpClientUtil } from '../../utils/http-client.util'; import { LoginResponse, ApiKeyResponse, GenerateApiKeyRequest, AuthenticatedSession } from '../../types'; export declare class AuthService { private httpClient; private session?; constructor(httpClient: HttpClientUtil); /** * Login with email - sends login link to email */ login(email: string): Promise<LoginResponse>; /** * Set session data after user clicks login link */ setSession(sessionData: AuthenticatedSession): void; /** * Generate API key using the JWT token from login */ generateApiKey(request?: GenerateApiKeyRequest): Promise<ApiKeyResponse>; /** * Refresh the JWT token using refresh token */ refreshToken(): Promise<AuthenticatedSession>; /** * Get current session data */ getSession(): AuthenticatedSession | undefined; getTokenInfo(): any; /** * Check if user is authenticated */ isAuthenticated(): boolean; /** * Logout and clear session */ logout(): void; } //# sourceMappingURL=auth.service.d.ts.map