{
  "openapi": "3.1.0",
  "info": {
    "title": "Files API",
    "version": "0.1.0"
  },
  "components": {
    "schemas": {
      "AuditLogsResponse": {
        "type": "object",
        "properties": {
          "count": {
            "default": 0,
            "description": "Total number of results",
            "type": "number"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditLog"
            },
            "description": "Audit log entries"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "additionalProperties": false,
        "description": "Paginated audit logs response"
      },
      "AuditLog": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string"
          },
          "action": {
            "type": "string",
            "enum": [
              "oauth.connected",
              "oauth.revoked",
              "mcp.tool_called",
              "user.banned",
              "user.unbanned",
              "user.profile_updated",
              "user.password_changed",
              "impersonation.started",
              "impersonation.stopped",
              "folder.purged",
              "ip_ban.created",
              "ip_ban.updated",
              "ip_ban.deleted",
              "ip_ban.purged",
              "file.quarantined",
              "file.restored",
              "file.deleted",
              "api_key.created",
              "api_key.deleted",
              "api_key.updated",
              "invite.created",
              "invite.deleted",
              "invite.revoked",
              "invite.updated",
              "role.created",
              "role.deleted",
              "role.updated",
              "role.permissions.updated",
              "role.storage.updated",
              "settings.updated",
              "user.created",
              "user.content.purged",
              "user.deleted",
              "user.roles.updated",
              "user.signed_up",
              "passkey.registered",
              "passkey.deleted",
              "passkey.login"
            ],
            "description": "Audit log action"
          },
          "authMethod": {
            "type": "string",
            "enum": [
              "anonymous",
              "api_key",
              "session",
              "oauth",
              "system"
            ]
          },
          "actorUser": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserReference"
              },
              {
                "type": "null"
              }
            ]
          },
          "actorApiKey": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "targetType": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "oauth_connection",
                  "folder",
                  "ip_ban",
                  "file",
                  "api_key",
                  "invite",
                  "passkey",
                  "role",
                  "setting",
                  "user"
                ],
                "description": "Audit log target type"
              },
              {
                "type": "null"
              }
            ]
          },
          "targetUuid": {
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "requestIp": {
            "type": [
              "string",
              "null"
            ]
          },
          "userAgent": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "uuid",
          "action",
          "authMethod",
          "actorUser",
          "actorApiKey",
          "targetType",
          "targetUuid",
          "metadata",
          "requestIp",
          "userAgent",
          "createdAt"
        ],
        "additionalProperties": false,
        "description": "Audit log entry"
      },
      "UserReference": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "UUID of the user"
          },
          "username": {
            "type": "string",
            "description": "Username of the user"
          }
        },
        "required": [
          "uuid",
          "username"
        ],
        "additionalProperties": false,
        "description": "User reference"
      },
      "BadRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "additionalProperties": false,
        "description": "Bad request"
      },
      "Unauthorized": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "additionalProperties": false,
        "description": "Unauthorized"
      },
      "InternalServerError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "additionalProperties": false,
        "description": "Internal server error"
      },
      "LoginResponse": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "uuid": {
                "type": "string",
                "description": "UUID of the user"
              },
              "username": {
                "type": "string",
                "maxLength": 128,
                "description": "Username of the user"
              },
              "banned": {
                "type": "boolean",
                "description": "Whether the user is banned"
              },
              "roles": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RoleSummary"
                },
                "description": "Roles assigned to the user"
              },
              "storageQuota": {
                "type": "number",
                "description": "Storage quota in bytes"
              },
              "permissions": {
                "$ref": "#/components/schemas/Permissions"
              }
            },
            "required": [
              "uuid",
              "username",
              "banned",
              "roles",
              "storageQuota",
              "permissions"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "user"
        ],
        "additionalProperties": false,
        "description": "Response for a successful login or registration"
      },
      "RoleSummary": {
        "description": "Role summary",
        "$ref": "#/components/schemas/UuidName"
      },
      "UuidName": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "UUID"
          },
          "name": {
            "type": "string",
            "description": "Name"
          }
        },
        "required": [
          "uuid",
          "name"
        ],
        "additionalProperties": false,
        "description": "UUID and name pair"
      },
      "Permissions": {
        "type": "object",
        "properties": {
          "canUploadFiles": {
            "type": "boolean",
            "description": "Whether the user can upload files"
          },
          "canCreateFolders": {
            "type": "boolean",
            "description": "Whether the user can create folders"
          },
          "canCreateFolderLinks": {
            "type": "boolean",
            "description": "Whether the user can create new folder links"
          },
          "canCreateTags": {
            "type": "boolean",
            "description": "Whether the user can create tags"
          },
          "canManageFiles": {
            "type": "boolean",
            "description": "Whether the user can manage files"
          },
          "canManageFolders": {
            "type": "boolean",
            "description": "Whether the user can manage folders"
          },
          "canManageTags": {
            "type": "boolean",
            "description": "Whether the user can manage tags"
          },
          "canManageSettings": {
            "type": "boolean",
            "description": "Whether the user can manage settings"
          },
          "canManageRoles": {
            "type": "boolean",
            "description": "Whether the user can manage roles"
          },
          "canManageUsers": {
            "type": "boolean",
            "description": "Whether the user can manage users"
          },
          "canManageIPBans": {
            "type": "boolean",
            "description": "Whether the user can manage IP bans"
          }
        },
        "required": [
          "canUploadFiles",
          "canCreateFolders",
          "canCreateFolderLinks",
          "canCreateTags",
          "canManageFiles",
          "canManageFolders",
          "canManageTags",
          "canManageSettings",
          "canManageRoles",
          "canManageUsers",
          "canManageIPBans"
        ],
        "additionalProperties": false,
        "description": "Permissions"
      },
      "TooManyRequests": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "additionalProperties": false,
        "description": "Too many requests"
      },
      "Forbidden": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "additionalProperties": false,
        "description": "Forbidden"
      },
      "Conflict": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "additionalProperties": false,
        "description": "Conflict"
      },
      "NotFound": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "additionalProperties": false,
        "description": "Not found"
      },
      "MembershipMutationResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MembershipMutationTargetResult"
            }
          }
        },
        "required": [
          "results"
        ],
        "additionalProperties": false
      },
      "MembershipMutationTargetResult": {
        "type": "object",
        "properties": {
          "targetUuid": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "success",
              "partial",
              "failed"
            ]
          },
          "succeededFileUuids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "failed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MembershipMutationFailure"
            }
          }
        },
        "required": [
          "targetUuid",
          "status",
          "succeededFileUuids",
          "failed"
        ],
        "additionalProperties": false
      },
      "MembershipMutationFailure": {
        "type": "object",
        "properties": {
          "fileUuid": {
            "type": "string"
          },
          "code": {
            "$ref": "#/components/schemas/MembershipMutationFailureCode"
          }
        },
        "required": [
          "fileUuid",
          "code"
        ],
        "additionalProperties": false
      },
      "MembershipMutationFailureCode": {
        "type": "string",
        "enum": [
          "TARGET_NOT_FOUND",
          "TARGET_FORBIDDEN",
          "FILE_NOT_FOUND",
          "FILE_FORBIDDEN",
          "ALREADY_ATTACHED",
          "NOT_ATTACHED"
        ]
      },
      "QuarantineFile": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "UUID of the file"
          },
          "identifier": {
            "type": "string",
            "description": "Identifier of the file"
          },
          "filename": {
            "type": "string",
            "description": "Filename of the file"
          },
          "createdAt": {
            "description": "Date the file was created",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "reason": {
            "description": "Reason for quarantine",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "uuid",
          "identifier",
          "filename",
          "createdAt",
          "reason"
        ],
        "additionalProperties": false,
        "description": "Quarantined file"
      },
      "UserSummary": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "UUID of the user"
          },
          "username": {
            "type": "string",
            "description": "Username of the user"
          },
          "banned": {
            "type": "boolean",
            "description": "Whether the user is banned"
          },
          "createdAt": {
            "description": "Date the user was created",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updatedAt": {
            "description": "Date the user was updated",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "uuid",
          "username",
          "banned",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false,
        "description": "User summary"
      },
      "Folder": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "UUID of the folder"
          },
          "name": {
            "type": "string",
            "description": "Name of the folder"
          },
          "description": {
            "description": "Description of the folder",
            "type": [
              "string",
              "null"
            ]
          },
          "isNSFW": {
            "type": "boolean",
            "description": "Whether the folder is NSFW"
          },
          "createdAt": {
            "description": "Date the folder was created",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updatedAt": {
            "description": "Date the folder was last updated",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "uuid",
          "name",
          "description",
          "isNSFW",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false,
        "description": "Folder"
      },
      "CoverImage": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "UUID of the file"
          },
          "identifier": {
            "type": "string",
            "description": "Identifier of the file"
          },
          "filename": {
            "type": "string",
            "description": "Filename of the file"
          },
          "createdAt": {
            "description": "Date the file was created",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "isNSFW": {
            "type": "boolean"
          },
          "fileMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FileMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "thumbnailVersion": {
            "description": "Version token for thumbnail cache busting",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "uuid",
          "identifier",
          "filename",
          "createdAt",
          "fileMetadata",
          "thumbnailVersion"
        ],
        "additionalProperties": false,
        "description": "Cover image"
      },
      "FileMetadata": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "UUID of the file metadata"
          },
          "originalFilename": {
            "type": "string",
            "description": "Original filename of the file"
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourceCreator": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourceCreatorUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourceTitle": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourceNotes": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourcePublishedDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "mimeType": {
            "description": "MIME type of the file",
            "type": [
              "string",
              "null"
            ]
          },
          "size": {
            "type": "number",
            "description": "Size of the file in bytes"
          },
          "originalWidth": {
            "description": "Width of the file in pixels",
            "type": [
              "number",
              "null"
            ]
          },
          "originalHeight": {
            "description": "Height of the file in pixels",
            "type": [
              "number",
              "null"
            ]
          },
          "thumbnailWidth": {
            "description": "Width of the thumbnail in pixels",
            "type": [
              "number",
              "null"
            ]
          },
          "thumbnailHeight": {
            "description": "Height of the thumbnail in pixels",
            "type": [
              "number",
              "null"
            ]
          },
          "processingStatus": {
            "type": "string",
            "enum": [
              "unknown",
              "pending",
              "completed",
              "failed",
              "skipped"
            ],
            "description": "Persisted preview processing outcome; unknown for files predating tracking"
          },
          "hash": {
            "description": "Hash of the file",
            "type": [
              "string",
              "null"
            ]
          },
          "ip": {
            "description": "IP address of the uploader",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "uuid",
          "originalFilename",
          "source",
          "sourceCreator",
          "sourceCreatorUrl",
          "sourceTitle",
          "sourceNotes",
          "sourcePublishedDate",
          "mimeType",
          "size",
          "originalWidth",
          "originalHeight",
          "thumbnailWidth",
          "thumbnailHeight",
          "processingStatus",
          "hash",
          "ip"
        ],
        "additionalProperties": false,
        "description": "File metadata"
      },
      "IpBan": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "UUID of the IP ban"
          },
          "ip": {
            "type": "string",
            "description": "IP address"
          },
          "reason": {
            "description": "Reason for the IP ban",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "description": "Timestamp of when the IP ban was created",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updatedAt": {
            "description": "Timestamp of when the IP ban was last updated",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "uuid",
          "ip",
          "reason",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false,
        "description": "IP Ban"
      },
      "RolePermissions": {
        "description": "Permissions of the role",
        "$ref": "#/components/schemas/Permissions"
      },
      "Settings": {
        "type": "object",
        "properties": {
          "siteName": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "string"
              },
              "value": {
                "type": "string"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "siteUrl": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "string"
              },
              "value": {
                "type": "string"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "registrationEnabled": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "boolean"
              },
              "value": {
                "type": "boolean"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "anonymousUploadsEnabled": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "boolean"
              },
              "value": {
                "type": "boolean"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "defaultUserStorageQuota": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "number"
              },
              "value": {
                "type": "number"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "thumbnailGenerationEnabled": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "boolean"
              },
              "value": {
                "type": "boolean"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "secret": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "string"
              },
              "value": {
                "type": "string"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "uploadMaxSize": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "number"
              },
              "value": {
                "type": "number"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "uploadDisallowedFileExtensions": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "array"
              },
              "value": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "uploadDisallowNoFileExtension": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "boolean"
              },
              "value": {
                "type": "boolean"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "zippingEnabled": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "boolean"
              },
              "value": {
                "type": "boolean"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "publicZipDownloadsEnabled": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "boolean"
              },
              "value": {
                "type": "boolean"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "fileIdentifierLength": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "number"
              },
              "value": {
                "type": "number"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "folderIdentifierLength": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "number"
              },
              "value": {
                "type": "number"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "postProcessingConcurrency": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "number"
              },
              "value": {
                "type": "number"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "siteName",
          "siteUrl",
          "registrationEnabled",
          "anonymousUploadsEnabled",
          "defaultUserStorageQuota",
          "thumbnailGenerationEnabled",
          "secret",
          "uploadMaxSize",
          "uploadDisallowedFileExtensions",
          "uploadDisallowNoFileExtension",
          "zippingEnabled",
          "publicZipDownloadsEnabled",
          "fileIdentifierLength",
          "folderIdentifierLength",
          "postProcessingConcurrency"
        ],
        "additionalProperties": false,
        "description": "Settings object"
      },
      "PublicSettings": {
        "type": "object",
        "properties": {
          "siteName": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "string"
              },
              "value": {
                "type": "string"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "siteUrl": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "string"
              },
              "value": {
                "type": "string"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "registrationEnabled": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "boolean"
              },
              "value": {
                "type": "boolean"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "anonymousUploadsEnabled": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "boolean"
              },
              "value": {
                "type": "boolean"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "uploadMaxSize": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "number"
              },
              "value": {
                "type": "number"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "uploadDisallowedFileExtensions": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "array"
              },
              "value": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "uploadDisallowNoFileExtension": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "boolean"
              },
              "value": {
                "type": "boolean"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "zippingEnabled": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "boolean"
              },
              "value": {
                "type": "boolean"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          },
          "publicZipDownloadsEnabled": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "boolean"
              },
              "value": {
                "type": "boolean"
              },
              "public": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value",
              "public"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "siteName",
          "siteUrl",
          "registrationEnabled",
          "anonymousUploadsEnabled",
          "uploadMaxSize",
          "uploadDisallowedFileExtensions",
          "uploadDisallowNoFileExtension",
          "zippingEnabled",
          "publicZipDownloadsEnabled"
        ],
        "additionalProperties": false,
        "description": "Public settings object"
      },
      "SSEEvent": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "ULID event identifier"
              },
              "event": {
                "type": "string",
                "const": "file.postProcessing.completed"
              },
              "data": {
                "type": "object",
                "properties": {
                  "uuid": {
                    "type": "string",
                    "description": "File UUID"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "File identifier"
                  },
                  "filename": {
                    "type": "string",
                    "description": "File name"
                  }
                },
                "required": [
                  "uuid",
                  "identifier",
                  "filename"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "event",
              "data"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "ULID event identifier"
              },
              "event": {
                "type": "string",
                "const": "file.postProcessing.failed"
              },
              "data": {
                "type": "object",
                "properties": {
                  "uuid": {
                    "type": "string",
                    "description": "File UUID"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "File identifier"
                  },
                  "filename": {
                    "type": "string",
                    "description": "File name"
                  }
                },
                "required": [
                  "uuid",
                  "identifier",
                  "filename"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "event",
              "data"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "ULID event identifier"
              },
              "event": {
                "type": "string",
                "const": "upload.session.assembling"
              },
              "data": {
                "type": "object",
                "properties": {
                  "sessionUuid": {
                    "type": "string",
                    "description": "Upload session UUID"
                  }
                },
                "required": [
                  "sessionUuid"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "event",
              "data"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "ULID event identifier"
              },
              "event": {
                "type": "string",
                "const": "upload.session.completed"
              },
              "data": {
                "type": "object",
                "properties": {
                  "sessionUuid": {
                    "type": "string",
                    "description": "Upload session UUID"
                  },
                  "fileUuid": {
                    "type": "string",
                    "description": "Completed file UUID"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "File identifier"
                  },
                  "filename": {
                    "type": "string",
                    "description": "File name"
                  }
                },
                "required": [
                  "sessionUuid",
                  "fileUuid",
                  "identifier",
                  "filename"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "event",
              "data"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "ULID event identifier"
              },
              "event": {
                "type": "string",
                "const": "upload.session.failed"
              },
              "data": {
                "type": "object",
                "properties": {
                  "sessionUuid": {
                    "type": "string",
                    "description": "Upload session UUID"
                  },
                  "error": {
                    "type": "string",
                    "description": "Upload error message"
                  }
                },
                "required": [
                  "sessionUuid",
                  "error"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "event",
              "data"
            ],
            "additionalProperties": false
          }
        ],
        "description": "Server-Sent Event payload. Delivered as `event:`, `data:`, `id:` fields per the SSE protocol.",
        "type": "object"
      },
      "LibraryStatistics": {
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "scope": {
            "type": "string",
            "const": "personal"
          },
          "basis": {
            "type": "string",
            "const": "current_inventory"
          },
          "summary": {
            "type": "object",
            "properties": {
              "totalFiles": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "totalBytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991,
                "description": "Size in bytes, without unit conversion or rounding"
              },
              "averageFileSize": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Mean bytes per file with metadata; null when no file sizes are known"
              },
              "filesWithMetadata": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "filesWithoutMetadata": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "quarantinedFiles": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "totalFiles",
              "totalBytes",
              "averageFileSize",
              "filesWithMetadata",
              "filesWithoutMetadata",
              "quarantinedFiles"
            ],
            "additionalProperties": false
          },
          "byCategory": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "bytes": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991,
                  "description": "Size in bytes, without unit conversion or rounding"
                },
                "key": {
                  "type": "string"
                }
              },
              "required": [
                "count",
                "bytes",
                "key"
              ],
              "additionalProperties": false
            }
          },
          "byMimeType": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "bytes": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991,
                  "description": "Size in bytes, without unit conversion or rounding"
                },
                "key": {
                  "type": "string"
                }
              },
              "required": [
                "count",
                "bytes",
                "key"
              ],
              "additionalProperties": false
            }
          },
          "byExtension": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "bytes": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991,
                  "description": "Size in bytes, without unit conversion or rounding"
                },
                "key": {
                  "type": "string"
                }
              },
              "required": [
                "count",
                "bytes",
                "key"
              ],
              "additionalProperties": false
            },
            "description": "Lowercase final extension of the original filename, without a dot; empty string for no extension"
          },
          "uploads": {
            "type": "object",
            "properties": {
              "timezone": {
                "type": "string",
                "const": "UTC"
              },
              "firstUploadAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "latestUploadAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "busiestDay": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "period": {
                        "type": "string"
                      },
                      "count": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "bytes": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991,
                        "description": "Size in bytes, without unit conversion or rounding"
                      }
                    },
                    "required": [
                      "period",
                      "count",
                      "bytes"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "byDay": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "bytes": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991,
                      "description": "Size in bytes, without unit conversion or rounding"
                    }
                  },
                  "required": [
                    "period",
                    "count",
                    "bytes"
                  ],
                  "additionalProperties": false
                }
              },
              "byMonth": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "bytes": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991,
                      "description": "Size in bytes, without unit conversion or rounding"
                    }
                  },
                  "required": [
                    "period",
                    "count",
                    "bytes"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "timezone",
              "firstUploadAt",
              "latestUploadAt",
              "busiestDay",
              "byDay",
              "byMonth"
            ],
            "additionalProperties": false,
            "description": "Upload dates of files still in the library; periods with no files are omitted"
          },
          "largestFiles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "uuid": {
                  "type": "string"
                },
                "filename": {
                  "type": "string"
                },
                "originalFilename": {
                  "type": "string"
                },
                "mimeType": {
                  "type": "string"
                },
                "size": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991,
                  "description": "Size in bytes, without unit conversion or rounding"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                "quarantined": {
                  "type": "boolean"
                }
              },
              "required": [
                "uuid",
                "filename",
                "originalFilename",
                "mimeType",
                "size",
                "createdAt",
                "quarantined"
              ],
              "additionalProperties": false
            }
          },
          "smallestFiles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "uuid": {
                  "type": "string"
                },
                "filename": {
                  "type": "string"
                },
                "originalFilename": {
                  "type": "string"
                },
                "mimeType": {
                  "type": "string"
                },
                "size": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991,
                  "description": "Size in bytes, without unit conversion or rounding"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                "quarantined": {
                  "type": "boolean"
                }
              },
              "required": [
                "uuid",
                "filename",
                "originalFilename",
                "mimeType",
                "size",
                "createdAt",
                "quarantined"
              ],
              "additionalProperties": false
            }
          },
          "duplicates": {
            "type": "object",
            "properties": {
              "filesWithHash": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "groups": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "redundantFiles": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "redundantBytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991,
                "description": "Size in bytes, without unit conversion or rounding"
              }
            },
            "required": [
              "filesWithHash",
              "groups",
              "redundantFiles",
              "redundantBytes"
            ],
            "additionalProperties": false,
            "description": "Exact stored-hash matches within this library; redundant values exclude one copy per group"
          },
          "media": {
            "type": "object",
            "properties": {
              "totalFiles": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "withDimensions": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "withoutDimensions": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "landscape": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "portrait": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "nearSquare": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "totalFiles",
              "withDimensions",
              "withoutDimensions",
              "landscape",
              "portrait",
              "nearSquare"
            ],
            "additionalProperties": false,
            "description": "Images and videos only. Near-square means width/height is between 0.95 and 1.05 inclusive"
          },
          "organization": {
            "type": "object",
            "properties": {
              "folders": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "populated": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "empty": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "total",
                  "populated",
                  "empty"
                ],
                "additionalProperties": false
              },
              "tags": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "populated": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "empty": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "total",
                  "populated",
                  "empty"
                ],
                "additionalProperties": false
              },
              "filesInFolders": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "filesWithTags": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "folders",
              "tags",
              "filesInFolders",
              "filesWithTags"
            ],
            "additionalProperties": false,
            "description": "Owned folders and tags only; populated means containing at least one owned file. Counts use direct memberships, not descendant tags"
          },
          "sources": {
            "type": "object",
            "properties": {
              "filesWithSource": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "filesWithCreator": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "filesWithSourceMetadata": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "filesWithSource",
              "filesWithCreator",
              "filesWithSourceMetadata"
            ],
            "additionalProperties": false
          },
          "processing": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "enum": [
                    "unknown",
                    "pending",
                    "completed",
                    "failed",
                    "skipped"
                  ]
                },
                "count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "status",
                "count"
              ],
              "additionalProperties": false
            },
            "description": "Files without metadata are counted as unknown"
          }
        },
        "required": [
          "generatedAt",
          "scope",
          "basis",
          "summary",
          "byCategory",
          "byMimeType",
          "byExtension",
          "uploads",
          "largestFiles",
          "smallestFiles",
          "duplicates",
          "media",
          "organization",
          "sources",
          "processing"
        ],
        "additionalProperties": false,
        "description": "Current personal inventory, including quarantined files. Unknown sizes contribute zero bytes. Excludes deleted files, download counts, bandwidth, and historical storage growth"
      },
      "Tag": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "UUID of the tag"
          },
          "name": {
            "type": "string",
            "description": "Name of the tag"
          },
          "createdAt": {
            "description": "Date the tag was created",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updatedAt": {
            "description": "Date the tag was last updated",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "uuid",
          "name",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false,
        "description": "Tag"
      },
      "UploadResponse": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "Unique file UUID"
          },
          "identifier": {
            "type": "string",
            "description": "Short file identifier used in URLs"
          },
          "filename": {
            "type": "string",
            "description": "Stored filename (identifier + extension)"
          }
        },
        "required": [
          "uuid",
          "identifier",
          "filename"
        ],
        "additionalProperties": false,
        "description": "Response for an upload request"
      },
      "CreateUploadSessionResponse": {
        "type": "object",
        "properties": {
          "sessionUuid": {
            "type": "string",
            "description": "UUID of the upload session"
          },
          "totalChunks": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Total number of chunks expected"
          },
          "expiresAt": {
            "type": "string",
            "description": "ISO 8601 expiration timestamp for the session"
          }
        },
        "required": [
          "sessionUuid",
          "totalChunks",
          "expiresAt"
        ],
        "additionalProperties": false,
        "description": "Response for creating an upload session"
      },
      "GetUploadSessionResponse": {
        "type": "object",
        "properties": {
          "sessionUuid": {
            "type": "string",
            "description": "UUID of the upload session"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "assembling",
              "completed",
              "failed",
              "expired"
            ],
            "description": "Current session status"
          },
          "totalChunks": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Total number of chunks expected"
          },
          "receivedChunks": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "description": "Indices of chunks already received"
          },
          "expiresAt": {
            "type": "string",
            "description": "ISO 8601 expiration timestamp for the session"
          }
        },
        "required": [
          "sessionUuid",
          "status",
          "totalChunks",
          "receivedChunks",
          "expiresAt"
        ],
        "additionalProperties": false,
        "description": "Response for getting upload session status"
      },
      "UserWithRoles": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "UUID of the user"
          },
          "username": {
            "type": "string",
            "description": "Username of the user"
          },
          "banned": {
            "type": "boolean",
            "description": "Whether the user is banned"
          },
          "createdAt": {
            "description": "Date the user was created",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updatedAt": {
            "description": "Date the user was updated",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoleSummary"
            },
            "description": "Roles of the user"
          }
        },
        "required": [
          "uuid",
          "username",
          "banned",
          "createdAt",
          "updatedAt",
          "roles"
        ],
        "additionalProperties": false,
        "description": "User with roles"
      },
      "ApiKeysResponse": {
        "type": "object",
        "properties": {
          "count": {
            "default": 0,
            "description": "Total number of results",
            "type": "number"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKey"
            },
            "description": "API keys"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "additionalProperties": false,
        "description": "Paginated API keys response"
      },
      "ApiKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "API key id"
          },
          "name": {
            "description": "API key display name",
            "type": [
              "string",
              "null"
            ]
          },
          "start": {
            "description": "Stored starting characters of the API key",
            "type": [
              "string",
              "null"
            ]
          },
          "prefix": {
            "description": "API key prefix",
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the API key is enabled"
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the API key expires"
          },
          "createdAt": {
            "description": "When the API key was created",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updatedAt": {
            "description": "When the API key was last updated",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "inheritsPermissions": {
            "type": "boolean",
            "description": "Whether the key follows all current account permissions"
          },
          "scope": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "canUploadFiles",
                "canCreateFolders",
                "canCreateFolderLinks",
                "canCreateTags",
                "canManageFiles",
                "canManageFolders",
                "canManageTags",
                "canManageSettings",
                "canManageRoles",
                "canManageUsers",
                "canManageIPBans"
              ]
            },
            "description": "Effective API key scope within the app"
          },
          "metadata": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "Metadata stored with the API key"
          }
        },
        "required": [
          "id",
          "name",
          "start",
          "prefix",
          "enabled",
          "expiresAt",
          "createdAt",
          "updatedAt",
          "inheritsPermissions",
          "scope",
          "metadata"
        ],
        "additionalProperties": false,
        "description": "API key"
      },
      "CreateApiKeyResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "API key id"
          },
          "name": {
            "description": "API key display name",
            "type": [
              "string",
              "null"
            ]
          },
          "start": {
            "description": "Stored starting characters of the API key",
            "type": [
              "string",
              "null"
            ]
          },
          "prefix": {
            "description": "API key prefix",
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the API key is enabled"
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the API key expires"
          },
          "createdAt": {
            "description": "When the API key was created",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updatedAt": {
            "description": "When the API key was last updated",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "inheritsPermissions": {
            "type": "boolean",
            "description": "Whether the key follows all current account permissions"
          },
          "scope": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "canUploadFiles",
                "canCreateFolders",
                "canCreateFolderLinks",
                "canCreateTags",
                "canManageFiles",
                "canManageFolders",
                "canManageTags",
                "canManageSettings",
                "canManageRoles",
                "canManageUsers",
                "canManageIPBans"
              ]
            },
            "description": "Effective API key scope within the app"
          },
          "metadata": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "Metadata stored with the API key"
          },
          "key": {
            "type": "string",
            "description": "Secret API key, returned only at creation"
          }
        },
        "required": [
          "id",
          "name",
          "start",
          "prefix",
          "enabled",
          "expiresAt",
          "createdAt",
          "updatedAt",
          "inheritsPermissions",
          "scope",
          "metadata",
          "key"
        ],
        "additionalProperties": false,
        "description": "Created API key"
      },
      "UpdateApiKeyResponse": {
        "description": "Updated API key",
        "$ref": "#/components/schemas/ApiKey"
      },
      "Invite": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "UUID of the invite"
          },
          "redeemedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the invite was redeemed"
          },
          "revokedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the invite was revoked"
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Timestamp of when the invite expires"
          },
          "createdAt": {
            "description": "Timestamp of when the invite was created",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updatedAt": {
            "description": "Timestamp of when the invite was last updated",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "uuid",
          "redeemedAt",
          "revokedAt",
          "expiresAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false,
        "description": "Invite"
      },
      "Collaborator": {
        "type": "object",
        "properties": {
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserReference"
              },
              {
                "type": "null"
              }
            ],
            "description": "User"
          },
          "createdAt": {
            "description": "Date the collaborator was added",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updatedAt": {
            "description": "Date the collaborator was last updated",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "user",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false,
        "description": "Collaborator"
      },
      "FolderShare": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "UUID of the share"
          },
          "identifier": {
            "type": "string",
            "description": "Identifier of the share"
          },
          "allowZipDownload": {
            "type": "boolean",
            "description": "Whether this link permits ZIP downloads when enabled by the library"
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date the share expires"
          },
          "createdAt": {
            "description": "Date the share was created",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updatedAt": {
            "description": "Date the share was last updated",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "uuid",
          "identifier",
          "allowZipDownload",
          "expiresAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false,
        "description": "Folder share"
      },
      "FileExifMetadata": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "UUID of the file exif metadata"
          },
          "make": {
            "description": "Make of the camera",
            "type": [
              "string",
              "null"
            ]
          },
          "orientation": {
            "description": "Orientation of the file",
            "type": [
              "number",
              "null"
            ]
          },
          "model": {
            "description": "Model of the camera",
            "type": [
              "string",
              "null"
            ]
          },
          "exposureTime": {
            "description": "Exposure time of the camera",
            "type": [
              "string",
              "null"
            ]
          },
          "fNumber": {
            "description": "F number of the camera",
            "type": [
              "number",
              "null"
            ]
          },
          "exposureProgram": {
            "description": "Exposure program of the camera",
            "type": [
              "string",
              "null"
            ]
          },
          "iso": {
            "description": "ISO of the camera",
            "type": [
              "number",
              "null"
            ]
          },
          "shutterSpeed": {
            "description": "Shutter speed of the camera",
            "type": [
              "string",
              "null"
            ]
          },
          "aperture": {
            "description": "Aperture of the camera",
            "type": [
              "number",
              "null"
            ]
          },
          "flash": {
            "description": "Flash of the camera",
            "type": [
              "string",
              "null"
            ]
          },
          "focalLength": {
            "description": "Focal length of the camera",
            "type": [
              "string",
              "null"
            ]
          },
          "focalLength35mm": {
            "description": "Focal length of the camera in 35mm",
            "type": [
              "string",
              "null"
            ]
          },
          "exposureMode": {
            "description": "Exposure mode of the camera",
            "type": [
              "string",
              "null"
            ]
          },
          "whiteBalance": {
            "description": "White balance of the camera",
            "type": [
              "string",
              "null"
            ]
          },
          "lensInfo": {
            "description": "Lens info of the camera",
            "type": [
              "string",
              "null"
            ]
          },
          "lensModel": {
            "description": "Lens model of the camera",
            "type": [
              "string",
              "null"
            ]
          },
          "megapixels": {
            "description": "Megapixels of the camera",
            "type": [
              "number",
              "null"
            ]
          },
          "fov": {
            "description": "Field of view of the camera",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "uuid",
          "make",
          "orientation",
          "model",
          "exposureTime",
          "fNumber",
          "exposureProgram",
          "iso",
          "shutterSpeed",
          "aperture",
          "flash",
          "focalLength",
          "focalLength35mm",
          "exposureMode",
          "whiteBalance",
          "lensInfo",
          "lensModel",
          "megapixels",
          "fov"
        ],
        "additionalProperties": false,
        "description": "File exif metadata"
      }
    }
  },
  "paths": {
    "/api/docs/json": {
      "get": {
        "tags": [
          "Root"
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/v1/audit-logs": {
      "get": {
        "tags": [
          "Audit Logs"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "description": "Number of items to return",
              "example": 50
            },
            "in": "query",
            "name": "limit"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Number of items to skip",
              "example": 0
            },
            "in": "query",
            "name": "offset"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "oauth.connected",
                "oauth.revoked",
                "mcp.tool_called",
                "user.banned",
                "user.unbanned",
                "user.profile_updated",
                "user.password_changed",
                "impersonation.started",
                "impersonation.stopped",
                "folder.purged",
                "ip_ban.created",
                "ip_ban.updated",
                "ip_ban.deleted",
                "ip_ban.purged",
                "file.quarantined",
                "file.restored",
                "file.deleted",
                "api_key.created",
                "api_key.deleted",
                "api_key.updated",
                "invite.created",
                "invite.deleted",
                "invite.revoked",
                "invite.updated",
                "role.created",
                "role.deleted",
                "role.updated",
                "role.permissions.updated",
                "role.storage.updated",
                "settings.updated",
                "user.created",
                "user.content.purged",
                "user.deleted",
                "user.roles.updated",
                "user.signed_up",
                "passkey.registered",
                "passkey.deleted",
                "passkey.login"
              ],
              "description": "Audit log action"
            },
            "in": "query",
            "name": "action"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "actorUuid"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "oauth_connection",
                "folder",
                "ip_ban",
                "file",
                "api_key",
                "invite",
                "passkey",
                "role",
                "setting",
                "user"
              ],
              "description": "Audit log target type"
            },
            "in": "query",
            "name": "targetType"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "in": "query",
            "name": "dateFrom"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "in": "query",
            "name": "dateTo"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "maxLength": 128,
                    "description": "Username of the user"
                  },
                  "password": {
                    "type": "string",
                    "maxLength": 1024,
                    "description": "Password of the user"
                  }
                },
                "required": [
                  "username",
                  "password"
                ],
                "additionalProperties": false,
                "description": "Body for a login request"
              }
            }
          },
          "description": "Body for a login request"
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequests"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/register": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "inviteCode": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Invite code"
                  },
                  "username": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 24,
                    "pattern": "^[a-z0-9_]+$",
                    "description": "Username of the user"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 12,
                    "description": "Password of the user"
                  }
                },
                "required": [
                  "username",
                  "password"
                ],
                "additionalProperties": false,
                "description": "Body for a register request"
              }
            }
          },
          "description": "Body for a register request"
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "204": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bulk-upload": {
      "post": {
        "tags": [
          "Upload"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "Files to upload"
                  }
                },
                "required": [
                  "files"
                ],
                "additionalProperties": false,
                "description": "Body for a bulk upload request",
                "contentType": "multipart/form-data"
              }
            }
          },
          "description": "Body for a bulk upload request"
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "UUID of the folder to upload the file to"
            },
            "in": "header",
            "name": "chibi-folder-uuid"
          },
          {
            "schema": {
              "type": "string",
              "description": "UUID of the tag to upload the file to"
            },
            "in": "header",
            "name": "chibi-tag-uuid"
          }
        ],
        "responses": {
          "201": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "uuid": {
                        "type": "string",
                        "description": "Unique file UUID"
                      },
                      "identifier": {
                        "type": "string",
                        "description": "Short file identifier used in URLs"
                      },
                      "filename": {
                        "type": "string",
                        "description": "Stored filename (identifier + extension)"
                      }
                    },
                    "required": [
                      "uuid",
                      "identifier",
                      "filename"
                    ],
                    "additionalProperties": false
                  },
                  "description": "Response for a bulk upload request"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "413": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/file-memberships": {
      "post": {
        "tags": [
          "Files"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targetType": {
                    "type": "string",
                    "enum": [
                      "folder",
                      "tag"
                    ]
                  },
                  "operation": {
                    "type": "string",
                    "enum": [
                      "add",
                      "remove"
                    ]
                  },
                  "targetUuids": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    }
                  },
                  "fileUuids": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    }
                  }
                },
                "required": [
                  "targetType",
                  "operation",
                  "targetUuids",
                  "fileUuids"
                ],
                "additionalProperties": false,
                "description": "Add or remove files from folders or tags"
              }
            }
          },
          "description": "Add or remove files from folders or tags"
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MembershipMutationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files": {
      "get": {
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "description": "Number of items to return",
              "example": 50
            },
            "in": "query",
            "name": "limit"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Number of items to skip",
              "example": 0
            },
            "in": "query",
            "name": "offset"
          },
          {
            "schema": {
              "description": "Sort files before pagination. Defaults to newest.",
              "type": "string",
              "enum": [
                "newest",
                "oldest",
                "name-asc",
                "name-desc",
                "largest",
                "smallest"
              ]
            },
            "in": "query",
            "name": "sort",
            "description": "Sort files before pagination. Defaults to newest."
          },
          {
            "schema": {
              "description": "List your files, all files, or files from one uploader. Defaults to personal.",
              "type": "string",
              "enum": [
                "personal",
                "all",
                "uploader"
              ]
            },
            "in": "query",
            "name": "scope",
            "description": "List your files, all files, or files from one uploader. Defaults to personal."
          },
          {
            "schema": {
              "description": "Required for uploader scope",
              "type": "string",
              "minLength": 1
            },
            "in": "query",
            "name": "uploaderUuid",
            "description": "Required for uploader scope"
          },
          {
            "schema": {
              "description": "List anonymous files",
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "in": "query",
            "name": "anonymous",
            "description": "List anonymous files"
          },
          {
            "schema": {
              "description": "List quarantined files",
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "in": "query",
            "name": "quarantine",
            "description": "List quarantined files"
          },
          {
            "schema": {
              "description": "List files uploaded from this exact IP address",
              "type": "string"
            },
            "in": "query",
            "name": "ip",
            "description": "List files uploaded from this exact IP address"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "default": 0,
                      "description": "Total number of results",
                      "type": "number"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "description": "UUID of the file"
                          },
                          "identifier": {
                            "type": "string",
                            "description": "Identifier of the file"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Filename of the file"
                          },
                          "createdAt": {
                            "description": "Date the file was created",
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          },
                          "isNSFW": {
                            "description": "Whether the file belongs to an NSFW folder",
                            "type": "boolean"
                          },
                          "fileMetadata": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "uuid": {
                                    "type": "string",
                                    "description": "UUID of the file metadata"
                                  },
                                  "source": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceCreator": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceCreatorUrl": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceTitle": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceNotes": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourcePublishedDate": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "mimeType": {
                                    "description": "MIME type of the file",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "size": {
                                    "type": "number",
                                    "description": "Size of the file in bytes"
                                  },
                                  "originalWidth": {
                                    "description": "Width of the file in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "originalHeight": {
                                    "description": "Height of the file in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "thumbnailWidth": {
                                    "description": "Width of the thumbnail in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "thumbnailHeight": {
                                    "description": "Height of the thumbnail in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "processingStatus": {
                                    "type": "string",
                                    "enum": [
                                      "unknown",
                                      "pending",
                                      "completed",
                                      "failed",
                                      "skipped"
                                    ],
                                    "description": "Persisted preview processing outcome; unknown for files predating tracking"
                                  },
                                  "hash": {
                                    "description": "Hash of the file",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "ip": {
                                    "description": "IP address of the uploader",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "originalFilename": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "uuid",
                                  "source",
                                  "sourceCreator",
                                  "sourceCreatorUrl",
                                  "sourceTitle",
                                  "sourceNotes",
                                  "sourcePublishedDate",
                                  "mimeType",
                                  "size",
                                  "originalWidth",
                                  "originalHeight",
                                  "thumbnailWidth",
                                  "thumbnailHeight",
                                  "processingStatus",
                                  "hash",
                                  "ip",
                                  "originalFilename"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "quarantineFile": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/QuarantineFile"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "isOwner": {
                            "type": "boolean",
                            "description": "Whether the file is owned by the user"
                          },
                          "thumbnailVersion": {
                            "description": "Version token for thumbnail cache busting",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "user": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/UserSummary"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "uuid",
                          "identifier",
                          "filename",
                          "createdAt",
                          "fileMetadata",
                          "quarantineFile",
                          "isOwner",
                          "thumbnailVersion"
                        ],
                        "additionalProperties": false
                      },
                      "description": "List of files"
                    },
                    "user": {
                      "description": "Uploader when listing one uploader’s files",
                      "$ref": "#/components/schemas/UserSummary"
                    }
                  },
                  "required": [
                    "count",
                    "results"
                  ],
                  "additionalProperties": false,
                  "description": "Response for listing files"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/folders": {
      "post": {
        "tags": [
          "Folders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of the folder"
                  },
                  "description": {
                    "description": "Description of the folder",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "isNSFW": {
                    "type": "boolean",
                    "description": "Whether the folder is NSFW"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false,
                "description": "Body for creating an folder"
              }
            }
          },
          "description": "Body for creating an folder"
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Folder"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Folders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "description": "Number of items to return",
              "example": 50
            },
            "in": "query",
            "name": "limit"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Number of items to skip",
              "example": 0
            },
            "in": "query",
            "name": "offset"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "in": "query",
            "name": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "updated",
                "newest",
                "oldest",
                "name-asc",
                "name-desc"
              ]
            },
            "in": "query",
            "name": "sort"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "default": 0,
                      "description": "Total number of results",
                      "type": "number"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "description": "UUID of the folder"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the folder"
                          },
                          "description": {
                            "description": "Description of the folder",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "isNSFW": {
                            "type": "boolean",
                            "description": "Whether the folder is NSFW"
                          },
                          "createdAt": {
                            "description": "Date the folder was created",
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          },
                          "updatedAt": {
                            "description": "Date the folder was last updated",
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          },
                          "isOwner": {
                            "type": "boolean",
                            "description": "Whether the user is the owner of the folder"
                          },
                          "filesCount": {
                            "default": 0,
                            "description": "Number of files in the folder",
                            "type": "number"
                          },
                          "coverImage": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/CoverImage"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "uuid",
                          "name",
                          "description",
                          "isNSFW",
                          "createdAt",
                          "updatedAt",
                          "isOwner",
                          "filesCount",
                          "coverImage"
                        ],
                        "additionalProperties": false
                      },
                      "description": "List of folders"
                    }
                  },
                  "required": [
                    "count",
                    "results"
                  ],
                  "additionalProperties": false,
                  "description": "Response for listing folders"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/impersonation": {
      "get": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "canReturn": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "canReturn"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/impersonate": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userUuid": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "userUuid"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/stop-impersonation": {
      "post": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "204": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invites": {
      "post": {
        "tags": [
          "Invites"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expiresAt": {
                    "description": "Timestamp of when the invite expires",
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false,
                "description": "Body for creating an invite"
              }
            }
          },
          "description": "Body for creating an invite"
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "description": "UUID of the invite"
                    },
                    "redeemedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the invite was redeemed"
                    },
                    "revokedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the invite was revoked"
                    },
                    "expiresAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Timestamp of when the invite expires"
                    },
                    "createdAt": {
                      "description": "Timestamp of when the invite was created",
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "updatedAt": {
                      "description": "Timestamp of when the invite was last updated",
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "inviteCode": {
                      "type": "string",
                      "description": "Invite token, returned only on creation"
                    }
                  },
                  "required": [
                    "uuid",
                    "redeemedAt",
                    "revokedAt",
                    "expiresAt",
                    "createdAt",
                    "updatedAt",
                    "inviteCode"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Invites"
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "default": 0,
                      "description": "Total number of results",
                      "type": "number"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "description": "UUID of the invite"
                          },
                          "redeemedAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "When the invite was redeemed"
                          },
                          "revokedAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "When the invite was revoked"
                          },
                          "expiresAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Timestamp of when the invite expires"
                          },
                          "createdAt": {
                            "description": "Timestamp of when the invite was created",
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          },
                          "updatedAt": {
                            "description": "Timestamp of when the invite was last updated",
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          },
                          "user": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/UserSummary"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "invitee": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/UserSummary"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "uuid",
                          "redeemedAt",
                          "revokedAt",
                          "expiresAt",
                          "createdAt",
                          "updatedAt",
                          "user",
                          "invitee"
                        ],
                        "additionalProperties": false
                      },
                      "description": "List of invites"
                    }
                  },
                  "required": [
                    "count",
                    "results"
                  ],
                  "additionalProperties": false,
                  "description": "Response for listing invites"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ip-bans": {
      "post": {
        "tags": [
          "IP Bans"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ip": {
                    "type": "string",
                    "description": "IP address"
                  },
                  "reason": {
                    "description": "Reason for the IP ban",
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "required": [
                  "ip"
                ],
                "additionalProperties": false,
                "description": "Body for creating an IP ban"
              }
            }
          },
          "description": "Body for creating an IP ban"
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IpBan"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "IP Bans"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "description": "Number of items to return",
              "example": 50
            },
            "in": "query",
            "name": "limit"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Number of items to skip",
              "example": 0
            },
            "in": "query",
            "name": "offset"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "default": 0,
                      "description": "Total number of results",
                      "type": "number"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IpBan"
                      },
                      "description": "List of IP bans"
                    }
                  },
                  "required": [
                    "count",
                    "results"
                  ],
                  "additionalProperties": false,
                  "description": "Response for listing IP bans"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/passkey/login-options": {
      "post": {
        "tags": [
          "Auth",
          "Passkey"
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "options": {},
                    "challengeId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "options",
                    "challengeId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/passkey/login-verify": {
      "post": {
        "tags": [
          "Auth",
          "Passkey"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "credential": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "rawId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "type": {
                        "type": "string",
                        "const": "public-key"
                      },
                      "clientExtensionResults": {},
                      "authenticatorAttachment": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "response": {
                        "type": "object",
                        "properties": {
                          "authenticatorData": {
                            "type": "string",
                            "minLength": 1
                          },
                          "clientDataJSON": {
                            "type": "string",
                            "minLength": 1
                          },
                          "signature": {
                            "type": "string",
                            "minLength": 1
                          },
                          "userHandle": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "authenticatorData",
                          "clientDataJSON",
                          "signature"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "rawId",
                      "type",
                      "response"
                    ],
                    "description": "Authentication response from WebAuthn API"
                  },
                  "challengeId": {
                    "type": "string",
                    "format": "ulid",
                    "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
                    "description": "Challenge identifier from login-options"
                  }
                },
                "required": [
                  "credential",
                  "challengeId"
                ],
                "additionalProperties": false,
                "description": "Body for verifying passkey login"
              }
            }
          },
          "description": "Body for verifying passkey login"
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequests"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/passkey/register-options": {
      "post": {
        "tags": [
          "Auth",
          "Passkey"
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "options": {}
                  },
                  "required": [
                    "options"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/passkey/register-verify": {
      "post": {
        "tags": [
          "Auth",
          "Passkey"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "credential": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "rawId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "type": {
                        "type": "string",
                        "const": "public-key"
                      },
                      "clientExtensionResults": {},
                      "authenticatorAttachment": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "response": {
                        "type": "object",
                        "properties": {
                          "attestationObject": {
                            "type": "string",
                            "minLength": 1
                          },
                          "clientDataJSON": {
                            "type": "string",
                            "minLength": 1
                          },
                          "transports": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "attestationObject",
                          "clientDataJSON"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "rawId",
                      "type",
                      "response"
                    ],
                    "description": "Registration response from WebAuthn API"
                  },
                  "name": {
                    "description": "Friendly name for the passkey",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "required": [
                  "credential"
                ],
                "additionalProperties": false,
                "description": "Body for verifying passkey registration"
              }
            }
          },
          "description": "Body for verifying passkey registration"
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deviceType": {
                      "type": "string"
                    },
                    "backedUp": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "uuid",
                    "name",
                    "deviceType",
                    "backedUp",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/passkey/credentials": {
      "get": {
        "tags": [
          "Auth",
          "Passkey"
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "uuid": {
                        "type": "string"
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "deviceType": {
                        "type": "string"
                      },
                      "backedUp": {
                        "type": "boolean"
                      },
                      "transports": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "uuid",
                      "name",
                      "deviceType",
                      "backedUp",
                      "transports",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  },
                  "description": "List of passkey credentials"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/passkey/credentials/{uuid}": {
      "delete": {
        "tags": [
          "Auth",
          "Passkey"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "UUID of the passkey credential"
            },
            "in": "path",
            "name": "uuid",
            "required": true,
            "description": "UUID of the passkey credential"
          }
        ],
        "responses": {
          "204": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Auth",
          "Passkey"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "New name for the passkey"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false,
                "description": "Body for renaming a passkey"
              }
            }
          },
          "description": "Body for renaming a passkey"
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "UUID of the passkey credential"
            },
            "in": "path",
            "name": "uuid",
            "required": true,
            "description": "UUID of the passkey credential"
          }
        ],
        "responses": {
          "204": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/roles": {
      "post": {
        "tags": [
          "Roles"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Name"
                  },
                  "storageQuota": {
                    "type": "integer",
                    "minimum": -1,
                    "maximum": 9007199254740991,
                    "description": "Storage quota in bytes; -1 means unlimited"
                  },
                  "permissions": {
                    "type": "object",
                    "properties": {
                      "canUploadFiles": {
                        "type": "boolean",
                        "description": "Whether the user can upload files"
                      },
                      "canCreateFolders": {
                        "type": "boolean",
                        "description": "Whether the user can create folders"
                      },
                      "canCreateFolderLinks": {
                        "type": "boolean",
                        "description": "Whether the user can create new folder links"
                      },
                      "canCreateTags": {
                        "type": "boolean",
                        "description": "Whether the user can create tags"
                      },
                      "canManageFiles": {
                        "type": "boolean",
                        "description": "Whether the user can manage files"
                      },
                      "canManageFolders": {
                        "type": "boolean",
                        "description": "Whether the user can manage folders"
                      },
                      "canManageTags": {
                        "type": "boolean",
                        "description": "Whether the user can manage tags"
                      },
                      "canManageSettings": {
                        "type": "boolean",
                        "description": "Whether the user can manage settings"
                      },
                      "canManageRoles": {
                        "type": "boolean",
                        "description": "Whether the user can manage roles"
                      },
                      "canManageUsers": {
                        "type": "boolean",
                        "description": "Whether the user can manage users"
                      },
                      "canManageIPBans": {
                        "type": "boolean",
                        "description": "Whether the user can manage IP bans"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false,
                "description": "Body for creating of a role"
              }
            }
          },
          "description": "Body for creating of a role"
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "description": "UUID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name"
                    },
                    "storageQuota": {
                      "type": "integer",
                      "minimum": -1,
                      "maximum": 9007199254740991,
                      "description": "Storage quota in bytes; -1 means unlimited"
                    },
                    "permissions": {
                      "$ref": "#/components/schemas/RolePermissions"
                    }
                  },
                  "required": [
                    "uuid",
                    "name",
                    "storageQuota",
                    "permissions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Roles"
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "number",
                      "description": "Number of roles"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "description": "UUID"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "storageQuota": {
                            "type": "integer",
                            "minimum": -1,
                            "maximum": 9007199254740991,
                            "description": "Storage quota in bytes; -1 means unlimited"
                          },
                          "permissions": {
                            "$ref": "#/components/schemas/RolePermissions"
                          }
                        },
                        "required": [
                          "uuid",
                          "name",
                          "storageQuota",
                          "permissions"
                        ],
                        "additionalProperties": false
                      },
                      "description": "List of roles"
                    }
                  },
                  "required": [
                    "count",
                    "results"
                  ],
                  "additionalProperties": false,
                  "description": "Response for listing roles"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1": {
      "get": {
        "tags": [
          "Root"
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/v1/search": {
      "post": {
        "tags": [
          "Search"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scope": {
                    "description": "Search your files, all files, or files from one uploader. Defaults to personal.",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "personal"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "all"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "uploader"
                          },
                          "uploaderUuid": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "kind",
                          "uploaderUuid"
                        ],
                        "additionalProperties": false
                      }
                    ],
                    "type": "object"
                  },
                  "tagUuids": {
                    "description": "UUIDs of the tags to search within",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "folderUuid": {
                    "description": "Limit results to a folder available to the user",
                    "type": "string"
                  },
                  "scopeTagUuid": {
                    "description": "Limit results to a tag and its descendants",
                    "type": "string"
                  },
                  "query": {
                    "description": "Text to find in the original filename",
                    "type": "string",
                    "maxLength": 200
                  },
                  "source": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "contains"
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2048,
                            "description": "Where the file came from: a URL or other reference. Blank clears the source."
                          }
                        },
                        "required": [
                          "kind",
                          "value"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "exact"
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2048,
                            "description": "Where the file came from: a URL or other reference. Blank clears the source."
                          }
                        },
                        "required": [
                          "kind",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    ],
                    "description": "Match source text case-insensitively, or match the complete stored source exactly.",
                    "type": "object"
                  },
                  "sourceCreator": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "contains"
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200,
                            "description": "Creator or artist name supplied by the file owner."
                          }
                        },
                        "required": [
                          "kind",
                          "value"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "exact"
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200,
                            "description": "Creator or artist name supplied by the file owner."
                          }
                        },
                        "required": [
                          "kind",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    ],
                    "description": "Match part or all of the creator name, ignoring case.",
                    "type": "object"
                  },
                  "sourceDomain": {
                    "description": "HTTP(S) source hostname. Case, a trailing dot, and the www prefix are ignored; other subdomains match separately.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 253,
                    "pattern": "^(?:\\[[0-9a-fA-F:.]+\\]|[^/\\\\?#@:\\s]+)$"
                  },
                  "ip": {
                    "description": "Exact upload IP address within the selected file scope",
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "all",
                      "image",
                      "video",
                      "audio",
                      "document",
                      "other"
                    ]
                  },
                  "dateFrom": {
                    "description": "First upload date, inclusive (UTC)",
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "dateTo": {
                    "description": "Last upload date, inclusive (UTC)",
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "sort": {
                    "type": "string",
                    "enum": [
                      "newest",
                      "oldest",
                      "name-asc",
                      "name-desc",
                      "largest",
                      "smallest"
                    ]
                  }
                },
                "additionalProperties": false,
                "description": "Body for searching files"
              }
            }
          },
          "description": "Body for searching files"
        },
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "description": "Number of items to return",
              "example": 50
            },
            "in": "query",
            "name": "limit"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Number of items to skip",
              "example": 0
            },
            "in": "query",
            "name": "offset"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "default": 0,
                      "description": "Total number of results",
                      "type": "number"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "description": "UUID of the file"
                          },
                          "identifier": {
                            "type": "string",
                            "description": "Identifier of the file"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Filename of the file"
                          },
                          "createdAt": {
                            "description": "Date the file was created",
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          },
                          "isNSFW": {
                            "description": "Whether the file belongs to an NSFW folder",
                            "type": "boolean"
                          },
                          "fileMetadata": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "uuid": {
                                    "type": "string",
                                    "description": "UUID of the file metadata"
                                  },
                                  "source": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceCreator": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceCreatorUrl": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceTitle": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceNotes": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourcePublishedDate": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "mimeType": {
                                    "description": "MIME type of the file",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "size": {
                                    "type": "number",
                                    "description": "Size of the file in bytes"
                                  },
                                  "originalWidth": {
                                    "description": "Width of the file in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "originalHeight": {
                                    "description": "Height of the file in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "thumbnailWidth": {
                                    "description": "Width of the thumbnail in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "thumbnailHeight": {
                                    "description": "Height of the thumbnail in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "processingStatus": {
                                    "type": "string",
                                    "enum": [
                                      "unknown",
                                      "pending",
                                      "completed",
                                      "failed",
                                      "skipped"
                                    ],
                                    "description": "Persisted preview processing outcome; unknown for files predating tracking"
                                  },
                                  "hash": {
                                    "description": "Hash of the file",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "ip": {
                                    "description": "IP address of the uploader",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "originalFilename": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "uuid",
                                  "source",
                                  "sourceCreator",
                                  "sourceCreatorUrl",
                                  "sourceTitle",
                                  "sourceNotes",
                                  "sourcePublishedDate",
                                  "mimeType",
                                  "size",
                                  "originalWidth",
                                  "originalHeight",
                                  "thumbnailWidth",
                                  "thumbnailHeight",
                                  "processingStatus",
                                  "hash",
                                  "ip",
                                  "originalFilename"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "quarantineFile": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/QuarantineFile"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "isOwner": {
                            "type": "boolean",
                            "description": "Whether the file is owned by the user"
                          },
                          "thumbnailVersion": {
                            "description": "Version token for thumbnail cache busting",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "user": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/UserSummary"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "folders": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/UuidName"
                            },
                            "description": "Folders visible to the user that contain this file"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/UuidName"
                            },
                            "description": "The user’s tags assigned to this file"
                          }
                        },
                        "required": [
                          "uuid",
                          "identifier",
                          "filename",
                          "createdAt",
                          "fileMetadata",
                          "quarantineFile",
                          "isOwner",
                          "thumbnailVersion",
                          "folders",
                          "tags"
                        ],
                        "additionalProperties": false
                      },
                      "description": "Search result files"
                    }
                  },
                  "required": [
                    "count",
                    "results"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/sessions": {
      "get": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number"
                      },
                      "ipAddress": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "userAgent": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "impersonated": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      "expiresAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      "current": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "ipAddress",
                      "userAgent",
                      "impersonated",
                      "createdAt",
                      "expiresAt",
                      "current"
                    ],
                    "additionalProperties": false
                  },
                  "description": "Active sign-in sessions for the current account"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/sessions/{id}": {
      "delete": {
        "tags": [
          "Auth"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991,
              "description": "Session ID"
            },
            "in": "path",
            "name": "id",
            "required": true,
            "description": "Session ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Session revoked"
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/settings": {
      "get": {
        "tags": [
          "Settings"
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Settings"
                    },
                    {
                      "$ref": "#/components/schemas/PublicSettings"
                    }
                  ],
                  "description": "Response for getting settings"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Settings"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "siteName": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "siteUrl": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "registrationEnabled": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "anonymousUploadsEnabled": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "defaultUserStorageQuota": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "thumbnailGenerationEnabled": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "secret": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "uploadMaxSize": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "uploadDisallowedFileExtensions": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "uploadDisallowNoFileExtension": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "zippingEnabled": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "publicZipDownloadsEnabled": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "fileIdentifierLength": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "integer",
                        "minimum": 26,
                        "maximum": 64
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "folderIdentifierLength": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "integer",
                        "minimum": 26,
                        "maximum": 64
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "postProcessingConcurrency": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 64
                      }
                    },
                    "required": [
                      "value"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "description": "Body for patching settings"
              }
            }
          },
          "description": "Body for patching settings"
        },
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sse": {
      "get": {
        "tags": [
          "SSE"
        ],
        "description": "Server-Sent Events stream for real-time notifications. Events are delivered as `text/event-stream`. The connection stays open until the client disconnects.",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSEEvent"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/statistics": {
      "get": {
        "summary": "Get statistics for your personal library",
        "tags": [
          "Statistics"
        ],
        "parameters": [
          {
            "schema": {
              "default": 5,
              "description": "Maximum number of largest and smallest files to return (1–20)",
              "type": "integer",
              "minimum": 1,
              "maximum": 20
            },
            "in": "query",
            "name": "topLimit",
            "description": "Maximum number of largest and smallest files to return (1–20)"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryStatistics"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags": {
      "post": {
        "tags": [
          "Tags"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "parents": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "UUID of the parent tag"
                    }
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of the tag"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false,
                "description": "Body for creating a tag"
              }
            }
          },
          "description": "Body for creating a tag"
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Tags"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "description": "Number of items to return",
              "example": 50
            },
            "in": "query",
            "name": "limit"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Number of items to skip",
              "example": 0
            },
            "in": "query",
            "name": "offset"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "in": "query",
            "name": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "updated",
                "newest",
                "oldest",
                "name-asc",
                "name-desc"
              ]
            },
            "in": "query",
            "name": "sort"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "in": "query",
            "name": "parentFor"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "default": 0,
                      "description": "Total number of results",
                      "type": "number"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "description": "UUID of the tag"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the tag"
                          },
                          "createdAt": {
                            "description": "Date the tag was created",
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          },
                          "updatedAt": {
                            "description": "Date the tag was last updated",
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          },
                          "parents": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/UuidName"
                            },
                            "description": "Direct parent tags"
                          },
                          "filesCount": {
                            "default": 0,
                            "description": "Number of files in the tag",
                            "type": "number"
                          },
                          "coverImage": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/CoverImage"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "uuid",
                          "name",
                          "createdAt",
                          "updatedAt",
                          "parents",
                          "filesCount",
                          "coverImage"
                        ],
                        "additionalProperties": false
                      },
                      "description": "List of tags"
                    }
                  },
                  "required": [
                    "count",
                    "results"
                  ],
                  "additionalProperties": false,
                  "description": "Response for listing tags"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/upload": {
      "post": {
        "tags": [
          "Upload"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "File to upload",
                    "format": "binary",
                    "contentMediaType": "application/octet-stream"
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of the file"
                  },
                  "source": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2048,
                        "description": "Where the file came from: a URL or other reference. Blank clears the source."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceCreator": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200,
                        "description": "Creator or artist name supplied by the file owner."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceCreatorUrl": {
                    "description": "HTTP(S) creator profile or portfolio URL. Blank or null clears it.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2048
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceTitle": {
                    "description": "Original artwork or post title. Blank or null clears it.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceNotes": {
                    "description": "Plain-text context or attribution notes. Blank or null clears it.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourcePublishedDate": {
                    "description": "Original publication date as YYYY-MM-DD, without a time or timezone. Blank or null clears it.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "file"
                ],
                "additionalProperties": false,
                "description": "Body for an upload request",
                "contentType": "multipart/form-data"
              }
            }
          },
          "description": "Body for an upload request"
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "UUID of the folder to upload the file to"
            },
            "in": "header",
            "name": "chibi-folder-uuid"
          },
          {
            "schema": {
              "type": "string",
              "description": "UUID of the tag to upload the file to"
            },
            "in": "header",
            "name": "chibi-tag-uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadResponse"
                }
              }
            }
          },
          "201": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "413": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/upload-from-url": {
      "post": {
        "tags": [
          "Upload"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "object",
                    "properties": {
                      "download_url": {
                        "type": "string",
                        "maxLength": 16384,
                        "format": "uri",
                        "description": "Temporary HTTPS download URL for the file bytes."
                      },
                      "file_id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256,
                        "description": "Host file reference; other clients may use their own identifier."
                      },
                      "mime_type": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "file_name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "download_url",
                      "file_id"
                    ],
                    "additionalProperties": false
                  },
                  "filename": {
                    "description": "Override the original filename, including its extension.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "source": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2048,
                        "description": "Where the file came from: a URL or other reference. Blank clears the source."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceCreator": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200,
                        "description": "Creator or artist name supplied by the file owner."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceCreatorUrl": {
                    "description": "HTTP(S) creator profile or portfolio URL. Blank or null clears it.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2048
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceTitle": {
                    "description": "Original artwork or post title. Blank or null clears it.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceNotes": {
                    "description": "Plain-text context or attribution notes. Blank or null clears it.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourcePublishedDate": {
                    "description": "Original publication date as YYYY-MM-DD, without a time or timezone. Blank or null clears it.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "file"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "description": "Unique file UUID"
                    },
                    "identifier": {
                      "type": "string",
                      "description": "Short file identifier used in URLs"
                    },
                    "filename": {
                      "type": "string",
                      "description": "Stored filename (identifier + extension)"
                    },
                    "fileMetadata": {
                      "type": "object",
                      "properties": {
                        "mimeType": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "mimeType",
                        "size"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "uuid",
                    "identifier",
                    "filename",
                    "fileMetadata"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "201": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "description": "Unique file UUID"
                    },
                    "identifier": {
                      "type": "string",
                      "description": "Short file identifier used in URLs"
                    },
                    "filename": {
                      "type": "string",
                      "description": "Stored filename (identifier + extension)"
                    },
                    "fileMetadata": {
                      "type": "object",
                      "properties": {
                        "mimeType": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "mimeType",
                        "size"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "uuid",
                    "identifier",
                    "filename",
                    "fileMetadata"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "413": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/upload-sessions": {
      "post": {
        "tags": [
          "Upload Sessions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "source": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2048,
                        "description": "Where the file came from: a URL or other reference. Blank clears the source."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceCreator": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200,
                        "description": "Creator or artist name supplied by the file owner."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceCreatorUrl": {
                    "description": "HTTP(S) creator profile or portfolio URL. Blank or null clears it.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2048
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceTitle": {
                    "description": "Original artwork or post title. Blank or null clears it.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceNotes": {
                    "description": "Plain-text context or attribution notes. Blank or null clears it.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourcePublishedDate": {
                    "description": "Original publication date as YYYY-MM-DD, without a time or timezone. Blank or null clears it.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "filename": {
                    "type": "string",
                    "description": "Original filename of the file being uploaded"
                  },
                  "totalSize": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Total size of the file in bytes"
                  },
                  "chunkSize": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Size of each chunk in bytes"
                  },
                  "folderUuid": {
                    "type": "string",
                    "description": "UUID of the folder to upload into"
                  },
                  "tagUuid": {
                    "type": "string",
                    "description": "UUID of the tag to associate with the upload"
                  }
                },
                "required": [
                  "filename",
                  "totalSize",
                  "chunkSize"
                ],
                "additionalProperties": false,
                "description": "Body for creating an upload session"
              }
            }
          },
          "description": "Body for creating an upload session"
        },
        "responses": {
          "201": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateUploadSessionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/upload-sessions/{uuid}": {
      "get": {
        "tags": [
          "Upload Sessions"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Upload session UUID"
            },
            "in": "path",
            "name": "uuid",
            "required": true,
            "description": "Upload session UUID"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUploadSessionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Upload Sessions"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Upload session UUID"
            },
            "in": "path",
            "name": "uuid",
            "required": true,
            "description": "Upload session UUID"
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/upload-sessions/{uuid}/chunks/{index}": {
      "put": {
        "tags": [
          "Upload Sessions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "Chunk data",
                    "format": "binary",
                    "contentMediaType": "application/octet-stream"
                  }
                },
                "required": [
                  "file"
                ],
                "additionalProperties": false,
                "description": "Body for uploading a chunk",
                "contentType": "multipart/form-data"
              }
            }
          },
          "description": "Body for uploading a chunk"
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Upload session UUID"
            },
            "in": "path",
            "name": "uuid",
            "required": true,
            "description": "Upload session UUID"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991,
              "description": "Chunk index (0-based)"
            },
            "in": "path",
            "name": "index",
            "required": true,
            "description": "Chunk index (0-based)"
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "413": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/users": {
      "post": {
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 24,
                    "pattern": "^[a-z0-9_]+$",
                    "description": "Username of the user"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 12,
                    "description": "Password of the user"
                  },
                  "roleUuids": {
                    "description": "UUIDs of the roles of the user",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "username",
                  "password"
                ],
                "additionalProperties": false,
                "description": "Body for creating a user"
              }
            }
          },
          "description": "Body for creating a user"
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserWithRoles"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "description": "Number of items to return",
              "example": 50
            },
            "in": "query",
            "name": "limit"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Number of items to skip",
              "example": 0
            },
            "in": "query",
            "name": "offset"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "default": 0,
                      "description": "Total number of results",
                      "type": "number"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "description": "UUID of the user"
                          },
                          "username": {
                            "type": "string",
                            "description": "Username of the user"
                          },
                          "banned": {
                            "type": "boolean",
                            "description": "Whether the user is banned"
                          },
                          "createdAt": {
                            "description": "Date the user was created",
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          },
                          "updatedAt": {
                            "description": "Date the user was updated",
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/RoleSummary"
                            },
                            "description": "Roles of the user"
                          },
                          "storageQuota": {
                            "type": "number",
                            "description": "Storage quota of the user"
                          },
                          "storageQuotaUsed": {
                            "type": "number",
                            "description": "Storage quota used by the user"
                          },
                          "filesCount": {
                            "type": "number",
                            "description": "Number of files of the user"
                          }
                        },
                        "required": [
                          "uuid",
                          "username",
                          "banned",
                          "createdAt",
                          "updatedAt",
                          "roles",
                          "storageQuota",
                          "storageQuotaUsed",
                          "filesCount"
                        ],
                        "additionalProperties": false
                      },
                      "description": "List of users"
                    }
                  },
                  "required": [
                    "count",
                    "results"
                  ],
                  "additionalProperties": false,
                  "description": "Response for listing users"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/users/me": {
      "patch": {
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "description": "Username of the current user",
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 24,
                    "pattern": "^[a-z0-9_]+$"
                  },
                  "oldPassword": {
                    "description": "Old password of the current user",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024
                  },
                  "newPassword": {
                    "description": "New password of the current user",
                    "type": "string",
                    "minLength": 12
                  }
                },
                "additionalProperties": false,
                "description": "Body for patching the current user"
              }
            }
          },
          "description": "Body for patching the current user"
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "description": "UUID of the user"
                    },
                    "username": {
                      "type": "string",
                      "description": "Username of the user"
                    },
                    "banned": {
                      "type": "boolean",
                      "description": "Whether the user is banned"
                    },
                    "updatedAt": {
                      "description": "Date the user was updated",
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RoleSummary"
                      },
                      "description": "Roles of the user"
                    },
                    "storageQuota": {
                      "type": "number",
                      "description": "Storage quota of the role"
                    },
                    "storageQuotaUsed": {
                      "type": "number",
                      "description": "Storage quota used by the user"
                    },
                    "filesCount": {
                      "type": "number",
                      "description": "Number of files of the user"
                    },
                    "permissions": {
                      "$ref": "#/components/schemas/Permissions"
                    },
                    "apiKey": {
                      "description": "API key of the user",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "uuid",
                    "username",
                    "banned",
                    "updatedAt",
                    "roles",
                    "storageQuota",
                    "storageQuotaUsed",
                    "filesCount",
                    "permissions",
                    "apiKey"
                  ],
                  "additionalProperties": false,
                  "description": "Response for the updated current user"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequests"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Users"
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "description": "UUID of the user"
                    },
                    "username": {
                      "type": "string",
                      "description": "Username of the user"
                    },
                    "banned": {
                      "type": "boolean",
                      "description": "Whether the user is banned"
                    },
                    "updatedAt": {
                      "description": "Date the user was updated",
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RoleSummary"
                      },
                      "description": "Roles of the user"
                    },
                    "storageQuota": {
                      "type": "number",
                      "description": "Storage quota of the role"
                    },
                    "storageQuotaUsed": {
                      "type": "number",
                      "description": "Storage quota used by the user"
                    },
                    "filesCount": {
                      "type": "number",
                      "description": "Number of files of the user"
                    },
                    "permissions": {
                      "$ref": "#/components/schemas/Permissions"
                    },
                    "apiKey": {
                      "description": "API key of the user",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "impersonating": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "uuid",
                    "username",
                    "banned",
                    "updatedAt",
                    "roles",
                    "storageQuota",
                    "storageQuotaUsed",
                    "filesCount",
                    "permissions",
                    "apiKey",
                    "impersonating"
                  ],
                  "additionalProperties": false,
                  "description": "Response for getting the current user"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/users/me/api-keys": {
      "get": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "description": "Number of items to return",
              "example": 50
            },
            "in": "query",
            "name": "limit"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Number of items to skip",
              "example": 0
            },
            "in": "query",
            "name": "offset"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeysResponse"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "API key display name",
                    "type": "string"
                  },
                  "expiresIn": {
                    "description": "API key expiration in milliseconds",
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "scope": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "canUploadFiles",
                            "canCreateFolders",
                            "canCreateFolderLinks",
                            "canCreateTags",
                            "canManageFiles",
                            "canManageFolders",
                            "canManageTags",
                            "canManageSettings",
                            "canManageRoles",
                            "canManageUsers",
                            "canManageIPBans"
                          ]
                        },
                        "description": "Scoped app permissions granted to the API key"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  }
                },
                "additionalProperties": false,
                "description": "Body for creating an API key"
              }
            }
          },
          "description": "Body for creating an API key"
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/users/me/api-keys/{keyId}": {
      "patch": {
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "expiresIn": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "scope": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "canUploadFiles",
                            "canCreateFolders",
                            "canCreateFolderLinks",
                            "canCreateTags",
                            "canManageFiles",
                            "canManageFolders",
                            "canManageTags",
                            "canManageSettings",
                            "canManageRoles",
                            "canManageUsers",
                            "canManageIPBans"
                          ]
                        },
                        "description": "Scoped app permissions granted to the API key"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  }
                },
                "additionalProperties": false,
                "description": "Body for updating an API key"
              }
            }
          },
          "description": "Body for updating an API key"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "keyId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateApiKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "keyId",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/users/{uuid}": {
      "patch": {
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "banned": {
                    "type": "boolean",
                    "description": "Whether the user is banned"
                  }
                },
                "required": [
                  "banned"
                ],
                "additionalProperties": false,
                "description": "Body for patching a user"
              }
            }
          },
          "description": "Body for patching a user"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSummary"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserWithRoles"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/users/{uuid}/purge": {
      "post": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/users/{uuid}/roles": {
      "get": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "roles": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RoleSummary"
                      },
                      "description": "Roles of the user"
                    },
                    "storageQuota": {
                      "type": "number",
                      "description": "Storage quota of the role"
                    },
                    "storageQuotaUsed": {
                      "type": "number",
                      "description": "Storage quota used by the user"
                    },
                    "filesCount": {
                      "type": "number",
                      "description": "Number of files of the user"
                    },
                    "permissions": {
                      "$ref": "#/components/schemas/Permissions"
                    }
                  },
                  "required": [
                    "roles",
                    "storageQuota",
                    "storageQuotaUsed",
                    "filesCount",
                    "permissions"
                  ],
                  "additionalProperties": false,
                  "description": "Response for listing roles of a user"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uuids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "UUIDs of the roles to patch"
                  }
                },
                "required": [
                  "uuids"
                ],
                "additionalProperties": false,
                "description": "Body for patching roles of a user"
              }
            }
          },
          "description": "Body for patching roles of a user"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/bulk-delete": {
      "post": {
        "tags": [
          "Tags"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uuids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "UUIDs of the tags to delete"
                  }
                },
                "required": [
                  "uuids"
                ],
                "additionalProperties": false,
                "description": "Body for bulk deleting tags"
              }
            }
          },
          "description": "Body for bulk deleting tags"
        },
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/{uuid}/files": {
      "get": {
        "tags": [
          "Tags"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "description": "Number of items to return",
              "example": 50
            },
            "in": "query",
            "name": "limit"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Number of items to skip",
              "example": 0
            },
            "in": "query",
            "name": "offset"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "default": 0,
                      "description": "Total number of results",
                      "type": "number"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "description": "UUID of the file"
                          },
                          "identifier": {
                            "type": "string",
                            "description": "Identifier of the file"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Filename of the file"
                          },
                          "createdAt": {
                            "description": "Date the file was created",
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          },
                          "isNSFW": {
                            "description": "Whether the file belongs to an NSFW folder",
                            "type": "boolean"
                          },
                          "fileMetadata": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "uuid": {
                                    "type": "string",
                                    "description": "UUID of the file metadata"
                                  },
                                  "source": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceCreator": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceCreatorUrl": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceTitle": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceNotes": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourcePublishedDate": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "mimeType": {
                                    "description": "MIME type of the file",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "size": {
                                    "type": "number",
                                    "description": "Size of the file in bytes"
                                  },
                                  "originalWidth": {
                                    "description": "Width of the file in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "originalHeight": {
                                    "description": "Height of the file in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "thumbnailWidth": {
                                    "description": "Width of the thumbnail in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "thumbnailHeight": {
                                    "description": "Height of the thumbnail in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "processingStatus": {
                                    "type": "string",
                                    "enum": [
                                      "unknown",
                                      "pending",
                                      "completed",
                                      "failed",
                                      "skipped"
                                    ],
                                    "description": "Persisted preview processing outcome; unknown for files predating tracking"
                                  },
                                  "hash": {
                                    "description": "Hash of the file",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "ip": {
                                    "description": "IP address of the uploader",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "originalFilename": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "uuid",
                                  "source",
                                  "sourceCreator",
                                  "sourceCreatorUrl",
                                  "sourceTitle",
                                  "sourceNotes",
                                  "sourcePublishedDate",
                                  "mimeType",
                                  "size",
                                  "originalWidth",
                                  "originalHeight",
                                  "thumbnailWidth",
                                  "thumbnailHeight",
                                  "processingStatus",
                                  "hash",
                                  "ip",
                                  "originalFilename"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "quarantineFile": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/QuarantineFile"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "isOwner": {
                            "type": "boolean",
                            "description": "Whether the file is owned by the user"
                          },
                          "thumbnailVersion": {
                            "description": "Version token for thumbnail cache busting",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "user": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/UserSummary"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "uuid",
                          "identifier",
                          "filename",
                          "createdAt",
                          "fileMetadata",
                          "quarantineFile",
                          "isOwner",
                          "thumbnailVersion"
                        ],
                        "additionalProperties": false
                      },
                      "description": "List of files"
                    },
                    "user": {
                      "description": "Uploader when listing one uploader’s files",
                      "$ref": "#/components/schemas/UserSummary"
                    }
                  },
                  "required": [
                    "count",
                    "results"
                  ],
                  "additionalProperties": false,
                  "description": "Response for listing files"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/{uuid}": {
      "get": {
        "tags": [
          "Tags"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "description": "UUID of the tag"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the tag"
                    },
                    "createdAt": {
                      "description": "Date the tag was created",
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "updatedAt": {
                      "description": "Date the tag was last updated",
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "parents": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UuidName"
                      },
                      "description": "Direct parent tags"
                    },
                    "children": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UuidName"
                      },
                      "description": "Direct child tags"
                    }
                  },
                  "required": [
                    "uuid",
                    "name",
                    "createdAt",
                    "updatedAt",
                    "parents",
                    "children"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Tags"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of the tag"
                  },
                  "parents": {
                    "description": "Direct parent tag UUIDs",
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    }
                  }
                },
                "additionalProperties": false,
                "description": "Body for patching a tag"
              }
            }
          },
          "description": "Body for patching a tag"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Tags"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/roles/{uuid}": {
      "get": {
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "description": "UUID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name"
                    },
                    "storageQuota": {
                      "type": "integer",
                      "minimum": -1,
                      "maximum": 9007199254740991,
                      "description": "Storage quota in bytes; -1 means unlimited"
                    },
                    "permissions": {
                      "$ref": "#/components/schemas/RolePermissions"
                    }
                  },
                  "required": [
                    "uuid",
                    "name",
                    "storageQuota",
                    "permissions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Roles"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Name"
                  },
                  "storageQuota": {
                    "type": "integer",
                    "minimum": -1,
                    "maximum": 9007199254740991,
                    "description": "Storage quota in bytes; -1 means unlimited"
                  },
                  "permissions": {
                    "type": "object",
                    "properties": {
                      "canUploadFiles": {
                        "type": "boolean",
                        "description": "Whether the user can upload files"
                      },
                      "canCreateFolders": {
                        "type": "boolean",
                        "description": "Whether the user can create folders"
                      },
                      "canCreateFolderLinks": {
                        "type": "boolean",
                        "description": "Whether the user can create new folder links"
                      },
                      "canCreateTags": {
                        "type": "boolean",
                        "description": "Whether the user can create tags"
                      },
                      "canManageFiles": {
                        "type": "boolean",
                        "description": "Whether the user can manage files"
                      },
                      "canManageFolders": {
                        "type": "boolean",
                        "description": "Whether the user can manage folders"
                      },
                      "canManageTags": {
                        "type": "boolean",
                        "description": "Whether the user can manage tags"
                      },
                      "canManageSettings": {
                        "type": "boolean",
                        "description": "Whether the user can manage settings"
                      },
                      "canManageRoles": {
                        "type": "boolean",
                        "description": "Whether the user can manage roles"
                      },
                      "canManageUsers": {
                        "type": "boolean",
                        "description": "Whether the user can manage users"
                      },
                      "canManageIPBans": {
                        "type": "boolean",
                        "description": "Whether the user can manage IP bans"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "description": "Role fields to update"
              }
            }
          },
          "description": "Role fields to update"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "description": "UUID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name"
                    },
                    "storageQuota": {
                      "type": "integer",
                      "minimum": -1,
                      "maximum": 9007199254740991,
                      "description": "Storage quota in bytes; -1 means unlimited"
                    },
                    "permissions": {
                      "$ref": "#/components/schemas/RolePermissions"
                    }
                  },
                  "required": [
                    "uuid",
                    "name",
                    "storageQuota",
                    "permissions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ip-bans/{uuid}/files": {
      "get": {
        "tags": [
          "IP Bans"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "description": "Number of items to return",
              "example": 50
            },
            "in": "query",
            "name": "limit"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Number of items to skip",
              "example": 0
            },
            "in": "query",
            "name": "offset"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "default": 0,
                      "description": "Total number of results",
                      "type": "number"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "description": "UUID of the file"
                          },
                          "identifier": {
                            "type": "string",
                            "description": "Identifier of the file"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Filename of the file"
                          },
                          "createdAt": {
                            "description": "Date the file was created",
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          },
                          "isNSFW": {
                            "type": "boolean"
                          },
                          "fileMetadata": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/FileMetadata"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "quarantineFile": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/QuarantineFile"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "uuid",
                          "identifier",
                          "filename",
                          "createdAt",
                          "fileMetadata",
                          "quarantineFile"
                        ],
                        "additionalProperties": false
                      },
                      "description": "List of files"
                    }
                  },
                  "required": [
                    "count",
                    "results"
                  ],
                  "additionalProperties": false,
                  "description": "Response for listing files"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ip-bans/{uuid}/purge": {
      "post": {
        "tags": [
          "IP Bans"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ip-bans/{uuid}": {
      "get": {
        "tags": [
          "IP Bans"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IpBan"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "IP Bans"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ip": {
                    "type": "string",
                    "description": "IP address"
                  },
                  "reason": {
                    "description": "Reason for the IP ban",
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "additionalProperties": false,
                "description": "Body for patching an IP ban"
              }
            }
          },
          "description": "Body for patching an IP ban"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IpBan"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "IP Bans"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invites/{uuid}": {
      "get": {
        "tags": [
          "Invites"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "description": "UUID of the invite"
                    },
                    "redeemedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the invite was redeemed"
                    },
                    "revokedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the invite was revoked"
                    },
                    "expiresAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Timestamp of when the invite expires"
                    },
                    "createdAt": {
                      "description": "Timestamp of when the invite was created",
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "updatedAt": {
                      "description": "Timestamp of when the invite was last updated",
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "user": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/UserSummary"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "invitee": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/UserSummary"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "uuid",
                    "redeemedAt",
                    "revokedAt",
                    "expiresAt",
                    "createdAt",
                    "updatedAt",
                    "user",
                    "invitee"
                  ],
                  "additionalProperties": false,
                  "description": "Response for getting an invite"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Invites"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expiresAt": {
                    "description": "Timestamp of when the invite expires",
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false,
                "description": "Body for patching an invite"
              }
            }
          },
          "description": "Body for patching an invite"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Invites"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/folders/bulk-delete": {
      "post": {
        "tags": [
          "Folders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uuids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "UUIDs of the folders to delete"
                  }
                },
                "required": [
                  "uuids"
                ],
                "additionalProperties": false,
                "description": "Body for bulk deleting folders"
              }
            }
          },
          "description": "Body for bulk deleting folders"
        },
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/folders/{uuid}/collaborators": {
      "put": {
        "tags": [
          "Folders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "uuid": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "description": "UUID of the collaborator to add"
                      }
                    },
                    "required": [
                      "uuid"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "username": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100,
                        "description": "Username of the collaborator to add"
                      }
                    },
                    "required": [
                      "username"
                    ],
                    "additionalProperties": false
                  }
                ],
                "description": "Body for adding collaborators to an folder"
              }
            }
          },
          "description": "Body for adding collaborators to an folder"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Collaborator"
                  },
                  "description": "Response for adding collaborators to an folder"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Folders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Collaborator"
                  },
                  "description": "Response for listing collaborators of an folder"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/folders/{uuid}/collaborators/{collaboratorUuid}": {
      "delete": {
        "tags": [
          "Folders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "collaboratorUuid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/folders/{uuid}/files": {
      "get": {
        "tags": [
          "Folders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "description": "Number of items to return",
              "example": 50
            },
            "in": "query",
            "name": "limit"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Number of items to skip",
              "example": 0
            },
            "in": "query",
            "name": "offset"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "default": 0,
                      "description": "Total number of results",
                      "type": "number"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "description": "UUID of the file"
                          },
                          "identifier": {
                            "type": "string",
                            "description": "Identifier of the file"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Filename of the file"
                          },
                          "createdAt": {
                            "description": "Date the file was created",
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          },
                          "isNSFW": {
                            "description": "Whether the file belongs to an NSFW folder",
                            "type": "boolean"
                          },
                          "fileMetadata": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "uuid": {
                                    "type": "string",
                                    "description": "UUID of the file metadata"
                                  },
                                  "source": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceCreator": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceCreatorUrl": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceTitle": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourceNotes": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sourcePublishedDate": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "mimeType": {
                                    "description": "MIME type of the file",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "size": {
                                    "type": "number",
                                    "description": "Size of the file in bytes"
                                  },
                                  "originalWidth": {
                                    "description": "Width of the file in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "originalHeight": {
                                    "description": "Height of the file in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "thumbnailWidth": {
                                    "description": "Width of the thumbnail in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "thumbnailHeight": {
                                    "description": "Height of the thumbnail in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "processingStatus": {
                                    "type": "string",
                                    "enum": [
                                      "unknown",
                                      "pending",
                                      "completed",
                                      "failed",
                                      "skipped"
                                    ],
                                    "description": "Persisted preview processing outcome; unknown for files predating tracking"
                                  },
                                  "hash": {
                                    "description": "Hash of the file",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "ip": {
                                    "description": "IP address of the uploader",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "originalFilename": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "uuid",
                                  "source",
                                  "sourceCreator",
                                  "sourceCreatorUrl",
                                  "sourceTitle",
                                  "sourceNotes",
                                  "sourcePublishedDate",
                                  "mimeType",
                                  "size",
                                  "originalWidth",
                                  "originalHeight",
                                  "thumbnailWidth",
                                  "thumbnailHeight",
                                  "processingStatus",
                                  "hash",
                                  "ip",
                                  "originalFilename"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "quarantineFile": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/QuarantineFile"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "isOwner": {
                            "type": "boolean",
                            "description": "Whether the file is owned by the user"
                          },
                          "thumbnailVersion": {
                            "description": "Version token for thumbnail cache busting",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "user": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/UserSummary"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "uuid",
                          "identifier",
                          "filename",
                          "createdAt",
                          "fileMetadata",
                          "quarantineFile",
                          "isOwner",
                          "thumbnailVersion"
                        ],
                        "additionalProperties": false
                      },
                      "description": "List of files"
                    },
                    "user": {
                      "description": "Uploader when listing one uploader’s files",
                      "$ref": "#/components/schemas/UserSummary"
                    }
                  },
                  "required": [
                    "count",
                    "results"
                  ],
                  "additionalProperties": false,
                  "description": "Response for listing files"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/folders/public/{shareIdentifier}": {
      "get": {
        "tags": [
          "Folders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "shareIdentifier",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "description": "UUID of the folder"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the folder"
                    },
                    "description": {
                      "description": "Description of the folder",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isNSFW": {
                      "type": "boolean",
                      "description": "Whether the folder is NSFW"
                    },
                    "createdAt": {
                      "description": "Date the folder was created",
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "updatedAt": {
                      "description": "Date the folder was last updated",
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "canDownloadZip": {
                      "type": "boolean"
                    },
                    "filesCount": {
                      "default": 0,
                      "description": "Number of files in the folder",
                      "type": "number"
                    },
                    "coverImage": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "uuid": {
                              "type": "string",
                              "description": "UUID of the file"
                            },
                            "identifier": {
                              "type": "string",
                              "description": "Identifier of the file"
                            },
                            "filename": {
                              "type": "string",
                              "description": "Filename of the file"
                            },
                            "createdAt": {
                              "description": "Date the file was created",
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                            },
                            "isNSFW": {
                              "type": "boolean"
                            },
                            "fileMetadata": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "uuid": {
                                      "type": "string",
                                      "description": "UUID of the file metadata"
                                    },
                                    "originalFilename": {
                                      "type": "string",
                                      "description": "Original filename of the file"
                                    },
                                    "mimeType": {
                                      "description": "MIME type of the file",
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "size": {
                                      "type": "number",
                                      "description": "Size of the file in bytes"
                                    },
                                    "originalWidth": {
                                      "description": "Width of the file in pixels",
                                      "type": [
                                        "number",
                                        "null"
                                      ]
                                    },
                                    "originalHeight": {
                                      "description": "Height of the file in pixels",
                                      "type": [
                                        "number",
                                        "null"
                                      ]
                                    },
                                    "thumbnailWidth": {
                                      "description": "Width of the thumbnail in pixels",
                                      "type": [
                                        "number",
                                        "null"
                                      ]
                                    },
                                    "thumbnailHeight": {
                                      "description": "Height of the thumbnail in pixels",
                                      "type": [
                                        "number",
                                        "null"
                                      ]
                                    },
                                    "processingStatus": {
                                      "type": "string",
                                      "enum": [
                                        "unknown",
                                        "pending",
                                        "completed",
                                        "failed",
                                        "skipped"
                                      ],
                                      "description": "Persisted preview processing outcome; unknown for files predating tracking"
                                    },
                                    "hash": {
                                      "description": "Hash of the file",
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "ip": {
                                      "description": "IP address of the uploader",
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "uuid",
                                    "originalFilename",
                                    "mimeType",
                                    "size",
                                    "originalWidth",
                                    "originalHeight",
                                    "thumbnailWidth",
                                    "thumbnailHeight",
                                    "processingStatus",
                                    "hash",
                                    "ip"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "thumbnailVersion": {
                              "description": "Version token for thumbnail cache busting",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "uuid",
                            "identifier",
                            "filename",
                            "createdAt",
                            "fileMetadata",
                            "thumbnailVersion"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "uuid",
                    "name",
                    "description",
                    "isNSFW",
                    "createdAt",
                    "updatedAt",
                    "canDownloadZip",
                    "filesCount",
                    "coverImage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/folders/public/{shareIdentifier}/files": {
      "get": {
        "tags": [
          "Folders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "description": "Number of items to return",
              "example": 50
            },
            "in": "query",
            "name": "limit"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Number of items to skip",
              "example": 0
            },
            "in": "query",
            "name": "offset"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "in": "query",
            "name": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "image",
                "video",
                "audio",
                "document",
                "other"
              ]
            },
            "in": "query",
            "name": "type"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "newest",
                "oldest",
                "name-asc",
                "name-desc",
                "largest",
                "smallest"
              ]
            },
            "in": "query",
            "name": "sort"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "shareIdentifier",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "default": 0,
                      "description": "Total number of results",
                      "type": "number"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "description": "UUID of the file"
                          },
                          "identifier": {
                            "type": "string",
                            "description": "Identifier of the file"
                          },
                          "filename": {
                            "type": "string",
                            "description": "Filename of the file"
                          },
                          "createdAt": {
                            "description": "Date the file was created",
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          },
                          "isNSFW": {
                            "type": "boolean"
                          },
                          "thumbnailVersion": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "fileMetadata": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "uuid": {
                                    "type": "string",
                                    "description": "UUID of the file metadata"
                                  },
                                  "mimeType": {
                                    "description": "MIME type of the file",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "size": {
                                    "type": "number",
                                    "description": "Size of the file in bytes"
                                  },
                                  "originalWidth": {
                                    "description": "Width of the file in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "originalHeight": {
                                    "description": "Height of the file in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "thumbnailWidth": {
                                    "description": "Width of the thumbnail in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "thumbnailHeight": {
                                    "description": "Height of the thumbnail in pixels",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "processingStatus": {
                                    "type": "string",
                                    "enum": [
                                      "unknown",
                                      "pending",
                                      "completed",
                                      "failed",
                                      "skipped"
                                    ],
                                    "description": "Persisted preview processing outcome; unknown for files predating tracking"
                                  },
                                  "hash": {
                                    "description": "Hash of the file",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "uuid",
                                  "mimeType",
                                  "size",
                                  "originalWidth",
                                  "originalHeight",
                                  "thumbnailWidth",
                                  "thumbnailHeight",
                                  "processingStatus",
                                  "hash"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "uuid",
                          "identifier",
                          "filename",
                          "createdAt",
                          "thumbnailVersion",
                          "fileMetadata"
                        ],
                        "additionalProperties": false
                      },
                      "description": "List of files"
                    }
                  },
                  "required": [
                    "count",
                    "results"
                  ],
                  "additionalProperties": false,
                  "description": "Response for listing files"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/folders/public/{shareIdentifier}/zip": {
      "get": {
        "tags": [
          "Folders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "shareIdentifier",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Public folder ZIP archive",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/folders/{uuid}/purge": {
      "post": {
        "tags": [
          "Folders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/folders/{uuid}": {
      "get": {
        "tags": [
          "Folders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "description": "UUID of the folder"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the folder"
                    },
                    "description": {
                      "description": "Description of the folder",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isNSFW": {
                      "type": "boolean",
                      "description": "Whether the folder is NSFW"
                    },
                    "createdAt": {
                      "description": "Date the folder was created",
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "updatedAt": {
                      "description": "Date the folder was last updated",
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "isOwner": {
                      "type": "boolean",
                      "description": "Whether the user is the owner of the folder"
                    }
                  },
                  "required": [
                    "uuid",
                    "name",
                    "description",
                    "isNSFW",
                    "createdAt",
                    "updatedAt",
                    "isOwner"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Folders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of the folder"
                  },
                  "description": {
                    "description": "Description of the folder",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "isNSFW": {
                    "type": "boolean",
                    "description": "Whether the folder is NSFW"
                  }
                },
                "additionalProperties": false,
                "description": "Body for patching an folder"
              }
            }
          },
          "description": "Body for patching an folder"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "description": "UUID of the folder"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the folder"
                    },
                    "description": {
                      "description": "Description of the folder",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isNSFW": {
                      "type": "boolean",
                      "description": "Whether the folder is NSFW"
                    },
                    "createdAt": {
                      "description": "Date the folder was created",
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "updatedAt": {
                      "description": "Date the folder was last updated",
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "isOwner": {
                      "type": "boolean",
                      "description": "Whether the user is the owner of the folder"
                    }
                  },
                  "required": [
                    "uuid",
                    "name",
                    "description",
                    "isNSFW",
                    "createdAt",
                    "updatedAt",
                    "isOwner"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Folders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/folders/{uuid}/share": {
      "post": {
        "tags": [
          "Folders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expiresAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Date the share expires"
                  },
                  "allowZipDownload": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false,
                "description": "Body for sharing a folder"
              }
            }
          },
          "description": "Body for sharing a folder"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FolderShare"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Folders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FolderShare"
                  },
                  "description": "Response for getting shares of an folder"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/folders/{uuid}/share/{shareUuid}": {
      "patch": {
        "tags": [
          "Folders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expiresAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Date the share expires"
                  },
                  "allowZipDownload": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false,
                "description": "Body for patching a share of an folder"
              }
            }
          },
          "description": "Body for patching a share of an folder"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "shareUuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FolderShare"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Folders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "shareUuid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/folders/{uuid}/zip": {
      "get": {
        "tags": [
          "Folders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Zip archive stream",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files/bulk-delete": {
      "post": {
        "tags": [
          "Files"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uuids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "UUIDs of the files to delete"
                  }
                },
                "required": [
                  "uuids"
                ],
                "additionalProperties": false,
                "description": "Body for bulk deleting files"
              }
            }
          },
          "description": "Body for bulk deleting files"
        },
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files/bulk-quarantine": {
      "post": {
        "tags": [
          "Files"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uuids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "UUIDs of the files to quarantine"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "required": [
                  "uuids"
                ],
                "additionalProperties": false,
                "description": "Body for bulk quarantining files"
              }
            }
          },
          "description": "Body for bulk quarantining files"
        },
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files/bulk-unquarantine": {
      "post": {
        "tags": [
          "Files"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uuids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "UUIDs of the files to unquarantine"
                  }
                },
                "required": [
                  "uuids"
                ],
                "additionalProperties": false,
                "description": "Body for bulk unquarantining files"
              }
            }
          },
          "description": "Body for bulk unquarantining files"
        },
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files/bulk-regenerate-thumbnails": {
      "post": {
        "tags": [
          "Files"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uuids": {
                    "minItems": 1,
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    }
                  }
                },
                "required": [
                  "uuids"
                ],
                "additionalProperties": false,
                "description": "Body for bulk regenerating thumbnails"
              }
            }
          },
          "description": "Body for bulk regenerating thumbnails"
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "regenerated": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "failed": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "skipped": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "regenerated",
                    "failed",
                    "skipped"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files/{uuid}/quarantine": {
      "post": {
        "tags": [
          "Files"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "additionalProperties": false,
                "description": "Body for quarantining a file"
              }
            }
          },
          "description": "Body for quarantining a file"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Response for quarantining a file",
                  "$ref": "#/components/schemas/QuarantineFile"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files/{uuid}": {
      "patch": {
        "tags": [
          "Files"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "source": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2048,
                        "description": "Where the file came from: a URL or other reference. Blank clears the source."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceCreator": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200,
                        "description": "Creator or artist name supplied by the file owner."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceCreatorUrl": {
                    "description": "HTTP(S) creator profile or portfolio URL. Blank or null clears it.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2048
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceTitle": {
                    "description": "Original artwork or post title. Blank or null clears it.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceNotes": {
                    "description": "Plain-text context or attribution notes. Blank or null clears it.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourcePublishedDate": {
                    "description": "Original publication date as YYYY-MM-DD, without a time or timezone. Blank or null clears it.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sourceCreator": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sourceCreatorUrl": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sourceTitle": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sourceNotes": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sourcePublishedDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "source",
                    "sourceCreator",
                    "sourceCreatorUrl",
                    "sourceTitle",
                    "sourceNotes",
                    "sourcePublishedDate"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "description": "UUID of the file"
                    },
                    "identifier": {
                      "type": "string",
                      "description": "Identifier of the file"
                    },
                    "filename": {
                      "type": "string",
                      "description": "Filename of the file"
                    },
                    "createdAt": {
                      "description": "Date the file was created",
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "fileMetadata": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/FileMetadata"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fileExifMetadata": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/FileExifMetadata"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "quarantineFile": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/QuarantineFile"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "thumbnailVersion": {
                      "description": "Version token for thumbnail cache busting",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UuidName"
                      },
                      "description": "Tags the file belongs to"
                    },
                    "folders": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UuidName"
                      },
                      "description": "Folders the file belongs to"
                    }
                  },
                  "required": [
                    "uuid",
                    "identifier",
                    "filename",
                    "createdAt",
                    "fileMetadata",
                    "fileExifMetadata",
                    "quarantineFile",
                    "thumbnailVersion",
                    "tags",
                    "folders"
                  ],
                  "additionalProperties": false,
                  "description": "Response for getting a file"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files/{uuid}/download": {
      "get": {
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "File download stream",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files/{uuid}/regenerate-thumbnail": {
      "post": {
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "uuid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    }
  }
}
