/** Config - configuration required to init a nylas session */ export interface Config { /** ClientID - Nylas Client ID */ clientId: string; /** RedirectURI - RedirectURI of your app */ redirectUri: string; /** AccessType - Type of access you request from token (defaults to offline) */ accessType?: string; /** Domain - Your Nylas Auth domain */ domain?: string; /** Store - Set a store for handling sessions for node env only */ store?: Store; hosted?: boolean; loginId?: string; sw?: string; multiAccount?: boolean; /** DisableInitCodeExchange - Disable code exchange on init */ disableInitCodeExchange?: boolean; } export interface AuthConfig { provider?: string; scope?: Array; loginHint?: string; includeGrantScopes?: boolean; prompt?: string; metadata?: string; state?: string; settings?: any; hosted?: boolean; popup?: boolean; } /** IDToken - format of openID token */ export interface IDToken { iss: string; aud: string; sub: string; email: string; email_verified: boolean; at_hash?: string; status?: string; iat: number; exp: number; name?: string; given_name?: string; family_name?: string; nick_name?: string; picture?: string; gender?: string; locale?: string; provider?: string; } /** CodeExcangeResponse - code exchange payload */ export interface CodeExcangeResponse { access_token: string; grant_id: string; id_token: string; token_type: string; scope: string; } /** ProviderListResponse - format of openID token */ export interface ProviderListResponse { success: boolean; data: ProviderList[]; } export interface ProviderList { provider: string; type: string; settings: any; name: string; } /** Store - Interface for implementing your custom store for handling sessions */ export interface Store { set(key: string, value: any): Promise; get(key: string): Promise; remove(key: string): Promise; } export interface IMAPPayload { imap_username: string; imap_password: string; imap_host: string; imap_port: number; type: string; smtp_host: string; smtp_port: number; provider: string; state: string; smtp_username?: string; smtp_password?: string; } export interface EWSPayload { email: string; ews_username: string; ews_password: string; ews_host: string; ews_port: number; state: string; }