@ughuuu/game_server 1.0.0

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 (36) hide show
  1. package/README.md +188 -0
  2. package/dist/ApiClient.js +703 -0
  3. package/dist/api/AuthenticationApi.js +340 -0
  4. package/dist/api/HealthApi.js +78 -0
  5. package/dist/api/UsersApi.js +127 -0
  6. package/dist/index.js +125 -0
  7. package/dist/model/GameServerWebApiV1MeControllerShow200Response.js +91 -0
  8. package/dist/model/GameServerWebApiV1MeControllerShow200ResponseData.js +125 -0
  9. package/dist/model/GameServerWebApiV1SessionControllerCreate200Response.js +91 -0
  10. package/dist/model/GameServerWebApiV1SessionControllerCreate200ResponseData.js +139 -0
  11. package/dist/model/GameServerWebApiV1SessionControllerCreate200ResponseDataUser.js +97 -0
  12. package/dist/model/GameServerWebApiV1SessionControllerCreateRequest.js +128 -0
  13. package/dist/model/GameServerWebApiV1SessionControllerDelete200Response.js +89 -0
  14. package/dist/model/GameServerWebApiV1SessionControllerRefresh200Response.js +91 -0
  15. package/dist/model/GameServerWebApiV1SessionControllerRefresh200ResponseData.js +126 -0
  16. package/dist/model/GameServerWebApiV1SessionControllerRefreshRequest.js +113 -0
  17. package/dist/model/GameServerWebAuthControllerApiCallback200Response.js +91 -0
  18. package/dist/model/GameServerWebAuthControllerApiCallback200ResponseData.js +139 -0
  19. package/dist/model/GameServerWebAuthControllerApiCallback200ResponseDataUser.js +109 -0
  20. package/dist/model/GameServerWebAuthControllerApiCallback409Response.js +97 -0
  21. package/dist/model/GameServerWebAuthControllerApiRequest200Response.js +103 -0
  22. package/dist/model/GameServerWebAuthControllerApiSessionStatus200Response.js +140 -0
  23. package/dist/model/GetCurrentUser200Response.js +91 -0
  24. package/dist/model/GetCurrentUser200ResponseData.js +125 -0
  25. package/dist/model/HealthResponse.js +129 -0
  26. package/dist/model/Login200Response.js +91 -0
  27. package/dist/model/Login200ResponseData.js +139 -0
  28. package/dist/model/Login200ResponseDataUser.js +97 -0
  29. package/dist/model/LoginRequest.js +128 -0
  30. package/dist/model/Logout200Response.js +89 -0
  31. package/dist/model/OauthRequest200Response.js +103 -0
  32. package/dist/model/OauthSessionStatus200Response.js +140 -0
  33. package/dist/model/RefreshToken200Response.js +91 -0
  34. package/dist/model/RefreshToken200ResponseData.js +126 -0
  35. package/dist/model/RefreshTokenRequest.js +113 -0
  36. package/package.json +46 -0
