hensei-web/types/Party.d.ts
Justin Edmund 7c814610b9 Create PartyTransformer
Transforms data into Party objects and back again.

We also created PartyParams to send data back to the API in a uniform way.

We organized the resulting object more than we have in the past since we can do what we want now.

Lastly, we removed characters, weapons and summons from this object. We will probably make a new Grid object and reference that here instead.
2023-07-06 00:04:52 -07:00

53 lines
1,009 B
TypeScript

type JobSkillList = {
[key: number]: JobSkill | undefined
0: JobSkill | undefined
1: JobSkill | undefined
2: JobSkill | undefined
3: JobSkill | undefined
}
type GuidebookList = {
[key: number]: Guidebook | undefined
0: Guidebook | undefined
1: Guidebook | undefined
2: Guidebook | undefined
}
interface Party {
id: string
localId?: string
name: string
description: string
shortcode: string
user: User
details: {
extra: boolean
fullAuto: boolean
autoGuard: boolean
autoSummon: boolean
chargeAttack: boolean
clearTime: number
buttonCount?: number
turnCount?: number
chainCount?: number
}
protagonist: {
job: Job
skills: JobSkillList
masterLevel?: number
ultimateMastery?: number
accessory: JobAccessory
}
social: {
favorited: boolean
sourceParty?: Party
remix: boolean
remixes: Party[]
}
raid: Raid
guidebooks: GuidebookList
timestamps: {
createdAt: string
updatedAt: string
}
}