generated from zero-template/monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
142 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
apps/passport/src/modules/login/dtos/microsoft/microsoft.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { ApiProperty } from "@nestjs/swagger"; | ||
import { ILoginType } from "@prisma/client"; | ||
import { LoginType } from "cc.naily.six.auth"; | ||
import { IsIn, IsNotEmpty, IsOptional, IsString } from "class-validator"; | ||
|
||
export class PostLoginMicrosoftBodyDTO { | ||
/** | ||
* 微软登录的ID | ||
* | ||
* @type {string} | ||
* @memberof PostLoginMicrosoftBodyDTO | ||
*/ | ||
@IsString() | ||
@IsNotEmpty() | ||
readonly microsoftID: string; | ||
/** | ||
* 登录设备类型 `请看schema的enum正确传值` | ||
* | ||
* @author Zero <gczgroup@qq.com> | ||
* @date 2024/01/24 | ||
* @type {LoginType} | ||
* @memberof PostLoginEmailCodeBodyDTO | ||
*/ | ||
@IsIn(LoginType) | ||
@IsString() | ||
@IsNotEmpty() | ||
@ApiProperty({ enum: LoginType }) | ||
readonly loginType: ILoginType; | ||
/** | ||
* 登录的客户端 用于记录哪个APP/哪种浏览器(比如谷歌、火狐浏览器)等 | ||
* | ||
* Web端登录时,该字段可以为空 | ||
* | ||
* @author Zero <gczgroup@qq.com> | ||
* @date 2024/01/24 | ||
* @type {string} | ||
* @memberof PostLoginEmailCodeBodyDTO | ||
*/ | ||
@IsOptional() | ||
@IsString() | ||
readonly loginClient?: string; | ||
/** | ||
* 登录的设备名 | ||
* | ||
* Web端登录时,该字段可以为空 | ||
* | ||
* @author Zero <gczgroup@qq.com> | ||
* @date 2024/01/28 | ||
* @type {string} | ||
* @memberof PostLoginEmailCodeBodyDTO | ||
*/ | ||
@IsOptional() | ||
@IsString() | ||
readonly loginDeviceName?: string; | ||
/** | ||
* 设备唯一标识符 | ||
* | ||
* Web端登录时,该字段可以为空 | ||
* | ||
* @author Zero <gczgroup@qq.com> | ||
* @date 2024/01/24 | ||
* @type {string} | ||
* @memberof PostLoginEmailCodeBodyDTO | ||
*/ | ||
@IsOptional() | ||
@IsString() | ||
identifier?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ enum ILoginMethod { | |
PhoneCode | ||
EmailCode | ||
UsernamePassword | ||
Microsoft | ||
} | ||
|
||
enum IReceiptStatus { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters