feat: add auth system, boss pokemon details, moves/abilities API, and run ownership
Add user authentication with login/signup/protected routes, boss pokemon detail fields and result team tracking, moves and abilities selector components and API, run ownership and visibility controls, and various UI improvements across encounters, run list, and journal pages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -182,6 +182,14 @@ export interface BossPokemonInput {
|
||||
level: number
|
||||
order: number
|
||||
conditionLabel?: string | null
|
||||
// Detail fields
|
||||
abilityId?: number | null
|
||||
heldItem?: string | null
|
||||
nature?: string | null
|
||||
move1Id?: number | null
|
||||
move2Id?: number | null
|
||||
move3Id?: number | null
|
||||
move4Id?: number | null
|
||||
}
|
||||
|
||||
// Genlocke admin
|
||||
|
||||
@@ -84,6 +84,12 @@ export interface Encounter {
|
||||
}
|
||||
|
||||
export type RunStatus = 'active' | 'completed' | 'failed'
|
||||
export type RunVisibility = 'public' | 'private'
|
||||
|
||||
export interface RunOwner {
|
||||
id: string
|
||||
displayName: string | null
|
||||
}
|
||||
|
||||
export interface NuzlockeRun {
|
||||
id: number
|
||||
@@ -93,6 +99,8 @@ export interface NuzlockeRun {
|
||||
rules: NuzlockeRules
|
||||
hofEncounterIds: number[] | null
|
||||
namingScheme: string | null
|
||||
visibility: RunVisibility
|
||||
owner: RunOwner | null
|
||||
startedAt: string
|
||||
completedAt: string | null
|
||||
}
|
||||
@@ -136,6 +144,7 @@ export interface CreateRunInput {
|
||||
name: string
|
||||
rules?: NuzlockeRules
|
||||
namingScheme?: string | null
|
||||
visibility?: RunVisibility
|
||||
}
|
||||
|
||||
export interface UpdateRunInput {
|
||||
@@ -144,6 +153,7 @@ export interface UpdateRunInput {
|
||||
rules?: NuzlockeRules
|
||||
hofEncounterIds?: number[]
|
||||
namingScheme?: string | null
|
||||
visibility?: RunVisibility
|
||||
}
|
||||
|
||||
export interface CreateEncounterInput {
|
||||
@@ -175,6 +185,16 @@ export type BossType =
|
||||
| 'totem'
|
||||
| 'other'
|
||||
|
||||
export interface MoveRef {
|
||||
id: number
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface AbilityRef {
|
||||
id: number
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface BossPokemon {
|
||||
id: number
|
||||
pokemonId: number
|
||||
@@ -182,6 +202,19 @@ export interface BossPokemon {
|
||||
order: number
|
||||
conditionLabel: string | null
|
||||
pokemon: Pokemon
|
||||
// Detail fields
|
||||
abilityId: number | null
|
||||
ability: AbilityRef | null
|
||||
heldItem: string | null
|
||||
nature: string | null
|
||||
move1Id: number | null
|
||||
move2Id: number | null
|
||||
move3Id: number | null
|
||||
move4Id: number | null
|
||||
move1: MoveRef | null
|
||||
move2: MoveRef | null
|
||||
move3: MoveRef | null
|
||||
move4: MoveRef | null
|
||||
}
|
||||
|
||||
export interface BossBattle {
|
||||
@@ -202,6 +235,12 @@ export interface BossBattle {
|
||||
pokemon: BossPokemon[]
|
||||
}
|
||||
|
||||
export interface BossResultTeamMember {
|
||||
id: number
|
||||
encounterId: number
|
||||
level: number
|
||||
}
|
||||
|
||||
export interface BossResult {
|
||||
id: number
|
||||
runId: number
|
||||
@@ -209,12 +248,19 @@ export interface BossResult {
|
||||
result: 'won' | 'lost'
|
||||
attempts: number
|
||||
completedAt: string | null
|
||||
team: BossResultTeamMember[]
|
||||
}
|
||||
|
||||
export interface BossResultTeamMemberInput {
|
||||
encounterId: number
|
||||
level: number
|
||||
}
|
||||
|
||||
export interface CreateBossResultInput {
|
||||
bossBattleId: number
|
||||
result: 'won' | 'lost'
|
||||
attempts?: number
|
||||
team?: BossResultTeamMemberInput[]
|
||||
}
|
||||
|
||||
// Re-export for convenience
|
||||
|
||||
Reference in New Issue
Block a user