@ughuuu/game_server 1.0.304 → 1.0.320
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 +15 -3
- package/dist/ApiClient.js +1 -1
- package/dist/api/AuthenticationApi.js +1 -1
- package/dist/api/FriendsApi.js +1 -1
- package/dist/api/HealthApi.js +1 -1
- package/dist/api/HooksApi.js +1 -1
- package/dist/api/LeaderboardsApi.js +283 -0
- package/dist/api/LobbiesApi.js +58 -7
- package/dist/api/UsersApi.js +1 -1
- package/dist/index.js +59 -10
- package/dist/model/CallHookRequest.js +1 -1
- package/dist/model/CreateFriendRequestRequest.js +1 -1
- package/dist/model/CreateLobbyRequest.js +1 -1
- package/dist/model/DeviceLoginRequest.js +1 -1
- package/dist/model/GetCurrentUser200Response.js +1 -1
- package/dist/model/HealthResponse.js +1 -1
- package/dist/model/JoinLobbyRequest.js +1 -1
- package/dist/model/{CreateLobby401Response.js → KickUser401Response.js} +18 -18
- package/dist/model/KickUserRequest.js +1 -1
- package/dist/model/ListBlockedFriends200Response.js +5 -5
- package/dist/model/ListBlockedFriends200ResponseDataInner.js +1 -1
- package/dist/model/ListBlockedFriends200ResponseDataInnerRequester.js +1 -1
- package/dist/model/ListFriendRequests200Response.js +1 -1
- package/dist/model/ListFriendRequests200ResponseIncomingInner.js +1 -1
- package/dist/model/ListFriendRequests200ResponseIncomingInnerRequester.js +1 -1
- package/dist/model/ListFriendRequests200ResponseMeta.js +1 -1
- package/dist/model/ListFriends200Response.js +5 -5
- package/dist/model/ListFriends200ResponseDataInner.js +1 -1
- package/dist/model/ListLeaderboardRecords200Response.js +124 -0
- package/dist/model/ListLeaderboardRecords200ResponseDataInner.js +134 -0
- package/dist/model/{ListLobbies200ResponseMeta.js → ListLeaderboardRecords200ResponseMeta.js} +23 -23
- package/dist/model/ListLeaderboards200Response.js +124 -0
- package/dist/model/ListLeaderboards200ResponseDataInner.js +238 -0
- package/dist/model/ListLobbies200Response.js +5 -5
- package/dist/model/ListLobbies200ResponseDataInner.js +10 -1
- package/dist/model/ListRecordsAroundUser200Response.js +110 -0
- package/dist/model/Login200Response.js +1 -1
- package/dist/model/Login200ResponseData.js +1 -1
- package/dist/model/LoginRequest.js +1 -1
- package/dist/model/OAuthSessionData.js +1 -1
- package/dist/model/OAuthSessionDataDetails.js +1 -1
- package/dist/model/OAuthSessionStatus.js +1 -1
- package/dist/model/OauthApiCallback200Response.js +1 -1
- package/dist/model/OauthApiCallbackRequest.js +1 -1
- package/dist/model/OauthRequest200Response.js +1 -1
- package/dist/model/QuickJoinRequest.js +108 -0
- package/dist/model/RefreshToken200Response.js +1 -1
- package/dist/model/RefreshToken200ResponseData.js +1 -1
- package/dist/model/RefreshTokenRequest.js +1 -1
- package/dist/model/UpdateCurrentUserDisplayNameRequest.js +1 -1
- package/dist/model/UpdateCurrentUserPasswordRequest.js +1 -1
- package/dist/model/UpdateLobbyRequest.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ Lobbies provide matchmaking / room management primitives. Highlights:
|
|
|
55
55
|
|
|
56
56
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
57
57
|
|
|
58
|
-
- API version: 1.0.
|
|
58
|
+
- API version: 1.0.320
|
|
59
59
|
- Package version: 1.0.0
|
|
60
60
|
- Generator version: 7.17.0
|
|
61
61
|
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
|
|
@@ -192,11 +192,17 @@ Class | Method | HTTP request | Description
|
|
|
192
192
|
*UghuuuGameServer.HealthApi* | [**index**](docs/HealthApi.md#index) | **GET** /api/v1/health | Health check
|
|
193
193
|
*UghuuuGameServer.HooksApi* | [**callHook**](docs/HooksApi.md#callHook) | **POST** /api/v1/hooks/call | Invoke a hook function
|
|
194
194
|
*UghuuuGameServer.HooksApi* | [**listHooks**](docs/HooksApi.md#listHooks) | **GET** /api/v1/hooks | List available hook functions
|
|
195
|
+
*UghuuuGameServer.LeaderboardsApi* | [**getLeaderboard**](docs/LeaderboardsApi.md#getLeaderboard) | **GET** /api/v1/leaderboards/{id} | Get a leaderboard
|
|
196
|
+
*UghuuuGameServer.LeaderboardsApi* | [**getMyRecord**](docs/LeaderboardsApi.md#getMyRecord) | **GET** /api/v1/leaderboards/{id}/records/me | Get current user's record
|
|
197
|
+
*UghuuuGameServer.LeaderboardsApi* | [**listLeaderboardRecords**](docs/LeaderboardsApi.md#listLeaderboardRecords) | **GET** /api/v1/leaderboards/{id}/records | List leaderboard records
|
|
198
|
+
*UghuuuGameServer.LeaderboardsApi* | [**listLeaderboards**](docs/LeaderboardsApi.md#listLeaderboards) | **GET** /api/v1/leaderboards | List leaderboards
|
|
199
|
+
*UghuuuGameServer.LeaderboardsApi* | [**listRecordsAroundUser**](docs/LeaderboardsApi.md#listRecordsAroundUser) | **GET** /api/v1/leaderboards/{id}/records/around/{user_id} | List records around a user
|
|
195
200
|
*UghuuuGameServer.LobbiesApi* | [**createLobby**](docs/LobbiesApi.md#createLobby) | **POST** /api/v1/lobbies | Create a lobby
|
|
196
201
|
*UghuuuGameServer.LobbiesApi* | [**joinLobby**](docs/LobbiesApi.md#joinLobby) | **POST** /api/v1/lobbies/{id}/join | Join a lobby
|
|
197
202
|
*UghuuuGameServer.LobbiesApi* | [**kickUser**](docs/LobbiesApi.md#kickUser) | **POST** /api/v1/lobbies/kick | Kick a user from the lobby (host only)
|
|
198
203
|
*UghuuuGameServer.LobbiesApi* | [**leaveLobby**](docs/LobbiesApi.md#leaveLobby) | **POST** /api/v1/lobbies/leave | Leave the current lobby
|
|
199
204
|
*UghuuuGameServer.LobbiesApi* | [**listLobbies**](docs/LobbiesApi.md#listLobbies) | **GET** /api/v1/lobbies | List lobbies
|
|
205
|
+
*UghuuuGameServer.LobbiesApi* | [**quickJoin**](docs/LobbiesApi.md#quickJoin) | **POST** /api/v1/lobbies/quick_join | Quick-join or create a lobby
|
|
200
206
|
*UghuuuGameServer.LobbiesApi* | [**updateLobby**](docs/LobbiesApi.md#updateLobby) | **PATCH** /api/v1/lobbies | Update lobby (host only)
|
|
201
207
|
*UghuuuGameServer.UsersApi* | [**deleteCurrentUser**](docs/UsersApi.md#deleteCurrentUser) | **DELETE** /api/v1/me | Delete current user
|
|
202
208
|
*UghuuuGameServer.UsersApi* | [**getCurrentUser**](docs/UsersApi.md#getCurrentUser) | **GET** /api/v1/me | Return current user info
|
|
@@ -210,12 +216,12 @@ Class | Method | HTTP request | Description
|
|
|
210
216
|
|
|
211
217
|
- [UghuuuGameServer.CallHookRequest](docs/CallHookRequest.md)
|
|
212
218
|
- [UghuuuGameServer.CreateFriendRequestRequest](docs/CreateFriendRequestRequest.md)
|
|
213
|
-
- [UghuuuGameServer.CreateLobby401Response](docs/CreateLobby401Response.md)
|
|
214
219
|
- [UghuuuGameServer.CreateLobbyRequest](docs/CreateLobbyRequest.md)
|
|
215
220
|
- [UghuuuGameServer.DeviceLoginRequest](docs/DeviceLoginRequest.md)
|
|
216
221
|
- [UghuuuGameServer.GetCurrentUser200Response](docs/GetCurrentUser200Response.md)
|
|
217
222
|
- [UghuuuGameServer.HealthResponse](docs/HealthResponse.md)
|
|
218
223
|
- [UghuuuGameServer.JoinLobbyRequest](docs/JoinLobbyRequest.md)
|
|
224
|
+
- [UghuuuGameServer.KickUser401Response](docs/KickUser401Response.md)
|
|
219
225
|
- [UghuuuGameServer.KickUserRequest](docs/KickUserRequest.md)
|
|
220
226
|
- [UghuuuGameServer.ListBlockedFriends200Response](docs/ListBlockedFriends200Response.md)
|
|
221
227
|
- [UghuuuGameServer.ListBlockedFriends200ResponseDataInner](docs/ListBlockedFriends200ResponseDataInner.md)
|
|
@@ -226,9 +232,14 @@ Class | Method | HTTP request | Description
|
|
|
226
232
|
- [UghuuuGameServer.ListFriendRequests200ResponseMeta](docs/ListFriendRequests200ResponseMeta.md)
|
|
227
233
|
- [UghuuuGameServer.ListFriends200Response](docs/ListFriends200Response.md)
|
|
228
234
|
- [UghuuuGameServer.ListFriends200ResponseDataInner](docs/ListFriends200ResponseDataInner.md)
|
|
235
|
+
- [UghuuuGameServer.ListLeaderboardRecords200Response](docs/ListLeaderboardRecords200Response.md)
|
|
236
|
+
- [UghuuuGameServer.ListLeaderboardRecords200ResponseDataInner](docs/ListLeaderboardRecords200ResponseDataInner.md)
|
|
237
|
+
- [UghuuuGameServer.ListLeaderboardRecords200ResponseMeta](docs/ListLeaderboardRecords200ResponseMeta.md)
|
|
238
|
+
- [UghuuuGameServer.ListLeaderboards200Response](docs/ListLeaderboards200Response.md)
|
|
239
|
+
- [UghuuuGameServer.ListLeaderboards200ResponseDataInner](docs/ListLeaderboards200ResponseDataInner.md)
|
|
229
240
|
- [UghuuuGameServer.ListLobbies200Response](docs/ListLobbies200Response.md)
|
|
230
241
|
- [UghuuuGameServer.ListLobbies200ResponseDataInner](docs/ListLobbies200ResponseDataInner.md)
|
|
231
|
-
- [UghuuuGameServer.
|
|
242
|
+
- [UghuuuGameServer.ListRecordsAroundUser200Response](docs/ListRecordsAroundUser200Response.md)
|
|
232
243
|
- [UghuuuGameServer.Login200Response](docs/Login200Response.md)
|
|
233
244
|
- [UghuuuGameServer.Login200ResponseData](docs/Login200ResponseData.md)
|
|
234
245
|
- [UghuuuGameServer.LoginRequest](docs/LoginRequest.md)
|
|
@@ -238,6 +249,7 @@ Class | Method | HTTP request | Description
|
|
|
238
249
|
- [UghuuuGameServer.OauthApiCallback200Response](docs/OauthApiCallback200Response.md)
|
|
239
250
|
- [UghuuuGameServer.OauthApiCallbackRequest](docs/OauthApiCallbackRequest.md)
|
|
240
251
|
- [UghuuuGameServer.OauthRequest200Response](docs/OauthRequest200Response.md)
|
|
252
|
+
- [UghuuuGameServer.QuickJoinRequest](docs/QuickJoinRequest.md)
|
|
241
253
|
- [UghuuuGameServer.RefreshToken200Response](docs/RefreshToken200Response.md)
|
|
242
254
|
- [UghuuuGameServer.RefreshToken200ResponseData](docs/RefreshToken200ResponseData.md)
|
|
243
255
|
- [UghuuuGameServer.RefreshTokenRequest](docs/RefreshTokenRequest.md)
|
package/dist/ApiClient.js
CHANGED
|
@@ -15,7 +15,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
15
15
|
* Game Server API
|
|
16
16
|
* 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
|
|
17
17
|
*
|
|
18
|
-
* The version of the OpenAPI document: 1.0.
|
|
18
|
+
* The version of the OpenAPI document: 1.0.320
|
|
19
19
|
*
|
|
20
20
|
*
|
|
21
21
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -24,7 +24,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
24
24
|
* Game Server API
|
|
25
25
|
* 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
|
|
26
26
|
*
|
|
27
|
-
* The version of the OpenAPI document: 1.0.
|
|
27
|
+
* The version of the OpenAPI document: 1.0.320
|
|
28
28
|
*
|
|
29
29
|
*
|
|
30
30
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/api/FriendsApi.js
CHANGED
|
@@ -19,7 +19,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
19
19
|
* Game Server API
|
|
20
20
|
* 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
|
|
21
21
|
*
|
|
22
|
-
* The version of the OpenAPI document: 1.0.
|
|
22
|
+
* The version of the OpenAPI document: 1.0.320
|
|
23
23
|
*
|
|
24
24
|
*
|
|
25
25
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/api/HealthApi.js
CHANGED
|
@@ -16,7 +16,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
16
16
|
* Game Server API
|
|
17
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
|
|
18
18
|
*
|
|
19
|
-
* The version of the OpenAPI document: 1.0.
|
|
19
|
+
* The version of the OpenAPI document: 1.0.320
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/api/HooksApi.js
CHANGED
|
@@ -16,7 +16,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
16
16
|
* Game Server API
|
|
17
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
|
|
18
18
|
*
|
|
19
|
-
* The version of the OpenAPI document: 1.0.
|
|
19
|
+
* The version of the OpenAPI document: 1.0.320
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _ListLeaderboardRecords200Response = _interopRequireDefault(require("../model/ListLeaderboardRecords200Response"));
|
|
9
|
+
var _ListLeaderboardRecords200ResponseDataInner = _interopRequireDefault(require("../model/ListLeaderboardRecords200ResponseDataInner"));
|
|
10
|
+
var _ListLeaderboards200Response = _interopRequireDefault(require("../model/ListLeaderboards200Response"));
|
|
11
|
+
var _ListLeaderboards200ResponseDataInner = _interopRequireDefault(require("../model/ListLeaderboards200ResponseDataInner"));
|
|
12
|
+
var _ListRecordsAroundUser200Response = _interopRequireDefault(require("../model/ListRecordsAroundUser200Response"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
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
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
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
|
+
* 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
|
|
22
|
+
*
|
|
23
|
+
* The version of the OpenAPI document: 1.0.320
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
|
+
* https://openapi-generator.tech
|
|
28
|
+
* Do not edit the class manually.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Leaderboards service.
|
|
33
|
+
* @module api/LeaderboardsApi
|
|
34
|
+
* @version 1.0.0
|
|
35
|
+
*/
|
|
36
|
+
var LeaderboardsApi = exports["default"] = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new LeaderboardsApi.
|
|
39
|
+
* @alias module:api/LeaderboardsApi
|
|
40
|
+
* @class
|
|
41
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
42
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
43
|
+
*/
|
|
44
|
+
function LeaderboardsApi(apiClient) {
|
|
45
|
+
_classCallCheck(this, LeaderboardsApi);
|
|
46
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Get a leaderboard
|
|
51
|
+
* Return details for a specific leaderboard.
|
|
52
|
+
* @param {String} id Leaderboard ID
|
|
53
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListLeaderboards200ResponseDataInner} and HTTP response
|
|
54
|
+
*/
|
|
55
|
+
return _createClass(LeaderboardsApi, [{
|
|
56
|
+
key: "getLeaderboardWithHttpInfo",
|
|
57
|
+
value: function getLeaderboardWithHttpInfo(id) {
|
|
58
|
+
var postBody = null;
|
|
59
|
+
// verify the required parameter 'id' is set
|
|
60
|
+
if (id === undefined || id === null) {
|
|
61
|
+
throw new Error("Missing the required parameter 'id' when calling getLeaderboard");
|
|
62
|
+
}
|
|
63
|
+
var pathParams = {
|
|
64
|
+
'id': id
|
|
65
|
+
};
|
|
66
|
+
var queryParams = {};
|
|
67
|
+
var headerParams = {};
|
|
68
|
+
var formParams = {};
|
|
69
|
+
var authNames = [];
|
|
70
|
+
var contentTypes = [];
|
|
71
|
+
var accepts = ['application/json'];
|
|
72
|
+
var returnType = _ListLeaderboards200ResponseDataInner["default"];
|
|
73
|
+
return this.apiClient.callApi('/api/v1/leaderboards/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Get a leaderboard
|
|
78
|
+
* Return details for a specific leaderboard.
|
|
79
|
+
* @param {String} id Leaderboard ID
|
|
80
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListLeaderboards200ResponseDataInner}
|
|
81
|
+
*/
|
|
82
|
+
}, {
|
|
83
|
+
key: "getLeaderboard",
|
|
84
|
+
value: function getLeaderboard(id) {
|
|
85
|
+
return this.getLeaderboardWithHttpInfo(id).then(function (response_and_data) {
|
|
86
|
+
return response_and_data.data;
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Get current user's record
|
|
92
|
+
* Return the authenticated user's record and rank on this leaderboard.
|
|
93
|
+
* @param {String} id Leaderboard ID
|
|
94
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListLeaderboardRecords200ResponseDataInner} and HTTP response
|
|
95
|
+
*/
|
|
96
|
+
}, {
|
|
97
|
+
key: "getMyRecordWithHttpInfo",
|
|
98
|
+
value: function getMyRecordWithHttpInfo(id) {
|
|
99
|
+
var postBody = null;
|
|
100
|
+
// verify the required parameter 'id' is set
|
|
101
|
+
if (id === undefined || id === null) {
|
|
102
|
+
throw new Error("Missing the required parameter 'id' when calling getMyRecord");
|
|
103
|
+
}
|
|
104
|
+
var pathParams = {
|
|
105
|
+
'id': id
|
|
106
|
+
};
|
|
107
|
+
var queryParams = {};
|
|
108
|
+
var headerParams = {};
|
|
109
|
+
var formParams = {};
|
|
110
|
+
var authNames = [];
|
|
111
|
+
var contentTypes = [];
|
|
112
|
+
var accepts = ['application/json'];
|
|
113
|
+
var returnType = _ListLeaderboardRecords200ResponseDataInner["default"];
|
|
114
|
+
return this.apiClient.callApi('/api/v1/leaderboards/{id}/records/me', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Get current user's record
|
|
119
|
+
* Return the authenticated user's record and rank on this leaderboard.
|
|
120
|
+
* @param {String} id Leaderboard ID
|
|
121
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListLeaderboardRecords200ResponseDataInner}
|
|
122
|
+
*/
|
|
123
|
+
}, {
|
|
124
|
+
key: "getMyRecord",
|
|
125
|
+
value: function getMyRecord(id) {
|
|
126
|
+
return this.getMyRecordWithHttpInfo(id).then(function (response_and_data) {
|
|
127
|
+
return response_and_data.data;
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* List leaderboard records
|
|
133
|
+
* Return ranked records for a leaderboard.
|
|
134
|
+
* @param {String} id Leaderboard ID
|
|
135
|
+
* @param {Object} opts Optional parameters
|
|
136
|
+
* @param {Number} [page = 1)] Page number
|
|
137
|
+
* @param {Number} [pageSize = 25)] Page size (max 100)
|
|
138
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListLeaderboardRecords200Response} and HTTP response
|
|
139
|
+
*/
|
|
140
|
+
}, {
|
|
141
|
+
key: "listLeaderboardRecordsWithHttpInfo",
|
|
142
|
+
value: function listLeaderboardRecordsWithHttpInfo(id, opts) {
|
|
143
|
+
opts = opts || {};
|
|
144
|
+
var postBody = null;
|
|
145
|
+
// verify the required parameter 'id' is set
|
|
146
|
+
if (id === undefined || id === null) {
|
|
147
|
+
throw new Error("Missing the required parameter 'id' when calling listLeaderboardRecords");
|
|
148
|
+
}
|
|
149
|
+
var pathParams = {
|
|
150
|
+
'id': id
|
|
151
|
+
};
|
|
152
|
+
var queryParams = {
|
|
153
|
+
'page': opts['page'],
|
|
154
|
+
'page_size': opts['pageSize']
|
|
155
|
+
};
|
|
156
|
+
var headerParams = {};
|
|
157
|
+
var formParams = {};
|
|
158
|
+
var authNames = [];
|
|
159
|
+
var contentTypes = [];
|
|
160
|
+
var accepts = ['application/json'];
|
|
161
|
+
var returnType = _ListLeaderboardRecords200Response["default"];
|
|
162
|
+
return this.apiClient.callApi('/api/v1/leaderboards/{id}/records', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* List leaderboard records
|
|
167
|
+
* Return ranked records for a leaderboard.
|
|
168
|
+
* @param {String} id Leaderboard ID
|
|
169
|
+
* @param {Object} opts Optional parameters
|
|
170
|
+
* @param {Number} opts.page Page number (default to 1)
|
|
171
|
+
* @param {Number} opts.pageSize Page size (max 100) (default to 25)
|
|
172
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListLeaderboardRecords200Response}
|
|
173
|
+
*/
|
|
174
|
+
}, {
|
|
175
|
+
key: "listLeaderboardRecords",
|
|
176
|
+
value: function listLeaderboardRecords(id, opts) {
|
|
177
|
+
return this.listLeaderboardRecordsWithHttpInfo(id, opts).then(function (response_and_data) {
|
|
178
|
+
return response_and_data.data;
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* List leaderboards
|
|
184
|
+
* Return all leaderboards, optionally filtered by active status.
|
|
185
|
+
* @param {Object} opts Optional parameters
|
|
186
|
+
* @param {module:model/String} [active] Filter by active status - 'true' or 'false' (omit for all)
|
|
187
|
+
* @param {Number} [page = 1)] Page number
|
|
188
|
+
* @param {Number} [pageSize = 25)] Page size (max 100)
|
|
189
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListLeaderboards200Response} and HTTP response
|
|
190
|
+
*/
|
|
191
|
+
}, {
|
|
192
|
+
key: "listLeaderboardsWithHttpInfo",
|
|
193
|
+
value: function listLeaderboardsWithHttpInfo(opts) {
|
|
194
|
+
opts = opts || {};
|
|
195
|
+
var postBody = null;
|
|
196
|
+
var pathParams = {};
|
|
197
|
+
var queryParams = {
|
|
198
|
+
'active': opts['active'],
|
|
199
|
+
'page': opts['page'],
|
|
200
|
+
'page_size': opts['pageSize']
|
|
201
|
+
};
|
|
202
|
+
var headerParams = {};
|
|
203
|
+
var formParams = {};
|
|
204
|
+
var authNames = [];
|
|
205
|
+
var contentTypes = [];
|
|
206
|
+
var accepts = ['application/json'];
|
|
207
|
+
var returnType = _ListLeaderboards200Response["default"];
|
|
208
|
+
return this.apiClient.callApi('/api/v1/leaderboards', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* List leaderboards
|
|
213
|
+
* Return all leaderboards, optionally filtered by active status.
|
|
214
|
+
* @param {Object} opts Optional parameters
|
|
215
|
+
* @param {module:model/String} opts.active Filter by active status - 'true' or 'false' (omit for all)
|
|
216
|
+
* @param {Number} opts.page Page number (default to 1)
|
|
217
|
+
* @param {Number} opts.pageSize Page size (max 100) (default to 25)
|
|
218
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListLeaderboards200Response}
|
|
219
|
+
*/
|
|
220
|
+
}, {
|
|
221
|
+
key: "listLeaderboards",
|
|
222
|
+
value: function listLeaderboards(opts) {
|
|
223
|
+
return this.listLeaderboardsWithHttpInfo(opts).then(function (response_and_data) {
|
|
224
|
+
return response_and_data.data;
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* List records around a user
|
|
230
|
+
* Return records centered around a specific user's rank.
|
|
231
|
+
* @param {String} id Leaderboard ID
|
|
232
|
+
* @param {Number} userId User ID to center around
|
|
233
|
+
* @param {Object} opts Optional parameters
|
|
234
|
+
* @param {Number} [limit = 11)] Total number of records to return
|
|
235
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListRecordsAroundUser200Response} and HTTP response
|
|
236
|
+
*/
|
|
237
|
+
}, {
|
|
238
|
+
key: "listRecordsAroundUserWithHttpInfo",
|
|
239
|
+
value: function listRecordsAroundUserWithHttpInfo(id, userId, opts) {
|
|
240
|
+
opts = opts || {};
|
|
241
|
+
var postBody = null;
|
|
242
|
+
// verify the required parameter 'id' is set
|
|
243
|
+
if (id === undefined || id === null) {
|
|
244
|
+
throw new Error("Missing the required parameter 'id' when calling listRecordsAroundUser");
|
|
245
|
+
}
|
|
246
|
+
// verify the required parameter 'userId' is set
|
|
247
|
+
if (userId === undefined || userId === null) {
|
|
248
|
+
throw new Error("Missing the required parameter 'userId' when calling listRecordsAroundUser");
|
|
249
|
+
}
|
|
250
|
+
var pathParams = {
|
|
251
|
+
'id': id,
|
|
252
|
+
'user_id': userId
|
|
253
|
+
};
|
|
254
|
+
var queryParams = {
|
|
255
|
+
'limit': opts['limit']
|
|
256
|
+
};
|
|
257
|
+
var headerParams = {};
|
|
258
|
+
var formParams = {};
|
|
259
|
+
var authNames = [];
|
|
260
|
+
var contentTypes = [];
|
|
261
|
+
var accepts = ['application/json'];
|
|
262
|
+
var returnType = _ListRecordsAroundUser200Response["default"];
|
|
263
|
+
return this.apiClient.callApi('/api/v1/leaderboards/{id}/records/around/{user_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* List records around a user
|
|
268
|
+
* Return records centered around a specific user's rank.
|
|
269
|
+
* @param {String} id Leaderboard ID
|
|
270
|
+
* @param {Number} userId User ID to center around
|
|
271
|
+
* @param {Object} opts Optional parameters
|
|
272
|
+
* @param {Number} opts.limit Total number of records to return (default to 11)
|
|
273
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListRecordsAroundUser200Response}
|
|
274
|
+
*/
|
|
275
|
+
}, {
|
|
276
|
+
key: "listRecordsAroundUser",
|
|
277
|
+
value: function listRecordsAroundUser(id, userId, opts) {
|
|
278
|
+
return this.listRecordsAroundUserWithHttpInfo(id, userId, opts).then(function (response_and_data) {
|
|
279
|
+
return response_and_data.data;
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
}]);
|
|
283
|
+
}();
|
package/dist/api/LobbiesApi.js
CHANGED
|
@@ -5,12 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var _CreateLobby401Response = _interopRequireDefault(require("../model/CreateLobby401Response"));
|
|
9
8
|
var _CreateLobbyRequest = _interopRequireDefault(require("../model/CreateLobbyRequest"));
|
|
10
9
|
var _JoinLobbyRequest = _interopRequireDefault(require("../model/JoinLobbyRequest"));
|
|
10
|
+
var _KickUser401Response = _interopRequireDefault(require("../model/KickUser401Response"));
|
|
11
11
|
var _KickUserRequest = _interopRequireDefault(require("../model/KickUserRequest"));
|
|
12
12
|
var _ListLobbies200Response = _interopRequireDefault(require("../model/ListLobbies200Response"));
|
|
13
13
|
var _ListLobbies200ResponseDataInner = _interopRequireDefault(require("../model/ListLobbies200ResponseDataInner"));
|
|
14
|
+
var _QuickJoinRequest = _interopRequireDefault(require("../model/QuickJoinRequest"));
|
|
14
15
|
var _UpdateLobbyRequest = _interopRequireDefault(require("../model/UpdateLobbyRequest"));
|
|
15
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
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); }
|
|
@@ -22,7 +23,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
22
23
|
* Game Server API
|
|
23
24
|
* 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
|
|
24
25
|
*
|
|
25
|
-
* The version of the OpenAPI document: 1.0.
|
|
26
|
+
* The version of the OpenAPI document: 1.0.320
|
|
26
27
|
*
|
|
27
28
|
*
|
|
28
29
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -205,9 +206,13 @@ var LobbiesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
205
206
|
|
|
206
207
|
/**
|
|
207
208
|
* List lobbies
|
|
208
|
-
* Return all non-hidden lobbies. Supports optional text search via '
|
|
209
|
+
* Return all non-hidden lobbies. Supports optional text search via 'title', metadata filters, password/lock filters, and numeric min/max for max_users.
|
|
209
210
|
* @param {Object} opts Optional parameters
|
|
210
|
-
* @param {String} [
|
|
211
|
+
* @param {String} [title] Search term for title
|
|
212
|
+
* @param {module:model/String} [isPassworded] Filter by passworded lobbies - 'true' or 'false' (omit for any)
|
|
213
|
+
* @param {module:model/String} [isLocked] Filter by locked status - 'true' or 'false' (omit for any)
|
|
214
|
+
* @param {Number} [minUsers] Minimum max_users to include
|
|
215
|
+
* @param {Number} [maxUsers] Maximum max_users to include
|
|
211
216
|
* @param {Number} [page] Page number (1-based)
|
|
212
217
|
* @param {Number} [pageSize] Page size (max results per page)
|
|
213
218
|
* @param {String} [metadataKey] Optional metadata key to filter by
|
|
@@ -221,7 +226,11 @@ var LobbiesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
221
226
|
var postBody = null;
|
|
222
227
|
var pathParams = {};
|
|
223
228
|
var queryParams = {
|
|
224
|
-
'
|
|
229
|
+
'title': opts['title'],
|
|
230
|
+
'is_passworded': opts['isPassworded'],
|
|
231
|
+
'is_locked': opts['isLocked'],
|
|
232
|
+
'min_users': opts['minUsers'],
|
|
233
|
+
'max_users': opts['maxUsers'],
|
|
225
234
|
'page': opts['page'],
|
|
226
235
|
'page_size': opts['pageSize'],
|
|
227
236
|
'metadata_key': opts['metadataKey'],
|
|
@@ -238,9 +247,13 @@ var LobbiesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
238
247
|
|
|
239
248
|
/**
|
|
240
249
|
* List lobbies
|
|
241
|
-
* Return all non-hidden lobbies. Supports optional text search via '
|
|
250
|
+
* Return all non-hidden lobbies. Supports optional text search via 'title', metadata filters, password/lock filters, and numeric min/max for max_users.
|
|
242
251
|
* @param {Object} opts Optional parameters
|
|
243
|
-
* @param {String} opts.
|
|
252
|
+
* @param {String} opts.title Search term for title
|
|
253
|
+
* @param {module:model/String} opts.isPassworded Filter by passworded lobbies - 'true' or 'false' (omit for any)
|
|
254
|
+
* @param {module:model/String} opts.isLocked Filter by locked status - 'true' or 'false' (omit for any)
|
|
255
|
+
* @param {Number} opts.minUsers Minimum max_users to include
|
|
256
|
+
* @param {Number} opts.maxUsers Maximum max_users to include
|
|
244
257
|
* @param {Number} opts.page Page number (1-based)
|
|
245
258
|
* @param {Number} opts.pageSize Page size (max results per page)
|
|
246
259
|
* @param {String} opts.metadataKey Optional metadata key to filter by
|
|
@@ -255,6 +268,44 @@ var LobbiesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
255
268
|
});
|
|
256
269
|
}
|
|
257
270
|
|
|
271
|
+
/**
|
|
272
|
+
* Quick-join or create a lobby
|
|
273
|
+
* Attempt to find an open, non-passworded lobby that matches the provided criteria and join it; if none found, create a new lobby. The authenticated user will become the host when a lobby is created.
|
|
274
|
+
* @param {Object} opts Optional parameters
|
|
275
|
+
* @param {module:model/QuickJoinRequest} [quickJoinRequest] Quick join parameters
|
|
276
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListLobbies200ResponseDataInner} and HTTP response
|
|
277
|
+
*/
|
|
278
|
+
}, {
|
|
279
|
+
key: "quickJoinWithHttpInfo",
|
|
280
|
+
value: function quickJoinWithHttpInfo(opts) {
|
|
281
|
+
opts = opts || {};
|
|
282
|
+
var postBody = opts['quickJoinRequest'];
|
|
283
|
+
var pathParams = {};
|
|
284
|
+
var queryParams = {};
|
|
285
|
+
var headerParams = {};
|
|
286
|
+
var formParams = {};
|
|
287
|
+
var authNames = ['authorization'];
|
|
288
|
+
var contentTypes = ['application/json'];
|
|
289
|
+
var accepts = ['application/json'];
|
|
290
|
+
var returnType = _ListLobbies200ResponseDataInner["default"];
|
|
291
|
+
return this.apiClient.callApi('/api/v1/lobbies/quick_join', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Quick-join or create a lobby
|
|
296
|
+
* Attempt to find an open, non-passworded lobby that matches the provided criteria and join it; if none found, create a new lobby. The authenticated user will become the host when a lobby is created.
|
|
297
|
+
* @param {Object} opts Optional parameters
|
|
298
|
+
* @param {module:model/QuickJoinRequest} opts.quickJoinRequest Quick join parameters
|
|
299
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListLobbies200ResponseDataInner}
|
|
300
|
+
*/
|
|
301
|
+
}, {
|
|
302
|
+
key: "quickJoin",
|
|
303
|
+
value: function quickJoin(opts) {
|
|
304
|
+
return this.quickJoinWithHttpInfo(opts).then(function (response_and_data) {
|
|
305
|
+
return response_and_data.data;
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
|
|
258
309
|
/**
|
|
259
310
|
* Update lobby (host only)
|
|
260
311
|
* Update lobby settings. Only the host can update the lobby via the API (returns 403 if not host). Admins can still modify lobbies from the admin console - those changes are broadcast to viewers.
|
package/dist/api/UsersApi.js
CHANGED
|
@@ -20,7 +20,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
20
20
|
* Game Server API
|
|
21
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
|
|
22
22
|
*
|
|
23
|
-
* The version of the OpenAPI document: 1.0.
|
|
23
|
+
* The version of the OpenAPI document: 1.0.320
|
|
24
24
|
*
|
|
25
25
|
*
|
|
26
26
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|