mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-06 21:39:08 +00:00
162 lines
2.8 KiB
TypeScript
162 lines
2.8 KiB
TypeScript
import { ApiProperty, ApiPropertyOptional, OmitType } from '@nestjs/swagger';
|
|
import { Info } from '@dadosfera/protospack/dist/lib/interfaces';
|
|
|
|
export class PipelineInputsDTO {
|
|
@ApiProperty()
|
|
tables: Array<{
|
|
name: string,
|
|
type: string,
|
|
|
|
}>
|
|
}
|
|
|
|
export class IPipelineV2 {
|
|
@ApiProperty()
|
|
id: string;
|
|
|
|
@ApiProperty()
|
|
name: string;
|
|
@ApiProperty()
|
|
description: string;
|
|
@ApiProperty()
|
|
type: string;
|
|
@ApiProperty()
|
|
connection_id: string;
|
|
@ApiProperty()
|
|
cron: string;
|
|
@ApiPropertyOptional()
|
|
input_id?: string;
|
|
@ApiPropertyOptional()
|
|
transformations_ids?: string[];
|
|
@ApiPropertyOptional()
|
|
tags?: string[];
|
|
@ApiPropertyOptional()
|
|
properties?: any;
|
|
|
|
@ApiProperty()
|
|
connector_name: string;
|
|
@ApiProperty()
|
|
connector_plugin: string;
|
|
@ApiProperty()
|
|
connector_version: string;
|
|
@ApiProperty()
|
|
image_url: string;
|
|
|
|
@ApiProperty()
|
|
created_at: string;
|
|
@ApiProperty()
|
|
updated_at: string;
|
|
}
|
|
export class ICreatePipelineV2Req extends OmitType(IPipelineV2, [
|
|
'id',
|
|
'created_at',
|
|
'updated_at',
|
|
]) {}
|
|
|
|
export interface IdRequest {
|
|
id: string;
|
|
}
|
|
|
|
export interface IIdRequest {
|
|
id: string;
|
|
info: Info;
|
|
}
|
|
|
|
export interface IUpdatePipelineRequest {
|
|
input: IdRequest;
|
|
transformations: IdRequest[];
|
|
output: IdRequest;
|
|
tags: string[];
|
|
name: string;
|
|
description: string;
|
|
id: string;
|
|
info: Info;
|
|
}
|
|
|
|
export interface IGetPipelineLogsRequest {
|
|
id: string;
|
|
details: string;
|
|
}
|
|
|
|
export class IInitUploadCSVFile {
|
|
@ApiProperty()
|
|
file_name: string;
|
|
|
|
@ApiProperty()
|
|
parts: number;
|
|
}
|
|
|
|
export class ICompleteUploadCSVFile {
|
|
@ApiProperty()
|
|
upload_id: string;
|
|
|
|
@ApiProperty()
|
|
file_name: string;
|
|
|
|
@ApiProperty()
|
|
parts: { ETag: string; PartNumber: number }[];
|
|
}
|
|
|
|
export class ICreatePipelineCSVFile {
|
|
@ApiProperty()
|
|
name: string;
|
|
|
|
@ApiProperty()
|
|
file_name: string;
|
|
|
|
@ApiProperty()
|
|
description: string;
|
|
|
|
@ApiProperty()
|
|
encoding: string;
|
|
|
|
@ApiProperty()
|
|
sep: string;
|
|
|
|
@ApiProperty()
|
|
header: boolean;
|
|
|
|
@ApiProperty()
|
|
engine: string;
|
|
}
|
|
|
|
export class PipelineFindAllReq {
|
|
@ApiPropertyOptional()
|
|
search?: string | undefined;
|
|
@ApiPropertyOptional()
|
|
filters?: string | undefined;
|
|
@ApiPropertyOptional()
|
|
size?: string | undefined;
|
|
@ApiPropertyOptional()
|
|
page?: string | undefined;
|
|
@ApiPropertyOptional()
|
|
type?: string | undefined;
|
|
}
|
|
|
|
export interface UpdateTableDTO {
|
|
name: string;
|
|
type: string;
|
|
columns: string[];
|
|
destinations: {
|
|
raw: {
|
|
table_schema: string;
|
|
table_name: string;
|
|
};
|
|
qualify: {
|
|
table_schema: string;
|
|
table_name: string;
|
|
};
|
|
};
|
|
identifier_columns: string[];
|
|
reference_column: {
|
|
name: string;
|
|
type: string;
|
|
};
|
|
memory: number;
|
|
}
|
|
|
|
export interface UpdatePlatformInputRequest {
|
|
cron: string;
|
|
tables: Array<UpdateTableDTO>;
|
|
}
|