diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php index 8b86470a2..0bcc52159 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php @@ -1,4 +1,7 @@ -service = $service; $this->summit_repository = $summit_repository; $this->repository = $repository; } + #[OA\Get( + path: "/api/v1/summits/{id}/media-upload-types", + operationId: "getAllMediaUploadTypes", + summary: "Get all media upload types for a summit", + description: "Returns a paginated list of media upload types configured for a specific summit. Allows ordering, filtering and pagination.", + security: [ + [ + "summit_media_upload_type_oauth2" => [ + SummitScopes::ReadAllSummitData, + ] + ] + ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], + tags: ["Summit Media Upload Types"], + parameters: [ + new OA\Parameter( + name: 'id', + in: 'path', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), + new OA\Parameter( + name: 'page', + in: 'query', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The page number' + ), + new OA\Parameter( + name: 'per_page', + in: 'query', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The number of items per page', + ), + new OA\Parameter( + name: "filter[]", + in: "query", + required: false, + description: "Filter media upload types. Available filters: name (=@, ==)", + schema: new OA\Schema(type: "array", items: new OA\Items(type: "string")), + explode: true + ), + new OA\Parameter( + name: "order", + in: "query", + required: false, + description: "Order by field. Valid fields: id, name", + schema: new OA\Schema(type: "string") + ), + new OA\Parameter( + name: "expand", + in: "query", + required: false, + description: "Expand related entities. Available expansions: type, summit, presentation_types", + schema: new OA\Schema(type: "string") + ), + new OA\Parameter( + name: "relations", + in: "query", + required: false, + description: "Load relations. Available: presentation_types", + schema: new OA\Schema(type: "string") + ), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "Success", + content: new OA\JsonContent(ref: "#/components/schemas/PaginatedSummitMediaUploadTypesResponse") + ), + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Summit not found"), + ] + )] + public function getAllBySummit($summit_id) + { + $this->summit_id = $summit_id; + $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($this->summit_id); + if (is_null($summit)) + return $this->error404(); + return $this->getAll(); + } + + #[OA\Get( + path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}", + operationId: "getMediaUploadType", + summary: "Get a specific media upload type", + description: "Returns detailed information about a specific media upload type", + security: [ + [ + "summit_media_upload_type_oauth2" => [ + SummitScopes::ReadAllSummitData, + ] + ] + ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], + tags: ["Summit Media Upload Types"], + parameters: [ + new OA\Parameter( + name: 'id', + in: 'path', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), + new OA\Parameter( + name: "media_upload_type_id", + in: "path", + required: true, + description: "Media upload type ID", + schema: new OA\Schema(type: "integer") + ), + new OA\Parameter( + name: "expand", + in: "query", + required: false, + description: "Expand related entities. Available expansions: type, summit, presentation_types", + schema: new OA\Schema(type: "string") + ), + new OA\Parameter( + name: "relations", + in: "query", + required: false, + description: "Load relations. Available: presentation_types", + schema: new OA\Schema(type: "string") + ), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "Success", + content: new OA\JsonContent(ref: "#/components/schemas/SummitMediaUploadType") + ), + 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"), + ] + )] + public function get($summit_id, $media_upload_type_id) + { + return $this->getById($summit_id, $media_upload_type_id); + } + + #[OA\Post( + path: "/api/v1/summits/{id}/media-upload-types", + operationId: "createMediaUploadType", + summary: "Create a new media upload type", + description: "Creates a new media upload type for the specified summit", + security: [ + [ + "summit_media_upload_type_oauth2" => [ + SummitScopes::WriteSummitData, + ] + ] + ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], + tags: ["Summit Media Upload Types"], + parameters: [ + new OA\Parameter( + name: 'id', + in: 'path', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: "#/components/schemas/SummitMediaUploadTypeCreateRequest") + ), + responses: [ + new OA\Response( + response: Response::HTTP_CREATED, + description: "Created", + content: new OA\JsonContent(ref: "#/components/schemas/SummitMediaUploadType") + ), + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Summit not found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + ] + )] + public function add($summit_id) + { + return $this->addChild($summit_id); + } + + #[OA\Put( + path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}", + operationId: "updateMediaUploadType", + summary: "Update a media upload type", + description: "Updates an existing media upload type", + security: [ + [ + "summit_media_upload_type_oauth2" => [ + SummitScopes::WriteSummitData, + ] + ] + ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], + tags: ["Summit Media Upload Types"], + parameters: [ + new OA\Parameter( + name: 'id', + in: 'path', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), + new OA\Parameter( + name: "media_upload_type_id", + in: "path", + required: true, + description: "Media upload type ID", + schema: new OA\Schema(type: "integer") + ), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: "#/components/schemas/SummitMediaUploadTypeUpdateRequest") + ), + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "Success", + content: new OA\JsonContent(ref: "#/components/schemas/SummitMediaUploadType") + ), + 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"), + ] + )] + public function update($summit_id, $media_upload_type_id) + { + return $this->updateChild($summit_id, $media_upload_type_id); + } + + #[OA\Delete( + path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}", + operationId: "deleteMediaUploadType", + summary: "Delete a media upload type", + description: "Deletes a media upload type from the summit", + security: [ + [ + "summit_media_upload_type_oauth2" => [ + SummitScopes::WriteSummitData, + ] + ] + ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], + tags: ["Summit Media Upload Types"], + parameters: [ + new OA\Parameter( + name: 'id', + in: 'path', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), + new OA\Parameter( + name: "media_upload_type_id", + in: "path", + required: true, + description: "Media upload type ID", + schema: new OA\Schema(type: "integer") + ), + ], + responses: [ + new OA\Response(response: Response::HTTP_NO_CONTENT, description: "Deleted successfully"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "not found"), + ] + )] + public function delete($summit_id, $media_upload_type_id) + { + return $this->deleteChild($summit_id, $media_upload_type_id); + } + /** * @return array */ - protected function getFilterRules():array + protected function getFilterRules(): array { return [ 'name' => ['=@', '=='], @@ -76,7 +399,8 @@ protected function getFilterRules():array /** * @return array */ - protected function getFilterValidatorRules():array{ + protected function getFilterValidatorRules(): array + { return [ 'name' => 'sometimes|required|string', ]; @@ -84,7 +408,8 @@ protected function getFilterValidatorRules():array{ /** * @return array */ - protected function getOrderRules():array{ + protected function getOrderRules(): array + { return [ 'id', 'name', @@ -99,10 +424,10 @@ protected function addChild(Summit $summit, array $payload): IEntity // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if(is_null($current_member)) + if (is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if(!$current_member->isSummitAllowed($summit)) + if (!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); return $this->service->add($summit, $payload); } @@ -131,10 +456,10 @@ protected function deleteChild(Summit $summit, $child_id): void // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if(is_null($current_member)) + if (is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if(!$current_member->isSummitAllowed($summit)) + if (!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); $this->service->delete($summit, $child_id); @@ -148,13 +473,13 @@ protected function getChildFromSummit(Summit $summit, $child_id): ?IEntity // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if(is_null($current_member)) + if (is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if(!$current_member->isSummitAllowed($summit)) + if (!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); - return $summit->getMediaUploadTypeById($child_id); + return $summit->getMediaUploadTypeById($child_id); } /** @@ -173,34 +498,84 @@ protected function updateChild(Summit $summit, int $child_id, array $payload): I // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if(is_null($current_member)) + if (is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if(!$current_member->isSummitAllowed($summit)) + if (!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); return $this->service->update($summit, $child_id, $payload); } - /** - * @param $summit_id - * @param $media_upload_type_id - * @param $presentation_type_id - * @return \Illuminate\Http\JsonResponse|mixed - */ - public function addToPresentationType($summit_id, $media_upload_type_id, $presentation_type_id){ - return $this->processRequest(function() use($summit_id, $media_upload_type_id, $presentation_type_id){ + #[OA\Put( + path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}/presentation-types/{event_type_id}", + operationId: "addMediaUploadTypeToPresentationType", + summary: "Add media upload type to presentation type", + description: "Associates a media upload type with a specific presentation type", + security: [ + [ + "summit_media_upload_type_oauth2" => [ + SummitScopes::WriteSummitData, + ] + ] + ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], + tags: ["Summit Media Upload Types"], + parameters: [ + new OA\Parameter( + name: 'id', + in: 'path', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), + new OA\Parameter( + name: "media_upload_type_id", + in: "path", + required: true, + description: "Media upload type ID", + schema: new OA\Schema(type: "integer") + ), + new OA\Parameter( + name: "event_type_id", + in: "path", + required: true, + description: "Presentation type ID", + schema: new OA\Schema(type: "integer") + ), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "Success - Returns the updated presentation type", + content: new OA\JsonContent(type: "object") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "not found"), + ] + )] + public function addToPresentationType($summit_id, $media_upload_type_id, $presentation_type_id) + { + return $this->processRequest(function () use ($summit_id, $media_upload_type_id, $presentation_type_id) { $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($summit_id); - if (is_null($summit)) return $this->error404(); + if (is_null($summit)) + return $this->error404(); - // authz - // check that we have a current member ( not service account ) - $current_member = $this->getResourceServerContext()->getCurrentUser(); - if(is_null($current_member)) - throw new HTTP401UnauthorizedException(); - // check summit access - if(!$current_member->isSummitAllowed($summit)) - throw new HTTP403ForbiddenException(); + // authz + // check that we have a current member ( not service account ) + $current_member = $this->getResourceServerContext()->getCurrentUser(); + if (is_null($current_member)) + throw new HTTP401UnauthorizedException(); + // check summit access + if (!$current_member->isSummitAllowed($summit)) + throw new HTTP403ForbiddenException(); $presentation_type = $this->service->addToPresentationType($summit, intval($media_upload_type_id), intval($presentation_type_id)); @@ -211,24 +586,74 @@ public function addToPresentationType($summit_id, $media_upload_type_id, $presen }); } - /** - * @param $summit_id - * @param $media_upload_type_id - * @param $presentation_type_id - * @return \Illuminate\Http\JsonResponse|mixed - */ - public function deleteFromPresentationType($summit_id, $media_upload_type_id, $presentation_type_id){ - return $this->processRequest(function() use($summit_id, $media_upload_type_id, $presentation_type_id){ + #[OA\Delete( + path: "/api/v1/summits/{id}/media-upload-types/{media_upload_type_id}/presentation-types/{event_type_id}", + operationId: "removeMediaUploadTypeFromPresentationType", + summary: "Remove media upload type from presentation type", + description: "Removes the association between a media upload type and a presentation type", + security: [ + [ + "summit_media_upload_type_oauth2" => [ + SummitScopes::WriteSummitData, + ] + ] + ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], + tags: ["Summit Media Upload Types"], + parameters: [ + new OA\Parameter( + name: 'id', + in: 'path', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), + new OA\Parameter( + name: "media_upload_type_id", + in: "path", + required: true, + description: "Media upload type ID", + schema: new OA\Schema(type: "integer") + ), + new OA\Parameter( + name: "event_type_id", + in: "path", + required: true, + description: "Presentation type ID", + schema: new OA\Schema(type: "integer") + ), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "Success - Returns the updated presentation type", + content: new OA\JsonContent(type: "object") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "not found"), + ] + )] + public function deleteFromPresentationType($summit_id, $media_upload_type_id, $presentation_type_id) + { + return $this->processRequest(function () use ($summit_id, $media_upload_type_id, $presentation_type_id) { $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($summit_id); - if (is_null($summit)) return $this->error404(); + if (is_null($summit)) + return $this->error404(); // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if(is_null($current_member)) + if (is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if(!$current_member->isSummitAllowed($summit)) + if (!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); $presentation_type = $this->service->deleteFromPresentationType($summit, intval($media_upload_type_id), intval($presentation_type_id)); @@ -239,30 +664,75 @@ public function deleteFromPresentationType($summit_id, $media_upload_type_id, $p }); } - /** - * @param $summit_id - * @param $to_summit_id - * @return \Illuminate\Http\JsonResponse|mixed - */ - public function cloneMediaUploadTypes($summit_id, $to_summit_id){ - return $this->processRequest(function() use($summit_id, $to_summit_id){ + #[OA\Post( + path: "/api/v1/summits/{id}/media-upload-types/all/clone/{to_summit_id}", + operationId: "cloneMediaUploadTypes", + summary: "Clone media upload types to another summit", + description: "Clones all media upload types from one summit to another summit", + security: [ + [ + "summit_media_upload_type_oauth2" => [ + SummitScopes::WriteSummitData, + ] + ] + ], + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + ] + ], + tags: ["Summit Media Upload Types"], + parameters: [ + new OA\Parameter( + name: 'id', + in: 'path', + required: false, + schema: new OA\Schema(type: 'integer'), + description: 'The summit ID' + ), + new OA\Parameter( + name: "to_summit_id", + in: "path", + required: true, + description: "Target summit ID to clone media upload types to", + schema: new OA\Schema(type: "integer") + ), + ], + responses: [ + new OA\Response( + response: Response::HTTP_CREATED, + description: "Success - Returns the target summit with cloned media upload types", + content: new OA\JsonContent(type: "object") + ), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Source or target summit not found"), + ] + )] + public function cloneMediaUploadTypes($summit_id, $to_summit_id) + { + return $this->processRequest(function () use ($summit_id, $to_summit_id) { $summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($summit_id); - if (is_null($summit)) return $this->error404(); + if (is_null($summit)) + return $this->error404(); $to_summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($to_summit_id); - if (is_null($to_summit)) return $this->error404(); + if (is_null($to_summit)) + return $this->error404(); // authz // check that we have a current member ( not service account ) $current_member = $this->getResourceServerContext()->getCurrentUser(); - if(is_null($current_member)) + if (is_null($current_member)) throw new HTTP401UnauthorizedException(); // check summit access - if(!$current_member->isSummitAllowed($summit)) + if (!$current_member->isSummitAllowed($summit)) throw new HTTP403ForbiddenException(); // check summit access - if(!$current_member->isSummitAllowed($to_summit)) + if (!$current_member->isSummitAllowed($to_summit)) throw new HTTP403ForbiddenException(); $to_summit = $this->service->cloneMediaUploadTypes($summit, $to_summit); @@ -276,4 +746,4 @@ public function cloneMediaUploadTypes($summit_id, $to_summit_id){ }); } -} \ No newline at end of file +} diff --git a/app/Swagger/Models/SummitMediaFileTypeSchema.php b/app/Swagger/Models/SummitMediaFileTypeSchema.php new file mode 100644 index 000000000..8e230a9e0 --- /dev/null +++ b/app/Swagger/Models/SummitMediaFileTypeSchema.php @@ -0,0 +1,26 @@ + 'Read All Summit Data', + SummitScopes::WriteSummitData => 'Write Summit Data', + ], + ), + ], +) +] +class SummitMediaUploadTypeOAuth2Scheme +{ +} diff --git a/app/Swagger/SummitSchemas.php b/app/Swagger/SummitSchemas.php index 5f83d1c19..184f43c6f 100644 --- a/app/Swagger/SummitSchemas.php +++ b/app/Swagger/SummitSchemas.php @@ -341,25 +341,92 @@ class SummitAttendeeBadgeSchema )] class PaginatedSummitAttendeeBadgesResponseSchema {} +// Summit Media Upload Type Schemas + + #[OA\Schema( - schema: 'SummitMediaFileType', - type: 'object', + schema: "PaginatedSummitMediaUploadTypesResponse", + description: "Paginated response for Summit Media Upload Types", properties: [ - new OA\Property(property: 'id', type: 'integer', example: 1), - new OA\Property(property: 'created', type: 'integer', format: 'int64', example: 1633024800), - new OA\Property(property: 'last_edited', type: 'integer', format: 'int64', example: 1633024800), - new OA\Property(property: 'name', type: 'string', example: 'Presentation'), - new OA\Property(property: 'description', type: 'string', example: 'Presentation files for events'), - new OA\Property(property: 'is_system_defined', type: 'boolean', example: false), + new OA\Property(property: "total", type: "integer", example: 100), + new OA\Property(property: "per_page", type: "integer", example: 15), + new OA\Property(property: "current_page", type: "integer", example: 1), + new OA\Property(property: "last_page", type: "integer", example: 7), new OA\Property( - property: 'allowed_extensions', - type: 'array', - items: new OA\Items(type: 'string'), - example: ['pdf', 'ppt', 'pptx'] + property: "data", + type: "array", + items: new OA\Items(ref: "#/components/schemas/SummitMediaUploadType") ), - ] + ], + type: "object" )] -class SummitMediaFileTypeSchema {} +class PaginatedSummitMediaUploadTypesResponseSchema +{ +} + +#[OA\Schema( + schema: "SummitMediaUploadTypeCreateRequest", + description: "Request to create a Summit Media Upload Type", + required: ["name", "is_mandatory", "max_size", "private_storage_type", "public_storage_type", "type_id", "is_editable"], + properties: [ + new OA\Property(property: "name", type: "string", maxLength: 255, example: "Speaker Photo"), + new OA\Property(property: "description", type: "string", maxLength: 5120, nullable: true, example: "High resolution photo of the speaker"), + new OA\Property(property: "is_mandatory", type: "boolean", example: true), + new OA\Property(property: "max_size", type: "integer", description: "Maximum file size in KB (must be megabyte aligned)", example: 10240), + new OA\Property(property: "private_storage_type", type: "string", enum: ["local", "swift", "s3"], example: "local"), + new OA\Property(property: "public_storage_type", type: "string", enum: ["local", "swift", "s3"], example: "s3"), + new OA\Property(property: "type_id", type: "integer", example: 456), + new OA\Property(property: "is_editable", type: "boolean", example: true), + new OA\Property(property: "use_temporary_links_on_public_storage", type: "boolean", nullable: true, example: false), + new OA\Property(property: "temporary_links_public_storage_ttl", type: "integer", description: "TTL in seconds (required if use_temporary_links_on_public_storage is true)", nullable: true, example: 3600), + new OA\Property(property: "min_uploads_qty", type: "integer", minimum: 0, nullable: true, example: 1), + new OA\Property(property: "max_uploads_qty", type: "integer", minimum: 0, nullable: true, example: 1), + new OA\Property( + property: "presentation_types", + type: "array", + items: new OA\Items(type: "integer"), + description: "Array of presentation type IDs", + nullable: true, + example: [1, 2, 3] + ), + ], + type: "object" +)] +class SummitMediaUploadTypeCreateRequestSchema +{ +} + +#[OA\Schema( + schema: "SummitMediaUploadTypeUpdateRequest", + description: "Request to update a Summit Media Upload Type", + properties: [ + new OA\Property(property: "name", type: "string", maxLength: 255, nullable: true, example: "Speaker Photo"), + new OA\Property(property: "description", type: "string", maxLength: 5120, nullable: true, example: "High resolution photo of the speaker"), + new OA\Property(property: "is_mandatory", type: "boolean", nullable: true, example: true), + new OA\Property(property: "max_size", type: "integer", description: "Maximum file size in KB (must be megabyte aligned)", nullable: true, example: 10240), + new OA\Property(property: "private_storage_type", type: "string", enum: ["local", "swift", "s3"], nullable: true, example: "local"), + new OA\Property(property: "public_storage_type", type: "string", enum: ["local", "swift", "s3"], nullable: true, example: "s3"), + new OA\Property(property: "type_id", type: "integer", nullable: true, example: 456), + new OA\Property(property: "is_editable", type: "boolean", nullable: true, example: true), + new OA\Property(property: "use_temporary_links_on_public_storage", type: "boolean", nullable: true, example: false), + new OA\Property(property: "temporary_links_public_storage_ttl", type: "integer", description: "TTL in seconds (required if use_temporary_links_on_public_storage is true)", nullable: true, example: 3600), + new OA\Property(property: "min_uploads_qty", type: "integer", minimum: 0, nullable: true, example: 1), + new OA\Property(property: "max_uploads_qty", type: "integer", minimum: 0, nullable: true, example: 1), + new OA\Property( + property: "presentation_types", + type: "array", + items: new OA\Items(type: "integer"), + description: "Array of presentation type IDs", + nullable: true, + example: [1, 2, 3] + ), + ], + type: "object" +)] +class SummitMediaUploadTypeUpdateRequestSchema +{ +} + #[OA\Schema( schema: 'PaginatedSummitMediaFileTypesResponse',