openapi: 3.1.0
info:
  title: SkillFlaw
  version: '0.1'
paths:
  /api/v1/build_public_tmp/{job_id}/events:
    get:
      tags:
        - Chat
      summary: Get Public Build Events
      description: Get events for a public build job without requiring authentication.
      operationId: get_public_build_events_api_v1_build_public_tmp__job_id__events_get
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            title: Job Id
        - name: event_delivery
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/EventDeliveryType'
            default: streaming
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/build_public_tmp/{job_id}/cancel:
    post:
      tags:
        - Chat
      summary: Cancel Public Build
      description: Cancel a public build job without requiring authentication.
      operationId: cancel_public_build_api_v1_build_public_tmp__job_id__cancel_post
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            title: Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelFlowResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/build_public_tmp/{flow_id}/messages:
    get:
      tags:
        - Chat
      summary: Get Public Chat Messages
      operationId: get_public_chat_messages_api_v1_build_public_tmp__flow_id__messages_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
        - name: session_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Session Id
        - name: sender
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Sender
        - name: sender_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Sender Name
        - name: order_by
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: id
            title: Order By
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessageResponse'
                title: >-
                  Response Get Public Chat Messages Api V1 Build Public Tmp 
                  Flow Id  Messages Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/build_public_tmp/{flow_id}/flow:
    post:
      tags:
        - Chat
      summary: Build Public Tmp
      description: >-
        Build a public flow without requiring authentication.


        This endpoint is specifically for public flows that don't require
        authentication.

        It validates the public flow and runs it using the original flow ID so

        messages and sessions remain manageable by flow_id.


        The endpoint:

        1. Verifies the requested flow is marked as public in the database

        2. Uses the flow owner's permissions to build the flow


        Requirements:

        - The flow must be marked as PUBLIC in the database

        - The request must include a client_id cookie


        Args:
            flow_id: UUID of the public flow to build
            background_tasks: Background tasks manager
            inputs: Optional input values for the flow
            data: Optional flow data
            files: Optional files to include
            stop_component_id: Optional ID of component to stop at
            start_component_id: Optional ID of component to start from
            log_builds: Whether to log the build process
            flow_name: Optional name for the flow
            request: FastAPI request object (needed for cookie access)
            queue_service: Queue service for job management
            event_delivery: Optional event delivery type - default is streaming

        Returns:
            Dict with job_id that can be used to poll for build status
      operationId: build_public_tmp_api_v1_build_public_tmp__flow_id__flow_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
        - name: stop_component_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Stop Component Id
        - name: start_component_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Start Component Id
        - name: log_builds
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            default: true
            title: Log Builds
        - name: flow_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Flow Name
        - name: event_delivery
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/EventDeliveryType'
            default: polling
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_build_public_tmp_api_v1_build_public_tmp__flow_id__flow_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/files/profile_pictures/{folder_name}/{file_name}:
    get:
      tags:
        - Files
      summary: Download Profile Picture
      description: |-
        Download profile picture from local filesystem.

        Profile pictures are first looked up in config_dir/profile_pictures/,
        then fallback to the package's bundled profile_pictures directory.
      operationId: >-
        download_profile_picture_api_v1_files_profile_pictures__folder_name___file_name__get
      parameters:
        - name: folder_name
          in: path
          required: true
          schema:
            type: string
            title: Folder Name
        - name: file_name
          in: path
          required: true
          schema:
            type: string
            title: File Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/files/profile_pictures/list:
    get:
      tags:
        - Files
      summary: List Profile Pictures
      description: |-
        List profile pictures from local filesystem.

        Profile pictures are first looked up in config_dir/profile_pictures/,
        then fallback to the package's bundled profile_pictures directory.
      operationId: list_profile_pictures_api_v1_files_profile_pictures_list_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/flows/public_flow/{flow_id}:
    get:
      tags:
        - Flows
      summary: Read Public Flow
      description: Read a chat-accessible flow.
      operationId: read_public_flow_api_v1_flows_public_flow__flow_id__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/build/{flow_id}/flow:
    post:
      tags:
        - Chat
      summary: Build Flow
      description: >-
        Build and process a flow, returning a job ID for event polling.


        This endpoint requires authentication through the CurrentActiveUser
        dependency.

        For public flows that don't require authentication, use the
        /build_public_tmp/flow_id/flow endpoint.


        Args:
            flow_id: UUID of the flow to build
            background_tasks: Background tasks manager
            inputs: Optional input values for the flow
            data: Optional flow data
            files: Optional files to include
            stop_component_id: Optional ID of component to stop at
            start_component_id: Optional ID of component to start from
            log_builds: Whether to log the build process
            current_user: The authenticated user
            queue_service: Queue service for job management
            flow_name: Optional name for the flow
            event_delivery: Optional event delivery type - default is streaming
            request: FastAPI request object used to derive client metadata such as IP

        Returns:
            Dict with job_id that can be used to poll for build status
      operationId: build_flow_api_v1_build__flow_id__flow_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
        - name: stop_component_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Stop Component Id
        - name: start_component_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Start Component Id
        - name: log_builds
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Log Builds
        - name: flow_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Flow Name
        - name: event_delivery
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/EventDeliveryType'
            default: polling
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_build_flow_api_v1_build__flow_id__flow_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/build/{job_id}/events:
    get:
      tags:
        - Chat
      summary: Get Build Events
      description: |-
        Get events for a specific build job.

        Requires authentication to prevent unauthorized access to build events.
      operationId: get_build_events_api_v1_build__job_id__events_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            title: Job Id
        - name: event_delivery
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/EventDeliveryType'
            default: streaming
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/build/{job_id}/cancel:
    post:
      tags:
        - Chat
      summary: Cancel Build
      description: |-
        Cancel a specific build job.

        Requires authentication to prevent unauthorized build cancellation.
      operationId: cancel_build_api_v1_build__job_id__cancel_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            title: Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelFlowResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/all:
    get:
      tags:
        - Base
      summary: Get All
      description: |-
        Retrieve all component types with compression for better performance.

        Returns a compressed response containing all available component types.
      operationId: get_all_api_v1_all_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/run_dev/{flow_id_or_name}:
    post:
      tags:
        - Base
      summary: Simplified Run Dev Flow
      operationId: simplified_run_dev_flow_api_v1_run_dev__flow_id_or_name__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id_or_name
          in: path
          required: true
          schema:
            type: string
            title: Flow Id Or Name
        - name: stream
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Stream
        - name: user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: integer
              - type: 'null'
            title: User Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_simplified_run_dev_flow_api_v1_run_dev__flow_id_or_name__post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/run/online/{flow_id_or_name}:
    post:
      tags:
        - Base
      summary: Simplified Run Online Flow
      operationId: simplified_run_online_flow_api_v1_run_online__flow_id_or_name__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id_or_name
          in: path
          required: true
          schema:
            type: string
            title: Flow Id Or Name
        - name: stream
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Stream
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_simplified_run_online_flow_api_v1_run_online__flow_id_or_name__post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/run/release/{flow_id_or_name}:
    post:
      tags:
        - Base
      summary: Simplified Run Release Flow
      operationId: simplified_run_release_flow_api_v1_run_release__flow_id_or_name__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id_or_name
          in: path
          required: true
          schema:
            type: string
            title: Flow Id Or Name
        - name: v
          in: query
          required: true
          schema:
            type: string
            title: V
        - name: stream
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Stream
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_simplified_run_release_flow_api_v1_run_release__flow_id_or_name__post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/run/{flow_id_or_name}:
    post:
      tags:
        - Base
      summary: Simplified Run Flow
      description: >-
        Executes a specified flow by ID with support for streaming and telemetry
        (API key auth).


        This endpoint executes a flow identified by ID or name, with options for
        streaming the response

        and tracking execution metrics. It handles both streaming and
        non-streaming execution modes.

        This endpoint uses API key authentication (Bearer token).


        Args:
            background_tasks (BackgroundTasks): FastAPI background task manager
            flow (FlowRead | None): The flow to execute, loaded via dependency
            input_request (SimplifiedAPIRequest | None): Input parameters for the flow
            stream (bool): Whether to stream the response
            api_key_user (UserRead): Authenticated user from API key
            context (dict | None): Optional context to pass to the flow
            http_request (Request): The incoming HTTP request for extracting global variables

        Returns:
            Union[StreamingResponse, RunResponse]: Either a streaming response for real-time results
            or a RunResponse with the complete execution results

        Raises:
            HTTPException: For flow not found (404) or invalid input (400)
            APIException: For internal execution errors (500)

        Notes:
            - Supports both streaming and non-streaming execution modes
            - Tracks execution time and success/failure via telemetry
            - Handles graceful client disconnection in streaming mode
            - Provides detailed error handling with appropriate HTTP status codes
            - Extracts global variables from- Extracts global variables from HTTP headers with prefix X-SKILLFLAW-GLOBAL-VAR-*
            - Merges extracted variables with the context parameter as "request_variables"
            - In streaming mode, uses EventManager to handle events:
                - "add_message": New messages during execution
                - "token": Individual tokens during streaming
                - "end": Final execution result
            - Authentication: Requires API key (Bearer token)
      operationId: simplified_run_flow_api_v1_run__flow_id_or_name__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id_or_name
          in: path
          required: true
          schema:
            type: string
            title: Flow Id Or Name
        - name: stream
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Stream
        - name: user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: integer
              - type: 'null'
            title: User Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_simplified_run_flow_api_v1_run__flow_id_or_name__post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/webhook/{flow_id_or_name}:
    post:
      tags:
        - Base
      summary: Webhook Run Flow
      description: |-
        Run a flow using a webhook request.

        Args:
            flow_id_or_name: The flow ID or endpoint name (used by dependency).
            flow: The flow to be executed.
            request: The incoming HTTP request.

        Returns:
            A dictionary containing the status of the task.

        Raises:
            HTTPException: If the flow is not found or if there is an error processing the request.
      operationId: webhook_run_flow_api_v1_webhook__flow_id_or_name__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id_or_name
          in: path
          required: true
          schema:
            type: string
            title: Flow Id Or Name
        - name: user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: integer
              - type: 'null'
            title: User Id
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Webhook Run Flow Api V1 Webhook  Flow Id Or Name 
                  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/run/advanced/{flow_id_or_name}:
    post:
      tags:
        - Base
      summary: Experimental Run Flow
      description: >-
        Executes a specified flow by ID with optional input values, output
        selection, tweaks, and streaming capability.


        This endpoint supports running flows with caching to enhance performance
        and efficiency.


        ### Parameters:

        - `flow` (Flow): The flow object to be executed, resolved via dependency
        injection.

        - `inputs` (List[InputValueRequest], optional): A list of inputs
        specifying the input values and components
          for the flow. Each input can target specific components and provide custom values.
        - `outputs` (List[str], optional): A list of output names to retrieve
        from the executed flow.
          If not provided, all outputs are returned.
        - `tweaks` (Optional[Tweaks], optional): A dictionary of tweaks to
        customize the flow execution.
          The tweaks can be used to modify the flow's parameters and components.
          Tweaks can be overridden by the input values.
        - `stream` (bool, optional): Specifies whether the results should be
        streamed. Defaults to False.

        - `session_id` (Union[None, str], optional): An optional session ID to
        utilize existing session data for the flow
          execution.
        - `api_key_user` (User): The user associated with the current API key.
        Automatically resolved from the API key.


        ### Returns:

        A `RunResponse` object containing the selected outputs (or all if not
        specified) of the executed flow

        and the session ID.

        The structure of the response accommodates multiple inputs, providing a
        nested list of outputs for each input.


        ### Raises:

        HTTPException: Indicates issues with finding the specified flow, invalid
        input formats, or internal errors during

        flow execution.


        ### Example usage:

        ```json

        POST /run/flow_id

        x-api-key: YOUR_API_KEY

        Payload:

        {
            "inputs": [
                {"components": ["component1"], "input_value": "value1"},
                {"components": ["component3"], "input_value": "value2"}
            ],
            "outputs": ["Component Name", "component_id"],
            "tweaks": {"parameter_name": "value", "Component Name": {"parameter_name": "value"}, "component_id": {"parameter_name": "value"}}
            "stream": false
        }

        ```


        This endpoint facilitates complex flow executions with customized
        inputs, outputs, and configurations,

        catering to diverse application requirements.
      operationId: experimental_run_flow_api_v1_run_advanced__flow_id_or_name__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id_or_name
          in: path
          required: true
          schema:
            type: string
            title: Flow Id Or Name
        - name: user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: integer
              - type: 'null'
            title: User Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_experimental_run_flow_api_v1_run_advanced__flow_id_or_name__post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/version:
    get:
      tags:
        - Base
      summary: Get Version
      operationId: get_version_api_v1_version_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/config:
    get:
      tags:
        - Base
      summary: Get Config
      description: >-
        Retrieve the current application configuration settings.


        Requires authentication to prevent exposure of sensitive configuration
        details.


        Returns:
            ConfigResponse: The configuration settings of the application.

        Raises:
            HTTPException: If an error occurs while retrieving the configuration.
      operationId: get_config_api_v1_config_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigResponse'
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/flows/:
    post:
      tags:
        - Flows
      summary: Create Flow
      operationId: create_flow_api_v1_flows__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
        - Flows
      summary: Read Flows
      description: |-
        Retrieve a list of flows with pagination support.

        Args:
            current_user (User): The current authenticated user.
            session (Session): The database session.
            settings_service (SettingsService): The settings service.
            components_only (bool, optional): Whether to return only components. Defaults to False.

            get_all (bool, optional): Whether to return all flows without pagination. Defaults to True.
            **This field must be True because of backward compatibility with the frontend - Release: 1.0.20**

            project_id (UUID, optional): The project ID. Defaults to None.
            params (Params): Pagination parameters.
            remove_example_flows (bool, optional): Whether to remove example flows. Defaults to False.
            header_flows (bool, optional): Whether to return only specific headers of the flows. Defaults to False.

        Returns:
            list[FlowRead] | Page[FlowRead] | list[FlowHeader]
            A list of flows or a paginated response containing the list of flows or a list of flow headers.
      operationId: read_flows_api_v1_flows__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: remove_example_flows
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Remove Example Flows
        - name: components_only
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Components Only
        - name: get_all
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Get All
        - name: project_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Project Id
        - name: header_flows
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Header Flows
        - name: all_projects
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: All Projects
        - name: exclude_deleted
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Exclude Deleted
        - name: include_scope_sub_businesses
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Include Scope Sub Businesses
        - name: keyword
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Keyword
        - name: flow_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Flow Type
        - name: workflow_status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Workflow Status
        - name: sort_by
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: desc
            title: Sort Order
        - name: org_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Org Id
        - name: include_descendant_orgs
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Include Descendant Orgs
        - name: filter-business-id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Filter-Business-Id
        - name: include-sub-businesses
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Include-Sub-Businesses
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 50
            title: Size
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/FlowRead'
                  - $ref: '#/components/schemas/Page_FlowRead_'
                  - type: array
                    items:
                      $ref: '#/components/schemas/FlowHeader'
                title: Response Read Flows Api V1 Flows  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Flows
      summary: Delete Multiple Flows
      description: |-
        Delete multiple flows by their IDs.

        Args:
            flow_ids (List[str]): The list of flow IDs to delete.
            user (User, optional): The user making the request. Defaults to the current active user.
            db (Session, optional): The database session.

        Returns:
            dict: A dictionary containing the number of flows deleted.
      operationId: delete_multiple_flows_api_v1_flows__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
                format: uuid
              title: Flow Ids
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/flows/{flow_id}:
    get:
      tags:
        - Flows
      summary: Read Flow
      description: Read a flow.
      operationId: read_flow_api_v1_flows__flow_id__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - Flows
      summary: Update Flow
      description: Update a flow.
      operationId: update_flow_api_v1_flows__flow_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Flows
      summary: Delete Flow
      description: Delete a flow.
      operationId: delete_flow_api_v1_flows__flow_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/flows/{flow_id}/online:
    get:
      tags:
        - Flows
      summary: Read Online Flow
      operationId: read_online_flow_api_v1_flows__flow_id__online_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Flows
      summary: Delete Online Flow
      operationId: delete_online_flow_api_v1_flows__flow_id__online_delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/flows/{flow_id}/release:
    get:
      tags:
        - Flows
      summary: Read Release Flow
      operationId: read_release_flow_api_v1_flows__flow_id__release_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
        - name: v
          in: query
          required: true
          schema:
            type: string
            title: V
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/flows/{flow_id}/versions:
    get:
      tags:
        - Flows
      summary: Read Flow Versions
      operationId: read_flow_versions_api_v1_flows__flow_id__versions_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FlowVersionRead'
                title: >-
                  Response Read Flow Versions Api V1 Flows  Flow Id  Versions
                  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Flows
      summary: Create Flow Version
      operationId: create_flow_version_api_v1_flows__flow_id__versions_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowVersionCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowVersionRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/flows/{flow_id}/versions/{version_id}/rollback:
    post:
      tags:
        - Flows
      summary: Rollback Flow Version
      operationId: >-
        rollback_flow_version_api_v1_flows__flow_id__versions__version_id__rollback_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
        - name: version_id
          in: path
          required: true
          schema:
            type: integer
            title: Version Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/flows/{flow_id}/versions/{version_id}/publish:
    post:
      tags:
        - Flows
      summary: Publish Flow Version
      operationId: >-
        publish_flow_version_api_v1_flows__flow_id__versions__version_id__publish_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
        - name: version_id
          in: path
          required: true
          schema:
            type: integer
            title: Version Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/flows/{flow_id}/templates:
    post:
      tags:
        - Flows
      summary: Create Flow Template
      operationId: create_flow_template_api_v1_flows__flow_id__templates_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowTemplateCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowTemplateRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/flows/templates/{template_id}:
    get:
      tags:
        - Flows
      summary: Read Flow Template
      operationId: read_flow_template_api_v1_flows_templates__template_id__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: template_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Template Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowTemplateRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - Flows
      summary: Update Flow Template
      operationId: update_flow_template_api_v1_flows_templates__template_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: template_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Template Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowTemplateUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowTemplateRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Flows
      summary: Delete Flow Template
      operationId: delete_flow_template_api_v1_flows_templates__template_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: template_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Template Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/flows/batch/:
    post:
      tags:
        - Flows
      summary: Create Flows
      description: Create multiple new flows.
      operationId: create_flows_api_v1_flows_batch__post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlowListCreate'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/FlowRead'
                type: array
                title: Response Create Flows Api V1 Flows Batch  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/flows/upload/:
    post:
      tags:
        - Flows
      summary: Upload File
      description: Upload flows from a file.
      operationId: upload_file_api_v1_flows_upload__post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload_file_api_v1_flows_upload__post'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/FlowRead'
                type: array
                title: Response Upload File Api V1 Flows Upload  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/flows/download/:
    post:
      tags:
        - Flows
      summary: Download Multiple File
      description: Download all flows as a zip file.
      operationId: download_multiple_file_api_v1_flows_download__post
      requestBody:
        content:
          application/json:
            schema:
              items:
                type: string
                format: uuid
              type: array
              title: Flow Ids
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/flows/flow_template/:
    get:
      tags:
        - Flows
      summary: Read Basic Examples
      description: |-
        Retrieve a list of visible flow templates.

        Args:
            session (Session): The database session.

        Returns:
            list[FlowTemplateRead]: A list of visible flow templates.
      operationId: read_flow_templates_api_v1_flows_flow_template__get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/FlowTemplateRead'
                type: array
                title: Response Read Basic Examples Api V1 Flows Flow Template  Get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/users/:
    post:
      tags:
        - Users
      summary: Add User
      description: |-
        Add a new user to the database.

        This endpoint allows public user registration (sign up).
        User activation is controlled by the NEW_USER_IS_ACTIVE setting.
      operationId: add_user_api_v1_users__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
        - Users
      summary: Read All Users
      description: Retrieve a list of users from the database with pagination.
      operationId: read_all_users_api_v1_users__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            default: 0
            title: Skip
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 10
            title: Limit
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: is_active
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is Active
        - name: is_locked
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is Locked
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - id
              - username
              - nickname
              - is_sso
              - mobile
              - email
            type: string
            default: id
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: desc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/users/whoami:
    get:
      tags:
        - Users
      summary: Read Current User
      description: Retrieve the current user's data.
      operationId: read_current_user_api_v1_users_whoami_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserRead'
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/users/{user_id}:
    patch:
      tags:
        - Users
      summary: Patch User
      description: Update an existing user's data.
      operationId: patch_user_api_v1_users__user_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: integer
            title: User Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Users
      summary: Delete User
      description: Delete a user from the database.
      operationId: delete_user_api_v1_users__user_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: integer
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
                title: Response Delete User Api V1 Users  User Id  Delete
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/users/{user_id}/reset-password:
    patch:
      tags:
        - Users
      summary: Reset Password
      description: Reset a user's password.
      operationId: reset_password_api_v1_users__user_id__reset_password_patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: integer
            title: User Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/files/upload/{flow_id}:
    post:
      tags:
        - Files
      summary: Upload File
      operationId: upload_file_api_v1_files_upload__flow_id__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upload_file_api_v1_files_upload__flow_id__post
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadFileResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/files/download/{flow_id}/{file_name}:
    get:
      tags:
        - Files
      summary: Download File
      operationId: download_file_api_v1_files_download__flow_id___file_name__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: file_name
          in: path
          required: true
          schema:
            type: string
            title: File Name
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/files/images/{flow_id}/{file_name}:
    get:
      tags:
        - Files
      summary: Download Image
      description: Download image from storage for browser rendering.
      operationId: download_image_api_v1_files_images__flow_id___file_name__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
        - name: file_name
          in: path
          required: true
          schema:
            type: string
            title: File Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/files/list/{flow_id}:
    get:
      tags:
        - Files
      summary: List Files
      operationId: list_files_api_v1_files_list__flow_id__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/files/delete/{flow_id}/{file_name}:
    delete:
      tags:
        - Files
      summary: Delete File
      operationId: delete_file_api_v1_files_delete__flow_id___file_name__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: file_name
          in: path
          required: true
          schema:
            type: string
            title: File Name
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/monitor/builds:
    get:
      tags:
        - Monitor
      summary: Get Vertex Builds
      operationId: get_vertex_builds_api_v1_monitor_builds_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VertexBuildMapModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Monitor
      summary: Delete Vertex Builds
      operationId: delete_vertex_builds_api_v1_monitor_builds_delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/monitor/messages/sessions:
    get:
      tags:
        - Monitor
      summary: Get Message Sessions
      operationId: get_message_sessions_api_v1_monitor_messages_sessions_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Flow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UserChatSessionRead'
                title: >-
                  Response Get Message Sessions Api V1 Monitor Messages Sessions
                  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Monitor
      summary: Create Message Session
      operationId: create_message_session_api_v1_monitor_messages_sessions_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserChatSessionCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserChatSessionRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/monitor/messages:
    get:
      tags:
        - Monitor
      summary: Get Messages
      operationId: get_messages_api_v1_monitor_messages_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Flow Id
        - name: session_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: string
                format: uuid
              - type: 'null'
            title: Session Id
        - name: sender
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Sender
        - name: sender_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Sender Name
        - name: order_by
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: id
            title: Order By
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessageResponse'
                title: Response Get Messages Api V1 Monitor Messages Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Monitor
      summary: Delete Messages
      operationId: delete_messages_api_v1_monitor_messages_delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: integer
              title: Message Ids
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/monitor/messages/{message_id}:
    put:
      tags:
        - Monitor
      summary: Update Message
      operationId: update_message_api_v1_monitor_messages__message_id__put
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: message_id
          in: path
          required: true
          schema:
            type: integer
            title: Message Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/monitor/messages/session/{old_session_id}:
    patch:
      tags:
        - Monitor
      summary: Update Session Id
      operationId: update_session_id_api_v1_monitor_messages_session__old_session_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: old_session_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Old Session Id
        - name: new_session_name
          in: query
          required: true
          schema:
            type: string
            description: The new session name to update to
            title: New Session Name
          description: The new session name to update to
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MessageResponse'
                title: >-
                  Response Update Session Id Api V1 Monitor Messages Session 
                  Old Session Id  Patch
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/monitor/messages/session/{session_id}:
    delete:
      tags:
        - Monitor
      summary: Delete Messages Session
      operationId: >-
        delete_messages_session_api_v1_monitor_messages_session__session_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Session Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/monitor/transactions:
    get:
      tags:
        - Monitor
      summary: Get Transactions
      operationId: get_transactions_api_v1_monitor_transactions_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
            title: Flow Id
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number
            default: 1
            title: Page
          description: Page number
        - name: size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Page size
            default: 50
            title: Size
          description: Page size
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page_TransactionLogsResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/tenants/user-candidates:
    get:
      tags:
        - Tenants
      summary: Read Tenant User Candidates
      operationId: read_tenant_user_candidates_api_v1_tenants_user_candidates_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            default: 0
            title: Skip
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 10
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantUserCandidatesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/tenants/group-candidates:
    get:
      tags:
        - Tenants
      summary: Read Tenant Group Candidates
      operationId: read_tenant_group_candidates_api_v1_tenants_group_candidates_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            default: 0
            title: Skip
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 10
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantGroupCandidatesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/tenants/org-candidates:
    get:
      tags:
        - Tenants
      summary: Read Tenant Org Candidates
      operationId: read_tenant_org_candidates_api_v1_tenants_org_candidates_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            default: 0
            title: Skip
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 10
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantOrgCandidatesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/tenants/user-roles:
    get:
      tags:
        - Tenants
      summary: Read Tenant User Roles
      operationId: read_tenant_user_roles_api_v1_tenants_user_roles_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - id
              - tenant_name
              - username
              - nickname
              - role_id
              - role_name
            type: string
            default: id
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TenantUserRoleRead'
                title: Response Read Tenant User Roles Api V1 Tenants User Roles Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Tenants
      summary: Add Tenant User Role
      operationId: add_tenant_user_role_api_v1_tenants_user_roles_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantUserRoleCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantUserRoleRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Tenants
      summary: Batch Remove Tenant User Role
      operationId: batch_remove_tenant_user_role_api_v1_tenants_user_roles_delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantUserRoleBatchDelete'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantUserRoleBatchDeleteResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/tenants/user-roles/{relation_id}:
    delete:
      tags:
        - Tenants
      summary: Remove Tenant User Role
      operationId: remove_tenant_user_role_api_v1_tenants_user_roles__relation_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: relation_id
          in: path
          required: true
          schema:
            type: integer
            title: Relation Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/tenants/group-roles:
    get:
      tags:
        - Tenants
      summary: Read Tenant Group Roles
      operationId: read_tenant_group_roles_api_v1_tenants_group_roles_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - id
              - tenant_name
              - group_name
              - role_id
              - role_name
            type: string
            default: id
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TenantGroupRoleRead'
                title: >-
                  Response Read Tenant Group Roles Api V1 Tenants Group Roles
                  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Tenants
      summary: Add Tenant Group Role
      operationId: add_tenant_group_role_api_v1_tenants_group_roles_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantGroupRoleCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantGroupRoleRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Tenants
      summary: Batch Remove Tenant Group Role
      operationId: batch_remove_tenant_group_role_api_v1_tenants_group_roles_delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantUserRoleBatchDelete'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantUserRoleBatchDeleteResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/tenants/group-roles/{relation_id}:
    delete:
      tags:
        - Tenants
      summary: Remove Tenant Group Role
      operationId: remove_tenant_group_role_api_v1_tenants_group_roles__relation_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: relation_id
          in: path
          required: true
          schema:
            type: integer
            title: Relation Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/tenants/org-roles:
    get:
      tags:
        - Tenants
      summary: Read Tenant Org Roles
      operationId: read_tenant_org_roles_api_v1_tenants_org_roles_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - id
              - tenant_name
              - org_name
              - role_id
              - role_name
            type: string
            default: id
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TenantOrgRoleRead'
                title: Response Read Tenant Org Roles Api V1 Tenants Org Roles Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Tenants
      summary: Add Tenant Org Role
      operationId: add_tenant_org_role_api_v1_tenants_org_roles_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantOrgRoleCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantOrgRoleRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Tenants
      summary: Batch Remove Tenant Org Role
      operationId: batch_remove_tenant_org_role_api_v1_tenants_org_roles_delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantUserRoleBatchDelete'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantUserRoleBatchDeleteResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/tenants/org-roles/{relation_id}:
    delete:
      tags:
        - Tenants
      summary: Remove Tenant Org Role
      operationId: remove_tenant_org_role_api_v1_tenants_org_roles__relation_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: relation_id
          in: path
          required: true
          schema:
            type: integer
            title: Relation Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/tenants/:
    get:
      tags:
        - Tenants
      summary: Read Tenants
      operationId: read_tenants_api_v1_tenants__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - tenant_id
              - tenant_name
              - is_sys
              - is_active
            type: string
            default: tenant_name
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
        - name: is_all
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Is All
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TenantRead'
                title: Response Read Tenants Api V1 Tenants  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Tenants
      summary: Add Tenant
      operationId: add_tenant_api_v1_tenants__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/tenants/{tenant_id}:
    get:
      tags:
        - Tenants
      summary: Read Tenant
      operationId: read_tenant_api_v1_tenants__tenant_id__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Tenant Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - Tenants
      summary: Patch Tenant
      operationId: patch_tenant_api_v1_tenants__tenant_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Tenant Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Tenants
      summary: Remove Tenant
      operationId: remove_tenant_api_v1_tenants__tenant_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Tenant Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/business/:
    get:
      tags:
        - Business
      summary: Read Businesses
      operationId: read_businesses_api_v1_business__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
        - name: level
          in: query
          required: false
          schema:
            type: integer
            maximum: 3
            minimum: 0
            default: 0
            title: Level
        - name: is-enable
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is-Enable
        - name: first-business-id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: First-Business-Id
        - name: second-business-id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Second-Business-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BusinessRead'
                title: Response Read Businesses Api V1 Business  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Business
      summary: Add Business
      operationId: add_business_api_v1_business__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BusinessCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/business/tree:
    get:
      tags:
        - Business
      summary: Read Business Tree
      operationId: read_business_tree_api_v1_business_tree_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
        - name: level
          in: query
          required: false
          schema:
            type: integer
            maximum: 3
            minimum: 0
            default: 0
            title: Level
        - name: is-enable
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is-Enable
        - name: first-business-id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: First-Business-Id
        - name: second-business-id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Second-Business-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BusinessTreeNode'
                title: Response Read Business Tree Api V1 Business Tree Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/business/{business_id}:
    get:
      tags:
        - Business
      summary: Read Business
      operationId: read_business_api_v1_business__business_id__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            type: integer
            title: Business Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - Business
      summary: Patch Business
      operationId: patch_business_api_v1_business__business_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            type: integer
            title: Business Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BusinessUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Business
      summary: Remove Business
      operationId: remove_business_api_v1_business__business_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            type: integer
            title: Business Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/business/{business_id}/user-candidates:
    get:
      tags:
        - Business
      summary: Read Business User Candidates
      operationId: >-
        read_business_user_candidates_api_v1_business__business_id__user_candidates_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            type: integer
            title: Business Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            default: 0
            title: Skip
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 10
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessUserCandidatesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/business/{business_id}/user-roles:
    get:
      tags:
        - Business
      summary: Read Business User Roles
      operationId: read_business_user_roles_api_v1_business__business_id__user_roles_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            type: integer
            title: Business Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - uid
              - username
              - nickname
              - role_id
              - role_name
            type: string
            default: uid
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BusinessUserRoleRead'
                title: >-
                  Response Read Business User Roles Api V1 Business  Business
                  Id  User Roles Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Business
      summary: Upsert Business User Roles
      operationId: upsert_business_user_roles_api_v1_business__business_id__user_roles_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            type: integer
            title: Business Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BusinessUserRoleUpsert'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BusinessUserRoleRead'
                title: >-
                  Response Upsert Business User Roles Api V1 Business  Business
                  Id  User Roles Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Business
      summary: Batch Remove Business User Role
      operationId: >-
        batch_remove_business_user_role_api_v1_business__business_id__user_roles_delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            type: integer
            title: Business Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BusinessUserRoleBatchDelete'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessUserDeleteResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/business/{business_id}/user-roles/{relation_id}:
    delete:
      tags:
        - Business
      summary: Remove Business User Role
      operationId: >-
        remove_business_user_role_api_v1_business__business_id__user_roles__relation_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            type: integer
            title: Business Id
        - name: relation_id
          in: path
          required: true
          schema:
            type: integer
            title: Relation Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/business/{business_id}/users/{uid}:
    delete:
      tags:
        - Business
      summary: Remove Business User
      operationId: remove_business_user_api_v1_business__business_id__users__uid__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            type: integer
            title: Business Id
        - name: uid
          in: path
          required: true
          schema:
            type: integer
            title: Uid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessUserDeleteResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/business/{business_id}/resources:
    get:
      tags:
        - Business
      summary: Read Business Resources
      operationId: read_business_resources_api_v1_business__business_id__resources_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            type: integer
            title: Business Id
        - name: resource-type
          in: query
          required: false
          schema:
            enum:
              - flow
              - project
              - variable
              - component
              - skill
              - mcp
              - plugin
              - knowledge_base
            type: string
            default: flow
            title: Resource-Type
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort-by
          in: query
          required: false
          schema:
            enum:
              - id
              - name
            type: string
            default: id
            title: Sort-By
        - name: sort-order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort-Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BusinessResourceRead'
                title: >-
                  Response Read Business Resources Api V1 Business  Business Id 
                  Resources Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/configs/:
    get:
      tags:
        - Configs
      summary: Read Configs
      operationId: read_configs_api_v1_configs__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - id
              - config_key
              - config_name
              - config_value
            type: string
            default: config_key
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ConfigRead'
                title: Response Read Configs Api V1 Configs  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Configs
      summary: Add Config
      operationId: add_config_api_v1_configs__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfigCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/configs/{config_id}:
    patch:
      tags:
        - Configs
      summary: Patch Config
      operationId: patch_config_api_v1_configs__config_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: config_id
          in: path
          required: true
          schema:
            type: integer
            title: Config Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfigUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Configs
      summary: Remove Config
      operationId: remove_config_api_v1_configs__config_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: config_id
          in: path
          required: true
          schema:
            type: integer
            title: Config Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/dictionary/indexes:
    get:
      tags:
        - Dictionary
      summary: Read Indexes
      operationId: read_indexes_api_v1_dictionary_indexes_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - config_key
              - config_name
              - config_en_name
            type: string
            default: config_key
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DictionaryRead'
                title: Response Read Indexes Api V1 Dictionary Indexes Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Dictionary
      summary: Add Index
      operationId: add_index_api_v1_dictionary_indexes_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DictionaryIndexCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DictionaryRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/dictionary/indexes/{index_id}:
    patch:
      tags:
        - Dictionary
      summary: Patch Index
      operationId: patch_index_api_v1_dictionary_indexes__index_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: index_id
          in: path
          required: true
          schema:
            type: integer
            title: Index Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DictionaryIndexUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DictionaryRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Dictionary
      summary: Remove Index
      operationId: remove_index_api_v1_dictionary_indexes__index_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: index_id
          in: path
          required: true
          schema:
            type: integer
            title: Index Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/dictionary/indexes/{index_id}/items:
    get:
      tags:
        - Dictionary
      summary: Read Items By Index
      operationId: read_items_by_index_api_v1_dictionary_indexes__index_id__items_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: index_id
          in: path
          required: true
          schema:
            type: integer
            title: Index Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - key_order
              - config_key
              - config_name
              - config_en_name
              - config_value
            type: string
            default: config_key
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DictionaryRead'
                title: >-
                  Response Read Items By Index Api V1 Dictionary Indexes  Index
                  Id  Items Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Dictionary
      summary: Add Item
      operationId: add_item_api_v1_dictionary_indexes__index_id__items_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: index_id
          in: path
          required: true
          schema:
            type: integer
            title: Index Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DictionaryItemCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DictionaryRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/dictionary/items/{item_id}:
    patch:
      tags:
        - Dictionary
      summary: Patch Item
      operationId: patch_item_api_v1_dictionary_items__item_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: item_id
          in: path
          required: true
          schema:
            type: integer
            title: Item Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DictionaryItemUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DictionaryRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Dictionary
      summary: Remove Item
      operationId: remove_item_api_v1_dictionary_items__item_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: item_id
          in: path
          required: true
          schema:
            type: integer
            title: Item Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/:
    post:
      tags:
        - Projects
      summary: Create Project
      operationId: create_project_api_v1_projects__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
        - Projects
      summary: Read Projects
      operationId: read_projects_api_v1_projects__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: sort_by
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - ctime
                  - utime
                  - project_name
                type: string
              - type: 'null'
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: desc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectRead'
                title: Response Read Projects Api V1 Projects  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{project_id}:
    get:
      tags:
        - Projects
      summary: Read Project
      operationId: read_project_api_v1_projects__project_id__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
        - name: page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Page
        - name: size
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Size
        - name: is_component
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Is Component
        - name: is_flow
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Is Flow
        - name: search
          in: query
          required: false
          schema:
            type: string
            default: ''
            title: Search
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ProjectWithPaginatedFlows'
                  - $ref: '#/components/schemas/ProjectReadWithFlows'
                title: Response Read Project Api V1 Projects  Project Id  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - Projects
      summary: Update Project
      operationId: update_project_api_v1_projects__project_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Projects
      summary: Delete Project
      operationId: delete_project_api_v1_projects__project_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/download/{project_id}:
    get:
      tags:
        - Projects
      summary: Download File
      description: Download all flows from project as a zip file.
      operationId: download_file_api_v1_projects_download__project_id__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/upload/:
    post:
      tags:
        - Projects
      summary: Upload File
      description: Upload flows from a file.
      operationId: upload_file_api_v1_projects_upload__post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upload_file_api_v1_projects_upload__post
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/FlowRead'
                type: array
                title: Response Upload File Api V1 Projects Upload  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/starter-projects/:
    get:
      tags:
        - Flows
      summary: Get Starter Projects
      description: Get a list of starter projects.
      operationId: get_starter_projects_api_v1_starter_projects__get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/GraphDumpResponse'
                type: array
                title: Response Get Starter Projects Api V1 Starter Projects  Get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/mcp/sse:
    get:
      tags:
        - mcp
      summary: Handle Sse
      operationId: handle_sse_api_v1_mcp_sse_get
      responses:
        '200':
          description: Successful Response
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
    head:
      tags:
        - mcp
      summary: Im Alive
      operationId: im_alive_api_v1_mcp_sse_head
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/mcp/:
    post:
      tags:
        - mcp
      summary: Handle Messages
      operationId: handle_messages_api_v1_mcp__post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/mcp/streamable:
    get:
      tags:
        - mcp
      summary: Handle Streamable Http
      description: Streamable HTTP endpoint for MCP clients that support the new transport.
      operationId: handle_streamable_http_api_v1_mcp_streamable_post
      responses:
        '200':
          description: Successful Response
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
    post:
      tags:
        - mcp
      summary: Handle Streamable Http
      description: Streamable HTTP endpoint for MCP clients that support the new transport.
      operationId: handle_streamable_http_api_v1_mcp_streamable_post
      responses:
        '200':
          description: Successful Response
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
    delete:
      tags:
        - mcp
      summary: Handle Streamable Http
      description: Streamable HTTP endpoint for MCP clients that support the new transport.
      operationId: handle_streamable_http_api_v1_mcp_streamable_post
      responses:
        '200':
          description: Successful Response
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
    head:
      tags:
        - mcp
      summary: Streamable Health
      operationId: streamable_health_api_v1_mcp_streamable_head
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/mcp/streamable/:
    get:
      tags:
        - mcp
      summary: Handle Streamable Http
      description: Streamable HTTP endpoint for MCP clients that support the new transport.
      operationId: handle_streamable_http_api_v1_mcp_streamable__post
      responses:
        '200':
          description: Successful Response
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
    post:
      tags:
        - mcp
      summary: Handle Streamable Http
      description: Streamable HTTP endpoint for MCP clients that support the new transport.
      operationId: handle_streamable_http_api_v1_mcp_streamable__post
      responses:
        '200':
          description: Successful Response
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
    delete:
      tags:
        - mcp
      summary: Handle Streamable Http
      description: Streamable HTTP endpoint for MCP clients that support the new transport.
      operationId: handle_streamable_http_api_v1_mcp_streamable__post
      responses:
        '200':
          description: Successful Response
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/responses:
    post:
      tags:
        - OpenAI Responses API
      summary: Create Response
      description: |-
        Create a response using OpenAI Responses API format.

        This endpoint accepts a flow_id in the model parameter and processes
        the input through the specified SkillFlaw flow.

        Args:
            request: OpenAI Responses API request with model (flow_id) and input
            background_tasks: FastAPI background task manager
            api_key_user: Authenticated user from API key
            http_request: The incoming HTTP request
            telemetry_service: Telemetry service for logging

        Returns:
            OpenAI-compatible response or streaming response

        Raises:
            HTTPException: For validation errors or flow execution issues
      operationId: create_response_api_v1_responses_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenAIResponsesRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/permission/modules:
    get:
      tags:
        - Permission
      summary: Read Permission Modules
      operationId: read_permission_modules_api_v1_permission_modules_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - module_id
              - module_name
            type: string
            default: module_id
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PermissionModuleRead'
                title: Response Read Permission Modules Api V1 Permission Modules Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/permission/modules/{module_id}/privs:
    get:
      tags:
        - Permission
      summary: Read Privs By Module
      operationId: read_privs_by_module_api_v1_permission_modules__module_id__privs_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: module_id
          in: path
          required: true
          schema:
            type: string
            title: Module Id
        - name: is_sys_priv
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is Sys Priv
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - priv_id
              - priv_name
              - priv_opr_type
              - is_sys_priv
            type: string
            default: priv_id
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PrivRead'
                title: >-
                  Response Read Privs By Module Api V1 Permission Modules 
                  Module Id  Privs Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Permission
      summary: Add Module Priv
      operationId: add_module_priv_api_v1_permission_modules__module_id__privs_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: module_id
          in: path
          required: true
          schema:
            type: string
            title: Module Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrivCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrivRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/permission/module-priv-tree:
    get:
      tags:
        - Permission
      summary: Read Module Priv Tree
      operationId: read_module_priv_tree_api_v1_permission_module_priv_tree_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - module_id
              - module_name
              - priv_id
              - priv_name
              - priv_opr_type
              - is_sys_priv
            type: string
            default: module_id
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PermissionTreeRead'
                title: >-
                  Response Read Module Priv Tree Api V1 Permission Module Priv
                  Tree Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/permission/modules/{module_id}/privs/{priv_id}:
    patch:
      tags:
        - Permission
      summary: Patch Module Priv
      operationId: >-
        patch_module_priv_api_v1_permission_modules__module_id__privs__priv_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: module_id
          in: path
          required: true
          schema:
            type: string
            title: Module Id
        - name: priv_id
          in: path
          required: true
          schema:
            type: string
            title: Priv Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrivUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrivRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Permission
      summary: Remove Module Priv
      operationId: >-
        remove_module_priv_api_v1_permission_modules__module_id__privs__priv_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: module_id
          in: path
          required: true
          schema:
            type: string
            title: Module Id
        - name: priv_id
          in: path
          required: true
          schema:
            type: string
            title: Priv Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/permission/roles:
    get:
      tags:
        - Permission
      summary: Read Roles
      operationId: read_roles_api_v1_permission_roles_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - role_id
              - role_name
              - is_sys_role
            type: string
            default: role_name
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleRead'
                title: Response Read Roles Api V1 Permission Roles Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Permission
      summary: Add Role
      operationId: add_role_api_v1_permission_roles_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleRead'
  /api/v1/permission/roles/{role_id}:
    patch:
      tags:
        - Permission
      summary: Patch Role
      operationId: patch_role_api_v1_permission_roles__role_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: role_id
          in: path
          required: true
          schema:
            type: string
            title: Role Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Permission
      summary: Remove Role
      operationId: remove_role_api_v1_permission_roles__role_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: role_id
          in: path
          required: true
          schema:
            type: string
            title: Role Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/permission/roles/{role_id}/privs:
    get:
      tags:
        - Permission
      summary: Read Role Privs
      operationId: read_role_privs_api_v1_permission_roles__role_id__privs_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: role_id
          in: path
          required: true
          schema:
            type: string
            title: Role Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - module_id
              - module_name
              - priv_id
              - priv_name
              - priv_opr_type
            type: string
            default: module_id
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RolePrivRead'
                title: >-
                  Response Read Role Privs Api V1 Permission Roles  Role Id 
                  Privs Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Permission
      summary: Add Role Priv Item
      operationId: add_role_priv_item_api_v1_permission_roles__role_id__privs_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: role_id
          in: path
          required: true
          schema:
            type: string
            title: Role Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RolePrivCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RolePrivRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/permission/role-priv-tree:
    get:
      tags:
        - Permission
      summary: Read Role Priv Tree
      operationId: read_role_priv_tree_api_v1_permission_role_priv_tree_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - role_id
              - role_name
              - module_id
              - module_name
              - priv_id
              - priv_name
              - priv_opr_type
            type: string
            default: role_name
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PermissionTreeRead'
                title: >-
                  Response Read Role Priv Tree Api V1 Permission Role Priv Tree
                  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/permission/roles/{role_id}/privs/{module_id}/{priv_id}:
    delete:
      tags:
        - Permission
      summary: Remove Role Priv Item
      operationId: >-
        remove_role_priv_item_api_v1_permission_roles__role_id__privs__module_id___priv_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: role_id
          in: path
          required: true
          schema:
            type: string
            title: Role Id
        - name: module_id
          in: path
          required: true
          schema:
            type: string
            title: Module Id
        - name: priv_id
          in: path
          required: true
          schema:
            type: string
            title: Priv Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/organization/orgs:
    get:
      tags:
        - Organization
      summary: Read Orgs
      operationId: read_orgs_api_v1_organization_orgs_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrgRead'
                title: Response Read Orgs Api V1 Organization Orgs Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Organization
      summary: Add Org
      operationId: add_org_api_v1_organization_orgs_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/organization/orgs/tree:
    get:
      tags:
        - Organization
      summary: Read Org Tree
      operationId: read_org_tree_api_v1_organization_orgs_tree_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrgRead'
                title: Response Read Org Tree Api V1 Organization Orgs Tree Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/organization/orgs/{org_id}:
    patch:
      tags:
        - Organization
      summary: Patch Org
      operationId: patch_org_api_v1_organization_orgs__org_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: integer
            title: Org Id
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Organization
      summary: Remove Org
      operationId: remove_org_api_v1_organization_orgs__org_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: integer
            title: Org Id
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/organization/org-members:
    get:
      tags:
        - Organization
      summary: Read Org Members
      operationId: read_org_members_api_v1_organization_org_members_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
        - name: org-id
          in: query
          required: true
          schema:
            type: integer
            title: Org-Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - uid
              - username
              - nickname
              - position
              - job
              - is_leader
            type: string
            default: uid
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrgMemberRead'
                title: Response Read Org Members Api V1 Organization Org Members Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Organization
      summary: Add Org Members
      operationId: add_org_members_api_v1_organization_org_members_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgMemberCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrgMemberRead'
                title: Response Add Org Members Api V1 Organization Org Members Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/organization/org-member-user-candidates:
    get:
      tags:
        - Organization
      summary: Read Org Member User Candidates
      operationId: >-
        read_org_member_user_candidates_api_v1_organization_org_member_user_candidates_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: org-id
          in: query
          required: true
          schema:
            type: integer
            title: Org-Id
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Skip
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            default: 200
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgMemberUserCandidatesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/organization/user-group-member-user-candidates:
    get:
      tags:
        - Organization
      summary: Read User Group Member User Candidates
      operationId: >-
        read_user_group_member_user_candidates_api_v1_organization_user_group_member_user_candidates_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: group-id
          in: query
          required: true
          schema:
            type: integer
            title: Group-Id
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Skip
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            default: 10
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgMemberUserCandidatesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/organization/org-members/{member_id}:
    patch:
      tags:
        - Organization
      summary: Patch Org Member
      operationId: patch_org_member_api_v1_organization_org_members__member_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: member_id
          in: path
          required: true
          schema:
            type: integer
            title: Member Id
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgMemberUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgMemberRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Organization
      summary: Remove Org Member
      operationId: remove_org_member_api_v1_organization_org_members__member_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: member_id
          in: path
          required: true
          schema:
            type: integer
            title: Member Id
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/organization/user-groups:
    get:
      tags:
        - Organization
      summary: Read User Groups
      operationId: read_user_groups_api_v1_organization_user_groups_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: is-enable
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is-Enable
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - group_id
              - group_name
              - is_enable
            type: string
            default: group_id
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UserGroupRead'
                title: Response Read User Groups Api V1 Organization User Groups Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Organization
      summary: Add User Group
      operationId: add_user_group_api_v1_organization_user_groups_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserGroupCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserGroupRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/organization/user-groups/{group_id}:
    patch:
      tags:
        - Organization
      summary: Patch User Group
      operationId: patch_user_group_api_v1_organization_user_groups__group_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: group_id
          in: path
          required: true
          schema:
            type: integer
            title: Group Id
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserGroupUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserGroupRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Organization
      summary: Remove User Group
      operationId: remove_user_group_api_v1_organization_user_groups__group_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: group_id
          in: path
          required: true
          schema:
            type: integer
            title: Group Id
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/organization/user-group-members:
    get:
      tags:
        - Organization
      summary: Read User Group Members
      operationId: read_user_group_members_api_v1_organization_user_group_members_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: group-id
          in: query
          required: true
          schema:
            type: integer
            title: Group-Id
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: is-leader
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is-Leader
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - id
              - uid
              - username
              - nickname
              - is_leader
            type: string
            default: id
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UserGroupMemberRead'
                title: >-
                  Response Read User Group Members Api V1 Organization User
                  Group Members Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Organization
      summary: Add User Group Member
      operationId: add_user_group_member_api_v1_organization_user_group_members_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserGroupMemberCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserGroupMemberRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/organization/user-group-members/{member_id}:
    patch:
      tags:
        - Organization
      summary: Patch User Group Member
      operationId: >-
        patch_user_group_member_api_v1_organization_user_group_members__member_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: member_id
          in: path
          required: true
          schema:
            type: integer
            title: Member Id
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserGroupMemberUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserGroupMemberRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Organization
      summary: Remove User Group Member
      operationId: >-
        remove_user_group_member_api_v1_organization_user_group_members__member_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: member_id
          in: path
          required: true
          schema:
            type: integer
            title: Member Id
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/organization/org-user-search:
    get:
      tags:
        - Organization
      summary: Read Org User Search
      operationId: read_org_user_search_api_v1_organization_org_user_search_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - uid
              - username
              - nickname
              - org_id
              - org_level
              - position
              - job
              - is_leader
            type: string
            default: uid
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: integer
                      - type: boolean
                      - type: 'null'
                title: >-
                  Response Read Org User Search Api V1 Organization Org User
                  Search Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/organization/user-group-user-search:
    get:
      tags:
        - Organization
      summary: Read User Group User Search
      operationId: >-
        read_user_group_user_search_api_v1_organization_user_group_user_search_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: tenant-id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Tenant-Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - group_id
              - group_name
              - uid
              - username
              - nickname
              - is_leader
            type: string
            default: group_id
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: integer
                      - type: boolean
                      - type: 'null'
                title: >-
                  Response Read User Group User Search Api V1 Organization User
                  Group User Search Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/model-management/model-types:
    get:
      tags:
        - Model Management
      summary: Read Model Types
      operationId: read_model_types_api_v1_model_management_model_types_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/DictionaryRead'
                type: array
                title: >-
                  Response Read Model Types Api V1 Model Management Model Types
                  Get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/model-management/providers:
    get:
      tags:
        - Model Management
      summary: Read Model Providers
      operationId: read_model_providers_api_v1_model_management_providers_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - provider_key
              - provider_name
              - key_order
            type: string
            default: key_order
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ModelProviderListItem'
                title: >-
                  Response Read Model Providers Api V1 Model Management
                  Providers Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Model Management
      summary: Add Model Provider
      operationId: add_model_provider_api_v1_model_management_providers_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelProviderCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelProviderRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/model-management/providers/{provider_id}:
    patch:
      tags:
        - Model Management
      summary: Patch Model Provider
      operationId: >-
        patch_model_provider_api_v1_model_management_providers__provider_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: provider_id
          in: path
          required: true
          schema:
            type: integer
            title: Provider Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelProviderUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelProviderRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Model Management
      summary: Remove Model Provider
      operationId: >-
        remove_model_provider_api_v1_model_management_providers__provider_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: provider_id
          in: path
          required: true
          schema:
            type: integer
            title: Provider Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/model-management/providers/bulk-delete:
    post:
      tags:
        - Model Management
      summary: Remove Model Providers Bulk
      operationId: >-
        remove_model_providers_bulk_api_v1_model_management_providers_bulk_delete_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkDeleteRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkDeleteResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/model-management/providers/{provider_id}/models:
    get:
      tags:
        - Model Management
      summary: Read Provider Models
      operationId: >-
        read_provider_models_api_v1_model_management_providers__provider_id__models_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: provider_id
          in: path
          required: true
          schema:
            type: integer
            title: Provider Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: model_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Model Type
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - model_type
              - model_name
              - model_display_name
              - context_length
              - key_order
            type: string
            default: key_order
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: asc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ModelProviderModelRead'
                title: >-
                  Response Read Provider Models Api V1 Model Management
                  Providers  Provider Id  Models Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/model-management/models:
    post:
      tags:
        - Model Management
      summary: Add Provider Model
      operationId: add_provider_model_api_v1_model_management_models_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelProviderModelCreate'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelProviderModelRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/model-management/models/{model_id}:
    patch:
      tags:
        - Model Management
      summary: Patch Provider Model
      operationId: patch_provider_model_api_v1_model_management_models__model_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: integer
            title: Model Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelProviderModelUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelProviderModelRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Model Management
      summary: Remove Provider Model
      operationId: remove_provider_model_api_v1_model_management_models__model_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: integer
            title: Model Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/model-management/models/bulk-delete:
    post:
      tags:
        - Model Management
      summary: Remove Provider Models Bulk
      operationId: >-
        remove_provider_models_bulk_api_v1_model_management_models_bulk_delete_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkDeleteRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkDeleteResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/agentic/execute/{flow_name}:
    post:
      tags:
        - Agentic
      summary: Execute Named Flow
      description: Execute a named flow from the flows directory.
      operationId: execute_named_flow_api_v1_agentic_execute__flow_name__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: flow_name
          in: path
          required: true
          schema:
            type: string
            title: Flow Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssistantRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Execute Named Flow Api V1 Agentic Execute  Flow Name 
                  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/agentic/check-config:
    get:
      tags:
        - Agentic
      summary: Check Assistant Config
      description: >-
        Check if the SkillFlaw Assistant is properly configured.


        Returns available providers with their configured status and available
        models.
      operationId: check_assistant_config_api_v1_agentic_check_config_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: >-
                  Response Check Assistant Config Api V1 Agentic Check Config
                  Get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/agentic/assist:
    post:
      tags:
        - Agentic
      summary: Assist
      description: Chat with the SkillFlaw Assistant.
      operationId: assist_api_v1_agentic_assist_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssistantRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Assist Api V1 Agentic Assist Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v1/agentic/assist/stream:
    post:
      tags:
        - Agentic
      summary: Assist Stream
      description: Chat with the SkillFlaw Assistant with streaming progress updates.
      operationId: assist_stream_api_v1_agentic_assist_stream_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssistantRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v2/files/:
    post:
      tags:
        - Files
      summary: Upload User File
      description: Upload a file for the current user and track it in the database.
      operationId: upload_user_file_api_v2_files__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: append
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Append
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload_user_file_api_v2_files__post'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
        - Files
      summary: List Files
      description: List the files available to the current user.
      operationId: list_files_api_v2_files__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FileRead'
                title: Response List Files Api V2 Files  Get
    delete:
      tags:
        - Files
      summary: Delete All Files
      description: Delete all files for the current user.
      operationId: delete_all_files_api_v2_files__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileBatchDeleteResponse'
  /api/v2/files:
    post:
      tags:
        - Files
      summary: Upload User File
      description: Upload a file for the current user and track it in the database.
      operationId: upload_user_file_api_v2_files_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: append
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Append
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload_user_file_api_v2_files_post'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
        - Files
      summary: List Files
      description: List the files available to the current user.
      operationId: list_files_api_v2_files_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FileRead'
                title: Response List Files Api V2 Files Get
    delete:
      tags:
        - Files
      summary: Delete All Files
      description: Delete all files for the current user.
      operationId: delete_all_files_api_v2_files_delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileBatchDeleteResponse'
  /api/v2/files/batch/:
    post:
      tags:
        - Files
      summary: Download Files Batch
      description: Download multiple files as a zip file by their IDs.
      operationId: download_files_batch_api_v2_files_batch__post
      requestBody:
        content:
          application/json:
            schema:
              items:
                type: string
                format: uuid
              type: array
              title: File Ids
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
    delete:
      tags:
        - Files
      summary: Delete Files Batch
      description: Delete multiple files by their IDs.
      operationId: delete_files_batch_api_v2_files_batch__delete
      requestBody:
        content:
          application/json:
            schema:
              items:
                type: string
                format: uuid
              type: array
              title: File Ids
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileBatchDeleteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/v2/files/{file_id}:
    get:
      tags:
        - Files
      summary: Download File
      description: |-
        Download a file by its ID or return its content as a string/bytes.

        Args:
            file_id: UUID of the file.
            current_user: Authenticated user.
            session: Database session.
            storage_service: File storage service.
            return_content: If True, return raw content (str) instead of StreamingResponse.

        Returns:
            StreamingResponse for client downloads or str for internal use.
      operationId: download_file_api_v2_files__file_id__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: file_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: File Id
        - name: return_content
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Return Content
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    put:
      tags:
        - Files
      summary: Edit File Name
      description: Edit the name of a file by its ID.
      operationId: edit_file_name_api_v2_files__file_id__put
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: file_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: File Id
        - name: name
          in: query
          required: true
          schema:
            type: string
            title: Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Files
      summary: Delete File
      description: Delete a file by its ID.
      operationId: delete_file_api_v2_files__file_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: file_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: File Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileDeleteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/components/groups:
    get:
      tags:
        - Component
      summary: Get Component Groups
      operationId: get_component_groups_api_v2_components_groups_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: component_type
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - component
                  - bundle
                type: string
              - type: 'null'
            title: Component Type
        - name: scope
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Scope
        - name: business_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Business Id
        - name: all_scopes
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: All Scopes
        - name: include_sub_businesses
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Include Sub Businesses
        - name: is_active
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is Active
        - name: keyword
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Keyword
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Component
      summary: Add Component Group
      operationId: add_component_group_api_v2_components_groups_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComponentGroupPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/components/groups/{group_id}:
    patch:
      tags:
        - Component
      summary: Patch Component Group
      operationId: patch_component_group_api_v2_components_groups__group_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: group_id
          in: path
          required: true
          schema:
            type: integer
            title: Group Id
        - name: scope
          in: query
          required: true
          schema:
            type: integer
            title: Scope
        - name: business_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Business Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComponentGroupPatchPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Component
      summary: Remove Component Group
      operationId: remove_component_group_api_v2_components_groups__group_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: group_id
          in: path
          required: true
          schema:
            type: integer
            title: Group Id
        - name: scope
          in: query
          required: true
          schema:
            type: integer
            title: Scope
        - name: business_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Business Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/components:
    get:
      tags:
        - Component
      summary: Get Components
      operationId: get_components_api_v2_components_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: component_type
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - component
                  - bundle
                type: string
              - type: 'null'
            title: Component Type
        - name: component_group_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Component Group Id
        - name: scope
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Scope
        - name: business_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Business Id
        - name: all_scopes
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: All Scopes
        - name: include_sub_businesses
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Include Sub Businesses
        - name: is_active
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is Active
        - name: is_deprecated
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is Deprecated
        - name: is_legacy
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is Legacy
        - name: keyword
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Keyword
        - name: tag
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Tag
        - name: deprecated_only
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Deprecated Only
        - name: legacy_only
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Legacy Only
        - name: sort_by
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - ctime
                  - utime
                  - display_name
                type: string
              - type: 'null'
            default: ctime
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: desc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - Component
      summary: Add Component
      operationId: add_component_api_v2_components_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComponentPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/components/{component_id}:
    get:
      tags:
        - Component
      summary: Get Component
      operationId: get_component_api_v2_components__component_id__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: component_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Component Id
        - name: scope
          in: query
          required: true
          schema:
            type: integer
            title: Scope
        - name: business_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Business Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - Component
      summary: Patch Component
      operationId: patch_component_api_v2_components__component_id__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: component_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Component Id
        - name: scope
          in: query
          required: true
          schema:
            type: integer
            title: Scope
        - name: business_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Business Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComponentPatchPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - Component
      summary: Remove Component
      operationId: remove_component_api_v2_components__component_id__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: component_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Component Id
        - name: scope
          in: query
          required: true
          schema:
            type: integer
            title: Scope
        - name: business_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Business Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/components/{component_id}/versions:
    get:
      tags:
        - Component
      summary: Get Component Versions
      operationId: get_component_versions_api_v2_components__component_id__versions_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: component_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Component Id
        - name: scope
          in: query
          required: true
          schema:
            type: integer
            title: Scope
        - name: business_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Business Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComponentVersionListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/mcp/servers:
    get:
      tags:
        - MCP
      summary: Get Servers
      description: Get the list of available servers.
      operationId: get_servers_api_v2_mcp_servers_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: action_count
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Action Count
        - name: mcp_scope
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Mcp Scope
        - name: business_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Business Id
        - name: all_scopes
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: All Scopes
        - name: include_sub_businesses
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Include Sub Businesses
        - name: mcp_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Mcp Type
        - name: is_active
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is Active
        - name: keyword
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Keyword
        - name: sort_by
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - ctime
                  - utime
                  - server_name
                type: string
              - type: 'null'
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: desc
            title: Sort Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - MCP
      summary: Update Server Endpoint By Query
      operationId: update_server_endpoint_by_query_api_v2_mcp_servers_patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: server_id
          in: query
          required: true
          schema:
            type: integer
            title: Server Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MCPServerConfig'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/mcp/servers/{server_name}:
    get:
      tags:
        - MCP
      summary: Get Server Endpoint
      description: Get a specific server.
      operationId: get_server_endpoint_api_v2_mcp_servers__server_name__get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: server_name
          in: path
          required: true
          schema:
            type: string
            title: Server Name
        - name: server_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Server Id
        - name: mcp_scope
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Mcp Scope
        - name: business_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Business Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - MCP
      summary: Add Server
      operationId: add_server_api_v2_mcp_servers__server_name__post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: server_name
          in: path
          required: true
          schema:
            type: string
            title: Server Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MCPServerConfig'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - MCP
      summary: Update Server Endpoint
      operationId: update_server_endpoint_api_v2_mcp_servers__server_name__patch
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: server_name
          in: path
          required: true
          schema:
            type: string
            title: Server Name
        - name: business_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Business Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MCPServerConfig'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - MCP
      summary: Delete Server
      operationId: delete_server_api_v2_mcp_servers__server_name__delete
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: server_name
          in: path
          required: true
          schema:
            type: string
            title: Server Name
        - name: mcp_scope
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Mcp Scope
        - name: business_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Business Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/mcp/servers/{server_name}/test:
    post:
      tags:
        - MCP
      summary: Test Server Connection
      operationId: test_server_connection_api_v2_mcp_servers__server_name__test_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: server_name
          in: path
          required: true
          schema:
            type: string
            title: Server Name
        - name: mcp_scope
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Mcp Scope
        - name: business_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Business Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerConnectionTestResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/workflows:
    post:
      tags:
        - Workflow
      summary: Execute Workflow
      description: Execute a workflow with support for sync, stream, and background modes
      operationId: execute_workflow_api_v2_workflows_post
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowExecutionRequest'
      responses:
        '200':
          description: Workflow execution response
          content:
            application/json:
              schema:
                oneOf:
                  - description: Synchronous workflow execution response.
                    properties:
                      flow_id:
                        title: Flow Id
                        type: string
                      job_id:
                        anyOf:
                          - type: string
                          - type: integer
                          - type: 'null'
                        title: Job Id
                      object:
                        const: response
                        default: response
                        title: Object
                        type: string
                      created_timestamp:
                        title: Created Timestamp
                        type: string
                      status:
                        description: Job execution status.
                        enum:
                          - queued
                          - in_progress
                          - completed
                          - failed
                          - cancelled
                          - timed_out
                        title: JobStatus
                        type: string
                      errors:
                        default: []
                        items:
                          description: Error detail schema.
                          properties:
                            error:
                              title: Error
                              type: string
                            code:
                              anyOf:
                                - type: string
                                - type: 'null'
                              title: Code
                            details:
                              anyOf:
                                - additionalProperties: true
                                  type: object
                                - type: 'null'
                              title: Details
                          required:
                            - error
                          title: ErrorDetail
                          type: object
                        title: Errors
                        type: array
                      inputs:
                        additionalProperties: true
                        default: {}
                        title: Inputs
                        type: object
                      outputs:
                        additionalProperties:
                          description: Component output schema.
                          properties:
                            type:
                              description: >-
                                Type of the component output (e.g., 'message',
                                'data', 'tool', 'text')
                              title: Type
                              type: string
                            status:
                              description: Job execution status.
                              enum:
                                - queued
                                - in_progress
                                - completed
                                - failed
                                - cancelled
                                - timed_out
                              title: JobStatus
                              type: string
                            content:
                              anyOf:
                                - {}
                                - type: 'null'
                              title: Content
                            metadata:
                              anyOf:
                                - additionalProperties: true
                                  type: object
                                - type: 'null'
                              title: Metadata
                          required:
                            - type
                            - status
                          title: ComponentOutput
                          type: object
                        default: {}
                        title: Outputs
                        type: object
                    required:
                      - flow_id
                      - status
                    title: WorkflowExecutionResponse
                    type: object
                  - description: Background job response.
                    properties:
                      job_id:
                        anyOf:
                          - type: string
                          - type: integer
                        title: Job Id
                      flow_id:
                        title: Flow Id
                        type: string
                      object:
                        const: job
                        default: job
                        title: Object
                        type: string
                      created_timestamp:
                        title: Created Timestamp
                        type: string
                      status:
                        description: Job execution status.
                        enum:
                          - queued
                          - in_progress
                          - completed
                          - failed
                          - cancelled
                          - timed_out
                        title: JobStatus
                        type: string
                      links:
                        additionalProperties:
                          type: string
                        title: Links
                        type: object
                      errors:
                        default: []
                        items:
                          description: Error detail schema.
                          properties:
                            error:
                              title: Error
                              type: string
                            code:
                              anyOf:
                                - type: string
                                - type: 'null'
                              title: Code
                            details:
                              anyOf:
                                - additionalProperties: true
                                  type: object
                                - type: 'null'
                              title: Details
                          required:
                            - error
                          title: ErrorDetail
                          type: object
                        title: Errors
                        type: array
                    required:
                      - job_id
                      - flow_id
                      - status
                    title: WorkflowJobResponse
                    type: object
            text/event-stream:
              schema:
                description: Streaming event response.
                properties:
                  type:
                    title: Type
                    type: string
                  run_id:
                    title: Run Id
                    type: string
                  timestamp:
                    title: Timestamp
                    type: integer
                  raw_event:
                    additionalProperties: true
                    title: Raw Event
                    type: object
                required:
                  - type
                  - run_id
                  - timestamp
                  - raw_event
                title: WorkflowStreamEvent
                type: object
              description: Server-sent events for streaming execution
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
        - Workflow
      summary: Get Workflow Status
      description: Get status of workflow job by job ID
      operationId: get_workflow_status_api_v2_workflows_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: job_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: integer
              - type: 'null'
            description: Job ID to query
            title: Job Id
          description: Job ID to query
      responses:
        '200':
          description: Workflow status response
          content:
            application/json:
              schema:
                description: Synchronous workflow execution response.
                properties:
                  flow_id:
                    title: Flow Id
                    type: string
                  job_id:
                    anyOf:
                      - type: string
                      - type: integer
                      - type: 'null'
                    title: Job Id
                  object:
                    const: response
                    default: response
                    title: Object
                    type: string
                  created_timestamp:
                    title: Created Timestamp
                    type: string
                  status:
                    description: Job execution status.
                    enum:
                      - queued
                      - in_progress
                      - completed
                      - failed
                      - cancelled
                      - timed_out
                    title: JobStatus
                    type: string
                  errors:
                    default: []
                    items:
                      description: Error detail schema.
                      properties:
                        error:
                          title: Error
                          type: string
                        code:
                          anyOf:
                            - type: string
                            - type: 'null'
                          title: Code
                        details:
                          anyOf:
                            - additionalProperties: true
                              type: object
                            - type: 'null'
                          title: Details
                      required:
                        - error
                      title: ErrorDetail
                      type: object
                    title: Errors
                    type: array
                  inputs:
                    additionalProperties: true
                    default: {}
                    title: Inputs
                    type: object
                  outputs:
                    additionalProperties:
                      description: Component output schema.
                      properties:
                        type:
                          description: >-
                            Type of the component output (e.g., 'message',
                            'data', 'tool', 'text')
                          title: Type
                          type: string
                        status:
                          description: Job execution status.
                          enum:
                            - queued
                            - in_progress
                            - completed
                            - failed
                            - cancelled
                            - timed_out
                          title: JobStatus
                          type: string
                        content:
                          anyOf:
                            - {}
                            - type: 'null'
                          title: Content
                        metadata:
                          anyOf:
                            - additionalProperties: true
                              type: object
                            - type: 'null'
                          title: Metadata
                      required:
                        - type
                        - status
                      title: ComponentOutput
                      type: object
                    default: {}
                    title: Outputs
                    type: object
                required:
                  - flow_id
                  - status
                title: WorkflowExecutionResponse
                type: object
            text/event-stream:
              schema:
                description: Streaming event response.
                properties:
                  type:
                    title: Type
                    type: string
                  run_id:
                    title: Run Id
                    type: string
                  timestamp:
                    title: Timestamp
                    type: integer
                  raw_event:
                    additionalProperties: true
                    title: Raw Event
                    type: object
                required:
                  - type
                  - run_id
                  - timestamp
                  - raw_event
                title: WorkflowStreamEvent
                type: object
              description: Server-sent events for streaming status
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/workflows/stop:
    post:
      tags:
        - Workflow
      summary: Stop Workflow
      description: Stop a running workflow execution
      operationId: stop_workflow_api_v2_workflows_stop_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowStopRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowStopResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /api/mcp/sse:
    get:
      tags:
        - mcp
      summary: Handle Sse
      operationId: handle_sse_api_mcp_sse_get
      responses:
        '200':
          description: Successful Response
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
    head:
      tags:
        - mcp
      summary: Im Alive
      operationId: im_alive_api_mcp_sse_head
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
  /api/mcp/:
    post:
      tags:
        - mcp
      summary: Handle Messages
      operationId: handle_messages_api_mcp__post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/mcp/streamable:
    get:
      tags:
        - mcp
      summary: Handle Streamable Http
      description: Streamable HTTP endpoint for MCP clients that support the new transport.
      operationId: handle_streamable_http_api_mcp_streamable_post
      responses:
        '200':
          description: Successful Response
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
    post:
      tags:
        - mcp
      summary: Handle Streamable Http
      description: Streamable HTTP endpoint for MCP clients that support the new transport.
      operationId: handle_streamable_http_api_mcp_streamable_post
      responses:
        '200':
          description: Successful Response
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
    delete:
      tags:
        - mcp
      summary: Handle Streamable Http
      description: Streamable HTTP endpoint for MCP clients that support the new transport.
      operationId: handle_streamable_http_api_mcp_streamable_post
      responses:
        '200':
          description: Successful Response
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
    head:
      tags:
        - mcp
      summary: Streamable Health
      operationId: streamable_health_api_mcp_streamable_head
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/mcp/streamable/:
    get:
      tags:
        - mcp
      summary: Handle Streamable Http
      description: Streamable HTTP endpoint for MCP clients that support the new transport.
      operationId: handle_streamable_http_api_mcp_streamable__post
      responses:
        '200':
          description: Successful Response
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
    post:
      tags:
        - mcp
      summary: Handle Streamable Http
      description: Streamable HTTP endpoint for MCP clients that support the new transport.
      operationId: handle_streamable_http_api_mcp_streamable__post
      responses:
        '200':
          description: Successful Response
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
    delete:
      tags:
        - mcp
      summary: Handle Streamable Http
      description: Streamable HTTP endpoint for MCP clients that support the new transport.
      operationId: handle_streamable_http_api_mcp_streamable__post
      responses:
        '200':
          description: Successful Response
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /health:
    get:
      tags:
        - Health Check
      summary: Health
      operationId: health_health_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /health_check:
    get:
      tags:
        - Health Check
      summary: Health Check
      operationId: health_check_health_check_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthResponse'
  /logs-stream:
    get:
      tags:
        - Log
      summary: Stream Logs
      description: >-
        HTTP/2 Server-Sent-Event (SSE) endpoint for streaming logs.


        Requires authentication to prevent exposure of sensitive log data.

        It establishes a long-lived connection to the server and receives log
        messages in real-time.

        The client should use the header "Accept: text/event-stream".
      operationId: stream_logs_logs_stream_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
  /logs:
    get:
      tags:
        - Log
      summary: Logs
      description: >-
        Retrieve application logs with authentication required.


        SECURITY: Logs may contain sensitive information and require
        authentication.
      operationId: logs_logs_get
      security:
        - OAuth2PasswordBearerCookie: []
        - API key query: []
        - API key header: []
      parameters:
        - name: lines_before
          in: query
          required: false
          schema:
            type: integer
            description: The number of logs before the timestamp or the last log
            default: 0
            title: Lines Before
          description: The number of logs before the timestamp or the last log
        - name: lines_after
          in: query
          required: false
          schema:
            type: integer
            description: The number of logs after the timestamp
            default: 0
            title: Lines After
          description: The number of logs after the timestamp
        - name: timestamp
          in: query
          required: false
          schema:
            type: integer
            description: The timestamp to start getting logs from
            default: 0
            title: Timestamp
          description: The timestamp to start getting logs from
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AccessTypeEnum:
      type: string
      enum:
        - PRIVATE
        - PUBLIC
        - RESTRICTED
      title: AccessTypeEnum
    AssistantRequest:
      properties:
        flow_id:
          type: string
          title: Flow Id
        component_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Component Id
        field_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Field Name
        input_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Value
        max_retries:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Retries
        model_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Name
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
      type: object
      required:
        - flow_id
      title: AssistantRequest
      description: Request model for assistant interactions.
    Body_build_flow_api_v1_build__flow_id__flow_post:
      properties:
        inputs:
          anyOf:
            - $ref: '#/components/schemas/InputValueRequest'
            - type: 'null'
        data:
          anyOf:
            - $ref: '#/components/schemas/FlowDataRequest'
            - type: 'null'
        files:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Files
      type: object
      title: Body_build_flow_api_v1_build__flow_id__flow_post
    Body_build_public_tmp_api_v1_build_public_tmp__flow_id__flow_post:
      properties:
        inputs:
          anyOf:
            - $ref: '#/components/schemas/InputValueRequest'
            - type: 'null'
        data:
          anyOf:
            - $ref: '#/components/schemas/FlowDataRequest'
            - type: 'null'
        files:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Files
      type: object
      title: Body_build_public_tmp_api_v1_build_public_tmp__flow_id__flow_post
    Body_experimental_run_flow_api_v1_run_advanced__flow_id_or_name__post:
      properties:
        inputs:
          anyOf:
            - items:
                $ref: '#/components/schemas/InputValueRequest'
              type: array
            - type: 'null'
          title: Inputs
        outputs:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Outputs
        tweaks:
          anyOf:
            - $ref: '#/components/schemas/Tweaks'
            - type: 'null'
        stream:
          type: boolean
          title: Stream
          default: false
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
      type: object
      title: Body_experimental_run_flow_api_v1_run_advanced__flow_id_or_name__post
    Body_simplified_run_dev_flow_api_v1_run_dev__flow_id_or_name__post:
      properties:
        input_request:
          anyOf:
            - $ref: '#/components/schemas/SimplifiedAPIRequest'
            - type: 'null'
        context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Context
      type: object
      title: Body_simplified_run_dev_flow_api_v1_run_dev__flow_id_or_name__post
    Body_simplified_run_flow_api_v1_run__flow_id_or_name__post:
      properties:
        input_request:
          anyOf:
            - $ref: '#/components/schemas/SimplifiedAPIRequest'
            - type: 'null'
        context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Context
      type: object
      title: Body_simplified_run_flow_api_v1_run__flow_id_or_name__post
    Body_simplified_run_online_flow_api_v1_run_online__flow_id_or_name__post:
      properties:
        input_request:
          anyOf:
            - $ref: '#/components/schemas/SimplifiedAPIRequest'
            - type: 'null'
        context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Context
      type: object
      title: Body_simplified_run_online_flow_api_v1_run_online__flow_id_or_name__post
    Body_simplified_run_release_flow_api_v1_run_release__flow_id_or_name__post:
      properties:
        input_request:
          anyOf:
            - $ref: '#/components/schemas/SimplifiedAPIRequest'
            - type: 'null'
        context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Context
      type: object
      title: >-
        Body_simplified_run_release_flow_api_v1_run_release__flow_id_or_name__post
    Body_upload_file_api_v1_files_upload__flow_id__post:
      properties:
        file:
          type: string
          format: binary
          title: File
      type: object
      required:
        - file
      title: Body_upload_file_api_v1_files_upload__flow_id__post
    Body_upload_file_api_v1_flows_upload__post:
      properties:
        file:
          type: string
          format: binary
          title: File
      type: object
      required:
        - file
      title: Body_upload_file_api_v1_flows_upload__post
    Body_upload_file_api_v1_projects_upload__post:
      properties:
        file:
          type: string
          format: binary
          title: File
      type: object
      required:
        - file
      title: Body_upload_file_api_v1_projects_upload__post
    Body_upload_user_file_api_v2_files__post:
      properties:
        file:
          type: string
          format: binary
          title: File
      type: object
      required:
        - file
      title: Body_upload_user_file_api_v2_files__post
    Body_upload_user_file_api_v2_files_post:
      properties:
        file:
          type: string
          format: binary
          title: File
      type: object
      required:
        - file
      title: Body_upload_user_file_api_v2_files_post
    BulkDeleteRequest:
      properties:
        ids:
          items:
            type: integer
          type: array
          title: Ids
      type: object
      required:
        - ids
      title: BulkDeleteRequest
    BulkDeleteResult:
      properties:
        deleted_count:
          type: integer
          title: Deleted Count
      type: object
      required:
        - deleted_count
      title: BulkDeleteResult
    BusinessCreate:
      properties:
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        business_name:
          type: string
          maxLength: 64
          title: Business Name
        business_level:
          type: integer
          title: Business Level
        first_business_id:
          type: integer
          title: First Business Id
          default: 0
        second_business_id:
          type: integer
          title: Second Business Id
          default: 0
        third_business_id:
          type: integer
          title: Third Business Id
          default: 0
        is_enable:
          type: boolean
          title: Is Enable
          default: true
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
      type: object
      required:
        - tenant_id
        - business_name
        - business_level
      title: BusinessCreate
    BusinessRead:
      properties:
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        business_name:
          type: string
          maxLength: 64
          title: Business Name
        business_level:
          type: integer
          title: Business Level
        first_business_id:
          type: integer
          title: First Business Id
          default: 0
        second_business_id:
          type: integer
          title: Second Business Id
          default: 0
        third_business_id:
          type: integer
          title: Third Business Id
          default: 0
        is_enable:
          type: boolean
          title: Is Enable
          default: true
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
        business_id:
          type: integer
          title: Business Id
        c_uid:
          type: integer
          title: C Uid
        m_uid:
          type: integer
          title: M Uid
        ctime:
          type: string
          format: date-time
          title: Ctime
        utime:
          type: string
          format: date-time
          title: Utime
      type: object
      required:
        - tenant_id
        - business_name
        - business_level
        - business_id
        - c_uid
        - m_uid
        - ctime
        - utime
      title: BusinessRead
    BusinessResourceRead:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: BusinessResourceRead
    BusinessTreeNode:
      properties:
        business_id:
          type: integer
          title: Business Id
        business_name:
          type: string
          title: Business Name
        business_level:
          type: integer
          title: Business Level
        is_enable:
          type: boolean
          title: Is Enable
        children:
          items:
            $ref: '#/components/schemas/BusinessTreeNode'
          type: array
          title: Children
      type: object
      required:
        - business_id
        - business_name
        - business_level
        - is_enable
      title: BusinessTreeNode
    BusinessUpdate:
      properties:
        tenant_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Tenant Id
        business_name:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Business Name
        business_level:
          anyOf:
            - type: integer
            - type: 'null'
          title: Business Level
        first_business_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: First Business Id
        second_business_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Second Business Id
        third_business_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Third Business Id
        is_enable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Enable
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
      type: object
      title: BusinessUpdate
    BusinessUserCandidate:
      properties:
        uid:
          type: integer
          title: Uid
        username:
          type: string
          title: Username
        nickname:
          anyOf:
            - type: string
            - type: 'null'
          title: Nickname
      type: object
      required:
        - uid
        - username
      title: BusinessUserCandidate
    BusinessUserCandidatesResponse:
      properties:
        total_count:
          type: integer
          title: Total Count
        users:
          items:
            $ref: '#/components/schemas/BusinessUserCandidate'
          type: array
          title: Users
      type: object
      required:
        - total_count
        - users
      title: BusinessUserCandidatesResponse
    BusinessUserDeleteResult:
      properties:
        deleted_count:
          type: integer
          title: Deleted Count
      type: object
      required:
        - deleted_count
      title: BusinessUserDeleteResult
    BusinessUserRoleBatchDelete:
      properties:
        ids:
          items:
            type: integer
          type: array
          title: Ids
      type: object
      required:
        - ids
      title: BusinessUserRoleBatchDelete
    BusinessUserRoleRead:
      properties:
        id:
          type: integer
          title: Id
        business_id:
          type: integer
          title: Business Id
        uid:
          type: integer
          title: Uid
        username:
          type: string
          title: Username
        nickname:
          anyOf:
            - type: string
            - type: 'null'
          title: Nickname
        role_id:
          type: string
          title: Role Id
        role_name:
          type: string
          title: Role Name
      type: object
      required:
        - id
        - business_id
        - uid
        - username
        - role_id
        - role_name
      title: BusinessUserRoleRead
    BusinessUserRoleUpsert:
      properties:
        uid:
          anyOf:
            - type: integer
            - type: 'null'
          title: Uid
        username:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
          title: Username
        role_ids:
          items:
            type: string
          type: array
          minItems: 1
          title: Role Ids
      type: object
      title: BusinessUserRoleUpsert
    CancelFlowResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          type: string
          title: Message
      type: object
      required:
        - success
        - message
      title: CancelFlowResponse
      description: Response model for flow build cancellation.
    ChatOutputResponse:
      properties:
        message:
          anyOf:
            - type: string
            - items:
                anyOf:
                  - type: string
                  - additionalProperties: true
                    type: object
              type: array
          title: Message
        sender:
          anyOf:
            - type: string
            - type: 'null'
          title: Sender
          default: Machine
        sender_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Sender Name
          default: AI
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
        stream_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Stream Url
        component_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Component Id
        files:
          items:
            $ref: '#/components/schemas/File'
          type: array
          title: Files
          default: []
        type:
          type: string
          title: Type
      type: object
      required:
        - message
        - type
      title: ChatOutputResponse
      description: Chat output response schema.
    CodeContent:
      additionalProperties: true
      type: object
    ComponentGroupPatchPayload:
      properties:
        group_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Group Name
        group_en_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Group En Name
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        order_num:
          anyOf:
            - type: integer
            - type: 'null'
          title: Order Num
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        scope:
          anyOf:
            - type: integer
            - type: 'null'
          title: Scope
        business_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Business Id
      type: object
      title: ComponentGroupPatchPayload
    ComponentGroupPayload:
      properties:
        group_name:
          type: string
          title: Group Name
        group_en_name:
          type: string
          title: Group En Name
        component_type:
          type: string
          enum:
            - component
            - bundle
          title: Component Type
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        order_num:
          type: integer
          title: Order Num
          default: 0
        is_active:
          type: boolean
          title: Is Active
          default: true
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        scope:
          type: integer
          title: Scope
          default: 1
        business_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Business Id
      type: object
      required:
        - group_name
        - group_en_name
        - component_type
      title: ComponentGroupPayload
    ComponentPatchPayload:
      properties:
        component_group_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Component Group Id
        component_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Component Name
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        tag:
          anyOf:
            - type: string
            - type: 'null'
          title: Tag
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        component_skill:
          anyOf:
            - type: string
            - type: 'null'
          title: Component Skill
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        version_note:
          anyOf:
            - type: string
            - type: 'null'
          title: Version Note
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
        is_legacy:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Legacy
        is_deprecated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Deprecated
        scope:
          anyOf:
            - type: integer
            - type: 'null'
          title: Scope
        business_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Business Id
      type: object
      title: ComponentPatchPayload
    ComponentPayload:
      properties:
        component_group_id:
          type: integer
          title: Component Group Id
        component_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Component Name
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        tag:
          anyOf:
            - type: string
            - type: 'null'
          title: Tag
          default: ''
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        component_skill:
          anyOf:
            - type: string
            - type: 'null'
          title: Component Skill
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        version_note:
          anyOf:
            - type: string
            - type: 'null'
          title: Version Note
        is_active:
          type: boolean
          title: Is Active
          default: true
        is_legacy:
          type: boolean
          title: Is Legacy
          default: false
        is_deprecated:
          type: boolean
          title: Is Deprecated
          default: false
        scope:
          type: integer
          title: Scope
          default: 1
        business_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Business Id
      type: object
      required:
        - component_group_id
      title: ComponentPayload
    ComponentVersionItem:
      properties:
        id:
          type: integer
          title: Id
        component_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Component Version
        component_group_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Component Group Id
        component_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Component Name
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        tag:
          anyOf:
            - type: string
            - type: 'null'
          title: Tag
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        component_skill:
          anyOf:
            - type: string
            - type: 'null'
          title: Component Skill
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        version_note:
          anyOf:
            - type: string
            - type: 'null'
          title: Version Note
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
        is_legacy:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Legacy
        is_deprecated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Deprecated
        scope:
          anyOf:
            - type: integer
            - type: 'null'
          title: Scope
        business_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Business Id
        owner_uid:
          anyOf:
            - type: integer
            - type: 'null'
          title: Owner Uid
        creator_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Creator Name
        ctime:
          anyOf:
            - type: string
            - type: 'null'
          title: Ctime
      type: object
      required:
        - id
        - component_version
      title: ComponentVersionItem
    ComponentVersionListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ComponentVersionItem'
          type: array
          title: Items
      type: object
      required:
        - items
      title: ComponentVersionListResponse
    ConfigCreate:
      properties:
        config_key:
          type: string
          maxLength: 128
          title: Config Key
        config_name:
          type: string
          maxLength: 64
          title: Config Name
        config_value:
          type: string
          title: Config Value
        note:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Note
      type: object
      required:
        - config_key
        - config_name
        - config_value
      title: ConfigCreate
    ConfigRead:
      properties:
        config_key:
          type: string
          maxLength: 128
          title: Config Key
        config_name:
          type: string
          maxLength: 64
          title: Config Name
        config_value:
          type: string
          title: Config Value
        note:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Note
        id:
          type: integer
          title: Id
        c_uid:
          type: integer
          title: C Uid
        m_uid:
          type: integer
          title: M Uid
        ctime:
          type: string
          format: date-time
          title: Ctime
        utime:
          type: string
          format: date-time
          title: Utime
      type: object
      required:
        - config_key
        - config_name
        - config_value
        - id
        - c_uid
        - m_uid
        - ctime
        - utime
      title: ConfigRead
    ConfigResponse:
      properties:
        feature_flags:
          $ref: '#/components/schemas/FeatureFlags'
        serialization_max_items_length:
          type: integer
          title: Serialization Max Items Length
        serialization_max_text_length:
          type: integer
          title: Serialization Max Text Length
        frontend_timeout:
          type: integer
          title: Frontend Timeout
        auto_saving:
          type: boolean
          title: Auto Saving
        auto_saving_interval:
          type: integer
          title: Auto Saving Interval
        health_check_max_retries:
          type: integer
          title: Health Check Max Retries
        max_file_size_upload:
          type: integer
          title: Max File Size Upload
        webhook_polling_interval:
          type: integer
          title: Webhook Polling Interval
        public_flow_cleanup_interval:
          type: integer
          title: Public Flow Cleanup Interval
        public_flow_expiration:
          type: integer
          title: Public Flow Expiration
        event_delivery:
          type: string
          enum:
            - polling
            - streaming
            - direct
          title: Event Delivery
        webhook_auth_enable:
          type: boolean
          title: Webhook Auth Enable
        voice_mode_available:
          type: boolean
          title: Voice Mode Available
        default_project_name:
          type: string
          title: Default Project Name
        hide_getting_started_progress:
          type: boolean
          title: Hide Getting Started Progress
      type: object
      required:
        - feature_flags
        - serialization_max_items_length
        - serialization_max_text_length
        - frontend_timeout
        - auto_saving
        - auto_saving_interval
        - health_check_max_retries
        - max_file_size_upload
        - webhook_polling_interval
        - public_flow_cleanup_interval
        - public_flow_expiration
        - event_delivery
        - webhook_auth_enable
        - voice_mode_available
        - default_project_name
        - hide_getting_started_progress
      title: ConfigResponse
    ConfigUpdate:
      properties:
        config_name:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Config Name
        config_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Config Value
        note:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Note
      type: object
      title: ConfigUpdate
    ContentBlock:
      properties:
        title:
          type: string
          title: Title
        contents:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Contents
        allow_markdown:
          type: boolean
          title: Allow Markdown
          default: true
        media_url:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Media Url
      type: object
      required:
        - title
        - contents
      title: ContentBlock
      description: A block of content that can contain different types of content.
    DictionaryIndexCreate:
      properties:
        config_key:
          type: string
          maxLength: 128
          minLength: 1
          title: Config Key
        config_name:
          type: string
          maxLength: 64
          minLength: 1
          title: Config Name
        config_en_name:
          type: string
          maxLength: 64
          minLength: 1
          title: Config En Name
        note:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Note
          default: ''
      type: object
      required:
        - config_key
        - config_name
        - config_en_name
      title: DictionaryIndexCreate
    DictionaryIndexUpdate:
      properties:
        config_name:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Config Name
        config_en_name:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Config En Name
        note:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Note
      type: object
      title: DictionaryIndexUpdate
    DictionaryItemCreate:
      properties:
        config_key:
          type: string
          maxLength: 128
          minLength: 1
          title: Config Key
        config_name:
          type: string
          maxLength: 64
          minLength: 1
          title: Config Name
        config_en_name:
          type: string
          maxLength: 64
          minLength: 1
          title: Config En Name
        key_order:
          type: integer
          title: Key Order
          default: 0
        config_value:
          type: string
          minLength: 1
          title: Config Value
        note:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Note
          default: ''
      type: object
      required:
        - config_key
        - config_name
        - config_en_name
        - config_value
      title: DictionaryItemCreate
    DictionaryItemUpdate:
      properties:
        config_name:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Config Name
        config_en_name:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Config En Name
        key_order:
          anyOf:
            - type: integer
            - type: 'null'
          title: Key Order
        config_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Config Value
        note:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Note
      type: object
      title: DictionaryItemUpdate
    DictionaryRead:
      properties:
        config_key:
          type: string
          maxLength: 128
          title: Config Key
        config_name:
          type: string
          maxLength: 64
          title: Config Name
        config_en_name:
          type: string
          maxLength: 64
          title: Config En Name
        key_order:
          type: integer
          title: Key Order
          default: 0
        parent_id:
          type: integer
          title: Parent Id
          default: 0
        config_value:
          type: string
          title: Config Value
          default: ''
        note:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Note
          default: ''
        config_id:
          type: integer
          title: Config Id
        c_uid:
          type: integer
          title: C Uid
        m_uid:
          type: integer
          title: M Uid
        ctime:
          type: string
          format: date-time
          title: Ctime
        utime:
          type: string
          format: date-time
          title: Utime
      type: object
      required:
        - config_key
        - config_name
        - config_en_name
        - config_id
        - c_uid
        - m_uid
        - ctime
        - utime
      title: DictionaryRead
    ErrorContent:
      additionalProperties: true
      type: object
    EventDeliveryType:
      type: string
      enum:
        - streaming
        - direct
        - polling
      title: EventDeliveryType
    FeatureFlags:
      properties:
        mvp_components:
          type: boolean
          title: Mvp Components
          default: false
      additionalProperties: false
      type: object
      title: FeatureFlags
    File:
      properties:
        path:
          type: string
          title: Path
        name:
          type: string
          title: Name
        type:
          type: string
          title: Type
      type: object
      required:
        - path
        - name
        - type
      title: File
      description: File schema.
    FileBatchDeleteResponse:
      properties:
        message:
          type: string
          title: Message
        files_deleted:
          type: integer
          title: Files Deleted
          default: 0
        files_kept:
          type: integer
          title: Files Kept
          default: 0
      type: object
      required:
        - message
      title: FileBatchDeleteResponse
      description: Response schema for batch/all file deletion operations.
    FileDeleteResponse:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: FileDeleteResponse
      description: Response schema for single file deletion.
    FileRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        tenant_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Tenant Id
        business_id:
          type: integer
          title: Business Id
          default: 0
        is_self:
          type: boolean
          title: Is Self
          default: false
        user_id:
          type: integer
          title: User Id
        c_uid:
          type: integer
          title: C Uid
          default: 0
        m_uid:
          type: integer
          title: M Uid
          default: 0
        name:
          type: string
          title: Name
        path:
          type: string
          format: path
          title: Path
        size:
          type: integer
          title: Size
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - user_id
        - name
        - path
        - size
        - created_at
        - updated_at
      title: FileRead
      description: Canonical file response schema for v2 file management APIs.
    Flow:
      properties:
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        flow_skill:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow Skill
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        icon_bg_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon Bg Color
        gradient:
          anyOf:
            - type: string
            - type: 'null'
          title: Gradient
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data
        is_component:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Component
          default: false
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        webhook:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Webhook
          description: Can be used on the webhook endpoint
          default: false
        endpoint_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpoint Name
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        locked:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Locked
          default: false
        is_online:
          type: boolean
          title: Is Online
          default: false
        is_version:
          type: boolean
          title: Is Version
          default: false
        is_hold:
          type: boolean
          title: Is Hold
          default: false
        is_endpoint:
          type: boolean
          title: Is Endpoint
          default: false
        is_deleted:
          type: boolean
          title: Is Deleted
          default: false
        flow_type:
          type: string
          title: Flow Type
          default: ''
        online_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Online Version
        mcp_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Mcp Enabled
          description: Can be exposed in the MCP server
          default: false
        action_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Name
          description: The name of the action associated with the flow
        action_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Description
          description: The description of the action associated with the flow
        access_type:
          $ref: '#/components/schemas/AccessTypeEnum'
          default: PRIVATE
        id:
          type: string
          format: uuid
          title: Id
        tenant_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Tenant Id
        business_id:
          type: integer
          title: Business Id
          default: 0
        is_self:
          type: boolean
          title: Is Self
          default: false
        org_id:
          type: integer
          title: Org Id
          default: 0
        user_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: User Id
        m_uid:
          type: integer
          title: M Uid
          default: 0
        create_at:
          type: string
          format: date-time
          title: Create At
      type: object
      required:
        - name
      title: Flow
    FlowCreate:
      properties:
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        flow_skill:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow Skill
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        icon_bg_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon Bg Color
        gradient:
          anyOf:
            - type: string
            - type: 'null'
          title: Gradient
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data
        is_component:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Component
          default: false
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        webhook:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Webhook
          description: Can be used on the webhook endpoint
          default: false
        endpoint_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpoint Name
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        locked:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Locked
          default: false
        is_online:
          type: boolean
          title: Is Online
          default: false
        is_version:
          type: boolean
          title: Is Version
          default: false
        is_hold:
          type: boolean
          title: Is Hold
          default: false
        is_endpoint:
          type: boolean
          title: Is Endpoint
          default: false
        is_deleted:
          type: boolean
          title: Is Deleted
          default: false
        flow_type:
          type: string
          title: Flow Type
          default: ''
        online_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Online Version
        mcp_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Mcp Enabled
          description: Can be exposed in the MCP server
          default: false
        action_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Name
          description: The name of the action associated with the flow
        action_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Description
          description: The description of the action associated with the flow
        access_type:
          $ref: '#/components/schemas/AccessTypeEnum'
          default: PRIVATE
        user_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: User Id
        tenant_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Tenant Id
        business_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Business Id
          default: 0
        is_self:
          type: boolean
          title: Is Self
          default: false
        org_id:
          type: integer
          title: Org Id
          default: 0
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
        fs_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Fs Path
      type: object
      required:
        - name
      title: FlowCreate
    FlowDataRequest:
      properties:
        nodes:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Nodes
        edges:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Edges
        viewport:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Viewport
      type: object
      required:
        - nodes
        - edges
      title: FlowDataRequest
    FlowHeader:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Unique identifier for the flow
        name:
          type: string
          title: Name
          description: The name of the flow
        tenant_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Tenant Id
          description: The tenant ID of the flow
        business_id:
          type: integer
          title: Business Id
          description: The business ID of the flow
          default: 0
        is_self:
          type: boolean
          title: Is Self
          description: Whether this flow is in self scope
          default: false
        org_id:
          type: integer
          title: Org Id
          description: The organization ID of the flow
          default: 0
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
          description: >-
            The ID of the project containing the flow. None if not associated
            with a project
        create_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Create At
          description: The creation time of the flow
        m_uid:
          anyOf:
            - type: integer
            - type: 'null'
          title: M Uid
          description: Last modifier user id
        creator_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Creator Name
          description: Resolved display name of the flow creator
        is_component:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Component
          description: Flag indicating whether the flow is a component
        endpoint_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpoint Name
          description: The name of the endpoint associated with this flow
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: A description of the flow
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data
          description: The data of the component, if is_component is True
        access_type:
          anyOf:
            - $ref: '#/components/schemas/AccessTypeEnum'
            - type: 'null'
          description: The access type of the flow
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
          description: The tags of the flow
        is_online:
          type: boolean
          title: Is Online
          description: Whether the flow is online
          default: false
        is_version:
          type: boolean
          title: Is Version
          description: Whether the flow is a version snapshot
          default: false
        is_hold:
          type: boolean
          title: Is Hold
          description: Whether the flow is on hold
          default: false
        is_endpoint:
          type: boolean
          title: Is Endpoint
          description: Whether the flow is marked as endpoint
          default: false
        is_deleted:
          type: boolean
          title: Is Deleted
          description: Whether the flow is soft deleted
          default: false
        flow_type:
          type: string
          title: Flow Type
          description: The flow type
          default: ''
        online_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Online Version
          description: The online version of the flow
        mcp_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Mcp Enabled
          description: Flag indicating whether the flow is exposed in the MCP server
        action_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Name
          description: The name of the action associated with the flow
        action_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Description
          description: The description of the action associated with the flow
      type: object
      required:
        - id
        - name
      title: FlowHeader
      description: Model representing a header for a flow - Without the data.
    FlowListCreate:
      properties:
        flows:
          items:
            $ref: '#/components/schemas/FlowCreate'
          type: array
          title: Flows
      type: object
      required:
        - flows
      title: FlowListCreate
    FlowRead:
      properties:
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        flow_skill:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow Skill
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        icon_bg_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon Bg Color
        gradient:
          anyOf:
            - type: string
            - type: 'null'
          title: Gradient
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data
        is_component:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Component
          default: false
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        webhook:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Webhook
          description: Can be used on the webhook endpoint
          default: false
        endpoint_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpoint Name
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
          description: The tags of the flow
        locked:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Locked
          default: false
        is_online:
          type: boolean
          title: Is Online
          default: false
        is_version:
          type: boolean
          title: Is Version
          default: false
        is_hold:
          type: boolean
          title: Is Hold
          default: false
        is_endpoint:
          type: boolean
          title: Is Endpoint
          default: false
        is_deleted:
          type: boolean
          title: Is Deleted
          default: false
        flow_type:
          type: string
          title: Flow Type
          default: ''
        online_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Online Version
        mcp_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Mcp Enabled
          description: Can be exposed in the MCP server
          default: false
        action_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Name
          description: The name of the action associated with the flow
        action_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Description
          description: The description of the action associated with the flow
        access_type:
          $ref: '#/components/schemas/AccessTypeEnum'
          default: PRIVATE
        id:
          type: string
          format: uuid
          title: Id
        user_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: User Id
        tenant_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Tenant Id
        business_id:
          type: integer
          title: Business Id
          default: 0
        is_self:
          type: boolean
          title: Is Self
          default: false
        org_id:
          type: integer
          title: Org Id
          default: 0
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
        create_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Create At
        m_uid:
          anyOf:
            - type: integer
            - type: 'null'
          title: M Uid
        creator_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Creator Name
      type: object
      required:
        - name
        - id
        - user_id
        - project_id
      title: FlowRead
    FlowTemplateCreate:
      properties:
        name:
          type: string
          title: Name
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        scope:
          $ref: '#/components/schemas/FlowTemplateScope'
          default: tenant
        business_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Business Id
      type: object
      required:
        - name
      title: FlowTemplateCreate
    FlowTemplateRead:
      properties:
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        flow_skill:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow Skill
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        icon_bg_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon Bg Color
        gradient:
          anyOf:
            - type: string
            - type: 'null'
          title: Gradient
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        flow_type:
          type: string
          title: Flow Type
          default: ''
        id:
          type: string
          format: uuid
          title: Id
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        business_id:
          type: integer
          title: Business Id
          default: 0
        is_self:
          type: boolean
          title: Is Self
          default: false
        user_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: User Id
        creator_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Creator Name
        create_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Create At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      type: object
      required:
        - name
        - id
        - tenant_id
      title: FlowTemplateRead
    FlowTemplateScope:
      type: string
      enum:
        - system
        - tenant
        - business
        - personal
      title: FlowTemplateScope
    FlowTemplateUpdate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        flow_skill:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow Skill
        flow_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow Type
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        icon_bg_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon Bg Color
        gradient:
          anyOf:
            - type: string
            - type: 'null'
          title: Gradient
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        business_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Business Id
        is_self:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Self
      type: object
      title: FlowTemplateUpdate
    FlowUpdate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        flow_skill:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow Skill
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data
        last_known_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Known Updated At
        tenant_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Tenant Id
        business_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Business Id
        is_self:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Self
        org_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Org Id
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
        endpoint_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpoint Name
        mcp_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Mcp Enabled
        locked:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Locked
        is_online:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Online
        is_version:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Version
        is_hold:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Hold
        is_endpoint:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Endpoint
        is_deleted:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Deleted
        flow_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow Type
        online_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Online Version
        action_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Name
        action_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Description
        access_type:
          anyOf:
            - $ref: '#/components/schemas/AccessTypeEnum'
            - type: 'null'
        fs_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Fs Path
      type: object
      title: FlowUpdate
    FlowVersionCreate:
      properties:
        version:
          type: string
          title: Version
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
      type: object
      required:
        - version
      title: FlowVersionCreate
    FlowVersionRead:
      properties:
        flow_id:
          type: string
          format: uuid
          title: Flow Id
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        business_id:
          type: integer
          title: Business Id
          default: 0
        is_self:
          type: boolean
          title: Is Self
          default: false
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        version_note:
          anyOf:
            - type: string
            - type: 'null'
          title: Version Note
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        icon_bg_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon Bg Color
        gradient:
          anyOf:
            - type: string
            - type: 'null'
          title: Gradient
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data
        is_component:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Component
          default: false
        webhook:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Webhook
          default: false
        endpoint_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpoint Name
        mcp_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Mcp Enabled
          default: false
        action_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Name
        action_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Description
        access_type:
          $ref: '#/components/schemas/AccessTypeEnum'
          default: PRIVATE
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        is_hold:
          type: boolean
          title: Is Hold
          default: false
        flow_version:
          type: string
          title: Flow Version
        flow_type:
          type: string
          title: Flow Type
          default: ''
        flow_skill:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow Skill
        id:
          type: integer
          title: Id
        user_id:
          type: integer
          title: User Id
        creator_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Creator Name
        create_at:
          type: string
          format: date-time
          title: Create At
      type: object
      required:
        - flow_id
        - tenant_id
        - name
        - flow_version
        - id
        - user_id
        - create_at
      title: FlowVersionRead
    GraphData:
      properties:
        nodes:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Nodes
        edges:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Edges
        viewport:
          anyOf:
            - $ref: '#/components/schemas/ViewPort'
            - type: 'null'
      type: object
      required:
        - nodes
        - edges
      title: GraphData
    GraphDumpResponse:
      properties:
        data:
          $ref: '#/components/schemas/GraphData'
        is_component:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Component
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        endpoint_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpoint Name
      type: object
      required:
        - data
      title: GraphDumpResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    HealthResponse:
      properties:
        status:
          type: string
          title: Status
          default: nok
        chat:
          type: string
          title: Chat
          default: error check the server logs
        db:
          type: string
          title: Db
          default: error check the server logs
      type: object
      title: HealthResponse
    InputValueRequest:
      properties:
        components:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Components
          default: []
        input_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Value
        session:
          anyOf:
            - type: string
            - type: 'null'
          title: Session
        ip_address:
          anyOf:
            - type: string
              maxLength: 45
            - type: 'null'
          title: Ip Address
          description: Client IP address extracted from the HTTP request.
        type:
          anyOf:
            - type: string
              enum:
                - chat
                - text
                - any
            - type: 'null'
          title: Type
          description: >-
            Defines on which components the input value should be applied. 'any'
            applies to all input components.
          default: any
        client_request_time:
          anyOf:
            - type: integer
            - type: 'null'
          title: Client Request Time
          description: >-
            Client-side timestamp in milliseconds when the request was
            initiated. Used to calculate accurate end-to-end duration.
      additionalProperties: false
      type: object
      title: InputValueRequest
      examples:
        - components:
            - components_id
            - Component Name
          input_value: input_value
          session: session_id
        - components:
            - Component Name
          input_value: input_value
        - input_value: input_value
        - components:
            - Component Name
          input_value: input_value
          ip_address: 203.0.113.10
          session: session_id
        - input_value: input_value
          session: session_id
        - input_value: input_value
          type: chat
        - input_value: '{"key": "value"}'
          type: json
    JSONContent:
      additionalProperties: true
      type: object
    MCPServerConfig:
      properties:
        mcp_scope:
          anyOf:
            - type: integer
            - type: 'null'
          title: Mcp Scope
        business_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Business Id
        new_name:
          anyOf:
            - type: string
            - type: 'null'
          title: New Name
        mcp_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Mcp Type
        command:
          anyOf:
            - type: string
            - type: 'null'
          title: Command
        args:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Args
        env:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Env
        headers:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Headers
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        logo:
          anyOf:
            - type: string
            - type: 'null'
          title: Logo
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
      additionalProperties: true
      type: object
      title: MCPServerConfig
      description: Pydantic model for MCP server configuration.
    MediaContent:
      additionalProperties: true
      type: object
    MessageRead:
      properties:
        sender:
          type: string
          title: Sender
        sender_name:
          type: string
          title: Sender Name
        session_id:
          type: string
          title: Session Id
        context_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Context Id
        ip_address:
          anyOf:
            - type: string
              maxLength: 45
            - type: 'null'
          title: Ip Address
        flow_version:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
          title: Flow Version
        text:
          type: string
          title: Text
        files:
          items:
            type: string
          type: array
          title: Files
        error:
          type: boolean
          title: Error
          default: false
        edit:
          type: boolean
          title: Edit
          default: false
        start_time:
          type: string
          format: date-time
          title: Start Time
        end_time:
          type: string
          format: date-time
          title: End Time
        properties:
          $ref: '#/components/schemas/Properties'
        category:
          type: string
          title: Category
          default: message
        content_blocks:
          items:
            $ref: '#/components/schemas/ContentBlock'
          type: array
          title: Content Blocks
        id:
          type: integer
          title: Id
        tenant_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Tenant Id
        flow_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Flow Id
        timestamp:
          type: string
          format: date-time
          title: Timestamp
      type: object
      required:
        - sender
        - sender_name
        - session_id
        - text
        - id
        - flow_id
      title: MessageRead
    MessageResponse:
      properties:
        id:
          anyOf:
            - type: integer
            - type: string
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        flow_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Flow Id
        flow_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow Version
        timestamp:
          type: string
          format: date-time
          title: Timestamp
        start_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start Time
        end_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Time
        sender:
          type: string
          title: Sender
        sender_name:
          type: string
          title: Sender Name
        session_id:
          type: string
          title: Session Id
        context_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Context Id
        ip_address:
          anyOf:
            - type: string
              maxLength: 45
            - type: 'null'
          title: Ip Address
        text:
          type: string
          title: Text
        files:
          items:
            type: string
          type: array
          title: Files
          default: []
        edit:
          type: boolean
          title: Edit
        duration:
          anyOf:
            - type: number
            - type: 'null'
          title: Duration
        properties:
          anyOf:
            - $ref: '#/components/schemas/Properties'
            - type: 'null'
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
        content_blocks:
          anyOf:
            - items:
                $ref: '#/components/schemas/ContentBlock'
              type: array
            - type: 'null'
          title: Content Blocks
      type: object
      required:
        - sender
        - sender_name
        - session_id
        - text
        - edit
      title: MessageResponse
    MessageUpdate:
      properties:
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        sender:
          anyOf:
            - type: string
            - type: 'null'
          title: Sender
        sender_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Sender Name
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
        context_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Context Id
        ip_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Ip Address
        flow_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow Version
        files:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Files
        edit:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Edit
        error:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Error
        start_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start Time
        end_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Time
        properties:
          anyOf:
            - $ref: '#/components/schemas/Properties'
            - type: 'null'
      type: object
      title: MessageUpdate
    ModelProviderCreate:
      properties:
        provider_key:
          type: string
          maxLength: 64
          minLength: 1
          title: Provider Key
        provider_name:
          type: string
          maxLength: 64
          minLength: 1
          title: Provider Name
        icon:
          type: string
          maxLength: 64
          title: Icon
          default: Bot
        variable_name:
          type: string
          maxLength: 128
          minLength: 1
          title: Variable Name
        requires_api_key:
          type: boolean
          title: Requires Api Key
          default: true
        api_docs_url:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Api Docs Url
        model_class:
          type: string
          maxLength: 128
          minLength: 1
          title: Model Class
        model_name_param:
          type: string
          maxLength: 64
          title: Model Name Param
          default: model
        api_key_param:
          type: string
          maxLength: 64
          title: Api Key Param
          default: api_key
        base_url_param:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Base Url Param
        base_url:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Base Url
        url_param:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Url Param
        max_tokens_field_name:
          type: string
          maxLength: 64
          title: Max Tokens Field Name
          default: max_tokens
        is_active:
          type: boolean
          title: Is Active
          default: true
        key_order:
          type: integer
          title: Key Order
          default: 0
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
      type: object
      required:
        - provider_key
        - provider_name
        - variable_name
        - model_class
      title: ModelProviderCreate
    ModelProviderListItem:
      properties:
        provider_key:
          type: string
          maxLength: 64
          minLength: 1
          title: Provider Key
        provider_name:
          type: string
          maxLength: 64
          minLength: 1
          title: Provider Name
        icon:
          type: string
          maxLength: 64
          title: Icon
          default: Bot
        variable_name:
          type: string
          maxLength: 128
          minLength: 1
          title: Variable Name
        requires_api_key:
          type: boolean
          title: Requires Api Key
          default: true
        api_docs_url:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Api Docs Url
        model_class:
          type: string
          maxLength: 128
          minLength: 1
          title: Model Class
        model_name_param:
          type: string
          maxLength: 64
          title: Model Name Param
          default: model
        api_key_param:
          type: string
          maxLength: 64
          title: Api Key Param
          default: api_key
        base_url_param:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Base Url Param
        base_url:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Base Url
        url_param:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Url Param
        max_tokens_field_name:
          type: string
          maxLength: 64
          title: Max Tokens Field Name
          default: max_tokens
        is_active:
          type: boolean
          title: Is Active
          default: true
        key_order:
          type: integer
          title: Key Order
          default: 0
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
        provider_id:
          type: integer
          title: Provider Id
        c_uid:
          type: integer
          title: C Uid
        m_uid:
          type: integer
          title: M Uid
        ctime:
          type: string
          format: date-time
          title: Ctime
        utime:
          type: string
          format: date-time
          title: Utime
        model_count:
          type: integer
          title: Model Count
      type: object
      required:
        - provider_key
        - provider_name
        - variable_name
        - model_class
        - provider_id
        - c_uid
        - m_uid
        - ctime
        - utime
        - model_count
      title: ModelProviderListItem
    ModelProviderModelCreate:
      properties:
        provider_id:
          type: integer
          title: Provider Id
        model_name:
          type: string
          maxLength: 128
          minLength: 1
          title: Model Name
        model_display_name:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Model Display Name
        model_type:
          type: string
          maxLength: 128
          minLength: 1
          title: Model Type
        context_length:
          anyOf:
            - type: integer
            - type: 'null'
          title: Context Length
        is_default:
          type: boolean
          title: Is Default
          default: false
        is_deprecated:
          type: boolean
          title: Is Deprecated
          default: false
        is_not_supported:
          type: boolean
          title: Is Not Supported
          default: false
        is_preview:
          type: boolean
          title: Is Preview
          default: false
        is_reasoning:
          type: boolean
          title: Is Reasoning
          default: false
        is_tool_calling:
          type: boolean
          title: Is Tool Calling
          default: false
        is_search:
          type: boolean
          title: Is Search
          default: false
        is_vl:
          type: boolean
          title: Is Vl
          default: false
        is_active:
          type: boolean
          title: Is Active
          default: true
        key_order:
          type: integer
          title: Key Order
          default: 0
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
      type: object
      required:
        - provider_id
        - model_name
        - model_type
      title: ModelProviderModelCreate
    ModelProviderModelRead:
      properties:
        provider_id:
          type: integer
          title: Provider Id
        model_name:
          type: string
          title: Model Name
        model_display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Display Name
        model_type:
          type: string
          title: Model Type
        context_length:
          anyOf:
            - type: integer
            - type: 'null'
          title: Context Length
        is_default:
          type: boolean
          title: Is Default
        is_deprecated:
          type: boolean
          title: Is Deprecated
        is_not_supported:
          type: boolean
          title: Is Not Supported
        is_preview:
          type: boolean
          title: Is Preview
        is_reasoning:
          type: boolean
          title: Is Reasoning
        is_tool_calling:
          type: boolean
          title: Is Tool Calling
        is_search:
          type: boolean
          title: Is Search
        is_vl:
          type: boolean
          title: Is Vl
        is_active:
          type: boolean
          title: Is Active
        key_order:
          type: integer
          title: Key Order
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        id:
          type: integer
          title: Id
        c_uid:
          type: integer
          title: C Uid
        m_uid:
          type: integer
          title: M Uid
        ctime:
          type: string
          format: date-time
          title: Ctime
        utime:
          type: string
          format: date-time
          title: Utime
      type: object
      required:
        - provider_id
        - model_name
        - model_type
        - is_default
        - is_deprecated
        - is_not_supported
        - is_preview
        - is_reasoning
        - is_tool_calling
        - is_search
        - is_vl
        - is_active
        - key_order
        - id
        - c_uid
        - m_uid
        - ctime
        - utime
      title: ModelProviderModelRead
    ModelProviderModelUpdate:
      properties:
        model_name:
          anyOf:
            - type: string
              maxLength: 128
              minLength: 1
            - type: 'null'
          title: Model Name
        model_display_name:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Model Display Name
        model_type:
          anyOf:
            - type: string
              maxLength: 128
              minLength: 1
            - type: 'null'
          title: Model Type
        context_length:
          anyOf:
            - type: integer
            - type: 'null'
          title: Context Length
        is_default:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Default
        is_deprecated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Deprecated
        is_not_supported:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Not Supported
        is_preview:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Preview
        is_reasoning:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Reasoning
        is_tool_calling:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Tool Calling
        is_search:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Search
        is_vl:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Vl
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
        key_order:
          anyOf:
            - type: integer
            - type: 'null'
          title: Key Order
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
      type: object
      title: ModelProviderModelUpdate
    ModelProviderRead:
      properties:
        provider_key:
          type: string
          maxLength: 64
          minLength: 1
          title: Provider Key
        provider_name:
          type: string
          maxLength: 64
          minLength: 1
          title: Provider Name
        icon:
          type: string
          maxLength: 64
          title: Icon
          default: Bot
        variable_name:
          type: string
          maxLength: 128
          minLength: 1
          title: Variable Name
        requires_api_key:
          type: boolean
          title: Requires Api Key
          default: true
        api_docs_url:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Api Docs Url
        model_class:
          type: string
          maxLength: 128
          minLength: 1
          title: Model Class
        model_name_param:
          type: string
          maxLength: 64
          title: Model Name Param
          default: model
        api_key_param:
          type: string
          maxLength: 64
          title: Api Key Param
          default: api_key
        base_url_param:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Base Url Param
        base_url:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Base Url
        url_param:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Url Param
        max_tokens_field_name:
          type: string
          maxLength: 64
          title: Max Tokens Field Name
          default: max_tokens
        is_active:
          type: boolean
          title: Is Active
          default: true
        key_order:
          type: integer
          title: Key Order
          default: 0
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
        provider_id:
          type: integer
          title: Provider Id
        c_uid:
          type: integer
          title: C Uid
        m_uid:
          type: integer
          title: M Uid
        ctime:
          type: string
          format: date-time
          title: Ctime
        utime:
          type: string
          format: date-time
          title: Utime
      type: object
      required:
        - provider_key
        - provider_name
        - variable_name
        - model_class
        - provider_id
        - c_uid
        - m_uid
        - ctime
        - utime
      title: ModelProviderRead
    ModelProviderUpdate:
      properties:
        provider_key:
          anyOf:
            - type: string
              maxLength: 64
              minLength: 1
            - type: 'null'
          title: Provider Key
        provider_name:
          anyOf:
            - type: string
              maxLength: 64
              minLength: 1
            - type: 'null'
          title: Provider Name
        icon:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Icon
        variable_name:
          anyOf:
            - type: string
              maxLength: 128
              minLength: 1
            - type: 'null'
          title: Variable Name
        requires_api_key:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Requires Api Key
        api_docs_url:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Api Docs Url
        model_class:
          anyOf:
            - type: string
              maxLength: 128
              minLength: 1
            - type: 'null'
          title: Model Class
        model_name_param:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Model Name Param
        api_key_param:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Api Key Param
        base_url_param:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Base Url Param
        base_url:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Base Url
        url_param:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Url Param
        max_tokens_field_name:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Max Tokens Field Name
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
        key_order:
          anyOf:
            - type: integer
            - type: 'null'
          title: Key Order
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
      type: object
      title: ModelProviderUpdate
    OpenAIResponsesRequest:
      properties:
        model:
          type: string
          title: Model
          description: The flow ID to execute (used instead of OpenAI model)
        input:
          type: string
          title: Input
          description: The input text to process
        stream:
          type: boolean
          title: Stream
          description: Whether to stream the response
          default: false
        background:
          type: boolean
          title: Background
          description: Whether to process in background
          default: false
        tools:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Tools
          description: Tools are not supported yet
        previous_response_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous Response Id
          description: ID of previous response to continue conversation
        include:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Include
          description: Additional response data to include, e.g., ['tool_call.results']
      type: object
      required:
        - model
        - input
      title: OpenAIResponsesRequest
      description: OpenAI-compatible responses request with flow_id as model parameter.
    OrgCreate:
      properties:
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        org_name:
          type: string
          maxLength: 64
          title: Org Name
        org_code:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Org Code
        parent_org_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Parent Org Id
        is_enable:
          type: boolean
          title: Is Enable
          default: true
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
      type: object
      required:
        - tenant_id
        - org_name
      title: OrgCreate
    OrgMemberCreate:
      properties:
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        org_id:
          type: integer
          title: Org Id
        uids:
          items:
            type: integer
          type: array
          title: Uids
        position:
          type: string
          maxLength: 64
          minLength: 1
          title: Position
        job:
          type: string
          maxLength: 64
          minLength: 1
          title: Job
        is_leader:
          type: boolean
          title: Is Leader
          default: false
      type: object
      required:
        - tenant_id
        - org_id
        - position
        - job
      title: OrgMemberCreate
    OrgMemberRead:
      properties:
        id:
          type: integer
          title: Id
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        org_id:
          type: integer
          title: Org Id
        uid:
          type: integer
          title: Uid
        username:
          type: string
          title: Username
        nickname:
          anyOf:
            - type: string
            - type: 'null'
          title: Nickname
        position:
          type: string
          title: Position
        job:
          type: string
          title: Job
        is_leader:
          type: boolean
          title: Is Leader
        c_uid:
          type: integer
          title: C Uid
        m_uid:
          type: integer
          title: M Uid
        ctime:
          type: string
          format: date-time
          title: Ctime
        utime:
          type: string
          format: date-time
          title: Utime
      type: object
      required:
        - id
        - tenant_id
        - org_id
        - uid
        - username
        - position
        - job
        - is_leader
        - c_uid
        - m_uid
        - ctime
        - utime
      title: OrgMemberRead
    OrgMemberUpdate:
      properties:
        position:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Position
        job:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Job
        is_leader:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Leader
      type: object
      title: OrgMemberUpdate
    OrgMemberUserCandidateRead:
      properties:
        uid:
          type: integer
          title: Uid
        username:
          type: string
          title: Username
        nickname:
          anyOf:
            - type: string
            - type: 'null'
          title: Nickname
      type: object
      required:
        - uid
        - username
      title: OrgMemberUserCandidateRead
    OrgMemberUserCandidatesResponse:
      properties:
        total_count:
          type: integer
          title: Total Count
        users:
          items:
            $ref: '#/components/schemas/OrgMemberUserCandidateRead'
          type: array
          title: Users
      type: object
      required:
        - total_count
        - users
      title: OrgMemberUserCandidatesResponse
    OrgRead:
      properties:
        org_id:
          type: integer
          title: Org Id
        org_name:
          type: string
          title: Org Name
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        org_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Code
        org_level:
          type: integer
          title: Org Level
        one_org_id:
          type: integer
          title: One Org Id
        two_org_id:
          type: integer
          title: Two Org Id
        three_org_id:
          type: integer
          title: Three Org Id
        four_org_id:
          type: integer
          title: Four Org Id
        five_org_id:
          type: integer
          title: Five Org Id
        six_org_id:
          type: integer
          title: Six Org Id
        parent_org_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Parent Org Id
        is_enable:
          type: boolean
          title: Is Enable
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        c_uid:
          type: integer
          title: C Uid
        m_uid:
          type: integer
          title: M Uid
        ctime:
          type: string
          format: date-time
          title: Ctime
        utime:
          type: string
          format: date-time
          title: Utime
      type: object
      required:
        - org_id
        - org_name
        - tenant_id
        - org_level
        - one_org_id
        - two_org_id
        - three_org_id
        - four_org_id
        - five_org_id
        - six_org_id
        - is_enable
        - c_uid
        - m_uid
        - ctime
        - utime
      title: OrgRead
    OrgUpdate:
      properties:
        org_name:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Org Name
        org_code:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Org Code
        is_enable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Enable
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
      type: object
      title: OrgUpdate
    Page_FlowRead_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/FlowRead'
          type: array
          title: Items
        total:
          type: integer
          minimum: 0
          title: Total
        page:
          type: integer
          minimum: 1
          title: Page
        size:
          type: integer
          minimum: 1
          title: Size
        pages:
          type: integer
          minimum: 0
          title: Pages
      type: object
      required:
        - items
        - total
        - page
        - size
        - pages
      title: Page[FlowRead]
    Page_Flow_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Flow'
          type: array
          title: Items
        total:
          type: integer
          minimum: 0
          title: Total
        page:
          type: integer
          minimum: 1
          title: Page
        size:
          type: integer
          minimum: 1
          title: Size
        pages:
          type: integer
          minimum: 0
          title: Pages
      type: object
      required:
        - items
        - total
        - page
        - size
        - pages
      title: Page[Flow]
    Page_TransactionLogsResponse_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/TransactionLogsResponse'
          type: array
          title: Items
        total:
          type: integer
          minimum: 0
          title: Total
        page:
          type: integer
          minimum: 1
          title: Page
        size:
          type: integer
          minimum: 1
          title: Size
        pages:
          type: integer
          minimum: 0
          title: Pages
      type: object
      required:
        - items
        - total
        - page
        - size
        - pages
      title: Page[TransactionLogsResponse]
    PermissionModuleRead:
      properties:
        module_id:
          type: string
          title: Module Id
        module_name:
          type: string
          title: Module Name
      type: object
      required:
        - module_id
        - module_name
      title: PermissionModuleRead
    PermissionTreeRead:
      properties:
        node_id:
          type: string
          title: Node Id
        parent_node_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Node Id
        node_type:
          type: string
          enum:
            - module
            - module_priv
            - role
            - role_priv
          title: Node Type
        module_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Module Id
        module_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Module Name
        priv_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Priv Id
        priv_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Priv Name
        priv_opr_type:
          anyOf:
            - $ref: '#/components/schemas/PrivOperationTypeEnum'
            - type: 'null'
        role_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Role Id
        role_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Role Name
        is_sys_priv:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Sys Priv
        is_sys_role:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Sys Role
      type: object
      required:
        - node_id
        - node_type
      title: PermissionTreeRead
    PrivCreate:
      properties:
        priv_id:
          type: string
          maxLength: 128
          minLength: 1
          title: Priv Id
        priv_name:
          type: string
          maxLength: 128
          minLength: 1
          title: Priv Name
        is_sys_priv:
          type: boolean
          title: Is Sys Priv
        priv_opr_type:
          $ref: '#/components/schemas/PrivOperationTypeEnum'
          default: READ
      type: object
      required:
        - priv_id
        - priv_name
        - is_sys_priv
      title: PrivCreate
    PrivOperationTypeEnum:
      type: string
      enum:
        - READ
        - WRITE
        - MODIFY
        - DELETE
      title: PrivOperationTypeEnum
    PrivRead:
      properties:
        module_id:
          type: string
          title: Module Id
        priv_id:
          type: string
          title: Priv Id
        priv_name:
          type: string
          title: Priv Name
        is_sys_priv:
          type: boolean
          title: Is Sys Priv
        priv_opr_type:
          $ref: '#/components/schemas/PrivOperationTypeEnum'
        c_uid:
          type: integer
          title: C Uid
        m_uid:
          type: integer
          title: M Uid
        ctime:
          type: string
          format: date-time
          title: Ctime
        utime:
          type: string
          format: date-time
          title: Utime
      type: object
      required:
        - module_id
        - priv_id
        - priv_name
        - is_sys_priv
        - priv_opr_type
        - c_uid
        - m_uid
        - ctime
        - utime
      title: PrivRead
    PrivUpdate:
      properties:
        priv_name:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Priv Name
        is_sys_priv:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Sys Priv
        priv_opr_type:
          anyOf:
            - $ref: '#/components/schemas/PrivOperationTypeEnum'
            - type: 'null'
      type: object
      title: PrivUpdate
    ProjectCreate:
      properties:
        name:
          type: string
          title: Name
          default: ''
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        org_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Org Id
        is_enable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Enable
        is_hold:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Hold
        release_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Release Version
        priv_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Priv Type
        project_skill:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Skill
        auth_settings:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Auth Settings
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        components_list:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Components List
        flows_list:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Flows List
      type: object
      title: ProjectCreate
    ProjectRead:
      properties:
        name:
          type: string
          title: Name
          default: ''
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        id:
          type: string
          format: uuid
          title: Id
        parent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Id
        tenant_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Tenant Id
        business_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Business Id
        org_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Org Id
        is_self:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Self
        is_enable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Enable
        is_release:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Release
        is_version:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Version
        is_hold:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Hold
        is_deleted:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Deleted
        release_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Release Version
        priv_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Priv Type
        project_skill:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Skill
        auth_settings:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Auth Settings
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        user_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: User Id
        m_uid:
          anyOf:
            - type: integer
            - type: 'null'
          title: M Uid
        ctime:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ctime
        utime:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Utime
        creator_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Creator Name
      type: object
      required:
        - id
      title: ProjectRead
    ProjectReadWithFlows:
      properties:
        name:
          type: string
          title: Name
          default: ''
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        id:
          type: string
          format: uuid
          title: Id
        parent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Id
        flows:
          items:
            $ref: '#/components/schemas/FlowRead'
          type: array
          title: Flows
          default: []
      type: object
      required:
        - id
      title: ProjectReadWithFlows
    ProjectUpdate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        org_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Org Id
        is_enable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Enable
        is_hold:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Hold
        release_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Release Version
        priv_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Priv Type
        project_skill:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Skill
        auth_settings:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Auth Settings
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        components:
          items:
            type: string
            format: uuid
          type: array
          title: Components
        flows:
          items:
            type: string
            format: uuid
          type: array
          title: Flows
      type: object
      title: ProjectUpdate
    ProjectWithPaginatedFlows:
      properties:
        project:
          $ref: '#/components/schemas/ProjectRead'
        flows:
          $ref: '#/components/schemas/Page_Flow_'
      type: object
      required:
        - project
        - flows
      title: ProjectWithPaginatedFlows
    Properties:
      properties:
        text_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Text Color
        background_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Background Color
        edited:
          type: boolean
          title: Edited
          default: false
        source:
          $ref: '#/components/schemas/Source'
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        allow_markdown:
          type: boolean
          title: Allow Markdown
          default: false
        positive_feedback:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Positive Feedback
        state:
          type: string
          enum:
            - partial
            - complete
          title: State
          default: complete
        targets:
          items: {}
          type: array
          title: Targets
          default: []
        build_duration:
          anyOf:
            - type: number
            - type: 'null'
          title: Build Duration
      type: object
      title: Properties
    ResultData:
      properties:
        results:
          anyOf:
            - {}
            - type: 'null'
          title: Results
        artifacts:
          anyOf:
            - {}
            - type: 'null'
          title: Artifacts
        outputs:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Outputs
        logs:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Logs
        messages:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChatOutputResponse'
              type: array
            - type: 'null'
          title: Messages
        timedelta:
          anyOf:
            - type: number
            - type: 'null'
          title: Timedelta
        duration:
          anyOf:
            - type: string
            - type: 'null'
          title: Duration
        component_display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Component Display Name
        component_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Component Id
        used_frozen_result:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Used Frozen Result
          default: false
      type: object
      title: ResultData
    RolePrivCreate:
      properties:
        module_id:
          type: string
          maxLength: 64
          minLength: 1
          title: Module Id
        priv_id:
          type: string
          maxLength: 64
          minLength: 1
          title: Priv Id
      type: object
      required:
        - module_id
        - priv_id
      title: RolePrivCreate
    RolePrivRead:
      properties:
        role_id:
          type: string
          title: Role Id
        module_id:
          type: string
          title: Module Id
        module_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Module Name
        priv_id:
          type: string
          title: Priv Id
        priv_name:
          type: string
          title: Priv Name
        is_sys_priv:
          type: boolean
          title: Is Sys Priv
        priv_opr_type:
          anyOf:
            - $ref: '#/components/schemas/PrivOperationTypeEnum'
            - type: 'null'
        c_uid:
          type: integer
          title: C Uid
        ctime:
          type: string
          format: date-time
          title: Ctime
      type: object
      required:
        - role_id
        - module_id
        - priv_id
        - priv_name
        - is_sys_priv
        - c_uid
        - ctime
      title: RolePrivRead
    RoleRead:
      properties:
        role_id:
          type: string
          title: Role Id
        role_name:
          type: string
          title: Role Name
        is_sys_role:
          type: boolean
          title: Is Sys Role
      type: object
      required:
        - role_id
        - role_name
        - is_sys_role
      title: RoleRead
    RunOutputs:
      properties:
        inputs:
          additionalProperties: true
          type: object
          title: Inputs
        outputs:
          items:
            anyOf:
              - $ref: '#/components/schemas/ResultData'
              - type: 'null'
          type: array
          title: Outputs
      type: object
      title: RunOutputs
    RunResponse:
      properties:
        outputs:
          anyOf:
            - items:
                $ref: '#/components/schemas/RunOutputs'
              type: array
            - type: 'null'
          title: Outputs
          default: []
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
      type: object
      title: RunResponse
      description: Run response schema.
    ServerConnectionTestResponse:
      additionalProperties:
        anyOf:
          - type: boolean
          - type: string
          - type: integer
          - type: 'null'
      type: object
    SimplifiedAPIRequest:
      properties:
        input_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Value
          description: The input value
        input_type:
          anyOf:
            - type: string
              enum:
                - chat
                - text
                - any
            - type: 'null'
          title: Input Type
          description: The input type
          default: chat
        output_type:
          anyOf:
            - type: string
              enum:
                - chat
                - text
                - any
                - debug
            - type: 'null'
          title: Output Type
          description: The output type
          default: chat
        output_component:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Component
          description: >-
            If there are multiple output components, you can specify the
            component to get the output from.
          default: ''
        tweaks:
          anyOf:
            - $ref: '#/components/schemas/Tweaks'
            - type: 'null'
          description: The tweaks
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
          description: The session id
      type: object
      title: SimplifiedAPIRequest
    Source:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: The id of the source component.
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
          description: The display name of the source component.
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
          description: >-
            The source of the message. Normally used to display the model name
            (e.g. 'gpt-4o')
      type: object
      title: Source
    TenantCreate:
      properties:
        tenant_name:
          type: string
          maxLength: 64
          title: Tenant Name
        is_sys:
          type: boolean
          title: Is Sys
          default: false
        is_active:
          type: boolean
          title: Is Active
          default: true
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
        tenant_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Tenant Id
      type: object
      required:
        - tenant_name
      title: TenantCreate
    TenantGroupCandidate:
      properties:
        uid:
          type: integer
          title: Uid
        username:
          type: string
          title: Username
        nickname:
          anyOf:
            - type: string
            - type: 'null'
          title: Nickname
      type: object
      required:
        - uid
        - username
      title: TenantGroupCandidate
    TenantGroupCandidatesResponse:
      properties:
        total_count:
          type: integer
          title: Total Count
        users:
          items:
            $ref: '#/components/schemas/TenantGroupCandidate'
          type: array
          title: Users
      type: object
      required:
        - total_count
        - users
      title: TenantGroupCandidatesResponse
    TenantGroupRoleCreate:
      properties:
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        role_id:
          type: string
          maxLength: 32
          minLength: 1
          title: Role Id
        group_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Group Id
        group_name:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Group Name
      type: object
      required:
        - tenant_id
        - role_id
      title: TenantGroupRoleCreate
    TenantGroupRoleRead:
      properties:
        id:
          type: integer
          title: Id
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        tenant_name:
          type: string
          title: Tenant Name
        group_id:
          type: integer
          title: Group Id
        group_name:
          type: string
          title: Group Name
        role_id:
          type: string
          title: Role Id
        role_name:
          type: string
          title: Role Name
      type: object
      required:
        - id
        - tenant_id
        - tenant_name
        - group_id
        - group_name
        - role_id
        - role_name
      title: TenantGroupRoleRead
    TenantOrgCandidate:
      properties:
        uid:
          type: integer
          title: Uid
        username:
          type: string
          title: Username
        nickname:
          anyOf:
            - type: string
            - type: 'null'
          title: Nickname
      type: object
      required:
        - uid
        - username
      title: TenantOrgCandidate
    TenantOrgCandidatesResponse:
      properties:
        total_count:
          type: integer
          title: Total Count
        users:
          items:
            $ref: '#/components/schemas/TenantOrgCandidate'
          type: array
          title: Users
      type: object
      required:
        - total_count
        - users
      title: TenantOrgCandidatesResponse
    TenantOrgRoleCreate:
      properties:
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        role_id:
          type: string
          maxLength: 32
          minLength: 1
          title: Role Id
        org_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Org Id
        org_name:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Org Name
      type: object
      required:
        - tenant_id
        - role_id
      title: TenantOrgRoleCreate
    TenantOrgRoleRead:
      properties:
        id:
          type: integer
          title: Id
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        tenant_name:
          type: string
          title: Tenant Name
        org_id:
          type: integer
          title: Org Id
        org_name:
          type: string
          title: Org Name
        role_id:
          type: string
          title: Role Id
        role_name:
          type: string
          title: Role Name
      type: object
      required:
        - id
        - tenant_id
        - tenant_name
        - org_id
        - org_name
        - role_id
        - role_name
      title: TenantOrgRoleRead
    TenantRead:
      properties:
        tenant_name:
          type: string
          maxLength: 64
          title: Tenant Name
        is_sys:
          type: boolean
          title: Is Sys
          default: false
        is_active:
          type: boolean
          title: Is Active
          default: true
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        c_uid:
          type: integer
          title: C Uid
        m_uid:
          type: integer
          title: M Uid
        ctime:
          type: string
          format: date-time
          title: Ctime
        utime:
          type: string
          format: date-time
          title: Utime
      type: object
      required:
        - tenant_name
        - tenant_id
        - c_uid
        - m_uid
        - ctime
        - utime
      title: TenantRead
    TenantUpdate:
      properties:
        tenant_name:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Tenant Name
        is_sys:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Sys
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
      type: object
      title: TenantUpdate
    TenantUserCandidate:
      properties:
        uid:
          type: integer
          title: Uid
        username:
          type: string
          title: Username
        nickname:
          anyOf:
            - type: string
            - type: 'null'
          title: Nickname
      type: object
      required:
        - uid
        - username
      title: TenantUserCandidate
    TenantUserCandidatesResponse:
      properties:
        total_count:
          type: integer
          title: Total Count
        users:
          items:
            $ref: '#/components/schemas/TenantUserCandidate'
          type: array
          title: Users
      type: object
      required:
        - total_count
        - users
      title: TenantUserCandidatesResponse
    TenantUserRoleBatchDelete:
      properties:
        ids:
          items:
            type: integer
          type: array
          title: Ids
      type: object
      required:
        - ids
      title: TenantUserRoleBatchDelete
    TenantUserRoleBatchDeleteResult:
      properties:
        deleted_count:
          type: integer
          title: Deleted Count
      type: object
      required:
        - deleted_count
      title: TenantUserRoleBatchDeleteResult
    TenantUserRoleCreate:
      properties:
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        role_id:
          type: string
          maxLength: 32
          minLength: 1
          title: Role Id
        uid:
          anyOf:
            - type: integer
            - type: 'null'
          title: Uid
        username:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
          title: Username
      type: object
      required:
        - tenant_id
        - role_id
      title: TenantUserRoleCreate
    TenantUserRoleRead:
      properties:
        id:
          type: integer
          title: Id
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        tenant_name:
          type: string
          title: Tenant Name
        uid:
          type: integer
          title: Uid
        username:
          type: string
          title: Username
        nickname:
          anyOf:
            - type: string
            - type: 'null'
          title: Nickname
        role_id:
          type: string
          title: Role Id
        role_name:
          type: string
          title: Role Name
      type: object
      required:
        - id
        - tenant_id
        - tenant_name
        - uid
        - username
        - role_id
        - role_name
      title: TenantUserRoleRead
    TextContent:
      additionalProperties: true
      type: object
    ToolContent:
      additionalProperties: true
      type: object
    TransactionLogsResponse:
      properties:
        id:
          type: integer
          title: Id
        timestamp:
          type: string
          format: date-time
          title: Timestamp
        end_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Time
        message_id:
          type: integer
          title: Message Id
          default: 0
        vertex_id:
          type: string
          title: Vertex Id
        target_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Id
        flow_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow Version
        component_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Component Id
        component_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Component Version
        llm_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Llm Provider
        llm_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Llm Model
        token_input:
          anyOf:
            - type: integer
            - type: 'null'
          title: Token Input
        token_output:
          anyOf:
            - type: integer
            - type: 'null'
          title: Token Output
        inputs:
          additionalProperties: true
          type: object
          title: Inputs
        outputs:
          additionalProperties: true
          type: object
          title: Outputs
        status:
          type: string
          title: Status
      type: object
      required:
        - id
        - vertex_id
        - status
      title: TransactionLogsResponse
      description: >-
        Transaction response model for logs view - excludes error and flow_id
        fields.
    Tweaks:
      additionalProperties:
        anyOf:
          - type: string
          - additionalProperties: true
            type: object
      type: object
      title: Tweaks
      description: >-
        A dictionary of tweaks to adjust the flow's execution. Allows
        customizing flow behavior dynamically. All tweaks are overridden by the
        input values.
      examples:
        - Component Name:
            parameter_name: value
          component_id:
            parameter_name: value
          parameter_name: value
    UploadFileResponse:
      properties:
        flowId:
          type: string
          title: Flowid
        file_path:
          type: string
          format: path
          title: File Path
      type: object
      required:
        - flowId
        - file_path
      title: UploadFileResponse
      description: Upload file response schema.
    UserChatSessionCreate:
      properties:
        flow_id:
          type: string
          format: uuid
          title: Flow Id
        session_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Session Id
        session_name:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Session Name
      type: object
      required:
        - flow_id
      title: UserChatSessionCreate
    UserChatSessionRead:
      properties:
        id:
          type: integer
          title: Id
        flow_id:
          type: string
          format: uuid
          title: Flow Id
        user_id:
          type: string
          title: User Id
        user_name:
          type: string
          title: User Name
        session_id:
          type: string
          format: uuid
          title: Session Id
        session_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Name
        is_active:
          type: boolean
          title: Is Active
          default: true
        create_at:
          type: string
          format: date-time
          title: Create At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - flow_id
        - user_id
        - user_name
        - session_id
        - create_at
        - updated_at
      title: UserChatSessionRead
    UserCreate:
      properties:
        username:
          type: string
          title: Username
        nickname:
          anyOf:
            - type: string
            - type: 'null'
          title: Nickname
        password:
          type: string
          title: Password
        optins:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Optins
          default:
            github_starred: false
            dialog_dismissed: false
            discord_clicked: false
      type: object
      required:
        - username
        - password
      title: UserCreate
    UserGroupCreate:
      properties:
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        group_name:
          type: string
          maxLength: 64
          minLength: 1
          title: Group Name
        is_enable:
          type: boolean
          title: Is Enable
          default: true
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
      type: object
      required:
        - tenant_id
        - group_name
      title: UserGroupCreate
    UserGroupMemberCreate:
      properties:
        group_id:
          type: integer
          title: Group Id
        uid:
          type: integer
          title: Uid
        is_leader:
          type: boolean
          title: Is Leader
          default: false
      type: object
      required:
        - group_id
        - uid
      title: UserGroupMemberCreate
    UserGroupMemberRead:
      properties:
        id:
          type: integer
          title: Id
        group_id:
          type: integer
          title: Group Id
        uid:
          type: integer
          title: Uid
        username:
          type: string
          title: Username
        nickname:
          anyOf:
            - type: string
            - type: 'null'
          title: Nickname
        is_leader:
          type: boolean
          title: Is Leader
        c_uid:
          type: integer
          title: C Uid
        ctime:
          type: string
          format: date-time
          title: Ctime
      type: object
      required:
        - id
        - group_id
        - uid
        - username
        - is_leader
        - c_uid
        - ctime
      title: UserGroupMemberRead
    UserGroupMemberUpdate:
      properties:
        is_leader:
          type: boolean
          title: Is Leader
      type: object
      required:
        - is_leader
      title: UserGroupMemberUpdate
    UserGroupRead:
      properties:
        group_id:
          type: integer
          title: Group Id
        group_name:
          type: string
          title: Group Name
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        is_enable:
          type: boolean
          title: Is Enable
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        c_uid:
          type: integer
          title: C Uid
        m_uid:
          type: integer
          title: M Uid
        ctime:
          type: string
          format: date-time
          title: Ctime
        utime:
          type: string
          format: date-time
          title: Utime
      type: object
      required:
        - group_id
        - group_name
        - tenant_id
        - is_enable
        - c_uid
        - m_uid
        - ctime
        - utime
      title: UserGroupRead
    UserGroupUpdate:
      properties:
        group_name:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Group Name
        is_enable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Enable
        note:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Note
      type: object
      title: UserGroupUpdate
    UserRead:
      properties:
        id:
          type: integer
          title: Id
        username:
          type: string
          title: Username
        nickname:
          anyOf:
            - type: string
            - type: 'null'
          title: Nickname
        mobile:
          type: string
          title: Mobile
          default: ''
        email:
          type: string
          title: Email
          default: ''
        profile_image:
          anyOf:
            - type: string
            - type: 'null'
          title: Profile Image
        store_api_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Store Api Key
        reset_passwd:
          type: boolean
          title: Reset Passwd
          default: false
        is_active:
          type: boolean
          title: Is Active
        is_superuser:
          type: boolean
          title: Is Superuser
        is_locked:
          type: boolean
          title: Is Locked
          default: false
        is_sso:
          type: boolean
          title: Is Sso
          default: false
        create_at:
          type: string
          format: date-time
          title: Create At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        last_login_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Login At
        optins:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Optins
      type: object
      required:
        - id
        - username
        - profile_image
        - store_api_key
        - is_active
        - is_superuser
        - create_at
        - updated_at
        - last_login_at
      title: UserRead
    UserUpdate:
      properties:
        username:
          anyOf:
            - type: string
            - type: 'null'
          title: Username
        nickname:
          anyOf:
            - type: string
            - type: 'null'
          title: Nickname
        mobile:
          anyOf:
            - type: string
            - type: 'null'
          title: Mobile
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        profile_image:
          anyOf:
            - type: string
            - type: 'null'
          title: Profile Image
        password:
          anyOf:
            - type: string
            - type: 'null'
          title: Password
        reset_passwd:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Reset Passwd
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
        is_superuser:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Superuser
        is_locked:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Locked
        is_sso:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Sso
        store_api_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Store Api Key
        last_login_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Login At
        optins:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Optins
      type: object
      title: UserUpdate
    UsersResponse:
      properties:
        total_count:
          type: integer
          title: Total Count
        users:
          items:
            $ref: '#/components/schemas/UserRead'
          type: array
          title: Users
      type: object
      required:
        - total_count
        - users
      title: UsersResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    VertexBuildMapModel:
      properties:
        vertex_builds:
          additionalProperties:
            items:
              $ref: '#/components/schemas/VertexBuildRead'
            type: array
          type: object
          title: Vertex Builds
      type: object
      required:
        - vertex_builds
      title: VertexBuildMapModel
    VertexBuildRead:
      properties:
        build_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Build Id
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        id:
          type: string
          title: Id
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data
        artifacts:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Artifacts
        params:
          anyOf:
            - type: string
            - type: 'null'
          title: Params
        valid:
          type: boolean
          title: Valid
        flow_id:
          type: string
          format: uuid
          title: Flow Id
        flow_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Flow Version
        component_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Component Id
        component_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Component Version
        job_id:
          type: integer
          title: Job Id
        ctime:
          type: string
          title: Ctime
      type: object
      required:
        - tenant_id
        - id
        - valid
        - flow_id
        - job_id
        - ctime
      title: VertexBuildRead
    ViewPort:
      properties:
        x:
          type: number
          title: X
        'y':
          type: number
          title: 'Y'
        zoom:
          type: number
          title: Zoom
      type: object
      required:
        - x
        - 'y'
        - zoom
      title: ViewPort
    WorkflowExecutionRequest:
      properties:
        background:
          type: boolean
          title: Background
          default: false
        stream:
          type: boolean
          title: Stream
          default: false
        flow_id:
          type: string
          title: Flow Id
        inputs:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Inputs
          description: >-
            Component-specific inputs in flat format: 'component_id.param_name':
            value
      additionalProperties: false
      type: object
      required:
        - flow_id
      title: WorkflowExecutionRequest
      description: Request schema for workflow execution.
      examples:
        - background: false
          flow_id: flow_67ccd2be17f0819081ff3bb2cf6508e60bb6a6b452d3795b
          inputs:
            ChatInput-abc.input_value: Hello, how can you help me today?
            ChatInput-abc.session_id: session-123
            LLM-xyz.max_tokens: 100
            LLM-xyz.temperature: 0.7
            OpenSearch-def.opensearch_url: https://opensearch:9200
          stream: false
        - background: true
          flow_id: flow_67ccd2be17f0819081ff3bb2cf6508e60bb6a6b452d3795b
          inputs:
            ChatInput-abc.input_value: Process this in the background
          stream: false
        - background: false
          flow_id: flow_67ccd2be17f0819081ff3bb2cf6508e60bb6a6b452d3795b
          inputs:
            ChatInput-abc.input_value: Stream this conversation
          stream: true
    WorkflowStopRequest:
      properties:
        job_id:
          anyOf:
            - type: string
            - type: integer
          title: Job Id
      type: object
      required:
        - job_id
      title: WorkflowStopRequest
      description: Request schema for stopping workflow.
    WorkflowStopResponse:
      properties:
        job_id:
          anyOf:
            - type: string
            - type: integer
          title: Job Id
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
      type: object
      required:
        - job_id
      title: WorkflowStopResponse
      description: Response schema for stopping workflow.
  securitySchemes:
    OAuth2PasswordBearerCookie:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: api/v1/login
    API key query:
      type: apiKey
      in: query
      name: x-api-key
    API key header:
      type: apiKey
      in: header
      name: x-api-key
