@ughuuu/game_server 1.0.381 → 1.0.790

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 (179) hide show
  1. package/README.md +109 -24
  2. package/dist/ApiClient.js +2 -2
  3. package/dist/api/AchievementsApi.js +224 -0
  4. package/dist/api/AdminAchievementsApi.js +356 -0
  5. package/dist/api/AdminChatApi.js +2 -2
  6. package/dist/api/AdminGroupsApi.js +2 -2
  7. package/dist/api/AdminKVApi.js +2 -2
  8. package/dist/api/AdminLeaderboardsApi.js +2 -2
  9. package/dist/api/AdminLobbiesApi.js +2 -2
  10. package/dist/api/AdminNotificationsApi.js +2 -2
  11. package/dist/api/AdminSessionsApi.js +2 -2
  12. package/dist/api/AdminUsersApi.js +2 -2
  13. package/dist/api/AuthenticationApi.js +2 -2
  14. package/dist/api/ChatApi.js +141 -12
  15. package/dist/api/FriendsApi.js +2 -2
  16. package/dist/api/GroupsApi.js +69 -27
  17. package/dist/api/HealthApi.js +2 -2
  18. package/dist/api/HooksApi.js +2 -2
  19. package/dist/api/KVApi.js +2 -2
  20. package/dist/api/LeaderboardsApi.js +43 -2
  21. package/dist/api/LobbiesApi.js +44 -2
  22. package/dist/api/NotificationsApi.js +2 -2
  23. package/dist/api/PartiesApi.js +206 -22
  24. package/dist/api/UsersApi.js +2 -2
  25. package/dist/index.js +183 -10
  26. package/dist/model/AcceptPartyInviteRequest.js +109 -0
  27. package/dist/model/AdminCreateAchievementRequest.js +182 -0
  28. package/dist/model/AdminCreateKvEntry200Response.js +2 -2
  29. package/dist/model/AdminCreateKvEntryRequest.js +2 -2
  30. package/dist/model/AdminCreateLeaderboardRequest.js +2 -2
  31. package/dist/model/AdminCreateNotification400Response.js +2 -2
  32. package/dist/model/AdminCreateNotificationRequest.js +2 -2
  33. package/dist/model/AdminDeleteChatConversation200Response.js +2 -2
  34. package/dist/model/AdminEndLeaderboard200Response.js +2 -2
  35. package/dist/model/AdminEndLeaderboard200ResponseData.js +2 -2
  36. package/dist/model/AdminIncrementAchievementRequest.js +130 -0
  37. package/dist/model/AdminListAchievements200Response.js +118 -0
  38. package/dist/model/AdminListChatMessages200Response.js +2 -2
  39. package/dist/model/AdminListChatMessages200ResponseDataInner.js +20 -3
  40. package/dist/model/AdminListGroups200Response.js +2 -2
  41. package/dist/model/AdminListKvEntries200Response.js +2 -2
  42. package/dist/model/AdminListKvEntries200ResponseDataInner.js +2 -2
  43. package/dist/model/AdminListLobbies200Response.js +2 -2
  44. package/dist/model/AdminListLobbies200ResponseDataInner.js +32 -2
  45. package/dist/model/AdminListNotifications200Response.js +2 -2
  46. package/dist/model/AdminListNotifications200ResponseDataInner.js +15 -2
  47. package/dist/model/AdminListNotifications200ResponseMeta.js +2 -2
  48. package/dist/model/AdminListSessions200Response.js +2 -2
  49. package/dist/model/AdminListSessions200ResponseDataInner.js +2 -2
  50. package/dist/model/AdminRevokeAchievementRequest.js +118 -0
  51. package/dist/model/AdminSubmitLeaderboardScore200Response.js +2 -2
  52. package/dist/model/AdminSubmitLeaderboardScore200ResponseData.js +14 -2
  53. package/dist/model/AdminSubmitLeaderboardScoreRequest.js +20 -8
  54. package/dist/model/AdminUnlockAchievementRequest.js +122 -0
  55. package/dist/model/AdminUpdateAchievement200Response.js +181 -0
  56. package/dist/model/AdminUpdateAchievementRequest.js +145 -0
  57. package/dist/model/AdminUpdateGroup200Response.js +23 -2
  58. package/dist/model/AdminUpdateGroupRequest.js +11 -2
  59. package/dist/model/AdminUpdateKvEntryRequest.js +2 -2
  60. package/dist/model/AdminUpdateLeaderboardRecordRequest.js +2 -2
  61. package/dist/model/AdminUpdateLeaderboardRequest.js +2 -2
  62. package/dist/model/AdminUpdateLobby200Response.js +2 -2
  63. package/dist/model/AdminUpdateLobbyRequest.js +11 -2
  64. package/dist/model/AdminUpdateUser200Response.js +2 -2
  65. package/dist/model/AdminUpdateUser200ResponseData.js +2 -2
  66. package/dist/model/AdminUpdateUserRequest.js +2 -2
  67. package/dist/model/CallHook200Response.js +2 -2
  68. package/dist/model/CallHookRequest.js +2 -2
  69. package/dist/model/CancelGroupInvite200Response.js +2 -2
  70. package/dist/model/CancelJoinRequest200Response.js +2 -2
  71. package/dist/model/CancelPartyInviteRequest.js +109 -0
  72. package/dist/model/ChatUnreadCount200Response.js +2 -2
  73. package/dist/model/CreateFriendRequestRequest.js +2 -2
  74. package/dist/model/CreateGroupRequest.js +11 -2
  75. package/dist/model/CreateLobbyRequest.js +11 -2
  76. package/dist/model/CreatePartyRequest.js +2 -2
  77. package/dist/model/DeclinePartyInviteRequest.js +109 -0
  78. package/dist/model/DeleteNotifications200Response.js +2 -2
  79. package/dist/model/DeleteNotificationsRequest.js +2 -2
  80. package/dist/model/DemoteGroupMemberRequest.js +2 -2
  81. package/dist/model/DeviceLoginRequest.js +2 -2
  82. package/dist/model/ErrorResponse.js +2 -2
  83. package/dist/model/GetChatMessage200Response.js +196 -0
  84. package/dist/model/GetCurrentUser200Response.js +2 -2
  85. package/dist/model/GetCurrentUser200ResponseLinkedProviders.js +2 -2
  86. package/dist/model/GetKv200Response.js +2 -2
  87. package/dist/model/GetLobby200Response.js +133 -0
  88. package/dist/model/GetLobby200ResponseMembersInner.js +146 -0
  89. package/dist/model/GetMyRecord200Response.js +2 -2
  90. package/dist/model/HealthResponse.js +2 -2
  91. package/dist/model/InviteToGroup200Response.js +90 -0
  92. package/dist/model/InviteToGroupRequest.js +2 -2
  93. package/dist/model/InviteToPartyRequest.js +109 -0
  94. package/dist/model/KickGroupMemberRequest.js +2 -2
  95. package/dist/model/KickUserRequest.js +2 -2
  96. package/dist/model/LinkDeviceRequest.js +2 -2
  97. package/dist/model/ListBlockedFriends200Response.js +2 -2
  98. package/dist/model/ListBlockedFriends200ResponseDataInner.js +2 -2
  99. package/dist/model/ListBlockedFriends200ResponseDataInnerRequester.js +2 -2
  100. package/dist/model/ListChatMessages200Response.js +6 -6
  101. package/dist/model/ListFriendRequests200Response.js +2 -2
  102. package/dist/model/ListFriendRequests200ResponseIncomingInner.js +2 -2
  103. package/dist/model/ListFriendRequests200ResponseIncomingInnerRequester.js +11 -2
  104. package/dist/model/ListFriendRequests200ResponseMeta.js +2 -2
  105. package/dist/model/ListFriends200Response.js +2 -2
  106. package/dist/model/ListFriends200ResponseDataInner.js +11 -2
  107. package/dist/model/ListGroupInvitations200Response.js +2 -2
  108. package/dist/model/ListGroupInvitations200ResponseDataInner.js +48 -3
  109. package/dist/model/ListGroupMembers200Response.js +2 -2
  110. package/dist/model/ListGroupMembers200ResponseDataInner.js +2 -2
  111. package/dist/model/ListJoinRequests200Response.js +2 -2
  112. package/dist/model/ListLeaderboardRecords200Response.js +2 -2
  113. package/dist/model/ListLeaderboardRecords200ResponseDataInner.js +4 -4
  114. package/dist/model/ListLeaderboards200Response.js +2 -2
  115. package/dist/model/ListLeaderboards200ResponseDataInner.js +2 -2
  116. package/dist/model/ListLobbies200Response.js +2 -2
  117. package/dist/model/ListLobbies200ResponseDataInner.js +24 -2
  118. package/dist/model/ListMyGroups200Response.js +2 -2
  119. package/dist/model/ListMyGroups200ResponseDataInner.js +24 -2
  120. package/dist/model/ListNotifications200Response.js +2 -2
  121. package/dist/model/ListNotifications200ResponseDataInner.js +15 -2
  122. package/dist/model/ListPartyInvitations200ResponseInner.js +155 -0
  123. package/dist/model/ListRecordsAroundUser200Response.js +2 -2
  124. package/dist/model/ListSentInvitations200Response.js +2 -2
  125. package/dist/model/ListSentInvitations200ResponseDataInner.js +26 -2
  126. package/dist/model/Login200Response.js +2 -2
  127. package/dist/model/Login200ResponseData.js +15 -2
  128. package/dist/model/LoginRequest.js +2 -2
  129. package/dist/model/MarkChatReadRequest.js +8 -3
  130. package/dist/model/NotifyGroup200Response.js +2 -2
  131. package/dist/model/NotifyGroupRequest.js +3 -3
  132. package/dist/model/OAuthSessionData.js +15 -2
  133. package/dist/model/OAuthSessionDataDetails.js +2 -2
  134. package/dist/model/OAuthSessionStatus.js +2 -2
  135. package/dist/model/OauthApiCallback200Response.js +2 -2
  136. package/dist/model/OauthApiCallbackRequest.js +2 -2
  137. package/dist/model/OauthCallbackApiAppleIosRequest.js +2 -2
  138. package/dist/model/OauthGoogleIdTokenRequest.js +2 -2
  139. package/dist/model/OauthRequest200Response.js +2 -2
  140. package/dist/model/OauthSessionStatus404Response.js +2 -2
  141. package/dist/model/PartyCreateLobbyRequest.js +2 -2
  142. package/dist/model/PartyJoinLobbyRequest.js +2 -2
  143. package/dist/model/PromoteGroupMemberRequest.js +2 -2
  144. package/dist/model/QuickJoinRequest.js +2 -2
  145. package/dist/model/RefreshToken200Response.js +2 -2
  146. package/dist/model/RefreshToken200ResponseData.js +15 -2
  147. package/dist/model/RefreshTokenRequest.js +2 -2
  148. package/dist/model/ResolveLeaderboardSlugs200Response.js +89 -0
  149. package/dist/model/ResolveLeaderboardSlugsRequest.js +113 -0
  150. package/dist/model/SearchUsers200Response.js +2 -2
  151. package/dist/model/SearchUsers200ResponseDataInner.js +11 -2
  152. package/dist/model/SendChatMessageRequest.js +10 -5
  153. package/dist/model/SendNotificationRequest.js +2 -2
  154. package/dist/model/ShowParty200Response.js +13 -13
  155. package/dist/model/ShowParty200ResponseMembersInner.js +11 -2
  156. package/dist/model/UpdateChatMessageRequest.js +99 -0
  157. package/dist/model/UpdateCurrentUserDisplayNameRequest.js +2 -2
  158. package/dist/model/UpdateCurrentUserPassword400Response.js +2 -2
  159. package/dist/model/UpdateCurrentUserPasswordRequest.js +2 -2
  160. package/dist/model/UpdateGroupRequest.js +11 -2
  161. package/dist/model/UpdateLobbyRequest.js +11 -2
  162. package/dist/model/UpdatePartyRequest.js +2 -2
  163. package/dist/model/UserAchievements200Response.js +124 -0
  164. package/dist/model/UserAchievements200ResponseDataInner.js +192 -0
  165. package/dist/realtime.js +247 -0
  166. package/dist/webrtc.js +375 -0
  167. package/package.json +15 -4
  168. package/dist/model/CreateLobby401Response.js +0 -89
  169. package/dist/model/JoinLobby200Response.js +0 -89
  170. package/dist/model/JoinLobbyRequest.js +0 -90
  171. package/dist/model/JoinPartyByCodeRequest.js +0 -113
  172. package/dist/model/KickUser200Response.js +0 -89
  173. package/dist/model/LeaveLobby200Response.js +0 -89
  174. package/dist/model/ListChatMessages200ResponseDataInner.js +0 -170
  175. package/dist/model/ListLeaderboardRecords200ResponseMeta.js +0 -125
  176. package/dist/model/ListLobbies200ResponseInner.js +0 -153
  177. package/dist/model/ListLobbies200ResponseMeta.js +0 -125
  178. package/dist/model/Login200ResponseDataUser.js +0 -97
  179. package/dist/model/RemoveFriendship401Response.js +0 -89
