@explo-tech/fido-api 0.0.30 → 0.0.33

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,7 +88,11 @@ 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';
91
93
  export type { TenantPrivateKeyAuthentication } from './models/TenantPrivateKeyAuthentication';
94
+ export type { TenantRequest } from './models/TenantRequest';
95
+ export type { TenantResponse } from './models/TenantResponse';
92
96
  export type { TestConnectionRequest } from './models/TestConnectionRequest';
93
97
  export type { TestConnectionResponse } from './models/TestConnectionResponse';
94
98
  export type { Tunnel } from './models/Tunnel';
@@ -105,5 +109,6 @@ export { HealthResourceService } from './services/HealthResourceService';
105
109
  export { ListViewsResourceService } from './services/ListViewsResourceService';
106
110
  export { NamespaceResourceService } from './services/NamespaceResourceService';
107
111
  export { QueryResourceService } from './services/QueryResourceService';
112
+ export { TenantResourceService } from './services/TenantResourceService';
108
113
  export { TestConnectionResourceService } from './services/TestConnectionResourceService';
109
114
  export { ViewResourceService } from './services/ViewResourceService';
@@ -0,0 +1,11 @@
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
+
@@ -0,0 +1,10 @@
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
+
@@ -0,0 +1,8 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type TenantRequest = {
6
+ tenantOptions?: Record<string, any>;
7
+ };
8
+
@@ -0,0 +1,10 @@
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
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explo-tech/fido-api",
3
- "version": "0.0.30",
3
+ "version": "0.0.33",
4
4
  "description": "Fido api",
5
5
  "homepage": "https://github.com/trust-kaz/fido",
6
6
  "license": "MIT",
@@ -3,6 +3,7 @@
3
3
  /* eslint-disable */
4
4
  import type { DataSourceRequest } from '../models/DataSourceRequest';
5
5
  import type { DataSourceResponse } from '../models/DataSourceResponse';
6
+ import type { ListViewsResponse } from '../models/ListViewsResponse';
6
7
  import type { UUID } from '../models/UUID';
7
8
 
8
9
  import type { CancelablePromise } from '../core/CancelablePromise';
@@ -11,6 +12,28 @@ import { request as __request } from '../core/request';
11
12
 
