@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
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _OAuthSessionData = _interopRequireDefault(require("./OAuthSessionData"));
8
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
10
  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
11
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -15,7 +16,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
15
16
  * Game Server API
16
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
17
18
  *
18
- * The version of the OpenAPI document: 1.0.296
19
+ * The version of the OpenAPI document: 1.0.319
19
20
  *
20
21
  *
21
22
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -24,18 +25,18 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
24
25
  *
25
26
  */
26
27
  /**
27
- * The Login200ResponseDataUser model module.
28
- * @module model/Login200ResponseDataUser
28
+ * The OauthApiCallback200Response model module.
29
+ * @module model/OauthApiCallback200Response
29
30
  * @version 1.0.0
30
31
  */
31
- var Login200ResponseDataUser = /*#__PURE__*/function () {
32
+ var OauthApiCallback200Response = /*#__PURE__*/function () {
32
33
  /**
33
- * Constructs a new <code>Login200ResponseDataUser</code>.
34
- * @alias module:model/Login200ResponseDataUser
34
+ * Constructs a new <code>OauthApiCallback200Response</code>.
35
+ * @alias module:model/OauthApiCallback200Response
35
36
  */
36
- function Login200ResponseDataUser() {
37
- _classCallCheck(this, Login200ResponseDataUser);
38
- Login200ResponseDataUser.initialize(this);
37
+ function OauthApiCallback200Response() {
38
+ _classCallCheck(this, OauthApiCallback200Response);
39
+ OauthApiCallback200Response.initialize(this);
39
40
  }
40
41
 
41
42
  /**
@@ -43,55 +44,48 @@ var Login200ResponseDataUser = /*#__PURE__*/function () {
43
44
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
44
45
  * Only for internal use.
45
46
  */
46
- return _createClass(Login200ResponseDataUser, null, [{
47
+ return _createClass(OauthApiCallback200Response, null, [{
47
48
  key: "initialize",
48
49
  value: function initialize(obj) {}
49
50
 
50
51
  /**
51
- * Constructs a <code>Login200ResponseDataUser</code> from a plain JavaScript object, optionally creating a new instance.
52
+ * Constructs a <code>OauthApiCallback200Response</code> from a plain JavaScript object, optionally creating a new instance.
52
53
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
53
54
  * @param {Object} data The plain JavaScript object bearing properties of interest.
54
- * @param {module:model/Login200ResponseDataUser} obj Optional instance to populate.
55
- * @return {module:model/Login200ResponseDataUser} The populated <code>Login200ResponseDataUser</code> instance.
55
+ * @param {module:model/OauthApiCallback200Response} obj Optional instance to populate.
56
+ * @return {module:model/OauthApiCallback200Response} The populated <code>OauthApiCallback200Response</code> instance.
56
57
  */
57
58
  }, {
58
59
  key: "constructFromObject",
59
60
  value: function constructFromObject(data, obj) {
60
61
  if (data) {
61
- obj = obj || new Login200ResponseDataUser();
62
- if (data.hasOwnProperty('email')) {
63
- obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
64
- }
65
- if (data.hasOwnProperty('id')) {
66
- obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
62
+ obj = obj || new OauthApiCallback200Response();
63
+ if (data.hasOwnProperty('data')) {
64
+ obj['data'] = _OAuthSessionData["default"].constructFromObject(data['data']);
67
65
  }
68
66
  }
69
67
  return obj;
70
68
  }
71
69
 
72
70
  /**
73
- * Validates the JSON data with respect to <code>Login200ResponseDataUser</code>.
71
+ * Validates the JSON data with respect to <code>OauthApiCallback200Response</code>.
74
72
  * @param {Object} data The plain JavaScript object bearing properties of interest.
75
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Login200ResponseDataUser</code>.
73
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>OauthApiCallback200Response</code>.
76
74
  */
77
75
  }, {
78
76
  key: "validateJSON",
79
77
  value: function validateJSON(data) {
80
- // ensure the json data is a string
81
- if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
82
- throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
78
+ // validate the optional field `data`
79
+ if (data['data']) {
80
+ // data not null
81
+ _OAuthSessionData["default"].validateJSON(data['data']);
83
82
  }
84
83
  return true;
85
84
  }
86
85
  }]);
87
86
  }();
88
87
  /**
89
- * @member {String} email
90
- */
91
- Login200ResponseDataUser.prototype['email'] = undefined;
92
-
93
- /**
94
- * @member {Number} id
88
+ * @member {module:model/OAuthSessionData} data
95
89
  */
96
- Login200ResponseDataUser.prototype['id'] = undefined;
97
- var _default = exports["default"] = Login200ResponseDataUser;
90
+ OauthApiCallback200Response.prototype['data'] = undefined;
91
+ var _default = exports["default"] = OauthApiCallback200Response;
@@ -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).
@@ -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).
@@ -0,0 +1,108 @@
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 QuickJoinRequest model module.
28
+ * @module model/QuickJoinRequest
29
+ * @version 1.0.0
30
+ */
31
+ var QuickJoinRequest = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>QuickJoinRequest</code>.
34
+ * @alias module:model/QuickJoinRequest
35
+ */
36
+ function QuickJoinRequest() {
37
+ _classCallCheck(this, QuickJoinRequest);
38
+ QuickJoinRequest.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(QuickJoinRequest, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>QuickJoinRequest</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/QuickJoinRequest} obj Optional instance to populate.
55
+ * @return {module:model/QuickJoinRequest} The populated <code>QuickJoinRequest</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new QuickJoinRequest();
62
+ if (data.hasOwnProperty('max_users')) {
63
+ obj['max_users'] = _ApiClient["default"].convertToType(data['max_users'], 'Number');
64
+ }
65
+ if (data.hasOwnProperty('metadata')) {
66
+ obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], Object);
67
+ }
68
+ if (data.hasOwnProperty('title')) {
69
+ obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String');
70
+ }
71
+ }
72
+ return obj;
73
+ }
74
+
75
+ /**
76
+ * Validates the JSON data with respect to <code>QuickJoinRequest</code>.
77
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
78
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>QuickJoinRequest</code>.
79
+ */
80
+ }, {
81
+ key: "validateJSON",
82
+ value: function validateJSON(data) {
83
+ // ensure the json data is a string
84
+ if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
85
+ throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
86
+ }
87
+ return true;
88
+ }
89
+ }]);
90
+ }();
91
+ /**
92
+ * Optional maximum users to match/create
93
+ * @member {Number} max_users
94
+ */
95
+ QuickJoinRequest.prototype['max_users'] = undefined;
96
+
97
+ /**
98
+ * Optional metadata to match (substring match)
99
+ * @member {Object} metadata
100
+ */
101
+ QuickJoinRequest.prototype['metadata'] = undefined;
102
+
103
+ /**
104
+ * Optional title for a newly created lobby
105
+ * @member {String} title
106
+ */
107
+ QuickJoinRequest.prototype['title'] = undefined;
108
+ var _default = exports["default"] = QuickJoinRequest;
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _RefreshToken200ResponseData = _interopRequireDefault(require("./RefreshToken200ResponseData"));
8
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
10
  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
