import 'server-only'; import Model from './model'; import { SessionCookie, SessionsResponse } from './user.types'; export default class AdminUser extends Model { static sessionCookieName: string; static current(domain: string): Promise; sessionData: SessionsResponse | null; static allowedUserTypes: string[]; static signIn({ email, password, domain, }: { email: string; password: string; domain: string; }): Promise<{ result: AdminUser | null; error: unknown | null; }>; /** * Admin user session verification requires a Bearer token (app verification) * via staging users api if in a staging environment. This differs from other * flows that always require a Bearer token from production, regardless of * environment. * This is handled in the `users-api-session-helper.ts`. */ static verifySession(encryptedCookieToken: string, domain: string): Promise; static isAdminUser(user: SessionsResponse['user'], domain: string): boolean; constructor({ sessionData }: { sessionData: SessionsResponse | null; }); signOut(): Promise; get firstName(): string | null; get lastName(): string | null; get email(): string | null; get sessionCookie(): SessionCookie | null; get encryptedCookieToken(): string | null; get bearerToken(): string | null; get refreshToken(): string | null; get tokenExpiry(): string | null; get id(): number | null; get type(): string | null; get avatar(): string | null; } //# sourceMappingURL=admin-user.d.ts.map