A rewrite of Poly+, my quality-of-life browser extension for Polytoria. Built entirely fresh using the WXT extension framework, Typescript, and with added better overall code quality.
extension
1type itemTypes = "hat" | "tool" | "face" | "shirt" | "pants" | "profileTheme"; 2 3export type userApiSchema = { 4 id: number, 5 username: string, 6 description: string, 7 signature: string, 8 thumbnail: { 9 avatar: string, 10 icon: string 11 }, 12 playing: null|{}, 13 netWorth: number, 14 placeVisits: number, 15 profileViews: number, 16 forumPosts: number, 17 assetSales: number, 18 membershipType: "free" | "plus" | "plusDeluxe", 19 isStaff: boolean, 20 registeredAt: string, 21 lastSeenAt: string 22}; 23 24export type placeApiSchema = { 25 id: number, 26 name: string, 27 description: string, 28 creator: { 29 type: "user" | "guild", 30 id: number, 31 name: string, 32 thumbnail: string 33 }, 34 thumbnail: string, 35 genre: string, 36 maxPlayers: number, 37 isActive: boolean, 38 visits: number, 39 uniqueVisits: number, 40 playing: number, 41 rating: object, 42 accessType: string, 43 accessPrice: number | null, 44 createdAt: string, 45 updatedAt: string 46}; 47 48export type avatarApiSchema = { 49 id: string, 50 colors: { 51 head: string, 52 torso: string, 53 leftArm: string, 54 rightArm: string, 55 leftLeg: string, 56 rightLeg: string 57 }, 58 assets: Array<{ 59 id: number, 60 type: itemTypes, 61 accessoryType: string, 62 name: string, 63 thumbnail: string, 64 path: string 65 }>, 66 isDefault: boolean 67}; 68 69export type itemApiSchema = { 70 id: number, 71 type: itemTypes, 72 accessoryType: string, 73 name: string, 74 description: string, 75 tags: Array<string>, 76 creator: { 77 type: string, 78 id: number, 79 name: string, 80 thumbnail: string 81 }, 82 thumbnail: string, 83 price: number | null, 84 averagePrice: number | null, 85 version: number, 86 sales: number, 87 favorites: number, 88 totalStock: number | null, 89 onSaleUntil: string | null, 90 isLimited: boolean, 91 createdAt: string, 92 updatedAt: string | null 93} 94 95export type meshApiSchema = { 96 success: boolean, 97 url?: string, 98 errors?: Array<{ 99 code: string, 100 message: string 101 }> 102}; 103 104export type textureApiSchema = { 105 success: boolean, 106 url?: string, 107 errors?: Array<{ 108 code: string, 109 message: string 110 }> 111}; 112 113export type gamepassesApiSchema = { 114 gamepasses: Array<{ 115 id: number, 116 asset: { 117 id: number, 118 name: string, 119 description: string, 120 thumbnail: string, 121 price: number, 122 sales: number 123 } 124 }>, 125 pages: number, 126 total: number 127}; 128 129export type ownersApiSchema = { 130 inventories: Array<{ 131 serial: number, 132 purchasedAt: string, 133 user: { 134 id: number, 135 username: string 136 } 137 }>, 138 pages: number, 139 total: number 140};