From f20cbee3f095734ee5006189e4ed907449fcf76b Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 13 Oct 2025 12:53:12 -0300 Subject: [PATCH 01/17] feat: Extend Swagger Coverage for controller `OAuth2SummitMediaUploadTypeApiController` --- ...uth2SummitMediaUploadTypeApiController.php | 327 ++++-------------- app/Swagger/SummitSchemas.php | 155 ++++++++- 2 files changed, 215 insertions(+), 267 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php index 6ecbdf140..d2c459bb7 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php @@ -1,5 +1,4 @@ [ - SummitScopes::ReadAllSummitData, - ] - ] - ], - x: [ - 'required-groups' => [ - IGroup::SuperAdmins, - IGroup::Administrators, - IGroup::SummitAdministrators, - ] - ], + security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter( - name: 'id', - in: 'path', - required: true, - schema: new OA\Schema(type: 'integer'), - description: 'The summit ID' - ), - new OA\Parameter( - name: 'page', - in: 'query', - required: false, - schema: new OA\Schema(type: 'integer'), - description: 'The page number' - ), - new OA\Parameter( - name: 'per_page', - in: 'query', - required: false, - schema: new OA\Schema(type: 'integer'), - description: 'The number of items per page', - ), + new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), + new OA\Parameter(ref: "#/components/parameters/page_number_param"), + new OA\Parameter(ref: "#/components/parameters/page_size_param"), new OA\Parameter( name: "filter[]", in: "query", @@ -150,39 +114,25 @@ public function __construct 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: "Summit Not Found"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Summit not found"), ] )] - // public function getAllBySummit($summit_id) + public function getAllBySummit($summit_id) + { + $this->summit_id = $summit_id; + $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($this->summit_id); + if (is_null($summit)) return $this->error404(); + return $this->getAll(); + } #[OA\Get( path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}", - operationId: "getMediaUploadType", summary: "Get a specific media upload type", description: "Returns detailed information about a specific media upload type", - security: [ - [ - "summit_media_upload_type_oauth2" => [ - SummitScopes::ReadAllSummitData, - ] - ] - ], - x: [ - 'required-groups' => [ - IGroup::SuperAdmins, - IGroup::Administrators, - IGroup::SummitAdministrators, - ] - ], + security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter( - name: 'id', - in: 'path', - required: true, - schema: new OA\Schema(type: 'integer'), - description: 'The summit ID' - ), + new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), new OA\Parameter( name: "media_upload_type_id", in: "path", @@ -213,39 +163,22 @@ public function __construct ), 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_NOT_FOUND, description: "not found"), ] )] - // public function get($summit_id, $media_upload_type_id) + public function get($summit_id, $media_upload_type_id) + { + return $this->getById($summit_id, $media_upload_type_id); + } #[OA\Post( path: "/api/v1/summits/{id}/media-upload-types", - operationId: "createMediaUploadType", summary: "Create a new media upload type", description: "Creates a new media upload type for the specified summit", - security: [ - [ - "summit_media_upload_type_oauth2" => [ - SummitScopes::WriteSummitData, - ] - ] - ], - x: [ - 'required-groups' => [ - IGroup::SuperAdmins, - IGroup::Administrators, - IGroup::SummitAdministrators, - ] - ], + security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter( - name: 'id', - in: 'path', - required: true, - schema: new OA\Schema(type: 'integer'), - description: 'The summit ID' - ), + new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), ], requestBody: new OA\RequestBody( required: true, @@ -260,40 +193,23 @@ public function __construct 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: "Summit Not Found"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Summit not found"), new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), ] )] - // public function add($summit_id) + public function add($summit_id) + { + return $this->addChild($summit_id); + } #[OA\Put( path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}", - operationId: "updateMediaUploadType", summary: "Update a media upload type", description: "Updates an existing media upload type", - security: [ - [ - "summit_media_upload_type_oauth2" => [ - SummitScopes::WriteSummitData, - ] - ] - ], - x: [ - 'required-groups' => [ - IGroup::SuperAdmins, - IGroup::Administrators, - IGroup::SummitAdministrators, - ] - ], + security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter( - name: 'id', - in: 'path', - required: true, - schema: new OA\Schema(type: 'integer'), - description: 'The summit ID' - ), + new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), new OA\Parameter( name: "media_upload_type_id", in: "path", @@ -315,40 +231,23 @@ public function __construct 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_NOT_FOUND, description: "not found"), new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), ] )] - // public function update($summit_id, $media_upload_type_id) + public function update($summit_id, $media_upload_type_id) + { + return $this->updateChild($summit_id, $media_upload_type_id); + } #[OA\Delete( path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}", - operationId: "deleteMediaUploadType", summary: "Delete a media upload type", description: "Deletes a media upload type from the summit", - security: [ - [ - "summit_media_upload_type_oauth2" => [ - SummitScopes::WriteSummitData, - ] - ] - ], - x: [ - 'required-groups' => [ - IGroup::SuperAdmins, - IGroup::Administrators, - IGroup::SummitAdministrators, - ] - ], + security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter( - name: 'id', - in: 'path', - required: true, - schema: new OA\Schema(type: 'integer'), - description: 'The summit ID' - ), + new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), new OA\Parameter( name: "media_upload_type_id", in: "path", @@ -361,10 +260,13 @@ public function __construct new OA\Response(response: Response::HTTP_NO_CONTENT, description: "Deleted successfully"), 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_NOT_FOUND, description: "not found"), ] )] - // public function delete($summit_id, $media_upload_type_id) + public function delete($summit_id, $media_upload_type_id) + { + return $this->deleteChild($summit_id, $media_upload_type_id); + } /** * @return array @@ -402,10 +304,10 @@ protected function addChild(Summit $summit, array $payload): IEntity // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if (is_null($current_member)) + if(is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if (!$current_member->isSummitAllowed($summit)) + if(!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); return $this->service->add($summit, $payload); } @@ -434,10 +336,10 @@ protected function deleteChild(Summit $summit, $child_id): void // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if (is_null($current_member)) + if(is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if (!$current_member->isSummitAllowed($summit)) + if(!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); $this->service->delete($summit, $child_id); @@ -451,13 +353,13 @@ protected function getChildFromSummit(Summit $summit, $child_id): ?IEntity // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if (is_null($current_member)) + if(is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if (!$current_member->isSummitAllowed($summit)) + if(!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); - return $summit->getMediaUploadTypeById($child_id); + return $summit->getMediaUploadTypeById($child_id); } /** @@ -476,10 +378,10 @@ protected function updateChild(Summit $summit, int $child_id, array $payload): I // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if (is_null($current_member)) + if(is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if (!$current_member->isSummitAllowed($summit)) + if(!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); return $this->service->update($summit, $child_id, $payload); @@ -487,32 +389,12 @@ protected function updateChild(Summit $summit, int $child_id, array $payload): I #[OA\Put( path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}/presentation-types/{event_type_id}", - operationId: "addMediaUploadTypeToPresentationType", summary: "Add media upload type to presentation type", description: "Associates a media upload type with a specific presentation type", - security: [ - [ - "summit_media_upload_type_oauth2" => [ - SummitScopes::WriteSummitData, - ] - ] - ], - x: [ - 'required-groups' => [ - IGroup::SuperAdmins, - IGroup::Administrators, - IGroup::SummitAdministrators, - ] - ], + security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter( - name: 'id', - in: 'path', - required: true, - schema: new OA\Schema(type: 'integer'), - description: 'The summit ID' - ), + new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), new OA\Parameter( name: "media_upload_type_id", in: "path", @@ -536,28 +418,22 @@ protected function updateChild(Summit $summit, int $child_id, array $payload): I ), 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_NOT_FOUND, description: "not found"), ] )] - /** - * @param $summit_id - * @param $media_upload_type_id - * @param $presentation_type_id - * @return \Illuminate\Http\JsonResponse|mixed - */ public function addToPresentationType($summit_id, $media_upload_type_id, $presentation_type_id){ - return $this->processRequest(function () use ($summit_id, $media_upload_type_id, $presentation_type_id) { + return $this->processRequest(function() use($summit_id, $media_upload_type_id, $presentation_type_id){ $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($summit_id); if (is_null($summit)) return $this->error404(); - // authz - // check that we have a current member ( not service account ) - $current_member = $this->getResourceServerContext()->getCurrentUser(); - if (is_null($current_member)) - throw new HTTP401UnauthorizedException(); - // check summit access - if (!$current_member->isSummitAllowed($summit)) - throw new HTTP403ForbiddenException(); + // authz + // check that we have a current member ( not service account ) + $current_member = $this->getResourceServerContext()->getCurrentUser(); + if(is_null($current_member)) + throw new HTTP401UnauthorizedException(); + // check summit access + if(!$current_member->isSummitAllowed($summit)) + throw new HTTP403ForbiddenException(); $presentation_type = $this->service->addToPresentationType($summit, intval($media_upload_type_id), intval($presentation_type_id)); @@ -570,32 +446,12 @@ public function addToPresentationType($summit_id, $media_upload_type_id, $presen #[OA\Delete( path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}/presentation-types/{event_type_id}", - operationId: "removeMediaUploadTypeFromPresentationType", summary: "Remove media upload type from presentation type", description: "Removes the association between a media upload type and a presentation type", - security: [ - [ - "summit_media_upload_type_oauth2" => [ - SummitScopes::WriteSummitData, - ] - ] - ], - x: [ - 'required-groups' => [ - IGroup::SuperAdmins, - IGroup::Administrators, - IGroup::SummitAdministrators, - ] - ], + security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter( - name: 'id', - in: 'path', - required: true, - schema: new OA\Schema(type: 'integer'), - description: 'The summit ID' - ), + new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), new OA\Parameter( name: "media_upload_type_id", in: "path", @@ -619,27 +475,21 @@ public function addToPresentationType($summit_id, $media_upload_type_id, $presen ), 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_NOT_FOUND, description: "not found"), ] )] - /** - * @param $summit_id - * @param $media_upload_type_id - * @param $presentation_type_id - * @return \Illuminate\Http\JsonResponse|mixed - */ public function deleteFromPresentationType($summit_id, $media_upload_type_id, $presentation_type_id){ - return $this->processRequest(function () use ($summit_id, $media_upload_type_id, $presentation_type_id) { + return $this->processRequest(function() use($summit_id, $media_upload_type_id, $presentation_type_id){ $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($summit_id); if (is_null($summit)) return $this->error404(); // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if (is_null($current_member)) + if(is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if (!$current_member->isSummitAllowed($summit)) + if(!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); $presentation_type = $this->service->deleteFromPresentationType($summit, intval($media_upload_type_id), intval($presentation_type_id)); @@ -652,32 +502,12 @@ public function deleteFromPresentationType($summit_id, $media_upload_type_id, $p #[OA\Post( path: "/api/v1/summits/{id}/media-upload-types/all/clone/{to_summit_id}", - operationId: "cloneMediaUploadTypes", summary: "Clone media upload types to another summit", description: "Clones all media upload types from one summit to another summit", - security: [ - [ - "summit_media_upload_type_oauth2" => [ - SummitScopes::WriteSummitData, - ] - ] - ], - x: [ - 'required-groups' => [ - IGroup::SuperAdmins, - IGroup::Administrators, - IGroup::SummitAdministrators, - ] - ], + security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter( - name: 'id', - in: 'path', - required: true, - schema: new OA\Schema(type: 'integer'), - description: 'The summit ID' - ), + new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), new OA\Parameter( name: "to_summit_id", in: "path", @@ -690,20 +520,15 @@ public function deleteFromPresentationType($summit_id, $media_upload_type_id, $p new OA\Response( response: Response::HTTP_CREATED, description: "Success - Returns the target summit with cloned media upload types", - content: new OA\JsonContent(ref: "#/components/schemas/Summit") + content: new OA\JsonContent(type: "object") ), 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: "Source or target summit Not Found"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Source or target summit not found"), ] )] - /** - * @param $summit_id - * @param $to_summit_id - * @return \Illuminate\Http\JsonResponse|mixed - */ public function cloneMediaUploadTypes($summit_id, $to_summit_id){ - return $this->processRequest(function () use ($summit_id, $to_summit_id) { + return $this->processRequest(function() use($summit_id, $to_summit_id){ $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($summit_id); if (is_null($summit)) return $this->error404(); @@ -713,14 +538,14 @@ public function cloneMediaUploadTypes($summit_id, $to_summit_id){ // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if (is_null($current_member)) + if(is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if (!$current_member->isSummitAllowed($summit)) + if(!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); // check summit access - if (!$current_member->isSummitAllowed($to_summit)) + if(!$current_member->isSummitAllowed($to_summit)) throw new HTTP403ForbiddenException(); $to_summit = $this->service->cloneMediaUploadTypes($summit, $to_summit); diff --git a/app/Swagger/SummitSchemas.php b/app/Swagger/SummitSchemas.php index 0fa3b73fc..a75438374 100644 --- a/app/Swagger/SummitSchemas.php +++ b/app/Swagger/SummitSchemas.php @@ -111,7 +111,9 @@ enum: ['DATE', 'TRACK', 'TRACK_GROUPS', 'COMPANY', 'LEVEL', 'SPEAKERS', 'VENUES' ) ] )] -class SummitSchedulePreFilterElementConfigSchema {} +class SummitSchedulePreFilterElementConfigSchema +{ +} #[OA\Schema( schema: 'SummitScheduleConfigCreateRequest', @@ -153,7 +155,9 @@ class SummitSchedulePreFilterElementConfigSchema {} ) ] )] -class SummitScheduleConfigCreateRequestSchema {} +class SummitScheduleConfigCreateRequestSchema +{ +} #[OA\Schema( schema: 'SummitScheduleConfigUpdateRequest', @@ -194,10 +198,40 @@ class SummitScheduleConfigCreateRequestSchema {} ) ] )] -class SummitScheduleConfigUpdateRequestSchema {} +class SummitScheduleConfigUpdateRequestSchema +{ +} // Summit Documents +#[OA\Schema( + schema: "SummitDocument", + description: "Summit document", + type: "object", + properties: [ + new OA\Property(property: "id", type: "integer", example: 1), + new OA\Property(property: "created", type: "integer", description: "Unix timestamp", example: 1640995200), + new OA\Property(property: "last_edited", type: "integer", description: "Unix timestamp", example: 1640995200), + new OA\Property(property: "name", type: "string", example: "Code of Conduct"), + new OA\Property(property: "description", type: "string", example: "Summit code of conduct document"), + new OA\Property(property: "show_always", type: "boolean", example: true), + new OA\Property(property: "label", type: "string", example: "Code of Conduct"), + new OA\Property(property: "file", type: "string", format: "uri", nullable: true, example: "https://example.com/document.pdf"), + new OA\Property(property: "web_link", type: "string", format: "uri", nullable: true, example: "https://example.com/page"), + new OA\Property(property: "selection_plan_id", type: "integer", nullable: true, description: "SelectionPlan ID, full object description when ?expand=summit (summit)"), + new OA\Property( + property: "event_types", + type: "array", + items: new OA\Items(type: "integer"), + description: "Array of SummitEventType: objects when expanded, ids otherwise", + ), + new OA\Property(property: "summit_id", type: "integer", description: "Summit ID, full object description when ?expand=summit (summit)"), + ] +)] +class SummitDocumentSchema +{ +} + #[OA\Schema( schema: "PaginatedSummitDocumentsResponse", description: "Paginated list of summit documents", @@ -214,7 +248,9 @@ class SummitScheduleConfigUpdateRequestSchema {} ) ] )] -class PaginatedSummitDocumentsResponseSchema {} +class PaginatedSummitDocumentsResponseSchema +{ +} #[OA\Schema( schema: "SummitDocumentCreateRequest", @@ -244,7 +280,9 @@ class PaginatedSummitDocumentsResponseSchema {} ), ] )] -class SummitDocumentCreateRequest {} +class SummitDocumentCreateRequest +{ +} #[OA\Schema( schema: "SummitDocumentUpdateRequest", @@ -266,7 +304,9 @@ class SummitDocumentCreateRequest {} ), ] )] -class SummitDocumentUpdateRequest {} +class SummitDocumentUpdateRequest +{ +} // Summit Attendee Badges @@ -315,10 +355,54 @@ class SummitAttendeeBadgeSchema ) ] )] -class PaginatedSummitAttendeeBadgesResponseSchema {} +class PaginatedSummitAttendeeBadgesResponseSchema +{ +} // Summit Media Upload Type Schemas +#[OA\Schema( + schema: "SummitMediaUploadType", + description: "Summit Media Upload Type", + type: "object", + properties: [ + new OA\Property(property: "id", type: "integer", example: 1), + new OA\Property(property: "created", type: "integer", format: "int64", description: "Creation timestamp (epoch)", example: 1234567890), + new OA\Property(property: "last_edited", type: "integer", format: "int64", description: "Last edit timestamp (epoch)", example: 1234567890), + new OA\Property(property: "name", type: "string", maxLength: 255, example: "Speaker Photo"), + new OA\Property(property: "description", type: "string", maxLength: 5120, nullable: true, example: "High resolution photo of the speaker"), + new OA\Property(property: "max_size", type: "integer", description: "Maximum file size in KB", example: 10240), + new OA\Property(property: "is_mandatory", type: "boolean", example: true), + new OA\Property(property: "min_uploads_qty", type: "integer", minimum: 0, example: 1), + new OA\Property(property: "max_uploads_qty", type: "integer", minimum: 0, example: 1), + new OA\Property(property: "use_temporary_links_on_public_storage", type: "boolean", example: false), + new OA\Property(property: "temporary_links_public_storage_ttl", type: "integer", description: "TTL in seconds", nullable: true, example: 3600), + new OA\Property(property: "private_storage_type", type: "string", example: "local"), + new OA\Property(property: "public_storage_type", type: "string", example: "s3"), + new OA\Property(property: "type_id", type: "integer", example: 456), + new OA\Property(property: "is_editable", type: "boolean", example: true), + ], + anyOf: [ + new OA\Property(property: "summit_id", type: "integer", example: 123, description: "Summit ID, only when expand does NOT include 'summit' in it."), + new OA\Property(property: "summit", type: "Summit", description: "Summit expand (only when relations=presentation_types) and expand includes 'summit' in it."), + new OA\Property( + property: "presentation_types", + type: "array", + items: new OA\Items(type: "integer"), + description: "Array of presentation type IDs (only when relations=presentation_types and expand does not include 'presentation_types' in it)", + example: [1, 2, 3] + ), + new OA\Property( + property: "presentation_types", + type: "array", + items: new OA\Items(type: "PresentationType"), + description: "Array of PresentationType (only when relations=presentation_types and expand includes 'presentation_types' in it)", + ), + ], +)] +class SummitMediaUploadTypeSchema +{ +} #[OA\Schema( schema: "PaginatedSummitMediaUploadTypesResponse", @@ -336,7 +420,9 @@ class PaginatedSummitAttendeeBadgesResponseSchema {} ], type: "object" )] -class PaginatedSummitMediaUploadTypesResponseSchema {} +class PaginatedSummitMediaUploadTypesResponseSchema +{ +} #[OA\Schema( schema: "SummitMediaUploadTypeCreateRequest", @@ -366,7 +452,9 @@ class PaginatedSummitMediaUploadTypesResponseSchema {} ], type: "object" )] -class SummitMediaUploadTypeCreateRequestSchema {} +class SummitMediaUploadTypeCreateRequestSchema +{ +} #[OA\Schema( schema: "SummitMediaUploadTypeUpdateRequest", @@ -395,7 +483,9 @@ class SummitMediaUploadTypeCreateRequestSchema {} ], type: "object" )] -class SummitMediaUploadTypeUpdateRequestSchema {} +class SummitMediaUploadTypeUpdateRequestSchema +{ +} #[OA\Schema( @@ -414,7 +504,9 @@ class SummitMediaUploadTypeUpdateRequestSchema {} ) ] )] -class PaginatedSummitSponsorshipTypesResponseSchema {} +class PaginatedSummitSponsorshipTypesResponseSchema +{ +} #[OA\Schema( schema: 'SummitSponsorshipTypeCreateRequest', @@ -426,7 +518,9 @@ class PaginatedSummitSponsorshipTypesResponseSchema {} new OA\Property(property: 'size', type: 'string', example: ISponsorshipTypeConstants::BigSize, enum: ISponsorshipTypeConstants::AllowedSizes), ] )] -class SummitSponsorshipTypeCreateRequestSchema {} +class SummitSponsorshipTypeCreateRequestSchema +{ +} #[OA\Schema( schema: 'SummitSponsorshipTypeUpdateRequest', @@ -438,8 +532,31 @@ class SummitSponsorshipTypeCreateRequestSchema {} new OA\Property(property: 'order', type: 'integer', example: 1, minimum: 1), ] )] -class SummitSponsorshipTypeUpdateRequestSchema {} +class SummitSponsorshipTypeUpdateRequestSchema +{ +} +#[OA\Schema( + schema: 'SummitMediaFileType', + type: 'object', + properties: [ + new OA\Property(property: 'id', type: 'integer', example: 1), + new OA\Property(property: 'created', type: 'integer', format: 'int64', example: 1633024800), + new OA\Property(property: 'last_edited', type: 'integer', format: 'int64', example: 1633024800), + new OA\Property(property: 'name', type: 'string', example: 'Presentation'), + new OA\Property(property: 'description', type: 'string', example: 'Presentation files for events'), + new OA\Property(property: 'is_system_defined', type: 'boolean', example: false), + new OA\Property( + property: 'allowed_extensions', + type: 'array', + items: new OA\Items(type: 'string'), + example: ['pdf', 'ppt', 'pptx'] + ), + ] +)] +class SummitMediaFileTypeSchema +{ +} #[OA\Schema( schema: 'PaginatedSummitMediaFileTypesResponse', @@ -457,7 +574,9 @@ class SummitSponsorshipTypeUpdateRequestSchema {} ) ] )] -class PaginatedSummitMediaFileTypesResponseSchema {} +class PaginatedSummitMediaFileTypesResponseSchema +{ +} #[OA\Schema( schema: 'SummitMediaFileTypeCreateRequest', @@ -475,7 +594,9 @@ class PaginatedSummitMediaFileTypesResponseSchema {} ), ] )] -class SummitMediaFileTypeCreateRequestSchema {} +class SummitMediaFileTypeCreateRequestSchema +{ +} #[OA\Schema( schema: 'SummitMediaFileTypeUpdateRequest', @@ -493,4 +614,6 @@ class SummitMediaFileTypeCreateRequestSchema {} ), ] )] -class SummitMediaFileTypeUpdateRequestSchema {} +class SummitMediaFileTypeUpdateRequestSchema +{ +} From 20d50fdafe03517acae0752d223fc4d235a9071f Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 13 Oct 2025 15:38:07 -0300 Subject: [PATCH 02/17] fix: Add missing type expand for SummitMediaFileType --- app/Swagger/SummitSchemas.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Swagger/SummitSchemas.php b/app/Swagger/SummitSchemas.php index a75438374..8bf447e70 100644 --- a/app/Swagger/SummitSchemas.php +++ b/app/Swagger/SummitSchemas.php @@ -379,10 +379,11 @@ class PaginatedSummitAttendeeBadgesResponseSchema new OA\Property(property: "temporary_links_public_storage_ttl", type: "integer", description: "TTL in seconds", nullable: true, example: 3600), new OA\Property(property: "private_storage_type", type: "string", example: "local"), new OA\Property(property: "public_storage_type", type: "string", example: "s3"), - new OA\Property(property: "type_id", type: "integer", example: 456), new OA\Property(property: "is_editable", type: "boolean", example: true), ], anyOf: [ + new OA\Property(property: "type_id", type: "integer", example: 456), + new OA\Property(property: "type", type: "SummitMediaFileType", description: "Only present when relations=presentation_types and expand includes 'type' in it."), new OA\Property(property: "summit_id", type: "integer", example: 123, description: "Summit ID, only when expand does NOT include 'summit' in it."), new OA\Property(property: "summit", type: "Summit", description: "Summit expand (only when relations=presentation_types) and expand includes 'summit' in it."), new OA\Property( From 9ba4a2a7cb5ae2b476e1b2241f704017970a4da0 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 13 Oct 2025 17:42:28 -0300 Subject: [PATCH 03/17] fix: param definition --- ...uth2SummitMediaUploadTypeApiController.php | 80 ++++++++++++++++--- 1 file changed, 70 insertions(+), 10 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php index d2c459bb7..65d535d32 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php @@ -72,9 +72,27 @@ public function __construct security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), - new OA\Parameter(ref: "#/components/parameters/page_number_param"), - new OA\Parameter(ref: "#/components/parameters/page_size_param"), + new OA\Parameter( + name: 'summit_id', + in: 'query', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), + new OA\Parameter( + name: 'page', + in: 'query', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The page number' + ), + new OA\Parameter( + name: 'page_size', + in: 'query', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The number of pages in each page', + ), new OA\Parameter( name: "filter[]", in: "query", @@ -132,7 +150,13 @@ public function getAllBySummit($summit_id) security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), + new OA\Parameter( + name: 'summit_id', + in: 'query', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), new OA\Parameter( name: "media_upload_type_id", in: "path", @@ -178,7 +202,13 @@ public function get($summit_id, $media_upload_type_id) security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), + new OA\Parameter( + name: 'summit_id', + in: 'query', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), ], requestBody: new OA\RequestBody( required: true, @@ -209,7 +239,13 @@ public function add($summit_id) security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), + new OA\Parameter( + name: 'summit_id', + in: 'query', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), new OA\Parameter( name: "media_upload_type_id", in: "path", @@ -247,7 +283,13 @@ public function update($summit_id, $media_upload_type_id) security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), + new OA\Parameter( + name: 'summit_id', + in: 'query', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), new OA\Parameter( name: "media_upload_type_id", in: "path", @@ -394,7 +436,13 @@ protected function updateChild(Summit $summit, int $child_id, array $payload): I security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), + new OA\Parameter( + name: 'summit_id', + in: 'query', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), new OA\Parameter( name: "media_upload_type_id", in: "path", @@ -451,7 +499,13 @@ public function addToPresentationType($summit_id, $media_upload_type_id, $presen security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), + new OA\Parameter( + name: 'summit_id', + in: 'query', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), new OA\Parameter( name: "media_upload_type_id", in: "path", @@ -507,7 +561,13 @@ public function deleteFromPresentationType($summit_id, $media_upload_type_id, $p security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], tags: ["Summit Media Upload Types"], parameters: [ - new OA\Parameter(ref: "#/components/parameters/summit_id_path_param"), + new OA\Parameter( + name: 'summit_id', + in: 'query', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), new OA\Parameter( name: "to_summit_id", in: "path", From f877fc774b81126f14baa4bc9874e117955dbb43 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 13 Oct 2025 18:38:12 -0300 Subject: [PATCH 04/17] fix: param definition --- .../Summit/OAuth2SummitMediaUploadTypeApiController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php index 65d535d32..52506313c 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php @@ -87,11 +87,11 @@ public function __construct description: 'The page number' ), new OA\Parameter( - name: 'page_size', + name: 'per_page', in: 'query', required: false, schema: new OA\Schema(type: 'integer'), - description: 'The number of pages in each page', + description: 'The number of items per page', ), new OA\Parameter( name: "filter[]", From f2d682190487c14ed78771229c4af2365453e866 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 14 Oct 2025 14:53:40 -0300 Subject: [PATCH 05/17] fix: Change "namespace" word positioning --- .../Summit/OAuth2SummitMediaUploadTypeApiController.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php index 52506313c..fc3544ebf 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php @@ -1,4 +1,7 @@ - Date: Mon, 10 Nov 2025 22:09:57 +0000 Subject: [PATCH 06/17] fix: Add security schema --- ...uth2SummitMediaUploadTypeApiController.php | 175 +++++++++++++----- 1 file changed, 127 insertions(+), 48 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php index fc3544ebf..e8a97746f 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php @@ -26,6 +26,28 @@ use ModelSerializers\SerializerRegistry; use OpenApi\Attributes as OA; + + +#[OA\SecurityScheme( + type: 'oauth2', + securityScheme: 'OAuth2SummitMediaUploadTypeApiControllerSecurity', + flows: [ + new OA\Flow( + authorizationUrl: L5_SWAGGER_CONST_AUTH_URL, + tokenUrl: L5_SWAGGER_CONST_TOKEN_URL, + flow: 'authorizationCode', + scopes: [ + SummitScopes::ReadAllSummitData => 'Read All Summit Data', + SummitScopes::WriteSummitData => 'Write Summit Data', + ], + ), + ], +) +] +class RSVPAuthSchema +{ +} + /** * Class OAuth2SummitMediaUploadTypeApiController * @package App\Http\Controllers @@ -58,10 +80,9 @@ public function __construct ( ISummitMediaUploadTypeRepository $repository, ISummitRepository $summit_repository, - ISummitMediaUploadTypeService $service, + ISummitMediaUploadTypeService $service, IResourceServerContext $resource_server_context - ) - { + ) { parent::__construct($resource_server_context); $this->service = $service; $this->summit_repository = $summit_repository; @@ -72,7 +93,13 @@ public function __construct path: "/api/v1/summits/{id}/media-upload-types", summary: "Get all media upload types for a summit", description: "Returns a paginated list of media upload types configured for a specific summit. Allows ordering, filtering and pagination.", - security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], + security: [ + [ + "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + SummitScopes::ReadAllSummitData, + ] + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( @@ -142,7 +169,8 @@ public function getAllBySummit($summit_id) { $this->summit_id = $summit_id; $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($this->summit_id); - if (is_null($summit)) return $this->error404(); + if (is_null($summit)) + return $this->error404(); return $this->getAll(); } @@ -150,7 +178,13 @@ public function getAllBySummit($summit_id) path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}", summary: "Get a specific media upload type", description: "Returns detailed information about a specific media upload type", - security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], + security: [ + [ + "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + SummitScopes::ReadAllSummitData, + ] + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( @@ -202,7 +236,13 @@ public function get($summit_id, $media_upload_type_id) path: "/api/v1/summits/{id}/media-upload-types", summary: "Create a new media upload type", description: "Creates a new media upload type for the specified summit", - security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], + security: [ + [ + "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + SummitScopes::WriteSummitData, + ] + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( @@ -239,7 +279,13 @@ public function add($summit_id) path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}", summary: "Update a media upload type", description: "Updates an existing media upload type", - security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], + security: [ + [ + "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + SummitScopes::WriteSummitData, + ] + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( @@ -283,7 +329,13 @@ public function update($summit_id, $media_upload_type_id) path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}", summary: "Delete a media upload type", description: "Deletes a media upload type from the summit", - security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], + security: [ + [ + "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + SummitScopes::WriteSummitData, + ] + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( @@ -316,7 +368,7 @@ public function delete($summit_id, $media_upload_type_id) /** * @return array */ - protected function getFilterRules():array + protected function getFilterRules(): array { return [ 'name' => ['=@', '=='], @@ -326,7 +378,8 @@ protected function getFilterRules():array /** * @return array */ - protected function getFilterValidatorRules():array{ + protected function getFilterValidatorRules(): array + { return [ 'name' => 'sometimes|required|string', ]; @@ -334,7 +387,8 @@ protected function getFilterValidatorRules():array{ /** * @return array */ - protected function getOrderRules():array{ + protected function getOrderRules(): array + { return [ 'id', 'name', @@ -349,10 +403,10 @@ protected function addChild(Summit $summit, array $payload): IEntity // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if(is_null($current_member)) + if (is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if(!$current_member->isSummitAllowed($summit)) + if (!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); return $this->service->add($summit, $payload); } @@ -381,10 +435,10 @@ protected function deleteChild(Summit $summit, $child_id): void // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if(is_null($current_member)) + if (is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if(!$current_member->isSummitAllowed($summit)) + if (!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); $this->service->delete($summit, $child_id); @@ -398,13 +452,13 @@ protected function getChildFromSummit(Summit $summit, $child_id): ?IEntity // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if(is_null($current_member)) + if (is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if(!$current_member->isSummitAllowed($summit)) + if (!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); - return $summit->getMediaUploadTypeById($child_id); + return $summit->getMediaUploadTypeById($child_id); } /** @@ -423,10 +477,10 @@ protected function updateChild(Summit $summit, int $child_id, array $payload): I // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if(is_null($current_member)) + if (is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if(!$current_member->isSummitAllowed($summit)) + if (!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); return $this->service->update($summit, $child_id, $payload); @@ -436,7 +490,13 @@ protected function updateChild(Summit $summit, int $child_id, array $payload): I path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}/presentation-types/{event_type_id}", summary: "Add media upload type to presentation type", description: "Associates a media upload type with a specific presentation type", - security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], + security: [ + [ + "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + SummitScopes::WriteSummitData, + ] + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( @@ -472,19 +532,21 @@ protected function updateChild(Summit $summit, int $child_id, array $payload): I new OA\Response(response: Response::HTTP_NOT_FOUND, description: "not found"), ] )] - public function addToPresentationType($summit_id, $media_upload_type_id, $presentation_type_id){ - return $this->processRequest(function() use($summit_id, $media_upload_type_id, $presentation_type_id){ + public function addToPresentationType($summit_id, $media_upload_type_id, $presentation_type_id) + { + return $this->processRequest(function () use ($summit_id, $media_upload_type_id, $presentation_type_id) { $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($summit_id); - if (is_null($summit)) return $this->error404(); + if (is_null($summit)) + return $this->error404(); - // authz - // check that we have a current member ( not service account ) - $current_member = $this->getResourceServerContext()->getCurrentUser(); - if(is_null($current_member)) - throw new HTTP401UnauthorizedException(); - // check summit access - if(!$current_member->isSummitAllowed($summit)) - throw new HTTP403ForbiddenException(); + // authz + // check that we have a current member ( not service account ) + $current_member = $this->getResourceServerContext()->getCurrentUser(); + if (is_null($current_member)) + throw new HTTP401UnauthorizedException(); + // check summit access + if (!$current_member->isSummitAllowed($summit)) + throw new HTTP403ForbiddenException(); $presentation_type = $this->service->addToPresentationType($summit, intval($media_upload_type_id), intval($presentation_type_id)); @@ -499,7 +561,13 @@ public function addToPresentationType($summit_id, $media_upload_type_id, $presen path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}/presentation-types/{event_type_id}", summary: "Remove media upload type from presentation type", description: "Removes the association between a media upload type and a presentation type", - security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], + security: [ + [ + "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + SummitScopes::WriteSummitData, + ] + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( @@ -535,18 +603,20 @@ public function addToPresentationType($summit_id, $media_upload_type_id, $presen new OA\Response(response: Response::HTTP_NOT_FOUND, description: "not found"), ] )] - public function deleteFromPresentationType($summit_id, $media_upload_type_id, $presentation_type_id){ - return $this->processRequest(function() use($summit_id, $media_upload_type_id, $presentation_type_id){ + public function deleteFromPresentationType($summit_id, $media_upload_type_id, $presentation_type_id) + { + return $this->processRequest(function () use ($summit_id, $media_upload_type_id, $presentation_type_id) { $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($summit_id); - if (is_null($summit)) return $this->error404(); + if (is_null($summit)) + return $this->error404(); // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if(is_null($current_member)) + if (is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if(!$current_member->isSummitAllowed($summit)) + if (!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); $presentation_type = $this->service->deleteFromPresentationType($summit, intval($media_upload_type_id), intval($presentation_type_id)); @@ -561,7 +631,13 @@ public function deleteFromPresentationType($summit_id, $media_upload_type_id, $p path: "/api/v1/summits/{id}/media-upload-types/all/clone/{to_summit_id}", summary: "Clone media upload types to another summit", description: "Clones all media upload types from one summit to another summit", - security: [["oauth2_security_scope" => ["openid", "profile", "email"]]], + security: [ + [ + "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + SummitScopes::WriteSummitData, + ] + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( @@ -590,25 +666,28 @@ public function deleteFromPresentationType($summit_id, $media_upload_type_id, $p new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Source or target summit not found"), ] )] - public function cloneMediaUploadTypes($summit_id, $to_summit_id){ - return $this->processRequest(function() use($summit_id, $to_summit_id){ + public function cloneMediaUploadTypes($summit_id, $to_summit_id) + { + return $this->processRequest(function () use ($summit_id, $to_summit_id) { $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($summit_id); - if (is_null($summit)) return $this->error404(); + if (is_null($summit)) + return $this->error404(); $to_summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($to_summit_id); - if (is_null($to_summit)) return $this->error404(); + if (is_null($to_summit)) + return $this->error404(); // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if(is_null($current_member)) + if (is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if(!$current_member->isSummitAllowed($summit)) + if (!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); // check summit access - if(!$current_member->isSummitAllowed($to_summit)) + if (!$current_member->isSummitAllowed($to_summit)) throw new HTTP403ForbiddenException(); $to_summit = $this->service->cloneMediaUploadTypes($summit, $to_summit); @@ -622,4 +701,4 @@ public function cloneMediaUploadTypes($summit_id, $to_summit_id){ }); } -} \ No newline at end of file +} From 6bf8ae5c7066fdb29a02c1816c9b1454fc4c8f45 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Thu, 13 Nov 2025 21:37:39 +0000 Subject: [PATCH 07/17] chore: Move the security schema for the controller to its own file --- ...uth2SummitMediaUploadTypeApiController.php | 95 +++++++++++++------ 1 file changed, 66 insertions(+), 29 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php index e8a97746f..a82b08718 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php @@ -16,7 +16,9 @@ **/ use HTTP401UnauthorizedException; use App\Http\Exceptions\HTTP403ForbiddenException; +use App\Models\Foundation\Main\IGroup; use App\Models\Foundation\Summit\Repositories\ISummitMediaUploadTypeRepository; +use App\Security\SummitScopes; use App\Services\Model\ISummitMediaUploadTypeService; use Illuminate\Http\Response; use models\oauth2\IResourceServerContext; @@ -27,27 +29,6 @@ use OpenApi\Attributes as OA; - -#[OA\SecurityScheme( - type: 'oauth2', - securityScheme: 'OAuth2SummitMediaUploadTypeApiControllerSecurity', - flows: [ - new OA\Flow( - authorizationUrl: L5_SWAGGER_CONST_AUTH_URL, - tokenUrl: L5_SWAGGER_CONST_TOKEN_URL, - flow: 'authorizationCode', - scopes: [ - SummitScopes::ReadAllSummitData => 'Read All Summit Data', - SummitScopes::WriteSummitData => 'Write Summit Data', - ], - ), - ], -) -] -class RSVPAuthSchema -{ -} - /** * Class OAuth2SummitMediaUploadTypeApiController * @package App\Http\Controllers @@ -95,11 +76,18 @@ public function __construct description: "Returns a paginated list of media upload types configured for a specific summit. Allows ordering, filtering and pagination.", security: [ [ - "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + "summit_media_upload_type_oauth2" => [ SummitScopes::ReadAllSummitData, ] ] ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( @@ -180,11 +168,18 @@ public function getAllBySummit($summit_id) description: "Returns detailed information about a specific media upload type", security: [ [ - "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + "summit_media_upload_type_oauth2" => [ SummitScopes::ReadAllSummitData, ] ] ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( @@ -238,11 +233,18 @@ public function get($summit_id, $media_upload_type_id) description: "Creates a new media upload type for the specified summit", security: [ [ - "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + "summit_media_upload_type_oauth2" => [ SummitScopes::WriteSummitData, ] ] ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( @@ -281,11 +283,18 @@ public function add($summit_id) description: "Updates an existing media upload type", security: [ [ - "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + "summit_media_upload_type_oauth2" => [ SummitScopes::WriteSummitData, ] ] ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( @@ -331,11 +340,18 @@ public function update($summit_id, $media_upload_type_id) description: "Deletes a media upload type from the summit", security: [ [ - "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + "summit_media_upload_type_oauth2" => [ SummitScopes::WriteSummitData, ] ] ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( @@ -492,11 +508,18 @@ protected function updateChild(Summit $summit, int $child_id, array $payload): I description: "Associates a media upload type with a specific presentation type", security: [ [ - "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + "summit_media_upload_type_oauth2" => [ SummitScopes::WriteSummitData, ] ] ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( @@ -563,11 +586,18 @@ public function addToPresentationType($summit_id, $media_upload_type_id, $presen description: "Removes the association between a media upload type and a presentation type", security: [ [ - "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + "summit_media_upload_type_oauth2" => [ SummitScopes::WriteSummitData, ] ] ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( @@ -633,11 +663,18 @@ public function deleteFromPresentationType($summit_id, $media_upload_type_id, $p description: "Clones all media upload types from one summit to another summit", security: [ [ - "OAuth2SummitMediaUploadTypeApiControllerSecurity" => [ + "summit_media_upload_type_oauth2" => [ SummitScopes::WriteSummitData, ] ] ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( From 500d63bd410516122f72dab3fe86b93f0c4b934e Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Fri, 23 Jan 2026 19:44:29 +0000 Subject: [PATCH 08/17] fix: add requested changes and remove incorrectly added code and restore original linting Signed-off-by: Matias Perrone --- ...uth2SummitMediaUploadTypeApiController.php | 156 +++++++++--------- app/Swagger/SummitSchemas.php | 132 ++------------- 2 files changed, 93 insertions(+), 195 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php index a82b08718..6ecbdf140 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php @@ -1,6 +1,4 @@ -service = $service; $this->summit_repository = $summit_repository; @@ -72,6 +71,7 @@ public function __construct #[OA\Get( path: "/api/v1/summits/{id}/media-upload-types", + operationId: "getAllMediaUploadTypes", summary: "Get all media upload types for a summit", description: "Returns a paginated list of media upload types configured for a specific summit. Allows ordering, filtering and pagination.", security: [ @@ -91,9 +91,9 @@ public function __construct tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( - name: 'summit_id', - in: 'query', - required: false, + name: 'id', + in: 'path', + required: true, schema: new OA\Schema(type: 'integer'), description: 'The summit ID' ), @@ -150,20 +150,14 @@ public function __construct 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: "Summit not found"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Summit Not Found"), ] )] - public function getAllBySummit($summit_id) - { - $this->summit_id = $summit_id; - $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($this->summit_id); - if (is_null($summit)) - return $this->error404(); - return $this->getAll(); - } + // public function getAllBySummit($summit_id) #[OA\Get( path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}", + operationId: "getMediaUploadType", summary: "Get a specific media upload type", description: "Returns detailed information about a specific media upload type", security: [ @@ -183,9 +177,9 @@ public function getAllBySummit($summit_id) tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( - name: 'summit_id', - in: 'query', - required: false, + name: 'id', + in: 'path', + required: true, schema: new OA\Schema(type: 'integer'), description: 'The summit ID' ), @@ -219,16 +213,14 @@ public function getAllBySummit($summit_id) ), 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_NOT_FOUND, description: "Not Found"), ] )] - public function get($summit_id, $media_upload_type_id) - { - return $this->getById($summit_id, $media_upload_type_id); - } + // public function get($summit_id, $media_upload_type_id) #[OA\Post( path: "/api/v1/summits/{id}/media-upload-types", + operationId: "createMediaUploadType", summary: "Create a new media upload type", description: "Creates a new media upload type for the specified summit", security: [ @@ -248,9 +240,9 @@ public function get($summit_id, $media_upload_type_id) tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( - name: 'summit_id', - in: 'query', - required: false, + name: 'id', + in: 'path', + required: true, schema: new OA\Schema(type: 'integer'), description: 'The summit ID' ), @@ -268,17 +260,15 @@ public function get($summit_id, $media_upload_type_id) 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: "Summit not found"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Summit Not Found"), new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), ] )] - public function add($summit_id) - { - return $this->addChild($summit_id); - } + // public function add($summit_id) #[OA\Put( path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}", + operationId: "updateMediaUploadType", summary: "Update a media upload type", description: "Updates an existing media upload type", security: [ @@ -298,9 +288,9 @@ public function add($summit_id) tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( - name: 'summit_id', - in: 'query', - required: false, + name: 'id', + in: 'path', + required: true, schema: new OA\Schema(type: 'integer'), description: 'The summit ID' ), @@ -325,17 +315,15 @@ public function add($summit_id) 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_NOT_FOUND, description: "Not Found"), new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), ] )] - public function update($summit_id, $media_upload_type_id) - { - return $this->updateChild($summit_id, $media_upload_type_id); - } + // public function update($summit_id, $media_upload_type_id) #[OA\Delete( path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}", + operationId: "deleteMediaUploadType", summary: "Delete a media upload type", description: "Deletes a media upload type from the summit", security: [ @@ -355,9 +343,9 @@ public function update($summit_id, $media_upload_type_id) tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( - name: 'summit_id', - in: 'query', - required: false, + name: 'id', + in: 'path', + required: true, schema: new OA\Schema(type: 'integer'), description: 'The summit ID' ), @@ -373,18 +361,15 @@ public function update($summit_id, $media_upload_type_id) new OA\Response(response: Response::HTTP_NO_CONTENT, description: "Deleted successfully"), 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_NOT_FOUND, description: "Not Found"), ] )] - public function delete($summit_id, $media_upload_type_id) - { - return $this->deleteChild($summit_id, $media_upload_type_id); - } + // public function delete($summit_id, $media_upload_type_id) /** * @return array */ - protected function getFilterRules(): array + protected function getFilterRules():array { return [ 'name' => ['=@', '=='], @@ -394,8 +379,7 @@ protected function getFilterRules(): array /** * @return array */ - protected function getFilterValidatorRules(): array - { + protected function getFilterValidatorRules():array{ return [ 'name' => 'sometimes|required|string', ]; @@ -403,8 +387,7 @@ protected function getFilterValidatorRules(): array /** * @return array */ - protected function getOrderRules(): array - { + protected function getOrderRules():array{ return [ 'id', 'name', @@ -504,6 +487,7 @@ protected function updateChild(Summit $summit, int $child_id, array $payload): I #[OA\Put( path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}/presentation-types/{event_type_id}", + operationId: "addMediaUploadTypeToPresentationType", summary: "Add media upload type to presentation type", description: "Associates a media upload type with a specific presentation type", security: [ @@ -523,9 +507,9 @@ protected function updateChild(Summit $summit, int $child_id, array $payload): I tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( - name: 'summit_id', - in: 'query', - required: false, + name: 'id', + in: 'path', + required: true, schema: new OA\Schema(type: 'integer'), description: 'The summit ID' ), @@ -552,15 +536,19 @@ protected function updateChild(Summit $summit, int $child_id, array $payload): I ), 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_NOT_FOUND, description: "Not Found"), ] )] - public function addToPresentationType($summit_id, $media_upload_type_id, $presentation_type_id) - { + /** + * @param $summit_id + * @param $media_upload_type_id + * @param $presentation_type_id + * @return \Illuminate\Http\JsonResponse|mixed + */ + public function addToPresentationType($summit_id, $media_upload_type_id, $presentation_type_id){ return $this->processRequest(function () use ($summit_id, $media_upload_type_id, $presentation_type_id) { $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($summit_id); - if (is_null($summit)) - return $this->error404(); + if (is_null($summit)) return $this->error404(); // authz // check that we have a current member ( not service account ) @@ -582,6 +570,7 @@ public function addToPresentationType($summit_id, $media_upload_type_id, $presen #[OA\Delete( path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}/presentation-types/{event_type_id}", + operationId: "removeMediaUploadTypeFromPresentationType", summary: "Remove media upload type from presentation type", description: "Removes the association between a media upload type and a presentation type", security: [ @@ -601,9 +590,9 @@ public function addToPresentationType($summit_id, $media_upload_type_id, $presen tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( - name: 'summit_id', - in: 'query', - required: false, + name: 'id', + in: 'path', + required: true, schema: new OA\Schema(type: 'integer'), description: 'The summit ID' ), @@ -630,15 +619,19 @@ public function addToPresentationType($summit_id, $media_upload_type_id, $presen ), 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_NOT_FOUND, description: "Not Found"), ] )] - public function deleteFromPresentationType($summit_id, $media_upload_type_id, $presentation_type_id) - { + /** + * @param $summit_id + * @param $media_upload_type_id + * @param $presentation_type_id + * @return \Illuminate\Http\JsonResponse|mixed + */ + public function deleteFromPresentationType($summit_id, $media_upload_type_id, $presentation_type_id){ return $this->processRequest(function () use ($summit_id, $media_upload_type_id, $presentation_type_id) { $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($summit_id); - if (is_null($summit)) - return $this->error404(); + if (is_null($summit)) return $this->error404(); // authz // check that we have a current member ( not service account ) @@ -659,6 +652,7 @@ public function deleteFromPresentationType($summit_id, $media_upload_type_id, $p #[OA\Post( path: "/api/v1/summits/{id}/media-upload-types/all/clone/{to_summit_id}", + operationId: "cloneMediaUploadTypes", summary: "Clone media upload types to another summit", description: "Clones all media upload types from one summit to another summit", security: [ @@ -678,9 +672,9 @@ public function deleteFromPresentationType($summit_id, $media_upload_type_id, $p tags: ["Summit Media Upload Types"], parameters: [ new OA\Parameter( - name: 'summit_id', - in: 'query', - required: false, + name: 'id', + in: 'path', + required: true, schema: new OA\Schema(type: 'integer'), description: 'The summit ID' ), @@ -696,23 +690,25 @@ public function deleteFromPresentationType($summit_id, $media_upload_type_id, $p new OA\Response( response: Response::HTTP_CREATED, description: "Success - Returns the target summit with cloned media upload types", - content: new OA\JsonContent(type: "object") + content: new OA\JsonContent(ref: "#/components/schemas/Summit") ), 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: "Source or target summit not found"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Source or target summit Not Found"), ] )] - public function cloneMediaUploadTypes($summit_id, $to_summit_id) - { + /** + * @param $summit_id + * @param $to_summit_id + * @return \Illuminate\Http\JsonResponse|mixed + */ + public function cloneMediaUploadTypes($summit_id, $to_summit_id){ return $this->processRequest(function () use ($summit_id, $to_summit_id) { $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($summit_id); - if (is_null($summit)) - return $this->error404(); + if (is_null($summit)) return $this->error404(); $to_summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($to_summit_id); - if (is_null($to_summit)) - return $this->error404(); + if (is_null($to_summit)) return $this->error404(); // authz // check that we have a current member ( not service account ) diff --git a/app/Swagger/SummitSchemas.php b/app/Swagger/SummitSchemas.php index 8bf447e70..72063d23d 100644 --- a/app/Swagger/SummitSchemas.php +++ b/app/Swagger/SummitSchemas.php @@ -111,9 +111,7 @@ enum: ['DATE', 'TRACK', 'TRACK_GROUPS', 'COMPANY', 'LEVEL', 'SPEAKERS', 'VENUES' ) ] )] -class SummitSchedulePreFilterElementConfigSchema -{ -} +class SummitSchedulePreFilterElementConfigSchema {} #[OA\Schema( schema: 'SummitScheduleConfigCreateRequest', @@ -155,9 +153,7 @@ class SummitSchedulePreFilterElementConfigSchema ) ] )] -class SummitScheduleConfigCreateRequestSchema -{ -} +class SummitScheduleConfigCreateRequestSchema {} #[OA\Schema( schema: 'SummitScheduleConfigUpdateRequest', @@ -198,9 +194,7 @@ class SummitScheduleConfigCreateRequestSchema ) ] )] -class SummitScheduleConfigUpdateRequestSchema -{ -} +class SummitScheduleConfigUpdateRequestSchema {} // Summit Documents @@ -228,9 +222,7 @@ class SummitScheduleConfigUpdateRequestSchema new OA\Property(property: "summit_id", type: "integer", description: "Summit ID, full object description when ?expand=summit (summit)"), ] )] -class SummitDocumentSchema -{ -} +class SummitDocumentSchema {} #[OA\Schema( schema: "PaginatedSummitDocumentsResponse", @@ -248,9 +240,7 @@ class SummitDocumentSchema ) ] )] -class PaginatedSummitDocumentsResponseSchema -{ -} +class PaginatedSummitDocumentsResponseSchema {} #[OA\Schema( schema: "SummitDocumentCreateRequest", @@ -280,9 +270,7 @@ class PaginatedSummitDocumentsResponseSchema ), ] )] -class SummitDocumentCreateRequest -{ -} +class SummitDocumentCreateRequest {} #[OA\Schema( schema: "SummitDocumentUpdateRequest", @@ -304,9 +292,7 @@ class SummitDocumentCreateRequest ), ] )] -class SummitDocumentUpdateRequest -{ -} +class SummitDocumentUpdateRequest {} // Summit Attendee Badges @@ -355,55 +341,10 @@ class SummitAttendeeBadgeSchema ) ] )] -class PaginatedSummitAttendeeBadgesResponseSchema -{ -} +class PaginatedSummitAttendeeBadgesResponseSchema {} // Summit Media Upload Type Schemas -#[OA\Schema( - schema: "SummitMediaUploadType", - description: "Summit Media Upload Type", - type: "object", - properties: [ - new OA\Property(property: "id", type: "integer", example: 1), - new OA\Property(property: "created", type: "integer", format: "int64", description: "Creation timestamp (epoch)", example: 1234567890), - new OA\Property(property: "last_edited", type: "integer", format: "int64", description: "Last edit timestamp (epoch)", example: 1234567890), - new OA\Property(property: "name", type: "string", maxLength: 255, example: "Speaker Photo"), - new OA\Property(property: "description", type: "string", maxLength: 5120, nullable: true, example: "High resolution photo of the speaker"), - new OA\Property(property: "max_size", type: "integer", description: "Maximum file size in KB", example: 10240), - new OA\Property(property: "is_mandatory", type: "boolean", example: true), - new OA\Property(property: "min_uploads_qty", type: "integer", minimum: 0, example: 1), - new OA\Property(property: "max_uploads_qty", type: "integer", minimum: 0, example: 1), - new OA\Property(property: "use_temporary_links_on_public_storage", type: "boolean", example: false), - new OA\Property(property: "temporary_links_public_storage_ttl", type: "integer", description: "TTL in seconds", nullable: true, example: 3600), - new OA\Property(property: "private_storage_type", type: "string", example: "local"), - new OA\Property(property: "public_storage_type", type: "string", example: "s3"), - new OA\Property(property: "is_editable", type: "boolean", example: true), - ], - anyOf: [ - new OA\Property(property: "type_id", type: "integer", example: 456), - new OA\Property(property: "type", type: "SummitMediaFileType", description: "Only present when relations=presentation_types and expand includes 'type' in it."), - new OA\Property(property: "summit_id", type: "integer", example: 123, description: "Summit ID, only when expand does NOT include 'summit' in it."), - new OA\Property(property: "summit", type: "Summit", description: "Summit expand (only when relations=presentation_types) and expand includes 'summit' in it."), - new OA\Property( - property: "presentation_types", - type: "array", - items: new OA\Items(type: "integer"), - description: "Array of presentation type IDs (only when relations=presentation_types and expand does not include 'presentation_types' in it)", - example: [1, 2, 3] - ), - new OA\Property( - property: "presentation_types", - type: "array", - items: new OA\Items(type: "PresentationType"), - description: "Array of PresentationType (only when relations=presentation_types and expand includes 'presentation_types' in it)", - ), - ], -)] -class SummitMediaUploadTypeSchema -{ -} #[OA\Schema( schema: "PaginatedSummitMediaUploadTypesResponse", @@ -421,9 +362,7 @@ class SummitMediaUploadTypeSchema ], type: "object" )] -class PaginatedSummitMediaUploadTypesResponseSchema -{ -} +class PaginatedSummitMediaUploadTypesResponseSchema {} #[OA\Schema( schema: "SummitMediaUploadTypeCreateRequest", @@ -453,9 +392,7 @@ class PaginatedSummitMediaUploadTypesResponseSchema ], type: "object" )] -class SummitMediaUploadTypeCreateRequestSchema -{ -} +class SummitMediaUploadTypeCreateRequestSchema {} #[OA\Schema( schema: "SummitMediaUploadTypeUpdateRequest", @@ -484,9 +421,7 @@ class SummitMediaUploadTypeCreateRequestSchema ], type: "object" )] -class SummitMediaUploadTypeUpdateRequestSchema -{ -} +class SummitMediaUploadTypeUpdateRequestSchema {} #[OA\Schema( @@ -505,9 +440,7 @@ class SummitMediaUploadTypeUpdateRequestSchema ) ] )] -class PaginatedSummitSponsorshipTypesResponseSchema -{ -} +class PaginatedSummitSponsorshipTypesResponseSchema {} #[OA\Schema( schema: 'SummitSponsorshipTypeCreateRequest', @@ -519,9 +452,7 @@ class PaginatedSummitSponsorshipTypesResponseSchema new OA\Property(property: 'size', type: 'string', example: ISponsorshipTypeConstants::BigSize, enum: ISponsorshipTypeConstants::AllowedSizes), ] )] -class SummitSponsorshipTypeCreateRequestSchema -{ -} +class SummitSponsorshipTypeCreateRequestSchema {} #[OA\Schema( schema: 'SummitSponsorshipTypeUpdateRequest', @@ -533,31 +464,8 @@ class SummitSponsorshipTypeCreateRequestSchema new OA\Property(property: 'order', type: 'integer', example: 1, minimum: 1), ] )] -class SummitSponsorshipTypeUpdateRequestSchema -{ -} +class SummitSponsorshipTypeUpdateRequestSchema {} -#[OA\Schema( - schema: 'SummitMediaFileType', - type: 'object', - properties: [ - new OA\Property(property: 'id', type: 'integer', example: 1), - new OA\Property(property: 'created', type: 'integer', format: 'int64', example: 1633024800), - new OA\Property(property: 'last_edited', type: 'integer', format: 'int64', example: 1633024800), - new OA\Property(property: 'name', type: 'string', example: 'Presentation'), - new OA\Property(property: 'description', type: 'string', example: 'Presentation files for events'), - new OA\Property(property: 'is_system_defined', type: 'boolean', example: false), - new OA\Property( - property: 'allowed_extensions', - type: 'array', - items: new OA\Items(type: 'string'), - example: ['pdf', 'ppt', 'pptx'] - ), - ] -)] -class SummitMediaFileTypeSchema -{ -} #[OA\Schema( schema: 'PaginatedSummitMediaFileTypesResponse', @@ -575,9 +483,7 @@ class SummitMediaFileTypeSchema ) ] )] -class PaginatedSummitMediaFileTypesResponseSchema -{ -} +class PaginatedSummitMediaFileTypesResponseSchema {} #[OA\Schema( schema: 'SummitMediaFileTypeCreateRequest', @@ -595,9 +501,7 @@ class PaginatedSummitMediaFileTypesResponseSchema ), ] )] -class SummitMediaFileTypeCreateRequestSchema -{ -} +class SummitMediaFileTypeCreateRequestSchema {} #[OA\Schema( schema: 'SummitMediaFileTypeUpdateRequest', @@ -615,6 +519,4 @@ class SummitMediaFileTypeCreateRequestSchema ), ] )] -class SummitMediaFileTypeUpdateRequestSchema -{ -} +class SummitMediaFileTypeUpdateRequestSchema {} From 0a80a536c9fee65a542f033afbfccc099c5f54ea Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Fri, 2 Jan 2026 21:40:25 +0000 Subject: [PATCH 09/17] feat: Extend Swagger Coverage for controller `OAuth2SummitEventsApiController` Signed-off-by: Matias Perrone --- .../OAuth2SummitEventsApiController.php | 1117 ++++++++++++++++- .../Models/SummitScheduleEmptySpotSchema.php | 20 + ...OAuth2SummitEventsApiControllerSchemas.php | 403 ++++++ .../Security/SummitEventsAuthSchema.php | 34 + 4 files changed, 1573 insertions(+), 1 deletion(-) create mode 100644 app/Swagger/Models/SummitScheduleEmptySpotSchema.php create mode 100644 app/Swagger/OAuth2SummitEventsApiControllerSchemas.php create mode 100644 app/Swagger/Security/SummitEventsAuthSchema.php diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php index defd3f515..c2d65c7be 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php @@ -16,7 +16,11 @@ use App\Http\Utils\EpochCellFormatter; use App\Http\Utils\MultipartFormDataCleaner; use App\libs\Utils\Doctrine\ReplicaAwareTrait; +use App\Models\Foundation\Main\IGroup; use App\ModelSerializers\SerializerUtils; +use App\Security\MemberScopes; +use App\Security\SummitScopes; +use OpenApi\Attributes as OA; use Illuminate\Http\Request as LaravelRequest; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Request; @@ -36,6 +40,7 @@ use ModelSerializers\IPresentationSerializerTypes; use ModelSerializers\SerializerRegistry; use services\model\ISummitService; +use Symfony\Component\HttpFoundation\Response; use utils\Filter; use utils\FilterElement; use utils\FilterParser; @@ -131,6 +136,34 @@ private function getSerializerType(): string * Events endpoints */ + // OpenAPI Documentation + + #[OA\Get( + path: '/api/v1/summits/{id}/events', + operationId: 'getEvents', + summary: 'Get all events for a summit', + description: 'Retrieves a paginated list of all events (published and unpublished) for a specific summit. Requires admin privileges.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'page', in: 'query', required: false, description: 'Page number', schema: new OA\Schema(type: 'integer', default: 1)), + new OA\Parameter(name: 'per_page', in: 'query', required: false, description: 'Items per page', schema: new OA\Schema(type: 'integer', default: 10, maximum: 100)), + new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter expressions', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), + new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by field(s)', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Events retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitEventsResponse')), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @return mixed @@ -160,6 +193,29 @@ public function getEvents($summit_id) }); } + #[OA\Get( + path: '/api/v1/summits/{id}/events/csv', + operationId: 'getEventsCSV', + summary: 'Export all summit events to CSV', + description: 'Exports a CSV file containing all events for a specific summit.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter expressions', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), + new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by field(s)', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'CSV file generated', content: new OA\MediaType(mediaType: 'text/csv', schema: new OA\Schema(type: 'string', format: 'binary'))), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @return mixed @@ -212,6 +268,30 @@ public function getEventsCSV($summit_id) }); } + #[OA\Get( + path: '/api/v1/summits/{id}/events/published', + operationId: 'getScheduledEvents', + summary: 'Get all published/scheduled events for a summit', + description: 'Retrieves a paginated list of all published events for a specific summit.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'page', in: 'query', required: false, description: 'Page number', schema: new OA\Schema(type: 'integer', default: 1)), + new OA\Parameter(name: 'per_page', in: 'query', required: false, description: 'Items per page', schema: new OA\Schema(type: 'integer', default: 10, maximum: 100)), + new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter expressions', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), + new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by field(s)', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Published events retrieved', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitEventsResponse')), + 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_NOT_FOUND, description: 'Not Found'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @return mixed @@ -251,6 +331,29 @@ public function getScheduledEvents($summit_id) use ParametrizedGetAll; + #[OA\Get( + path: '/api/public/v1/summits/all/{id}/events/all/published/tags', + operationId: 'getScheduledEventsTags', + summary: 'Get all tags from published events for a summit (Public)', + description: 'Retrieves a paginated list of tags used in published events for a specific summit. This is a public endpoint.', + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'page', in: 'query', required: false, description: 'Page number', schema: new OA\Schema(type: 'integer', default: 1)), + new OA\Parameter(name: 'per_page', in: 'query', required: false, description: 'Items per page', schema: new OA\Schema(type: 'integer', default: 10, maximum: 100)), + new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter by tag (=@, ==)', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), + new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by tag', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Tags retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedTagsResponse')), + 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_NOT_FOUND, description: 'Not Found'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @return \Illuminate\Http\JsonResponse|mixed @@ -298,6 +401,28 @@ function ($page, $per_page, $filter, $order, $applyExtraFilters) { ); } + #[OA\Get( + path: '/api/v1/summits/events', + operationId: 'getAllEvents', + summary: 'Get all events across all summits', + description: 'Retrieves a paginated list of all events across all summits.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'page', in: 'query', required: false, description: 'Page number', schema: new OA\Schema(type: 'integer', default: 1)), + new OA\Parameter(name: 'per_page', in: 'query', required: false, description: 'Items per page', schema: new OA\Schema(type: 'integer', default: 10, maximum: 100)), + new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter expressions', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), + new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by field(s)', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Events retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitEventsResponse')), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @return \Illuminate\Http\JsonResponse|mixed */ @@ -326,6 +451,30 @@ public function getAllEvents() }); } + #[OA\Get( + path: '/api/v1/summits/{id}/presentations', + operationId: 'getAllPresentations', + summary: 'Get all presentations for a summit', + description: 'Retrieves a paginated list of all presentations for a specific summit.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'page', in: 'query', required: false, description: 'Page number', schema: new OA\Schema(type: 'integer', default: 1)), + new OA\Parameter(name: 'per_page', in: 'query', required: false, description: 'Items per page', schema: new OA\Schema(type: 'integer', default: 10, maximum: 100)), + new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter expressions', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), + new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by field(s)', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Presentations retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitEventsResponse')), + 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_NOT_FOUND, description: 'Not Found'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @return \Illuminate\Http\JsonResponse|mixed */ @@ -356,6 +505,30 @@ public function getAllPresentations($summit_id) }); } + #[OA\Get( + path: '/api/v1/summits/{id}/presentations/voteable', + operationId: 'getAllVoteablePresentations', + summary: 'Get all voteable presentations for a summit', + description: 'Retrieves a paginated list of all presentations that allow attendee voting for a specific summit.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'page', in: 'query', required: false, description: 'Page number', schema: new OA\Schema(type: 'integer', default: 1)), + new OA\Parameter(name: 'per_page', in: 'query', required: false, description: 'Items per page', schema: new OA\Schema(type: 'integer', default: 10, maximum: 100)), + new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter expressions', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), + new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by field(s)', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Voteable presentations retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitEventsResponse')), + 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_NOT_FOUND, description: 'Not Found'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @return \Illuminate\Http\JsonResponse|mixed */ @@ -393,6 +566,32 @@ public function getAllVoteablePresentations($summit_id) }); } + #[OA\Get( + path: '/api/v2/summits/{id}/presentations/voteable', + operationId: 'getAllVoteablePresentationsV2', + summary: 'Get all voteable presentations for a summit (V2)', + description: 'Retrieves a paginated list of all presentations that allow attendee voting for a specific summit with admin-level details.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'page', in: 'query', required: false, description: 'Page number', schema: new OA\Schema(type: 'integer', default: 1)), + new OA\Parameter(name: 'per_page', in: 'query', required: false, description: 'Items per page', schema: new OA\Schema(type: 'integer', default: 10, maximum: 100)), + new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter expressions', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), + new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by field(s)', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Voteable presentations retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitEventsResponse')), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @return \Illuminate\Http\JsonResponse|mixed */ @@ -441,6 +640,29 @@ public function getAllVoteablePresentationsV2($summit_id) }); } + #[OA\Get( + path: '/api/v2/summits/{id}/presentations/voteable/csv', + operationId: 'getAllVoteablePresentationsV2CSV', + summary: 'Export voteable presentations to CSV (V2)', + description: 'Exports a CSV file containing all voteable presentations for a specific summit.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter expressions', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), + new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by field(s)', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'CSV file generated', content: new OA\MediaType(mediaType: 'text/csv', schema: new OA\Schema(type: 'string', format: 'binary'))), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + public function getAllVoteablePresentationsV2CSV($summit_id) { return $this->processRequest(function() use($summit_id){ @@ -497,6 +719,27 @@ public function getAllVoteablePresentationsV2CSV($summit_id) }); } + #[OA\Get( + path: '/api/v1/summits/{id}/presentations/voteable/{presentation_id}', + operationId: 'getVoteablePresentation', + summary: 'Get a specific voteable presentation', + description: 'Retrieves a single voteable presentation by ID.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'presentation_id', in: 'path', required: true, description: 'Presentation ID', schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Presentation retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEvent')), + 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_NOT_FOUND, description: 'Not Found'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @param $presentation_id @@ -534,6 +777,28 @@ public function getVoteablePresentation($summit_id, $presentation_id) }); } + #[OA\Get( + path: '/api/v1/summits/events/published', + operationId: 'getAllScheduledEvents', + summary: 'Get all published events across all summits', + description: 'Retrieves a paginated list of all published/scheduled events across all summits.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'page', in: 'query', required: false, description: 'Page number', schema: new OA\Schema(type: 'integer', default: 1)), + new OA\Parameter(name: 'per_page', in: 'query', required: false, description: 'Items per page', schema: new OA\Schema(type: 'integer', default: 10, maximum: 100)), + new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter expressions', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), + new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by field(s)', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Published events retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitEventsResponse')), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @return mixed */ @@ -564,6 +829,27 @@ public function getAllScheduledEvents() } + #[OA\Get( + path: '/api/v1/summits/{id}/events/{event_id}', + operationId: 'getEvent', + summary: 'Get a specific event by ID', + description: 'Retrieves a single event by its ID for a specific summit.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Event retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEvent')), + 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_NOT_FOUND, description: 'Not Found'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -597,6 +883,27 @@ public function getEvent($summit_id, $event_id) }); } + #[OA\Get( + path: '/api/v1/summits/{id}/events/{event_id}/published', + operationId: 'getScheduledEvent', + summary: 'Get a specific published/scheduled event by ID', + description: 'Retrieves a single published event by its ID for a specific summit.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Published event retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEvent')), + 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_NOT_FOUND, description: 'Not Found'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -624,6 +931,31 @@ public function getScheduledEvent($summit_id, $event_id) }); } + #[OA\Post( + path: '/api/v1/summits/{id}/events/{event_id}/published/mail', + operationId: 'shareScheduledEventByEmail', + summary: 'Share a scheduled event by email', + description: 'Sends an email sharing a specific published event. Rate limited to 5 requests per day.', + security: [['summit_events_api_oauth2' => [SummitScopes::SendMyScheduleMail]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: '#/components/schemas/ShareEventByEmailRequest') + ), + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Email sent successfully'), + 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_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'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -647,6 +979,32 @@ public function shareScheduledEventByEmail($summit_id, $event_id) }); } + #[OA\Post( + path: '/api/v1/summits/{id}/events', + operationId: 'addEvent', + summary: 'Create a new event for a summit', + description: 'Creates a new event for a specific summit.', + security: [['summit_events_api_oauth2' => [SummitScopes::WriteEventData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::SummitRegistrationAdmins]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: '#/components/schemas/AddSummitEventRequest') + ), + responses: [ + new OA\Response(response: Response::HTTP_CREATED, description: 'Event created successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEvent')), + 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'), + ] + )] + /** * @param $summit_id * @return mixed @@ -698,6 +1056,33 @@ public function addEvent($summit_id) } + #[OA\Put( + path: '/api/v1/summits/{id}/events/{event_id}', + operationId: 'updateEvent', + summary: 'Update an existing event', + description: 'Updates an existing event for a specific summit.', + security: [['summit_events_api_oauth2' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::SummitRegistrationAdmins, IGroup::TrackChairs, IGroup::TrackChairsAdmins]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: '#/components/schemas/UpdateSummitEventRequest') + ), + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Event updated successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEvent')), + 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'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -767,6 +1152,33 @@ public function updateEvent($summit_id, $event_id) }); } + #[OA\Put( + path: '/api/v1/summits/{id}/events/{event_id}/publish', + operationId: 'publishEvent', + summary: 'Publish an event to the schedule', + description: 'Publishes an event to the summit schedule with optional location, start date, and duration.', + security: [['summit_events_api_oauth2' => [SummitScopes::PublishEventData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::SummitRegistrationAdmins]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: false, + content: new OA\JsonContent(ref: '#/components/schemas/PublishSummitEventRequest') + ), + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Event published successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEvent')), + 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'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -815,6 +1227,28 @@ public function publishEvent($summit_id, $event_id) }); } + #[OA\Delete( + path: '/api/v1/summits/{id}/events/{event_id}/publish', + operationId: 'unPublishEvent', + summary: 'Unpublish an event from the schedule', + description: 'Removes an event from the published summit schedule.', + security: [['summit_events_api_oauth2' => [SummitScopes::PublishEventData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::SummitRegistrationAdmins]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: Response::HTTP_NO_CONTENT, description: 'Event unpublished successfully'), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -834,6 +1268,28 @@ public function unPublishEvent($summit_id, $event_id) }); } + #[OA\Delete( + path: '/api/v1/summits/{id}/events/{event_id}', + operationId: 'deleteEvent', + summary: 'Delete an event', + description: 'Permanently deletes an event from a summit.', + security: [['summit_events_api_oauth2' => []]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::SummitRegistrationAdmins]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: Response::HTTP_NO_CONTENT, description: 'Event deleted successfully'), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -855,6 +1311,31 @@ public function deleteEvent($summit_id, $event_id) /** Feedback endpoints */ + #[OA\Get( + path: '/api/v1/summits/{id}/events/{event_id}/feedback', + operationId: 'getEventFeedback', + summary: 'Get feedback for an event', + description: 'Retrieves a paginated list of feedback for a specific event.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadAllSummitData, SummitScopes::ReadSummitData]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'page', in: 'query', required: false, description: 'Page number', schema: new OA\Schema(type: 'integer', default: 1)), + new OA\Parameter(name: 'per_page', in: 'query', required: false, description: 'Items per page', schema: new OA\Schema(type: 'integer', default: 10, maximum: 100)), + new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter by owner_full_name, note, owner_id', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), + new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by created, owner_id, owner_full_name, rate, id', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Feedback retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitEventFeedbackResponse')), + 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_NOT_FOUND, description: 'Not Found'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -920,6 +1401,30 @@ function ($page, $per_page, $filter, $order, $applyExtraFilters) use ($event) { }); } + #[OA\Get( + path: '/api/v1/summits/{id}/events/{event_id}/feedback/csv', + operationId: 'getEventFeedbackCSV', + summary: 'Export event feedback to CSV', + description: 'Exports a CSV file containing all feedback for a specific event.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadAllSummitData, SummitScopes::ReadSummitData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter by owner_full_name, note, owner_id', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), + new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by created, owner_id, owner_full_name, rate, id', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'CSV file generated', content: new OA\MediaType(mediaType: 'text/csv', schema: new OA\Schema(type: 'string', format: 'binary'))), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -991,6 +1496,29 @@ function ($page, $per_page, $filter, $order, $applyExtraFilters) use ($event) { } + #[OA\Delete( + path: '/api/v1/summits/{id}/events/{event_id}/feedback/{feedback_id}', + operationId: 'deleteEventFeedback', + summary: 'Delete event feedback', + description: 'Deletes a specific feedback entry for an event.', + security: [['summit_events_api_oauth2' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'feedback_id', in: 'path', required: true, description: 'Feedback ID', schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: Response::HTTP_NO_CONTENT, description: 'Feedback deleted successfully'), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -1013,6 +1541,32 @@ public function deleteEventFeedback($summit_id, $event_id, $feedback_id){ return $this->deleted(); }); } + #[OA\Post( + path: '/api/v2/summits/{id}/events/{event_id}/feedback', + operationId: 'addMyEventFeedbackReturnId', + summary: 'Add feedback for an event (V2)', + description: 'Adds feedback for a specific event and returns the feedback ID.', + security: [['summit_events_api_oauth2' => [SummitScopes::WriteSummitData, SummitScopes::AddMyEventFeedback]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: '#/components/schemas/AddEventFeedbackRequest') + ), + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Feedback added successfully', content: new OA\JsonContent(type: 'integer', description: 'Feedback ID')), + 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'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -1023,6 +1577,33 @@ public function addMyEventFeedbackReturnId($summit_id, $event_id) return $this->_addMyEventFeedback($summit_id, $event_id, true); } + #[OA\Post( + path: '/api/v1/summits/{id}/members/{member_id}/schedule/{event_id}/feedback', + operationId: 'addMyEventFeedback', + summary: 'Add feedback for an event (V1)', + description: 'Adds feedback for a specific event on behalf of a member.', + security: [['summit_events_api_oauth2' => [SummitScopes::AddMyEventFeedback]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'member_id', in: 'path', required: true, description: 'Member ID (use "me" for current user)', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: '#/components/schemas/AddEventFeedbackRequest') + ), + responses: [ + new OA\Response(response: Response::HTTP_CREATED, description: 'Feedback added successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEventFeedback')), + 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'), + ] + )] + /** * @param $summit_id * @param $member_id @@ -1075,6 +1656,32 @@ private function _addMyEventFeedback($summit_id, $event_id, $returnId = false) }); } + #[OA\Put( + path: '/api/v2/summits/{id}/events/{event_id}/feedback', + operationId: 'updateMyEventFeedbackReturnId', + summary: 'Update feedback for an event (V2)', + description: 'Updates feedback for a specific event and returns the feedback ID.', + security: [['summit_events_api_oauth2' => [SummitScopes::WriteSummitData, SummitScopes::AddMyEventFeedback]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: '#/components/schemas/AddEventFeedbackRequest') + ), + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Feedback updated successfully', content: new OA\JsonContent(type: 'integer', description: 'Feedback ID')), + 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'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -1085,6 +1692,33 @@ public function updateMyEventFeedbackReturnId($summit_id, $event_id) return $this->_updateMyEventFeedback($summit_id, $event_id, true); } + #[OA\Put( + path: '/api/v1/summits/{id}/members/{member_id}/schedule/{event_id}/feedback', + operationId: 'updateMyEventFeedback', + summary: 'Update feedback for an event (V1)', + description: 'Updates feedback for a specific event on behalf of a member.', + security: [['summit_events_api_oauth2' => [SummitScopes::AddMyEventFeedback]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'member_id', in: 'path', required: true, description: 'Member ID (use "me" for current user)', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: '#/components/schemas/AddEventFeedbackRequest') + ), + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Feedback updated successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEventFeedback')), + 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'), + ] + )] + /** * @param $summit_id * @param $member_id @@ -1137,6 +1771,29 @@ private function _updateMyEventFeedback($summit_id, $event_id, $returnId = false }); } + #[OA\Get( + path: '/api/v1/summits/{id}/members/{member_id}/schedule/{event_id}/feedback', + operationId: 'getMyEventFeedback', + summary: 'Get my feedback for an event', + description: 'Retrieves the current user\'s feedback for a specific event.', + security: [['summit_events_api_oauth2' => [SummitScopes::MeRead, MemberScopes::ReadMyMemberData]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'member_id', in: 'path', required: true, description: 'Member ID (use "me" for current user)', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Feedback retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEventFeedback')), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @param $member_id @@ -1171,6 +1828,28 @@ public function getMyEventFeedback($summit_id, $member_id, $event_id) }); } + #[OA\Delete( + path: '/api/v1/summits/{id}/members/{member_id}/schedule/{event_id}/feedback', + operationId: 'deleteMyEventFeedback', + summary: 'Delete my feedback for an event', + description: 'Deletes the current user\'s feedback for a specific event.', + security: [['summit_events_api_oauth2' => [SummitScopes::DeleteMyEventFeedback]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'member_id', in: 'path', required: true, description: 'Member ID (use "me" for current user)', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: Response::HTTP_NO_CONTENT, description: 'Feedback deleted successfully'), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @param $member_id @@ -1197,6 +1876,41 @@ public function deleteMyEventFeedback($summit_id, $member_id, $event_id) }); } + #[OA\Post( + path: '/api/v1/summits/{id}/events/{event_id}/attachment', + operationId: 'addEventAttachment', + summary: 'Add an attachment to an event', + description: 'Uploads a file attachment to a specific event.', + security: [['summit_events_api_oauth2' => [SummitScopes::WriteSummitData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::SummitRegistrationAdmins]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\MediaType( + mediaType: 'multipart/form-data', + schema: new OA\Schema( + required: ['file'], + properties: [ + new OA\Property(property: 'file', type: 'string', format: 'binary', description: 'File to upload') + ] + ) + ) + ), + responses: [ + new OA\Response(response: Response::HTTP_CREATED, description: 'Attachment added successfully', content: new OA\JsonContent(type: 'integer', description: 'Attachment ID')), + 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: 'File not provided'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param LaravelRequest $request * @param $summit_id @@ -1221,6 +1935,30 @@ public function addEventAttachment(LaravelRequest $request, $summit_id, $event_i }); } + #[OA\Get( + path: '/api/v1/summits/{id}/events/unpublished', + operationId: 'getUnpublishedEvents', + summary: 'Get all unpublished events for a summit', + description: 'Retrieves a paginated list of all unpublished events for a specific summit.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'page', in: 'query', required: false, description: 'Page number', schema: new OA\Schema(type: 'integer', default: 1)), + new OA\Parameter(name: 'per_page', in: 'query', required: false, description: 'Items per page', schema: new OA\Schema(type: 'integer', default: 10, maximum: 100)), + new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter expressions', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), + new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by field(s)', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Unpublished events retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitEventsResponse')), + 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_NOT_FOUND, description: 'Not Found'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @return \Illuminate\Http\JsonResponse|mixed @@ -1254,6 +1992,27 @@ public function getUnpublishedEvents($summit_id) }); } + #[OA\Get( + path: '/api/v1/summits/{id}/events/published/empty-spots', + operationId: 'getScheduleEmptySpots', + summary: 'Get empty spots in the schedule', + description: 'Retrieves available empty time slots in the published summit schedule.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'filter[]', in: 'query', required: true, description: 'Filter by location_id, start_date, end_date, gap', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Empty spots retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitScheduleEmptySpotsResponse')), + 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_NOT_FOUND, description: 'Not Found'), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: 'Filter param is mandatory'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @return \Illuminate\Http\JsonResponse|mixed @@ -1296,6 +2055,32 @@ public function getScheduleEmptySpots($summit_id) }); } + #[OA\Delete( + path: '/api/v1/summits/{id}/events/publish', + operationId: 'unPublishEvents', + summary: 'Unpublish multiple events', + description: 'Unpublishes multiple events from the summit schedule at once.', + security: [['summit_events_api_oauth2' => [SummitScopes::PublishEventData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::SummitRegistrationAdmins]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: '#/components/schemas/UnpublishEventsRequest') + ), + responses: [ + new OA\Response(response: Response::HTTP_NO_CONTENT, description: 'Events unpublished successfully'), + 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'), + ] + )] + /** * @param $summit_id * @return \Illuminate\Http\JsonResponse|mixed @@ -1332,6 +2117,32 @@ public function unPublishEvents($summit_id) }); } + #[OA\Put( + path: '/api/v1/summits/{id}/events/publish', + operationId: 'updateAndPublishEvents', + summary: 'Update and publish multiple events', + description: 'Updates and publishes multiple events to the summit schedule at once.', + security: [['summit_events_api_oauth2' => [SummitScopes::PublishEventData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::SummitRegistrationAdmins]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: '#/components/schemas/UpdateAndPublishEventsRequest') + ), + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Events updated and published successfully'), + 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'), + ] + )] + /** * @param $summit_id * @return \Illuminate\Http\JsonResponse|mixed @@ -1368,6 +2179,32 @@ public function updateAndPublishEvents($summit_id) }); } + #[OA\Put( + path: '/api/v1/summits/{id}/events', + operationId: 'updateEvents', + summary: 'Update multiple events', + description: 'Updates multiple events at once without publishing them.', + security: [['summit_events_api_oauth2' => [SummitScopes::WriteEventData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::SummitRegistrationAdmins]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: '#/components/schemas/UpdateEventsRequest') + ), + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Events updated successfully'), + 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'), + ] + )] + /** * @param $summit_id * @return \Illuminate\Http\JsonResponse|mixed @@ -1404,6 +2241,28 @@ public function updateEvents($summit_id) }); } + #[OA\Post( + path: '/api/v1/summits/{id}/events/{event_id}/clone', + operationId: 'cloneEvent', + summary: 'Clone an event', + description: 'Creates a copy of an existing event.', + security: [['summit_events_api_oauth2' => [SummitScopes::WriteEventData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::SummitRegistrationAdmins]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID to clone', schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: Response::HTTP_CREATED, description: 'Event cloned successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEvent')), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -1422,6 +2281,41 @@ public function cloneEvent($summit_id, $event_id) }); } + #[OA\Post( + path: '/api/v1/summits/{id}/events/{event_id}/image', + operationId: 'addEventImage', + summary: 'Add an image to an event', + description: 'Uploads an image for a specific event.', + security: [['summit_events_api_oauth2' => [SummitScopes::WriteEventData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::SummitRegistrationAdmins]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\MediaType( + mediaType: 'multipart/form-data', + schema: new OA\Schema( + required: ['file'], + properties: [ + new OA\Property(property: 'file', type: 'string', format: 'binary', description: 'Image file to upload') + ] + ) + ) + ), + responses: [ + new OA\Response(response: Response::HTTP_CREATED, description: 'Image added successfully'), + 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: 'File not provided'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + public function addEventImage(LaravelRequest $request, $summit_id, $event_id) { return $this->processRequest(function() use($request, $summit_id, $event_id){ @@ -1440,6 +2334,28 @@ public function addEventImage(LaravelRequest $request, $summit_id, $event_id) }); } + #[OA\Delete( + path: '/api/v1/summits/{id}/events/{event_id}/image', + operationId: 'deleteEventImage', + summary: 'Delete an event image', + description: 'Removes the image from a specific event.', + security: [['summit_events_api_oauth2' => [SummitScopes::WriteEventData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators, IGroup::SummitRegistrationAdmins]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: Response::HTTP_NO_CONTENT, description: 'Image deleted successfully'), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + public function deleteEventImage($summit_id, $event_id) { return $this->processRequest(function() use($summit_id, $event_id){ @@ -1450,6 +2366,41 @@ public function deleteEventImage($summit_id, $event_id) }); } + #[OA\Post( + path: '/api/v1/summits/{id}/events/csv', + operationId: 'importEventData', + summary: 'Import events from CSV', + description: 'Imports event data from a CSV file.', + security: [['summit_events_api_oauth2' => [SummitScopes::WriteSummitData, SummitScopes::WriteEventData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\MediaType( + mediaType: 'multipart/form-data', + schema: new OA\Schema( + required: ['file', 'send_speaker_email'], + properties: [ + new OA\Property(property: 'file', type: 'string', format: 'binary', description: 'CSV file to import'), + new OA\Property(property: 'send_speaker_email', type: 'boolean', description: 'Whether to send email notifications to speakers') + ] + ) + ) + ), + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Events imported successfully'), + 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'), + ] + )] + /** * @param LaravelRequest $request * @param $summit_id @@ -1491,6 +2442,32 @@ public function importEventData(LaravelRequest $request, $summit_id) }); } + #[OA\Put( + path: '/api/v1/summits/{id}/events/{event_id}/live-info', + operationId: 'updateEventLiveInfo', + summary: 'Update event live streaming info', + description: 'Updates the live streaming URL and type for an event.', + security: [['summit_events_api_oauth2' => [SummitScopes::WriteEventData]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: '#/components/schemas/UpdateEventLiveInfoRequest') + ), + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Live info updated successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEvent')), + 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'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -1543,6 +2520,28 @@ public function updateEventLiveInfo($summit_id, $event_id) }); } + #[OA\Get( + path: '/api/v1/summits/{id}/events/{event_id}/published/tokens', + operationId: 'getScheduledEventJWT', + summary: 'Get JWT tokens for secure streaming', + description: 'Retrieves JWT tokens for accessing secure streaming content for a published event.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'JWT tokens retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEventSecureStreamResponse')), + 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_NOT_FOUND, description: 'Not Found'), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: 'Event not configured for secure streaming'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -1584,6 +2583,29 @@ public function getScheduledEventJWT($summit_id, $event_id) }); } + #[OA\Put( + path: '/api/v1/summits/{id}/events/{event_id}/type/{type_id}/upgrade', + operationId: 'upgradeEvent', + summary: 'Upgrade an event to a different type', + description: 'Changes the type of an existing event (e.g., from SummitEvent to Presentation).', + security: [['summit_events_api_oauth2' => [SummitScopes::WriteEventData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'type_id', in: 'path', required: true, description: 'New Event Type ID', schema: new OA\Schema(type: 'integer')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Event upgraded successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEvent')), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -1617,6 +2639,25 @@ public function upgradeEvent($summit_id, $event_id, $type_id) }); } + #[OA\Get( + path: '/api/public/v1/summits/all/{id}/events/all/published/overflow', + operationId: 'getOverflowStreamingInfo', + summary: 'Get overflow streaming information (Public)', + description: 'Retrieves overflow streaming information for published events. This is a public endpoint.', + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'k', in: 'query', required: true, description: 'Overflow stream key', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Overflow info retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEventOverflowStreamResponse')), + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: 'Missing overflow query string key'), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: 'Not Found'), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: 'Event has no overflow set'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @return \Illuminate\Http\JsonResponse|mixed @@ -1631,7 +2672,7 @@ public function getOverflowStreamingInfo($summit_id) return $this->withReplica(function() use ($summit_id, $query_string_key) { $summit = SummitFinderStrategyFactory::build($this->repository, $this->resource_server_context)->find($summit_id); if (is_null($summit)) - return $this->error404("Summit not found."); + return $this->error404("Not Found."); $overflow_stream_key = Request::get($query_string_key); @@ -1669,6 +2710,33 @@ public function getOverflowStreamingInfo($summit_id) }); } + #[OA\Put( + path: '/api/v1/summits/{id}/events/{event_id}/overflow', + operationId: 'setOverflow', + summary: 'Set overflow streaming for an event', + description: 'Configures overflow streaming settings for a specific event.', + security: [['summit_events_api_oauth2' => [SummitScopes::WriteEventData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: '#/components/schemas/SetOverflowRequest') + ), + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Overflow set successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEvent')), + 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'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -1704,6 +2772,32 @@ public function setOverflow($summit_id, $event_id) { ); }); } + #[OA\Delete( + path: '/api/v1/summits/{id}/events/{event_id}/overflow', + operationId: 'clearOverflow', + summary: 'Clear overflow streaming for an event', + description: 'Removes overflow streaming settings from a specific event.', + security: [['summit_events_api_oauth2' => [SummitScopes::WriteEventData]]], + x: ['required-groups' => [IGroup::SuperAdmins, IGroup::Administrators, IGroup::SummitAdministrators]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + ], + requestBody: new OA\RequestBody( + required: false, + content: new OA\JsonContent(ref: '#/components/schemas/ClearOverflowRequest') + ), + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Overflow cleared successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEvent')), + 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + public function clearOverflow($summit_id, $event_id) { return $this->processRequest(function() use($summit_id, $event_id){ @@ -1731,6 +2825,27 @@ public function clearOverflow($summit_id, $event_id) }); } + #[OA\Get( + path: '/api/v1/summits/{id}/events/{event_id}/published/streaming-info', + operationId: 'getScheduledEventStreamingInfo', + summary: 'Get streaming information for a published event', + description: 'Retrieves streaming information for a specific published event.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + tags: ['Summit Events'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Streaming info retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEventStreamingInfoResponse')), + 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_NOT_FOUND, description: 'Not Found'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @param $event_id diff --git a/app/Swagger/Models/SummitScheduleEmptySpotSchema.php b/app/Swagger/Models/SummitScheduleEmptySpotSchema.php new file mode 100644 index 000000000..2e03e1c0f --- /dev/null +++ b/app/Swagger/Models/SummitScheduleEmptySpotSchema.php @@ -0,0 +1,20 @@ + 'Read Summit Data', + SummitScopes::ReadAllSummitData => 'Read All Summit Data', + SummitScopes::WriteSummitData => 'Write Summit Data', + SummitScopes::WriteEventData => 'Write Event Data', + SummitScopes::PublishEventData => 'Publish Event Data', + SummitScopes::AddMyEventFeedback => 'Add My Event Feedback', + SummitScopes::DeleteMyEventFeedback => 'Delete My Event Feedback', + SummitScopes::SendMyScheduleMail => 'Send My Schedule Mail', + SummitScopes::MeRead => 'Me Read', + MemberScopes::ReadMyMemberData => 'Read My Member Data', + ], + ), + ], + ) +] +class SummitEventsAuthSchema {} From ec454f32803247f01660160662149f36e68e8c2c Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 5 Jan 2026 20:29:49 +0000 Subject: [PATCH 10/17] chore: fix incorrect HTTP code responses Signed-off-by: Matias Perrone --- .../Summit/OAuth2SummitEventsApiController.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php index c2d65c7be..0adbddd67 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php @@ -1169,7 +1169,7 @@ public function updateEvent($summit_id, $event_id) content: new OA\JsonContent(ref: '#/components/schemas/PublishSummitEventRequest') ), responses: [ - new OA\Response(response: Response::HTTP_OK, description: 'Event published successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEvent')), + new OA\Response(response: Response::HTTP_CREATED, description: 'Event published successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEvent')), 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'), @@ -1672,7 +1672,7 @@ private function _addMyEventFeedback($summit_id, $event_id, $returnId = false) content: new OA\JsonContent(ref: '#/components/schemas/AddEventFeedbackRequest') ), responses: [ - new OA\Response(response: Response::HTTP_OK, description: 'Feedback updated successfully', content: new OA\JsonContent(type: 'integer', description: 'Feedback ID')), + new OA\Response(response: Response::HTTP_CREATED, description: 'Feedback updated successfully', content: new OA\JsonContent(type: 'integer', description: 'Feedback ID')), 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'), @@ -1709,7 +1709,7 @@ public function updateMyEventFeedbackReturnId($summit_id, $event_id) content: new OA\JsonContent(ref: '#/components/schemas/AddEventFeedbackRequest') ), responses: [ - new OA\Response(response: Response::HTTP_OK, description: 'Feedback updated successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEventFeedback')), + new OA\Response(response: Response::HTTP_CREATED, description: 'Feedback updated successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEventFeedback')), 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'), @@ -2133,7 +2133,7 @@ public function unPublishEvents($summit_id) content: new OA\JsonContent(ref: '#/components/schemas/UpdateAndPublishEventsRequest') ), responses: [ - new OA\Response(response: Response::HTTP_OK, description: 'Events updated and published successfully'), + new OA\Response(response: Response::HTTP_CREATED, description: 'Events updated and published successfully'), 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'), @@ -2195,7 +2195,7 @@ public function updateAndPublishEvents($summit_id) content: new OA\JsonContent(ref: '#/components/schemas/UpdateEventsRequest') ), responses: [ - new OA\Response(response: Response::HTTP_OK, description: 'Events updated successfully'), + new OA\Response(response: Response::HTTP_CREATED, description: 'Events updated successfully'), 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'), @@ -2835,14 +2835,9 @@ public function clearOverflow($summit_id, $event_id) parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), - new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), ], responses: [ - new OA\Response(response: Response::HTTP_OK, description: 'Streaming info retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEventStreamingInfoResponse')), - 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_NOT_FOUND, description: 'Not Found'), - new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), ] )] From c0b7f0f1a4b8d8599da17047e9b4dd54a3de6da6 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 5 Jan 2026 20:58:48 +0000 Subject: [PATCH 11/17] feat: Add missing public shared enpoints Signed-off-by: Matias Perrone --- .../OAuth2SummitEventsApiController.php | 90 +++++++++---------- 1 file changed, 44 insertions(+), 46 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php index 0adbddd67..229e34c6d 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php @@ -292,6 +292,28 @@ public function getEventsCSV($summit_id) ] )] + #[OA\Get( + path: '/api/public/v1/summits/{id}/events/published', + operationId: 'getScheduledEvents', + summary: 'Get all published/scheduled events for a summit', + description: 'Retrieves a paginated list of all published events for a specific summit.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + tags: ['Summit Events (Public)'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'page', in: 'query', required: false, description: 'Page number', schema: new OA\Schema(type: 'integer', default: 1)), + new OA\Parameter(name: 'per_page', in: 'query', required: false, description: 'Items per page', schema: new OA\Schema(type: 'integer', default: 10, maximum: 100)), + new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter expressions', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), + new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by field(s)', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Published events retrieved', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitEventsResponse')), + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: 'Bad Request'), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: 'Not Found'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] /** * @param $summit_id * @return mixed @@ -332,7 +354,7 @@ public function getScheduledEvents($summit_id) use ParametrizedGetAll; #[OA\Get( - path: '/api/public/v1/summits/all/{id}/events/all/published/tags', + path: '/api/public/v1/summits/{id}/events/all/published/tags', operationId: 'getScheduledEventsTags', summary: 'Get all tags from published events for a summit (Public)', description: 'Retrieves a paginated list of tags used in published events for a specific summit. This is a public endpoint.', @@ -401,28 +423,6 @@ function ($page, $per_page, $filter, $order, $applyExtraFilters) { ); } - #[OA\Get( - path: '/api/v1/summits/events', - operationId: 'getAllEvents', - summary: 'Get all events across all summits', - description: 'Retrieves a paginated list of all events across all summits.', - security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], - tags: ['Summit Events'], - parameters: [ - new OA\Parameter(name: 'page', in: 'query', required: false, description: 'Page number', schema: new OA\Schema(type: 'integer', default: 1)), - new OA\Parameter(name: 'per_page', in: 'query', required: false, description: 'Items per page', schema: new OA\Schema(type: 'integer', default: 10, maximum: 100)), - new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter expressions', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), - new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by field(s)', schema: new OA\Schema(type: 'string')), - new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), - ], - responses: [ - new OA\Response(response: Response::HTTP_OK, description: 'Events retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitEventsResponse')), - 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), - ] - )] - /** * @return \Illuminate\Http\JsonResponse|mixed */ @@ -777,28 +777,6 @@ public function getVoteablePresentation($summit_id, $presentation_id) }); } - #[OA\Get( - path: '/api/v1/summits/events/published', - operationId: 'getAllScheduledEvents', - summary: 'Get all published events across all summits', - description: 'Retrieves a paginated list of all published/scheduled events across all summits.', - security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], - tags: ['Summit Events'], - parameters: [ - new OA\Parameter(name: 'page', in: 'query', required: false, description: 'Page number', schema: new OA\Schema(type: 'integer', default: 1)), - new OA\Parameter(name: 'per_page', in: 'query', required: false, description: 'Items per page', schema: new OA\Schema(type: 'integer', default: 10, maximum: 100)), - new OA\Parameter(name: 'filter[]', in: 'query', required: false, description: 'Filter expressions', style: 'form', explode: true, schema: new OA\Schema(type: 'array', items: new OA\Items(type: 'string'))), - new OA\Parameter(name: 'order', in: 'query', required: false, description: 'Order by field(s)', schema: new OA\Schema(type: 'string')), - new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), - ], - responses: [ - new OA\Response(response: Response::HTTP_OK, description: 'Published events retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitEventsResponse')), - 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_INTERNAL_SERVER_ERROR, description: 'Server Error'), - ] - )] - /** * @return mixed */ @@ -904,6 +882,26 @@ public function getEvent($summit_id, $event_id) ] )] + #[OA\Get( + path: '/api/v1/summits/{id}/events/{event_id}/published', + operationId: 'getScheduledEvent', + summary: 'Get a specific published/scheduled event by ID', + description: 'Retrieves a single published event by its ID for a specific summit.', + security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], + tags: ['Summit Events (Public)'], + parameters: [ + new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), + new OA\Parameter(name: 'event_id', in: 'path', required: true, description: 'Event ID', schema: new OA\Schema(type: 'integer')), + new OA\Parameter(name: 'expand', in: 'query', required: false, description: 'Expand relationships', schema: new OA\Schema(type: 'string')), + ], + responses: [ + new OA\Response(response: Response::HTTP_OK, description: 'Published event retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/SummitEvent')), + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: 'Bad Request'), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: 'Not Found'), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), + ] + )] + /** * @param $summit_id * @param $event_id @@ -2640,7 +2638,7 @@ public function upgradeEvent($summit_id, $event_id, $type_id) } #[OA\Get( - path: '/api/public/v1/summits/all/{id}/events/all/published/overflow', + path: '/api/public/v1/summits/{id}/events/all/published/overflow', operationId: 'getOverflowStreamingInfo', summary: 'Get overflow streaming information (Public)', description: 'Retrieves overflow streaming information for published events. This is a public endpoint.', From 40f75f35bc909558b88ffde9ad66e7a2c84a7352 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 5 Jan 2026 21:01:32 +0000 Subject: [PATCH 12/17] chore: add (Public) in all public endpoints Signed-off-by: Matias Perrone --- .../Apis/Protected/Summit/OAuth2SummitEventsApiController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php index 229e34c6d..3d4e24e6d 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php @@ -883,7 +883,7 @@ public function getEvent($summit_id, $event_id) )] #[OA\Get( - path: '/api/v1/summits/{id}/events/{event_id}/published', + path: '/api/v1/public/summits/{id}/events/{event_id}/published', operationId: 'getScheduledEvent', summary: 'Get a specific published/scheduled event by ID', description: 'Retrieves a single published event by its ID for a specific summit.', @@ -2642,7 +2642,7 @@ public function upgradeEvent($summit_id, $event_id, $type_id) operationId: 'getOverflowStreamingInfo', summary: 'Get overflow streaming information (Public)', description: 'Retrieves overflow streaming information for published events. This is a public endpoint.', - tags: ['Summit Events'], + tags: ['Summit Events (Public)'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), new OA\Parameter(name: 'k', in: 'query', required: true, description: 'Overflow stream key', schema: new OA\Schema(type: 'string')), From 197151f74a2528d9f2721f37899da0a896a0ac6c Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 5 Jan 2026 21:04:37 +0000 Subject: [PATCH 13/17] chore: fix minor diffs with public endpoints Signed-off-by: Matias Perrone --- .../Protected/Summit/OAuth2SummitEventsApiController.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php index 3d4e24e6d..a89e9ccc2 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php @@ -297,7 +297,6 @@ public function getEventsCSV($summit_id) operationId: 'getScheduledEvents', summary: 'Get all published/scheduled events for a summit', description: 'Retrieves a paginated list of all published events for a specific summit.', - security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], tags: ['Summit Events (Public)'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), @@ -356,9 +355,9 @@ public function getScheduledEvents($summit_id) #[OA\Get( path: '/api/public/v1/summits/{id}/events/all/published/tags', operationId: 'getScheduledEventsTags', - summary: 'Get all tags from published events for a summit (Public)', + summary: 'Get all tags from published events for a summit', description: 'Retrieves a paginated list of tags used in published events for a specific summit. This is a public endpoint.', - tags: ['Summit Events'], + tags: ['Summit Events (Public)'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), new OA\Parameter(name: 'page', in: 'query', required: false, description: 'Page number', schema: new OA\Schema(type: 'integer', default: 1)), @@ -370,7 +369,6 @@ public function getScheduledEvents($summit_id) responses: [ new OA\Response(response: Response::HTTP_OK, description: 'Tags retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedTagsResponse')), 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_NOT_FOUND, description: 'Not Found'), new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: 'Server Error'), ] @@ -883,11 +881,10 @@ public function getEvent($summit_id, $event_id) )] #[OA\Get( - path: '/api/v1/public/summits/{id}/events/{event_id}/published', + path: '/api/public/v1/summits/{id}/events/{event_id}/published', operationId: 'getScheduledEvent', summary: 'Get a specific published/scheduled event by ID', description: 'Retrieves a single published event by its ID for a specific summit.', - security: [['summit_events_api_oauth2' => [SummitScopes::ReadSummitData, SummitScopes::ReadAllSummitData]]], tags: ['Summit Events (Public)'], parameters: [ new OA\Parameter(name: 'id', in: 'path', required: true, description: 'Summit ID or slug', schema: new OA\Schema(type: 'string')), From 7f0d42aafce20891dc415f5d312ed2ca062beb2a Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 6 Jan 2026 19:38:29 +0000 Subject: [PATCH 14/17] fix: typo in schemas description Signed-off-by: Matias Perrone --- app/Swagger/OAuth2SummitEventsApiControllerSchemas.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Swagger/OAuth2SummitEventsApiControllerSchemas.php b/app/Swagger/OAuth2SummitEventsApiControllerSchemas.php index 5ac736aca..b2a02324b 100644 --- a/app/Swagger/OAuth2SummitEventsApiControllerSchemas.php +++ b/app/Swagger/OAuth2SummitEventsApiControllerSchemas.php @@ -81,7 +81,7 @@ class PaginatedTagsResponseSchema {} new OA\Property(property: 'description', type: 'string', description: 'Event description'), new OA\Property(property: 'social_description', type: 'string', description: 'Social media summary, the "social_summary" field'), new OA\Property(property: 'level', type: 'string', enum: ['Beginner', 'Intermediate', 'Advanced', 'N/A'], description: 'Experience level'), - new OA\Property(property: 'rsvp_link', type: 'string', description: 'RSVP external link, only if rsvp_template_id is not se'), + new OA\Property(property: 'rsvp_link', type: 'string', description: 'RSVP external link, only if rsvp_template_id is not set'), new OA\Property(property: 'rsvp_template_id', type: 'integer', description: 'RSVP template ID, only if rsvp_link is not set'), new OA\Property(property: 'streaming_url', type: 'string', description: 'Streaming URL'), new OA\Property(property: 'stream_is_secure', type: 'boolean'), @@ -130,7 +130,7 @@ class AddSummitEventRequestSchema {} new OA\Property(property: 'description', type: 'string', description: 'Event description'), new OA\Property(property: 'social_description', type: 'string', description: 'Social media summary, the "social_summary" field'), new OA\Property(property: 'level', type: 'string', enum: ['Beginner', 'Intermediate', 'Advanced', 'N/A'], description: 'Experience level'), - new OA\Property(property: 'rsvp_link', type: 'string', description: 'RSVP external link, only if rsvp_template_id is not se'), + new OA\Property(property: 'rsvp_link', type: 'string', description: 'RSVP external link, only if rsvp_template_id is not set'), new OA\Property(property: 'rsvp_template_id', type: 'integer', description: 'RSVP template ID, only if rsvp_link is not set'), new OA\Property(property: 'streaming_url', type: 'string', description: 'Streaming URL'), new OA\Property(property: 'stream_is_secure', type: 'boolean'), From 8d52d58d72efbc0c24475dfd15300a6a0335125c Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 6 Jan 2026 19:39:22 +0000 Subject: [PATCH 15/17] chore: change operationId name Signed-off-by: Matias Perrone --- .../Apis/Protected/Summit/OAuth2SummitEventsApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php index a89e9ccc2..bf72da77d 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php @@ -294,7 +294,7 @@ public function getEventsCSV($summit_id) #[OA\Get( path: '/api/public/v1/summits/{id}/events/published', - operationId: 'getScheduledEvents', + operationId: 'getScheduledEventsPublic', summary: 'Get all published/scheduled events for a summit', description: 'Retrieves a paginated list of all published events for a specific summit.', tags: ['Summit Events (Public)'], From 1cd712786c65ed38b9f8e74b6b614e341bfd53e2 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 6 Jan 2026 19:47:15 +0000 Subject: [PATCH 16/17] chore: change operationId name Signed-off-by: Matias Perrone --- .../Apis/Protected/Summit/OAuth2SummitEventsApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php index bf72da77d..b386bde85 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitEventsApiController.php @@ -882,7 +882,7 @@ public function getEvent($summit_id, $event_id) #[OA\Get( path: '/api/public/v1/summits/{id}/events/{event_id}/published', - operationId: 'getScheduledEvent', + operationId: 'getScheduledEventPublic', summary: 'Get a specific published/scheduled event by ID', description: 'Retrieves a single published event by its ID for a specific summit.', tags: ['Summit Events (Public)'], From 4ef85fabeae7a5c9769c466b0348593a7a59b16b Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Thu, 8 Jan 2026 19:26:48 +0000 Subject: [PATCH 17/17] fix: Remove repeated PaginatedTagsResponseSchema class Signed-off-by: Matias Perrone --- ...OAuth2SummitEventsApiControllerSchemas.php | 94 +++++++++++-------- 1 file changed, 54 insertions(+), 40 deletions(-) diff --git a/app/Swagger/OAuth2SummitEventsApiControllerSchemas.php b/app/Swagger/OAuth2SummitEventsApiControllerSchemas.php index b2a02324b..51c3ccdfb 100644 --- a/app/Swagger/OAuth2SummitEventsApiControllerSchemas.php +++ b/app/Swagger/OAuth2SummitEventsApiControllerSchemas.php @@ -24,7 +24,9 @@ ) ] )] -class PaginatedSummitEventsResponseSchema {} +class PaginatedSummitEventsResponseSchema +{ +} /** * Paginated Summit Event Feedback Response Schema @@ -46,29 +48,9 @@ class PaginatedSummitEventsResponseSchema {} ) ] )] -class PaginatedSummitEventFeedbackResponseSchema {} - -/** - * Paginated Tags Response Schema - */ -#[OA\Schema( - schema: 'PaginatedTagsResponse', - type: 'object', - allOf: [ - new OA\Schema(ref: '#/components/schemas/PaginateDataSchemaResponse'), - new OA\Schema( - type: 'object', - properties: [ - new OA\Property( - property: 'data', - type: 'array', - items: new OA\Items(ref: "#/components/schemas/Tag") - ) - ] - ) - ] -)] -class PaginatedTagsResponseSchema {} +class PaginatedSummitEventFeedbackResponseSchema +{ +} /** * Add Event Request Schema @@ -117,7 +99,9 @@ class PaginatedTagsResponseSchema {} ), ] )] -class AddSummitEventRequestSchema {} +class AddSummitEventRequestSchema +{ +} /** * Update Event Request Schema @@ -166,7 +150,9 @@ class AddSummitEventRequestSchema {} ), ] )] -class UpdateSummitEventRequestSchema {} +class UpdateSummitEventRequestSchema +{ +} /** * Publish Event Request Schema @@ -181,7 +167,9 @@ class UpdateSummitEventRequestSchema {} new OA\Property(property: 'duration', type: 'integer', minimum: 0, description: 'Duration in seconds'), ] )] -class PublishSummitEventRequestSchema {} +class PublishSummitEventRequestSchema +{ +} /** * Unpublish Events Request Schema @@ -199,7 +187,9 @@ class PublishSummitEventRequestSchema {} ), ] )] -class UnpublishEventsRequestSchema {} +class UnpublishEventsRequestSchema +{ +} /** * Update and Publish Events Request Schema @@ -226,7 +216,9 @@ class UnpublishEventsRequestSchema {} ), ] )] -class UpdateAndPublishEventsRequestSchema {} +class UpdateAndPublishEventsRequestSchema +{ +} /** * Update Events Request Schema @@ -255,7 +247,9 @@ class UpdateAndPublishEventsRequestSchema {} ), ] )] -class UpdateEventsRequestSchema {} +class UpdateEventsRequestSchema +{ +} /** * Add Event Feedback Request Schema @@ -269,7 +263,9 @@ class UpdateEventsRequestSchema {} new OA\Property(property: 'note', type: 'string', maxLength: 500, description: 'Optional feedback note'), ] )] -class AddEventFeedbackRequestSchema {} +class AddEventFeedbackRequestSchema +{ +} /** * Share Event By Email Request Schema @@ -284,7 +280,9 @@ class AddEventFeedbackRequestSchema {} new OA\Property(property: 'event_uri', type: 'string', format: 'uri', description: 'Event URI'), ] )] -class ShareEventByEmailRequestSchema {} +class ShareEventByEmailRequestSchema +{ +} /** * Update Event Live Info Request Schema @@ -298,7 +296,9 @@ class ShareEventByEmailRequestSchema {} new OA\Property(property: 'streaming_type', type: 'string', enum: ['VOD', 'LIVE'], description: 'Streaming type'), ] )] -class UpdateEventLiveInfoRequestSchema {} +class UpdateEventLiveInfoRequestSchema +{ +} /** * Set Overflow Request Schema @@ -310,7 +310,9 @@ class UpdateEventLiveInfoRequestSchema {} new OA\Property(property: 'overflow_streaming_url', type: 'string', format: 'uri', description: 'Overflow streaming URL'), ] )] -class SetOverflowRequestSchema {} +class SetOverflowRequestSchema +{ +} /** * Clear Overflow Request Schema @@ -320,7 +322,9 @@ class SetOverflowRequestSchema {} type: 'object', properties: [] )] -class ClearOverflowRequestSchema {} +class ClearOverflowRequestSchema +{ +} /** * Import Events CSV Request Schema @@ -334,7 +338,9 @@ class ClearOverflowRequestSchema {} new OA\Property(property: 'send_speaker_email', type: 'boolean', description: 'Send email notifications to speakers'), ] )] -class ImportEventDataRequestSchema {} +class ImportEventDataRequestSchema +{ +} /** * Paginated Summit Schedule Empty Spots Response Schema @@ -356,7 +362,9 @@ class ImportEventDataRequestSchema {} ) ] )] -class PaginatedSummitScheduleEmptySpotsResponseSchema {} +class PaginatedSummitScheduleEmptySpotsResponseSchema +{ +} /** * Summit Event Secure Stream Response Schema @@ -371,7 +379,9 @@ class PaginatedSummitScheduleEmptySpotsResponseSchema {} new OA\Property(property: 'streaming_url', type: 'string', description: 'Streaming URL'), ] )] -class SummitEventSecureStreamResponseSchema {} +class SummitEventSecureStreamResponseSchema +{ +} /** * Summit Event Overflow Stream Response Schema @@ -385,7 +395,9 @@ class SummitEventSecureStreamResponseSchema {} new OA\Property(property: 'overflow_streaming_url', type: 'string', description: 'Overflow streaming URL'), ] )] -class SummitEventOverflowStreamResponseSchema {} +class SummitEventOverflowStreamResponseSchema +{ +} /** * Summit Event Streaming Info Response Schema @@ -400,4 +412,6 @@ class SummitEventOverflowStreamResponseSchema {} new OA\Property(property: 'streaming_type', type: 'string', enum: ['VOD', 'LIVE'], description: 'Streaming type'), ] )] -class SummitEventStreamingInfoResponseSchema {} +class SummitEventStreamingInfoResponseSchema +{ +} \ No newline at end of file