refactor
This commit is contained in:
55
apps/api/src/domain/auth/dtos/AuthDto.ts
Normal file
55
apps/api/src/domain/auth/dtos/AuthDto.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
export class AuthenticatedUserDTO {
|
||||
@ApiProperty()
|
||||
userId!: string;
|
||||
@ApiProperty()
|
||||
email!: string;
|
||||
@ApiProperty()
|
||||
displayName!: string;
|
||||
}
|
||||
|
||||
export class AuthSessionDTO {
|
||||
@ApiProperty()
|
||||
token!: string;
|
||||
@ApiProperty()
|
||||
user!: AuthenticatedUserDTO;
|
||||
}
|
||||
|
||||
export class SignupParams {
|
||||
@ApiProperty()
|
||||
email!: string;
|
||||
@ApiProperty()
|
||||
password!: string;
|
||||
@ApiProperty()
|
||||
displayName!: string;
|
||||
@ApiProperty({ required: false })
|
||||
iracingCustomerId?: string;
|
||||
@ApiProperty({ required: false })
|
||||
primaryDriverId?: string;
|
||||
@ApiProperty({ required: false })
|
||||
avatarUrl?: string;
|
||||
}
|
||||
|
||||
export class LoginParams {
|
||||
@ApiProperty()
|
||||
email!: string;
|
||||
@ApiProperty()
|
||||
password!: string;
|
||||
}
|
||||
|
||||
export class IracingAuthRedirectResult {
|
||||
@ApiProperty()
|
||||
redirectUrl!: string;
|
||||
@ApiProperty()
|
||||
state!: string;
|
||||
}
|
||||
|
||||
export class LoginWithIracingCallbackParams {
|
||||
@ApiProperty()
|
||||
code!: string;
|
||||
@ApiProperty()
|
||||
state!: string;
|
||||
@ApiProperty({ required: false })
|
||||
returnTo?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user