Skip to content
Snippets Groups Projects
profile.model.ts 956 B
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
  mailToken: string
  partnersIssueDate: string
  haveSeenEcogestureModal: boolean
  _id?: string
  _rev?: string
}

export interface Profile
  extends Omit<
    ProfileEntity,
    'lastConnectionDate' | 'monthlyAnalysisDate' | 'partnersIssueDate'
  > {
  lastConnectionDate: DateTime
  monthlyAnalysisDate: DateTime
  partnersIssueDate: DateTime
}