export interface LoginRequest { stytch_session_token: string; } export interface LoginResponse { user: { id: number; email: string; name: string; company_id: number; company_name: string; role?: UserRole; }; api_token: ApiToken; } export interface ApiToken { access_token: string; access_token_expires_in: number; refresh_token: string; refresh_token_expires_in: number; } export interface RegisterRequest { stytch_session_token: string; name?: string; company_name: string; } export interface RegisterResponse { user_id: number; } export interface LoggedInUser { id: number; email?: string; name: string; company_id: number; company_name: string; role: UserRole; } export interface StytchToken { token: string; token_type: "magiclinks" | "oauth"; } export type UserRole = "global_admin" | "partner_admin" | "partner_user"; export interface RegistrationStatusRequest { stytch_token: StytchToken; session_duration_minutes?: number; } export interface RegistrationStatusB2bRequest { stytch_token: string; session_duration_minutes?: number; } export interface RegistrationStatusResponse { status: RegistrationStatus; email?: string; stytch_session_token: string; stytch_session_jwt: string; } export type RegistrationStatus = "complete" | "pending"; export interface ExchangeTokenRequest { company_id: number; }