@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,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const PartyPermissionError_1 = tslib_1.__importDefault(require("../../exceptions/PartyPermissionError"));
|
|
5
|
+
const PartyMemberMeta_1 = tslib_1.__importDefault(require("./PartyMemberMeta"));
|
|
6
|
+
const User_1 = tslib_1.__importDefault(require("../user/User"));
|
|
7
|
+
/**
|
|
8
|
+
* Represents a party member
|
|
9
|
+
*/
|
|
10
|
+
class PartyMember extends User_1.default {
|
|
11
|
+
/**
|
|
12
|
+
* @param party The party this member belongs to
|
|
13
|
+
* @param data The member's data
|
|
14
|
+
*/
|
|
15
|
+
constructor(party, data) {
|
|
16
|
+
super(party.client, {
|
|
17
|
+
...data,
|
|
18
|
+
displayName: data.account_dn,
|
|
19
|
+
id: data.account_id,
|
|
20
|
+
});
|
|
21
|
+
this.party = party;
|
|
22
|
+
this.role = data.role;
|
|
23
|
+
this.joinedAt = new Date(data.joined_at);
|
|
24
|
+
this.meta = new PartyMemberMeta_1.default(data.meta);
|
|
25
|
+
this.revision = data.revision;
|
|
26
|
+
this.receivedInitialStateUpdate = false;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Whether this member is the leader of the party
|
|
30
|
+
*/
|
|
31
|
+
get isLeader() {
|
|
32
|
+
return this.role === 'CAPTAIN';
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The member's currently equipped outfit CID
|
|
36
|
+
*/
|
|
37
|
+
get outfit() {
|
|
38
|
+
return this.meta.outfit;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The member's currently equipped pickaxe ID
|
|
42
|
+
*/
|
|
43
|
+
get pickaxe() {
|
|
44
|
+
return this.meta.pickaxe;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The member's current emote EID
|
|
48
|
+
*/
|
|
49
|
+
get emote() {
|
|
50
|
+
return this.meta.emote;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The member's currently equipped backpack BID
|
|
54
|
+
*/
|
|
55
|
+
get backpack() {
|
|
56
|
+
return this.meta.backpack;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Whether the member is ready
|
|
60
|
+
*/
|
|
61
|
+
get isReady() {
|
|
62
|
+
return this.meta.isReady;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Whether the member is sitting out
|
|
66
|
+
*/
|
|
67
|
+
get isSittingOut() {
|
|
68
|
+
return this.meta.isSittingOut;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The member's current input method
|
|
72
|
+
*/
|
|
73
|
+
get inputMethod() {
|
|
74
|
+
return this.meta.input;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The member's cosmetic variants
|
|
78
|
+
*/
|
|
79
|
+
get variants() {
|
|
80
|
+
return this.meta.variants;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The member's custom data store
|
|
84
|
+
*/
|
|
85
|
+
get customDataStore() {
|
|
86
|
+
return this.meta.customDataStore;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The member's banner info
|
|
90
|
+
*/
|
|
91
|
+
get banner() {
|
|
92
|
+
return this.meta.banner;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The member's battlepass info
|
|
96
|
+
*/
|
|
97
|
+
get battlepass() {
|
|
98
|
+
return this.meta.battlepass;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The member's platform
|
|
102
|
+
*/
|
|
103
|
+
get platform() {
|
|
104
|
+
return this.meta.platform;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* The member's match info
|
|
108
|
+
*/
|
|
109
|
+
get matchInfo() {
|
|
110
|
+
return this.meta.match;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* The member's current playlist
|
|
114
|
+
*/
|
|
115
|
+
get playlist() {
|
|
116
|
+
return this.meta.island;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Whether a marker has been set
|
|
120
|
+
*/
|
|
121
|
+
get isMarkerSet() {
|
|
122
|
+
return this.meta.isMarkerSet;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The member's marker location [x, y] tuple.
|
|
126
|
+
* [0, 0] if there is no marker set
|
|
127
|
+
*/
|
|
128
|
+
get markerLocation() {
|
|
129
|
+
return this.meta.markerLocation;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Kicks this member from the client's party.
|
|
133
|
+
* @throws {PartyPermissionError} The client is not a member or not the leader of the party
|
|
134
|
+
*/
|
|
135
|
+
async kick() {
|
|
136
|
+
// This is a very hacky solution, but it's required since we cannot import ClientParty (circular dependencies)
|
|
137
|
+
if (typeof this.party.kick !== 'function')
|
|
138
|
+
throw new PartyPermissionError_1.default();
|
|
139
|
+
return this.party.kick(this.id);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Promotes this member
|
|
143
|
+
* @throws {PartyPermissionError} The client is not a member or not the leader of the party
|
|
144
|
+
*/
|
|
145
|
+
async promote() {
|
|
146
|
+
// This is a very hacky solution, but it's required since we cannot import ClientParty (circular dependencies)
|
|
147
|
+
if (typeof this.party.promote !== 'function')
|
|
148
|
+
throw new PartyPermissionError_1.default();
|
|
149
|
+
return this.party.promote(this.id);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Hides this member
|
|
153
|
+
* @param hide Whether the member should be hidden
|
|
154
|
+
* @throws {PartyPermissionError} The client is not the leader of the party
|
|
155
|
+
* @throws {EpicgamesAPIError}
|
|
156
|
+
*/
|
|
157
|
+
async hide(hide = true) {
|
|
158
|
+
// This is a very hacky solution, but it's required since we cannot import ClientParty (circular dependencies)
|
|
159
|
+
if (typeof this.party.hideMember !== 'function')
|
|
160
|
+
throw new PartyPermissionError_1.default();
|
|
161
|
+
return this.party.hideMember(this.id, hide);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Bans this member from the client's party.
|
|
165
|
+
*/
|
|
166
|
+
async chatBan() {
|
|
167
|
+
// This is a very hacky solution, but it's required since we cannot import ClientParty (circular dependencies)
|
|
168
|
+
if (typeof this.party.chatBan !== 'function')
|
|
169
|
+
throw new PartyPermissionError_1.default();
|
|
170
|
+
return this.party.chatBan(this.id);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Updates this members data
|
|
174
|
+
* @param data The update data
|
|
175
|
+
*/
|
|
176
|
+
updateData(data) {
|
|
177
|
+
if (data.revision > this.revision)
|
|
178
|
+
this.revision = data.revision;
|
|
179
|
+
if (data.account_dn !== this.displayName)
|
|
180
|
+
this.update({ id: this.id, displayName: data.account_dn, externalAuths: this.externalAuths });
|
|
181
|
+
this.meta.update(data.member_state_updated, true);
|
|
182
|
+
this.meta.remove(data.member_state_removed);
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Converts this party member into an object
|
|
186
|
+
*/
|
|
187
|
+
toObject() {
|
|
188
|
+
return {
|
|
189
|
+
id: this.id,
|
|
190
|
+
account_id: this.id,
|
|
191
|
+
joined_at: this.joinedAt.toISOString(),
|
|
192
|
+
updated_at: new Date().toISOString(),
|
|
193
|
+
meta: this.meta.schema,
|
|
194
|
+
revision: 0,
|
|
195
|
+
role: this.role,
|
|
196
|
+
account_dn: this.displayName,
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
exports.default = PartyMember;
|
|
201
|
+
//# sourceMappingURL=PartyMember.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PartyMember.js","sourceRoot":"","sources":["../../../../src/structures/party/PartyMember.ts"],"names":[],"mappings":";;;AAAA,yGAAyE;AACzE,gFAAgD;AAChD,gEAAgC;AAKhC;;GAEG;AACH,MAAM,WAAY,SAAQ,cAAI;IA+B5B;;;OAGG;IACH,YAAY,KAA0B,EAAE,IAAqB;QAC3D,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE;YAClB,GAAG,IAAI;YACP,WAAW,EAAE,IAAI,CAAC,UAAU;YAC5B,EAAE,EAAE,IAAI,CAAC,UAAU;SACpB,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,yBAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,0BAA0B,GAAG,KAAK,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACjB,OA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,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9C,CAAC;IAED;;;OAGG;IACI,UAAU,CAAC,IAA2B;QAC3C,IAAI,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ;YAAE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QACjE,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI,CAAC,WAAW;YAAE,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,UAAU,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QAExI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;QAClD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAmD,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACa,QAAQ;QACtB,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,UAAU,EAAE,IAAI,CAAC,EAAE;YACnB,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE;YACtC,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM;YACtB,QAAQ,EAAE,CAAC;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,UAAU,EAAE,IAAI,CAAC,WAAW;SAC7B,CAAC;IACJ,CAAC;CACF;AAED,kBAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import Base from '../../Base';
|
|
2
|
+
import type Client from '../../Client';
|
|
3
|
+
import type ClientParty from './ClientParty';
|
|
4
|
+
import type User from '../user/User';
|
|
5
|
+
/**
|
|
6
|
+
* Represents a party member join confirmation request
|
|
7
|
+
*/
|
|
8
|
+
declare class PartyMemberConfirmation extends Base {
|
|
9
|
+
/**
|
|
10
|
+
* The party
|
|
11
|
+
*/
|
|
12
|
+
party: ClientParty;
|
|
13
|
+
/**
|
|
14
|
+
* The user who requested to join the party
|
|
15
|
+
*/
|
|
16
|
+
user: User;
|
|
17
|
+
/**
|
|
18
|
+
* The creation date of the request
|
|
19
|
+
*/
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
/**
|
|
22
|
+
* @param client The main client
|
|
23
|
+
* @param party The party
|
|
24
|
+
* @param user The user who requested to join the party
|
|
25
|
+
* @param data The party confirmation data
|
|
26
|
+
*/
|
|
27
|
+
constructor(client: Client, party: ClientParty, user: User, data: any);
|
|
28
|
+
/**
|
|
29
|
+
* Whether the join confirmation is still active (can be confirmed / rejected)
|
|
30
|
+
*/
|
|
31
|
+
get isActive(): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Accepts the member join confirmation and makes the member join the party
|
|
34
|
+
* @throws {EpicgamesAPIError}
|
|
35
|
+
*/
|
|
36
|
+
confirm(): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Rejects the member join confirmation
|
|
39
|
+
* @throws {EpicgamesAPIError}
|
|
40
|
+
*/
|
|
41
|
+
reject(): Promise<void>;
|
|
42
|
+
}
|
|
43
|
+
export default PartyMemberConfirmation;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const Endpoints_1 = tslib_1.__importDefault(require("../../../resources/Endpoints"));
|
|
5
|
+
const Base_1 = tslib_1.__importDefault(require("../../Base"));
|
|
6
|
+
const enums_1 = require("../../../resources/enums");
|
|
7
|
+
/**
|
|
8
|
+
* Represents a party member join confirmation request
|
|
9
|
+
*/
|
|
10
|
+
class PartyMemberConfirmation extends Base_1.default {
|
|
11
|
+
/**
|
|
12
|
+
* @param client The main client
|
|
13
|
+
* @param party The party
|
|
14
|
+
* @param user The user who requested to join the party
|
|
15
|
+
* @param data The party confirmation data
|
|
16
|
+
*/
|
|
17
|
+
constructor(client, party, user, data) {
|
|
18
|
+
super(client);
|
|
19
|
+
this.party = party;
|
|
20
|
+
this.user = user;
|
|
21
|
+
this.createdAt = new Date(data.sent);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Whether the join confirmation is still active (can be confirmed / rejected)
|
|
25
|
+
*/
|
|
26
|
+
get isActive() {
|
|
27
|
+
return this.party.pendingMemberConfirmations.has(this.user.id);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Accepts the member join confirmation and makes the member join the party
|
|
31
|
+
* @throws {EpicgamesAPIError}
|
|
32
|
+
*/
|
|
33
|
+
async confirm() {
|
|
34
|
+
await this.client.http.epicgamesRequest({
|
|
35
|
+
method: 'POST',
|
|
36
|
+
url: `${Endpoints_1.default.BR_PARTY}/parties/${this.party.id}/members/${this.user.id}/confirm`,
|
|
37
|
+
}, enums_1.AuthSessionStoreKey.Fortnite);
|
|
38
|
+
this.party.pendingMemberConfirmations.delete(this.user.id);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Rejects the member join confirmation
|
|
42
|
+
* @throws {EpicgamesAPIError}
|
|
43
|
+
*/
|
|
44
|
+
async reject() {
|
|
45
|
+
await this.client.http.epicgamesRequest({
|
|
46
|
+
method: 'POST',
|
|
47
|
+
url: `${Endpoints_1.default.BR_PARTY}/parties/${this.party.id}/members/${this.user.id}/reject`,
|
|
48
|
+
}, enums_1.AuthSessionStoreKey.Fortnite);
|
|
49
|
+
this.party.pendingMemberConfirmations.delete(this.user.id);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.default = PartyMemberConfirmation;
|
|
53
|
+
//# sourceMappingURL=PartyMemberConfirmation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PartyMemberConfirmation.js","sourceRoot":"","sources":["../../../../src/structures/party/PartyMemberConfirmation.ts"],"names":[],"mappings":";;;AAAA,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K,CAAC,0BAA0B,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF;AAED,kBAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import Meta from '../../util/Meta';
|
|
2
|
+
import type { BannerMeta, BattlePassMeta, CosmeticsVariantMeta, Island, MatchMeta, PartyMemberSchema, Platform } from '../../../resources/structs';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a party member meta
|
|
5
|
+
*/
|
|
6
|
+
declare class PartyMemberMeta extends Meta<PartyMemberSchema> {
|
|
7
|
+
/**
|
|
8
|
+
* The currently equipped outfit CID
|
|
9
|
+
*/
|
|
10
|
+
get outfit(): string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* The currently equipped pickaxe ID
|
|
13
|
+
*/
|
|
14
|
+
get pickaxe(): string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The current emote EID
|
|
17
|
+
*/
|
|
18
|
+
get emote(): string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* The currently equipped backpack BID
|
|
21
|
+
*/
|
|
22
|
+
get backpack(): string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the member is ready
|
|
25
|
+
*/
|
|
26
|
+
get isReady(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the member is sitting out
|
|
29
|
+
*/
|
|
30
|
+
get isSittingOut(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The current input method
|
|
33
|
+
*/
|
|
34
|
+
get input(): string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* The cosmetic variants
|
|
37
|
+
*/
|
|
38
|
+
get variants(): CosmeticsVariantMeta;
|
|
39
|
+
/**
|
|
40
|
+
* The custom data store
|
|
41
|
+
*/
|
|
42
|
+
get customDataStore(): string[];
|
|
43
|
+
/**
|
|
44
|
+
* The banner info
|
|
45
|
+
*/
|
|
46
|
+
get banner(): BannerMeta | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* The battle pass info
|
|
49
|
+
*/
|
|
50
|
+
get battlepass(): BattlePassMeta | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* The platform
|
|
53
|
+
*/
|
|
54
|
+
get platform(): Platform | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* The match info
|
|
57
|
+
*/
|
|
58
|
+
get match(): MatchMeta;
|
|
59
|
+
/**
|
|
60
|
+
* The current island info
|
|
61
|
+
*/
|
|
62
|
+
get island(): Island;
|
|
63
|
+
/**
|
|
64
|
+
* Whether a marker has been set
|
|
65
|
+
*/
|
|
66
|
+
get isMarkerSet(): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* The marker location [x, y] tuple. [0, 0] if there is no marker set
|
|
69
|
+
*/
|
|
70
|
+
get markerLocation(): [number, number];
|
|
71
|
+
/**
|
|
72
|
+
* Whether the member owns Save The World
|
|
73
|
+
*/
|
|
74
|
+
get hasPurchasedSTW(): boolean;
|
|
75
|
+
}
|
|
76
|
+
export default PartyMemberMeta;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const Meta_1 = tslib_1.__importDefault(require("../../util/Meta"));
|
|
5
|
+
/**
|
|
6
|
+
* Represents a party member meta
|
|
7
|
+
*/
|
|
8
|
+
class PartyMemberMeta extends Meta_1.default {
|
|
9
|
+
/**
|
|
10
|
+
* The currently equipped outfit CID
|
|
11
|
+
*/
|
|
12
|
+
get outfit() {
|
|
13
|
+
var _a, _b, _c;
|
|
14
|
+
return (_c = (_b = (_a = this.get('Default:AthenaCosmeticLoadout_j')) === null || _a === void 0 ? void 0 : _a.AthenaCosmeticLoadout) === null || _b === void 0 ? void 0 : _b.characterPrimaryAssetId) === null || _c === void 0 ? void 0 : _c.replace('AthenaCharacter:', '');
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The currently equipped pickaxe ID
|
|
18
|
+
*/
|
|
19
|
+
get pickaxe() {
|
|
20
|
+
var _a, _b, _c, _d;
|
|
21
|
+
return (_d = (_c = (_b = (_a = this.get('Default:AthenaCosmeticLoadout_j')) === null || _a === void 0 ? void 0 : _a.AthenaCosmeticLoadout) === null || _b === void 0 ? void 0 : _b.pickaxeDef) === null || _c === void 0 ? void 0 : _c.match(/(?<=\w*\.)\w*/)) === null || _d === void 0 ? void 0 : _d.shift();
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The current emote EID
|
|
25
|
+
*/
|
|
26
|
+
get emote() {
|
|
27
|
+
var _a, _b, _c;
|
|
28
|
+
const emoteAsset = (_b = (_a = this.get('Default:FrontendEmote_j')) === null || _a === void 0 ? void 0 : _a.FrontendEmote) === null || _b === void 0 ? void 0 : _b.emoteItemDef;
|
|
29
|
+
if (emoteAsset === 'None' || !emoteAsset)
|
|
30
|
+
return undefined;
|
|
31
|
+
return (_c = emoteAsset.match(/(?<=\w*\.)\w*/)) === null || _c === void 0 ? void 0 : _c.shift();
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The currently equipped backpack BID
|
|
35
|
+
*/
|
|
36
|
+
get backpack() {
|
|
37
|
+
var _a, _b, _c, _d;
|
|
38
|
+
return (_d = (_c = (_b = (_a = this.get('Default:AthenaCosmeticLoadout_j')) === null || _a === void 0 ? void 0 : _a.AthenaCosmeticLoadout) === null || _b === void 0 ? void 0 : _b.backpackDef) === null || _c === void 0 ? void 0 : _c.match(/(?<=\w*\.)\w*/)) === null || _d === void 0 ? void 0 : _d.shift();
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Whether the member is ready
|
|
42
|
+
*/
|
|
43
|
+
get isReady() {
|
|
44
|
+
var _a, _b;
|
|
45
|
+
return ((_b = (_a = this.get('Default:LobbyState_j')) === null || _a === void 0 ? void 0 : _a.LobbyState) === null || _b === void 0 ? void 0 : _b.gameReadiness) === 'Ready';
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Whether the member is sitting out
|
|
49
|
+
*/
|
|
50
|
+
get isSittingOut() {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
return ((_b = (_a = this.get('Default:LobbyState_j')) === null || _a === void 0 ? void 0 : _a.LobbyState) === null || _b === void 0 ? void 0 : _b.gameReadiness) === 'SittingOut';
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The current input method
|
|
56
|
+
*/
|
|
57
|
+
get input() {
|
|
58
|
+
var _a, _b;
|
|
59
|
+
return (_b = (_a = this.get('Default:LobbyState_j')) === null || _a === void 0 ? void 0 : _a.LobbyState) === null || _b === void 0 ? void 0 : _b.currentInputType;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The cosmetic variants
|
|
63
|
+
*/
|
|
64
|
+
get variants() {
|
|
65
|
+
var _a, _b;
|
|
66
|
+
return ((_b = (_a = this.get('Default:AthenaCosmeticLoadoutVariants_j')) === null || _a === void 0 ? void 0 : _a.AthenaCosmeticLoadoutVariants) === null || _b === void 0 ? void 0 : _b.vL) || {};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The custom data store
|
|
70
|
+
*/
|
|
71
|
+
get customDataStore() {
|
|
72
|
+
var _a;
|
|
73
|
+
return ((_a = this.get('Default:ArbitraryCustomDataStore_j')) === null || _a === void 0 ? void 0 : _a.ArbitraryCustomDataStore) || [];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The banner info
|
|
77
|
+
*/
|
|
78
|
+
get banner() {
|
|
79
|
+
var _a;
|
|
80
|
+
return (_a = this.get('Default:AthenaBannerInfo_j')) === null || _a === void 0 ? void 0 : _a.AthenaBannerInfo;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The battle pass info
|
|
84
|
+
*/
|
|
85
|
+
get battlepass() {
|
|
86
|
+
var _a;
|
|
87
|
+
return (_a = this.get('Default:BattlePassInfo_j')) === null || _a === void 0 ? void 0 : _a.BattlePassInfo;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The platform
|
|
91
|
+
*/
|
|
92
|
+
get platform() {
|
|
93
|
+
var _a, _b, _c, _d;
|
|
94
|
+
return (_d = (_c = (_b = (_a = this.get('Default:PlatformData_j')) === null || _a === void 0 ? void 0 : _a.PlatformData) === null || _b === void 0 ? void 0 : _b.platform) === null || _c === void 0 ? void 0 : _c.platformDescription) === null || _d === void 0 ? void 0 : _d.name;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The match info
|
|
98
|
+
*/
|
|
99
|
+
get match() {
|
|
100
|
+
var _a, _b, _c, _d;
|
|
101
|
+
const location = (_b = (_a = this.get('Default:PackedState_j')) === null || _a === void 0 ? void 0 : _a.PackedState) === null || _b === void 0 ? void 0 : _b.location;
|
|
102
|
+
const hasPreloadedAthena = (_d = (_c = this.get('Default:LobbyState_j')) === null || _c === void 0 ? void 0 : _c.LobbyState) === null || _d === void 0 ? void 0 : _d.hasPreloadedAthena;
|
|
103
|
+
const playerCount = this.get('Default:NumAthenaPlayersLeft_U');
|
|
104
|
+
const matchStartedAt = this.get('Default:UtcTimeStartedMatchAthena_s');
|
|
105
|
+
return {
|
|
106
|
+
hasPreloadedAthena,
|
|
107
|
+
location,
|
|
108
|
+
matchStartedAt: matchStartedAt && new Date(matchStartedAt),
|
|
109
|
+
playerCount,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* The current island info
|
|
114
|
+
*/
|
|
115
|
+
get island() {
|
|
116
|
+
var _a;
|
|
117
|
+
return (_a = this.get('Default:CurrentIsland_j')) === null || _a === void 0 ? void 0 : _a.SelectedIsland;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Whether a marker has been set
|
|
121
|
+
*/
|
|
122
|
+
get isMarkerSet() {
|
|
123
|
+
var _a, _b;
|
|
124
|
+
return !!((_b = (_a = this.get('Default:FrontEndMapMarker_j')) === null || _a === void 0 ? void 0 : _a.FrontEndMapMarker) === null || _b === void 0 ? void 0 : _b.bIsSet);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The marker location [x, y] tuple. [0, 0] if there is no marker set
|
|
128
|
+
*/
|
|
129
|
+
get markerLocation() {
|
|
130
|
+
var _a, _b;
|
|
131
|
+
const marker = (_b = (_a = this.get('Default:FrontEndMapMarker_j')) === null || _a === void 0 ? void 0 : _a.FrontEndMapMarker) === null || _b === void 0 ? void 0 : _b.markerLocation;
|
|
132
|
+
if (!marker)
|
|
133
|
+
return [0, 0];
|
|
134
|
+
return [marker.y, marker.x];
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Whether the member owns Save The World
|
|
138
|
+
*/
|
|
139
|
+
get hasPurchasedSTW() {
|
|
140
|
+
var _a;
|
|
141
|
+
return !!((_a = this.get('Default:PackedState_j').PackedState) === null || _a === void 0 ? void 0 : _a.hasPurchasedSTW);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
exports.default = PartyMemberMeta;
|
|
145
|
+
//# sourceMappingURL=PartyMemberMeta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PartyMemberMeta.js","sourceRoot":"","sources":["../../../../src/structures/party/PartyMemberMeta.ts"],"names":[],"mappings":";;;AAAA,mEAAmC;AAKnC;;GAEG;AACH,MAAM,eAAgB,SAAQ,cAAuB;IACnD;;OAEG;IACH,IAAW,MAAM;;QACf,OAAO,MAAC,MAAA,MAAA,IAAI,CAAC,GAAG,CAAC,iCAAiC,CAAC,0CAAE,qBAAqB,0CAAE,uBAAkC,0CAAE,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;IAClJ,CAAC;IAED;;OAEG;IACH,IAAW,OAAO;;QAChB,OAAO,MAAA,MAAC,MAAA,MAAA,IAAI,CAAC,GAAG,CAAC,iCAAiC,CAAC,0CAAE,qBAAqB,0CAAE,UAAqB,0CAAE,KAAK,CAAC,eAAe,CAAC,0CA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AAE,iBAAiB,0CAAE,MAAM,CAAA,CAAC;IAC9E,CAAC;IAED;;OAEG;IACH,IAAW,cAAc;;QACvB,MAAM,MAAM,GAAG,MAAA,MAAA,IAAI,CAAC,GAAG,CAAC,6BAA6B,CAAC,0CAAE,iBAAiB,0CAAE,cAAc,CAAC;QAC1F,IAAI,CAAC,MAAM;YAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAE3B,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAW,eAAe;;QACxB,OAAO,CAAC,CAAC,CAAA,MAAA,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,WAAW,0CAAE,eAAe,CAAA,CAAC;IAC1E,CAAC;CACF;AAED,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import BaseMessage from '../BaseMessage';
|
|
2
|
+
import type { PartyMessageData } from '../../../resources/structs';
|
|
3
|
+
import type Client from '../../Client';
|
|
4
|
+
import type ClientParty from './ClientParty';
|
|
5
|
+
import type PartyMember from './PartyMember';
|
|
6
|
+
/**
|
|
7
|
+
* Represents a party chat message
|
|
8
|
+
*/
|
|
9
|
+
declare class PartyMessage extends BaseMessage {
|
|
10
|
+
/**
|
|
11
|
+
* The message's author
|
|
12
|
+
*/
|
|
13
|
+
author: PartyMember;
|
|
14
|
+
/**
|
|
15
|
+
* The message's party
|
|
16
|
+
*/
|
|
17
|
+
party: ClientParty;
|
|
18
|
+
/**
|
|
19
|
+
* @param client The main client
|
|
20
|
+
* @param data The message's data
|
|
21
|
+
*/
|
|
22
|
+
constructor(client: Client, data: PartyMessageData);
|
|
23
|
+
/**
|
|
24
|
+
* Replies to this party chat message
|
|
25
|
+
* @param content The message that will be sent
|
|
26
|
+
* @throws {SendMessageError} The message failed to send
|
|
27
|
+
*/
|
|
28
|
+
reply(content: string): Promise<PartyMessage>;
|
|
29
|
+
}
|
|
30
|
+
export default PartyMessage;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const BaseMessage_1 = tslib_1.__importDefault(require("../BaseMessage"));
|
|
5
|
+
/**
|
|
6
|
+
* Represents a party chat message
|
|
7
|
+
*/
|
|
8
|
+
class PartyMessage extends BaseMessage_1.default {
|
|
9
|
+
/**
|
|
10
|
+
* @param client The main client
|
|
11
|
+
* @param data The message's data
|
|
12
|
+
*/
|
|
13
|
+
constructor(client, data) {
|
|
14
|
+
super(client, data);
|
|
15
|
+
this.author = data.author;
|
|
16
|
+
this.party = data.party;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Replies to this party chat message
|
|
20
|
+
* @param content The message that will be sent
|
|
21
|
+
* @throws {SendMessageError} The message failed to send
|
|
22
|
+
*/
|
|
23
|
+
reply(content) {
|
|
24
|
+
return this.party.chat.send(content);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = PartyMessage;
|
|
28
|
+
//# sourceMappingURL=PartyMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PartyMessage.js","sourceRoot":"","sources":["../../../../src/structures/party/PartyMessage.ts"],"names":[],"mappings":";;;AAAA,yEAAyC;AAMzC;;GAEG;AACH,MAAM,YAAa,SAAQ,qBAAW;IAWpC;;;OAGG;IACH,YAAY,MAAc,EAAE,IAAsB;QAChD,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAEpB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,OAAe;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;CACF;AAED,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import Meta from '../../util/Meta';
|
|
2
|
+
import type { Island, PartySchema } from '../../../resources/structs';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a party's meta
|
|
5
|
+
*/
|
|
6
|
+
declare class PartyMeta extends Meta<PartySchema> {
|
|
7
|
+
/**
|
|
8
|
+
* The currently selected island
|
|
9
|
+
*/
|
|
10
|
+
get island(): Island | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* The region ID (EU, NAE, NAW, etc.)
|
|
13
|
+
*/
|
|
14
|
+
get regionId(): string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The custom matchmaking key
|
|
17
|
+
*/
|
|
18
|
+
get customMatchmakingKey(): string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* The squad fill status
|
|
21
|
+
*/
|
|
22
|
+
get squadFill(): boolean;
|
|
23
|
+
}
|
|
24
|
+
export default PartyMeta;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const Meta_1 = tslib_1.__importDefault(require("../../util/Meta"));
|
|
5
|
+
/**
|
|
6
|
+
* Represents a party's meta
|
|
7
|
+
*/
|
|
8
|
+
class PartyMeta extends Meta_1.default {
|
|
9
|
+
/**
|
|
10
|
+
* The currently selected island
|
|
11
|
+
*/
|
|
12
|
+
get island() {
|
|
13
|
+
var _a;
|
|
14
|
+
return (_a = this.get('Default:SelectedIsland_j')) === null || _a === void 0 ? void 0 : _a.SelectedIsland;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The region ID (EU, NAE, NAW, etc.)
|
|
18
|
+
*/
|
|
19
|
+
get regionId() {
|
|
20
|
+
const regionId = this.get('Default:RegionId_s');
|
|
21
|
+
if (typeof regionId !== 'string' || regionId.length === 0) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
return regionId;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The custom matchmaking key
|
|
28
|
+
*/
|
|
29
|
+
get customMatchmakingKey() {
|
|
30
|
+
const key = this.get('Default:CustomMatchKey_s');
|
|
31
|
+
if (typeof key !== 'string' || key.length === 0)
|
|
32
|
+
return undefined;
|
|
33
|
+
return key;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The squad fill status
|
|
37
|
+
*/
|
|
38
|
+
get squadFill() {
|
|
39
|
+
return !!this.get('Default:AthenaSquadFill_b');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.default = PartyMeta;
|
|
43
|
+
//# sourceMappingURL=PartyMeta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PartyMeta.js","sourceRoot":"","sources":["../../../../src/structures/party/PartyMeta.ts"],"names":[],"mappings":";;;AAAA,mEAAmC;AAGnC;;GAEG;AACH,MAAM,SAAU,SAAQ,cAAiB;IACvC;;OAEG;IACH,IAAW,MAAM;;QACf,OAAO,MAAA,IAAI,CAAC,GAAG,CAAC,0BAA0B,CAAC,0CAAE,cAAc,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACjB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QAChD,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1D,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;OAEG;IACH,IAAW,oBAAoB;QAC7B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;QAEjD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,SAAS,CAAC;QAClE,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QAClB,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;IACjD,CAAC;CACF;AAED,kBAAe,SAAS,CAAC"}
|