@explo-tech/fido-api 0.0.8 → 0.0.10
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/index.ts +14 -2
- package/models/BulkViewsRequest.ts +8 -0
- package/models/BulkViewsResponse.ts +10 -0
- package/models/ComputedView.ts +16 -0
- package/models/DataSourceConfiguration.ts +2 -1
- package/models/MySql.ts +15 -0
- package/models/MySqlAuthentication.ts +8 -0
- package/models/{ComputedViewRunRequest.ts → QueryPreviewRequest.ts} +1 -1
- package/models/{DataSourceTablePreviewRequest.ts → TablePreviewRequest.ts} +1 -1
- package/models/TableView.ts +16 -0
- package/models/View.ts +17 -0
- package/models/ViewRequest.ts +10 -0
- package/models/ViewResponse.ts +10 -0
- package/models/ViewRunRequest.ts +13 -0
- package/package.json +1 -1
- package/services/BulkViewsResourceService.ts +51 -0
- package/services/QueryResourceService.ts +35 -6
- package/services/ViewResourceService.ts +106 -0
package/index.ts
CHANGED
|
@@ -7,9 +7,11 @@ export { OpenAPI } from './core/OpenAPI';
|
|
|
7
7
|
export type { OpenAPIConfig } from './core/OpenAPI';
|
|
8
8
|
|
|
9
9
|
export type { BooleanPropertyValue } from './models/BooleanPropertyValue';
|
|
10
|
+
export type { BulkViewsRequest } from './models/BulkViewsRequest';
|
|
11
|
+
export type { BulkViewsResponse } from './models/BulkViewsResponse';
|
|
10
12
|
export type { ClientError } from './models/ClientError';
|
|
11
13
|
export type { Computation } from './models/Computation';
|
|
12
|
-
export type {
|
|
14
|
+
export type { ComputedView } from './models/ComputedView';
|
|
13
15
|
export type { DataPage } from './models/DataPage';
|
|
14
16
|
export type { DataRecord } from './models/DataRecord';
|
|
15
17
|
export type { DataRequestParameters } from './models/DataRequestParameters';
|
|
@@ -19,7 +21,6 @@ export type { DataSource } from './models/DataSource';
|
|
|
19
21
|
export type { DataSourceConfiguration } from './models/DataSourceConfiguration';
|
|
20
22
|
export type { DataSourceRequest } from './models/DataSourceRequest';
|
|
21
23
|
export type { DataSourceResponse } from './models/DataSourceResponse';
|
|
22
|
-
export type { DataSourceTablePreviewRequest } from './models/DataSourceTablePreviewRequest';
|
|
23
24
|
export type { DatePropertyValue } from './models/DatePropertyValue';
|
|
24
25
|
export type { DateTimePropertyValue } from './models/DateTimePropertyValue';
|
|
25
26
|
export type { DecimalPropertyValue } from './models/DecimalPropertyValue';
|
|
@@ -28,6 +29,8 @@ export type { Duration } from './models/Duration';
|
|
|
28
29
|
export type { Filter } from './models/Filter';
|
|
29
30
|
export type { IntegerPropertyValue } from './models/IntegerPropertyValue';
|
|
30
31
|
export type { LocalDate } from './models/LocalDate';
|
|
32
|
+
export type { MySql } from './models/MySql';
|
|
33
|
+
export type { MySqlAuthentication } from './models/MySqlAuthentication';
|
|
31
34
|
export type { Namespace } from './models/Namespace';
|
|
32
35
|
export type { NamespaceRequest } from './models/NamespaceRequest';
|
|
33
36
|
export type { NamespaceResponse } from './models/NamespaceResponse';
|
|
@@ -43,18 +46,27 @@ export { PropertyType } from './models/PropertyType';
|
|
|
43
46
|
export type { PropertyValue } from './models/PropertyValue';
|
|
44
47
|
export type { PublicTunnel } from './models/PublicTunnel';
|
|
45
48
|
export type { QueryExecutionResponse } from './models/QueryExecutionResponse';
|
|
49
|
+
export type { QueryPreviewRequest } from './models/QueryPreviewRequest';
|
|
46
50
|
export type { RequestTelemetry } from './models/RequestTelemetry';
|
|
47
51
|
export type { Sort } from './models/Sort';
|
|
48
52
|
export { SortDirection } from './models/SortDirection';
|
|
49
53
|
export type { SSHAuthentication } from './models/SSHAuthentication';
|
|
50
54
|
export type { SSHTunnel } from './models/SSHTunnel';
|
|
51
55
|
export type { StringPropertyValue } from './models/StringPropertyValue';
|
|
56
|
+
export type { TablePreviewRequest } from './models/TablePreviewRequest';
|
|
57
|
+
export type { TableView } from './models/TableView';
|
|
52
58
|
export type { TenantPrivateKeyAuthentication } from './models/TenantPrivateKeyAuthentication';
|
|
53
59
|
export type { Tunnel } from './models/Tunnel';
|
|
54
60
|
export type { UUID } from './models/UUID';
|
|
55
61
|
export type { VendorPrivateKeyAuthentication } from './models/VendorPrivateKeyAuthentication';
|
|
62
|
+
export type { View } from './models/View';
|
|
63
|
+
export type { ViewRequest } from './models/ViewRequest';
|
|
64
|
+
export type { ViewResponse } from './models/ViewResponse';
|
|
65
|
+
export type { ViewRunRequest } from './models/ViewRunRequest';
|
|
56
66
|
|
|
67
|
+
export { BulkViewsResourceService } from './services/BulkViewsResourceService';
|
|
57
68
|
export { DatasourceResourceService } from './services/DatasourceResourceService';
|
|
58
69
|
export { HealthResourceService } from './services/HealthResourceService';
|
|
59
70
|
export { NamespaceResourceService } from './services/NamespaceResourceService';
|
|
60
71
|
export { QueryResourceService } from './services/QueryResourceService';
|
|
72
|
+
export { ViewResourceService } from './services/ViewResourceService';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* istanbul ignore file */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type { PropertySchema } from './PropertySchema';
|
|
6
|
+
import type { UUID } from './UUID';
|
|
7
|
+
|
|
8
|
+
export type ComputedView = {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
columnDefinitions: Array<PropertySchema>;
|
|
12
|
+
id: UUID | null;
|
|
13
|
+
namespaceId: UUID | null;
|
|
14
|
+
query: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
/* tslint:disable */
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
|
|
5
|
+
import type { MySql } from './MySql';
|
|
5
6
|
import type { Postgres } from './Postgres';
|
|
6
7
|
import type { Tunnel } from './Tunnel';
|
|
7
8
|
|
|
8
|
-
export type DataSourceConfiguration = (Postgres | {
|
|
9
|
+
export type DataSourceConfiguration = (Postgres | MySql | {
|
|
9
10
|
tunnel: Tunnel;
|
|
10
11
|
});
|
|
11
12
|
|
package/models/MySql.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* istanbul ignore file */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type { MySqlAuthentication } from './MySqlAuthentication';
|
|
6
|
+
import type { Tunnel } from './Tunnel';
|
|
7
|
+
|
|
8
|
+
export type MySql = {
|
|
9
|
+
tunnel: Tunnel;
|
|
10
|
+
authentication: MySqlAuthentication;
|
|
11
|
+
database: string;
|
|
12
|
+
host: string;
|
|
13
|
+
port?: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import type { Computation } from './Computation';
|
|
6
6
|
import type { DataRequestParameters } from './DataRequestParameters';
|
|
7
7
|
|
|
8
|
-
export type
|
|
8
|
+
export type QueryPreviewRequest = {
|
|
9
9
|
query: string;
|
|
10
10
|
tableIdentifier: string;
|
|
11
11
|
dataRequestParameters: DataRequestParameters;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* istanbul ignore file */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type { PropertySchema } from './PropertySchema';
|
|
6
|
+
import type { UUID } from './UUID';
|
|
7
|
+
|
|
8
|
+
export type TableView = {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
columnDefinitions: Array<PropertySchema>;
|
|
12
|
+
id: UUID | null;
|
|
13
|
+
namespaceId: UUID | null;
|
|
14
|
+
tableName: string;
|
|
15
|
+
};
|
|
16
|
+
|
package/models/View.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* istanbul ignore file */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type { ComputedView } from './ComputedView';
|
|
6
|
+
import type { PropertySchema } from './PropertySchema';
|
|
7
|
+
import type { TableView } from './TableView';
|
|
8
|
+
import type { UUID } from './UUID';
|
|
9
|
+
|
|
10
|
+
export type View = (TableView | ComputedView | {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
columnDefinitions: Array<PropertySchema>;
|
|
14
|
+
id: UUID | null;
|
|
15
|
+
namespaceId: UUID | null;
|
|
16
|
+
});
|
|
17
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* istanbul ignore file */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type { Computation } from './Computation';
|
|
6
|
+
import type { DataRequestParameters } from './DataRequestParameters';
|
|
7
|
+
|
|
8
|
+
export type ViewRunRequest = {
|
|
9
|
+
dataRequestParameters: DataRequestParameters;
|
|
10
|
+
queryContext: Record<string, any>;
|
|
11
|
+
computation: Computation | null;
|
|
12
|
+
};
|
|
13
|
+
|
package/package.json
CHANGED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* istanbul ignore file */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import type { BulkViewsRequest } from '../models/BulkViewsRequest';
|
|
5
|
+
import type { View } from '../models/View';
|
|
6
|
+
|
|
7
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
8
|
+
import { OpenAPI } from '../core/OpenAPI';
|
|
9
|
+
import { request as __request } from '../core/request';
|
|
10
|
+
|
|
11
|
+
export class BulkViewsResourceService {
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Clones the request set of views
|
|
15
|
+
* @param requestBody
|
|
16
|
+
* @returns any The cloned views
|
|
17
|
+
* @throws ApiError
|
|
18
|
+
*/
|
|
19
|
+
public static cloneViews(
|
|
20
|
+
requestBody?: BulkViewsRequest,
|
|
21
|
+
): CancelablePromise<{
|
|
22
|
+
views: Array<View>;
|
|
23
|
+
}> {
|
|
24
|
+
return __request(OpenAPI, {
|
|
25
|
+
method: 'POST',
|
|
26
|
+
url: '/v1/views/clone',
|
|
27
|
+
body: requestBody,
|
|
28
|
+
mediaType: 'application/json',
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Deletes a view
|
|
34
|
+
* @param requestBody
|
|
35
|
+
* @returns any The requested views
|
|
36
|
+
* @throws ApiError
|
|
37
|
+
*/
|
|
38
|
+
public static getViews(
|
|
39
|
+
requestBody?: BulkViewsRequest,
|
|
40
|
+
): CancelablePromise<{
|
|
41
|
+
views: Array<View>;
|
|
42
|
+
}> {
|
|
43
|
+
return __request(OpenAPI, {
|
|
44
|
+
method: 'POST',
|
|
45
|
+
url: '/v1/views/get',
|
|
46
|
+
body: requestBody,
|
|
47
|
+
mediaType: 'application/json',
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/* istanbul ignore file */
|
|
2
2
|
/* tslint:disable */
|
|
3
3
|
/* eslint-disable */
|
|
4
|
-
import type { ComputedViewRunRequest } from '../models/ComputedViewRunRequest';
|
|
5
|
-
import type { DataSourceTablePreviewRequest } from '../models/DataSourceTablePreviewRequest';
|
|
6
4
|
import type { QueryExecutionResponse } from '../models/QueryExecutionResponse';
|
|
5
|
+
import type { QueryPreviewRequest } from '../models/QueryPreviewRequest';
|
|
6
|
+
import type { TablePreviewRequest } from '../models/TablePreviewRequest';
|
|
7
7
|
import type { UUID } from '../models/UUID';
|
|
8
|
+
import type { ViewRunRequest } from '../models/ViewRunRequest';
|
|
8
9
|
|
|
9
10
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
10
11
|
import { OpenAPI } from '../core/OpenAPI';
|
|
@@ -20,10 +21,10 @@ export class QueryResourceService {
|
|
|
20
21
|
* @returns QueryExecutionResponse A DataPage of the provided query
|
|
21
22
|
* @throws ApiError
|
|
22
23
|
*/
|
|
23
|
-
public static
|
|
24
|
+
public static getQueryPreview(
|
|
24
25
|
dataSourceId: UUID,
|
|
25
26
|
namespaceId: UUID,
|
|
26
|
-
requestBody?:
|
|
27
|
+
requestBody?: QueryPreviewRequest,
|
|
27
28
|
): CancelablePromise<QueryExecutionResponse> {
|
|
28
29
|
return __request(OpenAPI, {
|
|
29
30
|
method: 'POST',
|
|
@@ -45,10 +46,10 @@ export class QueryResourceService {
|
|
|
45
46
|
* @returns QueryExecutionResponse A DataPage of the resulting Data Source's data
|
|
46
47
|
* @throws ApiError
|
|
47
48
|
*/
|
|
48
|
-
public static
|
|
49
|
+
public static getTablePreview(
|
|
49
50
|
dataSourceId: UUID,
|
|
50
51
|
namespaceId: UUID,
|
|
51
|
-
requestBody?:
|
|
52
|
+
requestBody?: TablePreviewRequest,
|
|
52
53
|
): CancelablePromise<QueryExecutionResponse> {
|
|
53
54
|
return __request(OpenAPI, {
|
|
54
55
|
method: 'POST',
|
|
@@ -62,4 +63,32 @@ export class QueryResourceService {
|
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Runs the requested view against the provided data source
|
|
68
|
+
* @param dataSourceId
|
|
69
|
+
* @param namespaceId
|
|
70
|
+
* @param viewId
|
|
71
|
+
* @param requestBody
|
|
72
|
+
* @returns QueryExecutionResponse A DataPage of the provided query
|
|
73
|
+
* @throws ApiError
|
|
74
|
+
*/
|
|
75
|
+
public static runView(
|
|
76
|
+
dataSourceId: UUID,
|
|
77
|
+
namespaceId: UUID,
|
|
78
|
+
viewId: UUID,
|
|
79
|
+
requestBody?: ViewRunRequest,
|
|
80
|
+
): CancelablePromise<QueryExecutionResponse> {
|
|
81
|
+
return __request(OpenAPI, {
|
|
82
|
+
method: 'POST',
|
|
83
|
+
url: '/v1/namespaces/{namespaceId}/data-sources/{dataSourceId}/views/{viewId}/run',
|
|
84
|
+
path: {
|
|
85
|
+
'dataSourceId': dataSourceId,
|
|
86
|
+
'namespaceId': namespaceId,
|
|
87
|
+
'viewId': viewId,
|
|
88
|
+
},
|
|
89
|
+
body: requestBody,
|
|
90
|
+
mediaType: 'application/json',
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
65
94
|
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/* istanbul ignore file */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import type { UUID } from '../models/UUID';
|
|
5
|
+
import type { ViewRequest } from '../models/ViewRequest';
|
|
6
|
+
import type { ViewResponse } from '../models/ViewResponse';
|
|
7
|
+
|
|
8
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
9
|
+
import { OpenAPI } from '../core/OpenAPI';
|
|
10
|
+
import { request as __request } from '../core/request';
|
|
11
|
+
|
|
12
|
+
export class ViewResourceService {
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Gets a view
|
|
16
|
+
* @param id
|
|
17
|
+
* @param namespaceId
|
|
18
|
+
* @returns ViewResponse The requested view
|
|
19
|
+
* @throws ApiError
|
|
20
|
+
*/
|
|
21
|
+
public static getView(
|
|
22
|
+
id: UUID,
|
|
23
|
+
namespaceId: UUID,
|
|
24
|
+
): CancelablePromise<ViewResponse> {
|
|
25
|
+
return __request(OpenAPI, {
|
|
26
|
+
method: 'GET',
|
|
27
|
+
url: '/v1/namespaces/{namespaceId}/views/{id}',
|
|
28
|
+
path: {
|
|
29
|
+
'id': id,
|
|
30
|
+
'namespaceId': namespaceId,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Updates a view's metadata
|
|
37
|
+
* @param id
|
|
38
|
+
* @param namespaceId
|
|
39
|
+
* @param requestBody
|
|
40
|
+
* @returns ViewResponse The updated view
|
|
41
|
+
* @throws ApiError
|
|
42
|
+
*/
|
|
43
|
+
public static updateView(
|
|
44
|
+
id: UUID,
|
|
45
|
+
namespaceId: UUID,
|
|
46
|
+
requestBody?: ViewRequest,
|
|
47
|
+
): CancelablePromise<ViewResponse> {
|
|
48
|
+
return __request(OpenAPI, {
|
|
49
|
+
method: 'PUT',
|
|
50
|
+
url: '/v1/namespaces/{namespaceId}/views/{id}',
|
|
51
|
+
path: {
|
|
52
|
+
'id': id,
|
|
53
|
+
'namespaceId': namespaceId,
|
|
54
|
+
},
|
|
55
|
+
body: requestBody,
|
|
56
|
+
mediaType: 'application/json',
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Creates a view
|
|
62
|
+
* @param id
|
|
63
|
+
* @param namespaceId
|
|
64
|
+
* @param requestBody
|
|
65
|
+
* @returns ViewResponse The requested view
|
|
66
|
+
* @throws ApiError
|
|
67
|
+
*/
|
|
68
|
+
public static createView(
|
|
69
|
+
id: UUID,
|
|
70
|
+
namespaceId: UUID,
|
|
71
|
+
requestBody?: ViewRequest,
|
|
72
|
+
): CancelablePromise<ViewResponse> {
|
|
73
|
+
return __request(OpenAPI, {
|
|
74
|
+
method: 'POST',
|
|
75
|
+
url: '/v1/namespaces/{namespaceId}/views/{id}',
|
|
76
|
+
path: {
|
|
77
|
+
'id': id,
|
|
78
|
+
'namespaceId': namespaceId,
|
|
79
|
+
},
|
|
80
|
+
body: requestBody,
|
|
81
|
+
mediaType: 'application/json',
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Deletes a view
|
|
87
|
+
* @param id
|
|
88
|
+
* @param namespaceId
|
|
89
|
+
* @returns any 200 if the view was deleted properly
|
|
90
|
+
* @throws ApiError
|
|
91
|
+
*/
|
|
92
|
+
public static deleteView(
|
|
93
|
+
id: UUID,
|
|
94
|
+
namespaceId: UUID,
|
|
95
|
+
): CancelablePromise<Record<string, any>> {
|
|
96
|
+
return __request(OpenAPI, {
|
|
97
|
+
method: 'DELETE',
|
|
98
|
+
url: '/v1/namespaces/{namespaceId}/views/{id}',
|
|
99
|
+
path: {
|
|
100
|
+
'id': id,
|
|
101
|
+
'namespaceId': namespaceId,
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
}
|