@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.
- 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/VariableApi.ts
CHANGED
|
@@ -1,284 +1,495 @@
|
|
|
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 { CreateVariableDto } from '../models/CreateVariableDto';
|
|
14
|
+
import { FindVariablesRequest } from '../models/FindVariablesRequest';
|
|
15
|
+
import { GetJobExecutionById400Response } from '../models/GetJobExecutionById400Response';
|
|
16
|
+
import { GetVariables200Response } from '../models/GetVariables200Response';
|
|
17
|
+
import { UpdateVariableDto } from '../models/UpdateVariableDto';
|
|
18
|
+
import { VariableDto } from '../models/VariableDto';
|
|
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 VariableApiRequestFactory extends BaseAPIRequestFactory {
|
|
14
24
|
|
|
25
|
+
/**
|
|
26
|
+
* (Experimental) - Create a Variable
|
|
27
|
+
* @param createVariableDto
|
|
28
|
+
*/
|
|
29
|
+
public async createVariable(createVariableDto: CreateVariableDto, _options?: Configuration): Promise<RequestContext> {
|
|
30
|
+
let _config = _options || this.configuration;
|
|
15
31
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
GetJobExecutionById400Response,
|
|
21
|
-
GetVariables200Response,
|
|
22
|
-
UpdateVariableDto,
|
|
23
|
-
VariableDto,
|
|
24
|
-
} from '../models';
|
|
25
|
-
import {
|
|
26
|
-
CreateVariableDtoFromJSON,
|
|
27
|
-
CreateVariableDtoToJSON,
|
|
28
|
-
FindVariablesRequestFromJSON,
|
|
29
|
-
FindVariablesRequestToJSON,
|
|
30
|
-
GetJobExecutionById400ResponseFromJSON,
|
|
31
|
-
GetJobExecutionById400ResponseToJSON,
|
|
32
|
-
GetVariables200ResponseFromJSON,
|
|
33
|
-
GetVariables200ResponseToJSON,
|
|
34
|
-
UpdateVariableDtoFromJSON,
|
|
35
|
-
UpdateVariableDtoToJSON,
|
|
36
|
-
VariableDtoFromJSON,
|
|
37
|
-
VariableDtoToJSON,
|
|
38
|
-
} from '../models';
|
|
39
|
-
|
|
40
|
-
export interface CreateVariableRequest {
|
|
41
|
-
createVariableDto: CreateVariableDto;
|
|
42
|
-
}
|
|
32
|
+
// verify required parameter 'createVariableDto' is not null or undefined
|
|
33
|
+
if (createVariableDto === null || createVariableDto === undefined) {
|
|
34
|
+
throw new RequiredError("VariableApi", "createVariable", "createVariableDto");
|
|
35
|
+
}
|
|
43
36
|
|
|
44
|
-
export interface FindVariablesOperationRequest {
|
|
45
|
-
findVariablesRequest: FindVariablesRequest;
|
|
46
|
-
size?: number;
|
|
47
|
-
page?: number;
|
|
48
|
-
}
|
|
49
37
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
38
|
+
// Path Params
|
|
39
|
+
const localVarPath = '/v1/data_factory/variables';
|
|
53
40
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
41
|
+
// Make Request Context
|
|
42
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
43
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
58
44
|
|
|
59
|
-
export interface UpdateVariableRequest {
|
|
60
|
-
id: string;
|
|
61
|
-
updateVariableDto: UpdateVariableDto;
|
|
62
|
-
}
|
|
63
45
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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(createVariableDto, "CreateVariableDto", ""),
|
|
53
|
+
contentType
|
|
54
|
+
);
|
|
55
|
+
requestContext.setBody(serializedBody);
|
|
56
|
+
|
|
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
|
+
}
|
|
68
76
|
|
|
69
77
|
/**
|
|
70
|
-
* (Experimental) -
|
|
78
|
+
* (Experimental) - Find a list of Variable
|
|
79
|
+
* @param findVariablesRequest
|
|
80
|
+
* @param size
|
|
81
|
+
* @param page
|
|
71
82
|
*/
|
|
72
|
-
async
|
|
73
|
-
|
|
74
|
-
|
|
83
|
+
public async findVariables(findVariablesRequest: FindVariablesRequest, size?: number, page?: number, _options?: Configuration): Promise<RequestContext> {
|
|
84
|
+
let _config = _options || this.configuration;
|
|
85
|
+
|
|
86
|
+
// verify required parameter 'findVariablesRequest' is not null or undefined
|
|
87
|
+
if (findVariablesRequest === null || findVariablesRequest === undefined) {
|
|
88
|
+
throw new RequiredError("VariableApi", "findVariables", "findVariablesRequest");
|
|
75
89
|
}
|
|
76
90
|
|
|
77
|
-
const queryParameters: any = {};
|
|
78
91
|
|
|
79
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
80
92
|
|
|
81
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
82
93
|
|
|
83
|
-
|
|
84
|
-
|
|
94
|
+
// Path Params
|
|
95
|
+
const localVarPath = '/v1/data_factory/variables/find';
|
|
96
|
+
|
|
97
|
+
// Make Request Context
|
|
98
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
99
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
100
|
+
|
|
101
|
+
// Query Params
|
|
102
|
+
if (size !== undefined) {
|
|
103
|
+
requestContext.setQueryParam("size", ObjectSerializer.serialize(size, "number", ""));
|
|
85
104
|
}
|
|
86
105
|
|
|
87
|
-
|
|
88
|
-
|
|
106
|
+
// Query Params
|
|
107
|
+
if (page !== undefined) {
|
|
108
|
+
requestContext.setQueryParam("page", ObjectSerializer.serialize(page, "number", ""));
|
|
89
109
|
}
|
|
90
110
|
|
|
91
|
-
const response = await this.request({
|
|
92
|
-
path: `/v1/data_factory/variables`,
|
|
93
|
-
method: 'POST',
|
|
94
|
-
headers: headerParameters,
|
|
95
|
-
query: queryParameters,
|
|
96
|
-
body: CreateVariableDtoToJSON(requestParameters.createVariableDto),
|
|
97
|
-
}, initOverrides);
|
|
98
111
|
|
|
99
|
-
|
|
100
|
-
|
|
112
|
+
// Body Params
|
|
113
|
+
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
114
|
+
"application/json"
|
|
115
|
+
]);
|
|
116
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
117
|
+
const serializedBody = ObjectSerializer.stringify(
|
|
118
|
+
ObjectSerializer.serialize(findVariablesRequest, "FindVariablesRequest", ""),
|
|
119
|
+
contentType
|
|
120
|
+
);
|
|
121
|
+
requestContext.setBody(serializedBody);
|
|
122
|
+
|
|
123
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
124
|
+
// Apply auth methods
|
|
125
|
+
authMethod = _config.authMethods["ApiKeyAuthQuery"]
|
|
126
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
127
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
128
|
+
}
|
|
129
|
+
// Apply auth methods
|
|
130
|
+
authMethod = _config.authMethods["ApiKeyAuthHeader"]
|
|
131
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
132
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
136
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
137
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
138
|
+
}
|
|
101
139
|
|
|
102
|
-
|
|
103
|
-
* (Experimental) - Create a Variable
|
|
104
|
-
*/
|
|
105
|
-
async createVariable(requestParameters: CreateVariableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VariableDto> {
|
|
106
|
-
const response = await this.createVariableRaw(requestParameters, initOverrides);
|
|
107
|
-
return await response.value();
|
|
140
|
+
return requestContext;
|
|
108
141
|
}
|
|
109
142
|
|
|
110
143
|
/**
|
|
111
|
-
* (Experimental) -
|
|
144
|
+
* (Experimental) - Get a Variable by id
|
|
145
|
+
* @param id
|
|
112
146
|
*/
|
|
113
|
-
async
|
|
114
|
-
|
|
115
|
-
throw new runtime.RequiredError('findVariablesRequest','Required parameter requestParameters.findVariablesRequest was null or undefined when calling findVariables.');
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const queryParameters: any = {};
|
|
147
|
+
public async getVariableById(id: string, _options?: Configuration): Promise<RequestContext> {
|
|
148
|
+
let _config = _options || this.configuration;
|
|
119
149
|
|
|
120
|
-
|
|
121
|
-
|
|
150
|
+
// verify required parameter 'id' is not null or undefined
|
|
151
|
+
if (id === null || id === undefined) {
|
|
152
|
+
throw new RequiredError("VariableApi", "getVariableById", "id");
|
|
122
153
|
}
|
|
123
154
|
|
|
124
|
-
if (requestParameters.page !== undefined) {
|
|
125
|
-
queryParameters['page'] = requestParameters.page;
|
|
126
|
-
}
|
|
127
155
|
|
|
128
|
-
|
|
156
|
+
// Path Params
|
|
157
|
+
const localVarPath = '/v1/data_factory/variables/{id}'
|
|
158
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
129
159
|
|
|
130
|
-
|
|
160
|
+
// Make Request Context
|
|
161
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
162
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
131
163
|
|
|
132
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
133
|
-
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // ApiKeyAuthQuery authentication
|
|
134
|
-
}
|
|
135
164
|
|
|
136
|
-
|
|
137
|
-
|
|
165
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
166
|
+
// Apply auth methods
|
|
167
|
+
authMethod = _config.authMethods["ApiKeyAuthQuery"]
|
|
168
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
169
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
170
|
+
}
|
|
171
|
+
// Apply auth methods
|
|
172
|
+
authMethod = _config.authMethods["ApiKeyAuthHeader"]
|
|
173
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
174
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
178
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
179
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
138
180
|
}
|
|
139
181
|
|
|
140
|
-
|
|
141
|
-
path: `/v1/data_factory/variables/find`,
|
|
142
|
-
method: 'POST',
|
|
143
|
-
headers: headerParameters,
|
|
144
|
-
query: queryParameters,
|
|
145
|
-
body: FindVariablesRequestToJSON(requestParameters.findVariablesRequest),
|
|
146
|
-
}, initOverrides);
|
|
147
|
-
|
|
148
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => GetVariables200ResponseFromJSON(jsonValue));
|
|
182
|
+
return requestContext;
|
|
149
183
|
}
|
|
150
184
|
|
|
151
185
|
/**
|
|
152
|
-
* (Experimental) -
|
|
186
|
+
* (Experimental) - Get a list of Variable
|
|
187
|
+
* @param size
|
|
188
|
+
* @param page
|
|
153
189
|
*/
|
|
154
|
-
async
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
190
|
+
public async getVariables(size?: number, page?: number, _options?: Configuration): Promise<RequestContext> {
|
|
191
|
+
let _config = _options || this.configuration;
|
|
192
|
+
|
|
158
193
|
|
|
159
|
-
/**
|
|
160
|
-
* (Experimental) - Get a Variable by id
|
|
161
|
-
*/
|
|
162
|
-
async getVariableByIdRaw(requestParameters: GetVariableByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VariableDto>> {
|
|
163
|
-
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
164
|
-
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getVariableById.');
|
|
165
|
-
}
|
|
166
194
|
|
|
167
|
-
|
|
195
|
+
// Path Params
|
|
196
|
+
const localVarPath = '/v1/data_factory/variables';
|
|
168
197
|
|
|
169
|
-
|
|
198
|
+
// Make Request Context
|
|
199
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
200
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
170
201
|
|
|
171
|
-
|
|
172
|
-
|
|
202
|
+
// Query Params
|
|
203
|
+
if (size !== undefined) {
|
|
204
|
+
requestContext.setQueryParam("size", ObjectSerializer.serialize(size, "number", ""));
|
|
173
205
|
}
|
|
174
206
|
|
|
175
|
-
|
|
176
|
-
|
|
207
|
+
// Query Params
|
|
208
|
+
if (page !== undefined) {
|
|
209
|
+
requestContext.setQueryParam("page", ObjectSerializer.serialize(page, "number", ""));
|
|
177
210
|
}
|
|
178
211
|
|
|
179
|
-
const response = await this.request({
|
|
180
|
-
path: `/v1/data_factory/variables/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
181
|
-
method: 'GET',
|
|
182
|
-
headers: headerParameters,
|
|
183
|
-
query: queryParameters,
|
|
184
|
-
}, initOverrides);
|
|
185
212
|
|
|
186
|
-
|
|
187
|
-
|
|
213
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
214
|
+
// Apply auth methods
|
|
215
|
+
authMethod = _config.authMethods["ApiKeyAuthQuery"]
|
|
216
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
217
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
218
|
+
}
|
|
219
|
+
// Apply auth methods
|
|
220
|
+
authMethod = _config.authMethods["ApiKeyAuthHeader"]
|
|
221
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
222
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
226
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
227
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
228
|
+
}
|
|
188
229
|
|
|
189
|
-
|
|
190
|
-
* (Experimental) - Get a Variable by id
|
|
191
|
-
*/
|
|
192
|
-
async getVariableById(requestParameters: GetVariableByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VariableDto> {
|
|
193
|
-
const response = await this.getVariableByIdRaw(requestParameters, initOverrides);
|
|
194
|
-
return await response.value();
|
|
230
|
+
return requestContext;
|
|
195
231
|
}
|
|
196
232
|
|
|
197
233
|
/**
|
|
198
|
-
* (Experimental) -
|
|
234
|
+
* (Experimental) - Update a Variable
|
|
235
|
+
* @param id
|
|
236
|
+
* @param updateVariableDto
|
|
199
237
|
*/
|
|
200
|
-
async
|
|
201
|
-
|
|
238
|
+
public async updateVariable(id: string, updateVariableDto: UpdateVariableDto, _options?: Configuration): Promise<RequestContext> {
|
|
239
|
+
let _config = _options || this.configuration;
|
|
202
240
|
|
|
203
|
-
|
|
204
|
-
|
|
241
|
+
// verify required parameter 'id' is not null or undefined
|
|
242
|
+
if (id === null || id === undefined) {
|
|
243
|
+
throw new RequiredError("VariableApi", "updateVariable", "id");
|
|
205
244
|
}
|
|
206
245
|
|
|
207
|
-
|
|
208
|
-
|
|
246
|
+
|
|
247
|
+
// verify required parameter 'updateVariableDto' is not null or undefined
|
|
248
|
+
if (updateVariableDto === null || updateVariableDto === undefined) {
|
|
249
|
+
throw new RequiredError("VariableApi", "updateVariable", "updateVariableDto");
|
|
209
250
|
}
|
|
210
251
|
|
|
211
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
212
252
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
253
|
+
// Path Params
|
|
254
|
+
const localVarPath = '/v1/data_factory/variables/{id}'
|
|
255
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
256
|
+
|
|
257
|
+
// Make Request Context
|
|
258
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
|
|
259
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
216
260
|
|
|
217
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
218
|
-
headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // ApiKeyAuthHeader authentication
|
|
219
|
-
}
|
|
220
261
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
262
|
+
// Body Params
|
|
263
|
+
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
264
|
+
"application/json"
|
|
265
|
+
]);
|
|
266
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
267
|
+
const serializedBody = ObjectSerializer.stringify(
|
|
268
|
+
ObjectSerializer.serialize(updateVariableDto, "UpdateVariableDto", ""),
|
|
269
|
+
contentType
|
|
270
|
+
);
|
|
271
|
+
requestContext.setBody(serializedBody);
|
|
227
272
|
|
|
228
|
-
|
|
273
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
274
|
+
// Apply auth methods
|
|
275
|
+
authMethod = _config.authMethods["ApiKeyAuthQuery"]
|
|
276
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
277
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
278
|
+
}
|
|
279
|
+
// Apply auth methods
|
|
280
|
+
authMethod = _config.authMethods["ApiKeyAuthHeader"]
|
|
281
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
282
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
286
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
287
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
return requestContext;
|
|
229
291
|
}
|
|
230
292
|
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export class VariableApiResponseProcessor {
|
|
296
|
+
|
|
231
297
|
/**
|
|
232
|
-
*
|
|
298
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
299
|
+
* to the expected objects
|
|
300
|
+
*
|
|
301
|
+
* @params response Response returned by the server for a request to createVariable
|
|
302
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
233
303
|
*/
|
|
234
|
-
|
|
235
|
-
const
|
|
236
|
-
|
|
304
|
+
public async createVariable(response: ResponseContext): Promise<VariableDto > {
|
|
305
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
306
|
+
if (isCodeInRange("201", response.httpStatusCode)) {
|
|
307
|
+
const body: VariableDto = ObjectSerializer.deserialize(
|
|
308
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
309
|
+
"VariableDto", ""
|
|
310
|
+
) as VariableDto;
|
|
311
|
+
return body;
|
|
312
|
+
}
|
|
313
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
314
|
+
const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
|
|
315
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
316
|
+
"GetJobExecutionById400Response", ""
|
|
317
|
+
) as GetJobExecutionById400Response;
|
|
318
|
+
throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
|
|
319
|
+
}
|
|
320
|
+
if (isCodeInRange("401", response.httpStatusCode)) {
|
|
321
|
+
throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
325
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
326
|
+
const body: VariableDto = ObjectSerializer.deserialize(
|
|
327
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
328
|
+
"VariableDto", ""
|
|
329
|
+
) as VariableDto;
|
|
330
|
+
return body;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
237
334
|
}
|
|
238
335
|
|
|
239
336
|
/**
|
|
240
|
-
*
|
|
337
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
338
|
+
* to the expected objects
|
|
339
|
+
*
|
|
340
|
+
* @params response Response returned by the server for a request to findVariables
|
|
341
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
241
342
|
*/
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
343
|
+
public async findVariables(response: ResponseContext): Promise<GetVariables200Response > {
|
|
344
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
345
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
346
|
+
const body: GetVariables200Response = ObjectSerializer.deserialize(
|
|
347
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
348
|
+
"GetVariables200Response", ""
|
|
349
|
+
) as GetVariables200Response;
|
|
350
|
+
return body;
|
|
245
351
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
352
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
353
|
+
const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
|
|
354
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
355
|
+
"GetJobExecutionById400Response", ""
|
|
356
|
+
) as GetJobExecutionById400Response;
|
|
357
|
+
throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
|
|
358
|
+
}
|
|
359
|
+
if (isCodeInRange("401", response.httpStatusCode)) {
|
|
360
|
+
throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
249
361
|
}
|
|
250
362
|
|
|
251
|
-
|
|
363
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
364
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
365
|
+
const body: GetVariables200Response = ObjectSerializer.deserialize(
|
|
366
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
367
|
+
"GetVariables200Response", ""
|
|
368
|
+
) as GetVariables200Response;
|
|
369
|
+
return body;
|
|
370
|
+
}
|
|
252
371
|
|
|
253
|
-
|
|
372
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
373
|
+
}
|
|
254
374
|
|
|
255
|
-
|
|
375
|
+
/**
|
|
376
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
377
|
+
* to the expected objects
|
|
378
|
+
*
|
|
379
|
+
* @params response Response returned by the server for a request to getVariableById
|
|
380
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
381
|
+
*/
|
|
382
|
+
public async getVariableById(response: ResponseContext): Promise<VariableDto > {
|
|
383
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
384
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
385
|
+
const body: VariableDto = ObjectSerializer.deserialize(
|
|
386
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
387
|
+
"VariableDto", ""
|
|
388
|
+
) as VariableDto;
|
|
389
|
+
return body;
|
|
390
|
+
}
|
|
391
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
392
|
+
const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
|
|
393
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
394
|
+
"GetJobExecutionById400Response", ""
|
|
395
|
+
) as GetJobExecutionById400Response;
|
|
396
|
+
throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
|
|
397
|
+
}
|
|
398
|
+
if (isCodeInRange("401", response.httpStatusCode)) {
|
|
399
|
+
throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
400
|
+
}
|
|
401
|
+
if (isCodeInRange("404", response.httpStatusCode)) {
|
|
402
|
+
throw new ApiException<undefined>(response.httpStatusCode, "Not found", undefined, response.headers);
|
|
403
|
+
}
|
|
256
404
|
|
|
257
|
-
|
|
258
|
-
|
|
405
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
406
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
407
|
+
const body: VariableDto = ObjectSerializer.deserialize(
|
|
408
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
409
|
+
"VariableDto", ""
|
|
410
|
+
) as VariableDto;
|
|
411
|
+
return body;
|
|
259
412
|
}
|
|
260
413
|
|
|
261
|
-
|
|
262
|
-
|
|
414
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
419
|
+
* to the expected objects
|
|
420
|
+
*
|
|
421
|
+
* @params response Response returned by the server for a request to getVariables
|
|
422
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
423
|
+
*/
|
|
424
|
+
public async getVariables(response: ResponseContext): Promise<GetVariables200Response > {
|
|
425
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
426
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
427
|
+
const body: GetVariables200Response = ObjectSerializer.deserialize(
|
|
428
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
429
|
+
"GetVariables200Response", ""
|
|
430
|
+
) as GetVariables200Response;
|
|
431
|
+
return body;
|
|
432
|
+
}
|
|
433
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
434
|
+
const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
|
|
435
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
436
|
+
"GetJobExecutionById400Response", ""
|
|
437
|
+
) as GetJobExecutionById400Response;
|
|
438
|
+
throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
|
|
439
|
+
}
|
|
440
|
+
if (isCodeInRange("401", response.httpStatusCode)) {
|
|
441
|
+
throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
263
442
|
}
|
|
264
443
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
444
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
445
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
446
|
+
const body: GetVariables200Response = ObjectSerializer.deserialize(
|
|
447
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
448
|
+
"GetVariables200Response", ""
|
|
449
|
+
) as GetVariables200Response;
|
|
450
|
+
return body;
|
|
451
|
+
}
|
|
272
452
|
|
|
273
|
-
|
|
453
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
274
454
|
}
|
|
275
455
|
|
|
276
456
|
/**
|
|
277
|
-
*
|
|
457
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
458
|
+
* to the expected objects
|
|
459
|
+
*
|
|
460
|
+
* @params response Response returned by the server for a request to updateVariable
|
|
461
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
278
462
|
*/
|
|
279
|
-
|
|
280
|
-
const
|
|
281
|
-
|
|
463
|
+
public async updateVariable(response: ResponseContext): Promise<VariableDto > {
|
|
464
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
465
|
+
if (isCodeInRange("201", response.httpStatusCode)) {
|
|
466
|
+
const body: VariableDto = ObjectSerializer.deserialize(
|
|
467
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
468
|
+
"VariableDto", ""
|
|
469
|
+
) as VariableDto;
|
|
470
|
+
return body;
|
|
471
|
+
}
|
|
472
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
473
|
+
const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
|
|
474
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
475
|
+
"GetJobExecutionById400Response", ""
|
|
476
|
+
) as GetJobExecutionById400Response;
|
|
477
|
+
throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
|
|
478
|
+
}
|
|
479
|
+
if (isCodeInRange("401", response.httpStatusCode)) {
|
|
480
|
+
throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
484
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
485
|
+
const body: VariableDto = ObjectSerializer.deserialize(
|
|
486
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
487
|
+
"VariableDto", ""
|
|
488
|
+
) as VariableDto;
|
|
489
|
+
return body;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
282
493
|
}
|
|
283
494
|
|
|
284
495
|
}
|