@onesignal/node-onesignal 1.0.0-beta6 → 1.0.0-beta8

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 (276) hide show
  1. package/.github/workflows/npm_deploy.yml +0 -1
  2. package/CHANGELOG.md +4 -0
  3. package/DefaultApi.md +215 -0
  4. package/README.md +41 -0
  5. package/apis/DefaultApi.ts +401 -29
  6. package/dist/apis/DefaultApi.d.ts +75 -0
  7. package/dist/apis/DefaultApi.js +1901 -0
  8. package/dist/apis/DefaultApi.js.map +1 -0
  9. package/dist/apis/baseapi.d.ts +18 -0
  10. package/dist/apis/baseapi.js +46 -0
  11. package/dist/apis/baseapi.js.map +1 -0
  12. package/dist/apis/exception.d.ts +10 -0
  13. package/dist/apis/exception.js +32 -0
  14. package/dist/apis/exception.js.map +1 -0
  15. package/dist/auth/auth.d.ts +42 -0
  16. package/dist/auth/auth.js +109 -0
  17. package/dist/auth/auth.js.map +1 -0
  18. package/dist/configuration.d.ts +20 -0
  19. package/dist/configuration.js +33 -0
  20. package/dist/configuration.js.map +1 -0
  21. package/dist/http/http.d.ts +73 -0
  22. package/dist/http/http.js +215 -0
  23. package/dist/http/http.js.map +1 -0
  24. package/dist/http/isomorphic-fetch.d.ts +5 -0
  25. package/dist/http/isomorphic-fetch.js +33 -0
  26. package/dist/http/isomorphic-fetch.js.map +1 -0
  27. package/dist/index.d.ts +10 -0
  28. package/dist/index.js +29 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/middleware.d.ts +16 -0
  31. package/dist/middleware.js +18 -0
  32. package/dist/middleware.js.map +1 -0
  33. package/dist/models/App.d.ts +51 -0
  34. package/dist/models/App.js +220 -0
  35. package/dist/models/App.js.map +1 -0
  36. package/dist/models/BadRequestError.d.ts +17 -0
  37. package/dist/models/BadRequestError.js +22 -0
  38. package/dist/models/BadRequestError.js.map +1 -0
  39. package/dist/models/BasicNotification.d.ts +122 -0
  40. package/dist/models/BasicNotification.js +622 -0
  41. package/dist/models/BasicNotification.js.map +1 -0
  42. package/dist/models/BasicNotificationAllOf.d.ts +110 -0
  43. package/dist/models/BasicNotificationAllOf.js +550 -0
  44. package/dist/models/BasicNotificationAllOf.js.map +1 -0
  45. package/dist/models/BasicNotificationAllOfAndroidBackgroundLayout.d.ts +19 -0
  46. package/dist/models/BasicNotificationAllOfAndroidBackgroundLayout.js +34 -0
  47. package/dist/models/BasicNotificationAllOfAndroidBackgroundLayout.js.map +1 -0
  48. package/dist/models/BeginLiveActivityRequest.d.ts +18 -0
  49. package/dist/models/BeginLiveActivityRequest.js +28 -0
  50. package/dist/models/BeginLiveActivityRequest.js.map +1 -0
  51. package/dist/models/Button.d.ts +19 -0
  52. package/dist/models/Button.js +34 -0
  53. package/dist/models/Button.js.map +1 -0
  54. package/dist/models/CancelNotificationSuccessResponse.d.ts +17 -0
  55. package/dist/models/CancelNotificationSuccessResponse.js +22 -0
  56. package/dist/models/CancelNotificationSuccessResponse.js.map +1 -0
  57. package/dist/models/CreateNotificationBadRequestResponse.d.ts +17 -0
  58. package/dist/models/CreateNotificationBadRequestResponse.js +22 -0
  59. package/dist/models/CreateNotificationBadRequestResponse.js.map +1 -0
  60. package/dist/models/CreateNotificationSuccessResponse.d.ts +21 -0
  61. package/dist/models/CreateNotificationSuccessResponse.js +40 -0
  62. package/dist/models/CreateNotificationSuccessResponse.js.map +1 -0
  63. package/dist/models/CreatePlayerSuccessResponse.d.ts +18 -0
  64. package/dist/models/CreatePlayerSuccessResponse.js +28 -0
  65. package/dist/models/CreatePlayerSuccessResponse.js.map +1 -0
  66. package/dist/models/CreateSegmentBadRequestResponse.d.ts +18 -0
  67. package/dist/models/CreateSegmentBadRequestResponse.js +28 -0
  68. package/dist/models/CreateSegmentBadRequestResponse.js.map +1 -0
  69. package/dist/models/CreateSegmentConflictResponse.d.ts +18 -0
  70. package/dist/models/CreateSegmentConflictResponse.js +28 -0
  71. package/dist/models/CreateSegmentConflictResponse.js.map +1 -0
  72. package/dist/models/CreateSegmentSuccessResponse.d.ts +18 -0
  73. package/dist/models/CreateSegmentSuccessResponse.js +28 -0
  74. package/dist/models/CreateSegmentSuccessResponse.js.map +1 -0
  75. package/dist/models/DeletePlayerBadRequestResponse.d.ts +17 -0
  76. package/dist/models/DeletePlayerBadRequestResponse.js +22 -0
  77. package/dist/models/DeletePlayerBadRequestResponse.js.map +1 -0
  78. package/dist/models/DeletePlayerNotFoundResponse.d.ts +17 -0
  79. package/dist/models/DeletePlayerNotFoundResponse.js +22 -0
  80. package/dist/models/DeletePlayerNotFoundResponse.js.map +1 -0
  81. package/dist/models/DeletePlayerSuccessResponse.d.ts +17 -0
  82. package/dist/models/DeletePlayerSuccessResponse.js +22 -0
  83. package/dist/models/DeletePlayerSuccessResponse.js.map +1 -0
  84. package/dist/models/DeleteSegmentBadRequestResponse.d.ts +17 -0
  85. package/dist/models/DeleteSegmentBadRequestResponse.js +22 -0
  86. package/dist/models/DeleteSegmentBadRequestResponse.js.map +1 -0
  87. package/dist/models/DeleteSegmentNotFoundResponse.d.ts +17 -0
  88. package/dist/models/DeleteSegmentNotFoundResponse.js +22 -0
  89. package/dist/models/DeleteSegmentNotFoundResponse.js.map +1 -0
  90. package/dist/models/DeleteSegmentSuccessResponse.d.ts +17 -0
  91. package/dist/models/DeleteSegmentSuccessResponse.js +22 -0
  92. package/dist/models/DeleteSegmentSuccessResponse.js.map +1 -0
  93. package/dist/models/DeliveryData.d.ts +21 -0
  94. package/dist/models/DeliveryData.js +46 -0
  95. package/dist/models/DeliveryData.js.map +1 -0
  96. package/dist/models/ExportPlayersRequestBody.d.ts +19 -0
  97. package/dist/models/ExportPlayersRequestBody.js +34 -0
  98. package/dist/models/ExportPlayersRequestBody.js.map +1 -0
  99. package/dist/models/ExportPlayersSuccessResponse.d.ts +17 -0
  100. package/dist/models/ExportPlayersSuccessResponse.js +22 -0
  101. package/dist/models/ExportPlayersSuccessResponse.js.map +1 -0
  102. package/dist/models/Filter.d.ts +21 -0
  103. package/dist/models/Filter.js +40 -0
  104. package/dist/models/Filter.js.map +1 -0
  105. package/dist/models/FilterExpressions.d.ts +23 -0
  106. package/dist/models/FilterExpressions.js +46 -0
  107. package/dist/models/FilterExpressions.js.map +1 -0
  108. package/dist/models/FilterNotificationTarget.d.ts +28 -0
  109. package/dist/models/FilterNotificationTarget.js +88 -0
  110. package/dist/models/FilterNotificationTarget.js.map +1 -0
  111. package/dist/models/GetNotificationRequestBody.d.ts +20 -0
  112. package/dist/models/GetNotificationRequestBody.js +34 -0
  113. package/dist/models/GetNotificationRequestBody.js.map +1 -0
  114. package/dist/models/InvalidIdentifierError.d.ts +18 -0
  115. package/dist/models/InvalidIdentifierError.js +28 -0
  116. package/dist/models/InvalidIdentifierError.js.map +1 -0
  117. package/dist/models/Notification.d.ts +123 -0
  118. package/dist/models/Notification.js +628 -0
  119. package/dist/models/Notification.js.map +1 -0
  120. package/dist/models/Notification200Errors.d.ts +18 -0
  121. package/dist/models/Notification200Errors.js +28 -0
  122. package/dist/models/Notification200Errors.js.map +1 -0
  123. package/dist/models/NotificationAllOf.d.ts +17 -0
  124. package/dist/models/NotificationAllOf.js +22 -0
  125. package/dist/models/NotificationAllOf.js.map +1 -0
  126. package/dist/models/NotificationHistoryBadRequestResponse.d.ts +18 -0
  127. package/dist/models/NotificationHistoryBadRequestResponse.js +28 -0
  128. package/dist/models/NotificationHistoryBadRequestResponse.js.map +1 -0
  129. package/dist/models/NotificationHistorySuccessResponse.d.ts +18 -0
  130. package/dist/models/NotificationHistorySuccessResponse.js +28 -0
  131. package/dist/models/NotificationHistorySuccessResponse.js.map +1 -0
  132. package/dist/models/NotificationSlice.d.ts +21 -0
  133. package/dist/models/NotificationSlice.js +40 -0
  134. package/dist/models/NotificationSlice.js.map +1 -0
  135. package/dist/models/NotificationTarget.d.ts +28 -0
  136. package/dist/models/NotificationTarget.js +88 -0
  137. package/dist/models/NotificationTarget.js.map +1 -0
  138. package/dist/models/NotificationWithMeta.d.ts +135 -0
  139. package/dist/models/NotificationWithMeta.js +688 -0
  140. package/dist/models/NotificationWithMeta.js.map +1 -0
  141. package/dist/models/NotificationWithMetaAllOf.d.ts +28 -0
  142. package/dist/models/NotificationWithMetaAllOf.js +82 -0
  143. package/dist/models/NotificationWithMetaAllOf.js.map +1 -0
  144. package/dist/models/ObjectSerializer.d.ts +58 -0
  145. package/dist/models/ObjectSerializer.js +366 -0
  146. package/dist/models/ObjectSerializer.js.map +1 -0
  147. package/dist/models/Operator.d.ts +18 -0
  148. package/dist/models/Operator.js +22 -0
  149. package/dist/models/Operator.js.map +1 -0
  150. package/dist/models/OutcomeData.d.ts +20 -0
  151. package/dist/models/OutcomeData.js +34 -0
  152. package/dist/models/OutcomeData.js.map +1 -0
  153. package/dist/models/OutcomesData.d.ts +18 -0
  154. package/dist/models/OutcomesData.js +22 -0
  155. package/dist/models/OutcomesData.js.map +1 -0
  156. package/dist/models/PlatformDeliveryData.d.ts +27 -0
  157. package/dist/models/PlatformDeliveryData.js +64 -0
  158. package/dist/models/PlatformDeliveryData.js.map +1 -0
  159. package/dist/models/PlatformDeliveryDataEmailAllOf.d.ts +23 -0
  160. package/dist/models/PlatformDeliveryDataEmailAllOf.js +58 -0
  161. package/dist/models/PlatformDeliveryDataEmailAllOf.js.map +1 -0
  162. package/dist/models/PlatformDeliveryDataSmsAllOf.d.ts +19 -0
  163. package/dist/models/PlatformDeliveryDataSmsAllOf.js +34 -0
  164. package/dist/models/PlatformDeliveryDataSmsAllOf.js.map +1 -0
  165. package/dist/models/Player.d.ts +43 -0
  166. package/dist/models/Player.js +178 -0
  167. package/dist/models/Player.js.map +1 -0
  168. package/dist/models/PlayerNotificationTarget.d.ts +26 -0
  169. package/dist/models/PlayerNotificationTarget.js +76 -0
  170. package/dist/models/PlayerNotificationTarget.js.map +1 -0
  171. package/dist/models/PlayerSlice.d.ts +21 -0
  172. package/dist/models/PlayerSlice.js +40 -0
  173. package/dist/models/PlayerSlice.js.map +1 -0
  174. package/dist/models/Purchase.d.ts +19 -0
  175. package/dist/models/Purchase.js +34 -0
  176. package/dist/models/Purchase.js.map +1 -0
  177. package/dist/models/Segment.d.ts +20 -0
  178. package/dist/models/Segment.js +34 -0
  179. package/dist/models/Segment.js.map +1 -0
  180. package/dist/models/SegmentNotificationTarget.d.ts +18 -0
  181. package/dist/models/SegmentNotificationTarget.js +28 -0
  182. package/dist/models/SegmentNotificationTarget.js.map +1 -0
  183. package/dist/models/StringMap.d.ts +59 -0
  184. package/dist/models/StringMap.js +274 -0
  185. package/dist/models/StringMap.js.map +1 -0
  186. package/dist/models/UpdateLiveActivityRequest.d.ts +22 -0
  187. package/dist/models/UpdateLiveActivityRequest.js +40 -0
  188. package/dist/models/UpdateLiveActivityRequest.js.map +1 -0
  189. package/dist/models/UpdateLiveActivitySuccessResponse.d.ts +19 -0
  190. package/dist/models/UpdateLiveActivitySuccessResponse.js +28 -0
  191. package/dist/models/UpdateLiveActivitySuccessResponse.js.map +1 -0
  192. package/dist/models/UpdatePlayerSuccessResponse.d.ts +17 -0
  193. package/dist/models/UpdatePlayerSuccessResponse.js +22 -0
  194. package/dist/models/UpdatePlayerSuccessResponse.js.map +1 -0
  195. package/dist/models/UpdatePlayerTagsRequestBody.d.ts +17 -0
  196. package/dist/models/UpdatePlayerTagsRequestBody.js +22 -0
  197. package/dist/models/UpdatePlayerTagsRequestBody.js.map +1 -0
  198. package/dist/models/UpdatePlayerTagsSuccessResponse.d.ts +17 -0
  199. package/dist/models/UpdatePlayerTagsSuccessResponse.js +22 -0
  200. package/dist/models/UpdatePlayerTagsSuccessResponse.js.map +1 -0
  201. package/dist/models/all.d.ts +49 -0
  202. package/dist/models/all.js +66 -0
  203. package/dist/models/all.js.map +1 -0
  204. package/dist/rxjsStub.d.ts +10 -0
  205. package/dist/rxjsStub.js +33 -0
  206. package/dist/rxjsStub.js.map +1 -0
  207. package/dist/servers.d.ts +17 -0
  208. package/dist/servers.js +32 -0
  209. package/dist/servers.js.map +1 -0
  210. package/dist/types/ObjectParamAPI.d.ts +146 -0
  211. package/dist/types/ObjectParamAPI.js +79 -0
  212. package/dist/types/ObjectParamAPI.js.map +1 -0
  213. package/dist/types/ObservableAPI.d.ts +55 -0
  214. package/dist/types/ObservableAPI.js +544 -0
  215. package/dist/types/ObservableAPI.js.map +1 -0
  216. package/dist/types/PromiseAPI.d.ts +52 -0
  217. package/dist/types/PromiseAPI.js +100 -0
  218. package/dist/types/PromiseAPI.js.map +1 -0
  219. package/dist/util.d.ts +2 -0
  220. package/dist/util.js +29 -0
  221. package/dist/util.js.map +1 -0
  222. package/models/App.ts +41 -1
  223. package/models/BadRequestError.ts +31 -0
  224. package/models/BasicNotification.ts +1 -1
  225. package/models/BasicNotificationAllOf.ts +1 -1
  226. package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +1 -1
  227. package/models/BeginLiveActivityRequest.ts +38 -0
  228. package/models/Button.ts +1 -1
  229. package/models/CancelNotificationSuccessResponse.ts +1 -1
  230. package/models/CreateNotificationSuccessResponse.ts +1 -1
  231. package/models/CreatePlayerSuccessResponse.ts +1 -1
  232. package/models/CreateSegmentConflictResponse.ts +1 -1
  233. package/models/CreateSegmentSuccessResponse.ts +1 -1
  234. package/models/DeletePlayerNotFoundResponse.ts +1 -1
  235. package/models/DeletePlayerSuccessResponse.ts +1 -1
  236. package/models/DeleteSegmentNotFoundResponse.ts +1 -1
  237. package/models/DeleteSegmentSuccessResponse.ts +1 -1
  238. package/models/DeliveryData.ts +1 -1
  239. package/models/ExportPlayersRequestBody.ts +1 -1
  240. package/models/ExportPlayersSuccessResponse.ts +1 -1
  241. package/models/Filter.ts +1 -1
  242. package/models/FilterExpressions.ts +1 -1
  243. package/models/GetNotificationRequestBody.ts +1 -1
  244. package/models/InvalidIdentifierError.ts +1 -1
  245. package/models/Notification.ts +1 -1
  246. package/models/Notification200Errors.ts +1 -1
  247. package/models/NotificationAllOf.ts +1 -1
  248. package/models/NotificationHistorySuccessResponse.ts +1 -1
  249. package/models/NotificationSlice.ts +1 -1
  250. package/models/NotificationTarget.ts +1 -1
  251. package/models/NotificationWithMeta.ts +1 -1
  252. package/models/NotificationWithMetaAllOf.ts +1 -1
  253. package/models/ObjectSerializer.ts +15 -16
  254. package/models/Operator.ts +1 -1
  255. package/models/OutcomeData.ts +1 -1
  256. package/models/OutcomesData.ts +1 -1
  257. package/models/PlatformDeliveryData.ts +1 -1
  258. package/models/PlatformDeliveryDataEmailAllOf.ts +1 -1
  259. package/models/PlatformDeliveryDataSmsAllOf.ts +1 -1
  260. package/models/Player.ts +1 -1
  261. package/models/PlayerNotificationTarget.ts +1 -1
  262. package/models/PlayerSlice.ts +1 -1
  263. package/models/Purchase.ts +1 -1
  264. package/models/Segment.ts +1 -1
  265. package/models/SegmentNotificationTarget.ts +1 -1
  266. package/models/StringMap.ts +1 -1
  267. package/models/UpdateLiveActivityRequest.ts +62 -0
  268. package/models/UpdateLiveActivitySuccessResponse.ts +39 -0
  269. package/models/UpdatePlayerSuccessResponse.ts +1 -1
  270. package/models/UpdatePlayerTagsRequestBody.ts +1 -1
  271. package/models/UpdatePlayerTagsSuccessResponse.ts +1 -1
  272. package/models/all.ts +4 -5
  273. package/package.json +3 -3
  274. package/types/ObjectParamAPI.ts +94 -5
  275. package/types/ObservableAPI.ts +82 -5
  276. package/types/PromiseAPI.ts +40 -5
