@ughuuu/game_server 1.0.146 → 1.0.149
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/dist/api/LobbiesApi.js
CHANGED
|
@@ -136,7 +136,7 @@ var LobbiesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
138
|
* Kick a user from the lobby
|
|
139
|
-
* Remove a user from the lobby. Only the host can kick users.
|
|
139
|
+
* Remove a user from the lobby. Only the host can kick users via the API (returns 403 if not host).
|
|
140
140
|
* @param {Number} id Lobby ID
|
|
141
141
|
* @param {Object} opts Optional parameters
|
|
142
142
|
* @param {module:model/KickUserRequest} [kickUserRequest] Kick parameters
|
|
@@ -166,7 +166,7 @@ var LobbiesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
168
|
* Kick a user from the lobby
|
|
169
|
-
* Remove a user from the lobby. Only the host can kick users.
|
|
169
|
+
* Remove a user from the lobby. Only the host can kick users via the API (returns 403 if not host).
|
|
170
170
|
* @param {Number} id Lobby ID
|
|
171
171
|
* @param {Object} opts Optional parameters
|
|
172
172
|
* @param {module:model/KickUserRequest} opts.kickUserRequest Kick parameters
|
|
@@ -269,7 +269,7 @@ var LobbiesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
269
269
|
|
|
270
270
|
/**
|
|
271
271
|
* Update lobby (host only)
|
|
272
|
-
* Update lobby settings. Only the host can update the lobby.
|
|
272
|
+
* 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.
|
|
273
273
|
* @param {Number} id Lobby ID
|
|
274
274
|
* @param {Object} opts Optional parameters
|
|
275
275
|
* @param {module:model/UpdateLobbyRequest} [updateLobbyRequest] Lobby update parameters
|
|
@@ -299,7 +299,7 @@ var LobbiesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
299
299
|
|
|
300
300
|
/**
|
|
301
301
|
* Update lobby (host only)
|
|
302
|
-
* Update lobby settings. Only the host can update the lobby.
|
|
302
|
+
* 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.
|
|
303
303
|
* @param {Number} id Lobby ID
|
|
304
304
|
* @param {Object} opts Optional parameters
|
|
305
305
|
* @param {module:model/UpdateLobbyRequest} opts.updateLobbyRequest Lobby update parameters
|
|
@@ -80,9 +80,6 @@ var ListLobbies200ResponseInner = /*#__PURE__*/function () {
|
|
|
80
80
|
if (data.hasOwnProperty('metadata')) {
|
|
81
81
|
obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], Object);
|
|
82
82
|
}
|
|
83
|
-
if (data.hasOwnProperty('name')) {
|
|
84
|
-
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
85
|
-
}
|
|
86
83
|
if (data.hasOwnProperty('title')) {
|
|
87
84
|
obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String');
|
|
88
85
|
}
|
|
@@ -98,10 +95,6 @@ var ListLobbies200ResponseInner = /*#__PURE__*/function () {
|
|
|
98
95
|
}, {
|
|
99
96
|
key: "validateJSON",
|
|
100
97
|
value: function validateJSON(data) {
|
|
101
|
-
// ensure the json data is a string
|
|
102
|
-
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
103
|
-
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
104
|
-
}
|
|
105
98
|
// ensure the json data is a string
|
|
106
99
|
if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
|
|
107
100
|
throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
|
|
@@ -152,12 +145,6 @@ ListLobbies200ResponseInner.prototype['max_users'] = undefined;
|
|
|
152
145
|
*/
|
|
153
146
|
ListLobbies200ResponseInner.prototype['metadata'] = undefined;
|
|
154
147
|
|
|
155
|
-
/**
|
|
156
|
-
* Unique slug identifier
|
|
157
|
-
* @member {String} name
|
|
158
|
-
*/
|
|
159
|
-
ListLobbies200ResponseInner.prototype['name'] = undefined;
|
|
160
|
-
|
|
161
148
|
/**
|
|
162
149
|
* Display title
|
|
163
150
|
* @member {String} title
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ughuuu/game_server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.149",
|
|
4
4
|
"description": "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 - **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 (API flow not yet implemented) 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. ## Endpoints All API endpoints are under `/api/v1` ",
|
|
5
5
|
"license": "Unlicense",
|
|
6
6
|
"main": "dist/index.js",
|