@ughuuu/game_server 1.0.296 → 1.0.319

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 (53) hide show
  1. package/README.md +17 -4
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AuthenticationApi.js +8 -7
  4. package/dist/api/FriendsApi.js +1 -1
  5. package/dist/api/HealthApi.js +1 -1
  6. package/dist/api/HooksApi.js +1 -1
  7. package/dist/api/LeaderboardsApi.js +283 -0
  8. package/dist/api/LobbiesApi.js +58 -7
  9. package/dist/api/UsersApi.js +1 -1
  10. package/dist/index.js +73 -17
  11. package/dist/model/CallHookRequest.js +1 -1
  12. package/dist/model/CreateFriendRequestRequest.js +1 -1
  13. package/dist/model/CreateLobbyRequest.js +1 -1
  14. package/dist/model/DeviceLoginRequest.js +1 -1
  15. package/dist/model/GetCurrentUser200Response.js +1 -1
  16. package/dist/model/HealthResponse.js +1 -1
  17. package/dist/model/JoinLobbyRequest.js +1 -1
  18. package/dist/model/{CreateLobby401Response.js → KickUser401Response.js} +18 -18
  19. package/dist/model/KickUserRequest.js +1 -1
  20. package/dist/model/ListBlockedFriends200Response.js +5 -5
  21. package/dist/model/ListBlockedFriends200ResponseDataInner.js +1 -1
  22. package/dist/model/ListBlockedFriends200ResponseDataInnerRequester.js +1 -1
  23. package/dist/model/ListFriendRequests200Response.js +1 -1
  24. package/dist/model/ListFriendRequests200ResponseIncomingInner.js +1 -1
  25. package/dist/model/ListFriendRequests200ResponseIncomingInnerRequester.js +1 -1
  26. package/dist/model/ListFriendRequests200ResponseMeta.js +1 -1
  27. package/dist/model/ListFriends200Response.js +5 -5
  28. package/dist/model/ListFriends200ResponseDataInner.js +1 -1
  29. package/dist/model/ListLeaderboardRecords200Response.js +124 -0
  30. package/dist/model/ListLeaderboardRecords200ResponseDataInner.js +134 -0
  31. package/dist/model/{ListLobbies200ResponseMeta.js → ListLeaderboardRecords200ResponseMeta.js} +23 -23
  32. package/dist/model/ListLeaderboards200Response.js +124 -0
  33. package/dist/model/ListLeaderboards200ResponseDataInner.js +238 -0
  34. package/dist/model/ListLobbies200Response.js +5 -5
  35. package/dist/model/ListLobbies200ResponseDataInner.js +10 -1
  36. package/dist/model/ListRecordsAroundUser200Response.js +110 -0
  37. package/dist/model/Login200Response.js +1 -1
  38. package/dist/model/Login200ResponseData.js +5 -11
  39. package/dist/model/LoginRequest.js +1 -1
  40. package/dist/model/OAuthSessionData.js +10 -1
  41. package/dist/model/OAuthSessionDataDetails.js +1 -1
  42. package/dist/model/OAuthSessionStatus.js +1 -1
  43. package/dist/model/{Login200ResponseDataUser.js → OauthApiCallback200Response.js} +26 -32
  44. package/dist/model/OauthApiCallbackRequest.js +1 -1
  45. package/dist/model/OauthRequest200Response.js +1 -1
  46. package/dist/model/QuickJoinRequest.js +108 -0
  47. package/dist/model/RefreshToken200Response.js +10 -18
  48. package/dist/model/RefreshToken200ResponseData.js +99 -0
  49. package/dist/model/RefreshTokenRequest.js +1 -1
  50. package/dist/model/UpdateCurrentUserDisplayNameRequest.js +1 -1
  51. package/dist/model/UpdateCurrentUserPasswordRequest.js +1 -1
  52. package/dist/model/UpdateLobbyRequest.js +1 -1
  53. package/package.json +1 -1
