Files
loadout/src/types/index.ts
T

103 lines
2.3 KiB
TypeScript

export type BagType = 'personal_item' | 'carry_on' | 'checked' | 'worn';
export type Category = 'clothing' | 'toiletries' | 'tech' | 'documents' | 'gear' | 'wellness';
export type TripType =
| 'weekend_getaway'
| 'business'
| 'beach'
| 'alpine_cold'
| 'hiking_camping'
| 'international_urban'
| 'road_trip';
export type Climate = 'hot' | 'mild' | 'cold' | 'rainy';
export type LuggageConfig = 'carry_on_only' | 'checked_bag' | 'backpack_only';
export type ItemSource = 'generated' | 'user' | 'learned' | 'ai';
export interface PackingItem {
id: string;
name: string;
category: Category;
quantity: number;
bag: BagType;
packed: boolean;
essential?: boolean;
notes?: string;
source?: ItemSource;
learnedReason?: string;
debriefStatus?: 'used' | 'deadweight' | 'wishlist';
}
export interface TripDebrief {
notes: string;
rating: number; // 1 to 5
completedAt: string;
excludedItemNames: string[]; // Packed but never used ("Deadweight")
includedItemNames: string[]; // Missing items ("Wish I brought")
}
export interface Trip {
id: string;
title: string;
destination: string;
routeCode: string; // e.g. "SFO ➔ NRT"
tripType: TripType;
durationDays: number;
durationNights: number;
climate: Climate;
luggageConfig: LuggageConfig;
hasLaundry: boolean;
activities: string[]; // 'formal', 'swimming', 'hiking', 'gym', 'remote_work', 'photography'
items: PackingItem[];
createdAt: string;
debrief?: TripDebrief;
}
export interface MemoryExclusion {
itemName: string;
tripType: TripType;
count: number;
lastDate: string;
}
export interface MemoryInclusion {
itemName: string;
category: Category;
defaultBag: BagType;
tripType: TripType;
count: number;
lastDate: string;
reason?: string;
}
export interface PackMemory {
exclusions: MemoryExclusion[];
inclusions: MemoryInclusion[];
totalTripsDebriefed: number;
}
export interface AppSettings {
soundEnabled: boolean;
aiEnabled: boolean;
aiProvider: 'ollama' | 'gemini' | 'openai';
ollamaUrl: string;
ollamaModel: string;
apiKey: string;
}
export interface BagMeta {
type: BagType;
label: string;
code: string;
icon: string;
description: string;
tsaRule?: string;
color: string;
borderClass: string;
bgClass: string;
badgeBg: string;
}