@product-live/api-sdk 2.13.0 → 2.19.0

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 (192) hide show
  1. package/.openapi-generator/FILES +74 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/ItemApi.md +125 -0
  5. package/apis/ItemApi.ts +197 -0
  6. package/dist/apis/DataFactoryFileApi.d.ts +15 -15
  7. package/dist/apis/DataFactoryFileApi.js +358 -358
  8. package/dist/apis/DefaultApi.d.ts +11 -11
  9. package/dist/apis/DefaultApi.js +171 -171
  10. package/dist/apis/ItemApi.d.ts +13 -0
  11. package/dist/apis/ItemApi.js +249 -0
  12. package/dist/apis/ItemApi.js.map +1 -0
  13. package/dist/apis/JobApi.d.ts +21 -21
  14. package/dist/apis/JobApi.js +546 -546
  15. package/dist/apis/JobExecutionApi.d.ts +16 -16
  16. package/dist/apis/JobExecutionApi.js +338 -338
  17. package/dist/apis/TaskApi.d.ts +24 -24
  18. package/dist/apis/TaskApi.js +608 -608
  19. package/dist/apis/TaskExecutionApi.d.ts +13 -13
  20. package/dist/apis/TaskExecutionApi.js +258 -258
  21. package/dist/apis/VariableApi.d.ts +22 -22
  22. package/dist/apis/VariableApi.js +528 -528
  23. package/dist/apis/baseapi.d.ts +18 -18
  24. package/dist/apis/baseapi.js +45 -45
  25. package/dist/apis/exception.d.ts +10 -10
  26. package/dist/apis/exception.js +31 -31
  27. package/dist/auth/auth.d.ts +42 -42
  28. package/dist/auth/auth.js +44 -44
  29. package/dist/configuration.d.ts +18 -18
  30. package/dist/configuration.js +21 -21
  31. package/dist/http/http.d.ts +82 -82
  32. package/dist/http/http.js +228 -228
  33. package/dist/http/isomorphic-fetch.d.ts +5 -5
  34. package/dist/http/isomorphic-fetch.js +33 -33
  35. package/dist/index.d.ts +10 -10
  36. package/dist/index.js +35 -34
  37. package/dist/index.js.map +1 -1
  38. package/dist/middleware.d.ts +16 -16
  39. package/dist/middleware.js +17 -17
  40. package/dist/models/CreateJobDto.d.ts +30 -30
  41. package/dist/models/CreateJobDto.js +81 -81
  42. package/dist/models/CreateJobExecutionDto.d.ts +21 -21
  43. package/dist/models/CreateJobExecutionDto.js +33 -33
  44. package/dist/models/CreateTaskDto.d.ts +21 -21
  45. package/dist/models/CreateTaskDto.js +45 -45
  46. package/dist/models/CreateVariableDto.d.ts +22 -22
  47. package/dist/models/CreateVariableDto.js +45 -45
  48. package/dist/models/FileDto.d.ts +23 -23
  49. package/dist/models/FileDto.js +51 -51
  50. package/dist/models/FindVariablesRequest.d.ts +23 -24
  51. package/dist/models/FindVariablesRequest.js +45 -45
  52. package/dist/models/FindVariablesRequest.js.map +1 -1
  53. package/dist/models/GetFiles200Response.d.ts +21 -21
  54. package/dist/models/GetFiles200Response.js +33 -33
  55. package/dist/models/GetItems200Response.d.ts +21 -0
  56. package/dist/models/GetItems200Response.js +34 -0
  57. package/dist/models/GetItems200Response.js.map +1 -0
  58. package/dist/models/GetJobExecutionById400Response.d.ts +17 -17
  59. package/dist/models/GetJobExecutionById400Response.js +21 -21
  60. package/dist/models/GetJobExecutions200Response.d.ts +21 -21
  61. package/dist/models/GetJobExecutions200Response.js +33 -33
  62. package/dist/models/GetJobs200Response.d.ts +21 -21
  63. package/dist/models/GetJobs200Response.js +33 -33
  64. package/dist/models/GetTasks200Response.d.ts +21 -21
  65. package/dist/models/GetTasks200Response.js +33 -33
  66. package/dist/models/GetVariables200Response.d.ts +21 -21
  67. package/dist/models/GetVariables200Response.js +33 -33
  68. package/dist/models/HighOrderQuery.d.ts +19 -20
  69. package/dist/models/HighOrderQuery.js +27 -27
  70. package/dist/models/HighOrderQuery.js.map +1 -1
  71. package/dist/models/ItemDto.d.ts +28 -0
  72. package/dist/models/ItemDto.js +64 -0
  73. package/dist/models/ItemDto.js.map +1 -0
  74. package/dist/models/{Query.d.ts → ItemFieldDTO.d.ts} +19 -18
  75. package/dist/models/ItemFieldDTO.js +34 -0
  76. package/dist/models/ItemFieldDTO.js.map +1 -0
  77. package/dist/models/ItemFieldFile.d.ts +18 -0
  78. package/dist/models/ItemFieldFile.js +22 -0
  79. package/dist/models/ItemFieldFile.js.map +1 -0
  80. package/dist/models/ItemFieldFileData.d.ts +18 -0
  81. package/dist/models/ItemFieldFileData.js +28 -0
  82. package/dist/models/ItemFieldFileData.js.map +1 -0
  83. package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantity.d.ts +18 -0
  84. package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantity.js +22 -0
  85. package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantity.js.map +1 -0
  86. package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantityData.d.ts +19 -0
  87. package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantityData.js +34 -0
  88. package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantityData.js.map +1 -0
  89. package/dist/models/ItemFieldSimpleNumber.d.ts +18 -0
  90. package/dist/models/ItemFieldSimpleNumber.js +28 -0
  91. package/dist/models/ItemFieldSimpleNumber.js.map +1 -0
  92. package/dist/models/ItemFieldSimpleString.d.ts +17 -0
  93. package/dist/models/ItemFieldSimpleString.js +22 -0
  94. package/dist/models/ItemFieldSimpleString.js.map +1 -0
  95. package/dist/models/ItemFieldSimpleStringArray.d.ts +17 -0
  96. package/dist/models/ItemFieldSimpleStringArray.js +22 -0
  97. package/dist/models/ItemFieldSimpleStringArray.js.map +1 -0
  98. package/dist/models/ItemMetadataDTO.d.ts +23 -0
  99. package/dist/models/ItemMetadataDTO.js +58 -0
  100. package/dist/models/ItemMetadataDTO.js.map +1 -0
  101. package/dist/models/JobDto.d.ts +35 -35
  102. package/dist/models/JobDto.js +105 -105
  103. package/dist/models/JobExecutionDto.d.ts +33 -33
  104. package/dist/models/JobExecutionDto.js +87 -87
  105. package/dist/models/LowOrderQuery.d.ts +22 -22
  106. package/dist/models/LowOrderQuery.js +39 -39
  107. package/dist/models/LowOrderQueryValue.d.ts +16 -16
  108. package/dist/models/LowOrderQueryValue.js +14 -14
  109. package/dist/models/ObjectSerializer.d.ts +45 -34
  110. package/dist/models/ObjectSerializer.js +346 -312
  111. package/dist/models/ObjectSerializer.js.map +1 -1
  112. package/dist/models/PatchTaskExecutionDto.d.ts +22 -22
  113. package/dist/models/PatchTaskExecutionDto.js +33 -33
  114. package/dist/models/Query1.d.ts +23 -0
  115. package/dist/models/Query1.js +46 -0
  116. package/dist/models/Query1.js.map +1 -0
  117. package/dist/models/TaskDto.d.ts +26 -26
  118. package/dist/models/TaskDto.js +69 -69
  119. package/dist/models/TaskExecutionDto.d.ts +30 -30
  120. package/dist/models/TaskExecutionDto.js +63 -63
  121. package/dist/models/UpdateJobDto.d.ts +31 -31
  122. package/dist/models/UpdateJobDto.js +87 -87
  123. package/dist/models/UpdateTaskDto.d.ts +22 -22
  124. package/dist/models/UpdateTaskDto.js +51 -51
  125. package/dist/models/UpdateVariableDto.d.ts +23 -23
  126. package/dist/models/UpdateVariableDto.js +51 -51
  127. package/dist/models/VariableDto.d.ts +27 -27
  128. package/dist/models/VariableDto.js +69 -69
  129. package/dist/models/all.d.ts +36 -25
  130. package/dist/models/all.js +52 -41
  131. package/dist/models/all.js.map +1 -1
  132. package/dist/rxjsStub.d.ts +10 -10
  133. package/dist/rxjsStub.js +32 -32
  134. package/dist/servers.d.ts +17 -17
  135. package/dist/servers.js +31 -31
  136. package/dist/types/ObjectParamAPI.d.ts +187 -171
  137. package/dist/types/ObjectParamAPI.js +159 -144
  138. package/dist/types/ObjectParamAPI.js.map +1 -1
  139. package/dist/types/ObservableAPI.d.ts +109 -98
  140. package/dist/types/ObservableAPI.js +757 -699
  141. package/dist/types/ObservableAPI.js.map +1 -1
  142. package/dist/types/PromiseAPI.d.ts +92 -83
  143. package/dist/types/PromiseAPI.js +179 -163
  144. package/dist/types/PromiseAPI.js.map +1 -1
  145. package/dist/util.d.ts +2 -2
  146. package/dist/util.js +28 -28
  147. package/index.ts +1 -1
  148. package/models/CreateJobDto.ts +1 -1
  149. package/models/CreateJobExecutionDto.ts +1 -1
  150. package/models/CreateTaskDto.ts +1 -1
  151. package/models/CreateVariableDto.ts +1 -1
  152. package/models/FileDto.ts +1 -1
  153. package/models/FindVariablesRequest.ts +10 -12
  154. package/models/GetFiles200Response.ts +1 -1
  155. package/models/GetItems200Response.ts +53 -0
  156. package/models/GetJobExecutionById400Response.ts +1 -1
  157. package/models/GetJobExecutions200Response.ts +1 -1
  158. package/models/GetJobs200Response.ts +1 -1
  159. package/models/GetTasks200Response.ts +1 -1
  160. package/models/GetVariables200Response.ts +1 -1
  161. package/models/HighOrderQuery.ts +3 -4
  162. package/models/ItemDto.ts +86 -0
  163. package/models/ItemFieldDTO.ts +49 -0
  164. package/models/{Query.ts → ItemFieldFile.ts} +8 -10
  165. package/models/ItemFieldFileData.ts +42 -0
  166. package/models/ItemFieldMultipleSelectWithCommentAndQuantity.ts +36 -0
  167. package/models/ItemFieldMultipleSelectWithCommentAndQuantityData.ts +49 -0
  168. package/models/ItemFieldSimpleNumber.ts +42 -0
  169. package/models/ItemFieldSimpleString.ts +35 -0
  170. package/models/ItemFieldSimpleStringArray.ts +35 -0
  171. package/models/ItemMetadataDTO.ts +77 -0
  172. package/models/JobDto.ts +1 -1
  173. package/models/JobExecutionDto.ts +1 -1
  174. package/models/LowOrderQuery.ts +2 -2
  175. package/models/LowOrderQueryValue.ts +1 -1
  176. package/models/ObjectSerializer.ts +39 -5
  177. package/models/PatchTaskExecutionDto.ts +1 -1
  178. package/models/Query1.ts +69 -0
  179. package/models/TaskDto.ts +1 -1
  180. package/models/TaskExecutionDto.ts +1 -1
  181. package/models/UpdateJobDto.ts +1 -1
  182. package/models/UpdateTaskDto.ts +1 -1
  183. package/models/UpdateVariableDto.ts +1 -1
  184. package/models/VariableDto.ts +1 -1
  185. package/models/all.ts +12 -1
  186. package/package.json +2 -2
  187. package/tsconfig.json +28 -0
  188. package/types/ObjectParamAPI.ts +64 -1
  189. package/types/ObservableAPI.ts +77 -1
  190. package/types/PromiseAPI.ts +50 -1
  191. package/dist/models/Query.js +0 -22
  192. package/dist/models/Query.js.map +0 -1
