chore: booker atom username / teams props enabled queries (#16514)

This commit is contained in:
Morgan
2024-09-06 12:38:37 -07:00
committed by GitHub
parent 21ef1900e9
commit 105e7d3e28
12 changed files with 118 additions and 46 deletions
@@ -1,10 +1,20 @@
import { ApiProperty } from "@nestjs/swagger";
import { IsEnum } from "class-validator";
import { IsEnum, IsNumber, IsString } from "class-validator";
import { SUCCESS_STATUS, ERROR_STATUS } from "@calcom/platform-constants";
export class ProviderVerifyClientData {
@IsString()
clientId!: string;
@IsNumber()
organizationId!: number;
@IsString()
name!: string;
}
export class ProviderVerifyClientOutput {
@ApiProperty({ example: SUCCESS_STATUS, enum: [SUCCESS_STATUS, ERROR_STATUS] })
@IsEnum([SUCCESS_STATUS, ERROR_STATUS])
status!: typeof SUCCESS_STATUS | typeof ERROR_STATUS;
data!: ProviderVerifyClientData;
}
@@ -40,6 +40,11 @@ export class CalProviderController {
return {
status: SUCCESS_STATUS,
data: {
clientId: oAuthClient.id,
organizationId: oAuthClient.organizationId,
name: oAuthClient.name,
},
};
}
+24 -1
View File
@@ -9313,6 +9313,25 @@
"status"
]
},
"ProviderVerifyClientData": {
"type": "object",
"properties": {
"clientId": {
"type": "string"
},
"organizationId": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"clientId",
"organizationId",
"name"
]
},
"ProviderVerifyClientOutput": {
"type": "object",
"properties": {
@@ -9323,10 +9342,14 @@
"success",
"error"
]
},
"data": {
"$ref": "#/components/schemas/ProviderVerifyClientData"
}
},
"required": [
"status"
"status",
"data"
]
},
"ProviderVerifyAccessTokenOutput": {