initial commit
This commit is contained in:
30
src/types/api.ts
Normal file
30
src/types/api.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
export interface AlbionPriceEntry {
|
||||
item_id: string
|
||||
city: string
|
||||
quality: number
|
||||
sell_price_min: number
|
||||
sell_price_min_date: string
|
||||
sell_price_max: number
|
||||
buy_price_min: number
|
||||
buy_price_max: number
|
||||
}
|
||||
|
||||
export type PriceCache = Map<string, AlbionPriceEntry>
|
||||
|
||||
export interface ManualPriceEntry {
|
||||
sell_price_min: number
|
||||
editedAt: string // ISO date string
|
||||
}
|
||||
|
||||
export type ManualPriceCache = Map<string, ManualPriceEntry>
|
||||
|
||||
export type AlbionCity =
|
||||
| 'Thetford'
|
||||
| 'Caerleon'
|
||||
| 'Bridgewatch'
|
||||
| 'Fort Sterling'
|
||||
| 'Lymhurst'
|
||||
| 'Martlock'
|
||||
| 'Black Market'
|
||||
|
||||
export type AlbionQuality = 1 | 2 | 3 | 4 | 5
|
||||
47
src/types/crafting.ts
Normal file
47
src/types/crafting.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
export type Tier = 4 | 5 | 6 | 7 | 8
|
||||
export type Enchantment = 0 | 1 | 2 | 3 | 4
|
||||
|
||||
export type ItemCategory = 'Weapons' | 'Armor' | 'Gathering'
|
||||
|
||||
export type JournalType = 'warrior' | 'mage' | 'hunter' | 'toolmaker'
|
||||
|
||||
export type SortField = 'materialCost' | 'displayName' | 'tier' | 'variantType'
|
||||
|
||||
export type SortDirection = 'asc' | 'desc'
|
||||
|
||||
export interface SortState {
|
||||
field: SortField
|
||||
direction: SortDirection
|
||||
}
|
||||
|
||||
export interface Ingredient {
|
||||
itemId: string
|
||||
quantity: number
|
||||
}
|
||||
|
||||
export interface CraftingRecipe {
|
||||
outputItemId: string
|
||||
displayName: string
|
||||
tier: Tier
|
||||
enchantment: Enchantment
|
||||
category: ItemCategory
|
||||
journalType: JournalType
|
||||
ingredients: Ingredient[]
|
||||
}
|
||||
|
||||
export interface IngredientBreakdown {
|
||||
itemId: string
|
||||
displayName: string
|
||||
quantity: number
|
||||
unitPrice: number
|
||||
totalCost: number
|
||||
}
|
||||
|
||||
export interface ProfitResult {
|
||||
recipe: CraftingRecipe
|
||||
materialCost: number
|
||||
effectiveMaterialCost: number
|
||||
priceAgeMs: number | null // null = missing prices; ms since oldest manual entry
|
||||
missingPrices: boolean
|
||||
ingredientBreakdown: IngredientBreakdown[]
|
||||
}
|
||||
11
src/types/filters.ts
Normal file
11
src/types/filters.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { AlbionCity } from './api'
|
||||
import type { Tier, Enchantment } from './crafting'
|
||||
|
||||
export interface FilterState {
|
||||
city: AlbionCity
|
||||
tiers: Set<Tier>
|
||||
selectedItemTypes: Set<string> | null
|
||||
rrr: number
|
||||
nameFilter: string
|
||||
enchantments: Set<Enchantment> | null
|
||||
}
|
||||
Reference in New Issue
Block a user