@@ -0,0 +1,124 @@
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 _ListLeaderboardRecords200ResponseDataInner = _interopRequireDefault(require("./ListLeaderboardRecords200ResponseDataInner"));
9
+ var _ListLeaderboardRecords200ResponseMeta = _interopRequireDefault(require("./ListLeaderboardRecords200ResponseMeta"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ 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); }
12
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
13
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
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.319
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
+ * The ListLeaderboardRecords200Response model module.
33
+ * @module model/ListLeaderboardRecords200Response
34
+ * @version 1.0.0
35
+ */
36
+ var ListLeaderboardRecords200Response = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>ListLeaderboardRecords200Response</code>.
39
+ * @alias module:model/ListLeaderboardRecords200Response
40
+ */
41
+ function ListLeaderboardRecords200Response() {
42
+ _classCallCheck(this, ListLeaderboardRecords200Response);
43
+ ListLeaderboardRecords200Response.initialize(this);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(ListLeaderboardRecords200Response, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj) {}
54
+
55
+ /**
56
+ * Constructs a <code>ListLeaderboardRecords200Response</code> from a plain JavaScript object, optionally creating a new instance.
57
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
58
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
59
+ * @param {module:model/ListLeaderboardRecords200Response} obj Optional instance to populate.
60
+ * @return {module:model/ListLeaderboardRecords200Response} The populated <code>ListLeaderboardRecords200Response</code> instance.
61
+ */
62
+ }, {
63
+ key: "constructFromObject",
64
+ value: function constructFromObject(data, obj) {
65
+ if (data) {
66
+ obj = obj || new ListLeaderboardRecords200Response();
67
+ if (data.hasOwnProperty('data')) {
68
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_ListLeaderboardRecords200ResponseDataInner["default"]]);
69
+ }
70
+ if (data.hasOwnProperty('meta')) {
71
+ obj['meta'] = _ListLeaderboardRecords200ResponseMeta["default"].constructFromObject(data['meta']);
72
+ }
73
+ }
74
+ return obj;
75
+ }
76
+
77
+ /**
78
+ * Validates the JSON data with respect to <code>ListLeaderboardRecords200Response</code>.
79
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
80
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListLeaderboardRecords200Response</code>.
81
+ */
82
+ }, {
83
+ key: "validateJSON",
84
+ value: function validateJSON(data) {
85
+ if (data['data']) {
86
+ // data not null
87
+ // ensure the json data is an array
88
+ if (!Array.isArray(data['data'])) {
89
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
90
+ }
91
+ // validate the optional field `data` (array)
92
+ var _iterator = _createForOfIteratorHelper(data['data']),
93
+ _step;
94
+ try {
95
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
96
+ var item = _step.value;
97
+ _ListLeaderboardRecords200ResponseDataInner["default"].validateJSON(item);
98
+ }
99
+ } catch (err) {
100
+ _iterator.e(err);
101
+ } finally {
102
+ _iterator.f();
103
+ }
104
+ ;
105
+ }
106
+ // validate the optional field `meta`
107
+ if (data['meta']) {
108
+ // data not null
109
+ _ListLeaderboardRecords200ResponseMeta["default"].validateJSON(data['meta']);
110
+ }
111
+ return true;
112
+ }
113
+ }]);
114
+ }();
115
+ /**
116
+ * @member {Array.<module:model/ListLeaderboardRecords200ResponseDataInner>} data
117
+ */
118
+ ListLeaderboardRecords200Response.prototype['data'] = undefined;
119
+
120
+ /**
121
+ * @member {module:model/ListLeaderboardRecords200ResponseMeta} meta
122
+ */
123
+ ListLeaderboardRecords200Response.prototype['meta'] = undefined;
124
+ var _default = exports["default"] = ListLeaderboardRecords200Response;
@@ -0,0 +1,134 @@
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
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ 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); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ 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); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ 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); } /**
15
+ * Game Server API
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
+ *
18
+ * The version of the OpenAPI document: 1.0.319
19
+ *
20
+ *
21
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
+ * https://openapi-generator.tech
23
+ * Do not edit the class manually.
24
+ *
25
+ */
26
+ /**
27
+ * The ListLeaderboardRecords200ResponseDataInner model module.
28
+ * @module model/ListLeaderboardRecords200ResponseDataInner
29
+ * @version 1.0.0
30
+ */
31
+ var ListLeaderboardRecords200ResponseDataInner = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>ListLeaderboardRecords200ResponseDataInner</code>.
34
+ * @alias module:model/ListLeaderboardRecords200ResponseDataInner
35
+ */
36
+ function ListLeaderboardRecords200ResponseDataInner() {
37
+ _classCallCheck(this, ListLeaderboardRecords200ResponseDataInner);
38
+ ListLeaderboardRecords200ResponseDataInner.initialize(this);
39
+ }
40
+
41
+ /**
42
+ * Initializes the fields of this object.
43
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
44
+ * Only for internal use.
45
+ */
46
+ return _createClass(ListLeaderboardRecords200ResponseDataInner, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>ListLeaderboardRecords200ResponseDataInner</code> from a plain JavaScript object, optionally creating a new instance.
52
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
53
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
54
+ * @param {module:model/ListLeaderboardRecords200ResponseDataInner} obj Optional instance to populate.
55
+ * @return {module:model/ListLeaderboardRecords200ResponseDataInner} The populated <code>ListLeaderboardRecords200ResponseDataInner</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new ListLeaderboardRecords200ResponseDataInner();
62
+ if (data.hasOwnProperty('display_name')) {
63
+ obj['display_name'] = _ApiClient["default"].convertToType(data['display_name'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('metadata')) {
66
+ obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], Object);
67
+ }
68
+ if (data.hasOwnProperty('rank')) {
69
+ obj['rank'] = _ApiClient["default"].convertToType(data['rank'], 'Number');
70
+ }
71
+ if (data.hasOwnProperty('score')) {
72
+ obj['score'] = _ApiClient["default"].convertToType(data['score'], 'Number');
73
+ }
74
+ if (data.hasOwnProperty('updated_at')) {
75
+ obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'Date');
76
+ }
77
+ if (data.hasOwnProperty('user_id')) {
78
+ obj['user_id'] = _ApiClient["default"].convertToType(data['user_id'], 'Number');
79
+ }
80
+ }
81
+ return obj;
82
+ }
83
+
84
+ /**
85
+ * Validates the JSON data with respect to <code>ListLeaderboardRecords200ResponseDataInner</code>.
86
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
87
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListLeaderboardRecords200ResponseDataInner</code>.
88
+ */
89
+ }, {
90
+ key: "validateJSON",
91
+ value: function validateJSON(data) {
92
+ // ensure the json data is a string
93
+ if (data['display_name'] && !(typeof data['display_name'] === 'string' || data['display_name'] instanceof String)) {
94
+ throw new Error("Expected the field `display_name` to be a primitive type in the JSON string but got " + data['display_name']);
95
+ }
96
+ return true;
97
+ }
98
+ }]);
99
+ }();
100
+ /**
101
+ * User's display name
102
+ * @member {String} display_name
103
+ */
104
+ ListLeaderboardRecords200ResponseDataInner.prototype['display_name'] = undefined;
105
+
106
+ /**
107
+ * Per-record metadata
108
+ * @member {Object} metadata
109
+ */
110
+ ListLeaderboardRecords200ResponseDataInner.prototype['metadata'] = undefined;
111
+
112
+ /**
113
+ * Player's rank on this leaderboard
114
+ * @member {Number} rank
115
+ */
116
+ ListLeaderboardRecords200ResponseDataInner.prototype['rank'] = undefined;
117
+
118
+ /**
119
+ * Score value
120
+ * @member {Number} score
121
+ */
122
+ ListLeaderboardRecords200ResponseDataInner.prototype['score'] = undefined;
123
+
124
+ /**
125
+ * @member {Date} updated_at
126
+ */
127
+ ListLeaderboardRecords200ResponseDataInner.prototype['updated_at'] = undefined;
128
+
129
+ /**
130
+ * User ID
131
+ * @member {Number} user_id
132
+ */
133
+ ListLeaderboardRecords200ResponseDataInner.prototype['user_id'] = undefined;
134
+ var _default = exports["default"] = ListLeaderboardRecords200ResponseDataInner;
@@ -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.296
18
+ * The version of the OpenAPI document: 1.0.319
19
19
  *
