@revengai/sdk 3.67.0 → 3.71.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 (91) hide show
  1. package/README.md +28 -3
  2. package/dist/apis/AgentApi.d.ts +31 -0
  3. package/dist/apis/AgentApi.js +758 -0
  4. package/dist/apis/AgentApi.js.map +1 -0
  5. package/dist/apis/AnalysesBulkActionsApi.d.ts +15 -0
  6. package/dist/apis/AnalysesBulkActionsApi.js +288 -0
  7. package/dist/apis/AnalysesBulkActionsApi.js.map +1 -0
  8. package/dist/apis/AnalysesCoreApi.d.ts +0 -7
  9. package/dist/apis/AnalysesCoreApi.js +0 -214
  10. package/dist/apis/AnalysesCoreApi.js.map +1 -1
  11. package/dist/apis/FunctionsAIDecompilationApi.d.ts +2 -1
  12. package/dist/apis/FunctionsAIDecompilationApi.js +9 -2
  13. package/dist/apis/FunctionsAIDecompilationApi.js.map +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.js +3 -1
  16. package/dist/index.js.map +1 -1
  17. package/dist/models/AppApiRestV2AgentSchemaCapability.d.ts +36 -0
  18. package/dist/models/AppApiRestV2AgentSchemaCapability.js +65 -0
  19. package/dist/models/AppApiRestV2AgentSchemaCapability.js.map +1 -0
  20. package/dist/models/{Capability.d.ts → AppApiRestV2InfoTypesCapability.d.ts} +1 -1
  21. package/dist/models/AppApiRestV2InfoTypesCapability.js +35 -0
  22. package/dist/models/AppApiRestV2InfoTypesCapability.js.map +1 -0
  23. package/dist/models/BaseResponseCapabilitiesAgentResponse.d.ts +27 -0
  24. package/dist/models/BaseResponseCapabilitiesAgentResponse.js +47 -0
  25. package/dist/models/BaseResponseCapabilitiesAgentResponse.js.map +1 -0
  26. package/dist/models/BaseResponseQueuedWorkflowTaskResponse.d.ts +27 -0
  27. package/dist/models/BaseResponseQueuedWorkflowTaskResponse.js +47 -0
  28. package/dist/models/BaseResponseQueuedWorkflowTaskResponse.js.map +1 -0
  29. package/dist/models/BaseResponseReportAnalysisResponse.d.ts +27 -0
  30. package/dist/models/BaseResponseReportAnalysisResponse.js +47 -0
  31. package/dist/models/BaseResponseReportAnalysisResponse.js.map +1 -0
  32. package/dist/models/BaseResponseTaskStatusResponse.d.ts +27 -0
  33. package/dist/models/BaseResponseTaskStatusResponse.js +47 -0
  34. package/dist/models/BaseResponseTaskStatusResponse.js.map +1 -0
  35. package/dist/models/BaseResponseTriageReportResponse.d.ts +27 -0
  36. package/dist/models/BaseResponseTriageReportResponse.js +47 -0
  37. package/dist/models/BaseResponseTriageReportResponse.js.map +1 -0
  38. package/dist/models/BinaryTaskStatus.d.ts +7 -0
  39. package/dist/models/BinaryTaskStatus.js +12 -0
  40. package/dist/models/BinaryTaskStatus.js.map +1 -0
  41. package/dist/models/Capabilities.d.ts +2 -2
  42. package/dist/models/Capabilities.js +1 -1
  43. package/dist/models/Capabilities.js.map +1 -1
  44. package/dist/models/CapabilitiesAgentResponse.d.ts +21 -0
  45. package/dist/models/CapabilitiesAgentResponse.js +23 -0
  46. package/dist/models/CapabilitiesAgentResponse.js.map +1 -0
  47. package/dist/models/FunctionMappingFull.d.ts +3 -0
  48. package/dist/models/FunctionMappingFull.js +6 -0
  49. package/dist/models/FunctionMappingFull.js.map +1 -1
  50. package/dist/models/IOC.d.ts +50 -0
  51. package/dist/models/IOC.js +79 -0
  52. package/dist/models/IOC.js.map +1 -0
  53. package/dist/models/MITRETechnique.d.ts +29 -0
  54. package/dist/models/MITRETechnique.js +77 -0
  55. package/dist/models/MITRETechnique.js.map +1 -0
  56. package/dist/models/ObjectSerializer.d.ts +17 -1
  57. package/dist/models/ObjectSerializer.js +53 -3
  58. package/dist/models/ObjectSerializer.js.map +1 -1
  59. package/dist/models/QueuedWorkflowTaskResponse.d.ts +20 -0
  60. package/dist/models/QueuedWorkflowTaskResponse.js +23 -0
  61. package/dist/models/QueuedWorkflowTaskResponse.js.map +1 -0
  62. package/dist/models/RegenerateTarget.d.ts +4 -0
  63. package/dist/models/RegenerateTarget.js +9 -0
  64. package/dist/models/RegenerateTarget.js.map +1 -0
  65. package/dist/models/ReportAnalysisResponse.d.ts +36 -0
  66. package/dist/models/ReportAnalysisResponse.js +73 -0
  67. package/dist/models/ReportAnalysisResponse.js.map +1 -0
  68. package/dist/models/TaskStatusResponse.d.ts +21 -0
  69. package/dist/models/TaskStatusResponse.js +23 -0
  70. package/dist/models/TaskStatusResponse.js.map +1 -0
  71. package/dist/models/TriageFunctionResponse.d.ts +37 -0
  72. package/dist/models/TriageFunctionResponse.js +61 -0
  73. package/dist/models/TriageFunctionResponse.js.map +1 -0
  74. package/dist/models/TriageReportResponse.d.ts +23 -0
  75. package/dist/models/TriageReportResponse.js +35 -0
  76. package/dist/models/TriageReportResponse.js.map +1 -0
  77. package/dist/models/all.d.ts +17 -1
  78. package/dist/models/all.js +17 -1
  79. package/dist/models/all.js.map +1 -1
  80. package/dist/types/ObjectParamAPI.d.ts +85 -22
  81. package/dist/types/ObjectParamAPI.js +120 -50
  82. package/dist/types/ObjectParamAPI.js.map +1 -1
  83. package/dist/types/ObservableAPI.d.ts +45 -6
  84. package/dist/types/ObservableAPI.js +712 -440
  85. package/dist/types/ObservableAPI.js.map +1 -1
  86. package/dist/types/PromiseAPI.d.ts +41 -6
  87. package/dist/types/PromiseAPI.js +166 -60
  88. package/dist/types/PromiseAPI.js.map +1 -1
  89. package/package.json +1 -1
  90. package/dist/models/Capability.js +0 -35
  91. package/dist/models/Capability.js.map +0 -1
