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