@product-live/api-sdk 2.4.1 → 2.8.1

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 +412 -208
  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 +418 -149
  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 -31
  22. package/dist/apis/JobApi.js +524 -171
  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 -24
  34. package/dist/apis/VariableApi.js +508 -119
  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 -9
  64. package/dist/models/CreateJobExecutionDto.js +29 -38
  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 -11
  73. package/dist/models/FileDto.js +47 -45
  74. package/dist/models/FileDto.js.map +1 -1
  75. package/dist/models/FindVariablesRequest.d.ts +24 -0
  76. package/dist/models/FindVariablesRequest.js +46 -0
  77. package/dist/models/FindVariablesRequest.js.map +1 -0
  78. package/dist/models/GetFiles200Response.d.ts +21 -0
  79. package/dist/models/GetFiles200Response.js +34 -0
  80. package/dist/models/GetFiles200Response.js.map +1 -0
  81. package/dist/models/GetJobExecutionById400Response.d.ts +17 -0
  82. package/dist/models/GetJobExecutionById400Response.js +22 -0
  83. package/dist/models/GetJobExecutionById400Response.js.map +1 -0
  84. package/dist/models/GetJobExecutions200Response.d.ts +21 -0
  85. package/dist/models/GetJobExecutions200Response.js +34 -0
  86. package/dist/models/GetJobExecutions200Response.js.map +1 -0
  87. package/dist/models/GetJobs200Response.d.ts +21 -0
  88. package/dist/models/GetJobs200Response.js +34 -0
  89. package/dist/models/GetJobs200Response.js.map +1 -0
  90. package/dist/models/GetTasks200Response.d.ts +21 -0
  91. package/dist/models/GetTasks200Response.js +34 -0
  92. package/dist/models/GetTasks200Response.js.map +1 -0
  93. package/dist/models/GetVariables200Response.d.ts +21 -0
  94. package/dist/models/GetVariables200Response.js +34 -0
  95. package/dist/models/GetVariables200Response.js.map +1 -0
  96. package/dist/models/HighOrderQuery.d.ts +20 -0
  97. package/dist/models/HighOrderQuery.js +28 -0
  98. package/dist/models/HighOrderQuery.js.map +1 -0
  99. package/dist/models/JobDto.d.ts +32 -28
  100. package/dist/models/JobDto.js +101 -74
  101. package/dist/models/JobDto.js.map +1 -1
  102. package/dist/models/JobExecutionDto.d.ts +28 -33
  103. package/dist/models/JobExecutionDto.js +83 -77
  104. package/dist/models/JobExecutionDto.js.map +1 -1
  105. package/dist/models/LowOrderQuery.d.ts +22 -0
  106. package/dist/models/LowOrderQuery.js +40 -0
  107. package/dist/models/LowOrderQuery.js.map +1 -0
  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 +18 -0
  118. package/dist/models/Query.js +22 -0
  119. package/dist/models/Query.js.map +1 -0
  120. package/dist/models/TaskDto.d.ts +25 -14
  121. package/dist/models/TaskDto.js +65 -54
  122. package/dist/models/TaskDto.js.map +1 -1
  123. package/dist/models/TaskExecutionDto.d.ts +25 -21
  124. package/dist/models/TaskExecutionDto.js +59 -58
  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 -20
  136. package/dist/models/VariableDto.js +65 -58
  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 -71
  166. package/models/CreateTaskDto.ts +43 -82
  167. package/models/CreateVariableDto.ts +46 -92
  168. package/models/FileDto.ts +53 -91
  169. package/models/FindVariablesRequest.ts +70 -0
  170. package/models/GetFiles200Response.ts +53 -0
  171. package/models/GetJobExecutionById400Response.ts +35 -0
  172. package/models/GetJobExecutions200Response.ts +53 -0
  173. package/models/GetJobs200Response.ts +53 -0
  174. package/models/GetTasks200Response.ts +53 -0
  175. package/models/GetVariables200Response.ts +53 -0
  176. package/models/HighOrderQuery.ts +46 -0
  177. package/models/JobDto.ts +117 -180
  178. package/models/JobExecutionDto.ts +95 -165
  179. package/models/LowOrderQuery.ts +60 -0
  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 +38 -0
  184. package/models/TaskDto.ts +74 -118
  185. package/models/TaskExecutionDto.ts +68 -123
  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 -128
  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 -20
  236. package/dist/models/index.js +0 -37
  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 -22
  264. package/runtime.ts +0 -425