11
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -15,7 +16,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
15
16
  * Game Server API
16
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
17
18
  *
18
- * The version of the OpenAPI document: 1.0.296
19
+ * The version of the OpenAPI document: 1.0.319
19
20
  *
20
21
  *
21
22
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -59,11 +60,8 @@ var RefreshToken200Response = /*#__PURE__*/function () {
59
60
  value: function constructFromObject(data, obj) {
60
61
  if (data) {
61
62
  obj = obj || new RefreshToken200Response();
62
- if (data.hasOwnProperty('access_token')) {
63
- obj['access_token'] = _ApiClient["default"].convertToType(data['access_token'], 'String');
64
- }
65
- if (data.hasOwnProperty('expires_in')) {
66
- obj['expires_in'] = _ApiClient["default"].convertToType(data['expires_in'], 'Number');
63
+ if (data.hasOwnProperty('data')) {
64
+ obj['data'] = _RefreshToken200ResponseData["default"].constructFromObject(data['data']);
67
65
  }
68
66
  }
69
67
  return obj;
@@ -77,23 +75,17 @@ var RefreshToken200Response = /*#__PURE__*/function () {
77
75
  }, {
78
76
  key: "validateJSON",
79
77
  value: function validateJSON(data) {
80
- // ensure the json data is a string
81
- if (data['access_token'] && !(typeof data['access_token'] === 'string' || data['access_token'] instanceof String)) {
82
- throw new Error("Expected the field `access_token` to be a primitive type in the JSON string but got " + data['access_token']);
78
+ // validate the optional field `data`
79
+ if (data['data']) {
80
+ // data not null
81
+ _RefreshToken200ResponseData["default"].validateJSON(data['data']);
83
82
  }
84
83
  return true;
85
84
  }
86
85
  }]);
87
86
  }();
88
87
  /**
89
- * New access token
90
- * @member {String} access_token
91
- */
92
- RefreshToken200Response.prototype['access_token'] = undefined;
93
-
94
- /**
95
- * Seconds until expiry
96
- * @member {Number} expires_in
88
+ * @member {module:model/RefreshToken200ResponseData} data
97
89
  */
98
- RefreshToken200Response.prototype['expires_in'] = undefined;
90
+ RefreshToken200Response.prototype['data'] = undefined;
99
91
  var _default = exports["default"] = RefreshToken200Response;
@@ -0,0 +1,99 @@
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 RefreshToken200ResponseData model module.
28
+ * @module model/RefreshToken200ResponseData
29
+ * @version 1.0.0
30
+ */
31
+ var RefreshToken200ResponseData = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>RefreshToken200ResponseData</code>.
34
+ * @alias module:model/RefreshToken200ResponseData
35
+ */
36
+ function RefreshToken200ResponseData() {
37
+ _classCallCheck(this, RefreshToken200ResponseData);
38
+ RefreshToken200ResponseData.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(RefreshToken200ResponseData, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>RefreshToken200ResponseData</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/RefreshToken200ResponseData} obj Optional instance to populate.
55
+ * @return {module:model/RefreshToken200ResponseData} The populated <code>RefreshToken200ResponseData</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new RefreshToken200ResponseData();
62
+ if (data.hasOwnProperty('access_token')) {
63
+ obj['access_token'] = _ApiClient["default"].convertToType(data['access_token'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('expires_in')) {
66
+ obj['expires_in'] = _ApiClient["default"].convertToType(data['expires_in'], 'Number');
67
+ }
68
+ }
69
+ return obj;
70
+ }
71
+
72
+ /**
73
+ * Validates the JSON data with respect to <code>RefreshToken200ResponseData</code>.
74
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
75
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>RefreshToken200ResponseData</code>.
76
+ */
77
+ }, {
78
+ key: "validateJSON",
79
+ value: function validateJSON(data) {
80
+ // ensure the json data is a string
81
+ if (data['access_token'] && !(typeof data['access_token'] === 'string' || data['access_token'] instanceof String)) {
82
+ throw new Error("Expected the field `access_token` to be a primitive type in the JSON string but got " + data['access_token']);
83
+ }
84
+ return true;
85
+ }
86
+ }]);
87
+ }();
88
+ /**
89
+ * New access token
90
+ * @member {String} access_token
91
+ */
92
+ RefreshToken200ResponseData.prototype['access_token'] = undefined;
93
+
94
+ /**
95
+ * Seconds until expiry
96
+ * @member {Number} expires_in
97
+ */
98
+ RefreshToken200ResponseData.prototype['expires_in'] = undefined;
99
+ var _default = exports["default"] = RefreshToken200ResponseData;
@@ -18,7 +18,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
18
18
  * Game Server API
