@explo-tech/fido-api 0.0.2 → 0.0.4

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.
Files changed (78) hide show
  1. package/core/ApiError.ts +24 -0
  2. package/core/ApiRequestOptions.ts +16 -0
  3. package/core/ApiResult.ts +10 -0
  4. package/core/CancelablePromise.ts +130 -0
  5. package/core/OpenAPI.ts +31 -0
  6. package/core/request.ts +307 -0
  7. package/index.ts +47 -0
  8. package/models/BooleanPropertyValue.ts +9 -0
  9. package/models/ClientError.ts +9 -0
  10. package/models/ComputedViewRunRequest.ts +13 -0
  11. package/models/DataPage.ts +10 -0
  12. package/models/DataRequestParameters.ts +11 -0
  13. package/models/DataResponseMetadata.ts +12 -0
  14. package/models/DataSchema.ts +10 -0
  15. package/models/DataSource.ts +15 -0
  16. package/models/DataSourceConfiguration.ts +10 -0
  17. package/models/DataSourceRequest.ts +10 -0
  18. package/models/DataSourceResponse.ts +10 -0
  19. package/models/DataSourceTablePreviewRequest.ts +11 -0
  20. package/models/DatePropertyValue.ts +11 -0
  21. package/models/DateTimePropertyValue.ts +11 -0
  22. package/models/DecimalPropertyValue.ts +9 -0
  23. package/models/DoublePropertyValue.ts +9 -0
  24. package/models/Duration.ts +5 -0
  25. package/models/Instant.ts +5 -0
  26. package/models/IntegerPropertyValue.ts +9 -0
  27. package/models/LocalDate.ts +5 -0
  28. package/models/Namespace.ts +11 -0
  29. package/models/NamespaceRequest.ts +10 -0
  30. package/models/NamespaceResponse.ts +12 -0
  31. package/models/NamespaceResponseMetadata.ts +10 -0
  32. package/models/PagingConfiguration.ts +9 -0
  33. package/models/PropertySchema.ts +13 -0
  34. package/models/PropertyType.ts +14 -0
  35. package/models/PropertyValue.ts +16 -0
  36. package/models/QueryExecutionResponse.ts +15 -0
  37. package/models/Record.ts +10 -0
  38. package/models/RequestTelemetry.ts +12 -0
  39. package/models/StringPropertyValue.ts +9 -0
  40. package/models/Tunnel.ts +5 -0
  41. package/models/UUID.ts +5 -0
  42. package/package.json +1 -1
  43. package/services/DatasourceResourceService.ts +106 -0
  44. package/services/HealthResourceService.ts +45 -0
  45. package/services/NamespaceResourceService.ts +99 -0
  46. package/services/QueryResourceService.ts +65 -0
  47. package/.openapi-generator/FILES +0 -30
  48. package/.openapi-generator/VERSION +0 -1
  49. package/.openapi-generator-ignore +0 -23
  50. package/api/apis.ts +0 -20
  51. package/api/datasourceResourceApi.ts +0 -412
  52. package/api/healthResourceApi.ts +0 -239
  53. package/api/namespaceResourceApi.ts +0 -389
  54. package/api/queryResourceApi.ts +0 -260
  55. package/api.ts +0 -3
  56. package/git_push.sh +0 -57
  57. package/model/computedViewRunRequest.ts +0 -50
  58. package/model/dataPage.ts +0 -32
  59. package/model/dataRequestParameters.ts +0 -38
  60. package/model/dataResponseMetadata.ts +0 -44
  61. package/model/dataSchema.ts +0 -32
  62. package/model/dataSource.ts +0 -56
  63. package/model/dataSourceConfiguration.ts +0 -31
  64. package/model/dataSourceRequest.ts +0 -32
  65. package/model/dataSourceTablePreviewRequest.ts +0 -38
  66. package/model/models.ts +0 -282
  67. package/model/namespace.ts +0 -37
  68. package/model/namespaceRequest.ts +0 -32
  69. package/model/namespaceResponseMetadata.ts +0 -32
  70. package/model/pagingConfiguration.ts +0 -37
  71. package/model/propertySchema.ts +0 -52
  72. package/model/propertyType.ts +0 -24
  73. package/model/record.ts +0 -31
  74. package/model/v1NamespacesIdGet200Response.ts +0 -39
  75. package/model/v1NamespacesIdGet200ResponseMeta.ts +0 -32
  76. package/model/v1NamespacesIdGet4xxResponse.ts +0 -37
  77. package/model/v1NamespacesNamespaceIdDataSourcesDataSourceIdPreviewPost200Response.ts +0 -51
  78. package/model/v1NamespacesNamespaceIdDataSourcesIdGet200Response.ts +0 -32
