@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.
- package/LICENSE +21 -0
- package/README.md +68 -0
- package/dist/enums/Enums.d.ts +251 -0
- package/dist/enums/Enums.js +202 -0
- package/dist/enums/Enums.js.map +1 -0
- package/dist/index.d.ts +92 -0
- package/dist/index.js +194 -0
- package/dist/index.js.map +1 -0
- package/dist/resources/AuthClients.d.ts +39 -0
- package/dist/resources/AuthClients.js +41 -0
- package/dist/resources/AuthClients.js.map +1 -0
- package/dist/resources/BaseItemRating.json +5203 -0
- package/dist/resources/Endpoints.d.ts +58 -0
- package/dist/resources/Endpoints.js +71 -0
- package/dist/resources/Endpoints.js.map +1 -0
- package/dist/resources/HomebaseRatingMapping.json +255 -0
- package/dist/resources/PowerLevelCurves.d.ts +111 -0
- package/dist/resources/PowerLevelCurves.js +21 -0
- package/dist/resources/PowerLevelCurves.js.map +1 -0
- package/dist/resources/SurvivorItemRating.json +9343 -0
- package/dist/resources/constants.d.ts +2 -0
- package/dist/resources/constants.js +11 -0
- package/dist/resources/constants.js.map +1 -0
- package/dist/resources/defaultPartyMemberMeta.json +28 -0
- package/dist/resources/defaultPartyMeta.json +38 -0
- package/dist/resources/enums.d.ts +12 -0
- package/dist/resources/enums.js +18 -0
- package/dist/resources/enums.js.map +1 -0
- package/dist/resources/httpResponses.d.ts +773 -0
- package/dist/resources/httpResponses.js +3 -0
- package/dist/resources/httpResponses.js.map +1 -0
- package/dist/resources/structs.d.ts +1310 -0
- package/dist/resources/structs.js +3 -0
- package/dist/resources/structs.js.map +1 -0
- package/dist/src/Base.d.ts +15 -0
- package/dist/src/Base.js +15 -0
- package/dist/src/Base.js.map +1 -0
- package/dist/src/Client.d.ts +341 -0
- package/dist/src/Client.js +1043 -0
- package/dist/src/Client.js.map +1 -0
- package/dist/src/auth/Auth.d.ts +66 -0
- package/dist/src/auth/Auth.js +249 -0
- package/dist/src/auth/Auth.js.map +1 -0
- package/dist/src/auth/AuthSession.d.ts +41 -0
- package/dist/src/auth/AuthSession.js +25 -0
- package/dist/src/auth/AuthSession.js.map +1 -0
- package/dist/src/auth/EOSAuthSession.d.ts +19 -0
- package/dist/src/auth/EOSAuthSession.js +80 -0
- package/dist/src/auth/EOSAuthSession.js.map +1 -0
- package/dist/src/auth/FortniteAuthSession.d.ts +53 -0
- package/dist/src/auth/FortniteAuthSession.js +107 -0
- package/dist/src/auth/FortniteAuthSession.js.map +1 -0
- package/dist/src/auth/FortniteClientCredentialsAuthSession.d.ts +18 -0
- package/dist/src/auth/FortniteClientCredentialsAuthSession.js +88 -0
- package/dist/src/auth/FortniteClientCredentialsAuthSession.js.map +1 -0
- package/dist/src/auth/LauncherAuthSession.d.ts +23 -0
- package/dist/src/auth/LauncherAuthSession.js +120 -0
- package/dist/src/auth/LauncherAuthSession.js.map +1 -0
- package/dist/src/exceptions/AuthenticationMissingError.d.ts +15 -0
- package/dist/src/exceptions/AuthenticationMissingError.js +18 -0
- package/dist/src/exceptions/AuthenticationMissingError.js.map +1 -0
- package/dist/src/exceptions/CreativeIslandNotFoundError.d.ts +14 -0
- package/dist/src/exceptions/CreativeIslandNotFoundError.js +18 -0
- package/dist/src/exceptions/CreativeIslandNotFoundError.js.map +1 -0
- package/dist/src/exceptions/CreatorCodeNotFoundError.d.ts +14 -0
- package/dist/src/exceptions/CreatorCodeNotFoundError.js +18 -0
- package/dist/src/exceptions/CreatorCodeNotFoundError.js.map +1 -0
- package/dist/src/exceptions/DuplicateFriendshipError.d.ts +14 -0
- package/dist/src/exceptions/DuplicateFriendshipError.js +18 -0
- package/dist/src/exceptions/DuplicateFriendshipError.js.map +1 -0
- package/dist/src/exceptions/EpicgamesAPIError.d.ts +42 -0
- package/dist/src/exceptions/EpicgamesAPIError.js +27 -0
- package/dist/src/exceptions/EpicgamesAPIError.js.map +1 -0
- package/dist/src/exceptions/EventTimeoutError.d.ts +19 -0
- package/dist/src/exceptions/EventTimeoutError.js +20 -0
- package/dist/src/exceptions/EventTimeoutError.js.map +1 -0
- package/dist/src/exceptions/FriendNotFoundError.d.ts +14 -0
- package/dist/src/exceptions/FriendNotFoundError.js +18 -0
- package/dist/src/exceptions/FriendNotFoundError.js.map +1 -0
- package/dist/src/exceptions/FriendshipRequestAlreadySentError.d.ts +14 -0
- package/dist/src/exceptions/FriendshipRequestAlreadySentError.js +18 -0
- package/dist/src/exceptions/FriendshipRequestAlreadySentError.js.map +1 -0
- package/dist/src/exceptions/InviteeFriendshipRequestLimitExceededError.d.ts +14 -0
- package/dist/src/exceptions/InviteeFriendshipRequestLimitExceededError.js +18 -0
- package/dist/src/exceptions/InviteeFriendshipRequestLimitExceededError.js.map +1 -0
- package/dist/src/exceptions/InviteeFriendshipSettingsError.d.ts +14 -0
- package/dist/src/exceptions/InviteeFriendshipSettingsError.js +18 -0
- package/dist/src/exceptions/InviteeFriendshipSettingsError.js.map +1 -0
- package/dist/src/exceptions/InviteeFriendshipsLimitExceededError.d.ts +14 -0
- package/dist/src/exceptions/InviteeFriendshipsLimitExceededError.js +18 -0
- package/dist/src/exceptions/InviteeFriendshipsLimitExceededError.js.map +1 -0
- package/dist/src/exceptions/InviterFriendshipsLimitExceededError.d.ts +14 -0
- package/dist/src/exceptions/InviterFriendshipsLimitExceededError.js +18 -0
- package/dist/src/exceptions/InviterFriendshipsLimitExceededError.js.map +1 -0
- package/dist/src/exceptions/MatchNotFoundError.d.ts +14 -0
- package/dist/src/exceptions/MatchNotFoundError.js +18 -0
- package/dist/src/exceptions/MatchNotFoundError.js.map +1 -0
- package/dist/src/exceptions/OfferNotFoundError.d.ts +14 -0
- package/dist/src/exceptions/OfferNotFoundError.js +18 -0
- package/dist/src/exceptions/OfferNotFoundError.js.map +1 -0
- package/dist/src/exceptions/PartyAlreadyJoinedError.d.ts +7 -0
- package/dist/src/exceptions/PartyAlreadyJoinedError.js +14 -0
- package/dist/src/exceptions/PartyAlreadyJoinedError.js.map +1 -0
- package/dist/src/exceptions/PartyInvitationExpiredError.d.ts +7 -0
- package/dist/src/exceptions/PartyInvitationExpiredError.js +14 -0
- package/dist/src/exceptions/PartyInvitationExpiredError.js.map +1 -0
- package/dist/src/exceptions/PartyMaxSizeReachedError.d.ts +7 -0
- package/dist/src/exceptions/PartyMaxSizeReachedError.js +14 -0
- package/dist/src/exceptions/PartyMaxSizeReachedError.js.map +1 -0
- package/dist/src/exceptions/PartyMemberNotFoundError.d.ts +14 -0
- package/dist/src/exceptions/PartyMemberNotFoundError.js +18 -0
- package/dist/src/exceptions/PartyMemberNotFoundError.js.map +1 -0
- package/dist/src/exceptions/PartyNotFoundError.d.ts +7 -0
- package/dist/src/exceptions/PartyNotFoundError.js +14 -0
- package/dist/src/exceptions/PartyNotFoundError.js.map +1 -0
- package/dist/src/exceptions/PartyPermissionError.d.ts +7 -0
- package/dist/src/exceptions/PartyPermissionError.js +14 -0
- package/dist/src/exceptions/PartyPermissionError.js.map +1 -0
- package/dist/src/exceptions/SendMessageError.d.ts +27 -0
- package/dist/src/exceptions/SendMessageError.js +21 -0
- package/dist/src/exceptions/SendMessageError.js.map +1 -0
- package/dist/src/exceptions/StatsPrivacyError.d.ts +14 -0
- package/dist/src/exceptions/StatsPrivacyError.js +18 -0
- package/dist/src/exceptions/StatsPrivacyError.js.map +1 -0
- package/dist/src/exceptions/StompConnectionError.d.ts +14 -0
- package/dist/src/exceptions/StompConnectionError.js +18 -0
- package/dist/src/exceptions/StompConnectionError.js.map +1 -0
- package/dist/src/exceptions/UserNotFoundError.d.ts +14 -0
- package/dist/src/exceptions/UserNotFoundError.js +18 -0
- package/dist/src/exceptions/UserNotFoundError.js.map +1 -0
- package/dist/src/exceptions/XMPPConnectionError.d.ts +19 -0
- package/dist/src/exceptions/XMPPConnectionError.js +19 -0
- package/dist/src/exceptions/XMPPConnectionError.js.map +1 -0
- package/dist/src/exceptions/XMPPConnectionTimeoutError.d.ts +14 -0
- package/dist/src/exceptions/XMPPConnectionTimeoutError.js +18 -0
- package/dist/src/exceptions/XMPPConnectionTimeoutError.js.map +1 -0
- package/dist/src/http/HTTP.d.ts +40 -0
- package/dist/src/http/HTTP.js +124 -0
- package/dist/src/http/HTTP.js.map +1 -0
- package/dist/src/managers/ChatManager.d.ts +27 -0
- package/dist/src/managers/ChatManager.js +71 -0
- package/dist/src/managers/ChatManager.js.map +1 -0
- package/dist/src/managers/FriendManager.d.ts +66 -0
- package/dist/src/managers/FriendManager.js +175 -0
- package/dist/src/managers/FriendManager.js.map +1 -0
- package/dist/src/managers/STWManager.d.ts +29 -0
- package/dist/src/managers/STWManager.js +80 -0
- package/dist/src/managers/STWManager.js.map +1 -0
- package/dist/src/managers/TournamentManager.d.ts +51 -0
- package/dist/src/managers/TournamentManager.js +182 -0
- package/dist/src/managers/TournamentManager.js.map +1 -0
- package/dist/src/managers/UserManager.d.ts +78 -0
- package/dist/src/managers/UserManager.js +216 -0
- package/dist/src/managers/UserManager.js.map +1 -0
- package/dist/src/stomp/EOSConnect.d.ts +43 -0
- package/dist/src/stomp/EOSConnect.js +175 -0
- package/dist/src/stomp/EOSConnect.js.map +1 -0
- package/dist/src/structures/Avatar.d.ts +27 -0
- package/dist/src/structures/Avatar.js +22 -0
- package/dist/src/structures/Avatar.js.map +1 -0
- package/dist/src/structures/BaseMessage.d.ts +34 -0
- package/dist/src/structures/BaseMessage.js +22 -0
- package/dist/src/structures/BaseMessage.js.map +1 -0
- package/dist/src/structures/CreatorCode.d.ts +31 -0
- package/dist/src/structures/CreatorCode.js +22 -0
- package/dist/src/structures/CreatorCode.js.map +1 -0
- package/dist/src/structures/EpicgamesServerStatus.d.ts +52 -0
- package/dist/src/structures/EpicgamesServerStatus.js +31 -0
- package/dist/src/structures/EpicgamesServerStatus.js.map +1 -0
- package/dist/src/structures/EpicgamesServerStatusComponent.d.ts +67 -0
- package/dist/src/structures/EpicgamesServerStatusComponent.js +37 -0
- package/dist/src/structures/EpicgamesServerStatusComponent.js.map +1 -0
- package/dist/src/structures/EpicgamesServerStatusIncident.d.ts +58 -0
- package/dist/src/structures/EpicgamesServerStatusIncident.js +36 -0
- package/dist/src/structures/EpicgamesServerStatusIncident.js.map +1 -0
- package/dist/src/structures/EpicgamesServerStatusScheduledMainteance.d.ts +21 -0
- package/dist/src/structures/EpicgamesServerStatusScheduledMainteance.js +20 -0
- package/dist/src/structures/EpicgamesServerStatusScheduledMainteance.js.map +1 -0
- package/dist/src/structures/EventTokens.d.ts +32 -0
- package/dist/src/structures/EventTokens.js +45 -0
- package/dist/src/structures/EventTokens.js.map +1 -0
- package/dist/src/structures/FortniteServerStatus.d.ts +46 -0
- package/dist/src/structures/FortniteServerStatus.js +26 -0
- package/dist/src/structures/FortniteServerStatus.js.map +1 -0
- package/dist/src/structures/GlobalProfile.d.ts +36 -0
- package/dist/src/structures/GlobalProfile.js +25 -0
- package/dist/src/structures/GlobalProfile.js.map +1 -0
- package/dist/src/structures/Image.d.ts +36 -0
- package/dist/src/structures/Image.js +38 -0
- package/dist/src/structures/Image.js.map +1 -0
- package/dist/src/structures/NewsMessage.d.ts +56 -0
- package/dist/src/structures/NewsMessage.js +45 -0
- package/dist/src/structures/NewsMessage.js.map +1 -0
- package/dist/src/structures/NewsMessageVideo.d.ts +47 -0
- package/dist/src/structures/NewsMessageVideo.js +32 -0
- package/dist/src/structures/NewsMessageVideo.js.map +1 -0
- package/dist/src/structures/RadioStation.d.ts +31 -0
- package/dist/src/structures/RadioStation.js +33 -0
- package/dist/src/structures/RadioStation.js.map +1 -0
- package/dist/src/structures/Stats.d.ts +45 -0
- package/dist/src/structures/Stats.js +109 -0
- package/dist/src/structures/Stats.js.map +1 -0
- package/dist/src/structures/Tournament.d.ts +86 -0
- package/dist/src/structures/Tournament.js +64 -0
- package/dist/src/structures/Tournament.js.map +1 -0
- package/dist/src/structures/TournamentWindow.d.ts +124 -0
- package/dist/src/structures/TournamentWindow.js +52 -0
- package/dist/src/structures/TournamentWindow.js.map +1 -0
- package/dist/src/structures/friend/BaseFriendMessage.d.ts +32 -0
- package/dist/src/structures/friend/BaseFriendMessage.js +28 -0
- package/dist/src/structures/friend/BaseFriendMessage.js.map +1 -0
- package/dist/src/structures/friend/BasePendingFriend.d.ts +22 -0
- package/dist/src/structures/friend/BasePendingFriend.js +22 -0
- package/dist/src/structures/friend/BasePendingFriend.js.map +1 -0
- package/dist/src/structures/friend/Friend.d.ts +106 -0
- package/dist/src/structures/friend/Friend.js +97 -0
- package/dist/src/structures/friend/Friend.js.map +1 -0
- package/dist/src/structures/friend/FriendPresence.d.ts +84 -0
- package/dist/src/structures/friend/FriendPresence.js +48 -0
- package/dist/src/structures/friend/FriendPresence.js.map +1 -0
- package/dist/src/structures/friend/IncomingPendingFriend.d.ts +27 -0
- package/dist/src/structures/friend/IncomingPendingFriend.js +36 -0
- package/dist/src/structures/friend/IncomingPendingFriend.js.map +1 -0
- package/dist/src/structures/friend/OutgoingPendingFriend.d.ts +17 -0
- package/dist/src/structures/friend/OutgoingPendingFriend.js +24 -0
- package/dist/src/structures/friend/OutgoingPendingFriend.js.map +1 -0
- package/dist/src/structures/friend/ReceivedFriendMessage.d.ts +27 -0
- package/dist/src/structures/friend/ReceivedFriendMessage.js +27 -0
- package/dist/src/structures/friend/ReceivedFriendMessage.js.map +1 -0
- package/dist/src/structures/friend/SentFriendMessage.d.ts +21 -0
- package/dist/src/structures/friend/SentFriendMessage.js +19 -0
- package/dist/src/structures/friend/SentFriendMessage.js.map +1 -0
- package/dist/src/structures/party/BasePartyInvitation.d.ts +48 -0
- package/dist/src/structures/party/BasePartyInvitation.js +33 -0
- package/dist/src/structures/party/BasePartyInvitation.js.map +1 -0
- package/dist/src/structures/party/BasePartyJoinRequest.d.ts +37 -0
- package/dist/src/structures/party/BasePartyJoinRequest.js +30 -0
- package/dist/src/structures/party/BasePartyJoinRequest.js.map +1 -0
- package/dist/src/structures/party/ClientParty.d.ts +162 -0
- package/dist/src/structures/party/ClientParty.js +412 -0
- package/dist/src/structures/party/ClientParty.js.map +1 -0
- package/dist/src/structures/party/ClientPartyMember.d.ts +144 -0
- package/dist/src/structures/party/ClientPartyMember.js +463 -0
- package/dist/src/structures/party/ClientPartyMember.js.map +1 -0
- package/dist/src/structures/party/ClientPartyMemberMeta.d.ts +18 -0
- package/dist/src/structures/party/ClientPartyMemberMeta.js +54 -0
- package/dist/src/structures/party/ClientPartyMemberMeta.js.map +1 -0
- package/dist/src/structures/party/ClientPartyMeta.d.ts +23 -0
- package/dist/src/structures/party/ClientPartyMeta.js +59 -0
- package/dist/src/structures/party/ClientPartyMeta.js.map +1 -0
- package/dist/src/structures/party/Party.d.ts +95 -0
- package/dist/src/structures/party/Party.js +200 -0
- package/dist/src/structures/party/Party.js.map +1 -0
- package/dist/src/structures/party/PartyChat.d.ts +73 -0
- package/dist/src/structures/party/PartyChat.js +76 -0
- package/dist/src/structures/party/PartyChat.js.map +1 -0
- package/dist/src/structures/party/PartyMember.d.ts +139 -0
- package/dist/src/structures/party/PartyMember.js +201 -0
- package/dist/src/structures/party/PartyMember.js.map +1 -0
- package/dist/src/structures/party/PartyMemberConfirmation.d.ts +43 -0
- package/dist/src/structures/party/PartyMemberConfirmation.js +53 -0
- package/dist/src/structures/party/PartyMemberConfirmation.js.map +1 -0
- package/dist/src/structures/party/PartyMemberMeta.d.ts +76 -0
- package/dist/src/structures/party/PartyMemberMeta.js +145 -0
- package/dist/src/structures/party/PartyMemberMeta.js.map +1 -0
- package/dist/src/structures/party/PartyMessage.d.ts +30 -0
- package/dist/src/structures/party/PartyMessage.js +28 -0
- package/dist/src/structures/party/PartyMessage.js.map +1 -0
- package/dist/src/structures/party/PartyMeta.d.ts +24 -0
- package/dist/src/structures/party/PartyMeta.js +43 -0
- package/dist/src/structures/party/PartyMeta.js.map +1 -0
- package/dist/src/structures/party/PresenceParty.d.ts +66 -0
- package/dist/src/structures/party/PresenceParty.js +49 -0
- package/dist/src/structures/party/PresenceParty.js.map +1 -0
- package/dist/src/structures/party/ReceivedPartyInvitation.d.ts +33 -0
- package/dist/src/structures/party/ReceivedPartyInvitation.js +54 -0
- package/dist/src/structures/party/ReceivedPartyInvitation.js.map +1 -0
- package/dist/src/structures/party/ReceivedPartyJoinRequest.d.ts +26 -0
- package/dist/src/structures/party/ReceivedPartyJoinRequest.js +31 -0
- package/dist/src/structures/party/ReceivedPartyJoinRequest.js.map +1 -0
- package/dist/src/structures/party/SentPartyInvitation.d.ts +27 -0
- package/dist/src/structures/party/SentPartyInvitation.js +39 -0
- package/dist/src/structures/party/SentPartyInvitation.js.map +1 -0
- package/dist/src/structures/party/SentPartyJoinRequest.d.ts +19 -0
- package/dist/src/structures/party/SentPartyJoinRequest.js +22 -0
- package/dist/src/structures/party/SentPartyJoinRequest.js.map +1 -0
- package/dist/src/structures/stw/STWHero.d.ts +61 -0
- package/dist/src/structures/stw/STWHero.js +38 -0
- package/dist/src/structures/stw/STWHero.js.map +1 -0
- package/dist/src/structures/stw/STWHeroLoadout.d.ts +44 -0
- package/dist/src/structures/stw/STWHeroLoadout.js +34 -0
- package/dist/src/structures/stw/STWHeroLoadout.js.map +1 -0
- package/dist/src/structures/stw/STWItem.d.ts +31 -0
- package/dist/src/structures/stw/STWItem.js +23 -0
- package/dist/src/structures/stw/STWItem.js.map +1 -0
- package/dist/src/structures/stw/STWLocker.d.ts +32 -0
- package/dist/src/structures/stw/STWLocker.js +26 -0
- package/dist/src/structures/stw/STWLocker.js.map +1 -0
- package/dist/src/structures/stw/STWMeleeWeaponSchematic.d.ts +14 -0
- package/dist/src/structures/stw/STWMeleeWeaponSchematic.js +15 -0
- package/dist/src/structures/stw/STWMeleeWeaponSchematic.js.map +1 -0
- package/dist/src/structures/stw/STWNewsMessage.d.ts +42 -0
- package/dist/src/structures/stw/STWNewsMessage.js +27 -0
- package/dist/src/structures/stw/STWNewsMessage.js.map +1 -0
- package/dist/src/structures/stw/STWProfile.d.ts +132 -0
- package/dist/src/structures/stw/STWProfile.js +283 -0
- package/dist/src/structures/stw/STWProfile.js.map +1 -0
- package/dist/src/structures/stw/STWRangedWeaponSchematic.d.ts +14 -0
- package/dist/src/structures/stw/STWRangedWeaponSchematic.js +15 -0
- package/dist/src/structures/stw/STWRangedWeaponSchematic.js.map +1 -0
- package/dist/src/structures/stw/STWResource.d.ts +27 -0
- package/dist/src/structures/stw/STWResource.js +22 -0
- package/dist/src/structures/stw/STWResource.js.map +1 -0
- package/dist/src/structures/stw/STWSchematic.d.ts +72 -0
- package/dist/src/structures/stw/STWSchematic.js +40 -0
- package/dist/src/structures/stw/STWSchematic.js.map +1 -0
- package/dist/src/structures/stw/STWStats.d.ts +103 -0
- package/dist/src/structures/stw/STWStats.js +85 -0
- package/dist/src/structures/stw/STWStats.js.map +1 -0
- package/dist/src/structures/stw/STWSurvivor.d.ts +104 -0
- package/dist/src/structures/stw/STWSurvivor.js +76 -0
- package/dist/src/structures/stw/STWSurvivor.js.map +1 -0
- package/dist/src/structures/stw/STWTeamPerk.d.ts +19 -0
- package/dist/src/structures/stw/STWTeamPerk.js +20 -0
- package/dist/src/structures/stw/STWTeamPerk.js.map +1 -0
- package/dist/src/structures/stw/STWTrapSchematic.d.ts +15 -0
- package/dist/src/structures/stw/STWTrapSchematic.js +16 -0
- package/dist/src/structures/stw/STWTrapSchematic.js.map +1 -0
- package/dist/src/structures/stw/STWWeaponSchematic.d.ts +15 -0
- package/dist/src/structures/stw/STWWeaponSchematic.js +16 -0
- package/dist/src/structures/stw/STWWeaponSchematic.js.map +1 -0
- package/dist/src/structures/user/BlockedUser.d.ts +13 -0
- package/dist/src/structures/user/BlockedUser.js +19 -0
- package/dist/src/structures/user/BlockedUser.js.map +1 -0
- package/dist/src/structures/user/ClientUser.d.ts +78 -0
- package/dist/src/structures/user/ClientUser.js +34 -0
- package/dist/src/structures/user/ClientUser.js.map +1 -0
- package/dist/src/structures/user/User.d.ts +98 -0
- package/dist/src/structures/user/User.js +130 -0
- package/dist/src/structures/user/User.js.map +1 -0
- package/dist/src/structures/user/UserSearchResult.d.ts +31 -0
- package/dist/src/structures/user/UserSearchResult.js +23 -0
- package/dist/src/structures/user/UserSearchResult.js.map +1 -0
- package/dist/src/util/AsyncLock.d.ts +28 -0
- package/dist/src/util/AsyncLock.js +44 -0
- package/dist/src/util/AsyncLock.js.map +1 -0
- package/dist/src/util/BinaryWriter.d.ts +79 -0
- package/dist/src/util/BinaryWriter.js +136 -0
- package/dist/src/util/BinaryWriter.js.map +1 -0
- package/dist/src/util/CurveTable.d.ts +24 -0
- package/dist/src/util/CurveTable.js +37 -0
- package/dist/src/util/CurveTable.js.map +1 -0
- package/dist/src/util/Meta.d.ts +41 -0
- package/dist/src/util/Meta.js +73 -0
- package/dist/src/util/Meta.js.map +1 -0
- package/dist/src/util/Util.d.ts +162 -0
- package/dist/src/util/Util.js +539 -0
- package/dist/src/util/Util.js.map +1 -0
- package/dist/src/xmpp/XMPP.d.ts +100 -0
- package/dist/src/xmpp/XMPP.js +702 -0
- package/dist/src/xmpp/XMPP.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import STWItem from './STWItem';
|
|
2
|
+
import type Client from '../../Client';
|
|
3
|
+
import type { STWProfileLockerData } from '../../../resources/httpResponses';
|
|
4
|
+
import type { STWLockerBannerData, STWLockerSlotsData } from '../../../resources/structs';
|
|
5
|
+
/**
|
|
6
|
+
* Represents a Save The World profile's locker
|
|
7
|
+
*/
|
|
8
|
+
declare class STWLocker extends STWItem {
|
|
9
|
+
/**
|
|
10
|
+
* The profile's banner data
|
|
11
|
+
*/
|
|
12
|
+
banner: STWLockerBannerData;
|
|
13
|
+
/**
|
|
14
|
+
* The locker's name
|
|
15
|
+
*/
|
|
16
|
+
lockerName?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The amount of times the locker has been used
|
|
19
|
+
*/
|
|
20
|
+
useCount: number;
|
|
21
|
+
/**
|
|
22
|
+
* The locker's slots
|
|
23
|
+
*/
|
|
24
|
+
slots: STWLockerSlotsData;
|
|
25
|
+
/**
|
|
26
|
+
* @param client The main client
|
|
27
|
+
* @param id The item ID
|
|
28
|
+
* @param data The locker data
|
|
29
|
+
*/
|
|
30
|
+
constructor(client: Client, id: string, data: STWProfileLockerData);
|
|
31
|
+
}
|
|
32
|
+
export default STWLocker;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 locker
|
|
7
|
+
*/
|
|
8
|
+
class STWLocker extends STWItem_1.default {
|
|
9
|
+
/**
|
|
10
|
+
* @param client The main client
|
|
11
|
+
* @param id The item ID
|
|
12
|
+
* @param data The locker data
|
|
13
|
+
*/
|
|
14
|
+
constructor(client, id, data) {
|
|
15
|
+
super(client, id, data);
|
|
16
|
+
this.banner = {
|
|
17
|
+
icon: data.attributes.banner_icon_template,
|
|
18
|
+
color: data.attributes.banner_color_template,
|
|
19
|
+
};
|
|
20
|
+
this.lockerName = data.attributes.locker_name;
|
|
21
|
+
this.useCount = data.attributes.use_count;
|
|
22
|
+
this.slots = data.attributes.locker_slots_data.slots;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.default = STWLocker;
|
|
26
|
+
//# sourceMappingURL=STWLocker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"STWLocker.js","sourceRoot":"","sources":["../../../../src/structures/stw/STWLocker.ts"],"names":[],"mappings":";;;AAAA,gEAAgC;AAKhC;;GAEG;AACH,MAAM,SAAU,SAAQ,iBAAO;IAqB7B;;;;OAIG;IACH,YAAY,MAAc,EAAE,EAAU,EAAE,IAA0B;QAChE,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;QAExB,IAAI,CAAC,MAAM,GAAG;YACZ,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,oBAAoB;YAC1C,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,qBAAqB;SAC7C,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;QAC9C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;QAE1C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC;IACvD,CAAC;CACF;AAED,kBAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import STWWeaponSchematic from './STWWeaponSchematic';
|
|
2
|
+
import type { STWSchematicEvoType, STWSchematicMeleeSubType } from '../../../resources/structs';
|
|
3
|
+
import type { STWProfileSchematicData } from '../../../resources/httpResponses';
|
|
4
|
+
import type Client from '../../Client';
|
|
5
|
+
declare class STWMeleeWeaponSchematic extends STWWeaponSchematic {
|
|
6
|
+
type: 'melee';
|
|
7
|
+
subType: STWSchematicMeleeSubType;
|
|
8
|
+
constructor(client: Client, id: string, data: STWProfileSchematicData & {
|
|
9
|
+
type: 'melee';
|
|
10
|
+
subType: STWSchematicMeleeSubType;
|
|
11
|
+
evoType: STWSchematicEvoType;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export default STWMeleeWeaponSchematic;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const STWWeaponSchematic_1 = tslib_1.__importDefault(require("./STWWeaponSchematic"));
|
|
5
|
+
const Util_1 = require("../../util/Util");
|
|
6
|
+
class STWMeleeWeaponSchematic extends STWWeaponSchematic_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
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.default = STWMeleeWeaponSchematic;
|
|
15
|
+
//# sourceMappingURL=STWMeleeWeaponSchematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"STWMeleeWeaponSchematic.js","sourceRoot":"","sources":["../../../../src/structures/stw/STWMeleeWeaponSchematic.ts"],"names":[],"mappings":";;;AAAA,sFAAsD;AACtD,0CAA8D;AAK9D,MAAM,uBAAwB,SAAQ,4BAAkB;IAItD,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,IAAiB,CAAC;QAC9C,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC,OAAmC,CAAC;IACrE,CAAC;CACF;AAED,kBAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import Base from '../../Base';
|
|
2
|
+
import Image from '../Image';
|
|
3
|
+
import type Client from '../../Client';
|
|
4
|
+
/**
|
|
5
|
+
* Represents a fortnite save the world news message
|
|
6
|
+
*/
|
|
7
|
+
declare class STWNewsMessage extends Base {
|
|
8
|
+
/**
|
|
9
|
+
* The news message's title
|
|
10
|
+
*/
|
|
11
|
+
title: string;
|
|
12
|
+
/**
|
|
13
|
+
* The news message's body
|
|
14
|
+
*/
|
|
15
|
+
body: string;
|
|
16
|
+
/**
|
|
17
|
+
* The news message's image
|
|
18
|
+
*/
|
|
19
|
+
image: Image;
|
|
20
|
+
/**
|
|
21
|
+
* The news message's type
|
|
22
|
+
*/
|
|
23
|
+
type: string;
|
|
24
|
+
/**
|
|
25
|
+
* The news message's adspace
|
|
26
|
+
*/
|
|
27
|
+
adspace: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the news message is hidden
|
|
30
|
+
*/
|
|
31
|
+
isHidden: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the news message is a spotlight
|
|
34
|
+
*/
|
|
35
|
+
isSpotlight: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* @param client The main client
|
|
38
|
+
* @param data The news message data
|
|
39
|
+
*/
|
|
40
|
+
constructor(client: Client, data: any);
|
|
41
|
+
}
|
|
42
|
+
export default STWNewsMessage;
|
|
@@ -0,0 +1,27 @@
|
|
|
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 fortnite save the world news message
|
|
8
|
+
*/
|
|
9
|
+
class STWNewsMessage extends Base_1.default {
|
|
10
|
+
/**
|
|
11
|
+
* @param client The main client
|
|
12
|
+
* @param data The news message data
|
|
13
|
+
*/
|
|
14
|
+
constructor(client, data) {
|
|
15
|
+
super(client);
|
|
16
|
+
this.title = data.title;
|
|
17
|
+
this.body = data.body;
|
|
18
|
+
this.image = new Image_1.default(this.client, { url: data.image });
|
|
19
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
20
|
+
this.type = data._type;
|
|
21
|
+
this.adspace = data.adspace;
|
|
22
|
+
this.isHidden = data.hidden;
|
|
23
|
+
this.isSpotlight = data.spotlight;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.default = STWNewsMessage;
|
|
27
|
+
//# sourceMappingURL=STWNewsMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"STWNewsMessage.js","sourceRoot":"","sources":["../../../../src/structures/stw/STWNewsMessage.ts"],"names":[],"mappings":";;;AAAA,8DAA8B;AAC9B,6DAA6B;AAG7B;;GAEG;AACH,MAAM,cAAe,SAAQ,cAAI;IAoC/B;;;OAGG;IACH,YAAY,MAAc,EAAE,IAAS;QACnC,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,IAAI,eAAK,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QACzD,gDAAgD;QAChD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC;IACpC,CAAC;CACF;AAED,kBAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import STWHero from './STWHero';
|
|
2
|
+
import STWHeroLoadout from './STWHeroLoadout';
|
|
3
|
+
import STWItem from './STWItem';
|
|
4
|
+
import STWLocker from './STWLocker';
|
|
5
|
+
import STWResource from './STWResource';
|
|
6
|
+
import STWSchematic from './STWSchematic';
|
|
7
|
+
import STWStats from './STWStats';
|
|
8
|
+
import STWSurvivor from './STWSurvivor';
|
|
9
|
+
import STWTeamPerk from './STWTeamPerk';
|
|
10
|
+
import STWTrapSchematic from './STWTrapSchematic';
|
|
11
|
+
import STWWeaponSchematic from './STWWeaponSchematic';
|
|
12
|
+
import User from '../user/User';
|
|
13
|
+
import type Client from '../../Client';
|
|
14
|
+
import type { STWFORTStats, STWSurvivorSquads, UserData } from '../../../resources/structs';
|
|
15
|
+
import type { STWProfileData } from '../../../resources/httpResponses';
|
|
16
|
+
/**
|
|
17
|
+
* Represents a Save The World profile
|
|
18
|
+
*/
|
|
19
|
+
declare class STWProfile extends User {
|
|
20
|
+
/**
|
|
21
|
+
* The profile ID
|
|
22
|
+
*/
|
|
23
|
+
profileId: string;
|
|
24
|
+
/**
|
|
25
|
+
* The profile's creation date
|
|
26
|
+
*/
|
|
27
|
+
createdAt: Date;
|
|
28
|
+
/**
|
|
29
|
+
* The profile's last updated date
|
|
30
|
+
*/
|
|
31
|
+
updatedAt: Date;
|
|
32
|
+
/**
|
|
33
|
+
* The profile's revision
|
|
34
|
+
*/
|
|
35
|
+
revision: number;
|
|
36
|
+
/**
|
|
37
|
+
* The profile's wipe number
|
|
38
|
+
*/
|
|
39
|
+
wipeNumber: number;
|
|
40
|
+
/**
|
|
41
|
+
* The profile version
|
|
42
|
+
*/
|
|
43
|
+
version: string;
|
|
44
|
+
/**
|
|
45
|
+
* The profile's command revision
|
|
46
|
+
*/
|
|
47
|
+
commandRevision: number;
|
|
48
|
+
/**
|
|
49
|
+
* The profile's items
|
|
50
|
+
*/
|
|
51
|
+
items: (STWItem | STWSurvivor | STWLocker | STWResource | STWHero | STWHeroLoadout | STWSchematic | STWTeamPerk)[];
|
|
52
|
+
/**
|
|
53
|
+
* The profile's stats
|
|
54
|
+
*/
|
|
55
|
+
stats: STWStats;
|
|
56
|
+
/**
|
|
57
|
+
* @param client The main client
|
|
58
|
+
* @param data The profile data
|
|
59
|
+
* @param userData The user data
|
|
60
|
+
*/
|
|
61
|
+
constructor(client: Client, data: STWProfileData, userData: UserData);
|
|
62
|
+
/**
|
|
63
|
+
* Returns the profile's survivors
|
|
64
|
+
*/
|
|
65
|
+
get survivors(): STWSurvivor[];
|
|
66
|
+
/**
|
|
67
|
+
* The profile's survivor squads
|
|
68
|
+
*/
|
|
69
|
+
get survivorSquads(): STWSurvivorSquads;
|
|
70
|
+
/**
|
|
71
|
+
* The profile's locker
|
|
72
|
+
*/
|
|
73
|
+
get locker(): STWLocker;
|
|
74
|
+
/**
|
|
75
|
+
* The profile's resources
|
|
76
|
+
*/
|
|
77
|
+
get resources(): STWResource[];
|
|
78
|
+
/**
|
|
79
|
+
* The profile's heroes
|
|
80
|
+
*/
|
|
81
|
+
get heroes(): STWHero[];
|
|
82
|
+
/**
|
|
83
|
+
* The profile's hero loadouts
|
|
84
|
+
*/
|
|
85
|
+
get heroLoadouts(): STWHeroLoadout[];
|
|
86
|
+
/**
|
|
87
|
+
* The profile's schematics
|
|
88
|
+
*/
|
|
89
|
+
get schematics(): STWSchematic[];
|
|
90
|
+
/**
|
|
91
|
+
* The profile's weapon schematics
|
|
92
|
+
*/
|
|
93
|
+
get weaponSchematics(): STWWeaponSchematic[];
|
|
94
|
+
/**
|
|
95
|
+
* The profile's trap schematics
|
|
96
|
+
*/
|
|
97
|
+
get trapSchematics(): STWTrapSchematic[];
|
|
98
|
+
/**
|
|
99
|
+
* The profile's team perks
|
|
100
|
+
*/
|
|
101
|
+
get teamPerks(): STWTeamPerk[];
|
|
102
|
+
/**
|
|
103
|
+
* The profile's power level
|
|
104
|
+
*/
|
|
105
|
+
get powerLevel(): number;
|
|
106
|
+
/**
|
|
107
|
+
* The profile's ventures power level
|
|
108
|
+
*/
|
|
109
|
+
get venturesPowerLevel(): number;
|
|
110
|
+
/**
|
|
111
|
+
* The profile's FORT stats
|
|
112
|
+
*/
|
|
113
|
+
get FORTStats(): STWFORTStats;
|
|
114
|
+
/**
|
|
115
|
+
* The profile's survivor squads' FORT stats
|
|
116
|
+
*/
|
|
117
|
+
get survivorFORTStats(): STWFORTStats;
|
|
118
|
+
/**
|
|
119
|
+
* The profile's research FORT stats
|
|
120
|
+
*/
|
|
121
|
+
get researchFORTStats(): STWFORTStats;
|
|
122
|
+
/**
|
|
123
|
+
* The profile's ventures FORT stats
|
|
124
|
+
*/
|
|
125
|
+
get venturesFORTStats(): STWFORTStats;
|
|
126
|
+
/**
|
|
127
|
+
* Whether the profile is a founder
|
|
128
|
+
* (Whether it can receive vbucks rewards)
|
|
129
|
+
*/
|
|
130
|
+
get isFounder(): boolean;
|
|
131
|
+
}
|
|
132
|
+
export default STWProfile;
|
|
@@ -0,0 +1,283 @@
|
|
|
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 PowerLevelCurves_1 = tslib_1.__importDefault(require("../../../resources/PowerLevelCurves"));
|
|
7
|
+
const Util_1 = require("../../util/Util");
|
|
8
|
+
const STWHero_1 = tslib_1.__importDefault(require("./STWHero"));
|
|
9
|
+
const STWHeroLoadout_1 = tslib_1.__importDefault(require("./STWHeroLoadout"));
|
|
10
|
+
const STWItem_1 = tslib_1.__importDefault(require("./STWItem"));
|
|
11
|
+
const STWLocker_1 = tslib_1.__importDefault(require("./STWLocker"));
|
|
12
|
+
const STWMeleeWeaponSchematic_1 = tslib_1.__importDefault(require("./STWMeleeWeaponSchematic"));
|
|
13
|
+
const STWRangedWeaponSchematic_1 = tslib_1.__importDefault(require("./STWRangedWeaponSchematic"));
|
|
14
|
+
const STWResource_1 = tslib_1.__importDefault(require("./STWResource"));
|
|
15
|
+
const STWSchematic_1 = tslib_1.__importDefault(require("./STWSchematic"));
|
|
16
|
+
const STWStats_1 = tslib_1.__importDefault(require("./STWStats"));
|
|
17
|
+
const STWSurvivor_1 = tslib_1.__importDefault(require("./STWSurvivor"));
|
|
18
|
+
const STWTeamPerk_1 = tslib_1.__importDefault(require("./STWTeamPerk"));
|
|
19
|
+
const STWTrapSchematic_1 = tslib_1.__importDefault(require("./STWTrapSchematic"));
|
|
20
|
+
const STWWeaponSchematic_1 = tslib_1.__importDefault(require("./STWWeaponSchematic"));
|
|
21
|
+
const User_1 = tslib_1.__importDefault(require("../user/User"));
|
|
22
|
+
/**
|
|
23
|
+
* Represents a Save The World profile
|
|
24
|
+
*/
|
|
25
|
+
class STWProfile extends User_1.default {
|
|
26
|
+
/**
|
|
27
|
+
* @param client The main client
|
|
28
|
+
* @param data The profile data
|
|
29
|
+
* @param userData The user data
|
|
30
|
+
*/
|
|
31
|
+
constructor(client, data, userData) {
|
|
32
|
+
super(client, userData);
|
|
33
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
34
|
+
this.profileId = data._id;
|
|
35
|
+
this.createdAt = new Date(data.created);
|
|
36
|
+
this.updatedAt = new Date(data.updated);
|
|
37
|
+
this.revision = data.rvn;
|
|
38
|
+
this.wipeNumber = data.wipeNumber;
|
|
39
|
+
this.version = data.version;
|
|
40
|
+
this.commandRevision = data.commandRevision;
|
|
41
|
+
this.items = [];
|
|
42
|
+
for (const [itemId, item] of Object.entries(data.items)) {
|
|
43
|
+
const itemType = item.templateId.split(':')[0];
|
|
44
|
+
switch (itemType) {
|
|
45
|
+
case 'Worker':
|
|
46
|
+
this.items.push(new STWSurvivor_1.default(this.client, itemId, item));
|
|
47
|
+
break;
|
|
48
|
+
case 'CosmeticLocker':
|
|
49
|
+
this.items.push(new STWLocker_1.default(this.client, itemId, item));
|
|
50
|
+
break;
|
|
51
|
+
case 'AccountResource':
|
|
52
|
+
this.items.push(new STWResource_1.default(this.client, itemId, item));
|
|
53
|
+
break;
|
|
54
|
+
case 'Hero':
|
|
55
|
+
this.items.push(new STWHero_1.default(this.client, itemId, item));
|
|
56
|
+
break;
|
|
57
|
+
case 'CampaignHeroLoadout':
|
|
58
|
+
this.items.push(new STWHeroLoadout_1.default(this.client, itemId, item));
|
|
59
|
+
break;
|
|
60
|
+
case 'Schematic':
|
|
61
|
+
switch ((0, Util_1.parseSTWSchematicTemplateId)(item.templateId).type) {
|
|
62
|
+
case 'melee':
|
|
63
|
+
this.items.push(new STWMeleeWeaponSchematic_1.default(this.client, itemId, item));
|
|
64
|
+
break;
|
|
65
|
+
case 'ranged':
|
|
66
|
+
this.items.push(new STWRangedWeaponSchematic_1.default(this.client, itemId, item));
|
|
67
|
+
break;
|
|
68
|
+
case 'trap':
|
|
69
|
+
this.items.push(new STWTrapSchematic_1.default(this.client, itemId, item));
|
|
70
|
+
break;
|
|
71
|
+
default:
|
|
72
|
+
this.items.push(new STWSchematic_1.default(this.client, itemId, item));
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
break;
|
|
76
|
+
case 'TeamPerk':
|
|
77
|
+
this.items.push(new STWTeamPerk_1.default(this.client, itemId, item));
|
|
78
|
+
break;
|
|
79
|
+
default:
|
|
80
|
+
this.items.push(new STWItem_1.default(this.client, itemId, item));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
this.stats = new STWStats_1.default(this.client, data.stats.attributes);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Returns the profile's survivors
|
|
87
|
+
*/
|
|
88
|
+
get survivors() {
|
|
89
|
+
return this.items.filter((i) => i instanceof STWSurvivor_1.default);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The profile's survivor squads
|
|
93
|
+
*/
|
|
94
|
+
get survivorSquads() {
|
|
95
|
+
const survivorSquads = {
|
|
96
|
+
trainingteam: [],
|
|
97
|
+
fireteamalpha: [],
|
|
98
|
+
closeassaultsquad: [],
|
|
99
|
+
thethinktank: [],
|
|
100
|
+
emtsquad: [],
|
|
101
|
+
corpsofengineering: [],
|
|
102
|
+
scoutingparty: [],
|
|
103
|
+
gadgeteers: [],
|
|
104
|
+
};
|
|
105
|
+
for (const survivor of this.survivors.filter((s) => !!s.squad)) {
|
|
106
|
+
survivorSquads[survivor.squad.name].push(survivor);
|
|
107
|
+
}
|
|
108
|
+
return survivorSquads;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The profile's locker
|
|
112
|
+
*/
|
|
113
|
+
get locker() {
|
|
114
|
+
return this.items.find((i) => i instanceof STWLocker_1.default);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The profile's resources
|
|
118
|
+
*/
|
|
119
|
+
get resources() {
|
|
120
|
+
return this.items.filter((i) => i instanceof STWResource_1.default);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The profile's heroes
|
|
124
|
+
*/
|
|
125
|
+
get heroes() {
|
|
126
|
+
return this.items.filter((i) => i instanceof STWHero_1.default);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* The profile's hero loadouts
|
|
130
|
+
*/
|
|
131
|
+
get heroLoadouts() {
|
|
132
|
+
return this.items.filter((i) => i instanceof STWHeroLoadout_1.default)
|
|
133
|
+
.sort((a, b) => a.loadoutIndex - b.loadoutIndex);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The profile's schematics
|
|
137
|
+
*/
|
|
138
|
+
get schematics() {
|
|
139
|
+
return this.items.filter((i) => i instanceof STWSchematic_1.default);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* The profile's weapon schematics
|
|
143
|
+
*/
|
|
144
|
+
get weaponSchematics() {
|
|
145
|
+
return this.items.filter((i) => i instanceof STWWeaponSchematic_1.default);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The profile's trap schematics
|
|
149
|
+
*/
|
|
150
|
+
get trapSchematics() {
|
|
151
|
+
return this.items.filter((i) => i instanceof STWTrapSchematic_1.default);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* The profile's team perks
|
|
155
|
+
*/
|
|
156
|
+
get teamPerks() {
|
|
157
|
+
return this.items.filter((i) => i instanceof STWTeamPerk_1.default);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* The profile's power level
|
|
161
|
+
*/
|
|
162
|
+
get powerLevel() {
|
|
163
|
+
const totalFORTStats = Object.values(this.FORTStats).reduce((prev, cur) => prev + cur);
|
|
164
|
+
return PowerLevelCurves_1.default.homebaseRating.eval(totalFORTStats * 4);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* The profile's ventures power level
|
|
168
|
+
*/
|
|
169
|
+
get venturesPowerLevel() {
|
|
170
|
+
const totalFORTStats = Object.values(this.venturesFORTStats).reduce((prev, cur) => prev + cur);
|
|
171
|
+
return PowerLevelCurves_1.default.homebaseRating.eval(totalFORTStats * 4);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* The profile's FORT stats
|
|
175
|
+
*/
|
|
176
|
+
get FORTStats() {
|
|
177
|
+
const FORTStats = {
|
|
178
|
+
fortitude: 0,
|
|
179
|
+
offense: 0,
|
|
180
|
+
resistance: 0,
|
|
181
|
+
tech: 0,
|
|
182
|
+
};
|
|
183
|
+
for (const FORTStat of [this.survivorFORTStats, this.researchFORTStats]) {
|
|
184
|
+
Object.keys(FORTStat).forEach((k) => {
|
|
185
|
+
FORTStats[k] += FORTStat[k];
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
return FORTStats;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* The profile's survivor squads' FORT stats
|
|
192
|
+
*/
|
|
193
|
+
get survivorFORTStats() {
|
|
194
|
+
const survivorFORTStats = {
|
|
195
|
+
fortitude: 0,
|
|
196
|
+
offense: 0,
|
|
197
|
+
resistance: 0,
|
|
198
|
+
tech: 0,
|
|
199
|
+
};
|
|
200
|
+
for (const survivorSquad of Object.values(this.survivorSquads)) {
|
|
201
|
+
const leadSurvivor = survivorSquad.find((s) => s.squad.slotIdx === 0);
|
|
202
|
+
for (const survivor of survivorSquad) {
|
|
203
|
+
let totalBonus = survivor.powerLevel;
|
|
204
|
+
if (survivor.squad.slotIdx === 0)
|
|
205
|
+
totalBonus += survivor.leadBonus;
|
|
206
|
+
else if (leadSurvivor)
|
|
207
|
+
totalBonus += survivor.calcSurvivorBonus(leadSurvivor);
|
|
208
|
+
switch (survivor.squad.type) {
|
|
209
|
+
case 'medicine':
|
|
210
|
+
survivorFORTStats.fortitude += totalBonus;
|
|
211
|
+
break;
|
|
212
|
+
case 'arms':
|
|
213
|
+
survivorFORTStats.offense += totalBonus;
|
|
214
|
+
break;
|
|
215
|
+
case 'synthesis':
|
|
216
|
+
survivorFORTStats.tech += totalBonus;
|
|
217
|
+
break;
|
|
218
|
+
case 'scavenging':
|
|
219
|
+
survivorFORTStats.resistance += totalBonus;
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return survivorFORTStats;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* The profile's research FORT stats
|
|
228
|
+
*/
|
|
229
|
+
get researchFORTStats() {
|
|
230
|
+
const survivorFORTStats = {
|
|
231
|
+
fortitude: 0,
|
|
232
|
+
offense: 0,
|
|
233
|
+
resistance: 0,
|
|
234
|
+
tech: 0,
|
|
235
|
+
};
|
|
236
|
+
for (const value of this.items) {
|
|
237
|
+
if (value.templateId.startsWith('Stat:') && !value.templateId.includes('phoenix')) {
|
|
238
|
+
if (value.templateId.includes('fortitude'))
|
|
239
|
+
survivorFORTStats.fortitude += value.quantity;
|
|
240
|
+
else if (value.templateId.includes('resistance'))
|
|
241
|
+
survivorFORTStats.resistance += value.quantity;
|
|
242
|
+
else if (value.templateId.includes('technology'))
|
|
243
|
+
survivorFORTStats.tech += value.quantity;
|
|
244
|
+
else if (value.templateId.includes('offense'))
|
|
245
|
+
survivorFORTStats.offense += value.quantity;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return survivorFORTStats;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* The profile's ventures FORT stats
|
|
252
|
+
*/
|
|
253
|
+
get venturesFORTStats() {
|
|
254
|
+
const venturesFORTStats = {
|
|
255
|
+
fortitude: 0,
|
|
256
|
+
offense: 0,
|
|
257
|
+
resistance: 0,
|
|
258
|
+
tech: 0,
|
|
259
|
+
};
|
|
260
|
+
for (const value of this.items) {
|
|
261
|
+
if (value.templateId.startsWith('Stat:') && value.templateId.includes('phoenix')) {
|
|
262
|
+
if (value.templateId.includes('fortitude'))
|
|
263
|
+
venturesFORTStats.fortitude += value.quantity;
|
|
264
|
+
else if (value.templateId.includes('resistance'))
|
|
265
|
+
venturesFORTStats.resistance += value.quantity;
|
|
266
|
+
else if (value.templateId.includes('technology'))
|
|
267
|
+
venturesFORTStats.tech += value.quantity;
|
|
268
|
+
else if (value.templateId.includes('offense'))
|
|
269
|
+
venturesFORTStats.offense += value.quantity;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return venturesFORTStats;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Whether the profile is a founder
|
|
276
|
+
* (Whether it can receive vbucks rewards)
|
|
277
|
+
*/
|
|
278
|
+
get isFounder() {
|
|
279
|
+
return this.items.some((i) => i.templateId === 'Token:receivemtxcurrency');
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
exports.default = STWProfile;
|
|
283
|
+
//# sourceMappingURL=STWProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"STWProfile.js","sourceRoot":"","sources":["../../../../src/structures/stw/STWProfile.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAC3C,yCAAyC;AACzC,mGAAmE;AACnE,0CAA8D;AAC9D,gEAAgC;AAChC,8EAA8C;AAC9C,gEAAgC;AAChC,oEAAoC;AACpC,gGAAgE;AAChE,kGAAkE;AAClE,wEAAwC;AACxC,0EAA0C;AAC1C,kEAAkC;AAClC,wEAAwC;AACxC,wEAAwC;AACxC,kFAAkD;AAClD,sFAAsD;AACtD,gEAAgC;AAqBhC;;GAEG;AACH,MAAM,UAAW,SAAQ,cAAI;IA8C3B;;;;OAIG;IACH,YAAY,MAAc,EAAE,IAAoB,EAAE,QAAkB;QAClE,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAExB,gDAAgD;QAChD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxC,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,IAA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AAC,CAAC,UAAU,KAAK,0BAA0B,CAAC,CAAC;IAC7E,CAAC;CACF;AAED,kBAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import STWWeaponSchematic from './STWWeaponSchematic';
|
|
2
|
+
import type { STWSchematicEvoType, STWSchematicRangedSubType } from '../../../resources/structs';
|
|
3
|
+
import type { STWProfileSchematicData } from '../../../resources/httpResponses';
|
|
4
|
+
import type Client from '../../Client';
|
|
5
|
+
declare class STWRangedWeaponSchematic extends STWWeaponSchematic {
|
|
6
|
+
type: 'ranged';
|
|
7
|
+
subType: STWSchematicRangedSubType;
|
|
8
|
+
constructor(client: Client, id: string, data: STWProfileSchematicData & {
|
|
9
|
+
type: 'ranged';
|
|
10
|
+
subType: STWSchematicRangedSubType;
|
|
11
|
+
evoType: STWSchematicEvoType;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export default STWRangedWeaponSchematic;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const STWWeaponSchematic_1 = tslib_1.__importDefault(require("./STWWeaponSchematic"));
|
|
5
|
+
const Util_1 = require("../../util/Util");
|
|
6
|
+
class STWRangedWeaponSchematic extends STWWeaponSchematic_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
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.default = STWRangedWeaponSchematic;
|
|
15
|
+
//# sourceMappingURL=STWRangedWeaponSchematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"STWRangedWeaponSchematic.js","sourceRoot":"","sources":["../../../../src/structures/stw/STWRangedWeaponSchematic.ts"],"names":[],"mappings":";;;AAAA,sFAAsD;AACtD,0CAA8D;AAK9D,MAAM,wBAAyB,SAAQ,4BAAkB;IAIvD,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,IAAgB,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC,OAAoC,CAAC;IACtE,CAAC;CACF;AAED,kBAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import STWItem from './STWItem';
|
|
2
|
+
import type Client from '../../Client';
|
|
3
|
+
import type { STWProfileResourceData } from '../../../resources/httpResponses';
|
|
4
|
+
/**
|
|
5
|
+
* Represents a Save The World profile's resource
|
|
6
|
+
*/
|
|
7
|
+
declare class STWResource extends STWItem {
|
|
8
|
+
/**
|
|
9
|
+
* The resource's ID
|
|
10
|
+
*/
|
|
11
|
+
resourceId: string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the resource is marked as favorite
|
|
14
|
+
*/
|
|
15
|
+
isFavorite: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the resource is marked as seen
|
|
18
|
+
*/
|
|
19
|
+
isSeen: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @param client The main client
|
|
22
|
+
* @param id The item ID
|
|
23
|
+
* @param data The resource data
|
|
24
|
+
*/
|
|
25
|
+
constructor(client: Client, id: string, data: STWProfileResourceData);
|
|
26
|
+
}
|
|
27
|
+
export default STWResource;
|