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