@ughuuu/game_server 1.0.128 → 1.0.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -163,7 +163,6 @@ Class | Method | HTTP request | Description
|
|
|
163
163
|
## Documentation for Models
|
|
164
164
|
|
|
165
165
|
- [UghuuuGameServer.GetCurrentUser200Response](docs/GetCurrentUser200Response.md)
|
|
166
|
-
- [UghuuuGameServer.GetCurrentUser200ResponseData](docs/GetCurrentUser200ResponseData.md)
|
|
167
166
|
- [UghuuuGameServer.HealthResponse](docs/HealthResponse.md)
|
|
168
167
|
- [UghuuuGameServer.Login200Response](docs/Login200Response.md)
|
|
169
168
|
- [UghuuuGameServer.Login200ResponseData](docs/Login200ResponseData.md)
|
package/dist/index.js
CHANGED
|
@@ -21,12 +21,6 @@ Object.defineProperty(exports, "GetCurrentUser200Response", {
|
|
|
21
21
|
return _GetCurrentUser200Response["default"];
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(exports, "GetCurrentUser200ResponseData", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _GetCurrentUser200ResponseData["default"];
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
24
|
Object.defineProperty(exports, "HealthApi", {
|
|
31
25
|
enumerable: true,
|
|
32
26
|
get: function get() {
|
|
@@ -107,7 +101,6 @@ Object.defineProperty(exports, "UsersApi", {
|
|
|
107
101
|
});
|
|
108
102
|
var _ApiClient = _interopRequireDefault(require("./ApiClient"));
|
|
109
103
|
var _GetCurrentUser200Response = _interopRequireDefault(require("./model/GetCurrentUser200Response"));
|
|
110
|
-
var _GetCurrentUser200ResponseData = _interopRequireDefault(require("./model/GetCurrentUser200ResponseData"));
|
|
111
104
|
var _HealthResponse = _interopRequireDefault(require("./model/HealthResponse"));
|
|
112
105
|
var _Login200Response = _interopRequireDefault(require("./model/Login200Response"));
|
|
113
106
|
var _Login200ResponseData = _interopRequireDefault(require("./model/Login200ResponseData"));
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var _GetCurrentUser200ResponseData = _interopRequireDefault(require("./GetCurrentUser200ResponseData"));
|
|
9
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
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); }
|
|
11
10
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -60,8 +59,17 @@ var GetCurrentUser200Response = /*#__PURE__*/function () {
|
|
|
60
59
|
value: function constructFromObject(data, obj) {
|
|
61
60
|
if (data) {
|
|
62
61
|
obj = obj || new GetCurrentUser200Response();
|
|
63
|
-
if (data.hasOwnProperty('
|
|
64
|
-
obj['
|
|
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('metadata')) {
|
|
69
|
+
obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], Object);
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('profile_url')) {
|
|
72
|
+
obj['profile_url'] = _ApiClient["default"].convertToType(data['profile_url'], 'String');
|
|
65
73
|
}
|
|
66
74
|
}
|
|
67
75
|
return obj;
|
|
@@ -75,17 +83,35 @@ var GetCurrentUser200Response = /*#__PURE__*/function () {
|
|
|
75
83
|
}, {
|
|
76
84
|
key: "validateJSON",
|
|
77
85
|
value: function validateJSON(data) {
|
|
78
|
-
//
|
|
79
|
-
if (data['data']) {
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
// ensure the json data is a string
|
|
87
|
+
if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
|
|
88
|
+
throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
|
|
89
|
+
}
|
|
90
|
+
// ensure the json data is a string
|
|
91
|
+
if (data['profile_url'] && !(typeof data['profile_url'] === 'string' || data['profile_url'] instanceof String)) {
|
|
92
|
+
throw new Error("Expected the field `profile_url` to be a primitive type in the JSON string but got " + data['profile_url']);
|
|
82
93
|
}
|
|
83
94
|
return true;
|
|
84
95
|
}
|
|
85
96
|
}]);
|
|
86
97
|
}();
|
|
87
98
|
/**
|
|
88
|
-
* @member {
|
|
99
|
+
* @member {String} email
|
|
100
|
+
*/
|
|
101
|
+
GetCurrentUser200Response.prototype['email'] = undefined;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @member {Number} id
|
|
105
|
+
*/
|
|
106
|
+
GetCurrentUser200Response.prototype['id'] = undefined;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @member {Object} metadata
|
|
110
|
+
*/
|
|
111
|
+
GetCurrentUser200Response.prototype['metadata'] = undefined;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @member {String} profile_url
|
|
89
115
|
*/
|
|
90
|
-
GetCurrentUser200Response.prototype['
|
|
116
|
+
GetCurrentUser200Response.prototype['profile_url'] = undefined;
|
|
91
117
|
var _default = exports["default"] = GetCurrentUser200Response;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ughuuu/game_server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.130",
|
|
4
4
|
"description": "API for Game Server application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### Getting Tokens - **Email/Password**: POST to `/api/v1/login` with email and password - **Discord OAuth**: Use `/api/v1/auth/discord` flow - **Google OAuth**: Use `/api/v1/auth/google` flow - **Facebook OAuth**: Use `/api/v1/auth/facebook` flow - **Apple Sign In**: Use `/auth/apple` browser flow (API flow not yet implemented) Both methods return: - `access_token` - Short-lived (15 min), use for API requests - `refresh_token` - Long-lived (30 days), use to get new access tokens ### Using Tokens Include the access token in the Authorization header: ``` Authorization: Bearer <access_token> ``` ### Refreshing Tokens When your access token expires, use POST `/api/v1/refresh` with your refresh token to get a new access token. ## Endpoints All API endpoints are under `/api/v1` ",
|
|
5
5
|
"license": "Unlicense",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -1,125 +0,0 @@
|
|
|
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 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;
|