@@ -0,0 +1,758 @@
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.AgentApiResponseProcessor = exports.AgentApiRequestFactory = 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 AgentApiRequestFactory = (function (_super) {
61
+ __extends(AgentApiRequestFactory, _super);
62
+ function AgentApiRequestFactory() {
63
+ return _super !== null && _super.apply(this, arguments) || this;
64
+ }
65
+ AgentApiRequestFactory.prototype.checkCapabilitiesTaskStatusV2AnalysesAnalysisIdAgentCapabilitiesStatusGet = function (analysisId, _options) {
66
+ var _a;
67
+ return __awaiter(this, void 0, void 0, function () {
68
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
69
+ return __generator(this, function (_b) {
70
+ switch (_b.label) {
71
+ case 0:
72
+ _config = _options || this.configuration;
73
+ if (analysisId === null || analysisId === undefined) {
74
+ throw new baseapi_1.RequiredError("AgentApi", "checkCapabilitiesTaskStatusV2AnalysesAnalysisIdAgentCapabilitiesStatusGet", "analysisId");
75
+ }
76
+ localVarPath = '/v2/analyses/{analysis_id}/agent/capabilities/status'
77
+ .replace('{' + 'analysis_id' + '}', encodeURIComponent(String(analysisId)));
78
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
79
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
80
+ authMethod = _config.authMethods["APIKey"];
81
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
82
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
83
+ case 1:
84
+ _b.sent();
85
+ _b.label = 2;
86
+ case 2:
87
+ defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default;
88
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
89
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
90
+ case 3:
91
+ _b.sent();
92
+ _b.label = 4;
93
+ case 4: return [2, requestContext];
94
+ }
95
+ });
96
+ });
97
+ };
98
+ AgentApiRequestFactory.prototype.checkReportAnalysisTaskStatusV2AnalysesAnalysisIdAgentReportAnalysisStatusGet = function (analysisId, _options) {
99
+ var _a;
100
+ return __awaiter(this, void 0, void 0, function () {
101
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
102
+ return __generator(this, function (_b) {
103
+ switch (_b.label) {
104
+ case 0:
105
+ _config = _options || this.configuration;
106
+ if (analysisId === null || analysisId === undefined) {
107
+ throw new baseapi_1.RequiredError("AgentApi", "checkReportAnalysisTaskStatusV2AnalysesAnalysisIdAgentReportAnalysisStatusGet", "analysisId");
108
+ }
109
+ localVarPath = '/v2/analyses/{analysis_id}/agent/report-analysis/status'
110
+ .replace('{' + 'analysis_id' + '}', encodeURIComponent(String(analysisId)));
111
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
112
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
113
+ authMethod = _config.authMethods["APIKey"];
114
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
115
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
116
+ case 1:
117
+ _b.sent();
118
+ _b.label = 2;
119
+ case 2:
120
+ defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default;
121
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
122
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
123
+ case 3:
124
+ _b.sent();
125
+ _b.label = 4;
126
+ case 4: return [2, requestContext];
127
+ }
128
+ });
129
+ });
130
+ };
131
+ AgentApiRequestFactory.prototype.checkTriageTaskStatusV2AnalysesAnalysisIdAgentTriageStatusGet = function (analysisId, _options) {
132
+ var _a;
133
+ return __awaiter(this, void 0, void 0, function () {
134
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
135
+ return __generator(this, function (_b) {
136
+ switch (_b.label) {
137
+ case 0:
138
+ _config = _options || this.configuration;
139
+ if (analysisId === null || analysisId === undefined) {
140
+ throw new baseapi_1.RequiredError("AgentApi", "checkTriageTaskStatusV2AnalysesAnalysisIdAgentTriageStatusGet", "analysisId");
141
+ }
142
+ localVarPath = '/v2/analyses/{analysis_id}/agent/triage/status'
143
+ .replace('{' + 'analysis_id' + '}', encodeURIComponent(String(analysisId)));
144
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
145
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
146
+ authMethod = _config.authMethods["APIKey"];
147
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
148
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
149
+ case 1:
150
+ _b.sent();
151
+ _b.label = 2;
152
+ case 2:
153
+ defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default;
154
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
155
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
156
+ case 3:
157
+ _b.sent();
158
+ _b.label = 4;
159
+ case 4: return [2, requestContext];
160
+ }
161
+ });
162
+ });
163
+ };
164
+ AgentApiRequestFactory.prototype.createCapabilitiesTaskV2AnalysesAnalysisIdAgentCapabilitiesPost = function (analysisId, _options) {
165
+ var _a;
166
+ return __awaiter(this, void 0, void 0, function () {
167
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
168
+ return __generator(this, function (_b) {
169
+ switch (_b.label) {
170
+ case 0:
171
+ _config = _options || this.configuration;
172
+ if (analysisId === null || analysisId === undefined) {
173
+ throw new baseapi_1.RequiredError("AgentApi", "createCapabilitiesTaskV2AnalysesAnalysisIdAgentCapabilitiesPost", "analysisId");
174
+ }
175
+ localVarPath = '/v2/analyses/{analysis_id}/agent/capabilities'
176
+ .replace('{' + 'analysis_id' + '}', encodeURIComponent(String(analysisId)));
177
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
178
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
179
+ authMethod = _config.authMethods["APIKey"];
180
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
181
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
182
+ case 1:
183
+ _b.sent();
184
+ _b.label = 2;
185
+ case 2:
186
+ defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default;
187
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
188
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
189
+ case 3:
190
+ _b.sent();
191
+ _b.label = 4;
192
+ case 4: return [2, requestContext];
193
+ }
194
+ });
195
+ });
196
+ };
197
+ AgentApiRequestFactory.prototype.createReportAnalysisTaskV2AnalysesAnalysisIdAgentReportAnalysisPost = function (analysisId, _options) {
198
+ var _a;
199
+ return __awaiter(this, void 0, void 0, function () {
200
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
201
+ return __generator(this, function (_b) {
202
+ switch (_b.label) {
203
+ case 0:
204
+ _config = _options || this.configuration;
205
+ if (analysisId === null || analysisId === undefined) {
206
+ throw new baseapi_1.RequiredError("AgentApi", "createReportAnalysisTaskV2AnalysesAnalysisIdAgentReportAnalysisPost", "analysisId");
207
+ }
208
+ localVarPath = '/v2/analyses/{analysis_id}/agent/report-analysis'
209
+ .replace('{' + 'analysis_id' + '}', encodeURIComponent(String(analysisId)));
210
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
211
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
212
+ authMethod = _config.authMethods["APIKey"];
213
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
214
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
215
+ case 1:
216
+ _b.sent();
217
+ _b.label = 2;
218
+ case 2:
219
+ defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default;
220
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
221
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
222
+ case 3:
223
+ _b.sent();
224
+ _b.label = 4;
225
+ case 4: return [2, requestContext];
226
+ }
227
+ });
228
+ });
229
+ };
230
+ AgentApiRequestFactory.prototype.createTriageTaskV2AnalysesAnalysisIdAgentTriagePost = function (analysisId, _options) {
231
+ var _a;
232
+ return __awaiter(this, void 0, void 0, function () {
233
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
234
+ return __generator(this, function (_b) {
235
+ switch (_b.label) {
236
+ case 0:
237
+ _config = _options || this.configuration;
238
+ if (analysisId === null || analysisId === undefined) {
239
+ throw new baseapi_1.RequiredError("AgentApi", "createTriageTaskV2AnalysesAnalysisIdAgentTriagePost", "analysisId");
240
+ }
241
+ localVarPath = '/v2/analyses/{analysis_id}/agent/triage'
242
+ .replace('{' + 'analysis_id' + '}', encodeURIComponent(String(analysisId)));
243
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
244
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
245
+ authMethod = _config.authMethods["APIKey"];
246
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
247
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
248
+ case 1:
249
+ _b.sent();
250
+ _b.label = 2;
251
+ case 2:
252
+ defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default;
253
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
254
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
255
+ case 3:
256
+ _b.sent();
257
+ _b.label = 4;
258
+ case 4: return [2, requestContext];
259
+ }
260
+ });
261
+ });
262
+ };
263
+ AgentApiRequestFactory.prototype.getCapabilitiesResultV2AnalysesAnalysisIdAgentCapabilitiesGet = function (analysisId, _options) {
264
+ var _a;
265
+ return __awaiter(this, void 0, void 0, function () {
266
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
267
+ return __generator(this, function (_b) {
268
+ switch (_b.label) {
269
+ case 0:
270
+ _config = _options || this.configuration;
271
+ if (analysisId === null || analysisId === undefined) {
272
+ throw new baseapi_1.RequiredError("AgentApi", "getCapabilitiesResultV2AnalysesAnalysisIdAgentCapabilitiesGet", "analysisId");
273
+ }
274
+ localVarPath = '/v2/analyses/{analysis_id}/agent/capabilities'
275
+ .replace('{' + 'analysis_id' + '}', encodeURIComponent(String(analysisId)));
276
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
277
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
278
+ authMethod = _config.authMethods["APIKey"];
279
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
280
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
281
+ case 1:
282
+ _b.sent();
283
+ _b.label = 2;
284
+ case 2:
285
+ defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default;
286
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
287
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
288
+ case 3:
289
+ _b.sent();
290
+ _b.label = 4;
291
+ case 4: return [2, requestContext];
292
+ }
293
+ });
294
+ });
295
+ };
296
+ AgentApiRequestFactory.prototype.getReportAnalysisResultV2AnalysesAnalysisIdAgentReportAnalysisGet = function (analysisId, _options) {
297
+ var _a;
298
+ return __awaiter(this, void 0, void 0, function () {
299
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
300
+ return __generator(this, function (_b) {
301
+ switch (_b.label) {
302
+ case 0:
303
+ _config = _options || this.configuration;
304
+ if (analysisId === null || analysisId === undefined) {
305
+ throw new baseapi_1.RequiredError("AgentApi", "getReportAnalysisResultV2AnalysesAnalysisIdAgentReportAnalysisGet", "analysisId");
306
+ }
307
+ localVarPath = '/v2/analyses/{analysis_id}/agent/report-analysis'
308
+ .replace('{' + 'analysis_id' + '}', encodeURIComponent(String(analysisId)));
309
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
310
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
311
+ authMethod = _config.authMethods["APIKey"];
312
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
313
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
314
+ case 1:
315
+ _b.sent();
316
+ _b.label = 2;
317
+ case 2:
318
+ defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default;
319
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
320
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
321
+ case 3:
322
+ _b.sent();
323
+ _b.label = 4;
324
+ case 4: return [2, requestContext];
325
+ }
326
+ });
327
+ });
328
+ };
329
+ AgentApiRequestFactory.prototype.getTriageResultV2AnalysesAnalysisIdAgentTriageGet = function (analysisId, _options) {
330
+ var _a;
331
+ return __awaiter(this, void 0, void 0, function () {
332
+ var _config, localVarPath, requestContext, authMethod, defaultAuth;
333
+ return __generator(this, function (_b) {
334
+ switch (_b.label) {
335
+ case 0:
336
+ _config = _options || this.configuration;
337
+ if (analysisId === null || analysisId === undefined) {
338
+ throw new baseapi_1.RequiredError("AgentApi", "getTriageResultV2AnalysesAnalysisIdAgentTriageGet", "analysisId");
339
+ }
340
+ localVarPath = '/v2/analyses/{analysis_id}/agent/triage'
341
+ .replace('{' + 'analysis_id' + '}', encodeURIComponent(String(analysisId)));
342
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
343
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
344
+ authMethod = _config.authMethods["APIKey"];
345
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
346
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
347
+ case 1:
348
+ _b.sent();
349
+ _b.label = 2;
350
+ case 2:
351
+ defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default;
352
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
353
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
354
+ case 3:
355
+ _b.sent();
356
+ _b.label = 4;
357
+ case 4: return [2, requestContext];
358
+ }
359
+ });
360
+ });
361
+ };
362
+ return AgentApiRequestFactory;
363
+ }(baseapi_1.BaseAPIRequestFactory));
364
+ exports.AgentApiRequestFactory = AgentApiRequestFactory;
365
+ var AgentApiResponseProcessor = (function () {
366
+ function AgentApiResponseProcessor() {
367
+ }
368
+ AgentApiResponseProcessor.prototype.checkCapabilitiesTaskStatusV2AnalysesAnalysisIdAgentCapabilitiesStatusGetWithHttpInfo = function (response) {
369
+ return __awaiter(this, void 0, void 0, function () {
370
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
371
+ return __generator(this, function (_q) {
372
+ switch (_q.label) {
373
+ case 0:
374
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
375
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
376
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
377
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
378
+ return [4, response.body.text()];
379
+ case 1:
380
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
381
+ "TaskStatusResponse", ""]);
382
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
383
+ case 2:
384
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
385
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
386
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
387
+ return [4, response.body.text()];
388
+ case 3:
389
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
390
+ "BaseResponse", ""]);
391
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid request parameters", body, response.headers);
392
+ case 4:
393
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
394
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
395
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
396
+ return [4, response.body.text()];
397
+ case 5:
398
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
399
+ "TaskStatusResponse", ""]);
400
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
401
+ case 6:
402
+ _o = exception_1.ApiException.bind;
403
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
404
+ return [4, response.getBodyAsAny()];
405
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
406
+ }
407
+ });
408
+ });
409
+ };
410
+ AgentApiResponseProcessor.prototype.checkReportAnalysisTaskStatusV2AnalysesAnalysisIdAgentReportAnalysisStatusGetWithHttpInfo = function (response) {
411
+ return __awaiter(this, void 0, void 0, function () {
412
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
413
+ return __generator(this, function (_q) {
414
+ switch (_q.label) {
415
+ case 0:
416
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
417
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
418
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
419
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
420
+ return [4, response.body.text()];
421
+ case 1:
422
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
423
+ "TaskStatusResponse", ""]);
424
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
425
+ case 2:
426
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
427
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
428
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
429
+ return [4, response.body.text()];
430
+ case 3:
431
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
432
+ "BaseResponse", ""]);
433
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid request parameters", body, response.headers);
434
+ case 4:
435
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
436
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
437
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
438
+ return [4, response.body.text()];
439
+ case 5:
440
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
441
+ "TaskStatusResponse", ""]);
442
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
443
+ case 6:
444
+ _o = exception_1.ApiException.bind;
445
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
446
+ return [4, response.getBodyAsAny()];
447
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
448
+ }
449
+ });
450
+ });
451
+ };
452
+ AgentApiResponseProcessor.prototype.checkTriageTaskStatusV2AnalysesAnalysisIdAgentTriageStatusGetWithHttpInfo = function (response) {
453
+ return __awaiter(this, void 0, void 0, function () {
454
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
455
+ return __generator(this, function (_q) {
456
+ switch (_q.label) {
457
+ case 0:
458
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
459
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
460
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
461
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
462
+ return [4, response.body.text()];
463
+ case 1:
464
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
465
+ "TaskStatusResponse", ""]);
466
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
467
+ case 2:
468
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
469
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
470
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
471
+ return [4, response.body.text()];
472
+ case 3:
473
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
474
+ "BaseResponse", ""]);
475
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid request parameters", body, response.headers);
476
+ case 4:
477
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
478
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
479
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
480
+ return [4, response.body.text()];
481
+ case 5:
482
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
483
+ "TaskStatusResponse", ""]);
484
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
485
+ case 6:
486
+ _o = exception_1.ApiException.bind;
487
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
488
+ return [4, response.getBodyAsAny()];
489
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
490
+ }
491
+ });
492
+ });
493
+ };
494
+ AgentApiResponseProcessor.prototype.createCapabilitiesTaskV2AnalysesAnalysisIdAgentCapabilitiesPostWithHttpInfo = function (response) {
495
+ return __awaiter(this, void 0, void 0, function () {
496
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
497
+ return __generator(this, function (_q) {
498
+ switch (_q.label) {
499
+ case 0:
500
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
501
+ if (!(0, util_1.isCodeInRange)("202", response.httpStatusCode)) return [3, 2];
502
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
503
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
504
+ return [4, response.body.text()];
505
+ case 1:
506
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
507
+ "BaseResponseQueuedWorkflowTaskResponse", ""]);
508
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
509
+ case 2:
510
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
511
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
512
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
513
+ return [4, response.body.text()];
514
+ case 3:
515
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
516
+ "BaseResponse", ""]);
517
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid request parameters", body, response.headers);
518
+ case 4:
519
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
520
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
521
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
522
+ return [4, response.body.text()];
523
+ case 5:
524
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
525
+ "BaseResponseQueuedWorkflowTaskResponse", ""]);
526
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
527
+ case 6:
528
+ _o = exception_1.ApiException.bind;
529
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
530
+ return [4, response.getBodyAsAny()];
531
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
532
+ }
533
+ });
534
+ });
535
+ };
536
+ AgentApiResponseProcessor.prototype.createReportAnalysisTaskV2AnalysesAnalysisIdAgentReportAnalysisPostWithHttpInfo = function (response) {
537
+ return __awaiter(this, void 0, void 0, function () {
538
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
539
+ return __generator(this, function (_u) {
540
+ switch (_u.label) {
541
+ case 0:
542
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
543
+ if (!(0, util_1.isCodeInRange)("202", response.httpStatusCode)) return [3, 2];
544
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
545
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
546
+ return [4, response.body.text()];
547
+ case 1:
548
+ body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
549
+ "QueuedWorkflowTaskResponse", ""]);
550
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
551
+ case 2:
552
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
553
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
554
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
555
+ return [4, response.body.text()];
556
+ case 3:
557
+ body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
558
+ "BaseResponse", ""]);
559
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid request parameters", body, response.headers);
560
+ case 4:
561
+ if (!(0, util_1.isCodeInRange)("409", response.httpStatusCode)) return [3, 6];
562
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
563
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
564
+ return [4, response.body.text()];
565
+ case 5:
566
+ body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
567
+ "ErrorModel", ""]);
568
+ throw new exception_1.ApiException(response.httpStatusCode, "Task already completed or queued", body, response.headers);
569
+ case 6:
570
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
571
+ _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
572
+ _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
573
+ return [4, response.body.text()];
574
+ case 7:
575
+ body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
576
+ "QueuedWorkflowTaskResponse", ""]);
577
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
578
+ case 8:
579
+ _s = exception_1.ApiException.bind;
580
+ _t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
581
+ return [4, response.getBodyAsAny()];
582
+ case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
583
+ }
584
+ });
585
+ });
586
+ };
587
+ AgentApiResponseProcessor.prototype.createTriageTaskV2AnalysesAnalysisIdAgentTriagePostWithHttpInfo = function (response) {
588
+ return __awaiter(this, void 0, void 0, function () {
589
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
590
+ return __generator(this, function (_q) {
591
+ switch (_q.label) {
592
+ case 0:
593
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
594
+ if (!(0, util_1.isCodeInRange)("202", response.httpStatusCode)) return [3, 2];
595
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
596
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
597
+ return [4, response.body.text()];
598
+ case 1:
599
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
600
+ "BaseResponseQueuedWorkflowTaskResponse", ""]);
601
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
602
+ case 2:
603
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
604
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
605
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
606
+ return [4, response.body.text()];
607
+ case 3:
608
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
609
+ "BaseResponse", ""]);
610
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid request parameters", body, response.headers);
611
+ case 4:
612
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
613
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
614
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
615
+ return [4, response.body.text()];
616
+ case 5:
617
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
618
+ "BaseResponseQueuedWorkflowTaskResponse", ""]);
619
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
620
+ case 6:
621
+ _o = exception_1.ApiException.bind;
622
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
623
+ return [4, response.getBodyAsAny()];
624
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
625
+ }
626
+ });
627
+ });
628
+ };
629
+ AgentApiResponseProcessor.prototype.getCapabilitiesResultV2AnalysesAnalysisIdAgentCapabilitiesGetWithHttpInfo = function (response) {
630
+ return __awaiter(this, void 0, void 0, function () {
631
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
632
+ return __generator(this, function (_q) {
633
+ switch (_q.label) {
634
+ case 0:
635
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
636
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
637
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
638
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
639
+ return [4, response.body.text()];
640
+ case 1:
641
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
642
+ "BaseResponseCapabilitiesAgentResponse", ""]);
643
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
644
+ case 2:
645
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
646
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
647
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
648
+ return [4, response.body.text()];
649
+ case 3:
650
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
651
+ "BaseResponse", ""]);
652
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid request parameters", body, response.headers);
653
+ case 4:
654
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
655
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
656
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
657
+ return [4, response.body.text()];
658
+ case 5:
659
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
660
+ "BaseResponseCapabilitiesAgentResponse", ""]);
661
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
662
+ case 6:
663
+ _o = exception_1.ApiException.bind;
664
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
665
+ return [4, response.getBodyAsAny()];
666
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
667
+ }
668
+ });
669
+ });
670
+ };
671
+ AgentApiResponseProcessor.prototype.getReportAnalysisResultV2AnalysesAnalysisIdAgentReportAnalysisGetWithHttpInfo = function (response) {
672
+ return __awaiter(this, void 0, void 0, function () {
673
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
674
+ return __generator(this, function (_q) {
675
+ switch (_q.label) {
676
+ case 0:
677
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
678
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
679
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
680
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
681
+ return [4, response.body.text()];
682
+ case 1:
683
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
684
+ "BaseResponseReportAnalysisResponse", ""]);
685
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
686
+ case 2:
687
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
688
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
689
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
690
+ return [4, response.body.text()];
691
+ case 3:
692
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
693
+ "BaseResponse", ""]);
694
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid request parameters", body, response.headers);
695
+ case 4:
696
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
697
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
698
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
699
+ return [4, response.body.text()];
700
+ case 5:
701
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
702
+ "BaseResponseReportAnalysisResponse", ""]);
703
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
704
+ case 6:
705
+ _o = exception_1.ApiException.bind;
706
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
707
+ return [4, response.getBodyAsAny()];
708
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
709
+ }
710
+ });
711
+ });
712
+ };
713
+ AgentApiResponseProcessor.prototype.getTriageResultV2AnalysesAnalysisIdAgentTriageGetWithHttpInfo = function (response) {
714
+ return __awaiter(this, void 0, void 0, function () {
715
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
716
+ return __generator(this, function (_q) {
717
+ switch (_q.label) {
718
+ case 0:
719
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
720
+ if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
721
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
722
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
723
+ return [4, response.body.text()];
724
+ case 1:
725
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
726
+ "BaseResponseTriageReportResponse", ""]);
727
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
728
+ case 2:
729
+ if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
730
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
731
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
732
+ return [4, response.body.text()];
733
+ case 3:
734
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
735
+ "BaseResponse", ""]);
736
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid request parameters", body, response.headers);
737
+ case 4:
738
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
739
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
740
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
741
+ return [4, response.body.text()];
742
+ case 5:
743
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
744
+ "BaseResponseTriageReportResponse", ""]);
745
+ return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
746
+ case 6:
747
+ _o = exception_1.ApiException.bind;
748
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
749
+ return [4, response.getBodyAsAny()];
750
+ case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
751
+ }
752
+ });
753
+ });
754
+ };
755
+ return AgentApiResponseProcessor;
756
+ }());
757
+ exports.AgentApiResponseProcessor = AgentApiResponseProcessor;
758
+ //# sourceMappingURL=AgentApi.js.map