UNPKG

@paroicms/server

Version:
32 lines (31 loc) 806 B
import type { LoginMethod } from "@paroicms/public-anywhere-lib"; export type InteractiveLoginMethod = Exclude<LoginMethod, "pat">; export type LoginAction = SignInLoginAction | VerifyLoginAction; export interface SignInLoginAction { action: "signIn"; email: string; password: string; } export interface VerifyLoginAction { action: "verify" | "loginWithPlatformToken"; token: string; } export interface LoginInput { email: string; password: string; } export interface OAuthSuccess { email: string; } export interface LoginSuccess extends OAuthSuccess { id: string; name?: string; language: string; token: string; adminUiToken?: string; loginMethod: InteractiveLoginMethod; } export interface LoginFailed { statusCode: 401; message: string; }