@ughuuu/game_server 1.0.374 → 1.0.376
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 +66 -5
- package/dist/ApiClient.js +1 -1
- package/dist/api/AdminKVApi.js +305 -0
- package/dist/api/AdminLeaderboardsApi.js +396 -0
- package/dist/api/AdminLobbiesApi.js +190 -0
- package/dist/api/AdminSessionsApi.js +165 -0
- package/dist/api/AdminUsersApi.js +130 -0
- package/dist/api/AuthenticationApi.js +82 -1
- package/dist/api/FriendsApi.js +6 -4
- package/dist/api/HealthApi.js +1 -1
- package/dist/api/HooksApi.js +6 -4
- package/dist/api/KVApi.js +95 -0
- package/dist/api/LeaderboardsApi.js +7 -7
- package/dist/api/LobbiesApi.js +6 -6
- package/dist/api/UsersApi.js +17 -15
- package/dist/index.js +269 -3
- package/dist/model/AdminCreateKvEntry200Response.js +91 -0
- package/dist/model/AdminCreateKvEntryRequest.js +146 -0
- package/dist/model/AdminCreateLeaderboardRequest.js +232 -0
- package/dist/model/AdminEndLeaderboard200Response.js +91 -0
- package/dist/model/AdminEndLeaderboard200ResponseData.js +231 -0
- package/dist/model/AdminListKvEntries200Response.js +124 -0
- package/dist/model/AdminListKvEntries200ResponseDataInner.js +147 -0
- package/dist/model/AdminListLobbies200Response.js +124 -0
- package/dist/model/AdminListLobbies200ResponseDataInner.js +153 -0
- package/dist/model/AdminListSessions200Response.js +124 -0
- package/dist/model/AdminListSessions200ResponseDataInner.js +133 -0
- package/dist/model/AdminSubmitLeaderboardScore200Response.js +91 -0
- package/dist/model/AdminSubmitLeaderboardScore200ResponseData.js +141 -0
- package/dist/model/AdminSubmitLeaderboardScoreRequest.js +126 -0
- package/dist/model/AdminUpdateKvEntryRequest.js +121 -0
- package/dist/model/AdminUpdateLeaderboardRecordRequest.js +93 -0
- package/dist/model/AdminUpdateLeaderboardRequest.js +125 -0
- package/dist/model/AdminUpdateLobby200Response.js +91 -0
- package/dist/model/AdminUpdateLobbyRequest.js +133 -0
- package/dist/model/AdminUpdateUser200Response.js +91 -0
- package/dist/model/AdminUpdateUser200ResponseData.js +149 -0
- package/dist/model/AdminUpdateUserRequest.js +105 -0
- package/dist/model/CallHook200Response.js +88 -0
- package/dist/model/CallHookRequest.js +23 -8
- package/dist/model/CreateFriendRequestRequest.js +1 -1
- package/dist/model/{KickUser401Response.js → CreateLobby401Response.js} +18 -18
- package/dist/model/CreateLobbyRequest.js +1 -1
- package/dist/model/DeviceLoginRequest.js +1 -1
- package/dist/model/ErrorResponse.js +114 -0
- package/dist/model/GetCurrentUser200Response.js +10 -1
- package/dist/model/GetCurrentUser200ResponseLinkedProviders.js +1 -1
- package/dist/model/GetKv200Response.js +93 -0
- package/dist/model/GetMyRecord200Response.js +91 -0
- package/dist/model/HealthResponse.js +1 -1
- package/dist/model/JoinLobby200Response.js +89 -0
- package/dist/model/JoinLobbyRequest.js +1 -1
- package/dist/model/KickUser200Response.js +89 -0
- package/dist/model/KickUserRequest.js +1 -1
- package/dist/model/LeaveLobby200Response.js +89 -0
- package/dist/model/LinkDeviceRequest.js +1 -1
- package/dist/model/ListBlockedFriends200Response.js +1 -1
- package/dist/model/ListBlockedFriends200ResponseDataInner.js +1 -1
- package/dist/model/ListBlockedFriends200ResponseDataInnerRequester.js +1 -1
- package/dist/model/ListFriendRequests200Response.js +1 -1
- package/dist/model/ListFriendRequests200ResponseIncomingInner.js +1 -1
- package/dist/model/ListFriendRequests200ResponseIncomingInnerRequester.js +1 -1
- package/dist/model/ListFriendRequests200ResponseMeta.js +1 -1
- package/dist/model/ListFriends200Response.js +1 -1
- package/dist/model/ListFriends200ResponseDataInner.js +9 -1
- package/dist/model/ListLeaderboardRecords200Response.js +1 -1
- package/dist/model/ListLeaderboardRecords200ResponseDataInner.js +1 -1
- package/dist/model/ListLeaderboardRecords200ResponseMeta.js +1 -1
- package/dist/model/ListLeaderboards200Response.js +1 -1
- package/dist/model/ListLeaderboards200ResponseDataInner.js +1 -1
- package/dist/model/ListLobbies200Response.js +1 -1
- package/dist/model/ListLobbies200ResponseDataInner.js +1 -1
- package/dist/model/ListLobbies200ResponseInner.js +153 -0
- package/dist/model/ListLobbies200ResponseMeta.js +125 -0
- package/dist/model/ListRecordsAroundUser200Response.js +1 -1
- package/dist/model/Login200Response.js +1 -1
- package/dist/model/Login200ResponseData.js +1 -1
- package/dist/model/Login200ResponseDataUser.js +97 -0
- package/dist/model/LoginRequest.js +1 -1
- package/dist/model/OAuthSessionData.js +1 -1
- package/dist/model/OAuthSessionDataDetails.js +1 -1
- package/dist/model/OAuthSessionStatus.js +9 -5
- package/dist/model/OauthApiCallback200Response.js +1 -1
- package/dist/model/OauthApiCallbackRequest.js +1 -1
- package/dist/model/OauthCallbackApiAppleIosRequest.js +113 -0
- package/dist/model/OauthGoogleIdTokenRequest.js +113 -0
- package/dist/model/OauthRequest200Response.js +1 -1
- package/dist/model/OauthSessionStatus404Response.js +126 -0
- package/dist/model/QuickJoinRequest.js +1 -1
- package/dist/model/RefreshToken200Response.js +1 -1
- package/dist/model/RefreshToken200ResponseData.js +1 -1
- package/dist/model/RefreshTokenRequest.js +1 -1
- package/dist/model/RemoveFriendship401Response.js +89 -0
- package/dist/model/SearchUsers200Response.js +124 -0
- package/dist/model/SearchUsers200ResponseDataInner.js +130 -0
- package/dist/model/UpdateCurrentUserDisplayNameRequest.js +1 -1
- package/dist/model/UpdateCurrentUserPassword400Response.js +97 -0
- package/dist/model/UpdateCurrentUserPasswordRequest.js +1 -1
- package/dist/model/UpdateLobbyRequest.js +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,165 @@
|
|
|
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 _AdminListSessions200Response = _interopRequireDefault(require("../model/AdminListSessions200Response"));
|
|
9
|
+
var _RemoveFriendship401Response = _interopRequireDefault(require("../model/RemoveFriendship401Response"));
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
+
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); } }
|
|
14
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
+
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); } /**
|
|
17
|
+
* Game Server API
|
|
18
|
+
* 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
|
|
19
|
+
*
|
|
20
|
+
* The version of the OpenAPI document: 1.0.0
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24
|
+
* https://openapi-generator.tech
|
|
25
|
+
* Do not edit the class manually.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* AdminSessions service.
|
|
30
|
+
* @module api/AdminSessionsApi
|
|
31
|
+
* @version 1.0.0
|
|
32
|
+
*/
|
|
33
|
+
var AdminSessionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new AdminSessionsApi.
|
|
36
|
+
* @alias module:api/AdminSessionsApi
|
|
37
|
+
* @class
|
|
38
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
39
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
40
|
+
*/
|
|
41
|
+
function AdminSessionsApi(apiClient) {
|
|
42
|
+
_classCallCheck(this, AdminSessionsApi);
|
|
43
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Delete session token by id (admin)
|
|
48
|
+
* @param {Number} id
|
|
49
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
|
|
50
|
+
*/
|
|
51
|
+
return _createClass(AdminSessionsApi, [{
|
|
52
|
+
key: "adminDeleteSessionWithHttpInfo",
|
|
53
|
+
value: function adminDeleteSessionWithHttpInfo(id) {
|
|
54
|
+
var postBody = null;
|
|
55
|
+
// verify the required parameter 'id' is set
|
|
56
|
+
if (id === undefined || id === null) {
|
|
57
|
+
throw new Error("Missing the required parameter 'id' when calling adminDeleteSession");
|
|
58
|
+
}
|
|
59
|
+
var pathParams = {
|
|
60
|
+
'id': id
|
|
61
|
+
};
|
|
62
|
+
var queryParams = {};
|
|
63
|
+
var headerParams = {};
|
|
64
|
+
var formParams = {};
|
|
65
|
+
var authNames = ['authorization'];
|
|
66
|
+
var contentTypes = [];
|
|
67
|
+
var accepts = ['application/json'];
|
|
68
|
+
var returnType = Object;
|
|
69
|
+
return this.apiClient.callApi('/api/v1/admin/sessions/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Delete session token by id (admin)
|
|
74
|
+
* @param {Number} id
|
|
75
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
|
|
76
|
+
*/
|
|
77
|
+
}, {
|
|
78
|
+
key: "adminDeleteSession",
|
|
79
|
+
value: function adminDeleteSession(id) {
|
|
80
|
+
return this.adminDeleteSessionWithHttpInfo(id).then(function (response_and_data) {
|
|
81
|
+
return response_and_data.data;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Delete all session tokens for a user (admin)
|
|
87
|
+
* @param {Number} id
|
|
88
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
|
|
89
|
+
*/
|
|
90
|
+
}, {
|
|
91
|
+
key: "adminDeleteUserSessionsWithHttpInfo",
|
|
92
|
+
value: function adminDeleteUserSessionsWithHttpInfo(id) {
|
|
93
|
+
var postBody = null;
|
|
94
|
+
// verify the required parameter 'id' is set
|
|
95
|
+
if (id === undefined || id === null) {
|
|
96
|
+
throw new Error("Missing the required parameter 'id' when calling adminDeleteUserSessions");
|
|
97
|
+
}
|
|
98
|
+
var pathParams = {
|
|
99
|
+
'id': id
|
|
100
|
+
};
|
|
101
|
+
var queryParams = {};
|
|
102
|
+
var headerParams = {};
|
|
103
|
+
var formParams = {};
|
|
104
|
+
var authNames = ['authorization'];
|
|
105
|
+
var contentTypes = [];
|
|
106
|
+
var accepts = ['application/json'];
|
|
107
|
+
var returnType = Object;
|
|
108
|
+
return this.apiClient.callApi('/api/v1/admin/users/{id}/sessions', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Delete all session tokens for a user (admin)
|
|
113
|
+
* @param {Number} id
|
|
114
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
|
|
115
|
+
*/
|
|
116
|
+
}, {
|
|
117
|
+
key: "adminDeleteUserSessions",
|
|
118
|
+
value: function adminDeleteUserSessions(id) {
|
|
119
|
+
return this.adminDeleteUserSessionsWithHttpInfo(id).then(function (response_and_data) {
|
|
120
|
+
return response_and_data.data;
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* List sessions (admin)
|
|
126
|
+
* @param {Object} opts Optional parameters
|
|
127
|
+
* @param {Number} [page]
|
|
128
|
+
* @param {Number} [pageSize]
|
|
129
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AdminListSessions200Response} and HTTP response
|
|
130
|
+
*/
|
|
131
|
+
}, {
|
|
132
|
+
key: "adminListSessionsWithHttpInfo",
|
|
133
|
+
value: function adminListSessionsWithHttpInfo(opts) {
|
|
134
|
+
opts = opts || {};
|
|
135
|
+
var postBody = null;
|
|
136
|
+
var pathParams = {};
|
|
137
|
+
var queryParams = {
|
|
138
|
+
'page': opts['page'],
|
|
139
|
+
'page_size': opts['pageSize']
|
|
140
|
+
};
|
|
141
|
+
var headerParams = {};
|
|
142
|
+
var formParams = {};
|
|
143
|
+
var authNames = ['authorization'];
|
|
144
|
+
var contentTypes = [];
|
|
145
|
+
var accepts = ['application/json'];
|
|
146
|
+
var returnType = _AdminListSessions200Response["default"];
|
|
147
|
+
return this.apiClient.callApi('/api/v1/admin/sessions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* List sessions (admin)
|
|
152
|
+
* @param {Object} opts Optional parameters
|
|
153
|
+
* @param {Number} opts.page
|
|
154
|
+
* @param {Number} opts.pageSize
|
|
155
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AdminListSessions200Response}
|
|
156
|
+
*/
|
|
157
|
+
}, {
|
|
158
|
+
key: "adminListSessions",
|
|
159
|
+
value: function adminListSessions(opts) {
|
|
160
|
+
return this.adminListSessionsWithHttpInfo(opts).then(function (response_and_data) {
|
|
161
|
+
return response_and_data.data;
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}]);
|
|
165
|
+
}();
|
|
@@ -0,0 +1,130 @@
|
|
|
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 _AdminUpdateUser200Response = _interopRequireDefault(require("../model/AdminUpdateUser200Response"));
|
|
9
|
+
var _AdminUpdateUserRequest = _interopRequireDefault(require("../model/AdminUpdateUserRequest"));
|
|
10
|
+
var _RemoveFriendship401Response = _interopRequireDefault(require("../model/RemoveFriendship401Response"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
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); }
|
|
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 API
|
|
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
|
+
*
|
|
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
|
+
* AdminUsers service.
|
|
31
|
+
* @module api/AdminUsersApi
|
|
32
|
+
* @version 1.0.0
|
|
33
|
+
*/
|
|
34
|
+
var AdminUsersApi = exports["default"] = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new AdminUsersApi.
|
|
37
|
+
* @alias module:api/AdminUsersApi
|
|
38
|
+
* @class
|
|
39
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
40
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
41
|
+
*/
|
|
42
|
+
function AdminUsersApi(apiClient) {
|
|
43
|
+
_classCallCheck(this, AdminUsersApi);
|
|
44
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Delete user (admin)
|
|
49
|
+
* @param {Number} id
|
|
50
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
|
|
51
|
+
*/
|
|
52
|
+
return _createClass(AdminUsersApi, [{
|
|
53
|
+
key: "adminDeleteUserWithHttpInfo",
|
|
54
|
+
value: function adminDeleteUserWithHttpInfo(id) {
|
|
55
|
+
var postBody = null;
|
|
56
|
+
// verify the required parameter 'id' is set
|
|
57
|
+
if (id === undefined || id === null) {
|
|
58
|
+
throw new Error("Missing the required parameter 'id' when calling adminDeleteUser");
|
|
59
|
+
}
|
|
60
|
+
var pathParams = {
|
|
61
|
+
'id': id
|
|
62
|
+
};
|
|
63
|
+
var queryParams = {};
|
|
64
|
+
var headerParams = {};
|
|
65
|
+
var formParams = {};
|
|
66
|
+
var authNames = ['authorization'];
|
|
67
|
+
var contentTypes = [];
|
|
68
|
+
var accepts = ['application/json'];
|
|
69
|
+
var returnType = Object;
|
|
70
|
+
return this.apiClient.callApi('/api/v1/admin/users/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Delete user (admin)
|
|
75
|
+
* @param {Number} id
|
|
76
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
|
|
77
|
+
*/
|
|
78
|
+
}, {
|
|
79
|
+
key: "adminDeleteUser",
|
|
80
|
+
value: function adminDeleteUser(id) {
|
|
81
|
+
return this.adminDeleteUserWithHttpInfo(id).then(function (response_and_data) {
|
|
82
|
+
return response_and_data.data;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Update user (admin)
|
|
88
|
+
* @param {Number} id
|
|
89
|
+
* @param {Object} opts Optional parameters
|
|
90
|
+
* @param {module:model/AdminUpdateUserRequest} [adminUpdateUserRequest] User patch
|
|
91
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AdminUpdateUser200Response} and HTTP response
|
|
92
|
+
*/
|
|
93
|
+
}, {
|
|
94
|
+
key: "adminUpdateUserWithHttpInfo",
|
|
95
|
+
value: function adminUpdateUserWithHttpInfo(id, opts) {
|
|
96
|
+
opts = opts || {};
|
|
97
|
+
var postBody = opts['adminUpdateUserRequest'];
|
|
98
|
+
// verify the required parameter 'id' is set
|
|
99
|
+
if (id === undefined || id === null) {
|
|
100
|
+
throw new Error("Missing the required parameter 'id' when calling adminUpdateUser");
|
|
101
|
+
}
|
|
102
|
+
var pathParams = {
|
|
103
|
+
'id': id
|
|
104
|
+
};
|
|
105
|
+
var queryParams = {};
|
|
106
|
+
var headerParams = {};
|
|
107
|
+
var formParams = {};
|
|
108
|
+
var authNames = ['authorization'];
|
|
109
|
+
var contentTypes = ['application/json'];
|
|
110
|
+
var accepts = ['application/json'];
|
|
111
|
+
var returnType = _AdminUpdateUser200Response["default"];
|
|
112
|
+
return this.apiClient.callApi('/api/v1/admin/users/{id}', 'PATCH', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Update user (admin)
|
|
117
|
+
* @param {Number} id
|
|
118
|
+
* @param {Object} opts Optional parameters
|
|
119
|
+
* @param {module:model/AdminUpdateUserRequest} opts.adminUpdateUserRequest User patch
|
|
120
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AdminUpdateUser200Response}
|
|
121
|
+
*/
|
|
122
|
+
}, {
|
|
123
|
+
key: "adminUpdateUser",
|
|
124
|
+
value: function adminUpdateUser(id, opts) {
|
|
125
|
+
return this.adminUpdateUserWithHttpInfo(id, opts).then(function (response_and_data) {
|
|
126
|
+
return response_and_data.data;
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}]);
|
|
130
|
+
}();
|
|
@@ -6,15 +6,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _DeviceLoginRequest = _interopRequireDefault(require("../model/DeviceLoginRequest"));
|
|
9
|
+
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
9
10
|
var _LinkDeviceRequest = _interopRequireDefault(require("../model/LinkDeviceRequest"));
|
|
10
11
|
var _Login200Response = _interopRequireDefault(require("../model/Login200Response"));
|
|
11
12
|
var _LoginRequest = _interopRequireDefault(require("../model/LoginRequest"));
|
|
12
13
|
var _OAuthSessionStatus = _interopRequireDefault(require("../model/OAuthSessionStatus"));
|
|
13
14
|
var _OauthApiCallback200Response = _interopRequireDefault(require("../model/OauthApiCallback200Response"));
|
|
14
15
|
var _OauthApiCallbackRequest = _interopRequireDefault(require("../model/OauthApiCallbackRequest"));
|
|
16
|
+
var _OauthCallbackApiAppleIosRequest = _interopRequireDefault(require("../model/OauthCallbackApiAppleIosRequest"));
|
|
17
|
+
var _OauthGoogleIdTokenRequest = _interopRequireDefault(require("../model/OauthGoogleIdTokenRequest"));
|
|
15
18
|
var _OauthRequest200Response = _interopRequireDefault(require("../model/OauthRequest200Response"));
|
|
19
|
+
var _OauthSessionStatus404Response = _interopRequireDefault(require("../model/OauthSessionStatus404Response"));
|
|
16
20
|
var _RefreshToken200Response = _interopRequireDefault(require("../model/RefreshToken200Response"));
|
|
17
21
|
var _RefreshTokenRequest = _interopRequireDefault(require("../model/RefreshTokenRequest"));
|
|
22
|
+
var _RemoveFriendship401Response = _interopRequireDefault(require("../model/RemoveFriendship401Response"));
|
|
18
23
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
19
24
|
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); }
|
|
20
25
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -25,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
25
30
|
* Game Server API
|
|
26
31
|
* 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
|
|
27
32
|
*
|
|
28
|
-
* The version of the OpenAPI document: 1.0.
|
|
33
|
+
* The version of the OpenAPI document: 1.0.0
|
|
29
34
|
*
|
|
30
35
|
*
|
|
31
36
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -244,6 +249,82 @@ var AuthenticationApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
244
249
|
});
|
|
245
250
|
}
|
|
246
251
|
|
|
252
|
+
/**
|
|
253
|
+
* Apple callback (native iOS)
|
|
254
|
+
* Exchanges a native iOS Sign in with Apple authorization code using APPLE_IOS_CLIENT_ID.
|
|
255
|
+
* @param {Object} opts Optional parameters
|
|
256
|
+
* @param {module:model/OauthCallbackApiAppleIosRequest} [oauthCallbackApiAppleIosRequest] Apple callback params
|
|
257
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OauthApiCallback200Response} and HTTP response
|
|
258
|
+
*/
|
|
259
|
+
}, {
|
|
260
|
+
key: "oauthCallbackApiAppleIosWithHttpInfo",
|
|
261
|
+
value: function oauthCallbackApiAppleIosWithHttpInfo(opts) {
|
|
262
|
+
opts = opts || {};
|
|
263
|
+
var postBody = opts['oauthCallbackApiAppleIosRequest'];
|
|
264
|
+
var pathParams = {};
|
|
265
|
+
var queryParams = {};
|
|
266
|
+
var headerParams = {};
|
|
267
|
+
var formParams = {};
|
|
268
|
+
var authNames = [];
|
|
269
|
+
var contentTypes = ['application/json'];
|
|
270
|
+
var accepts = ['application/json'];
|
|
271
|
+
var returnType = _OauthApiCallback200Response["default"];
|
|
272
|
+
return this.apiClient.callApi('/api/v1/auth/apple/ios/callback', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Apple callback (native iOS)
|
|
277
|
+
* Exchanges a native iOS Sign in with Apple authorization code using APPLE_IOS_CLIENT_ID.
|
|
278
|
+
* @param {Object} opts Optional parameters
|
|
279
|
+
* @param {module:model/OauthCallbackApiAppleIosRequest} opts.oauthCallbackApiAppleIosRequest Apple callback params
|
|
280
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OauthApiCallback200Response}
|
|
281
|
+
*/
|
|
282
|
+
}, {
|
|
283
|
+
key: "oauthCallbackApiAppleIos",
|
|
284
|
+
value: function oauthCallbackApiAppleIos(opts) {
|
|
285
|
+
return this.oauthCallbackApiAppleIosWithHttpInfo(opts).then(function (response_and_data) {
|
|
286
|
+
return response_and_data.data;
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Google ID token login (native/mobile)
|
|
292
|
+
* Verify a Google OpenID Connect id_token (eg. from Android Credential Manager) and return JWT tokens.
|
|
293
|
+
* @param {Object} opts Optional parameters
|
|
294
|
+
* @param {module:model/OauthGoogleIdTokenRequest} [oauthGoogleIdTokenRequest] Google ID token
|
|
295
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OauthApiCallback200Response} and HTTP response
|
|
296
|
+
*/
|
|
297
|
+
}, {
|
|
298
|
+
key: "oauthGoogleIdTokenWithHttpInfo",
|
|
299
|
+
value: function oauthGoogleIdTokenWithHttpInfo(opts) {
|
|
300
|
+
opts = opts || {};
|
|
301
|
+
var postBody = opts['oauthGoogleIdTokenRequest'];
|
|
302
|
+
var pathParams = {};
|
|
303
|
+
var queryParams = {};
|
|
304
|
+
var headerParams = {};
|
|
305
|
+
var formParams = {};
|
|
306
|
+
var authNames = [];
|
|
307
|
+
var contentTypes = ['application/json'];
|
|
308
|
+
var accepts = ['application/json'];
|
|
309
|
+
var returnType = _OauthApiCallback200Response["default"];
|
|
310
|
+
return this.apiClient.callApi('/api/v1/auth/google/id_token', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Google ID token login (native/mobile)
|
|
315
|
+
* Verify a Google OpenID Connect id_token (eg. from Android Credential Manager) and return JWT tokens.
|
|
316
|
+
* @param {Object} opts Optional parameters
|
|
317
|
+
* @param {module:model/OauthGoogleIdTokenRequest} opts.oauthGoogleIdTokenRequest Google ID token
|
|
318
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OauthApiCallback200Response}
|
|
319
|
+
*/
|
|
320
|
+
}, {
|
|
321
|
+
key: "oauthGoogleIdToken",
|
|
322
|
+
value: function oauthGoogleIdToken(opts) {
|
|
323
|
+
return this.oauthGoogleIdTokenWithHttpInfo(opts).then(function (response_and_data) {
|
|
324
|
+
return response_and_data.data;
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
|
|
247
328
|
/**
|
|
248
329
|
* Initiate API OAuth
|
|
249
330
|
* Returns OAuth authorization URL for API clients
|
package/dist/api/FriendsApi.js
CHANGED
|
@@ -9,6 +9,8 @@ var _CreateFriendRequestRequest = _interopRequireDefault(require("../model/Creat
|
|
|
9
9
|
var _ListBlockedFriends200Response = _interopRequireDefault(require("../model/ListBlockedFriends200Response"));
|
|
10
10
|
var _ListFriendRequests200Response = _interopRequireDefault(require("../model/ListFriendRequests200Response"));
|
|
11
11
|
var _ListFriends200Response = _interopRequireDefault(require("../model/ListFriends200Response"));
|
|
12
|
+
var _RemoveFriendship401Response = _interopRequireDefault(require("../model/RemoveFriendship401Response"));
|
|
13
|
+
var _UpdateCurrentUserPassword400Response = _interopRequireDefault(require("../model/UpdateCurrentUserPassword400Response"));
|
|
12
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
15
|
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); }
|
|
14
16
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -19,7 +21,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
19
21
|
* Game Server API
|
|
20
22
|
* 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
|
|
21
23
|
*
|
|
22
|
-
* The version of the OpenAPI document: 1.0.
|
|
24
|
+
* The version of the OpenAPI document: 1.0.0
|
|
23
25
|
*
|
|
24
26
|
*
|
|
25
27
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -127,7 +129,7 @@ var FriendsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
127
129
|
* Send a friend request
|
|
128
130
|
* @param {Object} opts Optional parameters
|
|
129
131
|
* @param {module:model/CreateFriendRequestRequest} [createFriendRequestRequest] Friend request
|
|
130
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
132
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
|
|
131
133
|
*/
|
|
132
134
|
}, {
|
|
133
135
|
key: "createFriendRequestWithHttpInfo",
|
|
@@ -141,7 +143,7 @@ var FriendsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
141
143
|
var authNames = ['authorization'];
|
|
142
144
|
var contentTypes = ['application/json'];
|
|
143
145
|
var accepts = ['application/json'];
|
|
144
|
-
var returnType =
|
|
146
|
+
var returnType = Object;
|
|
145
147
|
return this.apiClient.callApi('/api/v1/friends', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
146
148
|
}
|
|
147
149
|
|
|
@@ -149,7 +151,7 @@ var FriendsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
149
151
|
* Send a friend request
|
|
150
152
|
* @param {Object} opts Optional parameters
|
|
151
153
|
* @param {module:model/CreateFriendRequestRequest} opts.createFriendRequestRequest Friend request
|
|
152
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
154
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
|
|
153
155
|
*/
|
|
154
156
|
}, {
|
|
155
157
|
key: "createFriendRequest",
|
package/dist/api/HealthApi.js
CHANGED
|
@@ -16,7 +16,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
16
16
|
* Game Server API
|
|
17
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
|
|
18
18
|
*
|
|
19
|
-
* The version of the OpenAPI document: 1.0.
|
|
19
|
+
* The version of the OpenAPI document: 1.0.0
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/api/HooksApi.js
CHANGED
|
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _CallHook200Response = _interopRequireDefault(require("../model/CallHook200Response"));
|
|
8
9
|
var _CallHookRequest = _interopRequireDefault(require("../model/CallHookRequest"));
|
|
10
|
+
var _RemoveFriendship401Response = _interopRequireDefault(require("../model/RemoveFriendship401Response"));
|
|
9
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
12
|
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
13
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -16,7 +18,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
16
18
|
* Game Server API
|
|
17
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
|
|
18
20
|
*
|
|
19
|
-
* The version of the OpenAPI document: 1.0.
|
|
21
|
+
* The version of the OpenAPI document: 1.0.0
|
|
20
22
|
*
|
|
21
23
|
*
|
|
22
24
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -46,7 +48,7 @@ var HooksApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
46
48
|
* Invoke a hook function
|
|
47
49
|
* @param {Object} opts Optional parameters
|
|
48
50
|
* @param {module:model/CallHookRequest} [callHookRequest] Call hook
|
|
49
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link
|
|
51
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CallHook200Response} and HTTP response
|
|
50
52
|
*/
|
|
51
53
|
return _createClass(HooksApi, [{
|
|
52
54
|
key: "callHookWithHttpInfo",
|
|
@@ -60,7 +62,7 @@ var HooksApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
60
62
|
var authNames = ['authorization'];
|
|
61
63
|
var contentTypes = ['application/json'];
|
|
62
64
|
var accepts = ['application/json'];
|
|
63
|
-
var returnType =
|
|
65
|
+
var returnType = _CallHook200Response["default"];
|
|
64
66
|
return this.apiClient.callApi('/api/v1/hooks/call', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
65
67
|
}
|
|
66
68
|
|
|
@@ -68,7 +70,7 @@ var HooksApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
68
70
|
* Invoke a hook function
|
|
69
71
|
* @param {Object} opts Optional parameters
|
|
70
72
|
* @param {module:model/CallHookRequest} opts.callHookRequest Call hook
|
|
71
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link
|
|
73
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CallHook200Response}
|
|
72
74
|
*/
|
|
73
75
|
}, {
|
|
74
76
|
key: "callHook",
|
|
@@ -0,0 +1,95 @@
|
|
|
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 _GetKv200Response = _interopRequireDefault(require("../model/GetKv200Response"));
|
|
9
|
+
var _RemoveFriendship401Response = _interopRequireDefault(require("../model/RemoveFriendship401Response"));
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
+
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); } }
|
|
14
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
+
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); } /**
|
|
17
|
+
* Game Server API
|
|
18
|
+
* 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
|
|
19
|
+
*
|
|
20
|
+
* The version of the OpenAPI document: 1.0.0
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24
|
+
* https://openapi-generator.tech
|
|
25
|
+
* Do not edit the class manually.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* KV service.
|
|
30
|
+
* @module api/KVApi
|
|
31
|
+
* @version 1.0.0
|
|
32
|
+
*/
|
|
33
|
+
var KVApi = exports["default"] = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new KVApi.
|
|
36
|
+
* @alias module:api/KVApi
|
|
37
|
+
* @class
|
|
38
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
39
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
40
|
+
*/
|
|
41
|
+
function KVApi(apiClient) {
|
|
42
|
+
_classCallCheck(this, KVApi);
|
|
43
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Get a key/value entry
|
|
48
|
+
* @param {String} key Key
|
|
49
|
+
* @param {Object} opts Optional parameters
|
|
50
|
+
* @param {Number} [userId] Optional owner user id
|
|
51
|
+
* @param {Number} [lobbyId] Optional owner lobby id
|
|
52
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetKv200Response} and HTTP response
|
|
53
|
+
*/
|
|
54
|
+
return _createClass(KVApi, [{
|
|
55
|
+
key: "getKvWithHttpInfo",
|
|
56
|
+
value: function getKvWithHttpInfo(key, opts) {
|
|
57
|
+
opts = opts || {};
|
|
58
|
+
var postBody = null;
|
|
59
|
+
// verify the required parameter 'key' is set
|
|
60
|
+
if (key === undefined || key === null) {
|
|
61
|
+
throw new Error("Missing the required parameter 'key' when calling getKv");
|
|
62
|
+
}
|
|
63
|
+
var pathParams = {
|
|
64
|
+
'key': key
|
|
65
|
+
};
|
|
66
|
+
var queryParams = {
|
|
67
|
+
'user_id': opts['userId'],
|
|
68
|
+
'lobby_id': opts['lobbyId']
|
|
69
|
+
};
|
|
70
|
+
var headerParams = {};
|
|
71
|
+
var formParams = {};
|
|
72
|
+
var authNames = ['authorization'];
|
|
73
|
+
var contentTypes = [];
|
|
74
|
+
var accepts = ['application/json'];
|
|
75
|
+
var returnType = _GetKv200Response["default"];
|
|
76
|
+
return this.apiClient.callApi('/api/v1/kv/{key}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Get a key/value entry
|
|
81
|
+
* @param {String} key Key
|
|
82
|
+
* @param {Object} opts Optional parameters
|
|
83
|
+
* @param {Number} opts.userId Optional owner user id
|
|
84
|
+
* @param {Number} opts.lobbyId Optional owner lobby id
|
|
85
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetKv200Response}
|
|
86
|
+
*/
|
|
87
|
+
}, {
|
|
88
|
+
key: "getKv",
|
|
89
|
+
value: function getKv(key, opts) {
|
|
90
|
+
return this.getKvWithHttpInfo(key, opts).then(function (response_and_data) {
|
|
91
|
+
return response_and_data.data;
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}]);
|
|
95
|
+
}();
|