19
19
  * API for Game Server application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### Getting Tokens - **Email/Password**: POST to `/api/v1/login` with email and password - **Device (SDK)**: POST to `/api/v1/login` with a `device_id` string (creates/returns a device user) - **Discord OAuth**: Use `/api/v1/auth/discord` flow - **Google OAuth**: Use `/api/v1/auth/google` flow - **Facebook OAuth**: Use `/api/v1/auth/facebook` flow - **Apple Sign In**: Use `/auth/apple` browser flow or apple sdk flow - **Steam (OpenID)**: Use `/api/v1/auth/steam` flow Both methods return: - `access_token` - Short-lived (15 min), use for API requests - `refresh_token` - Long-lived (30 days), use to get new access tokens ### Using Tokens Include the access token in the Authorization header: ``` Authorization: Bearer <access_token> ``` ### Refreshing Tokens When your access token expires, use POST `/api/v1/refresh` with your refresh token to get a new access token. ## Users Users endpoints cover the user lifecycle and profile features. Key highlights: - **Registration and login** (email/password, device token for SDKs, and OAuth providers) - **Profile metadata** (JSON blob per user) and editable profile fields - **Account lifecycle**: password reset, email confirmation, and account deletion - **Sessions & tokens**: both browser sessions and JWT-based API tokens are supported ## Friends The Friends domain offers lightweight social features: - **Friend requests** (send / accept / reject / block flows) - **Friend listing & pagination**, with basic privacy controls - **Domain helpers** to manage and query friend relationships from API or UI contexts ## Lobbies Lobbies provide matchmaking / room management primitives. Highlights: - **Create / list / update / delete** lobbies with rich metadata (mode, region, tags) - **Host-managed or hostless** modes (hostless allowed internally, not creatable via public API) - **Membership management**: join, leave, kick users, and automatic host transfer - **Controls & protection**: max users, hidden/locked states, and optional password protection - **Hidden lobbies** are excluded from public listings; public listing endpoints are paginated
20
20
  *
21
- * The version of the OpenAPI document: 1.0.296
21
+ * The version of the OpenAPI document: 1.0.319
22
22
  *
