@ughuuu/game_server 1.0.151 → 1.0.155
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 +24 -4
- package/dist/api/FriendsApi.js +402 -0
- package/dist/api/LobbiesApi.js +26 -22
- package/dist/api/UsersApi.js +85 -0
- package/dist/index.js +86 -16
- package/dist/model/CreateFriendRequestRequest.js +109 -0
- package/dist/model/ListBlockedFriends200Response.js +124 -0
- package/dist/model/{JoinLobby200Response.js → ListBlockedFriends200ResponseDataInner.js} +33 -23
- package/dist/model/ListBlockedFriends200ResponseDataInnerRequester.js +109 -0
- package/dist/model/ListFriendRequests200Response.js +153 -0
- package/dist/model/ListFriendRequests200ResponseIncomingInner.js +136 -0
- package/dist/model/{KickUser200Response.js → ListFriendRequests200ResponseIncomingInnerRequester.js} +30 -22
- package/dist/model/ListFriendRequests200ResponseMeta.js +125 -0
- package/dist/model/ListFriends200Response.js +124 -0
- package/dist/model/ListFriends200ResponseDataInner.js +121 -0
- package/dist/model/ListLobbies200Response.js +124 -0
- package/dist/model/{ListLobbies200ResponseInner.js → ListLobbies200ResponseDataInner.js} +24 -24
- package/dist/model/{LeaveLobby200Response.js → ListLobbies200ResponseMeta.js} +60 -24
- package/package.json +1 -1
|
@@ -0,0 +1,109 @@
|
|
|
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 ListBlockedFriends200ResponseDataInnerRequester model module.
|
|
28
|
+
* @module model/ListBlockedFriends200ResponseDataInnerRequester
|
|
29
|
+
* @version 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
var ListBlockedFriends200ResponseDataInnerRequester = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>ListBlockedFriends200ResponseDataInnerRequester</code>.
|
|
34
|
+
* @alias module:model/ListBlockedFriends200ResponseDataInnerRequester
|
|
35
|
+
*/
|
|
36
|
+
function ListBlockedFriends200ResponseDataInnerRequester() {
|
|
37
|
+
_classCallCheck(this, ListBlockedFriends200ResponseDataInnerRequester);
|
|
38
|
+
ListBlockedFriends200ResponseDataInnerRequester.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(ListBlockedFriends200ResponseDataInnerRequester, null, [{
|
|
47
|
+
key: "initialize",
|
|
48
|
+
value: function initialize(obj) {}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Constructs a <code>ListBlockedFriends200ResponseDataInnerRequester</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/ListBlockedFriends200ResponseDataInnerRequester} obj Optional instance to populate.
|
|
55
|
+
* @return {module:model/ListBlockedFriends200ResponseDataInnerRequester} The populated <code>ListBlockedFriends200ResponseDataInnerRequester</code> instance.
|
|
56
|
+
*/
|
|
57
|
+
}, {
|
|
58
|
+
key: "constructFromObject",
|
|
59
|
+
value: function constructFromObject(data, obj) {
|
|
60
|
+
if (data) {
|
|
61
|
+
obj = obj || new ListBlockedFriends200ResponseDataInnerRequester();
|
|
62
|
+
if (data.hasOwnProperty('display_name')) {
|
|
63
|
+
obj['display_name'] = _ApiClient["default"].convertToType(data['display_name'], 'String');
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('email')) {
|
|
66
|
+
obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('id')) {
|
|
69
|
+
obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return obj;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Validates the JSON data with respect to <code>ListBlockedFriends200ResponseDataInnerRequester</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>ListBlockedFriends200ResponseDataInnerRequester</code>.
|
|
79
|
+
*/
|
|
80
|
+
}, {
|
|
81
|
+
key: "validateJSON",
|
|
82
|
+
value: function validateJSON(data) {
|
|
83
|
+
// ensure the json data is a string
|
|
84
|
+
if (data['display_name'] && !(typeof data['display_name'] === 'string' || data['display_name'] instanceof String)) {
|
|
85
|
+
throw new Error("Expected the field `display_name` to be a primitive type in the JSON string but got " + data['display_name']);
|
|
86
|
+
}
|
|
87
|
+
// ensure the json data is a string
|
|
88
|
+
if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
|
|
89
|
+
throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
|
|
90
|
+
}
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
}]);
|
|
94
|
+
}();
|
|
95
|
+
/**
|
|
96
|
+
* @member {String} display_name
|
|
97
|
+
*/
|
|
98
|
+
ListBlockedFriends200ResponseDataInnerRequester.prototype['display_name'] = undefined;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @member {String} email
|
|
102
|
+
*/
|
|
103
|
+
ListBlockedFriends200ResponseDataInnerRequester.prototype['email'] = undefined;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @member {Number} id
|
|
107
|
+
*/
|
|
108
|
+
ListBlockedFriends200ResponseDataInnerRequester.prototype['id'] = undefined;
|
|
109
|
+
var _default = exports["default"] = ListBlockedFriends200ResponseDataInnerRequester;
|
|
@@ -0,0 +1,153 @@
|
|
|
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 _ListFriendRequests200ResponseIncomingInner = _interopRequireDefault(require("./ListFriendRequests200ResponseIncomingInner"));
|
|
9
|
+
var _ListFriendRequests200ResponseMeta = _interopRequireDefault(require("./ListFriendRequests200ResponseMeta"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
20
|
+
* Game Server API
|
|
21
|
+
* API for Game Server application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### Getting Tokens - **Email/Password**: POST to `/api/v1/login` with email and password - **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`
|
|
22
|
+
*
|
|
23
|
+
* The version of the OpenAPI document: 1.0.0
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
|
+
* https://openapi-generator.tech
|
|
28
|
+
* Do not edit the class manually.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The ListFriendRequests200Response model module.
|
|
33
|
+
* @module model/ListFriendRequests200Response
|
|
34
|
+
* @version 1.0.0
|
|
35
|
+
*/
|
|
36
|
+
var ListFriendRequests200Response = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>ListFriendRequests200Response</code>.
|
|
39
|
+
* @alias module:model/ListFriendRequests200Response
|
|
40
|
+
*/
|
|
41
|
+
function ListFriendRequests200Response() {
|
|
42
|
+
_classCallCheck(this, ListFriendRequests200Response);
|
|
43
|
+
ListFriendRequests200Response.initialize(this);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Initializes the fields of this object.
|
|
48
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
49
|
+
* Only for internal use.
|
|
50
|
+
*/
|
|
51
|
+
return _createClass(ListFriendRequests200Response, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj) {}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Constructs a <code>ListFriendRequests200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
57
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
58
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
59
|
+
* @param {module:model/ListFriendRequests200Response} obj Optional instance to populate.
|
|
60
|
+
* @return {module:model/ListFriendRequests200Response} The populated <code>ListFriendRequests200Response</code> instance.
|
|
61
|
+
*/
|
|
62
|
+
}, {
|
|
63
|
+
key: "constructFromObject",
|
|
64
|
+
value: function constructFromObject(data, obj) {
|
|
65
|
+
if (data) {
|
|
66
|
+
obj = obj || new ListFriendRequests200Response();
|
|
67
|
+
if (data.hasOwnProperty('incoming')) {
|
|
68
|
+
obj['incoming'] = _ApiClient["default"].convertToType(data['incoming'], [_ListFriendRequests200ResponseIncomingInner["default"]]);
|
|
69
|
+
}
|
|
70
|
+
if (data.hasOwnProperty('meta')) {
|
|
71
|
+
obj['meta'] = _ListFriendRequests200ResponseMeta["default"].constructFromObject(data['meta']);
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('outgoing')) {
|
|
74
|
+
obj['outgoing'] = _ApiClient["default"].convertToType(data['outgoing'], [_ListFriendRequests200ResponseIncomingInner["default"]]);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return obj;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Validates the JSON data with respect to <code>ListFriendRequests200Response</code>.
|
|
82
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
83
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListFriendRequests200Response</code>.
|
|
84
|
+
*/
|
|
85
|
+
}, {
|
|
86
|
+
key: "validateJSON",
|
|
87
|
+
value: function validateJSON(data) {
|
|
88
|
+
if (data['incoming']) {
|
|
89
|
+
// data not null
|
|
90
|
+
// ensure the json data is an array
|
|
91
|
+
if (!Array.isArray(data['incoming'])) {
|
|
92
|
+
throw new Error("Expected the field `incoming` to be an array in the JSON data but got " + data['incoming']);
|
|
93
|
+
}
|
|
94
|
+
// validate the optional field `incoming` (array)
|
|
95
|
+
var _iterator = _createForOfIteratorHelper(data['incoming']),
|
|
96
|
+
_step;
|
|
97
|
+
try {
|
|
98
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
99
|
+
var item = _step.value;
|
|
100
|
+
_ListFriendRequests200ResponseIncomingInner["default"].validateJSON(item);
|
|
101
|
+
}
|
|
102
|
+
} catch (err) {
|
|
103
|
+
_iterator.e(err);
|
|
104
|
+
} finally {
|
|
105
|
+
_iterator.f();
|
|
106
|
+
}
|
|
107
|
+
;
|
|
108
|
+
}
|
|
109
|
+
// validate the optional field `meta`
|
|
110
|
+
if (data['meta']) {
|
|
111
|
+
// data not null
|
|
112
|
+
_ListFriendRequests200ResponseMeta["default"].validateJSON(data['meta']);
|
|
113
|
+
}
|
|
114
|
+
if (data['outgoing']) {
|
|
115
|
+
// data not null
|
|
116
|
+
// ensure the json data is an array
|
|
117
|
+
if (!Array.isArray(data['outgoing'])) {
|
|
118
|
+
throw new Error("Expected the field `outgoing` to be an array in the JSON data but got " + data['outgoing']);
|
|
119
|
+
}
|
|
120
|
+
// validate the optional field `outgoing` (array)
|
|
121
|
+
var _iterator2 = _createForOfIteratorHelper(data['outgoing']),
|
|
122
|
+
_step2;
|
|
123
|
+
try {
|
|
124
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
125
|
+
var _item = _step2.value;
|
|
126
|
+
_ListFriendRequests200ResponseIncomingInner["default"].validateJSON(_item);
|
|
127
|
+
}
|
|
128
|
+
} catch (err) {
|
|
129
|
+
_iterator2.e(err);
|
|
130
|
+
} finally {
|
|
131
|
+
_iterator2.f();
|
|
132
|
+
}
|
|
133
|
+
;
|
|
134
|
+
}
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
}]);
|
|
138
|
+
}();
|
|
139
|
+
/**
|
|
140
|
+
* @member {Array.<module:model/ListFriendRequests200ResponseIncomingInner>} incoming
|
|
141
|
+
*/
|
|
142
|
+
ListFriendRequests200Response.prototype['incoming'] = undefined;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @member {module:model/ListFriendRequests200ResponseMeta} meta
|
|
146
|
+
*/
|
|
147
|
+
ListFriendRequests200Response.prototype['meta'] = undefined;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @member {Array.<module:model/ListFriendRequests200ResponseIncomingInner>} outgoing
|
|
151
|
+
*/
|
|
152
|
+
ListFriendRequests200Response.prototype['outgoing'] = undefined;
|
|
153
|
+
var _default = exports["default"] = ListFriendRequests200Response;
|
|
@@ -0,0 +1,136 @@
|
|
|
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 _ListFriendRequests200ResponseIncomingInnerRequester = _interopRequireDefault(require("./ListFriendRequests200ResponseIncomingInnerRequester"));
|
|
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 API
|
|
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 ListFriendRequests200ResponseIncomingInner model module.
|
|
29
|
+
* @module model/ListFriendRequests200ResponseIncomingInner
|
|
30
|
+
* @version 1.0.0
|
|
31
|
+
*/
|
|
32
|
+
var ListFriendRequests200ResponseIncomingInner = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>ListFriendRequests200ResponseIncomingInner</code>.
|
|
35
|
+
* @alias module:model/ListFriendRequests200ResponseIncomingInner
|
|
36
|
+
*/
|
|
37
|
+
function ListFriendRequests200ResponseIncomingInner() {
|
|
38
|
+
_classCallCheck(this, ListFriendRequests200ResponseIncomingInner);
|
|
39
|
+
ListFriendRequests200ResponseIncomingInner.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(ListFriendRequests200ResponseIncomingInner, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj) {}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Constructs a <code>ListFriendRequests200ResponseIncomingInner</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/ListFriendRequests200ResponseIncomingInner} obj Optional instance to populate.
|
|
56
|
+
* @return {module:model/ListFriendRequests200ResponseIncomingInner} The populated <code>ListFriendRequests200ResponseIncomingInner</code> instance.
|
|
57
|
+
*/
|
|
58
|
+
}, {
|
|
59
|
+
key: "constructFromObject",
|
|
60
|
+
value: function constructFromObject(data, obj) {
|
|
61
|
+
if (data) {
|
|
62
|
+
obj = obj || new ListFriendRequests200ResponseIncomingInner();
|
|
63
|
+
if (data.hasOwnProperty('id')) {
|
|
64
|
+
obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty('inserted_at')) {
|
|
67
|
+
obj['inserted_at'] = _ApiClient["default"].convertToType(data['inserted_at'], 'String');
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('requester')) {
|
|
70
|
+
obj['requester'] = _ListFriendRequests200ResponseIncomingInnerRequester["default"].constructFromObject(data['requester']);
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('status')) {
|
|
73
|
+
obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('target')) {
|
|
76
|
+
obj['target'] = _ListFriendRequests200ResponseIncomingInnerRequester["default"].constructFromObject(data['target']);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return obj;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Validates the JSON data with respect to <code>ListFriendRequests200ResponseIncomingInner</code>.
|
|
84
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
85
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListFriendRequests200ResponseIncomingInner</code>.
|
|
86
|
+
*/
|
|
87
|
+
}, {
|
|
88
|
+
key: "validateJSON",
|
|
89
|
+
value: function validateJSON(data) {
|
|
90
|
+
// ensure the json data is a string
|
|
91
|
+
if (data['inserted_at'] && !(typeof data['inserted_at'] === 'string' || data['inserted_at'] instanceof String)) {
|
|
92
|
+
throw new Error("Expected the field `inserted_at` to be a primitive type in the JSON string but got " + data['inserted_at']);
|
|
93
|
+
}
|
|
94
|
+
// validate the optional field `requester`
|
|
95
|
+
if (data['requester']) {
|
|
96
|
+
// data not null
|
|
97
|
+
_ListFriendRequests200ResponseIncomingInnerRequester["default"].validateJSON(data['requester']);
|
|
98
|
+
}
|
|
99
|
+
// ensure the json data is a string
|
|
100
|
+
if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
|
|
101
|
+
throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
|
|
102
|
+
}
|
|
103
|
+
// validate the optional field `target`
|
|
104
|
+
if (data['target']) {
|
|
105
|
+
// data not null
|
|
106
|
+
_ListFriendRequests200ResponseIncomingInnerRequester["default"].validateJSON(data['target']);
|
|
107
|
+
}
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
}]);
|
|
111
|
+
}();
|
|
112
|
+
/**
|
|
113
|
+
* @member {Number} id
|
|
114
|
+
*/
|
|
115
|
+
ListFriendRequests200ResponseIncomingInner.prototype['id'] = undefined;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @member {String} inserted_at
|
|
119
|
+
*/
|
|
120
|
+
ListFriendRequests200ResponseIncomingInner.prototype['inserted_at'] = undefined;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @member {module:model/ListFriendRequests200ResponseIncomingInnerRequester} requester
|
|
124
|
+
*/
|
|
125
|
+
ListFriendRequests200ResponseIncomingInner.prototype['requester'] = undefined;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @member {String} status
|
|
129
|
+
*/
|
|
130
|
+
ListFriendRequests200ResponseIncomingInner.prototype['status'] = undefined;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @member {module:model/ListFriendRequests200ResponseIncomingInnerRequester} target
|
|
134
|
+
*/
|
|
135
|
+
ListFriendRequests200ResponseIncomingInner.prototype['target'] = undefined;
|
|
136
|
+
var _default = exports["default"] = ListFriendRequests200ResponseIncomingInner;
|
package/dist/model/{KickUser200Response.js → ListFriendRequests200ResponseIncomingInnerRequester.js}
RENAMED
|
@@ -24,18 +24,18 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
26
|
/**
|
|
27
|
-
* The
|
|
28
|
-
* @module model/
|
|
27
|
+
* The ListFriendRequests200ResponseIncomingInnerRequester model module.
|
|
28
|
+
* @module model/ListFriendRequests200ResponseIncomingInnerRequester
|
|
29
29
|
* @version 1.0.0
|
|
30
30
|
*/
|
|
31
|
-
var
|
|
31
|
+
var ListFriendRequests200ResponseIncomingInnerRequester = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
33
|
-
* Constructs a new <code>
|
|
34
|
-
* @alias module:model/
|
|
33
|
+
* Constructs a new <code>ListFriendRequests200ResponseIncomingInnerRequester</code>.
|
|
34
|
+
* @alias module:model/ListFriendRequests200ResponseIncomingInnerRequester
|
|
35
35
|
*/
|
|
36
|
-
function
|
|
37
|
-
_classCallCheck(this,
|
|
38
|
-
|
|
36
|
+
function ListFriendRequests200ResponseIncomingInnerRequester() {
|
|
37
|
+
_classCallCheck(this, ListFriendRequests200ResponseIncomingInnerRequester);
|
|
38
|
+
ListFriendRequests200ResponseIncomingInnerRequester.initialize(this);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
@@ -43,47 +43,55 @@ var KickUser200Response = /*#__PURE__*/function () {
|
|
|
43
43
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
44
44
|
* Only for internal use.
|
|
45
45
|
*/
|
|
46
|
-
return _createClass(
|
|
46
|
+
return _createClass(ListFriendRequests200ResponseIncomingInnerRequester, null, [{
|
|
47
47
|
key: "initialize",
|
|
48
48
|
value: function initialize(obj) {}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* Constructs a <code>
|
|
51
|
+
* Constructs a <code>ListFriendRequests200ResponseIncomingInnerRequester</code> from a plain JavaScript object, optionally creating a new instance.
|
|
52
52
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
53
53
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
54
|
-
* @param {module:model/
|
|
55
|
-
* @return {module:model/
|
|
54
|
+
* @param {module:model/ListFriendRequests200ResponseIncomingInnerRequester} obj Optional instance to populate.
|
|
55
|
+
* @return {module:model/ListFriendRequests200ResponseIncomingInnerRequester} The populated <code>ListFriendRequests200ResponseIncomingInnerRequester</code> instance.
|
|
56
56
|
*/
|
|
57
57
|
}, {
|
|
58
58
|
key: "constructFromObject",
|
|
59
59
|
value: function constructFromObject(data, obj) {
|
|
60
60
|
if (data) {
|
|
61
|
-
obj = obj || new
|
|
62
|
-
if (data.hasOwnProperty('
|
|
63
|
-
obj['
|
|
61
|
+
obj = obj || new ListFriendRequests200ResponseIncomingInnerRequester();
|
|
62
|
+
if (data.hasOwnProperty('display_name')) {
|
|
63
|
+
obj['display_name'] = _ApiClient["default"].convertToType(data['display_name'], 'String');
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('id')) {
|
|
66
|
+
obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
return obj;
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
/**
|
|
70
|
-
* Validates the JSON data with respect to <code>
|
|
73
|
+
* Validates the JSON data with respect to <code>ListFriendRequests200ResponseIncomingInnerRequester</code>.
|
|
71
74
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
72
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>
|
|
75
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListFriendRequests200ResponseIncomingInnerRequester</code>.
|
|
73
76
|
*/
|
|
74
77
|
}, {
|
|
75
78
|
key: "validateJSON",
|
|
76
79
|
value: function validateJSON(data) {
|
|
77
80
|
// ensure the json data is a string
|
|
78
|
-
if (data['
|
|
79
|
-
throw new Error("Expected the field `
|
|
81
|
+
if (data['display_name'] && !(typeof data['display_name'] === 'string' || data['display_name'] instanceof String)) {
|
|
82
|
+
throw new Error("Expected the field `display_name` to be a primitive type in the JSON string but got " + data['display_name']);
|
|
80
83
|
}
|
|
81
84
|
return true;
|
|
82
85
|
}
|
|
83
86
|
}]);
|
|
84
87
|
}();
|
|
85
88
|
/**
|
|
86
|
-
* @member {String}
|
|
89
|
+
* @member {String} display_name
|
|
90
|
+
*/
|
|
91
|
+
ListFriendRequests200ResponseIncomingInnerRequester.prototype['display_name'] = undefined;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @member {Number} id
|
|
87
95
|
*/
|
|
88
|
-
|
|
89
|
-
var _default = exports["default"] =
|
|
96
|
+
ListFriendRequests200ResponseIncomingInnerRequester.prototype['id'] = undefined;
|
|
97
|
+
var _default = exports["default"] = ListFriendRequests200ResponseIncomingInnerRequester;
|
|
@@ -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 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 ListFriendRequests200ResponseMeta model module.
|
|
28
|
+
* @module model/ListFriendRequests200ResponseMeta
|
|
29
|
+
* @version 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
var ListFriendRequests200ResponseMeta = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>ListFriendRequests200ResponseMeta</code>.
|
|
34
|
+
* @alias module:model/ListFriendRequests200ResponseMeta
|
|
35
|
+
*/
|
|
36
|
+
function ListFriendRequests200ResponseMeta() {
|
|
37
|
+
_classCallCheck(this, ListFriendRequests200ResponseMeta);
|
|
38
|
+
ListFriendRequests200ResponseMeta.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(ListFriendRequests200ResponseMeta, null, [{
|
|
47
|
+
key: "initialize",
|
|
48
|
+
value: function initialize(obj) {}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Constructs a <code>ListFriendRequests200ResponseMeta</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/ListFriendRequests200ResponseMeta} obj Optional instance to populate.
|
|
55
|
+
* @return {module:model/ListFriendRequests200ResponseMeta} The populated <code>ListFriendRequests200ResponseMeta</code> instance.
|
|
56
|
+
*/
|
|
57
|
+
}, {
|
|
58
|
+
key: "constructFromObject",
|
|
59
|
+
value: function constructFromObject(data, obj) {
|
|
60
|
+
if (data) {
|
|
61
|
+
obj = obj || new ListFriendRequests200ResponseMeta();
|
|
62
|
+
if (data.hasOwnProperty('counts')) {
|
|
63
|
+
obj['counts'] = _ApiClient["default"].convertToType(data['counts'], Object);
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('has_more')) {
|
|
66
|
+
obj['has_more'] = _ApiClient["default"].convertToType(data['has_more'], Object);
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('page')) {
|
|
69
|
+
obj['page'] = _ApiClient["default"].convertToType(data['page'], 'Number');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('page_size')) {
|
|
72
|
+
obj['page_size'] = _ApiClient["default"].convertToType(data['page_size'], 'Number');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('total_counts')) {
|
|
75
|
+
obj['total_counts'] = _ApiClient["default"].convertToType(data['total_counts'], Object);
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('total_pages')) {
|
|
78
|
+
obj['total_pages'] = _ApiClient["default"].convertToType(data['total_pages'], Object);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return obj;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Validates the JSON data with respect to <code>ListFriendRequests200ResponseMeta</code>.
|
|
86
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
87
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListFriendRequests200ResponseMeta</code>.
|
|
88
|
+
*/
|
|
89
|
+
}, {
|
|
90
|
+
key: "validateJSON",
|
|
91
|
+
value: function validateJSON(data) {
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
}]);
|
|
95
|
+
}();
|
|
96
|
+
/**
|
|
97
|
+
* @member {Object} counts
|
|
98
|
+
*/
|
|
99
|
+
ListFriendRequests200ResponseMeta.prototype['counts'] = undefined;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @member {Object} has_more
|
|
103
|
+
*/
|
|
104
|
+
ListFriendRequests200ResponseMeta.prototype['has_more'] = undefined;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @member {Number} page
|
|
108
|
+
*/
|
|
109
|
+
ListFriendRequests200ResponseMeta.prototype['page'] = undefined;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @member {Number} page_size
|
|
113
|
+
*/
|
|
114
|
+
ListFriendRequests200ResponseMeta.prototype['page_size'] = undefined;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @member {Object} total_counts
|
|
118
|
+
*/
|
|
119
|
+
ListFriendRequests200ResponseMeta.prototype['total_counts'] = undefined;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @member {Object} total_pages
|
|
123
|
+
*/
|
|
124
|
+
ListFriendRequests200ResponseMeta.prototype['total_pages'] = undefined;
|
|
125
|
+
var _default = exports["default"] = ListFriendRequests200ResponseMeta;
|