@ughuuu/game_server 1.0.382 → 1.0.790
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 +109 -24
- package/dist/ApiClient.js +2 -2
- package/dist/api/AchievementsApi.js +224 -0
- package/dist/api/AdminAchievementsApi.js +356 -0
- package/dist/api/AdminChatApi.js +2 -2
- package/dist/api/AdminGroupsApi.js +2 -2
- package/dist/api/AdminKVApi.js +2 -2
- package/dist/api/AdminLeaderboardsApi.js +2 -2
- package/dist/api/AdminLobbiesApi.js +2 -2
- package/dist/api/AdminNotificationsApi.js +2 -2
- package/dist/api/AdminSessionsApi.js +2 -2
- package/dist/api/AdminUsersApi.js +2 -2
- package/dist/api/AuthenticationApi.js +2 -2
- package/dist/api/ChatApi.js +141 -12
- package/dist/api/FriendsApi.js +2 -2
- package/dist/api/GroupsApi.js +69 -27
- package/dist/api/HealthApi.js +2 -2
- package/dist/api/HooksApi.js +2 -2
- package/dist/api/KVApi.js +2 -2
- package/dist/api/LeaderboardsApi.js +43 -2
- package/dist/api/LobbiesApi.js +44 -2
- package/dist/api/NotificationsApi.js +2 -2
- package/dist/api/PartiesApi.js +206 -22
- package/dist/api/UsersApi.js +2 -2
- package/dist/index.js +183 -10
- package/dist/model/AcceptPartyInviteRequest.js +109 -0
- package/dist/model/AdminCreateAchievementRequest.js +182 -0
- package/dist/model/AdminCreateKvEntry200Response.js +2 -2
- package/dist/model/AdminCreateKvEntryRequest.js +2 -2
- package/dist/model/AdminCreateLeaderboardRequest.js +2 -2
- package/dist/model/AdminCreateNotification400Response.js +2 -2
- package/dist/model/AdminCreateNotificationRequest.js +2 -2
- package/dist/model/AdminDeleteChatConversation200Response.js +2 -2
- package/dist/model/AdminEndLeaderboard200Response.js +2 -2
- package/dist/model/AdminEndLeaderboard200ResponseData.js +2 -2
- package/dist/model/AdminIncrementAchievementRequest.js +130 -0
- package/dist/model/AdminListAchievements200Response.js +118 -0
- package/dist/model/AdminListChatMessages200Response.js +2 -2
- package/dist/model/AdminListChatMessages200ResponseDataInner.js +20 -3
- package/dist/model/AdminListGroups200Response.js +2 -2
- package/dist/model/AdminListKvEntries200Response.js +2 -2
- package/dist/model/AdminListKvEntries200ResponseDataInner.js +2 -2
- package/dist/model/AdminListLobbies200Response.js +2 -2
- package/dist/model/AdminListLobbies200ResponseDataInner.js +32 -2
- package/dist/model/AdminListNotifications200Response.js +2 -2
- package/dist/model/AdminListNotifications200ResponseDataInner.js +15 -2
- package/dist/model/AdminListNotifications200ResponseMeta.js +2 -2
- package/dist/model/AdminListSessions200Response.js +2 -2
- package/dist/model/AdminListSessions200ResponseDataInner.js +2 -2
- package/dist/model/AdminRevokeAchievementRequest.js +118 -0
- package/dist/model/AdminSubmitLeaderboardScore200Response.js +2 -2
- package/dist/model/AdminSubmitLeaderboardScore200ResponseData.js +14 -2
- package/dist/model/AdminSubmitLeaderboardScoreRequest.js +20 -8
- package/dist/model/AdminUnlockAchievementRequest.js +122 -0
- package/dist/model/AdminUpdateAchievement200Response.js +181 -0
- package/dist/model/AdminUpdateAchievementRequest.js +145 -0
- package/dist/model/AdminUpdateGroup200Response.js +23 -2
- package/dist/model/AdminUpdateGroupRequest.js +11 -2
- package/dist/model/AdminUpdateKvEntryRequest.js +2 -2
- package/dist/model/AdminUpdateLeaderboardRecordRequest.js +2 -2
- package/dist/model/AdminUpdateLeaderboardRequest.js +2 -2
- package/dist/model/AdminUpdateLobby200Response.js +2 -2
- package/dist/model/AdminUpdateLobbyRequest.js +11 -2
- package/dist/model/AdminUpdateUser200Response.js +2 -2
- package/dist/model/AdminUpdateUser200ResponseData.js +2 -2
- package/dist/model/AdminUpdateUserRequest.js +2 -2
- package/dist/model/CallHook200Response.js +2 -2
- package/dist/model/CallHookRequest.js +2 -2
- package/dist/model/CancelGroupInvite200Response.js +2 -2
- package/dist/model/CancelJoinRequest200Response.js +2 -2
- package/dist/model/CancelPartyInviteRequest.js +109 -0
- package/dist/model/ChatUnreadCount200Response.js +2 -2
- package/dist/model/CreateFriendRequestRequest.js +2 -2
- package/dist/model/CreateGroupRequest.js +11 -2
- package/dist/model/CreateLobbyRequest.js +11 -2
- package/dist/model/CreatePartyRequest.js +2 -2
- package/dist/model/DeclinePartyInviteRequest.js +109 -0
- package/dist/model/DeleteNotifications200Response.js +2 -2
- package/dist/model/DeleteNotificationsRequest.js +2 -2
- package/dist/model/DemoteGroupMemberRequest.js +2 -2
- package/dist/model/DeviceLoginRequest.js +2 -2
- package/dist/model/ErrorResponse.js +2 -2
- package/dist/model/GetChatMessage200Response.js +196 -0
- package/dist/model/GetCurrentUser200Response.js +2 -2
- package/dist/model/GetCurrentUser200ResponseLinkedProviders.js +2 -2
- package/dist/model/GetKv200Response.js +2 -2
- package/dist/model/GetLobby200Response.js +133 -0
- package/dist/model/GetLobby200ResponseMembersInner.js +146 -0
- package/dist/model/GetMyRecord200Response.js +2 -2
- package/dist/model/HealthResponse.js +2 -2
- package/dist/model/InviteToGroup200Response.js +90 -0
- package/dist/model/InviteToGroupRequest.js +2 -2
- package/dist/model/InviteToPartyRequest.js +109 -0
- package/dist/model/KickGroupMemberRequest.js +2 -2
- package/dist/model/KickUserRequest.js +2 -2
- package/dist/model/LinkDeviceRequest.js +2 -2
- package/dist/model/ListBlockedFriends200Response.js +2 -2
- package/dist/model/ListBlockedFriends200ResponseDataInner.js +2 -2
- package/dist/model/ListBlockedFriends200ResponseDataInnerRequester.js +2 -2
- package/dist/model/ListChatMessages200Response.js +6 -6
- package/dist/model/ListFriendRequests200Response.js +2 -2
- package/dist/model/ListFriendRequests200ResponseIncomingInner.js +2 -2
- package/dist/model/ListFriendRequests200ResponseIncomingInnerRequester.js +11 -2
- package/dist/model/ListFriendRequests200ResponseMeta.js +2 -2
- package/dist/model/ListFriends200Response.js +2 -2
- package/dist/model/ListFriends200ResponseDataInner.js +11 -2
- package/dist/model/ListGroupInvitations200Response.js +2 -2
- package/dist/model/ListGroupInvitations200ResponseDataInner.js +48 -3
- package/dist/model/ListGroupMembers200Response.js +2 -2
- package/dist/model/ListGroupMembers200ResponseDataInner.js +2 -2
- package/dist/model/ListJoinRequests200Response.js +2 -2
- package/dist/model/ListLeaderboardRecords200Response.js +2 -2
- package/dist/model/ListLeaderboardRecords200ResponseDataInner.js +4 -4
- package/dist/model/ListLeaderboards200Response.js +2 -2
- package/dist/model/ListLeaderboards200ResponseDataInner.js +2 -2
- package/dist/model/ListLobbies200Response.js +2 -2
- package/dist/model/ListLobbies200ResponseDataInner.js +24 -2
- package/dist/model/ListMyGroups200Response.js +2 -2
- package/dist/model/ListMyGroups200ResponseDataInner.js +24 -2
- package/dist/model/ListNotifications200Response.js +2 -2
- package/dist/model/ListNotifications200ResponseDataInner.js +15 -2
- package/dist/model/ListPartyInvitations200ResponseInner.js +155 -0
- package/dist/model/ListRecordsAroundUser200Response.js +2 -2
- package/dist/model/ListSentInvitations200Response.js +2 -2
- package/dist/model/ListSentInvitations200ResponseDataInner.js +26 -2
- package/dist/model/Login200Response.js +2 -2
- package/dist/model/Login200ResponseData.js +15 -2
- package/dist/model/LoginRequest.js +2 -2
- package/dist/model/MarkChatReadRequest.js +8 -3
- package/dist/model/NotifyGroup200Response.js +2 -2
- package/dist/model/NotifyGroupRequest.js +3 -3
- package/dist/model/OAuthSessionData.js +15 -2
- package/dist/model/OAuthSessionDataDetails.js +2 -2
- package/dist/model/OAuthSessionStatus.js +2 -2
- package/dist/model/OauthApiCallback200Response.js +2 -2
- package/dist/model/OauthApiCallbackRequest.js +2 -2
- package/dist/model/OauthCallbackApiAppleIosRequest.js +2 -2
- package/dist/model/OauthGoogleIdTokenRequest.js +2 -2
- package/dist/model/OauthRequest200Response.js +2 -2
- package/dist/model/OauthSessionStatus404Response.js +2 -2
- package/dist/model/PartyCreateLobbyRequest.js +2 -2
- package/dist/model/PartyJoinLobbyRequest.js +2 -2
- package/dist/model/PromoteGroupMemberRequest.js +2 -2
- package/dist/model/QuickJoinRequest.js +2 -2
- package/dist/model/RefreshToken200Response.js +2 -2
- package/dist/model/RefreshToken200ResponseData.js +15 -2
- package/dist/model/RefreshTokenRequest.js +2 -2
- package/dist/model/ResolveLeaderboardSlugs200Response.js +89 -0
- package/dist/model/ResolveLeaderboardSlugsRequest.js +113 -0
- package/dist/model/SearchUsers200Response.js +2 -2
- package/dist/model/SearchUsers200ResponseDataInner.js +11 -2
- package/dist/model/SendChatMessageRequest.js +10 -5
- package/dist/model/SendNotificationRequest.js +2 -2
- package/dist/model/ShowParty200Response.js +13 -13
- package/dist/model/ShowParty200ResponseMembersInner.js +11 -2
- package/dist/model/UpdateChatMessageRequest.js +99 -0
- package/dist/model/UpdateCurrentUserDisplayNameRequest.js +2 -2
- package/dist/model/UpdateCurrentUserPassword400Response.js +2 -2
- package/dist/model/UpdateCurrentUserPasswordRequest.js +2 -2
- package/dist/model/UpdateGroupRequest.js +11 -2
- package/dist/model/UpdateLobbyRequest.js +11 -2
- package/dist/model/UpdatePartyRequest.js +2 -2
- package/dist/model/UserAchievements200Response.js +124 -0
- package/dist/model/UserAchievements200ResponseDataInner.js +192 -0
- package/dist/realtime.js +247 -0
- package/dist/webrtc.js +375 -0
- package/package.json +16 -23
- package/dist/model/CreateLobby401Response.js +0 -89
- package/dist/model/JoinLobby200Response.js +0 -89
- package/dist/model/JoinLobbyRequest.js +0 -90
- package/dist/model/JoinPartyByCodeRequest.js +0 -113
- package/dist/model/KickUser200Response.js +0 -89
- package/dist/model/LeaveLobby200Response.js +0 -89
- package/dist/model/ListChatMessages200ResponseDataInner.js +0 -170
- package/dist/model/ListLeaderboardRecords200ResponseMeta.js +0 -125
- package/dist/model/ListLobbies200ResponseInner.js +0 -153
- package/dist/model/ListLobbies200ResponseMeta.js +0 -125
- package/dist/model/Login200ResponseDataUser.js +0 -97
- package/dist/model/RemoveFriendship401Response.js +0 -89
package/dist/api/HooksApi.js
CHANGED
|
@@ -16,9 +16,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
17
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
18
|
* Game Server API
|
|
19
|
-
* API for Game Server
|
|
19
|
+
* API for the Gamend Game Server. Has authentication, users, lobbies, groups, parties, friends, chat, notifications, achievements, leaderboards, 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 ## **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 hooks**: `before_chat_message` pipeline hook for filtering/blocking ## **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
|
|
20
20
|
*
|
|
21
|
-
* The version of the OpenAPI document: 1.0.
|
|
21
|
+
* The version of the OpenAPI document: 1.0.790
|
|
22
22
|
*
|
|
23
23
|
*
|
|
24
24
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/api/KVApi.js
CHANGED
|
@@ -15,9 +15,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
15
15
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
16
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
17
17
|
* Game Server API
|
|
18
|
-
* API for Game Server
|
|
18
|
+
* API for the Gamend Game Server. Has authentication, users, lobbies, groups, parties, friends, chat, notifications, achievements, leaderboards, 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 ## **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 hooks**: `before_chat_message` pipeline hook for filtering/blocking ## **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
|
|
19
19
|
*
|
|
20
|
-
* The version of the OpenAPI document: 1.0.
|
|
20
|
+
* The version of the OpenAPI document: 1.0.790
|
|
21
21
|
*
|
|
22
22
|
*
|
|
23
23
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,11 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _AdminCreateNotification400Response = _interopRequireDefault(require("../model/AdminCreateNotification400Response"));
|
|
8
9
|
var _GetMyRecord200Response = _interopRequireDefault(require("../model/GetMyRecord200Response"));
|
|
9
10
|
var _ListLeaderboardRecords200Response = _interopRequireDefault(require("../model/ListLeaderboardRecords200Response"));
|
|
10
11
|
var _ListLeaderboards200Response = _interopRequireDefault(require("../model/ListLeaderboards200Response"));
|
|
11
12
|
var _ListLeaderboards200ResponseDataInner = _interopRequireDefault(require("../model/ListLeaderboards200ResponseDataInner"));
|
|
12
13
|
var _ListRecordsAroundUser200Response = _interopRequireDefault(require("../model/ListRecordsAroundUser200Response"));
|
|
14
|
+
var _ResolveLeaderboardSlugs200Response = _interopRequireDefault(require("../model/ResolveLeaderboardSlugs200Response"));
|
|
15
|
+
var _ResolveLeaderboardSlugsRequest = _interopRequireDefault(require("../model/ResolveLeaderboardSlugsRequest"));
|
|
13
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
17
|
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); }
|
|
15
18
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -18,9 +21,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
18
21
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
22
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
20
23
|
* Game Server API
|
|
21
|
-
* API for Game Server
|
|
24
|
+
* API for the Gamend Game Server. Has authentication, users, lobbies, groups, parties, friends, chat, notifications, achievements, leaderboards, 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 ## **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 hooks**: `before_chat_message` pipeline hook for filtering/blocking ## **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
|
|
22
25
|
*
|
|
23
|
-
* The version of the OpenAPI document: 1.0.
|
|
26
|
+
* The version of the OpenAPI document: 1.0.790
|
|
24
27
|
*
|
|
25
28
|
*
|
|
26
29
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -297,5 +300,43 @@ var LeaderboardsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
297
300
|
return response_and_data.data;
|
|
298
301
|
});
|
|
299
302
|
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Resolve multiple slugs to active leaderboards
|
|
306
|
+
* Accepts an array of leaderboard slugs and returns the currently active leaderboard for each slug. If a slug has seasonal leaderboards, the latest active season is returned. Slugs with no active leaderboard are omitted from the result.
|
|
307
|
+
* @param {Object} opts Optional parameters
|
|
308
|
+
* @param {module:model/ResolveLeaderboardSlugsRequest} [resolveLeaderboardSlugsRequest] Slugs to resolve
|
|
309
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ResolveLeaderboardSlugs200Response} and HTTP response
|
|
310
|
+
*/
|
|
311
|
+
}, {
|
|
312
|
+
key: "resolveLeaderboardSlugsWithHttpInfo",
|
|
313
|
+
value: function resolveLeaderboardSlugsWithHttpInfo(opts) {
|
|
314
|
+
opts = opts || {};
|
|
315
|
+
var postBody = opts['resolveLeaderboardSlugsRequest'];
|
|
316
|
+
var pathParams = {};
|
|
317
|
+
var queryParams = {};
|
|
318
|
+
var headerParams = {};
|
|
319
|
+
var formParams = {};
|
|
320
|
+
var authNames = [];
|
|
321
|
+
var contentTypes = ['application/json'];
|
|
322
|
+
var accepts = ['application/json'];
|
|
323
|
+
var returnType = _ResolveLeaderboardSlugs200Response["default"];
|
|
324
|
+
return this.apiClient.callApi('/api/v1/leaderboards/resolve', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Resolve multiple slugs to active leaderboards
|
|
329
|
+
* Accepts an array of leaderboard slugs and returns the currently active leaderboard for each slug. If a slug has seasonal leaderboards, the latest active season is returned. Slugs with no active leaderboard are omitted from the result.
|
|
330
|
+
* @param {Object} opts Optional parameters
|
|
331
|
+
* @param {module:model/ResolveLeaderboardSlugsRequest} opts.resolveLeaderboardSlugsRequest Slugs to resolve
|
|
332
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ResolveLeaderboardSlugs200Response}
|
|
333
|
+
*/
|
|
334
|
+
}, {
|
|
335
|
+
key: "resolveLeaderboardSlugs",
|
|
336
|
+
value: function resolveLeaderboardSlugs(opts) {
|
|
337
|
+
return this.resolveLeaderboardSlugsWithHttpInfo(opts).then(function (response_and_data) {
|
|
338
|
+
return response_and_data.data;
|
|
339
|
+
});
|
|
340
|
+
}
|
|
300
341
|
}]);
|
|
301
342
|
}();
|
package/dist/api/LobbiesApi.js
CHANGED
|
@@ -7,6 +7,7 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _AdminCreateNotification400Response = _interopRequireDefault(require("../model/AdminCreateNotification400Response"));
|
|
9
9
|
var _CreateLobbyRequest = _interopRequireDefault(require("../model/CreateLobbyRequest"));
|
|
10
|
+
var _GetLobby200Response = _interopRequireDefault(require("../model/GetLobby200Response"));
|
|
10
11
|
var _KickUserRequest = _interopRequireDefault(require("../model/KickUserRequest"));
|
|
11
12
|
var _ListLobbies200Response = _interopRequireDefault(require("../model/ListLobbies200Response"));
|
|
12
13
|
var _ListLobbies200ResponseDataInner = _interopRequireDefault(require("../model/ListLobbies200ResponseDataInner"));
|
|
@@ -21,9 +22,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
21
22
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
23
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
23
24
|
* Game Server API
|
|
24
|
-
* API for Game Server
|
|
25
|
+
* API for the Gamend Game Server. Has authentication, users, lobbies, groups, parties, friends, chat, notifications, achievements, leaderboards, 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 ## **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 hooks**: `before_chat_message` pipeline hook for filtering/blocking ## **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
|
|
25
26
|
*
|
|
26
|
-
* The version of the OpenAPI document: 1.0.
|
|
27
|
+
* The version of the OpenAPI document: 1.0.790
|
|
27
28
|
*
|
|
28
29
|
*
|
|
29
30
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -87,6 +88,47 @@ var LobbiesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
87
88
|
});
|
|
88
89
|
}
|
|
89
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Get a single lobby
|
|
93
|
+
* Return details for a single lobby. Non-hidden lobbies can be viewed by anyone. Also returns the current member list.
|
|
94
|
+
* @param {Number} id Lobby ID
|
|
95
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetLobby200Response} and HTTP response
|
|
96
|
+
*/
|
|
97
|
+
}, {
|
|
98
|
+
key: "getLobbyWithHttpInfo",
|
|
99
|
+
value: function getLobbyWithHttpInfo(id) {
|
|
100
|
+
var postBody = null;
|
|
101
|
+
// verify the required parameter 'id' is set
|
|
102
|
+
if (id === undefined || id === null) {
|
|
103
|
+
throw new Error("Missing the required parameter 'id' when calling getLobby");
|
|
104
|
+
}
|
|
105
|
+
var pathParams = {
|
|
106
|
+
'id': id
|
|
107
|
+
};
|
|
108
|
+
var queryParams = {};
|
|
109
|
+
var headerParams = {};
|
|
110
|
+
var formParams = {};
|
|
111
|
+
var authNames = [];
|
|
112
|
+
var contentTypes = [];
|
|
113
|
+
var accepts = ['application/json'];
|
|
114
|
+
var returnType = _GetLobby200Response["default"];
|
|
115
|
+
return this.apiClient.callApi('/api/v1/lobbies/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Get a single lobby
|
|
120
|
+
* Return details for a single lobby. Non-hidden lobbies can be viewed by anyone. Also returns the current member list.
|
|
121
|
+
* @param {Number} id Lobby ID
|
|
122
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetLobby200Response}
|
|
123
|
+
*/
|
|
124
|
+
}, {
|
|
125
|
+
key: "getLobby",
|
|
126
|
+
value: function getLobby(id) {
|
|
127
|
+
return this.getLobbyWithHttpInfo(id).then(function (response_and_data) {
|
|
128
|
+
return response_and_data.data;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
90
132
|
/**
|
|
91
133
|
* Join a lobby
|
|
92
134
|
* Join an existing lobby. If the lobby requires a password, include it in the request body.
|
|
@@ -19,9 +19,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
19
19
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
20
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
21
21
|
* Game Server API
|
|
22
|
-
* API for Game Server
|
|
22
|
+
* API for the Gamend Game Server. Has authentication, users, lobbies, groups, parties, friends, chat, notifications, achievements, leaderboards, 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 ## **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 hooks**: `before_chat_message` pipeline hook for filtering/blocking ## **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
|
|
23
23
|
*
|
|
24
|
-
* The version of the OpenAPI document: 1.0.
|
|
24
|
+
* The version of the OpenAPI document: 1.0.790
|
|
25
25
|
*
|
|
26
26
|
*
|
|
27
27
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/api/PartiesApi.js
CHANGED
|
@@ -5,10 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _AcceptPartyInviteRequest = _interopRequireDefault(require("../model/AcceptPartyInviteRequest"));
|
|
8
9
|
var _AdminCreateNotification400Response = _interopRequireDefault(require("../model/AdminCreateNotification400Response"));
|
|
10
|
+
var _CancelPartyInviteRequest = _interopRequireDefault(require("../model/CancelPartyInviteRequest"));
|
|
9
11
|
var _CreatePartyRequest = _interopRequireDefault(require("../model/CreatePartyRequest"));
|
|
10
|
-
var
|
|
12
|
+
var _DeclinePartyInviteRequest = _interopRequireDefault(require("../model/DeclinePartyInviteRequest"));
|
|
13
|
+
var _InviteToPartyRequest = _interopRequireDefault(require("../model/InviteToPartyRequest"));
|
|
11
14
|
var _KickUserRequest = _interopRequireDefault(require("../model/KickUserRequest"));
|
|
15
|
+
var _ListPartyInvitations200ResponseInner = _interopRequireDefault(require("../model/ListPartyInvitations200ResponseInner"));
|
|
12
16
|
var _PartyCreateLobbyRequest = _interopRequireDefault(require("../model/PartyCreateLobbyRequest"));
|
|
13
17
|
var _PartyJoinLobbyRequest = _interopRequireDefault(require("../model/PartyJoinLobbyRequest"));
|
|
14
18
|
var _ShowParty200Response = _interopRequireDefault(require("../model/ShowParty200Response"));
|
|
@@ -21,9 +25,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
21
25
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
26
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
23
27
|
* Game Server API
|
|
24
|
-
* API for Game Server
|
|
28
|
+
* API for the Gamend Game Server. Has authentication, users, lobbies, groups, parties, friends, chat, notifications, achievements, leaderboards, 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 ## **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 hooks**: `before_chat_message` pipeline hook for filtering/blocking ## **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
|
|
25
29
|
*
|
|
26
|
-
* The version of the OpenAPI document: 1.0.
|
|
30
|
+
* The version of the OpenAPI document: 1.0.790
|
|
27
31
|
*
|
|
28
32
|
*
|
|
29
33
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -50,13 +54,89 @@ var PartiesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
50
54
|
}
|
|
51
55
|
|
|
52
56
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
57
|
+
* Accept a party invite
|
|
58
|
+
* Accept a pending party invite. The user joins the party if there is space. The PartyInvite record is marked as accepted.
|
|
55
59
|
* @param {Object} opts Optional parameters
|
|
56
|
-
* @param {module:model/
|
|
60
|
+
* @param {module:model/AcceptPartyInviteRequest} [acceptPartyInviteRequest] Accept parameters
|
|
57
61
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ShowParty200Response} and HTTP response
|
|
58
62
|
*/
|
|
59
63
|
return _createClass(PartiesApi, [{
|
|
64
|
+
key: "acceptPartyInviteWithHttpInfo",
|
|
65
|
+
value: function acceptPartyInviteWithHttpInfo(opts) {
|
|
66
|
+
opts = opts || {};
|
|
67
|
+
var postBody = opts['acceptPartyInviteRequest'];
|
|
68
|
+
var pathParams = {};
|
|
69
|
+
var queryParams = {};
|
|
70
|
+
var headerParams = {};
|
|
71
|
+
var formParams = {};
|
|
72
|
+
var authNames = ['authorization'];
|
|
73
|
+
var contentTypes = ['application/json'];
|
|
74
|
+
var accepts = ['application/json'];
|
|
75
|
+
var returnType = _ShowParty200Response["default"];
|
|
76
|
+
return this.apiClient.callApi('/api/v1/parties/invite/accept', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Accept a party invite
|
|
81
|
+
* Accept a pending party invite. The user joins the party if there is space. The PartyInvite record is marked as accepted.
|
|
82
|
+
* @param {Object} opts Optional parameters
|
|
83
|
+
* @param {module:model/AcceptPartyInviteRequest} opts.acceptPartyInviteRequest Accept parameters
|
|
84
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ShowParty200Response}
|
|
85
|
+
*/
|
|
86
|
+
}, {
|
|
87
|
+
key: "acceptPartyInvite",
|
|
88
|
+
value: function acceptPartyInvite(opts) {
|
|
89
|
+
return this.acceptPartyInviteWithHttpInfo(opts).then(function (response_and_data) {
|
|
90
|
+
return response_and_data.data;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Cancel a pending party invite (leader only)
|
|
96
|
+
* Cancel an outstanding invite sent to a user. Only the leader can cancel.
|
|
97
|
+
* @param {Object} opts Optional parameters
|
|
98
|
+
* @param {module:model/CancelPartyInviteRequest} [cancelPartyInviteRequest] Cancel parameters
|
|
99
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
|
|
100
|
+
*/
|
|
101
|
+
}, {
|
|
102
|
+
key: "cancelPartyInviteWithHttpInfo",
|
|
103
|
+
value: function cancelPartyInviteWithHttpInfo(opts) {
|
|
104
|
+
opts = opts || {};
|
|
105
|
+
var postBody = opts['cancelPartyInviteRequest'];
|
|
106
|
+
var pathParams = {};
|
|
107
|
+
var queryParams = {};
|
|
108
|
+
var headerParams = {};
|
|
109
|
+
var formParams = {};
|
|
110
|
+
var authNames = ['authorization'];
|
|
111
|
+
var contentTypes = ['application/json'];
|
|
112
|
+
var accepts = ['application/json'];
|
|
113
|
+
var returnType = Object;
|
|
114
|
+
return this.apiClient.callApi('/api/v1/parties/invite/cancel', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Cancel a pending party invite (leader only)
|
|
119
|
+
* Cancel an outstanding invite sent to a user. Only the leader can cancel.
|
|
120
|
+
* @param {Object} opts Optional parameters
|
|
121
|
+
* @param {module:model/CancelPartyInviteRequest} opts.cancelPartyInviteRequest Cancel parameters
|
|
122
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
|
|
123
|
+
*/
|
|
124
|
+
}, {
|
|
125
|
+
key: "cancelPartyInvite",
|
|
126
|
+
value: function cancelPartyInvite(opts) {
|
|
127
|
+
return this.cancelPartyInviteWithHttpInfo(opts).then(function (response_and_data) {
|
|
128
|
+
return response_and_data.data;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Create a party
|
|
134
|
+
* Create a new party. The authenticated user becomes the leader and first member. Cannot create a party while already in a party.
|
|
135
|
+
* @param {Object} opts Optional parameters
|
|
136
|
+
* @param {module:model/CreatePartyRequest} [createPartyRequest] Party creation parameters
|
|
137
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ShowParty200Response} and HTTP response
|
|
138
|
+
*/
|
|
139
|
+
}, {
|
|
60
140
|
key: "createPartyWithHttpInfo",
|
|
61
141
|
value: function createPartyWithHttpInfo(opts) {
|
|
62
142
|
opts = opts || {};
|
|
@@ -88,17 +168,17 @@ var PartiesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
88
168
|
}
|
|
89
169
|
|
|
90
170
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
171
|
+
* Decline a party invite
|
|
172
|
+
* Decline a pending party invite. The PartyInvite record is marked as declined.
|
|
93
173
|
* @param {Object} opts Optional parameters
|
|
94
|
-
* @param {module:model/
|
|
95
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link
|
|
174
|
+
* @param {module:model/DeclinePartyInviteRequest} [declinePartyInviteRequest] Decline parameters
|
|
175
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
|
|
96
176
|
*/
|
|
97
177
|
}, {
|
|
98
|
-
key: "
|
|
99
|
-
value: function
|
|
178
|
+
key: "declinePartyInviteWithHttpInfo",
|
|
179
|
+
value: function declinePartyInviteWithHttpInfo(opts) {
|
|
100
180
|
opts = opts || {};
|
|
101
|
-
var postBody = opts['
|
|
181
|
+
var postBody = opts['declinePartyInviteRequest'];
|
|
102
182
|
var pathParams = {};
|
|
103
183
|
var queryParams = {};
|
|
104
184
|
var headerParams = {};
|
|
@@ -106,21 +186,59 @@ var PartiesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
106
186
|
var authNames = ['authorization'];
|
|
107
187
|
var contentTypes = ['application/json'];
|
|
108
188
|
var accepts = ['application/json'];
|
|
109
|
-
var returnType =
|
|
110
|
-
return this.apiClient.callApi('/api/v1/parties/
|
|
189
|
+
var returnType = Object;
|
|
190
|
+
return this.apiClient.callApi('/api/v1/parties/invite/decline', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
111
191
|
}
|
|
112
192
|
|
|
113
193
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
194
|
+
* Decline a party invite
|
|
195
|
+
* Decline a pending party invite. The PartyInvite record is marked as declined.
|
|
116
196
|
* @param {Object} opts Optional parameters
|
|
117
|
-
* @param {module:model/
|
|
118
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link
|
|
197
|
+
* @param {module:model/DeclinePartyInviteRequest} opts.declinePartyInviteRequest Decline parameters
|
|
198
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
|
|
119
199
|
*/
|
|
120
200
|
}, {
|
|
121
|
-
key: "
|
|
122
|
-
value: function
|
|
123
|
-
return this.
|
|
201
|
+
key: "declinePartyInvite",
|
|
202
|
+
value: function declinePartyInvite(opts) {
|
|
203
|
+
return this.declinePartyInviteWithHttpInfo(opts).then(function (response_and_data) {
|
|
204
|
+
return response_and_data.data;
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Invite a user to the party (leader only)
|
|
210
|
+
* The party leader invites a user by ID. The target must be a friend of the leader or share at least one group with the leader. A PartyInvite record is created and an informational notification is sent. The invite is independent of notifications.
|
|
211
|
+
* @param {Object} opts Optional parameters
|
|
212
|
+
* @param {module:model/InviteToPartyRequest} [inviteToPartyRequest] Invite parameters
|
|
213
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
|
|
214
|
+
*/
|
|
215
|
+
}, {
|
|
216
|
+
key: "inviteToPartyWithHttpInfo",
|
|
217
|
+
value: function inviteToPartyWithHttpInfo(opts) {
|
|
218
|
+
opts = opts || {};
|
|
219
|
+
var postBody = opts['inviteToPartyRequest'];
|
|
220
|
+
var pathParams = {};
|
|
221
|
+
var queryParams = {};
|
|
222
|
+
var headerParams = {};
|
|
223
|
+
var formParams = {};
|
|
224
|
+
var authNames = ['authorization'];
|
|
225
|
+
var contentTypes = ['application/json'];
|
|
226
|
+
var accepts = ['application/json'];
|
|
227
|
+
var returnType = Object;
|
|
228
|
+
return this.apiClient.callApi('/api/v1/parties/invite', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Invite a user to the party (leader only)
|
|
233
|
+
* The party leader invites a user by ID. The target must be a friend of the leader or share at least one group with the leader. A PartyInvite record is created and an informational notification is sent. The invite is independent of notifications.
|
|
234
|
+
* @param {Object} opts Optional parameters
|
|
235
|
+
* @param {module:model/InviteToPartyRequest} opts.inviteToPartyRequest Invite parameters
|
|
236
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
|
|
237
|
+
*/
|
|
238
|
+
}, {
|
|
239
|
+
key: "inviteToParty",
|
|
240
|
+
value: function inviteToParty(opts) {
|
|
241
|
+
return this.inviteToPartyWithHttpInfo(opts).then(function (response_and_data) {
|
|
124
242
|
return response_and_data.data;
|
|
125
243
|
});
|
|
126
244
|
}
|
|
@@ -196,6 +314,72 @@ var PartiesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
196
314
|
});
|
|
197
315
|
}
|
|
198
316
|
|
|
317
|
+
/**
|
|
318
|
+
* List pending party invites for the current user
|
|
319
|
+
* Returns all pending PartyInvite records addressed to the authenticated user.
|
|
320
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/ListPartyInvitations200ResponseInner>} and HTTP response
|
|
321
|
+
*/
|
|
322
|
+
}, {
|
|
323
|
+
key: "listPartyInvitationsWithHttpInfo",
|
|
324
|
+
value: function listPartyInvitationsWithHttpInfo() {
|
|
325
|
+
var postBody = null;
|
|
326
|
+
var pathParams = {};
|
|
327
|
+
var queryParams = {};
|
|
328
|
+
var headerParams = {};
|
|
329
|
+
var formParams = {};
|
|
330
|
+
var authNames = ['authorization'];
|
|
331
|
+
var contentTypes = [];
|
|
332
|
+
var accepts = ['application/json'];
|
|
333
|
+
var returnType = [_ListPartyInvitations200ResponseInner["default"]];
|
|
334
|
+
return this.apiClient.callApi('/api/v1/parties/invitations', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* List pending party invites for the current user
|
|
339
|
+
* Returns all pending PartyInvite records addressed to the authenticated user.
|
|
340
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/ListPartyInvitations200ResponseInner>}
|
|
341
|
+
*/
|
|
342
|
+
}, {
|
|
343
|
+
key: "listPartyInvitations",
|
|
344
|
+
value: function listPartyInvitations() {
|
|
345
|
+
return this.listPartyInvitationsWithHttpInfo().then(function (response_and_data) {
|
|
346
|
+
return response_and_data.data;
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* List pending party invites sent by the current leader
|
|
352
|
+
* Returns all pending PartyInvite records the authenticated leader has sent that have not yet been accepted or declined.
|
|
353
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/ListPartyInvitations200ResponseInner>} and HTTP response
|
|
354
|
+
*/
|
|
355
|
+
}, {
|
|
356
|
+
key: "listSentPartyInvitationsWithHttpInfo",
|
|
357
|
+
value: function listSentPartyInvitationsWithHttpInfo() {
|
|
358
|
+
var postBody = null;
|
|
359
|
+
var pathParams = {};
|
|
360
|
+
var queryParams = {};
|
|
361
|
+
var headerParams = {};
|
|
362
|
+
var formParams = {};
|
|
363
|
+
var authNames = ['authorization'];
|
|
364
|
+
var contentTypes = [];
|
|
365
|
+
var accepts = ['application/json'];
|
|
366
|
+
var returnType = [_ListPartyInvitations200ResponseInner["default"]];
|
|
367
|
+
return this.apiClient.callApi('/api/v1/parties/invitations/sent', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* List pending party invites sent by the current leader
|
|
372
|
+
* Returns all pending PartyInvite records the authenticated leader has sent that have not yet been accepted or declined.
|
|
373
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/ListPartyInvitations200ResponseInner>}
|
|
374
|
+
*/
|
|
375
|
+
}, {
|
|
376
|
+
key: "listSentPartyInvitations",
|
|
377
|
+
value: function listSentPartyInvitations() {
|
|
378
|
+
return this.listSentPartyInvitationsWithHttpInfo().then(function (response_and_data) {
|
|
379
|
+
return response_and_data.data;
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
|
|
199
383
|
/**
|
|
200
384
|
* Create a lobby with the party (leader only)
|
|
201
385
|
* The party leader creates a new lobby and all party members join it atomically. The party is kept intact. No party member may already be in a lobby. The lobby must have enough capacity for all party members.
|
package/dist/api/UsersApi.js
CHANGED
|
@@ -20,9 +20,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
20
20
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
21
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
22
22
|
* Game Server API
|
|
23
|
-
* API for Game Server
|
|
23
|
+
* API for the Gamend Game Server. Has authentication, users, lobbies, groups, parties, friends, chat, notifications, achievements, leaderboards, 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 ## **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 hooks**: `before_chat_message` pipeline hook for filtering/blocking ## **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
|
|
24
24
|
*
|
|
25
|
-
* The version of the OpenAPI document: 1.0.
|
|
25
|
+
* The version of the OpenAPI document: 1.0.790
|
|
26
26
|
*
|
|
27
27
|
*
|
|
28
28
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|