@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,124 @@
|
|
|
1
|
+
import type { TournamentWindowBlackoutPeriod, TournamentWindowData, TournamentWindowMetadata, TournamentWindowScoreLocation, TournamentWindowTemplateData, TournamentWindowTemplatePayoutTable, TournamentWindowTemplateScoringRule, TournamentWindowTemplateTiebreakFormula } from '../../resources/httpResponses';
|
|
2
|
+
import type Tournament from './Tournament';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a Fortnite tournament window
|
|
5
|
+
*/
|
|
6
|
+
declare class TournamentWindow {
|
|
7
|
+
/**
|
|
8
|
+
* The tournament this window belongs to
|
|
9
|
+
*/
|
|
10
|
+
tournament: Tournament;
|
|
11
|
+
/**
|
|
12
|
+
* The tournament window ID
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
/**
|
|
16
|
+
* The count down begin date
|
|
17
|
+
*/
|
|
18
|
+
countdownBeginTime: Date;
|
|
19
|
+
/**
|
|
20
|
+
* The tournament windows's begin time
|
|
21
|
+
*/
|
|
22
|
+
beginTime: Date;
|
|
23
|
+
/**
|
|
24
|
+
* The tournament windows's end time
|
|
25
|
+
*/
|
|
26
|
+
endTime: Date;
|
|
27
|
+
/**
|
|
28
|
+
* The blackout periods
|
|
29
|
+
*/
|
|
30
|
+
blackoutPeriods: TournamentWindowBlackoutPeriod[];
|
|
31
|
+
/**
|
|
32
|
+
* The round number
|
|
33
|
+
*/
|
|
34
|
+
round: number;
|
|
35
|
+
/**
|
|
36
|
+
* The payout delay
|
|
37
|
+
*/
|
|
38
|
+
payoutDelay: number;
|
|
39
|
+
/**
|
|
40
|
+
* Whether this tournament window is TBD
|
|
41
|
+
*/
|
|
42
|
+
isTBD: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether live spectating is enabled for this tournament window
|
|
45
|
+
*/
|
|
46
|
+
canLiveSpectate: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* The score locations
|
|
49
|
+
*/
|
|
50
|
+
scoreLocations: TournamentWindowScoreLocation[];
|
|
51
|
+
/**
|
|
52
|
+
* The tournament window's visibility
|
|
53
|
+
*/
|
|
54
|
+
visibility: string;
|
|
55
|
+
/**
|
|
56
|
+
* All required tokens to participate in this tournament window
|
|
57
|
+
*/
|
|
58
|
+
requireAllTokens: string[];
|
|
59
|
+
/**
|
|
60
|
+
* Any tokens required to participate in this tournament window
|
|
61
|
+
*/
|
|
62
|
+
requireAnyTokens: string[];
|
|
63
|
+
/**
|
|
64
|
+
* requireNoneTokensCaller
|
|
65
|
+
*/
|
|
66
|
+
requireNoneTokensCaller: string[];
|
|
67
|
+
/**
|
|
68
|
+
* requireAllTokensCaller
|
|
69
|
+
*/
|
|
70
|
+
requireAllTokensCaller: any[];
|
|
71
|
+
/**
|
|
72
|
+
* requireAnyTokensCaller
|
|
73
|
+
*/
|
|
74
|
+
requireAnyTokensCaller: any[];
|
|
75
|
+
/**
|
|
76
|
+
* Additional requirements to participate in this tournament window
|
|
77
|
+
*/
|
|
78
|
+
additionalRequirements: string[];
|
|
79
|
+
/**
|
|
80
|
+
* The team mate eligibility
|
|
81
|
+
*/
|
|
82
|
+
teammateEligibility: string;
|
|
83
|
+
/**
|
|
84
|
+
* The tournament window's meta data
|
|
85
|
+
*/
|
|
86
|
+
metadata: TournamentWindowMetadata;
|
|
87
|
+
/**
|
|
88
|
+
* The tournament windows's playlist id
|
|
89
|
+
*/
|
|
90
|
+
playlistId?: string;
|
|
91
|
+
/**
|
|
92
|
+
* The tournament window's match cap
|
|
93
|
+
*/
|
|
94
|
+
matchCap?: number;
|
|
95
|
+
/**
|
|
96
|
+
* The tournament windows's live session attributes
|
|
97
|
+
*/
|
|
98
|
+
liveSessionAttributes?: string[];
|
|
99
|
+
/**
|
|
100
|
+
* The tournament windows's scoring rules
|
|
101
|
+
*/
|
|
102
|
+
scoringRules?: TournamentWindowTemplateScoringRule[];
|
|
103
|
+
/**
|
|
104
|
+
* The tournament window's tiebreaker formula
|
|
105
|
+
*/
|
|
106
|
+
tiebreakerFormula?: TournamentWindowTemplateTiebreakFormula;
|
|
107
|
+
/**
|
|
108
|
+
* The tournament window's payout table
|
|
109
|
+
*/
|
|
110
|
+
payoutTable?: TournamentWindowTemplatePayoutTable[];
|
|
111
|
+
/**
|
|
112
|
+
* @param tournament The tournament this window belongs to
|
|
113
|
+
* @param windowData The tournament window's data
|
|
114
|
+
* @param tournamentWindowTemplateData The tournament window's template data
|
|
115
|
+
*/
|
|
116
|
+
constructor(tournament: Tournament, windowData: TournamentWindowData, tournamentWindowTemplateData?: TournamentWindowTemplateData);
|
|
117
|
+
/**
|
|
118
|
+
* Fetches the results for this tournament window
|
|
119
|
+
* @param page The results page index
|
|
120
|
+
* @param showLiveSessions Whether to show live sessions
|
|
121
|
+
*/
|
|
122
|
+
getResults(page?: number, showLiveSessions?: boolean): Promise<import("../../resources/httpResponses").TournamentWindowResults>;
|
|
123
|
+
}
|
|
124
|
+
export default TournamentWindow;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Represents a Fortnite tournament window
|
|
5
|
+
*/
|
|
6
|
+
class TournamentWindow {
|
|
7
|
+
/**
|
|
8
|
+
* @param tournament The tournament this window belongs to
|
|
9
|
+
* @param windowData The tournament window's data
|
|
10
|
+
* @param tournamentWindowTemplateData The tournament window's template data
|
|
11
|
+
*/
|
|
12
|
+
constructor(tournament, windowData, tournamentWindowTemplateData) {
|
|
13
|
+
Object.defineProperty(this, 'tournament', { value: tournament });
|
|
14
|
+
// Window data
|
|
15
|
+
this.id = windowData.eventWindowId;
|
|
16
|
+
this.countdownBeginTime = new Date(windowData.countdownBeginTime);
|
|
17
|
+
this.beginTime = new Date(windowData.beginTime);
|
|
18
|
+
this.endTime = new Date(windowData.endTime);
|
|
19
|
+
this.blackoutPeriods = windowData.blackoutPeriods;
|
|
20
|
+
this.round = windowData.round;
|
|
21
|
+
this.payoutDelay = windowData.payoutDelay;
|
|
22
|
+
this.isTBD = windowData.isTBD;
|
|
23
|
+
this.canLiveSpectate = windowData.canLiveSpectate;
|
|
24
|
+
this.scoreLocations = windowData.scoreLocations;
|
|
25
|
+
this.visibility = windowData.visibility;
|
|
26
|
+
this.requireAllTokens = windowData.requireAllTokens;
|
|
27
|
+
this.requireAnyTokens = windowData.requireAnyTokens;
|
|
28
|
+
this.requireNoneTokensCaller = windowData.requireNoneTokensCaller;
|
|
29
|
+
this.requireAllTokensCaller = windowData.requireAllTokensCaller;
|
|
30
|
+
this.requireAnyTokensCaller = windowData.requireAnyTokensCaller;
|
|
31
|
+
this.additionalRequirements = windowData.additionalRequirements;
|
|
32
|
+
this.teammateEligibility = windowData.teammateEligibility;
|
|
33
|
+
this.metadata = windowData.metadata;
|
|
34
|
+
// Template data
|
|
35
|
+
this.playlistId = tournamentWindowTemplateData === null || tournamentWindowTemplateData === void 0 ? void 0 : tournamentWindowTemplateData.playlistId;
|
|
36
|
+
this.matchCap = tournamentWindowTemplateData === null || tournamentWindowTemplateData === void 0 ? void 0 : tournamentWindowTemplateData.matchCap;
|
|
37
|
+
this.liveSessionAttributes = tournamentWindowTemplateData === null || tournamentWindowTemplateData === void 0 ? void 0 : tournamentWindowTemplateData.liveSessionAttributes;
|
|
38
|
+
this.scoringRules = tournamentWindowTemplateData === null || tournamentWindowTemplateData === void 0 ? void 0 : tournamentWindowTemplateData.scoringRules;
|
|
39
|
+
this.tiebreakerFormula = tournamentWindowTemplateData === null || tournamentWindowTemplateData === void 0 ? void 0 : tournamentWindowTemplateData.tiebreakerFormula;
|
|
40
|
+
this.payoutTable = tournamentWindowTemplateData === null || tournamentWindowTemplateData === void 0 ? void 0 : tournamentWindowTemplateData.payoutTable;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Fetches the results for this tournament window
|
|
44
|
+
* @param page The results page index
|
|
45
|
+
* @param showLiveSessions Whether to show live sessions
|
|
46
|
+
*/
|
|
47
|
+
async getResults(page = 0, showLiveSessions = false) {
|
|
48
|
+
return this.tournament.client.tournaments.getWindowResults(this.tournament.id, this.id, showLiveSessions, page);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.default = TournamentWindow;
|
|
52
|
+
//# sourceMappingURL=TournamentWindow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TournamentWindow.js","sourceRoot":"","sources":["../../../src/structures/TournamentWindow.ts"],"names":[],"mappings":";;AAOA;;GAEG;AACH,MAAM,gBAAgB;IAmIpB;;;;OAIG;IACH,YAAY,UAAsB,EAAE,UAAgC,EAAE,4BAA2D;QAC/H,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;QAEjE,cAAc;QACd,IAAI,CAAC,EAAE,GAAG,UAAU,CAAC,aAAa,CAAC;QACnC,IAAI,CAAC,kBAAkB,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;QAClE,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC5C,IAAI,CAAC,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;QAClD,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QAC9B,IAAI,CAAC,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;QAClD,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;QAChD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,CAAC;QACpD,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,CAAC;QACpD,IAAI,CAAC,uBAAuB,GAAG,UAAU,CAAC,uBAAuB,CAAC;QAClE,IAAI,CAAC,sBAAsB,GAAG,UAAU,CAAC,sBAAsB,CAAC;QAChE,IAAI,CAAC,sBAAsB,GAAG,UAAU,CAAC,sBAAsB,CAAC;QAChE,IAAI,CAAC,sBAAsB,GAAG,UAAU,CAAC,sBAAsB,CAAC;QAChE,IAAI,CAAC,mBAAmB,GAAG,UAAU,CAAC,mBAAmB,CAAC;QAC1D,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;QAEpC,gBAAgB;QAChB,IAAI,CAAC,UAAU,GAAG,4BAA4B,aAA5B,4BAA4B,uBAA5B,4BAA4B,CAAE,UAAU,CAAC;QAC3D,IAAI,CAAC,QAAQ,GAAG,4BAA4B,aAA5B,4BAA4B,uBAA5B,4BAA4B,CAAE,QAAQ,CAAC;QACvD,IAAI,CAAC,qBAAqB,GAAG,4BAA4B,aAA5B,4BAA4B,uBAA5B,4BAA4B,CAAE,qBAAqB,CAAC;QACjF,IAAI,CAAC,YAAY,GAAG,4BAA4B,aAA5B,4BAA4B,uBAA5B,4BAA4B,CAAE,YAAY,CAAC;QAC/D,IAAI,CAAC,iBAAiB,GAAG,4BAA4B,aAA5B,4BAA4B,uBAA5B,4BAA4B,CAAE,iBAAiB,CAAC;QACzE,IAAI,CAAC,WAAW,GAAG,4BAA4B,aAA5B,4BAA4B,uBAA5B,4BAA4B,CAAE,WAAW,CAAC;IAC/D,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,EAAE,gBAAgB,GAAG,KAAK;QACxD,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,CAAC,CAAC;IAClH,CAAC;CACF;AAED,kBAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import BaseMessage from '../BaseMessage';
|
|
2
|
+
import type ClientUser from '../user/ClientUser';
|
|
3
|
+
import type Friend from './Friend';
|
|
4
|
+
import type Client from '../../Client';
|
|
5
|
+
import type { MessageData } from '../../../resources/structs';
|
|
6
|
+
/**
|
|
7
|
+
* Represents a friend whisper message
|
|
8
|
+
*/
|
|
9
|
+
declare class BaseFriendMessage extends BaseMessage {
|
|
10
|
+
/**
|
|
11
|
+
* The message's content
|
|
12
|
+
*/
|
|
13
|
+
content: string;
|
|
14
|
+
/**
|
|
15
|
+
* The message's author
|
|
16
|
+
*/
|
|
17
|
+
author: Friend | ClientUser;
|
|
18
|
+
/**
|
|
19
|
+
* @param client The main client
|
|
20
|
+
* @param data The message's data
|
|
21
|
+
*/
|
|
22
|
+
constructor(client: Client, data: MessageData & {
|
|
23
|
+
author: Friend | ClientUser;
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Replies to this whisper message
|
|
27
|
+
* @param content The message that will be sent
|
|
28
|
+
* @throws {FriendNotFoundError} The user is not friends with the client
|
|
29
|
+
*/
|
|
30
|
+
reply(content: string): Promise<import("./SentFriendMessage").default>;
|
|
31
|
+
}
|
|
32
|
+
export default BaseFriendMessage;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const BaseMessage_1 = tslib_1.__importDefault(require("../BaseMessage"));
|
|
5
|
+
/**
|
|
6
|
+
* Represents a friend whisper message
|
|
7
|
+
*/
|
|
8
|
+
class BaseFriendMessage extends BaseMessage_1.default {
|
|
9
|
+
/**
|
|
10
|
+
* @param client The main client
|
|
11
|
+
* @param data The message's data
|
|
12
|
+
*/
|
|
13
|
+
constructor(client, data) {
|
|
14
|
+
super(client, data);
|
|
15
|
+
this.content = data.content;
|
|
16
|
+
this.author = data.author;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Replies to this whisper message
|
|
20
|
+
* @param content The message that will be sent
|
|
21
|
+
* @throws {FriendNotFoundError} The user is not friends with the client
|
|
22
|
+
*/
|
|
23
|
+
reply(content) {
|
|
24
|
+
return this.client.friend.sendMessage(this.author.id, content);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = BaseFriendMessage;
|
|
28
|
+
//# sourceMappingURL=BaseFriendMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseFriendMessage.js","sourceRoot":"","sources":["../../../../src/structures/friend/BaseFriendMessage.ts"],"names":[],"mappings":";;;AAAA,yEAAyC;AAMzC;;GAEG;AACH,MAAM,iBAAkB,SAAQ,qBAAW;IAWzC;;;OAGG;IACH,YAAY,MAAc,EAAE,IAAoD;QAC9E,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAEpB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,OAAe;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF;AAED,kBAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import User from '../user/User';
|
|
2
|
+
import type { PendingFriendData, PendingFriendDirection } from '../../../resources/structs';
|
|
3
|
+
import type Client from '../../Client';
|
|
4
|
+
/**
|
|
5
|
+
* Represents a pending friend request (Either incoming or outgoing)
|
|
6
|
+
*/
|
|
7
|
+
declare abstract class BasePendingFriend extends User {
|
|
8
|
+
/**
|
|
9
|
+
* The direction of the friend request
|
|
10
|
+
*/
|
|
11
|
+
direction: PendingFriendDirection;
|
|
12
|
+
/**
|
|
13
|
+
* The Date when the friend request was created
|
|
14
|
+
*/
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
/**
|
|
17
|
+
* @param client The main client
|
|
18
|
+
* @param data The friend request data
|
|
19
|
+
*/
|
|
20
|
+
constructor(client: Client, data: PendingFriendData);
|
|
21
|
+
}
|
|
22
|
+
export default BasePendingFriend;
|
|
@@ -0,0 +1,22 @@
|
|
|
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/User"));
|
|
5
|
+
/**
|
|
6
|
+
* Represents a pending friend request (Either incoming or outgoing)
|
|
7
|
+
*/
|
|
8
|
+
class BasePendingFriend extends User_1.default {
|
|
9
|
+
/**
|
|
10
|
+
* @param client The main client
|
|
11
|
+
* @param data The friend request data
|
|
12
|
+
*/
|
|
13
|
+
constructor(client, data) {
|
|
14
|
+
super(client, {
|
|
15
|
+
...data,
|
|
16
|
+
id: data.accountId,
|
|
17
|
+
});
|
|
18
|
+
this.createdAt = new Date(data.created);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = BasePendingFriend;
|
|
22
|
+
//# sourceMappingURL=BasePendingFriend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasePendingFriend.js","sourceRoot":"","sources":["../../../../src/structures/friend/BasePendingFriend.ts"],"names":[],"mappings":";;;AAAA,gEAAgC;AAIhC;;GAEG;AACH,MAAe,iBAAkB,SAAQ,cAAI;IAW3C;;;OAGG;IACH,YAAY,MAAc,EAAE,IAAuB;QACjD,KAAK,CAAC,MAAM,EAAE;YACZ,GAAG,IAAI;YACP,EAAE,EAAE,IAAI,CAAC,SAAS;SACnB,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;CACF;AAED,kBAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import User from '../user/User';
|
|
2
|
+
import type { FriendConnections, FriendData } from '../../../resources/structs';
|
|
3
|
+
import type FriendPresence from './FriendPresence';
|
|
4
|
+
import type PresenceParty from '../party/PresenceParty';
|
|
5
|
+
import type Client from '../../Client';
|
|
6
|
+
/**
|
|
7
|
+
* Represents a friend
|
|
8
|
+
*/
|
|
9
|
+
declare class Friend extends User {
|
|
10
|
+
/**
|
|
11
|
+
* The friend's console connections
|
|
12
|
+
*/
|
|
13
|
+
connections: FriendConnections;
|
|
14
|
+
/**
|
|
15
|
+
* The mutual friends count.
|
|
16
|
+
* Can be undefined if the friend was not friends with the client before startup
|
|
17
|
+
*/
|
|
18
|
+
mutualFriends?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Whether you favorited this friend
|
|
21
|
+
*/
|
|
22
|
+
favorite: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The date when the friendship was created
|
|
25
|
+
*/
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
/**
|
|
28
|
+
* The note for this friend
|
|
29
|
+
*/
|
|
30
|
+
note?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The alias for this friend
|
|
33
|
+
*/
|
|
34
|
+
alias?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The last recieved presence of this friend
|
|
37
|
+
*/
|
|
38
|
+
presence?: FriendPresence;
|
|
39
|
+
/**
|
|
40
|
+
* The friend's current party
|
|
41
|
+
*/
|
|
42
|
+
party?: PresenceParty;
|
|
43
|
+
/**
|
|
44
|
+
* Timestamp when the last presence was recieved from this friend.
|
|
45
|
+
* WARNING: Do not rely on this, it's set to undefined once this friend goes offline.
|
|
46
|
+
* Use {@link FriendPresence#recievedAt} instead
|
|
47
|
+
*/
|
|
48
|
+
lastAvailableTimestamp?: number;
|
|
49
|
+
/**
|
|
50
|
+
* @param client The main client
|
|
51
|
+
* @param data The friend data
|
|
52
|
+
*/
|
|
53
|
+
constructor(client: Client, data: FriendData);
|
|
54
|
+
/**
|
|
55
|
+
* Whether a user is online or not
|
|
56
|
+
* @readonly
|
|
57
|
+
*/
|
|
58
|
+
get isOnline(): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the client can join this friend's party or not
|
|
61
|
+
* May be slighly inaccurate as it uses the last received presence
|
|
62
|
+
* @readonly
|
|
63
|
+
*/
|
|
64
|
+
get isJoinable(): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Removes this friend
|
|
67
|
+
* @throws {FriendNotFoundError} The user is not friends with the client
|
|
68
|
+
* @throws {EpicgamesAPIError}
|
|
69
|
+
*/
|
|
70
|
+
remove(): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Sends a message to this friend
|
|
73
|
+
* @param content The message that will be sent
|
|
74
|
+
* @throws {FriendNotFoundError} The user is not friends with the client
|
|
75
|
+
*/
|
|
76
|
+
sendMessage(content: string): Promise<import("./SentFriendMessage").default>;
|
|
77
|
+
/**
|
|
78
|
+
* Sends a party join request to this friend.
|
|
79
|
+
* When the friend confirms this, a party invite will be sent to the client
|
|
80
|
+
* @throws {EpicgamesAPIError}
|
|
81
|
+
*/
|
|
82
|
+
sendJoinRequest(): Promise<import("../party/SentPartyJoinRequest").default>;
|
|
83
|
+
/**
|
|
84
|
+
* Sends a party invitation to this friend
|
|
85
|
+
* @throws {FriendNotFoundError} The user is not friends with the client
|
|
86
|
+
* @throws {PartyAlreadyJoinedError} The user is already a member of this party
|
|
87
|
+
* @throws {PartyMaxSizeReachedError} The party reached its max size
|
|
88
|
+
* @throws {EpicgamesAPIError}
|
|
89
|
+
*/
|
|
90
|
+
invite(): Promise<import("../party/SentPartyInvitation").default>;
|
|
91
|
+
/**
|
|
92
|
+
* Fetches the friends the client shares with this friend
|
|
93
|
+
* @throws {FriendNotFoundError} The user is not friends with the client
|
|
94
|
+
* @throws {EpicgamesAPIError}
|
|
95
|
+
*/
|
|
96
|
+
getMutualFriends(): Promise<Friend[]>;
|
|
97
|
+
/**
|
|
98
|
+
* Checks whether this friend owns a specific offer
|
|
99
|
+
* @param offerId The offer id
|
|
100
|
+
* @throws {OfferNotFoundError} The offer does not exist or is not in the current storefront catalog
|
|
101
|
+
* @throws {FriendNotFoundError} The user does not exist or is not friends with the client
|
|
102
|
+
* @throws {EpicgamesAPIError}
|
|
103
|
+
*/
|
|
104
|
+
checkOfferOwnership(offerId: string): Promise<boolean>;
|
|
105
|
+
}
|
|
106
|
+
export default Friend;
|
|
@@ -0,0 +1,97 @@
|
|
|
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/User"));
|
|
5
|
+
/**
|
|
6
|
+
* Represents a friend
|
|
7
|
+
*/
|
|
8
|
+
class Friend extends User_1.default {
|
|
9
|
+
/**
|
|
10
|
+
* @param client The main client
|
|
11
|
+
* @param data The friend data
|
|
12
|
+
*/
|
|
13
|
+
constructor(client, data) {
|
|
14
|
+
super(client, data);
|
|
15
|
+
this.connections = data.connections || {};
|
|
16
|
+
this.mutualFriends = data.mutual;
|
|
17
|
+
this.favorite = data.favorite;
|
|
18
|
+
this.createdAt = new Date(data.created);
|
|
19
|
+
this.note = data.note;
|
|
20
|
+
this.alias = data.alias;
|
|
21
|
+
this.presence = undefined;
|
|
22
|
+
this.party = undefined;
|
|
23
|
+
this.lastAvailableTimestamp = undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Whether a user is online or not
|
|
27
|
+
* @readonly
|
|
28
|
+
*/
|
|
29
|
+
get isOnline() {
|
|
30
|
+
return !!this.lastAvailableTimestamp && Date.now() - this.lastAvailableTimestamp < this.client.config.friendOfflineTimeout;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Whether the client can join this friend's party or not
|
|
34
|
+
* May be slighly inaccurate as it uses the last received presence
|
|
35
|
+
* @readonly
|
|
36
|
+
*/
|
|
37
|
+
get isJoinable() {
|
|
38
|
+
var _a;
|
|
39
|
+
if (!this.isOnline)
|
|
40
|
+
return false;
|
|
41
|
+
return !!((_a = this.presence) === null || _a === void 0 ? void 0 : _a.isJoinable);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Removes this friend
|
|
45
|
+
* @throws {FriendNotFoundError} The user is not friends with the client
|
|
46
|
+
* @throws {EpicgamesAPIError}
|
|
47
|
+
*/
|
|
48
|
+
async remove() {
|
|
49
|
+
return this.client.friend.remove(this.id);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Sends a message to this friend
|
|
53
|
+
* @param content The message that will be sent
|
|
54
|
+
* @throws {FriendNotFoundError} The user is not friends with the client
|
|
55
|
+
*/
|
|
56
|
+
sendMessage(content) {
|
|
57
|
+
return this.client.friend.sendMessage(this.id, content);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Sends a party join request to this friend.
|
|
61
|
+
* When the friend confirms this, a party invite will be sent to the client
|
|
62
|
+
* @throws {EpicgamesAPIError}
|
|
63
|
+
*/
|
|
64
|
+
async sendJoinRequest() {
|
|
65
|
+
return this.client.sendRequestToJoin(this.id);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Sends a party invitation to this friend
|
|
69
|
+
* @throws {FriendNotFoundError} The user is not friends with the client
|
|
70
|
+
* @throws {PartyAlreadyJoinedError} The user is already a member of this party
|
|
71
|
+
* @throws {PartyMaxSizeReachedError} The party reached its max size
|
|
72
|
+
* @throws {EpicgamesAPIError}
|
|
73
|
+
*/
|
|
74
|
+
async invite() {
|
|
75
|
+
return this.client.invite(this.id);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Fetches the friends the client shares with this friend
|
|
79
|
+
* @throws {FriendNotFoundError} The user is not friends with the client
|
|
80
|
+
* @throws {EpicgamesAPIError}
|
|
81
|
+
*/
|
|
82
|
+
async getMutualFriends() {
|
|
83
|
+
return this.client.friend.getMutual(this.id);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Checks whether this friend owns a specific offer
|
|
87
|
+
* @param offerId The offer id
|
|
88
|
+
* @throws {OfferNotFoundError} The offer does not exist or is not in the current storefront catalog
|
|
89
|
+
* @throws {FriendNotFoundError} The user does not exist or is not friends with the client
|
|
90
|
+
* @throws {EpicgamesAPIError}
|
|
91
|
+
*/
|
|
92
|
+
async checkOfferOwnership(offerId) {
|
|
93
|
+
return this.client.friend.checkOfferOwnership(this.id, offerId);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.default = Friend;
|
|
97
|
+
//# sourceMappingURL=Friend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Friend.js","sourceRoot":"","sources":["../../../../src/structures/friend/Friend.ts"],"names":[],"mappings":";;;AAAA,gEAAgC;AAMhC;;GAEG;AACH,MAAM,MAAO,SAAQ,cAAI;IAiDvB;;;OAGG;IACH,YAAY,MAAc,EAAE,IAAgB;QAC1C,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAEpB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC;QAC1C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC1B,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,sBAAsB,GAAG,SAAS,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,IAAW,QAAQ;QACjB,OAAO,CAAC,CAAC,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC;IAC7H,CAAC;IAED;;;;OAIG;IACH,IAAW,UAAU;;QACnB,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QACjC,OAAO,CAAC,CAAC,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,CAAA,CAAC;IACrC,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED;;;;OAIG;IACI,WAAW,CAAC,OAAe;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,eAAe;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChD,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,MAAM;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACrC,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,gBAAgB;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,mBAAmB,CAAC,OAAe;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;CACF;AAED,kBAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import Base from '../../Base';
|
|
2
|
+
import type Client from '../../Client';
|
|
3
|
+
import type Friend from './Friend';
|
|
4
|
+
import type { FriendPresenceData, PresenceGameplayStats, Platform, PresenceOnlineType } from '../../../resources/structs';
|
|
5
|
+
/**
|
|
6
|
+
* Represents a friend's presence
|
|
7
|
+
*/
|
|
8
|
+
declare class FriendPresence extends Base {
|
|
9
|
+
/**
|
|
10
|
+
* The friend this presence belongs to
|
|
11
|
+
*/
|
|
12
|
+
friend: Friend;
|
|
13
|
+
/**
|
|
14
|
+
* The status of the friend (eg. "Battle Royale Lobby - 1 / 16")
|
|
15
|
+
*/
|
|
16
|
+
status?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The date when this presence was recieved
|
|
19
|
+
*/
|
|
20
|
+
receivedAt: Date;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the friend is playing
|
|
23
|
+
*/
|
|
24
|
+
isPlaying?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the friend's party is joinable
|
|
27
|
+
*/
|
|
28
|
+
isJoinable?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Whether the friend has voice support
|
|
31
|
+
*/
|
|
32
|
+
hasVoiceSupport?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The id of the game session the friend is currently in
|
|
35
|
+
*/
|
|
36
|
+
sessionId?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The rating of the friend's SaveTheWorld homebase
|
|
39
|
+
*/
|
|
40
|
+
homebaseRating?: number;
|
|
41
|
+
/**
|
|
42
|
+
* The subgame the friend is in
|
|
43
|
+
*/
|
|
44
|
+
subGame?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the friend is in an unjoinable match or not
|
|
47
|
+
*/
|
|
48
|
+
isInUnjoinableMatch?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The friend's current selected playlist
|
|
51
|
+
*/
|
|
52
|
+
playlist?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The member count of the friend's party
|
|
55
|
+
*/
|
|
56
|
+
partySize?: number;
|
|
57
|
+
/**
|
|
58
|
+
* The max members of the friend's party
|
|
59
|
+
*/
|
|
60
|
+
partyMaxSize?: number;
|
|
61
|
+
/**
|
|
62
|
+
* The join key of the game session the friend is currently in (if the game session is joinable)
|
|
63
|
+
*/
|
|
64
|
+
gameSessionJoinKey?: string;
|
|
65
|
+
/**
|
|
66
|
+
* The stats of the game the friend is currently in
|
|
67
|
+
*/
|
|
68
|
+
gameplayStats?: PresenceGameplayStats;
|
|
69
|
+
/**
|
|
70
|
+
* The platform the friend is currently playing on
|
|
71
|
+
*/
|
|
72
|
+
platform?: Platform;
|
|
73
|
+
/**
|
|
74
|
+
* The friend's online type
|
|
75
|
+
*/
|
|
76
|
+
onlineType: PresenceOnlineType;
|
|
77
|
+
/**
|
|
78
|
+
* @param client The main client
|
|
79
|
+
* @param data The presence data
|
|
80
|
+
* @param friend The friend this presence belongs to
|
|
81
|
+
*/
|
|
82
|
+
constructor(client: Client, data: FriendPresenceData, friend: Friend, show: PresenceOnlineType, from: string);
|
|
83
|
+
}
|
|
84
|
+
export default FriendPresence;
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* Represents a friend's presence
|
|
7
|
+
*/
|
|
8
|
+
class FriendPresence extends Base_1.default {
|
|
9
|
+
/**
|
|
10
|
+
* @param client The main client
|
|
11
|
+
* @param data The presence data
|
|
12
|
+
* @param friend The friend this presence belongs to
|
|
13
|
+
*/
|
|
14
|
+
constructor(client, data, friend, show, from) {
|
|
15
|
+
var _a;
|
|
16
|
+
super(client);
|
|
17
|
+
this.friend = friend;
|
|
18
|
+
this.status = data.Status;
|
|
19
|
+
this.onlineType = show;
|
|
20
|
+
this.platform = (_a = from.match(/(?<=\/.+?:.+?:).+(?=::)/g)) === null || _a === void 0 ? void 0 : _a[0];
|
|
21
|
+
this.receivedAt = new Date();
|
|
22
|
+
this.isPlaying = data.bIsPlaying || false;
|
|
23
|
+
this.isJoinable = data.bIsJoinable || false;
|
|
24
|
+
this.hasVoiceSupport = data.bHasVoiceSupport || false;
|
|
25
|
+
this.sessionId = data.SessionId;
|
|
26
|
+
this.homebaseRating = data.Properties && data.Properties.FortBasicInfo_j ? data.Properties.FortBasicInfo_j.homeBaseRating : undefined;
|
|
27
|
+
this.subGame = data.Properties ? data.Properties.FortSubGame_i : undefined;
|
|
28
|
+
this.isInUnjoinableMatch = data.Properties ? data.Properties.InUnjoinableMatch_b : false;
|
|
29
|
+
this.playlist = data.Properties ? data.Properties.GamePlaylistName_s : undefined;
|
|
30
|
+
this.partySize = data.Properties && data.Properties.Event_PartySize_s ? parseInt(data.Properties.Event_PartySize_s, 10) : undefined;
|
|
31
|
+
this.partyMaxSize = data.Properties && data.Properties.Event_PartyMaxSize_s
|
|
32
|
+
? parseInt(data.Properties.Event_PartyMaxSize_s, 10) : undefined;
|
|
33
|
+
this.gameSessionJoinKey = data.Properties ? data.Properties.GameSessionJoinKey_s : undefined;
|
|
34
|
+
const serverPlayerCount = data.Properties && data.Properties.ServerPlayerCount_i
|
|
35
|
+
? parseInt(data.Properties.ServerPlayerCount_i, 10) : undefined;
|
|
36
|
+
this.gameplayStats = undefined;
|
|
37
|
+
if (data.Properties && data.Properties.FortGameplayStats_j) {
|
|
38
|
+
const gps = data.Properties.FortGameplayStats_j;
|
|
39
|
+
this.gameplayStats = {
|
|
40
|
+
kills: typeof gps.numKills === 'number' ? gps.numKills : undefined,
|
|
41
|
+
fellToDeath: gps.bFellToDeath,
|
|
42
|
+
serverPlayerCount,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.default = FriendPresence;
|
|
48
|
+
//# sourceMappingURL=FriendPresence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FriendPresence.js","sourceRoot":"","sources":["../../../../src/structures/friend/FriendPresence.ts"],"names":[],"mappings":";;;AAAA,8DAA8B;AAO9B;;GAEG;AACH,MAAM,cAAe,SAAQ,cAAI;IAsF/B;;;;OAIG;IACH,YAAY,MAAc,EAAE,IAAwB,EAAE,MAAc,EAAE,IAAwB,EAAE,IAAY;;QAC1G,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,MAAA,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,0CAAG,CAAC,CAAyB,CAAC;QACpF,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,EAAE,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,IAAI,KAAK,CAAC;QAC1C,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,IAAI,KAAK,CAAC;QAC5C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gBAAgB,IAAI,KAAK,CAAC;QACtD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAChC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;QACtI,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;QAC3E,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAC;QACzF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;QACjF,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACpI,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,oBAAoB;YACzE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACnE,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC;QAE7F,MAAM,iBAAiB,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,mBAAmB;YAC9E,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAClE,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC;QAE/B,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAC;YAC3D,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;YAEhD,IAAI,CAAC,aAAa,GAAG;gBACnB,KAAK,EAAE,OAAO,GAAG,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;gBAClE,WAAW,EAAE,GAAG,CAAC,YAAY;gBAC7B,iBAAiB;aAClB,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AAED,kBAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import BasePendingFriend from './BasePendingFriend';
|
|
2
|
+
import type { PendingFriendData } from '../../../resources/structs';
|
|
3
|
+
import type Client from '../../Client';
|
|
4
|
+
/**
|
|
5
|
+
* Represents an incoming friendship request
|
|
6
|
+
*/
|
|
7
|
+
declare class IncomingPendingFriend extends BasePendingFriend {
|
|
8
|
+
constructor(client: Client, data: PendingFriendData);
|
|
9
|
+
/**
|
|
10
|
+
* Accepts this incoming pending friend request
|
|
11
|
+
* @throws {UserNotFoundError} The user wasn't found
|
|
12
|
+
* @throws {DuplicateFriendshipError} The user is already friends with the client
|
|
13
|
+
* @throws {InviterFriendshipsLimitExceededError} The client's friendship limit is reached
|
|
14
|
+
* @throws {InviteeFriendshipsLimitExceededError} The user's friendship limit is reached
|
|
15
|
+
* @throws {InviteeFriendshipSettingsError} The user disabled friend requests
|
|
16
|
+
* @throws {EpicgamesAPIError}
|
|
17
|
+
*/
|
|
18
|
+
accept(): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Declines this incoming pending friend request
|
|
21
|
+
* @throws {UserNotFoundError} The user wasn't found
|
|
22
|
+
* @throws {FriendNotFoundError} The user is not friends with the client
|
|
23
|
+
* @throws {EpicgamesAPIError}
|
|
24
|
+
*/
|
|
25
|
+
decline(): Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
export default IncomingPendingFriend;
|