@ughuuu/game_server 1.0.381 → 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.
Files changed (179) hide show
  1. package/README.md +109 -24
  2. package/dist/ApiClient.js +2 -2
  3. package/dist/api/AchievementsApi.js +224 -0
  4. package/dist/api/AdminAchievementsApi.js +356 -0
  5. package/dist/api/AdminChatApi.js +2 -2
  6. package/dist/api/AdminGroupsApi.js +2 -2
  7. package/dist/api/AdminKVApi.js +2 -2
  8. package/dist/api/AdminLeaderboardsApi.js +2 -2
  9. package/dist/api/AdminLobbiesApi.js +2 -2
  10. package/dist/api/AdminNotificationsApi.js +2 -2
  11. package/dist/api/AdminSessionsApi.js +2 -2
  12. package/dist/api/AdminUsersApi.js +2 -2
  13. package/dist/api/AuthenticationApi.js +2 -2
  14. package/dist/api/ChatApi.js +141 -12
  15. package/dist/api/FriendsApi.js +2 -2
  16. package/dist/api/GroupsApi.js +69 -27
  17. package/dist/api/HealthApi.js +2 -2
  18. package/dist/api/HooksApi.js +2 -2
  19. package/dist/api/KVApi.js +2 -2
  20. package/dist/api/LeaderboardsApi.js +43 -2
  21. package/dist/api/LobbiesApi.js +44 -2
  22. package/dist/api/NotificationsApi.js +2 -2
  23. package/dist/api/PartiesApi.js +206 -22
  24. package/dist/api/UsersApi.js +2 -2
  25. package/dist/index.js +183 -10
  26. package/dist/model/AcceptPartyInviteRequest.js +109 -0
  27. package/dist/model/AdminCreateAchievementRequest.js +182 -0
  28. package/dist/model/AdminCreateKvEntry200Response.js +2 -2
  29. package/dist/model/AdminCreateKvEntryRequest.js +2 -2
  30. package/dist/model/AdminCreateLeaderboardRequest.js +2 -2
  31. package/dist/model/AdminCreateNotification400Response.js +2 -2
  32. package/dist/model/AdminCreateNotificationRequest.js +2 -2
  33. package/dist/model/AdminDeleteChatConversation200Response.js +2 -2
  34. package/dist/model/AdminEndLeaderboard200Response.js +2 -2
  35. package/dist/model/AdminEndLeaderboard200ResponseData.js +2 -2
  36. package/dist/model/AdminIncrementAchievementRequest.js +130 -0
  37. package/dist/model/AdminListAchievements200Response.js +118 -0
  38. package/dist/model/AdminListChatMessages200Response.js +2 -2
  39. package/dist/model/AdminListChatMessages200ResponseDataInner.js +20 -3
  40. package/dist/model/AdminListGroups200Response.js +2 -2
  41. package/dist/model/AdminListKvEntries200Response.js +2 -2
  42. package/dist/model/AdminListKvEntries200ResponseDataInner.js +2 -2
  43. package/dist/model/AdminListLobbies200Response.js +2 -2
  44. package/dist/model/AdminListLobbies200ResponseDataInner.js +32 -2
  45. package/dist/model/AdminListNotifications200Response.js +2 -2
  46. package/dist/model/AdminListNotifications200ResponseDataInner.js +15 -2
  47. package/dist/model/AdminListNotifications200ResponseMeta.js +2 -2
  48. package/dist/model/AdminListSessions200Response.js +2 -2
  49. package/dist/model/AdminListSessions200ResponseDataInner.js +2 -2
  50. package/dist/model/AdminRevokeAchievementRequest.js +118 -0
  51. package/dist/model/AdminSubmitLeaderboardScore200Response.js +2 -2
  52. package/dist/model/AdminSubmitLeaderboardScore200ResponseData.js +14 -2
  53. package/dist/model/AdminSubmitLeaderboardScoreRequest.js +20 -8
  54. package/dist/model/AdminUnlockAchievementRequest.js +122 -0
  55. package/dist/model/AdminUpdateAchievement200Response.js +181 -0
  56. package/dist/model/AdminUpdateAchievementRequest.js +145 -0
  57. package/dist/model/AdminUpdateGroup200Response.js +23 -2
  58. package/dist/model/AdminUpdateGroupRequest.js +11 -2
  59. package/dist/model/AdminUpdateKvEntryRequest.js +2 -2
  60. package/dist/model/AdminUpdateLeaderboardRecordRequest.js +2 -2
  61. package/dist/model/AdminUpdateLeaderboardRequest.js +2 -2
  62. package/dist/model/AdminUpdateLobby200Response.js +2 -2
  63. package/dist/model/AdminUpdateLobbyRequest.js +11 -2
  64. package/dist/model/AdminUpdateUser200Response.js +2 -2
  65. package/dist/model/AdminUpdateUser200ResponseData.js +2 -2
  66. package/dist/model/AdminUpdateUserRequest.js +2 -2
  67. package/dist/model/CallHook200Response.js +2 -2
  68. package/dist/model/CallHookRequest.js +2 -2
  69. package/dist/model/CancelGroupInvite200Response.js +2 -2
  70. package/dist/model/CancelJoinRequest200Response.js +2 -2
  71. package/dist/model/CancelPartyInviteRequest.js +109 -0
  72. package/dist/model/ChatUnreadCount200Response.js +2 -2
  73. package/dist/model/CreateFriendRequestRequest.js +2 -2
  74. package/dist/model/CreateGroupRequest.js +11 -2
  75. package/dist/model/CreateLobbyRequest.js +11 -2
  76. package/dist/model/CreatePartyRequest.js +2 -2
  77. package/dist/model/DeclinePartyInviteRequest.js +109 -0
  78. package/dist/model/DeleteNotifications200Response.js +2 -2
  79. package/dist/model/DeleteNotificationsRequest.js +2 -2
  80. package/dist/model/DemoteGroupMemberRequest.js +2 -2
  81. package/dist/model/DeviceLoginRequest.js +2 -2
  82. package/dist/model/ErrorResponse.js +2 -2
  83. package/dist/model/GetChatMessage200Response.js +196 -0
  84. package/dist/model/GetCurrentUser200Response.js +2 -2
  85. package/dist/model/GetCurrentUser200ResponseLinkedProviders.js +2 -2
  86. package/dist/model/GetKv200Response.js +2 -2
  87. package/dist/model/GetLobby200Response.js +133 -0
  88. package/dist/model/GetLobby200ResponseMembersInner.js +146 -0
  89. package/dist/model/GetMyRecord200Response.js +2 -2
  90. package/dist/model/HealthResponse.js +2 -2
  91. package/dist/model/InviteToGroup200Response.js +90 -0
  92. package/dist/model/InviteToGroupRequest.js +2 -2
  93. package/dist/model/InviteToPartyRequest.js +109 -0
  94. package/dist/model/KickGroupMemberRequest.js +2 -2
  95. package/dist/model/KickUserRequest.js +2 -2
  96. package/dist/model/LinkDeviceRequest.js +2 -2
  97. package/dist/model/ListBlockedFriends200Response.js +2 -2
  98. package/dist/model/ListBlockedFriends200ResponseDataInner.js +2 -2
  99. package/dist/model/ListBlockedFriends200ResponseDataInnerRequester.js +2 -2
  100. package/dist/model/ListChatMessages200Response.js +6 -6
  101. package/dist/model/ListFriendRequests200Response.js +2 -2
  102. package/dist/model/ListFriendRequests200ResponseIncomingInner.js +2 -2
  103. package/dist/model/ListFriendRequests200ResponseIncomingInnerRequester.js +11 -2
  104. package/dist/model/ListFriendRequests200ResponseMeta.js +2 -2
  105. package/dist/model/ListFriends200Response.js +2 -2
  106. package/dist/model/ListFriends200ResponseDataInner.js +11 -2
  107. package/dist/model/ListGroupInvitations200Response.js +2 -2
  108. package/dist/model/ListGroupInvitations200ResponseDataInner.js +48 -3
  109. package/dist/model/ListGroupMembers200Response.js +2 -2
  110. package/dist/model/ListGroupMembers200ResponseDataInner.js +2 -2
  111. package/dist/model/ListJoinRequests200Response.js +2 -2
  112. package/dist/model/ListLeaderboardRecords200Response.js +2 -2
  113. package/dist/model/ListLeaderboardRecords200ResponseDataInner.js +4 -4
  114. package/dist/model/ListLeaderboards200Response.js +2 -2
  115. package/dist/model/ListLeaderboards200ResponseDataInner.js +2 -2
  116. package/dist/model/ListLobbies200Response.js +2 -2
  117. package/dist/model/ListLobbies200ResponseDataInner.js +24 -2
  118. package/dist/model/ListMyGroups200Response.js +2 -2
  119. package/dist/model/ListMyGroups200ResponseDataInner.js +24 -2
  120. package/dist/model/ListNotifications200Response.js +2 -2
  121. package/dist/model/ListNotifications200ResponseDataInner.js +15 -2
  122. package/dist/model/ListPartyInvitations200ResponseInner.js +155 -0
  123. package/dist/model/ListRecordsAroundUser200Response.js +2 -2
  124. package/dist/model/ListSentInvitations200Response.js +2 -2
  125. package/dist/model/ListSentInvitations200ResponseDataInner.js +26 -2
  126. package/dist/model/Login200Response.js +2 -2
  127. package/dist/model/Login200ResponseData.js +15 -2
  128. package/dist/model/LoginRequest.js +2 -2
  129. package/dist/model/MarkChatReadRequest.js +8 -3
  130. package/dist/model/NotifyGroup200Response.js +2 -2
  131. package/dist/model/NotifyGroupRequest.js +3 -3
  132. package/dist/model/OAuthSessionData.js +15 -2
  133. package/dist/model/OAuthSessionDataDetails.js +2 -2
  134. package/dist/model/OAuthSessionStatus.js +2 -2
  135. package/dist/model/OauthApiCallback200Response.js +2 -2
  136. package/dist/model/OauthApiCallbackRequest.js +2 -2
  137. package/dist/model/OauthCallbackApiAppleIosRequest.js +2 -2
  138. package/dist/model/OauthGoogleIdTokenRequest.js +2 -2
  139. package/dist/model/OauthRequest200Response.js +2 -2
  140. package/dist/model/OauthSessionStatus404Response.js +2 -2
  141. package/dist/model/PartyCreateLobbyRequest.js +2 -2
  142. package/dist/model/PartyJoinLobbyRequest.js +2 -2
  143. package/dist/model/PromoteGroupMemberRequest.js +2 -2
  144. package/dist/model/QuickJoinRequest.js +2 -2
  145. package/dist/model/RefreshToken200Response.js +2 -2
  146. package/dist/model/RefreshToken200ResponseData.js +15 -2
  147. package/dist/model/RefreshTokenRequest.js +2 -2
  148. package/dist/model/ResolveLeaderboardSlugs200Response.js +89 -0
  149. package/dist/model/ResolveLeaderboardSlugsRequest.js +113 -0
  150. package/dist/model/SearchUsers200Response.js +2 -2
  151. package/dist/model/SearchUsers200ResponseDataInner.js +11 -2
  152. package/dist/model/SendChatMessageRequest.js +10 -5
  153. package/dist/model/SendNotificationRequest.js +2 -2
  154. package/dist/model/ShowParty200Response.js +13 -13
  155. package/dist/model/ShowParty200ResponseMembersInner.js +11 -2
  156. package/dist/model/UpdateChatMessageRequest.js +99 -0
  157. package/dist/model/UpdateCurrentUserDisplayNameRequest.js +2 -2
  158. package/dist/model/UpdateCurrentUserPassword400Response.js +2 -2
  159. package/dist/model/UpdateCurrentUserPasswordRequest.js +2 -2
  160. package/dist/model/UpdateGroupRequest.js +11 -2
  161. package/dist/model/UpdateLobbyRequest.js +11 -2
  162. package/dist/model/UpdatePartyRequest.js +2 -2
  163. package/dist/model/UserAchievements200Response.js +124 -0
  164. package/dist/model/UserAchievements200ResponseDataInner.js +192 -0
  165. package/dist/realtime.js +247 -0
  166. package/dist/webrtc.js +375 -0
  167. package/package.json +15 -4
  168. package/dist/model/CreateLobby401Response.js +0 -89
  169. package/dist/model/JoinLobby200Response.js +0 -89
  170. package/dist/model/JoinLobbyRequest.js +0 -90
  171. package/dist/model/JoinPartyByCodeRequest.js +0 -113
  172. package/dist/model/KickUser200Response.js +0 -89
  173. package/dist/model/LeaveLobby200Response.js +0 -89
  174. package/dist/model/ListChatMessages200ResponseDataInner.js +0 -170
  175. package/dist/model/ListLeaderboardRecords200ResponseMeta.js +0 -125
  176. package/dist/model/ListLobbies200ResponseInner.js +0 -153
  177. package/dist/model/ListLobbies200ResponseMeta.js +0 -125
  178. package/dist/model/Login200ResponseDataUser.js +0 -97
  179. package/dist/model/RemoveFriendship401Response.js +0 -89
