FIX: connections migration

This commit is contained in:
Gabriel Rosa
2022-09-12 13:01:11 -03:00
parent 0acf759e84
commit 642cb0e70b
11 changed files with 158 additions and 96 deletions
+29 -11
View File
@@ -13,7 +13,30 @@ import {
GetConnectionDetailsResponse,
GetConnectionResponse,
} from '@dadosfera/protospack-v2/dist/lib/ConnectionManager/interfaces/messages';
export type ConnectionTypes = 'database' | 'file' | 'application';
export type ConnectionCredentialsType =
| 'basic_auth'
| 'iam_user'
| 'role_name'
| 'oauth'
| 'api_key'
| 'service_account'
| 'headers_authF';
export interface ConnectionApiConnection {
config_id: string;
plugin: string;
secret_id: string;
created_at: string;
network_config_id: null;
type: ConnectionTypes;
credentials_type: ConnectionCredentialsType;
credentials: Record<string, any>;
sensitive_fields: string[];
name: string;
customer_name: string;
description: string;
updated_at: string;
}
export class ConnectionDto implements Connection {
// ---Automatically generated information will not be sent by the frontend--- //
@ApiProperty()
@@ -70,21 +93,17 @@ export class ConnectionDto implements Connection {
}
export class ConnectionToCatalogDto implements ConnectionToCatalog {
// ---Automatically generated information will not be sent by the frontend--- //
@ApiProperty()
// ---Automatically generated information - will not be sent by the frontend--- //
id: string;
@ApiProperty()
customer_id: string;
@ApiProperty()
updated_at: string;
@ApiProperty()
created_at: string;
// ---Information extracted from token--- //
user_id: string;
username: string;
customer_name: string;
// ---Information sent by the frontend--- //
@ApiProperty()
name: string;
@@ -98,7 +117,6 @@ export class ConnectionToCatalogDto implements ConnectionToCatalog {
network_config_id: string | null;
// ---Information sent by the frontend (Heirs of Connector)--- //
@ApiProperty()
connector_id: string;