fix: add documentation to the possible values of :app in conferencing controller (#20164)

Co-authored-by: Keith Williams <keithwillcode@gmail.com>
This commit is contained in:
Somay Chauhan
2025-03-18 17:41:35 -03:00
committed by GitHub
co-authored by Keith Williams
parent c2547acb3d
commit 413aba6e52
3 changed files with 69 additions and 2 deletions
@@ -37,11 +37,11 @@ import {
Req,
HttpException,
} from "@nestjs/common";
import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { ApiOperation, ApiParam, ApiTags as DocsTags } from "@nestjs/swagger";
import { plainToInstance } from "class-transformer";
import { Request } from "express";
import { GOOGLE_MEET, ZOOM, SUCCESS_STATUS, OFFICE_365_VIDEO } from "@calcom/platform-constants";
import { GOOGLE_MEET, ZOOM, SUCCESS_STATUS, OFFICE_365_VIDEO, CAL_VIDEO } from "@calcom/platform-constants";
export type OAuthCallbackState = {
accessToken: string;
@@ -71,6 +71,12 @@ export class ConferencingController {
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
@ApiOperation({ summary: "Connect your conferencing application" })
@ApiParam({
name: "app",
description: "Conferencing application type",
enum: [GOOGLE_MEET],
required: true,
})
async connect(
@GetUser("id") userId: number,
@Param("app") app: string
@@ -93,6 +99,12 @@ export class ConferencingController {
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
@ApiOperation({ summary: "Get OAuth conferencing app auth url" })
@ApiParam({
name: "app",
description: "Conferencing application type",
enum: [ZOOM, OFFICE_365_VIDEO],
required: true,
})
async redirect(
@Req() req: Request,
@Headers("Authorization") authorization: string,
@@ -138,6 +150,12 @@ export class ConferencingController {
@UseGuards()
@Redirect(undefined, 301)
@ApiOperation({ summary: "conferencing apps oauths callback" })
@ApiParam({
name: "app",
description: "Conferencing application type",
enum: [ZOOM, OFFICE_365_VIDEO],
required: true,
})
async save(
@Query("state") state: string,
@Param("app") app: string,
@@ -203,6 +221,12 @@ export class ConferencingController {
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
@ApiOperation({ summary: "Set your default conferencing application" })
@ApiParam({
name: "app",
description: "Conferencing application type",
enum: [GOOGLE_MEET, ZOOM, OFFICE_365_VIDEO, CAL_VIDEO],
required: true,
})
async default(
@GetUser() user: UserWithProfile,
@Param("app") app: string
@@ -224,6 +248,12 @@ export class ConferencingController {
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
@ApiOperation({ summary: "Disconnect your conferencing application" })
@ApiParam({
name: "app",
description: "Conferencing application type",
enum: [GOOGLE_MEET, ZOOM, OFFICE_365_VIDEO],
required: true,
})
async disconnect(
@GetUser() user: UserWithProfile,
@Param("app") app: string
+27
View File
@@ -4742,7 +4742,11 @@
"name": "app",
"required": true,
"in": "path",
"description": "Conferencing application type",
"schema": {
"enum": [
"google-meet"
],
"type": "string"
}
}
@@ -4781,7 +4785,12 @@
"name": "app",
"required": true,
"in": "path",
"description": "Conferencing application type",
"schema": {
"enum": [
"zoom",
"msteams"
],
"type": "string"
}
},
@@ -4836,7 +4845,12 @@
"name": "app",
"required": true,
"in": "path",
"description": "Conferencing application type",
"schema": {
"enum": [
"zoom",
"msteams"
],
"type": "string"
}
},
@@ -4890,7 +4904,14 @@
"name": "app",
"required": true,
"in": "path",
"description": "Conferencing application type",
"schema": {
"enum": [
"google-meet",
"zoom",
"msteams",
"daily-video"
],
"type": "string"
}
}
@@ -4943,7 +4964,13 @@
"name": "app",
"required": true,
"in": "path",
"description": "Conferencing application type",
"schema": {
"enum": [
"google-meet",
"zoom",
"msteams"
],
"type": "string"
}
}
+10
View File
@@ -4472,7 +4472,9 @@
"name": "app",
"required": true,
"in": "path",
"description": "Conferencing application type",
"schema": {
"enum": ["google-meet"],
"type": "string"
}
}
@@ -4509,7 +4511,9 @@
"name": "app",
"required": true,
"in": "path",
"description": "Conferencing application type",
"schema": {
"enum": ["zoom", "msteams"],
"type": "string"
}
},
@@ -4562,7 +4566,9 @@
"name": "app",
"required": true,
"in": "path",
"description": "Conferencing application type",
"schema": {
"enum": ["zoom", "msteams"],
"type": "string"
}
},
@@ -4612,7 +4618,9 @@
"name": "app",
"required": true,
"in": "path",
"description": "Conferencing application type",
"schema": {
"enum": ["google-meet", "zoom", "msteams", "daily-video"],
"type": "string"
}
}
@@ -4661,7 +4669,9 @@
"name": "app",
"required": true,
"in": "path",
"description": "Conferencing application type",
"schema": {
"enum": ["google-meet", "zoom", "msteams"],
"type": "string"
}
}