@@ -9,10 +9,15 @@ export type Connection = {
99
1010type ConnectionData = ConnectionHive | ConnectionHdfs | ConnectionOracle | ConnectionPostgres | ConnectionS3 ;
1111
12+ export type ConnectionBucketStyle = 'domain' | 'path' ;
13+
14+ export type ConnectionProtocol = 'https' | 'http' ;
15+
1216interface ConnectionHive {
1317 auth_data : {
1418 type : ConnectionType . HIVE ;
1519 user : string ;
20+ password ?: string ;
1621 } ;
1722 connection_data : {
1823 type : ConnectionType . HIVE ;
@@ -24,6 +29,7 @@ interface ConnectionHdfs {
2429 auth_data : {
2530 type : ConnectionType . HDFS ;
2631 user : string ;
32+ password ?: string ;
2733 } ;
2834 connection_data : {
2935 type : ConnectionType . HDFS ;
@@ -35,44 +41,45 @@ interface ConnectionOracle {
3541 auth_data : {
3642 type : ConnectionType . ORACLE ;
3743 user : string ;
44+ password ?: string ;
3845 } ;
3946 connection_data : {
4047 type : ConnectionType . ORACLE ;
4148 host : string ;
4249 port : number ;
4350 service_name : string | null ;
4451 sid : string | null ;
45- additional_params : object ;
4652 } ;
4753}
4854
4955interface ConnectionPostgres {
5056 auth_data : {
5157 type : ConnectionType . POSTGRES ;
5258 user : string ;
59+ password ?: string ;
5360 } ;
5461 connection_data : {
5562 type : ConnectionType . POSTGRES ;
5663 host : string ;
5764 port : number ;
5865 database_name : string ;
59- additional_params : object ;
6066 } ;
6167}
6268
6369interface ConnectionS3 {
6470 auth_data : {
6571 type : ConnectionType . S3 ;
6672 access_key : string ;
73+ secret_key ?: string ;
6774 } ;
6875 connection_data : {
6976 type : ConnectionType . S3 ;
7077 host : string ;
7178 bucket : string ;
72- bucket_style : 'domain' | 'path' ;
79+ bucket_style : ConnectionBucketStyle ;
7380 port : number | null ;
7481 region : string | null ;
75- protocol : 'http' | 'https' ;
82+ protocol : ConnectionProtocol ;
7683 } ;
7784}
7885
@@ -83,3 +90,19 @@ export interface GetConnectionsRequest extends PaginationRequest {
8390export interface GetConnectionRequest {
8491 id : number ;
8592}
93+
94+ export type CreateConnectionRequest = {
95+ group_id : number ;
96+ name : string ;
97+ description : string ;
98+ } & ConnectionData ;
99+
100+ export type UpdateConnectionRequest = {
101+ id : number ;
102+ name : string ;
103+ description : string ;
104+ } & ConnectionData ;
105+
106+ export interface DeleteConnectionRequest {
107+ id : number ;
108+ }
0 commit comments