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

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 (234) hide show
  1. package/.github/ISSUE_TEMPLATE/ask-question.yml +25 -0
  2. package/.github/ISSUE_TEMPLATE/bug-report.yml +51 -0
  3. package/.github/ISSUE_TEMPLATE/general-feedback.yml +25 -0
  4. package/.github/pull_request_template.md +44 -0
  5. package/.github/workflows/npm_deploy.yml +23 -0
  6. package/CHANGELOG.md +29 -0
  7. package/DefaultApi.md +1232 -0
  8. package/LICENSE +24 -0
  9. package/README.md +205 -102
  10. package/RELEASE_INSTRUCTIONS.md +2 -0
  11. package/apis/DefaultApi.ts +519 -532
  12. package/apis/baseapi.ts +4 -4
  13. package/apis/exception.ts +4 -3
  14. package/auth/auth.ts +4 -1
  15. package/configuration.ts +21 -2
  16. package/http/http.ts +26 -26
  17. package/index.ts +1 -0
  18. package/middleware.ts +1 -1
  19. package/models/App.ts +8 -8
  20. package/models/BasicNotification.ts +1019 -0
  21. package/models/BasicNotificationAllOf.ts +897 -0
  22. package/models/{NotificationAllOfAndroidBackgroundLayout.ts → BasicNotificationAllOfAndroidBackgroundLayout.ts} +4 -4
  23. package/models/Button.ts +2 -2
  24. package/models/CancelNotificationSuccessResponse.ts +31 -0
  25. package/models/{InlineResponse400.ts → CreateNotificationBadRequestResponse.ts} +4 -4
  26. package/models/{InlineResponse200.ts → CreateNotificationSuccessResponse.ts} +7 -6
  27. package/models/{InlineResponse2004.ts → CreatePlayerSuccessResponse.ts} +4 -4
  28. package/models/CreateSegmentBadRequestResponse.ts +38 -0
  29. package/models/{InlineResponse409.ts → CreateSegmentConflictResponse.ts} +4 -4
  30. package/models/{InlineResponse201.ts → CreateSegmentSuccessResponse.ts} +4 -4
  31. package/models/DeletePlayerBadRequestResponse.ts +31 -0
  32. package/models/DeletePlayerNotFoundResponse.ts +31 -0
  33. package/models/{InlineResponse2003.ts → DeletePlayerSuccessResponse.ts} +4 -4
  34. package/models/{InlineResponse4002.ts → DeleteSegmentBadRequestResponse.ts} +4 -4
  35. package/models/DeleteSegmentNotFoundResponse.ts +31 -0
  36. package/models/DeleteSegmentSuccessResponse.ts +31 -0
  37. package/models/DeliveryData.ts +17 -2
  38. package/models/ExportPlayersRequestBody.ts +5 -5
  39. package/models/{InlineResponse2005.ts → ExportPlayersSuccessResponse.ts} +4 -4
  40. package/models/Filter.ts +4 -4
  41. package/models/FilterExpressions.ts +4 -4
  42. package/models/FilterNotificationTarget.ts +2 -2
  43. package/models/GetNotificationRequestBody.ts +2 -2
  44. package/models/InvalidIdentifierError.ts +44 -0
  45. package/models/Notification.ts +72 -174
  46. package/models/Notification200Errors.ts +45 -0
  47. package/models/NotificationAllOf.ts +3 -858
  48. package/models/{InlineResponse4001.ts → NotificationHistoryBadRequestResponse.ts} +4 -4
  49. package/models/{InlineResponse2002.ts → NotificationHistorySuccessResponse.ts} +6 -6
  50. package/models/NotificationSlice.ts +5 -5
  51. package/models/NotificationTarget.ts +3 -124
  52. package/models/NotificationWithMeta.ts +1127 -0
  53. package/models/NotificationWithMetaAllOf.ts +132 -0
  54. package/models/ObjectSerializer.ts +97 -46
  55. package/models/Operator.ts +2 -2
  56. package/models/OutcomeData.ts +2 -2
  57. package/models/OutcomesData.ts +32 -0
  58. package/models/PlatformDeliveryData.ts +18 -2
  59. package/models/PlatformDeliveryDataEmailAllOf.ts +94 -0
  60. package/models/PlatformDeliveryDataSmsAllOf.ts +54 -0
  61. package/models/Player.ts +14 -14
  62. package/models/PlayerNotificationTarget.ts +3 -3
  63. package/models/PlayerSlice.ts +2 -2
  64. package/models/Purchase.ts +2 -2
  65. package/models/Segment.ts +3 -3
  66. package/models/SegmentNotificationTarget.ts +2 -2
  67. package/models/StringMap.ts +3 -3
  68. package/models/{InlineResponse2001.ts → UpdatePlayerSuccessResponse.ts} +6 -6
  69. package/models/UpdatePlayerTagsRequestBody.ts +4 -4
  70. package/models/UpdatePlayerTagsSuccessResponse.ts +31 -0
  71. package/models/all.ts +28 -13
  72. package/package.json +14 -9
  73. package/tsconfig.json +1 -2
  74. package/types/ObjectParamAPI.ts +101 -86
  75. package/types/ObservableAPI.ts +116 -101
  76. package/types/PromiseAPI.ts +97 -82
  77. package/util.ts +10 -1
  78. package/dist/apis/DefaultApi.d.ts +0 -62
  79. package/dist/apis/DefaultApi.js +0 -1317
  80. package/dist/apis/DefaultApi.js.map +0 -1
  81. package/dist/apis/baseapi.d.ts +0 -16
  82. package/dist/apis/baseapi.js +0 -42
  83. package/dist/apis/baseapi.js.map +0 -1
  84. package/dist/apis/exception.d.ts +0 -5
  85. package/dist/apis/exception.js +0 -28
  86. package/dist/apis/exception.js.map +0 -1
  87. package/dist/auth/auth.d.ts +0 -40
  88. package/dist/auth/auth.js +0 -108
  89. package/dist/auth/auth.js.map +0 -1
  90. package/dist/configuration.d.ts +0 -18
  91. package/dist/configuration.js +0 -21
  92. package/dist/configuration.js.map +0 -1
  93. package/dist/http/http.d.ts +0 -72
  94. package/dist/http/http.js +0 -205
  95. package/dist/http/http.js.map +0 -1
  96. package/dist/http/isomorphic-fetch.d.ts +0 -5
  97. package/dist/http/isomorphic-fetch.js +0 -33
  98. package/dist/http/isomorphic-fetch.js.map +0 -1
  99. package/dist/index.d.ts +0 -9
  100. package/dist/index.js +0 -22
  101. package/dist/index.js.map +0 -1
  102. package/dist/middleware.d.ts +0 -16
  103. package/dist/middleware.js +0 -18
  104. package/dist/middleware.js.map +0 -1
  105. package/dist/models/App.d.ts +0 -47
  106. package/dist/models/App.js +0 -196
  107. package/dist/models/App.js.map +0 -1
  108. package/dist/models/Button.d.ts +0 -19
  109. package/dist/models/Button.js +0 -34
  110. package/dist/models/Button.js.map +0 -1
  111. package/dist/models/DeliveryData.d.ts +0 -21
  112. package/dist/models/DeliveryData.js +0 -46
  113. package/dist/models/DeliveryData.js.map +0 -1
  114. package/dist/models/ExportPlayersRequestBody.d.ts +0 -19
  115. package/dist/models/ExportPlayersRequestBody.js +0 -34
  116. package/dist/models/ExportPlayersRequestBody.js.map +0 -1
  117. package/dist/models/Filter.d.ts +0 -21
  118. package/dist/models/Filter.js +0 -40
  119. package/dist/models/Filter.js.map +0 -1
  120. package/dist/models/FilterExpressions.d.ts +0 -23
  121. package/dist/models/FilterExpressions.js +0 -46
  122. package/dist/models/FilterExpressions.js.map +0 -1
  123. package/dist/models/FilterNotificationTarget.d.ts +0 -28
  124. package/dist/models/FilterNotificationTarget.js +0 -88
  125. package/dist/models/FilterNotificationTarget.js.map +0 -1
  126. package/dist/models/GetNotificationRequestBody.d.ts +0 -20
  127. package/dist/models/GetNotificationRequestBody.js +0 -34
  128. package/dist/models/GetNotificationRequestBody.js.map +0 -1
  129. package/dist/models/InlineResponse200.d.ts +0 -20
  130. package/dist/models/InlineResponse200.js +0 -40
  131. package/dist/models/InlineResponse200.js.map +0 -1
  132. package/dist/models/InlineResponse2001.d.ts +0 -17
  133. package/dist/models/InlineResponse2001.js +0 -22
  134. package/dist/models/InlineResponse2001.js.map +0 -1
  135. package/dist/models/InlineResponse2002.d.ts +0 -18
  136. package/dist/models/InlineResponse2002.js +0 -28
  137. package/dist/models/InlineResponse2002.js.map +0 -1
  138. package/dist/models/InlineResponse2003.d.ts +0 -17
  139. package/dist/models/InlineResponse2003.js +0 -22
  140. package/dist/models/InlineResponse2003.js.map +0 -1
  141. package/dist/models/InlineResponse2004.d.ts +0 -18
  142. package/dist/models/InlineResponse2004.js +0 -28
  143. package/dist/models/InlineResponse2004.js.map +0 -1
  144. package/dist/models/InlineResponse2005.d.ts +0 -17
  145. package/dist/models/InlineResponse2005.js +0 -22
  146. package/dist/models/InlineResponse2005.js.map +0 -1
  147. package/dist/models/InlineResponse201.d.ts +0 -18
  148. package/dist/models/InlineResponse201.js +0 -28
  149. package/dist/models/InlineResponse201.js.map +0 -1
  150. package/dist/models/InlineResponse400.d.ts +0 -17
  151. package/dist/models/InlineResponse400.js +0 -22
  152. package/dist/models/InlineResponse400.js.map +0 -1
  153. package/dist/models/InlineResponse4001.d.ts +0 -18
  154. package/dist/models/InlineResponse4001.js +0 -28
  155. package/dist/models/InlineResponse4001.js.map +0 -1
  156. package/dist/models/InlineResponse4002.d.ts +0 -17
  157. package/dist/models/InlineResponse4002.js +0 -22
  158. package/dist/models/InlineResponse4002.js.map +0 -1
  159. package/dist/models/InlineResponse409.d.ts +0 -18
  160. package/dist/models/InlineResponse409.js +0 -28
  161. package/dist/models/InlineResponse409.js.map +0 -1
  162. package/dist/models/Notification.d.ts +0 -132
  163. package/dist/models/Notification.js +0 -688
  164. package/dist/models/Notification.js.map +0 -1
  165. package/dist/models/NotificationAllOf.d.ts +0 -108
  166. package/dist/models/NotificationAllOf.js +0 -544
  167. package/dist/models/NotificationAllOf.js.map +0 -1
  168. package/dist/models/NotificationAllOfAndroidBackgroundLayout.d.ts +0 -19
  169. package/dist/models/NotificationAllOfAndroidBackgroundLayout.js +0 -34
  170. package/dist/models/NotificationAllOfAndroidBackgroundLayout.js.map +0 -1
  171. package/dist/models/NotificationSlice.d.ts +0 -21
  172. package/dist/models/NotificationSlice.js +0 -40
  173. package/dist/models/NotificationSlice.js.map +0 -1
  174. package/dist/models/NotificationTarget.d.ts +0 -40
  175. package/dist/models/NotificationTarget.js +0 -160
  176. package/dist/models/NotificationTarget.js.map +0 -1
  177. package/dist/models/ObjectSerializer.d.ts +0 -44
  178. package/dist/models/ObjectSerializer.js +0 -312
  179. package/dist/models/ObjectSerializer.js.map +0 -1
  180. package/dist/models/Operator.d.ts +0 -18
  181. package/dist/models/Operator.js +0 -22
  182. package/dist/models/Operator.js.map +0 -1
  183. package/dist/models/OutcomeData.d.ts +0 -20
  184. package/dist/models/OutcomeData.js +0 -34
  185. package/dist/models/OutcomeData.js.map +0 -1
  186. package/dist/models/PlatformDeliveryData.d.ts +0 -23
  187. package/dist/models/PlatformDeliveryData.js +0 -52
  188. package/dist/models/PlatformDeliveryData.js.map +0 -1
  189. package/dist/models/Player.d.ts +0 -43
  190. package/dist/models/Player.js +0 -178
  191. package/dist/models/Player.js.map +0 -1
  192. package/dist/models/PlayerNotificationTarget.d.ts +0 -26
  193. package/dist/models/PlayerNotificationTarget.js +0 -76
  194. package/dist/models/PlayerNotificationTarget.js.map +0 -1
  195. package/dist/models/PlayerSlice.d.ts +0 -21
  196. package/dist/models/PlayerSlice.js +0 -40
  197. package/dist/models/PlayerSlice.js.map +0 -1
  198. package/dist/models/Purchase.d.ts +0 -19
  199. package/dist/models/Purchase.js +0 -34
  200. package/dist/models/Purchase.js.map +0 -1
  201. package/dist/models/Segment.d.ts +0 -20
  202. package/dist/models/Segment.js +0 -34
  203. package/dist/models/Segment.js.map +0 -1
  204. package/dist/models/SegmentNotificationTarget.d.ts +0 -18
  205. package/dist/models/SegmentNotificationTarget.js +0 -28
  206. package/dist/models/SegmentNotificationTarget.js.map +0 -1
  207. package/dist/models/StringMap.d.ts +0 -59
  208. package/dist/models/StringMap.js +0 -274
  209. package/dist/models/StringMap.js.map +0 -1
  210. package/dist/models/UpdatePlayerTagsRequestBody.d.ts +0 -17
  211. package/dist/models/UpdatePlayerTagsRequestBody.js +0 -22
  212. package/dist/models/UpdatePlayerTagsRequestBody.js.map +0 -1
  213. package/dist/models/all.d.ts +0 -35
  214. package/dist/models/all.js +0 -48
  215. package/dist/models/all.js.map +0 -1
  216. package/dist/rxjsStub.d.ts +0 -10
  217. package/dist/rxjsStub.js +0 -33
  218. package/dist/rxjsStub.js.map +0 -1
  219. package/dist/servers.d.ts +0 -17
  220. package/dist/servers.js +0 -32
  221. package/dist/servers.js.map +0 -1
  222. package/dist/types/ObjectParamAPI.d.ts +0 -121
  223. package/dist/types/ObjectParamAPI.js +0 -69
  224. package/dist/types/ObjectParamAPI.js.map +0 -1
  225. package/dist/types/ObservableAPI.d.ts +0 -45
  226. package/dist/types/ObservableAPI.js +0 -472
  227. package/dist/types/ObservableAPI.js.map +0 -1
  228. package/dist/types/PromiseAPI.d.ts +0 -42
  229. package/dist/types/PromiseAPI.js +0 -88
  230. package/dist/types/PromiseAPI.js.map +0 -1
  231. package/dist/util.d.ts +0 -1
  232. package/dist/util.js +0 -25
  233. package/dist/util.js.map +0 -1
  234. package/git_push.sh +0 -52
