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