12
13
  export class DataSourceResourceService {
13
14
 
15
+ /**
16
+ * Creates a data source
17
+ * @param namespaceId
18
+ * @param requestBody Data Source object to create
19
+ * @returns DataSourceResponse The requested data source
20
+ * @throws ApiError
21
+ */
22
+ public static createDataSource(
23
+ namespaceId: UUID,
24
+ requestBody: DataSourceRequest,
25
+ ): CancelablePromise<DataSourceResponse> {
26
+ return __request(OpenAPI, {
27
+ method: 'POST',
28
+ url: '/v1/namespaces/{namespaceId}/data-sources',
29
+ path: {
30
+ 'namespaceId': namespaceId,
31
+ },
32
+ body: requestBody,
33
+ mediaType: '*/*',
34
+ });
35
+ }
36
+
14
37
  /**
15
38
  * Gets a data source
16
39
  * @param id
@@ -58,44 +81,61 @@ export class DataSourceResourceService {
58
81
  }
59
82
 
60
83
  /**
61
- * Creates a data source
84
+ * Deletes a data source
62
85
  * @param id
63
86
  * @param namespaceId
64
- * @param requestBody Data Source object to create
65
- * @returns DataSourceResponse The requested data source
87
+ * @returns any 200 if the data source was deleted properly
66
88
  * @throws ApiError
67
89
  */
68
- public static createDataSource(
90
+ public static deleteDataSource(
69
91
  id: UUID,
70
92
  namespaceId: UUID,
71
- requestBody: DataSourceRequest,
72
- ): CancelablePromise<DataSourceResponse> {
93
+ ): CancelablePromise<Record<string, any>> {
73
94
  return __request(OpenAPI, {
74
- method: 'POST',
95
+ method: 'DELETE',
75
96
  url: '/v1/namespaces/{namespaceId}/data-sources/{id}',
76
97
  path: {
77
98
  'id': id,
78
99
  'namespaceId': namespaceId,
79
100
  },
80
- body: requestBody,
81
- mediaType: '*/*',
82
101
  });
83
102
  }
84
103
 
85
104
  /**
86
- * Deletes a data source
105
+ * Gets tables
87
106
  * @param id
88
107
  * @param namespaceId
89
- * @returns any 200 if the data source was deleted properly
108
+ * @returns ListViewsResponse The tables views associated with the data source
90
109
  * @throws ApiError
91
110
  */
92
- public static deleteDataSource(
111
+ public static getTables(
93
112
  id: UUID,
94
113
  namespaceId: UUID,
95
- ): CancelablePromise<Record<string, any>> {
114
+ ): CancelablePromise<ListViewsResponse> {
96
115
  return __request(OpenAPI, {
97
- method: 'DELETE',
98
- url: '/v1/namespaces/{namespaceId}/data-sources/{id}',
116
+ method: 'GET',
117
+ url: '/v1/namespaces/{namespaceId}/data-sources/{id}/tables',
118
+ path: {
119
+ 'id': id,
120
+ 'namespaceId': namespaceId,
121
+ },
122
+ });
123
+ }
124
+
125
+ /**
126
+ * Syncs the tables for a given namespace and data source
127
+ * @param id
128
+ * @param namespaceId
129
+ * @returns ListViewsResponse Syncs the tables for a given namespace and data source
130
+ * @throws ApiError
131
+ */
132
+ public static syncTables(
133
+ id: UUID,
134
+ namespaceId: UUID,
135
+ ): CancelablePromise<ListViewsResponse> {
136
+ return __request(OpenAPI, {
137
+ method: 'POST',
138
+ url: '/v1/namespaces/{namespaceId}/data-sources/{id}/views/sync',
99
139
  path: {
100
140
  'id': id,
101
141
  'namespaceId': namespaceId,
@@ -11,6 +11,23 @@ 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
+
14
31
  /**
15
32
  * Fetches all namespaces and, optionally, their associated data sources
16
33
  * @param includeDataSources
@@ -76,28 +93,6 @@ export class NamespaceResourceService {
76
93
  });
77
94
  }
78
95
 
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
-
101
96
  /**
102
97
  * Deletes a namespace, cascading to its associated resources
103
98
  * @param id
@@ -0,0 +1,49 @@
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
+ }
@@ -12,66 +12,63 @@ import { request as __request } from '../core/request';
12
12
  export class ViewResourceService {
13
13
 
14
14
  /**
15
- * Gets a view
16
- * @param id
15
+ * Creates a view
17
16
  * @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 getView(
22
- id: UUID,
21
+ public static createView(
23
22
  namespaceId: UUID,
23
+ requestBody: ViewRequest,
24
24
  ): CancelablePromise<ViewResponse> {
25
25
  return __request(OpenAPI, {
26
- method: 'GET',
27
- url: '/v1/namespaces/{namespaceId}/views/{id}',
26
+ method: 'POST',
27
+ url: '/v1/namespaces/{namespaceId}/views',
28
28
  path: {
29
- 'id': id,
30
29
  'namespaceId': namespaceId,
31
30
  },
31
+ body: requestBody,
32
+ mediaType: '*/*',
32
33
  });
33
34
  }
34
35
 
35
36
  /**
36
- * Updates a view's metadata
37
+ * Gets a view
37
38
  * @param id
38
39
  * @param namespaceId
39
- * @param requestBody View object to update
40
- * @returns ViewResponse The updated view
40
+ * @returns ViewResponse The requested view
41
41
  * @throws ApiError
42
42
  */
43
- public static updateView(
43
+ public static getView(
44
44
  id: UUID,
45
45
  namespaceId: UUID,
46
- requestBody: ViewRequest,
47
46
  ): CancelablePromise<ViewResponse> {
48
47
  return __request(OpenAPI, {
49
- method: 'PUT',
48
+ method: 'GET',
50
49
  url: '/v1/namespaces/{namespaceId}/views/{id}',
51
50
  path: {
52
51
  'id': id,
53
52
  'namespaceId': namespaceId,
54
53
  },
55
- body: requestBody,
56
- mediaType: '*/*',
57
54
  });
58
55
  }
59
56
 
60
57
  /**
61
- * Creates a view
58
+ * Updates a view's metadata
62
59
  * @param id
63
60
  * @param namespaceId
64
- * @param requestBody View object to create
65
- * @returns ViewResponse The requested view
61
+ * @param requestBody View object to update
62
+ * @returns ViewResponse The updated view
66
63
  * @throws ApiError
67
64
  */
68
- public static createView(
65
+ public static updateView(
69
66
  id: UUID,
70
67
  namespaceId: UUID,
71
68
  requestBody: ViewRequest,
72
69
  ): CancelablePromise<ViewResponse> {
73
70
  return __request(OpenAPI, {
74
- method: 'POST',
71
+ method: 'PUT',
75
72
  url: '/v1/namespaces/{namespaceId}/views/{id}',
76
73
  path: {
77
74
  'id': id,