aboutsummaryrefslogtreecommitdiff
path: root/src/lib/APITypes.d.ts
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-02-20 21:38:14 -0600
committermat <github@matdoes.dev>2022-02-20 21:38:14 -0600
commit13e5974114f759bae73f3bfd68c62ce9cfaf785e (patch)
tree8a196b27b8d4dece1dc2187332422a4e41423dfa /src/lib/APITypes.d.ts
parent582409e7cb1598b65bee6d1023b77620bb3791af (diff)
downloadskyblock-stats-13e5974114f759bae73f3bfd68c62ce9cfaf785e.tar.gz
skyblock-stats-13e5974114f759bae73f3bfd68c62ce9cfaf785e.tar.bz2
skyblock-stats-13e5974114f759bae73f3bfd68c62ce9cfaf785e.zip
add more stuff to profile and fix bugs
Diffstat (limited to 'src/lib/APITypes.d.ts')
-rw-r--r--src/lib/APITypes.d.ts96
1 files changed, 96 insertions, 0 deletions
diff --git a/src/lib/APITypes.d.ts b/src/lib/APITypes.d.ts
new file mode 100644
index 0000000..04f9220
--- /dev/null
+++ b/src/lib/APITypes.d.ts
@@ -0,0 +1,96 @@
+export interface CleanMemberProfile {
+ member: CleanMemberProfilePlayer
+ profile: CleanFullProfileBasicMembers
+ customization?: AccountCustomization
+}
+
+export interface CleanMemberProfilePlayer extends CleanPlayer {
+ profileName: string
+ first_join: number
+ last_save: number
+ bank?: Bank
+ purse?: number
+ stats?: StatItem[]
+ rawHypixelStats?: {
+ [key: string]: number
+ }
+ minions?: CleanMinion[]
+ fairy_souls?: FairySouls
+ inventories?: Inventories
+ objectives?: Objective[]
+ skills?: Skill[]
+ visited_zones?: Zone[]
+ collections?: Collection[]
+ slayers?: SlayerData
+}
+
+export interface CleanBasicPlayer {
+ uuid: string
+ username: string
+}
+
+export interface CleanPlayer extends CleanBasicPlayer {
+ rank: CleanRank
+ socials: CleanSocialMedia
+ profiles?: CleanBasicProfile[]
+}
+
+export interface StatItem {
+ rawName: string
+ value: number
+ categorizedName: string
+ category: string | null
+ unit: string | null
+}
+
+interface Item {
+ id: string
+ count: number
+ vanillaId: string
+ display: {
+ name: string
+ lore: string[]
+ glint: boolean
+ }
+ reforge?: string
+ anvil_uses?: number
+ timestamp?: string
+ enchantments?: {
+ [name: string]: number
+ }
+ head_texture?: string
+}
+export declare type Inventory = Item[]
+export declare const INVENTORIES: {
+ armor: string
+ inventory: string
+ ender_chest: string
+ talisman_bag: string
+ potion_bag: string
+ fishing_bag: string
+ quiver: string
+ trick_or_treat_bag: string
+ wardrobe: string
+}
+export declare type Inventories = {
+ [name in keyof typeof INVENTORIES]: Item[]
+}
+
+
+export interface CleanUser {
+ player: CleanPlayer | null
+ profiles?: CleanProfile[]
+ activeProfile?: string
+ online?: boolean
+ customization?: AccountCustomization
+}
+
+export interface CleanProfile extends CleanBasicProfile {
+ members?: CleanBasicMember[]
+}
+
+/** A basic profile that only includes the profile uuid and name */
+export interface CleanBasicProfile {
+ uuid: string
+ name?: string
+}