@@ -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 application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### 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 ### Using Tokens Include the access token in the Authorization header: ``` Authorization: Bearer <access_token> ``` ### Refreshing Tokens When your access token expires, use POST `/api/v1/refresh` with your refresh token to get a new access token. ## 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 ## 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 ## 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 ## 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
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.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).
@@ -28,9 +28,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
28
28
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
29
29
  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); } /**
30
30
  * Game Server API
31
- * API for Game Server application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### 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 ### Using Tokens Include the access token in the Authorization header: ``` Authorization: Bearer <access_token> ``` ### Refreshing Tokens When your access token expires, use POST `/api/v1/refresh` with your refresh token to get a new access token. ## 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 ## 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 ## 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 ## 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
31
+ * 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
32
32
  *
33
- * The version of the OpenAPI document: 1.0.0
33
+ * The version of the OpenAPI document: 1.0.790
34
34
  *
35
35
  *
36
36
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -6,10 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _ChatUnreadCount200Response = _interopRequireDefault(require("../model/ChatUnreadCount200Response"));
9
+ var _GetChatMessage200Response = _interopRequireDefault(require("../model/GetChatMessage200Response"));
9
10
  var _ListChatMessages200Response = _interopRequireDefault(require("../model/ListChatMessages200Response"));
10
- var _ListChatMessages200ResponseDataInner = _interopRequireDefault(require("../model/ListChatMessages200ResponseDataInner"));
11
11
  var _MarkChatReadRequest = _interopRequireDefault(require("../model/MarkChatReadRequest"));
12
12
  var _SendChatMessageRequest = _interopRequireDefault(require("../model/SendChatMessageRequest"));
13
+ var _UpdateChatMessageRequest = _interopRequireDefault(require("../model/UpdateChatMessageRequest"));
13
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
14
15
  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
16
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -18,9 +19,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
18
19
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
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); } /**
20
21
  * Game Server API
21
- * API for Game Server application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### 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 ### Using Tokens Include the access token in the Authorization header: ``` Authorization: Bearer <access_token> ``` ### Refreshing Tokens When your access token expires, use POST `/api/v1/refresh` with your refresh token to get a new access token. ## 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 ## 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 ## 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 ## 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
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
22
23
  *
23
- * The version of the OpenAPI document: 1.0.0
24
+ * The version of the OpenAPI document: 1.0.790
24
25
  *
25
26
  *
26
27
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -94,11 +95,93 @@ var ChatApi = exports["default"] = /*#__PURE__*/function () {
94
95
  });
