@ughuuu/gamend 1.0.1239 → 1.0.1241
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/README.md +74 -28
- package/dist/ApiClient.js +1 -1
- package/dist/api/AdminAnalyticsApi.js +1 -1
- package/dist/api/AdminChatApi.js +1 -1
- package/dist/api/AdminEconomyApi.js +5 -4
- package/dist/api/AdminGroupsApi.js +1 -1
- package/dist/api/AdminKVApi.js +5 -4
- package/dist/api/AdminLeaderboardsApi.js +9 -9
- package/dist/api/AdminLobbiesApi.js +1 -1
- package/dist/api/AdminMatchmakingApi.js +1 -1
- package/dist/api/AdminNotificationsApi.js +1 -1
- package/dist/api/AdminPushApi.js +1 -1
- package/dist/api/AdminQuestsApi.js +17 -14
- package/dist/api/AdminReadyChecksApi.js +1 -1
- package/dist/api/AdminRetentionApi.js +1 -1
- package/dist/api/AdminSessionsApi.js +1 -1
- package/dist/api/AdminStorageApi.js +1 -1
- package/dist/api/AdminTournamentsApi.js +9 -8
- package/dist/api/AdminUsersApi.js +1 -1
- package/dist/api/AuthenticationApi.js +22 -21
- package/dist/api/ChatApi.js +77 -69
- package/dist/api/ClientLogsApi.js +1 -1
- package/dist/api/EconomyApi.js +1 -1
- package/dist/api/FriendsApi.js +27 -25
- package/dist/api/GroupsApi.js +66 -65
- package/dist/api/HealthApi.js +1 -1
- package/dist/api/HooksApi.js +1 -1
- package/dist/api/KVApi.js +1 -1
- package/dist/api/LeaderboardsApi.js +31 -32
- package/dist/api/LobbiesApi.js +34 -34
- package/dist/api/MatchmakingApi.js +1 -1
- package/dist/api/NotificationsApi.js +14 -14
- package/dist/api/PartiesApi.js +75 -54
- package/dist/api/PaymentsApi.js +1 -1
- package/dist/api/PushApi.js +13 -13
- package/dist/api/QuestsApi.js +1 -1
- package/dist/api/ReadyChecksApi.js +5 -4
- package/dist/api/SignalingApi.js +1 -1
- package/dist/api/StatsApi.js +1 -1
- package/dist/api/TimeApi.js +1 -1
- package/dist/api/TournamentsApi.js +58 -45
- package/dist/api/UsersApi.js +35 -36
- package/dist/index.js +460 -138
- package/dist/model/AcceptPartyInviteRequest.js +1 -1
- package/dist/model/AdminCancelMatchmakingTicket200Response.js +1 -1
- package/dist/model/AdminCancelReadyCheck200Response.js +1 -1
- package/dist/model/AdminCancelReadyCheck200ResponseData.js +1 -1
- package/dist/model/AdminClaimQuestRequest.js +127 -0
- package/dist/model/AdminConsumeItem400Response.js +1 -1
- package/dist/model/AdminCreateChatFilterWordRequest.js +1 -1
- package/dist/model/AdminCreateChatMute200Response.js +1 -1
- package/dist/model/AdminCreateChatMuteRequest.js +1 -1
- package/dist/model/AdminCreateKvEntryRequest.js +154 -0
- package/dist/model/AdminCreateLeaderboard200Response.js +1 -1
- package/dist/model/AdminCreateLeaderboard200ResponseData.js +1 -1
- package/dist/model/AdminCreateLeaderboardRequest.js +1 -1
- package/dist/model/AdminCreateNotificationRequest.js +1 -1
- package/dist/model/AdminCreateQuestRequest.js +1 -1
- package/dist/model/AdminCreateQuestRequestObjectivesInner.js +1 -1
- package/dist/model/AdminCreateQuestRequestRewardsInner.js +1 -1
- package/dist/model/{ListTournaments200ResponseDataInner.js → AdminCreateTournamentRequest.js} +80 -85
- package/dist/model/AdminDeleteChatConversation200Response.js +1 -1
- package/dist/model/AdminDeleteChatConversation200ResponseData.js +1 -1
- package/dist/model/AdminDeleteChatFilterWordsByLang200Response.js +1 -1
- package/dist/model/AdminDrawTournament200Response.js +1 -1
- package/dist/model/AdminDrawTournament200ResponseData.js +1 -1
- package/dist/model/AdminGetAnalyticsCounts200Response.js +1 -1
- package/dist/model/AdminGetAnalyticsCounts200ResponseTotalsInner.js +1 -1
- package/dist/model/AdminGetAnalyticsDaily200Response.js +1 -1
- package/dist/model/AdminGetAnalyticsDaily200ResponseSeriesInner.js +1 -1
- package/dist/model/AdminGetAnalyticsEconomy200Response.js +1 -1
- package/dist/model/AdminGetAnalyticsEconomy200ResponseFlowInner.js +1 -1
- package/dist/model/AdminGetAnalyticsEconomy200ResponseTotalsInner.js +1 -1
- package/dist/model/AdminGetAnalyticsSummary200Response.js +1 -1
- package/dist/model/AdminGrantCurrencyRequest.js +160 -0
- package/dist/model/AdminGrantItemRequest.js +1 -1
- package/dist/model/AdminGrantQuestRequest.js +127 -0
- package/dist/model/AdminImportChatFilterWords200Response.js +1 -1
- package/dist/model/AdminImportChatFilterWordsRequest.js +1 -1
- package/dist/model/AdminLeaderboardIconUploadUrlRequest.js +112 -0
- package/dist/model/AdminListChatFilterWords200Response.js +1 -1
- package/dist/model/AdminListChatMessages200Response.js +1 -1
- package/dist/model/AdminListChatMessages200ResponseDataInner.js +1 -1
- package/dist/model/AdminListChatMutes200Response.js +1 -1
- package/dist/model/AdminListChatMutes200ResponseDataInner.js +1 -1
- package/dist/model/AdminListChatReports200Response.js +1 -1
- package/dist/model/AdminListGroups200Response.js +1 -1
- package/dist/model/AdminListKvEntries200Response.js +1 -1
- package/dist/model/AdminListLobbies200Response.js +1 -1
- package/dist/model/AdminListLobbies200ResponseDataInner.js +1 -1
- package/dist/model/AdminListMatchmakingTickets200Response.js +1 -1
- package/dist/model/AdminListMatchmakingTickets200ResponseDataInner.js +1 -1
- package/dist/model/AdminListNotifications200Response.js +1 -1
- package/dist/model/AdminListNotifications200ResponseDataInner.js +1 -1
- package/dist/model/AdminListPushTokens200Response.js +1 -1
- package/dist/model/AdminListPushTokens200ResponseDataInner.js +1 -1
- package/dist/model/AdminListQuestProgress200Response.js +1 -1
- package/dist/model/AdminListQuestProgress200ResponseDataInner.js +1 -1
- package/dist/model/AdminListQuests200Response.js +1 -1
- package/dist/model/AdminListQuests200ResponseDataInner.js +1 -1
- package/dist/model/AdminListReadyChecks200Response.js +1 -1
- package/dist/model/AdminListSessions200Response.js +1 -1
- package/dist/model/AdminListSessions200ResponseDataInner.js +1 -1
- package/dist/model/AdminListStorageObjects200Response.js +1 -1
- package/dist/model/AdminListStorageObjects200ResponseDataInner.js +1 -1
- package/dist/model/AdminListStorageObjects200ResponseUsage.js +1 -1
- package/dist/model/AdminMatchmakingStats200Response.js +1 -1
- package/dist/model/AdminMatchmakingStats200ResponseData.js +1 -1
- package/dist/model/AdminQuestIconUploadUrlRequest.js +112 -0
- package/dist/model/AdminResetQuestRequest.js +1 -1
- package/dist/model/AdminResolveChatReport200Response.js +1 -1
- package/dist/model/AdminResolveChatReport200ResponseData.js +1 -1
- package/dist/model/AdminResolveChatReportRequest.js +1 -1
- package/dist/model/AdminResolveTournamentMatchRequest.js +1 -1
- package/dist/model/AdminRunRetention200Response.js +1 -1
- package/dist/model/AdminSendPush200Response.js +1 -1
- package/dist/model/AdminSendPushRequest.js +1 -1
- package/dist/model/AdminSetLeaderboardIconRequest.js +112 -0
- package/dist/model/AdminSetQuestIconRequest.js +1 -1
- package/dist/model/AdminSetTournamentIconRequest.js +112 -0
- package/dist/model/AdminSpendCurrencyRequest.js +1 -1
- package/dist/model/AdminSubmitLeaderboardScoreRequest.js +1 -1
- package/dist/model/AdminTestChatPhrase200Response.js +1 -1
- package/dist/model/AdminTestChatPhrase200ResponseData.js +1 -1
- package/dist/model/AdminTestChatPhrase200ResponseDataHitsInner.js +1 -1
- package/dist/model/AdminTestChatPhraseRequest.js +1 -1
- package/dist/model/AdminTournamentIconUploadUrlRequest.js +1 -1
- package/dist/model/AdminUpdateChatFilterWord200Response.js +1 -1
- package/dist/model/AdminUpdateChatFilterWord200ResponseData.js +1 -1
- package/dist/model/AdminUpdateChatFilterWordRequest.js +1 -1
- package/dist/model/AdminUpdateGroup200Response.js +1 -1
- package/dist/model/AdminUpdateGroupRequest.js +1 -1
- package/dist/model/AdminUpdateKvEntryRequest.js +1 -1
- package/dist/model/AdminUpdateLeaderboardRecord200Response.js +1 -1
- package/dist/model/AdminUpdateLeaderboardRecord200ResponseData.js +1 -1
- package/dist/model/AdminUpdateLeaderboardRecordRequest.js +1 -1
- package/dist/model/AdminUpdateLeaderboardRequest.js +1 -1
- package/dist/model/AdminUpdateLobby200Response.js +1 -1
- package/dist/model/AdminUpdateLobbyRequest.js +1 -1
- package/dist/model/AdminUpdateQuestRequest.js +350 -0
- package/dist/model/AdminUpdateTournamentRequest.js +1 -1
- package/dist/model/AdminUpdateUser200Response.js +1 -1
- package/dist/model/AdminUpdateUser200ResponseData.js +1 -1
- package/dist/model/AdminUpdateUserRequest.js +1 -1
- package/dist/model/AdminUpsertKv200Response.js +1 -1
- package/dist/model/AdminUpsertKv200ResponseData.js +1 -1
- package/dist/model/AdminUpsertKvRequest.js +1 -1
- package/dist/model/AuthProvidersResponse.js +1 -1
- package/dist/model/BlockedFriendship.js +1 -1
- package/dist/model/BlockedFriendshipPage.js +1 -1
- package/dist/model/CallHook200Response.js +1 -1
- package/dist/model/CallHookRequest.js +1 -1
- package/dist/model/CancelPartyInviteRequest.js +1 -1
- package/dist/model/{ListChatMessages200ResponseDataInner.js → ChatMessage.js} +87 -41
- package/dist/model/{ListNotifications200Response.js → ChatMessagePage.js} +57 -34
- package/dist/model/{ListTournaments200Response.js → ChatMessageResponse.js} +45 -40
- package/dist/model/{ListGroupMutes200ResponseDataInner.js → ChatMuteRecord.js} +71 -29
- package/dist/model/ChatMuteRecordPage.js +147 -0
- package/dist/model/{ListRecordsAroundUser200Response.js → ChatMuteRecordResponse.js} +45 -40
- package/dist/model/ChatReadCursor.js +151 -0
- package/dist/model/ChatReadCursorResponse.js +115 -0
- package/dist/model/ChatUnread.js +109 -0
- package/dist/model/ChatUnreadResponse.js +115 -0
- package/dist/model/ClaimQuest200Response.js +1 -1
- package/dist/model/ClaimQuest200ResponseData.js +1 -1
- package/dist/model/ClientLogBatch.js +1 -1
- package/dist/model/ClientLogEntry.js +1 -1
- package/dist/model/ClientLogPolicy.js +1 -1
- package/dist/model/ClientLogResult.js +1 -1
- package/dist/model/ClientLogSession.js +1 -1
- package/dist/model/CreateCurrentUserAvatarUploadUrlRequest.js +1 -1
- package/dist/model/CreateFriendRequestRequest.js +1 -1
- package/dist/model/CreateGroupIconUploadUrlRequest.js +112 -0
- package/dist/model/CreateGroupRequest.js +1 -1
- package/dist/model/CreateLobbyRequest.js +1 -1
- package/dist/model/CreatePartyRequest.js +1 -1
- package/dist/model/CurrentUser.js +1 -1
- package/dist/model/CurrentUserResponse.js +115 -0
- package/dist/model/DeclinePartyInviteRequest.js +1 -1
- package/dist/model/DeleteNotificationsRequest.js +1 -1
- package/dist/model/DeletedCount.js +109 -0
- package/dist/model/DeletedCountResponse.js +115 -0
- package/dist/model/DemoteGroupMemberRequest.js +1 -1
- package/dist/model/DeviceLoginRequest.js +1 -1
- package/dist/model/ErrorResponse.js +4 -26
- package/dist/model/Friend.js +1 -1
- package/dist/model/FriendPage.js +1 -1
- package/dist/model/FriendRequest.js +1 -1
- package/dist/model/FriendRequestLists.js +1 -1
- package/dist/model/FriendRequestMeta.js +1 -1
- package/dist/model/FriendRequestResponse.js +115 -0
- package/dist/model/FriendRequestsResponse.js +1 -1
- package/dist/model/GetCurrentUserInventory200Response.js +1 -1
- package/dist/model/GetKv200Response.js +1 -1
- package/dist/model/GetMyReadyCheck200Response.js +1 -1
- package/dist/model/GetMyReadyCheck200ResponseLobby.js +1 -1
- package/dist/model/GetMyReadyCheck200ResponseParty.js +1 -1
- package/dist/model/GetServerTime200Response.js +1 -1
- package/dist/model/GetStats200Response.js +1 -1
- package/dist/model/GetStats200ResponseData.js +1 -1
- package/dist/model/Group.js +1 -1
- package/dist/model/GroupInvite.js +13 -14
- package/dist/model/GroupInviteOutcome.js +132 -0
- package/dist/model/GroupInviteOutcomeResponse.js +115 -0
- package/dist/model/GroupInvitePage.js +1 -1
- package/dist/model/GroupJoinRequest.js +1 -1
- package/dist/model/GroupJoinRequestPage.js +1 -1
- package/dist/model/GroupJoinRequestResponse.js +115 -0
- package/dist/model/GroupMember.js +1 -1
- package/dist/model/GroupMemberPage.js +1 -1
- package/dist/model/GroupMemberResponse.js +115 -0
- package/dist/model/GroupPage.js +1 -1
- package/dist/model/GroupResponse.js +115 -0
- package/dist/model/HealthResponse.js +1 -1
- package/dist/model/InviteToGroupRequest.js +1 -1
- package/dist/model/InviteToPartyRequest.js +1 -1
- package/dist/model/{ChatUnreadCount200ResponseData.js → JoinLobbyRequest.js} +26 -21
- package/dist/model/KickGroupMemberRequest.js +1 -1
- package/dist/model/KickPartyMemberRequest.js +1 -1
- package/dist/model/KickUserRequest.js +113 -0
- package/dist/model/{ResolveLeaderboardSlugs200ResponseDataValue.js → Leaderboard.js} +90 -45
- package/dist/model/{ListGroupMutes200Response.js → LeaderboardPage.js} +57 -34
- package/dist/model/{GetMyRecord200ResponseData.js → LeaderboardRecord.js} +66 -31
- package/dist/model/LeaderboardRecordPage.js +147 -0
- package/dist/model/{ListPushTokens200Response.js → LeaderboardRecordResponse.js} +44 -47
- package/dist/model/LeaderboardResponse.js +115 -0
- package/dist/model/LeaderboardsBySlugResponse.js +113 -0
- package/dist/model/LinkDeviceRequest.js +1 -1
- package/dist/model/LinkedProviders.js +1 -1
- package/dist/model/ListCurrentUserLedger200Response.js +1 -1
- package/dist/model/ListCurrentUserLedger200ResponseDataInner.js +1 -1
- package/dist/model/Lobby.js +1 -1
- package/dist/model/LobbyPage.js +1 -1
- package/dist/model/LobbyResponse.js +6 -49
- package/dist/model/LobbyStats.js +1 -1
- package/dist/model/LobbyStatsResponse.js +1 -1
- package/dist/model/LoginRequest.js +1 -1
- package/dist/model/MarkChatReadRequest.js +1 -1
- package/dist/model/MatchmakingCancel200Response.js +1 -1
- package/dist/model/MatchmakingJoin201Response.js +1 -1
- package/dist/model/MatchmakingJoin201ResponseData.js +1 -1
- package/dist/model/MatchmakingJoinRequest.js +1 -1
- package/dist/model/MatchmakingMyTicket200Response.js +1 -1
- package/dist/model/MatchmakingMyTicket200ResponseData.js +1 -1
- package/dist/model/MatchmakingStats200Response.js +1 -1
- package/dist/model/MatchmakingStats200ResponseData.js +1 -1
- package/dist/model/MatchmakingStats200ResponseDataQueuesInner.js +1 -1
- package/dist/model/MuteGroupMemberRequest.js +1 -1
- package/dist/model/{ProfileUpdate.js → MuteLobbyMemberRequest.js} +41 -56
- package/dist/model/MutePartyMemberRequest.js +135 -0
- package/dist/model/{ListNotifications200ResponseDataInner.js → Notification.js} +70 -37
- package/dist/model/NotificationPage.js +147 -0
- package/dist/model/NotificationResponse.js +115 -0
- package/dist/model/OAuthAuthorization.js +1 -1
- package/dist/model/OAuthAuthorizationResponse.js +115 -0
- package/dist/model/OAuthResult.js +1 -1
- package/dist/model/OAuthResultResponse.js +1 -1
- package/dist/model/OAuthSessionData.js +1 -1
- package/dist/model/OAuthSessionDataDetails.js +1 -1
- package/dist/model/OAuthSessionStatus.js +21 -21
- package/dist/model/OAuthSessionStatusResponse.js +115 -0
- package/dist/model/OauthApiCallbackRequest.js +1 -1
- package/dist/model/OauthCallbackApiAppleIosRequest.js +1 -1
- package/dist/model/OauthGoogleIdTokenRequest.js +1 -1
- package/dist/model/{AvatarUpdate.js → OkResponse.js} +22 -37
- package/dist/model/OpenLobbyReadyCheck201Response.js +1 -1
- package/dist/model/OpenLobbyReadyCheckRequest.js +1 -1
- package/dist/model/{ChatUnreadCount200Response.js → OpenPartyReadyCheckRequest.js} +31 -27
- package/dist/model/PageMeta.js +1 -1
- package/dist/model/Party.js +1 -1
- package/dist/model/PartyCreateLobbyRequest.js +1 -1
- package/dist/model/PartyInvite.js +1 -1
- package/dist/model/PartyInvitePage.js +147 -0
- package/dist/model/PartyJoinLobbyRequest.js +1 -1
- package/dist/model/PartyResponse.js +115 -0
- package/dist/model/PartyStats.js +1 -1
- package/dist/model/PartyStatsResponse.js +1 -1
- package/dist/model/PaymentsSteamCheckoutRequest.js +1 -1
- package/dist/model/PaymentsSteamFinalizeRequest.js +1 -1
- package/dist/model/PaymentsStripeCheckoutRequest.js +1 -1
- package/dist/model/PlayerStats.js +1 -1
- package/dist/model/PlayerStatsResponse.js +1 -1
- package/dist/model/PromoteGroupMemberRequest.js +1 -1
- package/dist/model/PublicUser.js +1 -1
- package/dist/model/PublicUserPage.js +1 -1
- package/dist/model/PublicUserResponse.js +115 -0
- package/dist/model/{DeletePushToken200Response.js → PushToken.js} +74 -71
- package/dist/model/{ListLeaderboardRecords200Response.js → PushTokenPage.js} +57 -34
- package/dist/model/PushTokenResponse.js +115 -0
- package/dist/model/QuestStats200Response.js +1 -1
- package/dist/model/QuestStats200ResponseData.js +1 -1
- package/dist/model/QuickJoinRequest.js +1 -1
- package/dist/model/RefreshTokenRequest.js +1 -1
- package/dist/model/RegisterPushTokenRequest.js +1 -1
- package/dist/model/ReportChatMessageRequest.js +1 -1
- package/dist/model/ResolveLeaderboardSlugsRequest.js +1 -1
- package/dist/model/RespondReadyCheckRequest.js +1 -1
- package/dist/model/SendChatMessageRequest.js +1 -1
- package/dist/model/SendNotificationRequest.js +1 -1
- package/dist/model/Session.js +1 -1
- package/dist/model/SessionResponse.js +1 -1
- package/dist/model/SetCurrentUserAvatarRequest.js +112 -0
- package/dist/model/{StatusResponse.js → SetGroupIconRequest.js} +28 -29
- package/dist/model/SetLobbyStateRequest.js +1 -1
- package/dist/model/SignalingStats200Response.js +1 -1
- package/dist/model/SignalingStats200ResponseData.js +1 -1
- package/dist/model/Tournament.js +341 -0
- package/dist/model/TournamentBracket.js +186 -0
- package/dist/model/TournamentBracketPage.js +147 -0
- package/dist/model/TournamentEntry.js +211 -0
- package/dist/model/TournamentEntryPage.js +147 -0
- package/dist/model/TournamentEntryResponse.js +115 -0
- package/dist/model/{TournamentMyMatch200Response.js → TournamentMatch.js} +100 -28
- package/dist/model/TournamentMatchResponse.js +115 -0
- package/dist/model/{ListLeaderboards200Response.js → TournamentPage.js} +57 -34
- package/dist/model/TournamentPlacement.js +200 -0
- package/dist/model/TournamentResponse.js +115 -0
- package/dist/model/TournamentStandings.js +163 -0
- package/dist/model/{ListChatMessages200Response.js → TournamentStandingsResponse.js} +44 -47
- package/dist/model/UnmuteGroupMemberRequest.js +113 -0
- package/dist/model/UnmuteLobbyMemberRequest.js +1 -1
- package/dist/model/UnmutePartyMemberRequest.js +113 -0
- package/dist/model/UpdateChatMessageRequest.js +1 -1
- package/dist/model/UpdateCurrentUserDisplayNameRequest.js +1 -1
- package/dist/model/UpdateCurrentUserPasswordRequest.js +1 -1
- package/dist/model/UpdateCurrentUserUsernameRequest.js +1 -1
- package/dist/model/UpdateGroupRequest.js +1 -1
- package/dist/model/UpdateLobbyRequest.js +1 -1
- package/dist/model/UpdatePartyRequest.js +1 -1
- package/dist/model/UploadTicket.js +1 -1
- package/dist/model/UploadTicketResponse.js +115 -0
- package/dist/model/UserBrief.js +1 -1
- package/dist/model/UserBriefPage.js +1 -1
- package/dist/model/UserQuests200Response.js +1 -1
- package/dist/model/UserQuests200ResponseDataInner.js +1 -1
- package/dist/model/UserQuests200ResponseDataInnerObjectivesInner.js +1 -1
- package/dist/model/UserQuests200ResponseDataInnerProgress.js +1 -1
- package/dist/model/UserQuests200ResponseDataInnerRewardsInner.js +1 -1
- package/dist/model/UserQuests200ResponseMeta.js +1 -1
- package/package.json +1 -1
- package/dist/model/DeleteNotifications200Response.js +0 -91
- package/dist/model/DeleteNotifications200ResponseData.js +0 -86
- package/dist/model/GetMyRecord200Response.js +0 -91
- package/dist/model/ListGroupMutes200ResponseMeta.js +0 -109
- package/dist/model/ResolveLeaderboardSlugs200Response.js +0 -89
package/dist/api/GroupsApi.js
CHANGED
|
@@ -5,24 +5,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var
|
|
9
|
-
var _AdminTournamentIconUploadUrlRequest = _interopRequireDefault(require("../model/AdminTournamentIconUploadUrlRequest"));
|
|
8
|
+
var _CreateGroupIconUploadUrlRequest = _interopRequireDefault(require("../model/CreateGroupIconUploadUrlRequest"));
|
|
10
9
|
var _CreateGroupRequest = _interopRequireDefault(require("../model/CreateGroupRequest"));
|
|
11
10
|
var _DemoteGroupMemberRequest = _interopRequireDefault(require("../model/DemoteGroupMemberRequest"));
|
|
12
11
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
13
|
-
var
|
|
12
|
+
var _GroupInviteOutcomeResponse = _interopRequireDefault(require("../model/GroupInviteOutcomeResponse"));
|
|
14
13
|
var _GroupInvitePage = _interopRequireDefault(require("../model/GroupInvitePage"));
|
|
15
|
-
var _GroupJoinRequest = _interopRequireDefault(require("../model/GroupJoinRequest"));
|
|
16
14
|
var _GroupJoinRequestPage = _interopRequireDefault(require("../model/GroupJoinRequestPage"));
|
|
17
|
-
var
|
|
15
|
+
var _GroupJoinRequestResponse = _interopRequireDefault(require("../model/GroupJoinRequestResponse"));
|
|
18
16
|
var _GroupMemberPage = _interopRequireDefault(require("../model/GroupMemberPage"));
|
|
17
|
+
var _GroupMemberResponse = _interopRequireDefault(require("../model/GroupMemberResponse"));
|
|
19
18
|
var _GroupPage = _interopRequireDefault(require("../model/GroupPage"));
|
|
19
|
+
var _GroupResponse = _interopRequireDefault(require("../model/GroupResponse"));
|
|
20
20
|
var _InviteToGroupRequest = _interopRequireDefault(require("../model/InviteToGroupRequest"));
|
|
21
21
|
var _KickGroupMemberRequest = _interopRequireDefault(require("../model/KickGroupMemberRequest"));
|
|
22
|
+
var _OkResponse = _interopRequireDefault(require("../model/OkResponse"));
|
|
22
23
|
var _PromoteGroupMemberRequest = _interopRequireDefault(require("../model/PromoteGroupMemberRequest"));
|
|
23
|
-
var
|
|
24
|
+
var _SetGroupIconRequest = _interopRequireDefault(require("../model/SetGroupIconRequest"));
|
|
24
25
|
var _UpdateGroupRequest = _interopRequireDefault(require("../model/UpdateGroupRequest"));
|
|
25
|
-
var
|
|
26
|
+
var _UploadTicketResponse = _interopRequireDefault(require("../model/UploadTicketResponse"));
|
|
26
27
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
27
28
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
28
29
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -33,7 +34,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
33
34
|
* Gamend API
|
|
34
35
|
* API for Gamend. Provides HTTP REST API, real-time WebSocket channels, and WebRTC DataChannels for low-latency game data. Features authentication, users, lobbies, groups, parties, friends, chat, notifications, quests, leaderboards, tournaments, matchmaking, payments, server scripting, and admin portal. ## **1. Authentication** This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### **1.1 Getting Tokens** - **Email/Password**: POST to `/api/v1/login` with email and password - **Device (SDK)**: POST to `/api/v1/login` with a `device_id` string (creates/returns a device user) - **Discord OAuth**: Use `/api/v1/auth/discord` flow - **Google OAuth**: Use `/api/v1/auth/google` flow - **Facebook OAuth**: Use `/api/v1/auth/facebook` flow - **Apple Sign In**: Use `/auth/apple` browser flow or apple sdk flow - **Steam (OpenID)**: Use `/api/v1/auth/steam` flow Both methods return: - `access_token` - Short-lived (15 min), use for API requests - `refresh_token` - Long-lived (30 days), use to get new access tokens ### **1.2 Using Tokens** Include the access token in the Authorization header: ``` Authorization: Bearer <access_token> ``` ### **1.3 Refreshing Tokens** When your access token expires, use POST `/api/v1/refresh` with your refresh token to get a new access token. ## **2. Users** Users endpoints cover the user lifecycle and profile features. Key highlights: - **Registration and login** (email/password, device token for SDKs, and OAuth providers) - **Profile metadata** (JSON blob per user) and editable profile fields - **Account lifecycle**: password reset, email confirmation, and account deletion - **Sessions & tokens**: both browser sessions and JWT-based API tokens are supported ## **3. Friends** The Friends domain offers lightweight social features: - **Friend requests** (send / accept / reject / block flows) - **Friend listing & pagination**, with basic privacy controls - **Domain helpers** to manage and query friend relationships from API or UI contexts ## **4. Lobbies** Lobbies provide matchmaking / room management primitives. Highlights: - **Create / list / update / delete** lobbies with rich metadata (mode, region, tags) - **Host-managed or hostless** modes (hostless allowed internally, not creatable via public API) - **Membership management**: join, leave, kick users, and automatic host transfer - **Controls & protection**: max users, hidden/locked states, and optional password protection - **Hidden lobbies** are excluded from public listings; public listing endpoints are paginated ## **5. Notifications** Persistent user-to-user notifications that survive across sessions: - **Send notifications** to accepted friends with a title, optional content, and optional metadata - **List own notifications** with pagination (ordered oldest-first) - **Delete notifications** by ID (single or batch) - **Real-time delivery** via the user WebSocket channel (`\"notification\"` events) - **Offline delivery**: undeleted notifications are replayed on WebSocket reconnect - **Push delivery**: notifications also fan out to the recipient's registered mobile devices (see Push notifications) ## **5b. Push notifications** Mobile/web push delivery to registered devices (FCM for Android/Web, APNs-direct for iOS): - **Register device tokens** via `POST /me/push_tokens` (`token`, `platform`, optional `provider`/`device_id`); re-registering a `device_id` rotates its token in place - **List/remove own devices** via `GET /me/push_tokens` and `DELETE /me/push_tokens/:id` - **Server-authoritative sending** — no public send endpoint; pushes originate from server hooks (`Gamend.Push.send_to_user/2`) or the admin API - **Per-token routing**: each token's `provider` (\"fcm\" | \"apns\") selects the delivery backend; unconfigured backends log instead of sending (dev-friendly) - **Reliability**: delivery rides the durable job queue with retries; dead tokens reported by the provider are disabled automatically ## **6. Groups** Groups provide persistent community management for players: - **Three group types**: `public` (anyone joins directly), `private` (users request to join, admins approve), `hidden` (invite-only, never listed) - **Membership roles**: `admin` and `member`, with promote/demote capabilities - **Join requests**: for private groups, users submit requests that admins approve or reject - **Invitations**: admins can invite users directly (blocked users are rejected) - **CRUD operations**: create, update, delete groups with metadata support - **Group chat**: integrated via the Chat API with `chat_type: \"group\"` ## **7. Parties** Ephemeral groups of users for short-lived sessions (e.g., matchmaking squads): - **Invite-only joining**: the party leader sends invites by user ID to friends or shared-group members - **Invite flow**: `POST /parties/invite` → recipient accepts via `POST /parties/invite/accept` or declines via `POST /parties/invite/decline`; leader can cancel via `POST /parties/invite/cancel` - **Invite visibility**: leader can list sent invites (`GET /parties/invitations/sent`); recipient can list received invites (`GET /parties/invitations`) - **Connection requirement**: invites can only be sent to users who are friends or share at least one group with the leader - **One party at a time**: a user can only be in one party; accepting an invite while already in a party is rejected - **Leader management**: the creator is the leader; leadership can be transferred - **Lobby integration**: parties can create or join lobbies as a group - **Party chat**: integrated via the Chat API with `chat_type: \"party\"` - **Real-time events** via the party WebSocket channel ## **8. Chat** Real-time messaging across multiple conversation types: - **Chat types**: `lobby` (within a lobby), `group` (within a group), `party` (within a party), `friend` (DMs between friends) - **Send messages** with content, optional metadata, and automatic access validation - **List messages** with pagination (newest first) - **Read tracking**: mark messages as read and get unread counts per conversation - **Real-time delivery** via PubSub and WebSocket channels - **Moderation is built in**: an admin-managed word filter (`block` / `mask` / `flag`, matched on a normalized form so leetspeak and padding do not slip through) and mutes are enforced before a message is stored or broadcast; the `before_chat_message` pipeline hook stays available for rules of your own - **Report a message**: `POST /chat/messages/:id/report` with an optional `reason` — one report per player per message, capped per day; reports the filter files itself have no reporter - **Scoped mutes** mirror kick: `POST /lobbies/mute` + `/lobbies/unmute` (lobby host), `POST /groups/:id/mute` + `/groups/:id/unmute` (group admin), `POST /parties/mute` + `/parties/unmute` (party leader), each with a paginated `.../mutes` listing for the same authority. Body is `{target_user_id, expires_at?, reason?}`; omitting `expires_at` mutes permanently - **Global mutes and the blocklist are server-authoritative** — no public endpoint; admin API (`/api/v1/admin/chat`) or a plugin calling `Gamend.Chat.mute_user/4` - **Real-time moderation events**: the muted player receives `chat_muted` / `chat_unmuted` on their user channel ## **9. Leaderboards** Server-managed ranked scoreboards: - **Multiple leaderboards**: create named leaderboards with configurable sort order - **Score submission**: submit scores with optional metadata - **Rankings**: retrieve paginated rankings with user details - **Reset support**: leaderboards can be reset periodically ## **10. Key-Value Storage** Per-user persistent key-value storage for game state, preferences, and settings: - **Get/set/delete** key-value pairs scoped to the authenticated user - **List keys** with optional prefix filtering - **Metadata support**: values can include arbitrary JSON metadata ## **11. Quests / Progression** One event-driven progression engine covering achievements, daily/weekly quests, time-boxed event quests, chains, and groups: - **Kinds**: `achievement` (permanent one-shot — the replacement for the old achievements system), `daily`/`weekly` (reset per UTC period), `event` (starts_at/ends_at window), `chain` (requires a prerequisite quest) - **Objectives**: each quest lists objectives `{event, target, params}`; server-side `report_event` advances every matching active quest — there is **no public endpoint to advance progress** (server-authoritative) - **Rewards**: currencies (Economy) and items (Inventory), paid **exactly once** per period via idempotent grants; `auto_claim` quests pay on completion, others via `POST /me/quests/:key/claim` - **My quests**: `GET /me/quests` returns active quests, per-period progress, and a claimable flag; hidden quests appear once completed - **Groups**: quests sharing a `group_key` collapse to one entry carrying `group_size`; `?group=<key>` lists that group's members in full - **Catalog**: `GET /quests` and per-user completions `GET /quests/user/:user_id` (gated by `GAMEND_FEATURES_LIST_QUESTS`) - **Admin management**: definitions CRUD plus per-user grant/reset/force-claim under `/api/v1/admin/quests` ## **12. Tournaments** Single-elimination bracket tournaments, server-structured and game-judged: - **Registration window → seeded draw → timed rounds → champions**; recurring tournaments (cron) create one occurrence per cycle sharing a slug; a nil starts_at keeps registration open until an admin draws manually - **Join/leave** as an entry leader (`POST`/`DELETE /tournaments/:id/join`); team composition is game policy - **Browse**: list/filter tournaments, standings, full bracket view, and the caller's current match (`GET /tournaments/:id/my_match`) - **Match verdicts are server-side** (game hooks) — no public resolve endpoint; clients get `tournament_match_ready` / `tournament_match_resolved` / `tournament_updated` / `tournament_finished` on the user channel - **Admin management** over HTTP: create/update/delete, cancel, draw now, finish, and force match verdicts under `/api/v1/admin/tournaments` ## **13. Matchmaking** Ticket-based queueing that turns waiting players into hidden, locked lobbies: - **Join over HTTP** (`POST /matchmaking/tickets` with a `match_params` string map); only tickets with identical params match together — encode mode/map/skill band as parameter values - **A match forms** when a group reaches `max_players`, or has at least `min_players` and the oldest ticket outwaited the timeout; the server creates a hidden lobby, seats everyone and locks it - **The result is a push, not a poll**: matched players receive `match_found` (`lobby_id`, `match_params`) on their user channel; disconnecting cancels your tickets - **Inspect**: `GET /matchmaking/tickets/me` for your ticket, `GET /matchmaking/stats` for queue depths - **Admin management** over HTTP: list/filter tickets, force-cancel, and stats under `/api/v1/admin/matchmaking` ## **14. Ready checks** One primitive for \"everyone must answer before this proceeds\", with one client-facing surface: - **A player holds at most one check per lane** — the match lane (lobby ready-up or matchmaking accept) and the party lane (the party's standing board) — so answering needs no id: `GET /me/ready_check` returns `{\"lobby\": …, \"party\": …}` (each null when none) and `POST /me/ready_check` with `{\"ready\": true|false, \"scope\": \"lobby\"|\"party\"}` answers one (scope defaults to `lobby`) - **Two kinds.** `ready` (lobby/party board) is a toggle — a \"no\" just leaves the check open, and it lists every participant. `accept` (match confirmation) is final — one decline fails it for everyone — and returns counts plus your own state, so a pending match does not reveal who you were paired with - **Hosts open one** with `POST /lobbies/ready_check` (host-managed lobbies only; hostless matchmaking lobbies belong to the server), **party leaders** with `POST /parties/ready_check`; either call is a **reset** — it quietly replaces an already-open board with a fresh one over the current members, so the same endpoint serves \"ready check!\", \"force ready\" (with `timeout_ms`) and \"start over\". Call it off with `DELETE /lobbies/ready_check` / `DELETE /parties/ready_check`. The opener is pre-marked ready — clicking the button is their answer - **Failure does nothing on its own**: a declined or timed-out check kicks nobody, starts nothing, and moves no lobby state. It reports who did not answer, and the game (or the host, with the kick they already have) decides - **Live**: `ready_check_started` / `ready_check_updated` / `ready_check_passed` / `ready_check_failed` on the lobby channel, the party channel for a party board, or the user channel for an accept check - **Admin management** over HTTP: list/filter checks, force-cancel, and 24h outcome stats under `/api/v1/admin/ready_checks` ## **15. Real-time: WebSocket Channels** The server provides real-time communication via Phoenix WebSocket channels. Connect to the WebSocket endpoint and join topic-based channels for live updates. ### **15.1 Connection** Connect to `wss://your-server.com/socket` with your JWT token as a parameter: ``` const socket = new Socket(\"wss://your-server.com/socket\", { params: { token: \"<access_token>\" } }) socket.connect() ``` ### **15.2 Available Channels** - **User channel** (`user:<user_id>`): notifications, friend events, quest progress/completions/claims, party/group invites, tournament events, chat mutes (`chat_muted` / `chat_unmuted`), KV subscriptions - **Lobby channel** (`lobby:<lobby_id>`): lobby member joins/leaves, lobby updates, lobby chat - **Lobbies channel** (`lobbies`): global lobby list changes (created, updated, deleted) - **Group channel** (`group:<group_id>`): group member changes, group updates, group chat - **Groups channel** (`groups`): global group list changes - **Party channel** (`party:<party_id>`): party member changes, party updates, party chat ### **15.3 JS SDK Helper** The `GameRealtime` class (included in this SDK) wraps Phoenix.Socket with convenient channel helpers: ```javascript import { GameRealtime } from '@ughuuu/gamend' const realtime = new GameRealtime('https://your-server.com', accessToken) const userChannel = realtime.joinUserChannel(userId) userChannel.on('notification', payload => console.log(payload)) ``` `phoenix` ships as a dependency of the package, so no extra install is needed. ## **16. Real-time: WebRTC DataChannels** For low-latency game data, the server supports WebRTC DataChannels alongside WebSocket. The server acts as a WebRTC peer (not P2P between clients). ### **16.1 How It Works** 1. Client connects via WebSocket and joins the **User channel** 2. Client sends an SDP offer over the channel (`webrtc:offer` event) 3. Server responds with an SDP answer (`webrtc:answer` event) 4. ICE candidates are exchanged (`webrtc:ice` events) 5. Once connected, named DataChannels carry game data at low latency ### **16.2 Default DataChannels** - **`events`** (reliable, ordered): important game events (player actions, state changes) - **`state`** (unreliable, unordered): high-frequency position/state sync ### **16.3 JS SDK Helper** The `GameWebRTC` class (included in this SDK, browser-only) handles signaling automatically: ```javascript import { GameRealtime, GameWebRTC } from '@ughuuu/gamend' const realtime = new GameRealtime('https://your-server.com', token) const userChannel = realtime.joinUserChannel(userId) const webrtc = new GameWebRTC(userChannel, { onData: (label, data) => console.log(label, data) }) await webrtc.connect() webrtc.send('events', JSON.stringify({ type: 'move', x: 10, y: 20 })) ```
|
|
35
36
|
*
|
|
36
|
-
* The version of the OpenAPI document: 1.0.
|
|
37
|
+
* The version of the OpenAPI document: 1.0.1241
|
|
37
38
|
*
|
|
38
39
|
*
|
|
39
40
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -63,7 +64,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
63
64
|
* Accept a group invitation
|
|
64
65
|
* Accept a pending group invitation by invite ID. The authenticated user must be the recipient of the invite.
|
|
65
66
|
* @param {String} inviteId Invite ID (from the invitations list)
|
|
66
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
67
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GroupMemberResponse} and HTTP response
|
|
67
68
|
*/
|
|
68
69
|
return _createClass(GroupsApi, [{
|
|
69
70
|
key: "acceptGroupInviteWithHttpInfo",
|
|
@@ -82,7 +83,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
82
83
|
var authNames = ['authorization'];
|
|
83
84
|
var contentTypes = [];
|
|
84
85
|
var accepts = ['application/json'];
|
|
85
|
-
var returnType =
|
|
86
|
+
var returnType = _GroupMemberResponse["default"];
|
|
86
87
|
return this.apiClient.callApi('/api/v1/groups/invitations/{invite_id}/accept', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
87
88
|
}
|
|
88
89
|
|
|
@@ -90,7 +91,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
90
91
|
* Accept a group invitation
|
|
91
92
|
* Accept a pending group invitation by invite ID. The authenticated user must be the recipient of the invite.
|
|
92
93
|
* @param {String} inviteId Invite ID (from the invitations list)
|
|
93
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
94
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GroupMemberResponse}
|
|
94
95
|
*/
|
|
95
96
|
}, {
|
|
96
97
|
key: "acceptGroupInvite",
|
|
@@ -105,7 +106,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
105
106
|
* Approve a pending join request. The user becomes a member.
|
|
106
107
|
* @param {String} id Group ID
|
|
107
108
|
* @param {String} requestId Join request ID
|
|
108
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
109
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GroupMemberResponse} and HTTP response
|
|
109
110
|
*/
|
|
110
111
|
}, {
|
|
111
112
|
key: "approveJoinRequestWithHttpInfo",
|
|
@@ -129,7 +130,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
129
130
|
var authNames = ['authorization'];
|
|
130
131
|
var contentTypes = [];
|
|
131
132
|
var accepts = ['application/json'];
|
|
132
|
-
var returnType =
|
|
133
|
+
var returnType = _GroupMemberResponse["default"];
|
|
133
134
|
return this.apiClient.callApi('/api/v1/groups/{id}/join_requests/{request_id}/approve', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
134
135
|
}
|
|
135
136
|
|
|
@@ -138,7 +139,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
138
139
|
* Approve a pending join request. The user becomes a member.
|
|
139
140
|
* @param {String} id Group ID
|
|
140
141
|
* @param {String} requestId Join request ID
|
|
141
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
142
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GroupMemberResponse}
|
|
142
143
|
*/
|
|
143
144
|
}, {
|
|
144
145
|
key: "approveJoinRequest",
|
|
@@ -152,7 +153,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
152
153
|
* Cancel a sent group invitation
|
|
153
154
|
* Cancel (delete) a group invitation that the authenticated user sent.
|
|
154
155
|
* @param {String} inviteId ID of the GroupInvite to cancel
|
|
155
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
156
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OkResponse} and HTTP response
|
|
156
157
|
*/
|
|
157
158
|
}, {
|
|
158
159
|
key: "cancelGroupInviteWithHttpInfo",
|
|
@@ -171,7 +172,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
171
172
|
var authNames = ['authorization'];
|
|
172
173
|
var contentTypes = [];
|
|
173
174
|
var accepts = ['application/json'];
|
|
174
|
-
var returnType =
|
|
175
|
+
var returnType = _OkResponse["default"];
|
|
175
176
|
return this.apiClient.callApi('/api/v1/groups/sent_invitations/{invite_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
176
177
|
}
|
|
177
178
|
|
|
@@ -179,7 +180,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
179
180
|
* Cancel a sent group invitation
|
|
180
181
|
* Cancel (delete) a group invitation that the authenticated user sent.
|
|
181
182
|
* @param {String} inviteId ID of the GroupInvite to cancel
|
|
182
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
183
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OkResponse}
|
|
183
184
|
*/
|
|
184
185
|
}, {
|
|
185
186
|
key: "cancelGroupInvite",
|
|
@@ -194,7 +195,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
194
195
|
* Cancel a join request that the current user previously sent.
|
|
195
196
|
* @param {String} id Group ID
|
|
196
197
|
* @param {String} requestId Join request ID
|
|
197
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
198
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GroupJoinRequestResponse} and HTTP response
|
|
198
199
|
*/
|
|
199
200
|
}, {
|
|
200
201
|
key: "cancelJoinRequestWithHttpInfo",
|
|
@@ -218,7 +219,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
218
219
|
var authNames = ['authorization'];
|
|
219
220
|
var contentTypes = [];
|
|
220
221
|
var accepts = ['application/json'];
|
|
221
|
-
var returnType =
|
|
222
|
+
var returnType = _GroupJoinRequestResponse["default"];
|
|
222
223
|
return this.apiClient.callApi('/api/v1/groups/{id}/join_requests/{request_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
223
224
|
}
|
|
224
225
|
|
|
@@ -227,7 +228,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
227
228
|
* Cancel a join request that the current user previously sent.
|
|
228
229
|
* @param {String} id Group ID
|
|
229
230
|
* @param {String} requestId Join request ID
|
|
230
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
231
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GroupJoinRequestResponse}
|
|
231
232
|
*/
|
|
232
233
|
}, {
|
|
233
234
|
key: "cancelJoinRequest",
|
|
@@ -242,7 +243,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
242
243
|
* Create a new group. The authenticated user becomes an admin member automatically.
|
|
243
244
|
* @param {Object} opts Optional parameters
|
|
244
245
|
* @param {module:model/CreateGroupRequest} [createGroupRequest] Group creation parameters
|
|
245
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
246
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GroupResponse} and HTTP response
|
|
246
247
|
*/
|
|
247
248
|
}, {
|
|
248
249
|
key: "createGroupWithHttpInfo",
|
|
@@ -256,7 +257,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
256
257
|
var authNames = ['authorization'];
|
|
257
258
|
var contentTypes = ['application/json'];
|
|
258
259
|
var accepts = ['application/json'];
|
|
259
|
-
var returnType =
|
|
260
|
+
var returnType = _GroupResponse["default"];
|
|
260
261
|
return this.apiClient.callApi('/api/v1/groups', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
261
262
|
}
|
|
262
263
|
|
|
@@ -265,7 +266,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
265
266
|
* Create a new group. The authenticated user becomes an admin member automatically.
|
|
266
267
|
* @param {Object} opts Optional parameters
|
|
267
268
|
* @param {module:model/CreateGroupRequest} opts.createGroupRequest Group creation parameters
|
|
268
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
269
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GroupResponse}
|
|
269
270
|
*/
|
|
270
271
|
}, {
|
|
271
272
|
key: "createGroup",
|
|
@@ -280,14 +281,14 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
280
281
|
* Returns a presigned ticket for uploading the group's icon to storage. Upload the file to `upload_url`, then confirm with `POST /groups/{id}/icon` using the returned `key`.
|
|
281
282
|
* @param {String} id Group ID
|
|
282
283
|
* @param {Object} opts Optional parameters
|
|
283
|
-
* @param {module:model/
|
|
284
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
284
|
+
* @param {module:model/CreateGroupIconUploadUrlRequest} [createGroupIconUploadUrlRequest] Upload intent
|
|
285
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UploadTicketResponse} and HTTP response
|
|
285
286
|
*/
|
|
286
287
|
}, {
|
|
287
288
|
key: "createGroupIconUploadUrlWithHttpInfo",
|
|
288
289
|
value: function createGroupIconUploadUrlWithHttpInfo(id, opts) {
|
|
289
290
|
opts = opts || {};
|
|
290
|
-
var postBody = opts['
|
|
291
|
+
var postBody = opts['createGroupIconUploadUrlRequest'];
|
|
291
292
|
// verify the required parameter 'id' is set
|
|
292
293
|
if (id === undefined || id === null) {
|
|
293
294
|
throw new Error("Missing the required parameter 'id' when calling createGroupIconUploadUrl");
|
|
@@ -301,7 +302,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
301
302
|
var authNames = ['authorization'];
|
|
302
303
|
var contentTypes = ['application/json'];
|
|
303
304
|
var accepts = ['application/json'];
|
|
304
|
-
var returnType =
|
|
305
|
+
var returnType = _UploadTicketResponse["default"];
|
|
305
306
|
return this.apiClient.callApi('/api/v1/groups/{id}/icon/upload_url', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
306
307
|
}
|
|
307
308
|
|
|
@@ -310,8 +311,8 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
310
311
|
* Returns a presigned ticket for uploading the group's icon to storage. Upload the file to `upload_url`, then confirm with `POST /groups/{id}/icon` using the returned `key`.
|
|
311
312
|
* @param {String} id Group ID
|
|
312
313
|
* @param {Object} opts Optional parameters
|
|
313
|
-
* @param {module:model/
|
|
314
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
314
|
+
* @param {module:model/CreateGroupIconUploadUrlRequest} opts.createGroupIconUploadUrlRequest Upload intent
|
|
315
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UploadTicketResponse}
|
|
315
316
|
*/
|
|
316
317
|
}, {
|
|
317
318
|
key: "createGroupIconUploadUrl",
|
|
@@ -325,7 +326,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
325
326
|
* Decline a group invitation
|
|
326
327
|
* Decline a pending group invitation by invite ID. Only the recipient can decline. The invite is marked as declined (not deleted).
|
|
327
328
|
* @param {String} inviteId Invite ID (from the invitations list)
|
|
328
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
329
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OkResponse} and HTTP response
|
|
329
330
|
*/
|
|
330
331
|
}, {
|
|
331
332
|
key: "declineGroupInviteWithHttpInfo",
|
|
@@ -344,7 +345,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
344
345
|
var authNames = ['authorization'];
|
|
345
346
|
var contentTypes = [];
|
|
346
347
|
var accepts = ['application/json'];
|
|
347
|
-
var returnType =
|
|
348
|
+
var returnType = _OkResponse["default"];
|
|
348
349
|
return this.apiClient.callApi('/api/v1/groups/invitations/{invite_id}/decline', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
349
350
|
}
|
|
350
351
|
|
|
@@ -352,7 +353,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
352
353
|
* Decline a group invitation
|
|
353
354
|
* Decline a pending group invitation by invite ID. Only the recipient can decline. The invite is marked as declined (not deleted).
|
|
354
355
|
* @param {String} inviteId Invite ID (from the invitations list)
|
|
355
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
356
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OkResponse}
|
|
356
357
|
*/
|
|
357
358
|
}, {
|
|
358
359
|
key: "declineGroupInvite",
|
|
@@ -368,7 +369,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
368
369
|
* @param {String} id Group ID
|
|
369
370
|
* @param {Object} opts Optional parameters
|
|
370
371
|
* @param {module:model/DemoteGroupMemberRequest} [demoteGroupMemberRequest] Demote parameters
|
|
371
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
372
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GroupMemberResponse} and HTTP response
|
|
372
373
|
*/
|
|
373
374
|
}, {
|
|
374
375
|
key: "demoteGroupMemberWithHttpInfo",
|
|
@@ -388,7 +389,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
388
389
|
var authNames = ['authorization'];
|
|
389
390
|
var contentTypes = ['application/json'];
|
|
390
391
|
var accepts = ['application/json'];
|
|
391
|
-
var returnType =
|
|
392
|
+
var returnType = _GroupMemberResponse["default"];
|
|
392
393
|
return this.apiClient.callApi('/api/v1/groups/{id}/demote', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
393
394
|
}
|
|
394
395
|
|
|
@@ -398,7 +399,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
398
399
|
* @param {String} id Group ID
|
|
399
400
|
* @param {Object} opts Optional parameters
|
|
400
401
|
* @param {module:model/DemoteGroupMemberRequest} opts.demoteGroupMemberRequest Demote parameters
|
|
401
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
402
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GroupMemberResponse}
|
|
402
403
|
*/
|
|
403
404
|
}, {
|
|
404
405
|
key: "demoteGroupMember",
|
|
@@ -412,7 +413,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
412
413
|
* Get group details
|
|
413
414
|
* Get a single group by ID including member count.
|
|
414
415
|
* @param {String} id Group ID
|
|
415
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
416
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GroupResponse} and HTTP response
|
|
416
417
|
*/
|
|
417
418
|
}, {
|
|
418
419
|
key: "getGroupWithHttpInfo",
|
|
@@ -431,7 +432,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
431
432
|
var authNames = ['authorization'];
|
|
432
433
|
var contentTypes = [];
|
|
433
434
|
var accepts = ['application/json'];
|
|
434
|
-
var returnType =
|
|
435
|
+
var returnType = _GroupResponse["default"];
|
|
435
436
|
return this.apiClient.callApi('/api/v1/groups/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
436
437
|
}
|
|
437
438
|
|
|
@@ -439,7 +440,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
439
440
|
* Get group details
|
|
440
441
|
* Get a single group by ID including member count.
|
|
441
442
|
* @param {String} id Group ID
|
|
442
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
443
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GroupResponse}
|
|
443
444
|
*/
|
|
444
445
|
}, {
|
|
445
446
|
key: "getGroup",
|
|
@@ -455,7 +456,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
455
456
|
* @param {String} id Group ID
|
|
456
457
|
* @param {Object} opts Optional parameters
|
|
457
458
|
* @param {module:model/InviteToGroupRequest} [inviteToGroupRequest] Invite parameters
|
|
458
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
459
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GroupInviteOutcomeResponse} and HTTP response
|
|
459
460
|
*/
|
|
460
461
|
}, {
|
|
461
462
|
key: "inviteToGroupWithHttpInfo",
|
|
@@ -475,7 +476,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
475
476
|
var authNames = ['authorization'];
|
|
476
477
|
var contentTypes = ['application/json'];
|
|
477
478
|
var accepts = ['application/json'];
|
|
478
|
-
var returnType =
|
|
479
|
+
var returnType = _GroupInviteOutcomeResponse["default"];
|
|
479
480
|
return this.apiClient.callApi('/api/v1/groups/{id}/invite', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
480
481
|
}
|
|
481
482
|
|
|
@@ -485,7 +486,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
485
486
|
* @param {String} id Group ID
|
|
486
487
|
* @param {Object} opts Optional parameters
|
|
487
488
|
* @param {module:model/InviteToGroupRequest} opts.inviteToGroupRequest Invite parameters
|
|
488
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
489
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GroupInviteOutcomeResponse}
|
|
489
490
|
*/
|
|
490
491
|
}, {
|
|
491
492
|
key: "inviteToGroup",
|
|
@@ -499,7 +500,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
499
500
|
* Join a group
|
|
500
501
|
* Join a group. For public groups the user is added immediately. For private groups a join request is created (an admin must approve it). Hidden groups require an invite and cannot be joined directly.
|
|
501
502
|
* @param {String} id Group ID
|
|
502
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
503
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GroupMemberResponse} and HTTP response
|
|
503
504
|
*/
|
|
504
505
|
}, {
|
|
505
506
|
key: "joinGroupWithHttpInfo",
|
|
@@ -518,7 +519,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
518
519
|
var authNames = ['authorization'];
|
|
519
520
|
var contentTypes = [];
|
|
520
521
|
var accepts = ['application/json'];
|
|
521
|
-
var returnType =
|
|
522
|
+
var returnType = _GroupMemberResponse["default"];
|
|
522
523
|
return this.apiClient.callApi('/api/v1/groups/{id}/join', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
523
524
|
}
|
|
524
525
|
|
|
@@ -526,7 +527,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
526
527
|
* Join a group
|
|
527
528
|
* Join a group. For public groups the user is added immediately. For private groups a join request is created (an admin must approve it). Hidden groups require an invite and cannot be joined directly.
|
|
528
529
|
* @param {String} id Group ID
|
|
529
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
530
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GroupMemberResponse}
|
|
530
531
|
*/
|
|
531
532
|
}, {
|
|
532
533
|
key: "joinGroup",
|
|
@@ -542,7 +543,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
542
543
|
* @param {String} id Group ID
|
|
543
544
|
* @param {Object} opts Optional parameters
|
|
544
545
|
* @param {module:model/KickGroupMemberRequest} [kickGroupMemberRequest] Kick parameters
|
|
545
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link
|
|
546
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OkResponse} and HTTP response
|
|
546
547
|
*/
|
|
547
548
|
}, {
|
|
548
549
|
key: "kickGroupMemberWithHttpInfo",
|
|
@@ -562,7 +563,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
562
563
|
var authNames = ['authorization'];
|
|
563
564
|
var contentTypes = ['application/json'];
|
|
564
565
|
var accepts = ['application/json'];
|
|
565
|
-
var returnType =
|
|
566
|
+
var returnType = _OkResponse["default"];
|
|
566
567
|
return this.apiClient.callApi('/api/v1/groups/{id}/kick', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
567
568
|
}
|
|
568
569
|
|
|
@@ -572,7 +573,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
572
573
|
* @param {String} id Group ID
|
|
573
574
|
* @param {Object} opts Optional parameters
|
|
574
575
|
* @param {module:model/KickGroupMemberRequest} opts.kickGroupMemberRequest Kick parameters
|
|
575
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link
|
|
576
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OkResponse}
|
|
576
577
|
*/
|
|
577
578
|
}, {
|
|
578
579
|
key: "kickGroupMember",
|
|
@@ -586,7 +587,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
586
587
|
* Leave a group
|
|
587
588
|
* Leave a group you are a member of.
|
|
588
589
|
* @param {String} id Group ID
|
|
589
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link
|
|
590
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OkResponse} and HTTP response
|
|
590
591
|
*/
|
|
591
592
|
}, {
|
|
592
593
|
key: "leaveGroupWithHttpInfo",
|
|
@@ -605,7 +606,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
605
606
|
var authNames = ['authorization'];
|
|
606
607
|
var contentTypes = [];
|
|
607
608
|
var accepts = ['application/json'];
|
|
608
|
-
var returnType =
|
|
609
|
+
var returnType = _OkResponse["default"];
|
|
609
610
|
return this.apiClient.callApi('/api/v1/groups/{id}/leave', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
610
611
|
}
|
|
611
612
|
|
|
@@ -613,7 +614,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
613
614
|
* Leave a group
|
|
614
615
|
* Leave a group you are a member of.
|
|
615
616
|
* @param {String} id Group ID
|
|
616
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link
|
|
617
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OkResponse}
|
|
617
618
|
*/
|
|
618
619
|
}, {
|
|
619
620
|
key: "leaveGroup",
|
|
@@ -921,7 +922,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
921
922
|
* @param {String} id Group ID
|
|
922
923
|
* @param {Object} opts Optional parameters
|
|
923
924
|
* @param {module:model/PromoteGroupMemberRequest} [promoteGroupMemberRequest] Promote parameters
|
|
924
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
925
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GroupMemberResponse} and HTTP response
|
|
925
926
|
*/
|
|
926
927
|
}, {
|
|
927
928
|
key: "promoteGroupMemberWithHttpInfo",
|
|
@@ -941,7 +942,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
941
942
|
var authNames = ['authorization'];
|
|
942
943
|
var contentTypes = ['application/json'];
|
|
943
944
|
var accepts = ['application/json'];
|
|
944
|
-
var returnType =
|
|
945
|
+
var returnType = _GroupMemberResponse["default"];
|
|
945
946
|
return this.apiClient.callApi('/api/v1/groups/{id}/promote', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
946
947
|
}
|
|
947
948
|
|
|
@@ -951,7 +952,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
951
952
|
* @param {String} id Group ID
|
|
952
953
|
* @param {Object} opts Optional parameters
|
|
953
954
|
* @param {module:model/PromoteGroupMemberRequest} opts.promoteGroupMemberRequest Promote parameters
|
|
954
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
955
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GroupMemberResponse}
|
|
955
956
|
*/
|
|
956
957
|
}, {
|
|
957
958
|
key: "promoteGroupMember",
|
|
@@ -966,7 +967,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
966
967
|
* Reject a pending join request.
|
|
967
968
|
* @param {String} id Group ID
|
|
968
969
|
* @param {String} requestId Join request ID
|
|
969
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
970
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GroupJoinRequestResponse} and HTTP response
|
|
970
971
|
*/
|
|
971
972
|
}, {
|
|
972
973
|
key: "rejectJoinRequestWithHttpInfo",
|
|
@@ -990,7 +991,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
990
991
|
var authNames = ['authorization'];
|
|
991
992
|
var contentTypes = [];
|
|
992
993
|
var accepts = ['application/json'];
|
|
993
|
-
var returnType =
|
|
994
|
+
var returnType = _GroupJoinRequestResponse["default"];
|
|
994
995
|
return this.apiClient.callApi('/api/v1/groups/{id}/join_requests/{request_id}/reject', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
995
996
|
}
|
|
996
997
|
|
|
@@ -999,7 +1000,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
999
1000
|
* Reject a pending join request.
|
|
1000
1001
|
* @param {String} id Group ID
|
|
1001
1002
|
* @param {String} requestId Join request ID
|
|
1002
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
1003
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GroupJoinRequestResponse}
|
|
1003
1004
|
*/
|
|
1004
1005
|
}, {
|
|
1005
1006
|
key: "rejectJoinRequest",
|
|
@@ -1014,14 +1015,14 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1014
1015
|
* Records a previously uploaded object (`key`) as the group's icon.
|
|
1015
1016
|
* @param {String} id Group ID
|
|
1016
1017
|
* @param {Object} opts Optional parameters
|
|
1017
|
-
* @param {module:model/
|
|
1018
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
1018
|
+
* @param {module:model/SetGroupIconRequest} [setGroupIconRequest] Uploaded object key
|
|
1019
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GroupResponse} and HTTP response
|
|
1019
1020
|
*/
|
|
1020
1021
|
}, {
|
|
1021
1022
|
key: "setGroupIconWithHttpInfo",
|
|
1022
1023
|
value: function setGroupIconWithHttpInfo(id, opts) {
|
|
1023
1024
|
opts = opts || {};
|
|
1024
|
-
var postBody = opts['
|
|
1025
|
+
var postBody = opts['setGroupIconRequest'];
|
|
1025
1026
|
// verify the required parameter 'id' is set
|
|
1026
1027
|
if (id === undefined || id === null) {
|
|
1027
1028
|
throw new Error("Missing the required parameter 'id' when calling setGroupIcon");
|
|
@@ -1035,7 +1036,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1035
1036
|
var authNames = ['authorization'];
|
|
1036
1037
|
var contentTypes = ['application/json'];
|
|
1037
1038
|
var accepts = ['application/json'];
|
|
1038
|
-
var returnType =
|
|
1039
|
+
var returnType = _GroupResponse["default"];
|
|
1039
1040
|
return this.apiClient.callApi('/api/v1/groups/{id}/icon', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1040
1041
|
}
|
|
1041
1042
|
|
|
@@ -1044,8 +1045,8 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1044
1045
|
* Records a previously uploaded object (`key`) as the group's icon.
|
|
1045
1046
|
* @param {String} id Group ID
|
|
1046
1047
|
* @param {Object} opts Optional parameters
|
|
1047
|
-
* @param {module:model/
|
|
1048
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
1048
|
+
* @param {module:model/SetGroupIconRequest} opts.setGroupIconRequest Uploaded object key
|
|
1049
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GroupResponse}
|
|
1049
1050
|
*/
|
|
1050
1051
|
}, {
|
|
1051
1052
|
key: "setGroupIcon",
|
|
@@ -1061,7 +1062,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1061
1062
|
* @param {String} id Group ID
|
|
1062
1063
|
* @param {Object} opts Optional parameters
|
|
1063
1064
|
* @param {module:model/UpdateGroupRequest} [updateGroupRequest] Group update parameters
|
|
1064
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
1065
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GroupResponse} and HTTP response
|
|
1065
1066
|
*/
|
|
1066
1067
|
}, {
|
|
1067
1068
|
key: "updateGroupWithHttpInfo",
|
|
@@ -1081,7 +1082,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1081
1082
|
var authNames = ['authorization'];
|
|
1082
1083
|
var contentTypes = ['application/json'];
|
|
1083
1084
|
var accepts = ['application/json'];
|
|
1084
|
-
var returnType =
|
|
1085
|
+
var returnType = _GroupResponse["default"];
|
|
1085
1086
|
return this.apiClient.callApi('/api/v1/groups/{id}', 'PATCH', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1086
1087
|
}
|
|
1087
1088
|
|
|
@@ -1091,7 +1092,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1091
1092
|
* @param {String} id Group ID
|
|
1092
1093
|
* @param {Object} opts Optional parameters
|
|
1093
1094
|
* @param {module:model/UpdateGroupRequest} opts.updateGroupRequest Group update parameters
|
|
1094
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
1095
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GroupResponse}
|
|
1095
1096
|
*/
|
|
1096
1097
|
}, {
|
|
1097
1098
|
key: "updateGroup",
|
package/dist/api/HealthApi.js
CHANGED
|
@@ -16,7 +16,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
16
16
|
* Gamend API
|
|
17
17
|
* API for Gamend. Provides HTTP REST API, real-time WebSocket channels, and WebRTC DataChannels for low-latency game data. Features authentication, users, lobbies, groups, parties, friends, chat, notifications, quests, leaderboards, tournaments, matchmaking, payments, server scripting, and admin portal. ## **1. Authentication** This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### **1.1 Getting Tokens** - **Email/Password**: POST to `/api/v1/login` with email and password - **Device (SDK)**: POST to `/api/v1/login` with a `device_id` string (creates/returns a device user) - **Discord OAuth**: Use `/api/v1/auth/discord` flow - **Google OAuth**: Use `/api/v1/auth/google` flow - **Facebook OAuth**: Use `/api/v1/auth/facebook` flow - **Apple Sign In**: Use `/auth/apple` browser flow or apple sdk flow - **Steam (OpenID)**: Use `/api/v1/auth/steam` flow Both methods return: - `access_token` - Short-lived (15 min), use for API requests - `refresh_token` - Long-lived (30 days), use to get new access tokens ### **1.2 Using Tokens** Include the access token in the Authorization header: ``` Authorization: Bearer <access_token> ``` ### **1.3 Refreshing Tokens** When your access token expires, use POST `/api/v1/refresh` with your refresh token to get a new access token. ## **2. Users** Users endpoints cover the user lifecycle and profile features. Key highlights: - **Registration and login** (email/password, device token for SDKs, and OAuth providers) - **Profile metadata** (JSON blob per user) and editable profile fields - **Account lifecycle**: password reset, email confirmation, and account deletion - **Sessions & tokens**: both browser sessions and JWT-based API tokens are supported ## **3. Friends** The Friends domain offers lightweight social features: - **Friend requests** (send / accept / reject / block flows) - **Friend listing & pagination**, with basic privacy controls - **Domain helpers** to manage and query friend relationships from API or UI contexts ## **4. Lobbies** Lobbies provide matchmaking / room management primitives. Highlights: - **Create / list / update / delete** lobbies with rich metadata (mode, region, tags) - **Host-managed or hostless** modes (hostless allowed internally, not creatable via public API) - **Membership management**: join, leave, kick users, and automatic host transfer - **Controls & protection**: max users, hidden/locked states, and optional password protection - **Hidden lobbies** are excluded from public listings; public listing endpoints are paginated ## **5. Notifications** Persistent user-to-user notifications that survive across sessions: - **Send notifications** to accepted friends with a title, optional content, and optional metadata - **List own notifications** with pagination (ordered oldest-first) - **Delete notifications** by ID (single or batch) - **Real-time delivery** via the user WebSocket channel (`\"notification\"` events) - **Offline delivery**: undeleted notifications are replayed on WebSocket reconnect - **Push delivery**: notifications also fan out to the recipient's registered mobile devices (see Push notifications) ## **5b. Push notifications** Mobile/web push delivery to registered devices (FCM for Android/Web, APNs-direct for iOS): - **Register device tokens** via `POST /me/push_tokens` (`token`, `platform`, optional `provider`/`device_id`); re-registering a `device_id` rotates its token in place - **List/remove own devices** via `GET /me/push_tokens` and `DELETE /me/push_tokens/:id` - **Server-authoritative sending** — no public send endpoint; pushes originate from server hooks (`Gamend.Push.send_to_user/2`) or the admin API - **Per-token routing**: each token's `provider` (\"fcm\" | \"apns\") selects the delivery backend; unconfigured backends log instead of sending (dev-friendly) - **Reliability**: delivery rides the durable job queue with retries; dead tokens reported by the provider are disabled automatically ## **6. Groups** Groups provide persistent community management for players: - **Three group types**: `public` (anyone joins directly), `private` (users request to join, admins approve), `hidden` (invite-only, never listed) - **Membership roles**: `admin` and `member`, with promote/demote capabilities - **Join requests**: for private groups, users submit requests that admins approve or reject - **Invitations**: admins can invite users directly (blocked users are rejected) - **CRUD operations**: create, update, delete groups with metadata support - **Group chat**: integrated via the Chat API with `chat_type: \"group\"` ## **7. Parties** Ephemeral groups of users for short-lived sessions (e.g., matchmaking squads): - **Invite-only joining**: the party leader sends invites by user ID to friends or shared-group members - **Invite flow**: `POST /parties/invite` → recipient accepts via `POST /parties/invite/accept` or declines via `POST /parties/invite/decline`; leader can cancel via `POST /parties/invite/cancel` - **Invite visibility**: leader can list sent invites (`GET /parties/invitations/sent`); recipient can list received invites (`GET /parties/invitations`) - **Connection requirement**: invites can only be sent to users who are friends or share at least one group with the leader - **One party at a time**: a user can only be in one party; accepting an invite while already in a party is rejected - **Leader management**: the creator is the leader; leadership can be transferred - **Lobby integration**: parties can create or join lobbies as a group - **Party chat**: integrated via the Chat API with `chat_type: \"party\"` - **Real-time events** via the party WebSocket channel ## **8. Chat** Real-time messaging across multiple conversation types: - **Chat types**: `lobby` (within a lobby), `group` (within a group), `party` (within a party), `friend` (DMs between friends) - **Send messages** with content, optional metadata, and automatic access validation - **List messages** with pagination (newest first) - **Read tracking**: mark messages as read and get unread counts per conversation - **Real-time delivery** via PubSub and WebSocket channels - **Moderation is built in**: an admin-managed word filter (`block` / `mask` / `flag`, matched on a normalized form so leetspeak and padding do not slip through) and mutes are enforced before a message is stored or broadcast; the `before_chat_message` pipeline hook stays available for rules of your own - **Report a message**: `POST /chat/messages/:id/report` with an optional `reason` — one report per player per message, capped per day; reports the filter files itself have no reporter - **Scoped mutes** mirror kick: `POST /lobbies/mute` + `/lobbies/unmute` (lobby host), `POST /groups/:id/mute` + `/groups/:id/unmute` (group admin), `POST /parties/mute` + `/parties/unmute` (party leader), each with a paginated `.../mutes` listing for the same authority. Body is `{target_user_id, expires_at?, reason?}`; omitting `expires_at` mutes permanently - **Global mutes and the blocklist are server-authoritative** — no public endpoint; admin API (`/api/v1/admin/chat`) or a plugin calling `Gamend.Chat.mute_user/4` - **Real-time moderation events**: the muted player receives `chat_muted` / `chat_unmuted` on their user channel ## **9. Leaderboards** Server-managed ranked scoreboards: - **Multiple leaderboards**: create named leaderboards with configurable sort order - **Score submission**: submit scores with optional metadata - **Rankings**: retrieve paginated rankings with user details - **Reset support**: leaderboards can be reset periodically ## **10. Key-Value Storage** Per-user persistent key-value storage for game state, preferences, and settings: - **Get/set/delete** key-value pairs scoped to the authenticated user - **List keys** with optional prefix filtering - **Metadata support**: values can include arbitrary JSON metadata ## **11. Quests / Progression** One event-driven progression engine covering achievements, daily/weekly quests, time-boxed event quests, chains, and groups: - **Kinds**: `achievement` (permanent one-shot — the replacement for the old achievements system), `daily`/`weekly` (reset per UTC period), `event` (starts_at/ends_at window), `chain` (requires a prerequisite quest) - **Objectives**: each quest lists objectives `{event, target, params}`; server-side `report_event` advances every matching active quest — there is **no public endpoint to advance progress** (server-authoritative) - **Rewards**: currencies (Economy) and items (Inventory), paid **exactly once** per period via idempotent grants; `auto_claim` quests pay on completion, others via `POST /me/quests/:key/claim` - **My quests**: `GET /me/quests` returns active quests, per-period progress, and a claimable flag; hidden quests appear once completed - **Groups**: quests sharing a `group_key` collapse to one entry carrying `group_size`; `?group=<key>` lists that group's members in full - **Catalog**: `GET /quests` and per-user completions `GET /quests/user/:user_id` (gated by `GAMEND_FEATURES_LIST_QUESTS`) - **Admin management**: definitions CRUD plus per-user grant/reset/force-claim under `/api/v1/admin/quests` ## **12. Tournaments** Single-elimination bracket tournaments, server-structured and game-judged: - **Registration window → seeded draw → timed rounds → champions**; recurring tournaments (cron) create one occurrence per cycle sharing a slug; a nil starts_at keeps registration open until an admin draws manually - **Join/leave** as an entry leader (`POST`/`DELETE /tournaments/:id/join`); team composition is game policy - **Browse**: list/filter tournaments, standings, full bracket view, and the caller's current match (`GET /tournaments/:id/my_match`) - **Match verdicts are server-side** (game hooks) — no public resolve endpoint; clients get `tournament_match_ready` / `tournament_match_resolved` / `tournament_updated` / `tournament_finished` on the user channel - **Admin management** over HTTP: create/update/delete, cancel, draw now, finish, and force match verdicts under `/api/v1/admin/tournaments` ## **13. Matchmaking** Ticket-based queueing that turns waiting players into hidden, locked lobbies: - **Join over HTTP** (`POST /matchmaking/tickets` with a `match_params` string map); only tickets with identical params match together — encode mode/map/skill band as parameter values - **A match forms** when a group reaches `max_players`, or has at least `min_players` and the oldest ticket outwaited the timeout; the server creates a hidden lobby, seats everyone and locks it - **The result is a push, not a poll**: matched players receive `match_found` (`lobby_id`, `match_params`) on their user channel; disconnecting cancels your tickets - **Inspect**: `GET /matchmaking/tickets/me` for your ticket, `GET /matchmaking/stats` for queue depths - **Admin management** over HTTP: list/filter tickets, force-cancel, and stats under `/api/v1/admin/matchmaking` ## **14. Ready checks** One primitive for \"everyone must answer before this proceeds\", with one client-facing surface: - **A player holds at most one check per lane** — the match lane (lobby ready-up or matchmaking accept) and the party lane (the party's standing board) — so answering needs no id: `GET /me/ready_check` returns `{\"lobby\": …, \"party\": …}` (each null when none) and `POST /me/ready_check` with `{\"ready\": true|false, \"scope\": \"lobby\"|\"party\"}` answers one (scope defaults to `lobby`) - **Two kinds.** `ready` (lobby/party board) is a toggle — a \"no\" just leaves the check open, and it lists every participant. `accept` (match confirmation) is final — one decline fails it for everyone — and returns counts plus your own state, so a pending match does not reveal who you were paired with - **Hosts open one** with `POST /lobbies/ready_check` (host-managed lobbies only; hostless matchmaking lobbies belong to the server), **party leaders** with `POST /parties/ready_check`; either call is a **reset** — it quietly replaces an already-open board with a fresh one over the current members, so the same endpoint serves \"ready check!\", \"force ready\" (with `timeout_ms`) and \"start over\". Call it off with `DELETE /lobbies/ready_check` / `DELETE /parties/ready_check`. The opener is pre-marked ready — clicking the button is their answer - **Failure does nothing on its own**: a declined or timed-out check kicks nobody, starts nothing, and moves no lobby state. It reports who did not answer, and the game (or the host, with the kick they already have) decides - **Live**: `ready_check_started` / `ready_check_updated` / `ready_check_passed` / `ready_check_failed` on the lobby channel, the party channel for a party board, or the user channel for an accept check - **Admin management** over HTTP: list/filter checks, force-cancel, and 24h outcome stats under `/api/v1/admin/ready_checks` ## **15. Real-time: WebSocket Channels** The server provides real-time communication via Phoenix WebSocket channels. Connect to the WebSocket endpoint and join topic-based channels for live updates. ### **15.1 Connection** Connect to `wss://your-server.com/socket` with your JWT token as a parameter: ``` const socket = new Socket(\"wss://your-server.com/socket\", { params: { token: \"<access_token>\" } }) socket.connect() ``` ### **15.2 Available Channels** - **User channel** (`user:<user_id>`): notifications, friend events, quest progress/completions/claims, party/group invites, tournament events, chat mutes (`chat_muted` / `chat_unmuted`), KV subscriptions - **Lobby channel** (`lobby:<lobby_id>`): lobby member joins/leaves, lobby updates, lobby chat - **Lobbies channel** (`lobbies`): global lobby list changes (created, updated, deleted) - **Group channel** (`group:<group_id>`): group member changes, group updates, group chat - **Groups channel** (`groups`): global group list changes - **Party channel** (`party:<party_id>`): party member changes, party updates, party chat ### **15.3 JS SDK Helper** The `GameRealtime` class (included in this SDK) wraps Phoenix.Socket with convenient channel helpers: ```javascript import { GameRealtime } from '@ughuuu/gamend' const realtime = new GameRealtime('https://your-server.com', accessToken) const userChannel = realtime.joinUserChannel(userId) userChannel.on('notification', payload => console.log(payload)) ``` `phoenix` ships as a dependency of the package, so no extra install is needed. ## **16. Real-time: WebRTC DataChannels** For low-latency game data, the server supports WebRTC DataChannels alongside WebSocket. The server acts as a WebRTC peer (not P2P between clients). ### **16.1 How It Works** 1. Client connects via WebSocket and joins the **User channel** 2. Client sends an SDP offer over the channel (`webrtc:offer` event) 3. Server responds with an SDP answer (`webrtc:answer` event) 4. ICE candidates are exchanged (`webrtc:ice` events) 5. Once connected, named DataChannels carry game data at low latency ### **16.2 Default DataChannels** - **`events`** (reliable, ordered): important game events (player actions, state changes) - **`state`** (unreliable, unordered): high-frequency position/state sync ### **16.3 JS SDK Helper** The `GameWebRTC` class (included in this SDK, browser-only) handles signaling automatically: ```javascript import { GameRealtime, GameWebRTC } from '@ughuuu/gamend' const realtime = new GameRealtime('https://your-server.com', token) const userChannel = realtime.joinUserChannel(userId) const webrtc = new GameWebRTC(userChannel, { onData: (label, data) => console.log(label, data) }) await webrtc.connect() webrtc.send('events', JSON.stringify({ type: 'move', x: 10, y: 20 })) ```
|
|
18
18
|
*
|
|
19
|
-
* The version of the OpenAPI document: 1.0.
|
|
19
|
+
* The version of the OpenAPI document: 1.0.1241
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|