declare namespace MasterModel {
  interface LoginRequestBody {
    guid: string;
    email: string;
    password: string;
  }

  interface LoginResponse {
    token?: string;
    refresh_token?: string;
    enabled2fa?: boolean;
  }
  interface RefreshTokenRequestBody {
    refresh_token: string;
  }
  interface RefreshTokenReponse {
    access_token: string;
  }

  interface TokenParsed {
    exp: number;
    iat: number;
    iss: string;
    sub: string;
    issuer_id: string;
    type: number;
    purpose: 'access' | 'refresh';
  }
  interface RefreshTokenParsed extends TokenParsed {
    jti: string;
  }

  interface TokenParsedTransformed {
    expriresAt: number;
    issuedAt: number;
    issuer: string;
    /** User Email */
    subject: string;
    issuerId: string;
    type: number;
    purpose: 'access' | 'refresh';
  }

  interface RefreshTokenParsedTransformed extends TokenParsedTransformed {
    jwtID: string;
  }

  interface ForgotPasswordRequestBody {
    email: string;
    host: string;
  }

  interface ForgotPasswordResponse {
    message: string;
    error?: string;
  }
}
