@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,171 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
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 ## 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
+ *
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
+ * The SendChatMessageRequest model module.
31
+ * @module model/SendChatMessageRequest
32
+ * @version 1.0.0
33
+ */
34
+ var SendChatMessageRequest = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>SendChatMessageRequest</code>.
37
+ * @alias module:model/SendChatMessageRequest
38
+ * @param chatRefId {Number} Reference ID (lobby_id, group_id, or friend user_id)
39
+ * @param chatType {module:model/SendChatMessageRequest.ChatTypeEnum} Type of chat
40
+ * @param content {String} Message text (1-4096 chars)
41
+ */
42
+ function SendChatMessageRequest(chatRefId, chatType, content) {
43
+ _classCallCheck(this, SendChatMessageRequest);
44
+ SendChatMessageRequest.initialize(this, chatRefId, chatType, content);
45
+ }
46
+
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+ return _createClass(SendChatMessageRequest, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, chatRefId, chatType, content) {
55
+ obj['chat_ref_id'] = chatRefId;
56
+ obj['chat_type'] = chatType;
57
+ obj['content'] = content;
58
+ }
59
+
60
+ /**
61
+ * Constructs a <code>SendChatMessageRequest</code> from a plain JavaScript object, optionally creating a new instance.
62
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
63
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
64
+ * @param {module:model/SendChatMessageRequest} obj Optional instance to populate.
65
+ * @return {module:model/SendChatMessageRequest} The populated <code>SendChatMessageRequest</code> instance.
66
+ */
67
+ }, {
68
+ key: "constructFromObject",
69
+ value: function constructFromObject(data, obj) {
70
+ if (data) {
71
+ obj = obj || new SendChatMessageRequest();
72
+ if (data.hasOwnProperty('chat_ref_id')) {
73
+ obj['chat_ref_id'] = _ApiClient["default"].convertToType(data['chat_ref_id'], 'Number');
74
+ }
75
+ if (data.hasOwnProperty('chat_type')) {
76
+ obj['chat_type'] = _ApiClient["default"].convertToType(data['chat_type'], 'String');
77
+ }
78
+ if (data.hasOwnProperty('content')) {
79
+ obj['content'] = _ApiClient["default"].convertToType(data['content'], 'String');
80
+ }
81
+ if (data.hasOwnProperty('metadata')) {
82
+ obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], Object);
83
+ }
84
+ }
85
+ return obj;
86
+ }
87
+
88
+ /**
89
+ * Validates the JSON data with respect to <code>SendChatMessageRequest</code>.
90
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
91
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SendChatMessageRequest</code>.
92
+ */
93
+ }, {
94
+ key: "validateJSON",
95
+ value: function validateJSON(data) {
96
+ // check to make sure all required properties are present in the JSON string
97
+ var _iterator = _createForOfIteratorHelper(SendChatMessageRequest.RequiredProperties),
98
+ _step;
99
+ try {
100
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
101
+ var property = _step.value;
102
+ if (!data.hasOwnProperty(property)) {
103
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
104
+ }
105
+ }
106
+ // ensure the json data is a string
107
+ } catch (err) {
108
+ _iterator.e(err);
109
+ } finally {
110
+ _iterator.f();
111
+ }
112
+ if (data['chat_type'] && !(typeof data['chat_type'] === 'string' || data['chat_type'] instanceof String)) {
113
+ throw new Error("Expected the field `chat_type` to be a primitive type in the JSON string but got " + data['chat_type']);
114
+ }
115
+ // ensure the json data is a string
116
+ if (data['content'] && !(typeof data['content'] === 'string' || data['content'] instanceof String)) {
117
+ throw new Error("Expected the field `content` to be a primitive type in the JSON string but got " + data['content']);
118
+ }
119
+ return true;
120
+ }
121
+ }]);
122
+ }();
123
+ SendChatMessageRequest.RequiredProperties = ["chat_ref_id", "chat_type", "content"];
124
+
125
+ /**
126
+ * Reference ID (lobby_id, group_id, or friend user_id)
127
+ * @member {Number} chat_ref_id
128
+ */
129
+ SendChatMessageRequest.prototype['chat_ref_id'] = undefined;
130
+
131
+ /**
132
+ * Type of chat
133
+ * @member {module:model/SendChatMessageRequest.ChatTypeEnum} chat_type
134
+ */
135
+ SendChatMessageRequest.prototype['chat_type'] = undefined;
136
+
137
+ /**
138
+ * Message text (1-4096 chars)
139
+ * @member {String} content
140
+ */
141
+ SendChatMessageRequest.prototype['content'] = undefined;
142
+
143
+ /**
144
+ * Optional metadata
145
+ * @member {Object} metadata
146
+ */
147
+ SendChatMessageRequest.prototype['metadata'] = undefined;
148
+
149
+ /**
150
+ * Allowed values for the <code>chat_type</code> property.
151
+ * @enum {String}
152
+ * @readonly
153
+ */
154
+ SendChatMessageRequest['ChatTypeEnum'] = {
155
+ /**
156
+ * value: "lobby"
157
+ * @const
158
+ */
159
+ "lobby": "lobby",
160
+ /**
161
+ * value: "group"
162
+ * @const
163
+ */
164
+ "group": "group",
165
+ /**
166
+ * value: "friend"
167
+ * @const
168
+ */
169
+ "friend": "friend"
170
+ };
171
+ var _default = exports["default"] = SendChatMessageRequest;
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
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 ## 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
+ *
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
+ * The SendNotificationRequest model module.
31
+ * @module model/SendNotificationRequest
32
+ * @version 1.0.0
33
+ */
34
+ var SendNotificationRequest = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>SendNotificationRequest</code>.
37
+ * @alias module:model/SendNotificationRequest
38
+ * @param title {String} Notification title (required)
39
+ * @param userId {Number} Recipient user ID (must be an accepted friend)
40
+ */
41
+ function SendNotificationRequest(title, userId) {
42
+ _classCallCheck(this, SendNotificationRequest);
43
+ SendNotificationRequest.initialize(this, title, userId);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(SendNotificationRequest, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, title, userId) {
54
+ obj['title'] = title;
55
+ obj['user_id'] = userId;
56
+ }
57
+
58
+ /**
59
+ * Constructs a <code>SendNotificationRequest</code> from a plain JavaScript object, optionally creating a new instance.
60
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
61
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
62
+ * @param {module:model/SendNotificationRequest} obj Optional instance to populate.
63
+ * @return {module:model/SendNotificationRequest} The populated <code>SendNotificationRequest</code> instance.
64
+ */
65
+ }, {
66
+ key: "constructFromObject",
67
+ value: function constructFromObject(data, obj) {
68
+ if (data) {
69
+ obj = obj || new SendNotificationRequest();
70
+ if (data.hasOwnProperty('content')) {
71
+ obj['content'] = _ApiClient["default"].convertToType(data['content'], 'String');
72
+ }
73
+ if (data.hasOwnProperty('metadata')) {
74
+ obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], Object);
75
+ }
76
+ if (data.hasOwnProperty('title')) {
77
+ obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String');
78
+ }
79
+ if (data.hasOwnProperty('user_id')) {
80
+ obj['user_id'] = _ApiClient["default"].convertToType(data['user_id'], 'Number');
81
+ }
82
+ }
83
+ return obj;
84
+ }
85
+
86
+ /**
87
+ * Validates the JSON data with respect to <code>SendNotificationRequest</code>.
88
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
89
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SendNotificationRequest</code>.
90
+ */
91
+ }, {
92
+ key: "validateJSON",
93
+ value: function validateJSON(data) {
94
+ // check to make sure all required properties are present in the JSON string
95
+ var _iterator = _createForOfIteratorHelper(SendNotificationRequest.RequiredProperties),
96
+ _step;
97
+ try {
98
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
99
+ var property = _step.value;
100
+ if (!data.hasOwnProperty(property)) {
101
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
102
+ }
103
+ }
104
+ // ensure the json data is a string
105
+ } catch (err) {
106
+ _iterator.e(err);
107
+ } finally {
108
+ _iterator.f();
109
+ }
110
+ if (data['content'] && !(typeof data['content'] === 'string' || data['content'] instanceof String)) {
111
+ throw new Error("Expected the field `content` to be a primitive type in the JSON string but got " + data['content']);
112
+ }
113
+ // ensure the json data is a string
114
+ if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
115
+ throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
116
+ }
117
+ return true;
118
+ }
119
+ }]);
120
+ }();
121
+ SendNotificationRequest.RequiredProperties = ["title", "user_id"];
122
+
123
+ /**
124
+ * Notification body text (optional)
125
+ * @member {String} content
126
+ */
127
+ SendNotificationRequest.prototype['content'] = undefined;
128
+
129
+ /**
130
+ * Arbitrary metadata (optional)
131
+ * @member {Object} metadata
132
+ */
133
+ SendNotificationRequest.prototype['metadata'] = undefined;
134
+
135
+ /**
136
+ * Notification title (required)
137
+ * @member {String} title
138
+ */
139
+ SendNotificationRequest.prototype['title'] = undefined;
140
+
141
+ /**
142
+ * Recipient user ID (must be an accepted friend)
143
+ * @member {Number} user_id
144
+ */
145
+ SendNotificationRequest.prototype['user_id'] = undefined;
146
+ var _default = exports["default"] = SendNotificationRequest;
@@ -0,0 +1,160 @@
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 _ShowParty200ResponseMembersInner = _interopRequireDefault(require("./ShowParty200ResponseMembersInner"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
12
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
13
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ 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); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ 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); } /**
19
+ * Game Server API
20
+ * 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
21
+ *
22
+ * The version of the OpenAPI document: 1.0.0
23
+ *
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * The ShowParty200Response model module.
32
+ * @module model/ShowParty200Response
33
+ * @version 1.0.0
34
+ */
35
+ var ShowParty200Response = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>ShowParty200Response</code>.
38
+ * @alias module:model/ShowParty200Response
39
+ */
40
+ function ShowParty200Response() {
41
+ _classCallCheck(this, ShowParty200Response);
42
+ ShowParty200Response.initialize(this);
43
+ }
44
+
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+ return _createClass(ShowParty200Response, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj) {}
53
+
54
+ /**
55
+ * Constructs a <code>ShowParty200Response</code> from a plain JavaScript object, optionally creating a new instance.
56
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
57
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
58
+ * @param {module:model/ShowParty200Response} obj Optional instance to populate.
59
+ * @return {module:model/ShowParty200Response} The populated <code>ShowParty200Response</code> instance.
60
+ */
61
+ }, {
62
+ key: "constructFromObject",
63
+ value: function constructFromObject(data, obj) {
64
+ if (data) {
65
+ obj = obj || new ShowParty200Response();
66
+ if (data.hasOwnProperty('code')) {
67
+ obj['code'] = _ApiClient["default"].convertToType(data['code'], 'String');
68
+ }
69
+ if (data.hasOwnProperty('id')) {
70
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
71
+ }
72
+ if (data.hasOwnProperty('leader_id')) {
73
+ obj['leader_id'] = _ApiClient["default"].convertToType(data['leader_id'], 'Number');
74
+ }
75
+ if (data.hasOwnProperty('max_size')) {
76
+ obj['max_size'] = _ApiClient["default"].convertToType(data['max_size'], 'Number');
77
+ }
78
+ if (data.hasOwnProperty('members')) {
79
+ obj['members'] = _ApiClient["default"].convertToType(data['members'], [_ShowParty200ResponseMembersInner["default"]]);
80
+ }
81
+ if (data.hasOwnProperty('metadata')) {
82
+ obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], Object);
83
+ }
84
+ }
85
+ return obj;
86
+ }
87
+
88
+ /**
89
+ * Validates the JSON data with respect to <code>ShowParty200Response</code>.
90
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
91
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ShowParty200Response</code>.
92
+ */
93
+ }, {
94
+ key: "validateJSON",
95
+ value: function validateJSON(data) {
96
+ // ensure the json data is a string
97
+ if (data['code'] && !(typeof data['code'] === 'string' || data['code'] instanceof String)) {
98
+ throw new Error("Expected the field `code` to be a primitive type in the JSON string but got " + data['code']);
99
+ }
100
+ if (data['members']) {
101
+ // data not null
102
+ // ensure the json data is an array
103
+ if (!Array.isArray(data['members'])) {
104
+ throw new Error("Expected the field `members` to be an array in the JSON data but got " + data['members']);
105
+ }
106
+ // validate the optional field `members` (array)
107
+ var _iterator = _createForOfIteratorHelper(data['members']),
108
+ _step;
109
+ try {
110
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
111
+ var item = _step.value;
112
+ _ShowParty200ResponseMembersInner["default"].validateJSON(item);
113
+ }
114
+ } catch (err) {
115
+ _iterator.e(err);
116
+ } finally {
117
+ _iterator.f();
118
+ }
119
+ ;
120
+ }
121
+ return true;
122
+ }
123
+ }]);
124
+ }();
125
+ /**
126
+ * Unique 6-character code for joining the party
127
+ * @member {String} code
128
+ */
129
+ ShowParty200Response.prototype['code'] = undefined;
130
+
131
+ /**
132
+ * Party ID
133
+ * @member {Number} id
134
+ */
135
+ ShowParty200Response.prototype['id'] = undefined;
136
+
137
+ /**
138
+ * User ID of the party leader
139
+ * @member {Number} leader_id
140
+ */
141
+ ShowParty200Response.prototype['leader_id'] = undefined;
142
+
143
+ /**
144
+ * Maximum party members allowed
145
+ * @member {Number} max_size
146
+ */
147
+ ShowParty200Response.prototype['max_size'] = undefined;
148
+
149
+ /**
150
+ * Current party members
151
+ * @member {Array.<module:model/ShowParty200ResponseMembersInner>} members
152
+ */
153
+ ShowParty200Response.prototype['members'] = undefined;
154
+
155
+ /**
156
+ * Arbitrary metadata
157
+ * @member {Object} metadata
158
+ */
159
+ ShowParty200Response.prototype['metadata'] = undefined;
160
+ var _default = exports["default"] = ShowParty200Response;
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
15
+ * Game Server API
16
+ * API for Game Server application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### Getting Tokens - **Email/Password**: POST to `/api/v1/login` with email and password - **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
17
+ *
18
+ * The version of the OpenAPI document: 1.0.0
19
+ *
20
+ *
21
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
+ * https://openapi-generator.tech
23
+ * Do not edit the class manually.
24
+ *
25
+ */
26
+ /**
27
+ * The ShowParty200ResponseMembersInner model module.
28
+ * @module model/ShowParty200ResponseMembersInner
29
+ * @version 1.0.0
30
+ */
31
+ var ShowParty200ResponseMembersInner = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>ShowParty200ResponseMembersInner</code>.
34
+ * @alias module:model/ShowParty200ResponseMembersInner
35
+ */
36
+ function ShowParty200ResponseMembersInner() {
37
+ _classCallCheck(this, ShowParty200ResponseMembersInner);
38
+ ShowParty200ResponseMembersInner.initialize(this);
39
+ }
40
+
41
+ /**
42
+ * Initializes the fields of this object.
43
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
44
+ * Only for internal use.
45
+ */
46
+ return _createClass(ShowParty200ResponseMembersInner, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>ShowParty200ResponseMembersInner</code> from a plain JavaScript object, optionally creating a new instance.
52
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
53
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
54
+ * @param {module:model/ShowParty200ResponseMembersInner} obj Optional instance to populate.
55
+ * @return {module:model/ShowParty200ResponseMembersInner} The populated <code>ShowParty200ResponseMembersInner</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new ShowParty200ResponseMembersInner();
62
+ if (data.hasOwnProperty('display_name')) {
63
+ obj['display_name'] = _ApiClient["default"].convertToType(data['display_name'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('email')) {
66
+ obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
67
+ }
68
+ if (data.hasOwnProperty('id')) {
69
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
70
+ }
71
+ if (data.hasOwnProperty('is_online')) {
72
+ obj['is_online'] = _ApiClient["default"].convertToType(data['is_online'], 'Boolean');
73
+ }
74
+ if (data.hasOwnProperty('last_seen_at')) {
75
+ obj['last_seen_at'] = _ApiClient["default"].convertToType(data['last_seen_at'], 'Date');
76
+ }
77
+ if (data.hasOwnProperty('profile_url')) {
78
+ obj['profile_url'] = _ApiClient["default"].convertToType(data['profile_url'], 'String');
79
+ }
80
+ }
81
+ return obj;
82
+ }
83
+
84
+ /**
85
+ * Validates the JSON data with respect to <code>ShowParty200ResponseMembersInner</code>.
86
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
87
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ShowParty200ResponseMembersInner</code>.
88
+ */
89
+ }, {
90
+ key: "validateJSON",
91
+ value: function validateJSON(data) {
92
+ // ensure the json data is a string
93
+ if (data['display_name'] && !(typeof data['display_name'] === 'string' || data['display_name'] instanceof String)) {
94
+ throw new Error("Expected the field `display_name` to be a primitive type in the JSON string but got " + data['display_name']);
95
+ }
96
+ // ensure the json data is a string
97
+ if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
98
+ throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
99
+ }
100
+ // ensure the json data is a string
101
+ if (data['profile_url'] && !(typeof data['profile_url'] === 'string' || data['profile_url'] instanceof String)) {
102
+ throw new Error("Expected the field `profile_url` to be a primitive type in the JSON string but got " + data['profile_url']);
103
+ }
104
+ return true;
105
+ }
106
+ }]);
107
+ }();
108
+ /**
109
+ * @member {String} display_name
110
+ */
111
+ ShowParty200ResponseMembersInner.prototype['display_name'] = undefined;
112
+
113
+ /**
114
+ * @member {String} email
115
+ */
116
+ ShowParty200ResponseMembersInner.prototype['email'] = undefined;
117
+
118
+ /**
119
+ * @member {Number} id
120
+ */
121
+ ShowParty200ResponseMembersInner.prototype['id'] = undefined;
122
+
123
+ /**
124
+ * @member {Boolean} is_online
125
+ */
126
+ ShowParty200ResponseMembersInner.prototype['is_online'] = undefined;
127
+
128
+ /**
129
+ * @member {Date} last_seen_at
130
+ */
131
+ ShowParty200ResponseMembersInner.prototype['last_seen_at'] = undefined;
132
+
133
+ /**
134
+ * @member {String} profile_url
135
+ */
136
+ ShowParty200ResponseMembersInner.prototype['profile_url'] = undefined;
137
+ var _default = exports["default"] = ShowParty200ResponseMembersInner;