@product-live/api-sdk 2.4.1 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +412 -208
- package/apis/JobExecutionApi.ts +237 -121
- package/apis/TaskApi.ts +458 -213
- package/apis/TaskExecutionApi.ts +174 -90
- package/apis/VariableApi.ts +418 -149
- 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 -31
- package/dist/apis/JobApi.js +524 -171
- 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 -24
- package/dist/apis/VariableApi.js +508 -119
- 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 -9
- package/dist/models/CreateJobExecutionDto.js +29 -38
- 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 -11
- package/dist/models/FileDto.js +47 -45
- package/dist/models/FileDto.js.map +1 -1
- package/dist/models/FindVariablesRequest.d.ts +24 -0
- package/dist/models/FindVariablesRequest.js +46 -0
- package/dist/models/FindVariablesRequest.js.map +1 -0
- package/dist/models/GetFiles200Response.d.ts +21 -0
- package/dist/models/GetFiles200Response.js +34 -0
- package/dist/models/GetFiles200Response.js.map +1 -0
- package/dist/models/GetJobExecutionById400Response.d.ts +17 -0
- package/dist/models/GetJobExecutionById400Response.js +22 -0
- package/dist/models/GetJobExecutionById400Response.js.map +1 -0
- package/dist/models/GetJobExecutions200Response.d.ts +21 -0
- package/dist/models/GetJobExecutions200Response.js +34 -0
- package/dist/models/GetJobExecutions200Response.js.map +1 -0
- package/dist/models/GetJobs200Response.d.ts +21 -0
- package/dist/models/GetJobs200Response.js +34 -0
- package/dist/models/GetJobs200Response.js.map +1 -0
- package/dist/models/GetTasks200Response.d.ts +21 -0
- package/dist/models/GetTasks200Response.js +34 -0
- package/dist/models/GetTasks200Response.js.map +1 -0
- package/dist/models/GetVariables200Response.d.ts +21 -0
- package/dist/models/GetVariables200Response.js +34 -0
- package/dist/models/GetVariables200Response.js.map +1 -0
- package/dist/models/HighOrderQuery.d.ts +20 -0
- package/dist/models/HighOrderQuery.js +28 -0
- package/dist/models/HighOrderQuery.js.map +1 -0
- package/dist/models/JobDto.d.ts +32 -28
- package/dist/models/JobDto.js +101 -74
- package/dist/models/JobDto.js.map +1 -1
- package/dist/models/JobExecutionDto.d.ts +28 -33
- package/dist/models/JobExecutionDto.js +83 -77
- package/dist/models/JobExecutionDto.js.map +1 -1
- package/dist/models/LowOrderQuery.d.ts +22 -0
- package/dist/models/LowOrderQuery.js +40 -0
- package/dist/models/LowOrderQuery.js.map +1 -0
- 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 +18 -0
- package/dist/models/Query.js +22 -0
- package/dist/models/Query.js.map +1 -0
- package/dist/models/TaskDto.d.ts +25 -14
- package/dist/models/TaskDto.js +65 -54
- package/dist/models/TaskDto.js.map +1 -1
- package/dist/models/TaskExecutionDto.d.ts +25 -21
- package/dist/models/TaskExecutionDto.js +59 -58
- 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 -20
- package/dist/models/VariableDto.js +65 -58
- 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 -71
- package/models/CreateTaskDto.ts +43 -82
- package/models/CreateVariableDto.ts +46 -92
- package/models/FileDto.ts +53 -91
- package/models/FindVariablesRequest.ts +70 -0
- package/models/GetFiles200Response.ts +53 -0
- package/models/GetJobExecutionById400Response.ts +35 -0
- package/models/GetJobExecutions200Response.ts +53 -0
- package/models/GetJobs200Response.ts +53 -0
- package/models/GetTasks200Response.ts +53 -0
- package/models/GetVariables200Response.ts +53 -0
- package/models/HighOrderQuery.ts +46 -0
- package/models/JobDto.ts +117 -180
- package/models/JobExecutionDto.ts +95 -165
- package/models/LowOrderQuery.ts +60 -0
- package/models/LowOrderQueryValue.ts +29 -0
- package/models/ObjectSerializer.ts +324 -0
- package/models/PatchTaskExecutionDto.ts +36 -78
- package/models/Query.ts +38 -0
- package/models/TaskDto.ts +74 -118
- package/models/TaskExecutionDto.ts +68 -123
- package/models/UpdateJobDto.ts +95 -153
- package/models/UpdateTaskDto.ts +50 -91
- package/models/UpdateVariableDto.ts +53 -101
- package/models/VariableDto.ts +75 -128
- 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 -20
- package/dist/models/index.js +0 -37
- 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 -22
- package/runtime.ts +0 -425
|
@@ -1,188 +1,307 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import * as runtime from '../runtime';
|
|
17
|
-
import type {
|
|
18
|
-
FileControllerGetFiles200Response,
|
|
19
|
-
FileDto,
|
|
20
|
-
JobExecutionControllerGetOne400Response,
|
|
21
|
-
} from '../models';
|
|
22
|
-
import {
|
|
23
|
-
FileControllerGetFiles200ResponseFromJSON,
|
|
24
|
-
FileControllerGetFiles200ResponseToJSON,
|
|
25
|
-
FileDtoFromJSON,
|
|
26
|
-
FileDtoToJSON,
|
|
27
|
-
JobExecutionControllerGetOne400ResponseFromJSON,
|
|
28
|
-
JobExecutionControllerGetOne400ResponseToJSON,
|
|
29
|
-
} from '../models';
|
|
30
|
-
|
|
31
|
-
export interface FileControllerGetFileByIdRequest {
|
|
32
|
-
id: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface FileControllerGetFilesRequest {
|
|
36
|
-
size?: number;
|
|
37
|
-
page?: number;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface UploadFileRequest {
|
|
41
|
-
file: Blob;
|
|
42
|
-
}
|
|
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 { FileDto } from '../models/FileDto';
|
|
14
|
+
import { GetFiles200Response } from '../models/GetFiles200Response';
|
|
15
|
+
import { GetJobExecutionById400Response } from '../models/GetJobExecutionById400Response';
|
|
43
16
|
|
|
44
17
|
/**
|
|
45
|
-
*
|
|
18
|
+
* no description
|
|
46
19
|
*/
|
|
47
|
-
export class
|
|
20
|
+
export class DataFactoryFileApiRequestFactory extends BaseAPIRequestFactory {
|
|
48
21
|
|
|
49
22
|
/**
|
|
50
23
|
* (Experimental) - Get a Data Factory File by id
|
|
24
|
+
* @param id
|
|
51
25
|
*/
|
|
52
|
-
async
|
|
53
|
-
|
|
54
|
-
|
|
26
|
+
public async getFileById(id: string, _options?: Configuration): Promise<RequestContext> {
|
|
27
|
+
let _config = _options || this.configuration;
|
|
28
|
+
|
|
29
|
+
// verify required parameter 'id' is not null or undefined
|
|
30
|
+
if (id === null || id === undefined) {
|
|
31
|
+
throw new RequiredError("DataFactoryFileApi", "getFileById", "id");
|
|
55
32
|
}
|
|
56
33
|
|
|
57
|
-
const queryParameters: any = {};
|
|
58
34
|
|
|
59
|
-
|
|
35
|
+
// Path Params
|
|
36
|
+
const localVarPath = '/v1/data_factory/files/{id}'
|
|
37
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
60
38
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
39
|
+
// Make Request Context
|
|
40
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
41
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
64
42
|
|
|
65
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
66
|
-
headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // ApiKeyAuthHeader authentication
|
|
67
|
-
}
|
|
68
43
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
44
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
45
|
+
// Apply auth methods
|
|
46
|
+
authMethod = _config.authMethods["ApiKeyAuthQuery"]
|
|
47
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
48
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
49
|
+
}
|
|
50
|
+
// Apply auth methods
|
|
51
|
+
authMethod = _config.authMethods["ApiKeyAuthHeader"]
|
|
52
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
53
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
57
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
58
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
59
|
+
}
|
|
75
60
|
|
|
76
|
-
return
|
|
61
|
+
return requestContext;
|
|
77
62
|
}
|
|
78
63
|
|
|
79
64
|
/**
|
|
80
|
-
* (Experimental) - Get a Data Factory File
|
|
65
|
+
* (Experimental) - Get a list of Data Factory File
|
|
66
|
+
* @param size
|
|
67
|
+
* @param page
|
|
81
68
|
*/
|
|
82
|
-
async
|
|
83
|
-
|
|
84
|
-
return await response.value();
|
|
85
|
-
}
|
|
69
|
+
public async getFiles(size?: number, page?: number, _options?: Configuration): Promise<RequestContext> {
|
|
70
|
+
let _config = _options || this.configuration;
|
|
86
71
|
|
|
87
|
-
/**
|
|
88
|
-
* (Experimental) - List files
|
|
89
|
-
*/
|
|
90
|
-
async fileControllerGetFilesRaw(requestParameters: FileControllerGetFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileControllerGetFiles200Response>> {
|
|
91
|
-
const queryParameters: any = {};
|
|
92
72
|
|
|
93
|
-
if (requestParameters.size !== undefined) {
|
|
94
|
-
queryParameters['size'] = requestParameters.size;
|
|
95
|
-
}
|
|
96
73
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
74
|
+
// Path Params
|
|
75
|
+
const localVarPath = '/v1/data_factory/files';
|
|
100
76
|
|
|
101
|
-
|
|
77
|
+
// Make Request Context
|
|
78
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
79
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
102
80
|
|
|
103
|
-
|
|
104
|
-
|
|
81
|
+
// Query Params
|
|
82
|
+
if (size !== undefined) {
|
|
83
|
+
requestContext.setQueryParam("size", ObjectSerializer.serialize(size, "number", ""));
|
|
105
84
|
}
|
|
106
85
|
|
|
107
|
-
|
|
108
|
-
|
|
86
|
+
// Query Params
|
|
87
|
+
if (page !== undefined) {
|
|
88
|
+
requestContext.setQueryParam("page", ObjectSerializer.serialize(page, "number", ""));
|
|
109
89
|
}
|
|
110
90
|
|
|
111
|
-
const response = await this.request({
|
|
112
|
-
path: `/v1/data_factory/files`,
|
|
113
|
-
method: 'GET',
|
|
114
|
-
headers: headerParameters,
|
|
115
|
-
query: queryParameters,
|
|
116
|
-
}, initOverrides);
|
|
117
91
|
|
|
118
|
-
|
|
119
|
-
|
|
92
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
93
|
+
// Apply auth methods
|
|
94
|
+
authMethod = _config.authMethods["ApiKeyAuthQuery"]
|
|
95
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
96
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
97
|
+
}
|
|
98
|
+
// Apply auth methods
|
|
99
|
+
authMethod = _config.authMethods["ApiKeyAuthHeader"]
|
|
100
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
101
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
105
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
106
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
107
|
+
}
|
|
120
108
|
|
|
121
|
-
|
|
122
|
-
* (Experimental) - List files
|
|
123
|
-
*/
|
|
124
|
-
async fileControllerGetFiles(requestParameters: FileControllerGetFilesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileControllerGetFiles200Response> {
|
|
125
|
-
const response = await this.fileControllerGetFilesRaw(requestParameters, initOverrides);
|
|
126
|
-
return await response.value();
|
|
109
|
+
return requestContext;
|
|
127
110
|
}
|
|
128
111
|
|
|
129
112
|
/**
|
|
130
113
|
* Post a file so it can be consume by a Data Factory job
|
|
114
|
+
* @param file
|
|
131
115
|
*/
|
|
132
|
-
async
|
|
133
|
-
|
|
134
|
-
|
|
116
|
+
public async uploadFile(file: HttpFile, _options?: Configuration): Promise<RequestContext> {
|
|
117
|
+
let _config = _options || this.configuration;
|
|
118
|
+
|
|
119
|
+
// verify required parameter 'file' is not null or undefined
|
|
120
|
+
if (file === null || file === undefined) {
|
|
121
|
+
throw new RequiredError("DataFactoryFileApi", "uploadFile", "file");
|
|
135
122
|
}
|
|
136
123
|
|
|
137
|
-
const queryParameters: any = {};
|
|
138
124
|
|
|
139
|
-
|
|
125
|
+
// Path Params
|
|
126
|
+
const localVarPath = '/v1/data_factory/files';
|
|
127
|
+
|
|
128
|
+
// Make Request Context
|
|
129
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
130
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
131
|
+
|
|
132
|
+
// Form Params
|
|
133
|
+
const useForm = canConsumeForm([
|
|
134
|
+
'multipart/form-data',
|
|
135
|
+
]);
|
|
140
136
|
|
|
141
|
-
|
|
142
|
-
|
|
137
|
+
let localVarFormParams
|
|
138
|
+
if (useForm) {
|
|
139
|
+
localVarFormParams = new FormData();
|
|
140
|
+
} else {
|
|
141
|
+
localVarFormParams = new URLSearchParams();
|
|
143
142
|
}
|
|
144
143
|
|
|
145
|
-
if (
|
|
146
|
-
|
|
144
|
+
if (file !== undefined) {
|
|
145
|
+
// TODO: replace .append with .set
|
|
146
|
+
if (localVarFormParams instanceof FormData) {
|
|
147
|
+
localVarFormParams.append('file', file.data, file.name);
|
|
148
|
+
}
|
|
147
149
|
}
|
|
148
150
|
|
|
149
|
-
|
|
150
|
-
{ contentType: 'multipart/form-data' },
|
|
151
|
-
];
|
|
152
|
-
// @ts-ignore: canConsumeForm may be unused
|
|
153
|
-
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
151
|
+
requestContext.setBody(localVarFormParams);
|
|
154
152
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
formParams = new FormData();
|
|
161
|
-
} else {
|
|
162
|
-
formParams = new URLSearchParams();
|
|
153
|
+
if(!useForm) {
|
|
154
|
+
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
155
|
+
"multipart/form-data"
|
|
156
|
+
]);
|
|
157
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
163
158
|
}
|
|
164
159
|
|
|
165
|
-
|
|
166
|
-
|
|
160
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
161
|
+
// Apply auth methods
|
|
162
|
+
authMethod = _config.authMethods["ApiKeyAuthQuery"]
|
|
163
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
164
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
165
|
+
}
|
|
166
|
+
// Apply auth methods
|
|
167
|
+
authMethod = _config.authMethods["ApiKeyAuthHeader"]
|
|
168
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
169
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
173
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
174
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
167
175
|
}
|
|
168
176
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
query: queryParameters,
|
|
174
|
-
body: formParams,
|
|
175
|
-
}, initOverrides);
|
|
177
|
+
return requestContext;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
}
|
|
176
181
|
|
|
177
|
-
|
|
182
|
+
export class DataFactoryFileApiResponseProcessor {
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
186
|
+
* to the expected objects
|
|
187
|
+
*
|
|
188
|
+
* @params response Response returned by the server for a request to getFileById
|
|
189
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
190
|
+
*/
|
|
191
|
+
public async getFileById(response: ResponseContext): Promise<FileDto > {
|
|
192
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
193
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
194
|
+
const body: FileDto = ObjectSerializer.deserialize(
|
|
195
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
196
|
+
"FileDto", ""
|
|
197
|
+
) as FileDto;
|
|
198
|
+
return body;
|
|
199
|
+
}
|
|
200
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
201
|
+
const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
|
|
202
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
203
|
+
"GetJobExecutionById400Response", ""
|
|
204
|
+
) as GetJobExecutionById400Response;
|
|
205
|
+
throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
|
|
206
|
+
}
|
|
207
|
+
if (isCodeInRange("401", response.httpStatusCode)) {
|
|
208
|
+
throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
209
|
+
}
|
|
210
|
+
if (isCodeInRange("404", response.httpStatusCode)) {
|
|
211
|
+
throw new ApiException<undefined>(response.httpStatusCode, "Not found", undefined, response.headers);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
215
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
216
|
+
const body: FileDto = ObjectSerializer.deserialize(
|
|
217
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
218
|
+
"FileDto", ""
|
|
219
|
+
) as FileDto;
|
|
220
|
+
return body;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
178
224
|
}
|
|
179
225
|
|
|
180
226
|
/**
|
|
181
|
-
*
|
|
227
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
228
|
+
* to the expected objects
|
|
229
|
+
*
|
|
230
|
+
* @params response Response returned by the server for a request to getFiles
|
|
231
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
182
232
|
*/
|
|
183
|
-
|
|
184
|
-
const
|
|
185
|
-
|
|
233
|
+
public async getFiles(response: ResponseContext): Promise<GetFiles200Response > {
|
|
234
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
235
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
236
|
+
const body: GetFiles200Response = ObjectSerializer.deserialize(
|
|
237
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
238
|
+
"GetFiles200Response", ""
|
|
239
|
+
) as GetFiles200Response;
|
|
240
|
+
return body;
|
|
241
|
+
}
|
|
242
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
243
|
+
const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
|
|
244
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
245
|
+
"GetJobExecutionById400Response", ""
|
|
246
|
+
) as GetJobExecutionById400Response;
|
|
247
|
+
throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Bad Request - Malformed syntax", body, response.headers);
|
|
248
|
+
}
|
|
249
|
+
if (isCodeInRange("401", response.httpStatusCode)) {
|
|
250
|
+
throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
254
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
255
|
+
const body: GetFiles200Response = ObjectSerializer.deserialize(
|
|
256
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
257
|
+
"GetFiles200Response", ""
|
|
258
|
+
) as GetFiles200Response;
|
|
259
|
+
return body;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
267
|
+
* to the expected objects
|
|
268
|
+
*
|
|
269
|
+
* @params response Response returned by the server for a request to uploadFile
|
|
270
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
271
|
+
*/
|
|
272
|
+
public async uploadFile(response: ResponseContext): Promise<FileDto > {
|
|
273
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
274
|
+
if (isCodeInRange("201", response.httpStatusCode)) {
|
|
275
|
+
const body: FileDto = ObjectSerializer.deserialize(
|
|
276
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
277
|
+
"FileDto", ""
|
|
278
|
+
) as FileDto;
|
|
279
|
+
return body;
|
|
280
|
+
}
|
|
281
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
282
|
+
throw new ApiException<undefined>(response.httpStatusCode, "Bad Request - Malformed syntax", undefined, response.headers);
|
|
283
|
+
}
|
|
284
|
+
if (isCodeInRange("401", response.httpStatusCode)) {
|
|
285
|
+
throw new ApiException<undefined>(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
286
|
+
}
|
|
287
|
+
if (isCodeInRange("413", response.httpStatusCode)) {
|
|
288
|
+
const body: GetJobExecutionById400Response = ObjectSerializer.deserialize(
|
|
289
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
290
|
+
"GetJobExecutionById400Response", ""
|
|
291
|
+
) as GetJobExecutionById400Response;
|
|
292
|
+
throw new ApiException<GetJobExecutionById400Response>(response.httpStatusCode, "Request Entity Too Large", body, response.headers);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
296
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
297
|
+
const body: FileDto = ObjectSerializer.deserialize(
|
|
298
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
299
|
+
"FileDto", ""
|
|
300
|
+
) as FileDto;
|
|
301
|
+
return body;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
186
305
|
}
|
|
187
306
|
|
|
188
307
|
}
|