@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,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const User_1 = tslib_1.__importDefault(require("./User"));
|
|
5
|
+
/**
|
|
6
|
+
* Represents a blocked user
|
|
7
|
+
*/
|
|
8
|
+
class BlockedUser extends User_1.default {
|
|
9
|
+
/**
|
|
10
|
+
* Unblocks this user
|
|
11
|
+
* @throws {UserNotFoundError} The user wasn't found
|
|
12
|
+
* @throws {EpicgamesAPIError}
|
|
13
|
+
*/
|
|
14
|
+
async unblock() {
|
|
15
|
+
return this.client.user.unblock(this.id);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.default = BlockedUser;
|
|
19
|
+
//# sourceMappingURL=BlockedUser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockedUser.js","sourceRoot":"","sources":["../../../../src/structures/user/BlockedUser.ts"],"names":[],"mappings":";;;AAAA,0DAA0B;AAE1B;;GAEG;AACH,MAAM,WAAY,SAAQ,cAAI;IAC5B;;;;OAIG;IACI,KAAK,CAAC,OAAO;QAClB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3C,CAAC;CACF;AAED,kBAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import User from './User';
|
|
2
|
+
import type { ClientUserData } from '../../../resources/structs';
|
|
3
|
+
import type Client from '../../Client';
|
|
4
|
+
/**
|
|
5
|
+
* Represents the user of a client
|
|
6
|
+
*/
|
|
7
|
+
declare class ClientUser extends User {
|
|
8
|
+
/**
|
|
9
|
+
* The first name of the client's Epic Games account
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* The last name of the client's Epic Games account
|
|
14
|
+
*/
|
|
15
|
+
lastName: string;
|
|
16
|
+
/**
|
|
17
|
+
* The email of the client's Epic Games account
|
|
18
|
+
*/
|
|
19
|
+
email: string;
|
|
20
|
+
/**
|
|
21
|
+
* The number of failed login attempts of the client's Epic Games account
|
|
22
|
+
*/
|
|
23
|
+
failedLoginAttempts: number;
|
|
24
|
+
/**
|
|
25
|
+
* The last time somebody logged in on the client's Epic Games account
|
|
26
|
+
*/
|
|
27
|
+
lastLogin: Date;
|
|
28
|
+
/**
|
|
29
|
+
* The number of display name changes of the client's Epic Games account
|
|
30
|
+
*/
|
|
31
|
+
numberOfDisplayNameChanges: number;
|
|
32
|
+
/**
|
|
33
|
+
* The age group of the client's Epic Games account
|
|
34
|
+
*/
|
|
35
|
+
ageGroup: string;
|
|
36
|
+
/**
|
|
37
|
+
* Whether the account has no display name due to no epicgames account being linked
|
|
38
|
+
*/
|
|
39
|
+
headless: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The country of the client's Epic Games account
|
|
42
|
+
*/
|
|
43
|
+
country: string;
|
|
44
|
+
/**
|
|
45
|
+
* The preferred language of the client's Epic Games account
|
|
46
|
+
*/
|
|
47
|
+
preferredLanguage: string;
|
|
48
|
+
/**
|
|
49
|
+
* Whether the client's Epic Games account can update its display name
|
|
50
|
+
*/
|
|
51
|
+
canUpdateDisplayName: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Whether a Two-Factor-Authentification method is enabled
|
|
54
|
+
*/
|
|
55
|
+
tfaEnabled: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the email is verified (now required when creating accounts)
|
|
58
|
+
*/
|
|
59
|
+
emailVerified: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Whether the account has been verified to be run by a minor
|
|
62
|
+
*/
|
|
63
|
+
minorVerified: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Whether the account is expected to be run by a minor
|
|
66
|
+
*/
|
|
67
|
+
minorExpected: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* The minor status of the client's Epic Games account
|
|
70
|
+
*/
|
|
71
|
+
minorStatus: string;
|
|
72
|
+
/**
|
|
73
|
+
* @param client The main client
|
|
74
|
+
* @param data The user's data
|
|
75
|
+
*/
|
|
76
|
+
constructor(client: Client, data: ClientUserData);
|
|
77
|
+
}
|
|
78
|
+
export default ClientUser;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const User_1 = tslib_1.__importDefault(require("./User"));
|
|
5
|
+
/**
|
|
6
|
+
* Represents the user of a client
|
|
7
|
+
*/
|
|
8
|
+
class ClientUser extends User_1.default {
|
|
9
|
+
/**
|
|
10
|
+
* @param client The main client
|
|
11
|
+
* @param data The user's data
|
|
12
|
+
*/
|
|
13
|
+
constructor(client, data) {
|
|
14
|
+
super(client, data);
|
|
15
|
+
this.name = data.name;
|
|
16
|
+
this.lastName = data.lastName;
|
|
17
|
+
this.email = data.email;
|
|
18
|
+
this.failedLoginAttempts = data.failedLoginAttempts;
|
|
19
|
+
this.lastLogin = new Date(data.lastLogin);
|
|
20
|
+
this.numberOfDisplayNameChanges = data.numberOfDisplayNameChanges;
|
|
21
|
+
this.ageGroup = data.ageGroup;
|
|
22
|
+
this.headless = data.headless;
|
|
23
|
+
this.country = data.country;
|
|
24
|
+
this.preferredLanguage = data.preferredLanguage;
|
|
25
|
+
this.canUpdateDisplayName = data.canUpdateDisplayName;
|
|
26
|
+
this.tfaEnabled = data.tfaEnabled;
|
|
27
|
+
this.emailVerified = data.emailVerified;
|
|
28
|
+
this.minorVerified = data.minorVerified;
|
|
29
|
+
this.minorExpected = data.minorExpected;
|
|
30
|
+
this.minorStatus = data.minorStatus;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.default = ClientUser;
|
|
34
|
+
//# sourceMappingURL=ClientUser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientUser.js","sourceRoot":"","sources":["../../../../src/structures/user/ClientUser.ts"],"names":[],"mappings":";;;AAAA,0DAA0B;AAI1B;;GAEG;AACH,MAAM,UAAW,SAAQ,cAAI;IAiF3B;;;OAGG;IACH,YAAY,MAAc,EAAE,IAAoB;QAC9C,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAEpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC;QACpD,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC1C,IAAI,CAAC,0BAA0B,GAAG,IAAI,CAAC,0BAA0B,CAAC;QAClE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC;QAChD,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC;QACtD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAClC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACxC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACxC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACxC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IACtC,CAAC;CACF;AAED,kBAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import Base from '../../Base';
|
|
2
|
+
import type { BRAccountLevel, ExternalAuths, UserData } from '../../../resources/structs';
|
|
3
|
+
import type Avatar from '../Avatar';
|
|
4
|
+
import type GlobalProfile from '../GlobalProfile';
|
|
5
|
+
import type EventTokens from '../EventTokens';
|
|
6
|
+
import type Client from '../../Client';
|
|
7
|
+
/**
|
|
8
|
+
* Represents a user
|
|
9
|
+
*/
|
|
10
|
+
declare class User extends Base {
|
|
11
|
+
/**
|
|
12
|
+
* The user's display name (Might be undefined)
|
|
13
|
+
*/
|
|
14
|
+
private _displayName?;
|
|
15
|
+
/**
|
|
16
|
+
* The user's id
|
|
17
|
+
*/
|
|
18
|
+
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* The user's external auths (Linked platforms)
|
|
21
|
+
*/
|
|
22
|
+
externalAuths: ExternalAuths;
|
|
23
|
+
/**
|
|
24
|
+
* @param client The main client
|
|
25
|
+
* @param data The user's data
|
|
26
|
+
*/
|
|
27
|
+
constructor(client: Client, data: UserData);
|
|
28
|
+
/**
|
|
29
|
+
* The user's display name (In case its undefined, use {@link User#fetch})
|
|
30
|
+
*/
|
|
31
|
+
get displayName(): string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the user is headless (the account is not actually an epicgames account)
|
|
34
|
+
*/
|
|
35
|
+
get isHeadless(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Sends a friendship request to this user or accepts an existing one
|
|
38
|
+
* @throws {UserNotFoundError} The user wasn't found
|
|
39
|
+
* @throws {DuplicateFriendshipError} The user is already friends with the client
|
|
40
|
+
* @throws {FriendshipRequestAlreadySentError} A friendship request has already been sent to the user
|
|
41
|
+
* @throws {InviterFriendshipsLimitExceededError} The client's friendship limit is reached
|
|
42
|
+
* @throws {InviteeFriendshipsLimitExceededError} The user's friendship limit is reached
|
|
43
|
+
* @throws {InviteeFriendshipSettingsError} The user disabled friend requests
|
|
44
|
+
* @throws {InviteeFriendshipRequestLimitExceededError} The user's incoming friend request limit is reached
|
|
45
|
+
* @throws {EpicgamesAPIError}
|
|
46
|
+
*/
|
|
47
|
+
addFriend(): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Blocks this user
|
|
50
|
+
* @throws {UserNotFoundError} The user wasn't found
|
|
51
|
+
* @throws {EpicgamesAPIError}
|
|
52
|
+
*/
|
|
53
|
+
block(): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Updates this user's display name and external auths
|
|
56
|
+
* @throws {UserNotFoundError} The user wasn't found
|
|
57
|
+
*/
|
|
58
|
+
fetch(): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Fetches battle royale v2 stats for this user
|
|
61
|
+
* @throws {UserNotFoundError} The user wasn't found
|
|
62
|
+
* @throws {StatsPrivacyError} The user set their stats to private
|
|
63
|
+
* @throws {EpicgamesAPIError}
|
|
64
|
+
*/
|
|
65
|
+
getBRStats(startTime?: number, endTime?: number): Promise<import("../Stats").default>;
|
|
66
|
+
/**
|
|
67
|
+
* Fetches the battle royale account level for this user
|
|
68
|
+
* @param seasonNumber The season number (eg. 16, 17, 18)
|
|
69
|
+
*/
|
|
70
|
+
getBRAccountLevel(seasonNumber: number): Promise<BRAccountLevel | undefined>;
|
|
71
|
+
/**
|
|
72
|
+
* Fetches the avatar for this user
|
|
73
|
+
* @throws {EpicgamesAPIError}
|
|
74
|
+
*/
|
|
75
|
+
getAvatar(): Promise<Avatar | undefined>;
|
|
76
|
+
/**
|
|
77
|
+
* Fetches the global profile for this user
|
|
78
|
+
* @throws {EpicgamesAPIError}
|
|
79
|
+
*/
|
|
80
|
+
getGlobalProfile(): Promise<GlobalProfile | undefined>;
|
|
81
|
+
/**
|
|
82
|
+
* Fetches the event tokens for an account.
|
|
83
|
+
* This can be used to check if a user is eligible to play a certain tournament window
|
|
84
|
+
* or to check a user's arena division in any season
|
|
85
|
+
* @throws {EpicgamesAPIError}
|
|
86
|
+
*/
|
|
87
|
+
getEventTokens(): Promise<EventTokens | undefined>;
|
|
88
|
+
/**
|
|
89
|
+
* Updates this user with the given data
|
|
90
|
+
* @param data The updated user data
|
|
91
|
+
*/
|
|
92
|
+
update(data: UserData): void;
|
|
93
|
+
/**
|
|
94
|
+
* The raw user data
|
|
95
|
+
*/
|
|
96
|
+
toObject(): UserData;
|
|
97
|
+
}
|
|
98
|
+
export default User;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
/* eslint-disable no-underscore-dangle */
|
|
5
|
+
const Base_1 = tslib_1.__importDefault(require("../../Base"));
|
|
6
|
+
const UserNotFoundError_1 = tslib_1.__importDefault(require("../../exceptions/UserNotFoundError"));
|
|
7
|
+
/**
|
|
8
|
+
* Represents a user
|
|
9
|
+
*/
|
|
10
|
+
class User extends Base_1.default {
|
|
11
|
+
/**
|
|
12
|
+
* @param client The main client
|
|
13
|
+
* @param data The user's data
|
|
14
|
+
*/
|
|
15
|
+
constructor(client, data) {
|
|
16
|
+
super(client);
|
|
17
|
+
this._displayName = data.displayName;
|
|
18
|
+
this.id = data.id;
|
|
19
|
+
this.externalAuths = data.externalAuths || {};
|
|
20
|
+
// For some reason, no external auths = empty array
|
|
21
|
+
if (Array.isArray(this.externalAuths))
|
|
22
|
+
this.externalAuths = {};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The user's display name (In case its undefined, use {@link User#fetch})
|
|
26
|
+
*/
|
|
27
|
+
get displayName() {
|
|
28
|
+
return this._displayName || (Object.values(this.externalAuths)[0] && Object.values(this.externalAuths)[0].externalDisplayName);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Whether the user is headless (the account is not actually an epicgames account)
|
|
32
|
+
*/
|
|
33
|
+
get isHeadless() {
|
|
34
|
+
return !this._displayName;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Sends a friendship request to this user or accepts an existing one
|
|
38
|
+
* @throws {UserNotFoundError} The user wasn't found
|
|
39
|
+
* @throws {DuplicateFriendshipError} The user is already friends with the client
|
|
40
|
+
* @throws {FriendshipRequestAlreadySentError} A friendship request has already been sent to the user
|
|
41
|
+
* @throws {InviterFriendshipsLimitExceededError} The client's friendship limit is reached
|
|
42
|
+
* @throws {InviteeFriendshipsLimitExceededError} The user's friendship limit is reached
|
|
43
|
+
* @throws {InviteeFriendshipSettingsError} The user disabled friend requests
|
|
44
|
+
* @throws {InviteeFriendshipRequestLimitExceededError} The user's incoming friend request limit is reached
|
|
45
|
+
* @throws {EpicgamesAPIError}
|
|
46
|
+
*/
|
|
47
|
+
async addFriend() {
|
|
48
|
+
return this.client.friend.add(this.id);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Blocks this user
|
|
52
|
+
* @throws {UserNotFoundError} The user wasn't found
|
|
53
|
+
* @throws {EpicgamesAPIError}
|
|
54
|
+
*/
|
|
55
|
+
async block() {
|
|
56
|
+
return this.client.user.block(this.id);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Updates this user's display name and external auths
|
|
60
|
+
* @throws {UserNotFoundError} The user wasn't found
|
|
61
|
+
*/
|
|
62
|
+
async fetch() {
|
|
63
|
+
const user = await this.client.user.fetch(this.id);
|
|
64
|
+
if (!user)
|
|
65
|
+
throw new UserNotFoundError_1.default(this.id);
|
|
66
|
+
this.update(user);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Fetches battle royale v2 stats for this user
|
|
70
|
+
* @throws {UserNotFoundError} The user wasn't found
|
|
71
|
+
* @throws {StatsPrivacyError} The user set their stats to private
|
|
72
|
+
* @throws {EpicgamesAPIError}
|
|
73
|
+
*/
|
|
74
|
+
async getBRStats(startTime, endTime) {
|
|
75
|
+
return this.client.getBRStats(this.id, startTime, endTime);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Fetches the battle royale account level for this user
|
|
79
|
+
* @param seasonNumber The season number (eg. 16, 17, 18)
|
|
80
|
+
*/
|
|
81
|
+
async getBRAccountLevel(seasonNumber) {
|
|
82
|
+
var _a;
|
|
83
|
+
return (_a = (await this.client.getBRAccountLevel(this.id, seasonNumber))[0]) === null || _a === void 0 ? void 0 : _a.level;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Fetches the avatar for this user
|
|
87
|
+
* @throws {EpicgamesAPIError}
|
|
88
|
+
*/
|
|
89
|
+
async getAvatar() {
|
|
90
|
+
return this.client.user.fetchAvatar(this.id);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Fetches the global profile for this user
|
|
94
|
+
* @throws {EpicgamesAPIError}
|
|
95
|
+
*/
|
|
96
|
+
async getGlobalProfile() {
|
|
97
|
+
return this.client.user.fetchGlobalProfile(this.id);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Fetches the event tokens for an account.
|
|
101
|
+
* This can be used to check if a user is eligible to play a certain tournament window
|
|
102
|
+
* or to check a user's arena division in any season
|
|
103
|
+
* @throws {EpicgamesAPIError}
|
|
104
|
+
*/
|
|
105
|
+
async getEventTokens() {
|
|
106
|
+
return (await this.client.tournaments.getEventTokens(this.id))[0];
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Updates this user with the given data
|
|
110
|
+
* @param data The updated user data
|
|
111
|
+
*/
|
|
112
|
+
update(data) {
|
|
113
|
+
this._displayName = data.displayName;
|
|
114
|
+
this.externalAuths = data.externalAuths || {};
|
|
115
|
+
if (Array.isArray(this.externalAuths))
|
|
116
|
+
this.externalAuths = {};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The raw user data
|
|
120
|
+
*/
|
|
121
|
+
toObject() {
|
|
122
|
+
return {
|
|
123
|
+
id: this.id,
|
|
124
|
+
displayName: this._displayName,
|
|
125
|
+
externalAuths: this.externalAuths,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
exports.default = User;
|
|
130
|
+
//# sourceMappingURL=User.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../src/structures/user/User.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import User from './User';
|
|
2
|
+
import type { UserSearchMatchType, UserSearchResultMatch } from '../../../resources/structs';
|
|
3
|
+
import type Client from '../../Client';
|
|
4
|
+
/**
|
|
5
|
+
* Represents a user search result entry
|
|
6
|
+
*/
|
|
7
|
+
declare class UserSearchResult extends User {
|
|
8
|
+
/**
|
|
9
|
+
* The search match type. Can be "exact" or "prefix"
|
|
10
|
+
*/
|
|
11
|
+
matchType: UserSearchMatchType;
|
|
12
|
+
/**
|
|
13
|
+
* The sorting position of this result
|
|
14
|
+
*/
|
|
15
|
+
sortPosition: number;
|
|
16
|
+
/**
|
|
17
|
+
* The amount of mutual friends the client has with the user
|
|
18
|
+
*/
|
|
19
|
+
mutualFriends: number;
|
|
20
|
+
/**
|
|
21
|
+
* The matched platform display names
|
|
22
|
+
*/
|
|
23
|
+
matches: UserSearchResultMatch[];
|
|
24
|
+
/**
|
|
25
|
+
* @param client The main client
|
|
26
|
+
* @param user The user
|
|
27
|
+
* @param data The user entry data
|
|
28
|
+
*/
|
|
29
|
+
constructor(client: Client, user: User, data: any);
|
|
30
|
+
}
|
|
31
|
+
export default UserSearchResult;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const User_1 = tslib_1.__importDefault(require("./User"));
|
|
5
|
+
/**
|
|
6
|
+
* Represents a user search result entry
|
|
7
|
+
*/
|
|
8
|
+
class UserSearchResult extends User_1.default {
|
|
9
|
+
/**
|
|
10
|
+
* @param client The main client
|
|
11
|
+
* @param user The user
|
|
12
|
+
* @param data The user entry data
|
|
13
|
+
*/
|
|
14
|
+
constructor(client, user, data) {
|
|
15
|
+
super(client, user.toObject());
|
|
16
|
+
this.matchType = data.matchType;
|
|
17
|
+
this.sortPosition = data.sortPosition;
|
|
18
|
+
this.mutualFriends = data.epicMutuals;
|
|
19
|
+
this.matches = data.matches;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = UserSearchResult;
|
|
23
|
+
//# sourceMappingURL=UserSearchResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserSearchResult.js","sourceRoot":"","sources":["../../../../src/structures/user/UserSearchResult.ts"],"names":[],"mappings":";;;AAAA,0DAA0B;AAI1B;;GAEG;AACH,MAAM,gBAAiB,SAAQ,cAAI;IAqBjC;;;;OAIG;IACH,YAAY,MAAc,EAAE,IAAU,EAAE,IAAS;QAC/C,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAE/B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAChC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC9B,CAAC;CACF;AAED,kBAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents an asynchronous task lock used for pending token refreshing or party changes
|
|
3
|
+
* @private
|
|
4
|
+
*/
|
|
5
|
+
declare class AsyncLock {
|
|
6
|
+
/**
|
|
7
|
+
* The lock promise
|
|
8
|
+
*/
|
|
9
|
+
private lockPromise?;
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* Whether this lock is active
|
|
13
|
+
*/
|
|
14
|
+
get isLocked(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Returns a promise that will resolve once the lock is released
|
|
17
|
+
*/
|
|
18
|
+
wait(): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Activates this lock
|
|
21
|
+
*/
|
|
22
|
+
lock(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Deactivates this lock
|
|
25
|
+
*/
|
|
26
|
+
unlock(): void;
|
|
27
|
+
}
|
|
28
|
+
export default AsyncLock;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Represents an asynchronous task lock used for pending token refreshing or party changes
|
|
5
|
+
* @private
|
|
6
|
+
*/
|
|
7
|
+
class AsyncLock {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.lockPromise = undefined;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Whether this lock is active
|
|
13
|
+
*/
|
|
14
|
+
get isLocked() {
|
|
15
|
+
return !!this.lockPromise;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Returns a promise that will resolve once the lock is released
|
|
19
|
+
*/
|
|
20
|
+
wait() {
|
|
21
|
+
var _a;
|
|
22
|
+
return ((_a = this.lockPromise) === null || _a === void 0 ? void 0 : _a.promise) || Promise.resolve();
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Activates this lock
|
|
26
|
+
*/
|
|
27
|
+
lock() {
|
|
28
|
+
let resolve;
|
|
29
|
+
const promise = new Promise((res) => {
|
|
30
|
+
resolve = res;
|
|
31
|
+
});
|
|
32
|
+
this.lockPromise = { promise, resolve: resolve };
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Deactivates this lock
|
|
36
|
+
*/
|
|
37
|
+
unlock() {
|
|
38
|
+
var _a;
|
|
39
|
+
(_a = this.lockPromise) === null || _a === void 0 ? void 0 : _a.resolve();
|
|
40
|
+
this.lockPromise = undefined;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.default = AsyncLock;
|
|
44
|
+
//# sourceMappingURL=AsyncLock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AsyncLock.js","sourceRoot":"","sources":["../../../src/util/AsyncLock.ts"],"names":[],"mappings":";;AAKA;;;GAGG;AACH,MAAM,SAAS;IAKb;QACE,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,IAAI;;QACT,OAAO,CAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,OAAO,KAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IACxD,CAAC;IAED;;OAEG;IACI,IAAI;QACT,IAAI,OAAY,CAAC;QACjB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAO,CAAC,GAAG,EAAE,EAAE;YACxC,OAAO,GAAG,GAAG,CAAC;QAChB,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,OAAqB,EAAE,CAAC;IACjE,CAAC;IAED;;OAEG;IACI,MAAM;;QACX,MAAA,IAAI,CAAC,WAAW,0CAAE,OAAO,EAAE,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;IAC/B,CAAC;CACF;AAED,kBAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a writer for binary data used for tournament replays
|
|
3
|
+
* @private
|
|
4
|
+
*/
|
|
5
|
+
declare class BinaryWriter {
|
|
6
|
+
/**
|
|
7
|
+
* The buffer
|
|
8
|
+
*/
|
|
9
|
+
buffer: Buffer;
|
|
10
|
+
/**
|
|
11
|
+
* The current byte offset
|
|
12
|
+
*/
|
|
13
|
+
offset: number;
|
|
14
|
+
/**
|
|
15
|
+
* @param buffer The buffer
|
|
16
|
+
*/
|
|
17
|
+
constructor(buffer: Buffer);
|
|
18
|
+
/**
|
|
19
|
+
* Skip bytes
|
|
20
|
+
*/
|
|
21
|
+
skip(count: number): this;
|
|
22
|
+
/**
|
|
23
|
+
* Change the current buffer offset
|
|
24
|
+
*/
|
|
25
|
+
goto(offset: number): this;
|
|
26
|
+
/**
|
|
27
|
+
* Write an int8
|
|
28
|
+
*/
|
|
29
|
+
writeInt8(value: number): this;
|
|
30
|
+
/**
|
|
31
|
+
* Write a uint8
|
|
32
|
+
*/
|
|
33
|
+
writeUInt8(value: number): this;
|
|
34
|
+
/**
|
|
35
|
+
* Write an int16
|
|
36
|
+
*/
|
|
37
|
+
writeInt16(value: number): this;
|
|
38
|
+
/**
|
|
39
|
+
* Write a uint16
|
|
40
|
+
*/
|
|
41
|
+
writeUInt16(value: number): this;
|
|
42
|
+
/**
|
|
43
|
+
* Write an int32
|
|
44
|
+
*/
|
|
45
|
+
writeInt32(value: number): this;
|
|
46
|
+
/**
|
|
47
|
+
* Write a uint32
|
|
48
|
+
*/
|
|
49
|
+
writeUInt32(value: number): this;
|
|
50
|
+
/**
|
|
51
|
+
* Write an int64
|
|
52
|
+
*/
|
|
53
|
+
writeInt64(value: bigint): this;
|
|
54
|
+
/**
|
|
55
|
+
* Write a uint64
|
|
56
|
+
*/
|
|
57
|
+
writeUInt64(value: bigint): this;
|
|
58
|
+
/**
|
|
59
|
+
* Write a float32
|
|
60
|
+
*/
|
|
61
|
+
writeFloat32(value: number): this;
|
|
62
|
+
/**
|
|
63
|
+
* Write a string
|
|
64
|
+
*/
|
|
65
|
+
writeString(value: string, encoding?: 'utf8' | 'utf16le'): this;
|
|
66
|
+
/**
|
|
67
|
+
* Write a boolean
|
|
68
|
+
*/
|
|
69
|
+
writeBool(value: boolean): this;
|
|
70
|
+
/**
|
|
71
|
+
* Write multiple bytes
|
|
72
|
+
*/
|
|
73
|
+
writeBytes(value: Buffer): this;
|
|
74
|
+
/**
|
|
75
|
+
* Write 16 bytes as a hex string
|
|
76
|
+
*/
|
|
77
|
+
writeId(value: string): this;
|
|
78
|
+
}
|
|
79
|
+
export default BinaryWriter;
|