@@ -1,609 +1,609 @@
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.TaskApiResponseProcessor = exports.TaskApiRequestFactory = 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 TaskApiRequestFactory = (function (_super) {
61
- __extends(TaskApiRequestFactory, _super);
62
- function TaskApiRequestFactory() {
63
- return _super !== null && _super.apply(this, arguments) || this;
64
- }
65
- TaskApiRequestFactory.prototype.createTask = function (createTaskDto, _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 (createTaskDto === null || createTaskDto === undefined) {
74
- throw new baseapi_1.RequiredError("TaskApi", "createTask", "createTaskDto");
75
- }
76
- localVarPath = '/v1/data_factory/tasks';
77
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
78
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
79
- contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
80
- "application/json"
81
- ]);
82
- requestContext.setHeaderParam("Content-Type", contentType);
83
- serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(createTaskDto, "CreateTaskDto", ""), contentType);
84
- requestContext.setBody(serializedBody);
85
- authMethod = _config.authMethods["ApiKeyAuthQuery"];
86
- if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
87
- return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
88
- case 1:
89
- _d.sent();
90
- _d.label = 2;
91
- case 2:
92
- authMethod = _config.authMethods["ApiKeyAuthHeader"];
93
- if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 4];
94
- return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
95
- case 3:
96
- _d.sent();
97
- _d.label = 4;
98
- case 4:
99
- 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);
100
- if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 6];
101
- return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
102
- case 5:
103
- _d.sent();
104
- _d.label = 6;
105
- case 6: return [2, requestContext];
106
- }
107
- });
108
- });
109
- };
110
- TaskApiRequestFactory.prototype.deleteTask = function (id, _options) {
111
- var _a, _b, _c;
112
- return __awaiter(this, void 0, void 0, function () {
113
- var _config, localVarPath, requestContext, authMethod, defaultAuth;
114
- return __generator(this, function (_d) {
115
- switch (_d.label) {
116
- case 0:
117
- _config = _options || this.configuration;
118
- if (id === null || id === undefined) {
119
- throw new baseapi_1.RequiredError("TaskApi", "deleteTask", "id");
120
- }
121
- localVarPath = '/v1/data_factory/tasks/{id}'
122
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
123
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
124
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
125
- authMethod = _config.authMethods["ApiKeyAuthQuery"];
126
- if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
127
- return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
128
- case 1:
129
- _d.sent();
130
- _d.label = 2;
131
- case 2:
132
- authMethod = _config.authMethods["ApiKeyAuthHeader"];
133
- if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 4];
134
- return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
135
- case 3:
136
- _d.sent();
137
- _d.label = 4;
138
- case 4:
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, 6];
141
- return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
142
- case 5:
143
- _d.sent();
144
- _d.label = 6;
145
- case 6: return [2, requestContext];
146
- }
147
- });
148
- });
149
- };
150
- TaskApiRequestFactory.prototype.getTaskById = function (id, _options) {
151
- var _a, _b, _c;
152
- return __awaiter(this, void 0, void 0, function () {
153
- var _config, localVarPath, requestContext, authMethod, defaultAuth;
154
- return __generator(this, function (_d) {
155
- switch (_d.label) {
156
- case 0:
157
- _config = _options || this.configuration;
158
- if (id === null || id === undefined) {
159
- throw new baseapi_1.RequiredError("TaskApi", "getTaskById", "id");
160
- }
161
- localVarPath = '/v1/data_factory/tasks/{id}'
162
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
163
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
164
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
165
- authMethod = _config.authMethods["ApiKeyAuthQuery"];
166
- if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
167
- return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
168
- case 1:
169
- _d.sent();
170
- _d.label = 2;
171
- case 2:
172
- authMethod = _config.authMethods["ApiKeyAuthHeader"];
173
- if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 4];
174
- return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
175
- case 3:
176
- _d.sent();
177
- _d.label = 4;
178
- case 4:
179
- 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);
180
- if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 6];
181
- return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
182
- case 5:
183
- _d.sent();
184
- _d.label = 6;
185
- case 6: return [2, requestContext];
186
- }
187
- });
188
- });
189
- };
190
- TaskApiRequestFactory.prototype.getTasks = function (size, page, _options) {
191
- var _a, _b, _c;
192
- return __awaiter(this, void 0, void 0, function () {
193
- var _config, localVarPath, requestContext, authMethod, defaultAuth;
194
- return __generator(this, function (_d) {
195
- switch (_d.label) {
196
- case 0:
197
- _config = _options || this.configuration;
198
- localVarPath = '/v1/data_factory/tasks';
199
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
200
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
201
- if (size !== undefined) {
202
- requestContext.setQueryParam("size", ObjectSerializer_1.ObjectSerializer.serialize(size, "number", ""));
203
- }
204
- if (page !== undefined) {
205
- requestContext.setQueryParam("page", ObjectSerializer_1.ObjectSerializer.serialize(page, "number", ""));
206
- }
207
- authMethod = _config.authMethods["ApiKeyAuthQuery"];
208
- if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
209
- return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
210
- case 1:
211
- _d.sent();
212
- _d.label = 2;
213
- case 2:
214
- authMethod = _config.authMethods["ApiKeyAuthHeader"];
215
- if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 4];
216
- return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
217
- case 3:
218
- _d.sent();
219
- _d.label = 4;
220
- case 4:
221
- 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);
222
- if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 6];
223
- return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
224
- case 5:
225
- _d.sent();
226
- _d.label = 6;
227
- case 6: return [2, requestContext];
228
- }
229
- });
230
- });
231
- };
232
- TaskApiRequestFactory.prototype.pollTaskExecution = function (id, _options) {
233
- var _a, _b, _c;
234
- return __awaiter(this, void 0, void 0, function () {
235
- var _config, localVarPath, requestContext, authMethod, defaultAuth;
236
- return __generator(this, function (_d) {
237
- switch (_d.label) {
238
- case 0:
239
- _config = _options || this.configuration;
240
- if (id === null || id === undefined) {
241
- throw new baseapi_1.RequiredError("TaskApi", "pollTaskExecution", "id");
242
- }
243
- localVarPath = '/v1/data_factory/tasks/{id}/poll'
244
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
245
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
246
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
247
- authMethod = _config.authMethods["ApiKeyAuthQuery"];
248
- if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
249
- return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
250
- case 1:
251
- _d.sent();
252
- _d.label = 2;
253
- case 2:
254
- authMethod = _config.authMethods["ApiKeyAuthHeader"];
255
- if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 4];
256
- return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
257
- case 3:
258
- _d.sent();
259
- _d.label = 4;
260
- case 4:
261
- 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);
262
- if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 6];
263
- return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
264
- case 5:
265
- _d.sent();
266
- _d.label = 6;
267
- case 6: return [2, requestContext];
268
- }
269
- });
270
- });
271
- };
272
- TaskApiRequestFactory.prototype.updateTask = function (id, updateTaskDto, _options) {
273
- var _a, _b, _c;
274
- return __awaiter(this, void 0, void 0, function () {
275
- var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
276
- return __generator(this, function (_d) {
277
- switch (_d.label) {
278
- case 0:
279
- _config = _options || this.configuration;
280
- if (id === null || id === undefined) {
281
- throw new baseapi_1.RequiredError("TaskApi", "updateTask", "id");
282
- }
283
- if (updateTaskDto === null || updateTaskDto === undefined) {
284
- throw new baseapi_1.RequiredError("TaskApi", "updateTask", "updateTaskDto");
285
- }
286
- localVarPath = '/v1/data_factory/tasks/{id}'
287
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
288
- requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
289
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
290
- contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
291
- "application/json"
292
- ]);
293
- requestContext.setHeaderParam("Content-Type", contentType);
294
- serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(updateTaskDto, "UpdateTaskDto", ""), contentType);
295
- requestContext.setBody(serializedBody);
296
- authMethod = _config.authMethods["ApiKeyAuthQuery"];
297
- if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
298
- return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
299
- case 1:
300
- _d.sent();
301
- _d.label = 2;
302
- case 2:
303
- authMethod = _config.authMethods["ApiKeyAuthHeader"];
304
- if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 4];
305
- return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
306
- case 3:
307
- _d.sent();
308
- _d.label = 4;
309
- case 4:
310
- 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);
311
- if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 6];
312
- return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
313
- case 5:
314
- _d.sent();
315
- _d.label = 6;
316
- case 6: return [2, requestContext];
317
- }
318
- });
319
- });
320
- };
321
- return TaskApiRequestFactory;
322
- }(baseapi_1.BaseAPIRequestFactory));
323
- exports.TaskApiRequestFactory = TaskApiRequestFactory;
324
- var TaskApiResponseProcessor = (function () {
325
- function TaskApiResponseProcessor() {
326
- }
327
- TaskApiResponseProcessor.prototype.createTask = function (response) {
328
- return __awaiter(this, void 0, void 0, function () {
329
- var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
330
- return __generator(this, function (_q) {
331
- switch (_q.label) {
332
- case 0:
333
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
334
- if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
335
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
336
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
337
- return [4, response.body.text()];
338
- case 1:
339
- body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
340
- "TaskDto", ""]);
341
- return [2, body];
342
- case 2:
343
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
344
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
345
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
346
- return [4, response.body.text()];
347
- case 3:
348
- body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
349
- "GetJobExecutionById400Response", ""]);
350
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
351
- case 4:
352
- if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
353
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
354
- }
355
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
356
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
357
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
358
- return [4, response.body.text()];
359
- case 5:
360
- body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
361
- "TaskDto", ""]);
362
- return [2, body];
363
- case 6:
364
- _o = exception_1.ApiException.bind;
365
- _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
366
- return [4, response.getBodyAsAny()];
367
- case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
368
- }
369
- });
370
- });
371
- };
372
- TaskApiResponseProcessor.prototype.deleteTask = function (response) {
373
- return __awaiter(this, void 0, void 0, function () {
374
- var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
375
- return __generator(this, function (_q) {
376
- switch (_q.label) {
377
- case 0:
378
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
379
- if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
380
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
381
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
382
- return [4, response.body.text()];
383
- case 1:
384
- body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
385
- "TaskDto", ""]);
386
- return [2, body];
387
- case 2:
388
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
389
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
390
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
391
- return [4, response.body.text()];
392
- case 3:
393
- body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
394
- "GetJobExecutionById400Response", ""]);
395
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
396
- case 4:
397
- if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
398
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
399
- }
400
- if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
401
- throw new exception_1.ApiException(response.httpStatusCode, "Not found", undefined, response.headers);
402
- }
403
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
404
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
405
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
406
- return [4, response.body.text()];
407
- case 5:
408
- body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
409
- "TaskDto", ""]);
410
- return [2, body];
411
- case 6:
412
- _o = exception_1.ApiException.bind;
413
- _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
414
- return [4, response.getBodyAsAny()];
415
- case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
416
- }
417
- });
418
- });
419
- };
420
- TaskApiResponseProcessor.prototype.getTaskById = function (response) {
421
- return __awaiter(this, void 0, void 0, function () {
422
- var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
423
- return __generator(this, function (_q) {
424
- switch (_q.label) {
425
- case 0:
426
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
427
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
428
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
429
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
430
- return [4, response.body.text()];
431
- case 1:
432
- body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
433
- "TaskDto", ""]);
434
- return [2, body];
435
- case 2:
436
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
437
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
438
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
439
- return [4, response.body.text()];
440
- case 3:
441
- body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
442
- "GetJobExecutionById400Response", ""]);
443
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
444
- case 4:
445
- if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
446
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
447
- }
448
- if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
449
- throw new exception_1.ApiException(response.httpStatusCode, "Not found", undefined, response.headers);
450
- }
451
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
452
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
453
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
454
- return [4, response.body.text()];
455
- case 5:
456
- body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
457
- "TaskDto", ""]);
458
- return [2, body];
459
- case 6:
460
- _o = exception_1.ApiException.bind;
461
- _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
462
- return [4, response.getBodyAsAny()];
463
- case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
464
- }
465
- });
466
- });
467
- };
468
- TaskApiResponseProcessor.prototype.getTasks = function (response) {
469
- return __awaiter(this, void 0, void 0, function () {
470
- var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
471
- return __generator(this, function (_q) {
472
- switch (_q.label) {
473
- case 0:
474
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
475
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
476
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
477
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
478
- return [4, response.body.text()];
479
- case 1:
480
- body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
481
- "GetTasks200Response", ""]);
482
- return [2, body];
483
- case 2:
484
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
485
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
486
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
487
- return [4, response.body.text()];
488
- case 3:
489
- body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
490
- "GetJobExecutionById400Response", ""]);
491
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
492
- case 4:
493
- if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
494
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
495
- }
496
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
497
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
498
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
499
- return [4, response.body.text()];
500
- case 5:
501
- body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
502
- "GetTasks200Response", ""]);
503
- return [2, body];
504
- case 6:
505
- _o = exception_1.ApiException.bind;
506
- _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
507
- return [4, response.getBodyAsAny()];
508
- case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
509
- }
510
- });
511
- });
512
- };
513
- TaskApiResponseProcessor.prototype.pollTaskExecution = function (response) {
514
- return __awaiter(this, void 0, void 0, function () {
515
- var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
516
- return __generator(this, function (_q) {
517
- switch (_q.label) {
518
- case 0:
519
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
520
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
521
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
522
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
523
- return [4, response.body.text()];
524
- case 1:
525
- body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
526
- "TaskExecutionDto", ""]);
527
- return [2, body];
528
- case 2:
529
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
530
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
531
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
532
- return [4, response.body.text()];
533
- case 3:
534
- body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
535
- "GetJobExecutionById400Response", ""]);
536
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
537
- case 4:
538
- if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
539
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
540
- }
541
- if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
542
- throw new exception_1.ApiException(response.httpStatusCode, "Not found", undefined, response.headers);
543
- }
544
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
545
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
546
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
547
- return [4, response.body.text()];
548
- case 5:
549
- body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
550
- "TaskExecutionDto", ""]);
551
- return [2, body];
552
- case 6:
553
- _o = exception_1.ApiException.bind;
554
- _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
555
- return [4, response.getBodyAsAny()];
556
- case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
557
- }
558
- });
559
- });
560
- };
561
- TaskApiResponseProcessor.prototype.updateTask = function (response) {
562
- return __awaiter(this, void 0, void 0, function () {
563
- var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
564
- return __generator(this, function (_q) {
565
- switch (_q.label) {
566
- case 0:
567
- contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
568
- if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
569
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
570
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
571
- return [4, response.body.text()];
572
- case 1:
573
- body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
574
- "TaskDto", ""]);
575
- return [2, body];
576
- case 2:
577
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
578
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
579
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
580
- return [4, response.body.text()];
581
- case 3:
582
- body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
583
- "GetJobExecutionById400Response", ""]);
584
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
585
- case 4:
586
- if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
587
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
588
- }
589
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
590
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
591
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
592
- return [4, response.body.text()];
593
- case 5:
594
- body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
595
- "TaskDto", ""]);
596
- return [2, body];
597
- case 6:
598
- _o = exception_1.ApiException.bind;
599
- _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
600
- return [4, response.getBodyAsAny()];
601
- case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
602
- }
603
- });
604
- });
605
- };
606
- return TaskApiResponseProcessor;
607
- }());
608
- exports.TaskApiResponseProcessor = TaskApiResponseProcessor;
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.TaskApiResponseProcessor = exports.TaskApiRequestFactory = 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 TaskApiRequestFactory = (function (_super) {
61
+ __extends(TaskApiRequestFactory, _super);
62
+ function TaskApiRequestFactory() {
63
+ return _super !== null && _super.apply(this, arguments) || this;
64
+ }
65
+ TaskApiRequestFactory.prototype.createTask = function (createTaskDto, _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 (createTaskDto === null || createTaskDto === undefined) {
74
+ throw new baseapi_1.RequiredError("TaskApi", "createTask", "createTaskDto");
75
+ }
76
+ localVarPath = '/v1/data_factory/tasks';
77
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
78
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
79
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
80
+ "application/json"
81
+ ]);
82
+ requestContext.setHeaderParam("Content-Type", contentType);
83
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(createTaskDto, "CreateTaskDto", ""), contentType);
84
+ requestContext.setBody(serializedBody);
85
+ authMethod = _config.authMethods["ApiKeyAuthQuery"];
86
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
87
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
88
+ case 1:
89
+ _d.sent();
90
+ _d.label = 2;
91
+ case 2:
92
+ authMethod = _config.authMethods["ApiKeyAuthHeader"];
93
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 4];
94
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
95
+ case 3:
96
+ _d.sent();
97
+ _d.label = 4;
98
+ case 4:
99
+ 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);
100
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 6];
101
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
102
+ case 5:
103
+ _d.sent();
104
+ _d.label = 6;
105
+ case 6: return [2, requestContext];
106
+ }
107
+ });
108
+ });
109
+ };
110
+ TaskApiRequestFactory.prototype.deleteTask = function (id, _options) {
111
+ var _a, _b, _c;
112
+ return __awaiter(this, void 0, void 0, function () {
113
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
114
+ return __generator(this, function (_d) {
115
+ switch (_d.label) {
116
+ case 0:
117
+ _config = _options || this.configuration;
118
+ if (id === null || id === undefined) {
119
+ throw new baseapi_1.RequiredError("TaskApi", "deleteTask", "id");
120
+ }
121
+ localVarPath = '/v1/data_factory/tasks/{id}'
122
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
123
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
124
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
125
+ authMethod = _config.authMethods["ApiKeyAuthQuery"];
126
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
127
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
128
+ case 1:
129
+ _d.sent();
130
+ _d.label = 2;
131
+ case 2:
132
+ authMethod = _config.authMethods["ApiKeyAuthHeader"];
133
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 4];
134
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
135
+ case 3:
136
+ _d.sent();
137
+ _d.label = 4;
138
+ case 4:
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, 6];
141
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
142
+ case 5:
143
+ _d.sent();
144
+ _d.label = 6;
145
+ case 6: return [2, requestContext];
146
+ }
147
+ });
148
+ });
149
+ };
150
+ TaskApiRequestFactory.prototype.getTaskById = function (id, _options) {
151
+ var _a, _b, _c;
152
+ return __awaiter(this, void 0, void 0, function () {
153
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
154
+ return __generator(this, function (_d) {
155
+ switch (_d.label) {
156
+ case 0:
157
+ _config = _options || this.configuration;
158
+ if (id === null || id === undefined) {
159
+ throw new baseapi_1.RequiredError("TaskApi", "getTaskById", "id");
160
+ }
161
+ localVarPath = '/v1/data_factory/tasks/{id}'
162
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
163
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
164
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
165
+ authMethod = _config.authMethods["ApiKeyAuthQuery"];
166
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
167
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
168
+ case 1:
169
+ _d.sent();
170
+ _d.label = 2;
171
+ case 2:
172
+ authMethod = _config.authMethods["ApiKeyAuthHeader"];
173
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 4];
174
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
175
+ case 3:
176
+ _d.sent();
177
+ _d.label = 4;
178
+ case 4:
179
+ 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);
180
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 6];
181
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
182
+ case 5:
183
+ _d.sent();
184
+ _d.label = 6;
185
+ case 6: return [2, requestContext];
186
+ }
187
+ });
188
+ });
189
+ };
190
+ TaskApiRequestFactory.prototype.getTasks = function (size, page, _options) {
191
+ var _a, _b, _c;
192
+ return __awaiter(this, void 0, void 0, function () {
193
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
194
+ return __generator(this, function (_d) {
195
+ switch (_d.label) {
196
+ case 0:
197
+ _config = _options || this.configuration;
198
+ localVarPath = '/v1/data_factory/tasks';
199
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
200
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
201
+ if (size !== undefined) {
202
+ requestContext.setQueryParam("size", ObjectSerializer_1.ObjectSerializer.serialize(size, "number", ""));
203
+ }
204
+ if (page !== undefined) {
205
+ requestContext.setQueryParam("page", ObjectSerializer_1.ObjectSerializer.serialize(page, "number", ""));
206
+ }
207
+ authMethod = _config.authMethods["ApiKeyAuthQuery"];
208
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
209
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
210
+ case 1:
211
+ _d.sent();
212
+ _d.label = 2;
213
+ case 2:
214
+ authMethod = _config.authMethods["ApiKeyAuthHeader"];
215
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 4];
216
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
217
+ case 3:
218
+ _d.sent();
219
+ _d.label = 4;
220
+ case 4:
221
+ 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);
222
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 6];
223
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
224
+ case 5:
225
+ _d.sent();
226
+ _d.label = 6;
227
+ case 6: return [2, requestContext];
228
+ }
229
+ });
230
+ });
231
+ };
232
+ TaskApiRequestFactory.prototype.pollTaskExecution = function (id, _options) {
233
+ var _a, _b, _c;
234
+ return __awaiter(this, void 0, void 0, function () {
235
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
236
+ return __generator(this, function (_d) {
237
+ switch (_d.label) {
238
+ case 0:
239
+ _config = _options || this.configuration;
240
+ if (id === null || id === undefined) {
241
+ throw new baseapi_1.RequiredError("TaskApi", "pollTaskExecution", "id");
242
+ }
243
+ localVarPath = '/v1/data_factory/tasks/{id}/poll'
244
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
245
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
246
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
247
+ authMethod = _config.authMethods["ApiKeyAuthQuery"];
248
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
249
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
250
+ case 1:
251
+ _d.sent();
252
+ _d.label = 2;
253
+ case 2:
254
+ authMethod = _config.authMethods["ApiKeyAuthHeader"];
255
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 4];
256
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
257
+ case 3:
258
+ _d.sent();
259
+ _d.label = 4;
260
+ case 4:
261
+ 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);
262
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 6];
263
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
264
+ case 5:
265
+ _d.sent();
266
+ _d.label = 6;
267
+ case 6: return [2, requestContext];
268
+ }
269
+ });
270
+ });
271
+ };
272
+ TaskApiRequestFactory.prototype.updateTask = function (id, updateTaskDto, _options) {
273
+ var _a, _b, _c;
274
+ return __awaiter(this, void 0, void 0, function () {
275
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
276
+ return __generator(this, function (_d) {
277
+ switch (_d.label) {
278
+ case 0:
279
+ _config = _options || this.configuration;
280
+ if (id === null || id === undefined) {
281
+ throw new baseapi_1.RequiredError("TaskApi", "updateTask", "id");
282
+ }
283
+ if (updateTaskDto === null || updateTaskDto === undefined) {
284
+ throw new baseapi_1.RequiredError("TaskApi", "updateTask", "updateTaskDto");
285
+ }
286
+ localVarPath = '/v1/data_factory/tasks/{id}'
287
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
288
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
289
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
290
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
291
+ "application/json"
292
+ ]);
293
+ requestContext.setHeaderParam("Content-Type", contentType);
294
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(updateTaskDto, "UpdateTaskDto", ""), contentType);
295
+ requestContext.setBody(serializedBody);
296
+ authMethod = _config.authMethods["ApiKeyAuthQuery"];
297
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
298
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
299
+ case 1:
300
+ _d.sent();
301
+ _d.label = 2;
302
+ case 2:
303
+ authMethod = _config.authMethods["ApiKeyAuthHeader"];
304
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 4];
305
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
306
+ case 3:
307
+ _d.sent();
308
+ _d.label = 4;
309
+ case 4:
310
+ 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);
311
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 6];
312
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
313
+ case 5:
314
+ _d.sent();
315
+ _d.label = 6;
316
+ case 6: return [2, requestContext];
317
+ }
318
+ });
319
+ });
320
+ };
321
+ return TaskApiRequestFactory;
322
+ }(baseapi_1.BaseAPIRequestFactory));
323
+ exports.TaskApiRequestFactory = TaskApiRequestFactory;
324
+ var TaskApiResponseProcessor = (function () {
325
+ function TaskApiResponseProcessor() {
326
+ }
327
+ TaskApiResponseProcessor.prototype.createTask = function (response) {
328
+ return __awaiter(this, void 0, void 0, function () {
329
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
330
+ return __generator(this, function (_q) {
331
+ switch (_q.label) {
332
+ case 0:
333
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
334
+ if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
335
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
336
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
337
+ return [4, response.body.text()];
338
+ case 1:
339
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
340
+ "TaskDto", ""]);
341
+ return [2, body];
342
+ case 2:
343
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
344
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
345
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
346
+ return [4, response.body.text()];
347
+ case 3:
348
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
349
+ "GetJobExecutionById400Response", ""]);
350
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
351
+ case 4:
352
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
353
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
354
+ }
355
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
356
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
357
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
358
+ return [4, response.body.text()];
359
+ case 5:
360
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
361
+ "TaskDto", ""]);
362
+ return [2, body];
363
+ case 6:
364
+ _o = exception_1.ApiException.bind;
365
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
366
+ return [4, response.getBodyAsAny()];
367
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
368
+ }
369
+ });
370
+ });
371
+ };
372
+ TaskApiResponseProcessor.prototype.deleteTask = function (response) {
373
+ return __awaiter(this, void 0, void 0, function () {
374
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
375
+ return __generator(this, function (_q) {
376
+ switch (_q.label) {
377
+ case 0:
378
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
379
+ if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
380
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
381
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
382
+ return [4, response.body.text()];
383
+ case 1:
384
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
385
+ "TaskDto", ""]);
386
+ return [2, body];
387
+ case 2:
388
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
389
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
390
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
391
+ return [4, response.body.text()];
392
+ case 3:
393
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
394
+ "GetJobExecutionById400Response", ""]);
395
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
396
+ case 4:
397
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
398
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
399
+ }
400
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
401
+ throw new exception_1.ApiException(response.httpStatusCode, "Not found", undefined, response.headers);
402
+ }
403
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
404
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
405
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
406
+ return [4, response.body.text()];
407
+ case 5:
408
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
409
+ "TaskDto", ""]);
410
+ return [2, body];
411
+ case 6:
412
+ _o = exception_1.ApiException.bind;
413
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
414
+ return [4, response.getBodyAsAny()];
415
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
416
+ }
417
+ });
418
+ });
419
+ };
420
+ TaskApiResponseProcessor.prototype.getTaskById = function (response) {
421
+ return __awaiter(this, void 0, void 0, function () {
422
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
423
+ return __generator(this, function (_q) {
424
+ switch (_q.label) {
425
+ case 0:
426
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
427
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
428
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
429
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
430
+ return [4, response.body.text()];
431
+ case 1:
432
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
433
+ "TaskDto", ""]);
434
+ return [2, body];
435
+ case 2:
436
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
437
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
438
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
439
+ return [4, response.body.text()];
440
+ case 3:
441
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
442
+ "GetJobExecutionById400Response", ""]);
443
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
444
+ case 4:
445
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
446
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
447
+ }
448
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
449
+ throw new exception_1.ApiException(response.httpStatusCode, "Not found", undefined, response.headers);
450
+ }
451
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
452
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
453
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
454
+ return [4, response.body.text()];
455
+ case 5:
456
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
457
+ "TaskDto", ""]);
458
+ return [2, body];
459
+ case 6:
460
+ _o = exception_1.ApiException.bind;
461
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
462
+ return [4, response.getBodyAsAny()];
463
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
464
+ }
465
+ });
466
+ });
467
+ };
468
+ TaskApiResponseProcessor.prototype.getTasks = function (response) {
469
+ return __awaiter(this, void 0, void 0, function () {
470
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
471
+ return __generator(this, function (_q) {
472
+ switch (_q.label) {
473
+ case 0:
474
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
475
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
476
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
477
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
478
+ return [4, response.body.text()];
479
+ case 1:
480
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
481
+ "GetTasks200Response", ""]);
482
+ return [2, body];
483
+ case 2:
484
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
485
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
486
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
487
+ return [4, response.body.text()];
488
+ case 3:
489
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
490
+ "GetJobExecutionById400Response", ""]);
491
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
492
+ case 4:
493
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
494
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
495
+ }
496
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
497
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
498
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
499
+ return [4, response.body.text()];
500
+ case 5:
501
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
502
+ "GetTasks200Response", ""]);
503
+ return [2, body];
504
+ case 6:
505
+ _o = exception_1.ApiException.bind;
506
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
507
+ return [4, response.getBodyAsAny()];
508
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
509
+ }
510
+ });
511
+ });
512
+ };
513
+ TaskApiResponseProcessor.prototype.pollTaskExecution = function (response) {
514
+ return __awaiter(this, void 0, void 0, function () {
515
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
516
+ return __generator(this, function (_q) {
517
+ switch (_q.label) {
518
+ case 0:
519
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
520
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
521
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
522
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
523
+ return [4, response.body.text()];
524
+ case 1:
525
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
526
+ "TaskExecutionDto", ""]);
527
+ return [2, body];
528
+ case 2:
529
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
530
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
531
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
532
+ return [4, response.body.text()];
533
+ case 3:
534
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
535
+ "GetJobExecutionById400Response", ""]);
536
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
537
+ case 4:
538
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
539
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
540
+ }
541
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
542
+ throw new exception_1.ApiException(response.httpStatusCode, "Not found", undefined, response.headers);
543
+ }
544
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
545
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
546
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
547
+ return [4, response.body.text()];
548
+ case 5:
549
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
550
+ "TaskExecutionDto", ""]);
551
+ return [2, body];
552
+ case 6:
553
+ _o = exception_1.ApiException.bind;
554
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
555
+ return [4, response.getBodyAsAny()];
556
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
557
+ }
558
+ });
559
+ });
560
+ };
561
+ TaskApiResponseProcessor.prototype.updateTask = function (response) {
562
+ return __awaiter(this, void 0, void 0, function () {
563
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
564
+ return __generator(this, function (_q) {
565
+ switch (_q.label) {
566
+ case 0:
567
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
568
+ if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
569
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
570
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
571
+ return [4, response.body.text()];
572
+ case 1:
573
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
574
+ "TaskDto", ""]);
575
+ return [2, body];
576
+ case 2:
577
+ if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
578
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
579
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
580
+ return [4, response.body.text()];
581
+ case 3:
582
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
583
+ "GetJobExecutionById400Response", ""]);
584
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
585
+ case 4:
586
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
587
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
588
+ }
589
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
590
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
591
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
592
+ return [4, response.body.text()];
593
+ case 5:
594
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
595
+ "TaskDto", ""]);
596
+ return [2, body];
597
+ case 6:
598
+ _o = exception_1.ApiException.bind;
599
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
600
+ return [4, response.getBodyAsAny()];
601
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
602
+ }
603
+ });
604
+ });
605
+ };
606
+ return TaskApiResponseProcessor;
607
+ }());
608
+ exports.TaskApiResponseProcessor = TaskApiResponseProcessor;
609
609
  //# sourceMappingURL=TaskApi.js.map