@@ -0,0 +1,140 @@
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 - **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`
17
+ *
18
+ * The version of the OpenAPI document: 1.0.0
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 GameServerWebAuthControllerApiSessionStatus200Response model module.
28
+ * @module model/GameServerWebAuthControllerApiSessionStatus200Response
29
+ * @version 1.0.0
30
+ */
31
+ var GameServerWebAuthControllerApiSessionStatus200Response = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>GameServerWebAuthControllerApiSessionStatus200Response</code>.
34
+ * @alias module:model/GameServerWebAuthControllerApiSessionStatus200Response
35
+ */
36
+ function GameServerWebAuthControllerApiSessionStatus200Response() {
37
+ _classCallCheck(this, GameServerWebAuthControllerApiSessionStatus200Response);
38
+ GameServerWebAuthControllerApiSessionStatus200Response.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(GameServerWebAuthControllerApiSessionStatus200Response, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>GameServerWebAuthControllerApiSessionStatus200Response</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/GameServerWebAuthControllerApiSessionStatus200Response} obj Optional instance to populate.
55
+ * @return {module:model/GameServerWebAuthControllerApiSessionStatus200Response} The populated <code>GameServerWebAuthControllerApiSessionStatus200Response</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new GameServerWebAuthControllerApiSessionStatus200Response();
62
+ if (data.hasOwnProperty('data')) {
63
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], Object);
64
+ }
65
+ if (data.hasOwnProperty('message')) {
66
+ obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String');
67
+ }
68
+ if (data.hasOwnProperty('status')) {
69
+ obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
70
+ }
71
+ }
72
+ return obj;
73
+ }
74
+
75
+ /**
76
+ * Validates the JSON data with respect to <code>GameServerWebAuthControllerApiSessionStatus200Response</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>GameServerWebAuthControllerApiSessionStatus200Response</code>.
79
+ */
80
+ }, {
81
+ key: "validateJSON",
82
+ value: function validateJSON(data) {
83
+ // ensure the json data is a string
84
+ if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
85
+ throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
86
+ }
87
+ // ensure the json data is a string
88
+ if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
89
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
90
+ }
91
+ return true;
92
+ }
93
+ }]);
94
+ }();
95
+ /**
96
+ * Session data when completed
97
+ * @member {Object} data
98
+ */
99
+ GameServerWebAuthControllerApiSessionStatus200Response.prototype['data'] = undefined;
100
+
101
+ /**
102
+ * Optional status message
103
+ * @member {String} message
104
+ */
105
+ GameServerWebAuthControllerApiSessionStatus200Response.prototype['message'] = undefined;
106
+
107
+ /**
108
+ * Current session status
109
+ * @member {module:model/GameServerWebAuthControllerApiSessionStatus200Response.StatusEnum} status
110
+ */
111
+ GameServerWebAuthControllerApiSessionStatus200Response.prototype['status'] = undefined;
112
+
113
+ /**
114
+ * Allowed values for the <code>status</code> property.
115
+ * @enum {String}
116
+ * @readonly
117
+ */
118
+ GameServerWebAuthControllerApiSessionStatus200Response['StatusEnum'] = {
119
+ /**
120
+ * value: "pending"
121
+ * @const
122
+ */
123
+ "pending": "pending",
124
+ /**
125
+ * value: "completed"
126
+ * @const
127
+ */
128
+ "completed": "completed",
129
+ /**
130
+ * value: "error"
131
+ * @const
132
+ */
133
+ "error": "error",
134
+ /**
135
+ * value: "conflict"
136
+ * @const
137
+ */
138
+ "conflict": "conflict"
139
+ };
140
+ var _default = exports["default"] = GameServerWebAuthControllerApiSessionStatus200Response;
@@ -0,0 +1,91 @@
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 _GetCurrentUser200ResponseData = _interopRequireDefault(require("./GetCurrentUser200ResponseData"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
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); }
11
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
12
+ 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); } }
13
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
16
+ * Game Server
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 - **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`
18
+ *
19
+ * The version of the OpenAPI document: 1.0.0
20
+ *
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * The GetCurrentUser200Response model module.
29
+ * @module model/GetCurrentUser200Response
30
+ * @version 1.0.0
31
+ */
32
+ var GetCurrentUser200Response = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>GetCurrentUser200Response</code>.
35
+ * @alias module:model/GetCurrentUser200Response
36
+ */
37
+ function GetCurrentUser200Response() {
38
+ _classCallCheck(this, GetCurrentUser200Response);
39
+ GetCurrentUser200Response.initialize(this);
40
+ }
41
+
42
+ /**
43
+ * Initializes the fields of this object.
44
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
45
+ * Only for internal use.
46
+ */
47
+ return _createClass(GetCurrentUser200Response, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj) {}
50
+
51
+ /**
52
+ * Constructs a <code>GetCurrentUser200Response</code> from a plain JavaScript object, optionally creating a new instance.
53
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
54
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
55
+ * @param {module:model/GetCurrentUser200Response} obj Optional instance to populate.
56
+ * @return {module:model/GetCurrentUser200Response} The populated <code>GetCurrentUser200Response</code> instance.
57
+ */
58
+ }, {
59
+ key: "constructFromObject",
60
+ value: function constructFromObject(data, obj) {
61
+ if (data) {
62
+ obj = obj || new GetCurrentUser200Response();
63
+ if (data.hasOwnProperty('data')) {
64
+ obj['data'] = _GetCurrentUser200ResponseData["default"].constructFromObject(data['data']);
65
+ }
66
+ }
67
+ return obj;
68
+ }
69
+
70
+ /**
71
+ * Validates the JSON data with respect to <code>GetCurrentUser200Response</code>.
72
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
73
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetCurrentUser200Response</code>.
74
+ */
75
+ }, {
76
+ key: "validateJSON",
77
+ value: function validateJSON(data) {
78
+ // validate the optional field `data`
79
+ if (data['data']) {
80
+ // data not null
81
+ _GetCurrentUser200ResponseData["default"].validateJSON(data['data']);
82
+ }
83
+ return true;
84
+ }
85
+ }]);
86
+ }();
87
+ /**
88
+ * @member {module:model/GetCurrentUser200ResponseData} data
89
+ */
90
+ GetCurrentUser200Response.prototype['data'] = undefined;
91
+ var _default = exports["default"] = GetCurrentUser200Response;
@@ -0,0 +1,125 @@
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
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 - **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`
17
+ *
18
+ * The version of the OpenAPI document: 1.0.0
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 GetCurrentUser200ResponseData model module.
28
+ * @module model/GetCurrentUser200ResponseData
29
+ * @version 1.0.0
30
+ */
31
+ var GetCurrentUser200ResponseData = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>GetCurrentUser200ResponseData</code>.
34
+ * @alias module:model/GetCurrentUser200ResponseData
35
+ */
36
+ function GetCurrentUser200ResponseData() {
37
+ _classCallCheck(this, GetCurrentUser200ResponseData);
38
+ GetCurrentUser200ResponseData.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(GetCurrentUser200ResponseData, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>GetCurrentUser200ResponseData</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/GetCurrentUser200ResponseData} obj Optional instance to populate.
55
+ * @return {module:model/GetCurrentUser200ResponseData} The populated <code>GetCurrentUser200ResponseData</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new GetCurrentUser200ResponseData();
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');
67
+ }
68
+ if (data.hasOwnProperty('is_admin')) {
69
+ obj['is_admin'] = _ApiClient["default"].convertToType(data['is_admin'], 'Boolean');
70
+ }
71
+ if (data.hasOwnProperty('metadata')) {
72
+ obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], Object);
73
+ }
74
+ if (data.hasOwnProperty('profile_url')) {
75
+ obj['profile_url'] = _ApiClient["default"].convertToType(data['profile_url'], 'String');
76
+ }
77
+ }
78
+ return obj;
79
+ }
80
+
81
+ /**
82
+ * Validates the JSON data with respect to <code>GetCurrentUser200ResponseData</code>.
83
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
84
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetCurrentUser200ResponseData</code>.
85
+ */
86
+ }, {
87
+ key: "validateJSON",
88
+ value: function validateJSON(data) {
89
+ // ensure the json data is a string
90
+ if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
91
+ throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
92
+ }
93
+ // ensure the json data is a string
94
+ if (data['profile_url'] && !(typeof data['profile_url'] === 'string' || data['profile_url'] instanceof String)) {
95
+ throw new Error("Expected the field `profile_url` to be a primitive type in the JSON string but got " + data['profile_url']);
96
+ }
97
+ return true;
98
+ }
99
+ }]);
100
+ }();
101
+ /**
102
+ * @member {String} email
103
+ */
104
+ GetCurrentUser200ResponseData.prototype['email'] = undefined;
105
+
106
+ /**
107
+ * @member {Number} id
108
+ */
109
+ GetCurrentUser200ResponseData.prototype['id'] = undefined;
110
+
111
+ /**
112
+ * @member {Boolean} is_admin
113
+ */
114
+ GetCurrentUser200ResponseData.prototype['is_admin'] = undefined;
115
+
116
+ /**
117
+ * @member {Object} metadata
118
+ */
119
+ GetCurrentUser200ResponseData.prototype['metadata'] = undefined;
120
+
121
+ /**
122
+ * @member {String} profile_url
123
+ */
124
+ GetCurrentUser200ResponseData.prototype['profile_url'] = undefined;
125
+ var _default = exports["default"] = GetCurrentUser200ResponseData;
@@ -0,0 +1,129 @@
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 _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; } } }; }
11
+ 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; } }
12
+ 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; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ 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); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
+ * Game Server
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 - **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`
20
+ *
21
+ * The version of the OpenAPI document: 1.0.0
22
+ *
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The HealthResponse model module.
31
+ * @module model/HealthResponse
32
+ * @version 1.0.0
33
+ */
34
+ var HealthResponse = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>HealthResponse</code>.
37
+ * Response from health check endpoint
38
+ * @alias module:model/HealthResponse
39
+ * @param status {String} Health status
40
+ * @param timestamp {String} Current timestamp
41
+ */
42
+ function HealthResponse(status, timestamp) {
43
+ _classCallCheck(this, HealthResponse);
44
+ HealthResponse.initialize(this, status, timestamp);
45
+ }
46
+
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+ return _createClass(HealthResponse, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, status, timestamp) {
55
+ obj['status'] = status;
56
+ obj['timestamp'] = timestamp;
57
+ }
58
+
59
+ /**
60
+ * Constructs a <code>HealthResponse</code> from a plain JavaScript object, optionally creating a new instance.
61
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
62
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
63
+ * @param {module:model/HealthResponse} obj Optional instance to populate.
64
+ * @return {module:model/HealthResponse} The populated <code>HealthResponse</code> instance.
65
+ */
66
+ }, {
67
+ key: "constructFromObject",
68
+ value: function constructFromObject(data, obj) {
69
+ if (data) {
70
+ obj = obj || new HealthResponse();
71
+ if (data.hasOwnProperty('status')) {
72
+ obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('timestamp')) {
75
+ obj['timestamp'] = _ApiClient["default"].convertToType(data['timestamp'], 'String');
76
+ }
77
+ }
78
+ return obj;
79
+ }
80
+
81
+ /**
82
+ * Validates the JSON data with respect to <code>HealthResponse</code>.
83
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
84
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>HealthResponse</code>.
85
+ */
86
+ }, {
87
+ key: "validateJSON",
88
+ value: function validateJSON(data) {
89
+ // check to make sure all required properties are present in the JSON string
90
+ var _iterator = _createForOfIteratorHelper(HealthResponse.RequiredProperties),
91
+ _step;
92
+ try {
93
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
94
+ var property = _step.value;
95
+ if (!data.hasOwnProperty(property)) {
96
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
97
+ }
98
+ }
99
+ // ensure the json data is a string
100
+ } catch (err) {
101
+ _iterator.e(err);
102
+ } finally {
103
+ _iterator.f();
104
+ }
105
+ if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
106
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
107
+ }
108
+ // ensure the json data is a string
109
+ if (data['timestamp'] && !(typeof data['timestamp'] === 'string' || data['timestamp'] instanceof String)) {
110
+ throw new Error("Expected the field `timestamp` to be a primitive type in the JSON string but got " + data['timestamp']);
111
+ }
112
+ return true;
113
+ }
114
+ }]);
115
+ }();
116
+ HealthResponse.RequiredProperties = ["status", "timestamp"];
117
+
118
+ /**
119
+ * Health status
120
+ * @member {String} status
121
+ */
122
+ HealthResponse.prototype['status'] = undefined;
123
+
124
+ /**
125
+ * Current timestamp
126
+ * @member {String} timestamp
127
+ */
128
+ HealthResponse.prototype['timestamp'] = undefined;
129
+ var _default = exports["default"] = HealthResponse;
@@ -0,0 +1,91 @@
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 _Login200ResponseData = _interopRequireDefault(require("./Login200ResponseData"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
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); }
11
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
12
+ 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); } }
13
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
16
+ * Game Server
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 - **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`
18
+ *
19
+ * The version of the OpenAPI document: 1.0.0
20
+ *
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * The Login200Response model module.
29
+ * @module model/Login200Response
30
+ * @version 1.0.0
31
+ */
32
+ var Login200Response = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>Login200Response</code>.
35
+ * @alias module:model/Login200Response
36
+ */
37
+ function Login200Response() {
38
+ _classCallCheck(this, Login200Response);
39
+ Login200Response.initialize(this);
40
+ }
41
+
42
+ /**
43
+ * Initializes the fields of this object.
44
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
45
+ * Only for internal use.
46
+ */
47
+ return _createClass(Login200Response, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj) {}
50
+
51
+ /**
52
+ * Constructs a <code>Login200Response</code> from a plain JavaScript object, optionally creating a new instance.
53
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
54
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
55
+ * @param {module:model/Login200Response} obj Optional instance to populate.
56
+ * @return {module:model/Login200Response} The populated <code>Login200Response</code> instance.
57
+ */
58
+ }, {
59
+ key: "constructFromObject",
60
+ value: function constructFromObject(data, obj) {
61
+ if (data) {
62
+ obj = obj || new Login200Response();
63
+ if (data.hasOwnProperty('data')) {
64
+ obj['data'] = _Login200ResponseData["default"].constructFromObject(data['data']);
65
+ }
66
+ }
67
+ return obj;
68
+ }
69
+
70
+ /**
71
+ * Validates the JSON data with respect to <code>Login200Response</code>.
72
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
73
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Login200Response</code>.
74
+ */
75
+ }, {
76
+ key: "validateJSON",
77
+ value: function validateJSON(data) {
78
+ // validate the optional field `data`
79
+ if (data['data']) {
80
+ // data not null
81
+ _Login200ResponseData["default"].validateJSON(data['data']);
82
+ }
83
+ return true;
84
+ }
85
+ }]);
86
+ }();
87
+ /**
88
+ * @member {module:model/Login200ResponseData} data
89
+ */
90
+ Login200Response.prototype['data'] = undefined;
91
+ var _default = exports["default"] = Login200Response;