95
96
  }
96
97
 
98
+ /**
99
+ * Delete your own chat message
100
+ * Permanently delete a message you sent. Only the sender can delete their own message.
101
+ * @param {Number} id Message ID
102
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
103
+ */
104
+ }, {
105
+ key: "deleteChatMessageWithHttpInfo",
106
+ value: function deleteChatMessageWithHttpInfo(id) {
107
+ var postBody = null;
108
+ // verify the required parameter 'id' is set
109
+ if (id === undefined || id === null) {
110
+ throw new Error("Missing the required parameter 'id' when calling deleteChatMessage");
111
+ }
112
+ var pathParams = {
113
+ 'id': id
114
+ };
115
+ var queryParams = {};
116
+ var headerParams = {};
117
+ var formParams = {};
118
+ var authNames = [];
119
+ var contentTypes = [];
120
+ var accepts = ['application/json'];
121
+ var returnType = Object;
122
+ return this.apiClient.callApi('/api/v1/chat/messages/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
123
+ }
124
+
125
+ /**
126
+ * Delete your own chat message
127
+ * Permanently delete a message you sent. Only the sender can delete their own message.
128
+ * @param {Number} id Message ID
129
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
130
+ */
131
+ }, {
132
+ key: "deleteChatMessage",
133
+ value: function deleteChatMessage(id) {
134
+ return this.deleteChatMessageWithHttpInfo(id).then(function (response_and_data) {
135
+ return response_and_data.data;
136
+ });
137
+ }
138
+
139
+ /**
140
+ * Get a single chat message
141
+ * Retrieve a single chat message by ID. Useful for refreshing a message after an update notification.
142
+ * @param {Number} id Message ID
143
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetChatMessage200Response} and HTTP response
144
+ */
145
+ }, {
146
+ key: "getChatMessageWithHttpInfo",
147
+ value: function getChatMessageWithHttpInfo(id) {
148
+ var postBody = null;
149
+ // verify the required parameter 'id' is set
150
+ if (id === undefined || id === null) {
151
+ throw new Error("Missing the required parameter 'id' when calling getChatMessage");
152
+ }
153
+ var pathParams = {
154
+ 'id': id
155
+ };
156
+ var queryParams = {};
157
+ var headerParams = {};
158
+ var formParams = {};
159
+ var authNames = [];
160
+ var contentTypes = [];
161
+ var accepts = ['application/json'];
162
+ var returnType = _GetChatMessage200Response["default"];
163
+ return this.apiClient.callApi('/api/v1/chat/messages/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
164
+ }
165
+
166
+ /**
167
+ * Get a single chat message
168
+ * Retrieve a single chat message by ID. Useful for refreshing a message after an update notification.
169
+ * @param {Number} id Message ID
170
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetChatMessage200Response}
171
+ */
172
+ }, {
173
+ key: "getChatMessage",
174
+ value: function getChatMessage(id) {
175
+ return this.getChatMessageWithHttpInfo(id).then(function (response_and_data) {
176
+ return response_and_data.data;
177
+ });
178
+ }
179
+
97
180
  /**
98
181
  * List chat messages
99
- * List messages for a lobby, group, or friend conversation. Paginated, newest first.
182
+ * List messages for a lobby, group, party, or friend conversation. Paginated, newest first.
100
183
  * @param {module:model/String} chatType Type of chat
101
- * @param {Number} chatRefId Reference ID (lobby_id, group_id, or friend user_id)
184
+ * @param {Number} chatRefId Reference ID (lobby_id, group_id, party_id, or friend user_id)
102
185
  * @param {Object} opts Optional parameters
103
186
  * @param {Number} [page = 1)] Page number
104
187
  * @param {Number} [pageSize = 25)] Items per page (max 100)
@@ -135,9 +218,9 @@ var ChatApi = exports["default"] = /*#__PURE__*/function () {
135
218
 
136
219
  /**
137
220
  * List chat messages
138
- * List messages for a lobby, group, or friend conversation. Paginated, newest first.
221
+ * List messages for a lobby, group, party, or friend conversation. Paginated, newest first.
139
222
  * @param {module:model/String} chatType Type of chat
140
- * @param {Number} chatRefId Reference ID (lobby_id, group_id, or friend user_id)
223
+ * @param {Number} chatRefId Reference ID (lobby_id, group_id, party_id, or friend user_id)
141
224
  * @param {Object} opts Optional parameters
142
225
  * @param {Number} opts.page Page number (default to 1)
143
226
  * @param {Number} opts.pageSize Items per page (max 100) (default to 25)
@@ -191,10 +274,10 @@ var ChatApi = exports["default"] = /*#__PURE__*/function () {
191
274
 
192
275
  /**
193
276
  * Send a chat message
194
- * Send a message to a lobby, group, or friend conversation. Requires authentication and membership/friendship.
277
+ * Send a message to a lobby, group, party, or friend conversation. Requires authentication and membership/friendship.
195
278
  * @param {Object} opts Optional parameters
196
279
  * @param {module:model/SendChatMessageRequest} [sendChatMessageRequest] Chat message
197
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListChatMessages200ResponseDataInner} and HTTP response
280
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetChatMessage200Response} and HTTP response
198
281
  */
199
282
  }, {
200
283
  key: "sendChatMessageWithHttpInfo",
@@ -208,16 +291,16 @@ var ChatApi = exports["default"] = /*#__PURE__*/function () {
208
291
  var authNames = [];
209
292
  var contentTypes = ['application/json'];
210
293
  var accepts = ['application/json'];
211
- var returnType = _ListChatMessages200ResponseDataInner["default"];
294
+ var returnType = _GetChatMessage200Response["default"];
212
295
  return this.apiClient.callApi('/api/v1/chat/messages', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
213
296
  }
214
297
 
215
298
  /**
216
299
  * Send a chat message
217
- * Send a message to a lobby, group, or friend conversation. Requires authentication and membership/friendship.
300
+ * Send a message to a lobby, group, party, or friend conversation. Requires authentication and membership/friendship.
218
301
  * @param {Object} opts Optional parameters
219
302
  * @param {module:model/SendChatMessageRequest} opts.sendChatMessageRequest Chat message
220
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListChatMessages200ResponseDataInner}
303
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetChatMessage200Response}
221
304
  */
222
305
  }, {
223
306
  key: "sendChatMessage",
@@ -226,5 +309,51 @@ var ChatApi = exports["default"] = /*#__PURE__*/function () {
226
309
  return response_and_data.data;
227
310
  });
228
311
  }
312
+
313
+ /**
314
+ * Update your own chat message
315
+ * Edit the content or metadata of a message you sent. Only the sender can update their own message.
316
+ * @param {Number} id Message ID
317
+ * @param {Object} opts Optional parameters
318
+ * @param {module:model/UpdateChatMessageRequest} [updateChatMessageRequest] Message update
319
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetChatMessage200Response} and HTTP response
320
+ */
321
+ }, {
322
+ key: "updateChatMessageWithHttpInfo",
323
+ value: function updateChatMessageWithHttpInfo(id, opts) {
324
+ opts = opts || {};
325
+ var postBody = opts['updateChatMessageRequest'];
326
+ // verify the required parameter 'id' is set
327
+ if (id === undefined || id === null) {
328
+ throw new Error("Missing the required parameter 'id' when calling updateChatMessage");
329
+ }
330
+ var pathParams = {
331
+ 'id': id
332
+ };
333
+ var queryParams = {};
334
+ var headerParams = {};
335
+ var formParams = {};
336
+ var authNames = [];
337
+ var contentTypes = ['application/json'];
338
+ var accepts = ['application/json'];
339
+ var returnType = _GetChatMessage200Response["default"];
340
+ return this.apiClient.callApi('/api/v1/chat/messages/{id}', 'PATCH', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
341
+ }
342
+
343
+ /**
344
+ * Update your own chat message
345
+ * Edit the content or metadata of a message you sent. Only the sender can update their own message.
346
+ * @param {Number} id Message ID
347
+ * @param {Object} opts Optional parameters
348
+ * @param {module:model/UpdateChatMessageRequest} opts.updateChatMessageRequest Message update
349
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetChatMessage200Response}
350
+ */
351
+ }, {
352
+ key: "updateChatMessage",
353
+ value: function updateChatMessage(id, opts) {
354
+ return this.updateChatMessageWithHttpInfo(id, opts).then(function (response_and_data) {
355
+ return response_and_data.data;
356
+ });
357
+ }
229
358
  }]);
230
359
  }();
@@ -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 application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### 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 ### Using Tokens Include the access token in the Authorization header: ``` Authorization: Bearer <access_token> ``` ### Refreshing Tokens When your access token expires, use POST `/api/v1/refresh` with your refresh token to get a new access token. ## 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 ## 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 ## 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 ## 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
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.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).
@@ -10,6 +10,7 @@ var _CancelGroupInvite200Response = _interopRequireDefault(require("../model/Can
10
10
  var _CancelJoinRequest200Response = _interopRequireDefault(require("../model/CancelJoinRequest200Response"));
11
11
  var _CreateGroupRequest = _interopRequireDefault(require("../model/CreateGroupRequest"));
12
12
  var _DemoteGroupMemberRequest = _interopRequireDefault(require("../model/DemoteGroupMemberRequest"));
13
+ var _InviteToGroup200Response = _interopRequireDefault(require("../model/InviteToGroup200Response"));
13
14
  var _InviteToGroupRequest = _interopRequireDefault(require("../model/InviteToGroupRequest"));
14
15
  var _KickGroupMemberRequest = _interopRequireDefault(require("../model/KickGroupMemberRequest"));
15
16
  var _ListGroupInvitations200Response = _interopRequireDefault(require("../model/ListGroupInvitations200Response"));
@@ -31,9 +32,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
31
32
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
32
33
  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); } /**
33
34
  * Game Server API
34
- * API for Game Server application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### 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 ### Using Tokens Include the access token in the Authorization header: ``` Authorization: Bearer <access_token> ``` ### Refreshing Tokens When your access token expires, use POST `/api/v1/refresh` with your refresh token to get a new access token. ## 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 ## 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 ## 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 ## 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
35
+ * 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
35
36
  *
36
- * The version of the OpenAPI document: 1.0.0
37
+ * The version of the OpenAPI document: 1.0.790
37
38
  *
38
39
  *
39
40
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -61,20 +62,20 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
61
62
 
62
63
  /**
63
64
  * Accept a group invitation
64
- * Accept an invitation to join a hidden group.
65
- * @param {Number} id Group ID
65
+ * Accept a pending group invitation by invite ID. The authenticated user must be the recipient of the invite.
66
+ * @param {Number} inviteId Invite ID (from the invitations list)
66
67
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListGroupMembers200ResponseDataInner} and HTTP response
67
68
  */
