@product-live/api-sdk 2.5.1 → 2.10.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 (264) hide show
  1. package/DataFactoryFileApi.md +182 -0
  2. package/JobApi.md +333 -0
  3. package/JobExecutionApi.md +185 -0
  4. package/README.md +80 -0
  5. package/TaskApi.md +375 -0
  6. package/TaskExecutionApi.md +130 -0
  7. package/VariableApi.md +315 -0
  8. package/apis/DataFactoryFileApi.ts +252 -133
  9. package/apis/JobApi.ts +414 -201
  10. package/apis/JobExecutionApi.ts +237 -121
  11. package/apis/TaskApi.ts +458 -213
  12. package/apis/TaskExecutionApi.ts +174 -90
  13. package/apis/VariableApi.ts +406 -195
  14. package/apis/baseapi.ts +37 -0
  15. package/apis/exception.ts +15 -0
  16. package/auth/auth.ts +107 -0
  17. package/configuration.ts +82 -0
  18. package/dist/apis/DataFactoryFileApi.d.ts +14 -19
  19. package/dist/apis/DataFactoryFileApi.js +340 -103
  20. package/dist/apis/DataFactoryFileApi.js.map +1 -1
  21. package/dist/apis/JobApi.d.ts +19 -30
  22. package/dist/apis/JobApi.js +524 -165
  23. package/dist/apis/JobApi.js.map +1 -1
  24. package/dist/apis/JobExecutionApi.d.ts +14 -18
  25. package/dist/apis/JobExecutionApi.js +320 -88
  26. package/dist/apis/JobExecutionApi.js.map +1 -1
  27. package/dist/apis/TaskApi.d.ts +22 -34
  28. package/dist/apis/TaskApi.js +584 -171
  29. package/dist/apis/TaskApi.js.map +1 -1
  30. package/dist/apis/TaskExecutionApi.d.ts +11 -13
  31. package/dist/apis/TaskExecutionApi.js +242 -62
  32. package/dist/apis/TaskExecutionApi.js.map +1 -1
  33. package/dist/apis/VariableApi.d.ts +20 -31
  34. package/dist/apis/VariableApi.js +506 -153
  35. package/dist/apis/VariableApi.js.map +1 -1
  36. package/dist/apis/baseapi.d.ts +18 -0
  37. package/dist/apis/baseapi.js +46 -0
  38. package/dist/apis/baseapi.js.map +1 -0
  39. package/dist/apis/exception.d.ts +10 -0
  40. package/dist/apis/exception.js +32 -0
  41. package/dist/apis/exception.js.map +1 -0
  42. package/dist/auth/auth.d.ts +42 -0
  43. package/dist/auth/auth.js +45 -0
  44. package/dist/auth/auth.js.map +1 -0
  45. package/dist/configuration.d.ts +18 -0
  46. package/dist/configuration.js +22 -0
  47. package/dist/configuration.js.map +1 -0
  48. package/dist/http/http.d.ts +82 -0
  49. package/dist/http/http.js +229 -0
  50. package/dist/http/http.js.map +1 -0
  51. package/dist/http/isomorphic-fetch.d.ts +5 -0
  52. package/dist/http/isomorphic-fetch.js +34 -0
  53. package/dist/http/isomorphic-fetch.js.map +1 -0
  54. package/dist/index.d.ts +10 -3
  55. package/dist/index.js +17 -3
  56. package/dist/index.js.map +1 -1
  57. package/dist/middleware.d.ts +16 -0
  58. package/dist/middleware.js +18 -0
  59. package/dist/middleware.js.map +1 -0
  60. package/dist/models/CreateJobDto.d.ts +27 -24
  61. package/dist/models/CreateJobDto.js +77 -62
  62. package/dist/models/CreateJobDto.js.map +1 -1
  63. package/dist/models/CreateJobExecutionDto.d.ts +18 -8
  64. package/dist/models/CreateJobExecutionDto.js +29 -36
  65. package/dist/models/CreateJobExecutionDto.js.map +1 -1
  66. package/dist/models/CreateTaskDto.d.ts +20 -10
  67. package/dist/models/CreateTaskDto.js +41 -42
  68. package/dist/models/CreateTaskDto.js.map +1 -1
  69. package/dist/models/CreateVariableDto.d.ts +21 -16
  70. package/dist/models/CreateVariableDto.js +41 -46
  71. package/dist/models/CreateVariableDto.js.map +1 -1
  72. package/dist/models/FileDto.d.ts +22 -15
  73. package/dist/models/FileDto.js +47 -48
  74. package/dist/models/FileDto.js.map +1 -1
  75. package/dist/models/FindVariablesRequest.d.ts +24 -7
  76. package/dist/models/FindVariablesRequest.js +42 -33
  77. package/dist/models/FindVariablesRequest.js.map +1 -1
  78. package/dist/models/GetFiles200Response.d.ts +20 -13
  79. package/dist/models/GetFiles200Response.js +29 -38
  80. package/dist/models/GetFiles200Response.js.map +1 -1
  81. package/dist/models/GetJobExecutionById400Response.d.ts +16 -6
  82. package/dist/models/GetJobExecutionById400Response.js +17 -30
  83. package/dist/models/GetJobExecutionById400Response.js.map +1 -1
  84. package/dist/models/GetJobExecutions200Response.d.ts +20 -13
  85. package/dist/models/GetJobExecutions200Response.js +29 -38
  86. package/dist/models/GetJobExecutions200Response.js.map +1 -1
  87. package/dist/models/GetJobs200Response.d.ts +20 -13
  88. package/dist/models/GetJobs200Response.js +29 -38
  89. package/dist/models/GetJobs200Response.js.map +1 -1
  90. package/dist/models/GetTasks200Response.d.ts +20 -13
  91. package/dist/models/GetTasks200Response.js +29 -38
  92. package/dist/models/GetTasks200Response.js.map +1 -1
  93. package/dist/models/GetVariables200Response.d.ts +20 -13
  94. package/dist/models/GetVariables200Response.js +29 -38
  95. package/dist/models/GetVariables200Response.js.map +1 -1
  96. package/dist/models/HighOrderQuery.d.ts +19 -13
  97. package/dist/models/HighOrderQuery.js +23 -37
  98. package/dist/models/HighOrderQuery.js.map +1 -1
  99. package/dist/models/JobDto.d.ts +32 -32
  100. package/dist/models/JobDto.js +101 -77
  101. package/dist/models/JobDto.js.map +1 -1
  102. package/dist/models/JobExecutionDto.d.ts +28 -21
  103. package/dist/models/JobExecutionDto.js +83 -66
  104. package/dist/models/JobExecutionDto.js.map +1 -1
  105. package/dist/models/LowOrderQuery.d.ts +21 -22
  106. package/dist/models/LowOrderQuery.js +35 -49
  107. package/dist/models/LowOrderQuery.js.map +1 -1
  108. package/dist/models/LowOrderQueryValue.d.ts +16 -0
  109. package/dist/models/LowOrderQueryValue.js +15 -0
  110. package/dist/models/LowOrderQueryValue.js.map +1 -0
  111. package/dist/models/ObjectSerializer.d.ts +34 -0
  112. package/dist/models/ObjectSerializer.js +313 -0
  113. package/dist/models/ObjectSerializer.js.map +1 -0
  114. package/dist/models/PatchTaskExecutionDto.d.ts +19 -13
  115. package/dist/models/PatchTaskExecutionDto.js +29 -40
  116. package/dist/models/PatchTaskExecutionDto.js.map +1 -1
  117. package/dist/models/Query.d.ts +17 -20
  118. package/dist/models/Query.js +17 -43
  119. package/dist/models/Query.js.map +1 -1
  120. package/dist/models/TaskDto.d.ts +25 -18
  121. package/dist/models/TaskDto.js +65 -57
  122. package/dist/models/TaskDto.js.map +1 -1
  123. package/dist/models/TaskExecutionDto.d.ts +25 -25
  124. package/dist/models/TaskExecutionDto.js +59 -61
  125. package/dist/models/TaskExecutionDto.js.map +1 -1
  126. package/dist/models/UpdateJobDto.d.ts +28 -25
  127. package/dist/models/UpdateJobDto.js +83 -65
  128. package/dist/models/UpdateJobDto.js.map +1 -1
  129. package/dist/models/UpdateTaskDto.d.ts +21 -11
  130. package/dist/models/UpdateTaskDto.js +47 -45
  131. package/dist/models/UpdateTaskDto.js.map +1 -1
  132. package/dist/models/UpdateVariableDto.d.ts +22 -17
  133. package/dist/models/UpdateVariableDto.js +47 -49
  134. package/dist/models/UpdateVariableDto.js.map +1 -1
  135. package/dist/models/VariableDto.d.ts +26 -24
  136. package/dist/models/VariableDto.js +65 -61
  137. package/dist/models/VariableDto.js.map +1 -1
  138. package/dist/models/all.d.ts +25 -0
  139. package/dist/models/all.js +42 -0
  140. package/dist/models/all.js.map +1 -0
  141. package/dist/rxjsStub.d.ts +10 -0
  142. package/dist/rxjsStub.js +33 -0
  143. package/dist/rxjsStub.js.map +1 -0
  144. package/dist/servers.d.ts +17 -0
  145. package/dist/servers.js +32 -0
  146. package/dist/servers.js.map +1 -0
  147. package/dist/types/ObjectParamAPI.d.ts +160 -0
  148. package/dist/types/ObjectParamAPI.js +129 -0
  149. package/dist/types/ObjectParamAPI.js.map +1 -0
  150. package/dist/types/ObservableAPI.d.ts +89 -0
  151. package/dist/types/ObservableAPI.js +642 -0
  152. package/dist/types/ObservableAPI.js.map +1 -0
  153. package/dist/types/PromiseAPI.d.ts +76 -0
  154. package/dist/types/PromiseAPI.js +148 -0
  155. package/dist/types/PromiseAPI.js.map +1 -0
  156. package/dist/util.d.ts +2 -0
  157. package/dist/util.js +29 -0
  158. package/dist/util.js.map +1 -0
  159. package/git_push.sh +51 -0
  160. package/http/http.ts +229 -0
  161. package/http/isomorphic-fetch.ts +32 -0
  162. package/index.ts +12 -5
  163. package/middleware.ts +66 -0
  164. package/models/CreateJobDto.ts +88 -144
  165. package/models/CreateJobExecutionDto.ts +29 -63
  166. package/models/CreateTaskDto.ts +43 -82
  167. package/models/CreateVariableDto.ts +46 -92
  168. package/models/FileDto.ts +53 -101
  169. package/models/FindVariablesRequest.ts +50 -55
  170. package/models/GetFiles200Response.ts +37 -82
  171. package/models/GetJobExecutionById400Response.ts +15 -45
  172. package/models/GetJobExecutions200Response.ts +37 -82
  173. package/models/GetJobs200Response.ts +37 -82
  174. package/models/GetTasks200Response.ts +37 -82
  175. package/models/GetVariables200Response.ts +37 -82
  176. package/models/HighOrderQuery.ts +30 -75
  177. package/models/JobDto.ts +117 -188
  178. package/models/JobExecutionDto.ts +95 -154
  179. package/models/LowOrderQuery.ts +44 -99
  180. package/models/LowOrderQueryValue.ts +29 -0
  181. package/models/ObjectSerializer.ts +324 -0
  182. package/models/PatchTaskExecutionDto.ts +36 -78
  183. package/models/Query.ts +18 -65
  184. package/models/TaskDto.ts +74 -128
  185. package/models/TaskExecutionDto.ts +68 -131
  186. package/models/UpdateJobDto.ts +95 -153
  187. package/models/UpdateTaskDto.ts +50 -91
  188. package/models/UpdateVariableDto.ts +53 -101
  189. package/models/VariableDto.ts +75 -136
  190. package/models/all.ts +25 -0
  191. package/package.json +35 -10
  192. package/rxjsStub.ts +27 -0
  193. package/servers.ts +55 -0
  194. package/types/ObjectParamAPI.ts +580 -0
  195. package/types/ObservableAPI.ts +701 -0
  196. package/types/PromiseAPI.ts +370 -0
  197. package/util.ts +37 -0
  198. package/apis/index.ts +0 -8
  199. package/dist/apis/index.d.ts +0 -6
  200. package/dist/apis/index.js +0 -23
  201. package/dist/apis/index.js.map +0 -1
  202. package/dist/models/FileControllerGetFiles200Response.d.ts +0 -14
  203. package/dist/models/FileControllerGetFiles200Response.js +0 -43
  204. package/dist/models/FileControllerGetFiles200Response.js.map +0 -1
  205. package/dist/models/JobControllerList200Response.d.ts +0 -14
  206. package/dist/models/JobControllerList200Response.js +0 -43
  207. package/dist/models/JobControllerList200Response.js.map +0 -1
  208. package/dist/models/JobDtoPeriodicityInner.d.ts +0 -8
  209. package/dist/models/JobDtoPeriodicityInner.js +0 -37
  210. package/dist/models/JobDtoPeriodicityInner.js.map +0 -1
  211. package/dist/models/JobDtoTasksInner.d.ts +0 -14
  212. package/dist/models/JobDtoTasksInner.js +0 -45
  213. package/dist/models/JobDtoTasksInner.js.map +0 -1
  214. package/dist/models/JobDtoTitleLocal.d.ts +0 -8
  215. package/dist/models/JobDtoTitleLocal.js +0 -37
  216. package/dist/models/JobDtoTitleLocal.js.map +0 -1
  217. package/dist/models/JobExecutionControllerGetOne400Response.d.ts +0 -7
  218. package/dist/models/JobExecutionControllerGetOne400Response.js +0 -35
  219. package/dist/models/JobExecutionControllerGetOne400Response.js.map +0 -1
  220. package/dist/models/JobExecutionControllerList200Response.d.ts +0 -14
  221. package/dist/models/JobExecutionControllerList200Response.js +0 -43
  222. package/dist/models/JobExecutionControllerList200Response.js.map +0 -1
  223. package/dist/models/JobExecutionDtoInfo.d.ts +0 -7
  224. package/dist/models/JobExecutionDtoInfo.js +0 -35
  225. package/dist/models/JobExecutionDtoInfo.js.map +0 -1
  226. package/dist/models/TaskControllerList200Response.d.ts +0 -14
  227. package/dist/models/TaskControllerList200Response.js +0 -43
  228. package/dist/models/TaskControllerList200Response.js.map +0 -1
  229. package/dist/models/TaskDtoInputKeysInner.d.ts +0 -8
  230. package/dist/models/TaskDtoInputKeysInner.js +0 -37
  231. package/dist/models/TaskDtoInputKeysInner.js.map +0 -1
  232. package/dist/models/VariableControllerList200Response.d.ts +0 -14
  233. package/dist/models/VariableControllerList200Response.js +0 -43
  234. package/dist/models/VariableControllerList200Response.js.map +0 -1
  235. package/dist/models/index.d.ts +0 -24
  236. package/dist/models/index.js +0 -41
  237. package/dist/models/index.js.map +0 -1
  238. package/dist/runtime.d.ts +0 -154
  239. package/dist/runtime.js +0 -306
  240. package/dist/runtime.js.map +0 -1
  241. package/models/ExecuteJob400Response.ts +0 -65
  242. package/models/ExecuteJobDto.ts +0 -97
  243. package/models/ExecuteJobDtoInfo.ts +0 -65
  244. package/models/ExecuteJobDtoJob.ts +0 -81
  245. package/models/FileControllerGetFiles200Response.ts +0 -98
  246. package/models/FileCreatedDto.ts +0 -111
  247. package/models/JobControllerList200Response.ts +0 -98
  248. package/models/JobDtoPeriodicitiesInner.ts +0 -73
  249. package/models/JobDtoPeriodicityInner.ts +0 -73
  250. package/models/JobDtoProject.ts +0 -73
  251. package/models/JobDtoTasksInner.ts +0 -105
  252. package/models/JobDtoTitleLocal.ts +0 -73
  253. package/models/JobExecutionControllerGetOne400Response.ts +0 -65
  254. package/models/JobExecutionControllerList200Response.ts +0 -98
  255. package/models/JobExecutionDtoEventsInner.ts +0 -89
  256. package/models/JobExecutionDtoInfo.ts +0 -65
  257. package/models/JobExecutionDtoJob.ts +0 -81
  258. package/models/TaskControllerList200Response.ts +0 -98
  259. package/models/TaskDtoInputKeysInner.ts +0 -73
  260. package/models/TaskInstanceDto.ts +0 -143
  261. package/models/TaskInstanceUpdateDto.ts +0 -107
  262. package/models/VariableControllerList200Response.ts +0 -98
  263. package/models/index.ts +0 -26
  264. package/runtime.ts +0 -425
