Initial commit for Greenlens
This commit is contained in:
47
types.ts
47
types.ts
@@ -1,10 +1,49 @@
|
||||
|
||||
export interface LocalizedPlantContent {
|
||||
name: string;
|
||||
description: string;
|
||||
light: string;
|
||||
}
|
||||
|
||||
export interface MultilingualPlantEntry {
|
||||
botanicalName: string;
|
||||
confidence: number;
|
||||
careInfo: {
|
||||
waterIntervalDays: number;
|
||||
temp: string;
|
||||
};
|
||||
imageUri: string;
|
||||
categories: string[];
|
||||
translations: {
|
||||
de: LocalizedPlantContent;
|
||||
en: LocalizedPlantContent;
|
||||
es: LocalizedPlantContent;
|
||||
};
|
||||
}
|
||||
|
||||
export interface CareInfo {
|
||||
waterIntervalDays: number;
|
||||
light: string;
|
||||
temp: string;
|
||||
}
|
||||
|
||||
export interface PlantHealthIssue {
|
||||
title: string;
|
||||
confidence: number;
|
||||
details: string;
|
||||
}
|
||||
|
||||
export interface PlantHealthCheck {
|
||||
generatedAt: string;
|
||||
overallHealthScore: number;
|
||||
status: 'healthy' | 'watch' | 'critical';
|
||||
likelyIssues: PlantHealthIssue[];
|
||||
actionsNow: string[];
|
||||
plan7Days: string[];
|
||||
creditsCharged: number;
|
||||
imageUri?: string;
|
||||
}
|
||||
|
||||
export interface Plant {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -14,8 +53,10 @@ export interface Plant {
|
||||
careInfo: CareInfo;
|
||||
lastWatered: string; // Serialized Date
|
||||
wateringHistory?: string[]; // Array of serialized dates
|
||||
gallery?: string[]; // Array of image URIs
|
||||
description?: string;
|
||||
notificationsEnabled?: boolean;
|
||||
healthChecks?: PlantHealthCheck[];
|
||||
}
|
||||
|
||||
export interface IdentificationResult {
|
||||
@@ -33,3 +74,9 @@ export enum Tab {
|
||||
}
|
||||
|
||||
export type Language = 'de' | 'en' | 'es';
|
||||
|
||||
export type AppearanceMode = 'system' | 'light' | 'dark';
|
||||
|
||||
export type AppColorScheme = 'light' | 'dark';
|
||||
|
||||
export type ColorPalette = 'forest' | 'ocean' | 'sunset' | 'mono';
|
||||
|
||||
Reference in New Issue
Block a user