Skip to content
Snippets Groups Projects
account.model.ts 744 B
Newer Older
  • Learn to ignore specific revisions
  • export interface Account extends AccountAttributes {
    
      _id: string
    
      id?: string
    
    Yoan VALLET's avatar
    Yoan VALLET committed
      _rev?: string
      _type?: string
    
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
    
    Yoan VALLET's avatar
    Yoan VALLET committed
      cozyMetadata?: Record<string, any>
    
    }
    
    export interface AccountAttributes {
    
      account_type: string
    
      auth?: AccountAuthData
      oauth?: AccountOAuthData
      identifier?: string
    
      state?: string | null
    
      name?: string
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      oauth_callback_results?: Record<string, any>
    
    }
    
    export interface AccountAuthData {
      login: string
      credentials_encrypted?: string
      password?: string
    }
    
    export interface AccountOAuthData {
      access_token: string
      refresh_token: string
    
      expires_at?: string
      token_type?: string