Skip to content
Snippets Groups Projects
profile.model.ts 1.24 KiB
Newer Older
  • Learn to ignore specific revisions
  • import { DateTime } from 'luxon'
    
    
    interface Onboarding {
    
      isWelcomeSeen: boolean
    }
    
    export interface ProfileEntity {
      id: string
      ecogestureHash: string
      challengeHash: string
      duelHash: string
      quizHash: string
      explorationHash: string
      isFirstConnection: boolean
      lastConnectionDate: string
      haveSeenLastAnalysis: boolean
      sendAnalysisNotification: boolean
      monthlyAnalysisDate: string
      sendConsumptionAlert: boolean
      waterDailyConsumptionLimit: number
      isProfileTypeCompleted: boolean
    
      isProfileEcogestureCompleted: boolean
    
      onboarding: Onboarding
    
      partnersIssueSeenDate: {
    
        enedis?: string
        egl?: string
        grdf?: string
    
      haveSeenEcogestureModal: boolean
    
      activateHalfHourDate: string
    
    Bastien DUMONT's avatar
    Bastien DUMONT committed
      customPopupDate: string
    
      _id?: string
      _rev?: string
    }
    
    export interface Profile
    
      extends Omit<
        ProfileEntity,
    
        | 'lastConnectionDate'
        | 'monthlyAnalysisDate'
    
        | 'partnersIssueSeenDate'
    
    Bastien DUMONT's avatar
    Bastien DUMONT committed
        | 'customPopupDate'
    
      lastConnectionDate: DateTime
      monthlyAnalysisDate: DateTime
    
      partnersIssueSeenDate: {
        enedis: DateTime
        egl: DateTime
        grdf: DateTime
      }
    
    Bastien DUMONT's avatar
    Bastien DUMONT committed
      customPopupDate: DateTime
    
      activateHalfHourDate: DateTime