import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; export class IRole { @ApiProperty() name: string; @ApiProperty() id: string; } export class IUser { @ApiProperty() username: string; @ApiProperty() id: string; } export class IComment { @ApiProperty() id: number; @ApiProperty() message: string; @ApiProperty() created_at: string; @ApiProperty() username: string; } export class IDataAsset { @ApiProperty() id: number; @ApiPropertyOptional() database_name?: string; @ApiPropertyOptional() table_name?: string; @ApiPropertyOptional() num_columns?: number; @ApiPropertyOptional() location?: string; @ApiPropertyOptional() created_time?: string; @ApiPropertyOptional() table_type?: string; @ApiPropertyOptional() size_in_bytes?: number; @ApiPropertyOptional() num_files?: number; @ApiPropertyOptional() data_encrypted?: string; @ApiPropertyOptional() num_rows?: number; @ApiPropertyOptional() display_name?: string; @ApiProperty() pipeline_id: string; @ApiProperty() user_id: string; @ApiProperty() description: string; @ApiProperty() data_asset_type: string; @ApiProperty() tags: string[]; @ApiProperty() owner: string; @ApiProperty({ type: [IRole] }) roles: IRole[]; @ApiProperty({ type: [IUser] }) users: IUser[]; @ApiPropertyOptional() dashboard_id?: number; @ApiPropertyOptional() name?: string; @ApiPropertyOptional() parameters?: string[]; @ApiPropertyOptional() embedding_params?: object; @ApiPropertyOptional() created_at?: string; @ApiPropertyOptional() updated_at?: string; @ApiProperty({ type: [IComment] }) comments: IComment[]; } export class IOneDataAsset { @ApiProperty() data_asset: IDataAsset; } export class IMakeAComment { @ApiProperty() message: string; } export class IDeleteComment { @ApiProperty() comment: IComment; } export class ICatalogAllResponse { @ApiProperty({ type: [IDataAsset] }) data_assets: IDataAsset[]; @ApiProperty() total: number; } export class IData { @ApiProperty() var: number; @ApiProperty() date: string; @ApiProperty() last: number; @ApiProperty() maximum: number; @ApiProperty() minimum: number; @ApiProperty() day_opening: number; } export class IUpdateDataRequest { @ApiProperty() name: string; @ApiProperty() description: string; @ApiProperty() tags: string[]; } export class IPreview { @ApiProperty() id: string; @ApiProperty() database_name: string; @ApiProperty() table_name: string; @ApiProperty({ type: [IData] }) data: IData[]; } export class IDocs { @ApiProperty() id: string; @ApiProperty() docs: string; @ApiProperty() updated_at: string; @ApiProperty() table_id: string; } export class IColumnMetadata { @ApiProperty() id: string; @ApiProperty() table_name: string; @ApiProperty() column_name: string; @ApiProperty() data_type: string; @ApiProperty() missing_count: string; @ApiProperty() min: string; @ApiProperty() max: string; @ApiProperty() count: string; @ApiProperty() histogram: string; @ApiProperty() mean: string; @ApiProperty() median: string; @ApiProperty() missing_rate: string; @ApiProperty() stddev: string; @ApiProperty() unique_count: string; @ApiProperty() unique_rate: string; @ApiProperty() analyzer_rules: string[]; @ApiProperty() version: string; } export class IPreviewResponse { @ApiProperty() preview: IPreview; } export class IDocsResponse { @ApiProperty() docs: IDocs; } export class IColumnsMetadataResponse { @ApiProperty({ type: [IColumnMetadata] }) columns_metadata: IColumnMetadata[]; }