@@ -1,125 +0,0 @@
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
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 ListLeaderboardRecords200ResponseMeta model module.
28
- * @module model/ListLeaderboardRecords200ResponseMeta
29
- * @version 1.0.0
30
- */
31
- var ListLeaderboardRecords200ResponseMeta = /*#__PURE__*/function () {
32
- /**
33
- * Constructs a new <code>ListLeaderboardRecords200ResponseMeta</code>.
34
- * @alias module:model/ListLeaderboardRecords200ResponseMeta
35
- */
36
- function ListLeaderboardRecords200ResponseMeta() {
37
- _classCallCheck(this, ListLeaderboardRecords200ResponseMeta);
38
- ListLeaderboardRecords200ResponseMeta.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(ListLeaderboardRecords200ResponseMeta, null, [{
47
- key: "initialize",
48
- value: function initialize(obj) {}
49
-
50
- /**
51
- * Constructs a <code>ListLeaderboardRecords200ResponseMeta</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/ListLeaderboardRecords200ResponseMeta} obj Optional instance to populate.
55
- * @return {module:model/ListLeaderboardRecords200ResponseMeta} The populated <code>ListLeaderboardRecords200ResponseMeta</code> instance.
56
- */
57
- }, {
58
- key: "constructFromObject",
59
- value: function constructFromObject(data, obj) {
60
- if (data) {
61
- obj = obj || new ListLeaderboardRecords200ResponseMeta();
62
- if (data.hasOwnProperty('count')) {
63
- obj['count'] = _ApiClient["default"].convertToType(data['count'], 'Number');
64
- }
65
- if (data.hasOwnProperty('has_more')) {
66
- obj['has_more'] = _ApiClient["default"].convertToType(data['has_more'], 'Boolean');
67
- }
68
- if (data.hasOwnProperty('page')) {
69
- obj['page'] = _ApiClient["default"].convertToType(data['page'], 'Number');
70
- }
71
- if (data.hasOwnProperty('page_size')) {
72
- obj['page_size'] = _ApiClient["default"].convertToType(data['page_size'], 'Number');
73
- }
74
- if (data.hasOwnProperty('total_count')) {
75
- obj['total_count'] = _ApiClient["default"].convertToType(data['total_count'], 'Number');
76
- }
77
- if (data.hasOwnProperty('total_pages')) {
78
- obj['total_pages'] = _ApiClient["default"].convertToType(data['total_pages'], 'Number');
79
- }
80
- }
81
- return obj;
82
- }
83
-
84
- /**
85
- * Validates the JSON data with respect to <code>ListLeaderboardRecords200ResponseMeta</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>ListLeaderboardRecords200ResponseMeta</code>.
88
- */
89
- }, {
90
- key: "validateJSON",
91
- value: function validateJSON(data) {
92
- return true;
93
- }
94
- }]);
95
- }();
96
- /**
97
- * @member {Number} count
98
- */
99
- ListLeaderboardRecords200ResponseMeta.prototype['count'] = undefined;
100
-
101
- /**
102
- * @member {Boolean} has_more
103
- */
104
- ListLeaderboardRecords200ResponseMeta.prototype['has_more'] = undefined;
105
-
106
- /**
107
- * @member {Number} page
108
- */
109
- ListLeaderboardRecords200ResponseMeta.prototype['page'] = undefined;
110
-
111
- /**
112
- * @member {Number} page_size
113
- */
114
- ListLeaderboardRecords200ResponseMeta.prototype['page_size'] = undefined;
115
-
116
- /**
117
- * @member {Number} total_count
118
- */
119
- ListLeaderboardRecords200ResponseMeta.prototype['total_count'] = undefined;
120
-
121
- /**
122
- * @member {Number} total_pages
123
- */
124
- ListLeaderboardRecords200ResponseMeta.prototype['total_pages'] = undefined;
125
- var _default = exports["default"] = ListLeaderboardRecords200ResponseMeta;
@@ -1,153 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
- function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
15
- * Game Server API
16
- * API for Game Server application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### Getting Tokens - **Email/Password**: POST to `/api/v1/login` with email and password - **Discord OAuth**: Use `/api/v1/auth/discord` flow - **Google OAuth**: Use `/api/v1/auth/google` flow - **Facebook OAuth**: Use `/api/v1/auth/facebook` flow - **Apple Sign In**: Use `/auth/apple` browser flow (API flow not yet implemented) Both methods return: - `access_token` - Short-lived (15 min), use for API requests - `refresh_token` - Long-lived (30 days), use to get new access tokens ### Using Tokens Include the access token in the Authorization header: ``` Authorization: Bearer <access_token> ``` ### Refreshing Tokens When your access token expires, use POST `/api/v1/refresh` with your refresh token to get a new access token. ## Endpoints All API endpoints are under `/api/v1`
17
- *
18
- * The version of the OpenAPI document: 1.0.0
19
- *
20
- *
21
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
- * https://openapi-generator.tech
23
- * Do not edit the class manually.
24
- *
25
- */
26
- /**
27
- * The ListLobbies200ResponseInner model module.
28
- * @module model/ListLobbies200ResponseInner
29
- * @version 1.0.0
30
- */
31
- var ListLobbies200ResponseInner = /*#__PURE__*/function () {
32
- /**
33
- * Constructs a new <code>ListLobbies200ResponseInner</code>.
34
- * @alias module:model/ListLobbies200ResponseInner
35
- */
36
- function ListLobbies200ResponseInner() {
37
- _classCallCheck(this, ListLobbies200ResponseInner);
38
- ListLobbies200ResponseInner.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(ListLobbies200ResponseInner, null, [{
47
- key: "initialize",
48
- value: function initialize(obj) {}
49
-
50
- /**
51
- * Constructs a <code>ListLobbies200ResponseInner</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/ListLobbies200ResponseInner} obj Optional instance to populate.
55
- * @return {module:model/ListLobbies200ResponseInner} The populated <code>ListLobbies200ResponseInner</code> instance.
56
- */
57
- }, {
58
- key: "constructFromObject",
59
- value: function constructFromObject(data, obj) {
60
- if (data) {
61
- obj = obj || new ListLobbies200ResponseInner();
62
- if (data.hasOwnProperty('host_id')) {
63
- obj['host_id'] = _ApiClient["default"].convertToType(data['host_id'], 'Number');
64
- }
65
- if (data.hasOwnProperty('hostless')) {
66
- obj['hostless'] = _ApiClient["default"].convertToType(data['hostless'], 'Boolean');
67
- }
68
- if (data.hasOwnProperty('id')) {
69
- obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
70
- }
71
- if (data.hasOwnProperty('is_hidden')) {
72
- obj['is_hidden'] = _ApiClient["default"].convertToType(data['is_hidden'], 'Boolean');
73
- }
74
- if (data.hasOwnProperty('is_locked')) {
75
- obj['is_locked'] = _ApiClient["default"].convertToType(data['is_locked'], 'Boolean');
76
- }
77
- if (data.hasOwnProperty('max_users')) {
78
- obj['max_users'] = _ApiClient["default"].convertToType(data['max_users'], 'Number');
79
- }
80
- if (data.hasOwnProperty('metadata')) {
81
- obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], Object);
82
- }
83
- if (data.hasOwnProperty('title')) {
84
- obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String');
85
- }
86
- }
87
- return obj;
88
- }
89
-
90
- /**
91
- * Validates the JSON data with respect to <code>ListLobbies200ResponseInner</code>.
92
- * @param {Object} data The plain JavaScript object bearing properties of interest.
93
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListLobbies200ResponseInner</code>.
94
- */
95
- }, {
96
- key: "validateJSON",
97
- value: function validateJSON(data) {
98
- // ensure the json data is a string
99
- if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
100
- throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
101
- }
102
- return true;
103
- }
104
- }]);
105
- }();
106
- /**
107
- * User ID of the host
108
- * @member {Number} host_id
109
- */
110
- ListLobbies200ResponseInner.prototype['host_id'] = undefined;
111
-
112
- /**
113
- * Whether this is a server-managed lobby
114
- * @member {Boolean} hostless
115
- */
116
- ListLobbies200ResponseInner.prototype['hostless'] = undefined;
117
-
118
- /**
119
- * Lobby ID
120
- * @member {Number} id
121
- */
122
- ListLobbies200ResponseInner.prototype['id'] = undefined;
123
-
124
- /**
125
- * Hidden from public listings
126
- * @member {Boolean} is_hidden
127
- */
128
- ListLobbies200ResponseInner.prototype['is_hidden'] = undefined;
129
-
130
- /**
131
- * Locked - no new joins allowed
132
- * @member {Boolean} is_locked
133
- */
134
- ListLobbies200ResponseInner.prototype['is_locked'] = undefined;
135
-
136
- /**
137
- * Maximum number of users allowed
138
- * @member {Number} max_users
139
- */
140
- ListLobbies200ResponseInner.prototype['max_users'] = undefined;
141
-
142
- /**
143
- * Arbitrary metadata
144
- * @member {Object} metadata
145
- */
146
- ListLobbies200ResponseInner.prototype['metadata'] = undefined;
147
-
148
- /**
149
- * Display title
150
- * @member {String} title
151
- */
152
- ListLobbies200ResponseInner.prototype['title'] = undefined;
153
- var _default = exports["default"] = ListLobbies200ResponseInner;
@@ -1,125 +0,0 @@
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
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 ListLobbies200ResponseMeta model module.
28
- * @module model/ListLobbies200ResponseMeta
29
- * @version 1.0.0
30
- */
31
- var ListLobbies200ResponseMeta = /*#__PURE__*/function () {
32
- /**
33
- * Constructs a new <code>ListLobbies200ResponseMeta</code>.
34
- * @alias module:model/ListLobbies200ResponseMeta
35
- */
36
- function ListLobbies200ResponseMeta() {
37
- _classCallCheck(this, ListLobbies200ResponseMeta);
38
- ListLobbies200ResponseMeta.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(ListLobbies200ResponseMeta, null, [{
47
- key: "initialize",
48
- value: function initialize(obj) {}
49
-
50
- /**
51
- * Constructs a <code>ListLobbies200ResponseMeta</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/ListLobbies200ResponseMeta} obj Optional instance to populate.
55
- * @return {module:model/ListLobbies200ResponseMeta} The populated <code>ListLobbies200ResponseMeta</code> instance.
56
- */
57
- }, {
58
- key: "constructFromObject",
59
- value: function constructFromObject(data, obj) {
60
- if (data) {
61
- obj = obj || new ListLobbies200ResponseMeta();
62
- if (data.hasOwnProperty('count')) {
63
- obj['count'] = _ApiClient["default"].convertToType(data['count'], 'Number');
64
- }
65
- if (data.hasOwnProperty('has_more')) {
66
- obj['has_more'] = _ApiClient["default"].convertToType(data['has_more'], 'Boolean');
67
- }
68
- if (data.hasOwnProperty('page')) {
69
- obj['page'] = _ApiClient["default"].convertToType(data['page'], 'Number');
70
- }
71
- if (data.hasOwnProperty('page_size')) {
72
- obj['page_size'] = _ApiClient["default"].convertToType(data['page_size'], 'Number');
73
- }
74
- if (data.hasOwnProperty('total_count')) {
75
- obj['total_count'] = _ApiClient["default"].convertToType(data['total_count'], 'Number');
76
- }
77
- if (data.hasOwnProperty('total_pages')) {
78
- obj['total_pages'] = _ApiClient["default"].convertToType(data['total_pages'], 'Number');
79
- }
80
- }
81
- return obj;
82
- }
83
-
84
- /**
85
- * Validates the JSON data with respect to <code>ListLobbies200ResponseMeta</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>ListLobbies200ResponseMeta</code>.
88
- */
89
- }, {
90
- key: "validateJSON",
91
- value: function validateJSON(data) {
92
- return true;
93
- }
94
- }]);
95
- }();
96
- /**
97
- * @member {Number} count
98
- */
99
- ListLobbies200ResponseMeta.prototype['count'] = undefined;
100
-
101
- /**
102
- * @member {Boolean} has_more
103
- */
104
- ListLobbies200ResponseMeta.prototype['has_more'] = undefined;
105
-
106
- /**
107
- * @member {Number} page
108
- */
109
- ListLobbies200ResponseMeta.prototype['page'] = undefined;
110
-
111
- /**
112
- * @member {Number} page_size
113
- */
114
- ListLobbies200ResponseMeta.prototype['page_size'] = undefined;
115
-
116
- /**
117
- * @member {Number} total_count
118
- */
119
- ListLobbies200ResponseMeta.prototype['total_count'] = undefined;
120
-
121
- /**
122
- * @member {Number} total_pages
123
- */
124
- ListLobbies200ResponseMeta.prototype['total_pages'] = undefined;
125
- var _default = exports["default"] = ListLobbies200ResponseMeta;
@@ -1,97 +0,0 @@
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
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 Login200ResponseDataUser model module.
28
- * @module model/Login200ResponseDataUser
29
- * @version 1.0.0
30
- */
31
- var Login200ResponseDataUser = /*#__PURE__*/function () {
32
- /**
33
- * Constructs a new <code>Login200ResponseDataUser</code>.
34
- * @alias module:model/Login200ResponseDataUser
35
- */
36
- function Login200ResponseDataUser() {
37
- _classCallCheck(this, Login200ResponseDataUser);
38
- Login200ResponseDataUser.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(Login200ResponseDataUser, null, [{
47
- key: "initialize",
48
- value: function initialize(obj) {}
49
-
50
- /**
51
- * Constructs a <code>Login200ResponseDataUser</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/Login200ResponseDataUser} obj Optional instance to populate.
55
- * @return {module:model/Login200ResponseDataUser} The populated <code>Login200ResponseDataUser</code> instance.
56
- */
57
- }, {
58
- key: "constructFromObject",
59
- value: function constructFromObject(data, obj) {
60
- if (data) {
61
- obj = obj || new Login200ResponseDataUser();
62
- if (data.hasOwnProperty('email')) {
63
- obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
64
- }
65
- if (data.hasOwnProperty('id')) {
66
- obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
67
- }
68
- }
69
- return obj;
70
- }
71
-
72
- /**
73
- * Validates the JSON data with respect to <code>Login200ResponseDataUser</code>.
74
- * @param {Object} data The plain JavaScript object bearing properties of interest.
75
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Login200ResponseDataUser</code>.
76
- */
77
- }, {
78
- key: "validateJSON",
79
- value: function validateJSON(data) {
80
- // ensure the json data is a string
81
- if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
82
- throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
83
- }
84
- return true;
85
- }
86
- }]);
87
- }();
88
- /**
89
- * @member {String} email
90
- */
91
- Login200ResponseDataUser.prototype['email'] = undefined;
92
-
93
- /**
94
- * @member {Number} id
95
- */
96
- Login200ResponseDataUser.prototype['id'] = undefined;
97
- var _default = exports["default"] = Login200ResponseDataUser;
@@ -1,89 +0,0 @@
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
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 RemoveFriendship401Response model module.
28
- * @module model/RemoveFriendship401Response
29
- * @version 1.0.0
30
- */
31
- var RemoveFriendship401Response = /*#__PURE__*/function () {
32
- /**
33
- * Constructs a new <code>RemoveFriendship401Response</code>.
34
- * @alias module:model/RemoveFriendship401Response
35
- */
36
- function RemoveFriendship401Response() {
37
- _classCallCheck(this, RemoveFriendship401Response);
38
- RemoveFriendship401Response.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(RemoveFriendship401Response, null, [{
47
- key: "initialize",
48
- value: function initialize(obj) {}
49
-
50
- /**
51
- * Constructs a <code>RemoveFriendship401Response</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/RemoveFriendship401Response} obj Optional instance to populate.
55
- * @return {module:model/RemoveFriendship401Response} The populated <code>RemoveFriendship401Response</code> instance.
56
- */
57
- }, {
58
- key: "constructFromObject",
59
- value: function constructFromObject(data, obj) {
60
- if (data) {
61
- obj = obj || new RemoveFriendship401Response();
62
- if (data.hasOwnProperty('error')) {
63
- obj['error'] = _ApiClient["default"].convertToType(data['error'], 'String');
64
- }
65
- }
66
- return obj;
67
- }
68
-
69
- /**
70
- * Validates the JSON data with respect to <code>RemoveFriendship401Response</code>.
71
- * @param {Object} data The plain JavaScript object bearing properties of interest.
72
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>RemoveFriendship401Response</code>.
73
- */
74
- }, {
75
- key: "validateJSON",
76
- value: function validateJSON(data) {
77
- // ensure the json data is a string
78
- if (data['error'] && !(typeof data['error'] === 'string' || data['error'] instanceof String)) {
79
- throw new Error("Expected the field `error` to be a primitive type in the JSON string but got " + data['error']);
80
- }
81
- return true;
82
- }
83
- }]);
84
- }();
85
- /**
86
- * @member {String} error
87
- */
88
- RemoveFriendship401Response.prototype['error'] = undefined;
89
- var _default = exports["default"] = RemoveFriendship401Response;