Skip to content
Snippets Groups Projects
account.model.ts 950 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 SgeAccountData {
    
      consentId: number
      expirationDate: string
    
      offPeakHours?: string
    
    
    export interface AccountAttributes {
    
      account_type: string
    
      auth?: AccountEGLData | AccountSgeData | AccountGRDFData
    
      identifier?: string
    
      state?: string | null
    
    Yoan VALLET's avatar
    Yoan VALLET committed
      name?: string
    
      data?: SgeAccountData
    
      // TODO remove this ?
    
    Yoan VALLET's avatar
    Yoan VALLET committed
      oauth_callback_results?: Record<string, any>
    
    export interface AccountEGLData {
    
      login: string
      credentials_encrypted?: string
      password?: string
    }
    
    
    export interface AccountGRDFData {
      pce: string
      email: string
      lastname: string
      firstname: string
      postalCode: string
    
    
    export interface AccountSgeData {
      pointId: string
      address: string
      firstname: string
      lastname: string
      postalCode: string
      city: string
    }