@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,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Represents a writer for binary data used for tournament replays
|
|
5
|
+
* @private
|
|
6
|
+
*/
|
|
7
|
+
class BinaryWriter {
|
|
8
|
+
/**
|
|
9
|
+
* @param buffer The buffer
|
|
10
|
+
*/
|
|
11
|
+
constructor(buffer) {
|
|
12
|
+
this.buffer = buffer;
|
|
13
|
+
this.offset = 0;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Skip bytes
|
|
17
|
+
*/
|
|
18
|
+
skip(count) {
|
|
19
|
+
this.offset += count;
|
|
20
|
+
return this;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Change the current buffer offset
|
|
24
|
+
*/
|
|
25
|
+
goto(offset) {
|
|
26
|
+
this.offset = offset;
|
|
27
|
+
return this;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Write an int8
|
|
31
|
+
*/
|
|
32
|
+
writeInt8(value) {
|
|
33
|
+
this.buffer.writeInt8(value, this.offset);
|
|
34
|
+
this.offset += 1;
|
|
35
|
+
return this;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Write a uint8
|
|
39
|
+
*/
|
|
40
|
+
writeUInt8(value) {
|
|
41
|
+
this.buffer.writeUInt8(value, this.offset);
|
|
42
|
+
this.offset += 1;
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Write an int16
|
|
47
|
+
*/
|
|
48
|
+
writeInt16(value) {
|
|
49
|
+
this.buffer.writeInt16LE(value, this.offset);
|
|
50
|
+
this.offset += 2;
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Write a uint16
|
|
55
|
+
*/
|
|
56
|
+
writeUInt16(value) {
|
|
57
|
+
this.buffer.writeUInt16LE(value, this.offset);
|
|
58
|
+
this.offset += 2;
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Write an int32
|
|
63
|
+
*/
|
|
64
|
+
writeInt32(value) {
|
|
65
|
+
this.buffer.writeInt32LE(value, this.offset);
|
|
66
|
+
this.offset += 4;
|
|
67
|
+
return this;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Write a uint32
|
|
71
|
+
*/
|
|
72
|
+
writeUInt32(value) {
|
|
73
|
+
this.buffer.writeUInt32LE(value, this.offset);
|
|
74
|
+
this.offset += 4;
|
|
75
|
+
return this;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Write an int64
|
|
79
|
+
*/
|
|
80
|
+
writeInt64(value) {
|
|
81
|
+
this.buffer.writeBigInt64LE(value, this.offset);
|
|
82
|
+
this.offset += 8;
|
|
83
|
+
return this;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Write a uint64
|
|
87
|
+
*/
|
|
88
|
+
writeUInt64(value) {
|
|
89
|
+
this.buffer.writeBigUInt64LE(value, this.offset);
|
|
90
|
+
this.offset += 8;
|
|
91
|
+
return this;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Write a float32
|
|
95
|
+
*/
|
|
96
|
+
writeFloat32(value) {
|
|
97
|
+
this.buffer.writeFloatLE(value, this.offset);
|
|
98
|
+
this.offset += 4;
|
|
99
|
+
return this;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Write a string
|
|
103
|
+
*/
|
|
104
|
+
writeString(value, encoding = 'utf8') {
|
|
105
|
+
this.writeInt32(encoding === 'utf8' ? value.length + 1 : -(value.length + 1));
|
|
106
|
+
this.writeBytes(Buffer.from(value, encoding));
|
|
107
|
+
this.skip(encoding === 'utf8' ? 1 : 2);
|
|
108
|
+
return this;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Write a boolean
|
|
112
|
+
*/
|
|
113
|
+
writeBool(value) {
|
|
114
|
+
this.writeInt32(value === true ? 1 : 0);
|
|
115
|
+
return this;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Write multiple bytes
|
|
119
|
+
*/
|
|
120
|
+
writeBytes(value) {
|
|
121
|
+
value.forEach((b, i) => {
|
|
122
|
+
this.buffer[this.offset + i] = b;
|
|
123
|
+
});
|
|
124
|
+
this.offset += value.byteLength;
|
|
125
|
+
return this;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Write 16 bytes as a hex string
|
|
129
|
+
*/
|
|
130
|
+
writeId(value) {
|
|
131
|
+
this.writeBytes(Buffer.from(Buffer.from(value).toString('hex')));
|
|
132
|
+
return this;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.default = BinaryWriter;
|
|
136
|
+
//# sourceMappingURL=BinaryWriter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BinaryWriter.js","sourceRoot":"","sources":["../../../src/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AM,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;QAC9C,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACI,SAAS,CAAC,KAAc;QAC7B,IAAI,CAAC,UAAU,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACI,UAAU,CAAC,KAAa;QAC7B,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACrB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACI,OAAO,CAAC,KAAa;QAC1B,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACjE,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface CurveKey {
|
|
2
|
+
KeyTime: number;
|
|
3
|
+
KeyValue: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Represents a curve table used for STW power level calculations
|
|
7
|
+
* @private
|
|
8
|
+
*/
|
|
9
|
+
declare class CurveTable {
|
|
10
|
+
/**
|
|
11
|
+
* The curve table's keys
|
|
12
|
+
*/
|
|
13
|
+
keys: [number, number][];
|
|
14
|
+
/**
|
|
15
|
+
* @param data The curve table's data
|
|
16
|
+
*/
|
|
17
|
+
constructor(data: CurveKey[]);
|
|
18
|
+
/**
|
|
19
|
+
* Read a value from the curve table
|
|
20
|
+
* @param key The key
|
|
21
|
+
*/
|
|
22
|
+
eval(key: number): number;
|
|
23
|
+
}
|
|
24
|
+
export default CurveTable;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Represents a curve table used for STW power level calculations
|
|
5
|
+
* @private
|
|
6
|
+
*/
|
|
7
|
+
class CurveTable {
|
|
8
|
+
/**
|
|
9
|
+
* @param data The curve table's data
|
|
10
|
+
*/
|
|
11
|
+
constructor(data) {
|
|
12
|
+
this.keys = [];
|
|
13
|
+
for (const value of data) {
|
|
14
|
+
this.keys.push([value.KeyTime, value.KeyValue]);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Read a value from the curve table
|
|
19
|
+
* @param key The key
|
|
20
|
+
*/
|
|
21
|
+
eval(key) {
|
|
22
|
+
if (key < this.keys[0][0]) {
|
|
23
|
+
return this.keys[0][1];
|
|
24
|
+
}
|
|
25
|
+
if (key >= this.keys[this.keys.length - 1][0]) {
|
|
26
|
+
return this.keys[this.keys.length - 1][1];
|
|
27
|
+
}
|
|
28
|
+
const index = this.keys.findIndex((k) => k[0] > key);
|
|
29
|
+
const prev = this.keys[index - 1];
|
|
30
|
+
const next = this.keys[index];
|
|
31
|
+
const fac = (key - prev[0]) / (next[0] - prev[0]);
|
|
32
|
+
const final = prev[1] * (1 - fac) + next[1] * fac;
|
|
33
|
+
return final;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.default = CurveTable;
|
|
37
|
+
//# sourceMappingURL=CurveTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CurveTable.js","sourceRoot":"","sources":["../../../src/util/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AAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,IAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;QAEpD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAED,kBAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Schema } from '../../resources/structs';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a key-value-based meta structure used for parties and party members
|
|
4
|
+
* @private
|
|
5
|
+
*/
|
|
6
|
+
declare class Meta<T extends Schema> {
|
|
7
|
+
/**
|
|
8
|
+
* The key-value schema
|
|
9
|
+
*/
|
|
10
|
+
schema: T;
|
|
11
|
+
/**
|
|
12
|
+
* @param schema The key-value schema
|
|
13
|
+
*/
|
|
14
|
+
constructor(schema: T);
|
|
15
|
+
/**
|
|
16
|
+
* Adds a key-value pair to the schema
|
|
17
|
+
* @param key The key
|
|
18
|
+
* @param value The value
|
|
19
|
+
* @param isRaw Whether the value should be added without further type checking
|
|
20
|
+
* @returns A parsed version of the value
|
|
21
|
+
*/
|
|
22
|
+
set(key: keyof T & string, value: any, isRaw?: boolean): T[keyof T & string];
|
|
23
|
+
/**
|
|
24
|
+
* Gets a value inside the schema by its key
|
|
25
|
+
* @param key The key
|
|
26
|
+
* @returns The value of the provided key
|
|
27
|
+
*/
|
|
28
|
+
get(key: keyof T & string): any;
|
|
29
|
+
/**
|
|
30
|
+
* Updates the schema
|
|
31
|
+
* @param schema The new schema
|
|
32
|
+
* @param isRaw Whether the values are raw
|
|
33
|
+
*/
|
|
34
|
+
update(schema: Partial<T>, isRaw?: boolean): void;
|
|
35
|
+
/**
|
|
36
|
+
* Deletes the provided keys
|
|
37
|
+
* @param keys The keys to delete
|
|
38
|
+
*/
|
|
39
|
+
remove(keys: (keyof T & string)[]): void;
|
|
40
|
+
}
|
|
41
|
+
export default Meta;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Represents a key-value-based meta structure used for parties and party members
|
|
5
|
+
* @private
|
|
6
|
+
*/
|
|
7
|
+
class Meta {
|
|
8
|
+
/**
|
|
9
|
+
* @param schema The key-value schema
|
|
10
|
+
*/
|
|
11
|
+
constructor(schema) {
|
|
12
|
+
this.schema = schema || {};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Adds a key-value pair to the schema
|
|
16
|
+
* @param key The key
|
|
17
|
+
* @param value The value
|
|
18
|
+
* @param isRaw Whether the value should be added without further type checking
|
|
19
|
+
* @returns A parsed version of the value
|
|
20
|
+
*/
|
|
21
|
+
set(key, value, isRaw = false) {
|
|
22
|
+
if (isRaw) {
|
|
23
|
+
this.schema[key] = value.toString();
|
|
24
|
+
return this.schema[key];
|
|
25
|
+
}
|
|
26
|
+
const keyType = key.slice(-1);
|
|
27
|
+
if (keyType === 'j') {
|
|
28
|
+
this.schema[key] = JSON.stringify(value);
|
|
29
|
+
}
|
|
30
|
+
else if (keyType === 'U') {
|
|
31
|
+
this.schema[key] = parseInt(value, 10).toString();
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
this.schema[key] = value.toString();
|
|
35
|
+
}
|
|
36
|
+
return this.schema[key];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Gets a value inside the schema by its key
|
|
40
|
+
* @param key The key
|
|
41
|
+
* @returns The value of the provided key
|
|
42
|
+
*/
|
|
43
|
+
get(key) {
|
|
44
|
+
const keyType = key.slice(-1);
|
|
45
|
+
if (keyType === 'b') {
|
|
46
|
+
return this.schema[key] === 'true';
|
|
47
|
+
}
|
|
48
|
+
if (keyType === 'j') {
|
|
49
|
+
return typeof this.schema[key] !== 'undefined' ? JSON.parse(this.schema[key]) : {};
|
|
50
|
+
}
|
|
51
|
+
if (keyType === 'U') {
|
|
52
|
+
return typeof this.schema[key] !== 'undefined' ? parseInt(this.schema[key], 10) : undefined;
|
|
53
|
+
}
|
|
54
|
+
return typeof this.schema[key] !== 'undefined' ? this.schema[key].toString() : '';
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Updates the schema
|
|
58
|
+
* @param schema The new schema
|
|
59
|
+
* @param isRaw Whether the values are raw
|
|
60
|
+
*/
|
|
61
|
+
update(schema, isRaw = false) {
|
|
62
|
+
Object.keys(schema).forEach((prop) => this.set(prop, schema[prop], isRaw));
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Deletes the provided keys
|
|
66
|
+
* @param keys The keys to delete
|
|
67
|
+
*/
|
|
68
|
+
remove(keys) {
|
|
69
|
+
keys.forEach((k) => delete this.schema[k]);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.default = Meta;
|
|
73
|
+
//# sourceMappingURL=Meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Meta.js","sourceRoot":"","sources":["../../../src/util/Meta.ts"],"names":[],"mappings":";;AAEA;;;GAGG;AACH,MAAM,IAAI;IAMR;;OAEG;IACH,YAAY,MAAS;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,EAAE,CAAC;IAC7B,CAAC;IAED;;;;;;OAMG;IACI,GAAG,CAAC,GAAqB,EAAE,KAAU,EAAE,KAAK,GAAG,KAAK;QACzD,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;YACpC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QAED,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,OAAO,KAAK,GAAG,EAAE,CAAC;YACpB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAQ,CAAC;QAClD,CAAC;aAAM,I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AAM,CAAC,MAAkB,EAAE,KAAK,GAAG,KAAK;QAC7C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAsB,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAC/F,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,IAA0B;QACtC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC;CACF;AAED,kBAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import type { Schema, ReplayData, STWItemRarity, STWSurvivorType, STWSurvivorSquads, STWHeroType, StatsPlaylistTypeData, STWItemTier, STWSchematicType, STWSchematicEvoType, STWSchematicSubType, AuthStringResolveable, DeviceAuthResolveable } from '../../resources/structs';
|
|
2
|
+
export declare const consoleQuestion: (question: string) => Promise<string>;
|
|
3
|
+
export declare const makeCamelCase: (obj: {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}) => any;
|
|
6
|
+
export declare const makeSnakeCase: (obj: {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}) => any;
|
|
9
|
+
export declare const getRandomDefaultCharacter: () => string | undefined;
|
|
10
|
+
export declare const createPartyInvitation: (clientUserId: string, pingerId: string, data: any) => {
|
|
11
|
+
party_id: any;
|
|
12
|
+
sent_by: string;
|
|
13
|
+
sent_to: string;
|
|
14
|
+
sent_at: any;
|
|
15
|
+
updated_at: any;
|
|
16
|
+
expires_at: any;
|
|
17
|
+
status: string;
|
|
18
|
+
meta: Schema;
|
|
19
|
+
};
|
|
20
|
+
export declare const parseBlurlStream: (stream: Buffer) => Promise<any>;
|
|
21
|
+
export declare const parseM3U8File: (data: string) => any;
|
|
22
|
+
export declare const buildReplay: (replayData: ReplayData, addStats: boolean) => Buffer;
|
|
23
|
+
export declare const parseSTWSurvivorTemplateId: (templateId: string) => {
|
|
24
|
+
type: STWSurvivorType;
|
|
25
|
+
tier: STWItemTier;
|
|
26
|
+
rarity: STWItemRarity;
|
|
27
|
+
name: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
export declare const calcSTWSurvivorPowerLevel: (rarity: STWItemRarity, isLeader: boolean, level: number, tier: STWItemTier) => number;
|
|
30
|
+
export declare const calcSTWSurvivorBonus: (leaderPersonality: string, leaderRarity: string, survivorPersonality: string, survivorPowerLevel: number) => 0 | 2 | 4 | 8 | 3 | 5 | -2;
|
|
31
|
+
export declare const calcSTWSurvivorLeadBonus: (managerSynergy: string, squadName: keyof STWSurvivorSquads, powerLevel: number) => number;
|
|
32
|
+
export declare const parseSTWHeroTemplateId: (templateId: string) => {
|
|
33
|
+
type: STWHeroType;
|
|
34
|
+
tier: STWItemTier;
|
|
35
|
+
rarity: STWItemRarity;
|
|
36
|
+
name: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
export declare const calcSTWNonSurvivorPowerLevel: (rarity: STWItemRarity, level: number, tier: STWItemTier) => number;
|
|
39
|
+
export declare function parseSTWSchematicTemplateId(templateId: string): {
|
|
40
|
+
type: STWSchematicType;
|
|
41
|
+
subType?: STWSchematicSubType;
|
|
42
|
+
tier?: STWItemTier;
|
|
43
|
+
evoType?: STWSchematicEvoType;
|
|
44
|
+
rarity?: STWItemRarity;
|
|
45
|
+
name?: string;
|
|
46
|
+
};
|
|
47
|
+
export declare const createDefaultInputTypeStats: () => {
|
|
48
|
+
overall: {
|
|
49
|
+
score: number;
|
|
50
|
+
scorePerMin: number;
|
|
51
|
+
scorePerMatch: number;
|
|
52
|
+
wins: number;
|
|
53
|
+
top3: number;
|
|
54
|
+
top5: number;
|
|
55
|
+
top6: number;
|
|
56
|
+
top10: number;
|
|
57
|
+
top12: number;
|
|
58
|
+
top25: number;
|
|
59
|
+
kills: number;
|
|
60
|
+
killsPerMin: number;
|
|
61
|
+
killsPerMatch: number;
|
|
62
|
+
deaths: number;
|
|
63
|
+
kd: number;
|
|
64
|
+
matches: number;
|
|
65
|
+
winRate: number;
|
|
66
|
+
minutesPlayed: number;
|
|
67
|
+
playersOutlived: number;
|
|
68
|
+
lastModified: undefined;
|
|
69
|
+
};
|
|
70
|
+
solo: {
|
|
71
|
+
score: number;
|
|
72
|
+
scorePerMin: number;
|
|
73
|
+
scorePerMatch: number;
|
|
74
|
+
wins: number;
|
|
75
|
+
top3: number;
|
|
76
|
+
top5: number;
|
|
77
|
+
top6: number;
|
|
78
|
+
top10: number;
|
|
79
|
+
top12: number;
|
|
80
|
+
top25: number;
|
|
81
|
+
kills: number;
|
|
82
|
+
killsPerMin: number;
|
|
83
|
+
killsPerMatch: number;
|
|
84
|
+
deaths: number;
|
|
85
|
+
kd: number;
|
|
86
|
+
matches: number;
|
|
87
|
+
winRate: number;
|
|
88
|
+
minutesPlayed: number;
|
|
89
|
+
playersOutlived: number;
|
|
90
|
+
lastModified: undefined;
|
|
91
|
+
};
|
|
92
|
+
duo: {
|
|
93
|
+
score: number;
|
|
94
|
+
scorePerMin: number;
|
|
95
|
+
scorePerMatch: number;
|
|
96
|
+
wins: number;
|
|
97
|
+
top3: number;
|
|
98
|
+
top5: number;
|
|
99
|
+
top6: number;
|
|
100
|
+
top10: number;
|
|
101
|
+
top12: number;
|
|
102
|
+
top25: number;
|
|
103
|
+
kills: number;
|
|
104
|
+
killsPerMin: number;
|
|
105
|
+
killsPerMatch: number;
|
|
106
|
+
deaths: number;
|
|
107
|
+
kd: number;
|
|
108
|
+
matches: number;
|
|
109
|
+
winRate: number;
|
|
110
|
+
minutesPlayed: number;
|
|
111
|
+
playersOutlived: number;
|
|
112
|
+
lastModified: undefined;
|
|
113
|
+
};
|
|
114
|
+
squad: {
|
|
115
|
+
score: number;
|
|
116
|
+
scorePerMin: number;
|
|
117
|
+
scorePerMatch: number;
|
|
118
|
+
wins: number;
|
|
119
|
+
top3: number;
|
|
120
|
+
top5: number;
|
|
121
|
+
top6: number;
|
|
122
|
+
top10: number;
|
|
123
|
+
top12: number;
|
|
124
|
+
top25: number;
|
|
125
|
+
kills: number;
|
|
126
|
+
killsPerMin: number;
|
|
127
|
+
killsPerMatch: number;
|
|
128
|
+
deaths: number;
|
|
129
|
+
kd: number;
|
|
130
|
+
matches: number;
|
|
131
|
+
winRate: number;
|
|
132
|
+
minutesPlayed: number;
|
|
133
|
+
playersOutlived: number;
|
|
134
|
+
lastModified: undefined;
|
|
135
|
+
};
|
|
136
|
+
ltm: {
|
|
137
|
+
score: number;
|
|
138
|
+
scorePerMin: number;
|
|
139
|
+
scorePerMatch: number;
|
|
140
|
+
wins: number;
|
|
141
|
+
top3: number;
|
|
142
|
+
top5: number;
|
|
143
|
+
top6: number;
|
|
144
|
+
top10: number;
|
|
145
|
+
top12: number;
|
|
146
|
+
top25: number;
|
|
147
|
+
kills: number;
|
|
148
|
+
killsPerMin: number;
|
|
149
|
+
killsPerMatch: number;
|
|
150
|
+
deaths: number;
|
|
151
|
+
kd: number;
|
|
152
|
+
matches: number;
|
|
153
|
+
winRate: number;
|
|
154
|
+
minutesPlayed: number;
|
|
155
|
+
playersOutlived: number;
|
|
156
|
+
lastModified: undefined;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
export declare const parseStatKey: (key: string, value: number) => [keyof StatsPlaylistTypeData, (number | Date)];
|
|
160
|
+
export declare const resolveAuthString: (str: AuthStringResolveable) => Promise<string>;
|
|
161
|
+
export declare const resolveAuthObject: (obj: DeviceAuthResolveable) => Promise<any>;
|
|
162
|
+
export declare const chunk: <T extends unknown>(array: T[], maxSize: number) => T[][];
|