From e024533df4bcb36098080825e4665408b47e5b12 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Fri, 2 Jan 2026 21:40:25 +0000 Subject: [PATCH 1/9] feat: Extend Swagger Coverage for controller `OAuth2SummitEventsApiController` Signed-off-by: Matias Perrone --- .../OAuth2SummitEventsApiController.php | 1117 ++++++++++++++++- .../Models/SummitEventFeedbackSchema.php | 24 + .../Models/SummitScheduleEmptySpotSchema.php | 20 + ...OAuth2SummitEventsApiControllerSchemas.php | 403 ++++++ .../Security/SummitEventsAuthSchema.php | 34 + 5 files changed, 1597 insertions(+), 1 deletion(-) create mode 100644 app/Swagger/Models/SummitEventFeedbackSchema.php 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/SummitEventFeedbackSchema.php b/app/Swagger/Models/SummitEventFeedbackSchema.php new file mode 100644 index 000000000..1c3354b23 --- /dev/null +++ b/app/Swagger/Models/SummitEventFeedbackSchema.php @@ -0,0 +1,24 @@ + '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 b132a2e457e626b16a95641392c9919494d51761 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 5 Jan 2026 20:29:49 +0000 Subject: [PATCH 2/9] 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 13d2edb2ceea4b18ab5026431d9dc192ba9c6dae Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 5 Jan 2026 20:58:48 +0000 Subject: [PATCH 3/9] 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 8aebb53f203ed3c8a57ba64b1b90322015e17ad7 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 5 Jan 2026 21:01:32 +0000 Subject: [PATCH 4/9] 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 20903867dd619810e6a5d66facd9f273e7c68b74 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 5 Jan 2026 21:04:37 +0000 Subject: [PATCH 5/9] 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 c2b7280d74f001472892398c5364cb3d02ab3924 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 6 Jan 2026 19:38:29 +0000 Subject: [PATCH 6/9] 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 9b7a857efc8a0ab153286d7df2010e03757c79e4 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 6 Jan 2026 19:39:22 +0000 Subject: [PATCH 7/9] 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 b0bdbf033bc16b4f467d60aa8b7a43755e820dfc Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 6 Jan 2026 19:47:15 +0000 Subject: [PATCH 8/9] 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 b26d9ce4120d58ecab3db3aff8ff1e1c4a05a1b2 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Thu, 8 Jan 2026 19:26:48 +0000 Subject: [PATCH 9/9] 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