@ughuuu/game_server 1.0.377 → 1.0.378

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/README.md +105 -8
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AdminChatApi.js +194 -0
  4. package/dist/api/AdminGroupsApi.js +193 -0
  5. package/dist/api/AdminKVApi.js +2 -2
  6. package/dist/api/AdminLeaderboardsApi.js +2 -2
  7. package/dist/api/AdminLobbiesApi.js +2 -2
  8. package/dist/api/AdminNotificationsApi.js +179 -0
  9. package/dist/api/AdminSessionsApi.js +2 -2
  10. package/dist/api/AdminUsersApi.js +2 -2
  11. package/dist/api/AuthenticationApi.js +2 -2
  12. package/dist/api/ChatApi.js +230 -0
  13. package/dist/api/FriendsApi.js +2 -2
  14. package/dist/api/GroupsApi.js +1017 -0
  15. package/dist/api/HealthApi.js +1 -1
  16. package/dist/api/HooksApi.js +2 -2
  17. package/dist/api/KVApi.js +2 -2
  18. package/dist/api/LeaderboardsApi.js +1 -1
  19. package/dist/api/LobbiesApi.js +6 -6
  20. package/dist/api/NotificationsApi.js +169 -0
  21. package/dist/api/PartiesApi.js +354 -0
  22. package/dist/api/UsersApi.js +2 -2
  23. package/dist/index.js +374 -17
  24. package/dist/model/AdminCreateKvEntry200Response.js +1 -1
  25. package/dist/model/AdminCreateKvEntryRequest.js +1 -1
  26. package/dist/model/AdminCreateLeaderboardRequest.js +1 -1
  27. package/dist/model/AdminCreateNotification400Response.js +89 -0
  28. package/dist/model/AdminCreateNotificationRequest.js +157 -0
  29. package/dist/model/AdminDeleteChatConversation200Response.js +85 -0
  30. package/dist/model/AdminEndLeaderboard200Response.js +1 -1
  31. package/dist/model/AdminEndLeaderboard200ResponseData.js +1 -1
  32. package/dist/model/AdminListChatMessages200Response.js +124 -0
  33. package/dist/model/AdminListChatMessages200ResponseDataInner.js +184 -0
  34. package/dist/model/AdminListGroups200Response.js +124 -0
  35. package/dist/model/AdminListKvEntries200Response.js +5 -5
  36. package/dist/model/AdminListKvEntries200ResponseDataInner.js +1 -1
  37. package/dist/model/AdminListLobbies200Response.js +5 -5
  38. package/dist/model/AdminListLobbies200ResponseDataInner.js +1 -1
  39. package/dist/model/AdminListNotifications200Response.js +124 -0
  40. package/dist/model/AdminListNotifications200ResponseDataInner.js +148 -0
  41. package/dist/model/AdminListNotifications200ResponseMeta.js +125 -0
  42. package/dist/model/AdminListSessions200Response.js +5 -5
  43. package/dist/model/AdminListSessions200ResponseDataInner.js +1 -1
  44. package/dist/model/AdminSubmitLeaderboardScore200Response.js +1 -1
  45. package/dist/model/AdminSubmitLeaderboardScore200ResponseData.js +1 -1
  46. package/dist/model/AdminSubmitLeaderboardScoreRequest.js +1 -1
  47. package/dist/model/AdminUpdateGroup200Response.js +169 -0
  48. package/dist/model/AdminUpdateGroupRequest.js +129 -0
  49. package/dist/model/AdminUpdateKvEntryRequest.js +1 -1
  50. package/dist/model/AdminUpdateLeaderboardRecordRequest.js +1 -1
  51. package/dist/model/AdminUpdateLeaderboardRequest.js +1 -1
  52. package/dist/model/AdminUpdateLobby200Response.js +1 -1
  53. package/dist/model/AdminUpdateLobbyRequest.js +1 -1
  54. package/dist/model/AdminUpdateUser200Response.js +1 -1
  55. package/dist/model/AdminUpdateUser200ResponseData.js +17 -1
  56. package/dist/model/AdminUpdateUserRequest.js +1 -1
  57. package/dist/model/CallHook200Response.js +1 -1
  58. package/dist/model/CallHookRequest.js +1 -1
  59. package/dist/model/CancelGroupInvite200Response.js +89 -0
  60. package/dist/model/CancelJoinRequest200Response.js +157 -0
  61. package/dist/model/ChatUnreadCount200Response.js +85 -0
  62. package/dist/model/CreateFriendRequestRequest.js +1 -1
  63. package/dist/model/CreateGroupRequest.js +181 -0
  64. package/dist/model/CreateLobbyRequest.js +1 -1
  65. package/dist/model/CreatePartyRequest.js +98 -0
  66. package/dist/model/DeleteNotifications200Response.js +86 -0
  67. package/dist/model/DeleteNotificationsRequest.js +113 -0
  68. package/dist/model/DemoteGroupMemberRequest.js +109 -0
  69. package/dist/model/DeviceLoginRequest.js +1 -1
  70. package/dist/model/ErrorResponse.js +1 -1
  71. package/dist/model/GetCurrentUser200Response.js +30 -1
  72. package/dist/model/GetCurrentUser200ResponseLinkedProviders.js +1 -1
  73. package/dist/model/GetKv200Response.js +1 -1
  74. package/dist/model/GetMyRecord200Response.js +1 -1
  75. package/dist/model/HealthResponse.js +1 -1
  76. package/dist/model/InviteToGroupRequest.js +109 -0
  77. package/dist/model/JoinPartyByCodeRequest.js +113 -0
  78. package/dist/model/KickGroupMemberRequest.js +109 -0
  79. package/dist/model/KickUserRequest.js +1 -1
  80. package/dist/model/LinkDeviceRequest.js +1 -1
  81. package/dist/model/ListBlockedFriends200Response.js +5 -5
  82. package/dist/model/ListBlockedFriends200ResponseDataInner.js +1 -1
  83. package/dist/model/ListBlockedFriends200ResponseDataInnerRequester.js +1 -1
  84. package/dist/model/ListChatMessages200Response.js +118 -0
  85. package/dist/model/ListChatMessages200ResponseDataInner.js +170 -0
  86. package/dist/model/ListFriendRequests200Response.js +1 -1
  87. package/dist/model/ListFriendRequests200ResponseIncomingInner.js +1 -1
  88. package/dist/model/ListFriendRequests200ResponseIncomingInnerRequester.js +21 -1
  89. package/dist/model/ListFriendRequests200ResponseMeta.js +1 -1
  90. package/dist/model/ListFriends200Response.js +5 -5
  91. package/dist/model/ListFriends200ResponseDataInner.js +19 -1
  92. package/dist/model/ListGroupInvitations200Response.js +124 -0
  93. package/dist/model/ListGroupInvitations200ResponseDataInner.js +122 -0
  94. package/dist/model/ListGroupMembers200Response.js +124 -0
  95. package/dist/model/ListGroupMembers200ResponseDataInner.js +180 -0
  96. package/dist/model/ListJoinRequests200Response.js +124 -0
  97. package/dist/model/ListLeaderboardRecords200Response.js +5 -5
  98. package/dist/model/ListLeaderboardRecords200ResponseDataInner.js +1 -1
  99. package/dist/model/ListLeaderboards200Response.js +5 -5
  100. package/dist/model/ListLeaderboards200ResponseDataInner.js +1 -1
  101. package/dist/model/ListLobbies200Response.js +5 -5
  102. package/dist/model/ListLobbies200ResponseDataInner.js +1 -1
  103. package/dist/model/ListMyGroups200Response.js +124 -0
  104. package/dist/model/ListMyGroups200ResponseDataInner.js +200 -0
  105. package/dist/model/ListNotifications200Response.js +124 -0
  106. package/dist/model/ListNotifications200ResponseDataInner.js +148 -0
  107. package/dist/model/ListRecordsAroundUser200Response.js +1 -1
  108. package/dist/model/ListSentInvitations200Response.js +124 -0
  109. package/dist/model/ListSentInvitations200ResponseDataInner.js +141 -0
  110. package/dist/model/Login200Response.js +1 -1
  111. package/dist/model/Login200ResponseData.js +1 -1
  112. package/dist/model/LoginRequest.js +1 -1
  113. package/dist/model/MarkChatReadRequest.js +156 -0
  114. package/dist/model/NotifyGroup200Response.js +86 -0
  115. package/dist/model/NotifyGroupRequest.js +137 -0
  116. package/dist/model/OAuthSessionData.js +1 -1
  117. package/dist/model/OAuthSessionDataDetails.js +1 -1
  118. package/dist/model/OAuthSessionStatus.js +1 -1
  119. package/dist/model/OauthApiCallback200Response.js +1 -1
  120. package/dist/model/OauthApiCallbackRequest.js +1 -1
  121. package/dist/model/OauthCallbackApiAppleIosRequest.js +1 -1
  122. package/dist/model/OauthGoogleIdTokenRequest.js +1 -1
  123. package/dist/model/OauthRequest200Response.js +1 -1
  124. package/dist/model/OauthSessionStatus404Response.js +1 -1
  125. package/dist/model/PartyCreateLobbyRequest.js +139 -0
  126. package/dist/model/PartyJoinLobbyRequest.js +90 -0
  127. package/dist/model/PromoteGroupMemberRequest.js +109 -0
  128. package/dist/model/QuickJoinRequest.js +1 -1
  129. package/dist/model/RefreshToken200Response.js +1 -1
  130. package/dist/model/RefreshToken200ResponseData.js +1 -1
  131. package/dist/model/RefreshTokenRequest.js +1 -1
  132. package/dist/model/SearchUsers200Response.js +5 -5
  133. package/dist/model/SearchUsers200ResponseDataInner.js +30 -1
  134. package/dist/model/SendChatMessageRequest.js +171 -0
  135. package/dist/model/SendNotificationRequest.js +146 -0
  136. package/dist/model/ShowParty200Response.js +160 -0
  137. package/dist/model/ShowParty200ResponseMembersInner.js +137 -0
  138. package/dist/model/UpdateCurrentUserDisplayNameRequest.js +1 -1
  139. package/dist/model/UpdateCurrentUserPassword400Response.js +1 -1
  140. package/dist/model/UpdateCurrentUserPasswordRequest.js +1 -1
  141. package/dist/model/UpdateGroupRequest.js +152 -0
  142. package/dist/model/UpdateLobbyRequest.js +1 -1
  143. package/dist/model/UpdatePartyRequest.js +95 -0
  144. package/package.json +1 -1