@@ -1,128 +1,212 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
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.4.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.
13
- */
14
-
15
-
16
- import * as runtime from '../runtime';
17
- import type {
18
- JobExecutionControllerGetOne400Response,
19
- PatchTaskExecutionDto,
20
- TaskExecutionDto,
21
- } from '../models';
22
- import {
23
- JobExecutionControllerGetOne400ResponseFromJSON,
24
- JobExecutionControllerGetOne400ResponseToJSON,
25
- PatchTaskExecutionDtoFromJSON,
26
- PatchTaskExecutionDtoToJSON,
27
- TaskExecutionDtoFromJSON,
28
- TaskExecutionDtoToJSON,
29
- } from '../models';
30
-
31
- export interface TaskExecutionControllerGetOneRequest {
32
- id: string;
33
- }
34
-
35
- export interface TaskExecutionControllerPatchRequest {
36
- id: string;
37
- patchTaskExecutionDto: PatchTaskExecutionDto;
38
- }
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 { GetJobExecutionById400Response } from '../models/GetJobExecutionById400Response';
14
+ import { PatchTaskExecutionDto } from '../models/PatchTaskExecutionDto';
15
+ import { TaskExecutionDto } from '../models/TaskExecutionDto';
39
16
 
40
17
  /**
41
- *
18
+ * no description
42
19
  */
