@explo-tech/fido-api 0.0.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/api/apis.ts +20 -0
- package/api/datasourceResourceApi.ts +412 -0
- package/api/healthResourceApi.ts +239 -0
- package/api/namespaceResourceApi.ts +389 -0
- package/api/queryResourceApi.ts +261 -0
- package/api.ts +3 -0
- package/model/computedViewRunRequest.ts +50 -0
- package/model/dataPage.ts +32 -0
- package/model/dataRequestParameters.ts +38 -0
- package/model/dataResponseMetadata.ts +44 -0
- package/model/dataSchema.ts +32 -0
- package/model/dataSource.ts +56 -0
- package/model/dataSourceConfiguration.ts +31 -0
- package/model/dataSourceRequest.ts +32 -0
- package/model/dataSourceTablePreviewRequest.ts +38 -0
- package/model/models.ts +282 -0
- package/model/namespace.ts +37 -0
- package/model/namespaceRequest.ts +32 -0
- package/model/namespaceResponseMetadata.ts +32 -0
- package/model/pagingConfiguration.ts +37 -0
- package/model/propertySchema.ts +52 -0
- package/model/propertyType.ts +24 -0
- package/model/record.ts +31 -0
- package/model/v1NamespacesIdGet200Response.ts +39 -0
- package/model/v1NamespacesIdGet200ResponseMeta.ts +32 -0
- package/model/v1NamespacesIdGet4xxResponse.ts +37 -0
- package/model/v1NamespacesNamespaceIdDataSourcesDataSourceIdPreviewPost200Response.ts +51 -0
- package/model/v1NamespacesNamespaceIdDataSourcesIdGet200Response.ts +32 -0
- package/package.json +18 -0
package/api/apis.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from './datasourceResourceApi';
|
|
2
|
+
import { DatasourceResourceApi } from './datasourceResourceApi';
|
|
3
|
+
export * from './healthResourceApi';
|
|
4
|
+
import { HealthResourceApi } from './healthResourceApi';
|
|
5
|
+
export * from './namespaceResourceApi';
|
|
6
|
+
import { NamespaceResourceApi } from './namespaceResourceApi';
|
|
7
|
+
export * from './queryResourceApi';
|
|
8
|
+
import { QueryResourceApi } from './queryResourceApi';
|
|
9
|
+
import * as http from 'http';
|
|
10
|
+
|
|
11
|
+
export class HttpError extends Error {
|
|
12
|
+
constructor (public response: http.IncomingMessage, public body: any, public statusCode?: number) {
|
|
13
|
+
super('HTTP request failed');
|
|
14
|
+
this.name = 'HttpError';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { RequestFile } from '../model/models';
|
|
19
|
+
|
|
20
|
+
export const APIS = [DatasourceResourceApi, HealthResourceApi, NamespaceResourceApi, QueryResourceApi];
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* fido API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: unspecified
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import localVarRequest from 'request';
|
|
15
|
+
import http from 'http';
|
|
16
|
+
|
|
17
|
+
/* tslint:disable:no-unused-locals */
|
|
18
|
+
import { DataSourceRequest } from '../model/dataSourceRequest';
|
|
19
|
+
import { V1NamespacesIdGet4xxResponse } from '../model/v1NamespacesIdGet4xxResponse';
|
|
20
|
+
import { V1NamespacesNamespaceIdDataSourcesIdGet200Response } from '../model/v1NamespacesNamespaceIdDataSourcesIdGet200Response';
|
|
21
|
+
|
|
22
|
+
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
23
|
+
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
|
24
|
+
|
|
25
|
+
import { HttpError, RequestFile } from './apis';
|
|
26
|
+
|
|
27
|
+
let defaultBasePath = 'http://localhost';
|
|
28
|
+
|
|
29
|
+
// ===============================================
|
|
30
|
+
// This file is autogenerated - Please do not edit
|
|
31
|
+
// ===============================================
|
|
32
|
+
|
|
33
|
+
export enum DatasourceResourceApiApiKeys {
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class DatasourceResourceApi {
|
|
37
|
+
protected _basePath = defaultBasePath;
|
|
38
|
+
protected _defaultHeaders : any = {};
|
|
39
|
+
protected _useQuerystring : boolean = false;
|
|
40
|
+
|
|
41
|
+
protected authentications = {
|
|
42
|
+
'default': <Authentication>new VoidAuth(),
|
|
43
|
+
'SecurityScheme': new HttpBasicAuth(),
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
protected interceptors: Interceptor[] = [];
|
|
47
|
+
|
|
48
|
+
constructor(basePath?: string);
|
|
49
|
+
constructor(username: string, password: string, basePath?: string);
|
|
50
|
+
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
51
|
+
if (password) {
|
|
52
|
+
this.username = basePathOrUsername;
|
|
53
|
+
this.password = password
|
|
54
|
+
if (basePath) {
|
|
55
|
+
this.basePath = basePath;
|
|
56
|
+
}
|
|
57
|
+
} else {
|
|
58
|
+
if (basePathOrUsername) {
|
|
59
|
+
this.basePath = basePathOrUsername
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
set useQuerystring(value: boolean) {
|
|
65
|
+
this._useQuerystring = value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
set basePath(basePath: string) {
|
|
69
|
+
this._basePath = basePath;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
set defaultHeaders(defaultHeaders: any) {
|
|
73
|
+
this._defaultHeaders = defaultHeaders;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
get defaultHeaders() {
|
|
77
|
+
return this._defaultHeaders;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
get basePath() {
|
|
81
|
+
return this._basePath;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
85
|
+
this.authentications.default = auth;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
public setApiKey(key: DatasourceResourceApiApiKeys, value: string) {
|
|
89
|
+
(this.authentications as any)[DatasourceResourceApiApiKeys[key]].apiKey = value;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
set username(username: string) {
|
|
93
|
+
this.authentications.SecurityScheme.username = username;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
set password(password: string) {
|
|
97
|
+
this.authentications.SecurityScheme.password = password;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
101
|
+
this.interceptors.push(interceptor);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @summary Deletes a data source
|
|
107
|
+
* @param id
|
|
108
|
+
* @param namespaceId
|
|
109
|
+
*/
|
|
110
|
+
public async v1NamespacesNamespaceIdDataSourcesIdDelete (id: string, namespaceId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
|
111
|
+
const localVarPath = this.basePath + '/v1/namespaces/{namespaceId}/data-sources/{id}'
|
|
112
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
|
|
113
|
+
.replace('{' + 'namespaceId' + '}', encodeURIComponent(String(namespaceId)));
|
|
114
|
+
let localVarQueryParameters: any = {};
|
|
115
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
116
|
+
const produces = ['application/json'];
|
|
117
|
+
// give precedence to 'application/json'
|
|
118
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
119
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
120
|
+
} else {
|
|
121
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
122
|
+
}
|
|
123
|
+
let localVarFormParams: any = {};
|
|
124
|
+
|
|
125
|
+
// verify required parameter 'id' is not null or undefined
|
|
126
|
+
if (id === null || id === undefined) {
|
|
127
|
+
throw new Error('Required parameter id was null or undefined when calling v1NamespacesNamespaceIdDataSourcesIdDelete.');
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// verify required parameter 'namespaceId' is not null or undefined
|
|
131
|
+
if (namespaceId === null || namespaceId === undefined) {
|
|
132
|
+
throw new Error('Required parameter namespaceId was null or undefined when calling v1NamespacesNamespaceIdDataSourcesIdDelete.');
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
136
|
+
|
|
137
|
+
let localVarUseFormData = false;
|
|
138
|
+
|
|
139
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
140
|
+
method: 'DELETE',
|
|
141
|
+
qs: localVarQueryParameters,
|
|
142
|
+
headers: localVarHeaderParams,
|
|
143
|
+
uri: localVarPath,
|
|
144
|
+
useQuerystring: this._useQuerystring,
|
|
145
|
+
json: true,
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
let authenticationPromise = Promise.resolve();
|
|
149
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
150
|
+
|
|
151
|
+
let interceptorPromise = authenticationPromise;
|
|
152
|
+
for (const interceptor of this.interceptors) {
|
|
153
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return interceptorPromise.then(() => {
|
|
157
|
+
if (Object.keys(localVarFormParams).length) {
|
|
158
|
+
if (localVarUseFormData) {
|
|
159
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
160
|
+
} else {
|
|
161
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
|
165
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
166
|
+
if (error) {
|
|
167
|
+
reject(error);
|
|
168
|
+
} else {
|
|
169
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
170
|
+
body = ObjectSerializer.deserialize(body, "object");
|
|
171
|
+
resolve({ response: response, body: body });
|
|
172
|
+
} else {
|
|
173
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
*
|
|
182
|
+
* @summary Gets a data source
|
|
183
|
+
* @param id
|
|
184
|
+
* @param namespaceId
|
|
185
|
+
*/
|
|
186
|
+
public async v1NamespacesNamespaceIdDataSourcesIdGet (id: string, namespaceId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: V1NamespacesNamespaceIdDataSourcesIdGet200Response; }> {
|
|
187
|
+
const localVarPath = this.basePath + '/v1/namespaces/{namespaceId}/data-sources/{id}'
|
|
188
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
|
|
189
|
+
.replace('{' + 'namespaceId' + '}', encodeURIComponent(String(namespaceId)));
|
|
190
|
+
let localVarQueryParameters: any = {};
|
|
191
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
192
|
+
const produces = ['application/json'];
|
|
193
|
+
// give precedence to 'application/json'
|
|
194
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
195
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
196
|
+
} else {
|
|
197
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
198
|
+
}
|
|
199
|
+
let localVarFormParams: any = {};
|
|
200
|
+
|
|
201
|
+
// verify required parameter 'id' is not null or undefined
|
|
202
|
+
if (id === null || id === undefined) {
|
|
203
|
+
throw new Error('Required parameter id was null or undefined when calling v1NamespacesNamespaceIdDataSourcesIdGet.');
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// verify required parameter 'namespaceId' is not null or undefined
|
|
207
|
+
if (namespaceId === null || namespaceId === undefined) {
|
|
208
|
+
throw new Error('Required parameter namespaceId was null or undefined when calling v1NamespacesNamespaceIdDataSourcesIdGet.');
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
212
|
+
|
|
213
|
+
let localVarUseFormData = false;
|
|
214
|
+
|
|
215
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
216
|
+
method: 'GET',
|
|
217
|
+
qs: localVarQueryParameters,
|
|
218
|
+
headers: localVarHeaderParams,
|
|
219
|
+
uri: localVarPath,
|
|
220
|
+
useQuerystring: this._useQuerystring,
|
|
221
|
+
json: true,
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
let authenticationPromise = Promise.resolve();
|
|
225
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
226
|
+
|
|
227
|
+
let interceptorPromise = authenticationPromise;
|
|
228
|
+
for (const interceptor of this.interceptors) {
|
|
229
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return interceptorPromise.then(() => {
|
|
233
|
+
if (Object.keys(localVarFormParams).length) {
|
|
234
|
+
if (localVarUseFormData) {
|
|
235
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
236
|
+
} else {
|
|
237
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return new Promise<{ response: http.IncomingMessage; body: V1NamespacesNamespaceIdDataSourcesIdGet200Response; }>((resolve, reject) => {
|
|
241
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
242
|
+
if (error) {
|
|
243
|
+
reject(error);
|
|
244
|
+
} else {
|
|
245
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
246
|
+
body = ObjectSerializer.deserialize(body, "V1NamespacesNamespaceIdDataSourcesIdGet200Response");
|
|
247
|
+
resolve({ response: response, body: body });
|
|
248
|
+
} else {
|
|
249
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
*
|
|
258
|
+
* @summary Creates a data source
|
|
259
|
+
* @param id
|
|
260
|
+
* @param namespaceId
|
|
261
|
+
* @param dataSourceRequest
|
|
262
|
+
*/
|
|
263
|
+
public async v1NamespacesNamespaceIdDataSourcesIdPost (id: string, namespaceId: string, dataSourceRequest?: DataSourceRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: V1NamespacesNamespaceIdDataSourcesIdGet200Response; }> {
|
|
264
|
+
const localVarPath = this.basePath + '/v1/namespaces/{namespaceId}/data-sources/{id}'
|
|
265
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
|
|
266
|
+
.replace('{' + 'namespaceId' + '}', encodeURIComponent(String(namespaceId)));
|
|
267
|
+
let localVarQueryParameters: any = {};
|
|
268
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
269
|
+
const produces = ['application/json'];
|
|
270
|
+
// give precedence to 'application/json'
|
|
271
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
272
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
273
|
+
} else {
|
|
274
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
275
|
+
}
|
|
276
|
+
let localVarFormParams: any = {};
|
|
277
|
+
|
|
278
|
+
// verify required parameter 'id' is not null or undefined
|
|
279
|
+
if (id === null || id === undefined) {
|
|
280
|
+
throw new Error('Required parameter id was null or undefined when calling v1NamespacesNamespaceIdDataSourcesIdPost.');
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// verify required parameter 'namespaceId' is not null or undefined
|
|
284
|
+
if (namespaceId === null || namespaceId === undefined) {
|
|
285
|
+
throw new Error('Required parameter namespaceId was null or undefined when calling v1NamespacesNamespaceIdDataSourcesIdPost.');
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
289
|
+
|
|
290
|
+
let localVarUseFormData = false;
|
|
291
|
+
|
|
292
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
293
|
+
method: 'POST',
|
|
294
|
+
qs: localVarQueryParameters,
|
|
295
|
+
headers: localVarHeaderParams,
|
|
296
|
+
uri: localVarPath,
|
|
297
|
+
useQuerystring: this._useQuerystring,
|
|
298
|
+
json: true,
|
|
299
|
+
body: ObjectSerializer.serialize(dataSourceRequest, "DataSourceRequest")
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
let authenticationPromise = Promise.resolve();
|
|
303
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
304
|
+
|
|
305
|
+
let interceptorPromise = authenticationPromise;
|
|
306
|
+
for (const interceptor of this.interceptors) {
|
|
307
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
return interceptorPromise.then(() => {
|
|
311
|
+
if (Object.keys(localVarFormParams).length) {
|
|
312
|
+
if (localVarUseFormData) {
|
|
313
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
314
|
+
} else {
|
|
315
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
return new Promise<{ response: http.IncomingMessage; body: V1NamespacesNamespaceIdDataSourcesIdGet200Response; }>((resolve, reject) => {
|
|
319
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
320
|
+
if (error) {
|
|
321
|
+
reject(error);
|
|
322
|
+
} else {
|
|
323
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
324
|
+
body = ObjectSerializer.deserialize(body, "V1NamespacesNamespaceIdDataSourcesIdGet200Response");
|
|
325
|
+
resolve({ response: response, body: body });
|
|
326
|
+
} else {
|
|
327
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
*
|
|
336
|
+
* @summary Updates a data source\'s metadata
|
|
337
|
+
* @param id
|
|
338
|
+
* @param namespaceId
|
|
339
|
+
* @param dataSourceRequest
|
|
340
|
+
*/
|
|
341
|
+
public async v1NamespacesNamespaceIdDataSourcesIdPut (id: string, namespaceId: string, dataSourceRequest?: DataSourceRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: V1NamespacesNamespaceIdDataSourcesIdGet200Response; }> {
|
|
342
|
+
const localVarPath = this.basePath + '/v1/namespaces/{namespaceId}/data-sources/{id}'
|
|
343
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
|
|
344
|
+
.replace('{' + 'namespaceId' + '}', encodeURIComponent(String(namespaceId)));
|
|
345
|
+
let localVarQueryParameters: any = {};
|
|
346
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
347
|
+
const produces = ['application/json'];
|
|
348
|
+
// give precedence to 'application/json'
|
|
349
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
350
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
351
|
+
} else {
|
|
352
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
353
|
+
}
|
|
354
|
+
let localVarFormParams: any = {};
|
|
355
|
+
|
|
356
|
+
// verify required parameter 'id' is not null or undefined
|
|
357
|
+
if (id === null || id === undefined) {
|
|
358
|
+
throw new Error('Required parameter id was null or undefined when calling v1NamespacesNamespaceIdDataSourcesIdPut.');
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// verify required parameter 'namespaceId' is not null or undefined
|
|
362
|
+
if (namespaceId === null || namespaceId === undefined) {
|
|
363
|
+
throw new Error('Required parameter namespaceId was null or undefined when calling v1NamespacesNamespaceIdDataSourcesIdPut.');
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
367
|
+
|
|
368
|
+
let localVarUseFormData = false;
|
|
369
|
+
|
|
370
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
371
|
+
method: 'PUT',
|
|
372
|
+
qs: localVarQueryParameters,
|
|
373
|
+
headers: localVarHeaderParams,
|
|
374
|
+
uri: localVarPath,
|
|
375
|
+
useQuerystring: this._useQuerystring,
|
|
376
|
+
json: true,
|
|
377
|
+
body: ObjectSerializer.serialize(dataSourceRequest, "DataSourceRequest")
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
let authenticationPromise = Promise.resolve();
|
|
381
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
382
|
+
|
|
383
|
+
let interceptorPromise = authenticationPromise;
|
|
384
|
+
for (const interceptor of this.interceptors) {
|
|
385
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
return interceptorPromise.then(() => {
|
|
389
|
+
if (Object.keys(localVarFormParams).length) {
|
|
390
|
+
if (localVarUseFormData) {
|
|
391
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
392
|
+
} else {
|
|
393
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
return new Promise<{ response: http.IncomingMessage; body: V1NamespacesNamespaceIdDataSourcesIdGet200Response; }>((resolve, reject) => {
|
|
397
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
398
|
+
if (error) {
|
|
399
|
+
reject(error);
|
|
400
|
+
} else {
|
|
401
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
402
|
+
body = ObjectSerializer.deserialize(body, "V1NamespacesNamespaceIdDataSourcesIdGet200Response");
|
|
403
|
+
resolve({ response: response, body: body });
|
|
404
|
+
} else {
|
|
405
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
});
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* fido API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: unspecified
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import localVarRequest from 'request';
|
|
15
|
+
import http from 'http';
|
|
16
|
+
|
|
17
|
+
/* tslint:disable:no-unused-locals */
|
|
18
|
+
|
|
19
|
+
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
20
|
+
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
|
21
|
+
|
|
22
|
+
import { HttpError, RequestFile } from './apis';
|
|
23
|
+
|
|
24
|
+
let defaultBasePath = 'http://localhost';
|
|
25
|
+
|
|
26
|
+
// ===============================================
|
|
27
|
+
// This file is autogenerated - Please do not edit
|
|
28
|
+
// ===============================================
|
|
29
|
+
|
|
30
|
+
export enum HealthResourceApiApiKeys {
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export class HealthResourceApi {
|
|
34
|
+
protected _basePath = defaultBasePath;
|
|
35
|
+
protected _defaultHeaders : any = {};
|
|
36
|
+
protected _useQuerystring : boolean = false;
|
|
37
|
+
|
|
38
|
+
protected authentications = {
|
|
39
|
+
'default': <Authentication>new VoidAuth(),
|
|
40
|
+
'SecurityScheme': new HttpBasicAuth(),
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
protected interceptors: Interceptor[] = [];
|
|
44
|
+
|
|
45
|
+
constructor(basePath?: string);
|
|
46
|
+
constructor(username: string, password: string, basePath?: string);
|
|
47
|
+
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
48
|
+
if (password) {
|
|
49
|
+
this.username = basePathOrUsername;
|
|
50
|
+
this.password = password
|
|
51
|
+
if (basePath) {
|
|
52
|
+
this.basePath = basePath;
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
if (basePathOrUsername) {
|
|
56
|
+
this.basePath = basePathOrUsername
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
set useQuerystring(value: boolean) {
|
|
62
|
+
this._useQuerystring = value;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
set basePath(basePath: string) {
|
|
66
|
+
this._basePath = basePath;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
set defaultHeaders(defaultHeaders: any) {
|
|
70
|
+
this._defaultHeaders = defaultHeaders;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
get defaultHeaders() {
|
|
74
|
+
return this._defaultHeaders;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
get basePath() {
|
|
78
|
+
return this._basePath;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
82
|
+
this.authentications.default = auth;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
public setApiKey(key: HealthResourceApiApiKeys, value: string) {
|
|
86
|
+
(this.authentications as any)[HealthResourceApiApiKeys[key]].apiKey = value;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
set username(username: string) {
|
|
90
|
+
this.authentications.SecurityScheme.username = username;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
set password(password: string) {
|
|
94
|
+
this.authentications.SecurityScheme.password = password;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
98
|
+
this.interceptors.push(interceptor);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @summary Verifies that the DataSourceConnection verticle is alive
|
|
104
|
+
* @param dataSourceId
|
|
105
|
+
* @param namespaceId
|
|
106
|
+
*/
|
|
107
|
+
public async v1HealthDataSourceConnectionNamespaceIdDataSourceIdGet (dataSourceId: string, namespaceId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
|
108
|
+
const localVarPath = this.basePath + '/v1/health/data-source-connection/{namespaceId}/{dataSourceId}'
|
|
109
|
+
.replace('{' + 'dataSourceId' + '}', encodeURIComponent(String(dataSourceId)))
|
|
110
|
+
.replace('{' + 'namespaceId' + '}', encodeURIComponent(String(namespaceId)));
|
|
111
|
+
let localVarQueryParameters: any = {};
|
|
112
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
113
|
+
const produces = ['application/json'];
|
|
114
|
+
// give precedence to 'application/json'
|
|
115
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
116
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
117
|
+
} else {
|
|
118
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
119
|
+
}
|
|
120
|
+
let localVarFormParams: any = {};
|
|
121
|
+
|
|
122
|
+
// verify required parameter 'dataSourceId' is not null or undefined
|
|
123
|
+
if (dataSourceId === null || dataSourceId === undefined) {
|
|
124
|
+
throw new Error('Required parameter dataSourceId was null or undefined when calling v1HealthDataSourceConnectionNamespaceIdDataSourceIdGet.');
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// verify required parameter 'namespaceId' is not null or undefined
|
|
128
|
+
if (namespaceId === null || namespaceId === undefined) {
|
|
129
|
+
throw new Error('Required parameter namespaceId was null or undefined when calling v1HealthDataSourceConnectionNamespaceIdDataSourceIdGet.');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
133
|
+
|
|
134
|
+
let localVarUseFormData = false;
|
|
135
|
+
|
|
136
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
137
|
+
method: 'GET',
|
|
138
|
+
qs: localVarQueryParameters,
|
|
139
|
+
headers: localVarHeaderParams,
|
|
140
|
+
uri: localVarPath,
|
|
141
|
+
useQuerystring: this._useQuerystring,
|
|
142
|
+
json: true,
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
let authenticationPromise = Promise.resolve();
|
|
146
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
147
|
+
|
|
148
|
+
let interceptorPromise = authenticationPromise;
|
|
149
|
+
for (const interceptor of this.interceptors) {
|
|
150
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return interceptorPromise.then(() => {
|
|
154
|
+
if (Object.keys(localVarFormParams).length) {
|
|
155
|
+
if (localVarUseFormData) {
|
|
156
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
157
|
+
} else {
|
|
158
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
|
162
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
163
|
+
if (error) {
|
|
164
|
+
reject(error);
|
|
165
|
+
} else {
|
|
166
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
167
|
+
body = ObjectSerializer.deserialize(body, "object");
|
|
168
|
+
resolve({ response: response, body: body });
|
|
169
|
+
} else {
|
|
170
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
*
|
|
179
|
+
* @summary Returns the entire state of the FIDO application
|
|
180
|
+
*/
|
|
181
|
+
public async v1HealthGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
|
182
|
+
const localVarPath = this.basePath + '/v1/health';
|
|
183
|
+
let localVarQueryParameters: any = {};
|
|
184
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
185
|
+
const produces = ['application/json'];
|
|
186
|
+
// give precedence to 'application/json'
|
|
187
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
188
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
189
|
+
} else {
|
|
190
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
191
|
+
}
|
|
192
|
+
let localVarFormParams: any = {};
|
|
193
|
+
|
|
194
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
195
|
+
|
|
196
|
+
let localVarUseFormData = false;
|
|
197
|
+
|
|
198
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
199
|
+
method: 'GET',
|
|
200
|
+
qs: localVarQueryParameters,
|
|
201
|
+
headers: localVarHeaderParams,
|
|
202
|
+
uri: localVarPath,
|
|
203
|
+
useQuerystring: this._useQuerystring,
|
|
204
|
+
json: true,
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
let authenticationPromise = Promise.resolve();
|
|
208
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
209
|
+
|
|
210
|
+
let interceptorPromise = authenticationPromise;
|
|
211
|
+
for (const interceptor of this.interceptors) {
|
|
212
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
return interceptorPromise.then(() => {
|
|
216
|
+
if (Object.keys(localVarFormParams).length) {
|
|
217
|
+
if (localVarUseFormData) {
|
|
218
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
219
|
+
} else {
|
|
220
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
|
224
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
225
|
+
if (error) {
|
|
226
|
+
reject(error);
|
|
227
|
+
} else {
|
|
228
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
229
|
+
body = ObjectSerializer.deserialize(body, "object");
|
|
230
|
+
resolve({ response: response, body: body });
|
|
231
|
+
} else {
|
|
232
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
}
|