Skip to content
Snippets Groups Projects
account.model.ts 915 B
Newer Older
  • Learn to ignore specific revisions
  • /* eslint-disable camelcase */
    
    export interface Account extends AccountAttributes {
    
      _id: string
    
      id?: string
    
    Yoan VALLET's avatar
    Yoan VALLET committed
      _rev?: string
      _type?: string
      cozyMetadata?: Record<string, any>
    
    export interface SgeConsentData {
      consentId: number
      expirationDate: string
    }
    
    
    export interface AccountAttributes {
    
      account_type: string
    
      auth?: AccountAuthData | AccountSgeData
    
      oauth?: AccountOAuthData
      identifier?: string
    
      state?: string | null
    
    Yoan VALLET's avatar
    Yoan VALLET committed
      name?: string
    
    Yoan VALLET's avatar
    Yoan VALLET committed
      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
    
    Yoan VALLET's avatar
    Yoan VALLET committed
      expires_at?: string
      token_type?: string
    
    
    export interface AccountSgeData {
      pointId: string
      address: string
      firstname: string
      lastname: string
      postalCode: string
      city: string
    }