@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,56 @@
1
+ import Base from '../Base';
2
+ import Image from './Image';
3
+ import NewsMessageVideo from './NewsMessageVideo';
4
+ import type Client from '../Client';
5
+ import type { NewsMessageOffer, NewsMessagePlaylist } from '../../resources/structs';
6
+ /**
7
+ * Represents a fortnite news message
8
+ */
9
+ declare class NewsMessage extends Base {
10
+ /**
11
+ * The news message's title
12
+ */
13
+ title: string;
14
+ /**
15
+ * The news message's body
16
+ */
17
+ body: string;
18
+ /**
19
+ * The news message's images
20
+ */
21
+ images: Image[];
22
+ /**
23
+ * The news message's entry type
24
+ */
25
+ entryType: string;
26
+ /**
27
+ * The news message's button text override
28
+ */
29
+ buttonTextOverride: string;
30
+ /**
31
+ * The news message's tab title override
32
+ */
33
+ tabTitleOverride: string;
34
+ /**
35
+ * The news message's tile image
36
+ */
37
+ tileImage: Image;
38
+ /**
39
+ * The news message's playlist
40
+ */
41
+ playlist?: NewsMessagePlaylist;
42
+ /**
43
+ * The news message's offer
44
+ */
45
+ offer?: NewsMessageOffer;
46
+ /**
47
+ * The news message's video
48
+ */
49
+ video?: NewsMessageVideo;
50
+ /**
51
+ * @param client The main client
52
+ * @param data The news message data
53
+ */
54
+ constructor(client: Client, data: any);
55
+ }
56
+ export default NewsMessage;
@@ -0,0 +1,45 @@
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
+ const Image_1 = tslib_1.__importDefault(require("./Image"));
6
+ const NewsMessageVideo_1 = tslib_1.__importDefault(require("./NewsMessageVideo"));
7
+ /**
8
+ * Represents a fortnite news message
9
+ */
10
+ class NewsMessage extends Base_1.default {
11
+ /**
12
+ * @param client The main client
13
+ * @param data The news message data
14
+ */
15
+ constructor(client, data) {
16
+ var _a;
17
+ super(client);
18
+ const newsData = data.contentFields;
19
+ this.title = newsData.title;
20
+ this.body = newsData.body;
21
+ this.images = newsData.image.map((i) => new Image_1.default(this.client, i));
22
+ this.entryType = newsData.entryType;
23
+ this.buttonTextOverride = newsData.buttonTextOverride;
24
+ this.tabTitleOverride = newsData.tabTitleOverride;
25
+ this.tileImage = new Image_1.default(this.client, (_a = newsData.tileImage) === null || _a === void 0 ? void 0 : _a[0]);
26
+ this.playlist = newsData.playlistId ? {
27
+ id: newsData.playlistId,
28
+ } : undefined;
29
+ this.offer = newsData.offerId ? {
30
+ id: newsData.offerId,
31
+ action: newsData.offerAction,
32
+ } : undefined;
33
+ this.video = newsData.videoUID ? new NewsMessageVideo_1.default(this.client, {
34
+ videoAutoplay: newsData.videoAutoplay,
35
+ videoFullscreen: newsData.videoFullscreen,
36
+ videoLoop: newsData.videoLoop,
37
+ videoMute: newsData.videoMute,
38
+ videoStreamingEnabled: newsData.videoStreamingEnabled,
39
+ videoUID: newsData.videoUID,
40
+ videoVideoString: newsData.videoVideoString,
41
+ }) : undefined;
42
+ }
43
+ }
44
+ exports.default = NewsMessage;
45
+ //# sourceMappingURL=NewsMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NewsMessage.js","sourceRoot":"","sources":["../../../src/structures/NewsMessage.ts"],"names":[],"mappings":";;;AAAA,2DAA2B;AAC3B,4DAA4B;AAC5B,kFAAkD;AAIlD;;GAEG;AACH,MAAM,WAAY,SAAQ,cAAI;IAmD5B;;;OAGG;IACH,YAAY,MAAc,EAAE,IAAS;;QACnC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC;QA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AQ,CAAC,QAAQ;YAC3B,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB;SAC5C,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACjB,CAAC;CACF;AAED,kBAAe,WAAW,CAAC"}
@@ -0,0 +1,47 @@
1
+ import Base from '../Base';
2
+ import type Client from '../Client';
3
+ import type { NewsMessageVideoData } from '../../resources/structs';
4
+ /**
5
+ * Represents a fortnite news message video
6
+ */
7
+ declare class NewsMessageVideo extends Base {
8
+ /**
9
+ * The video's id
10
+ */
11
+ id: string;
12
+ /**
13
+ * Whether the video should autoplay
14
+ */
15
+ autoplay: boolean;
16
+ /**
17
+ * Whether the video should be fullscreen
18
+ */
19
+ fullscreen: boolean;
20
+ /**
21
+ * Whether the video should loop
22
+ */
23
+ loop: boolean;
24
+ /**
25
+ * Whether the video is muted
26
+ */
27
+ mute: boolean;
28
+ /**
29
+ * Whether the video has streaming enabled
30
+ */
31
+ streamingEnabled: boolean;
32
+ /**
33
+ * The video's string
34
+ */
35
+ videoString: string;
36
+ /**
37
+ * @param client The main client
38
+ * @param data The news message video data
39
+ */
40
+ constructor(client: Client, data: NewsMessageVideoData);
41
+ /**
42
+ * Downloads the video
43
+ * @throws {AxiosError}
44
+ */
45
+ download(): Promise<import("../../resources/structs").BlurlStream>;
46
+ }
47
+ export default NewsMessageVideo;
@@ -0,0 +1,32 @@
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 fortnite news message video
7
+ */
8
+ class NewsMessageVideo extends Base_1.default {
9
+ /**
10
+ * @param client The main client
11
+ * @param data The news message video data
12
+ */
13
+ constructor(client, data) {
14
+ super(client);
15
+ this.id = data.videoUID;
16
+ this.autoplay = data.videoAutoplay;
17
+ this.fullscreen = data.videoFullscreen;
18
+ this.loop = data.videoLoop;
19
+ this.mute = data.videoMute;
20
+ this.streamingEnabled = data.videoStreamingEnabled;
21
+ this.videoString = data.videoVideoString;
22
+ }
23
+ /**
24
+ * Downloads the video
25
+ * @throws {AxiosError}
26
+ */
27
+ async download() {
28
+ return this.client.downloadBlurlStream(this.id);
29
+ }
30
+ }
31
+ exports.default = NewsMessageVideo;
32
+ //# sourceMappingURL=NewsMessageVideo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NewsMessageVideo.js","sourceRoot":"","sources":["../../../src/structures/NewsMessageVideo.ts"],"names":[],"mappings":";;;AAAA,2DAA2B;AAI3B;;GAEG;AACH,MAAM,gBAAiB,SAAQ,cAAI;IAoCjC;;;OAGG;IACH,YAAY,MAAc,EAAE,IAA0B;QACpD,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC;QACvC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;QAC3B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,qBAAqB,CAAC;QACnD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC;IAC3C,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,QAAQ;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClD,CAAC;CACF;AAED,kBAAe,gBAAgB,CAAC"}
@@ -0,0 +1,31 @@
1
+ import Base from '../Base';
2
+ import Image from './Image';
3
+ import type Client from '../Client';
4
+ /**
5
+ * Represents a battle royale ingame radio station
6
+ */
7
+ declare class RadioStation extends Base {
8
+ /**
9
+ * The radio station's stream id
10
+ */
11
+ resourceId: string;
12
+ /**
13
+ * The radio station's icon
14
+ */
15
+ image: Image;
16
+ /**
17
+ * The radio station's name
18
+ */
19
+ name: string;
20
+ /**
21
+ * @param client The main client
22
+ * @param data The radio station's data
23
+ */
24
+ constructor(client: Client, data: any);
25
+ /**
26
+ * Downloads the radio station's stream
27
+ * @throws {AxiosError}
28
+ */
29
+ downloadStream(): Promise<import("../..").BlurlStream>;
30
+ }
31
+ export default RadioStation;
@@ -0,0 +1,33 @@
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
+ const Image_1 = tslib_1.__importDefault(require("./Image"));
6
+ /**
7
+ * Represents a battle royale ingame radio station
8
+ */
9
+ class RadioStation extends Base_1.default {
10
+ /**
11
+ * @param client The main client
12
+ * @param data The radio station's data
13
+ */
14
+ constructor(client, data) {
15
+ super(client);
16
+ this.resourceId = data.resourceID;
17
+ this.name = data.title;
18
+ this.image = new Image_1.default(this.client, {
19
+ url: data.stationImage,
20
+ width: 265,
21
+ height: 265,
22
+ });
23
+ }
24
+ /**
25
+ * Downloads the radio station's stream
26
+ * @throws {AxiosError}
27
+ */
28
+ async downloadStream() {
29
+ return this.client.downloadBlurlStream(this.resourceId);
30
+ }
31
+ }
32
+ exports.default = RadioStation;
33
+ //# sourceMappingURL=RadioStation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioStation.js","sourceRoot":"","sources":["../../../src/structures/RadioStation.ts"],"names":[],"mappings":";;;AAAA,2DAA2B;AAC3B,4DAA4B;AAG5B;;GAEG;AACH,MAAM,YAAa,SAAQ,cAAI;IAgB7B;;;OAGG;IACH,YAAY,MAAc,EAAE,IAAS;QACnC,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QAEvB,IAAI,CAAC,KAAK,GAAG,IAAI,eAAK,CAAC,IAAI,CAAC,MAAM,EAAE;YAClC,GAAG,EAAE,IAAI,CAAC,YAAY;YACtB,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG;SACZ,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,cAAc;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC1D,CAAC;CACF;AAED,kBAAe,YAAY,CAAC"}
@@ -0,0 +1,45 @@
1
+ import Base from '../Base';
2
+ import type Client from '../Client';
3
+ import type { StatsData, StatsLevelData } from '../../resources/structs';
4
+ import type User from './user/User';
5
+ import type { RawStatsData } from '../../resources/httpResponses';
6
+ /**
7
+ * Represents a user's battle royale stats
8
+ */
9
+ declare class Stats extends Base {
10
+ /**
11
+ * The stats' start time
12
+ */
13
+ startTime: Date;
14
+ /**
15
+ * The stats' end time
16
+ */
17
+ endTime: Date;
18
+ /**
19
+ * The user the stats belong to
20
+ */
21
+ user: User;
22
+ /**
23
+ * The stats
24
+ */
25
+ stats: StatsData;
26
+ /**
27
+ * The stats' level data
28
+ */
29
+ levelData: StatsLevelData;
30
+ /**
31
+ * The raw stats data
32
+ */
33
+ data: RawStatsData;
34
+ /**
35
+ * @param client The main client
36
+ * @param data The stats' data
37
+ */
38
+ constructor(client: Client, data: RawStatsData, user: User);
39
+ /**
40
+ * Returns the playlist stats type by the playlist id
41
+ * @param playlistID The playlist ID
42
+ */
43
+ private getPlaylistStatsType;
44
+ }
45
+ export default Stats;
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ /* eslint-disable class-methods-use-this */
5
+ /* eslint-disable no-restricted-syntax */
6
+ const Base_1 = tslib_1.__importDefault(require("../Base"));
7
+ const Util_1 = require("../util/Util");
8
+ const constants_1 = require("../../resources/constants");
9
+ /**
10
+ * Represents a user's battle royale stats
11
+ */
12
+ class Stats extends Base_1.default {
13
+ /**
14
+ * @param client The main client
15
+ * @param data The stats' data
16
+ */
17
+ constructor(client, data, user) {
18
+ super(client);
19
+ this.data = data;
20
+ this.user = user;
21
+ this.startTime = new Date(data.startTime / 1000);
22
+ this.endTime = new Date(data.endTime / 1000);
23
+ this.levelData = {};
24
+ this.stats = {
25
+ all: (0, Util_1.createDefaultInputTypeStats)(),
26
+ keyboardmouse: (0, Util_1.createDefaultInputTypeStats)(),
27
+ gamepad: (0, Util_1.createDefaultInputTypeStats)(),
28
+ touch: (0, Util_1.createDefaultInputTypeStats)(),
29
+ };
30
+ for (const key of Object.keys(data.stats)) {
31
+ if (constants_1.statsKeyRegex.test(key)) {
32
+ const [, statKey, inputType, playlistId] = key
33
+ .match(constants_1.statsKeyRegex);
34
+ const playlistType = typeof this.client.config.statsPlaylistTypeParser === 'function'
35
+ ? this.client.config.statsPlaylistTypeParser(playlistId)
36
+ : this.getPlaylistStatsType(playlistId);
37
+ if (playlistType !== 'other') {
38
+ const [parsedKey, parsedValue] = (0, Util_1.parseStatKey)(statKey, data.stats[key]);
39
+ const inputTypePlaylistStats = this.stats[inputType][playlistType];
40
+ const inputTypeAllStats = this.stats[inputType].overall;
41
+ const allPlaylistStats = this.stats.all[playlistType];
42
+ const allAllStats = this.stats.all.overall;
43
+ if (parsedKey === 'lastModified') {
44
+ if (!inputTypePlaylistStats.lastModified || parsedValue.getTime() > inputTypePlaylistStats.lastModified.getTime()) {
45
+ inputTypePlaylistStats.lastModified = parsedValue;
46
+ }
47
+ if (!inputTypeAllStats.lastModified || parsedValue.getTime() > inputTypeAllStats.lastModified.getTime()) {
48
+ inputTypeAllStats.lastModified = parsedValue;
49
+ }
50
+ if (!allPlaylistStats.lastModified || parsedValue.getTime() > allPlaylistStats.lastModified.getTime()) {
51
+ allPlaylistStats.lastModified = parsedValue;
52
+ }
53
+ if (!allAllStats.lastModified || parsedValue.getTime() > allAllStats.lastModified.getTime()) {
54
+ allAllStats.lastModified = parsedValue;
55
+ }
56
+ }
57
+ else {
58
+ inputTypePlaylistStats[parsedKey] += parsedValue;
59
+ if (playlistType !== 'ltm')
60
+ inputTypeAllStats[parsedKey] += parsedValue;
61
+ allPlaylistStats[parsedKey] += parsedValue;
62
+ if (playlistType !== 'ltm')
63
+ allAllStats[parsedKey] += parsedValue;
64
+ }
65
+ }
66
+ }
67
+ else if (/^s\d\d?_social_bp_level$/.test(key)) {
68
+ this.levelData[key.split('_')[0]] = {
69
+ level: Math.round(data.stats[key] / 100),
70
+ progress: data.stats[key] % 100,
71
+ };
72
+ }
73
+ }
74
+ for (const inputTypes of Object.keys(this.stats)) {
75
+ for (const playlistTypeStats of Object.values(this.stats[inputTypes])) {
76
+ playlistTypeStats.deaths = playlistTypeStats.matches - playlistTypeStats.wins;
77
+ playlistTypeStats.kd = playlistTypeStats.kills / (playlistTypeStats.deaths || 1);
78
+ playlistTypeStats.killsPerMin = playlistTypeStats.kills / (playlistTypeStats.minutesPlayed || 1);
79
+ playlistTypeStats.killsPerMatch = playlistTypeStats.kills / (playlistTypeStats.matches || 1);
80
+ playlistTypeStats.scorePerMin = playlistTypeStats.score / (playlistTypeStats.minutesPlayed || 1);
81
+ playlistTypeStats.scorePerMatch = playlistTypeStats.score / (playlistTypeStats.matches || 1);
82
+ playlistTypeStats.winRate = playlistTypeStats.wins / (playlistTypeStats.matches || 1);
83
+ }
84
+ }
85
+ }
86
+ /**
87
+ * Returns the playlist stats type by the playlist id
88
+ * @param playlistID The playlist ID
89
+ */
90
+ getPlaylistStatsType(playlistID) {
91
+ const playlist = playlistID.toLowerCase().replace('playlist_', '');
92
+ if (['creative', 'respawn', '16'].some((s) => playlist.includes(s)))
93
+ return 'other';
94
+ if (!['default', 'classic', 'showdown', 'vamp',
95
+ 'unvaulted', 'toss', 'fill', 'heavy', 'tank', 'melt'].some((s) => playlist.includes(s)))
96
+ return 'ltm';
97
+ if (playlist.includes('solo'))
98
+ return 'solo';
99
+ if (playlist.includes('duo'))
100
+ return 'duo';
101
+ if (playlist.includes('trio'))
102
+ return 'squad';
103
+ if (playlist.includes('squad'))
104
+ return 'squad';
105
+ return 'other';
106
+ }
107
+ }
108
+ exports.default = Stats;
109
+ //# sourceMappingURL=Stats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stats.js","sourceRoot":"","sources":["../../../src/structures/Stats.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAC3C,yCAAyC;AACzC,2DAA2B;AAC3B,uCAAyE;AACzE,yDAA0D;AAM1D;;GAEG;AACH,MAAM,KAAM,SAAQ,cAAI;IA+BtB;;;OAGG;IACH,YAAY,MAAc,EAAE,IAAkB,EAAE,IAAU;QACxD,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAEjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;QAE7C,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QAEpB,IAAI,CAAC,KAAK,GAAG;YACX,GAAG,EAAE,IAAA,kCAA2B,GAAE;YAClC,aAAa,EAAE,IAAA,kCAA2B,GAAE;YAC5C,OAAO,EAAE,IAAA,kCAA2B,GAAE;YACtC,KAAK,EAAE,IAAA,kCAA2B,GAAE;SACrC,CAAC;QAEF,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1C,IAAI,yBAAa,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC5B,MAAM,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC,GAAoE,GAAG;qBAC5G,KAAK,CAAC,yBAAa,CAAQ,CAAC;gBAE/B,M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AE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC;QAExG,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;YAAE,OAAO,MAAM,CAAC;QAC7C,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;QAC3C,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;YAAE,OAAO,OAAO,CAAC;QAC9C,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;YAAE,OAAO,OAAO,CAAC;QAE/C,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAED,kBAAe,KAAK,CAAC"}
@@ -0,0 +1,86 @@
1
+ import Base from '../Base';
2
+ import TournamentWindow from './TournamentWindow';
3
+ import type { PlatformMappings, RegionMappings, TournamentData, TournamentDisplayData, TournamentMetadata } from '../../resources/httpResponses';
4
+ import type { FullPlatform, Region, TournamentColors, TournamentImages, TournamentTexts, TournamentWindowTemplate } from '../../resources/structs';
5
+ import type Client from '../Client';
6
+ /**
7
+ * Represents a Fortnite tournament
8
+ */
9
+ declare class Tournament extends Base {
10
+ /**
11
+ * The tournament's ID
12
+ */
13
+ id: string;
14
+ /**
15
+ * The regions of this tournament
16
+ */
17
+ regions: Region[];
18
+ /**
19
+ * The region mappings
20
+ */
21
+ regionMappings: RegionMappings;
22
+ /**
23
+ * The platforms of this tournament
24
+ */
25
+ platforms: FullPlatform[];
26
+ /**
27
+ * The platform mappings
28
+ */
29
+ platformMappings: PlatformMappings;
30
+ /**
31
+ * The tournament's display data ID
32
+ */
33
+ displayDataId: string;
34
+ /**
35
+ * The event group
36
+ */
37
+ eventGroup: string;
38
+ /**
39
+ * The tournament's announcement time
40
+ */
41
+ announcementTime: Date;
42
+ /**
43
+ * The tournament's app ID
44
+ */
45
+ appId?: any;
46
+ /**
47
+ * The environment
48
+ */
49
+ environment?: any;
50
+ /**
51
+ * The tournament's meta data
52
+ */
53
+ metadata: TournamentMetadata;
54
+ /**
55
+ * The tournament's start time
56
+ */
57
+ beginTime: Date;
58
+ /**
59
+ * The tournament's end time
60
+ */
61
+ endTime: Date;
62
+ /**
63
+ * The tournament's display color data
64
+ */
65
+ colors: TournamentColors;
66
+ /**
67
+ * The tournament's display image data
68
+ */
69
+ images: TournamentImages;
70
+ /**
71
+ * The tournament's display text data
72
+ */
73
+ texts: TournamentTexts;
74
+ /**
75
+ * The tournament's windows
76
+ */
77
+ windows: TournamentWindow[];
78
+ /**
79
+ * @param client The main client
80
+ * @param tournamentData The tournament data
81
+ * @param tournamentDisplayData The tournament display data
82
+ * @param templates The tournament template
83
+ */
84
+ constructor(client: Client, tournamentData: TournamentData, tournamentDisplayData: TournamentDisplayData, templates: TournamentWindowTemplate[]);
85
+ }
86
+ export default Tournament;
@@ -0,0 +1,64 @@
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
+ const TournamentWindow_1 = tslib_1.__importDefault(require("./TournamentWindow"));
6
+ /**
7
+ * Represents a Fortnite tournament
8
+ */
9
+ class Tournament extends Base_1.default {
10
+ /**
11
+ * @param client The main client
12
+ * @param tournamentData The tournament data
13
+ * @param tournamentDisplayData The tournament display data
14
+ * @param templates The tournament template
15
+ */
16
+ constructor(client, tournamentData, tournamentDisplayData, templates) {
17
+ super(client);
18
+ this.id = tournamentData.eventId;
19
+ this.regions = tournamentData.regions;
20
+ this.regionMappings = tournamentData.regionMappings;
21
+ this.platforms = tournamentData.platforms;
22
+ this.platformMappings = tournamentData.platformMappings;
23
+ this.displayDataId = tournamentData.displayDataId;
24
+ this.eventGroup = tournamentData.eventGroup;
25
+ this.announcementTime = new Date(tournamentData.announcementTime);
26
+ this.appId = tournamentData.appId;
27
+ this.environment = tournamentData.environment;
28
+ this.metadata = tournamentData.metadata;
29
+ this.beginTime = new Date(tournamentData.beginTime);
30
+ this.endTime = new Date(tournamentData.endTime);
31
+ this.colors = {
32
+ titleColor: tournamentDisplayData.title_color,
33
+ backgroundTextColor: tournamentDisplayData.background_text_color,
34
+ backgroundRightColor: tournamentDisplayData.background_right_color,
35
+ backgroundLeftColor: tournamentDisplayData.background_left_color,
36
+ shadowColor: tournamentDisplayData.shadow_color,
37
+ posterFadeColor: tournamentDisplayData.poster_fade_color,
38
+ baseColor: tournamentDisplayData.base_color,
39
+ highlightColor: tournamentDisplayData.highlight_color,
40
+ };
41
+ this.images = {
42
+ loadingScreenImage: tournamentDisplayData.loading_screen_image,
43
+ posterBackImage: tournamentDisplayData.poster_back_image,
44
+ posterFrontImage: tournamentDisplayData.poster_front_image,
45
+ playlistTileImage: tournamentDisplayData.playlist_tile_image,
46
+ };
47
+ this.texts = {
48
+ pinEarnedText: tournamentDisplayData.pin_earned_text,
49
+ pinScoreRequirement: tournamentDisplayData.pin_score_requirement,
50
+ scheduleInfo: tournamentDisplayData.schedule_info,
51
+ flavorDescription: tournamentDisplayData.flavor_description,
52
+ shortFormatTitle: tournamentDisplayData.short_format_title,
53
+ titleLine1: tournamentDisplayData.title_line_1,
54
+ titleLine2: tournamentDisplayData.title_line_2,
55
+ detailsDescription: tournamentDisplayData.details_description,
56
+ longFormatTitle: tournamentDisplayData.long_format_title,
57
+ backgroundTitle: tournamentDisplayData.background_title,
58
+ };
59
+ this.windows = tournamentData.eventWindows
60
+ .map((w) => { var _a; return new TournamentWindow_1.default(this, w, (_a = templates.find((t) => t.windowId === w.eventWindowId)) === null || _a === void 0 ? void 0 : _a.templateData); });
61
+ }
62
+ }
63
+ exports.default = Tournament;
64
+ //# sourceMappingURL=Tournament.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tournament.js","sourceRoot":"","sources":["../../../src/structures/Tournament.ts"],"names":[],"mappings":";;;AAAA,2DAA2B;AAC3B,kFAAkD;AASlD;;GAEG;AACH,MAAM,UAAW,SAAQ,cAAI;IAsF3B;;;;;OAKG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