Files
maestro/src/rest/rest-inputs/dto/create-rest-input.dto.ts
T
2022-02-04 10:03:55 -03:00

65 lines
1.8 KiB
TypeScript

import { ApiProperty } from "@nestjs/swagger";
import { CronDTO } from "./cron.dto";
import { HTTPInputValues } from "./HTTPInputValues.dto";
import { JDBCInputvalues } from "./JDBCInputValues.dto";
import { S3InputValues } from "./s3InputValues.dto";
import { SalesforceInputValuesDTO } from "./salesforceInputValues.dto";
export class CreateRestInputDto {
@ApiProperty({
description:"Input CRON",
example:{
hours: ["3", "7"],
hour_interval: true,
hour_resourse: true,
hour_resourse_value: 3,
month_day: ["3"],
month_day_interval: true,
month_day_resourse: false,
month_day_resourse_value: null,
month: ["3"],
month_interval: false,
month_resourse: false,
month_resourse_value: null,
week_days: [],
week_days_interval: false,
week_days_resourse: false,
week_days_resourse_value: null
}
})
cron:CronDTO;
@ApiProperty({
description:"Name of the input",
example:"Test_Input"
})
name:string;
@ApiProperty({
description:"Plugin",
example:"s3"
})
plugin:string;
@ApiProperty({
description:"Values for choosen input",
example:{
jdbc_user: "user123",
jdbc_password: "password123",
database: "default_database",
endpoint: "dadosfera-postgres-db.test123.us-east-1.rds.amazonaws.com",
table: "test_table",
port: "5432",
engine: "postgresql"
}
})
values: SalesforceInputValuesDTO|HTTPInputValues|S3InputValues|JDBCInputvalues;
@ApiProperty({
description:"Operation name",
example:"input"
})
operation:string;
}