@@ -1,1317 +0,0 @@
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 (b.hasOwnProperty(p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
- return new (P || (P = Promise))(function (resolve, reject) {
18
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
- step((generator = generator.apply(thisArg, _arguments || [])).next());
22
- });
23
- };
24
- var __generator = (this && this.__generator) || function (thisArg, body) {
25
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
26
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
27
- function verb(n) { return function (v) { return step([n, v]); }; }
28
- function step(op) {
29
- if (f) throw new TypeError("Generator is already executing.");
30
- while (_) try {
31
- 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;
32
- if (y = 0, t) op = [op[0] & 2, t.value];
33
- switch (op[0]) {
34
- case 0: case 1: t = op; break;
35
- case 4: _.label++; return { value: op[1], done: false };
36
- case 5: _.label++; y = op[1]; op = [0]; continue;
37
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
38
- default:
39
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
40
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
41
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
42
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
43
- if (t[2]) _.ops.pop();
44
- _.trys.pop(); continue;
45
- }
46
- op = body.call(thisArg, _);
47
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
48
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
49
- }
50
- };
51
- Object.defineProperty(exports, "__esModule", { value: true });
52
- exports.DefaultApiResponseProcessor = exports.DefaultApiRequestFactory = void 0;
53
- var baseapi_1 = require("./baseapi");
54
- var http_1 = require("../http/http");
55
- var ObjectSerializer_1 = require("../models/ObjectSerializer");
56
- var exception_1 = require("./exception");
57
- var util_1 = require("../util");
58
- var DefaultApiRequestFactory = (function (_super) {
59
- __extends(DefaultApiRequestFactory, _super);
60
- function DefaultApiRequestFactory() {
61
- return _super !== null && _super.apply(this, arguments) || this;
62
- }
63
- DefaultApiRequestFactory.prototype.cancelNotification = function (app_id, notification_id, _options) {
64
- return __awaiter(this, void 0, void 0, function () {
65
- var _config, localVarPath, requestContext, authMethod;
66
- return __generator(this, function (_a) {
67
- switch (_a.label) {
68
- case 0:
69
- _config = _options || this.configuration;
70
- if (app_id === null || app_id === undefined) {
71
- throw new baseapi_1.RequiredError('Required parameter app_id was null or undefined when calling cancelNotification.');
72
- }
73
- if (notification_id === null || notification_id === undefined) {
74
- throw new baseapi_1.RequiredError('Required parameter notification_id was null or undefined when calling cancelNotification.');
75
- }
76
- localVarPath = '/notifications/{notification_id}'
77
- .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notification_id)));
78
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
79
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
80
- if (app_id !== undefined) {
81
- requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(app_id, "string", ""));
82
- }
83
- authMethod = null;
84
- authMethod = _config.authMethods["app_key"];
85
- if (!authMethod) return [3, 2];
86
- return [4, authMethod.applySecurityAuthentication(requestContext)];
87
- case 1:
88
- _a.sent();
89
- _a.label = 2;
90
- case 2: return [2, requestContext];
91
- }
92
- });
93
- });
94
- };
95
- DefaultApiRequestFactory.prototype.createApp = function (app, _options) {
96
- return __awaiter(this, void 0, void 0, function () {
97
- var _config, localVarPath, requestContext, contentType, serializedBody, authMethod;
98
- return __generator(this, function (_a) {
99
- switch (_a.label) {
100
- case 0:
101
- _config = _options || this.configuration;
102
- if (app === null || app === undefined) {
103
- throw new baseapi_1.RequiredError('Required parameter app was null or undefined when calling createApp.');
104
- }
105
- localVarPath = '/apps';
106
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
107
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
108
- contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
109
- "application/json"
110
- ]);
111
- requestContext.setHeaderParam("Content-Type", contentType);
112
- serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(app, "App", ""), contentType);
113
- requestContext.setBody(serializedBody);
114
- authMethod = null;
115
- authMethod = _config.authMethods["user_key"];
116
- if (!authMethod) return [3, 2];
117
- return [4, authMethod.applySecurityAuthentication(requestContext)];
118
- case 1:
119
- _a.sent();
120
- _a.label = 2;
121
- case 2: return [2, requestContext];
122
- }
123
- });
124
- });
125
- };
126
- DefaultApiRequestFactory.prototype.createNotification = function (notification, _options) {
127
- return __awaiter(this, void 0, void 0, function () {
128
- var _config, localVarPath, requestContext, contentType, serializedBody, authMethod;
129
- return __generator(this, function (_a) {
130
- switch (_a.label) {
131
- case 0:
132
- _config = _options || this.configuration;
133
- if (notification === null || notification === undefined) {
134
- throw new baseapi_1.RequiredError('Required parameter notification was null or undefined when calling createNotification.');
135
- }
136
- localVarPath = '/notifications';
137
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
138
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
139
- contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
140
- "application/json"
141
- ]);
142
- requestContext.setHeaderParam("Content-Type", contentType);
143
- serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(notification, "Notification", ""), contentType);
144
- requestContext.setBody(serializedBody);
145
- authMethod = null;
146
- authMethod = _config.authMethods["app_key"];
147
- if (!authMethod) return [3, 2];
148
- return [4, authMethod.applySecurityAuthentication(requestContext)];
149
- case 1:
150
- _a.sent();
151
- _a.label = 2;
152
- case 2: return [2, requestContext];
153
- }
154
- });
155
- });
156
- };
157
- DefaultApiRequestFactory.prototype.createPlayer = function (player, _options) {
158
- return __awaiter(this, void 0, void 0, function () {
159
- var _config, localVarPath, requestContext, contentType, serializedBody, authMethod;
160
- return __generator(this, function (_a) {
161
- switch (_a.label) {
162
- case 0:
163
- _config = _options || this.configuration;
164
- if (player === null || player === undefined) {
165
- throw new baseapi_1.RequiredError('Required parameter player was null or undefined when calling createPlayer.');
166
- }
167
- localVarPath = '/players';
168
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
169
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
170
- contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
171
- "application/json"
172
- ]);
173
- requestContext.setHeaderParam("Content-Type", contentType);
174
- serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(player, "Player", ""), contentType);
175
- requestContext.setBody(serializedBody);
176
- authMethod = null;
177
- authMethod = _config.authMethods["app_key"];
178
- if (!authMethod) return [3, 2];
179
- return [4, authMethod.applySecurityAuthentication(requestContext)];
180
- case 1:
181
- _a.sent();
182
- _a.label = 2;
183
- case 2: return [2, requestContext];
184
- }
185
- });
186
- });
187
- };
188
- DefaultApiRequestFactory.prototype.createSegments = function (app_id, segment, _options) {
189
- return __awaiter(this, void 0, void 0, function () {
190
- var _config, localVarPath, requestContext, contentType, serializedBody, authMethod;
191
- return __generator(this, function (_a) {
192
- switch (_a.label) {
193
- case 0:
194
- _config = _options || this.configuration;
195
- if (app_id === null || app_id === undefined) {
196
- throw new baseapi_1.RequiredError('Required parameter app_id was null or undefined when calling createSegments.');
197
- }
198
- localVarPath = '/apps/{app_id}/segments'
199
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(app_id)));
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(segment, "Segment", ""), contentType);
207
- requestContext.setBody(serializedBody);
208
- authMethod = null;
209
- authMethod = _config.authMethods["app_key"];
210
- if (!authMethod) return [3, 2];
211
- return [4, authMethod.applySecurityAuthentication(requestContext)];
212
- case 1:
213
- _a.sent();
214
- _a.label = 2;
215
- case 2: return [2, requestContext];
216
- }
217
- });
218
- });
219
- };
220
- DefaultApiRequestFactory.prototype.deletePlayer = function (app_id, player_id, _options) {
221
- return __awaiter(this, void 0, void 0, function () {
222
- var _config, localVarPath, requestContext, authMethod;
223
- return __generator(this, function (_a) {
224
- switch (_a.label) {
225
- case 0:
226
- _config = _options || this.configuration;
227
- if (app_id === null || app_id === undefined) {
228
- throw new baseapi_1.RequiredError('Required parameter app_id was null or undefined when calling deletePlayer.');
229
- }
230
- if (player_id === null || player_id === undefined) {
231
- throw new baseapi_1.RequiredError('Required parameter player_id was null or undefined when calling deletePlayer.');
232
- }
233
- localVarPath = '/players/{player_id}'
234
- .replace('{' + 'player_id' + '}', encodeURIComponent(String(player_id)));
235
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
236
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
237
- if (app_id !== undefined) {
238
- requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(app_id, "string", ""));
239
- }
240
- authMethod = null;
241
- authMethod = _config.authMethods["app_key"];
242
- if (!authMethod) return [3, 2];
243
- return [4, authMethod.applySecurityAuthentication(requestContext)];
244
- case 1:
245
- _a.sent();
246
- _a.label = 2;
247
- case 2: return [2, requestContext];
248
- }
249
- });
250
- });
251
- };
252
- DefaultApiRequestFactory.prototype.deleteSegments = function (app_id, segment_id, _options) {
253
- return __awaiter(this, void 0, void 0, function () {
254
- var _config, localVarPath, requestContext, authMethod;
255
- return __generator(this, function (_a) {
256
- switch (_a.label) {
257
- case 0:
258
- _config = _options || this.configuration;
259
- if (app_id === null || app_id === undefined) {
260
- throw new baseapi_1.RequiredError('Required parameter app_id was null or undefined when calling deleteSegments.');
261
- }
262
- if (segment_id === null || segment_id === undefined) {
263
- throw new baseapi_1.RequiredError('Required parameter segment_id was null or undefined when calling deleteSegments.');
264
- }
265
- localVarPath = '/apps/{app_id}/segments/{segment_id}'
266
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(app_id)))
267
- .replace('{' + 'segment_id' + '}', encodeURIComponent(String(segment_id)));
268
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
269
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
270
- authMethod = null;
271
- authMethod = _config.authMethods["app_key"];
272
- if (!authMethod) return [3, 2];
273
- return [4, authMethod.applySecurityAuthentication(requestContext)];
274
- case 1:
275
- _a.sent();
276
- _a.label = 2;
277
- case 2: return [2, requestContext];
278
- }
279
- });
280
- });
281
- };
282
- DefaultApiRequestFactory.prototype.exportPlayers = function (app_id, export_players_request_body, _options) {
283
- return __awaiter(this, void 0, void 0, function () {
284
- var _config, localVarPath, requestContext, contentType, serializedBody, authMethod;
285
- return __generator(this, function (_a) {
286
- switch (_a.label) {
287
- case 0:
288
- _config = _options || this.configuration;
289
- if (app_id === null || app_id === undefined) {
290
- throw new baseapi_1.RequiredError('Required parameter app_id was null or undefined when calling exportPlayers.');
291
- }
292
- localVarPath = '/players/csv_export?app_id={app_id}'
293
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(app_id)));
294
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
295
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
296
- contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
297
- "application/json"
298
- ]);
299
- requestContext.setHeaderParam("Content-Type", contentType);
300
- serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(export_players_request_body, "ExportPlayersRequestBody", ""), contentType);
301
- requestContext.setBody(serializedBody);
302
- authMethod = null;
303
- authMethod = _config.authMethods["app_key"];
304
- if (!authMethod) return [3, 2];
305
- return [4, authMethod.applySecurityAuthentication(requestContext)];
306
- case 1:
307
- _a.sent();
308
- _a.label = 2;
309
- case 2: return [2, requestContext];
310
- }
311
- });
312
- });
313
- };
314
- DefaultApiRequestFactory.prototype.getApp = function (app_id, _options) {
315
- return __awaiter(this, void 0, void 0, function () {
316
- var _config, localVarPath, requestContext, authMethod;
317
- return __generator(this, function (_a) {
318
- switch (_a.label) {
319
- case 0:
320
- _config = _options || this.configuration;
321
- if (app_id === null || app_id === undefined) {
322
- throw new baseapi_1.RequiredError('Required parameter app_id was null or undefined when calling getApp.');
323
- }
324
- localVarPath = '/apps/{app_id}'
325
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(app_id)));
326
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
327
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
328
- authMethod = null;
329
- authMethod = _config.authMethods["user_key"];
330
- if (!authMethod) return [3, 2];
331
- return [4, authMethod.applySecurityAuthentication(requestContext)];
332
- case 1:
333
- _a.sent();
334
- _a.label = 2;
335
- case 2: return [2, requestContext];
336
- }
337
- });
338
- });
339
- };
340
- DefaultApiRequestFactory.prototype.getApps = function (_options) {
341
- return __awaiter(this, void 0, void 0, function () {
342
- var _config, localVarPath, requestContext, authMethod;
343
- return __generator(this, function (_a) {
344
- switch (_a.label) {
345
- case 0:
346
- _config = _options || this.configuration;
347
- localVarPath = '/apps';
348
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
349
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
350
- authMethod = null;
351
- authMethod = _config.authMethods["user_key"];
352
- if (!authMethod) return [3, 2];
353
- return [4, authMethod.applySecurityAuthentication(requestContext)];
354
- case 1:
355
- _a.sent();
356
- _a.label = 2;
357
- case 2: return [2, requestContext];
358
- }
359
- });
360
- });
361
- };
362
- DefaultApiRequestFactory.prototype.getNotification = function (app_id, notification_id, _options) {
363
- return __awaiter(this, void 0, void 0, function () {
364
- var _config, localVarPath, requestContext, authMethod;
365
- return __generator(this, function (_a) {
366
- switch (_a.label) {
367
- case 0:
368
- _config = _options || this.configuration;
369
- if (app_id === null || app_id === undefined) {
370
- throw new baseapi_1.RequiredError('Required parameter app_id was null or undefined when calling getNotification.');
371
- }
372
- if (notification_id === null || notification_id === undefined) {
373
- throw new baseapi_1.RequiredError('Required parameter notification_id was null or undefined when calling getNotification.');
374
- }
375
- localVarPath = '/notifications/{notification_id}'
376
- .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notification_id)));
377
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
378
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
379
- if (app_id !== undefined) {
380
- requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(app_id, "string", ""));
381
- }
382
- authMethod = null;
383
- authMethod = _config.authMethods["app_key"];
384
- if (!authMethod) return [3, 2];
385
- return [4, authMethod.applySecurityAuthentication(requestContext)];
386
- case 1:
387
- _a.sent();
388
- _a.label = 2;
389
- case 2: return [2, requestContext];
390
- }
391
- });
392
- });
393
- };
394
- DefaultApiRequestFactory.prototype.getNotificationHistory = function (notification_id, get_notification_request_body, _options) {
395
- return __awaiter(this, void 0, void 0, function () {
396
- var _config, localVarPath, requestContext, contentType, serializedBody, authMethod;
397
- return __generator(this, function (_a) {
398
- switch (_a.label) {
399
- case 0:
400
- _config = _options || this.configuration;
401
- if (notification_id === null || notification_id === undefined) {
402
- throw new baseapi_1.RequiredError('Required parameter notification_id was null or undefined when calling getNotificationHistory.');
403
- }
404
- if (get_notification_request_body === null || get_notification_request_body === undefined) {
405
- throw new baseapi_1.RequiredError('Required parameter get_notification_request_body was null or undefined when calling getNotificationHistory.');
406
- }
407
- localVarPath = '/notifications/{notification_id}/history'
408
- .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notification_id)));
409
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
410
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
411
- contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
412
- "application/json"
413
- ]);
414
- requestContext.setHeaderParam("Content-Type", contentType);
415
- serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(get_notification_request_body, "GetNotificationRequestBody", ""), contentType);
416
- requestContext.setBody(serializedBody);
417
- authMethod = null;
418
- authMethod = _config.authMethods["app_key"];
419
- if (!authMethod) return [3, 2];
420
- return [4, authMethod.applySecurityAuthentication(requestContext)];
421
- case 1:
422
- _a.sent();
423
- _a.label = 2;
424
- case 2: return [2, requestContext];
425
- }
426
- });
427
- });
428
- };
429
- DefaultApiRequestFactory.prototype.getNotifications = function (app_id, limit, offset, kind, _options) {
430
- return __awaiter(this, void 0, void 0, function () {
431
- var _config, localVarPath, requestContext, authMethod;
432
- return __generator(this, function (_a) {
433
- switch (_a.label) {
434
- case 0:
435
- _config = _options || this.configuration;
436
- if (app_id === null || app_id === undefined) {
437
- throw new baseapi_1.RequiredError('Required parameter app_id was null or undefined when calling getNotifications.');
438
- }
439
- localVarPath = '/notifications';
440
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
441
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
442
- if (app_id !== undefined) {
443
- requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(app_id, "string", ""));
444
- }
445
- if (limit !== undefined) {
446
- requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "string", ""));
447
- }
448
- if (offset !== undefined) {
449
- requestContext.setQueryParam("offset", ObjectSerializer_1.ObjectSerializer.serialize(offset, "number", ""));
450
- }
451
- if (kind !== undefined) {
452
- requestContext.setQueryParam("kind", ObjectSerializer_1.ObjectSerializer.serialize(kind, "0 | 1 | 3", ""));
453
- }
454
- authMethod = null;
455
- authMethod = _config.authMethods["app_key"];
456
- if (!authMethod) return [3, 2];
457
- return [4, authMethod.applySecurityAuthentication(requestContext)];
458
- case 1:
459
- _a.sent();
460
- _a.label = 2;
461
- case 2: return [2, requestContext];
462
- }
463
- });
464
- });
465
- };
466
- DefaultApiRequestFactory.prototype.getOutcomes = function (app_id, outcome_names, outcome_names2, outcome_time_range, outcome_platforms, outcome_attribution, _options) {
467
- return __awaiter(this, void 0, void 0, function () {
468
- var _config, localVarPath, requestContext, authMethod;
469
- return __generator(this, function (_a) {
470
- switch (_a.label) {
471
- case 0:
472
- _config = _options || this.configuration;
473
- if (app_id === null || app_id === undefined) {
474
- throw new baseapi_1.RequiredError('Required parameter app_id was null or undefined when calling getOutcomes.');
475
- }
476
- if (outcome_names === null || outcome_names === undefined) {
477
- throw new baseapi_1.RequiredError('Required parameter outcome_names was null or undefined when calling getOutcomes.');
478
- }
479
- localVarPath = '/apps/{app_id}/outcomes'
480
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(app_id)));
481
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
482
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
483
- if (outcome_names !== undefined) {
484
- requestContext.setQueryParam("outcome_names", ObjectSerializer_1.ObjectSerializer.serialize(outcome_names, "string", ""));
485
- }
486
- if (outcome_names2 !== undefined) {
487
- requestContext.setQueryParam("outcome_names[]", ObjectSerializer_1.ObjectSerializer.serialize(outcome_names2, "string", ""));
488
- }
489
- if (outcome_time_range !== undefined) {
490
- requestContext.setQueryParam("outcome_time_range", ObjectSerializer_1.ObjectSerializer.serialize(outcome_time_range, "string", ""));
491
- }
492
- if (outcome_platforms !== undefined) {
493
- requestContext.setQueryParam("outcome_platforms", ObjectSerializer_1.ObjectSerializer.serialize(outcome_platforms, "string", ""));
494
- }
495
- if (outcome_attribution !== undefined) {
496
- requestContext.setQueryParam("outcome_attribution", ObjectSerializer_1.ObjectSerializer.serialize(outcome_attribution, "string", ""));
497
- }
498
- authMethod = null;
499
- authMethod = _config.authMethods["app_key"];
500
- if (!authMethod) return [3, 2];
501
- return [4, authMethod.applySecurityAuthentication(requestContext)];
502
- case 1:
503
- _a.sent();
504
- _a.label = 2;
505
- case 2: return [2, requestContext];
506
- }
507
- });
508
- });
509
- };
510
- DefaultApiRequestFactory.prototype.getPlayer = function (app_id, player_id, email_auth_hash, _options) {
511
- return __awaiter(this, void 0, void 0, function () {
512
- var _config, localVarPath, requestContext, authMethod;
513
- return __generator(this, function (_a) {
514
- switch (_a.label) {
515
- case 0:
516
- _config = _options || this.configuration;
517
- if (app_id === null || app_id === undefined) {
518
- throw new baseapi_1.RequiredError('Required parameter app_id was null or undefined when calling getPlayer.');
519
- }
520
- if (player_id === null || player_id === undefined) {
521
- throw new baseapi_1.RequiredError('Required parameter player_id was null or undefined when calling getPlayer.');
522
- }
523
- localVarPath = '/players/{player_id}'
524
- .replace('{' + 'player_id' + '}', encodeURIComponent(String(player_id)));
525
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
526
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
527
- if (app_id !== undefined) {
528
- requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(app_id, "string", ""));
529
- }
530
- if (email_auth_hash !== undefined) {
531
- requestContext.setQueryParam("email_auth_hash", ObjectSerializer_1.ObjectSerializer.serialize(email_auth_hash, "string", ""));
532
- }
533
- authMethod = null;
534
- authMethod = _config.authMethods["app_key"];
535
- if (!authMethod) return [3, 2];
536
- return [4, authMethod.applySecurityAuthentication(requestContext)];
537
- case 1:
538
- _a.sent();
539
- _a.label = 2;
540
- case 2: return [2, requestContext];
541
- }
542
- });
543
- });
544
- };
545
- DefaultApiRequestFactory.prototype.getPlayers = function (app_id, limit, offset, _options) {
546
- return __awaiter(this, void 0, void 0, function () {
547
- var _config, localVarPath, requestContext, authMethod;
548
- return __generator(this, function (_a) {
549
- switch (_a.label) {
550
- case 0:
551
- _config = _options || this.configuration;
552
- if (app_id === null || app_id === undefined) {
553
- throw new baseapi_1.RequiredError('Required parameter app_id was null or undefined when calling getPlayers.');
554
- }
555
- localVarPath = '/players';
556
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
557
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
558
- if (app_id !== undefined) {
559
- requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(app_id, "string", ""));
560
- }
561
- if (limit !== undefined) {
562
- requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "string", ""));
563
- }
564
- if (offset !== undefined) {
565
- requestContext.setQueryParam("offset", ObjectSerializer_1.ObjectSerializer.serialize(offset, "number", ""));
566
- }
567
- authMethod = null;
568
- authMethod = _config.authMethods["app_key"];
569
- if (!authMethod) return [3, 2];
570
- return [4, authMethod.applySecurityAuthentication(requestContext)];
571
- case 1:
572
- _a.sent();
573
- _a.label = 2;
574
- case 2: return [2, requestContext];
575
- }
576
- });
577
- });
578
- };
579
- DefaultApiRequestFactory.prototype.updateApp = function (app_id, app, _options) {
580
- return __awaiter(this, void 0, void 0, function () {
581
- var _config, localVarPath, requestContext, contentType, serializedBody, authMethod;
582
- return __generator(this, function (_a) {
583
- switch (_a.label) {
584
- case 0:
585
- _config = _options || this.configuration;
586
- if (app_id === null || app_id === undefined) {
587
- throw new baseapi_1.RequiredError('Required parameter app_id was null or undefined when calling updateApp.');
588
- }
589
- if (app === null || app === undefined) {
590
- throw new baseapi_1.RequiredError('Required parameter app was null or undefined when calling updateApp.');
591
- }
592
- localVarPath = '/apps/{app_id}'
593
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(app_id)));
594
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
595
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
596
- contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
597
- "application/json"
598
- ]);
599
- requestContext.setHeaderParam("Content-Type", contentType);
600
- serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(app, "App", ""), contentType);
601
- requestContext.setBody(serializedBody);
602
- authMethod = null;
603
- authMethod = _config.authMethods["user_key"];
604
- if (!authMethod) return [3, 2];
605
- return [4, authMethod.applySecurityAuthentication(requestContext)];
606
- case 1:
607
- _a.sent();
608
- _a.label = 2;
609
- case 2: return [2, requestContext];
610
- }
611
- });
612
- });
613
- };
614
- DefaultApiRequestFactory.prototype.updatePlayer = function (player_id, player, _options) {
615
- return __awaiter(this, void 0, void 0, function () {
616
- var _config, localVarPath, requestContext, contentType, serializedBody, authMethod;
617
- return __generator(this, function (_a) {
618
- switch (_a.label) {
619
- case 0:
620
- _config = _options || this.configuration;
621
- if (player_id === null || player_id === undefined) {
622
- throw new baseapi_1.RequiredError('Required parameter player_id was null or undefined when calling updatePlayer.');
623
- }
624
- if (player === null || player === undefined) {
625
- throw new baseapi_1.RequiredError('Required parameter player was null or undefined when calling updatePlayer.');
626
- }
627
- localVarPath = '/players/{player_id}'
628
- .replace('{' + 'player_id' + '}', encodeURIComponent(String(player_id)));
629
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
630
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
631
- contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
632
- "application/json"
633
- ]);
634
- requestContext.setHeaderParam("Content-Type", contentType);
635
- serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(player, "Player", ""), contentType);
636
- requestContext.setBody(serializedBody);
637
- authMethod = null;
638
- authMethod = _config.authMethods["app_key"];
639
- if (!authMethod) return [3, 2];
640
- return [4, authMethod.applySecurityAuthentication(requestContext)];
641
- case 1:
642
- _a.sent();
643
- _a.label = 2;
644
- case 2: return [2, requestContext];
645
- }
646
- });
647
- });
648
- };
649
- DefaultApiRequestFactory.prototype.updatePlayerTags = function (app_id, external_user_id, update_player_tags_request_body, _options) {
650
- return __awaiter(this, void 0, void 0, function () {
651
- var _config, localVarPath, requestContext, contentType, serializedBody, authMethod;
652
- return __generator(this, function (_a) {
653
- switch (_a.label) {
654
- case 0:
655
- _config = _options || this.configuration;
656
- if (app_id === null || app_id === undefined) {
657
- throw new baseapi_1.RequiredError('Required parameter app_id was null or undefined when calling updatePlayerTags.');
658
- }
659
- if (external_user_id === null || external_user_id === undefined) {
660
- throw new baseapi_1.RequiredError('Required parameter external_user_id was null or undefined when calling updatePlayerTags.');
661
- }
662
- localVarPath = '/apps/{app_id}/users/{external_user_id}'
663
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(app_id)))
664
- .replace('{' + 'external_user_id' + '}', encodeURIComponent(String(external_user_id)));
665
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
666
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
667
- contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
668
- "application/json"
669
- ]);
670
- requestContext.setHeaderParam("Content-Type", contentType);
671
- serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(update_player_tags_request_body, "UpdatePlayerTagsRequestBody", ""), contentType);
672
- requestContext.setBody(serializedBody);
673
- authMethod = null;
674
- authMethod = _config.authMethods["app_key"];
675
- if (!authMethod) return [3, 2];
676
- return [4, authMethod.applySecurityAuthentication(requestContext)];
677
- case 1:
678
- _a.sent();
679
- _a.label = 2;
680
- case 2: return [2, requestContext];
681
- }
682
- });
683
- });
684
- };
685
- return DefaultApiRequestFactory;
686
- }(baseapi_1.BaseAPIRequestFactory));
687
- exports.DefaultApiRequestFactory = DefaultApiRequestFactory;
688
- var DefaultApiResponseProcessor = (function () {
689
- function DefaultApiResponseProcessor() {
690
- }
691
- DefaultApiResponseProcessor.prototype.cancelNotification = function (response) {
692
- return __awaiter(this, void 0, void 0, function () {
693
- var contentType, body_1, _a, _b, _c, _d, body_2, _e, _f, _g, _h, body;
694
- return __generator(this, function (_j) {
695
- switch (_j.label) {
696
- case 0:
697
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
698
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
699
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
700
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
701
- return [4, response.body.text()];
702
- case 1:
703
- body_1 = _b.apply(_a, [_d.apply(_c, [_j.sent(), contentType]), "InlineResponse2001", ""]);
704
- return [2, body_1];
705
- case 2:
706
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
707
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
708
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
709
- return [4, response.body.text()];
710
- case 3:
711
- body_2 = _f.apply(_e, [_h.apply(_g, [_j.sent(), contentType]), "InlineResponse2001", ""]);
712
- return [2, body_2];
713
- case 4:
714
- body = response.body || "";
715
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
716
- }
717
- });
718
- });
719
- };
720
- DefaultApiResponseProcessor.prototype.createApp = function (response) {
721
- return __awaiter(this, void 0, void 0, function () {
722
- var contentType, body_3, _a, _b, _c, _d, body_4, _e, _f, _g, _h, body;
723
- return __generator(this, function (_j) {
724
- switch (_j.label) {
725
- case 0:
726
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
727
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
728
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
729
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
730
- return [4, response.body.text()];
731
- case 1:
732
- body_3 = _b.apply(_a, [_d.apply(_c, [_j.sent(), contentType]), "App", ""]);
733
- return [2, body_3];
734
- case 2:
735
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
736
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
737
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
738
- return [4, response.body.text()];
739
- case 3:
740
- body_4 = _f.apply(_e, [_h.apply(_g, [_j.sent(), contentType]), "App", ""]);
741
- return [2, body_4];
742
- case 4:
743
- body = response.body || "";
744
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
745
- }
746
- });
747
- });
748
- };
749
- DefaultApiResponseProcessor.prototype.createNotification = function (response) {
750
- return __awaiter(this, void 0, void 0, function () {
751
- var contentType, body_5, _a, _b, _c, _d, body_6, _e, _f, _g, _h, body_7, _j, _k, _l, _m, body;
752
- return __generator(this, function (_o) {
753
- switch (_o.label) {
754
- case 0:
755
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
756
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
757
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
758
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
759
- return [4, response.body.text()];
760
- case 1:
761
- body_5 = _b.apply(_a, [_d.apply(_c, [_o.sent(), contentType]), "InlineResponse200", ""]);
762
- return [2, body_5];
763
- case 2:
764
- if (!util_1.isCodeInRange("400", response.httpStatusCode)) return [3, 4];
765
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
766
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
767
- return [4, response.body.text()];
768
- case 3:
769
- body_6 = _f.apply(_e, [_h.apply(_g, [_o.sent(), contentType]), "InlineResponse400", ""]);
770
- throw new exception_1.ApiException(400, body_6);
771
- case 4:
772
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
773
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
774
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
775
- return [4, response.body.text()];
776
- case 5:
777
- body_7 = _k.apply(_j, [_m.apply(_l, [_o.sent(), contentType]), "InlineResponse200", ""]);
778
- return [2, body_7];
779
- case 6:
780
- body = response.body || "";
781
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
782
- }
783
- });
784
- });
785
- };
786
- DefaultApiResponseProcessor.prototype.createPlayer = function (response) {
787
- return __awaiter(this, void 0, void 0, function () {
788
- var contentType, body_8, _a, _b, _c, _d, body_9, _e, _f, _g, _h, body;
789
- return __generator(this, function (_j) {
790
- switch (_j.label) {
791
- case 0:
792
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
793
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
794
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
795
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
796
- return [4, response.body.text()];
797
- case 1:
798
- body_8 = _b.apply(_a, [_d.apply(_c, [_j.sent(), contentType]), "InlineResponse2004", ""]);
799
- return [2, body_8];
800
- case 2:
801
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
802
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
803
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
804
- return [4, response.body.text()];
805
- case 3:
806
- body_9 = _f.apply(_e, [_h.apply(_g, [_j.sent(), contentType]), "InlineResponse2004", ""]);
807
- return [2, body_9];
808
- case 4:
809
- body = response.body || "";
810
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
811
- }
812
- });
813
- });
814
- };
815
- DefaultApiResponseProcessor.prototype.createSegments = function (response) {
816
- return __awaiter(this, void 0, void 0, function () {
817
- var contentType, body_10, _a, _b, _c, _d, body_11, _e, _f, _g, _h, body_12, _j, _k, _l, _m, body_13, _o, _p, _q, _r, body;
818
- return __generator(this, function (_s) {
819
- switch (_s.label) {
820
- case 0:
821
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
822
- if (!util_1.isCodeInRange("201", response.httpStatusCode)) return [3, 2];
823
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
824
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
825
- return [4, response.body.text()];
826
- case 1:
827
- body_10 = _b.apply(_a, [_d.apply(_c, [_s.sent(), contentType]), "InlineResponse201", ""]);
828
- return [2, body_10];
829
- case 2:
830
- if (!util_1.isCodeInRange("409", response.httpStatusCode)) return [3, 4];
831
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
832
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
833
- return [4, response.body.text()];
834
- case 3:
835
- body_11 = _f.apply(_e, [_h.apply(_g, [_s.sent(), contentType]), "InlineResponse409", ""]);
836
- throw new exception_1.ApiException(409, body_11);
837
- case 4:
838
- if (!util_1.isCodeInRange("400", response.httpStatusCode)) return [3, 6];
839
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
840
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
841
- return [4, response.body.text()];
842
- case 5:
843
- body_12 = _k.apply(_j, [_m.apply(_l, [_s.sent(), contentType]), "InlineResponse409", ""]);
844
- throw new exception_1.ApiException(400, body_12);
845
- case 6:
846
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
847
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
848
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
849
- return [4, response.body.text()];
850
- case 7:
851
- body_13 = _p.apply(_o, [_r.apply(_q, [_s.sent(), contentType]), "InlineResponse201", ""]);
852
- return [2, body_13];
853
- case 8:
854
- body = response.body || "";
855
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
856
- }
857
- });
858
- });
859
- };
860
- DefaultApiResponseProcessor.prototype.deletePlayer = function (response) {
861
- return __awaiter(this, void 0, void 0, function () {
862
- var contentType, body_14, _a, _b, _c, _d, body_15, _e, _f, _g, _h, body_16, _j, _k, _l, _m, body_17, _o, _p, _q, _r, body;
863
- return __generator(this, function (_s) {
864
- switch (_s.label) {
865
- case 0:
866
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
867
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
868
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
869
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
870
- return [4, response.body.text()];
871
- case 1:
872
- body_14 = _b.apply(_a, [_d.apply(_c, [_s.sent(), contentType]), "InlineResponse2001", ""]);
873
- return [2, body_14];
874
- case 2:
875
- if (!util_1.isCodeInRange("404", response.httpStatusCode)) return [3, 4];
876
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
877
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
878
- return [4, response.body.text()];
879
- case 3:
880
- body_15 = _f.apply(_e, [_h.apply(_g, [_s.sent(), contentType]), "InlineResponse2001", ""]);
881
- throw new exception_1.ApiException(404, body_15);
882
- case 4:
883
- if (!util_1.isCodeInRange("400", response.httpStatusCode)) return [3, 6];
884
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
885
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
886
- return [4, response.body.text()];
887
- case 5:
888
- body_16 = _k.apply(_j, [_m.apply(_l, [_s.sent(), contentType]), "InlineResponse4002", ""]);
889
- throw new exception_1.ApiException(400, body_16);
890
- case 6:
891
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
892
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
893
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
894
- return [4, response.body.text()];
895
- case 7:
896
- body_17 = _p.apply(_o, [_r.apply(_q, [_s.sent(), contentType]), "InlineResponse2001", ""]);
897
- return [2, body_17];
898
- case 8:
899
- body = response.body || "";
900
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
901
- }
902
- });
903
- });
904
- };
905
- DefaultApiResponseProcessor.prototype.deleteSegments = function (response) {
906
- return __awaiter(this, void 0, void 0, function () {
907
- var contentType, body_18, _a, _b, _c, _d, body_19, _e, _f, _g, _h, body_20, _j, _k, _l, _m, body_21, _o, _p, _q, _r, body;
908
- return __generator(this, function (_s) {
909
- switch (_s.label) {
910
- case 0:
911
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
912
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
913
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
914
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
915
- return [4, response.body.text()];
916
- case 1:
917
- body_18 = _b.apply(_a, [_d.apply(_c, [_s.sent(), contentType]), "InlineResponse2003", ""]);
918
- return [2, body_18];
919
- case 2:
920
- if (!util_1.isCodeInRange("404", response.httpStatusCode)) return [3, 4];
921
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
922
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
923
- return [4, response.body.text()];
924
- case 3:
925
- body_19 = _f.apply(_e, [_h.apply(_g, [_s.sent(), contentType]), "InlineResponse2003", ""]);
926
- throw new exception_1.ApiException(404, body_19);
927
- case 4:
928
- if (!util_1.isCodeInRange("400", response.httpStatusCode)) return [3, 6];
929
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
930
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
931
- return [4, response.body.text()];
932
- case 5:
933
- body_20 = _k.apply(_j, [_m.apply(_l, [_s.sent(), contentType]), "InlineResponse4002", ""]);
934
- throw new exception_1.ApiException(400, body_20);
935
- case 6:
936
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
937
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
938
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
939
- return [4, response.body.text()];
940
- case 7:
941
- body_21 = _p.apply(_o, [_r.apply(_q, [_s.sent(), contentType]), "InlineResponse2003", ""]);
942
- return [2, body_21];
943
- case 8:
944
- body = response.body || "";
945
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
946
- }
947
- });
948
- });
949
- };
950
- DefaultApiResponseProcessor.prototype.exportPlayers = function (response) {
951
- return __awaiter(this, void 0, void 0, function () {
952
- var contentType, body_22, _a, _b, _c, _d, body_23, _e, _f, _g, _h, body_24, _j, _k, _l, _m, body;
953
- return __generator(this, function (_o) {
954
- switch (_o.label) {
955
- case 0:
956
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
957
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
958
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
959
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
960
- return [4, response.body.text()];
961
- case 1:
962
- body_22 = _b.apply(_a, [_d.apply(_c, [_o.sent(), contentType]), "InlineResponse2005", ""]);
963
- return [2, body_22];
964
- case 2:
965
- if (!util_1.isCodeInRange("400", response.httpStatusCode)) return [3, 4];
966
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
967
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
968
- return [4, response.body.text()];
969
- case 3:
970
- body_23 = _f.apply(_e, [_h.apply(_g, [_o.sent(), contentType]), "any", ""]);
971
- throw new exception_1.ApiException(400, body_23);
972
- case 4:
973
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
974
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
975
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
976
- return [4, response.body.text()];
977
- case 5:
978
- body_24 = _k.apply(_j, [_m.apply(_l, [_o.sent(), contentType]), "InlineResponse2005", ""]);
979
- return [2, body_24];
980
- case 6:
981
- body = response.body || "";
982
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
983
- }
984
- });
985
- });
986
- };
987
- DefaultApiResponseProcessor.prototype.getApp = function (response) {
988
- return __awaiter(this, void 0, void 0, function () {
989
- var contentType, body_25, _a, _b, _c, _d, body_26, _e, _f, _g, _h, body;
990
- return __generator(this, function (_j) {
991
- switch (_j.label) {
992
- case 0:
993
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
994
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
995
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
996
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
997
- return [4, response.body.text()];
998
- case 1:
999
- body_25 = _b.apply(_a, [_d.apply(_c, [_j.sent(), contentType]), "App", ""]);
1000
- return [2, body_25];
1001
- case 2:
1002
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
1003
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1004
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1005
- return [4, response.body.text()];
1006
- case 3:
1007
- body_26 = _f.apply(_e, [_h.apply(_g, [_j.sent(), contentType]), "App", ""]);
1008
- return [2, body_26];
1009
- case 4:
1010
- body = response.body || "";
1011
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
1012
- }
1013
- });
1014
- });
1015
- };
1016
- DefaultApiResponseProcessor.prototype.getApps = function (response) {
1017
- return __awaiter(this, void 0, void 0, function () {
1018
- var contentType, body_27, _a, _b, _c, _d, body_28, _e, _f, _g, _h, body;
1019
- return __generator(this, function (_j) {
1020
- switch (_j.label) {
1021
- case 0:
1022
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1023
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
1024
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1025
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1026
- return [4, response.body.text()];
1027
- case 1:
1028
- body_27 = _b.apply(_a, [_d.apply(_c, [_j.sent(), contentType]), "string", ""]);
1029
- return [2, body_27];
1030
- case 2:
1031
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
1032
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1033
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1034
- return [4, response.body.text()];
1035
- case 3:
1036
- body_28 = _f.apply(_e, [_h.apply(_g, [_j.sent(), contentType]), "string", ""]);
1037
- return [2, body_28];
1038
- case 4:
1039
- body = response.body || "";
1040
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
1041
- }
1042
- });
1043
- });
1044
- };
1045
- DefaultApiResponseProcessor.prototype.getNotification = function (response) {
1046
- return __awaiter(this, void 0, void 0, function () {
1047
- var contentType, body_29, _a, _b, _c, _d, body_30, _e, _f, _g, _h, body;
1048
- return __generator(this, function (_j) {
1049
- switch (_j.label) {
1050
- case 0:
1051
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1052
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
1053
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1054
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1055
- return [4, response.body.text()];
1056
- case 1:
1057
- body_29 = _b.apply(_a, [_d.apply(_c, [_j.sent(), contentType]), "Notification", ""]);
1058
- return [2, body_29];
1059
- case 2:
1060
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
1061
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1062
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1063
- return [4, response.body.text()];
1064
- case 3:
1065
- body_30 = _f.apply(_e, [_h.apply(_g, [_j.sent(), contentType]), "Notification", ""]);
1066
- return [2, body_30];
1067
- case 4:
1068
- body = response.body || "";
1069
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
1070
- }
1071
- });
1072
- });
1073
- };
1074
- DefaultApiResponseProcessor.prototype.getNotificationHistory = function (response) {
1075
- return __awaiter(this, void 0, void 0, function () {
1076
- var contentType, body_31, _a, _b, _c, _d, body_32, _e, _f, _g, _h, body_33, _j, _k, _l, _m, body;
1077
- return __generator(this, function (_o) {
1078
- switch (_o.label) {
1079
- case 0:
1080
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1081
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
1082
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1083
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1084
- return [4, response.body.text()];
1085
- case 1:
1086
- body_31 = _b.apply(_a, [_d.apply(_c, [_o.sent(), contentType]), "InlineResponse2002", ""]);
1087
- return [2, body_31];
1088
- case 2:
1089
- if (!util_1.isCodeInRange("400", response.httpStatusCode)) return [3, 4];
1090
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1091
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1092
- return [4, response.body.text()];
1093
- case 3:
1094
- body_32 = _f.apply(_e, [_h.apply(_g, [_o.sent(), contentType]), "InlineResponse4001", ""]);
1095
- throw new exception_1.ApiException(400, body_32);
1096
- case 4:
1097
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
1098
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1099
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
1100
- return [4, response.body.text()];
1101
- case 5:
1102
- body_33 = _k.apply(_j, [_m.apply(_l, [_o.sent(), contentType]), "InlineResponse2002", ""]);
1103
- return [2, body_33];
1104
- case 6:
1105
- body = response.body || "";
1106
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
1107
- }
1108
- });
1109
- });
1110
- };
1111
- DefaultApiResponseProcessor.prototype.getNotifications = function (response) {
1112
- return __awaiter(this, void 0, void 0, function () {
1113
- var contentType, body_34, _a, _b, _c, _d, body_35, _e, _f, _g, _h, body;
1114
- return __generator(this, function (_j) {
1115
- switch (_j.label) {
1116
- case 0:
1117
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1118
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
1119
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1120
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1121
- return [4, response.body.text()];
1122
- case 1:
1123
- body_34 = _b.apply(_a, [_d.apply(_c, [_j.sent(), contentType]), "NotificationSlice", ""]);
1124
- return [2, body_34];
1125
- case 2:
1126
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
1127
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1128
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1129
- return [4, response.body.text()];
1130
- case 3:
1131
- body_35 = _f.apply(_e, [_h.apply(_g, [_j.sent(), contentType]), "NotificationSlice", ""]);
1132
- return [2, body_35];
1133
- case 4:
1134
- body = response.body || "";
1135
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
1136
- }
1137
- });
1138
- });
1139
- };
1140
- DefaultApiResponseProcessor.prototype.getOutcomes = function (response) {
1141
- return __awaiter(this, void 0, void 0, function () {
1142
- var contentType, body_36, _a, _b, _c, _d, body_37, _e, _f, _g, _h, body;
1143
- return __generator(this, function (_j) {
1144
- switch (_j.label) {
1145
- case 0:
1146
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1147
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
1148
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1149
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1150
- return [4, response.body.text()];
1151
- case 1:
1152
- body_36 = _b.apply(_a, [_d.apply(_c, [_j.sent(), contentType]), "Array<OutcomeData>", ""]);
1153
- return [2, body_36];
1154
- case 2:
1155
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
1156
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1157
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1158
- return [4, response.body.text()];
1159
- case 3:
1160
- body_37 = _f.apply(_e, [_h.apply(_g, [_j.sent(), contentType]), "Array<OutcomeData>", ""]);
1161
- return [2, body_37];
1162
- case 4:
1163
- body = response.body || "";
1164
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
1165
- }
1166
- });
1167
- });
1168
- };
1169
- DefaultApiResponseProcessor.prototype.getPlayer = function (response) {
1170
- return __awaiter(this, void 0, void 0, function () {
1171
- var contentType, body_38, _a, _b, _c, _d, body_39, _e, _f, _g, _h, body;
1172
- return __generator(this, function (_j) {
1173
- switch (_j.label) {
1174
- case 0:
1175
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1176
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
1177
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1178
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1179
- return [4, response.body.text()];
1180
- case 1:
1181
- body_38 = _b.apply(_a, [_d.apply(_c, [_j.sent(), contentType]), "Player", ""]);
1182
- return [2, body_38];
1183
- case 2:
1184
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
1185
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1186
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1187
- return [4, response.body.text()];
1188
- case 3:
1189
- body_39 = _f.apply(_e, [_h.apply(_g, [_j.sent(), contentType]), "Player", ""]);
1190
- return [2, body_39];
1191
- case 4:
1192
- body = response.body || "";
1193
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
1194
- }
1195
- });
1196
- });
1197
- };
1198
- DefaultApiResponseProcessor.prototype.getPlayers = function (response) {
1199
- return __awaiter(this, void 0, void 0, function () {
1200
- var contentType, body_40, _a, _b, _c, _d, body_41, _e, _f, _g, _h, body;
1201
- return __generator(this, function (_j) {
1202
- switch (_j.label) {
1203
- case 0:
1204
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1205
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
1206
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1207
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1208
- return [4, response.body.text()];
1209
- case 1:
1210
- body_40 = _b.apply(_a, [_d.apply(_c, [_j.sent(), contentType]), "PlayerSlice", ""]);
1211
- return [2, body_40];
1212
- case 2:
1213
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
1214
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1215
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1216
- return [4, response.body.text()];
1217
- case 3:
1218
- body_41 = _f.apply(_e, [_h.apply(_g, [_j.sent(), contentType]), "PlayerSlice", ""]);
1219
- return [2, body_41];
1220
- case 4:
1221
- body = response.body || "";
1222
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
1223
- }
1224
- });
1225
- });
1226
- };
1227
- DefaultApiResponseProcessor.prototype.updateApp = function (response) {
1228
- return __awaiter(this, void 0, void 0, function () {
1229
- var contentType, body_42, _a, _b, _c, _d, body_43, _e, _f, _g, _h, body;
1230
- return __generator(this, function (_j) {
1231
- switch (_j.label) {
1232
- case 0:
1233
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1234
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
1235
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1236
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1237
- return [4, response.body.text()];
1238
- case 1:
1239
- body_42 = _b.apply(_a, [_d.apply(_c, [_j.sent(), contentType]), "App", ""]);
1240
- return [2, body_42];
1241
- case 2:
1242
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
1243
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1244
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1245
- return [4, response.body.text()];
1246
- case 3:
1247
- body_43 = _f.apply(_e, [_h.apply(_g, [_j.sent(), contentType]), "App", ""]);
1248
- return [2, body_43];
1249
- case 4:
1250
- body = response.body || "";
1251
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
1252
- }
1253
- });
1254
- });
1255
- };
1256
- DefaultApiResponseProcessor.prototype.updatePlayer = function (response) {
1257
- return __awaiter(this, void 0, void 0, function () {
1258
- var contentType, body_44, _a, _b, _c, _d, body_45, _e, _f, _g, _h, body;
1259
- return __generator(this, function (_j) {
1260
- switch (_j.label) {
1261
- case 0:
1262
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1263
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
1264
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1265
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1266
- return [4, response.body.text()];
1267
- case 1:
1268
- body_44 = _b.apply(_a, [_d.apply(_c, [_j.sent(), contentType]), "InlineResponse2001", ""]);
1269
- return [2, body_44];
1270
- case 2:
1271
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
1272
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1273
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1274
- return [4, response.body.text()];
1275
- case 3:
1276
- body_45 = _f.apply(_e, [_h.apply(_g, [_j.sent(), contentType]), "InlineResponse2001", ""]);
1277
- return [2, body_45];
1278
- case 4:
1279
- body = response.body || "";
1280
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
1281
- }
1282
- });
1283
- });
1284
- };
1285
- DefaultApiResponseProcessor.prototype.updatePlayerTags = function (response) {
1286
- return __awaiter(this, void 0, void 0, function () {
1287
- var contentType, body_46, _a, _b, _c, _d, body_47, _e, _f, _g, _h, body;
1288
- return __generator(this, function (_j) {
1289
- switch (_j.label) {
1290
- case 0:
1291
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1292
- if (!util_1.isCodeInRange("200", response.httpStatusCode)) return [3, 2];
1293
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1294
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1295
- return [4, response.body.text()];
1296
- case 1:
1297
- body_46 = _b.apply(_a, [_d.apply(_c, [_j.sent(), contentType]), "InlineResponse2003", ""]);
1298
- return [2, body_46];
1299
- case 2:
1300
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 4];
1301
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1302
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
1303
- return [4, response.body.text()];
1304
- case 3:
1305
- body_47 = _f.apply(_e, [_h.apply(_g, [_j.sent(), contentType]), "InlineResponse2003", ""]);
1306
- return [2, body_47];
1307
- case 4:
1308
- body = response.body || "";
1309
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
1310
- }
1311
- });
1312
- });
1313
- };
1314
- return DefaultApiResponseProcessor;
1315
- }());
1316
- exports.DefaultApiResponseProcessor = DefaultApiResponseProcessor;
1317
- //# sourceMappingURL=DefaultApi.js.map