@explo-tech/fido-api 0.0.39 → 0.0.40

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 CHANGED
@@ -88,11 +88,7 @@ export type { StringContains } from './models/StringContains';
88
88
  export type { StringPropertyValue } from './models/StringPropertyValue';
89
89
  export type { TablePreviewRequest } from './models/TablePreviewRequest';
90
90
  export type { TableView } from './models/TableView';
91
- export type { Tenant } from './models/Tenant';
92
- export type { TenantKey } from './models/TenantKey';
93
91
  export type { TenantPrivateKeyAuthentication } from './models/TenantPrivateKeyAuthentication';
94
- export type { TenantRequest } from './models/TenantRequest';
95
- export type { TenantResponse } from './models/TenantResponse';
96
92
  export type { TestConnectionRequest } from './models/TestConnectionRequest';
97
93
  export type { TestConnectionResponse } from './models/TestConnectionResponse';
98
94
  export type { Tunnel } from './models/Tunnel';
@@ -109,6 +105,5 @@ export { HealthResourceService } from './services/HealthResourceService';
109
105
  export { ListViewsResourceService } from './services/ListViewsResourceService';
110
106
  export { NamespaceResourceService } from './services/NamespaceResourceService';
111
107
  export { QueryResourceService } from './services/QueryResourceService';
112
- export { TenantResourceService } from './services/TenantResourceService';
113
108
  export { TestConnectionResourceService } from './services/TestConnectionResourceService';
114
109
  export { ViewResourceService } from './services/ViewResourceService';
@@ -3,15 +3,14 @@
3
3
  /* eslint-disable */
4
4
 
5
5
  import type { PropertySchema } from './PropertySchema';
6
- import type { UUID } from './UUID';
7
6
 
8
7
  export type ComputedView = {
9
8
  name: string;
10
9
  description: string | null;
11
10
  columnDefinitions: Array<PropertySchema>;
12
- readonly id?: UUID;
13
- readonly namespaceId?: UUID;
14
- '@type': string;
11
+ readonly id: string;
12
+ readonly namespaceId: string;
13
+ '@type': 'computed-view';
15
14
  query: string;
16
15
  };
17
16
 
@@ -7,8 +7,8 @@ import type { DataSourceConfiguration } from './DataSourceConfiguration';
7
7
  export type DataSource = {
8
8
  name: string;
9
9
  externalId: string;
10
- readonly id?: string;
11
- readonly namespaceId?: string;
10
+ readonly id: string;
11
+ readonly namespaceId: string;
12
12
  configuration: DataSourceConfiguration;
13
13
  };
14
14
 
@@ -2,15 +2,9 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
 
5
- import type { DataSourceConfiguration } from './DataSourceConfiguration';
5
+ import type { DataSource } from './DataSource';
6
6
 
7
7
  export type DataSourceResponse = {
8
- dataSource: {
9
- name: string;
10
- externalId: string;
11
- readonly id: string;
12
- readonly namespaceId: string;
13
- configuration: DataSourceConfiguration;
14
- };
8
+ dataSource: DataSource;
15
9
  };
16
10
 
@@ -2,9 +2,9 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
 
5
- import type { ViewResponse } from './ViewResponse';
5
+ import type { View } from './View';
6
6
 
7
7
  export type ListViewsResponse = {
8
- views: Array<ViewResponse>;
8
+ views: Array<View>;
9
9
  };
10
10
 
@@ -5,6 +5,6 @@
5
5
  export type Namespace = {
6
6
  name: string;
7
7
  ignoreTableList?: Array<string>;
8
- readonly id?: string;
8
+ readonly id: string;
9
9
  };
10
10
 
@@ -6,9 +6,7 @@ import type { Namespace } from './Namespace';
6
6
  import type { NamespaceResponseMetadata } from './NamespaceResponseMetadata';
7
7
 
8
8
  export type NamespaceResponse = {
9
- namespace: (Namespace & {
10
- readonly id: string;
11
- });
9
+ namespace: Namespace;
12
10
  meta: NamespaceResponseMetadata | null;
13
11
  };
14
12
 
@@ -3,15 +3,14 @@
3
3
  /* eslint-disable */
4
4
 
5
5
  import type { PropertySchema } from './PropertySchema';
6
- import type { UUID } from './UUID';
7
6
 