@@ -0,0 +1,1901 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ var __generator = (this && this.__generator) || function (thisArg, body) {
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
+ function verb(n) { return function (v) { return step([n, v]); }; }
30
+ function step(op) {
31
+ if (f) throw new TypeError("Generator is already executing.");
32
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
+ if (y = 0, t) op = [op[0] & 2, t.value];
35
+ switch (op[0]) {
36
+ case 0: case 1: t = op; break;
37
+ case 4: _.label++; return { value: op[1], done: false };
38
+ case 5: _.label++; y = op[1]; op = [0]; continue;
39
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
+ default:
41
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
+ if (t[2]) _.ops.pop();
46
+ _.trys.pop(); continue;
47
+ }
48
+ op = body.call(thisArg, _);
49
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
+ }
52
+ };
53
+ Object.defineProperty(exports, "__esModule", { value: true });
54
+ exports.DefaultApiResponseProcessor = exports.DefaultApiRequestFactory = void 0;
55
+ var baseapi_1 = require("./baseapi");
56
+ var http_1 = require("../http/http");
57
+ var ObjectSerializer_1 = require("../models/ObjectSerializer");
58
+ var exception_1 = require("./exception");
59
+ var util_1 = require("../util");
60
+ var DefaultApiRequestFactory = (function (_super) {
61
+ __extends(DefaultApiRequestFactory, _super);
62
+ function DefaultApiRequestFactory() {
63
+ return _super !== null && _super.apply(this, arguments) || this;
64
+ }
65
+ DefaultApiRequestFactory.prototype.beginLiveActivity = function (appId, activityId, beginLiveActivityRequest, _options) {
66
+ var _a, _b, _c;
67
+ return __awaiter(this, void 0, void 0, function () {
68
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
69
+ return __generator(this, function (_d) {
70
+ switch (_d.label) {
71
+ case 0:
72
+ _config = _options || this.configuration;
73
+ if (appId === null || appId === undefined) {
74
+ throw new baseapi_1.RequiredError("DefaultApi", "beginLiveActivity", "appId");
75
+ }
76
+ if (activityId === null || activityId === undefined) {
77
+ throw new baseapi_1.RequiredError("DefaultApi", "beginLiveActivity", "activityId");
78
+ }
79
+ if (beginLiveActivityRequest === null || beginLiveActivityRequest === undefined) {
80
+ throw new baseapi_1.RequiredError("DefaultApi", "beginLiveActivity", "beginLiveActivityRequest");
81
+ }
82
+ localVarPath = '/apps/{app_id}/live_activities/{activity_id}/token'
83
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
84
+ .replace('{' + 'activity_id' + '}', encodeURIComponent(String(activityId)));
85
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
86
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
87
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
88
+ "application/json"
89
+ ]);
90
+ requestContext.setHeaderParam("Content-Type", contentType);
91
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(beginLiveActivityRequest, "BeginLiveActivityRequest", ""), contentType);
92
+ requestContext.setBody(serializedBody);
93
+ authMethod = _config.authMethods["app_key"];
94
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
95
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
96
+ case 1:
97
+ _d.sent();
98
+ _d.label = 2;
99
+ case 2:
100
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
101
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
102
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
103
+ case 3:
104
+ _d.sent();
105
+ _d.label = 4;
106
+ case 4: return [2, requestContext];
107
+ }
108
+ });
109
+ });
110
+ };
111
+ DefaultApiRequestFactory.prototype.cancelNotification = function (appId, notificationId, _options) {
112
+ var _a, _b, _c;
113
+ return __awaiter(this, void 0, void 0, function () {
114
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
115
+ return __generator(this, function (_d) {
116
+ switch (_d.label) {
117
+ case 0:
118
+ _config = _options || this.configuration;
119
+ if (appId === null || appId === undefined) {
120
+ throw new baseapi_1.RequiredError("DefaultApi", "cancelNotification", "appId");
121
+ }
122
+ if (notificationId === null || notificationId === undefined) {
123
+ throw new baseapi_1.RequiredError("DefaultApi", "cancelNotification", "notificationId");
124
+ }
125
+ localVarPath = '/notifications/{notification_id}'
126
+ .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
127
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
128
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
129
+ if (appId !== undefined) {
130
+ requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
131
+ }
132
+ authMethod = _config.authMethods["app_key"];
133
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
134
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
135
+ case 1:
136
+ _d.sent();
137
+ _d.label = 2;
138
+ case 2:
139
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
140
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
141
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
142
+ case 3:
143
+ _d.sent();
144
+ _d.label = 4;
145
+ case 4: return [2, requestContext];
146
+ }
147
+ });
148
+ });
149
+ };
150
+ DefaultApiRequestFactory.prototype.createApp = function (app, _options) {
151
+ var _a, _b, _c;
152
+ return __awaiter(this, void 0, void 0, function () {
153
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
154
+ return __generator(this, function (_d) {
155
+ switch (_d.label) {
156
+ case 0:
157
+ _config = _options || this.configuration;
158
+ if (app === null || app === undefined) {
159
+ throw new baseapi_1.RequiredError("DefaultApi", "createApp", "app");
160
+ }
161
+ localVarPath = '/apps';
162
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
163
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
164
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
165
+ "application/json"
166
+ ]);
167
+ requestContext.setHeaderParam("Content-Type", contentType);
168
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(app, "App", ""), contentType);
169
+ requestContext.setBody(serializedBody);
170
+ authMethod = _config.authMethods["user_key"];
171
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
172
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
173
+ case 1:
174
+ _d.sent();
175
+ _d.label = 2;
176
+ case 2:
177
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
178
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
179
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
180
+ case 3:
181
+ _d.sent();
182
+ _d.label = 4;
183
+ case 4: return [2, requestContext];
184
+ }
185
+ });
186
+ });
187
+ };
188
+ DefaultApiRequestFactory.prototype.createNotification = function (notification, _options) {
189
+ var _a, _b, _c;
190
+ return __awaiter(this, void 0, void 0, function () {
191
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
192
+ return __generator(this, function (_d) {
193
+ switch (_d.label) {
194
+ case 0:
195
+ _config = _options || this.configuration;
196
+ if (notification === null || notification === undefined) {
197
+ throw new baseapi_1.RequiredError("DefaultApi", "createNotification", "notification");
198
+ }
199
+ localVarPath = '/notifications';
200
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
201
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
202
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
203
+ "application/json"
204
+ ]);
205
+ requestContext.setHeaderParam("Content-Type", contentType);
206
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(notification, "Notification", ""), contentType);
207
+ requestContext.setBody(serializedBody);
208
+ authMethod = _config.authMethods["app_key"];
209
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
210
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
211
+ case 1:
212
+ _d.sent();
213
+ _d.label = 2;
214
+ case 2:
215
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
216
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
217
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
218
+ case 3:
219
+ _d.sent();
220
+ _d.label = 4;
221
+ case 4: return [2, requestContext];
222
+ }
223
+ });
224
+ });
225
+ };
226
+ DefaultApiRequestFactory.prototype.createPlayer = function (player, _options) {
227
+ var _a, _b, _c;
228
+ return __awaiter(this, void 0, void 0, function () {
229
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
230
+ return __generator(this, function (_d) {
231
+ switch (_d.label) {
232
+ case 0:
233
+ _config = _options || this.configuration;
234
+ if (player === null || player === undefined) {
235
+ throw new baseapi_1.RequiredError("DefaultApi", "createPlayer", "player");
236
+ }
237
+ localVarPath = '/players';
238
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
239
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
240
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
241
+ "application/json"
242
+ ]);
243
+ requestContext.setHeaderParam("Content-Type", contentType);
244
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(player, "Player", ""), contentType);
245
+ requestContext.setBody(serializedBody);
246
+ authMethod = _config.authMethods["app_key"];
247
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
248
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
249
+ case 1:
250
+ _d.sent();
251
+ _d.label = 2;
252
+ case 2:
253
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
254
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
255
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
256
+ case 3:
257
+ _d.sent();
258
+ _d.label = 4;
259
+ case 4: return [2, requestContext];
260
+ }
261
+ });
262
+ });
263
+ };
264
+ DefaultApiRequestFactory.prototype.createSegments = function (appId, segment, _options) {
265
+ var _a, _b, _c;
266
+ return __awaiter(this, void 0, void 0, function () {
267
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
268
+ return __generator(this, function (_d) {
269
+ switch (_d.label) {
270
+ case 0:
271
+ _config = _options || this.configuration;
272
+ if (appId === null || appId === undefined) {
273
+ throw new baseapi_1.RequiredError("DefaultApi", "createSegments", "appId");
274
+ }
275
+ localVarPath = '/apps/{app_id}/segments'
276
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
277
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
278
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
279
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
280
+ "application/json"
281
+ ]);
282
+ requestContext.setHeaderParam("Content-Type", contentType);
283
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(segment, "Segment", ""), contentType);
284
+ requestContext.setBody(serializedBody);
285
+ authMethod = _config.authMethods["app_key"];
286
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
287
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
288
+ case 1:
289
+ _d.sent();
290
+ _d.label = 2;
291
+ case 2:
292
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
293
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
294
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
295
+ case 3:
296
+ _d.sent();
297
+ _d.label = 4;
298
+ case 4: return [2, requestContext];
299
+ }
300
+ });
301
+ });
302
+ };
303
+ DefaultApiRequestFactory.prototype.deletePlayer = function (appId, playerId, _options) {
304
+ var _a, _b, _c;
305
+ return __awaiter(this, void 0, void 0, function () {
306
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
307
+ return __generator(this, function (_d) {
308
+ switch (_d.label) {
309
+ case 0:
310
+ _config = _options || this.configuration;
311
+ if (appId === null || appId === undefined) {
312
+ throw new baseapi_1.RequiredError("DefaultApi", "deletePlayer", "appId");
313
+ }
314
+ if (playerId === null || playerId === undefined) {
315
+ throw new baseapi_1.RequiredError("DefaultApi", "deletePlayer", "playerId");
316
+ }
317
+ localVarPath = '/players/{player_id}'
318
+ .replace('{' + 'player_id' + '}', encodeURIComponent(String(playerId)));
319
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
320
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
321
+ if (appId !== undefined) {
322
+ requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
323
+ }
324
+ authMethod = _config.authMethods["app_key"];
325
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
326
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
327
+ case 1:
328
+ _d.sent();
329
+ _d.label = 2;
330
+ case 2:
331
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
332
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
333
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
334
+ case 3:
335
+ _d.sent();
336
+ _d.label = 4;
337
+ case 4: return [2, requestContext];
338
+ }
339
+ });
340
+ });
341
+ };
342
+ DefaultApiRequestFactory.prototype.deleteSegments = function (appId, segmentId, _options) {
343
+ var _a, _b, _c;
344
+ return __awaiter(this, void 0, void 0, function () {
345
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
346
+ return __generator(this, function (_d) {
347
+ switch (_d.label) {
348
+ case 0:
349
+ _config = _options || this.configuration;
350
+ if (appId === null || appId === undefined) {
351
+ throw new baseapi_1.RequiredError("DefaultApi", "deleteSegments", "appId");
352
+ }
353
+ if (segmentId === null || segmentId === undefined) {
354
+ throw new baseapi_1.RequiredError("DefaultApi", "deleteSegments", "segmentId");
355
+ }
356
+ localVarPath = '/apps/{app_id}/segments/{segment_id}'
357
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
358
+ .replace('{' + 'segment_id' + '}', encodeURIComponent(String(segmentId)));
359
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
360
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
361
+ authMethod = _config.authMethods["app_key"];
362
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
363
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
364
+ case 1:
365
+ _d.sent();
366
+ _d.label = 2;
367
+ case 2:
368
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
369
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
370
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
371
+ case 3:
372
+ _d.sent();
373
+ _d.label = 4;
374
+ case 4: return [2, requestContext];
375
+ }
376
+ });
377
+ });
378
+ };
379
+ DefaultApiRequestFactory.prototype.endLiveActivity = function (appId, activityId, subscriptionId, _options) {
380
+ var _a, _b, _c;
381
+ return __awaiter(this, void 0, void 0, function () {
382
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
383
+ return __generator(this, function (_d) {
384
+ switch (_d.label) {
385
+ case 0:
386
+ _config = _options || this.configuration;
387
+ if (appId === null || appId === undefined) {
388
+ throw new baseapi_1.RequiredError("DefaultApi", "endLiveActivity", "appId");
389
+ }
390
+ if (activityId === null || activityId === undefined) {
391
+ throw new baseapi_1.RequiredError("DefaultApi", "endLiveActivity", "activityId");
392
+ }
393
+ if (subscriptionId === null || subscriptionId === undefined) {
394
+ throw new baseapi_1.RequiredError("DefaultApi", "endLiveActivity", "subscriptionId");
395
+ }
396
+ localVarPath = '/apps/{app_id}/live_activities/{activity_id}/token/{subscription_id}'
397
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
398
+ .replace('{' + 'activity_id' + '}', encodeURIComponent(String(activityId)))
399
+ .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
400
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
401
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
402
+ authMethod = _config.authMethods["app_key"];
403
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
404
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
405
+ case 1:
406
+ _d.sent();
407
+ _d.label = 2;
408
+ case 2:
409
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
410
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
411
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
412
+ case 3:
413
+ _d.sent();
414
+ _d.label = 4;
415
+ case 4: return [2, requestContext];
416
+ }
417
+ });
418
+ });
419
+ };
420
+ DefaultApiRequestFactory.prototype.exportPlayers = function (appId, exportPlayersRequestBody, _options) {
421
+ var _a, _b, _c;
422
+ return __awaiter(this, void 0, void 0, function () {
423
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
424
+ return __generator(this, function (_d) {
425
+ switch (_d.label) {
426
+ case 0:
427
+ _config = _options || this.configuration;
428
+ if (appId === null || appId === undefined) {
429
+ throw new baseapi_1.RequiredError("DefaultApi", "exportPlayers", "appId");
430
+ }
431
+ localVarPath = '/players/csv_export?app_id={app_id}'
432
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
433
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
434
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
435
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
436
+ "application/json"
437
+ ]);
438
+ requestContext.setHeaderParam("Content-Type", contentType);
439
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(exportPlayersRequestBody, "ExportPlayersRequestBody", ""), contentType);
440
+ requestContext.setBody(serializedBody);
441
+ authMethod = _config.authMethods["app_key"];
442
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
443
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
444
+ case 1:
445
+ _d.sent();
446
+ _d.label = 2;
447
+ case 2:
448
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
449
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
450
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
451
+ case 3:
452
+ _d.sent();
453
+ _d.label = 4;
454
+ case 4: return [2, requestContext];
455
+ }
456
+ });
457
+ });
458
+ };
459
+ DefaultApiRequestFactory.prototype.getApp = function (appId, _options) {
460
+ var _a, _b, _c;
461
+ return __awaiter(this, void 0, void 0, function () {
462
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
463
+ return __generator(this, function (_d) {
464
+ switch (_d.label) {
465
+ case 0:
466
+ _config = _options || this.configuration;
467
+ if (appId === null || appId === undefined) {
468
+ throw new baseapi_1.RequiredError("DefaultApi", "getApp", "appId");
469
+ }
470
+ localVarPath = '/apps/{app_id}'
471
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
472
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
473
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
474
+ authMethod = _config.authMethods["user_key"];
475
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
476
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
477
+ case 1:
478
+ _d.sent();
479
+ _d.label = 2;
480
+ case 2:
481
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
482
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
483
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
484
+ case 3:
485
+ _d.sent();
486
+ _d.label = 4;
487
+ case 4: return [2, requestContext];
488
+ }
489
+ });
490
+ });
491
+ };
492
+ DefaultApiRequestFactory.prototype.getApps = function (_options) {
493
+ var _a, _b, _c;
494
+ return __awaiter(this, void 0, void 0, function () {
495
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
496
+ return __generator(this, function (_d) {
497
+ switch (_d.label) {
498
+ case 0:
499
+ _config = _options || this.configuration;
500
+ localVarPath = '/apps';
501
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
502
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
503
+ authMethod = _config.authMethods["user_key"];
504
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
505
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
506
+ case 1:
507
+ _d.sent();
508
+ _d.label = 2;
509
+ case 2:
510
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
511
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
512
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
513
+ case 3:
514
+ _d.sent();
515
+ _d.label = 4;
516
+ case 4: return [2, requestContext];
517
+ }
518
+ });
519
+ });
520
+ };
521
+ DefaultApiRequestFactory.prototype.getNotification = function (appId, notificationId, _options) {
522
+ var _a, _b, _c;
523
+ return __awaiter(this, void 0, void 0, function () {
524
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
525
+ return __generator(this, function (_d) {
526
+ switch (_d.label) {
527
+ case 0:
528
+ _config = _options || this.configuration;
529
+ if (appId === null || appId === undefined) {
530
+ throw new baseapi_1.RequiredError("DefaultApi", "getNotification", "appId");
531
+ }
532
+ if (notificationId === null || notificationId === undefined) {
533
+ throw new baseapi_1.RequiredError("DefaultApi", "getNotification", "notificationId");
534
+ }
535
+ localVarPath = '/notifications/{notification_id}'
536
+ .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
537
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
538
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
539
+ if (appId !== undefined) {
540
+ requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
541
+ }
542
+ authMethod = _config.authMethods["app_key"];
543
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
544
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
545
+ case 1:
546
+ _d.sent();
547
+ _d.label = 2;
548
+ case 2:
549
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
550
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
551
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
552
+ case 3:
553
+ _d.sent();
554
+ _d.label = 4;
555
+ case 4: return [2, requestContext];
556
+ }
557
+ });
558
+ });
559
+ };
560
+ DefaultApiRequestFactory.prototype.getNotificationHistory = function (notificationId, getNotificationRequestBody, _options) {
561
+ var _a, _b, _c;
562
+ return __awaiter(this, void 0, void 0, function () {
563
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
564
+ return __generator(this, function (_d) {
565
+ switch (_d.label) {
566
+ case 0:
567
+ _config = _options || this.configuration;
568
+ if (notificationId === null || notificationId === undefined) {
569
+ throw new baseapi_1.RequiredError("DefaultApi", "getNotificationHistory", "notificationId");
570
+ }
571
+ if (getNotificationRequestBody === null || getNotificationRequestBody === undefined) {
572
+ throw new baseapi_1.RequiredError("DefaultApi", "getNotificationHistory", "getNotificationRequestBody");
573
+ }
574
+ localVarPath = '/notifications/{notification_id}/history'
575
+ .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
576
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
577
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
578
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
579
+ "application/json"
580
+ ]);
581
+ requestContext.setHeaderParam("Content-Type", contentType);
582
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(getNotificationRequestBody, "GetNotificationRequestBody", ""), contentType);
583
+ requestContext.setBody(serializedBody);
584
+ authMethod = _config.authMethods["app_key"];
585
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
586
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
587
+ case 1:
588
+ _d.sent();
589
+ _d.label = 2;
590
+ case 2:
591
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
592
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
593
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
594
+ case 3:
595
+ _d.sent();
596
+ _d.label = 4;
597
+ case 4: return [2, requestContext];
598
+ }
599
+ });
600
+ });
601
+ };
602
+ DefaultApiRequestFactory.prototype.getNotifications = function (appId, limit, offset, kind, _options) {
603
+ var _a, _b, _c;
604
+ return __awaiter(this, void 0, void 0, function () {
605
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
606
+ return __generator(this, function (_d) {
607
+ switch (_d.label) {
608
+ case 0:
609
+ _config = _options || this.configuration;
610
+ if (appId === null || appId === undefined) {
611
+ throw new baseapi_1.RequiredError("DefaultApi", "getNotifications", "appId");
612
+ }
613
+ localVarPath = '/notifications';
614
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
615
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
616
+ if (appId !== undefined) {
617
+ requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
618
+ }
619
+ if (limit !== undefined) {
620
+ requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
621
+ }
622
+ if (offset !== undefined) {
623
+ requestContext.setQueryParam("offset", ObjectSerializer_1.ObjectSerializer.serialize(offset, "number", ""));
624
+ }
625
+ if (kind !== undefined) {
626
+ requestContext.setQueryParam("kind", ObjectSerializer_1.ObjectSerializer.serialize(kind, "0 | 1 | 3", ""));
627
+ }
628
+ authMethod = _config.authMethods["app_key"];
629
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
630
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
631
+ case 1:
632
+ _d.sent();
633
+ _d.label = 2;
634
+ case 2:
635
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
636
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
637
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
638
+ case 3:
639
+ _d.sent();
640
+ _d.label = 4;
641
+ case 4: return [2, requestContext];
642
+ }
643
+ });
644
+ });
645
+ };
646
+ DefaultApiRequestFactory.prototype.getOutcomes = function (appId, outcomeNames, outcomeNames2, outcomeTimeRange, outcomePlatforms, outcomeAttribution, _options) {
647
+ var _a, _b, _c;
648
+ return __awaiter(this, void 0, void 0, function () {
649
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
650
+ return __generator(this, function (_d) {
651
+ switch (_d.label) {
652
+ case 0:
653
+ _config = _options || this.configuration;
654
+ if (appId === null || appId === undefined) {
655
+ throw new baseapi_1.RequiredError("DefaultApi", "getOutcomes", "appId");
656
+ }
657
+ if (outcomeNames === null || outcomeNames === undefined) {
658
+ throw new baseapi_1.RequiredError("DefaultApi", "getOutcomes", "outcomeNames");
659
+ }
660
+ localVarPath = '/apps/{app_id}/outcomes'
661
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
662
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
663
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
664
+ if (outcomeNames !== undefined) {
665
+ requestContext.setQueryParam("outcome_names", ObjectSerializer_1.ObjectSerializer.serialize(outcomeNames, "string", ""));
666
+ }
667
+ if (outcomeNames2 !== undefined) {
668
+ requestContext.setQueryParam("outcome_names[]", ObjectSerializer_1.ObjectSerializer.serialize(outcomeNames2, "string", ""));
669
+ }
670
+ if (outcomeTimeRange !== undefined) {
671
+ requestContext.setQueryParam("outcome_time_range", ObjectSerializer_1.ObjectSerializer.serialize(outcomeTimeRange, "string", ""));
672
+ }
673
+ if (outcomePlatforms !== undefined) {
674
+ requestContext.setQueryParam("outcome_platforms", ObjectSerializer_1.ObjectSerializer.serialize(outcomePlatforms, "string", ""));
675
+ }
676
+ if (outcomeAttribution !== undefined) {
677
+ requestContext.setQueryParam("outcome_attribution", ObjectSerializer_1.ObjectSerializer.serialize(outcomeAttribution, "string", ""));
678
+ }
679
+ authMethod = _config.authMethods["app_key"];
680
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
681
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
682
+ case 1:
683
+ _d.sent();
684
+ _d.label = 2;
685
+ case 2:
686
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
687
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
688
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
689
+ case 3:
690
+ _d.sent();
691
+ _d.label = 4;
692
+ case 4: return [2, requestContext];
693
+ }
694
+ });
695
+ });
696
+ };
697
+ DefaultApiRequestFactory.prototype.getPlayer = function (appId, playerId, emailAuthHash, _options) {
698
+ var _a, _b, _c;
699
+ return __awaiter(this, void 0, void 0, function () {
700
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
701
+ return __generator(this, function (_d) {
702
+ switch (_d.label) {
703
+ case 0:
704
+ _config = _options || this.configuration;
705
+ if (appId === null || appId === undefined) {
706
+ throw new baseapi_1.RequiredError("DefaultApi", "getPlayer", "appId");
707
+ }
708
+ if (playerId === null || playerId === undefined) {
709
+ throw new baseapi_1.RequiredError("DefaultApi", "getPlayer", "playerId");
710
+ }
711
+ localVarPath = '/players/{player_id}'
712
+ .replace('{' + 'player_id' + '}', encodeURIComponent(String(playerId)));
713
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
714
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
715
+ if (appId !== undefined) {
716
+ requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
717
+ }
718
+ if (emailAuthHash !== undefined) {
719
+ requestContext.setQueryParam("email_auth_hash", ObjectSerializer_1.ObjectSerializer.serialize(emailAuthHash, "string", ""));
720
+ }
721
+ authMethod = _config.authMethods["app_key"];
722
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
723
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
724
+ case 1:
725
+ _d.sent();
726
+ _d.label = 2;
727
+ case 2:
728
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
729
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
730
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
731
+ case 3:
732
+ _d.sent();
733
+ _d.label = 4;
734
+ case 4: return [2, requestContext];
735
+ }
736
+ });
737
+ });
738
+ };
739
+ DefaultApiRequestFactory.prototype.getPlayers = function (appId, limit, offset, _options) {
740
+ var _a, _b, _c;
741
+ return __awaiter(this, void 0, void 0, function () {
742
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
743
+ return __generator(this, function (_d) {
744
+ switch (_d.label) {
745
+ case 0:
746
+ _config = _options || this.configuration;
747
+ if (appId === null || appId === undefined) {
748
+ throw new baseapi_1.RequiredError("DefaultApi", "getPlayers", "appId");
749
+ }
750
+ localVarPath = '/players';
751
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
752
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
753
+ if (appId !== undefined) {
754
+ requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
755
+ }
756
+ if (limit !== undefined) {
757
+ requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
758
+ }
759
+ if (offset !== undefined) {
760
+ requestContext.setQueryParam("offset", ObjectSerializer_1.ObjectSerializer.serialize(offset, "number", ""));
761
+ }
762
+ authMethod = _config.authMethods["app_key"];
763
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
764
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
765
+ case 1:
766
+ _d.sent();
767
+ _d.label = 2;
768
+ case 2:
769
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
770
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
771
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
772
+ case 3:
773
+ _d.sent();
774
+ _d.label = 4;
775
+ case 4: return [2, requestContext];
776
+ }
777
+ });
778
+ });
779
+ };
780
+ DefaultApiRequestFactory.prototype.updateApp = function (appId, app, _options) {
781
+ var _a, _b, _c;
782
+ return __awaiter(this, void 0, void 0, function () {
783
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
784
+ return __generator(this, function (_d) {
785
+ switch (_d.label) {
786
+ case 0:
787
+ _config = _options || this.configuration;
788
+ if (appId === null || appId === undefined) {
789
+ throw new baseapi_1.RequiredError("DefaultApi", "updateApp", "appId");
790
+ }
791
+ if (app === null || app === undefined) {
792
+ throw new baseapi_1.RequiredError("DefaultApi", "updateApp", "app");
793
+ }
794
+ localVarPath = '/apps/{app_id}'
795
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
796
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
797
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
798
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
799
+ "application/json"
800
+ ]);
801
+ requestContext.setHeaderParam("Content-Type", contentType);
802
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(app, "App", ""), contentType);
803
+ requestContext.setBody(serializedBody);
804
+ authMethod = _config.authMethods["user_key"];
805
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
806
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
807
+ case 1:
808
+ _d.sent();
809
+ _d.label = 2;
810
+ case 2:
811
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
812
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
813
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
814
+ case 3:
815
+ _d.sent();
816
+ _d.label = 4;
817
+ case 4: return [2, requestContext];
818
+ }
819
+ });
820
+ });
821
+ };
822
+ DefaultApiRequestFactory.prototype.updateLiveActivity = function (appId, activityId, updateLiveActivityRequest, _options) {
823
+ var _a, _b, _c;
824
+ return __awaiter(this, void 0, void 0, function () {
825
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
826
+ return __generator(this, function (_d) {
827
+ switch (_d.label) {
828
+ case 0:
829
+ _config = _options || this.configuration;
830
+ if (appId === null || appId === undefined) {
831
+ throw new baseapi_1.RequiredError("DefaultApi", "updateLiveActivity", "appId");
832
+ }
833
+ if (activityId === null || activityId === undefined) {
834
+ throw new baseapi_1.RequiredError("DefaultApi", "updateLiveActivity", "activityId");
835
+ }
836
+ if (updateLiveActivityRequest === null || updateLiveActivityRequest === undefined) {
837
+ throw new baseapi_1.RequiredError("DefaultApi", "updateLiveActivity", "updateLiveActivityRequest");
838
+ }
839
+ localVarPath = '/apps/{app_id}/live_activities/{activity_id}/notifications'
840
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
841
+ .replace('{' + 'activity_id' + '}', encodeURIComponent(String(activityId)));
842
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
843
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
844
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
845
+ "application/json"
846
+ ]);
847
+ requestContext.setHeaderParam("Content-Type", contentType);
848
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(updateLiveActivityRequest, "UpdateLiveActivityRequest", ""), contentType);
849
+ requestContext.setBody(serializedBody);
850
+ authMethod = _config.authMethods["app_key"];
851
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
852
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
853
+ case 1:
854
+ _d.sent();
855
+ _d.label = 2;
856
+ case 2:
857
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
858
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
859
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
860
+ case 3:
861
+ _d.sent();
862
+ _d.label = 4;
863
+ case 4: return [2, requestContext];
864
+ }
865
+ });
866
+ });
867
+ };
868
+ DefaultApiRequestFactory.prototype.updatePlayer = function (playerId, player, _options) {
869
+ var _a, _b, _c;
870
+ return __awaiter(this, void 0, void 0, function () {
871
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
872
+ return __generator(this, function (_d) {
873
+ switch (_d.label) {
874
+ case 0:
875
+ _config = _options || this.configuration;
876
+ if (playerId === null || playerId === undefined) {
877
+ throw new baseapi_1.RequiredError("DefaultApi", "updatePlayer", "playerId");
878
+ }
879
+ if (player === null || player === undefined) {
880
+ throw new baseapi_1.RequiredError("DefaultApi", "updatePlayer", "player");
881
+ }
882
+ localVarPath = '/players/{player_id}'
883
+ .replace('{' + 'player_id' + '}', encodeURIComponent(String(playerId)));
884
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
885
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
886
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
887
+ "application/json"
888
+ ]);
889
+ requestContext.setHeaderParam("Content-Type", contentType);
890
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(player, "Player", ""), contentType);
891
+ requestContext.setBody(serializedBody);
892
+ authMethod = _config.authMethods["app_key"];
893
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
894
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
895
+ case 1:
896
+ _d.sent();
897
+ _d.label = 2;
898
+ case 2:
899
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
900
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
901
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
902
+ case 3:
903
+ _d.sent();
904
+ _d.label = 4;
905
+ case 4: return [2, requestContext];
906
+ }
907
+ });
908
+ });
909
+ };
910
+ DefaultApiRequestFactory.prototype.updatePlayerTags = function (appId, externalUserId, updatePlayerTagsRequestBody, _options) {
911
+ var _a, _b, _c;
912
+ return __awaiter(this, void 0, void 0, function () {
913
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
914
+ return __generator(this, function (_d) {
915
+ switch (_d.label) {
916
+ case 0:
917
+ _config = _options || this.configuration;
918
+ if (appId === null || appId === undefined) {
919
+ throw new baseapi_1.RequiredError("DefaultApi", "updatePlayerTags", "appId");
920
+ }
921
+ if (externalUserId === null || externalUserId === undefined) {
922
+ throw new baseapi_1.RequiredError("DefaultApi", "updatePlayerTags", "externalUserId");
923
+ }
924
+ localVarPath = '/apps/{app_id}/users/{external_user_id}'
925
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
926
+ .replace('{' + 'external_user_id' + '}', encodeURIComponent(String(externalUserId)));
927
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
928
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
929
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
930
+ "application/json"
931
+ ]);
932
+ requestContext.setHeaderParam("Content-Type", contentType);
933
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(updatePlayerTagsRequestBody, "UpdatePlayerTagsRequestBody", ""), contentType);
934
+ requestContext.setBody(serializedBody);
935
+ authMethod = _config.authMethods["app_key"];
936
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
937
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
938
+ case 1:
939
+ _d.sent();
940
+ _d.label = 2;
941
+ case 2:
942
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
943
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
944
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
945
+ case 3:
946
+ _d.sent();
947
+ _d.label = 4;
948
+ case 4: return [2, requestContext];
949
+ }
950
+ });
951
+ });
952
+ };
953
+ return DefaultApiRequestFactory;
954
+ }(baseapi_1.BaseAPIRequestFactory));
955
+ exports.DefaultApiRequestFactory = DefaultApiRequestFactory;
956
+ var DefaultApiResponseProcessor = (function () {
957
+ function DefaultApiResponseProcessor() {
958
+ }
959
+ DefaultApiResponseProcessor.prototype.beginLiveActivity = function (response) {
960
+ return __awaiter(this, void 0, void 0, function () {
961
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, _j, _k;
962
+ return __generator(this, function (_l) {
963
+ switch (_l.label) {
964
+ case 0:
965
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
966
+ if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
967
+ return [2];
968
+ }
969
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 2];
970
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
971
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
972
+ return [4, response.body.text()];
973
+ case 1:
974
+ body = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
975
+ "BadRequestError", ""]);
976
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
977
+ case 2:
978
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
979
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
980
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
981
+ return [4, response.body.text()];
982
+ case 3:
983
+ body = _f.apply(_e, [_h.apply(_g, [_l.sent(), contentType]),
984
+ "void", ""]);
985
+ return [2, body];
986
+ case 4:
987
+ _j = exception_1.ApiException.bind;
988
+ _k = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
989
+ return [4, response.getBodyAsAny()];
990
+ case 5: throw new (_j.apply(exception_1.ApiException, _k.concat([_l.sent(), response.headers])))();
991
+ }
992
+ });
993
+ });
994
+ };
995
+ DefaultApiResponseProcessor.prototype.cancelNotification = function (response) {
996
+ return __awaiter(this, void 0, void 0, function () {
997
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
998
+ return __generator(this, function (_q) {
999
+ switch (_q.label) {
1000
+ case 0:
1001
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1002
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1003
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1004
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1005
+ return [4, response.body.text()];
1006
+ case 1:
1007
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1008
+ "CancelNotificationSuccessResponse", ""]);
1009
+ return [2, body];
1010
+ case 2:
1011
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1012
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1013
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1014
+ return [4, response.body.text()];
1015
+ case 3:
1016
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1017
+ "BadRequestError", ""]);
1018
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1019
+ case 4:
1020
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1021
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1022
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1023
+ return [4, response.body.text()];
1024
+ case 5:
1025
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1026
+ "CancelNotificationSuccessResponse", ""]);
1027
+ return [2, body];
1028
+ case 6:
1029
+ _o = exception_1.ApiException.bind;
1030
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1031
+ return [4, response.getBodyAsAny()];
1032
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1033
+ }
1034
+ });
1035
+ });
1036
+ };
1037
+ DefaultApiResponseProcessor.prototype.createApp = function (response) {
1038
+ return __awaiter(this, void 0, void 0, function () {
1039
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1040
+ return __generator(this, function (_q) {
1041
+ switch (_q.label) {
1042
+ case 0:
1043
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1044
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1045
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1046
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1047
+ return [4, response.body.text()];
1048
+ case 1:
1049
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1050
+ "App", ""]);
1051
+ return [2, body];
1052
+ case 2:
1053
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1054
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1055
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1056
+ return [4, response.body.text()];
1057
+ case 3:
1058
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1059
+ "BadRequestError", ""]);
1060
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1061
+ case 4:
1062
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1063
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1064
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1065
+ return [4, response.body.text()];
1066
+ case 5:
1067
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1068
+ "App", ""]);
1069
+ return [2, body];
1070
+ case 6:
1071
+ _o = exception_1.ApiException.bind;
1072
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1073
+ return [4, response.getBodyAsAny()];
1074
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1075
+ }
1076
+ });
1077
+ });
1078
+ };
1079
+ DefaultApiResponseProcessor.prototype.createNotification = function (response) {
1080
+ return __awaiter(this, void 0, void 0, function () {
1081
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1082
+ return __generator(this, function (_q) {
1083
+ switch (_q.label) {
1084
+ case 0:
1085
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1086
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1087
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1088
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1089
+ return [4, response.body.text()];
1090
+ case 1:
1091
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1092
+ "CreateNotificationSuccessResponse", ""]);
1093
+ return [2, body];
1094
+ case 2:
1095
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1096
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1097
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1098
+ return [4, response.body.text()];
1099
+ case 3:
1100
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1101
+ "BadRequestError", ""]);
1102
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1103
+ case 4:
1104
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1105
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1106
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1107
+ return [4, response.body.text()];
1108
+ case 5:
1109
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1110
+ "CreateNotificationSuccessResponse", ""]);
1111
+ return [2, body];
1112
+ case 6:
1113
+ _o = exception_1.ApiException.bind;
1114
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1115
+ return [4, response.getBodyAsAny()];
1116
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1117
+ }
1118
+ });
1119
+ });
1120
+ };
1121
+ DefaultApiResponseProcessor.prototype.createPlayer = function (response) {
1122
+ return __awaiter(this, void 0, void 0, function () {
1123
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1124
+ return __generator(this, function (_q) {
1125
+ switch (_q.label) {
1126
+ case 0:
1127
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1128
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1129
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1130
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1131
+ return [4, response.body.text()];
1132
+ case 1:
1133
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1134
+ "CreatePlayerSuccessResponse", ""]);
1135
+ return [2, body];
1136
+ case 2:
1137
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1138
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1139
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1140
+ return [4, response.body.text()];
1141
+ case 3:
1142
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1143
+ "BadRequestError", ""]);
1144
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1145
+ case 4:
1146
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1147
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1148
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1149
+ return [4, response.body.text()];
1150
+ case 5:
1151
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1152
+ "CreatePlayerSuccessResponse", ""]);
1153
+ return [2, body];
1154
+ case 6:
1155
+ _o = exception_1.ApiException.bind;
1156
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1157
+ return [4, response.getBodyAsAny()];
1158
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1159
+ }
1160
+ });
1161
+ });
1162
+ };
1163
+ DefaultApiResponseProcessor.prototype.createSegments = function (response) {
1164
+ return __awaiter(this, void 0, void 0, function () {
1165
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
1166
+ return __generator(this, function (_u) {
1167
+ switch (_u.label) {
1168
+ case 0:
1169
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1170
+ if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
1171
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1172
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1173
+ return [4, response.body.text()];
1174
+ case 1:
1175
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
1176
+ "CreateSegmentSuccessResponse", ""]);
1177
+ return [2, body];
1178
+ case 2:
1179
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1180
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1181
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1182
+ return [4, response.body.text()];
1183
+ case 3:
1184
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
1185
+ "BadRequestError", ""]);
1186
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1187
+ case 4:
1188
+ if (!(0, util_1.isCodeInRange)("409", response.httpStatusCode)) return [3, 6];
1189
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1190
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1191
+ return [4, response.body.text()];
1192
+ case 5:
1193
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
1194
+ "CreateSegmentConflictResponse", ""]);
1195
+ throw new exception_1.ApiException(409, "Conflict", body, response.headers);
1196
+ case 6:
1197
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
1198
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
1199
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
1200
+ return [4, response.body.text()];
1201
+ case 7:
1202
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
1203
+ "CreateSegmentSuccessResponse", ""]);
1204
+ return [2, body];
1205
+ case 8:
1206
+ _s = exception_1.ApiException.bind;
1207
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1208
+ return [4, response.getBodyAsAny()];
1209
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
1210
+ }
1211
+ });
1212
+ });
1213
+ };
1214
+ DefaultApiResponseProcessor.prototype.deletePlayer = function (response) {
1215
+ return __awaiter(this, void 0, void 0, function () {
1216
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
1217
+ return __generator(this, function (_u) {
1218
+ switch (_u.label) {
1219
+ case 0:
1220
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1221
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1222
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1223
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1224
+ return [4, response.body.text()];
1225
+ case 1:
1226
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
1227
+ "DeletePlayerSuccessResponse", ""]);
1228
+ return [2, body];
1229
+ case 2:
1230
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1231
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1232
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1233
+ return [4, response.body.text()];
1234
+ case 3:
1235
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
1236
+ "BadRequestError", ""]);
1237
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1238
+ case 4:
1239
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 6];
1240
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1241
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1242
+ return [4, response.body.text()];
1243
+ case 5:
1244
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
1245
+ "DeletePlayerNotFoundResponse", ""]);
1246
+ throw new exception_1.ApiException(404, "Not Found", body, response.headers);
1247
+ case 6:
1248
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
1249
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
1250
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
1251
+ return [4, response.body.text()];
1252
+ case 7:
1253
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
1254
+ "DeletePlayerSuccessResponse", ""]);
1255
+ return [2, body];
1256
+ case 8:
1257
+ _s = exception_1.ApiException.bind;
1258
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1259
+ return [4, response.getBodyAsAny()];
1260
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
1261
+ }
1262
+ });
1263
+ });
1264
+ };
1265
+ DefaultApiResponseProcessor.prototype.deleteSegments = function (response) {
1266
+ return __awaiter(this, void 0, void 0, function () {
1267
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
1268
+ return __generator(this, function (_u) {
1269
+ switch (_u.label) {
1270
+ case 0:
1271
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1272
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1273
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1274
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1275
+ return [4, response.body.text()];
1276
+ case 1:
1277
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
1278
+ "DeleteSegmentSuccessResponse", ""]);
1279
+ return [2, body];
1280
+ case 2:
1281
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1282
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1283
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1284
+ return [4, response.body.text()];
1285
+ case 3:
1286
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
1287
+ "BadRequestError", ""]);
1288
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1289
+ case 4:
1290
+ if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 6];
1291
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1292
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1293
+ return [4, response.body.text()];
1294
+ case 5:
1295
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
1296
+ "DeleteSegmentNotFoundResponse", ""]);
1297
+ throw new exception_1.ApiException(404, "Not Found", body, response.headers);
1298
+ case 6:
1299
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
1300
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
1301
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
1302
+ return [4, response.body.text()];
1303
+ case 7:
1304
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
1305
+ "DeleteSegmentSuccessResponse", ""]);
1306
+ return [2, body];
1307
+ case 8:
1308
+ _s = exception_1.ApiException.bind;
1309
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1310
+ return [4, response.getBodyAsAny()];
1311
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
1312
+ }
1313
+ });
1314
+ });
1315
+ };
1316
+ DefaultApiResponseProcessor.prototype.endLiveActivity = function (response) {
1317
+ return __awaiter(this, void 0, void 0, function () {
1318
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, _j, _k;
1319
+ return __generator(this, function (_l) {
1320
+ switch (_l.label) {
1321
+ case 0:
1322
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1323
+ if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
1324
+ return [2];
1325
+ }
1326
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 2];
1327
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1328
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1329
+ return [4, response.body.text()];
1330
+ case 1:
1331
+ body = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
1332
+ "BadRequestError", ""]);
1333
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1334
+ case 2:
1335
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
1336
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1337
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1338
+ return [4, response.body.text()];
1339
+ case 3:
1340
+ body = _f.apply(_e, [_h.apply(_g, [_l.sent(), contentType]),
1341
+ "void", ""]);
1342
+ return [2, body];
1343
+ case 4:
1344
+ _j = exception_1.ApiException.bind;
1345
+ _k = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1346
+ return [4, response.getBodyAsAny()];
1347
+ case 5: throw new (_j.apply(exception_1.ApiException, _k.concat([_l.sent(), response.headers])))();
1348
+ }
1349
+ });
1350
+ });
1351
+ };
1352
+ DefaultApiResponseProcessor.prototype.exportPlayers = function (response) {
1353
+ return __awaiter(this, void 0, void 0, function () {
1354
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1355
+ return __generator(this, function (_q) {
1356
+ switch (_q.label) {
1357
+ case 0:
1358
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1359
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1360
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1361
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1362
+ return [4, response.body.text()];
1363
+ case 1:
1364
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1365
+ "ExportPlayersSuccessResponse", ""]);
1366
+ return [2, body];
1367
+ case 2:
1368
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1369
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1370
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1371
+ return [4, response.body.text()];
1372
+ case 3:
1373
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1374
+ "BadRequestError", ""]);
1375
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1376
+ case 4:
1377
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1378
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1379
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1380
+ return [4, response.body.text()];
1381
+ case 5:
1382
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1383
+ "ExportPlayersSuccessResponse", ""]);
1384
+ return [2, body];
1385
+ case 6:
1386
+ _o = exception_1.ApiException.bind;
1387
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1388
+ return [4, response.getBodyAsAny()];
1389
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1390
+ }
1391
+ });
1392
+ });
1393
+ };
1394
+ DefaultApiResponseProcessor.prototype.getApp = function (response) {
1395
+ return __awaiter(this, void 0, void 0, function () {
1396
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1397
+ return __generator(this, function (_q) {
1398
+ switch (_q.label) {
1399
+ case 0:
1400
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1401
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1402
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1403
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1404
+ return [4, response.body.text()];
1405
+ case 1:
1406
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1407
+ "App", ""]);
1408
+ return [2, body];
1409
+ case 2:
1410
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1411
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1412
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1413
+ return [4, response.body.text()];
1414
+ case 3:
1415
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1416
+ "BadRequestError", ""]);
1417
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1418
+ case 4:
1419
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1420
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1421
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1422
+ return [4, response.body.text()];
1423
+ case 5:
1424
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1425
+ "App", ""]);
1426
+ return [2, body];
1427
+ case 6:
1428
+ _o = exception_1.ApiException.bind;
1429
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1430
+ return [4, response.getBodyAsAny()];
1431
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1432
+ }
1433
+ });
1434
+ });
1435
+ };
1436
+ DefaultApiResponseProcessor.prototype.getApps = function (response) {
1437
+ return __awaiter(this, void 0, void 0, function () {
1438
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1439
+ return __generator(this, function (_q) {
1440
+ switch (_q.label) {
1441
+ case 0:
1442
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1443
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1444
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1445
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1446
+ return [4, response.body.text()];
1447
+ case 1:
1448
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1449
+ "Array<App>", ""]);
1450
+ return [2, body];
1451
+ case 2:
1452
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1453
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1454
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1455
+ return [4, response.body.text()];
1456
+ case 3:
1457
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1458
+ "BadRequestError", ""]);
1459
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1460
+ case 4:
1461
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1462
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1463
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1464
+ return [4, response.body.text()];
1465
+ case 5:
1466
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1467
+ "Array<App>", ""]);
1468
+ return [2, body];
1469
+ case 6:
1470
+ _o = exception_1.ApiException.bind;
1471
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1472
+ return [4, response.getBodyAsAny()];
1473
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1474
+ }
1475
+ });
1476
+ });
1477
+ };
1478
+ DefaultApiResponseProcessor.prototype.getNotification = function (response) {
1479
+ return __awaiter(this, void 0, void 0, function () {
1480
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1481
+ return __generator(this, function (_q) {
1482
+ switch (_q.label) {
1483
+ case 0:
1484
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1485
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1486
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1487
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1488
+ return [4, response.body.text()];
1489
+ case 1:
1490
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1491
+ "NotificationWithMeta", ""]);
1492
+ return [2, body];
1493
+ case 2:
1494
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1495
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1496
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1497
+ return [4, response.body.text()];
1498
+ case 3:
1499
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1500
+ "BadRequestError", ""]);
1501
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1502
+ case 4:
1503
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1504
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1505
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1506
+ return [4, response.body.text()];
1507
+ case 5:
1508
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1509
+ "NotificationWithMeta", ""]);
1510
+ return [2, body];
1511
+ case 6:
1512
+ _o = exception_1.ApiException.bind;
1513
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1514
+ return [4, response.getBodyAsAny()];
1515
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1516
+ }
1517
+ });
1518
+ });
1519
+ };
1520
+ DefaultApiResponseProcessor.prototype.getNotificationHistory = function (response) {
1521
+ return __awaiter(this, void 0, void 0, function () {
1522
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1523
+ return __generator(this, function (_q) {
1524
+ switch (_q.label) {
1525
+ case 0:
1526
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1527
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1528
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1529
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1530
+ return [4, response.body.text()];
1531
+ case 1:
1532
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1533
+ "NotificationHistorySuccessResponse", ""]);
1534
+ return [2, body];
1535
+ case 2:
1536
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1537
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1538
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1539
+ return [4, response.body.text()];
1540
+ case 3:
1541
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1542
+ "BadRequestError", ""]);
1543
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1544
+ case 4:
1545
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1546
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1547
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1548
+ return [4, response.body.text()];
1549
+ case 5:
1550
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1551
+ "NotificationHistorySuccessResponse", ""]);
1552
+ return [2, body];
1553
+ case 6:
1554
+ _o = exception_1.ApiException.bind;
1555
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1556
+ return [4, response.getBodyAsAny()];
1557
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1558
+ }
1559
+ });
1560
+ });
1561
+ };
1562
+ DefaultApiResponseProcessor.prototype.getNotifications = function (response) {
1563
+ return __awaiter(this, void 0, void 0, function () {
1564
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1565
+ return __generator(this, function (_q) {
1566
+ switch (_q.label) {
1567
+ case 0:
1568
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1569
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1570
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1571
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1572
+ return [4, response.body.text()];
1573
+ case 1:
1574
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1575
+ "NotificationSlice", ""]);
1576
+ return [2, body];
1577
+ case 2:
1578
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1579
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1580
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1581
+ return [4, response.body.text()];
1582
+ case 3:
1583
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1584
+ "BadRequestError", ""]);
1585
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1586
+ case 4:
1587
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1588
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1589
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1590
+ return [4, response.body.text()];
1591
+ case 5:
1592
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1593
+ "NotificationSlice", ""]);
1594
+ return [2, body];
1595
+ case 6:
1596
+ _o = exception_1.ApiException.bind;
1597
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1598
+ return [4, response.getBodyAsAny()];
1599
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1600
+ }
1601
+ });
1602
+ });
1603
+ };
1604
+ DefaultApiResponseProcessor.prototype.getOutcomes = function (response) {
1605
+ return __awaiter(this, void 0, void 0, function () {
1606
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1607
+ return __generator(this, function (_q) {
1608
+ switch (_q.label) {
1609
+ case 0:
1610
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1611
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1612
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1613
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1614
+ return [4, response.body.text()];
1615
+ case 1:
1616
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1617
+ "OutcomesData", ""]);
1618
+ return [2, body];
1619
+ case 2:
1620
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1621
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1622
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1623
+ return [4, response.body.text()];
1624
+ case 3:
1625
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1626
+ "BadRequestError", ""]);
1627
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1628
+ case 4:
1629
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1630
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1631
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1632
+ return [4, response.body.text()];
1633
+ case 5:
1634
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1635
+ "OutcomesData", ""]);
1636
+ return [2, body];
1637
+ case 6:
1638
+ _o = exception_1.ApiException.bind;
1639
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1640
+ return [4, response.getBodyAsAny()];
1641
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1642
+ }
1643
+ });
1644
+ });
1645
+ };
1646
+ DefaultApiResponseProcessor.prototype.getPlayer = function (response) {
1647
+ return __awaiter(this, void 0, void 0, function () {
1648
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1649
+ return __generator(this, function (_q) {
1650
+ switch (_q.label) {
1651
+ case 0:
1652
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1653
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1654
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1655
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1656
+ return [4, response.body.text()];
1657
+ case 1:
1658
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1659
+ "Player", ""]);
1660
+ return [2, body];
1661
+ case 2:
1662
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1663
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1664
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1665
+ return [4, response.body.text()];
1666
+ case 3:
1667
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1668
+ "BadRequestError", ""]);
1669
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1670
+ case 4:
1671
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1672
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1673
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1674
+ return [4, response.body.text()];
1675
+ case 5:
1676
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1677
+ "Player", ""]);
1678
+ return [2, body];
1679
+ case 6:
1680
+ _o = exception_1.ApiException.bind;
1681
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1682
+ return [4, response.getBodyAsAny()];
1683
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1684
+ }
1685
+ });
1686
+ });
1687
+ };
1688
+ DefaultApiResponseProcessor.prototype.getPlayers = function (response) {
1689
+ return __awaiter(this, void 0, void 0, function () {
1690
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1691
+ return __generator(this, function (_q) {
1692
+ switch (_q.label) {
1693
+ case 0:
1694
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1695
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1696
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1697
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1698
+ return [4, response.body.text()];
1699
+ case 1:
1700
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1701
+ "PlayerSlice", ""]);
1702
+ return [2, body];
1703
+ case 2:
1704
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1705
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1706
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1707
+ return [4, response.body.text()];
1708
+ case 3:
1709
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1710
+ "BadRequestError", ""]);
1711
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1712
+ case 4:
1713
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1714
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1715
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1716
+ return [4, response.body.text()];
1717
+ case 5:
1718
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1719
+ "PlayerSlice", ""]);
1720
+ return [2, body];
1721
+ case 6:
1722
+ _o = exception_1.ApiException.bind;
1723
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1724
+ return [4, response.getBodyAsAny()];
1725
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1726
+ }
1727
+ });
1728
+ });
1729
+ };
1730
+ DefaultApiResponseProcessor.prototype.updateApp = function (response) {
1731
+ return __awaiter(this, void 0, void 0, function () {
1732
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1733
+ return __generator(this, function (_q) {
1734
+ switch (_q.label) {
1735
+ case 0:
1736
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1737
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1738
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1739
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1740
+ return [4, response.body.text()];
1741
+ case 1:
1742
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1743
+ "App", ""]);
1744
+ return [2, body];
1745
+ case 2:
1746
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1747
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1748
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1749
+ return [4, response.body.text()];
1750
+ case 3:
1751
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1752
+ "BadRequestError", ""]);
1753
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1754
+ case 4:
1755
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1756
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1757
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1758
+ return [4, response.body.text()];
1759
+ case 5:
1760
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1761
+ "App", ""]);
1762
+ return [2, body];
1763
+ case 6:
1764
+ _o = exception_1.ApiException.bind;
1765
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1766
+ return [4, response.getBodyAsAny()];
1767
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1768
+ }
1769
+ });
1770
+ });
1771
+ };
1772
+ DefaultApiResponseProcessor.prototype.updateLiveActivity = function (response) {
1773
+ return __awaiter(this, void 0, void 0, function () {
1774
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1775
+ return __generator(this, function (_q) {
1776
+ switch (_q.label) {
1777
+ case 0:
1778
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1779
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1780
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1781
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1782
+ return [4, response.body.text()];
1783
+ case 1:
1784
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1785
+ "UpdateLiveActivitySuccessResponse", ""]);
1786
+ return [2, body];
1787
+ case 2:
1788
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1789
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1790
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1791
+ return [4, response.body.text()];
1792
+ case 3:
1793
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1794
+ "BadRequestError", ""]);
1795
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1796
+ case 4:
1797
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1798
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1799
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1800
+ return [4, response.body.text()];
1801
+ case 5:
1802
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1803
+ "UpdateLiveActivitySuccessResponse", ""]);
1804
+ return [2, body];
1805
+ case 6:
1806
+ _o = exception_1.ApiException.bind;
1807
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1808
+ return [4, response.getBodyAsAny()];
1809
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1810
+ }
1811
+ });
1812
+ });
1813
+ };
1814
+ DefaultApiResponseProcessor.prototype.updatePlayer = function (response) {
1815
+ return __awaiter(this, void 0, void 0, function () {
1816
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1817
+ return __generator(this, function (_q) {
1818
+ switch (_q.label) {
1819
+ case 0:
1820
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1821
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1822
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1823
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1824
+ return [4, response.body.text()];
1825
+ case 1:
1826
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1827
+ "UpdatePlayerSuccessResponse", ""]);
1828
+ return [2, body];
1829
+ case 2:
1830
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1831
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1832
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1833
+ return [4, response.body.text()];
1834
+ case 3:
1835
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1836
+ "BadRequestError", ""]);
1837
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1838
+ case 4:
1839
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1840
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1841
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1842
+ return [4, response.body.text()];
1843
+ case 5:
1844
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1845
+ "UpdatePlayerSuccessResponse", ""]);
1846
+ return [2, body];
1847
+ case 6:
1848
+ _o = exception_1.ApiException.bind;
1849
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1850
+ return [4, response.getBodyAsAny()];
1851
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1852
+ }
1853
+ });
1854
+ });
1855
+ };
1856
+ DefaultApiResponseProcessor.prototype.updatePlayerTags = function (response) {
1857
+ return __awaiter(this, void 0, void 0, function () {
1858
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
1859
+ return __generator(this, function (_q) {
1860
+ switch (_q.label) {
1861
+ case 0:
1862
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1863
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
1864
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1865
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1866
+ return [4, response.body.text()];
1867
+ case 1:
1868
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
1869
+ "UpdatePlayerTagsSuccessResponse", ""]);
1870
+ return [2, body];
1871
+ case 2:
1872
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
1873
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1874
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1875
+ return [4, response.body.text()];
1876
+ case 3:
1877
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
1878
+ "BadRequestError", ""]);
1879
+ throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1880
+ case 4:
1881
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1882
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1883
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1884
+ return [4, response.body.text()];
1885
+ case 5:
1886
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
1887
+ "UpdatePlayerTagsSuccessResponse", ""]);
1888
+ return [2, body];
1889
+ case 6:
1890
+ _o = exception_1.ApiException.bind;
1891
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
1892
+ return [4, response.getBodyAsAny()];
1893
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
1894
+ }
1895
+ });
1896
+ });
1897
+ };
1898
+ return DefaultApiResponseProcessor;
1899
+ }());
1900
+ exports.DefaultApiResponseProcessor = DefaultApiResponseProcessor;
1901
+ //# sourceMappingURL=DefaultApi.js.map