@@ -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 { NamespaceRequest } from '../model/namespaceRequest';
19
- import { V1NamespacesIdGet200Response } from '../model/v1NamespacesIdGet200Response';
20
- import { V1NamespacesIdGet4xxResponse } from '../model/v1NamespacesIdGet4xxResponse';
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 Deletes a namespace, cascading to its associated resources
107
- * @param id
108
- */
109
- public async v1NamespacesIdDelete (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
110
- const localVarPath = this.basePath + '/v1/namespaces/{id}'
111
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
112
- let localVarQueryParameters: any = {};
113
- let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
114
- const produces = ['application/json'];
115
- // give precedence to 'application/json'
116
- if (produces.indexOf('application/json') >= 0) {
117
- localVarHeaderParams.Accept = 'application/json';
118
- } else {
119
- localVarHeaderParams.Accept = produces.join(',');
120
- }
121
- let localVarFormParams: any = {};
122
-
123
- // verify required parameter 'id' is not null or undefined
124
- if (id === null || id === undefined) {
125
- throw new Error('Required parameter id was null or undefined when calling v1NamespacesIdDelete.');
126
- }
127
-
128
- (<any>Object).assign(localVarHeaderParams, options.headers);
129
-
130
- let localVarUseFormData = false;
131
-
132
- let localVarRequestOptions: localVarRequest.Options = {
133
- method: 'DELETE',
134
- qs: localVarQueryParameters,
135
- headers: localVarHeaderParams,
136
- uri: localVarPath,
137
- useQuerystring: this._useQuerystring,
138
- json: true,
139
- };
140
-
141
- let authenticationPromise = Promise.resolve();
142
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
143
-
144
- let interceptorPromise = authenticationPromise;
145
- for (const interceptor of this.interceptors) {
146
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
147
- }
148
-
149
- return interceptorPromise.then(() => {
150
- if (Object.keys(localVarFormParams).length) {
151
- if (localVarUseFormData) {
152
- (<any>localVarRequestOptions).formData = localVarFormParams;
153
- } else {
154
- localVarRequestOptions.form = localVarFormParams;
155
- }
156
- }
157
- return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
158
- localVarRequest(localVarRequestOptions, (error, response, body) => {
159
- if (error) {
160
- reject(error);
161
- } else {
162
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
163
- body = ObjectSerializer.deserialize(body, "object");
164
- resolve({ response: response, body: body });
165
- } else {
166
- reject(new HttpError(response, body, response.statusCode));
167
- }
168
- }
169
- });
170
- });
171
- });
172
- }
173
- /**
174
- *
175
- * @summary Gets a namespace and its associated data sources
176
- * @param id
177
- * @param includeDataSources
178
- */
179
- public async v1NamespacesIdGet (id: string, includeDataSources?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: V1NamespacesIdGet200Response; }> {
180
- const localVarPath = this.basePath + '/v1/namespaces/{id}'
181
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
182
- let localVarQueryParameters: any = {};
183
- let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
184
- const produces = ['application/json'];
185
- // give precedence to 'application/json'
186
- if (produces.indexOf('application/json') >= 0) {
187
- localVarHeaderParams.Accept = 'application/json';
188
- } else {
189
- localVarHeaderParams.Accept = produces.join(',');
190
- }
191
- let localVarFormParams: any = {};
192
-
193
- // verify required parameter 'id' is not null or undefined
194
- if (id === null || id === undefined) {
195
- throw new Error('Required parameter id was null or undefined when calling v1NamespacesIdGet.');
196
- }
197
-
198
- if (includeDataSources !== undefined) {
199
- localVarQueryParameters['includeDataSources'] = ObjectSerializer.serialize(includeDataSources, "boolean");
200
- }
201
-
202
- (<any>Object).assign(localVarHeaderParams, options.headers);
203
-
204
- let localVarUseFormData = false;
205
-
206
- let localVarRequestOptions: localVarRequest.Options = {
207
- method: 'GET',
208
- qs: localVarQueryParameters,
209
- headers: localVarHeaderParams,
210
- uri: localVarPath,
211
- useQuerystring: this._useQuerystring,
212
- json: true,
213
- };
214
-
215
- let authenticationPromise = Promise.resolve();
216
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
217
-
218
- let interceptorPromise = authenticationPromise;
219
- for (const interceptor of this.interceptors) {
220
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
221
- }
222
-
223
- return interceptorPromise.then(() => {
224
- if (Object.keys(localVarFormParams).length) {
225
- if (localVarUseFormData) {
226
- (<any>localVarRequestOptions).formData = localVarFormParams;
227
- } else {
228
- localVarRequestOptions.form = localVarFormParams;
229
- }
230
- }
231
- return new Promise<{ response: http.IncomingMessage; body: V1NamespacesIdGet200Response; }>((resolve, reject) => {
232
- localVarRequest(localVarRequestOptions, (error, response, body) => {
233
- if (error) {
234
- reject(error);
235
- } else {
236
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
237
- body = ObjectSerializer.deserialize(body, "V1NamespacesIdGet200Response");
238
- resolve({ response: response, body: body });
239
- } else {
240
- reject(new HttpError(response, body, response.statusCode));
241
- }
242
- }
243
- });
244
- });
245
- });
246
- }
247
- /**
248
- *
249
- * @summary Creates a namespace and optionally a data source associated with it
250
- * @param id
251
- * @param namespaceRequest
252
- */
253
- public async v1NamespacesIdPost (id: string, namespaceRequest?: NamespaceRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: V1NamespacesIdGet200Response; }> {
254
- const localVarPath = this.basePath + '/v1/namespaces/{id}'
255
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
256
- let localVarQueryParameters: any = {};
257
- let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
258
- const produces = ['application/json'];
259
- // give precedence to 'application/json'
260
- if (produces.indexOf('application/json') >= 0) {
261
- localVarHeaderParams.Accept = 'application/json';
262
- } else {
263
- localVarHeaderParams.Accept = produces.join(',');
264
- }
265
- let localVarFormParams: any = {};
266
-
267
- // verify required parameter 'id' is not null or undefined
268
- if (id === null || id === undefined) {
269
- throw new Error('Required parameter id was null or undefined when calling v1NamespacesIdPost.');
270
- }
271
-
272
- (<any>Object).assign(localVarHeaderParams, options.headers);
273
-
274
- let localVarUseFormData = false;
275
-
276
- let localVarRequestOptions: localVarRequest.Options = {
277
- method: 'POST',
278
- qs: localVarQueryParameters,
279
- headers: localVarHeaderParams,
280
- uri: localVarPath,
281
- useQuerystring: this._useQuerystring,
282
- json: true,
283
- body: ObjectSerializer.serialize(namespaceRequest, "NamespaceRequest")
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: V1NamespacesIdGet200Response; }>((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, "V1NamespacesIdGet200Response");
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 v1NamespacesIdPut (id: string, namespaceRequest?: NamespaceRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: V1NamespacesIdGet200Response; }> {
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 v1NamespacesIdPut.');
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: V1NamespacesIdGet200Response; }>((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, "V1NamespacesIdGet200Response");
380
- resolve({ response: response, body: body });
381
- } else {
382
- reject(new HttpError(response, body, response.statusCode));
383
- }
384
- }
385
- });
386
- });
387
- });
388
- }
389
- }
@@ -1,260 +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 { ComputedViewRunRequest } from '../model/computedViewRunRequest';
19
- import { DataSourceTablePreviewRequest } from '../model/dataSourceTablePreviewRequest';
20
- import { V1NamespacesIdGet4xxResponse } from '../model/v1NamespacesIdGet4xxResponse';
21
- import { V1NamespacesNamespaceIdDataSourcesDataSourceIdPreviewPost200Response } from '../model/v1NamespacesNamespaceIdDataSourcesDataSourceIdPreviewPost200Response';
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 v1NamespacesNamespaceIdDataSourcesDataSourceIdPreviewPost (dataSourceId: string, namespaceId: string, dataSourceTablePreviewRequest?: DataSourceTablePreviewRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: V1NamespacesNamespaceIdDataSourcesDataSourceIdPreviewPost200Response; }> {
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 v1NamespacesNamespaceIdDataSourcesDataSourceIdPreviewPost.');
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 v1NamespacesNamespaceIdDataSourcesDataSourceIdPreviewPost.');
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: V1NamespacesNamespaceIdDataSourcesDataSourceIdPreviewPost200Response; }>((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, "V1NamespacesNamespaceIdDataSourcesDataSourceIdPreviewPost200Response");
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 v1NamespacesNamespaceIdDataSourcesDataSourceIdRunPost (dataSourceId: string, namespaceId: string, computedViewRunRequest?: ComputedViewRunRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
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 v1NamespacesNamespaceIdDataSourcesDataSourceIdRunPost.');
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 v1NamespacesNamespaceIdDataSourcesDataSourceIdRunPost.');
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?: any; }>((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
- resolve({ response: response, body: body });
252
- } else {
253
- reject(new HttpError(response, body, response.statusCode));
254
- }
255
- }
256
- });
257
- });
258
- });
259
- }
260
- }
package/api.ts DELETED
@@ -1,3 +0,0 @@
1
- // This is the entrypoint for the package
2
- export * from './api/apis';
3
- export * from './model/models';