openapi: 3.0.3
info:
  title: UDMG Web Transfer Client (WTC)
  description: UDMG Web Transfer client (WTC)
  contact:
    name: Support
    url: https://www.stonebranch.com
    email: support@stonebranch.com
  version: 3.3.0
servers:
- url: http://localhost:8443/
security:
- BearerAuth: []
tags:
- name: Authentication
  description: User authentication and session management
- name: Files
  description: File and folder operations
- name: Sharing
  description: File sharing operations
- name: Profile
  description: User profile management
- name: Public
  description: Public share access (no auth required)
paths:
  /workspace/{domainId}/login:
    post:
      tags:
      - Authentication
      summary: User login
      operationId: auth-login
      parameters:
      - name: domainId
        in: path
        description: Domain UUID / Name
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/login-request"
        required: true
      responses:
        "200":
          description: Successful login
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/login-response"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security: []
  /workspace/{domainId}/sso:
    get:
      tags:
      - Authentication
      summary: Authentication SSO
      description: Authentication SSO
      operationId: auth-sso-workspace-redirect
      parameters:
      - name: domainId
        in: path
        description: Domain UUID / Name
        required: true
        schema:
          type: string
      responses:
        "303":
          description: SSO Redirection
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/4xx"
  /workspace/{domainId}/sso/callback:
    post:
      tags:
      - Authentication
      summary: Authentication SSO Callback
      description: Authentication SSO Callback
      operationId: auth-sso-saml-callback
      parameters:
      - name: domainId
        in: path
        description: Domain UUID / Name
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Success Authentication
          headers:
            Set-Cookie:
              schema:
                type: string
                example: AUTH_TOKEN=SEVSRSBUT0tFTg==; Path=/
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Authentication
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/4xx"
        "403":
          description: Authentication User
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/5xx"
  /workspace/{domainId}/sso/providers:
    get:
      tags:
      - Authentication
      summary: Authentication SSO
      description: Authentication SSO Provider
      operationId: auth-sso-workspace-provider
      parameters:
      - name: domainId
        in: path
        description: Domain UUID / Name
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Authentication Information
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/sso-provider"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/4xx"
  /api/auth/otp:
    get:
      tags:
      - Authentication
      summary: Get TOTP setup information
      description: Returns TOTP key and QR code for 2FA setup
      operationId: auth-otp
      parameters:
      - name: session
        in: query
        description: Session ID for 2FA setup
        required: true
        schema:
          type: string
      responses:
        "200":
          description: TOTP setup information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/account-2fa-setup"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security:
      - BearerAuth: []
  /api/auth/otp/validate:
    post:
      tags:
      - Authentication
      summary: Validate TOTP code
      description: Validates TOTP code and completes 2FA setup or login
      operationId: auth-otp-validate
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/account-2fa-validate-request"
        required: true
      responses:
        "200":
          description: TOTP validation successful
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/login-response"
        "400":
          description: Bad Request - Invalid code or session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized - Invalid TOTP code
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "404":
          description: Not Found - Session not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security: []
  /api/auth/refresh:
    post:
      tags:
      - Authentication
      summary: Refresh access token
      operationId: auth-refresh
      responses:
        "200":
          description: Successful Refresh access token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/login-response"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security:
      - BearerAuth: []
  /api/files:
    get:
      tags:
      - Files
      summary: List files and folders
      operationId: folder-list
      parameters:
      - name: path
        in: query
        description: Directory path to list (required)
        required: true
        schema:
          pattern: ^/.*
          type: string
          example: /
      - name: page
        in: query
        description: Page number
        schema:
          type: integer
      - name: pageSize
        in: query
        description: Page size
        schema:
          type: integer
      responses:
        "200":
          description: List of files and folders
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/file-items"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
        "503":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security:
      - BearerAuth: []
    post:
      tags:
      - Files
      summary: Upload files
      operationId: folder-upload
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: "#/components/schemas/api_files_body"
        required: true
      responses:
        "200":
          description: Files uploaded successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/upload-files-response"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
        "503":
          description: Service not available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security:
      - BearerAuth: []
  /api/files/folder:
    post:
      tags:
      - Files
      summary: Create a new folder
      operationId: folder-create
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/create-folder-request"
        required: true
      responses:
        "200":
          description: Folder created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/file-item"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security:
      - BearerAuth: []
  /api/files/items:
    get:
      tags:
      - Files
      summary: Get file metadata
      operationId: file-item-metadata
      parameters:
      - name: path
        in: query
        description: Directory path to list (required)
        required: true
        schema:
          pattern: ^/.*
          type: string
          example: /
      responses:
        "200":
          description: File metadata
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/file-metadata"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security:
      - BearerAuth: []
    put:
      tags:
      - Files
      summary: Rename file or folder
      operationId: file-item-rename
      parameters:
      - name: path
        in: query
        description: Directory path to list (required)
        required: true
        schema:
          pattern: ^/.*
          type: string
          example: /
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/rename-file-request"
        required: true
      responses:
        "200":
          description: Item renamed successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/file-metadata"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
    delete:
      tags:
      - Files
      summary: Delete file or folder
      operationId: file-item-delete
      parameters:
      - name: path
        in: query
        description: Directory path to list (required)
        required: true
        schema:
          pattern: ^/.*
          type: string
          example: /
      responses:
        "200":
          description: Item deleted successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/2xx"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
  /api/files/batch-delete:
    post:
      tags:
      - Files
      summary: Delete multiple files/folders
      operationId: batch-delete
      parameters:
      - name: path
        in: query
        description: Folder Path
        required: true
        schema:
          pattern: ^/.*
          type: string
          example: /directory
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/batch-delete-request"
        required: true
      responses:
        "200":
          description: File metadata
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/batch-delete-response"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security:
      - BearerAuth: []
  /api/files/download:
    get:
      tags:
      - Files
      summary: Download a file
      operationId: download-file
      parameters:
      - name: path
        in: query
        description: Full path to the file including filename (required)
        required: true
        schema:
          pattern: ^/.*
          type: string
          example: /documents/document.pdf
      responses:
        "200":
          description: File content
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security:
      - BearerAuth: []
  /api/shares:
    get:
      tags:
      - Sharing
      summary: List user's shared files
      operationId: shared-file-list
      parameters:
      - name: search
        in: query
        description: Search query
        schema:
          type: string
      - name: sortBy
        in: query
        description: Sort field
        schema:
          type: string
          default: name
          enum:
          - name
          - modified
          - size
          - type
      - name: sortOrder
        in: query
        description: Sort order
        schema:
          type: string
          default: asc
          enum:
          - asc
          - desc
      - name: page
        in: query
        description: Page number
        schema:
          type: integer
      - name: pageSize
        in: query
        description: Page size
        schema:
          type: integer
      responses:
        "200":
          description: List of shared files
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/shared-file-list-paged"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security:
      - BearerAuth: []
    post:
      tags:
      - Sharing
      summary: Share files
      operationId: share-create-request
      parameters:
      - name: path
        in: query
        description: Directory path to list (required)
        required: true
        schema:
          pattern: ^/.*
          type: string
          example: /
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/share-create-request"
        required: true
      responses:
        "200":
          description: Files shared successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/share-create-response"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security:
      - BearerAuth: []
  /api/shares/link/{id}/revoke:
    put:
      tags:
      - Sharing
      summary: Revoke share link
      operationId: share-file-revoke
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Share link revoke
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/shared-file"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security:
      - BearerAuth: []
  /api/shares/stats:
    get:
      tags:
      - Sharing
      summary: Get sharing statistics
      operationId: share-stats
      responses:
        "200":
          description: Sharing statistics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/share-stats-response"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security:
      - BearerAuth: []
  /api/profile:
    get:
      tags:
      - Profile
      summary: Get user profile
      operationId: user-profile
      responses:
        "200":
          description: User profile
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/user-profile"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
  /api/profile/change-password:
    post:
      tags:
      - Profile
      summary: Change user password
      operationId: profile-change-password
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/profile_changepassword_body"
        required: true
      responses:
        "200":
          description: Password changed successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/inline_response_200"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
  /public/{linkId}/metadata:
    get:
      tags:
      - Public
      summary: Get public share metadata
      operationId: public-metadata
      parameters:
      - name: linkId
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Share metadata
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/public-share-metadata"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security: []
  /public/{linkId}/download:
    post:
      tags:
      - Public
      summary: Download public shared file
      operationId: share-download
      parameters:
      - name: linkId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/public-download-request"
      responses:
        "200":
          description: File download
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/4xx"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/5xx"
      security: []