@@ -0,0 +1,354 @@
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 _AdminCreateNotification400Response = _interopRequireDefault(require("../model/AdminCreateNotification400Response"));
9
+ var _CreatePartyRequest = _interopRequireDefault(require("../model/CreatePartyRequest"));
10
+ var _JoinPartyByCodeRequest = _interopRequireDefault(require("../model/JoinPartyByCodeRequest"));
11
+ var _KickUserRequest = _interopRequireDefault(require("../model/KickUserRequest"));
12
+ var _PartyCreateLobbyRequest = _interopRequireDefault(require("../model/PartyCreateLobbyRequest"));
13
+ var _PartyJoinLobbyRequest = _interopRequireDefault(require("../model/PartyJoinLobbyRequest"));
14
+ var _ShowParty200Response = _interopRequireDefault(require("../model/ShowParty200Response"));
15
+ var _UpdatePartyRequest = _interopRequireDefault(require("../model/UpdatePartyRequest"));
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
17
+ 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); }
18
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
19
+ 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); } }
20
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
21
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
22
+ 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); } /**
23
+ * Game Server API
24
+ * 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 ## Notifications Persistent user-to-user notifications that survive across sessions: - **Send notifications** to accepted friends with a title, optional content, and optional metadata - **List own notifications** with pagination (ordered oldest-first) - **Delete notifications** by ID (single or batch) - **Real-time delivery** via the user WebSocket channel (`\"notification\"` events) - **Offline delivery**: undeleted notifications are replayed on WebSocket reconnect
25
+ *
26
+ * The version of the OpenAPI document: 1.0.0
27
+ *
28
+ *
29
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
30
+ * https://openapi-generator.tech
31
+ * Do not edit the class manually.
32
+ *
33
+ */
34
+ /**
35
+ * Parties service.
36
+ * @module api/PartiesApi
37
+ * @version 1.0.0
38
+ */
39
+ var PartiesApi = exports["default"] = /*#__PURE__*/function () {
40
+ /**
41
+ * Constructs a new PartiesApi.
42
+ * @alias module:api/PartiesApi
43
+ * @class
44
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
45
+ * default to {@link module:ApiClient#instance} if unspecified.
46
+ */
47
+ function PartiesApi(apiClient) {
48
+ _classCallCheck(this, PartiesApi);
49
+ this.apiClient = apiClient || _ApiClient["default"].instance;
50
+ }
51
+
52
+ /**
53
+ * Create a party
54
+ * Create a new party. The authenticated user becomes the leader and first member. Cannot create a party while already in a party.
55
+ * @param {Object} opts Optional parameters
56
+ * @param {module:model/CreatePartyRequest} [createPartyRequest] Party creation parameters
57
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ShowParty200Response} and HTTP response
58
+ */
59
+ return _createClass(PartiesApi, [{
60
+ key: "createPartyWithHttpInfo",
61
+ value: function createPartyWithHttpInfo(opts) {
62
+ opts = opts || {};
63
+ var postBody = opts['createPartyRequest'];
64
+ var pathParams = {};
65
+ var queryParams = {};
66
+ var headerParams = {};
67
+ var formParams = {};
68
+ var authNames = ['authorization'];
69
+ var contentTypes = ['application/json'];
70
+ var accepts = ['application/json'];
71
+ var returnType = _ShowParty200Response["default"];
72
+ return this.apiClient.callApi('/api/v1/parties', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
73
+ }
74
+
75
+ /**
76
+ * Create a party
77
+ * Create a new party. The authenticated user becomes the leader and first member. Cannot create a party while already in a party.
78
+ * @param {Object} opts Optional parameters
79
+ * @param {module:model/CreatePartyRequest} opts.createPartyRequest Party creation parameters
80
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ShowParty200Response}
81
+ */
82
+ }, {
83
+ key: "createParty",
84
+ value: function createParty(opts) {
85
+ return this.createPartyWithHttpInfo(opts).then(function (response_and_data) {
86
+ return response_and_data.data;
87
+ });
88
+ }
89
+
90
+ /**
91
+ * Join a party by code
92
+ * Join a party using its unique 6-character code. The code is case-insensitive. If you are already in a party, you will automatically leave it first (disbanding it if you are the leader).
93
+ * @param {Object} opts Optional parameters
94
+ * @param {module:model/JoinPartyByCodeRequest} [joinPartyByCodeRequest] Join parameters
95
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ShowParty200Response} and HTTP response
96
+ */
97
+ }, {
98
+ key: "joinPartyByCodeWithHttpInfo",
99
+ value: function joinPartyByCodeWithHttpInfo(opts) {
100
+ opts = opts || {};
101
+ var postBody = opts['joinPartyByCodeRequest'];
102
+ var pathParams = {};
103
+ var queryParams = {};
104
+ var headerParams = {};
105
+ var formParams = {};
106
+ var authNames = ['authorization'];
107
+ var contentTypes = ['application/json'];
108
+ var accepts = ['application/json'];
109
+ var returnType = _ShowParty200Response["default"];
110
+ return this.apiClient.callApi('/api/v1/parties/join', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
111
+ }
112
+
113
+ /**
114
+ * Join a party by code
115
+ * Join a party using its unique 6-character code. The code is case-insensitive. If you are already in a party, you will automatically leave it first (disbanding it if you are the leader).
116
+ * @param {Object} opts Optional parameters
117
+ * @param {module:model/JoinPartyByCodeRequest} opts.joinPartyByCodeRequest Join parameters
118
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ShowParty200Response}
119
+ */
120
+ }, {
121
+ key: "joinPartyByCode",
122
+ value: function joinPartyByCode(opts) {
123
+ return this.joinPartyByCodeWithHttpInfo(opts).then(function (response_and_data) {
124
+ return response_and_data.data;
125
+ });
126
+ }
127
+
128
+ /**
129
+ * Kick a member from the party (leader only)
130
+ * Remove a member from the party. Only the party leader can kick members.
131
+ * @param {Object} opts Optional parameters
132
+ * @param {module:model/KickUserRequest} [kickUserRequest] Kick parameters
133
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
134
+ */
135
+ }, {
136
+ key: "kickPartyMemberWithHttpInfo",
137
+ value: function kickPartyMemberWithHttpInfo(opts) {
138
+ opts = opts || {};
139
+ var postBody = opts['kickUserRequest'];
140
+ var pathParams = {};
141
+ var queryParams = {};
142
+ var headerParams = {};
143
+ var formParams = {};
144
+ var authNames = ['authorization'];
145
+ var contentTypes = ['application/json'];
146
+ var accepts = ['application/json'];
147
+ var returnType = Object;
148
+ return this.apiClient.callApi('/api/v1/parties/kick', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
149
+ }
150
+
151
+ /**
152
+ * Kick a member from the party (leader only)
153
+ * Remove a member from the party. Only the party leader can kick members.
154
+ * @param {Object} opts Optional parameters
155
+ * @param {module:model/KickUserRequest} opts.kickUserRequest Kick parameters
156
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
157
+ */
158
+ }, {
159
+ key: "kickPartyMember",
160
+ value: function kickPartyMember(opts) {
161
+ return this.kickPartyMemberWithHttpInfo(opts).then(function (response_and_data) {
162
+ return response_and_data.data;
163
+ });
164
+ }
165
+
166
+ /**
167
+ * Leave the current party
168
+ * Leave the party you are currently in. If you are the leader, the party is disbanded and all members are removed.
169
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
170
+ */
171
+ }, {
172
+ key: "leavePartyWithHttpInfo",
173
+ value: function leavePartyWithHttpInfo() {
174
+ var postBody = null;
175
+ var pathParams = {};
176
+ var queryParams = {};
177
+ var headerParams = {};
178
+ var formParams = {};
179
+ var authNames = ['authorization'];
180
+ var contentTypes = [];
181
+ var accepts = ['application/json'];
182
+ var returnType = Object;
183
+ return this.apiClient.callApi('/api/v1/parties/leave', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
184
+ }
185
+
186
+ /**
187
+ * Leave the current party
188
+ * Leave the party you are currently in. If you are the leader, the party is disbanded and all members are removed.
189
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
190
+ */
191
+ }, {
192
+ key: "leaveParty",
193
+ value: function leaveParty() {
194
+ return this.leavePartyWithHttpInfo().then(function (response_and_data) {
195
+ return response_and_data.data;
196
+ });
197
+ }
198
+
199
+ /**
200
+ * Create a lobby with the party (leader only)
201
+ * The party leader creates a new lobby and all party members join it atomically. The party is kept intact. No party member may already be in a lobby. The lobby must have enough capacity for all party members.
202
+ * @param {Object} opts Optional parameters
203
+ * @param {module:model/PartyCreateLobbyRequest} [partyCreateLobbyRequest] Lobby creation parameters
204
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
205
+ */
206
+ }, {
207
+ key: "partyCreateLobbyWithHttpInfo",
208
+ value: function partyCreateLobbyWithHttpInfo(opts) {
209
+ opts = opts || {};
210
+ var postBody = opts['partyCreateLobbyRequest'];
211
+ var pathParams = {};
212
+ var queryParams = {};
213
+ var headerParams = {};
214
+ var formParams = {};
215
+ var authNames = ['authorization'];
216
+ var contentTypes = ['application/json'];
217
+ var accepts = ['application/json'];
218
+ var returnType = Object;
219
+ return this.apiClient.callApi('/api/v1/parties/create_lobby', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
220
+ }
221
+
222
+ /**
223
+ * Create a lobby with the party (leader only)
224
+ * The party leader creates a new lobby and all party members join it atomically. The party is kept intact. No party member may already be in a lobby. The lobby must have enough capacity for all party members.
225
+ * @param {Object} opts Optional parameters
226
+ * @param {module:model/PartyCreateLobbyRequest} opts.partyCreateLobbyRequest Lobby creation parameters
227
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
228
+ */
229
+ }, {
230
+ key: "partyCreateLobby",
231
+ value: function partyCreateLobby(opts) {
232
+ return this.partyCreateLobbyWithHttpInfo(opts).then(function (response_and_data) {
233
+ return response_and_data.data;
234
+ });
235
+ }
236
+
237
+ /**
238
+ * Join a lobby with the party (leader only)
239
+ * The party leader joins an existing lobby and all party members join atomically. The party is kept intact. No party member may already be in a lobby. The lobby must have enough free space for all party members.
240
+ * @param {Number} id Lobby ID
241
+ * @param {Object} opts Optional parameters
242
+ * @param {module:model/PartyJoinLobbyRequest} [partyJoinLobbyRequest] Join parameters (optional)
243
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
244
+ */
245
+ }, {
246
+ key: "partyJoinLobbyWithHttpInfo",
247
+ value: function partyJoinLobbyWithHttpInfo(id, opts) {
248
+ opts = opts || {};
249
+ var postBody = opts['partyJoinLobbyRequest'];
250
+ // verify the required parameter 'id' is set
251
+ if (id === undefined || id === null) {
252
+ throw new Error("Missing the required parameter 'id' when calling partyJoinLobby");
253
+ }
254
+ var pathParams = {
255
+ 'id': id
256
+ };
257
+ var queryParams = {};
258
+ var headerParams = {};
259
+ var formParams = {};
260
+ var authNames = ['authorization'];
261
+ var contentTypes = ['application/json'];
262
+ var accepts = ['application/json'];
263
+ var returnType = Object;
264
+ return this.apiClient.callApi('/api/v1/parties/join_lobby/{id}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
265
+ }
266
+
267
+ /**
268
+ * Join a lobby with the party (leader only)
269
+ * The party leader joins an existing lobby and all party members join atomically. The party is kept intact. No party member may already be in a lobby. The lobby must have enough free space for all party members.
270
+ * @param {Number} id Lobby ID
271
+ * @param {Object} opts Optional parameters
272
+ * @param {module:model/PartyJoinLobbyRequest} opts.partyJoinLobbyRequest Join parameters (optional)
273
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
274
+ */
275
+ }, {
276
+ key: "partyJoinLobby",
277
+ value: function partyJoinLobby(id, opts) {
278
+ return this.partyJoinLobbyWithHttpInfo(id, opts).then(function (response_and_data) {
279
+ return response_and_data.data;
280
+ });
281
+ }
282
+
283
+ /**
284
+ * Get current party
285
+ * Get the party the authenticated user is currently in, including members.
286
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ShowParty200Response} and HTTP response
287
+ */
288
+ }, {
289
+ key: "showPartyWithHttpInfo",
290
+ value: function showPartyWithHttpInfo() {
291
+ var postBody = null;
292
+ var pathParams = {};
293
+ var queryParams = {};
294
+ var headerParams = {};
295
+ var formParams = {};
296
+ var authNames = ['authorization'];
297
+ var contentTypes = [];
298
+ var accepts = ['application/json'];
299
+ var returnType = _ShowParty200Response["default"];
300
+ return this.apiClient.callApi('/api/v1/parties/me', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
301
+ }
302
+
303
+ /**
304
+ * Get current party
305
+ * Get the party the authenticated user is currently in, including members.
306
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ShowParty200Response}
307
+ */
308
+ }, {
309
+ key: "showParty",
310
+ value: function showParty() {
311
+ return this.showPartyWithHttpInfo().then(function (response_and_data) {
312
+ return response_and_data.data;
313
+ });
314
+ }
315
+
316
+ /**
317
+ * Update party settings (leader only)
318
+ * Update party settings such as max_size and metadata. Only the leader can update.
319
+ * @param {Object} opts Optional parameters
320
+ * @param {module:model/UpdatePartyRequest} [updatePartyRequest] Party update parameters
321
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ShowParty200Response} and HTTP response
322
+ */
323
+ }, {
324
+ key: "updatePartyWithHttpInfo",
325
+ value: function updatePartyWithHttpInfo(opts) {
326
+ opts = opts || {};
327
+ var postBody = opts['updatePartyRequest'];
328
+ var pathParams = {};
329
+ var queryParams = {};
330
+ var headerParams = {};
331
+ var formParams = {};
332
+ var authNames = ['authorization'];
333
+ var contentTypes = ['application/json'];
334
+ var accepts = ['application/json'];
335
+ var returnType = _ShowParty200Response["default"];
336
+ return this.apiClient.callApi('/api/v1/parties', 'PATCH', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
337
+ }
338
+
339
+ /**
340
+ * Update party settings (leader only)
341
+ * Update party settings such as max_size and metadata. Only the leader can update.
342
+ * @param {Object} opts Optional parameters
343
+ * @param {module:model/UpdatePartyRequest} opts.updatePartyRequest Party update parameters
344
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ShowParty200Response}
345
+ */
346
+ }, {
347
+ key: "updateParty",
348
+ value: function updateParty(opts) {
349
+ return this.updatePartyWithHttpInfo(opts).then(function (response_and_data) {
350
+ return response_and_data.data;
351
+ });
352
+ }
353
+ }]);
354
+ }();
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _AdminCreateNotification400Response = _interopRequireDefault(require("../model/AdminCreateNotification400Response"));
8
9
  var _GetCurrentUser200Response = _interopRequireDefault(require("../model/GetCurrentUser200Response"));
9
- var _RemoveFriendship401Response = _interopRequireDefault(require("../model/RemoveFriendship401Response"));
10
10
  var _SearchUsers200Response = _interopRequireDefault(require("../model/SearchUsers200Response"));
11
11
  var _SearchUsers200ResponseDataInner = _interopRequireDefault(require("../model/SearchUsers200ResponseDataInner"));
12
12
  var _UpdateCurrentUserDisplayNameRequest = _interopRequireDefault(require("../model/UpdateCurrentUserDisplayNameRequest"));
@@ -20,7 +20,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
20
20
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
21
21
  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); } /**
22
22
  * Game Server API
23
- * 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
23
+ * 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 ## Notifications Persistent user-to-user notifications that survive across sessions: - **Send notifications** to accepted friends with a title, optional content, and optional metadata - **List own notifications** with pagination (ordered oldest-first) - **Delete notifications** by ID (single or batch) - **Real-time delivery** via the user WebSocket channel (`\"notification\"` events) - **Offline delivery**: undeleted notifications are replayed on WebSocket reconnect
24
24
  *
25
25
  * The version of the OpenAPI document: 1.0.0
26
26
  *