package/apis/JobApi.ts CHANGED
@@ -1,294 +1,507 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
1
+ // TODO: better import syntax?
2
+ import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi';
3
+ import {Configuration} from '../configuration';
4
+ import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http';
5
+ import * as FormData from "form-data";
6
+ import { URLSearchParams } from 'url';
7
+ import {ObjectSerializer} from '../models/ObjectSerializer';
8
+ import {ApiException} from './exception';
9
+ import {canConsumeForm, isCodeInRange} from '../util';
10
+ import {SecurityAuthentication} from '../auth/auth';
11
+
12
+
13
+ import { CreateJobDto } from '../models/CreateJobDto';
14
+ import { GetJobExecutionById400Response } from '../models/GetJobExecutionById400Response';
15
+ import { GetJobs200Response } from '../models/GetJobs200Response';
16
+ import { JobDto } from '../models/JobDto';
17
+ import { UpdateJobDto } from '../models/UpdateJobDto';
18
+
3
19
  /**
4
- * Product-Live API
5
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- *
7
- * The version of the OpenAPI document: 2.5.1
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
20
+ * no description
13
21
  */
22
+ export class JobApiRequestFactory extends BaseAPIRequestFactory {
14
23
 
24
+ /**
25
+ * (Experimental) - Create a Job
26
+ * @param createJobDto
27
+ */
28
+ public async createJob(createJobDto: CreateJobDto, _options?: Configuration): Promise<RequestContext> {
29
+ let _config = _options || this.configuration;
15
30
 
16
- import * as runtime from '../runtime';
17
- import type {
18
- CreateJobDto,
19
- GetJobExecutionById400Response,
20
- GetJobs200Response,
21
- JobDto,
22
- UpdateJobDto,
23
- } from '../models';
24
- import {
25
- CreateJobDtoFromJSON,
26
- CreateJobDtoToJSON,
27
- GetJobExecutionById400ResponseFromJSON,
28
- GetJobExecutionById400ResponseToJSON,
29
- GetJobs200ResponseFromJSON,
30
- GetJobs200ResponseToJSON,
31
- JobDtoFromJSON,
32
- JobDtoToJSON,
33
- UpdateJobDtoFromJSON,
34
- UpdateJobDtoToJSON,
35
- } from '../models';
36
-
37
- export interface CreateJobRequest {
38
- createJobDto: CreateJobDto;
39
- }
31
+ // verify required parameter 'createJobDto' is not null or undefined
32
+ if (createJobDto === null || createJobDto === undefined) {
33
+ throw new RequiredError("JobApi", "createJob", "createJobDto");
34
+ }
40
35
 
41
- export interface GetJobByIdRequest {
42
- id: string;
43
- }
44
36
 
45
- export interface GetJobsRequest {
46
- size?: number;
47
- page?: number;
48
- }
37
+ // Path Params
38
+ const localVarPath = '/v1/data_factory/jobs';
49
39
 
50
- export interface UpdateJobRequest {
51
- id: string;
52
- updateJobDto: UpdateJobDto;
53
- }
40
+ // Make Request Context
41
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
42
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
54
43
 
55
- export interface UpdateJobZipRequest {
56
- id: string;
57
- file: Blob;
58
- }
59
44
 
60
- /**
61
- *
62
- */
63
- export class JobApi extends runtime.BaseAPI {
45
+ // Body Params
46
+ const contentType = ObjectSerializer.getPreferredMediaType([
47
+ "application/json"
48
+ ]);
49
+ requestContext.setHeaderParam("Content-Type", contentType);
50
+ const serializedBody = ObjectSerializer.stringify(
51
+ ObjectSerializer.serialize(createJobDto, "CreateJobDto", ""),
52
+ contentType
53
+ );
54
+ requestContext.setBody(serializedBody);
55
+
56
+ let authMethod: SecurityAuthentication | undefined;
57
+ // Apply auth methods
58
+ authMethod = _config.authMethods["ApiKeyAuthQuery"]
59
+ if (authMethod?.applySecurityAuthentication) {
60
+ await authMethod?.applySecurityAuthentication(requestContext);
61
+ }
62
+ // Apply auth methods
63
+ authMethod = _config.authMethods["ApiKeyAuthHeader"]
64
+ if (authMethod?.applySecurityAuthentication) {
65
+ await authMethod?.applySecurityAuthentication(requestContext);
66
+ }
67
+
68
+ const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
69
+ if (defaultAuth?.applySecurityAuthentication) {
70
+ await defaultAuth?.applySecurityAuthentication(requestContext);
71
+ }
72
+
73
+ return requestContext;
74
+ }
64
75
 
65
76
  /**
66
- * (Experimental) - Create a Job
77
+ * (Experimental) - Get a Job by id
78
+ * @param id
67
79
  */
68
- async createJobRaw(requestParameters: CreateJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JobDto>> {
69
- if (requestParameters.createJobDto === null || requestParameters.createJobDto === undefined) {
70
- throw new runtime.RequiredError('createJobDto','Required parameter requestParameters.createJobDto was null or undefined when calling createJob.');
80
+ public async getJobById(id: string, _options?: Configuration): Promise<RequestContext> {
81
+ let _config = _options || this.configuration;
82
+
83
+ // verify required parameter 'id' is not null or undefined
84
+ if (id === null || id === undefined) {
85
+ throw new RequiredError("JobApi", "getJobById", "id");
71
86
  }
72
87
 
73
- const queryParameters: any = {};
74
88
 
75
- const headerParameters: runtime.HTTPHeaders = {};
89
+ // Path Params
90
+ const localVarPath = '/v1/data_factory/jobs/{id}'
91
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
76
92
 
77
- headerParameters['Content-Type'] = 'application/json';
93
+ // Make Request Context
94
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
95
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
78
96
 
79
- if (this.configuration && this.configuration.apiKey) {
80
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // ApiKeyAuthQuery authentication
81
- }
82
97
 
83
- if (this.configuration && this.configuration.apiKey) {
84
- headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // ApiKeyAuthHeader authentication
98
+ let authMethod: SecurityAuthentication | undefined;
99
+ // Apply auth methods
100
+ authMethod = _config.authMethods["ApiKeyAuthQuery"]
101
+ if (authMethod?.applySecurityAuthentication) {
102
+ await authMethod?.applySecurityAuthentication(requestContext);
103
+ }
104
+ // Apply auth methods
105
+ authMethod = _config.authMethods["ApiKeyAuthHeader"]
106
+ if (authMethod?.applySecurityAuthentication) {
107
+ await authMethod?.applySecurityAuthentication(requestContext);
108
+ }
109
+
110
+ const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
111
+ if (defaultAuth?.applySecurityAuthentication) {
112
+ await defaultAuth?.applySecurityAuthentication(requestContext);
85
113
  }
86
114
 
87
- const response = await this.request({
88
- path: `/v1/data_factory/jobs`,
89
- method: 'POST',
90
- headers: headerParameters,
91
- query: queryParameters,
92
- body: CreateJobDtoToJSON(requestParameters.createJobDto),
93
- }, initOverrides);
94
-
95
- return new runtime.JSONApiResponse(response, (jsonValue) => JobDtoFromJSON(jsonValue));
115
+ return requestContext;
96
116
  }
97
117
 
98
118
  /**
99
- * (Experimental) - Create a Job
119
+ * (Experimental) - Get a list of Job
120
+ * @param size
121
+ * @param page
100
122
  */
101
- async createJob(requestParameters: CreateJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobDto> {
102
- const response = await this.createJobRaw(requestParameters, initOverrides);
103
- return await response.value();
104
- }
123
+ public async getJobs(size?: number, page?: number, _options?: Configuration): Promise<RequestContext> {
124
+ let _config = _options || this.configuration;
125
+
105
126
 
106
- /**
107
- * (Experimental) - Get a Job by id
108
- */
109
- async getJobByIdRaw(requestParameters: GetJobByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JobDto>> {
110
- if (requestParameters.id === null || requestParameters.id === undefined) {
111
- throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getJobById.');
112
- }
113
127
 
114
- const queryParameters: any = {};
128
+ // Path Params
129
+ const localVarPath = '/v1/data_factory/jobs';
115
130
 
116
- const headerParameters: runtime.HTTPHeaders = {};
131
+ // Make Request Context
132
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
133
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
117
134
 
118
- if (this.configuration && this.configuration.apiKey) {
119
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // ApiKeyAuthQuery authentication
135
+ // Query Params
136
+ if (size !== undefined) {
137
+ requestContext.setQueryParam("size", ObjectSerializer.serialize(size, "number", ""));
120
138
  }
121
139
 
122
- if (this.configuration && this.configuration.apiKey) {
123
- headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // ApiKeyAuthHeader authentication
140
+ // Query Params
141
+ if (page !== undefined) {
142
+ requestContext.setQueryParam("page", ObjectSerializer.serialize(page, "number", ""));
124
143
  }
125
144
 
126
- const response = await this.request({
127
- path: `/v1/data_factory/jobs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
128
- method: 'GET',
129
- headers: headerParameters,
130
- query: queryParameters,
131
- }, initOverrides);
132
145
 
133
- return new runtime.JSONApiResponse(response, (jsonValue) => JobDtoFromJSON(jsonValue));
134
- }
146
+ let authMethod: SecurityAuthentication | undefined;
147
+ // Apply auth methods
148
+ authMethod = _config.authMethods["ApiKeyAuthQuery"]
149
+ if (authMethod?.applySecurityAuthentication) {
150
+ await authMethod?.applySecurityAuthentication(requestContext);
151
+ }
152
+ // Apply auth methods
153
+ authMethod = _config.authMethods["ApiKeyAuthHeader"]
154
+ if (authMethod?.applySecurityAuthentication) {
155
+ await authMethod?.applySecurityAuthentication(requestContext);
156
+ }
157
+
158
+ const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
159
+ if (defaultAuth?.applySecurityAuthentication) {
160
+ await defaultAuth?.applySecurityAuthentication(requestContext);
161
+ }
135
162
 
136
- /**
137
- * (Experimental) - Get a Job by id
138
- */
139
- async getJobById(requestParameters: GetJobByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobDto> {
140
- const response = await this.getJobByIdRaw(requestParameters, initOverrides);
141
- return await response.value();
163
+ return requestContext;
142
164
  }
143
165
 
144
166
  /**
145
- * (Experimental) - Get a list of Job
167
+ * (Experimental) - Update a Job
168
+ * @param id
169
+ * @param updateJobDto
146
170
  */
147
- async getJobsRaw(requestParameters: GetJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetJobs200Response>> {
148
- const queryParameters: any = {};
171
+ public async updateJob(id: string, updateJobDto: UpdateJobDto, _options?: Configuration): Promise<RequestContext> {
172
+ let _config = _options || this.configuration;
149
173
 
150
- if (requestParameters.size !== undefined) {
151
- queryParameters['size'] = requestParameters.size;
174
+ // verify required parameter 'id' is not null or undefined
175
+ if (id === null || id === undefined) {
176
+ throw new RequiredError("JobApi", "updateJob", "id");
152
177
  }
153
178
 
154
- if (requestParameters.page !== undefined) {
155
- queryParameters['page'] = requestParameters.page;
179
+
180
+ // verify required parameter 'updateJobDto' is not null or undefined
181
+ if (updateJobDto === null || updateJobDto === undefined) {
182
+ throw new RequiredError("JobApi", "updateJob", "updateJobDto");
156
183
  }
157
184
 
158
- const headerParameters: runtime.HTTPHeaders = {};
159
185
 
160
- if (this.configuration && this.configuration.apiKey) {
161
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // ApiKeyAuthQuery authentication
162
- }
186
+ // Path Params
187
+ const localVarPath = '/v1/data_factory/jobs/{id}'
188
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
163
189
 
164
- if (this.configuration && this.configuration.apiKey) {
165
- headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // ApiKeyAuthHeader authentication
166
- }
190
+ // Make Request Context
191
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
192
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
167
193
 
168
- const response = await this.request({
169
- path: `/v1/data_factory/jobs`,
170
- method: 'GET',
171
- headers: headerParameters,
172
- query: queryParameters,
173
- }, initOverrides);
174
194
 
175
- return new runtime.JSONApiResponse(response, (jsonValue) => GetJobs200ResponseFromJSON(jsonValue));
176
- }
195
+ // Body Params
196
+ const contentType = ObjectSerializer.getPreferredMediaType([
197
+ "application/json"
198
+ ]);
199
+ requestContext.setHeaderParam("Content-Type", contentType);
200
+ const serializedBody = ObjectSerializer.stringify(
201
+ ObjectSerializer.serialize(updateJobDto, "UpdateJobDto", ""),
202
+ contentType
203
+ );
204
+ requestContext.setBody(serializedBody);
177
205
 
178
- /**
179
- * (Experimental) - Get a list of Job
180
- */
181
- async getJobs(requestParameters: GetJobsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetJobs200Response> {
182
- const response = await this.getJobsRaw(requestParameters, initOverrides);
183
- return await response.value();
206
+ let authMethod: SecurityAuthentication | undefined;
207
+ // Apply auth methods
208
+ authMethod = _config.authMethods["ApiKeyAuthQuery"]
209
+ if (authMethod?.applySecurityAuthentication) {
210
+ await authMethod?.applySecurityAuthentication(requestContext);
211
+ }
212
+ // Apply auth methods
213
+ authMethod = _config.authMethods["ApiKeyAuthHeader"]
214
+ if (authMethod?.applySecurityAuthentication) {
215
+ await authMethod?.applySecurityAuthentication(requestContext);
216
+ }
217
+
218
+ const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
219
+ if (defaultAuth?.applySecurityAuthentication) {
220
+ await defaultAuth?.applySecurityAuthentication(requestContext);
221
+ }
222
+
223
+ return requestContext;
184
224
  }
185
225
 
186
226
  /**
187
- * (Experimental) - Update a Job
227
+ * (Experimental) - Upload a zip to update a job
228
+ * @param id
229
+ * @param file
188
230
  */
189
- async updateJobRaw(requestParameters: UpdateJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JobDto>> {
190
- if (requestParameters.id === null || requestParameters.id === undefined) {
191
- throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateJob.');
231
+ public async updateJobZip(id: string, file: HttpFile, _options?: Configuration): Promise<RequestContext> {
232
+ let _config = _options || this.configuration;
233
+
234
+ // verify required parameter 'id' is not null or undefined
235
+ if (id === null || id === undefined) {
236
+ throw new RequiredError("JobApi", "updateJobZip", "id");
192
237
  }
193
238
 
194
- if (requestParameters.updateJobDto === null || requestParameters.updateJobDto === undefined) {
195
- throw new runtime.RequiredError('updateJobDto','Required parameter requestParameters.updateJobDto was null or undefined when calling updateJob.');
239
+
240
+ // verify required parameter 'file' is not null or undefined
241
+ if (file === null || file === undefined) {
242
+ throw new RequiredError("JobApi", "updateJobZip", "file");
196
243
  }
197
244
 
198
- const queryParameters: any = {};
199
245
 
200
- const headerParameters: runtime.HTTPHeaders = {};
246
+ // Path Params
247
+ const localVarPath = '/v1/data_factory/jobs/{id}/zip'
248
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
249
+
250
+ // Make Request Context
251
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
252
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
201
253
 
202
- headerParameters['Content-Type'] = 'application/json';
254
+ // Form Params
255
+ const useForm = canConsumeForm([
256
+ 'multipart/form-data',
257
+ ]);
203
258
 
204
- if (this.configuration && this.configuration.apiKey) {
205
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // ApiKeyAuthQuery authentication
259
+ let localVarFormParams
260
+ if (useForm) {
261
+ localVarFormParams = new FormData();
262
+ } else {
263
+ localVarFormParams = new URLSearchParams();
264
+ }
265
+
266
+ if (file !== undefined) {
267
+ // TODO: replace .append with .set
268
+ if (localVarFormParams instanceof FormData) {
269
+ localVarFormParams.append('file', file.data, file.name);
270
+ }
206
271
  }
207
272
 
208
- if (this.configuration && this.configuration.apiKey) {
209
- headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // ApiKeyAuthHeader authentication
273
+ requestContext.setBody(localVarFormParams);
274
+
275
+ if(!useForm) {
276
+ const contentType = ObjectSerializer.getPreferredMediaType([
277
+ "multipart/form-data"
278
+ ]);
279
+ requestContext.setHeaderParam("Content-Type", contentType);
210
280
  }
211
281
 
212
- const response = await this.request({
213
- path: `/v1/data_factory/jobs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
214
- method: 'PUT',
215
- headers: headerParameters,
216
- query: queryParameters,
217
- body: UpdateJobDtoToJSON(requestParameters.updateJobDto),
218
- }, initOverrides);
282
+ let authMethod: SecurityAuthentication | undefined;
283
+ // Apply auth methods
284
+ authMethod = _config.authMethods["ApiKeyAuthQuery"]
285
+ if (authMethod?.applySecurityAuthentication) {
286
+ await authMethod?.applySecurityAuthentication(requestContext);
287
+ }
288
+ // Apply auth methods
289
+ authMethod = _config.authMethods["ApiKeyAuthHeader"]
290
+ if (authMethod?.applySecurityAuthentication) {
291
+ await authMethod?.applySecurityAuthentication(requestContext);
292
+ }
293
+
294
+ const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
295
+ if (defaultAuth?.applySecurityAuthentication) {
296
+ await defaultAuth?.applySecurityAuthentication(requestContext);
297
+ }
219
298
 
220
- return new runtime.JSONApiResponse(response, (jsonValue) => JobDtoFromJSON(jsonValue));
299
+ return requestContext;
221
300
  }
222
301
 
302
+ }
303
+
304
+ export class JobApiResponseProcessor {
305
+
223
306
  /**
224
- * (Experimental) - Update a Job
307
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
308
+ * to the expected objects
309
+ *
310
+ * @params response Response returned by the server for a request to createJob
311
+ * @throws ApiException if the response code was not in [200, 299]
225
312
  */
226
- async updateJob(requestParameters: UpdateJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobDto> {
227
- const response = await this.updateJobRaw(requestParameters, initOverrides);
228
- return await response.value();
313
+ public async createJob(response: ResponseContext): Promise<JobDto > {
314
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
315
+ if (isCodeInRange("201", response.httpStatusCode)) {
316
+ const body: JobDto = ObjectSerializer.deserialize(
317
+ ObjectSerializer.parse(await response.body.text(), contentType),
318
+ "JobDto", ""
319
+ ) as JobDto;
320
+ return body;
321
+ }
322
+ if (isCodeInRange("400", response.httpStatusCode)) {
323
+ const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
324
+ ObjectSerializer.parse(await response.body.text(), contentType),
325
+ "GetJobExecutionById400Response", ""
326
+ ) as GetJobExecutionById400Response;
327
+ throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
328
+ }
329
+ if (isCodeInRange("401", response.httpStatusCode)) {
330
+ throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
331
+ }
332
+
333
+ // Work around for missing responses in specification, e.g. for petstore.yaml
334
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
335
+ const body: JobDto = ObjectSerializer.deserialize(
336
+ ObjectSerializer.parse(await response.body.text(), contentType),
337
+ "JobDto", ""
338
+ ) as JobDto;
339
+ return body;
340
+ }
341
+
342
+ throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
229
343
  }
230
344
 
231
345
  /**
232
- * (Experimental) - Upload a zip to update a job
346
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
347
+ * to the expected objects
348
+ *
349
+ * @params response Response returned by the server for a request to getJobById
350
+ * @throws ApiException if the response code was not in [200, 299]
233
351
  */
234
- async updateJobZipRaw(requestParameters: UpdateJobZipRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JobDto>> {
235
- if (requestParameters.id === null || requestParameters.id === undefined) {
236
- throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateJobZip.');
352
+ public async getJobById(response: ResponseContext): Promise<JobDto > {
353
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
354
+ if (isCodeInRange("200", response.httpStatusCode)) {
355
+ const body: JobDto = ObjectSerializer.deserialize(
356
+ ObjectSerializer.parse(await response.body.text(), contentType),
357
+ "JobDto", ""
358
+ ) as JobDto;
359
+ return body;
237
360
  }
238
-
239
- if (requestParameters.file === null || requestParameters.file === undefined) {
240
- throw new runtime.RequiredError('file','Required parameter requestParameters.file was null or undefined when calling updateJobZip.');
361
+ if (isCodeInRange("400", response.httpStatusCode)) {
362
+ const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
363
+ ObjectSerializer.parse(await response.body.text(), contentType),
364
+ "GetJobExecutionById400Response", ""
365
+ ) as GetJobExecutionById400Response;
366
+ throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
367
+ }
368
+ if (isCodeInRange("401", response.httpStatusCode)) {
369
+ throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
370
+ }
371
+ if (isCodeInRange("404", response.httpStatusCode)) {
372
+ throw new ApiException<undefined>(response.httpStatusCode, "Not found", undefined, response.headers);
241
373
  }
242
374
 
243
- const queryParameters: any = {};
375
+ // Work around for missing responses in specification, e.g. for petstore.yaml
376
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
377
+ const body: JobDto = ObjectSerializer.deserialize(
378
+ ObjectSerializer.parse(await response.body.text(), contentType),
379
+ "JobDto", ""
380
+ ) as JobDto;
381
+ return body;
382
+ }
244
383
 
245
- const headerParameters: runtime.HTTPHeaders = {};
384
+ throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
385
+ }
246
386
 
247
- if (this.configuration && this.configuration.apiKey) {
248
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // ApiKeyAuthQuery authentication
387
+ /**
388
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
389
+ * to the expected objects
390
+ *
391
+ * @params response Response returned by the server for a request to getJobs
392
+ * @throws ApiException if the response code was not in [200, 299]
393
+ */
394
+ public async getJobs(response: ResponseContext): Promise<GetJobs200Response > {
395
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
396
+ if (isCodeInRange("200", response.httpStatusCode)) {
397
+ const body: GetJobs200Response = ObjectSerializer.deserialize(
398
+ ObjectSerializer.parse(await response.body.text(), contentType),
399
+ "GetJobs200Response", ""
400
+ ) as GetJobs200Response;
401
+ return body;
402
+ }
403
+ if (isCodeInRange("400", response.httpStatusCode)) {
404
+ const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
405
+ ObjectSerializer.parse(await response.body.text(), contentType),
406
+ "GetJobExecutionById400Response", ""
407
+ ) as GetJobExecutionById400Response;
408
+ throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
409
+ }
410
+ if (isCodeInRange("401", response.httpStatusCode)) {
411
+ throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
249
412
  }
250
413
 
251
- if (this.configuration && this.configuration.apiKey) {
252
- headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // ApiKeyAuthHeader authentication
414
+ // Work around for missing responses in specification, e.g. for petstore.yaml
415
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
416
+ const body: GetJobs200Response = ObjectSerializer.deserialize(
417
+ ObjectSerializer.parse(await response.body.text(), contentType),
418
+ "GetJobs200Response", ""
419
+ ) as GetJobs200Response;
420
+ return body;
253
421
  }
254
422
 
255
- const consumes: runtime.Consume[] = [
256
- { contentType: 'multipart/form-data' },
257
- ];
258
- // @ts-ignore: canConsumeForm may be unused
259
- const canConsumeForm = runtime.canConsumeForm(consumes);
423
+ throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
424
+ }
260
425
 
261
- let formParams: { append(param: string, value: any): any };
262
- let useForm = false;
263
- // use FormData to transmit files using content-type "multipart/form-data"
264
- useForm = canConsumeForm;
265
- if (useForm) {
266
- formParams = new FormData();
267
- } else {
268
- formParams = new URLSearchParams();
426
+ /**
427
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
428
+ * to the expected objects
429
+ *
430
+ * @params response Response returned by the server for a request to updateJob
431
+ * @throws ApiException if the response code was not in [200, 299]
432
+ */
433
+ public async updateJob(response: ResponseContext): Promise<JobDto > {
434
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
435
+ if (isCodeInRange("201", response.httpStatusCode)) {
436
+ const body: JobDto = ObjectSerializer.deserialize(
437
+ ObjectSerializer.parse(await response.body.text(), contentType),
438
+ "JobDto", ""
439
+ ) as JobDto;
440
+ return body;
269
441
  }
270
-
271
- if (requestParameters.file !== undefined) {
272
- formParams.append('file', requestParameters.file as any);
442
+ if (isCodeInRange("400", response.httpStatusCode)) {
443
+ const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
444
+ ObjectSerializer.parse(await response.body.text(), contentType),
445
+ "GetJobExecutionById400Response", ""
446
+ ) as GetJobExecutionById400Response;
447
+ throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
448
+ }
449
+ if (isCodeInRange("401", response.httpStatusCode)) {
450
+ throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
273
451
  }
274
452
 
275
- const response = await this.request({
276
- path: `/v1/data_factory/jobs/{id}/zip`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
277
- method: 'PUT',
278
- headers: headerParameters,
279
- query: queryParameters,
280
- body: formParams,
281
- }, initOverrides);
453
+ // Work around for missing responses in specification, e.g. for petstore.yaml
454
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
455
+ const body: JobDto = ObjectSerializer.deserialize(
456
+ ObjectSerializer.parse(await response.body.text(), contentType),
457
+ "JobDto", ""
458
+ ) as JobDto;
459
+ return body;
460
+ }
282
461
 
283
- return new runtime.JSONApiResponse(response, (jsonValue) => JobDtoFromJSON(jsonValue));
462
+ throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
284
463
  }
285
464
 
286
465
  /**
287
- * (Experimental) - Upload a zip to update a job
466
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
467
+ * to the expected objects
468
+ *
469
+ * @params response Response returned by the server for a request to updateJobZip
470
+ * @throws ApiException if the response code was not in [200, 299]
288
471
  */
289
- async updateJobZip(requestParameters: UpdateJobZipRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobDto> {
290
- const response = await this.updateJobZipRaw(requestParameters, initOverrides);
291
- return await response.value();
472
+ public async updateJobZip(response: ResponseContext): Promise<JobDto > {
473
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
474
+ if (isCodeInRange("201", response.httpStatusCode)) {
475
+ const body: JobDto = ObjectSerializer.deserialize(
476
+ ObjectSerializer.parse(await response.body.text(), contentType),
477
+ "JobDto", ""
478
+ ) as JobDto;
479
+ return body;
480
+ }
481
+ if (isCodeInRange("400", response.httpStatusCode)) {
482
+ throw new ApiException<undefined>(response.httpStatusCode, "Bad Request - Malformed syntax", undefined, response.headers);
483
+ }
484
+ if (isCodeInRange("401", response.httpStatusCode)) {
485
+ throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
486
+ }
487
+ if (isCodeInRange("413", response.httpStatusCode)) {
488
+ const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
489
+ ObjectSerializer.parse(await response.body.text(), contentType),
490
+ "GetJobExecutionById400Response", ""
491
+ ) as GetJobExecutionById400Response;
492
+ throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Request Entity Too Large", body, response.headers);
493
+ }
494
+
495
+ // Work around for missing responses in specification, e.g. for petstore.yaml
496
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
497
+ const body: JobDto = ObjectSerializer.deserialize(
498
+ ObjectSerializer.parse(await response.body.text(), contentType),
499
+ "JobDto", ""
500
+ ) as JobDto;
501
+ return body;
502
+ }
503
+
504
+ throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
292
505
  }
293
506
 
294
507
  }