20
20
  *
21
21
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -24,18 +24,18 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
24
24
  *
25
25
  */
26
26
  /**
27
- * The ListLobbies200ResponseMeta model module.
28
- * @module model/ListLobbies200ResponseMeta
27
+ * The ListLeaderboardRecords200ResponseMeta model module.
28
+ * @module model/ListLeaderboardRecords200ResponseMeta
29
29
  * @version 1.0.0
30
30
  */
31
- var ListLobbies200ResponseMeta = /*#__PURE__*/function () {
31
+ var ListLeaderboardRecords200ResponseMeta = /*#__PURE__*/function () {
32
32
  /**
33
- * Constructs a new <code>ListLobbies200ResponseMeta</code>.
34
- * @alias module:model/ListLobbies200ResponseMeta
33
+ * Constructs a new <code>ListLeaderboardRecords200ResponseMeta</code>.
34
+ * @alias module:model/ListLeaderboardRecords200ResponseMeta
35
35
  */
36
- function ListLobbies200ResponseMeta() {
37
- _classCallCheck(this, ListLobbies200ResponseMeta);
38
- ListLobbies200ResponseMeta.initialize(this);
36
+ function ListLeaderboardRecords200ResponseMeta() {
37
+ _classCallCheck(this, ListLeaderboardRecords200ResponseMeta);
38
+ ListLeaderboardRecords200ResponseMeta.initialize(this);
39
39
  }
40
40
 
41
41
  /**
@@ -43,22 +43,22 @@ var ListLobbies200ResponseMeta = /*#__PURE__*/function () {
43
43
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
44
44
  * Only for internal use.
45
45
  */
46
- return _createClass(ListLobbies200ResponseMeta, null, [{
46
+ return _createClass(ListLeaderboardRecords200ResponseMeta, null, [{
47
47
  key: "initialize",
48
48
  value: function initialize(obj) {}
49
49
 
50
50
  /**
51
- * Constructs a <code>ListLobbies200ResponseMeta</code> from a plain JavaScript object, optionally creating a new instance.
51
+ * Constructs a <code>ListLeaderboardRecords200ResponseMeta</code> from a plain JavaScript object, optionally creating a new instance.
52
52
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
53
53
  * @param {Object} data The plain JavaScript object bearing properties of interest.
54
- * @param {module:model/ListLobbies200ResponseMeta} obj Optional instance to populate.
55
- * @return {module:model/ListLobbies200ResponseMeta} The populated <code>ListLobbies200ResponseMeta</code> instance.
54
+ * @param {module:model/ListLeaderboardRecords200ResponseMeta} obj Optional instance to populate.
55
+ * @return {module:model/ListLeaderboardRecords200ResponseMeta} The populated <code>ListLeaderboardRecords200ResponseMeta</code> instance.
56
56
  */
57
57
  }, {
58
58
  key: "constructFromObject",
59
59
  value: function constructFromObject(data, obj) {
60
60
  if (data) {
61
- obj = obj || new ListLobbies200ResponseMeta();
61
+ obj = obj || new ListLeaderboardRecords200ResponseMeta();
62
62
  if (data.hasOwnProperty('count')) {
63
63
  obj['count'] = _ApiClient["default"].convertToType(data['count'], 'Number');
64
64
  }
@@ -82,9 +82,9 @@ var ListLobbies200ResponseMeta = /*#__PURE__*/function () {
82
82
  }
83
83
 
84
84
  /**
85
- * Validates the JSON data with respect to <code>ListLobbies200ResponseMeta</code>.
85
+ * Validates the JSON data with respect to <code>ListLeaderboardRecords200ResponseMeta</code>.
86
86
  * @param {Object} data The plain JavaScript object bearing properties of interest.
87
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListLobbies200ResponseMeta</code>.
87
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListLeaderboardRecords200ResponseMeta</code>.
88
88
  */
89
89
  }, {
90
90
  key: "validateJSON",
@@ -96,30 +96,30 @@ var ListLobbies200ResponseMeta = /*#__PURE__*/function () {
96
96
  /**
97
97
  * @member {Number} count
98
98
  */
99
- ListLobbies200ResponseMeta.prototype['count'] = undefined;
99
+ ListLeaderboardRecords200ResponseMeta.prototype['count'] = undefined;
100
100
 
101
101
  /**
102
102
  * @member {Boolean} has_more
103
103
  */
104
- ListLobbies200ResponseMeta.prototype['has_more'] = undefined;
104
+ ListLeaderboardRecords200ResponseMeta.prototype['has_more'] = undefined;
105
105
 
106
106
  /**
107
107
  * @member {Number} page
108
108
  */
109
- ListLobbies200ResponseMeta.prototype['page'] = undefined;
109
+ ListLeaderboardRecords200ResponseMeta.prototype['page'] = undefined;
110
110
 
111
111
  /**
112
112
  * @member {Number} page_size
113
113
  */
114
- ListLobbies200ResponseMeta.prototype['page_size'] = undefined;
114
+ ListLeaderboardRecords200ResponseMeta.prototype['page_size'] = undefined;
115
115
 
116
116
  /**
117
117
  * @member {Number} total_count
118
118
  */
119
- ListLobbies200ResponseMeta.prototype['total_count'] = undefined;
119
+ ListLeaderboardRecords200ResponseMeta.prototype['total_count'] = undefined;
120
120
 
121
121
  /**
122
122
  * @member {Number} total_pages
123
123
  */
124
- ListLobbies200ResponseMeta.prototype['total_pages'] = undefined;
125
- var _default = exports["default"] = ListLobbies200ResponseMeta;
124
+ ListLeaderboardRecords200ResponseMeta.prototype['total_pages'] = undefined;
125
+ var _default = exports["default"] = ListLeaderboardRecords200ResponseMeta;
@@ -0,0 +1,124 @@
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 _ListLeaderboardRecords200ResponseMeta = _interopRequireDefault(require("./ListLeaderboardRecords200ResponseMeta"));
9
+ var _ListLeaderboards200ResponseDataInner = _interopRequireDefault(require("./ListLeaderboards200ResponseDataInner"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ 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); }
12
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
13
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
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.319
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
+ * The ListLeaderboards200Response model module.
33
+ * @module model/ListLeaderboards200Response
34
+ * @version 1.0.0
35
+ */
36
+ var ListLeaderboards200Response = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>ListLeaderboards200Response</code>.
39
+ * @alias module:model/ListLeaderboards200Response
40
+ */
41
+ function ListLeaderboards200Response() {
42
+ _classCallCheck(this, ListLeaderboards200Response);
43
+ ListLeaderboards200Response.initialize(this);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(ListLeaderboards200Response, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj) {}
54
+
55
+ /**
56
+ * Constructs a <code>ListLeaderboards200Response</code> from a plain JavaScript object, optionally creating a new instance.
57
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
58
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
59
+ * @param {module:model/ListLeaderboards200Response} obj Optional instance to populate.
60
+ * @return {module:model/ListLeaderboards200Response} The populated <code>ListLeaderboards200Response</code> instance.
61
+ */
62
+ }, {
63
+ key: "constructFromObject",
64
+ value: function constructFromObject(data, obj) {
65
+ if (data) {
66
+ obj = obj || new ListLeaderboards200Response();
67
+ if (data.hasOwnProperty('data')) {
68
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_ListLeaderboards200ResponseDataInner["default"]]);
69
+ }
70
+ if (data.hasOwnProperty('meta')) {
71
+ obj['meta'] = _ListLeaderboardRecords200ResponseMeta["default"].constructFromObject(data['meta']);
72
+ }
73
+ }
74
+ return obj;
75
+ }
76
+
77
+ /**
78
+ * Validates the JSON data with respect to <code>ListLeaderboards200Response</code>.
79
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
80
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListLeaderboards200Response</code>.
81
+ */
82
+ }, {
83
+ key: "validateJSON",
84
+ value: function validateJSON(data) {
85
+ if (data['data']) {
86
+ // data not null
87
+ // ensure the json data is an array
88
+ if (!Array.isArray(data['data'])) {
89
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
90
+ }
91
+ // validate the optional field `data` (array)
92
+ var _iterator = _createForOfIteratorHelper(data['data']),
93
+ _step;
94
+ try {
95
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
96
+ var item = _step.value;
97
+ _ListLeaderboards200ResponseDataInner["default"].validateJSON(item);
98
+ }
99
+ } catch (err) {
100
+ _iterator.e(err);
101
+ } finally {
102
+ _iterator.f();
103
+ }
104
+ ;
105
+ }
106
+ // validate the optional field `meta`
107
+ if (data['meta']) {
108
+ // data not null
109
+ _ListLeaderboardRecords200ResponseMeta["default"].validateJSON(data['meta']);
110
+ }
111
+ return true;
112
+ }
113
+ }]);
114
+ }();
115
+ /**
116
+ * @member {Array.<module:model/ListLeaderboards200ResponseDataInner>} data
117
+ */
118
+ ListLeaderboards200Response.prototype['data'] = undefined;
119
+
120
+ /**
121
+ * @member {module:model/ListLeaderboardRecords200ResponseMeta} meta
122
+ */
123
+ ListLeaderboards200Response.prototype['meta'] = undefined;
124
+ var _default = exports["default"] = ListLeaderboards200Response;