| 1 | import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; |
| 2 | import { IsIn, IsOptional |
| 3 | import { schema } |
| 4 | |
| 5 | export class CreateRepositoryRequestDTO |
| 6 | @ApiProperty({}) |
| 7 | @IsString() |
| 8 | name: string; |
| 9 | |
| 10 | @ApiPropertyOptional({}) |
| 11 | @IsString() |
| 12 | @IsOptional() |
| 13 | description?: string |
| 14 | |
| 15 | @ApiPropertyOptional({ |
| 16 | description: |
| 17 | "Slug of the organization to create the repository in; the requester's own account when omitted. Needs admin in the organization.", |
| 18 | }) |
| 19 | @IsString() |
| 20 | @IsOptional() |
| 21 | organization?: string |
| 22 | |
| 23 | @ApiPropertyOptional({ |
| 24 | enumName: 'RepositoryVisibility', |
| 25 | enum: schema.repositoryVisiblity |
| 26 | }) |
| 27 | @IsIn(schema. |
| 28 | @IsOptional() |
| 29 | visibility?: ( |
| 30 | } |
| 31 | |
| 32 | export class CreateRepositoryResponseDTO |
| 33 | @ApiProperty() |
| 34 | @IsString() |
| 35 | id: string; |
| 36 | |
| 37 | @ApiProperty() |
| 38 | @IsString() |
| 39 | slug: string; |
| 40 | } |