@fnlb-project/fnbr 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +68 -0
  3. package/dist/enums/Enums.d.ts +251 -0
  4. package/dist/enums/Enums.js +202 -0
  5. package/dist/enums/Enums.js.map +1 -0
  6. package/dist/index.d.ts +92 -0
  7. package/dist/index.js +194 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/resources/AuthClients.d.ts +39 -0
  10. package/dist/resources/AuthClients.js +41 -0
  11. package/dist/resources/AuthClients.js.map +1 -0
  12. package/dist/resources/BaseItemRating.json +5203 -0
  13. package/dist/resources/Endpoints.d.ts +58 -0
  14. package/dist/resources/Endpoints.js +71 -0
  15. package/dist/resources/Endpoints.js.map +1 -0
  16. package/dist/resources/HomebaseRatingMapping.json +255 -0
  17. package/dist/resources/PowerLevelCurves.d.ts +111 -0
  18. package/dist/resources/PowerLevelCurves.js +21 -0
  19. package/dist/resources/PowerLevelCurves.js.map +1 -0
  20. package/dist/resources/SurvivorItemRating.json +9343 -0
  21. package/dist/resources/constants.d.ts +2 -0
  22. package/dist/resources/constants.js +11 -0
  23. package/dist/resources/constants.js.map +1 -0
  24. package/dist/resources/defaultPartyMemberMeta.json +28 -0
  25. package/dist/resources/defaultPartyMeta.json +38 -0
  26. package/dist/resources/enums.d.ts +12 -0
  27. package/dist/resources/enums.js +18 -0
  28. package/dist/resources/enums.js.map +1 -0
  29. package/dist/resources/httpResponses.d.ts +773 -0
  30. package/dist/resources/httpResponses.js +3 -0
  31. package/dist/resources/httpResponses.js.map +1 -0
  32. package/dist/resources/structs.d.ts +1310 -0
  33. package/dist/resources/structs.js +3 -0
  34. package/dist/resources/structs.js.map +1 -0
  35. package/dist/src/Base.d.ts +15 -0
  36. package/dist/src/Base.js +15 -0
  37. package/dist/src/Base.js.map +1 -0
  38. package/dist/src/Client.d.ts +341 -0
  39. package/dist/src/Client.js +1043 -0
  40. package/dist/src/Client.js.map +1 -0
  41. package/dist/src/auth/Auth.d.ts +66 -0
  42. package/dist/src/auth/Auth.js +249 -0
  43. package/dist/src/auth/Auth.js.map +1 -0
  44. package/dist/src/auth/AuthSession.d.ts +41 -0
  45. package/dist/src/auth/AuthSession.js +25 -0
  46. package/dist/src/auth/AuthSession.js.map +1 -0
  47. package/dist/src/auth/EOSAuthSession.d.ts +19 -0
  48. package/dist/src/auth/EOSAuthSession.js +80 -0
  49. package/dist/src/auth/EOSAuthSession.js.map +1 -0
  50. package/dist/src/auth/FortniteAuthSession.d.ts +53 -0
  51. package/dist/src/auth/FortniteAuthSession.js +107 -0
  52. package/dist/src/auth/FortniteAuthSession.js.map +1 -0
  53. package/dist/src/auth/FortniteClientCredentialsAuthSession.d.ts +18 -0
  54. package/dist/src/auth/FortniteClientCredentialsAuthSession.js +88 -0
  55. package/dist/src/auth/FortniteClientCredentialsAuthSession.js.map +1 -0
  56. package/dist/src/auth/LauncherAuthSession.d.ts +23 -0
  57. package/dist/src/auth/LauncherAuthSession.js +120 -0
  58. package/dist/src/auth/LauncherAuthSession.js.map +1 -0
  59. package/dist/src/exceptions/AuthenticationMissingError.d.ts +15 -0
  60. package/dist/src/exceptions/AuthenticationMissingError.js +18 -0
  61. package/dist/src/exceptions/AuthenticationMissingError.js.map +1 -0
  62. package/dist/src/exceptions/CreativeIslandNotFoundError.d.ts +14 -0
  63. package/dist/src/exceptions/CreativeIslandNotFoundError.js +18 -0
  64. package/dist/src/exceptions/CreativeIslandNotFoundError.js.map +1 -0
  65. package/dist/src/exceptions/CreatorCodeNotFoundError.d.ts +14 -0
  66. package/dist/src/exceptions/CreatorCodeNotFoundError.js +18 -0
  67. package/dist/src/exceptions/CreatorCodeNotFoundError.js.map +1 -0
  68. package/dist/src/exceptions/DuplicateFriendshipError.d.ts +14 -0
  69. package/dist/src/exceptions/DuplicateFriendshipError.js +18 -0
  70. package/dist/src/exceptions/DuplicateFriendshipError.js.map +1 -0
  71. package/dist/src/exceptions/EpicgamesAPIError.d.ts +42 -0
  72. package/dist/src/exceptions/EpicgamesAPIError.js +27 -0
  73. package/dist/src/exceptions/EpicgamesAPIError.js.map +1 -0
  74. package/dist/src/exceptions/EventTimeoutError.d.ts +19 -0
  75. package/dist/src/exceptions/EventTimeoutError.js +20 -0
  76. package/dist/src/exceptions/EventTimeoutError.js.map +1 -0
  77. package/dist/src/exceptions/FriendNotFoundError.d.ts +14 -0
  78. package/dist/src/exceptions/FriendNotFoundError.js +18 -0
  79. package/dist/src/exceptions/FriendNotFoundError.js.map +1 -0
  80. package/dist/src/exceptions/FriendshipRequestAlreadySentError.d.ts +14 -0
  81. package/dist/src/exceptions/FriendshipRequestAlreadySentError.js +18 -0
  82. package/dist/src/exceptions/FriendshipRequestAlreadySentError.js.map +1 -0
  83. package/dist/src/exceptions/InviteeFriendshipRequestLimitExceededError.d.ts +14 -0
  84. package/dist/src/exceptions/InviteeFriendshipRequestLimitExceededError.js +18 -0
  85. package/dist/src/exceptions/InviteeFriendshipRequestLimitExceededError.js.map +1 -0
  86. package/dist/src/exceptions/InviteeFriendshipSettingsError.d.ts +14 -0
  87. package/dist/src/exceptions/InviteeFriendshipSettingsError.js +18 -0
  88. package/dist/src/exceptions/InviteeFriendshipSettingsError.js.map +1 -0
  89. package/dist/src/exceptions/InviteeFriendshipsLimitExceededError.d.ts +14 -0
  90. package/dist/src/exceptions/InviteeFriendshipsLimitExceededError.js +18 -0
  91. package/dist/src/exceptions/InviteeFriendshipsLimitExceededError.js.map +1 -0
  92. package/dist/src/exceptions/InviterFriendshipsLimitExceededError.d.ts +14 -0
  93. package/dist/src/exceptions/InviterFriendshipsLimitExceededError.js +18 -0
  94. package/dist/src/exceptions/InviterFriendshipsLimitExceededError.js.map +1 -0
  95. package/dist/src/exceptions/MatchNotFoundError.d.ts +14 -0
  96. package/dist/src/exceptions/MatchNotFoundError.js +18 -0
  97. package/dist/src/exceptions/MatchNotFoundError.js.map +1 -0
  98. package/dist/src/exceptions/OfferNotFoundError.d.ts +14 -0
  99. package/dist/src/exceptions/OfferNotFoundError.js +18 -0
  100. package/dist/src/exceptions/OfferNotFoundError.js.map +1 -0
  101. package/dist/src/exceptions/PartyAlreadyJoinedError.d.ts +7 -0
  102. package/dist/src/exceptions/PartyAlreadyJoinedError.js +14 -0
  103. package/dist/src/exceptions/PartyAlreadyJoinedError.js.map +1 -0
  104. package/dist/src/exceptions/PartyInvitationExpiredError.d.ts +7 -0
  105. package/dist/src/exceptions/PartyInvitationExpiredError.js +14 -0
  106. package/dist/src/exceptions/PartyInvitationExpiredError.js.map +1 -0
  107. package/dist/src/exceptions/PartyMaxSizeReachedError.d.ts +7 -0
  108. package/dist/src/exceptions/PartyMaxSizeReachedError.js +14 -0
  109. package/dist/src/exceptions/PartyMaxSizeReachedError.js.map +1 -0
  110. package/dist/src/exceptions/PartyMemberNotFoundError.d.ts +14 -0
  111. package/dist/src/exceptions/PartyMemberNotFoundError.js +18 -0
  112. package/dist/src/exceptions/PartyMemberNotFoundError.js.map +1 -0
  113. package/dist/src/exceptions/PartyNotFoundError.d.ts +7 -0
  114. package/dist/src/exceptions/PartyNotFoundError.js +14 -0
  115. package/dist/src/exceptions/PartyNotFoundError.js.map +1 -0
  116. package/dist/src/exceptions/PartyPermissionError.d.ts +7 -0
  117. package/dist/src/exceptions/PartyPermissionError.js +14 -0
  118. package/dist/src/exceptions/PartyPermissionError.js.map +1 -0
  119. package/dist/src/exceptions/SendMessageError.d.ts +27 -0
  120. package/dist/src/exceptions/SendMessageError.js +21 -0
  121. package/dist/src/exceptions/SendMessageError.js.map +1 -0
  122. package/dist/src/exceptions/StatsPrivacyError.d.ts +14 -0
  123. package/dist/src/exceptions/StatsPrivacyError.js +18 -0
  124. package/dist/src/exceptions/StatsPrivacyError.js.map +1 -0
  125. package/dist/src/exceptions/StompConnectionError.d.ts +14 -0
  126. package/dist/src/exceptions/StompConnectionError.js +18 -0
  127. package/dist/src/exceptions/StompConnectionError.js.map +1 -0
  128. package/dist/src/exceptions/UserNotFoundError.d.ts +14 -0
  129. package/dist/src/exceptions/UserNotFoundError.js +18 -0
  130. package/dist/src/exceptions/UserNotFoundError.js.map +1 -0
  131. package/dist/src/exceptions/XMPPConnectionError.d.ts +19 -0
  132. package/dist/src/exceptions/XMPPConnectionError.js +19 -0
  133. package/dist/src/exceptions/XMPPConnectionError.js.map +1 -0
  134. package/dist/src/exceptions/XMPPConnectionTimeoutError.d.ts +14 -0
  135. package/dist/src/exceptions/XMPPConnectionTimeoutError.js +18 -0
  136. package/dist/src/exceptions/XMPPConnectionTimeoutError.js.map +1 -0
  137. package/dist/src/http/HTTP.d.ts +40 -0
  138. package/dist/src/http/HTTP.js +124 -0
  139. package/dist/src/http/HTTP.js.map +1 -0
  140. package/dist/src/managers/ChatManager.d.ts +27 -0
  141. package/dist/src/managers/ChatManager.js +71 -0
  142. package/dist/src/managers/ChatManager.js.map +1 -0
  143. package/dist/src/managers/FriendManager.d.ts +66 -0
  144. package/dist/src/managers/FriendManager.js +175 -0
  145. package/dist/src/managers/FriendManager.js.map +1 -0
  146. package/dist/src/managers/STWManager.d.ts +29 -0
  147. package/dist/src/managers/STWManager.js +80 -0
  148. package/dist/src/managers/STWManager.js.map +1 -0
  149. package/dist/src/managers/TournamentManager.d.ts +51 -0
  150. package/dist/src/managers/TournamentManager.js +182 -0
  151. package/dist/src/managers/TournamentManager.js.map +1 -0
  152. package/dist/src/managers/UserManager.d.ts +78 -0
  153. package/dist/src/managers/UserManager.js +216 -0
  154. package/dist/src/managers/UserManager.js.map +1 -0
  155. package/dist/src/stomp/EOSConnect.d.ts +43 -0
  156. package/dist/src/stomp/EOSConnect.js +175 -0
  157. package/dist/src/stomp/EOSConnect.js.map +1 -0
  158. package/dist/src/structures/Avatar.d.ts +27 -0
  159. package/dist/src/structures/Avatar.js +22 -0
  160. package/dist/src/structures/Avatar.js.map +1 -0
  161. package/dist/src/structures/BaseMessage.d.ts +34 -0
  162. package/dist/src/structures/BaseMessage.js +22 -0
  163. package/dist/src/structures/BaseMessage.js.map +1 -0
  164. package/dist/src/structures/CreatorCode.d.ts +31 -0
  165. package/dist/src/structures/CreatorCode.js +22 -0
  166. package/dist/src/structures/CreatorCode.js.map +1 -0
  167. package/dist/src/structures/EpicgamesServerStatus.d.ts +52 -0
  168. package/dist/src/structures/EpicgamesServerStatus.js +31 -0
  169. package/dist/src/structures/EpicgamesServerStatus.js.map +1 -0
  170. package/dist/src/structures/EpicgamesServerStatusComponent.d.ts +67 -0
  171. package/dist/src/structures/EpicgamesServerStatusComponent.js +37 -0
  172. package/dist/src/structures/EpicgamesServerStatusComponent.js.map +1 -0
  173. package/dist/src/structures/EpicgamesServerStatusIncident.d.ts +58 -0
  174. package/dist/src/structures/EpicgamesServerStatusIncident.js +36 -0
  175. package/dist/src/structures/EpicgamesServerStatusIncident.js.map +1 -0
  176. package/dist/src/structures/EpicgamesServerStatusScheduledMainteance.d.ts +21 -0
  177. package/dist/src/structures/EpicgamesServerStatusScheduledMainteance.js +20 -0
  178. package/dist/src/structures/EpicgamesServerStatusScheduledMainteance.js.map +1 -0
  179. package/dist/src/structures/EventTokens.d.ts +32 -0
  180. package/dist/src/structures/EventTokens.js +45 -0
  181. package/dist/src/structures/EventTokens.js.map +1 -0
  182. package/dist/src/structures/FortniteServerStatus.d.ts +46 -0
  183. package/dist/src/structures/FortniteServerStatus.js +26 -0
  184. package/dist/src/structures/FortniteServerStatus.js.map +1 -0
  185. package/dist/src/structures/GlobalProfile.d.ts +36 -0
  186. package/dist/src/structures/GlobalProfile.js +25 -0
  187. package/dist/src/structures/GlobalProfile.js.map +1 -0
  188. package/dist/src/structures/Image.d.ts +36 -0
  189. package/dist/src/structures/Image.js +38 -0
  190. package/dist/src/structures/Image.js.map +1 -0
  191. package/dist/src/structures/NewsMessage.d.ts +56 -0
  192. package/dist/src/structures/NewsMessage.js +45 -0
  193. package/dist/src/structures/NewsMessage.js.map +1 -0
  194. package/dist/src/structures/NewsMessageVideo.d.ts +47 -0
  195. package/dist/src/structures/NewsMessageVideo.js +32 -0
  196. package/dist/src/structures/NewsMessageVideo.js.map +1 -0
  197. package/dist/src/structures/RadioStation.d.ts +31 -0
  198. package/dist/src/structures/RadioStation.js +33 -0
  199. package/dist/src/structures/RadioStation.js.map +1 -0
  200. package/dist/src/structures/Stats.d.ts +45 -0
  201. package/dist/src/structures/Stats.js +109 -0
  202. package/dist/src/structures/Stats.js.map +1 -0
  203. package/dist/src/structures/Tournament.d.ts +86 -0
  204. package/dist/src/structures/Tournament.js +64 -0
  205. package/dist/src/structures/Tournament.js.map +1 -0
  206. package/dist/src/structures/TournamentWindow.d.ts +124 -0
  207. package/dist/src/structures/TournamentWindow.js +52 -0
  208. package/dist/src/structures/TournamentWindow.js.map +1 -0
  209. package/dist/src/structures/friend/BaseFriendMessage.d.ts +32 -0
  210. package/dist/src/structures/friend/BaseFriendMessage.js +28 -0
  211. package/dist/src/structures/friend/BaseFriendMessage.js.map +1 -0
  212. package/dist/src/structures/friend/BasePendingFriend.d.ts +22 -0
  213. package/dist/src/structures/friend/BasePendingFriend.js +22 -0
  214. package/dist/src/structures/friend/BasePendingFriend.js.map +1 -0
  215. package/dist/src/structures/friend/Friend.d.ts +106 -0
  216. package/dist/src/structures/friend/Friend.js +97 -0
  217. package/dist/src/structures/friend/Friend.js.map +1 -0
  218. package/dist/src/structures/friend/FriendPresence.d.ts +84 -0
  219. package/dist/src/structures/friend/FriendPresence.js +48 -0
  220. package/dist/src/structures/friend/FriendPresence.js.map +1 -0
  221. package/dist/src/structures/friend/IncomingPendingFriend.d.ts +27 -0
  222. package/dist/src/structures/friend/IncomingPendingFriend.js +36 -0
  223. package/dist/src/structures/friend/IncomingPendingFriend.js.map +1 -0
  224. package/dist/src/structures/friend/OutgoingPendingFriend.d.ts +17 -0
  225. package/dist/src/structures/friend/OutgoingPendingFriend.js +24 -0
  226. package/dist/src/structures/friend/OutgoingPendingFriend.js.map +1 -0
  227. package/dist/src/structures/friend/ReceivedFriendMessage.d.ts +27 -0
  228. package/dist/src/structures/friend/ReceivedFriendMessage.js +27 -0
  229. package/dist/src/structures/friend/ReceivedFriendMessage.js.map +1 -0
  230. package/dist/src/structures/friend/SentFriendMessage.d.ts +21 -0
  231. package/dist/src/structures/friend/SentFriendMessage.js +19 -0
  232. package/dist/src/structures/friend/SentFriendMessage.js.map +1 -0
  233. package/dist/src/structures/party/BasePartyInvitation.d.ts +48 -0
  234. package/dist/src/structures/party/BasePartyInvitation.js +33 -0
  235. package/dist/src/structures/party/BasePartyInvitation.js.map +1 -0
  236. package/dist/src/structures/party/BasePartyJoinRequest.d.ts +37 -0
  237. package/dist/src/structures/party/BasePartyJoinRequest.js +30 -0
  238. package/dist/src/structures/party/BasePartyJoinRequest.js.map +1 -0
  239. package/dist/src/structures/party/ClientParty.d.ts +162 -0
  240. package/dist/src/structures/party/ClientParty.js +412 -0
  241. package/dist/src/structures/party/ClientParty.js.map +1 -0
  242. package/dist/src/structures/party/ClientPartyMember.d.ts +144 -0
  243. package/dist/src/structures/party/ClientPartyMember.js +463 -0
  244. package/dist/src/structures/party/ClientPartyMember.js.map +1 -0
  245. package/dist/src/structures/party/ClientPartyMemberMeta.d.ts +18 -0
  246. package/dist/src/structures/party/ClientPartyMemberMeta.js +54 -0
  247. package/dist/src/structures/party/ClientPartyMemberMeta.js.map +1 -0
  248. package/dist/src/structures/party/ClientPartyMeta.d.ts +23 -0
  249. package/dist/src/structures/party/ClientPartyMeta.js +59 -0
  250. package/dist/src/structures/party/ClientPartyMeta.js.map +1 -0
  251. package/dist/src/structures/party/Party.d.ts +95 -0
  252. package/dist/src/structures/party/Party.js +200 -0
  253. package/dist/src/structures/party/Party.js.map +1 -0
  254. package/dist/src/structures/party/PartyChat.d.ts +73 -0
  255. package/dist/src/structures/party/PartyChat.js +76 -0
  256. package/dist/src/structures/party/PartyChat.js.map +1 -0
  257. package/dist/src/structures/party/PartyMember.d.ts +139 -0
  258. package/dist/src/structures/party/PartyMember.js +201 -0
  259. package/dist/src/structures/party/PartyMember.js.map +1 -0
  260. package/dist/src/structures/party/PartyMemberConfirmation.d.ts +43 -0
  261. package/dist/src/structures/party/PartyMemberConfirmation.js +53 -0
  262. package/dist/src/structures/party/PartyMemberConfirmation.js.map +1 -0
  263. package/dist/src/structures/party/PartyMemberMeta.d.ts +76 -0
  264. package/dist/src/structures/party/PartyMemberMeta.js +145 -0
  265. package/dist/src/structures/party/PartyMemberMeta.js.map +1 -0
  266. package/dist/src/structures/party/PartyMessage.d.ts +30 -0
  267. package/dist/src/structures/party/PartyMessage.js +28 -0
  268. package/dist/src/structures/party/PartyMessage.js.map +1 -0
  269. package/dist/src/structures/party/PartyMeta.d.ts +24 -0
  270. package/dist/src/structures/party/PartyMeta.js +43 -0
  271. package/dist/src/structures/party/PartyMeta.js.map +1 -0
  272. package/dist/src/structures/party/PresenceParty.d.ts +66 -0
  273. package/dist/src/structures/party/PresenceParty.js +49 -0
  274. package/dist/src/structures/party/PresenceParty.js.map +1 -0
  275. package/dist/src/structures/party/ReceivedPartyInvitation.d.ts +33 -0
  276. package/dist/src/structures/party/ReceivedPartyInvitation.js +54 -0
  277. package/dist/src/structures/party/ReceivedPartyInvitation.js.map +1 -0
  278. package/dist/src/structures/party/ReceivedPartyJoinRequest.d.ts +26 -0
  279. package/dist/src/structures/party/ReceivedPartyJoinRequest.js +31 -0
  280. package/dist/src/structures/party/ReceivedPartyJoinRequest.js.map +1 -0
  281. package/dist/src/structures/party/SentPartyInvitation.d.ts +27 -0
  282. package/dist/src/structures/party/SentPartyInvitation.js +39 -0
  283. package/dist/src/structures/party/SentPartyInvitation.js.map +1 -0
  284. package/dist/src/structures/party/SentPartyJoinRequest.d.ts +19 -0
  285. package/dist/src/structures/party/SentPartyJoinRequest.js +22 -0
  286. package/dist/src/structures/party/SentPartyJoinRequest.js.map +1 -0
  287. package/dist/src/structures/stw/STWHero.d.ts +61 -0
  288. package/dist/src/structures/stw/STWHero.js +38 -0
  289. package/dist/src/structures/stw/STWHero.js.map +1 -0
  290. package/dist/src/structures/stw/STWHeroLoadout.d.ts +44 -0
  291. package/dist/src/structures/stw/STWHeroLoadout.js +34 -0
  292. package/dist/src/structures/stw/STWHeroLoadout.js.map +1 -0
  293. package/dist/src/structures/stw/STWItem.d.ts +31 -0
  294. package/dist/src/structures/stw/STWItem.js +23 -0
  295. package/dist/src/structures/stw/STWItem.js.map +1 -0
  296. package/dist/src/structures/stw/STWLocker.d.ts +32 -0
  297. package/dist/src/structures/stw/STWLocker.js +26 -0
  298. package/dist/src/structures/stw/STWLocker.js.map +1 -0
  299. package/dist/src/structures/stw/STWMeleeWeaponSchematic.d.ts +14 -0
  300. package/dist/src/structures/stw/STWMeleeWeaponSchematic.js +15 -0
  301. package/dist/src/structures/stw/STWMeleeWeaponSchematic.js.map +1 -0
  302. package/dist/src/structures/stw/STWNewsMessage.d.ts +42 -0
  303. package/dist/src/structures/stw/STWNewsMessage.js +27 -0
  304. package/dist/src/structures/stw/STWNewsMessage.js.map +1 -0
  305. package/dist/src/structures/stw/STWProfile.d.ts +132 -0
  306. package/dist/src/structures/stw/STWProfile.js +283 -0
  307. package/dist/src/structures/stw/STWProfile.js.map +1 -0
  308. package/dist/src/structures/stw/STWRangedWeaponSchematic.d.ts +14 -0
  309. package/dist/src/structures/stw/STWRangedWeaponSchematic.js +15 -0
  310. package/dist/src/structures/stw/STWRangedWeaponSchematic.js.map +1 -0
  311. package/dist/src/structures/stw/STWResource.d.ts +27 -0
  312. package/dist/src/structures/stw/STWResource.js +22 -0
  313. package/dist/src/structures/stw/STWResource.js.map +1 -0
  314. package/dist/src/structures/stw/STWSchematic.d.ts +72 -0
  315. package/dist/src/structures/stw/STWSchematic.js +40 -0
  316. package/dist/src/structures/stw/STWSchematic.js.map +1 -0
  317. package/dist/src/structures/stw/STWStats.d.ts +103 -0
  318. package/dist/src/structures/stw/STWStats.js +85 -0
  319. package/dist/src/structures/stw/STWStats.js.map +1 -0
  320. package/dist/src/structures/stw/STWSurvivor.d.ts +104 -0
  321. package/dist/src/structures/stw/STWSurvivor.js +76 -0
  322. package/dist/src/structures/stw/STWSurvivor.js.map +1 -0
  323. package/dist/src/structures/stw/STWTeamPerk.d.ts +19 -0
  324. package/dist/src/structures/stw/STWTeamPerk.js +20 -0
  325. package/dist/src/structures/stw/STWTeamPerk.js.map +1 -0
  326. package/dist/src/structures/stw/STWTrapSchematic.d.ts +15 -0
  327. package/dist/src/structures/stw/STWTrapSchematic.js +16 -0
  328. package/dist/src/structures/stw/STWTrapSchematic.js.map +1 -0
  329. package/dist/src/structures/stw/STWWeaponSchematic.d.ts +15 -0
  330. package/dist/src/structures/stw/STWWeaponSchematic.js +16 -0
  331. package/dist/src/structures/stw/STWWeaponSchematic.js.map +1 -0
  332. package/dist/src/structures/user/BlockedUser.d.ts +13 -0
  333. package/dist/src/structures/user/BlockedUser.js +19 -0
  334. package/dist/src/structures/user/BlockedUser.js.map +1 -0
  335. package/dist/src/structures/user/ClientUser.d.ts +78 -0
  336. package/dist/src/structures/user/ClientUser.js +34 -0
  337. package/dist/src/structures/user/ClientUser.js.map +1 -0
  338. package/dist/src/structures/user/User.d.ts +98 -0
  339. package/dist/src/structures/user/User.js +130 -0
  340. package/dist/src/structures/user/User.js.map +1 -0
  341. package/dist/src/structures/user/UserSearchResult.d.ts +31 -0
  342. package/dist/src/structures/user/UserSearchResult.js +23 -0
  343. package/dist/src/structures/user/UserSearchResult.js.map +1 -0
  344. package/dist/src/util/AsyncLock.d.ts +28 -0
  345. package/dist/src/util/AsyncLock.js +44 -0
  346. package/dist/src/util/AsyncLock.js.map +1 -0
  347. package/dist/src/util/BinaryWriter.d.ts +79 -0
  348. package/dist/src/util/BinaryWriter.js +136 -0
  349. package/dist/src/util/BinaryWriter.js.map +1 -0
  350. package/dist/src/util/CurveTable.d.ts +24 -0
  351. package/dist/src/util/CurveTable.js +37 -0
  352. package/dist/src/util/CurveTable.js.map +1 -0
  353. package/dist/src/util/Meta.d.ts +41 -0
  354. package/dist/src/util/Meta.js +73 -0
  355. package/dist/src/util/Meta.js.map +1 -0
  356. package/dist/src/util/Util.d.ts +162 -0
  357. package/dist/src/util/Util.js +539 -0
  358. package/dist/src/util/Util.js.map +1 -0
  359. package/dist/src/xmpp/XMPP.d.ts +100 -0
  360. package/dist/src/xmpp/XMPP.js +702 -0
  361. package/dist/src/xmpp/XMPP.js.map +1 -0
  362. package/dist/tsconfig.tsbuildinfo +1 -0
  363. package/package.json +66 -0
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const STWItem_1 = tslib_1.__importDefault(require("./STWItem"));
5
+ /**
6
+ * Represents a Save The World profile's resource
7
+ */
8
+ class STWResource extends STWItem_1.default {
9
+ /**
10
+ * @param client The main client
11
+ * @param id The item ID
12
+ * @param data The resource data
13
+ */
14
+ constructor(client, id, data) {
15
+ super(client, id, data);
16
+ this.resourceId = data.templateId.split(':')[1];
17
+ this.isSeen = data.attributes.item_seen;
18
+ this.isFavorite = data.attributes.favorite;
19
+ }
20
+ }
21
+ exports.default = STWResource;
22
+ //# sourceMappingURL=STWResource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"STWResource.js","sourceRoot":"","sources":["../../../../src/structures/stw/STWResource.ts"],"names":[],"mappings":";;;AAAA,gEAAgC;AAIhC;;GAEG;AACH,MAAM,WAAY,SAAQ,iBAAO;IAgB/B;;;;OAIG;IACH,YAAY,MAAc,EAAE,EAAU,EAAE,IAA4B;QAClE,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;QAExB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC;QAEjD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;QACxC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;IAC7C,CAAC;CACF;AAED,kBAAe,WAAW,CAAC"}
@@ -0,0 +1,72 @@
1
+ import STWItem from './STWItem';
2
+ import type { STWProfileSchematicData } from '../../../resources/httpResponses';
3
+ import type { STWItemRarity, STWItemTier, STWSchematicEvoType, STWSchematicMeleeSubType, STWSchematicRangedSubType, STWSchematicTrapSubType, STWSchematicType } from '../../../resources/structs';
4
+ import type Client from '../../Client';
5
+ /**
6
+ * Represents a Save The World profile's schematic
7
+ */
8
+ declare class STWSchematic extends STWItem {
9
+ /**
10
+ * The schematic's type (ranged, melee, or trap)
11
+ */
12
+ type: STWSchematicType;
13
+ /**
14
+ * The schematic's subtype (specific type of ranged/melee weapon or trap)
15
+ */
16
+ subType?: STWSchematicRangedSubType | STWSchematicMeleeSubType | STWSchematicTrapSubType;
17
+ /**
18
+ * The schematic's name
19
+ */
20
+ name?: string;
21
+ /**
22
+ * The schematic's tier
23
+ */
24
+ tier?: STWItemTier;
25
+ /**
26
+ * The schematic's evolution type
27
+ */
28
+ evoType?: STWSchematicEvoType;
29
+ /**
30
+ * The schematic's rarity
31
+ */
32
+ rarity?: STWItemRarity;
33
+ /**
34
+ * The schematic's level
35
+ */
36
+ level: number;
37
+ /**
38
+ * The schematic's max level bonus
39
+ */
40
+ maxLevelBonus: number;
41
+ /**
42
+ * The schematic's xp
43
+ */
44
+ xp: number;
45
+ /**
46
+ * Whether the schematic is marked as seen
47
+ */
48
+ isSeen: boolean;
49
+ /**
50
+ * Whether the schematic is marked as favorite
51
+ */
52
+ isFavorite: boolean;
53
+ /**
54
+ * Whether the schematic is marked as refundable
55
+ */
56
+ isRefundable: boolean;
57
+ /**
58
+ * The schematic's perks
59
+ */
60
+ alterations: string[];
61
+ /**
62
+ * The original rarities of the schematic's perks, before any upgrades
63
+ */
64
+ alterationBaseRarities: string[];
65
+ constructor(client: Client, id: string, data: STWProfileSchematicData);
66
+ /**
67
+ * The schematic's power level.
68
+ * Depends on the tier, level, and rarity value
69
+ */
70
+ get powerLevel(): number;
71
+ }
72
+ export default STWSchematic;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const Util_1 = require("../../util/Util");
5
+ const STWItem_1 = tslib_1.__importDefault(require("./STWItem"));
6
+ /**
7
+ * Represents a Save The World profile's schematic
8
+ */
9
+ class STWSchematic extends STWItem_1.default {
10
+ constructor(client, id, data) {
11
+ super(client, id, data);
12
+ const parsedSchematic = (0, Util_1.parseSTWSchematicTemplateId)(data.templateId);
13
+ this.type = parsedSchematic.type;
14
+ this.subType = parsedSchematic.subType;
15
+ this.name = parsedSchematic.name;
16
+ this.tier = parsedSchematic.tier;
17
+ this.evoType = parsedSchematic.evoType;
18
+ this.rarity = parsedSchematic.rarity;
19
+ this.level = data.attributes.level;
20
+ this.maxLevelBonus = data.attributes.max_level_bonus;
21
+ this.xp = data.attributes.xp;
22
+ this.isSeen = data.attributes.item_seen;
23
+ this.isFavorite = data.attributes.favorite;
24
+ this.isRefundable = data.attributes.refundable;
25
+ this.alterations = data.attributes.alterations;
26
+ this.alterationBaseRarities = data.attributes.alteration_base_rarities;
27
+ }
28
+ /**
29
+ * The schematic's power level.
30
+ * Depends on the tier, level, and rarity value
31
+ */
32
+ get powerLevel() {
33
+ if (!this.rarity || !this.tier) {
34
+ return 1;
35
+ }
36
+ return (0, Util_1.calcSTWNonSurvivorPowerLevel)(this.rarity, this.level, this.tier);
37
+ }
38
+ }
39
+ exports.default = STWSchematic;
40
+ //# sourceMappingURL=STWSchematic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"STWSchematic.js","sourceRoot":"","sources":["../../../../src/structures/stw/STWSchematic.ts"],"names":[],"mappings":";;;AAAA,0CAA4F;AAC5F,gEAAgC;AAUhC;;GAEG;AACH,MAAM,YAAa,SAAQ,iBAAO;IAuEhC,YAAY,MAAc,EAAE,EAAU,EAAE,IAA6B;QACnE,KAAK,CAAC,MAAM,EAAE,EA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AC;IAC1E,CAAC;CACF;AAED,kBAAe,YAAY,CAAC"}
@@ -0,0 +1,103 @@
1
+ import Base from '../../Base';
2
+ import type Client from '../../Client';
3
+ import type { STWProfileStatsData } from '../../../resources/httpResponses';
4
+ import type { STWStatsNodeCostsData, STWStatsBRLoadoutData, STWStatsSTWLoadoutData, STWStatsMissionAlertRedemptionData, STWStatsQuestData, STWStatsGameplayStatData, STWStatsClientSettingsData, STWStatsResearchLevelsData, STWStatsDailyRewardsData, STWStatsEventCurrencyData, STWStatsXPData } from '../../../resources/structs';
5
+ /**
6
+ * Represents a Save The World profile's stats
7
+ */
8
+ declare class STWStats extends Base {
9
+ /**
10
+ * The profile's node costs
11
+ */
12
+ nodeCosts: STWStatsNodeCostsData;
13
+ /**
14
+ * The profile's Save The World loadout data
15
+ */
16
+ stwLoadout: STWStatsSTWLoadoutData;
17
+ /**
18
+ * The profile's Battle Royale loadout data
19
+ */
20
+ brLoadout: STWStatsBRLoadoutData;
21
+ /**
22
+ * The profile's mission alert redemption record
23
+ */
24
+ missionAlertRedemptionRecord?: STWStatsMissionAlertRedemptionData[];
25
+ /**
26
+ * The profile's amount of rewards claimed post max level
27
+ */
28
+ rewardsClaimedPostMaxLevel: number;
29
+ /**
30
+ * The profile's collection book max XP level
31
+ */
32
+ collectionBookMaxXPLevel?: number;
33
+ /**
34
+ * Whether the profile has claimed the MFA reward
35
+ */
36
+ mfaRewardClaimed: boolean;
37
+ /**
38
+ * The profile's quests data
39
+ */
40
+ quests?: STWStatsQuestData;
41
+ /**
42
+ * The profile's amount of legacy research points spent
43
+ */
44
+ legacyResearchPointsSpent: number;
45
+ /**
46
+ * The profile's gameplay stats
47
+ */
48
+ gameplayStats: STWStatsGameplayStatData[];
49
+ /**
50
+ * The profile's unslot mtx spend
51
+ */
52
+ unslotMtxSpend: number;
53
+ /**
54
+ * The profile's client settings
55
+ */
56
+ clientSettings: STWStatsClientSettingsData;
57
+ /**
58
+ * The profile's research levels
59
+ */
60
+ researchLevels?: STWStatsResearchLevelsData;
61
+ /**
62
+ * The profile's level (max is 310)
63
+ */
64
+ level: number;
65
+ /**
66
+ * The profile's latent XP marker
67
+ */
68
+ latentXpMarker: string;
69
+ /**
70
+ * The profile's event currency
71
+ */
72
+ eventCurrency?: STWStatsEventCurrencyData;
73
+ /**
74
+ * The profile's inventory limit bonus
75
+ */
76
+ inventoryLimitBonus: number;
77
+ /**
78
+ * The profile's amount of matches played
79
+ */
80
+ matchesPlayed: number;
81
+ /**
82
+ * The profile's xp data
83
+ */
84
+ xp: STWStatsXPData;
85
+ /**
86
+ * The profile's daily rewards data
87
+ */
88
+ dailyRewards?: STWStatsDailyRewardsData;
89
+ /**
90
+ * The profile's amount of packs granted
91
+ */
92
+ packsGranted: number;
93
+ /**
94
+ * @param client The main client
95
+ * @param data The stats data
96
+ */
97
+ constructor(client: Client, data: STWProfileStatsData);
98
+ /**
99
+ * The profile's actual account level (ignoring the max level cap of 310)
100
+ */
101
+ get actualLevel(): number;
102
+ }
103
+ export default STWStats;
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const Base_1 = tslib_1.__importDefault(require("../../Base"));
5
+ /**
6
+ * Represents a Save The World profile's stats
7
+ */
8
+ class STWStats extends Base_1.default {
9
+ /**
10
+ * @param client The main client
11
+ * @param data The stats data
12
+ */
13
+ constructor(client, data) {
14
+ var _a, _b, _c, _d, _e, _f;
15
+ super(client);
16
+ this.nodeCosts = data.node_costs;
17
+ this.stwLoadout = {
18
+ selectedHeroLoadout: data.selected_hero_loadout,
19
+ modeLoadouts: data.mode_loadouts,
20
+ activeLoadoutIndex: data.active_loadout_index,
21
+ };
22
+ this.brLoadout = {
23
+ loadouts: data.loadouts,
24
+ lastAppliedLoadout: data.last_applied_loadout,
25
+ useRandomLoadout: data.use_random_loadout,
26
+ };
27
+ this.missionAlertRedemptionRecord = (_a = data.mission_alert_redemption_record.claimData) === null || _a === void 0 ? void 0 : _a.map((d) => ({
28
+ missionAlertId: d.missionAlertId,
29
+ redemptionDateUtc: new Date(d.redemptionDateUtc),
30
+ evictClaimDataAfterUtc: new Date(d.evictClaimDataAfterUtc),
31
+ }));
32
+ this.rewardsClaimedPostMaxLevel = data.rewards_claimed_post_max_level || 0;
33
+ this.collectionBookMaxXPLevel = (_b = data.collection_book) === null || _b === void 0 ? void 0 : _b.maxBookXpLevelAchieved;
34
+ this.mfaRewardClaimed = data.mfa_reward_claimed;
35
+ this.quests = ((_c = data.quest_manager) === null || _c === void 0 ? void 0 : _c.questPoolStats) ? {
36
+ dailyLoginInterval: new Date(data.quest_manager.dailyLoginInterval),
37
+ dailyQuestRerolls: data.quest_manager.dailyQuestRerolls,
38
+ poolStats: {
39
+ stats: data.quest_manager.questPoolStats.poolStats.map((d) => ({
40
+ poolName: d.poolName,
41
+ nextRefresh: new Date(d.nextRefresh),
42
+ rerollsRemaining: d.rerollsRemaining,
43
+ questHistory: d.questHistory,
44
+ })),
45
+ dailyLoginInterval: new Date(data.quest_manager.questPoolStats.dailyLoginInterval),
46
+ lockouts: ((_d = data.quest_manager.questPoolStats.poolLockouts) === null || _d === void 0 ? void 0 : _d.poolLockouts) || [],
47
+ },
48
+ } : undefined;
49
+ this.legacyResearchPointsSpent = data.legacy_research_points_spent;
50
+ this.gameplayStats = data.gameplay_stats;
51
+ this.unslotMtxSpend = data.unslot_mtx_spend;
52
+ this.clientSettings = data.client_settings;
53
+ this.researchLevels = typeof ((_e = data.research_levels) === null || _e === void 0 ? void 0 : _e.fortitude) === 'number' ? {
54
+ fortitude: data.research_levels.fortitude,
55
+ resistance: data.research_levels.resistance,
56
+ technology: data.research_levels.technology,
57
+ offense: data.research_levels.offense,
58
+ } : undefined;
59
+ this.level = data.level || 0;
60
+ this.latentXpMarker = data.latent_xp_marker;
61
+ this.eventCurrency = data.event_currency;
62
+ this.inventoryLimitBonus = data.inventory_limit_bonus;
63
+ this.matchesPlayed = data.matches_played;
64
+ this.xp = {
65
+ total: data.xp,
66
+ overflow: data.xp_overflow,
67
+ lost: data.xp_lost,
68
+ };
69
+ this.dailyRewards = ((_f = data.daily_rewards) === null || _f === void 0 ? void 0 : _f.lastClaimDate) ? {
70
+ nextDefaultReward: data.daily_rewards.nextDefaultReward,
71
+ totalDaysLoggedIn: data.daily_rewards.totalDaysLoggedIn,
72
+ lastClaimDate: new Date(data.daily_rewards.lastClaimDate),
73
+ additionalSchedules: data.daily_rewards.additionalSchedules,
74
+ } : undefined;
75
+ this.packsGranted = data.packs_granted;
76
+ }
77
+ /**
78
+ * The profile's actual account level (ignoring the max level cap of 310)
79
+ */
80
+ get actualLevel() {
81
+ return this.level + this.rewardsClaimedPostMaxLevel;
82
+ }
83
+ }
84
+ exports.default = STWStats;
85
+ //# sourceMappingURL=STWStats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"STWStats.js","sourceRoot":"","sources":["../../../../src/structures/stw/STWStats.ts"],"names":[],"mappings":";;;AAAA,8DAA8B;AAU9B;;GAEG;AACH,MAAM,QAAS,SAAQ,cAAI;IA0GzB;;;OAGG;IACH,YAAY,MAAc,EAAE,IAAyB;;QACnD,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;QAEjC,IAAI,CAAC,UAAU,GAAG;YAChB,mBAAmB,EAAE,IAAI,CAAC,qBAAqB;YAC/C,YAAY,EAAE,IAAI,CAAC,aAAa;YAChC,kBAAkB,EAAE,IAAI,CAAC,oBAAoB;SAC9C,CAAC;QAEF,IAAI,CAAC,SAAS,GAAG;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,kBAAkB,EAAE,IAAI,CAAC,oBAAoB;YAC7C,gBAAgB,EAAE,IAAI,CAAC,kBAAkB;SAC1C,CAAC;QAEF,IAAI,CAAC,4BAA4B,GAAG,MAAA,IAAI,CAAC,+BAA+B,CAAC,SAAS,0CAAE,GAAG,CAAC,CAAC,CAAC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I,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC;YACzD,mBAAmB,EAAE,IAAI,CAAC,aAAa,CAAC,mBAAoB;SAC7D,CAAC,CAAC,CAAC,SAAS,CAAC;QAEd,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,0BAA0B,CAAC;IACtD,CAAC;CACF;AAED,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,104 @@
1
+ import STWItem from './STWItem';
2
+ import type Client from '../../Client';
3
+ import type { STWSurvivorSquadData, STWSurvivorType, STWItemRarity, STWSurvivorGender, STWItemTier } from '../../../resources/structs';
4
+ import type { STWProfileSurvivorData } from '../../../resources/httpResponses';
5
+ /**
6
+ * Represents a Save The World profile's survivor
7
+ */
8
+ declare class STWSurvivor extends STWItem {
9
+ /**
10
+ * The survivor's type.
11
+ * Special means it's from an event (eg. halloween).
12
+ * Manager means it's a lead survivor
13
+ */
14
+ type: STWSurvivorType;
15
+ /**
16
+ * The survivor's name (will be undefined for basic survivors)
17
+ */
18
+ name?: string;
19
+ /**
20
+ * The survivor's tier
21
+ */
22
+ tier: STWItemTier;
23
+ /**
24
+ * The survivor's rarity
25
+ */
26
+ rarity: STWItemRarity;
27
+ /**
28
+ * The survivor's manager synergy
29
+ */
30
+ managerSynergy?: string;
31
+ /**
32
+ * The survivor's gender
33
+ */
34
+ gender: STWSurvivorGender;
35
+ /**
36
+ * The survivor's level
37
+ */
38
+ level: number;
39
+ /**
40
+ * The survivor's squad information.
41
+ * Will be undefined if the survivor is not part of a squad
42
+ */
43
+ squad?: STWSurvivorSquadData;
44
+ /**
45
+ * The survivor's portrait ID
46
+ */
47
+ portrait?: string;
48
+ /**
49
+ * The survivor's max level bonus
50
+ */
51
+ maxLevelBonus: number;
52
+ /**
53
+ * The survivor's personality
54
+ */
55
+ personality: string;
56
+ /**
57
+ * The survivor's XP
58
+ */
59
+ xp: number;
60
+ /**
61
+ * The survivor's equipped building's ID.
62
+ * Seems to be unused by the game
63
+ */
64
+ buildingSlotBuildingId?: string;
65
+ /**
66
+ * The survivor's set bonus
67
+ */
68
+ setBonus: string;
69
+ /**
70
+ * Whether the survivor is marked as seen
71
+ */
72
+ isSeen: boolean;
73
+ /**
74
+ * Whether the survivor is marked as favorite
75
+ */
76
+ isFavorite: boolean;
77
+ /**
78
+ * @param client The main client
79
+ * @param id The item ID
80
+ * @param data The survivors's data
81
+ */
82
+ constructor(client: Client, id: string, data: STWProfileSurvivorData);
83
+ /**
84
+ * Whether the survivor is a leader
85
+ */
86
+ get isLeader(): boolean;
87
+ /**
88
+ * The survivor's power level.
89
+ * Depends on the tier, level, rarity value and whether the survivor is a leader
90
+ */
91
+ get powerLevel(): number;
92
+ /**
93
+ * The survivor's lead bonus.
94
+ * Will return 0 if the survivor is not a leader or not part of a squad
95
+ */
96
+ get leadBonus(): number;
97
+ /**
98
+ * Calculates the survivor's bonus.
99
+ * Depends on the leader's rarity and personality.
100
+ * Returns 0 if the survivor is a leader
101
+ */
102
+ calcSurvivorBonus(leader: STWSurvivor): 0 | 2 | 4 | 8 | 3 | 5 | -2;
103
+ }
104
+ export default STWSurvivor;
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const STWItem_1 = tslib_1.__importDefault(require("./STWItem"));
5
+ const Util_1 = require("../../util/Util");
6
+ /**
7
+ * Represents a Save The World profile's survivor
8
+ */
9
+ class STWSurvivor extends STWItem_1.default {
10
+ /**
11
+ * @param client The main client
12
+ * @param id The item ID
13
+ * @param data The survivors's data
14
+ */
15
+ constructor(client, id, data) {
16
+ super(client, id, data);
17
+ const parsedSurvivor = (0, Util_1.parseSTWSurvivorTemplateId)(data.templateId);
18
+ this.type = parsedSurvivor.type;
19
+ this.name = parsedSurvivor.name;
20
+ this.tier = parsedSurvivor.tier;
21
+ this.rarity = parsedSurvivor.rarity;
22
+ this.managerSynergy = data.attributes.managerSynergy;
23
+ this.gender = data.attributes.gender === '1' ? 'male' : 'female';
24
+ this.level = data.attributes.level;
25
+ this.squad = data.attributes.squad_id ? {
26
+ id: data.attributes.squad_id,
27
+ name: data.attributes.squad_id.split('_')[3],
28
+ type: data.attributes.squad_id.split('_')[2],
29
+ slotIdx: data.attributes.squad_slot_idx,
30
+ } : undefined;
31
+ this.portrait = data.attributes.portrait;
32
+ this.maxLevelBonus = data.attributes.max_level_bonus;
33
+ this.personality = data.attributes.personality;
34
+ this.xp = data.attributes.xp;
35
+ this.buildingSlotBuildingId = data.attributes.building_slot_used !== -1 ? data.attributes.slotted_building_id : undefined;
36
+ this.setBonus = data.attributes.set_bonus;
37
+ this.isSeen = data.attributes.item_seen;
38
+ this.isFavorite = data.attributes.favorite;
39
+ }
40
+ /**
41
+ * Whether the survivor is a leader
42
+ */
43
+ get isLeader() {
44
+ return this.type === 'manager';
45
+ }
46
+ /**
47
+ * The survivor's power level.
48
+ * Depends on the tier, level, rarity value and whether the survivor is a leader
49
+ */
50
+ get powerLevel() {
51
+ return (0, Util_1.calcSTWSurvivorPowerLevel)(this.rarity, this.isLeader, this.level, this.tier);
52
+ }
53
+ /**
54
+ * The survivor's lead bonus.
55
+ * Will return 0 if the survivor is not a leader or not part of a squad
56
+ */
57
+ get leadBonus() {
58
+ if (!this.managerSynergy || !this.squad)
59
+ return 0;
60
+ return (0, Util_1.calcSTWSurvivorLeadBonus)(this.managerSynergy, this.squad.name, this.powerLevel);
61
+ }
62
+ /**
63
+ * Calculates the survivor's bonus.
64
+ * Depends on the leader's rarity and personality.
65
+ * Returns 0 if the survivor is a leader
66
+ */
67
+ calcSurvivorBonus(leader) {
68
+ if (this.isLeader)
69
+ return 0;
70
+ if (!leader.isLeader)
71
+ throw new Error('The leader survivor must be a leader');
72
+ return (0, Util_1.calcSTWSurvivorBonus)(leader.personality, leader.rarity, this.personality, this.powerLevel);
73
+ }
74
+ }
75
+ exports.default = STWSurvivor;
76
+ //# sourceMappingURL=STWSurvivor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"STWSurvivor.js","sourceRoot":"","sources":["../../../../src/structures/stw/STWSurvivor.ts"],"names":[],"mappings":";;;AAAA,gEAAgC;AAChC,0CAIyB;AAQzB;;GAEG;AACH,MAAM,WAAY,SAAQ,iBAAO;IAqF/B;;;;OAIG;IACH,YAAY,MAAc,EAAE,EAAU,EAAE,IAA4B;QAClE,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;QAExB,MAAM,cAAc,GAAG,IAAA,iCAA0B,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAEnE,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC;QAChC,IAAI,CAAC,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC;QAEpC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC;QAErD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;QACjE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QAEnC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;YACtC,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ;YAC5B,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAA4B;YACvE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,C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,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACzF,CAAC;IAED;;;;OAIG;IACI,iBAAiB,CAAC,MAAmB;QAC1C,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAE9E,OAAO,IAAA,2BAAoB,EAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACpG,CAAC;CACF;AAED,kBAAe,WAAW,CAAC"}
@@ -0,0 +1,19 @@
1
+ import STWItem from './STWItem';
2
+ import type { STWProfileItemData } from '../../../resources/httpResponses';
3
+ import type Client from '../../Client';
4
+ /**
5
+ * Represents a Save The World profile's team perk
6
+ */
7
+ declare class STWTeamPerk extends STWItem {
8
+ /**
9
+ * The team perk's ID
10
+ */
11
+ teamPerkId: string;
12
+ /**
13
+ * @param client The main client
14
+ * @param id The item ID
15
+ * @param data The team perk data
16
+ */
17
+ constructor(client: Client, id: string, data: STWProfileItemData);
18
+ }
19
+ export default STWTeamPerk;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const STWItem_1 = tslib_1.__importDefault(require("./STWItem"));
5
+ /**
6
+ * Represents a Save The World profile's team perk
7
+ */
8
+ class STWTeamPerk extends STWItem_1.default {
9
+ /**
10
+ * @param client The main client
11
+ * @param id The item ID
12
+ * @param data The team perk data
13
+ */
14
+ constructor(client, id, data) {
15
+ super(client, id, data);
16
+ this.teamPerkId = data.templateId.split(':')[1];
17
+ }
18
+ }
19
+ exports.default = STWTeamPerk;
20
+ //# sourceMappingURL=STWTeamPerk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"STWTeamPerk.js","sourceRoot":"","sources":["../../../../src/structures/stw/STWTeamPerk.ts"],"names":[],"mappings":";;;AAAA,gEAAgC;AAIhC;;GAEG;AACH,MAAM,WAAY,SAAQ,iBAAO;IAM/B;;;;OAIG;IACH,YAAY,MAAc,EAAE,EAAU,EAAE,IAAwB;QAC9D,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;QAExB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC;IACnD,CAAC;CACF;AAED,kBAAe,WAAW,CAAC"}
@@ -0,0 +1,15 @@
1
+ import STWSchematic from './STWSchematic';
2
+ import type { STWSchematicTrapSubType } from '../../../resources/structs';
3
+ import type Client from '../../Client';
4
+ import type { STWProfileSchematicData } from '../../../resources/httpResponses';
5
+ declare class STWTrapSchematic extends STWSchematic {
6
+ type: 'trap';
7
+ subType: STWSchematicTrapSubType;
8
+ evoType: never;
9
+ constructor(client: Client, id: string, data: STWProfileSchematicData & {
10
+ type: 'trap';
11
+ subType: STWSchematicTrapSubType;
12
+ evoType: never;
13
+ });
14
+ }
15
+ export default STWTrapSchematic;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const STWSchematic_1 = tslib_1.__importDefault(require("./STWSchematic"));
5
+ const Util_1 = require("../../util/Util");
6
+ class STWTrapSchematic extends STWSchematic_1.default {
7
+ constructor(client, id, data) {
8
+ super(client, id, data);
9
+ const parsedSchematic = (0, Util_1.parseSTWSchematicTemplateId)(data.templateId);
10
+ this.type = parsedSchematic.type;
11
+ this.subType = parsedSchematic.subType;
12
+ this.evoType = parsedSchematic.evoType;
13
+ }
14
+ }
15
+ exports.default = STWTrapSchematic;
16
+ //# sourceMappingURL=STWTrapSchematic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"STWTrapSchematic.js","sourceRoot":"","sources":["../../../../src/structures/stw/STWTrapSchematic.ts"],"names":[],"mappings":";;;AAAA,0EAA0C;AAC1C,0CAA8D;AAK9D,MAAM,gBAAiB,SAAQ,sBAAY;IAKzC,YAAY,MAAc,EAAE,EAAU,EAAE,IAIvC;QACC,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;QAExB,MAAM,eAAe,GAAG,IAAA,kCAA2B,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAErE,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,IAAc,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC,OAAkC,CAAC;QAClE,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC,OAAgB,CAAC;IAClD,CAAC;CACF;AAED,kBAAe,gBAAgB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import STWSchematic from './STWSchematic';
2
+ import type Client from '../../Client';
3
+ import type { STWProfileSchematicData } from '../../../resources/httpResponses';
4
+ import type { STWSchematicEvoType, STWSchematicMeleeSubType, STWSchematicRangedSubType } from '../../../resources/structs';
5
+ declare class STWWeaponSchematic extends STWSchematic {
6
+ type: 'ranged' | 'melee';
7
+ subType: STWSchematicRangedSubType | STWSchematicMeleeSubType;
8
+ evoType: STWSchematicEvoType;
9
+ constructor(client: Client, id: string, data: STWProfileSchematicData & {
10
+ type: 'ranged' | 'melee';
11
+ subType: STWSchematicRangedSubType | STWSchematicMeleeSubType;
12
+ evoType: STWSchematicEvoType;
13
+ });
14
+ }
15
+ export default STWWeaponSchematic;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const Util_1 = require("../../util/Util");
5
+ const STWSchematic_1 = tslib_1.__importDefault(require("./STWSchematic"));
6
+ class STWWeaponSchematic extends STWSchematic_1.default {
7
+ constructor(client, id, data) {
8
+ super(client, id, data);
9
+ const parsedSchematic = (0, Util_1.parseSTWSchematicTemplateId)(data.templateId);
10
+ this.type = parsedSchematic.type;
11
+ this.subType = parsedSchematic.subType;
12
+ this.evoType = parsedSchematic.evoType;
13
+ }
14
+ }
15
+ exports.default = STWWeaponSchematic;
16
+ //# sourceMappingURL=STWWeaponSchematic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"STWWeaponSchematic.js","sourceRoot":"","sources":["../../../../src/structures/stw/STWWeaponSchematic.ts"],"names":[],"mappings":";;;AAAA,0CAA8D;AAC9D,0EAA0C;AAK1C,MAAM,kBAAmB,SAAQ,sBAAY;IAK3C,YAAY,MAAc,EAAE,EAAU,EAAE,IAIvC;QACC,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;QAExB,MAAM,eAAe,GAAG,IAAA,kCAA2B,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAErE,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,IAA0B,CAAC;QACvD,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC,OAA+D,CAAC;QAC/F,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC,OAA8B,CAAC;IAChE,CAAC;CACF;AAED,kBAAe,kBAAkB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import User from './User';
2
+ /**
3
+ * Represents a blocked user
4
+ */
5
+ declare class BlockedUser extends User {
6
+ /**
7
+ * Unblocks this user
8
+ * @throws {UserNotFoundError} The user wasn't found
9
+ * @throws {EpicgamesAPIError}
10
+ */
11
+ unblock(): Promise<void>;
12
+ }
13
+ export default BlockedUser;