23
23
  *
24
24
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -18,7 +18,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
18
18
  * Game Server API
19
19
  * API for Game Server application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### Getting Tokens - **Email/Password**: POST to `/api/v1/login` with email and password - **Device (SDK)**: POST to `/api/v1/login` with a `device_id` string (creates/returns a device user) - **Discord OAuth**: Use `/api/v1/auth/discord` flow - **Google OAuth**: Use `/api/v1/auth/google` flow - **Facebook OAuth**: Use `/api/v1/auth/facebook` flow - **Apple Sign In**: Use `/auth/apple` browser flow or apple sdk flow - **Steam (OpenID)**: Use `/api/v1/auth/steam` flow Both methods return: - `access_token` - Short-lived (15 min), use for API requests - `refresh_token` - Long-lived (30 days), use to get new access tokens ### Using Tokens Include the access token in the Authorization header: ``` Authorization: Bearer <access_token> ``` ### Refreshing Tokens When your access token expires, use POST `/api/v1/refresh` with your refresh token to get a new access token. ## Users Users endpoints cover the user lifecycle and profile features. Key highlights: - **Registration and login** (email/password, device token for SDKs, and OAuth providers) - **Profile metadata** (JSON blob per user) and editable profile fields - **Account lifecycle**: password reset, email confirmation, and account deletion - **Sessions & tokens**: both browser sessions and JWT-based API tokens are supported ## Friends The Friends domain offers lightweight social features: - **Friend requests** (send / accept / reject / block flows) - **Friend listing & pagination**, with basic privacy controls - **Domain helpers** to manage and query friend relationships from API or UI contexts ## Lobbies Lobbies provide matchmaking / room management primitives. Highlights: - **Create / list / update / delete** lobbies with rich metadata (mode, region, tags) - **Host-managed or hostless** modes (hostless allowed internally, not creatable via public API) - **Membership management**: join, leave, kick users, and automatic host transfer - **Controls & protection**: max users, hidden/locked states, and optional password protection - **Hidden lobbies** are excluded from public listings; public listing endpoints are paginated
20
20
  *
21
- * The version of the OpenAPI document: 1.0.296
21
+ * The version of the OpenAPI document: 1.0.319
22
22
  *
23
23
  *
24
24
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -18,7 +18,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
18
18
  * Game Server API
19
19
  * API for Game Server application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### Getting Tokens - **Email/Password**: POST to `/api/v1/login` with email and password - **Device (SDK)**: POST to `/api/v1/login` with a `device_id` string (creates/returns a device user) - **Discord OAuth**: Use `/api/v1/auth/discord` flow - **Google OAuth**: Use `/api/v1/auth/google` flow - **Facebook OAuth**: Use `/api/v1/auth/facebook` flow - **Apple Sign In**: Use `/auth/apple` browser flow or apple sdk flow - **Steam (OpenID)**: Use `/api/v1/auth/steam` flow Both methods return: - `access_token` - Short-lived (15 min), use for API requests - `refresh_token` - Long-lived (30 days), use to get new access tokens ### Using Tokens Include the access token in the Authorization header: ``` Authorization: Bearer <access_token> ``` ### Refreshing Tokens When your access token expires, use POST `/api/v1/refresh` with your refresh token to get a new access token. ## Users Users endpoints cover the user lifecycle and profile features. Key highlights: - **Registration and login** (email/password, device token for SDKs, and OAuth providers) - **Profile metadata** (JSON blob per user) and editable profile fields - **Account lifecycle**: password reset, email confirmation, and account deletion - **Sessions & tokens**: both browser sessions and JWT-based API tokens are supported ## Friends The Friends domain offers lightweight social features: - **Friend requests** (send / accept / reject / block flows) - **Friend listing & pagination**, with basic privacy controls - **Domain helpers** to manage and query friend relationships from API or UI contexts ## Lobbies Lobbies provide matchmaking / room management primitives. Highlights: - **Create / list / update / delete** lobbies with rich metadata (mode, region, tags) - **Host-managed or hostless** modes (hostless allowed internally, not creatable via public API) - **Membership management**: join, leave, kick users, and automatic host transfer - **Controls & protection**: max users, hidden/locked states, and optional password protection - **Hidden lobbies** are excluded from public listings; public listing endpoints are paginated
20
20
  *
21
- * The version of the OpenAPI document: 1.0.296
21
+ * The version of the OpenAPI document: 1.0.319
22
22
  *
23
23
  *
24
24
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ughuuu/game_server",
3
- "version": "1.0.296",
3
+ "version": "1.0.319",
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 - **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 ",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",