43
- export class TaskExecutionApi extends runtime.BaseAPI {
20
+ export class TaskExecutionApiRequestFactory extends BaseAPIRequestFactory {
44
21
 
45
22
  /**
46
23
  * (Experimental) - Get a Task execution by id
24
+ * @param id
47
25
  */
48
- async taskExecutionControllerGetOneRaw(requestParameters: TaskExecutionControllerGetOneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TaskExecutionDto>> {
49
- if (requestParameters.id === null || requestParameters.id === undefined) {
50
- throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling taskExecutionControllerGetOne.');
26
+ public async getTaskExecutionById(id: string, _options?: Configuration): Promise<RequestContext> {
27
+ let _config = _options || this.configuration;
28
+
29
+ // verify required parameter 'id' is not null or undefined
30
+ if (id === null || id === undefined) {
31
+ throw new RequiredError("TaskExecutionApi", "getTaskExecutionById", "id");
51
32
  }
52
33
 
53
- const queryParameters: any = {};
54
34
 
55
- const headerParameters: runtime.HTTPHeaders = {};
35
+ // Path Params
36
+ const localVarPath = '/v1/data_factory/task_executions/{id}'
37
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
56
38
 
57
- if (this.configuration && this.configuration.apiKey) {
58
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // ApiKeyAuthQuery authentication
59
- }
60
-
61
- if (this.configuration && this.configuration.apiKey) {
62
- headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // ApiKeyAuthHeader authentication
63
- }
39
+ // Make Request Context
40
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
41
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
64
42
 
65
- const response = await this.request({
66
- path: `/v1/data_factory/task_executions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
67
- method: 'GET',
68
- headers: headerParameters,
69
- query: queryParameters,
70
- }, initOverrides);
71
43
 
72
- return new runtime.JSONApiResponse(response, (jsonValue) => TaskExecutionDtoFromJSON(jsonValue));
73
- }
44
+ let authMethod: SecurityAuthentication | undefined;
45
+ // Apply auth methods
46
+ authMethod = _config.authMethods["ApiKeyAuthQuery"]
47
+ if (authMethod?.applySecurityAuthentication) {
48
+ await authMethod?.applySecurityAuthentication(requestContext);
49
+ }
50
+ // Apply auth methods
51
+ authMethod = _config.authMethods["ApiKeyAuthHeader"]
52
+ if (authMethod?.applySecurityAuthentication) {
53
+ await authMethod?.applySecurityAuthentication(requestContext);
54
+ }
55
+
56
+ const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
57
+ if (defaultAuth?.applySecurityAuthentication) {
58
+ await defaultAuth?.applySecurityAuthentication(requestContext);
59
+ }
74
60
 
75
- /**
76
- * (Experimental) - Get a Task execution by id
77
- */
78
- async taskExecutionControllerGetOne(requestParameters: TaskExecutionControllerGetOneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TaskExecutionDto> {
79
- const response = await this.taskExecutionControllerGetOneRaw(requestParameters, initOverrides);
80
- return await response.value();
61
+ return requestContext;
81
62
  }
82
63
 
83
64
  /**
84
65
  * (Experimental) - Update running task instance
66
+ * @param id
67
+ * @param patchTaskExecutionDto
85
68
  */
86
- async taskExecutionControllerPatchRaw(requestParameters: TaskExecutionControllerPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TaskExecutionDto>> {
87
- if (requestParameters.id === null || requestParameters.id === undefined) {
88
- throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling taskExecutionControllerPatch.');
69
+ public async patchTaskExecution(id: string, patchTaskExecutionDto: PatchTaskExecutionDto, _options?: Configuration): Promise<RequestContext> {
70
+ let _config = _options || this.configuration;
71
+
72
+ // verify required parameter 'id' is not null or undefined
73
+ if (id === null || id === undefined) {
74
+ throw new RequiredError("TaskExecutionApi", "patchTaskExecution", "id");
89
75
  }
90
76
 
91
- if (requestParameters.patchTaskExecutionDto === null || requestParameters.patchTaskExecutionDto === undefined) {
92
- throw new runtime.RequiredError('patchTaskExecutionDto','Required parameter requestParameters.patchTaskExecutionDto was null or undefined when calling taskExecutionControllerPatch.');
77
+
78
+ // verify required parameter 'patchTaskExecutionDto' is not null or undefined
79
+ if (patchTaskExecutionDto === null || patchTaskExecutionDto === undefined) {
80
+ throw new RequiredError("TaskExecutionApi", "patchTaskExecution", "patchTaskExecutionDto");
93
81
  }
94
82
 
95
- const queryParameters: any = {};
96
83
 
97
- const headerParameters: runtime.HTTPHeaders = {};
84
+ // Path Params
85
+ const localVarPath = '/v1/data_factory/task_executions/{id}'
86
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
87
+
88
+ // Make Request Context
89
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
90
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
91
+
98
92
 
99
- headerParameters['Content-Type'] = 'application/json';
93
+ // Body Params
94
+ const contentType = ObjectSerializer.getPreferredMediaType([
95
+ "application/json"
96
+ ]);
97
+ requestContext.setHeaderParam("Content-Type", contentType);
98
+ const serializedBody = ObjectSerializer.stringify(
99
+ ObjectSerializer.serialize(patchTaskExecutionDto, "PatchTaskExecutionDto", ""),
100
+ contentType
101
+ );
102
+ requestContext.setBody(serializedBody);
100
103
 
101
- if (this.configuration && this.configuration.apiKey) {
102
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // ApiKeyAuthQuery authentication
104
+ let authMethod: SecurityAuthentication | undefined;
105
+ // Apply auth methods
106
+ authMethod = _config.authMethods["ApiKeyAuthQuery"]
107
+ if (authMethod?.applySecurityAuthentication) {
108
+ await authMethod?.applySecurityAuthentication(requestContext);
103
109
  }
110
+ // Apply auth methods
111
+ authMethod = _config.authMethods["ApiKeyAuthHeader"]
112
+ if (authMethod?.applySecurityAuthentication) {
113
+ await authMethod?.applySecurityAuthentication(requestContext);
114
+ }
115
+
116
+ const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
117
+ if (defaultAuth?.applySecurityAuthentication) {
118
+ await defaultAuth?.applySecurityAuthentication(requestContext);
119
+ }
120
+
121
+ return requestContext;
122
+ }
123
+
124
+ }
104
125
 
105
- if (this.configuration && this.configuration.apiKey) {
106
- headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // ApiKeyAuthHeader authentication
126
+ export class TaskExecutionApiResponseProcessor {
127
+
128
+ /**
129
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
130
+ * to the expected objects
131
+ *
132
+ * @params response Response returned by the server for a request to getTaskExecutionById
133
+ * @throws ApiException if the response code was not in [200, 299]
134
+ */
135
+ public async getTaskExecutionById(response: ResponseContext): Promise<TaskExecutionDto > {
136
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
137
+ if (isCodeInRange("200", response.httpStatusCode)) {
138
+ const body: TaskExecutionDto = ObjectSerializer.deserialize(
139
+ ObjectSerializer.parse(await response.body.text(), contentType),
140
+ "TaskExecutionDto", ""
141
+ ) as TaskExecutionDto;
142
+ return body;
143
+ }
144
+ if (isCodeInRange("400", response.httpStatusCode)) {
145
+ const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
146
+ ObjectSerializer.parse(await response.body.text(), contentType),
147
+ "GetJobExecutionById400Response", ""
148
+ ) as GetJobExecutionById400Response;
149
+ throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
150
+ }
151
+ if (isCodeInRange("401", response.httpStatusCode)) {
152
+ throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
153
+ }
154
+ if (isCodeInRange("404", response.httpStatusCode)) {
155
+ throw new ApiException<undefined>(response.httpStatusCode, "Not found", undefined, response.headers);
107
156
  }
108
157
 
109
- const response = await this.request({
110
- path: `/v1/data_factory/task_executions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
111
- method: 'PATCH',
112
- headers: headerParameters,
113
- query: queryParameters,
114
- body: PatchTaskExecutionDtoToJSON(requestParameters.patchTaskExecutionDto),
115
- }, initOverrides);
158
+ // Work around for missing responses in specification, e.g. for petstore.yaml
159
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
160
+ const body: TaskExecutionDto = ObjectSerializer.deserialize(
161
+ ObjectSerializer.parse(await response.body.text(), contentType),
162
+ "TaskExecutionDto", ""
163
+ ) as TaskExecutionDto;
164
+ return body;
165
+ }
116
166
 
117
- return new runtime.JSONApiResponse(response, (jsonValue) => TaskExecutionDtoFromJSON(jsonValue));
167
+ throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
118
168
  }
119
169
 
120
170
  /**
121
- * (Experimental) - Update running task instance
171
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
172
+ * to the expected objects
173
+ *
174
+ * @params response Response returned by the server for a request to patchTaskExecution
175
+ * @throws ApiException if the response code was not in [200, 299]
122
176
  */
123
- async taskExecutionControllerPatch(requestParameters: TaskExecutionControllerPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TaskExecutionDto> {
124
- const response = await this.taskExecutionControllerPatchRaw(requestParameters, initOverrides);
125
- return await response.value();
177
+ public async patchTaskExecution(response: ResponseContext): Promise<TaskExecutionDto > {
178
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
179
+ if (isCodeInRange("200", response.httpStatusCode)) {
180
+ const body: TaskExecutionDto = ObjectSerializer.deserialize(
181
+ ObjectSerializer.parse(await response.body.text(), contentType),
182
+ "TaskExecutionDto", ""
183
+ ) as TaskExecutionDto;
184
+ return body;
185
+ }
186
+ if (isCodeInRange("400", response.httpStatusCode)) {
187
+ const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
188
+ ObjectSerializer.parse(await response.body.text(), contentType),
189
+ "GetJobExecutionById400Response", ""
190
+ ) as GetJobExecutionById400Response;
191
+ throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
192
+ }
193
+ if (isCodeInRange("401", response.httpStatusCode)) {
194
+ throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
195
+ }
196
+ if (isCodeInRange("404", response.httpStatusCode)) {
197
+ throw new ApiException<undefined>(response.httpStatusCode, "Not Found", undefined, response.headers);
198
+ }
199
+
200
+ // Work around for missing responses in specification, e.g. for petstore.yaml
201
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
202
+ const body: TaskExecutionDto = ObjectSerializer.deserialize(
203
+ ObjectSerializer.parse(await response.body.text(), contentType),
204
+ "TaskExecutionDto", ""
205
+ ) as TaskExecutionDto;
206
+ return body;
207
+ }
208
+
209
+ throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
126
210
  }
127
211
 
128
212
  }