8
7
  export type TableView = {
9
8
  name: string;
10
9
  description: string | null;
11
10
  columnDefinitions: Array<PropertySchema>;
12
- readonly id?: UUID;
13
- readonly namespaceId?: UUID;
14
- '@type': string;
11
+ readonly id: string;
12
+ readonly namespaceId: string;
13
+ '@type': 'table-view';
15
14
  tableName: string;
16
15
  };
17
16
 
package/models/View.ts CHANGED
@@ -2,13 +2,15 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
 
5
+ import type { ComputedView } from './ComputedView';
5
6
  import type { PropertySchema } from './PropertySchema';
7
+ import type { TableView } from './TableView';
6
8
 
7
- export type View = {
9
+ export type View = (TableView | ComputedView | {
8
10
  name: string;
9
11
  description: string | null;
10
12
  columnDefinitions: Array<PropertySchema>;
11
- readonly id?: string;
12
- readonly namespaceId?: string;
13
- };
13
+ readonly id: string;
14
+ readonly namespaceId: string;
15
+ });
14
16
 
@@ -2,10 +2,9 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
 
5
- import type { ComputedView } from './ComputedView';
6
- import type { TableView } from './TableView';
5
+ import type { View } from './View';
7
6
 
8
7
  export type ViewRequest = {
9
- view: (TableView | ComputedView);
8
+ view: View;
10
9
  };
11
10
 
@@ -5,9 +5,6 @@
5
5
  import type { View } from './View';
6
6
 
7
7
  export type ViewResponse = {
8
- view: (View & {
9
- readonly id: string;
10
- readonly namespaceId: string;
11
- });
8
+ view: View;
12
9
  };
13
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explo-tech/fido-api",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "description": "Fido api",
5
5
  "homepage": "https://github.com/trust-kaz/fido",
6
6
  "license": "MIT",