components:
  schemas:
    login-request:
      title: Login Request
      required:
      - password
      - username
      type: object
      properties:
        username:
          title: Username
          minLength: 1
          type: string
          description: User's username
        password:
          title: Password
          minLength: 1
          type: string
          description: User's password
      description: User login credentials
    login-response:
      title: Login Response
      type: object
      properties:
        accessToken:
          $ref: "#/components/schemas/Token Details"
        refreshToken:
          $ref: "#/components/schemas/Token Details"
      description: Response containing authentication tokens and user information
    "4xx":
      required:
      - status
      type: object
      properties:
        status:
          title: Status code
          type: integer
        type:
          title: Type
          type: string
        title:
          title: Title
          type: string
        messageCode:
          title: Internal message code
          type: string
        detail:
          title: Details
          type: string
        instance:
          title: Instance
          type: string
        errors:
          title: Errors
          type: object
      additionalProperties: false
    "5xx":
      required:
      - status
      type: object
      properties:
        status:
          title: Status code
          type: integer
        type:
          title: Type
          type: string
        title:
          title: Title
          type: string
        messageCode:
          title: Internal message code
          type: string
        detail:
          title: Details
          type: string
        instance:
          title: Instance
          type: string
        errors:
          title: Errors
          type: object
      additionalProperties: false
    sso-provider:
      title: Authentication Provider
      required:
      - provider
      type: object
      properties:
        provider:
          title: Provider name
          minLength: 1
          type: string
      description: Authentication provider available.
    account-2fa-setup:
      title: Account 2FA Setup
      required:
      - secret
      type: object
      properties:
        secret:
          title: TOTP Secret
          type: string
          description: TOTP secret key (base32 encoded)
        issuer:
          title: 2FA Issuer
          type: string
        image:
          title: Image QR Secret Key
          type: string
        account:
          title: Account Name
          type: string
      description: TOTP setup information
    account-2fa-validate-request:
      title: Account 2FA Validate Request
      required:
      - code
      - session
      type: object
      properties:
        session:
          title: Session ID
          type: string
          description: Session identifier for 2FA validation
        code:
          title: TOTP Code
          pattern: "^[0-9]{6}$"
          type: string
          description: 6-digit TOTP code from authenticator app
      description: Request to validate TOTP code
    file-items:
      required:
      - page
      - pageSize
      - path
      - pathPermissions
      - totalItems
      - totalPages
      type: object
      properties:
        path:
          type: string
        pathPermissions:
          $ref: "#/components/schemas/Permissions"
        items:
          title: Files Items
          type: array
          items:
            $ref: "#/components/schemas/File Item"
        totalItems:
          title: Total Items
          type: integer
          description: Total number of items
        page:
          title: Current Page
          type: integer
          description: Current page number
        pageSize:
          title: Page Size
          type: integer
          description: Number of items per page
        totalPages:
          title: Total Pages
          type: integer
          description: Total number of pages
      additionalProperties: false
    upload-files-response:
      title: Upload Files Response
      type: object
      properties:
        uploaded:
          title: Uploaded
          type: array
          description: Successfully uploaded files
          items:
            $ref: "#/components/schemas/File Item"
        failed:
          title: Failed
          type: array
          description: Files that failed to upload
          items:
            $ref: "#/components/schemas/Upload Failed Item"
      description: Response from a file upload operation
    create-folder-request:
      title: Create Folder Request
      required:
      - name
      - path
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Name of the folder to create
        path:
          title: Path
          minLength: 1
          pattern: ^/.*
          type: string
          description: Path where the folder should be created
      description: Request to create a new folder
    file-item:
      title: File Item
      type: object
      properties:
        name:
          title: Name
          type: string
          description: File or folder name
        type:
          title: Type
          type: string
          description: Type of item (file or folder)
          enum:
          - file
          - folder
        size:
          title: Size
          type: integer
          description: File size in bytes (null for folders)
        modified:
          title: Modified
          type: string
          description: Last modification time
          format: date-time
        path:
          title: Path
          type: string
          description: Folder Path
        mimeType:
          title: MIME Type
          type: string
          description: MIME type of the file
        isShared:
          title: Is Shared
          type: boolean
          description: Whether the file is shared
        permissions:
          $ref: "#/components/schemas/Permissions_1"
      description: File or folder item information
    file-metadata:
      title: File Metadata
      type: object
      properties:
        name:
          title: Name
          type: string
          description: File or folder name
        type:
          title: Type
          type: string
          description: Type of item (file or folder)
          enum:
          - file
          - folder
        size:
          title: Size
          type: integer
          description: File size in bytes (null for folders)
        modified:
          title: Modified
          type: string
          description: Last modification time
          format: date-time
        path:
          title: Path
          type: string
          description: Folder Path
        mimeType:
          title: MIME Type
          type: string
          description: MIME type of the file
        isShared:
          title: Is Shared
          type: boolean
          description: Whether the file is shared
        permissions:
          $ref: "#/components/schemas/Permissions_1"
        checksum:
          title: Checksum
          type: string
          description: File checksum for integrity verification
        checksumAlgo:
          title: Checksum Algorithm
          type: string
          description: File checksum algorithm used for verification
      description: Extended file metadata information
    rename-file-request:
      title: Rename File Request
      required:
      - name
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: New name for the file or folder
      description: Request to rename a file or folder
    "2xx":
      required:
      - status
      type: object
      properties:
        status:
          title: Status code
          type: integer
        type:
          title: Type
          type: string
        title:
          title: Title
          type: string
        messageCode:
          title: Internal message code
          type: string
        detail:
          title: Details
          type: string
        instance:
          title: Instance
          type: string
        errors:
          title: Errors
          type: object
      additionalProperties: false
    batch-delete-request:
      title: Batch Delete Request
      required:
      - paths
      type: object
      properties:
        paths:
          title: Paths
          minItems: 1
          type: array
          description: Paths of files or folders to delete
          items:
            type: string
      description: Request to delete multiple files or folders
    batch-delete-response:
      title: Batch Delete Response
      type: object
      properties:
        deleted:
          title: Deleted
          type: array
          description: IDs of successfully deleted files or folders
          items:
            type: string
        failed:
          title: Failed
          type: array
          description: Files or folders that failed to delete
          items:
            $ref: "#/components/schemas/Batch Delete Failed Item"
      description: Response from a batch delete operation
    shared-file-list-paged:
      required:
      - page
      - pageSize
      - totalItems
      - totalPages
      type: object
      properties:
        items:
          title: Items
          type: array
          description: List of shared files for the current page
          items:
            $ref: "#/components/schemas/Shared File"
        totalItems:
          title: Total Items
          type: integer
          description: Total number of shared files
        page:
          title: Current Page
          type: integer
          description: Current page number
        pageSize:
          title: Page Size
          type: integer
          description: Number of items per page
        totalPages:
          title: Total Pages
          type: integer
          description: Total number of pages
      additionalProperties: false
    share-create-request:
      title: Create Share Request
      required:
      - files
      type: object
      properties:
        files:
          title: File Paths
          minItems: 1
          type: array
          description: Path of files to share
          items:
            type: string
        message:
          title: Message
          type: string
          description: Optional message to include with the share
        expiration:
          $ref: "#/components/schemas/Share Expiration"
        maxDownloads:
          $ref: "#/components/schemas/Max Downloads"
        password:
          title: Password
          type: string
          description: Optional password protection
      description: Request to share files
    share-create-response:
      required:
      - shared
      type: object
      properties:
        shared:
          type: array
          items:
            $ref: "#/components/schemas/Shared File"
        failed:
          type: array
          items:
            $ref: "#/components/schemas/Error shares"
      additionalProperties: false
    shared-file:
      title: Shared File
      type: object
      properties:
        uuid:
          title: UUID
          type: string
          description: Unique identifier for the shared file
        filename:
          title: File name
          type: string
          description: File name
        path:
          title: Path
          type: string
          description: File path
        size:
          title: Size
          type: integer
          description: File size in bytes
        sender:
          title: Sender
          type: string
          description: Username of the sender
        message:
          title: Message
          type: string
          description: Message included with the share
        sharedAt:
          title: Shared Date
          type: string
          description: When the file was shared
          format: date-time
        expiresAt:
          title: Expires At
          type: string
          description: When the share expires
          format: date-time
        downloadCount:
          title: Download Count
          minimum: 0
          type: integer
          description: Number of times the file has been downloaded
        maxDownloads:
          title: Max Downloads
          type: number
          description: Maximum number of downloads allowed
        isPasswordProtected:
          title: Is Password Protected
          type: boolean
          description: Whether the share is password protected
        isActive:
          title: Is Active
          type: boolean
          description: Whether the share is active
        shareLink:
          title: Share Link
          type: string
          description: URL to access the shared file
          format: uri
        shareId:
          title: Share ID
          type: string
          description: Share ID
      description: Information about a shared file
    share-stats-response:
      title: Share Statistics
      type: object
      properties:
        total:
          title: Total Shares
          minimum: 0
          type: integer
          description: Total number of shares created by the user
        active:
          title: Active Shares
          minimum: 0
          type: integer
          description: Number of currently active shares
        completed:
          title: Completed Shares
          minimum: 0
          type: integer
          description: Number of currently completed shares
        revoked:
          title: Revoked
          minimum: 0
          type: integer
          description: Number of shares revoked
        expired:
          title: Expired Shares
          minimum: 0
          type: integer
          description: Number of shares expired
      description: Statistics about user's shared files
    user-profile:
      title: User Profile
      type: object
      properties:
        uuid:
          title: UUID
          type: string
          description: Unique identifier for the user
        username:
          title: Username
          type: string
          description: User's username
        email:
          title: Email
          type: string
          description: User's email address
          format: email
        createdAt:
          title: Created At
          type: string
          description: When the user account was created
          format: date-time
      description: Detailed user profile information
    public-share-metadata:
      title: Public Share Metadata
      type: object
      properties:
        fileName:
          title: File Name
          type: string
          description: Name of the shared file
        fileSize:
          title: File Size
          minimum: 0
          type: integer
          description: Size of the file in bytes
        sender:
          title: Sender
          type: string
          description: Username of the sender
        message:
          title: Message
          type: string
          description: Message included with the share
        sharedAt:
          title: Shared At
          type: string
          description: When the file was shared
          format: date-time
        expiresAt:
          title: Expires At
          type: string
          description: When the share expires
          format: date-time
        downloadCount:
          title: Download Count
          minimum: 0
          type: integer
          description: Number of times the file has been downloaded
        maxDownloads:
          title: Max Downloads
          minimum: 0
          type: integer
          description: Maximum number of downloads allowed
        isPasswordProtected:
          title: Is Password Protected
          type: boolean
          description: Whether the share is password protected
      description: Metadata about a publicly shared file
    public-download-request:
      title: Public Download Request
      type: object
      properties:
        password:
          title: Password
          type: string
          description: Password if the share is password protected
      description: Request to download a publicly shared file
    api_files_body:
      type: object
      properties:
        files:
          type: array
          items:
            type: string
            format: binary
        path:
          type: string
          description: Target directory path
          default: /
    profile_changepassword_body:
      required:
      - currentPassword
      - newPassword
      type: object
      properties:
        currentPassword:
          type: string
          format: password
        newPassword:
          type: string
          format: password
    inline_response_200:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
    Token Details:
      title: Token Details
      type: object
      properties:
        token:
          title: Token
          type: string
          description: JWT token string
        expiresAt:
          title: Expiration
          type: string
          description: Token expiration timestamp
          format: date-time
      description: JWT token information
    Permissions:
      title: Permissions
      type: object
      properties:
        read:
          title: Read
          type: boolean
          description: Read permission
        write:
          title: Write
          type: boolean
          description: Write permission
        delete:
          title: Delete
          type: boolean
          description: Delete permission
        mkdir:
          title: Create directory
          type: boolean
          description: Create directory
        rmdir:
          title: Remove directory
          type: boolean
          description: Remove directory
        overwrite:
          title: Overwrite file
          type: boolean
          description: Overwrite file
        rename:
          title: Rename file/folder
          type: boolean
          description: Rename file/folder
        list:
          title: List folder
          type: boolean
          description: List folder
        share:
          title: Share file/folder
          type: boolean
          description: Share file/folder
    Permissions_1:
      title: Permissions
      type: object
      properties:
        read:
          title: Read
          type: boolean
          description: Read permission
        write:
          title: Write
          type: boolean
          description: Write permission
        delete:
          title: Delete
          type: boolean
          description: Delete permission
        mkdir:
          title: Create directory
          type: boolean
          description: Create directory
        rmdir:
          title: Remove directory
          type: boolean
          description: Remove directory
        overwrite:
          title: Overwrite file
          type: boolean
          description: Overwrite file
        rename:
          title: Rename file/folder
          type: boolean
          description: Rename file/folder
        list:
          title: List folder
          type: boolean
          description: List folder
        share:
          title: Share file/folder
          type: boolean
          description: Share file/folder
      description: File or folder permissions
    File Item:
      title: File Item
      type: object
      properties:
        name:
          title: Name
          type: string
          description: File or folder name
        type:
          title: Type
          type: string
          description: Type of item (file or folder)
          enum:
          - file
          - folder
        size:
          title: Size
          type: integer
          description: File size in bytes (null for folders)
        modified:
          title: Modified
          type: string
          description: Last modification time
          format: date-time
        path:
          title: Path
          type: string
          description: Folder Path
        mimeType:
          title: MIME Type
          type: string
          description: MIME type of the file
        isShared:
          title: Is Shared
          type: boolean
          description: Whether the file is shared
        permissions:
          $ref: "#/components/schemas/Permissions_1"
      description: File or folder item information
    Upload Failed Item:
      title: Upload Failed Item
      type: object
      properties:
        filename:
          title: Filename
          type: string
          description: Name of the file that failed to upload
        error:
          title: Error
          type: string
          description: Error message explaining why the upload failed
      description: Information about a file that failed to upload
    Batch Delete Failed Item:
      title: Batch Delete Failed Item
      type: object
      properties:
        uuid:
          title: UUID
          type: string
          description: ID of the file or folder that failed to delete
        error:
          title: Error
          type: string
          description: Error message explaining why the deletion failed
      description: Information about a file or folder that failed to delete
    Shared File:
      title: Shared File
      type: object
      properties:
        uuid:
          title: UUID
          type: string
          description: Unique identifier for the shared file
        filename:
          title: File name
          type: string
          description: File name
        path:
          title: Path
          type: string
          description: File path
        size:
          title: Size
          type: integer
          description: File size in bytes
        sender:
          title: Sender
          type: string
          description: Username of the sender
        message:
          title: Message
          type: string
          description: Message included with the share
        sharedAt:
          title: Shared Date
          type: string
          description: When the file was shared
          format: date-time
        expiresAt:
          title: Expires At
          type: string
          description: When the share expires
          format: date-time
        downloadCount:
          title: Download Count
          minimum: 0
          type: integer
          description: Number of times the file has been downloaded
        maxDownloads:
          title: Max Downloads
          type: number
          description: Maximum number of downloads allowed
        isPasswordProtected:
          title: Is Password Protected
          type: boolean
          description: Whether the share is password protected
        isActive:
          title: Is Active
          type: boolean
          description: Whether the share is active
        shareLink:
          title: Share Link
          type: string
          description: URL to access the shared file
          format: uri
        shareId:
          title: Share ID
          type: string
          description: Share ID
      description: Information about a shared file
    Share Expiration:
      title: Share Expiration
      required:
      - duration
      type: object
      properties:
        duration:
          title: Duration
          type: string
          description: How long the share should be valid
          default: 7d
          enum:
          - 1h
          - 1d
          - 3d
          - 7d
          - 30d
      description: Expiration settings for a share
    Max Downloads:
      title: Max Downloads
      required:
      - type
      type: object
      properties:
        type:
          title: Type
          type: string
          description: Type of download limit
          default: limited
          enum:
          - limited
          - unlimited
        count:
          title: Count
          minimum: 1
          type: integer
          description: Maximum number of downloads (required if type is 'limited')
          default: 1
      description: Maximum download settings for a share
    Error shares:
      title: Error shares
      type: object
      properties:
        path:
          title: Path
          type: string
          description: Filename
        failed:
          title: Failed Error
          type: string
          description: Files that failed to share
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
