From 67ae5d4e90b3abbc97fd83de6b14d42b4020396c Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 3 Nov 2025 12:02:50 -0300 Subject: [PATCH 1/6] feat: Extend Swagger Coverage for controller `OAuth2PresentationApiController` --- .../OAuth2PresentationApiController.php | 1156 +++++++++++++---- .../Summit/SummitEventSerializer.php | 2 +- app/Swagger/SummitPresentationSchemas.php | 540 +++++++- 3 files changed, 1470 insertions(+), 228 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php index 682555eb8..1f4e4c343 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php @@ -1,4 +1,7 @@ -processRequest(function () use ($summit_id, $presentation_id) { @@ -142,12 +170,26 @@ public function getPresentationVideos($summit_id, $presentation_id) }); } - /** - * @param $summit_id - * @param $presentation_id - * @param $video_id - * @return JsonResponse|mixed - */ + #[OA\Get( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/videos/{video_id}", + summary: "Get a video from a presentation", + operationId: "getPresentationVideo", + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'video_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/PresentationVideo") + ), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function getPresentationVideo($summit_id, $presentation_id, $video_id) { return $this->processRequest(function () use ($summit_id, $presentation_id, $video_id) { @@ -172,12 +214,33 @@ public function getPresentationVideo($summit_id, $presentation_id, $video_id) }); } - /** - * @param LaravelRequest $request - * @param $summit_id - * @param $presentation_id - * @return JsonResponse|mixed - */ + #[OA\Post( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/videos", + summary: "Add a video to a presentation", + operationId: "addPresentationVideo", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: "#/components/schemas/PresentationVideoRequest") + ), + responses: [ + new OA\Response( + response: Response::HTTP_CREATED, + description: "Created", + content: new OA\JsonContent(ref: "#/components/schemas/PresentationVideo") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function addVideo(LaravelRequest $request, $summit_id, $presentation_id) { return $this->processRequest(function () use ($request, $summit_id, $presentation_id) { @@ -201,13 +264,34 @@ public function addVideo(LaravelRequest $request, $summit_id, $presentation_id) }); } - /** - * @param LaravelRequest $request - * @param $summit_id - * @param $presentation_id - * @param $video_id - * @return JsonResponse|mixed - */ + #[OA\Put( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/videos/{video_id}", + summary: "Update a video from a presentation", + operationId: "updatePresentationVideo", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'video_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: "#/components/schemas/PresentationVideoRequest") + ), + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/PresentationVideo") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function updateVideo(LaravelRequest $request, $summit_id, $presentation_id, $video_id) { return $this->processRequest(function () use ($request, $summit_id, $presentation_id, $video_id) { @@ -231,12 +315,25 @@ public function updateVideo(LaravelRequest $request, $summit_id, $presentation_i }); } - /** - * @param $summit_id - * @param $presentation_id - * @param $video_id - * @return JsonResponse|mixed - */ + #[OA\Delete( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/videos/{video_id}", + summary: "Delete a video from a presentation", + operationId: "deletePresentationVideo", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'video_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: Response::HTTP_NO_CONTENT, description: "No Content"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function deleteVideo($summit_id, $presentation_id, $video_id) { return $this->processRequest(function () use ($summit_id, $presentation_id, $video_id) { @@ -251,10 +348,32 @@ public function deleteVideo($summit_id, $presentation_id, $video_id) }); } - /** - * @param $summit_id - * @return mixed - */ + #[OA\Post( + path: "/api/v1/summits/{id}/presentations", + summary: "Submit a presentation", + operationId: "submitPresentation", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: "#/components/schemas/PresentationSubmissionRequest") + ), + responses: [ + new OA\Response( + response: Response::HTTP_CREATED, + description: "Created", + content: new OA\JsonContent(ref: "#/components/schemas/Presentation") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function submitPresentation($summit_id) { @@ -284,11 +403,27 @@ public function submitPresentation($summit_id) }); } - /** - * @param $summit_id - * @param $presentation_id - * @return mixed - */ + #[OA\Get( + path: "/api/v1/summits/{id}/presentations/{presentation_id}", + summary: "Get a presentation submission", + operationId: "getPresentationSubmission", + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/PresentationSubmission") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function getPresentationSubmission($summit_id, $presentation_id) { return $this->processRequest(function () use ($summit_id, $presentation_id) { @@ -318,11 +453,33 @@ public function getPresentationSubmission($summit_id, $presentation_id) }); } - /** - * @param $summit_id - * @param $presentation_id - * @return mixed - */ + #[OA\Put( + path: "/api/v1/summits/{id}/presentations/{presentation_id}", + summary: "Update a presentation submission", + operationId: "updatePresentationSubmission", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: "#/components/schemas/PresentationSubmissionRequest") + ), + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/Presentation") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function updatePresentationSubmission($summit_id, $presentation_id) { return $this->processRequest(function () use ($summit_id, $presentation_id) { @@ -357,11 +514,28 @@ public function updatePresentationSubmission($summit_id, $presentation_id) }); } - /** - * @param $summit_id - * @param $presentation_id - * @return mixed - */ + #[OA\Put( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/completed", + summary: "Mark a presentation submission as completed", + operationId: "completePresentationSubmission", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/Presentation") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function completePresentationSubmission($summit_id, $presentation_id) { return $this->processRequest(function () use ($summit_id, $presentation_id) { @@ -386,11 +560,24 @@ public function completePresentationSubmission($summit_id, $presentation_id) }); } - /** - * @param $summit_id - * @param $presentation_id - * @return mixed - */ + #[OA\Delete( + path: "/api/v1/summits/{id}/presentations/{presentation_id}", + summary: "Delete a presentation", + operationId: "deletePresentation", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: 204, description: "No Content"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function deletePresentation($summit_id, $presentation_id) { return $this->processRequest(function () use ($summit_id, $presentation_id) { @@ -415,11 +602,28 @@ public function deletePresentation($summit_id, $presentation_id) // Slides - /** - * @param $summit_id - * @param $presentation_id - * @return JsonResponse|mixed - */ + #[OA\Get( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/slides", + summary: "Get all slides from a presentation", + operationId: "getPresentationSlides", + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent( + type: "array", + items: new OA\Items(ref: "#/components/schemas/PresentationSlide") + ) + ), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function getPresentationSlides($summit_id, $presentation_id) { return $this->processRequest(function () use ($summit_id, $presentation_id) { @@ -450,12 +654,26 @@ public function getPresentationSlides($summit_id, $presentation_id) }); } - /** - * @param $summit_id - * @param $presentation_id - * @param $slide_id - * @return JsonResponse|mixed - */ + #[OA\Get( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/slides/{slide_id}", + summary: "Get a slide from a presentation", + operationId: "getPresentationSlide", + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'slide_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/PresentationSlide") + ), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function getPresentationSlide($summit_id, $presentation_id, $slide_id) { return $this->processRequest(function () use ($summit_id, $presentation_id, $slide_id) { @@ -479,12 +697,36 @@ public function getPresentationSlide($summit_id, $presentation_id, $slide_id) }); } - /** - * @param LaravelRequest $request - * @param $summit_id - * @param $presentation_id - * @return JsonResponse|mixed - */ + #[OA\Post( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/slides", + summary: "Add a slide to a presentation", + operationId: "addPresentationSlide", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\MediaType( + mediaType: "multipart/form-data", + schema: new OA\Schema(ref: "#/components/schemas/PresentationSlideRequest") + ) + ), + responses: [ + new OA\Response( + response: Response::HTTP_CREATED, + description: "Created", + content: new OA\JsonContent(ref: "#/components/schemas/PresentationSlide") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function addPresentationSlide(LaravelRequest $request, $summit_id, $presentation_id) { return $this->processRequest(function () use ($request, $summit_id, $presentation_id) { @@ -541,13 +783,37 @@ public function addPresentationSlide(LaravelRequest $request, $summit_id, $prese }); } - /** - * @param LaravelRequest $request - * @param $summit_id - * @param $presentation_id - * @param $slide_id - * @return JsonResponse|mixed - */ + #[OA\Put( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/slides/{slide_id}", + summary: "Update a slide from a presentation", + operationId: "updatePresentationSlide", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'slide_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\MediaType( + mediaType: "multipart/form-data", + schema: new OA\Schema(ref: "#/components/schemas/PresentationSlideRequest") + ) + ), + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/PresentationSlide") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function updatePresentationSlide(LaravelRequest $request, $summit_id, $presentation_id, $slide_id) { return $this->processRequest(function () use ($request, $summit_id, $presentation_id, $slide_id) { @@ -604,12 +870,25 @@ public function updatePresentationSlide(LaravelRequest $request, $summit_id, $pr }); } - /** - * @param $summit_id - * @param $presentation_id - * @param $slide_id - * @return JsonResponse|mixed - */ + #[OA\Delete( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/slides/{slide_id}", + summary: "Delete a slide from a presentation", + operationId: "deletePresentationSlide", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'slide_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: 204, description: "No Content"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function deletePresentationSlide($summit_id, $presentation_id, $slide_id) { return $this->processRequest(function () use ($summit_id, $presentation_id, $slide_id) { @@ -638,11 +917,28 @@ public function deletePresentationSlide($summit_id, $presentation_id, $slide_id) // Links - /** - * @param $summit_id - * @param $presentation_id - * @return JsonResponse|mixed - */ + #[OA\Get( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/links", + summary: "Get all links from a presentation", + operationId: "getPresentationLinks", + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent( + type: "array", + items: new OA\Items(ref: "#/components/schemas/PresentationLink") + ) + ), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function getPresentationLinks($summit_id, $presentation_id) { return $this->processRequest(function () use ($summit_id, $presentation_id) { @@ -673,12 +969,26 @@ public function getPresentationLinks($summit_id, $presentation_id) }); } - /** - * @param $summit_id - * @param $presentation_id - * @param $link_id - * @return JsonResponse|mixed - */ + #[OA\Get( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/links/{link_id}", + summary: "Get a link from a presentation", + operationId: "getPresentationLink", + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'link_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/PresentationLink") + ), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function getPresentationLink($summit_id, $presentation_id, $link_id) { return $this->processRequest(function () use ($summit_id, $presentation_id, $link_id) { @@ -704,12 +1014,36 @@ public function getPresentationLink($summit_id, $presentation_id, $link_id) } - /** - * @param LaravelRequest $request - * @param $summit_id - * @param $presentation_id - * @return JsonResponse|mixed - */ + #[OA\Post( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/links", + summary: "Add a link to a presentation", + operationId: "addPresentationLink", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\MediaType( + mediaType: "multipart/form-data", + schema: new OA\Schema(ref: "#/components/schemas/PresentationLinkRequest") + ) + ), + responses: [ + new OA\Response( + response: Response::HTTP_CREATED, + description: "Created", + content: new OA\JsonContent(ref: "#/components/schemas/PresentationLink") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function addPresentationLink(LaravelRequest $request, $summit_id, $presentation_id) { return $this->processRequest(function () use ($request, $summit_id, $presentation_id) { @@ -758,13 +1092,37 @@ public function addPresentationLink(LaravelRequest $request, $summit_id, $presen }); } - /** - * @param LaravelRequest $request - * @param $summit_id - * @param $presentation_id - * @param $link_id - * @return JsonResponse|mixed - */ + #[OA\Put( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/links/{link_id}", + summary: "Update a link from a presentation", + operationId: "updatePresentationLink", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'link_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\MediaType( + mediaType: "multipart/form-data", + schema: new OA\Schema(ref: "#/components/schemas/PresentationLinkRequest") + ) + ), + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/PresentationLink") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function updatePresentationLink(LaravelRequest $request, $summit_id, $presentation_id, $link_id) { return $this->processRequest(function () use ($request, $summit_id, $presentation_id, $link_id) { @@ -814,12 +1172,25 @@ public function updatePresentationLink(LaravelRequest $request, $summit_id, $pre }); } - /** - * @param $summit_id - * @param $presentation_id - * @param $link_id - * @return JsonResponse|mixed - */ + #[OA\Delete( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/links/{link_id}", + summary: "Delete a link from a presentation", + operationId: "deletePresentationLink", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'link_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: 204, description: "No Content"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function deletePresentationLink($summit_id, $presentation_id, $link_id) { return $this->processRequest(function () use ($summit_id, $presentation_id, $link_id) { @@ -847,11 +1218,28 @@ public function deletePresentationLink($summit_id, $presentation_id, $link_id) // MediaUploads - /** - * @param $summit_id - * @param $presentation_id - * @return JsonResponse|mixed - */ + #[OA\Get( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/media-uploads", + summary: "Get all media uploads from a presentation", + operationId: "getPresentationMediaUploads", + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent( + type: "array", + items: new OA\Items(ref: "#/components/schemas/PresentationMediaUpload") + ) + ), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function getPresentationMediaUploads($summit_id, $presentation_id) { return $this->processRequest(function () use ($summit_id, $presentation_id) { @@ -882,12 +1270,26 @@ public function getPresentationMediaUploads($summit_id, $presentation_id) }); } - /** - * @param $summit_id - * @param $presentation_id - * @param $media_upload_id - * @return JsonResponse|mixed - */ + #[OA\Get( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/media-uploads/{media_upload_id}", + summary: "Get a media upload from a presentation", + operationId: "getPresentationMediaUpload", + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'media_upload_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/PresentationMediaUpload") + ), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function getPresentationMediaUpload($summit_id, $presentation_id, $media_upload_id) { return $this->processRequest(function () use ($summit_id, $presentation_id, $media_upload_id) { @@ -912,12 +1314,36 @@ public function getPresentationMediaUpload($summit_id, $presentation_id, $media_ }); } - /** - * @param LaravelRequest $request - * @param $summit_id - * @param $presentation_id - * @return JsonResponse|mixed - */ + #[OA\Post( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/media-uploads", + summary: "Add a media upload to a presentation", + operationId: "addPresentationMediaUpload", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\MediaType( + mediaType: "multipart/form-data", + schema: new OA\Schema(ref: "#/components/schemas/PresentationMediaUploadRequest") + ) + ), + responses: [ + new OA\Response( + response: Response::HTTP_CREATED, + description: "Created", + content: new OA\JsonContent(ref: "#/components/schemas/PresentationMediaUpload") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function addPresentationMediaUpload(LaravelRequest $request, $summit_id, $presentation_id) { return $this->processRequest(function () use ($request, $summit_id, $presentation_id) { @@ -978,13 +1404,37 @@ public function addPresentationMediaUpload(LaravelRequest $request, $summit_id, }); } - /** - * @param LaravelRequest $request - * @param $summit_id - * @param $presentation_id - * @param $media_upload_id - * @return JsonResponse|mixed - */ + #[OA\Put( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/media-uploads/{media_upload_id}", + summary: "Update a media upload from a presentation", + operationId: "updatePresentationMediaUpload", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'media_upload_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\MediaType( + mediaType: "multipart/form-data", + schema: new OA\Schema(ref: "#/components/schemas/PresentationMediaUploadRequest") + ) + ), + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/PresentationMediaUpload") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function updatePresentationMediaUpload(LaravelRequest $request, $summit_id, $presentation_id, $media_upload_id) { return $this->processRequest(function () use ($request, $summit_id, $presentation_id, $media_upload_id) { @@ -1045,12 +1495,25 @@ public function updatePresentationMediaUpload(LaravelRequest $request, $summit_i }); } - /** - * @param $summit_id - * @param $presentation_id - * @param $media_upload_id - * @return JsonResponse|mixed - */ + #[OA\Delete( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/media-uploads/{media_upload_id}", + summary: "Delete a media upload from a presentation", + operationId: "deletePresentationMediaUpload", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'media_upload_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: 204, description: "No Content"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function deletePresentationMediaUpload($summit_id, $presentation_id, $media_upload_id) { return $this->processRequest(function () use ($summit_id, $presentation_id, $media_upload_id) { @@ -1078,10 +1541,29 @@ public function deletePresentationMediaUpload($summit_id, $presentation_id, $med }); } - /** - * @param $summit_id - * @return JsonResponse|mixed - */ + #[OA\Post( + path: "/api/v1/summits/{id}/presentations/all/import/mux", + summary: "Import assets from MUX", + operationId: "importAssetsFromMUX", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: "#/components/schemas/MuxImportRequest") + ), + responses: [ + new OA\Response(response: Response::HTTP_OK, description: "OK"), + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function importAssetsFromMUX($summit_id) { return $this->processRequest(function () use ($summit_id) { @@ -1126,11 +1608,21 @@ public function importAssetsFromMUX($summit_id) * Attendees Votes */ - /** - * @param $summit_id - * @param $presentation_id - * @return JsonResponse|mixed - */ + #[OA\Get( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/votes", + summary: "Get attendee votes for a presentation", + operationId: "getAttendeeVotes", + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: "OK"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function getAttendeeVotes($summit_id, $presentation_id) { return $this->processRequest(function () use ($summit_id, $presentation_id) { @@ -1142,11 +1634,28 @@ public function getAttendeeVotes($summit_id, $presentation_id) }); } - /** - * @param $summit_id - * @param $presentation_id - * @return JsonResponse|mixed - */ + #[OA\Post( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/vote", + summary: "Cast an attendee vote for a presentation", + operationId: "castAttendeeVote", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response( + response: Response::HTTP_CREATED, + description: "Created", + content: new OA\JsonContent(ref: "#/components/schemas/PresentationVote") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function castAttendeeVote($summit_id, $presentation_id) { @@ -1173,11 +1682,24 @@ public function castAttendeeVote($summit_id, $presentation_id) }); } - /** - * @param $summit_id - * @param $presentation_id - * @return JsonResponse|mixed - */ + #[OA\Delete( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/vote", + summary: "Remove an attendee vote for a presentation", + operationId: "unCastAttendeeVote", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: 204, description: "No Content"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function unCastAttendeeVote($summit_id, $presentation_id) { return $this->processRequest(function () use ($summit_id, $presentation_id) { @@ -1194,13 +1716,29 @@ public function unCastAttendeeVote($summit_id, $presentation_id) }); } - /** - * @param $summit_id - * @param $selection_plan_id - * @param $presentation_id - * @param $score_type_id - * @return JsonResponse|mixed - */ + #[OA\Post( + path: "/api/v1/summits/{id}/selection-plans/{selection_plan_id}/presentations/{presentation_id}/scores/{score_type_id}", + summary: "Add a track chair score to a presentation", + operationId: "addTrackChairScore", + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'selection_plan_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'score_type_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response( + response: Response::HTTP_CREATED, + description: "Created", + content: new OA\JsonContent(ref: "#/components/schemas/PresentationTrackChairScore") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function addTrackChairScore($summit_id, $selection_plan_id, $presentation_id, $score_type_id) { @@ -1229,13 +1767,26 @@ public function addTrackChairScore($summit_id, $selection_plan_id, $presentation }); } - /** - * @param $summit_id - * @param $selection_plan_id - * @param $presentation_id - * @param $score_type_id - * @return JsonResponse|mixed - */ + #[OA\Delete( + path: "/api/v1/summits/{id}/selection-plans/{selection_plan_id}/presentations/{presentation_id}/scores/{score_type_id}", + summary: "Remove a track chair score from a presentation", + operationId: "removeTrackChairScore", + security: [['summit_oauth2' => [SummitScopes::WriteTrackChairData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'selection_plan_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'score_type_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: 204, description: "No Content"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function removeTrackChairScore($summit_id, $selection_plan_id, $presentation_id, $score_type_id) { @@ -1255,12 +1806,33 @@ public function removeTrackChairScore($summit_id, $selection_plan_id, $presentat }); } - /** - * @param $summit_id - * @param $presentation_id - * @param $speaker_id - * @return JsonResponse|mixed - */ + #[OA\Post( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/speakers/{speaker_id}", + summary: "Add a speaker to a presentation", + operationId: "addSpeaker2Presentation", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'speaker_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: false, + content: new OA\JsonContent(ref: "#/components/schemas/PresentationSpeakerRequest") + ), + responses: [ + new OA\Response( + response: Response::HTTP_CREATED, + description: "Created", + content: new OA\JsonContent(ref: "#/components/schemas/Presentation") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function addSpeaker2Presentation($summit_id, $presentation_id, $speaker_id) { @@ -1287,12 +1859,33 @@ public function addSpeaker2Presentation($summit_id, $presentation_id, $speaker_i }); } - /** - * @param $summit_id - * @param $presentation_id - * @param $speaker_id - * @return JsonResponse|mixed - */ + #[OA\Put( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/speakers/{speaker_id}", + summary: "Update a speaker in a presentation", + operationId: "updateSpeakerInPresentation", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'speaker_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: "#/components/schemas/PresentationSpeakerRequest") + ), + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/Presentation") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function updateSpeakerInPresentation($summit_id, $presentation_id, $speaker_id) { @@ -1322,12 +1915,25 @@ public function updateSpeakerInPresentation($summit_id, $presentation_id, $speak }); } - /** - * @param $summit_id - * @param $presentation_id - * @param $speaker_id - * @return JsonResponse|mixed - */ + #[OA\Delete( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/speakers/{speaker_id}", + summary: "Remove a speaker from a presentation", + operationId: "removeSpeakerFromPresentation", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'speaker_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: 204, description: "No Content"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function removeSpeakerFromPresentation($summit_id, $presentation_id, $speaker_id) { @@ -1349,11 +1955,29 @@ public function removeSpeakerFromPresentation($summit_id, $presentation_id, $spe use ParametrizedGetAll; - /** - * @param $summit_id - * @param $presentation_id - * @return JsonResponse - */ + #[OA\Get( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/comments", + summary: "Get all comments from a presentation", + operationId: "getPresentationComments", + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'page', in: 'query', required: false, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'per_page', in: 'query', required: false, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'filter', in: 'query', required: false, schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'order', in: 'query', required: false, schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/PaginatedPresentationComments") + ), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function getComments($summit_id, $presentation_id) { @@ -1405,6 +2029,26 @@ function ($page, $per_page, $filter, $order, $applyExtraFilters) { ); } + #[OA\Get( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/comments/{comment_id}", + summary: "Get a comment from a presentation", + operationId: "getPresentationComment", + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'comment_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/SummitPresentationComment") + ), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function getComment($summit_id, $presentation_id, $comment_id) { return $this->processRequest(function () use ($summit_id, $presentation_id, $comment_id) { @@ -1427,12 +2071,25 @@ public function getComment($summit_id, $presentation_id, $comment_id) }); } - /** - * @param $summit_id - * @param $presentation_id - * @param $comment_id - * @return mixed - */ + #[OA\Delete( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/comments/{comment_id}", + summary: "Delete a comment from a presentation", + operationId: "deletePresentationComment", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'comment_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: 204, description: "No Content"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function deleteComment($summit_id, $presentation_id, $comment_id) { return $this->processRequest(function () use ($summit_id, $presentation_id, $comment_id) { @@ -1446,11 +2103,33 @@ public function deleteComment($summit_id, $presentation_id, $comment_id) } - /** - * @param $summit_id - * @param $presentation_id - * @return mixed - */ + #[OA\Post( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/comments", + summary: "Add a comment to a presentation", + operationId: "addPresentationComment", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: "#/components/schemas/PresentationCommentRequest") + ), + responses: [ + new OA\Response( + response: Response::HTTP_CREATED, + description: "Created", + content: new OA\JsonContent(ref: "#/components/schemas/SummitPresentationComment") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function addComment($summit_id, $presentation_id) { return $this->processRequest(function () use ($summit_id, $presentation_id) { @@ -1471,12 +2150,34 @@ public function addComment($summit_id, $presentation_id) }); } - /** - * @param $summit_id - * @param $presentation_id - * @param $comment_id - * @return mixed - */ + #[OA\Put( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/comments/{comment_id}", + summary: "Update a comment from a presentation", + operationId: "updatePresentationComment", + security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'comment_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: "#/components/schemas/PresentationCommentRequest") + ), + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/SummitPresentationComment") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function updateComment($summit_id, $presentation_id, $comment_id) { return $this->processRequest(function () use ($summit_id, $presentation_id, $comment_id) { @@ -1497,11 +2198,28 @@ public function updateComment($summit_id, $presentation_id, $comment_id) }); } - /** - * @param $summit_id - * @param $presentation_id - * @return mixed - */ + #[OA\Get( + path: "/api/v1/summits/{id}/presentations/{presentation_id}/extra-questions", + summary: "Get extra question answers from a presentation", + operationId: "getPresentationsExtraQuestions", + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'filter', in: 'query', required: false, schema: new OA\Schema(type: 'string'), description: 'Filter by selection_plan_id'), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/PaginatedExtraQuestionAnswers") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] public function getPresentationsExtraQuestions($summit_id, $presentation_id) { return $this->processRequest(function () use ($summit_id, $presentation_id) { @@ -1562,4 +2280,4 @@ public function getPresentationsExtraQuestions($summit_id, $presentation_id) )); }); } -} \ No newline at end of file +} diff --git a/app/ModelSerializers/Summit/SummitEventSerializer.php b/app/ModelSerializers/Summit/SummitEventSerializer.php index f3b6b9f9a..0000549c3 100644 --- a/app/ModelSerializers/Summit/SummitEventSerializer.php +++ b/app/ModelSerializers/Summit/SummitEventSerializer.php @@ -122,7 +122,7 @@ class SummitEventSerializer extends SilverStripeSerializer ]; /** - * @param null $expand + * @param string|null $expand * @param array $fields * @param array $relations * @param array $params diff --git a/app/Swagger/SummitPresentationSchemas.php b/app/Swagger/SummitPresentationSchemas.php index 54f150301..57248c922 100644 --- a/app/Swagger/SummitPresentationSchemas.php +++ b/app/Swagger/SummitPresentationSchemas.php @@ -23,7 +23,9 @@ ) ] )] -class PresentationTrackChairRatingTypeSchema {} +class PresentationTrackChairRatingTypeSchema +{ +} #[OA\Schema( schema: 'PaginatedPresentationTrackChairRatingTypesResponse', @@ -41,7 +43,9 @@ class PresentationTrackChairRatingTypeSchema {} ) ] )] -class PaginatedPresentationTrackChairRatingTypesResponseSchema {} +class PaginatedPresentationTrackChairRatingTypesResponseSchema +{ +} #[OA\Schema( schema: 'PresentationTrackChairRatingTypeCreateRequest', @@ -60,7 +64,9 @@ class PaginatedPresentationTrackChairRatingTypesResponseSchema {} ) ] )] -class PresentationTrackChairRatingTypeCreateRequestSchema {} +class PresentationTrackChairRatingTypeCreateRequestSchema +{ +} #[OA\Schema( schema: 'PresentationTrackChairRatingTypeUpdateRequest', @@ -78,7 +84,9 @@ class PresentationTrackChairRatingTypeCreateRequestSchema {} ) ] )] -class PresentationTrackChairRatingTypeUpdateRequestSchema {} +class PresentationTrackChairRatingTypeUpdateRequestSchema +{ +} // @@ -100,7 +108,9 @@ class PresentationTrackChairRatingTypeUpdateRequestSchema {} new OA\Property(property: "type", type: "PresentationTrackChairRatingType"), ], )] -class PresentationTrackChairScoreType {} +class PresentationTrackChairScoreType +{ +} #[OA\Schema( schema: "PaginatedPresentationTrackChairScoreTypesResponse", @@ -118,7 +128,9 @@ class PresentationTrackChairScoreType {} ) ] )] -class PaginatedPresentationTrackChairScoreTypesResponse {} +class PaginatedPresentationTrackChairScoreTypesResponse +{ +} #[OA\Schema( schema: "PresentationTrackChairScoreTypeCreateRequest", @@ -130,7 +142,9 @@ class PaginatedPresentationTrackChairScoreTypesResponse {} new OA\Property(property: "description", type: "string", example: "This presentation is excellent"), ] )] -class PresentationTrackChairScoreTypeCreateRequest {} +class PresentationTrackChairScoreTypeCreateRequest +{ +} #[OA\Schema( schema: "PresentationTrackChairScoreTypeUpdateRequest", @@ -142,6 +156,516 @@ class PresentationTrackChairScoreTypeCreateRequest {} new OA\Property(property: "description", type: "string", nullable: true, example: "This presentation is excellent"), ] )] -class PresentationTrackChairScoreTypeUpdateRequest {} +class PresentationTrackChairScoreTypeUpdateRequest +{ +} // End Track Chair Score Types +// PRESENTATION VIDEO SCHEMAS + +#[OA\Schema( + schema: "PresentationVideo", + required: ["id", "created", "last_edited"], + properties: [ + new OA\Property(property: "id", type: "integer"), + new OA\Property(property: "created", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "last_edited", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "name", type: "string", nullable: true), + new OA\Property(property: "description", type: "string", nullable: true), + new OA\Property(property: "display_on_site", type: "boolean"), + new OA\Property(property: "featured", type: "boolean"), + new OA\Property(property: "order", type: "integer"), + new OA\Property(property: "presentation_id", type: "integer"), + new OA\Property(property: "class_name", type: "string"), + new OA\Property(property: "youtube_id", type: "string", nullable: true), + new OA\Property(property: "external_url", type: "string", format: "uri", nullable: true), + new OA\Property(property: "data_uploaded", type: "integer", format: "int64", nullable: true, description: "Epoch timestamp"), + new OA\Property(property: "highlighted", type: "boolean"), + new OA\Property(property: "views", type: "integer"), + ] +)] +class PresentationVideoSchema +{ +} + +#[OA\Schema( + schema: "PresentationVideoRequest", + required: [], + properties: [ + new OA\Property(property: "name", type: "string", nullable: true), + new OA\Property(property: "description", type: "string", nullable: true), + new OA\Property(property: "display_on_site", type: "boolean", nullable: true), + new OA\Property(property: "featured", type: "boolean", nullable: true), + new OA\Property(property: "order", type: "integer", nullable: true), + new OA\Property(property: "youtube_id", type: "string", nullable: true), + new OA\Property(property: "external_url", type: "string", format: "uri", nullable: true), + new OA\Property(property: "highlighted", type: "boolean", nullable: true), + ] +)] +class PresentationVideoRequestSchema +{ +} + +// PRESENTATION SLIDE SCHEMAS + +#[OA\Schema( + schema: "PresentationSlide", + required: ["id", "created", "last_edited"], + properties: [ + new OA\Property(property: "id", type: "integer"), + new OA\Property(property: "created", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "last_edited", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "name", type: "string", nullable: true), + new OA\Property(property: "description", type: "string", nullable: true), + new OA\Property(property: "display_on_site", type: "boolean"), + new OA\Property(property: "featured", type: "boolean"), + new OA\Property(property: "order", type: "integer"), + new OA\Property(property: "link", type: "string", nullable: true), + new OA\Property(property: "has_file", type: "boolean"), + ] +)] +class PresentationSlideSchema +{ +} + +#[OA\Schema( + schema: "PresentationSlideRequest", + required: [], + properties: [ + new OA\Property(property: "name", type: "string", nullable: true), + new OA\Property(property: "description", type: "string", nullable: true), + new OA\Property(property: "display_on_site", type: "boolean", nullable: true), + new OA\Property(property: "featured", type: "boolean", nullable: true), + new OA\Property(property: "order", type: "integer", nullable: true), + new OA\Property(property: "link", type: "string", nullable: true), + new OA\Property(property: "file", type: "string", format: "binary", nullable: true, description: "Slide file upload"), + ] +)] +class PresentationSlideRequestSchema +{ +} + +// PRESENTATION LINK SCHEMAS + +#[OA\Schema( + schema: "PresentationLink", + required: ["id", "created", "last_edited"], + properties: [ + new OA\Property(property: "id", type: "integer"), + new OA\Property(property: "created", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "last_edited", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "name", type: "string", nullable: true), + new OA\Property(property: "description", type: "string", nullable: true), + new OA\Property(property: "display_on_site", type: "boolean"), + new OA\Property(property: "featured", type: "boolean"), + new OA\Property(property: "order", type: "integer"), + new OA\Property(property: "link", type: "string", nullable: true), + ] +)] +class PresentationLinkSchema +{ +} + +#[OA\Schema( + schema: "PresentationLinkRequest", + required: ["link"], + properties: [ + new OA\Property(property: "name", type: "string", nullable: true), + new OA\Property(property: "description", type: "string", nullable: true), + new OA\Property(property: "display_on_site", type: "boolean", nullable: true), + new OA\Property(property: "featured", type: "boolean", nullable: true), + new OA\Property(property: "order", type: "integer", nullable: true), + new OA\Property(property: "link", type: "string"), + ] +)] +class PresentationLinkRequestSchema +{ +} + +// PRESENTATION MEDIA UPLOAD SCHEMAS + +#[OA\Schema( + schema: "PresentationMediaUpload", + required: ["id", "created", "last_edited", "media_upload_type_id"], + properties: [ + new OA\Property(property: "id", type: "integer"), + new OA\Property(property: "created", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "last_edited", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "name", type: "string", nullable: true), + new OA\Property(property: "description", type: "string", nullable: true), + new OA\Property(property: "display_on_site", type: "boolean"), + new OA\Property(property: "order", type: "integer"), + new OA\Property(property: "filename", type: "string", nullable: true), + new OA\Property(property: "media_upload_type_id", type: "integer"), + new OA\Property(property: "public_url", type: "string", format: "uri", nullable: true), + ] +)] +class PresentationMediaUploadSchema +{ +} + +#[OA\Schema( + schema: "PresentationMediaUploadRequest", + required: ["media_upload_type_id"], + properties: [ + new OA\Property(property: "media_upload_type_id", type: "integer"), + new OA\Property(property: "display_on_site", type: "boolean", nullable: true), + new OA\Property(property: "file", type: "string", format: "binary", nullable: true, description: "Media file upload"), + ] +)] +class PresentationMediaUploadRequestSchema +{ +} + +// PRESENTATION SCHEMAS + +#[OA\Schema( + schema: "Presentation", + required: ["id", "created", "last_edited", "title"], + properties: [ + new OA\Property(property: "id", type: "integer"), + new OA\Property(property: "created", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "last_edited", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "title", type: "string"), + new OA\Property(property: "description", type: "string"), + new OA\Property(property: "social_description", type: "string"), + new OA\Property(property: "start_date", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "end_date", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "location_id", type: "integer"), + new OA\Property(property: "summit_id", type: "integer"), + new OA\Property(property: "type_id", type: "integer"), + new OA\Property(property: "class_name", type: "string"), + new OA\Property(property: "allow_feedback", type: "boolean"), + new OA\Property(property: "avg_feedback_rate", type: "float"), + new OA\Property(property: "is_published", type: "boolean"), + new OA\Property(property: "published_date", type: "ime_epoch"), + new OA\Property(property: "head_count", type: "integer"), + new OA\Property(property: "track_id", type: "integer"), + new OA\Property(property: "meeting_url", type: "string"), + new OA\Property(property: "attendance_count", type: "integer"), + new OA\Property(property: "current_attendance_count", type: "integer"), + new OA\Property(property: "image", type: "url"), + new OA\Property(property: "level", type: "string"), + new OA\Property(property: "created_by_id", type: "integer"), + new OA\Property(property: "updated_by_id", type: "integer"), + new OA\Property(property: "show_sponsors", type: "boolean"), + new OA\Property(property: "duration", type: "integer"), + new OA\Property(property: "stream_is_secure", type: "boolean"), + new OA\Property(property: "submission_source", type: "string"), + new OA\Property(property: "rsvp_link", type: "string"), + new OA\Property(property: "rsvp_template_id", type: "integer"), + new OA\Property(property: "rsvp_max_user_number", type: "integer"), + new OA\Property(property: "rsvp_max_user_wait_list_number", type: "integer"), + new OA\Property(property: "rsvp_regular_count", type: "integer"), + new OA\Property(property: "rsvp_wait_count", type: "integer"), + new OA\Property(property: "rsvp_external", type: "boolean"), + new OA\Property(property: "rsvp_type", type: "string"), + new OA\Property(property: "rsvp_capacity", type: "string"), + + new OA\Property(property: "creator_id", type: "integer"), + new OA\Property(property: "moderator_speaker_id", type: "integer"), + new OA\Property(property: "selection_plan_id", type: "integer"), + new OA\Property(property: "problem_addressed", type: "string"), + new OA\Property(property: "attendees_expected_learnt", type: "string"), + new OA\Property(property: "to_record", type: "boolean"), + new OA\Property(property: "attending_media", type: "boolean"), + new OA\Property(property: "status", type: "string"), + new OA\Property(property: "progress", type: "integer", description: "Progress percentage"), + new OA\Property(property: "slug", type: "string"), + new OA\Property(property: "selection_status", type: "string"), + new OA\Property(property: "disclaimer_accepted_date", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "disclaimer_accepted", type: "boolean"), + new OA\Property(property: "custom_order", type: "integer"), + new OA\Property(property: "attendee_votes_count", type: "integer"), + new OA\Property(property: "review_status", type: "string"), + + new OA\Property(property: "speakers", type: "array", items: new OA\Items(oneOf: [ + new OA\Schema(type: "integer"), + new OA\Schema(type: "PresentationSpeaker"), + ]), description: "List of speakers associated with the presentation. Ids when the is present in relations, PresentationSpeaker when is present in expand."), + new OA\Property(property: "moderator", type: "PresentationSpeaker"), + new OA\Property(property: "creator", type: "Member"), + new OA\Property(property: "selection_plan", type: "SelectionPlan"), + new OA\Property(property: "slides", type: "array", items: new OA\Items(oneOf: [ + new OA\Schema(type: "PresentationSlide"), + new OA\Schema(type: "integer"), + ]), description: "List of slides associated with the presentation. PresentationSlide objects when present in expand, Ids when present in relations."), + new OA\Property(property: "public_comments", type: "array", items: new OA\Items(oneOf: [ + new OA\Schema(type: "SummitPresentationComment"), + new OA\Schema(type: "integer"), + ]), description: "List of public comments associated with the presentation. SummitPresentationComment objects when present in expand, Ids when present in relations."), + new OA\Property(property: "links", type: "array", items: new OA\Items(oneOf: [ + new OA\Schema(type: "PresentationLink"), + new OA\Schema(type: "integer"), + ]), description: "List of links associated with the presentation. PresentationLink objects when present in expand, Ids when present in relations."), + new OA\Property(property: "videos", type: "array", items: new OA\Items(oneOf: [ + new OA\Schema(type: "PresentationVideo"), + new OA\Schema(type: "integer"), + ]), description: "List of videos associated with the presentation. PresentationVideo objects when present in expand, Ids when present in relations."), + new OA\Property(property: "media_uploads", type: "array", items: new OA\Items(oneOf: [ + new OA\Schema(ref: "#/components/schemas/PresentationMediaUpload"), + new OA\Schema(type: "integer"), + ]), description: "List of media uploads associated with the presentation. MediaUpload objects when present in expand, Ids when present in relations."), + new OA\Property(property: "extra_questions", type: "array", items: new OA\Items(oneOf: [ + new OA\Schema(type: "PresentationExtraQuestionAnswer"), + new OA\Schema(type: "integer"), + ]), description: "List of extra questions associated with the presentation. PresentationExtraQuestionAnswer objects when present in expand, Ids when present in relations."), + new OA\Property(property: "actions", type: "array", items: new OA\Items(oneOf: [ + new OA\Schema(type: "PresentationAction"), + new OA\Schema(type: "integer"), + ]), description: "List of actions associated with the presentation. PresentationAction objects when present in expand, Ids when present in relations."), + + new OA\Property(property: "sponsors", type: "array", items: new OA\Items(oneOf: [ + new OA\Schema(type: "Company"), + new OA\Schema(type: "integer"), + ]), description: "List of sponsors associated with the presentation. Company objects when present in expand, Ids when present in relations."), + new OA\Property(property: "tags", type: "array", items: new OA\Items(oneOf: [ + new OA\Schema(type: "Tag"), + new OA\Schema(type: "integer"), + ]), description: "List of tags associated with the presentation. Tag objects when present in expand, Ids when present in relations."), + new OA\Property(property: "feedback", type: "array", items: new OA\Items(oneOf: [ + new OA\Schema(type: "SummitEventFeedback"), + new OA\Schema(type: "integer"), + ]), description: "List of feedback entries associated with the presentation. SummitEventFeedback objects when present in expand, Ids when present in relations."), + new OA\Property(property: "current_attendance", type: "array", items: new OA\Items(oneOf: [ + new OA\Schema(type: "SummitEventAttendanceMetric"), + new OA\Schema(type: "integer"), + ]), description: "List of current attendance metrics associated with the presentation. SummitEventAttendanceMetric objects when present in expand, Ids when present in relations."), + new OA\Property( + property: "location", + type: ["SummitAbstractLocation", "integer"], + description: "List of locations associated with the presentation. SummitAbstractLocation objects when present in expand, Ids when present in relations." + ), + new OA\Property( + property: "rsvp_template", + type: "RSVPTemplate", + description: "RSVP template associated with the presentation, only present in expand and if the presentation is has the field rsvp_template_id with a value greater than zero (0).", + ), + new OA\Property( + property: "track", + type: ["PresentationCategory", "integer"], + description: "List of presentation categories associated with the presentation. PresentationCategory objects when present in expand, Ids when present in relations.", + ), + new OA\Property( + property: "type", + type: ["SummitEventType", "integer"], + description: "List of presentation types associated with the presentation. SummitEventType objects when present in expand, Ids when present in relations.", + ), + new OA\Property( + property: "created_by", + type: "Member", + description: "Member who created the presentation, only present in expand.", + ), + new OA\Property( + property: "updated_by", + type: "Member", + description: "Member who updated the presentation, only present in expand.", + ), + new OA\Property(property: "allowed_ticket_types", type: "array", items: new OA\Items(oneOf: [ + new OA\Schema(type: "SummitTicketType"), + new OA\Schema(type: "integer"), + ]), description: "List of allowed ticket types associated with the presentation. SummitTicketType objects when present in expand, Ids when present in relations."), + + ] + +)] +class PresentationSchema +{ +} + +#[OA\Schema( + schema: "PresentationSubmission", + required: [ + "id", + "created", + "last_edited", + "title", + "description", + "social_summary", + "level", + "attendees_expected_learnt", + "type_id", + "track_id", + "selection_plan_id", + "selection_status", + "progress", + "completed", + ], + properties: [ + new OA\Property(property: "id", type: "integer"), + new OA\Property(property: "created", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "last_edited", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "title", type: "string"), + new OA\Property(property: "description", type: "string"), + new OA\Property(property: "social_summary", type: "string"), + new OA\Property(property: "level", type: "string"), + new OA\Property(property: "attendees_expected_learnt", type: "string"), + new OA\Property(property: "type_id", type: "integer"), + new OA\Property(property: "track_id", type: "integer"), + new OA\Property(property: "selection_plan_id", type: "integer"), + new OA\Property(property: "selection_status", type: "string"), + new OA\Property(property: "progress", type: "integer", description: "Progress percentage"), + new OA\Property(property: "completed", type: "boolean"), + ] +)] +class PresentationSubmissionSchema +{ +} + +#[OA\Schema( + schema: "PresentationSubmissionRequest", + required: ["title", "type_id", "track_id", "selection_plan_id"], + properties: [ + new OA\Property(property: "title", type: "string", maxLength: 255), + new OA\Property(property: "description", type: "string", maxLength: 2200, nullable: true), + new OA\Property(property: "social_description", type: "string", maxLength: 300, nullable: true), + new OA\Property(property: "social_summary", type: "string", maxLength: 100, nullable: true), + new OA\Property(property: "attendees_expected_learnt", type: "string", maxLength: 1100, nullable: true), + new OA\Property(property: "will_all_speakers_attend", type: "boolean"), + new OA\Property(property: "type_id", type: "integer"), + new OA\Property(property: "track_id", type: "integer", nullable: true), + new OA\Property(property: "attending_media", type: "boolean", nullable: true), + new OA\Property(property: "links", type: "array", items: new OA\Items(type: "string"), nullable: true), + new OA\Property(property: "tags", type: "array", items: new OA\Items(type: "string"), nullable: true), + new OA\Property(property: "extra_questions", type: "array", items: new OA\Items(type: "object"), nullable: true), + new OA\Property(property: "disclaimer_accepted", type: "boolean"), + new OA\Property(property: "selection_plan_id", type: "integer", nullable: false), + new OA\Property(property: "duration", type: "integer", minimum: 0), + new OA\Property(property: "level", type: "string", nullable: true), + new OA\Property(property: "submission_source", type: "enum", enum: ["Submission", "Admin"]), + ] +)] +class PresentationSubmissionRequestSchema +{ +} + +// PRESENTATION COMMENT SCHEMAS + +#[OA\Schema( + schema: "SummitPresentationComment", + required: ["id", "created", "last_edited", "body"], + properties: [ + new OA\Property(property: "id", type: "integer"), + new OA\Property(property: "created", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "last_edited", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "body", type: "string"), + new OA\Property(property: "is_public", type: "boolean"), + new OA\Property(property: "is_activity", type: "boolean"), + new OA\Property(property: "creator_id", type: "integer"), + new OA\Property(property: "creator", type: "object", nullable: true), + ] +)] +class SummitPresentationCommentSchema +{ +} + +#[OA\Schema( + schema: "PresentationCommentRequest", + required: ["body"], + properties: [ + new OA\Property(property: "body", type: "string"), + new OA\Property(property: "is_public", type: "boolean", nullable: true), + new OA\Property(property: "is_activity", type: "boolean", nullable: true), + ] +)] +class PresentationCommentRequestSchema +{ +} + +#[OA\Schema( + schema: "PaginatedPresentationComments", + properties: [ + new OA\Property(property: "total", type: "integer"), + new OA\Property(property: "last_page", type: "integer"), + new OA\Property(property: "current_page", type: "integer"), + new OA\Property(property: "per_page", type: "integer"), + new OA\Property( + property: "data", + type: "array", + items: new OA\Items(ref: "#/components/schemas/SummitPresentationComment") + ), + ] +)] +class PaginatedPresentationCommentsSchema +{ +} + +// PRESENTATION VOTE SCHEMAS + +#[OA\Schema( + schema: "PresentationVote", + required: ["id", "created", "presentation_id", "voter_id"], + properties: [ + new OA\Property(property: "id", type: "integer"), + new OA\Property(property: "created", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "presentation_id", type: "integer"), + new OA\Property(property: "voter_id", type: "integer"), + ] +)] +class PresentationVoteSchema +{ +} + +// TRACK CHAIR SCORE SCHEMAS + +#[OA\Schema( + schema: "PresentationTrackChairScore", + required: ["id", "created", "score_type_id", "presentation_id"], + properties: [ + new OA\Property(property: "id", type: "integer"), + new OA\Property(property: "created", type: "integer", format: "int64", description: "Epoch timestamp"), + new OA\Property(property: "score_type_id", type: "integer"), + new OA\Property(property: "presentation_id", type: "integer"), + new OA\Property(property: "reviewer_id", type: "integer"), + ] +)] +class PresentationTrackChairScoreSchema +{ +} + +// SPEAKER SCHEMAS + +#[OA\Schema( + schema: "PresentationSpeakerRequest", + properties: [ + new OA\Property(property: "order", type: "integer", minimum: 1, nullable: true), + ] +)] +class PresentationSpeakerRequestSchema +{ +} + +// MUX IMPORT SCHEMAS + +#[OA\Schema( + schema: "MuxImportRequest", + required: ["mux_token_id", "mux_token_secret"], + properties: [ + new OA\Property(property: "mux_token_id", type: "string"), + new OA\Property(property: "mux_token_secret", type: "string"), + new OA\Property(property: "email_to", type: "string", format: "email", nullable: true), + ] +)] +class MuxImportRequestSchema +{ +} + +// EXTRA QUESTIONS SCHEMAS + +#[OA\Schema( + schema: "PaginatedExtraQuestionAnswers", + properties: [ + new OA\Property(property: "total", type: "integer"), + new OA\Property(property: "last_page", type: "integer"), + new OA\Property(property: "current_page", type: "integer"), + new OA\Property(property: "per_page", type: "integer"), + new OA\Property( + property: "data", + type: "array", + items: new OA\Items(type: "object") + ), + ] +)] +class PaginatedExtraQuestionAnswersSchema +{ +} From b34a6d685cd2a9a367e91c77b06c3a4ce02cde4d Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Fri, 28 Nov 2025 14:57:29 +0000 Subject: [PATCH 2/6] fix: routes --- .../Summit/OAuth2PresentationApiController.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php index 1f4e4c343..42bb10844 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php @@ -92,7 +92,7 @@ final class OAuth2PresentationApiController extends OAuth2ProtectedController * @param ISummitRepository $summit_repository * @param ISummitEventRepository $presentation_repository * @param IMemberRepository $member_repository - * @params ISummitPresentationCommentRepository $presentation_comments_repository + * @param ISummitPresentationCommentRepository $presentation_comments_repository * @param IResourceServerContext $resource_server_context */ public function __construct @@ -1609,7 +1609,7 @@ public function importAssetsFromMUX($summit_id) */ #[OA\Get( - path: "/api/v1/summits/{id}/presentations/{presentation_id}/votes", + path: "/api/v1/summits/{id}/presentations/{presentation_id}/attendee-votes", summary: "Get attendee votes for a presentation", operationId: "getAttendeeVotes", tags: ['Presentations'], @@ -1635,7 +1635,7 @@ public function getAttendeeVotes($summit_id, $presentation_id) } #[OA\Post( - path: "/api/v1/summits/{id}/presentations/{presentation_id}/vote", + path: "/api/v1/summits/{id}/presentations/{presentation_id}/attendee-votes", summary: "Cast an attendee vote for a presentation", operationId: "castAttendeeVote", security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], @@ -1683,7 +1683,7 @@ public function castAttendeeVote($summit_id, $presentation_id) } #[OA\Delete( - path: "/api/v1/summits/{id}/presentations/{presentation_id}/vote", + path: "/api/v1/summits/{id}/presentations/{presentation_id}/attendee-votes", summary: "Remove an attendee vote for a presentation", operationId: "unCastAttendeeVote", security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], @@ -1717,7 +1717,7 @@ public function unCastAttendeeVote($summit_id, $presentation_id) } #[OA\Post( - path: "/api/v1/summits/{id}/selection-plans/{selection_plan_id}/presentations/{presentation_id}/scores/{score_type_id}", + path: "/api/v1/summits/{id}/selection-plans/{selection_plan_id}/presentations/{presentation_id}/track-chair-scores/{score_type_id}", summary: "Add a track chair score to a presentation", operationId: "addTrackChairScore", tags: ['Presentations'], @@ -1768,7 +1768,7 @@ public function addTrackChairScore($summit_id, $selection_plan_id, $presentation } #[OA\Delete( - path: "/api/v1/summits/{id}/selection-plans/{selection_plan_id}/presentations/{presentation_id}/scores/{score_type_id}", + path: "/api/v1/summits/{id}/selection-plans/{selection_plan_id}/presentations/{presentation_id}/track-chair-scores/{score_type_id}", summary: "Remove a track chair score from a presentation", operationId: "removeTrackChairScore", security: [['summit_oauth2' => [SummitScopes::WriteTrackChairData]]], From d14e7a0bc77492c81842b4788e817cd3e0c68944 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Fri, 28 Nov 2025 18:06:24 +0000 Subject: [PATCH 3/6] feat: Add OAuth2 security scheme for summit presentations and add missing routes --- .../OAuth2PresentationApiController.php | 123 +++++++++++++----- .../SummitPresentationsAuthSchema.php | 35 +++++ 2 files changed, 128 insertions(+), 30 deletions(-) create mode 100644 app/Swagger/Security/SummitPresentationsAuthSchema.php diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php index 42bb10844..6e6bbea03 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php @@ -59,8 +59,6 @@ final class OAuth2PresentationApiController extends OAuth2ProtectedController use RequestProcessor; - use GetAndValidateJsonPayload; - /** * @var ISummitRepository */ @@ -121,6 +119,7 @@ public function __construct path: "/api/v1/summits/{id}/presentations/{presentation_id}/videos", summary: "Get all videos from a presentation", operationId: "getPresentationVideos", + security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -171,9 +170,17 @@ public function getPresentationVideos($summit_id, $presentation_id) } #[OA\Get( - path: "/api/v1/summits/{id}/presentations/{presentation_id}/videos/{video_id}", + path: "/api/v1/summits/{id}/presentations/{presentation_id}/video/{video_id}", summary: "Get a video from a presentation", operationId: "getPresentationVideo", + security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + x: [ + 'authz_groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -218,7 +225,8 @@ public function getPresentationVideo($summit_id, $presentation_id, $video_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/videos", summary: "Add a video to a presentation", operationId: "addPresentationVideo", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WriteVideoData, SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationVideosData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -268,7 +276,8 @@ public function addVideo(LaravelRequest $request, $summit_id, $presentation_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/videos/{video_id}", summary: "Update a video from a presentation", operationId: "updatePresentationVideo", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WriteVideoData, SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationVideosData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -319,7 +328,8 @@ public function updateVideo(LaravelRequest $request, $summit_id, $presentation_i path: "/api/v1/summits/{id}/presentations/{presentation_id}/videos/{video_id}", summary: "Delete a video from a presentation", operationId: "deletePresentationVideo", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WriteVideoData, SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationVideosData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -352,7 +362,7 @@ public function deleteVideo($summit_id, $presentation_id, $video_id) path: "/api/v1/summits/{id}/presentations", summary: "Submit a presentation", operationId: "submitPresentation", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData, SummitScopes::WritePresentationData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -407,6 +417,7 @@ public function submitPresentation($summit_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}", summary: "Get a presentation submission", operationId: "getPresentationSubmission", + security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -457,7 +468,7 @@ public function getPresentationSubmission($summit_id, $presentation_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}", summary: "Update a presentation submission", operationId: "updatePresentationSubmission", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData, SummitScopes::WritePresentationData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -518,7 +529,7 @@ public function updatePresentationSubmission($summit_id, $presentation_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/completed", summary: "Mark a presentation submission as completed", operationId: "completePresentationSubmission", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData, SummitScopes::WritePresentationData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -564,7 +575,7 @@ public function completePresentationSubmission($summit_id, $presentation_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}", summary: "Delete a presentation", operationId: "deletePresentation", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData, SummitScopes::WritePresentationData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -606,6 +617,7 @@ public function deletePresentation($summit_id, $presentation_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/slides", summary: "Get all slides from a presentation", operationId: "getPresentationSlides", + security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -658,6 +670,7 @@ public function getPresentationSlides($summit_id, $presentation_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/slides/{slide_id}", summary: "Get a slide from a presentation", operationId: "getPresentationSlide", + security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -701,7 +714,8 @@ public function getPresentationSlide($summit_id, $presentation_id, $slide_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/slides", summary: "Add a slide to a presentation", operationId: "addPresentationSlide", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationSlidesData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -787,7 +801,8 @@ public function addPresentationSlide(LaravelRequest $request, $summit_id, $prese path: "/api/v1/summits/{id}/presentations/{presentation_id}/slides/{slide_id}", summary: "Update a slide from a presentation", operationId: "updatePresentationSlide", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationSlidesData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -874,7 +889,8 @@ public function updatePresentationSlide(LaravelRequest $request, $summit_id, $pr path: "/api/v1/summits/{id}/presentations/{presentation_id}/slides/{slide_id}", summary: "Delete a slide from a presentation", operationId: "deletePresentationSlide", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationSlidesData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -921,6 +937,7 @@ public function deletePresentationSlide($summit_id, $presentation_id, $slide_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/links", summary: "Get all links from a presentation", operationId: "getPresentationLinks", + security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -973,6 +990,7 @@ public function getPresentationLinks($summit_id, $presentation_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/links/{link_id}", summary: "Get a link from a presentation", operationId: "getPresentationLink", + security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1018,7 +1036,8 @@ public function getPresentationLink($summit_id, $presentation_id, $link_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/links", summary: "Add a link to a presentation", operationId: "addPresentationLink", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationLinksData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1096,7 +1115,8 @@ public function addPresentationLink(LaravelRequest $request, $summit_id, $presen path: "/api/v1/summits/{id}/presentations/{presentation_id}/links/{link_id}", summary: "Update a link from a presentation", operationId: "updatePresentationLink", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationLinksData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1176,7 +1196,8 @@ public function updatePresentationLink(LaravelRequest $request, $summit_id, $pre path: "/api/v1/summits/{id}/presentations/{presentation_id}/links/{link_id}", summary: "Delete a link from a presentation", operationId: "deletePresentationLink", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationLinksData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1222,6 +1243,30 @@ public function deletePresentationLink($summit_id, $presentation_id, $link_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/media-uploads", summary: "Get all media uploads from a presentation", operationId: "getPresentationMediaUploads", + security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + tags: ['Presentations'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "OK", + content: new OA\JsonContent( + type: "array", + items: new OA\Items(ref: "#/components/schemas/PresentationMediaUpload") + ) + ), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), + ] + )] + #[OA\Get( + path: "/api/v1/summits/{id}/events/{event_id}/published/media-uploads", + summary: "Get all published media uploads from a presentation", + operationId: "getPresentationPublishedMediaUploads", + security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1274,6 +1319,7 @@ public function getPresentationMediaUploads($summit_id, $presentation_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/media-uploads/{media_upload_id}", summary: "Get a media upload from a presentation", operationId: "getPresentationMediaUpload", + security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1318,7 +1364,7 @@ public function getPresentationMediaUpload($summit_id, $presentation_id, $media_ path: "/api/v1/summits/{id}/presentations/{presentation_id}/media-uploads", summary: "Add a media upload to a presentation", operationId: "addPresentationMediaUpload", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationSlidesData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1408,7 +1454,7 @@ public function addPresentationMediaUpload(LaravelRequest $request, $summit_id, path: "/api/v1/summits/{id}/presentations/{presentation_id}/media-uploads/{media_upload_id}", summary: "Update a media upload from a presentation", operationId: "updatePresentationMediaUpload", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationSlidesData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1499,7 +1545,7 @@ public function updatePresentationMediaUpload(LaravelRequest $request, $summit_i path: "/api/v1/summits/{id}/presentations/{presentation_id}/media-uploads/{media_upload_id}", summary: "Delete a media upload from a presentation", operationId: "deletePresentationMediaUpload", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationSlidesData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1507,7 +1553,7 @@ public function updatePresentationMediaUpload(LaravelRequest $request, $summit_i new OA\Parameter(name: 'media_upload_id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), ], responses: [ - new OA\Response(response: 204, description: "No Content"), + new OA\Response(response: Response::HTTP_NO_CONTENT, description: "No Content"), new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), @@ -1545,7 +1591,8 @@ public function deletePresentationMediaUpload($summit_id, $presentation_id, $med path: "/api/v1/summits/{id}/presentations/all/import/mux", summary: "Import assets from MUX", operationId: "importAssetsFromMUX", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData, SummitScopes::WritePresentationData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1612,6 +1659,7 @@ public function importAssetsFromMUX($summit_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/attendee-votes", summary: "Get attendee votes for a presentation", operationId: "getAttendeeVotes", + security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1638,7 +1686,7 @@ public function getAttendeeVotes($summit_id, $presentation_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/attendee-votes", summary: "Cast an attendee vote for a presentation", operationId: "castAttendeeVote", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::Allow2PresentationAttendeeVote]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1686,7 +1734,7 @@ public function castAttendeeVote($summit_id, $presentation_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/attendee-votes", summary: "Remove an attendee vote for a presentation", operationId: "unCastAttendeeVote", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::Allow2PresentationAttendeeVote]]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1720,6 +1768,8 @@ public function unCastAttendeeVote($summit_id, $presentation_id) path: "/api/v1/summits/{id}/selection-plans/{selection_plan_id}/presentations/{presentation_id}/track-chair-scores/{score_type_id}", summary: "Add a track chair score to a presentation", operationId: "addTrackChairScore", + security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::TrackChairs, IGroup::TrackChairsAdmins]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1771,7 +1821,8 @@ public function addTrackChairScore($summit_id, $selection_plan_id, $presentation path: "/api/v1/summits/{id}/selection-plans/{selection_plan_id}/presentations/{presentation_id}/track-chair-scores/{score_type_id}", summary: "Remove a track chair score from a presentation", operationId: "removeTrackChairScore", - security: [['summit_oauth2' => [SummitScopes::WriteTrackChairData]]], + security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::TrackChairs, IGroup::TrackChairsAdmins]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1810,7 +1861,8 @@ public function removeTrackChairScore($summit_id, $selection_plan_id, $presentat path: "/api/v1/summits/{id}/presentations/{presentation_id}/speakers/{speaker_id}", summary: "Add a speaker to a presentation", operationId: "addSpeaker2Presentation", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WritePresentationData, SummitScopes::WriteSpeakersData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1863,7 +1915,8 @@ public function addSpeaker2Presentation($summit_id, $presentation_id, $speaker_i path: "/api/v1/summits/{id}/presentations/{presentation_id}/speakers/{speaker_id}", summary: "Update a speaker in a presentation", operationId: "updateSpeakerInPresentation", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WritePresentationData, SummitScopes::WriteSpeakersData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1919,7 +1972,8 @@ public function updateSpeakerInPresentation($summit_id, $presentation_id, $speak path: "/api/v1/summits/{id}/presentations/{presentation_id}/speakers/{speaker_id}", summary: "Remove a speaker from a presentation", operationId: "removeSpeakerFromPresentation", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WritePresentationData, SummitScopes::WriteSpeakersData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1959,6 +2013,8 @@ public function removeSpeakerFromPresentation($summit_id, $presentation_id, $spe path: "/api/v1/summits/{id}/presentations/{presentation_id}/comments", summary: "Get all comments from a presentation", operationId: "getPresentationComments", + security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::TrackChairsAdmins, IGroup::TrackChairs]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -2033,6 +2089,8 @@ function ($page, $per_page, $filter, $order, $applyExtraFilters) { path: "/api/v1/summits/{id}/presentations/{presentation_id}/comments/{comment_id}", summary: "Get a comment from a presentation", operationId: "getPresentationComment", + security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::TrackChairsAdmins, IGroup::TrackChairs]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -2075,7 +2133,8 @@ public function getComment($summit_id, $presentation_id, $comment_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/comments/{comment_id}", summary: "Delete a comment from a presentation", operationId: "deletePresentationComment", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData, SummitScopes::WritePresentationData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::TrackChairsAdmins, IGroup::TrackChairs]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -2107,7 +2166,8 @@ public function deleteComment($summit_id, $presentation_id, $comment_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/comments", summary: "Add a comment to a presentation", operationId: "addPresentationComment", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData, SummitScopes::WritePresentationData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::TrackChairsAdmins, IGroup::TrackChairs]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -2154,7 +2214,8 @@ public function addComment($summit_id, $presentation_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/comments/{comment_id}", summary: "Update a comment from a presentation", operationId: "updatePresentationComment", - security: [['summit_oauth2' => [SummitScopes::WritePresentationData]]], + security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData, SummitScopes::WritePresentationData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::TrackChairsAdmins, IGroup::TrackChairs]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -2202,6 +2263,8 @@ public function updateComment($summit_id, $presentation_id, $comment_id) path: "/api/v1/summits/{id}/presentations/{presentation_id}/extra-questions", summary: "Get extra question answers from a presentation", operationId: "getPresentationsExtraQuestions", + security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), diff --git a/app/Swagger/Security/SummitPresentationsAuthSchema.php b/app/Swagger/Security/SummitPresentationsAuthSchema.php new file mode 100644 index 000000000..b4127f67a --- /dev/null +++ b/app/Swagger/Security/SummitPresentationsAuthSchema.php @@ -0,0 +1,35 @@ + 'Read Summit Data', + SummitScopes::ReadAllSummitData => 'Read All Summit Data', + SummitScopes::WriteSummitData => 'Write Summit Data', + SummitScopes::WriteEventData => 'Write Event Data', + SummitScopes::WritePresentationData => 'Write Presentation Data', + SummitScopes::WriteVideoData => 'Write Video Data', + SummitScopes::WritePresentationVideosData => 'Write Presentation Videos Data', + SummitScopes::WritePresentationLinksData => 'Write Presentation Links Data', + SummitScopes::WritePresentationSlidesData => 'Write Presentation Slides Data', + SummitScopes::WritePresentationMaterialsData => 'Write Presentation Materials Data', + SummitScopes::WriteSpeakersData => 'Write Speakers Data', + SummitScopes::Allow2PresentationAttendeeVote => 'Attendee Vote', + ], + ), + ], + ) +] +class SummitPresentationsAuthSchema {} From 5945fe98c213db7743ac5ddb5ac53212912bf2a9 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 22 Dec 2025 13:49:34 +0000 Subject: [PATCH 4/6] chore: change x groups from "authz_groups" to "required-groups" Signed-off-by: Matias Perrone --- .../OAuth2PresentationApiController.php | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php index 6e6bbea03..99647c11c 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PresentationApiController.php @@ -175,7 +175,7 @@ public function getPresentationVideos($summit_id, $presentation_id) operationId: "getPresentationVideo", security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], x: [ - 'authz_groups' => [ + 'required-groups' => [ IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, @@ -226,7 +226,7 @@ public function getPresentationVideo($summit_id, $presentation_id, $video_id) summary: "Add a video to a presentation", operationId: "addPresentationVideo", security: [['summit_presentations_auth' => [SummitScopes::WriteVideoData, SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationVideosData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -277,7 +277,7 @@ public function addVideo(LaravelRequest $request, $summit_id, $presentation_id) summary: "Update a video from a presentation", operationId: "updatePresentationVideo", security: [['summit_presentations_auth' => [SummitScopes::WriteVideoData, SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationVideosData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -329,7 +329,7 @@ public function updateVideo(LaravelRequest $request, $summit_id, $presentation_i summary: "Delete a video from a presentation", operationId: "deletePresentationVideo", security: [['summit_presentations_auth' => [SummitScopes::WriteVideoData, SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationVideosData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -715,7 +715,7 @@ public function getPresentationSlide($summit_id, $presentation_id, $slide_id) summary: "Add a slide to a presentation", operationId: "addPresentationSlide", security: [['summit_presentations_auth' => [SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationSlidesData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -802,7 +802,7 @@ public function addPresentationSlide(LaravelRequest $request, $summit_id, $prese summary: "Update a slide from a presentation", operationId: "updatePresentationSlide", security: [['summit_presentations_auth' => [SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationSlidesData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -890,7 +890,7 @@ public function updatePresentationSlide(LaravelRequest $request, $summit_id, $pr summary: "Delete a slide from a presentation", operationId: "deletePresentationSlide", security: [['summit_presentations_auth' => [SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationSlidesData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1037,7 +1037,7 @@ public function getPresentationLink($summit_id, $presentation_id, $link_id) summary: "Add a link to a presentation", operationId: "addPresentationLink", security: [['summit_presentations_auth' => [SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationLinksData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1116,7 +1116,7 @@ public function addPresentationLink(LaravelRequest $request, $summit_id, $presen summary: "Update a link from a presentation", operationId: "updatePresentationLink", security: [['summit_presentations_auth' => [SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationLinksData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1197,7 +1197,7 @@ public function updatePresentationLink(LaravelRequest $request, $summit_id, $pre summary: "Delete a link from a presentation", operationId: "deletePresentationLink", security: [['summit_presentations_auth' => [SummitScopes::WritePresentationMaterialsData, SummitScopes::WritePresentationLinksData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1592,7 +1592,7 @@ public function deletePresentationMediaUpload($summit_id, $presentation_id, $med summary: "Import assets from MUX", operationId: "importAssetsFromMUX", security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData, SummitScopes::WritePresentationData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1769,7 +1769,7 @@ public function unCastAttendeeVote($summit_id, $presentation_id) summary: "Add a track chair score to a presentation", operationId: "addTrackChairScore", security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::TrackChairs, IGroup::TrackChairsAdmins]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::TrackChairs, IGroup::TrackChairsAdmins]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1822,7 +1822,7 @@ public function addTrackChairScore($summit_id, $selection_plan_id, $presentation summary: "Remove a track chair score from a presentation", operationId: "removeTrackChairScore", security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::TrackChairs, IGroup::TrackChairsAdmins]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::TrackChairs, IGroup::TrackChairsAdmins]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1862,7 +1862,7 @@ public function removeTrackChairScore($summit_id, $selection_plan_id, $presentat summary: "Add a speaker to a presentation", operationId: "addSpeaker2Presentation", security: [['summit_presentations_auth' => [SummitScopes::WritePresentationData, SummitScopes::WriteSpeakersData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1916,7 +1916,7 @@ public function addSpeaker2Presentation($summit_id, $presentation_id, $speaker_i summary: "Update a speaker in a presentation", operationId: "updateSpeakerInPresentation", security: [['summit_presentations_auth' => [SummitScopes::WritePresentationData, SummitScopes::WriteSpeakersData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -1973,7 +1973,7 @@ public function updateSpeakerInPresentation($summit_id, $presentation_id, $speak summary: "Remove a speaker from a presentation", operationId: "removeSpeakerFromPresentation", security: [['summit_presentations_auth' => [SummitScopes::WritePresentationData, SummitScopes::WriteSpeakersData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -2014,7 +2014,7 @@ public function removeSpeakerFromPresentation($summit_id, $presentation_id, $spe summary: "Get all comments from a presentation", operationId: "getPresentationComments", security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::TrackChairsAdmins, IGroup::TrackChairs]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::TrackChairsAdmins, IGroup::TrackChairs]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -2090,7 +2090,7 @@ function ($page, $per_page, $filter, $order, $applyExtraFilters) { summary: "Get a comment from a presentation", operationId: "getPresentationComment", security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::TrackChairsAdmins, IGroup::TrackChairs]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::TrackChairsAdmins, IGroup::TrackChairs]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -2134,7 +2134,7 @@ public function getComment($summit_id, $presentation_id, $comment_id) summary: "Delete a comment from a presentation", operationId: "deletePresentationComment", security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData, SummitScopes::WritePresentationData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::TrackChairsAdmins, IGroup::TrackChairs]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::TrackChairsAdmins, IGroup::TrackChairs]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -2167,7 +2167,7 @@ public function deleteComment($summit_id, $presentation_id, $comment_id) summary: "Add a comment to a presentation", operationId: "addPresentationComment", security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData, SummitScopes::WritePresentationData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::TrackChairsAdmins, IGroup::TrackChairs]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::TrackChairsAdmins, IGroup::TrackChairs]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -2215,7 +2215,7 @@ public function addComment($summit_id, $presentation_id) summary: "Update a comment from a presentation", operationId: "updatePresentationComment", security: [['summit_presentations_auth' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData, SummitScopes::WritePresentationData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::TrackChairsAdmins, IGroup::TrackChairs]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::TrackChairsAdmins, IGroup::TrackChairs]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), @@ -2264,7 +2264,7 @@ public function updateComment($summit_id, $presentation_id, $comment_id) summary: "Get extra question answers from a presentation", operationId: "getPresentationsExtraQuestions", security: [['summit_presentations_auth' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], - x: ['authz_groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], tags: ['Presentations'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, schema: new OA\Schema(type: 'integer')), From 55e2aab9d20c1964791e03a1ce40d246dde28541 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 22 Dec 2025 14:19:27 +0000 Subject: [PATCH 5/6] chore: remove possible conflicts on schema file Signed-off-by: Matias Perrone --- app/Swagger/SummitPresentationAPISchemas.php | 514 +++++++++++++++++++ app/Swagger/SummitPresentationSchemas.php | 508 ------------------ 2 files changed, 514 insertions(+), 508 deletions(-) create mode 100644 app/Swagger/SummitPresentationAPISchemas.php diff --git a/app/Swagger/SummitPresentationAPISchemas.php b/app/Swagger/SummitPresentationAPISchemas.php new file mode 100644 index 000000000..03197ffc3 --- /dev/null +++ b/app/Swagger/SummitPresentationAPISchemas.php @@ -0,0 +1,514 @@ + Date: Mon, 22 Dec 2025 14:20:25 +0000 Subject: [PATCH 6/6] chore: undo linting Signed-off-by: Matias Perrone --- app/Swagger/SummitPresentationSchemas.php | 32 ++++++----------------- 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/app/Swagger/SummitPresentationSchemas.php b/app/Swagger/SummitPresentationSchemas.php index 718a8ff3d..54f150301 100644 --- a/app/Swagger/SummitPresentationSchemas.php +++ b/app/Swagger/SummitPresentationSchemas.php @@ -23,9 +23,7 @@ ) ] )] -class PresentationTrackChairRatingTypeSchema -{ -} +class PresentationTrackChairRatingTypeSchema {} #[OA\Schema( schema: 'PaginatedPresentationTrackChairRatingTypesResponse', @@ -43,9 +41,7 @@ class PresentationTrackChairRatingTypeSchema ) ] )] -class PaginatedPresentationTrackChairRatingTypesResponseSchema -{ -} +class PaginatedPresentationTrackChairRatingTypesResponseSchema {} #[OA\Schema( schema: 'PresentationTrackChairRatingTypeCreateRequest', @@ -64,9 +60,7 @@ class PaginatedPresentationTrackChairRatingTypesResponseSchema ) ] )] -class PresentationTrackChairRatingTypeCreateRequestSchema -{ -} +class PresentationTrackChairRatingTypeCreateRequestSchema {} #[OA\Schema( schema: 'PresentationTrackChairRatingTypeUpdateRequest', @@ -84,9 +78,7 @@ class PresentationTrackChairRatingTypeCreateRequestSchema ) ] )] -class PresentationTrackChairRatingTypeUpdateRequestSchema -{ -} +class PresentationTrackChairRatingTypeUpdateRequestSchema {} // @@ -108,9 +100,7 @@ class PresentationTrackChairRatingTypeUpdateRequestSchema new OA\Property(property: "type", type: "PresentationTrackChairRatingType"), ], )] -class PresentationTrackChairScoreType -{ -} +class PresentationTrackChairScoreType {} #[OA\Schema( schema: "PaginatedPresentationTrackChairScoreTypesResponse", @@ -128,9 +118,7 @@ class PresentationTrackChairScoreType ) ] )] -class PaginatedPresentationTrackChairScoreTypesResponse -{ -} +class PaginatedPresentationTrackChairScoreTypesResponse {} #[OA\Schema( schema: "PresentationTrackChairScoreTypeCreateRequest", @@ -142,9 +130,7 @@ class PaginatedPresentationTrackChairScoreTypesResponse new OA\Property(property: "description", type: "string", example: "This presentation is excellent"), ] )] -class PresentationTrackChairScoreTypeCreateRequest -{ -} +class PresentationTrackChairScoreTypeCreateRequest {} #[OA\Schema( schema: "PresentationTrackChairScoreTypeUpdateRequest", @@ -156,8 +142,6 @@ class PresentationTrackChairScoreTypeCreateRequest new OA\Property(property: "description", type: "string", nullable: true, example: "This presentation is excellent"), ] )] -class PresentationTrackChairScoreTypeUpdateRequest -{ -} +class PresentationTrackChairScoreTypeUpdateRequest {} // End Track Chair Score Types