@ughuuu/game_server 1.0.376 → 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.
- package/README.md +105 -8
- package/dist/ApiClient.js +1 -1
- package/dist/api/AdminChatApi.js +194 -0
- package/dist/api/AdminGroupsApi.js +193 -0
- package/dist/api/AdminKVApi.js +2 -2
- package/dist/api/AdminLeaderboardsApi.js +2 -2
- package/dist/api/AdminLobbiesApi.js +2 -2
- package/dist/api/AdminNotificationsApi.js +179 -0
- package/dist/api/AdminSessionsApi.js +2 -2
- package/dist/api/AdminUsersApi.js +2 -2
- package/dist/api/AuthenticationApi.js +2 -2
- package/dist/api/ChatApi.js +230 -0
- package/dist/api/FriendsApi.js +2 -2
- package/dist/api/GroupsApi.js +1017 -0
- package/dist/api/HealthApi.js +1 -1
- package/dist/api/HooksApi.js +2 -2
- package/dist/api/KVApi.js +2 -2
- package/dist/api/LeaderboardsApi.js +1 -1
- package/dist/api/LobbiesApi.js +6 -6
- package/dist/api/NotificationsApi.js +169 -0
- package/dist/api/PartiesApi.js +354 -0
- package/dist/api/UsersApi.js +2 -2
- package/dist/index.js +374 -17
- package/dist/model/AdminCreateKvEntry200Response.js +1 -1
- package/dist/model/AdminCreateKvEntryRequest.js +1 -1
- package/dist/model/AdminCreateLeaderboardRequest.js +1 -1
- package/dist/model/AdminCreateNotification400Response.js +89 -0
- package/dist/model/AdminCreateNotificationRequest.js +157 -0
- package/dist/model/AdminDeleteChatConversation200Response.js +85 -0
- package/dist/model/AdminEndLeaderboard200Response.js +1 -1
- package/dist/model/AdminEndLeaderboard200ResponseData.js +1 -1
- package/dist/model/AdminListChatMessages200Response.js +124 -0
- package/dist/model/AdminListChatMessages200ResponseDataInner.js +184 -0
- package/dist/model/AdminListGroups200Response.js +124 -0
- package/dist/model/AdminListKvEntries200Response.js +5 -5
- package/dist/model/AdminListKvEntries200ResponseDataInner.js +1 -1
- package/dist/model/AdminListLobbies200Response.js +5 -5
- package/dist/model/AdminListLobbies200ResponseDataInner.js +1 -1
- package/dist/model/AdminListNotifications200Response.js +124 -0
- package/dist/model/AdminListNotifications200ResponseDataInner.js +148 -0
- package/dist/model/AdminListNotifications200ResponseMeta.js +125 -0
- package/dist/model/AdminListSessions200Response.js +5 -5
- package/dist/model/AdminListSessions200ResponseDataInner.js +1 -1
- package/dist/model/AdminSubmitLeaderboardScore200Response.js +1 -1
- package/dist/model/AdminSubmitLeaderboardScore200ResponseData.js +1 -1
- package/dist/model/AdminSubmitLeaderboardScoreRequest.js +1 -1
- package/dist/model/AdminUpdateGroup200Response.js +169 -0
- package/dist/model/AdminUpdateGroupRequest.js +129 -0
- package/dist/model/AdminUpdateKvEntryRequest.js +1 -1
- package/dist/model/AdminUpdateLeaderboardRecordRequest.js +1 -1
- package/dist/model/AdminUpdateLeaderboardRequest.js +1 -1
- package/dist/model/AdminUpdateLobby200Response.js +1 -1
- package/dist/model/AdminUpdateLobbyRequest.js +1 -1
- package/dist/model/AdminUpdateUser200Response.js +1 -1
- package/dist/model/AdminUpdateUser200ResponseData.js +17 -1
- package/dist/model/AdminUpdateUserRequest.js +1 -1
- package/dist/model/CallHook200Response.js +1 -1
- package/dist/model/CallHookRequest.js +1 -1
- package/dist/model/CancelGroupInvite200Response.js +89 -0
- package/dist/model/CancelJoinRequest200Response.js +157 -0
- package/dist/model/ChatUnreadCount200Response.js +85 -0
- package/dist/model/CreateFriendRequestRequest.js +1 -1
- package/dist/model/CreateGroupRequest.js +181 -0
- package/dist/model/CreateLobbyRequest.js +1 -1
- package/dist/model/CreatePartyRequest.js +98 -0
- package/dist/model/DeleteNotifications200Response.js +86 -0
- package/dist/model/DeleteNotificationsRequest.js +113 -0
- package/dist/model/DemoteGroupMemberRequest.js +109 -0
- package/dist/model/DeviceLoginRequest.js +1 -1
- package/dist/model/ErrorResponse.js +1 -1
- package/dist/model/GetCurrentUser200Response.js +30 -1
- package/dist/model/GetCurrentUser200ResponseLinkedProviders.js +1 -1
- package/dist/model/GetKv200Response.js +1 -1
- package/dist/model/GetMyRecord200Response.js +1 -1
- package/dist/model/HealthResponse.js +1 -1
- package/dist/model/InviteToGroupRequest.js +109 -0
- package/dist/model/JoinPartyByCodeRequest.js +113 -0
- package/dist/model/KickGroupMemberRequest.js +109 -0
- package/dist/model/KickUserRequest.js +1 -1
- package/dist/model/LinkDeviceRequest.js +1 -1
- package/dist/model/ListBlockedFriends200Response.js +5 -5
- package/dist/model/ListBlockedFriends200ResponseDataInner.js +1 -1
- package/dist/model/ListBlockedFriends200ResponseDataInnerRequester.js +1 -1
- package/dist/model/ListChatMessages200Response.js +118 -0
- package/dist/model/ListChatMessages200ResponseDataInner.js +170 -0
- package/dist/model/ListFriendRequests200Response.js +1 -1
- package/dist/model/ListFriendRequests200ResponseIncomingInner.js +1 -1
- package/dist/model/ListFriendRequests200ResponseIncomingInnerRequester.js +21 -1
- package/dist/model/ListFriendRequests200ResponseMeta.js +1 -1
- package/dist/model/ListFriends200Response.js +5 -5
- package/dist/model/ListFriends200ResponseDataInner.js +19 -1
- package/dist/model/ListGroupInvitations200Response.js +124 -0
- package/dist/model/ListGroupInvitations200ResponseDataInner.js +122 -0
- package/dist/model/ListGroupMembers200Response.js +124 -0
- package/dist/model/ListGroupMembers200ResponseDataInner.js +180 -0
- package/dist/model/ListJoinRequests200Response.js +124 -0
- package/dist/model/ListLeaderboardRecords200Response.js +5 -5
- package/dist/model/ListLeaderboardRecords200ResponseDataInner.js +1 -1
- package/dist/model/ListLeaderboards200Response.js +5 -5
- package/dist/model/ListLeaderboards200ResponseDataInner.js +1 -1
- package/dist/model/ListLobbies200Response.js +5 -5
- package/dist/model/ListLobbies200ResponseDataInner.js +1 -1
- package/dist/model/ListMyGroups200Response.js +124 -0
- package/dist/model/ListMyGroups200ResponseDataInner.js +200 -0
- package/dist/model/ListNotifications200Response.js +124 -0
- package/dist/model/ListNotifications200ResponseDataInner.js +148 -0
- package/dist/model/ListRecordsAroundUser200Response.js +1 -1
- package/dist/model/ListSentInvitations200Response.js +124 -0
- package/dist/model/ListSentInvitations200ResponseDataInner.js +141 -0
- package/dist/model/Login200Response.js +1 -1
- package/dist/model/Login200ResponseData.js +1 -1
- package/dist/model/LoginRequest.js +1 -1
- package/dist/model/MarkChatReadRequest.js +156 -0
- package/dist/model/NotifyGroup200Response.js +86 -0
- package/dist/model/NotifyGroupRequest.js +137 -0
- package/dist/model/OAuthSessionData.js +1 -1
- package/dist/model/OAuthSessionDataDetails.js +1 -1
- package/dist/model/OAuthSessionStatus.js +1 -1
- package/dist/model/OauthApiCallback200Response.js +1 -1
- package/dist/model/OauthApiCallbackRequest.js +1 -1
- package/dist/model/OauthCallbackApiAppleIosRequest.js +1 -1
- package/dist/model/OauthGoogleIdTokenRequest.js +1 -1
- package/dist/model/OauthRequest200Response.js +1 -1
- package/dist/model/OauthSessionStatus404Response.js +1 -1
- package/dist/model/PartyCreateLobbyRequest.js +139 -0
- package/dist/model/PartyJoinLobbyRequest.js +90 -0
- package/dist/model/PromoteGroupMemberRequest.js +109 -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/SearchUsers200Response.js +5 -5
- package/dist/model/SearchUsers200ResponseDataInner.js +30 -1
- package/dist/model/SendChatMessageRequest.js +171 -0
- package/dist/model/SendNotificationRequest.js +146 -0
- package/dist/model/ShowParty200Response.js +160 -0
- package/dist/model/ShowParty200ResponseMembersInner.js +137 -0
- package/dist/model/UpdateCurrentUserDisplayNameRequest.js +1 -1
- package/dist/model/UpdateCurrentUserPassword400Response.js +1 -1
- package/dist/model/UpdateCurrentUserPasswordRequest.js +1 -1
- package/dist/model/UpdateGroupRequest.js +152 -0
- package/dist/model/UpdateLobbyRequest.js +1 -1
- package/dist/model/UpdatePartyRequest.js +95 -0
- package/package.json +3 -6
package/dist/api/HealthApi.js
CHANGED
|
@@ -14,7 +14,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
14
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
16
16
|
* Game Server API
|
|
17
|
-
* API for Game Server application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### Getting Tokens - **Email/Password**: POST to `/api/v1/login` with email and password - **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
|
|
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 ## 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
|
|
18
18
|
*
|
|
19
19
|
* The version of the OpenAPI document: 1.0.0
|
|
20
20
|
*
|
package/dist/api/HooksApi.js
CHANGED
|
@@ -5,9 +5,9 @@ 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 _CallHook200Response = _interopRequireDefault(require("../model/CallHook200Response"));
|
|
9
10
|
var _CallHookRequest = _interopRequireDefault(require("../model/CallHookRequest"));
|
|
10
|
-
var _RemoveFriendship401Response = _interopRequireDefault(require("../model/RemoveFriendship401Response"));
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
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
13
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
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
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
|
|
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 ## 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
|
|
20
20
|
*
|
|
21
21
|
* The version of the OpenAPI document: 1.0.0
|
|
22
22
|
*
|
package/dist/api/KVApi.js
CHANGED
|
@@ -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 _GetKv200Response = _interopRequireDefault(require("../model/GetKv200Response"));
|
|
9
|
-
var _RemoveFriendship401Response = _interopRequireDefault(require("../model/RemoveFriendship401Response"));
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
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
12
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -15,7 +15,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
15
15
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
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
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
|
|
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 ## 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
|
|
19
19
|
*
|
|
20
20
|
* The version of the OpenAPI document: 1.0.0
|
|
21
21
|
*
|
|
@@ -18,7 +18,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
18
18
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
19
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
20
20
|
* Game Server API
|
|
21
|
-
* API for Game Server application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### Getting Tokens - **Email/Password**: POST to `/api/v1/login` with email and password - **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
|
+
* 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
|
|
22
22
|
*
|
|
23
23
|
* The version of the OpenAPI document: 1.0.0
|
|
24
24
|
*
|
package/dist/api/LobbiesApi.js
CHANGED
|
@@ -5,13 +5,13 @@ 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 _CreateLobbyRequest = _interopRequireDefault(require("../model/CreateLobbyRequest"));
|
|
9
|
-
var _JoinLobbyRequest = _interopRequireDefault(require("../model/JoinLobbyRequest"));
|
|
10
10
|
var _KickUserRequest = _interopRequireDefault(require("../model/KickUserRequest"));
|
|
11
11
|
var _ListLobbies200Response = _interopRequireDefault(require("../model/ListLobbies200Response"));
|
|
12
12
|
var _ListLobbies200ResponseDataInner = _interopRequireDefault(require("../model/ListLobbies200ResponseDataInner"));
|
|
13
|
+
var _PartyJoinLobbyRequest = _interopRequireDefault(require("../model/PartyJoinLobbyRequest"));
|
|
13
14
|
var _QuickJoinRequest = _interopRequireDefault(require("../model/QuickJoinRequest"));
|
|
14
|
-
var _RemoveFriendship401Response = _interopRequireDefault(require("../model/RemoveFriendship401Response"));
|
|
15
15
|
var _UpdateLobbyRequest = _interopRequireDefault(require("../model/UpdateLobbyRequest"));
|
|
16
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
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); }
|
|
@@ -21,7 +21,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
21
21
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
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
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
|
|
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
25
|
*
|
|
26
26
|
* The version of the OpenAPI document: 1.0.0
|
|
27
27
|
*
|
|
@@ -92,14 +92,14 @@ var LobbiesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
92
92
|
* Join an existing lobby. If the lobby requires a password, include it in the request body.
|
|
93
93
|
* @param {Number} id Lobby ID
|
|
94
94
|
* @param {Object} opts Optional parameters
|
|
95
|
-
* @param {module:model/
|
|
95
|
+
* @param {module:model/PartyJoinLobbyRequest} [partyJoinLobbyRequest] Join parameters (optional)
|
|
96
96
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
|
|
97
97
|
*/
|
|
98
98
|
}, {
|
|
99
99
|
key: "joinLobbyWithHttpInfo",
|
|
100
100
|
value: function joinLobbyWithHttpInfo(id, opts) {
|
|
101
101
|
opts = opts || {};
|
|
102
|
-
var postBody = opts['
|
|
102
|
+
var postBody = opts['partyJoinLobbyRequest'];
|
|
103
103
|
// verify the required parameter 'id' is set
|
|
104
104
|
if (id === undefined || id === null) {
|
|
105
105
|
throw new Error("Missing the required parameter 'id' when calling joinLobby");
|
|
@@ -122,7 +122,7 @@ var LobbiesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
122
122
|
* Join an existing lobby. If the lobby requires a password, include it in the request body.
|
|
123
123
|
* @param {Number} id Lobby ID
|
|
124
124
|
* @param {Object} opts Optional parameters
|
|
125
|
-
* @param {module:model/
|
|
125
|
+
* @param {module:model/PartyJoinLobbyRequest} opts.partyJoinLobbyRequest Join parameters (optional)
|
|
126
126
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
|
|
127
127
|
*/
|
|
128
128
|
}, {
|
|
@@ -0,0 +1,169 @@
|
|
|
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 _DeleteNotifications200Response = _interopRequireDefault(require("../model/DeleteNotifications200Response"));
|
|
10
|
+
var _DeleteNotificationsRequest = _interopRequireDefault(require("../model/DeleteNotificationsRequest"));
|
|
11
|
+
var _ListNotifications200Response = _interopRequireDefault(require("../model/ListNotifications200Response"));
|
|
12
|
+
var _ListNotifications200ResponseDataInner = _interopRequireDefault(require("../model/ListNotifications200ResponseDataInner"));
|
|
13
|
+
var _SendNotificationRequest = _interopRequireDefault(require("../model/SendNotificationRequest"));
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
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); }
|
|
16
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
17
|
+
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); } }
|
|
18
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
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); } /**
|
|
21
|
+
* Game Server API
|
|
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 ## 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
|
|
23
|
+
*
|
|
24
|
+
* The version of the OpenAPI document: 1.0.0
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
28
|
+
* https://openapi-generator.tech
|
|
29
|
+
* Do not edit the class manually.
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Notifications service.
|
|
34
|
+
* @module api/NotificationsApi
|
|
35
|
+
* @version 1.0.0
|
|
36
|
+
*/
|
|
37
|
+
var NotificationsApi = exports["default"] = /*#__PURE__*/function () {
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a new NotificationsApi.
|
|
40
|
+
* @alias module:api/NotificationsApi
|
|
41
|
+
* @class
|
|
42
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
43
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
44
|
+
*/
|
|
45
|
+
function NotificationsApi(apiClient) {
|
|
46
|
+
_classCallCheck(this, NotificationsApi);
|
|
47
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Delete notifications by IDs
|
|
52
|
+
* Delete one or more notifications belonging to the authenticated user. Pass an array of notification IDs.
|
|
53
|
+
* @param {Object} opts Optional parameters
|
|
54
|
+
* @param {module:model/DeleteNotificationsRequest} [deleteNotificationsRequest] Notification IDs to delete
|
|
55
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteNotifications200Response} and HTTP response
|
|
56
|
+
*/
|
|
57
|
+
return _createClass(NotificationsApi, [{
|
|
58
|
+
key: "deleteNotificationsWithHttpInfo",
|
|
59
|
+
value: function deleteNotificationsWithHttpInfo(opts) {
|
|
60
|
+
opts = opts || {};
|
|
61
|
+
var postBody = opts['deleteNotificationsRequest'];
|
|
62
|
+
var pathParams = {};
|
|
63
|
+
var queryParams = {};
|
|
64
|
+
var headerParams = {};
|
|
65
|
+
var formParams = {};
|
|
66
|
+
var authNames = ['authorization'];
|
|
67
|
+
var contentTypes = ['application/json'];
|
|
68
|
+
var accepts = ['application/json'];
|
|
69
|
+
var returnType = _DeleteNotifications200Response["default"];
|
|
70
|
+
return this.apiClient.callApi('/api/v1/notifications', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Delete notifications by IDs
|
|
75
|
+
* Delete one or more notifications belonging to the authenticated user. Pass an array of notification IDs.
|
|
76
|
+
* @param {Object} opts Optional parameters
|
|
77
|
+
* @param {module:model/DeleteNotificationsRequest} opts.deleteNotificationsRequest Notification IDs to delete
|
|
78
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteNotifications200Response}
|
|
79
|
+
*/
|
|
80
|
+
}, {
|
|
81
|
+
key: "deleteNotifications",
|
|
82
|
+
value: function deleteNotifications(opts) {
|
|
83
|
+
return this.deleteNotificationsWithHttpInfo(opts).then(function (response_and_data) {
|
|
84
|
+
return response_and_data.data;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* List own notifications
|
|
90
|
+
* Return all undeleted notifications for the authenticated user, ordered oldest-first. Supports pagination.
|
|
91
|
+
* @param {Object} opts Optional parameters
|
|
92
|
+
* @param {Number} [page] Page number (1-based)
|
|
93
|
+
* @param {Number} [pageSize] Page size (max results per page)
|
|
94
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListNotifications200Response} and HTTP response
|
|
95
|
+
*/
|
|
96
|
+
}, {
|
|
97
|
+
key: "listNotificationsWithHttpInfo",
|
|
98
|
+
value: function listNotificationsWithHttpInfo(opts) {
|
|
99
|
+
opts = opts || {};
|
|
100
|
+
var postBody = null;
|
|
101
|
+
var pathParams = {};
|
|
102
|
+
var queryParams = {
|
|
103
|
+
'page': opts['page'],
|
|
104
|
+
'page_size': opts['pageSize']
|
|
105
|
+
};
|
|
106
|
+
var headerParams = {};
|
|
107
|
+
var formParams = {};
|
|
108
|
+
var authNames = ['authorization'];
|
|
109
|
+
var contentTypes = [];
|
|
110
|
+
var accepts = ['application/json'];
|
|
111
|
+
var returnType = _ListNotifications200Response["default"];
|
|
112
|
+
return this.apiClient.callApi('/api/v1/notifications', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* List own notifications
|
|
117
|
+
* Return all undeleted notifications for the authenticated user, ordered oldest-first. Supports pagination.
|
|
118
|
+
* @param {Object} opts Optional parameters
|
|
119
|
+
* @param {Number} opts.page Page number (1-based)
|
|
120
|
+
* @param {Number} opts.pageSize Page size (max results per page)
|
|
121
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListNotifications200Response}
|
|
122
|
+
*/
|
|
123
|
+
}, {
|
|
124
|
+
key: "listNotifications",
|
|
125
|
+
value: function listNotifications(opts) {
|
|
126
|
+
return this.listNotificationsWithHttpInfo(opts).then(function (response_and_data) {
|
|
127
|
+
return response_and_data.data;
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Send a notification to a friend
|
|
133
|
+
* Send a notification to an accepted friend. The recipient will receive it in real-time (if connected) and it persists until deleted.
|
|
134
|
+
* @param {Object} opts Optional parameters
|
|
135
|
+
* @param {module:model/SendNotificationRequest} [sendNotificationRequest] Notification payload
|
|
136
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListNotifications200ResponseDataInner} and HTTP response
|
|
137
|
+
*/
|
|
138
|
+
}, {
|
|
139
|
+
key: "sendNotificationWithHttpInfo",
|
|
140
|
+
value: function sendNotificationWithHttpInfo(opts) {
|
|
141
|
+
opts = opts || {};
|
|
142
|
+
var postBody = opts['sendNotificationRequest'];
|
|
143
|
+
var pathParams = {};
|
|
144
|
+
var queryParams = {};
|
|
145
|
+
var headerParams = {};
|
|
146
|
+
var formParams = {};
|
|
147
|
+
var authNames = ['authorization'];
|
|
148
|
+
var contentTypes = ['application/json'];
|
|
149
|
+
var accepts = ['application/json'];
|
|
150
|
+
var returnType = _ListNotifications200ResponseDataInner["default"];
|
|
151
|
+
return this.apiClient.callApi('/api/v1/notifications', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Send a notification to a friend
|
|
156
|
+
* Send a notification to an accepted friend. The recipient will receive it in real-time (if connected) and it persists until deleted.
|
|
157
|
+
* @param {Object} opts Optional parameters
|
|
158
|
+
* @param {module:model/SendNotificationRequest} opts.sendNotificationRequest Notification payload
|
|
159
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListNotifications200ResponseDataInner}
|
|
160
|
+
*/
|
|
161
|
+
}, {
|
|
162
|
+
key: "sendNotification",
|
|
163
|
+
value: function sendNotification(opts) {
|
|
164
|
+
return this.sendNotificationWithHttpInfo(opts).then(function (response_and_data) {
|
|
165
|
+
return response_and_data.data;
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}]);
|
|
169
|
+
}();
|