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 6b3e2f895..03197ffc3 100644 --- a/app/Swagger/SummitPresentationSchemas.php +++ b/app/Swagger/SummitPresentationSchemas.php @@ -4,4 +4,511 @@ use OpenApi\Attributes as OA; -// +// 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 +{ +}