@@ -13,63 +13,66 @@ import { request as __request } from '../core/request';
13
13
  export class DataSourceResourceService {
14
14
 
15
15
  /**
16
- * Creates a data source
16
+ * Gets a data source
17
+ * @param id
17
18
  * @param namespaceId
18
- * @param requestBody Data Source object to create
19
19
  * @returns DataSourceResponse The requested data source
20
20
  * @throws ApiError
21
21
  */
22
- public static createDataSource(
22
+ public static getDataSource(
23
+ id: UUID,
23
24
  namespaceId: UUID,
24
- requestBody: DataSourceRequest,
25
25
  ): CancelablePromise<DataSourceResponse> {
26
26
  return __request(OpenAPI, {
27
- method: 'POST',
28
- url: '/v1/namespaces/{namespaceId}/data-sources',
27
+ method: 'GET',
28
+ url: '/v1/namespaces/{namespaceId}/data-sources/{id}',
29
29
  path: {
30
+ 'id': id,
30
31
  'namespaceId': namespaceId,
31
32
  },
32
- body: requestBody,
33
- mediaType: '*/*',
34
33
  });
35
34
  }
36
35
 
37
36
  /**
38
- * Gets a data source
37
+ * Updates a data source's metadata
39
38
  * @param id
40
39
  * @param namespaceId
41
- * @returns DataSourceResponse The requested data source
40
+ * @param requestBody Data Source object to update
41
+ * @returns DataSourceResponse The updated data source
42
42
  * @throws ApiError
43
43
  */
44
- public static getDataSource(
44
+ public static updateDataSource(
45
45
  id: UUID,
46
46
  namespaceId: UUID,
47
+ requestBody: DataSourceRequest,
47
48
  ): CancelablePromise<DataSourceResponse> {
48
49
  return __request(OpenAPI, {
49
- method: 'GET',
50
+ method: 'PUT',
50
51
  url: '/v1/namespaces/{namespaceId}/data-sources/{id}',
51
52
  path: {
52
53
  'id': id,
53
54
  'namespaceId': namespaceId,
54
55
  },
56
+ body: requestBody,
57
+ mediaType: '*/*',
55
58
  });
56
59
  }
57
60
 
58
61
  /**
59
- * Updates a data source's metadata
62
+ * Creates a data source
60
63
  * @param id
61
64
  * @param namespaceId
62
- * @param requestBody Data Source object to update
63
- * @returns DataSourceResponse The updated data source
65
+ * @param requestBody Data Source object to create
66
+ * @returns DataSourceResponse The requested data source
64
67
  * @throws ApiError
65
68
  */
66
- public static updateDataSource(
69
+ public static createDataSource(
67
70
  id: UUID,
68
71
  namespaceId: UUID,
69
72
  requestBody: DataSourceRequest,
70
73
  ): CancelablePromise<DataSourceResponse> {
71
74
  return __request(OpenAPI, {
72
- method: 'PUT',
75
+ method: 'POST',
73
76
  url: '/v1/namespaces/{namespaceId}/data-sources/{id}',
74
77
  path: {
75
78
  'id': id,
@@ -2,7 +2,7 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
  import type { ListViewsRequest } from '../models/ListViewsRequest';
5
- import type { ViewResponse } from '../models/ViewResponse';
5
+ import type { View } from '../models/View';
6
6
 
7
7
  import type { CancelablePromise } from '../core/CancelablePromise';
8
8
  import { OpenAPI } from '../core/OpenAPI';
@@ -19,7 +19,7 @@ export class ListViewsResourceService {
19
19
  public static cloneViews(
20
20
  requestBody: ListViewsRequest,
21
21
  ): CancelablePromise<{
22
- views: Array<ViewResponse>;
22
+ views: Array<View>;
23
23
  }> {
24
24
  return __request(OpenAPI, {
25
25
  method: 'POST',
@@ -38,7 +38,7 @@ export class ListViewsResourceService {
38
38
  public static getViews(
39
39
  requestBody: ListViewsRequest,
40
40
  ): CancelablePromise<{
41
- views: Array<ViewResponse>;
41
+ views: Array<View>;
42
42
  }> {
43
43
  return __request(OpenAPI, {
44
44
  method: 'POST',
@@ -11,23 +11,6 @@ import { request as __request } from '../core/request';
11
11
 
12
12
  export class NamespaceResourceService {
13
13
 
14
- /**
15
- * Creates a namespace and optionally a data source associated with it
16
- * @param requestBody Namespace object to create
17
- * @returns NamespaceResponse The requested namespace, along with its associated data source if applicable
18
- * @throws ApiError
19
- */
20
- public static createNamespace(
21
- requestBody: NamespaceRequest,
22
- ): CancelablePromise<NamespaceResponse> {
23
- return __request(OpenAPI, {
24
- method: 'POST',
25
- url: '/v1/namespaces',
26
- body: requestBody,
27
- mediaType: '*/*',
28
- });
29
- }
30
-
31
14
  /**
32
15
  * Fetches all namespaces and, optionally, their associated data sources
33
16
  * @param includeDataSources
@@ -93,6 +76,28 @@ export class NamespaceResourceService {
93
76
  });
94
77
  }
95
78
 
79
+ /**
80
+ * Creates a namespace and optionally a data source associated with it
81
+ * @param id
82
+ * @param requestBody Namespace object to create
83
+ * @returns NamespaceResponse The requested namespace, along with its associated data source if applicable
84
+ * @throws ApiError
85
+ */
86
+ public static createNamespace(
87
+ id: UUID,
88
+ requestBody: NamespaceRequest,
89
+ ): CancelablePromise<NamespaceResponse> {
90
+ return __request(OpenAPI, {
91
+ method: 'POST',
92
+ url: '/v1/namespaces/{id}',
93
+ path: {
94
+ 'id': id,
95
+ },
96
+ body: requestBody,
97
+ mediaType: '*/*',
98
+ });
99
+ }
100
+
96
101
  /**
97
102
  * Deletes a namespace, cascading to its associated resources
98
103
  * @param id
@@ -12,63 +12,66 @@ import { request as __request } from '../core/request';
12
12
  export class ViewResourceService {
13
13
 
14
14
  /**
15
- * Creates a view
15
+ * Gets a view
16
+ * @param id
16
17
  * @param namespaceId
17
- * @param requestBody View object to create
18
18
  * @returns ViewResponse The requested view
19
19
  * @throws ApiError
20
20
  */
21
- public static createView(
21
+ public static getView(
22
+ id: UUID,
22
23
  namespaceId: UUID,
23
- requestBody: ViewRequest,
24
24
  ): CancelablePromise<ViewResponse> {
25
25
  return __request(OpenAPI, {
26
- method: 'POST',
27
- url: '/v1/namespaces/{namespaceId}/views',
26
+ method: 'GET',
27
+ url: '/v1/namespaces/{namespaceId}/views/{id}',
28
28
  path: {
29
+ 'id': id,
29
30
  'namespaceId': namespaceId,
30
31
  },
31
- body: requestBody,
32
- mediaType: '*/*',
33
32
  });
34
33
  }
35
34
 
36
35
  /**
37
- * Gets a view
36
+ * Updates a view's metadata
38
37
  * @param id
39
38
  * @param namespaceId
40
- * @returns ViewResponse The requested view
39
+ * @param requestBody View object to update
40
+ * @returns ViewResponse The updated view
41
41
  * @throws ApiError
42
42
  */
43
- public static getView(
43
+ public static updateView(
44
44
  id: UUID,
45
45
  namespaceId: UUID,
46
+ requestBody: ViewRequest,
46
47
  ): CancelablePromise<ViewResponse> {
47
48
  return __request(OpenAPI, {
48
- method: 'GET',
49
+ method: 'PUT',
49
50
  url: '/v1/namespaces/{namespaceId}/views/{id}',
50
51
  path: {
51
52
  'id': id,
52
53
  'namespaceId': namespaceId,
53
54
  },
55
+ body: requestBody,
56
+ mediaType: '*/*',
54
57
  });
55
58
  }
56
59
 
57
60
  /**
58
- * Updates a view's metadata
61
+ * Creates a view
59
62
  * @param id
60
63
  * @param namespaceId
61
- * @param requestBody View object to update
62
- * @returns ViewResponse The updated view
64
+ * @param requestBody View object to create
65
+ * @returns ViewResponse The requested view
63
66
  * @throws ApiError
64
67
  */
65
- public static updateView(
68
+ public static createView(
66
69
  id: UUID,
67
70
  namespaceId: UUID,
68
71
  requestBody: ViewRequest,
69
72
  ): CancelablePromise<ViewResponse> {
70
73
  return __request(OpenAPI, {
71
- method: 'PUT',
74
+ method: 'POST',
72
75
  url: '/v1/namespaces/{namespaceId}/views/{id}',
73
76
  path: {
74
77
  'id': id,
package/models/Tenant.ts DELETED
@@ -1,11 +0,0 @@
1
- /* istanbul ignore file */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
-
5
- import type { TenantKey } from './TenantKey';
6
-
7
- export type Tenant = {
8
- id: string;
9
- keys?: Array<TenantKey>;
10
- };
11
-
@@ -1,10 +0,0 @@
1
- /* istanbul ignore file */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
-
5
- export type TenantKey = {
6
- id: string;
7
- createdAt: string;
8
- value: string | null;
9
- };
10
-
@@ -1,8 +0,0 @@
1
- /* istanbul ignore file */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
-
5
- export type TenantRequest = {
6
- tenantOptions?: Record<string, any>;
7
- };
8
-
@@ -1,10 +0,0 @@
1
- /* istanbul ignore file */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
-
5
- import type { Tenant } from './Tenant';
6
-
7
- export type TenantResponse = {
8
- tenant: Tenant;
9
- };
10
-
@@ -1,49 +0,0 @@
1
- /* istanbul ignore file */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- import type { TenantRequest } from '../models/TenantRequest';
5
- import type { TenantResponse } from '../models/TenantResponse';
6
- import type { UUID } from '../models/UUID';
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 TenantResourceService {
13
-
14
- /**
15
- * Creates a tenant
16
- * @param requestBody Tenant request to create with
17
- * @returns TenantResponse The requested tenant
18
- * @throws ApiError
19
- */
20
- public static createTenant(
21
- requestBody: TenantRequest,
22
- ): CancelablePromise<TenantResponse> {
23
- return __request(OpenAPI, {
24
- method: 'POST',
25
- url: '/v1/tenants',
26
- body: requestBody,
27
- mediaType: '*/*',
28
- });
29
- }
30
-
31
- /**
32
- * Gets a tenant
33
- * @param id
34
- * @returns TenantResponse The requested tenant
35
- * @throws ApiError
36
- */
37
- public static getTenant(
38
- id: UUID,
39
- ): CancelablePromise<TenantResponse> {
40
- return __request(OpenAPI, {
41
- method: 'GET',
42
- url: '/v1/tenants/{id}',
43
- path: {
44
- 'id': id,
45
- },
46
- });
47
- }
48
-
49
- }