68
69
  return _createClass(GroupsApi, [{
69
70
  key: "acceptGroupInviteWithHttpInfo",
70
- value: function acceptGroupInviteWithHttpInfo(id) {
71
+ value: function acceptGroupInviteWithHttpInfo(inviteId) {
71
72
  var postBody = null;
72
- // verify the required parameter 'id' is set
73
- if (id === undefined || id === null) {
74
- throw new Error("Missing the required parameter 'id' when calling acceptGroupInvite");
73
+ // verify the required parameter 'inviteId' is set
74
+ if (inviteId === undefined || inviteId === null) {
75
+ throw new Error("Missing the required parameter 'inviteId' when calling acceptGroupInvite");
75
76
  }
76
77
  var pathParams = {
77
- 'id': id
78
+ 'invite_id': inviteId
78
79
  };
79
80
  var queryParams = {};
80
81
  var headerParams = {};
@@ -83,19 +84,19 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
83
84
  var contentTypes = [];
84
85
  var accepts = ['application/json'];
85
86
  var returnType = _ListGroupMembers200ResponseDataInner["default"];
86
- return this.apiClient.callApi('/api/v1/groups/{id}/accept_invite', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
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
 
89
90
  /**
90
91
  * Accept a group invitation
91
- * Accept an invitation to join a hidden group.
92
- * @param {Number} id Group ID
92
+ * Accept a pending group invitation by invite ID. The authenticated user must be the recipient of the invite.
93
+ * @param {Number} inviteId Invite ID (from the invitations list)
93
94
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListGroupMembers200ResponseDataInner}
94
95
  */
95
96
  }, {
96
97
  key: "acceptGroupInvite",
97
- value: function acceptGroupInvite(id) {
98
- return this.acceptGroupInviteWithHttpInfo(id).then(function (response_and_data) {
98
+ value: function acceptGroupInvite(inviteId) {
99
+ return this.acceptGroupInviteWithHttpInfo(inviteId).then(function (response_and_data) {
99
100
  return response_and_data.data;
100
101
  });
101
102
  }
@@ -151,7 +152,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
151
152
  /**
152
153
  * Cancel a sent group invitation
153
154
  * Cancel (delete) a group invitation that the authenticated user sent.
154
- * @param {Number} inviteId Notification ID of the invitation to cancel
155
+ * @param {Number} inviteId ID of the GroupInvite to cancel
155
156
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CancelGroupInvite200Response} and HTTP response
156
157
  */
157
158
  }, {
@@ -178,7 +179,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
178
179
  /**
179
180
  * Cancel a sent group invitation
180
181
  * Cancel (delete) a group invitation that the authenticated user sent.
181
- * @param {Number} inviteId Notification ID of the invitation to cancel
182
+ * @param {Number} inviteId ID of the GroupInvite to cancel
182
183
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CancelGroupInvite200Response}
183
184
  */
184
185
  }, {
@@ -275,6 +276,47 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
275
276
  });
276
277
  }
277
278
 
279
+ /**
280
+ * Decline a group invitation
281
+ * Decline a pending group invitation by invite ID. Only the recipient can decline. The invite is marked as declined (not deleted).
282
+ * @param {Number} inviteId Invite ID (from the invitations list)
283
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CancelGroupInvite200Response} and HTTP response
284
+ */
285
+ }, {
286
+ key: "declineGroupInviteWithHttpInfo",
287
+ value: function declineGroupInviteWithHttpInfo(inviteId) {
288
+ var postBody = null;
289
+ // verify the required parameter 'inviteId' is set
290
+ if (inviteId === undefined || inviteId === null) {
291
+ throw new Error("Missing the required parameter 'inviteId' when calling declineGroupInvite");
292
+ }
293
+ var pathParams = {
294
+ 'invite_id': inviteId
295
+ };
296
+ var queryParams = {};
297
+ var headerParams = {};
298
+ var formParams = {};
299
+ var authNames = ['authorization'];
300
+ var contentTypes = [];
301
+ var accepts = ['application/json'];
302
+ var returnType = _CancelGroupInvite200Response["default"];
303
+ return this.apiClient.callApi('/api/v1/groups/invitations/{invite_id}/decline', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
304
+ }
305
+
306
+ /**
307
+ * Decline a group invitation
308
+ * Decline a pending group invitation by invite ID. Only the recipient can decline. The invite is marked as declined (not deleted).
309
+ * @param {Number} inviteId Invite ID (from the invitations list)
310
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CancelGroupInvite200Response}
311
+ */
312
+ }, {
313
+ key: "declineGroupInvite",
314
+ value: function declineGroupInvite(inviteId) {
315
+ return this.declineGroupInviteWithHttpInfo(inviteId).then(function (response_and_data) {
316
+ return response_and_data.data;
317
+ });
318
+ }
319
+
278
320
  /**
279
321
  * Demote admin to member
280
322
  * Demote an admin to regular member. Only admins can demote.
@@ -363,12 +405,12 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
363
405
  }
364
406
 
365
407
  /**
366
- * Invite a user to a hidden group (admin only)
367
- * Send an invitation notification to a user for a hidden group. The user can then accept it.
408
+ * Invite a user to a group (admin only)
409
+ * Send an invitation to a user for a group. Creates a GroupInvite record and sends an informational notification. The invite is independent of notifications. If the target user already has a pending join request for this group, the request is automatically approved instead of creating an invite (status: \"request_approved\").
368
410
  * @param {Number} id Group ID
369
411
  * @param {Object} opts Optional parameters
370
412
  * @param {module:model/InviteToGroupRequest} [inviteToGroupRequest] Invite parameters
371
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
413
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InviteToGroup200Response} and HTTP response
372
414
  */
373
415
  }, {
374
416
  key: "inviteToGroupWithHttpInfo",
@@ -388,17 +430,17 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
388
430
  var authNames = ['authorization'];
389
431
  var contentTypes = ['application/json'];
390
432
  var accepts = ['application/json'];
391
- var returnType = Object;
433
+ var returnType = _InviteToGroup200Response["default"];
392
434
  return this.apiClient.callApi('/api/v1/groups/{id}/invite', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
393
435
  }
394
436
 
395
437
  /**
396
- * Invite a user to a hidden group (admin only)
397
- * Send an invitation notification to a user for a hidden group. The user can then accept it.
438
+ * Invite a user to a group (admin only)
439
+ * Send an invitation to a user for a group. Creates a GroupInvite record and sends an informational notification. The invite is independent of notifications. If the target user already has a pending join request for this group, the request is automatically approved instead of creating an invite (status: \"request_approved\").
398
440
  * @param {Number} id Group ID
399
441
  * @param {Object} opts Optional parameters
400
442
  * @param {module:model/InviteToGroupRequest} opts.inviteToGroupRequest Invite parameters
401
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
443
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InviteToGroup200Response}
402
444
  */
403
445
  }, {
404
446
  key: "inviteToGroup",
@@ -538,7 +580,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
538
580
 
539
581
  /**
540
582
  * List my group invitations
541
- * List pending group invitations for the authenticated user, with pagination.
583
+ * List pending group invitations (GroupInvite records) for the authenticated user, with pagination.
542
584
  * @param {Object} opts Optional parameters
543
585
  * @param {Number} [page] Page number (default: 1)
544
586
  * @param {Number} [pageSize] Items per page (default: 25)
@@ -565,7 +607,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
565
607
 
566
608
  /**
567
609
  * List my group invitations
568
- * List pending group invitations for the authenticated user, with pagination.
610
+ * List pending group invitations (GroupInvite records) for the authenticated user, with pagination.
569
611
  * @param {Object} opts Optional parameters
570
612
  * @param {Number} opts.page Page number (default: 1)
571
613
  * @param {Number} opts.pageSize Items per page (default: 25)
@@ -787,7 +829,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
787
829
 
788
830
  /**
789
831
  * List group invitations I have sent
790
- * List group invitations sent by the authenticated user, with pagination.
832
+ * List group invitations (GroupInvite records) sent by the authenticated user, with pagination.
791
833
  * @param {Object} opts Optional parameters
792
834
  * @param {Number} [page] Page number (default: 1)
793
835
  * @param {Number} [pageSize] Items per page (default: 25)
@@ -814,7 +856,7 @@ var GroupsApi = exports["default"] = /*#__PURE__*/function () {
814
856
 
815
857
  /**
816
858
  * List group invitations I have sent
817
- * List group invitations sent by the authenticated user, with pagination.
859
+ * List group invitations (GroupInvite records) sent by the authenticated user, with pagination.
818
860
  * @param {Object} opts Optional parameters
819
861
  * @param {Number} opts.page Page number (default: 1)
820
862
  * @param {Number} opts.pageSize Items per page (default: 25)
@@ -14,9 +14,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
14
14
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
15
  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); } /**
16
16
  * Game Server API
17
- * API for Game Server application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### 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 ### Using Tokens Include the access token in the Authorization header: ``` Authorization: Bearer <access_token> ``` ### Refreshing Tokens When your access token expires, use POST `/api/v1/refresh` with your refresh token to get a new access token. ## 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 ## 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 ## 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 ## 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
17
+ * 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
18
18
  *
19
- * The version of the OpenAPI document: 1.0.0
19
+ * The version of the OpenAPI document: 1.0.790
20
20
  *
21
21
  *
22
22
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).