@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,95 @@
1
+ import { Collection } from '@discordjs/collection';
2
+ import Base from '../../Base';
3
+ import ClientPartyMember from './ClientPartyMember';
4
+ import PartyMember from './PartyMember';
5
+ import PartyMeta from './PartyMeta';
6
+ import type Client from '../../Client';
7
+ import type { PartyConfig, PartyData, PartyUpdateData } from '../../../resources/structs';
8
+ /**
9
+ * Represents a party that the client is not a member of
10
+ */
11
+ declare class Party extends Base {
12
+ /**
13
+ * The party's ID
14
+ */
15
+ id: string;
16
+ /**
17
+ * The party's creation date
18
+ */
19
+ createdAt: Date;
20
+ /**
21
+ * The party configuration
22
+ */
23
+ config: PartyConfig;
24
+ /**
25
+ * A collection of the party members mapped by their ID
26
+ */
27
+ members: Collection<string, PartyMember | ClientPartyMember>;
28
+ /**
29
+ * The party's meta
30
+ */
31
+ meta: PartyMeta;
32
+ /**
33
+ * The party's revision
34
+ */
35
+ revision: number;
36
+ /**
37
+ * @param client The main client
38
+ * @param data The party's data
39
+ */
40
+ constructor(client: Client, data: PartyData);
41
+ /**
42
+ * The party's member count
43
+ */
44
+ get size(): number;
45
+ /**
46
+ * The party's max member count
47
+ */
48
+ get maxSize(): number;
49
+ /**
50
+ * The party's leader
51
+ */
52
+ get leader(): PartyMember | ClientPartyMember | undefined;
53
+ /**
54
+ * The currently selected playlist
55
+ */
56
+ get playlist(): import("../../../resources/structs").Island | undefined;
57
+ /**
58
+ * The custom matchmaking key
59
+ */
60
+ get customMatchmakingKey(): string | undefined;
61
+ /**
62
+ * The squad fill status
63
+ */
64
+ get squadFill(): boolean;
65
+ /**
66
+ * Joins this party
67
+ * @param skipRefresh Whether to skip refreshing the party data (Only use this if you know what you're doing)
68
+ * @throws {PartyAlreadyJoinedError} The client already joined this party
69
+ * @throws {PartyNotFoundError} The party wasn't found
70
+ * @throws {PartyPermissionError} The party cannot be fetched due to a permission error
71
+ * @throws {PartyMaxSizeReachedError} The party has reached its max size
72
+ * @throws {EpicgamesAPIError}
73
+ */
74
+ join(skipRefresh?: boolean): Promise<void>;
75
+ /**
76
+ * Updates this party's data
77
+ */
78
+ updateData(data: PartyUpdateData): void;
79
+ /**
80
+ * Updates the basic user information (display name and external auths) of all party members
81
+ */
82
+ updateMemberBasicInfo(): Promise<void>;
83
+ /**
84
+ * Refetches this party's data
85
+ * @throws {PartyNotFoundError} The party wasn't found
86
+ * @throws {PartyPermissionError} The party cannot be fetched due to a permission error
87
+ * @throws {EpicgamesAPIError}
88
+ */
89
+ fetch(): Promise<void>;
90
+ /**
91
+ * Converts this party into an object
92
+ */
93
+ toObject(): PartyData;
94
+ }
95
+ export default Party;
@@ -0,0 +1,200 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const collection_1 = require("@discordjs/collection");
5
+ const Endpoints_1 = tslib_1.__importDefault(require("../../../resources/Endpoints"));
6
+ const Enums_1 = require("../../../enums/Enums");
7
+ const Base_1 = tslib_1.__importDefault(require("../../Base"));
8
+ const PartyAlreadyJoinedError_1 = tslib_1.__importDefault(require("../../exceptions/PartyAlreadyJoinedError"));
9
+ const Util_1 = require("../../util/Util");
10
+ const ClientPartyMember_1 = tslib_1.__importDefault(require("./ClientPartyMember"));
11
+ const PartyMember_1 = tslib_1.__importDefault(require("./PartyMember"));
12
+ const PartyMeta_1 = tslib_1.__importDefault(require("./PartyMeta"));
13
+ const enums_1 = require("../../../resources/enums");
14
+ /**
15
+ * Represents a party that the client is not a member of
16
+ */
17
+ class Party extends Base_1.default {
18
+ /**
19
+ * @param client The main client
20
+ * @param data The party's data
21
+ */
22
+ constructor(client, data) {
23
+ super(client);
24
+ this.id = data.id;
25
+ this.createdAt = new Date(data.created_at);
26
+ this.config = (0, Util_1.makeCamelCase)(data.config);
27
+ this.config.privacy = this.config.joinability === 'OPEN' ? Enums_1.PartyPrivacy.PUBLIC : Enums_1.PartyPrivacy.PRIVATE;
28
+ this.meta = new PartyMeta_1.default(data.meta);
29
+ this.revision = data.revision || 0;
30
+ this.members = new collection_1.Collection(data.members.map((m) => {
31
+ if (m.account_id === this.client.user.self.id)
32
+ return [m.account_id, new ClientPartyMember_1.default(this, m)];
33
+ return [m.account_id, new PartyMember_1.default(this, m)];
34
+ }));
35
+ }
36
+ /**
37
+ * The party's member count
38
+ */
39
+ get size() {
40
+ return this.members.size;
41
+ }
42
+ /**
43
+ * The party's max member count
44
+ */
45
+ get maxSize() {
46
+ return this.config.maxSize;
47
+ }
48
+ /**
49
+ * The party's leader
50
+ */
51
+ get leader() {
52
+ return this.members.find((m) => m.role === 'CAPTAIN');
53
+ }
54
+ /**
55
+ * The currently selected playlist
56
+ */
57
+ get playlist() {
58
+ return this.meta.island;
59
+ }
60
+ /**
61
+ * The custom matchmaking key
62
+ */
63
+ get customMatchmakingKey() {
64
+ return this.meta.customMatchmakingKey;
65
+ }
66
+ /**
67
+ * The squad fill status
68
+ */
69
+ get squadFill() {
70
+ return this.meta.squadFill;
71
+ }
72
+ /**
73
+ * Joins this party
74
+ * @param skipRefresh Whether to skip refreshing the party data (Only use this if you know what you're doing)
75
+ * @throws {PartyAlreadyJoinedError} The client already joined this party
76
+ * @throws {PartyNotFoundError} The party wasn't found
77
+ * @throws {PartyPermissionError} The party cannot be fetched due to a permission error
78
+ * @throws {PartyMaxSizeReachedError} The party has reached its max size
79
+ * @throws {EpicgamesAPIError}
80
+ */
81
+ async join(skipRefresh = false) {
82
+ if (!skipRefresh) {
83
+ await this.fetch();
84
+ }
85
+ if (this.members.get(this.client.user.self.id))
86
+ throw new PartyAlreadyJoinedError_1.default();
87
+ this.client.partyLock.lock();
88
+ if (this.client.party)
89
+ await this.client.party.leave(false);
90
+ try {
91
+ await this.client.http.epicgamesRequest({
92
+ method: 'POST',
93
+ url: `${Endpoints_1.default.BR_PARTY}/parties/${this.id}/members/${this.client.user.self.id}/join`,
94
+ headers: {
95
+ 'Content-Type': 'application/json',
96
+ },
97
+ data: {
98
+ connection: {
99
+ id: this.client.xmpp.JID,
100
+ meta: {
101
+ 'urn:epic:conn:platform_s': this.client.config.platform,
102
+ 'urn:epic:conn:type_s': 'game',
103
+ },
104
+ yield_leadership: false,
105
+ },
106
+ meta: {
107
+ 'urn:epic:member:dn_s': this.client.user.self.displayName,
108
+ 'urn:epic:member:joinrequestusers_j': JSON.stringify({
109
+ users: [
110
+ {
111
+ id: this.client.user.self.id,
112
+ dn: this.client.user.self.displayName,
113
+ plat: this.client.config.platform,
114
+ data: JSON.stringify({
115
+ CrossplayPreference: '1',
116
+ SubGame_u: '1',
117
+ }),
118
+ },
119
+ ],
120
+ }),
121
+ },
122
+ },
123
+ }, enums_1.AuthSessionStoreKey.Fortnite);
124
+ }
125
+ catch (e) {
126
+ this.client.partyLock.unlock();
127
+ await this.client.initParty(true, false);
128
+ throw e;
129
+ }
130
+ this.client.setClientParty(this);
131
+ this.client.partyLock.unlock();
132
+ }
133
+ /**
134
+ * Updates this party's data
135
+ */
136
+ updateData(data) {
137
+ var _a, _b;
138
+ if (data.revision > this.revision)
139
+ this.revision = data.revision;
140
+ this.meta.update((_a = data.party_state_updated) !== null && _a !== void 0 ? _a : {}, true);
141
+ this.meta.remove((_b = data.party_state_removed) !== null && _b !== void 0 ? _b : []);
142
+ this.config.joinability = data.party_privacy_type;
143
+ this.config.maxSize = data.max_number_of_members;
144
+ this.config.subType = data.party_sub_type;
145
+ this.config.type = data.party_type;
146
+ this.config.inviteTtl = data.invite_ttl_seconds;
147
+ this.config.discoverability = data.discoverability;
148
+ let privacy = this.meta.get('Default:PrivacySettings_j');
149
+ privacy = Object.values(Enums_1.PartyPrivacy)
150
+ .find((val) => val.partyType === privacy.PrivacySettings.partyType
151
+ && val.inviteRestriction === privacy.PrivacySettings.partyInviteRestriction
152
+ && val.onlyLeaderFriendsCanJoin === privacy.PrivacySettings.bOnlyLeaderFriendsCanJoin);
153
+ if (privacy)
154
+ this.config.privacy = privacy;
155
+ }
156
+ /**
157
+ * Updates the basic user information (display name and external auths) of all party members
158
+ */
159
+ async updateMemberBasicInfo() {
160
+ const users = await this.client.user.fetchMultiple(this.members.map((m) => m.id));
161
+ users.forEach((u) => { var _a; return (_a = this.members.get(u.id)) === null || _a === void 0 ? void 0 : _a.update(u); });
162
+ }
163
+ /**
164
+ * Refetches this party's data
165
+ * @throws {PartyNotFoundError} The party wasn't found
166
+ * @throws {PartyPermissionError} The party cannot be fetched due to a permission error
167
+ * @throws {EpicgamesAPIError}
168
+ */
169
+ async fetch() {
170
+ const partyData = await this.client.getParty(this.id, true);
171
+ this.createdAt = new Date(partyData.created_at);
172
+ this.config = (0, Util_1.makeCamelCase)(partyData.config);
173
+ this.config.privacy = this.config.joinability === 'OPEN' ? Enums_1.PartyPrivacy.PUBLIC : Enums_1.PartyPrivacy.PRIVATE;
174
+ this.meta = new PartyMeta_1.default(partyData.meta);
175
+ this.revision = partyData.revision || 0;
176
+ // eslint-disable-next-line arrow-body-style
177
+ this.members = new collection_1.Collection(partyData.members.map((m) => {
178
+ if (m.account_id === this.client.user.self.id)
179
+ return [m.account_id, new ClientPartyMember_1.default(this, m)];
180
+ return [m.account_id, new PartyMember_1.default(this, m)];
181
+ }));
182
+ }
183
+ /**
184
+ * Converts this party into an object
185
+ */
186
+ toObject() {
187
+ return {
188
+ id: this.id,
189
+ created_at: this.createdAt.toISOString(),
190
+ config: (0, Util_1.makeSnakeCase)(this.config),
191
+ invites: [],
192
+ members: this.members.map((m) => m.toObject()),
193
+ meta: this.meta.schema,
194
+ revision: 0,
195
+ updated_at: new Date().toISOString(),
196
+ };
197
+ }
198
+ }
199
+ exports.default = Party;
200
+ //# sourceMappingURL=Party.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Party.js","sourceRoot":"","sources":["../../../../src/structures/party/Party.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AACnD,qFAAqD;AACrD,gDAAoD;AACpD,8DAA8B;AAC9B,+GAA+E;AAC/E,0CAA+D;AAC/D,oFAAoD;AACpD,wEAAwC;AACxC,oEAAoC;AACpC,oDAA+D;AAM/D;;GAEG;AACH,MAAM,KAAM,SAAQ,cAAI;IA+BtB;;;OAGG;IACH,YAAY,MAAc,EAAE,IAAe;QACzC,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,GAAG,IAAA,oBAAa,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,oBAAY,CAAC,MAAM,CAAC,CAAC,CAAC,oBAAY,CAAC,OAAO,CAAC;QACtG,IAAI,CAAC,IAAI,GAAG,IAAI,mBAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;QAEnC,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAU,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACnD,IAAI,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAK,CAAC,EAAE;gBAAE,OAAO,CAAC,CAAC,CAAC,UAAU,EAAE,IAAI,2BAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YACtG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AAC,QAAQ,IAAI,CAAC,CAAC;QAExC,4CAA4C;QAC5C,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAU,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACxD,IAAI,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAK,CAAC,EAAE;gBAAE,OAAO,CAAC,CAAC,CAAC,UAAU,EAAE,IAAI,2BAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YACtG,OAAO,CAAC,CAAC,CAAC,UAAU,EAAE,IAAI,qBAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC,CAAC;IACN,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;YACxC,MAAM,EAAE,IAAA,oBAAa,EAAC,IAAI,CAAC,MAAM,CAAC;YAClC,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAc,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;YAC3D,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM;YACtB,QAAQ,EAAE,CAAC;YACX,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACrC,CAAC;IACJ,CAAC;CACF;AAED,kBAAe,KAAK,CAAC"}
@@ -0,0 +1,73 @@
1
+ import Base from '../../Base';
2
+ import AsyncLock from '../../util/AsyncLock';
3
+ import PartyMessage from './PartyMessage';
4
+ import type Client from '../../Client';
5
+ import type ClientParty from './ClientParty';
6
+ /**
7
+ * Represents a party's conversation
8
+ */
9
+ declare class PartyChat extends Base {
10
+ /**
11
+ * The chat room's JID
12
+ * @deprecated since chat is not done over xmpp anymore, this property will always be an empty string
13
+ */
14
+ jid: string;
15
+ /**
16
+ * the party chats conversation id
17
+ */
18
+ get conversationId(): string;
19
+ /**
20
+ * The client's chat room nickname
21
+ * @deprecated since chat is not done over xmpp anymore, this property will always be an empty string
22
+ */
23
+ nick: string;
24
+ /**
25
+ * The chat room's join lock
26
+ * @deprecated since chat is not done over xmpp anymore, this is not used anymore
27
+ */
28
+ joinLock: AsyncLock;
29
+ /**
30
+ * The chat room's party
31
+ */
32
+ party: ClientParty;
33
+ /**
34
+ * Whether the client is connected to the party chat
35
+ * @deprecated since chat is not done over xmpp anymore, this property will always be true
36
+ */
37
+ isConnected: boolean;
38
+ /**
39
+ * Holds the account ids, which will not receive party messages anymore from the currently logged in user
40
+ */
41
+ bannedAccountIds: Set<string>;
42
+ /**
43
+ * @param client The main client
44
+ * @param party The chat room's party
45
+ */
46
+ constructor(client: Client, party: ClientParty);
47
+ /**
48
+ * Sends a message to this party chat
49
+ * @param content The message that will be sent
50
+ */
51
+ send(content: string): Promise<PartyMessage>;
52
+ /**
53
+ * Joins this party chat
54
+ * @deprecated since chat is not done over xmpp anymore, this function will do nothing
55
+ */
56
+ join(): Promise<void>;
57
+ /**
58
+ * Leaves this party chat
59
+ * @deprecated since chat is not done over xmpp anymore, this function will do nothing
60
+ */
61
+ leave(): Promise<void>;
62
+ /**
63
+ * Ban a member from receiving party messages from the logged in user
64
+ * @param member The member that should be banned
65
+ */
66
+ ban(member: string): Promise<void>;
67
+ /**
68
+ * Unban a member from receiving party messages from the logged in user
69
+ * @param member The member that should be unbanned
70
+ */
71
+ unban(member: string): Promise<void>;
72
+ }
73
+ export default PartyChat;
@@ -0,0 +1,76 @@
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 AsyncLock_1 = tslib_1.__importDefault(require("../../util/AsyncLock"));
6
+ const PartyMessage_1 = tslib_1.__importDefault(require("./PartyMessage"));
7
+ /**
8
+ * Represents a party's conversation
9
+ */
10
+ class PartyChat extends Base_1.default {
11
+ /**
12
+ * the party chats conversation id
13
+ */
14
+ get conversationId() {
15
+ return `p-${this.party.id}`;
16
+ }
17
+ /**
18
+ * @param client The main client
19
+ * @param party The chat room's party
20
+ */
21
+ constructor(client, party) {
22
+ super(client);
23
+ // xmpp legacy (only here for backwards compatibility)
24
+ this.joinLock = new AsyncLock_1.default();
25
+ this.nick = '';
26
+ this.jid = '';
27
+ this.isConnected = true;
28
+ this.party = party;
29
+ this.bannedAccountIds = new Set();
30
+ }
31
+ /**
32
+ * Sends a message to this party chat
33
+ * @param content The message that will be sent
34
+ */
35
+ async send(content) {
36
+ const messageId = await this.client.chat.sendMessageInConversation(this.conversationId, {
37
+ body: content,
38
+ }, this.party.members
39
+ .filter((x) => !this.bannedAccountIds.has(x.id))
40
+ .map((x) => x.id));
41
+ return new PartyMessage_1.default(this.client, {
42
+ author: this.party.me,
43
+ content,
44
+ party: this.party,
45
+ id: messageId,
46
+ });
47
+ }
48
+ /**
49
+ * Joins this party chat
50
+ * @deprecated since chat is not done over xmpp anymore, this function will do nothing
51
+ */
52
+ // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-empty-function
53
+ async join() { }
54
+ /**
55
+ * Leaves this party chat
56
+ * @deprecated since chat is not done over xmpp anymore, this function will do nothing
57
+ */
58
+ // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-empty-function
59
+ async leave() { }
60
+ /**
61
+ * Ban a member from receiving party messages from the logged in user
62
+ * @param member The member that should be banned
63
+ */
64
+ async ban(member) {
65
+ this.bannedAccountIds.add(member);
66
+ }
67
+ /**
68
+ * Unban a member from receiving party messages from the logged in user
69
+ * @param member The member that should be unbanned
70
+ */
71
+ async unban(member) {
72
+ this.bannedAccountIds.delete(member);
73
+ }
74
+ }
75
+ exports.default = PartyChat;
76
+ //# sourceMappingURL=PartyChat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Party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AE,EAAE,SAAS;SACd,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,wFAAwF;IACjF,KAAK,CAAC,IAAI,KAAK,CAAC;IAEvB;;;OAGG;IACH,wFAAwF;IACjF,KAAK,CAAC,KAAK,KAAK,CAAC;IAExB;;;OAGG;IACI,KAAK,CAAC,GAAG,CAAC,MAAc;QAC7B,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,KAAK,CAAC,MAAc;QAC/B,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;CACF;AAED,kBAAe,SAAS,CAAC"}
@@ -0,0 +1,139 @@
1
+ import PartyMemberMeta from './PartyMemberMeta';
2
+ import User from '../user/User';
3
+ import type Party from './Party';
4
+ import type ClientParty from './ClientParty';
5
+ import type { PartyMemberData, PartyMemberUpdateData } from '../../../resources/structs';
6
+ /**
7
+ * Represents a party member
8
+ */
9
+ declare class PartyMember extends User {
10
+ /**
11
+ * The member's role. "CAPTAIN" means leader
12
+ */
13
+ role: string;
14
+ /**
15
+ * The date when this member joined the party
16
+ */
17
+ joinedAt: Date;
18
+ /**
19
+ * The member's meta
20
+ */
21
+ meta: PartyMemberMeta;
22
+ /**
23
+ * The party this member belongs to
24
+ */
25
+ party: Party | ClientParty;
26
+ /**
27
+ * The member's revision
28
+ */
29
+ revision: number;
30
+ /**
31
+ * Whether this member has received an initial state update
32
+ */
33
+ receivedInitialStateUpdate: boolean;
34
+ /**
35
+ * @param party The party this member belongs to
36
+ * @param data The member's data
37
+ */
38
+ constructor(party: Party | ClientParty, data: PartyMemberData);
39
+ /**
40
+ * Whether this member is the leader of the party
41
+ */
42
+ get isLeader(): boolean;
43
+ /**
44
+ * The member's currently equipped outfit CID
45
+ */
46
+ get outfit(): string | undefined;
47
+ /**
48
+ * The member's currently equipped pickaxe ID
49
+ */
50
+ get pickaxe(): string | undefined;
51
+ /**
52
+ * The member's current emote EID
53
+ */
54
+ get emote(): string | undefined;
55
+ /**
56
+ * The member's currently equipped backpack BID
57
+ */
58
+ get backpack(): string | undefined;
59
+ /**
60
+ * Whether the member is ready
61
+ */
62
+ get isReady(): boolean;
63
+ /**
64
+ * Whether the member is sitting out
65
+ */
66
+ get isSittingOut(): boolean;
67
+ /**
68
+ * The member's current input method
69
+ */
70
+ get inputMethod(): string | undefined;
71
+ /**
72
+ * The member's cosmetic variants
73
+ */
74
+ get variants(): import("../../../resources/structs").CosmeticsVariantMeta;
75
+ /**
76
+ * The member's custom data store
77
+ */
78
+ get customDataStore(): string[];
79
+ /**
80
+ * The member's banner info
81
+ */
82
+ get banner(): import("../../../resources/structs").BannerMeta | undefined;
83
+ /**
84
+ * The member's battlepass info
85
+ */
86
+ get battlepass(): import("../../../resources/structs").BattlePassMeta | undefined;
87
+ /**
88
+ * The member's platform
89
+ */
90
+ get platform(): import("../../../resources/structs").Platform | undefined;
91
+ /**
92
+ * The member's match info
93
+ */
94
+ get matchInfo(): import("../../../resources/structs").MatchMeta;
95
+ /**
96
+ * The member's current playlist
97
+ */
98
+ get playlist(): import("../../../resources/structs").Island;
99
+ /**
100
+ * Whether a marker has been set
101
+ */
102
+ get isMarkerSet(): boolean;
103
+ /**
104
+ * The member's marker location [x, y] tuple.
105
+ * [0, 0] if there is no marker set
106
+ */
107
+ get markerLocation(): [number, number];
108
+ /**
109
+ * Kicks this member from the client's party.
110
+ * @throws {PartyPermissionError} The client is not a member or not the leader of the party
111
+ */
112
+ kick(): Promise<any>;
113
+ /**
114
+ * Promotes this member
115
+ * @throws {PartyPermissionError} The client is not a member or not the leader of the party
116
+ */
117
+ promote(): Promise<any>;
118
+ /**
119
+ * Hides this member
120
+ * @param hide Whether the member should be hidden
121
+ * @throws {PartyPermissionError} The client is not the leader of the party
122
+ * @throws {EpicgamesAPIError}
123
+ */
124
+ hide(hide?: boolean): Promise<any>;
125
+ /**
126
+ * Bans this member from the client's party.
127
+ */
128
+ chatBan(): Promise<any>;
129
+ /**
130
+ * Updates this members data
131
+ * @param data The update data
132
+ */
133
+ updateData(data: PartyMemberUpdateData): void;
134
+ /**
135
+ * Converts this party member into an object
136
+ */
137
+ toObject(): PartyMemberData;
138
+ }
139
+ export default PartyMember;