Skip to content
Snippets Groups Projects
profile.model.ts 1.88 KiB
Newer Older
  • Learn to ignore specific revisions
  • import { DateTime } from 'luxon'
    
    export interface ProfileEntity {
      id: string
    
      /** Hash used to verify the content of ecogestures */
    
      /** Hash used to verify the content of challenges */
    
      /** Hash used to verify the content of duels */
    
      /** Hash used to verify the content of quiz */
    
      /** Hash used to verify the content of exploration */
    
      /** Boolean used to inform if the user connects for the first time */
    
      isFirstConnection: boolean
    
      /** Date of the last user connection */
    
      lastConnectionDate: string
    
      /** Boolean used to inform if user has seen the last analysis */
    
      haveSeenLastAnalysis: boolean
    
      /** Boolean used to inform if user has seen the analysis notification */
    
      sendAnalysisNotification: boolean
    
      isAnalysisReminderEnabled: boolean
    
      /** Date of the last monthly analysis */
    
      monthlyAnalysisDate: string
      sendConsumptionAlert: boolean
      waterDailyConsumptionLimit: number
    
      /** Check if a user has completed his consumption profile */
    
      isProfileTypeCompleted: boolean
    
      isProfileEcogestureCompleted: boolean
    
      onboarding: {
        isWelcomeSeen: boolean
      }
    
      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