Files
TougliGui/src/types.ts

71 lines
1.3 KiB
TypeScript

export interface Profile {
id: string;
name: string;
created_at: string;
}
export interface GuideListItem {
gid: string;
name: string;
last_synced_at: string | null;
total_quests: number;
completed_quests: number;
}
export interface CombatType {
name: string;
column: number;
}
export interface Resource {
quantity: number;
name: string;
}
export interface CombatIndicator {
combat_type: string;
count: string;
}
export interface QuestItem {
name: string;
completed: boolean;
combat_indicators: CombatIndicator[];
note: string | null;
url: string | null;
}
export interface InstructionItem {
text: string;
}
export interface GroupItem {
note: string | null;
quests: QuestItem[];
}
export type SectionItem =
| { type: "Quest"; name: string; completed: boolean; combat_indicators: CombatIndicator[]; note: string | null; url: string | null }
| { type: "Instruction"; text: string }
| { type: "Group"; note: string | null; quests: QuestItem[] };
export interface Section {
name: string;
items: SectionItem[];
}
export interface GuideData {
name: string;
gid: string;
effect: string;
recommended_level: number | null;
combat_legend: CombatType[];
resources: Resource[];
sections: Section[];
}
export interface SyncResult {
synced: number;
errors: string[];
}