| 1 | import { ApiProperty } from '@nestjs/swagger'; |
| 2 | import { IsEmail } |
| 3 | |
| 4 | export class AddEmailDTO |
| 5 | @ApiProperty({ description |
| 6 | @IsEmail() |
| 7 | email: string; |
| 8 | } |
| 9 | |
| 10 | export class UserEmailDTO |
| 11 | @ApiProperty({ |
| 12 | description: 'Row id, or `primary` for the account address itself', |
| 13 | }) |
| 14 | id: string; |
| 15 | |
| 16 | @ApiProperty() |
| 17 | email: string; |
| 18 | |
| 19 | @ApiProperty({ description |
| 20 | verified: boolean; |
| 21 | |
| 22 | @ApiProperty({ |
| 23 | description: 'The address Better Auth signs the user in with', |
| 24 | }) |
| 25 | primary: boolean; |
| 26 | } |
| 27 | |
| 28 | export class ListEmailsResponseDTO |
| 29 | @ApiProperty({ type |
| 30 | emails: UserEmailDTO |
| 31 | } |