mirror of
https://github.com/dadosfera/maestro.git
synced 2026-09-09 22:14:48 +00:00
126 lines
2.2 KiB
TypeScript
126 lines
2.2 KiB
TypeScript
import { ApiProperty, ApiPropertyOptional, OmitType } from '@nestjs/swagger';
|
|
import { Info } from '@dadosfera/protospack/dist/lib/interfaces';
|
|
|
|
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;
|
|
}
|