@explo-tech/fido-api 0.0.3 → 0.0.5
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/core/ApiError.ts +24 -0
- package/core/ApiRequestOptions.ts +16 -0
- package/core/ApiResult.ts +10 -0
- package/core/CancelablePromise.ts +130 -0
- package/core/OpenAPI.ts +31 -0
- package/core/request.ts +307 -0
- package/index.ts +47 -0
- package/models/BooleanPropertyValue.ts +8 -0
- package/models/ClientError.ts +9 -0
- package/models/ComputedViewRunRequest.ts +13 -0
- package/models/DataPage.ts +10 -0
- package/models/DataRequestParameters.ts +11 -0
- package/models/DataResponseMetadata.ts +12 -0
- package/models/DataSchema.ts +10 -0
- package/models/DataSource.ts +15 -0
- package/models/DataSourceConfiguration.ts +10 -0
- package/models/DataSourceRequest.ts +10 -0
- package/models/DataSourceResponse.ts +10 -0
- package/models/DataSourceTablePreviewRequest.ts +11 -0
- package/models/DatePropertyValue.ts +10 -0
- package/models/DateTimePropertyValue.ts +10 -0
- package/models/DecimalPropertyValue.ts +8 -0
- package/models/DoublePropertyValue.ts +8 -0
- package/models/Duration.ts +5 -0
- package/models/Instant.ts +5 -0
- package/models/IntegerPropertyValue.ts +8 -0
- package/models/LocalDate.ts +5 -0
- package/models/Namespace.ts +11 -0
- package/models/NamespaceRequest.ts +10 -0
- package/models/NamespaceResponse.ts +12 -0
- package/models/NamespaceResponseMetadata.ts +10 -0
- package/models/PagingConfiguration.ts +9 -0
- package/models/PropertySchema.ts +13 -0
- package/models/PropertyType.ts +14 -0
- package/models/PropertyValue.ts +14 -0
- package/models/QueryExecutionResponse.ts +15 -0
- package/models/Record.ts +10 -0
- package/models/RequestTelemetry.ts +12 -0
- package/models/StringPropertyValue.ts +8 -0
- package/models/Tunnel.ts +5 -0
- package/models/UUID.ts +5 -0
- package/package.json +1 -1
- package/services/DatasourceResourceService.ts +106 -0
- package/services/HealthResourceService.ts +45 -0
- package/services/NamespaceResourceService.ts +99 -0
- package/services/QueryResourceService.ts +65 -0
- package/.openapi-generator/FILES +0 -32
- package/.openapi-generator/VERSION +0 -1
- package/.openapi-generator-ignore +0 -23
- package/.tool-versions +0 -1
- package/api/apis.ts +0 -20
- package/api/datasourceResourceApi.ts +0 -412
- package/api/healthResourceApi.ts +0 -239
- package/api/namespaceResourceApi.ts +0 -389
- package/api/queryResourceApi.ts +0 -261
- package/api.ts +0 -3
- package/git_push.sh +0 -57
- package/model/clientError.ts +0 -37
- package/model/computedViewRunRequest.ts +0 -50
- package/model/dataPage.ts +0 -32
- package/model/dataRequestParameters.ts +0 -38
- package/model/dataResponseMetadata.ts +0 -44
- package/model/dataSchema.ts +0 -32
- package/model/dataSource.ts +0 -56
- package/model/dataSourceConfiguration.ts +0 -31
- package/model/dataSourceRequest.ts +0 -32
- package/model/dataSourceResponse.ts +0 -32
- package/model/dataSourceTablePreviewRequest.ts +0 -38
- package/model/models.ts +0 -288
- package/model/namespace.ts +0 -37
- package/model/namespaceRequest.ts +0 -32
- package/model/namespaceResponse.ts +0 -39
- package/model/namespaceResponseMeta.ts +0 -32
- package/model/namespaceResponseMetadata.ts +0 -32
- package/model/pagingConfiguration.ts +0 -37
- package/model/propertySchema.ts +0 -52
- package/model/propertyType.ts +0 -24
- package/model/queryExecutionResponse.ts +0 -52
- package/model/queryExecutionResponseRequestTelemetry.ts +0 -43
- package/model/record.ts +0 -31
- package/model/requestTelemetry.ts +0 -43
|
@@ -1,389 +0,0 @@
|
|
|
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 { ClientError } from '../model/clientError';
|
|
19
|
-
import { NamespaceRequest } from '../model/namespaceRequest';
|
|
20
|
-
import { NamespaceResponse } from '../model/namespaceResponse';
|
|
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 NamespaceResourceApiApiKeys {
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export class NamespaceResourceApi {
|
|
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: NamespaceResourceApiApiKeys, value: string) {
|
|
89
|
-
(this.authentications as any)[NamespaceResourceApiApiKeys[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 Creates a namespace and optionally a data source associated with it
|
|
107
|
-
* @param id
|
|
108
|
-
* @param namespaceRequest
|
|
109
|
-
*/
|
|
110
|
-
public async createNamespace (id: string, namespaceRequest?: NamespaceRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: NamespaceResponse; }> {
|
|
111
|
-
const localVarPath = this.basePath + '/v1/namespaces/{id}'
|
|
112
|
-
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
113
|
-
let localVarQueryParameters: any = {};
|
|
114
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
115
|
-
const produces = ['application/json'];
|
|
116
|
-
// give precedence to 'application/json'
|
|
117
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
118
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
119
|
-
} else {
|
|
120
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
121
|
-
}
|
|
122
|
-
let localVarFormParams: any = {};
|
|
123
|
-
|
|
124
|
-
// verify required parameter 'id' is not null or undefined
|
|
125
|
-
if (id === null || id === undefined) {
|
|
126
|
-
throw new Error('Required parameter id was null or undefined when calling createNamespace.');
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
130
|
-
|
|
131
|
-
let localVarUseFormData = false;
|
|
132
|
-
|
|
133
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
134
|
-
method: 'POST',
|
|
135
|
-
qs: localVarQueryParameters,
|
|
136
|
-
headers: localVarHeaderParams,
|
|
137
|
-
uri: localVarPath,
|
|
138
|
-
useQuerystring: this._useQuerystring,
|
|
139
|
-
json: true,
|
|
140
|
-
body: ObjectSerializer.serialize(namespaceRequest, "NamespaceRequest")
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
let authenticationPromise = Promise.resolve();
|
|
144
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
145
|
-
|
|
146
|
-
let interceptorPromise = authenticationPromise;
|
|
147
|
-
for (const interceptor of this.interceptors) {
|
|
148
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
return interceptorPromise.then(() => {
|
|
152
|
-
if (Object.keys(localVarFormParams).length) {
|
|
153
|
-
if (localVarUseFormData) {
|
|
154
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
155
|
-
} else {
|
|
156
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
return new Promise<{ response: http.IncomingMessage; body: NamespaceResponse; }>((resolve, reject) => {
|
|
160
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
161
|
-
if (error) {
|
|
162
|
-
reject(error);
|
|
163
|
-
} else {
|
|
164
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
165
|
-
body = ObjectSerializer.deserialize(body, "NamespaceResponse");
|
|
166
|
-
resolve({ response: response, body: body });
|
|
167
|
-
} else {
|
|
168
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
*
|
|
177
|
-
* @summary Deletes a namespace, cascading to its associated resources
|
|
178
|
-
* @param id
|
|
179
|
-
*/
|
|
180
|
-
public async deleteNamespace (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
|
181
|
-
const localVarPath = this.basePath + '/v1/namespaces/{id}'
|
|
182
|
-
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
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
|
-
// verify required parameter 'id' is not null or undefined
|
|
195
|
-
if (id === null || id === undefined) {
|
|
196
|
-
throw new Error('Required parameter id was null or undefined when calling deleteNamespace.');
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
200
|
-
|
|
201
|
-
let localVarUseFormData = false;
|
|
202
|
-
|
|
203
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
204
|
-
method: 'DELETE',
|
|
205
|
-
qs: localVarQueryParameters,
|
|
206
|
-
headers: localVarHeaderParams,
|
|
207
|
-
uri: localVarPath,
|
|
208
|
-
useQuerystring: this._useQuerystring,
|
|
209
|
-
json: true,
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
let authenticationPromise = Promise.resolve();
|
|
213
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
214
|
-
|
|
215
|
-
let interceptorPromise = authenticationPromise;
|
|
216
|
-
for (const interceptor of this.interceptors) {
|
|
217
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
return interceptorPromise.then(() => {
|
|
221
|
-
if (Object.keys(localVarFormParams).length) {
|
|
222
|
-
if (localVarUseFormData) {
|
|
223
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
224
|
-
} else {
|
|
225
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
|
229
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
230
|
-
if (error) {
|
|
231
|
-
reject(error);
|
|
232
|
-
} else {
|
|
233
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
234
|
-
body = ObjectSerializer.deserialize(body, "object");
|
|
235
|
-
resolve({ response: response, body: body });
|
|
236
|
-
} else {
|
|
237
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
*
|
|
246
|
-
* @summary Gets a namespace and its associated data sources
|
|
247
|
-
* @param id
|
|
248
|
-
* @param includeDataSources
|
|
249
|
-
*/
|
|
250
|
-
public async getNamespace (id: string, includeDataSources?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: NamespaceResponse; }> {
|
|
251
|
-
const localVarPath = this.basePath + '/v1/namespaces/{id}'
|
|
252
|
-
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
253
|
-
let localVarQueryParameters: any = {};
|
|
254
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
255
|
-
const produces = ['application/json'];
|
|
256
|
-
// give precedence to 'application/json'
|
|
257
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
258
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
259
|
-
} else {
|
|
260
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
261
|
-
}
|
|
262
|
-
let localVarFormParams: any = {};
|
|
263
|
-
|
|
264
|
-
// verify required parameter 'id' is not null or undefined
|
|
265
|
-
if (id === null || id === undefined) {
|
|
266
|
-
throw new Error('Required parameter id was null or undefined when calling getNamespace.');
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
if (includeDataSources !== undefined) {
|
|
270
|
-
localVarQueryParameters['includeDataSources'] = ObjectSerializer.serialize(includeDataSources, "boolean");
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
274
|
-
|
|
275
|
-
let localVarUseFormData = false;
|
|
276
|
-
|
|
277
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
278
|
-
method: 'GET',
|
|
279
|
-
qs: localVarQueryParameters,
|
|
280
|
-
headers: localVarHeaderParams,
|
|
281
|
-
uri: localVarPath,
|
|
282
|
-
useQuerystring: this._useQuerystring,
|
|
283
|
-
json: true,
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
let authenticationPromise = Promise.resolve();
|
|
287
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
288
|
-
|
|
289
|
-
let interceptorPromise = authenticationPromise;
|
|
290
|
-
for (const interceptor of this.interceptors) {
|
|
291
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
return interceptorPromise.then(() => {
|
|
295
|
-
if (Object.keys(localVarFormParams).length) {
|
|
296
|
-
if (localVarUseFormData) {
|
|
297
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
298
|
-
} else {
|
|
299
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
return new Promise<{ response: http.IncomingMessage; body: NamespaceResponse; }>((resolve, reject) => {
|
|
303
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
304
|
-
if (error) {
|
|
305
|
-
reject(error);
|
|
306
|
-
} else {
|
|
307
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
308
|
-
body = ObjectSerializer.deserialize(body, "NamespaceResponse");
|
|
309
|
-
resolve({ response: response, body: body });
|
|
310
|
-
} else {
|
|
311
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
});
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
/**
|
|
319
|
-
*
|
|
320
|
-
* @summary Updates a namespace\'s metadata
|
|
321
|
-
* @param id
|
|
322
|
-
* @param namespaceRequest
|
|
323
|
-
*/
|
|
324
|
-
public async updateNamespace (id: string, namespaceRequest?: NamespaceRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: NamespaceResponse; }> {
|
|
325
|
-
const localVarPath = this.basePath + '/v1/namespaces/{id}'
|
|
326
|
-
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
327
|
-
let localVarQueryParameters: any = {};
|
|
328
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
329
|
-
const produces = ['application/json'];
|
|
330
|
-
// give precedence to 'application/json'
|
|
331
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
332
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
333
|
-
} else {
|
|
334
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
335
|
-
}
|
|
336
|
-
let localVarFormParams: any = {};
|
|
337
|
-
|
|
338
|
-
// verify required parameter 'id' is not null or undefined
|
|
339
|
-
if (id === null || id === undefined) {
|
|
340
|
-
throw new Error('Required parameter id was null or undefined when calling updateNamespace.');
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
344
|
-
|
|
345
|
-
let localVarUseFormData = false;
|
|
346
|
-
|
|
347
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
348
|
-
method: 'PUT',
|
|
349
|
-
qs: localVarQueryParameters,
|
|
350
|
-
headers: localVarHeaderParams,
|
|
351
|
-
uri: localVarPath,
|
|
352
|
-
useQuerystring: this._useQuerystring,
|
|
353
|
-
json: true,
|
|
354
|
-
body: ObjectSerializer.serialize(namespaceRequest, "NamespaceRequest")
|
|
355
|
-
};
|
|
356
|
-
|
|
357
|
-
let authenticationPromise = Promise.resolve();
|
|
358
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
359
|
-
|
|
360
|
-
let interceptorPromise = authenticationPromise;
|
|
361
|
-
for (const interceptor of this.interceptors) {
|
|
362
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
return interceptorPromise.then(() => {
|
|
366
|
-
if (Object.keys(localVarFormParams).length) {
|
|
367
|
-
if (localVarUseFormData) {
|
|
368
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
369
|
-
} else {
|
|
370
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
return new Promise<{ response: http.IncomingMessage; body: NamespaceResponse; }>((resolve, reject) => {
|
|
374
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
375
|
-
if (error) {
|
|
376
|
-
reject(error);
|
|
377
|
-
} else {
|
|
378
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
379
|
-
body = ObjectSerializer.deserialize(body, "NamespaceResponse");
|
|
380
|
-
resolve({ response: response, body: body });
|
|
381
|
-
} else {
|
|
382
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
});
|
|
386
|
-
});
|
|
387
|
-
});
|
|
388
|
-
}
|
|
389
|
-
}
|
package/api/queryResourceApi.ts
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
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 { ClientError } from '../model/clientError';
|
|
19
|
-
import { ComputedViewRunRequest } from '../model/computedViewRunRequest';
|
|
20
|
-
import { DataSourceTablePreviewRequest } from '../model/dataSourceTablePreviewRequest';
|
|
21
|
-
import { QueryExecutionResponse } from '../model/queryExecutionResponse';
|
|
22
|
-
|
|
23
|
-
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
24
|
-
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
|
25
|
-
|
|
26
|
-
import { HttpError, RequestFile } from './apis';
|
|
27
|
-
|
|
28
|
-
let defaultBasePath = 'http://localhost';
|
|
29
|
-
|
|
30
|
-
// ===============================================
|
|
31
|
-
// This file is autogenerated - Please do not edit
|
|
32
|
-
// ===============================================
|
|
33
|
-
|
|
34
|
-
export enum QueryResourceApiApiKeys {
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export class QueryResourceApi {
|
|
38
|
-
protected _basePath = defaultBasePath;
|
|
39
|
-
protected _defaultHeaders : any = {};
|
|
40
|
-
protected _useQuerystring : boolean = false;
|
|
41
|
-
|
|
42
|
-
protected authentications = {
|
|
43
|
-
'default': <Authentication>new VoidAuth(),
|
|
44
|
-
'SecurityScheme': new HttpBasicAuth(),
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
protected interceptors: Interceptor[] = [];
|
|
48
|
-
|
|
49
|
-
constructor(basePath?: string);
|
|
50
|
-
constructor(username: string, password: string, basePath?: string);
|
|
51
|
-
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
52
|
-
if (password) {
|
|
53
|
-
this.username = basePathOrUsername;
|
|
54
|
-
this.password = password
|
|
55
|
-
if (basePath) {
|
|
56
|
-
this.basePath = basePath;
|
|
57
|
-
}
|
|
58
|
-
} else {
|
|
59
|
-
if (basePathOrUsername) {
|
|
60
|
-
this.basePath = basePathOrUsername
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
set useQuerystring(value: boolean) {
|
|
66
|
-
this._useQuerystring = value;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
set basePath(basePath: string) {
|
|
70
|
-
this._basePath = basePath;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
set defaultHeaders(defaultHeaders: any) {
|
|
74
|
-
this._defaultHeaders = defaultHeaders;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
get defaultHeaders() {
|
|
78
|
-
return this._defaultHeaders;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
get basePath() {
|
|
82
|
-
return this._basePath;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
public setDefaultAuthentication(auth: Authentication) {
|
|
86
|
-
this.authentications.default = auth;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
public setApiKey(key: QueryResourceApiApiKeys, value: string) {
|
|
90
|
-
(this.authentications as any)[QueryResourceApiApiKeys[key]].apiKey = value;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
set username(username: string) {
|
|
94
|
-
this.authentications.SecurityScheme.username = username;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
set password(password: string) {
|
|
98
|
-
this.authentications.SecurityScheme.password = password;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
public addInterceptor(interceptor: Interceptor) {
|
|
102
|
-
this.interceptors.push(interceptor);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
*
|
|
107
|
-
* @summary Gets a preview of a specified table in a Data Source
|
|
108
|
-
* @param dataSourceId
|
|
109
|
-
* @param namespaceId
|
|
110
|
-
* @param dataSourceTablePreviewRequest
|
|
111
|
-
*/
|
|
112
|
-
public async getDatasourceTablePreview (dataSourceId: string, namespaceId: string, dataSourceTablePreviewRequest?: DataSourceTablePreviewRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: QueryExecutionResponse; }> {
|
|
113
|
-
const localVarPath = this.basePath + '/v1/namespaces/{namespaceId}/data-sources/{dataSourceId}/_preview'
|
|
114
|
-
.replace('{' + 'dataSourceId' + '}', encodeURIComponent(String(dataSourceId)))
|
|
115
|
-
.replace('{' + 'namespaceId' + '}', encodeURIComponent(String(namespaceId)));
|
|
116
|
-
let localVarQueryParameters: any = {};
|
|
117
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
118
|
-
const produces = ['application/json'];
|
|
119
|
-
// give precedence to 'application/json'
|
|
120
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
121
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
122
|
-
} else {
|
|
123
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
124
|
-
}
|
|
125
|
-
let localVarFormParams: any = {};
|
|
126
|
-
|
|
127
|
-
// verify required parameter 'dataSourceId' is not null or undefined
|
|
128
|
-
if (dataSourceId === null || dataSourceId === undefined) {
|
|
129
|
-
throw new Error('Required parameter dataSourceId was null or undefined when calling getDatasourceTablePreview.');
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// verify required parameter 'namespaceId' is not null or undefined
|
|
133
|
-
if (namespaceId === null || namespaceId === undefined) {
|
|
134
|
-
throw new Error('Required parameter namespaceId was null or undefined when calling getDatasourceTablePreview.');
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
138
|
-
|
|
139
|
-
let localVarUseFormData = false;
|
|
140
|
-
|
|
141
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
142
|
-
method: 'POST',
|
|
143
|
-
qs: localVarQueryParameters,
|
|
144
|
-
headers: localVarHeaderParams,
|
|
145
|
-
uri: localVarPath,
|
|
146
|
-
useQuerystring: this._useQuerystring,
|
|
147
|
-
json: true,
|
|
148
|
-
body: ObjectSerializer.serialize(dataSourceTablePreviewRequest, "DataSourceTablePreviewRequest")
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
let authenticationPromise = Promise.resolve();
|
|
152
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
153
|
-
|
|
154
|
-
let interceptorPromise = authenticationPromise;
|
|
155
|
-
for (const interceptor of this.interceptors) {
|
|
156
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
return interceptorPromise.then(() => {
|
|
160
|
-
if (Object.keys(localVarFormParams).length) {
|
|
161
|
-
if (localVarUseFormData) {
|
|
162
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
163
|
-
} else {
|
|
164
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return new Promise<{ response: http.IncomingMessage; body: QueryExecutionResponse; }>((resolve, reject) => {
|
|
168
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
169
|
-
if (error) {
|
|
170
|
-
reject(error);
|
|
171
|
-
} else {
|
|
172
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
173
|
-
body = ObjectSerializer.deserialize(body, "QueryExecutionResponse");
|
|
174
|
-
resolve({ response: response, body: body });
|
|
175
|
-
} else {
|
|
176
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
*
|
|
185
|
-
* @summary Runs a provided query against the provided data source
|
|
186
|
-
* @param dataSourceId
|
|
187
|
-
* @param namespaceId
|
|
188
|
-
* @param computedViewRunRequest
|
|
189
|
-
*/
|
|
190
|
-
public async runComputedView (dataSourceId: string, namespaceId: string, computedViewRunRequest?: ComputedViewRunRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: QueryExecutionResponse; }> {
|
|
191
|
-
const localVarPath = this.basePath + '/v1/namespaces/{namespaceId}/data-sources/{dataSourceId}/_run'
|
|
192
|
-
.replace('{' + 'dataSourceId' + '}', encodeURIComponent(String(dataSourceId)))
|
|
193
|
-
.replace('{' + 'namespaceId' + '}', encodeURIComponent(String(namespaceId)));
|
|
194
|
-
let localVarQueryParameters: any = {};
|
|
195
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
196
|
-
const produces = ['application/json'];
|
|
197
|
-
// give precedence to 'application/json'
|
|
198
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
199
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
200
|
-
} else {
|
|
201
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
202
|
-
}
|
|
203
|
-
let localVarFormParams: any = {};
|
|
204
|
-
|
|
205
|
-
// verify required parameter 'dataSourceId' is not null or undefined
|
|
206
|
-
if (dataSourceId === null || dataSourceId === undefined) {
|
|
207
|
-
throw new Error('Required parameter dataSourceId was null or undefined when calling runComputedView.');
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
// verify required parameter 'namespaceId' is not null or undefined
|
|
211
|
-
if (namespaceId === null || namespaceId === undefined) {
|
|
212
|
-
throw new Error('Required parameter namespaceId was null or undefined when calling runComputedView.');
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
216
|
-
|
|
217
|
-
let localVarUseFormData = false;
|
|
218
|
-
|
|
219
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
220
|
-
method: 'POST',
|
|
221
|
-
qs: localVarQueryParameters,
|
|
222
|
-
headers: localVarHeaderParams,
|
|
223
|
-
uri: localVarPath,
|
|
224
|
-
useQuerystring: this._useQuerystring,
|
|
225
|
-
json: true,
|
|
226
|
-
body: ObjectSerializer.serialize(computedViewRunRequest, "ComputedViewRunRequest")
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
let authenticationPromise = Promise.resolve();
|
|
230
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
231
|
-
|
|
232
|
-
let interceptorPromise = authenticationPromise;
|
|
233
|
-
for (const interceptor of this.interceptors) {
|
|
234
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
return interceptorPromise.then(() => {
|
|
238
|
-
if (Object.keys(localVarFormParams).length) {
|
|
239
|
-
if (localVarUseFormData) {
|
|
240
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
241
|
-
} else {
|
|
242
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
return new Promise<{ response: http.IncomingMessage; body: QueryExecutionResponse; }>((resolve, reject) => {
|
|
246
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
247
|
-
if (error) {
|
|
248
|
-
reject(error);
|
|
249
|
-
} else {
|
|
250
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
251
|
-
body = ObjectSerializer.deserialize(body, "QueryExecutionResponse");
|
|
252
|
-
resolve({ response: response, body: body });
|
|
253
|
-
} else {
|
|
254
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
});
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
}
|
package/api.ts
DELETED