openapi: 3.1.0
info:
  title: Third Loop API
  description: The API definition for the entire Third Loop platform.
  termsOfService: https://docs.3rd-loop.com/public-policy/terms-of-use
  contact:
    name: ThirdLoop LLC
    email: support@3rd-loop.com
tags:
  - name: user-auth
    x-displayName: Auth
  - name: user-api-keys
    x-displayName: Api Keys
  - name: user-sso
    x-displayName: Sso
  - name: user-notifications
    x-displayName: Notifications
  - name: user-resource-approvals
    x-displayName: Resource Approvals
  - name: user-organizations
    x-displayName: Organizations
  - name: user-policies
    x-displayName: Policies
  - name: user-roles
    x-displayName: Roles
  - name: user-service-accounts
    x-displayName: Service Accounts
  - name: user-users
    x-displayName: Users
  - name: embedding-resource-approvals
    x-displayName: Resource Approvals
  - name: embedding-document
    x-displayName: Document
  - name: embedding-collections
    x-displayName: Collections
  - name: embedding-retrieval
    x-displayName: Retrieval
  - name: embedding-service-actions
    x-displayName: Service Actions
  - name: core-chat
    x-displayName: Chat
  - name: core-metrics
    x-displayName: Metrics
  - name: core-file
    x-displayName: File
  - name: core-inference
    x-displayName: Inference
  - name: core-workflows
    x-displayName: Workflows
  - name: core-project
    x-displayName: Project
  - name: core-template
    x-displayName: Template
  - name: core-agents
    x-displayName: Agents
  - name: core-resource-approvals
    x-displayName: Resource Approvals
  - name: core-service-actions
    x-displayName: Service Actions
x-tagGroups:
  - name: Core Service
    tags:
      - core-agents
      - core-chat
      - core-file
      - core-inference
      - core-metrics
      - core-project
      - core-resource-approvals
      - core-service-actions
      - core-template
      - core-workflows
  - name: Embedding Service
    tags:
      - embedding-collections
      - embedding-document
      - embedding-resource-approvals
      - embedding-retrieval
      - embedding-service-actions
  - name: User Service
    tags:
      - user-api-keys
      - user-auth
      - user-notifications
      - user-organizations
      - user-policies
      - user-resource-approvals
      - user-roles
      - user-service-accounts
      - user-sso
      - user-users
paths:
  /auth/callback:
    get:
      tags:
        - user-auth
      summary: Login
      description: Initiate the login flow to the Thirdloop platform.
      operationId: ExecuteLogin
      responses:
        '302':
          description: Redirects to the target URL
          headers:
            Location:
              description: The redirect target URL
              schema:
                type: string
        '307':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /auth/login:
    get:
      tags:
        - user-auth
      summary: Callback
      description: Handles the authorization callback for SSO login.
      operationId: ExecuteCallback
      parameters:
        - name: code
          in: query
          required: false
          schema:
            type: string
            title: Code
        - name: state
          in: query
          required: false
          schema:
            type: string
            title: State
        - name: error
          in: query
          required: false
          schema:
            type: string
            default: ''
            title: Error
        - name: error_description
          in: query
          required: false
          schema:
            type: string
            default: ''
            title: Error Description
      responses:
        '302':
          description: Redirects to the target URL
          headers:
            Location:
              description: The redirect target URL
              schema:
                type: string
        '307':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/auth/refresh-tokens:
    post:
      tags:
        - user-auth
      summary: Refresh Tokens
      description: >-
        Refresh the authentication and id token using an available refresh
        token.
      operationId: GetRefreshTokens
      parameters:
        - name: ThirdLoopSessionCookie
          in: cookie
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Thirdloopsessioncookie
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefreshTokenResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/auth/start-session:
    post:
      tags:
        - user-auth
      summary: Start a Session
      description: |-
        Starts a user session by storing issued tokens to the session cookie.

        Args:
            body (TokenAuthData): The request body including the refresh token.
            response (Response): See FastAPI response.
            session_service (SessionAuthService, optional): An instance of
                the SessionAuthService. Injected via Depends.

        Returns:
            SimpleResponse: A simple success response back to the client.

        Raises:
            NotAuthorizedException: If the user id is null.
      operationId: StartSession
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenAuthData'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /auth/logout:
    post:
      tags:
        - user-auth
      summary: Logout
      description: |-
        Logout from the Thirdloop platform.
        This endpoint only logs you out from a single device.
      operationId: ExecuteLogout
      parameters:
        - name: ThirdLoopSessionCookie
          in: cookie
          required: true
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Thirdloopsessioncookie
      responses:
        '302':
          description: Redirects to the target URL
          headers:
            Location:
              description: The redirect target URL
              schema:
                type: string
        '307':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /auth/logout/all-sessions:
    post:
      tags:
        - user-auth
      summary: Logout of all Devices
      description: Logout of all sessions on all devices.
      operationId: ExecuteLogout
      responses:
        '302':
          description: Redirects to the target URL
          headers:
            Location:
              description: The redirect target URL
              schema:
                type: string
        '307':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/auth/sdk/login:
    get:
      tags:
        - user-auth
      summary: Sdk Login
      description: |-
        Initiates an SDK login flow by redirecting to the Cognito hosted UI.

        Cognito redirects to the SDK's redirect_uri with the authorization
        code and the caller-supplied state. The SDK verifies the state and
        then calls /auth/sdk/token with the code and code_verifier.

        Args:
            redirect_uri (str): The OAuth redirect URI where Cognito sends the
                authorization code, typically the SDK's local callback URL.
            state (str): SDK-generated OAuth state, passed through to the
                identity provider so the SDK can verify the echoed value.
            code_challenge (Optional[str]): PKCE code challenge.
            code_challenge_method (Optional[str]): Must be 'S256' or 'plain'.
            use_external_provider (Optional[bool]): When true, log in via the
                configured external SSO identity provider.
      operationId: ExecuteSdkLogin
      responses:
        '302':
          description: Redirects to the target URL
          headers:
            Location:
              description: The redirect target URL
              schema:
                type: string
        '307':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/auth/sdk/token:
    post:
      tags:
        - user-auth
      summary: Sdk Token Exchange
      description: |-
        Exchanges an IDP authorization code for tokens.

        Used by SDK/PKCE flows where the SDK receives the authorization code
        directly and exchanges it with the code_verifier. The redirect_uri
        must match the one used in the original /auth/sdk/login request.

        Args:
            body (TokenExchangeRequest): Contains code, redirect_uri, and
                optional code_verifier.
      operationId: ExchangeCodeForToken
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenExchangeRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenAuthData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/auth/sdk/refresh-tokens:
    post:
      tags:
        - user-auth
      summary: Sdk Refresh Tokens
      description: |-
        Performs a refresh token operation and sends the token information
        directly down in the response payload.

        Args:
            body (RefreshTokenRequest): The refresh token payload.
            auth_service (SdkAuthService, optional): Dependency injected auth service.

        Returns:
            TokenAuthData: The token authorization payload.
      operationId: RefreshSdkTokens
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshTokenRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenAuthData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/api/user-keys:
    get:
      tags:
        - user-api-keys
      summary: List API Keys
      description: >-
        List your API key identifiers. Note that this will not return the
        private which can only

        be viewed once at creation time.
      operationId: GetAPIKeys
      parameters:
        - name: user_id
          in: query
          required: false
          schema:
            type: string
            title: User Id
        - name: status
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/APIKeyStatus'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_APIKeyData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/api/user-keys/create:
    post:
      tags:
        - user-api-keys
      summary: Create an API Key
      description: >-
        Create a new API key for authentication. Note that you will be shown an
        API Secret Key.

        You must record this value. It is never shown again.
      operationId: CreateAPIKey
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAPIKeyRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/api/user-keys/{api_key_id}/disable:
    put:
      tags:
        - user-api-keys
      summary: Disable an API Key
      description: >-
        Disable an API key to prevent its use for authentication. Administrators
        only.
      operationId: DisableAPIKey
      parameters:
        - name: api_key_id
          in: path
          required: true
          schema:
            type: string
            title: Api Key Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/api/user-keys/{api_key_id}/enable:
    put:
      tags:
        - user-api-keys
      summary: Enable an API Key
      description: Re-enable a previously disabled API key. Administrators only.
      operationId: EnableAPIKey
      parameters:
        - name: api_key_id
          in: path
          required: true
          schema:
            type: string
            title: Api Key Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/api/user-keys/{api_key_id}:
    delete:
      tags:
        - user-api-keys
      summary: Delete an API key
      description: >-
        Permanently delete an API key.


        Removes an API key from the system entirely. This is an irreversible
        operation -

        once deleted, the API key cannot be recovered and a new key must be
        created

        if access is needed again.


        Users can delete their own API keys, and administrators can delete any
        user's

        API keys. Consider using the disable endpoint instead if temporary
        revocation

        is desired.
      operationId: DeleteAPIKey
      parameters:
        - name: api_key_id
          in: path
          required: true
          schema:
            type: string
            title: Api Key Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/sso/sp-configuration:
    get:
      tags:
        - user-sso
      summary: Get Service Provider Configuration
      description: |-
        Get Service Provider configuration for IdP setup.

        Returns the Entity ID and ACS URL needed to configure
        the third-party Identity Provider (Azure AD, Okta, etc).
      operationId: GetSPConfiguration
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SPConfigurationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/sso/signing-certificate:
    get:
      tags:
        - user-sso
      summary: Get Signing Certificate
      description: Get the authentication integration signing certificate.
      operationId: GetIDPSigningCertificate
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CertificateResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/sso/encryption-certificate/{provider_name}:
    get:
      tags:
        - user-sso
      summary: Get Encryption Certificate
      description: Get the encryption certificate for a specific SAML provider.
      operationId: GetIDPEncryptionCertificate
      parameters:
        - name: provider_name
          in: path
          required: true
          schema:
            type: string
            title: Provider Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CertificateResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/sso/attribute-config:
    get:
      tags:
        - user-sso
      summary: Get SAML Attribute Configuration
      description: |-
        Get SAML attribute configuration.

        Returns the list of required and optional attributes along with
        their default claim URLs. This is the single source of truth for
        attribute configuration.
      operationId: GetAttributeConfig
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttributeConfigResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/sso/validate-metadata-url:
    post:
      tags:
        - user-sso
      summary: Validate SAML Metadata Url
      description: Validate SAML metadata from a URL before configuration.
      operationId: ValidateMetadataUrl
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateMetadataRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataValidationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/sso/validate-metadata-file:
    post:
      tags:
        - user-sso
      summary: Validate SAML Metadata File
      description: Validate SAML metadata XML content before configuration.
      operationId: ValidateMetadataFile
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateMetadataFileRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataValidationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/sso/status:
    get:
      tags:
        - user-sso
      summary: Get Identity Provider Status
      description: Get the configuration status for a registered single sign on provider.
      operationId: GetSSOStatus
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SSOStatusResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/sso/configuration:
    put:
      tags:
        - user-sso
      summary: Update SAML Provider Configuration
      description: >-
        Update the configuration for a registered SAML identity provider.


        Provide either metadata_url OR metadata_file to update metadata, not
        both.
      operationId: UpdateSSO
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSSORequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SSOConfiguredResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
    post:
      tags:
        - user-sso
      summary: Configure Sso
      description: Configure a SAML identity provider.
      operationId: ConfigureSSO
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfigureSSORequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SSOConfiguredResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
    delete:
      tags:
        - user-sso
      summary: Disable an Identity Provider
      description: Disable an existing SAML Identity provider.
      operationId: DisableSSO
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SSODisabledResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/notifications/self:
    post:
      tags:
        - user-notifications
      summary: Notify Yourself
      description: Create a notification that is send to yourself.
      operationId: CreateSelfNotification
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SelfNotificationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/notifications/all:
    post:
      tags:
        - user-notifications
      summary: Notify Users in your Organization
      description: |-
        Broadcasts a notification to all users in your organization.
        Administrators only.
      operationId: NotifyAllUsers
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgWideNotificationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/resource-approvals:
    get:
      tags:
        - user-resource-approvals
      summary: List Resource Requests
      description: List all pending resource requests. Administrators only.
      operationId: GetResourceApprovals
      parameters:
        - name: resource_type
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/ApprovalResourceType'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/APIListModel_ResourceApprovalDataEnriched_
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/resource-approvals/{approval_id}/approve:
    post:
      tags:
        - user-resource-approvals
      summary: Approve a Resource Request
      description: Approve a pending resource request.
      operationId: ApproveResourceApproval
      parameters:
        - name: approval_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Approval Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/ResourceApprovalNoteRequest'
                - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateApprovalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/resource-approvals/{approval_id}/reject:
    post:
      tags:
        - user-resource-approvals
      summary: Reject a Resource Request
      description: Reject a pending resource request.
      operationId: RejectResourceApproval
      parameters:
        - name: approval_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Approval Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/ResourceApprovalNoteRequest'
                - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateApprovalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/organizations/members:
    get:
      tags:
        - user-organizations
      summary: List My Organization Members
      description: Retrieves active members of your organization.
      operationId: GetMyOrganizationMembers
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMembersResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/organizations/configuration:
    get:
      tags:
        - user-organizations
      summary: Get My Organization Configuration
      description: Retrieves the configuration for your organization.
      operationId: GetOrganizationConfiguration
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationConfiguration'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - user-organizations
      summary: Update My Organization Configuration
      description: |-
        Updates the organization configuration for your organization.
        Administrator only.
      operationId: UpdateOrganizationConfiguration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationConfiguration'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationConfiguration'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/organizations/me:
    get:
      tags:
        - user-organizations
      summary: Get My Organization
      description: Retrieves your organization data.
      operationId: GetMyOrganization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationSummaryData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/policies/actions:
    get:
      tags:
        - user-policies
      summary: List Policy Actions
      description: Return all available IAM actions grouped by service.
      operationId: ListPolicyStatementActions
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties:
                  items:
                    type: string
                  type: array
                type: object
                title: Response Listpolicystatementactions
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/policies/services:
    get:
      tags:
        - user-policies
      summary: List Policy Services
      description: Return all service names that can be targeted in a policy statement.
      operationId: ListPolicyStatementServices
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_str_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/policies/{id}/statements:
    post:
      tags:
        - user-policies
      summary: Create a Policy Statement
      description: Create and attach a new statement to a policy.
      operationId: CreatePolicyStatement
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePolicyStatementRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyData-Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/policies/{id}/statements/{statement_id}:
    post:
      tags:
        - user-policies
      summary: Attach a Policy Statement
      description: Attach an existing statement to a policy.
      operationId: AttachPolicyStatement
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
        - name: statement_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Statement Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyData-Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - user-policies
      summary: Remove a Policy Statement
      description: Remove an attached statement from a policy.
      operationId: RemovePolicyStatement
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
        - name: statement_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Statement Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyData-Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/policies/simulate:
    post:
      tags:
        - user-policies
      summary: Simulate an Action
      description: >-
        Simulate an action to determine if the principal is authorized to
        perform said action.

        If the action is being simulated on behalf of a different principal, the
        method verifies that the

        caller can access the policies of the specified principal.
      operationId: SimulateAction
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulateActionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulatedActionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/policies:
    get:
      tags:
        - user-policies
      summary: List Policy
      operationId: ListPolicy
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_PolicyData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - user-policies
      summary: Create Policy
      operationId: CreatePolicy
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePolicyRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyData-Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/policies/{id}:
    get:
      tags:
        - user-policies
      summary: Get Policy
      operationId: GetPolicy
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyData-Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - user-policies
      summary: Update Policy
      operationId: UpdatePolicy
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePolicy'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyData-Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - user-policies
      summary: Delete Policy
      operationId: DeletePolicy
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/roles/{id}/policies/inline:
    post:
      tags:
        - user-roles
      summary: Add an Inline Policy
      description: Add an inline policy to a role.
      operationId: AddInlinePolicy
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePolicyRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyData-Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - user-roles
      summary: Remove an Inline Policy
      description: Removes an inline policy from a role.
      operationId: DeleteInlinePolicy
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - user-roles
      summary: Update an Inline Policy
      description: Update an inline role policy.
      operationId: UpdateInlinePolicy
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePolicy'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyData-Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/roles/{id}/policies/{policy_id}:
    post:
      tags:
        - user-roles
      summary: Add a Policy to a Role
      description: Add a Policy to a role. The policy must already exist.
      operationId: AddPolicyToRole
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
        - name: policy_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Policy Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RolePolicyData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - user-roles
      summary: Remove a Policy from a Role
      description: Remove a policy from a role.
      operationId: RemovePolicyFromRole
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
        - name: policy_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Policy Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/roles:
    get:
      tags:
        - user-roles
      summary: List Role
      operationId: ListRole
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_RoleDefinition_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - user-roles
      summary: Create Role
      operationId: CreateRole
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRole'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleDefinition'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/roles/{id}:
    get:
      tags:
        - user-roles
      summary: Get Role
      operationId: GetRole
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleDefinition'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - user-roles
      summary: Update Role
      operationId: UpdateRole
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateRole'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleDefinition'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - user-roles
      summary: Delete Role
      operationId: DeleteRole
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/service-accounts/{id}/roles/{role_id}:
    post:
      tags:
        - user-service-accounts
      summary: Add Role To Service Account
      description: Adds an existing role to a service account.
      operationId: AddRoleToServiceAccount
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
        - name: role_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Role Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceAccountRoleData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - user-service-accounts
      summary: Remove Role From Service Account
      description: Removes a role from a service account.
      operationId: RemoveRoleFromServiceAccount
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
        - name: role_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Role Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/service-accounts/{id}/secret:
    get:
      tags:
        - user-service-accounts
      summary: Get Service Account Secret
      description: Admin-scoped retrieval of a service account client secret by id.
      operationId: GetServiceAccountSecret
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceAccountClientSecret'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/service-accounts/{id}/secret/rotate:
    post:
      tags:
        - user-service-accounts
      summary: Rotate Service Account Secret
      description: Admin-scoped rotation of a service account client secret by id.
      operationId: RotateServiceAccountSecret
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceAccountClientSecret'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/service-accounts:
    get:
      tags:
        - user-service-accounts
      summary: List Serviceaccount
      operationId: ListServiceaccount
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_ServiceAccountData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - user-service-accounts
      summary: Create Serviceaccount
      operationId: CreateServiceaccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateServiceAccount'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceAccountData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/service-accounts/{id}:
    get:
      tags:
        - user-service-accounts
      summary: Get Serviceaccount
      operationId: GetServiceaccount
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceAccountData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - user-service-accounts
      summary: Update Serviceaccount
      operationId: UpdateServiceaccount
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateServiceAccount'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceAccountData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - user-service-accounts
      summary: Delete Serviceaccount
      operationId: DeleteServiceaccount
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/service-accounts/login:
    post:
      tags:
        - user-service-accounts
      summary: Service Account Login
      operationId: ServiceAccountLogin
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceAccountLoginRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MtMTokenData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/service-accounts/secret:
    post:
      tags:
        - user-service-accounts
      summary: Get Rotated Secret
      operationId: GetRotatedSecret
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceAccountLoginRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceAccountClientSecret'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/users/configuration:
    put:
      tags:
        - user-users
      summary: Update User Configuration
      description: Update the configuration for a given user.
      operationId: UpdateUserConfiguration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserConfigurationData'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserConfigurationUpdatedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/users/configuration/bulk:
    put:
      tags:
        - user-users
      summary: Update User Configurations
      description: >-
        Applies configuration options to every active user in the caller's
        organization. 

        Administrators only.
      operationId: BulkUpdateUserConfigurations
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkUpdateUserConfigurationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdateUserConfigurationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/users/configuration/me:
    get:
      tags:
        - user-users
      summary: Get My Configuration
      description: Retrieves your configuration settings.
      operationId: GetMyConfiguration
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserConfigurationData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/users/{id}/roles:
    get:
      tags:
        - user-users
      summary: Get User Roles
      description: Returns your active roles with nested policies and statements.
      operationId: GetUserRoles
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_RoleDefinition_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/users/roles:
    post:
      tags:
        - user-users
      summary: Add Role To User
      description: Add a single role to another user. Administrators only.
      operationId: AddUserRole
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleModificationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserUpdatedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
    delete:
      tags:
        - user-users
      summary: Remove a Role from a User
      description: Remove a single role from another user. Administrators only.
      operationId: RemoveUserRole
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleModificationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserUpdatedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/users/me:
    get:
      tags:
        - user-users
      summary: Get My Profile
      description: Retrieves your user profile information.
      operationId: GetMyIdentity
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserAuthenticationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/users:
    get:
      tags:
        - user-users
      summary: List Users
      description: |-
        List all non-deleted users. Administrators only.

        Returns:
            APIListModel[OrganizationMemberData]: All users and total count.
      operationId: ListUsers
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_OrganizationMemberData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
    post:
      tags:
        - user-users
      summary: Enroll a New User
      description: Triggers signup process for a new user.
      operationId: CreateNewUserSignup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserSignupRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserCreatedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
    delete:
      tags:
        - user-users
      summary: Delete a User
      description: Delete a user account. Administrators only.
      operationId: SoftDeleteUser
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserIdRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserUpdatedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/users/deactivate:
    post:
      tags:
        - user-users
      summary: Deactivate a User
      description: Deactivates a user account. Administrators only.
      operationId: DeactivateUser
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserIdRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserUpdatedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/users/activate:
    post:
      tags:
        - user-users
      summary: Activate a User
      description: Activates a user account. Administrators only.
      operationId: ActivateUser
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserIdRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserUpdatedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/users/reset-password:
    post:
      tags:
        - user-users
      summary: Reset a User Password
      description: |-
        Reset a user's password. Administrators only. Note that
        this method will trigger a global signout.
      operationId: AdminResetPassword
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserIdRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserUpdatedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/user/users/{user_id}:
    put:
      tags:
        - user-users
      summary: Update a User Profile
      description: Updates a user's profile fields. Administrators only.
      operationId: UpdateUser
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            title: User Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserUpdatedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
    get:
      tags:
        - user-users
      summary: Get a User
      description: Get a user by ID.
      operationId: GetUser
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/user/users/name:
    patch:
      tags:
        - user-users
      summary: Update Preferred Name
      description: Updates your preferred name.
      operationId: UpdateUserPreferredName
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserPreferredName'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserUpdatedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/resource-approvals:
    get:
      tags:
        - embedding-resource-approvals
      summary: List Resource Approvals
      description: Retrieve all resource approval records.
      operationId: GetResourceApprovals
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/APIListModel_ResourceApprovalDataEnriched_
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
    post:
      tags:
        - embedding-resource-approvals
      summary: Submit a Resource Request
      description: Submit a resource request for administrator approval.
      operationId: CreateResourceApproval
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateResourceApprovalRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceApprovalData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/resource-approvals/{approval_id}/approve:
    post:
      tags:
        - embedding-resource-approvals
      summary: Approve a Resource Request
      description: Approve a pending resource approval.
      operationId: ApproveResourceApproval
      parameters:
        - name: approval_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Approval Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/ResourceApprovalNoteRequest'
                - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceApprovalData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/embedding/resource-approvals/{approval_id}/reject:
    post:
      tags:
        - embedding-resource-approvals
      summary: Reject a resource request
      description: Reject a pending resource request.
      operationId: RejectResourceApproval
      parameters:
        - name: approval_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Approval Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/ResourceApprovalNoteRequest'
                - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceApprovalData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/embedding/resource-approvals/{approval_id}/revoke:
    post:
      tags:
        - embedding-resource-approvals
      summary: Revoke a resource approval
      description: Revoke a previously approved resource approval.
      operationId: RevokeResourceApproval
      parameters:
        - name: approval_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Approval Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/ResourceApprovalNoteRequest'
                - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceApprovalData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/embedding/resource-approvals/{approval_id}/resubmit:
    post:
      tags:
        - embedding-resource-approvals
      summary: Resubmit a resource request
      description: Resubmit a rejected, revoked, or retracted resource approval.
      operationId: ResubmitResourceApproval
      parameters:
        - name: approval_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Approval Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/ResourceApprovalNoteRequest'
                - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceApprovalData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/document/presigned-url:
    get:
      tags:
        - embedding-document
      summary: Get a Presigned Url
      description: Get presigned URL for upload WITHOUT creating a database record.
      operationId: GetDocumentPresignedUrl
      parameters:
        - name: collectionId
          in: query
          required: true
          schema:
            type: string
            format: uuid
            title: Collectionid
        - name: filename
          in: query
          required: true
          schema:
            type: string
            title: Filename
        - name: contentType
          in: query
          required: true
          schema:
            type: string
            title: Contenttype
        - name: fileSizeBytes
          in: query
          required: true
          schema:
            type: integer
            title: Filesizebytes
        - name: checksumSha256
          in: query
          required: false
          schema:
            type: string
            title: Checksumsha256
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PresignedUploadResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/document/confirm-upload:
    post:
      tags:
        - embedding-document
      summary: Confirm an Upload
      description: >-
        Confirm a presigned upload, create document record, and trigger
        processing.
      operationId: ConfirmDocumentUpload
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfirmUploadRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentCreatedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/document:
    post:
      tags:
        - embedding-document
      summary: Create a Document
      description: Create a document from inline text content and trigger processing.
      operationId: CreateDocument
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDocumentRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentCreatedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    get:
      tags:
        - embedding-document
      summary: List Documents
      description: List the uploaded documents.
      operationId: ListDocuments
      parameters:
        - name: deleted
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              If true, return soft-deleted documents within the 14-day recovery
              window.
            default: false
            title: Deleted
          description: >-
            If true, return soft-deleted documents within the 14-day recovery
            window.
        - name: content_hash
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: 'null'
            description: A hash id to search for
            title: Content Hash
          description: A hash id to search for
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_DocumentData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/document/{document_id}:
    get:
      tags:
        - embedding-document
      summary: Retrieve a Document's content
      description: >-
        Retrieve the raw content of a document via either the text or a
        presigned url to the file.
      operationId: RetrieveDocumentContent
      parameters:
        - name: document_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Document Id
        - name: responseFormat
          in: query
          required: false
          schema:
            enum:
              - url
              - text
            type: string
            default: url
            title: Responseformat
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentContentResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - embedding-document
      summary: Update a Document
      description: Update a document's metadata and/or move it to a different collection.
      operationId: UpdateDocument
      parameters:
        - name: document_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Document Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDocumentRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentBaseData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - embedding-document
      summary: Delete a Document
      description: Delete a document.
      operationId: DeleteDocument
      parameters:
        - name: document_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Document Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/document/{document_id}/recover:
    post:
      tags:
        - embedding-document
      summary: Recover a Deleted Document
      description: >-
        Recover a document that was previously deleted. All documents have a
        14-day

        recovery window. During this window, the document can be restored to
        your collections.
      operationId: RecoverDocument
      parameters:
        - name: document_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Document Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentBaseData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/document/{document_id}/chunks:
    get:
      tags:
        - embedding-document
      summary: Get Document Chunks
      description: >-
        Retrieve the encoded chunks of a document. This operation is only
        available to administrators.
      operationId: AdminGetDocumentChunks
      parameters:
        - name: document_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Document Id
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Number of chunks to skip
            default: 0
            title: Offset
          description: Number of chunks to skip
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Maximum chunks to return. Pass 0 to return all chunks.
            default: 3
            title: Limit
          description: Maximum chunks to return. Pass 0 to return all chunks.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentChunksResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/embedding/collections:
    get:
      tags:
        - embedding-collections
      summary: List Collections
      description: >-
        Return a list of collections, grouped into owned, shared, and
        organization collections.
      operationId: ListCollections
      parameters:
        - name: as_tree
          in: query
          required: false
          schema:
            type: boolean
            description: Whether to structure the returned collections as a tree
            default: true
            title: As Tree
          description: Whether to structure the returned collections as a tree
        - name: root
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              If true, drop child_collections so only top-level nodes are
              returned.
            default: false
            title: Root
          description: >-
            If true, drop child_collections so only top-level nodes are
            returned.
        - name: fields
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  enum:
                    - name
                    - depth
                    - document_count
                    - parent_collection_id
                    - summary
                    - documents
                    - child_collections
                  type: string
              - type: 'null'
            description: >-
              Return only these top-level fields, e.g.
              ?fields=name&fields=summary. Omit for the full entity. See
              CollectionAllowedSearchFields for allowed parameters.
            title: Fields
          description: >-
            Return only these top-level fields, e.g.
            ?fields=name&fields=summary. Omit for the full entity. See
            CollectionAllowedSearchFields for allowed parameters.
        - name: collection_ids
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  format: uuid
              - type: 'null'
            description: >-
              Collection ids to downselect. If this parameter is left blank,
              collection ids are not used as a filter.
            title: Collection Ids
          description: >-
            Collection ids to downselect. If this parameter is left blank,
            collection ids are not used as a filter.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionTreeResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - embedding-collections
      summary: Create a Collection
      description: Create a new collection.
      operationId: CreateCollection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCollectionRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentCollectionData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/collections/search:
    get:
      tags:
        - embedding-collections
      summary: Search all Collections
      description: Search through collections and documents.
      operationId: SearchCollections
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            description: Case-insensitive substring match on collection and document names.
            title: Q
          description: Case-insensitive substring match on collection and document names.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/collections/batch-move:
    post:
      tags:
        - embedding-collections
      summary: Move Collections and Documents
      description: Move multiple collections and/or documents to a target collection.
      operationId: BatchMoveItems
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchMoveRequest'
        required: true
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/collections/{collection_id}/unshare:
    post:
      tags:
        - embedding-collections
      summary: Unshare Collection
      description: >-
        Unshare a collection with a user who has an active share. This will
        notify the user.
      operationId: UnshareCollection
      parameters:
        - name: collection_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Collection Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnshareRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/collections/{collection_id}/unpublish:
    post:
      tags:
        - embedding-collections
      summary: Unpublish Collection
      description: Take a collection back out of organization-wide sharing.
      operationId: UnpublishCollection
      parameters:
        - name: collection_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Collection Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceApprovalData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/collections/{collection_id}:
    get:
      tags:
        - embedding-collections
      summary: Get a Collection
      description: Retrieve a specific collection and all its nested child collections.
      operationId: GetCollection
      parameters:
        - name: collection_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Collection Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentCollectionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - embedding-collections
      summary: Update a Collection
      description: >-
        Update a collection. Fields that are not set are excluded from the
        update.
      operationId: UpdateCollection
      parameters:
        - name: collection_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Collection Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCollectionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentCollectionData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - embedding-collections
      summary: Delete a Collection
      description: Delete an existing collection.
      operationId: DeleteCollection
      parameters:
        - name: collection_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Collection Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/collections/{collection_id}/shares:
    get:
      tags:
        - embedding-collections
      summary: Get Collection Shares
      description: Retrieve all active shares for a collection.
      operationId: GetCollectionShares
      parameters:
        - name: collection_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Collection Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_ShareData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - embedding-collections
      summary: Share a Collection
      description: Share a collection with one or more users.
      operationId: ShareCollection
      parameters:
        - name: collection_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Collection Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ShareRequest'
              title: Body
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_ShareData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/collections/{collection_id}/shares/me:
    delete:
      tags:
        - embedding-collections
      summary: Revoke My Share
      description: >-
        Remove a collection that has been shared with you without affecting the
        original

        collection or other shares.
      operationId: RevokeMyShare
      parameters:
        - name: collection_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Collection Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/collections/{collection_id}/documents:
    get:
      tags:
        - embedding-collections
      summary: Retrieve Documents In Collection
      description: Retrieve all the documents within a collection.
      operationId: RetrieveDocumentsInCollection
      parameters:
        - name: collection_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Collection Id
        - name: tree
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              If true, return the full collection subtree (admin only).
              Otherwise return the flat list of documents directly in the
              collection.
            default: false
            title: Tree
          description: >-
            If true, return the full collection subtree (admin only). Otherwise
            return the flat list of documents directly in the collection.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentCollectionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/retrieval:
    get:
      tags:
        - embedding-retrieval
      summary: Get related chunks
      description: >-
        Retrieve relevant document chunks for RAG (Retrieval Augmented
        Generation).

        Performs semantic search to find document chunks most relevant to the

        query.
      operationId: RetrieveContext
      parameters:
        - name: query
          in: query
          required: true
          schema:
            type: string
            description: Text query to embed and search.
            title: Query
          description: Text query to embed and search.
        - name: top_k
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 10
            title: Top K
        - name: minimum_threshold
          in: query
          required: false
          schema:
            type: number
            maximum: 1
            minimum: 0
            default: 0.15
            title: Minimum Threshold
        - name: similarity_metric
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/SimilarityMetric'
            default: cosine
        - name: collection
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              format: uuid
            title: Collection
        - name: document
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              format: uuid
            title: Document
        - name: expand_context
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Expand Context
        - name: expansion_threshold
          in: query
          required: false
          schema:
            type: number
            maximum: 1
            minimum: 0
            default: 0.4
            title: Expansion Threshold
        - name: expansion_max_depth
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 3
            title: Expansion Max Depth
        - name: expansion_similarity_metric
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/SimilarityMetric'
            default: cosine
        - name: max_total_chunks
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 30
            title: Max Total Chunks
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/DocumentRetrievalResult'
                title: Response Retrievecontext
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/retrieval/chunks:
    get:
      tags:
        - embedding-retrieval
      summary: List Document Chunks
      description: >-
        List document chunks. Note that chunks must be filtered by their unique
        IDs.
      operationId: RetrieveChunksByIds
      parameters:
        - name: chunk
          in: query
          required: true
          schema:
            type: array
            items:
              type: string
              format: uuid
            minItems: 1
            title: Chunk
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/DocumentRetrievalResult'
                title: Response Retrievechunksbyids
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/embedding/service-actions:
    get:
      tags:
        - embedding-service-actions
      summary: Get Service Actions
      description: |-
        Return the IAM action names served by this application.

        Actions are resolved from the application's route table with the
        same resolution used by policy enforcement, so the reported
        vocabulary always matches what the policy checker enforces.

        Returns:
            APIListModel[str]: Sorted action names for this service.
      operationId: GetServiceActions
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_str_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/simplestream:
    post:
      tags:
        - core-chat
      summary: Talk to Clove
      description: Send a one-off message to Clove and get a response streamed back to you.
      operationId: InvokeStreamNoContext
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimpleChatRequest'
        required: true
      responses:
        '200':
          description: SSE stream
          content:
            text/event-stream:
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/stream:
    post:
      tags:
        - core-chat
      summary: Converse with Clove
      description: >-
        Carry on a conversation with Clove with responses streamed back to you.
        The conversation API

        gives Clove access to things like Agents, Collections, long form
        conversation context, and other

        information that will improve reponses.
      operationId: InvokeStreamWithContext
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatRequest'
        required: true
      responses:
        '200':
          description: SSE stream
          content:
            text/event-stream:
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/tool-result:
    post:
      tags:
        - core-chat
      summary: Create a tool result.
      description: >-
        Posts a tool result from the caller. This is useful for when you need to
        close the chain of custom tools

        that have been routed to your software or UI.
      operationId: CreateToolResult
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToolResultCreate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/conversation/shares:
    get:
      tags:
        - core-chat
      summary: Get Conversations Shared with me
      description: |-
        Get all conversations shared with the current user.

        Args:
            request: The FastAPI request.

        Returns:
            SharesResponse: A list of conversations shared with the current user.
      operationId: GetConversationsSharedWithMe
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_ShareData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/conversation/{chat_id}:
    get:
      tags:
        - core-chat
      summary: Get a Conversation
      description: Get a conversation by its unique id.
      operationId: GetConversation
      parameters:
        - name: chat_id
          in: path
          required: true
          schema:
            type: string
            title: Chat Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - core-chat
      summary: Delete a Conversation
      description: Delete a conversation.
      operationId: DeleteConversation
      parameters:
        - name: chat_id
          in: path
          required: true
          schema:
            type: string
            title: Chat Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/conversation/batch-delete:
    post:
      tags:
        - core-chat
      summary: Delete many conversations
      description: Delete a batch of your conversations at the same time.
      operationId: BatchDeleteUserConversations
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchDeleteConversationsRequest'
        required: true
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/all-conversations:
    get:
      tags:
        - core-chat
      summary: List my Conversations
      description: List all of your conversations.
      operationId: GetAllConversations
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_ConversationData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/recent-conversations:
    get:
      tags:
        - core-chat
      summary: Get Recent Conversations
      description: List your twenty most recent conversations.
      operationId: GetRecentConversations
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_ConversationData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/conversation:
    post:
      tags:
        - core-chat
      summary: Create a Conversation
      description: Creates a new conversation with Clove.
      operationId: CreateNewConversation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewConversationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/conversation/update-title:
    post:
      tags:
        - core-chat
      summary: Update the Conversation Title
      description: Updates the title of an existing conversation.
      operationId: UpdateConversationTitle
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeConversationTitle'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/conversation/{chat_id}/pin:
    post:
      tags:
        - core-chat
      summary: Pin a Conversation
      description: >-
        Marks a conversation as pinned so it always appears at the top of your
        conversation list.
      operationId: PinConversation
      parameters:
        - name: chat_id
          in: path
          required: true
          schema:
            type: string
            title: Chat Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/conversation/{chat_id}/unpin:
    post:
      tags:
        - core-chat
      summary: Unpin a Conversation
      description: Unpins your pinned conversation, removing it from the top of the list.
      operationId: UnpinConversation
      parameters:
        - name: chat_id
          in: path
          required: true
          schema:
            type: string
            title: Chat Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/conversation/project:
    patch:
      tags:
        - core-chat
      summary: Update a Conversation's Project
      description: |-
        Assigns a conversation to a project, or clears the assignment when
        the project id is empty.
      operationId: UpdateConversationProject
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeConversationProject'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/conversation/fork:
    post:
      tags:
        - core-chat
      summary: Fork a Conversation
      description: |-
        Forks a conversation into two continuing parts by duplicating the
        underlying conversation. This is useful for when you want to continue a
        conversation down two paths.
      operationId: ForkConversation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Body_ForkConversation'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForkConversationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/conversation/{conversation_id}/shares:
    post:
      tags:
        - core-chat
      summary: Share a Conversation
      description: Share a conversation with another user.
      operationId: ShareConversation
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: string
            title: Conversation Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShareRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/analytics/tokens-consumption:
    get:
      tags:
        - core-chat
      summary: Get User Token Consumption
      description: Returns information about your token consumption.
      operationId: GetUserTokenConsumption
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenConsumptionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/analytics/chatting-status:
    get:
      tags:
        - core-chat
      summary: Get Token Usage
      description: Returns your distance from consuming your current period token limits.
      operationId: GetUserTokenConsumptionStatus
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserTokenConsumptionStatus'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/chat/conversation/{conversation_id}/collections-sources:
    get:
      tags:
        - core-chat
      summary: Get Conversation Collections Sources
      description: Get per-document collection sources for a conversation.
      operationId: GetConversationCollectionsSources
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: string
            title: Conversation Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: >-
                      #/components/schemas/ConversationCollectionsSourcesResponse
                  - type: 'null'
                title: Response Getconversationcollectionssources
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - core-chat
      summary: Update Conversation Collections Sources
      description: Create or update per-document collection sources for a conversation.
      operationId: UpdateConversationCollectionsSources
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: string
            title: Conversation Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateConversationCollectionsSourcesRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationCollectionsSourcesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - core-chat
      summary: Delete Conversation Collections Sources
      description: Delete all collection sources for a conversation.
      operationId: DeleteConversationCollectionsSources
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: string
            title: Conversation Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/metrics/events/surplus/query:
    get:
      tags:
        - core-metrics
      summary: Query Surplus Events
      description: Query surplus collection events for a specified timerange.
      operationId: QuerySurplusEvents
      parameters:
        - name: pagination
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Pagination
        - name: resourceType
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/MetricResourceType'
              - type: 'null'
            title: Resourcetype
        - name: startDate
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Startdate
        - name: endDate
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Enddate
        - name: pageIndex
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            default: 0
            title: Pageindex
        - name: limit
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            default: 25
            title: Limit
        - name: orderBy
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Orderby
        - name: orderDirection
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/SortDirection'
              - type: 'null'
            title: Orderdirection
        - name: organizationIds
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  format: uuid
              - type: 'null'
            title: Organizationids
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_MetricSurplusEventData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/metrics/events/surplus/timeline:
    get:
      tags:
        - core-metrics
      summary: Get Surplus Timeline
      description: Get surplus timeline data for plotting.
      operationId: GetSurplusTimeline
      parameters:
        - name: pagination
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Pagination
        - name: resourceType
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/MetricResourceType'
              - type: 'null'
            title: Resourcetype
        - name: startDate
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Startdate
        - name: endDate
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Enddate
        - name: organizationIds
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  format: uuid
              - type: 'null'
            title: Organizationids
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimelineSeries'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/metrics/events/consumption/query:
    get:
      tags:
        - core-metrics
      summary: List Consumption Events
      description: Query metric consumption events over a given period.
      operationId: QueryConsumptionEvents
      parameters:
        - name: pagination
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Pagination
        - name: resourceType
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/MetricResourceType'
              - type: 'null'
            title: Resourcetype
        - name: startDate
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Startdate
        - name: endDate
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Enddate
        - name: pageIndex
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            default: 0
            title: Pageindex
        - name: limit
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            default: 25
            title: Limit
        - name: orderBy
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Orderby
        - name: orderDirection
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/SortDirection'
              - type: 'null'
            title: Orderdirection
        - name: poolCategory
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/MetricPoolCategory'
              - type: 'null'
            title: Poolcategory
        - name: ioType
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/MetricIOType'
              - type: 'null'
            title: Iotype
        - name: cacheStatus
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/MetricCacheStatus'
              - type: 'null'
            title: Cachestatus
        - name: userIds
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: 'null'
            title: Userids
        - name: modelId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Modelid
        - name: minRawAmount
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Minrawamount
        - name: maxRawAmount
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Maxrawamount
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_ConsumptionEventData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/metrics/events/consumption/timeline:
    get:
      tags:
        - core-metrics
      summary: Get a Consumption Timeline
      description: >-
        Get per-model consumption data in timeline format. This data is useful
        for plotting or

        viewing usage trends.
      operationId: GetConsumptionTimeline
      parameters:
        - name: pagination
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Pagination
        - name: resourceType
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/MetricResourceType'
              - type: 'null'
            title: Resourcetype
        - name: startDate
          in: query
          required: true
          schema:
            type: string
            format: date-time
            title: Startdate
        - name: endDate
          in: query
          required: true
          schema:
            type: string
            format: date-time
            title: Enddate
        - name: userIds
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: 'null'
            title: Userids
        - name: granularity
          in: query
          required: false
          schema:
            enum:
              - hour
              - day
              - week
            type: string
            default: hour
            title: Granularity
        - name: ioType
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/MetricIOType'
              - type: 'null'
            title: Iotype
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_TokenTimelineSeries_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/metrics/events/consumption/tokens/top:
    get:
      tags:
        - core-metrics
      summary: List top users
      description: Rank users by token consumption over a date range.
      operationId: GetTopTokenUsers
      parameters:
        - name: pagination
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Pagination
        - name: resourceType
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/MetricResourceType'
              - type: 'null'
            title: Resourcetype
        - name: startDate
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Startdate
        - name: endDate
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Enddate
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 50
            minimum: 1
            default: 10
            title: Limit
        - name: organizationIds
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  format: uuid
              - type: 'null'
            title: Organizationids
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopTokenUsersResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/metrics/configuration/user/{user_id}:
    get:
      tags:
        - core-metrics
      summary: Get User Metrics Configuration
      description: Get a user's metrics configuration.
      operationId: GetUserMetricsConfiguration
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserMetricsConfigurationData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/metrics/configuration/organization/{organization_id}:
    get:
      tags:
        - core-metrics
      summary: Get Organization Metrics Configuration
      description: Get an organization's metrics configuration.
      operationId: GetOrganizationMetricsConfiguration
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Organization Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMetricsConfigurationData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - core-metrics
      summary: Update Organization Metrics Configuration
      description: >-
        Update an organization's metrics configuration. Only provided fields
        will be updated.
      operationId: UpdateOrganizationMetricsConfiguration
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Organization Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/UpdateOrganizationMetricsConfigurationRequest
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMetricsConfigurationData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/metrics/configuration/users:
    get:
      tags:
        - core-metrics
      summary: List Users Metric's Configurations
      description: Get user metrics configurations for an organization.
      operationId: GetUserMetricsConfigurations
      parameters:
        - name: organizationId
          in: query
          required: true
          schema:
            type: string
            format: uuid
            title: Organizationid
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Number of records to skip
            default: 0
            title: Offset
          description: Number of records to skip
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Maximum number of records to return
            default: 50
            title: Limit
          description: Maximum number of records to return
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkGetUserMetricsConfigurationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - core-metrics
      summary: Bulk Update User Metrics Configurations
      description: |-
        Bulk update user metrics configurations.

        Updates multiple user configurations in a single request.
      operationId: BulkUpdateUserMetricsConfigurations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkUpdateUserMetricsConfigurationRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BulkUpdateUserMetricsConfigurationResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/metrics/storage/usage:
    get:
      tags:
        - core-metrics
      summary: Get Organization Storage Usage
      description: Get current storage usage and limits.
      operationId: GetStorageUsage
      parameters:
        - name: userId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Userid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StorageUsageResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/core/metrics/token-statistics:
    get:
      tags:
        - core-metrics
      summary: Get Token Statistics
      description: Get aggregated token statistics for your organization.
      operationId: GetTokenStatistics
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenStatisticsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/file/attachment-token-count:
    post:
      tags:
        - core-file
      summary: Get Attachment Token Count
      description: Retrieves the token count for an attachment or list of attachments.
      operationId: GetTokenCountForAttachment
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/AttachmentData-Input'
              type: array
              title: Attachments
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenCountResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/file/get-presigned-url:
    get:
      tags:
        - core-file
      summary: Get Presigned Url
      description: Get a presigned url to upload a file via STP.
      operationId: GetPresignedUrl
      parameters:
        - name: uploadType
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/UserFileUploadType'
        - name: filename
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Filename
        - name: uniqueKey
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Uniquekey
        - name: contentType
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Contenttype
        - name: urlMethod
          in: query
          required: false
          schema:
            enum:
              - GET
              - PUT
            type: string
            default: PUT
            title: Urlmethod
        - name: expiration
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Expiration
        - name: checksum
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Checksum
        - name: groupKey
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Groupkey
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PresignedUrlResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/file/notify-chat-file-uploaded:
    post:
      tags:
        - core-file
      summary: Notify Chat File Uploaded
      description: |-
        Notify the server that you have uploaded a chat attachment to kick off
        server-side processing.
      operationId: NotifyChatFileUploaded
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotifyChatFileUploadedRequest'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/inference/response:
    post:
      tags:
        - core-inference
      summary: Invoke Clove
      description: |-
        Sends a standard request to Clove and receives a response. Note
        that unlike talking to Clove, responses are not streamed back to you.
      operationId: InvokeResponse
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InferenceRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferenceResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/inference/summarize:
    post:
      tags:
        - core-inference
      summary: Summarize Content
      description: Use Clove to summarize the provided content.
      operationId: InvokeSummarizeContent
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SummarizationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferenceResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/inference/generate-title:
    post:
      tags:
        - core-inference
      summary: Generate Title
      description: >-
        Generates a title for a conversation based on the user's message
        content.
      operationId: InvokeGenerateTitle
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateTitleRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferenceResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/inference/workflow/title:
    post:
      tags:
        - core-inference
      summary: Generate Workflow Title
      description: Generates a title for a workflow from its content via the LLM.
      operationId: GenerateWorkflowTitle
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateWorkflowTitleRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferenceResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/inference/workflow/body:
    post:
      tags:
        - core-inference
      summary: Generate Workflow
      description: Use Clove to help generate a Workflow.
      operationId: GenerateWorkflowGraph
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateWorkflowGraphRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowGraphData-Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/inference/workflow/refine:
    put:
      tags:
        - core-inference
      summary: Refine Workflow
      description: >-
        Use Clove to refine an existing workflow graph based on feedback you
        provide.
      operationId: RefineWorkflowGraph
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefineWorkflowGraphRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowGraphData-Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/inference/tool/reference:
    post:
      tags:
        - core-inference
      summary: Generate Tool Reference
      description: >-
        Use Clove to generate an OpenAI-style JSON tool reference from your
        custom uploaded tool.
      operationId: GenerateToolReference
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateToolReferenceRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateToolReferenceResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/workflows:
    get:
      tags:
        - core-workflows
      summary: List Workflows
      description: >-
        List workflows grouped by whether they are owned, shared, public to the
        organization, or included as

        part of the system.
      operationId: GetWorkflows
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupedWorkflowsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/workflows/{workflow_id}:
    get:
      tags:
        - core-workflows
      summary: Get a Workflow
      description: Retrieve a single workflow with its node/edge graph.
      operationId: GetWorkflow
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowData-Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - core-workflows
      summary: Create or Replace a Workflow
      description: >-
        Create or fully replace a workflow (metadata plus graph) in one
        transaction.
      operationId: CreateOrReplaceWorkflow
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowData-Input'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowData-Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    patch:
      tags:
        - core-workflows
      summary: Update a Workflow's metadata
      description: Update any of the name, description, and visibility of a workflow.
      operationId: UpdateWorkflowMetadata
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWorkflowMetadataRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowData-Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - core-workflows
      summary: Delete a Workflow
      description: >-
        Delete a workflow. Deleting a workflow will automatically delete any
        shares

        associated with the workflow.
      operationId: DeleteWorkflow
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/workflows/{workflow_id}/runs:
    get:
      tags:
        - core-workflows
      summary: List Workflow Runs
      description: List a workflow's past runs ordered by newest first.
      operationId: GetWorkflowRuns
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WorkflowRunSummary'
                title: Response Getworkflowruns
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/workflows/{workflow_id}/runs/active:
    get:
      tags:
        - core-workflows
      summary: Get an Active Workflow Run
      description: >-
        Return the active run of a workflow that you triggered, if it is
        running.
      operationId: GetWorkflowActiveRun
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/WorkflowActiveRun'
                  - type: 'null'
                title: Response Getworkflowactiverun
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/workflows/{workflow_id}/runs/{run_id}:
    get:
      tags:
        - core-workflows
      summary: Get Workflow Run Details
      description: Retrieve a past run of a workflow, broken down step by step.
      operationId: GetWorkflowRunDetail
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Run Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowRunDetail'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - core-workflows
      summary: Run a Workflow
      description: >-
        Start a detached workflow run. This workflow will run until completion
        without

        interruption.
      operationId: StartWorkflowRun
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Run Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowExecutionRequest'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/workflows/{workflow_id}/runs/{run_id}/cancel:
    post:
      tags:
        - core-workflows
      summary: Cancel a Workflow Run
      description: >-
        Cancel a workflow that is actively running, if and only if it is
        running.
      operationId: CancelWorkflowRun
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Run Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/workflows/{workflow_id}/runs/{run_id}/steps:
    post:
      tags:
        - core-workflows
      summary: Execute a Workflow Step
      description: Execute one step of a workflow run, scheduled off the request.
      operationId: ExecuteWorkflowStep
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Run Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowStepExecutionRequest'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/workflows/{workflow_id}/shares:
    get:
      tags:
        - core-workflows
      summary: List Workflow Shares
      description: List active shares for a workflow.
      operationId: GetWorkflowShares
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ShareData'
                title: Response Getworkflowshares
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - core-workflows
      summary: Share a Workflow
      description: Share a workflow with one or more users.
      operationId: ShareWorkflow
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ShareRequest'
              title: Body
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ShareData'
                title: Response Shareworkflow
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/workflows/{workflow_id}/unshare:
    post:
      tags:
        - core-workflows
      summary: Unshare a Workflow
      description: Unshare a workflow from a user.
      operationId: UnshareWorkflow
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnshareRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/workflows/{workflow_id}/shares/me:
    delete:
      tags:
        - core-workflows
      summary: Revoke My Workflow Share
      description: |-
        Remove yourself from a Workflow that has been shared with you.

        Note that this is similar to unsubsscribing from a Workflow.
      operationId: RevokeMyWorkflowShare
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/project:
    get:
      tags:
        - core-project
      summary: List my Projects
      description: Get a list of your projects.
      operationId: GetProjects
      parameters:
        - name: includeUploaded
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            default: true
            title: Includeuploaded
        - name: includeShared
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            default: true
            title: Includeshared
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 100
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_ProjectData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - core-project
      summary: Create a Project
      description: Create a new project.
      operationId: CreateProject
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewProjectRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/project/{project_id}:
    get:
      tags:
        - core-project
      summary: Get a Project
      description: Get a project by its unique ID.
      operationId: GetProject
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - core-project
      summary: Update a Project
      description: |-
        Update an existing project. Only populated fields will be applied to the
        existing project.
      operationId: UpdateProject
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProjectRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - core-project
      summary: Delete a Project
      description: Delete a project.
      operationId: DeleteProject
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/project/{project_id}/shares:
    get:
      tags:
        - core-project
      summary: Get a Project's Shares
      description: Get the shares for a project.
      operationId: GetProjectShares
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
        - name: sharedWithId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Sharedwithid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_ShareData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/project/{project_id}/share:
    post:
      tags:
        - core-project
      summary: Share a Project
      description: Share a project with another user.
      operationId: ShareProject
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShareRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShareData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/project/{project_id}/unshare:
    post:
      tags:
        - core-project
      summary: Unshare a Project
      description: Unshare a Project that is actively shared with another user.
      operationId: UnshareProject
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnshareRequest'
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/project/{project_id}/shares/me:
    delete:
      tags:
        - core-project
      summary: Remove a Project Share
      description: Remove yourself from a project that has been shared with you.
      operationId: RevokeMyProjectShare
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/project/{project_id}/pin:
    patch:
      tags:
        - core-project
      summary: Pin a Project
      description: |-
        Marks a project as pinned so it always appears at the top of your
        projects list.
      operationId: PinProject
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/project/{project_id}/unpin:
    patch:
      tags:
        - core-project
      summary: Unpin a Project
      description: Unpins a project so that it no longer appears at the top of your list.
      operationId: UnpinProject
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/template:
    post:
      tags:
        - core-template
      summary: Create a Template
      description: >-
        Creates a new template with the provided name, description, type, and
        data.
      operationId: CreateTemplate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTemplateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: User does not have permission to access the template
        '404':
          description: Template not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    get:
      tags:
        - core-template
      summary: List Templates
      description: List your available templates.
      operationId: GetTemplates
      parameters:
        - name: templateType
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/TemplateType'
              - type: 'null'
            description: Filter templates by type (docx or pptx)
            title: Templatetype
          description: Filter templates by type (docx or pptx)
        - name: ownerId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter templates by owner ID
            title: Ownerid
          description: Filter templates by owner ID
        - name: limit
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_TemplateData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: User does not have permission to access the template
        '404':
          description: Template not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/template/{id}:
    get:
      tags:
        - core-template
      summary: Get a Template
      description: Retrieve a template by ID.
      operationId: GetTemplate
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: User does not have permission to access the template
        '404':
          description: Template not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - core-template
      summary: Update a Template
      description: >-
        Updates a template. Only fields

        included in the request body are updated; omitted fields remain
        unchanged.
      operationId: UpdateTemplate
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTemplateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: User does not have permission to access the template
        '404':
          description: Template not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - core-template
      summary: Delete a Template
      description: Delete a previously uploaded template.
      operationId: DeleteTemplate
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: User does not have permission to access the template
        '404':
          description: Template not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/tools/public:
    get:
      tags:
        - core-agents
      summary: Get Public Tools
      description: |-
        Retrieve all publicly visible tools.

        Used by the Discover page to list tools available to all users.

        Args:
            request (Request): The incoming HTTP request.
            sparse (bool): When True, returns a reduced representation.
                Defaults to False.
            tool_service (ToolService): Injected tool service dependency.

        Returns:
            APIListModel[ToolData | ToolData.Sparse]: Public tools.
      operationId: GetPublicTools
      parameters:
        - name: sparse
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Sparse
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_Union_ToolData_Sparse__'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/tools/{tool_id}:
    get:
      tags:
        - core-agents
      summary: Get a Tool
      description: Retrieve a single tool by its unique identifier.
      operationId: GetTool
      parameters:
        - name: tool_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Tool Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - core-agents
      summary: Update a Tool
      description: |-
        Update an existing Tool. Any fields that you do not specify will be
        excluded from the update.
      operationId: UpdateTool
      parameters:
        - name: tool_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Tool Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToolUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/tools/{name}/versions:
    get:
      tags:
        - core-agents
      summary: List Tool Versions
      description: List all the versions for a tool you have access to.
      operationId: GetToolVersions
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
            title: Name
        - name: sparse
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Sparse
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_Union_ToolData_Sparse__'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/tools:
    get:
      tags:
        - core-agents
      summary: List Tools
      description: >-
        Returns all the tools that are available for to use with Agents. These

        tools are grouped by whether they are owned, shared, or published to
        your organization.
      operationId: GetTools
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/tools/{tool_id}/network:
    patch:
      tags:
        - core-agents
      summary: Update a Tool network configuration
      description: |-
        Update the network configuration for an existing tool. This allows
        you to dictate if the tool should have internet access and where it
        should be allowed to go.
      operationId: UpdateToolNetwork
      parameters:
        - name: tool_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Tool Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserToolNetworkConfiguration'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/tools/create:
    post:
      tags:
        - core-agents
      summary: Create a Tool
      description: Create a new Tool.
      operationId: CreateTool
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToolCreate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/tools/{name}:
    delete:
      tags:
        - core-agents
      summary: Delete a Tool
      description: >-
        Delete a tool by name (and optionally a specific version). Leaving the
        version

        empty will remove all versions of the Tool.
      operationId: DeleteTool
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
            title: Name
        - name: version
          in: query
          required: false
          schema:
            type: integer
            title: Version
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/tools/{tool_id}/visibility:
    patch:
      tags:
        - core-agents
      summary: Update a Tool's Visibility
      description: >-
        Toggle the visibility of a Tool to be public to your entire organization
        or private

        to only you.
      operationId: UpdateToolVisibility
      parameters:
        - name: tool_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Tool Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentVisibility'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/tools/{tool_id}/shares:
    get:
      tags:
        - core-agents
      summary: Get Tool Shares
      description: Retrieve all active shares for a Tool that you own.
      operationId: GetToolShares
      parameters:
        - name: tool_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Tool Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_ShareData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - core-agents
      summary: Share A Tool
      description: |-
        Share a tool you own with one or more users. Depending on the
            level of permission you grant to user's you share with, they may be able to
            share this Tool with others or even modify the Tool.
      operationId: ShareTool
      parameters:
        - name: tool_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Tool Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ShareRequest'
              title: Body
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_ShareData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/tools/{tool_id}/unshare:
    post:
      tags:
        - core-agents
      summary: Unshare a Tool
      description: |-
        Unshare a Tool from a user that you have previously shared with.

        Args:
            request (Request): FastAPI request
            tool_id (UUID): The tool to unshare.
            body (UnshareRequest): Identifies the user whose access is revoked.
            service (ToolService, optional): Tool service instance. Defaults to Depends(get_tool_service).

        Raises:
            NotFoundException: Raised if the underlying tool does not exist.
            ForbiddenException: Raised if the user does not own the underlying tool.
            InternalServerError: Raised if the operation did not execute.

        Returns:
            SimpleResponse: Indicating if the operation was successful.
      operationId: UnshareTool
      parameters:
        - name: tool_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Tool Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnshareRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/tools/{tool_id}/shares/me:
    delete:
      tags:
        - core-agents
      summary: Remove a Tool Share
      description: >-
        Allows you to unshare a Tool with yourself if you do not wish to
        continue receiving it for any reason.

        This can be thought of as an 'Unsubscribe' to the Tool that someone has
        shared with you.
      operationId: RevokeMyToolShare
      parameters:
        - name: tool_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Tool Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/instructions/public:
    get:
      tags:
        - core-agents
      summary: Get Public Instructions
      description: |-
        Retrieve all publicly visible instructions.

        Used by the Discover page to list instructions available to all users.

        Args:
            request (Request): The incoming HTTP request.
            sparse (bool): When True, returns a reduced representation.
                Defaults to False.
            instruction_service (InstructionService): Injected instruction
                service dependency.

        Returns:
            APIListModel[InstructionData | InstructionData.Sparse]: Public instructions.
      operationId: GetPublicInstructions
      parameters:
        - name: sparse
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Sparse
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/APIListModel_Union_InstructionData_Sparse__
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/instructions/{instruction_id}:
    get:
      tags:
        - core-agents
      summary: Get an Instruction
      description: Retrieve a single instruction by its unique identifier.
      operationId: GetInstruction
      parameters:
        - name: instruction_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Instruction Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InstructionData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - core-agents
      summary: Update an Instruction
      description: |-
        Update an Instruction. Any fields that you do not specify will be
        excluded from the update.
      operationId: UpdateInstruction
      parameters:
        - name: instruction_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Instruction Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstructionUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InstructionData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - core-agents
      summary: Delete an Instruction
      description: >-
        Delete an Instruction. This will permanently remove the instruction and
        its associated taggings.


        Note that deleting an instruction will automatically remove it from
        associated Agents. This can potentially

        lead to undesired behavior. It is recommended to ensure that an
        instruction is no longer

        associated with any Agents prior to deletion.
      operationId: DeleteInstruction
      parameters:
        - name: instruction_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Instruction Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/instructions:
    get:
      tags:
        - core-agents
      summary: List Instructions
      description: >-
        Returns all the instructions that are available for to use with Agents.
        These

        instructions are grouped by whether they are owned, shared, or published
        to your organization.
      operationId: GetInstructions
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/instructions/create:
    post:
      tags:
        - core-agents
      summary: Create an Instruction
      description: >-
        Create a new Instruction. This Instruction should include guidelines
        about how you want your Agent to behave.

        This could include things like the language style, level of detail, and
        effort it uses.
      operationId: CreateInstruction
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstructionCreate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InstructionData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/instructions/{instruction_id}/visibility:
    patch:
      tags:
        - core-agents
      summary: Update an Instruction's visibility.
      description: >-
        Toggle the visibility of an Instruction to be public to your entire
        organization or private

        to only you.
      operationId: UpdateInstructionVisibility
      parameters:
        - name: instruction_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Instruction Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentVisibility'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InstructionData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/instructions/{instruction_id}/shares:
    get:
      tags:
        - core-agents
      summary: Get Instruction Shares
      description: Retrieve all the active shares for an instruction you own.
      operationId: GetInstructionShares
      parameters:
        - name: instruction_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Instruction Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_ShareData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - core-agents
      summary: Share an Instruction
      description: >-
        Share an instruction you own with one or more users. Depending on the

        level of permission you grant to user's you share with, they may be able
        to

        share this Instruction with others or even modify the Instruction.
      operationId: ShareInstruction
      parameters:
        - name: instruction_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Instruction Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ShareRequest'
              title: Body
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_ShareData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/instructions/{instruction_id}/unshare:
    post:
      tags:
        - core-agents
      summary: Unshare an Instruction
      description: Unshare an Instruction from a user that you have previously shared with.
      operationId: UnshareInstruction
      parameters:
        - name: instruction_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Instruction Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnshareRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/instructions/{instruction_id}/shares/me:
    delete:
      tags:
        - core-agents
      summary: Remove an Instruction Share
      description: >-
        Allows you to unshare an Instruction with yourself if you do not wish to
        continue receiving it for any reason.

        This can be thought of as an 'Unsubscribe' to the Instruction that
        someone has shared with you.
      operationId: RevokeMyInstructionShare
      parameters:
        - name: instruction_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Instruction Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/create:
    post:
      tags:
        - core-agents
      summary: Create an Agent
      description: >-
        Create a new agent. An Agent is a logical composition of tools and
        instructions

        designed for specific tasks or use cases. An Agent can be configured
        with any number

        of tools and instructions and can be designed for general purpose
        chatting or

        dedicated workflow use.
      operationId: CreateAgent
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentCreate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/system:
    get:
      tags:
        - core-agents
      summary: Get System Agents
      description: |-
        Retrieve all system agents available for user selection.

        Returns agents with ``AgentVisibility.SYSTEM`` that are visible
        to all authenticated users for selection in the chat modal.

        Args:
            request (Request): The incoming HTTP request.
            sparse (bool): When True, returns a reduced representation.
                Defaults to True.
            service (AgentService): Injected agent service dependency.

        Returns:
            List[AgentData | AgentData.Sparse]: System agents.
      operationId: GetSystemAgents
      parameters:
        - name: sparse
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Sparse
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_Union_AgentData_Sparse__'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/public:
    get:
      tags:
        - core-agents
      summary: Get Public Agents
      description: |-
        Retrieve all publicly visible agents.

        Used by the Discover page to list agents available to all users.

        Args:
            request (Request): The incoming HTTP request.
            sparse (bool): When True, returns a reduced representation.
                Defaults to False.
            include_instructions (bool): When True, eagerly loads associated
                instructions for each agent. Defaults to True.
            include_tools (bool): When True, eagerly loads associated
                tools for each agent. Defaults to True.
            service (AgentService): Injected agent service dependency.

        Returns:
            AgentsResponse: Public agents.
      operationId: GetPublicAgents
      parameters:
        - name: sparse
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Sparse
        - name: includeInstructions
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Includeinstructions
        - name: includeTools
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Includetools
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_Union_AgentData_Sparse__'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/{agent_id}:
    get:
      tags:
        - core-agents
      summary: Get an Agent
      description: >-
        Retrieve an agent by its unique identifier. The returned agent will
        include

        associated instructions and tools as well as any tags the agent has.
      operationId: GetAgent
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - core-agents
      summary: Update an Agent
      description: >-
        Update an existing agent. Update fields that are not specified in the
        request body are

        excluded from the agent updated.
      operationId: UpdateAgent
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/{name}/versions:
    get:
      tags:
        - core-agents
      summary: Get an Agent version
      description: >-
        Retrieves all the version of a given agent identified by its name.

        The retrieved agent can conditionally include associated tools and
        instructions

        that are associated with the agent.
      operationId: GetAgentVersions
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
            title: Name
        - name: sparse
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Sparse
        - name: includeInstructions
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Includeinstructions
        - name: includeTools
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Includetools
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_Union_AgentData_Sparse__'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents:
    get:
      tags:
        - core-agents
      summary: List Agents
      description: Returns lists of all available agents to you, grouped by relationship.
      operationId: GetAgents
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/{name}:
    delete:
      tags:
        - core-agents
      summary: Delete an Agent
      description: >-
        Deletes an agent. Permanently removes the agent and its associated
        taggings. If the

        agent does not exist, returns a success response indicating there

        is nothing to do.
      operationId: DeleteAgent
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
            title: Name
        - name: version
          in: query
          required: false
          schema:
            type: integer
            title: Version
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/{agent_id}/visibility:
    patch:
      tags:
        - core-agents
      summary: Update an Agent's Visibility
      description: |-
        Sets the visibility of an Agent to be either PUBLIC or private
        to your organization.
      operationId: UpdateAgentVisibility
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentVisibility'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/{agent_id}/shares:
    get:
      tags:
        - core-agents
      summary: Get an Agent's shares
      description: Retrieve all active shares for an agent you have created.
      operationId: GetAgentShares
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_ShareData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - core-agents
      summary: Share an Agent
      description: >-
        Share an agent with one or more users. This will allow the receiving
        users to use the agent for

        workflows and chats moving forward. Depending on the permissions you
        share, users who you have shared this agent with can

        share this agent with others and even modify the Agent.
      operationId: ShareAgent
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ShareRequest'
              title: Body
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_ShareData_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/{agent_id}/unshare:
    post:
      tags:
        - core-agents
      summary: Unshare an Agent
      description: |-
        Unshares an agent with a specific user. This will prevent the user
        from accessing or using the agent in the future.
      operationId: UnshareAgent
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnshareRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/agents/{agent_id}/shares/me:
    delete:
      tags:
        - core-agents
      summary: Remove an Agent share
      description: >-
        Allows you to unshare an Agent with yourself if you do not wish to
        continue receiving it for any reason.

        This can be thought of as an 'Unsubscribe' to the Agent that someone has
        shared with you.
      operationId: RevokeMyAgentShare
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/resource-approvals:
    get:
      tags:
        - core-resource-approvals
      summary: List Resource Approvals
      description: Retrieve all resource approval records for your organization.
      operationId: GetResourceApprovals
      parameters:
        - name: resource_type
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/ApprovalResourceType'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/APIListModel_ResourceApprovalDataEnriched_
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
    post:
      tags:
        - core-resource-approvals
      summary: Submit a Resource Request
      description: Submit a request to approve a resource request.
      operationId: CreateResourceApproval
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateResourceApprovalRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceApprovalData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/resource-approvals/{approval_id}/approve:
    post:
      tags:
        - core-resource-approvals
      summary: Approve a Resource Request
      description: Approve a pending resource approval.
      operationId: ApproveResourceApproval
      parameters:
        - name: approval_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Approval Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/ResourceApprovalNoteRequest'
                - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateApprovalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/core/resource-approvals/{approval_id}/reject:
    post:
      tags:
        - core-resource-approvals
      summary: Reject a Resource Request
      description: Reject a pending resource approval.
      operationId: RejectResourceApproval
      parameters:
        - name: approval_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Approval Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/ResourceApprovalNoteRequest'
                - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateApprovalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/core/resource-approvals/{approval_id}/revoke:
    post:
      tags:
        - core-resource-approvals
      summary: Revoke an Approved Resource Request
      description: Revoke a previously approved resource approval.
      operationId: RevokeResourceApproval
      parameters:
        - name: approval_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Approval Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/ResourceApprovalNoteRequest'
                - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateApprovalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-badges:
        - name: Admin
  /api/core/resource-approvals/{approval_id}/resubmit:
    post:
      tags:
        - core-resource-approvals
      summary: Resubmit a Resource Request
      description: Resubmit a resource request that was previously rejected or revoked.
      operationId: ResubmitResourceApproval
      parameters:
        - name: approval_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Approval Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/ResourceApprovalNoteRequest'
                - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateApprovalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/core/service-actions:
    get:
      tags:
        - core-service-actions
      summary: Get Service Actions
      description: |-
        Return the IAM action names served by this application.

        Actions are resolved from the application's route table with the
        same resolution used by policy enforcement, so the reported
        vocabulary always matches what the policy checker enforces.

        Returns:
            APIListModel[str]: Sorted action names for this service.
      operationId: GetServiceActions
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIListModel_str_'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    APIKeyData:
      properties:
        apiKeyId:
          type: string
          title: Apikeyid
        apiSecretKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Apisecretkey
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        expiresAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expiresat
        createdAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createdat
        lastUsed:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Lastused
        status:
          anyOf:
            - $ref: '#/components/schemas/APIKeyStatus'
            - type: 'null'
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - apiKeyId
      title: APIKeyData
      description: |-
        API key information.

        Params:
            api_key_id (str): The id of the API key.
            api_secret_key (str): The secret key that is verified.
            name (str): A human readable identifier.
            expires_at (datetime): When the key expires.
            created_at (datetime): when the key was created.
            last_used (datetime): When the key was last used.
            status (APIKeyStatus): The current status of the api key.
            metadata (Dict[str,Any]): Any metadata related to api key transactions.
    APIKeyStatus:
      type: string
      enum:
        - active
        - expired
        - suspended
        - compromised
        - deleted
      title: APIKeyStatus
      description: |-
        The status of an API Key

        Options:
            ACTIVE: The key is active
            EXPIRED: The key is expired
            SUSPENDED: The key was revoked by an administrator.
            COMPROMISED: The key is suspected/confirmed to be compromised.
            DELETED: The key has been deleted.

        Note:
            The states of COMPROMISED, EXPIRED, and DELETED
            are immutable.

            Keys that have been suspended may be conditionally restored by an administrator.
    APIListModel_APIKeyData_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/APIKeyData'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[APIKeyData]
    APIListModel_OrganizationMemberData_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/OrganizationMemberData'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[OrganizationMemberData]
    APIListModel_PolicyData_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/PolicyData-Output'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[PolicyData]
    APIListModel_ResourceApprovalDataEnriched_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ResourceApprovalDataEnriched'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[ResourceApprovalDataEnriched]
    APIListModel_RoleDefinition_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/RoleDefinition'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[RoleDefinition]
    APIListModel_ServiceAccountData_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ServiceAccountData'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[ServiceAccountData]
    APIListModel_str_:
      properties:
        items:
          items:
            type: string
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[str]
    ActionResourcePair:
      properties:
        action:
          type: string
          title: Action
        resources:
          anyOf:
            - items:
                anyOf:
                  - type: string
                    format: uuid
                  - type: string
              type: array
            - type: string
              format: uuid
            - type: string
            - type: 'null'
          title: Resources
          default: '*'
      type: object
      required:
        - action
      title: ActionResourcePair
      description: |-
        A pairing of an action and accompanied resources.
        Used to pair an action with resources of an accompanying type.

        Attributes:
            action (str): The action to perform
            resources (list[UUID | str] | None): An optional list of accompanying
                resources. Defaults to "*"
    ApprovalResourceType:
      type: string
      enum:
        - collection
        - workflow
        - agent
        - tool
        - instruction
        - storage
        - tokens
        - sandbox_endpoints
      title: ApprovalResourceType
      description: |-
        Enum of resource types that can be submitted for approval.

        Values:
            COLLECTION: A document collection.
            WORKFLOW: A workflow definition.
            AGENT: An agent configuration.
            TOOL: A tool component attached to agents.
            INSTRUCTION: An instruction component attached to agents.

        Example:
            >>> approval = ResourceApproval(
            ...     resource_type=ApprovalResourceType.COLLECTION,
            ... )
    AttributeConfigResponse:
      properties:
        requiredAttributes:
          items:
            type: string
          type: array
          title: Requiredattributes
        optionalAttributes:
          items:
            type: string
          type: array
          title: Optionalattributes
        defaultUrls:
          additionalProperties:
            type: string
          type: object
          title: Defaulturls
        displayNames:
          additionalProperties:
            type: string
          type: object
          title: Displaynames
      type: object
      required:
        - requiredAttributes
        - optionalAttributes
        - defaultUrls
        - displayNames
      title: AttributeConfigResponse
      description: |-
        Response schema for SAML attribute configuration.

        Provides the list of required and optional attributes along with
        their default claim URLs. This is the single source of truth for
        attribute configuration, used by the frontend to avoid duplication.
    AttributeMapping:
      properties:
        mappings:
          additionalProperties:
            type: string
          type: object
          title: Mappings
      type: object
      required:
        - mappings
      title: AttributeMapping
      description: |-
        SAML attribute mapping configuration.

        Maps Cognito user pool attributes to SAML claim URLs.
        Stored as a simple dict: {"attribute_name": "claim_url", ...}
    BulkUpdateUserConfigurationRequest:
      properties:
        intelligentContext:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Intelligentcontext
      type: object
      title: BulkUpdateUserConfigurationRequest
      description: >-
        Request model for applying configuration options to every user in the

        caller's organization.


        All fields are optional so future options add keys without breaking the

        contract. Only provided (non-None) fields are applied; an empty body is
        a

        no-op.


        Attributes:
            intelligent_context (bool | None): When set, overwrites each user's
                Intelligent Context preference.
    BulkUpdateUserConfigurationResponse:
      properties:
        successCount:
          type: integer
          title: Successcount
        failureCount:
          type: integer
          title: Failurecount
      type: object
      required:
        - successCount
        - failureCount
      title: BulkUpdateUserConfigurationResponse
      description: |-
        Response model for bulk user configuration updates.

        Attributes:
            success_count (int): Number of users whose configuration was updated.
            failure_count (int): Number of targeted users skipped because they had
                no existing configuration row.
    CertificateResponse:
      properties:
        certificate:
          type: string
          title: Certificate
      type: object
      required:
        - certificate
      title: CertificateResponse
    ConfigureSSORequest:
      properties:
        metadataUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Metadataurl
        metadataFile:
          anyOf:
            - $ref: '#/components/schemas/MetadataFile'
            - type: 'null'
        attributeMapping:
          anyOf:
            - $ref: '#/components/schemas/AttributeMapping'
            - type: 'null'
        enableIdpInit:
          type: boolean
          title: Enableidpinit
          default: false
        requireEncryptedResponses:
          type: boolean
          title: Requireencryptedresponses
          default: false
        signSamlRequests:
          type: boolean
          title: Signsamlrequests
          default: false
        enableIdpSignout:
          type: boolean
          title: Enableidpsignout
          default: false
      type: object
      title: ConfigureSSORequest
    CreateAPIKeyRequest:
      properties:
        name:
          type: string
          title: Name
        expiration:
          anyOf:
            - type: integer
            - type: string
              format: date-time
          title: Expiration
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
      type: object
      required:
        - name
        - expiration
      title: CreateAPIKeyRequest
      description: |-
        Request schema for new API key creation.

        Params:
            name (str): A human readable description for the API key
            expiration (datetime | int): A flexible input for expiration.
                                        The input is validated so that the final result
                                        is always a datetime.
            owner_id (Optional[str]): An optional user id if the API Key is created
                            on behalf of someone else.
    CreatePolicyRequest:
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        statements:
          items:
            $ref: '#/components/schemas/PolicyStatement'
          type: array
          title: Statements
          default: []
        name:
          type: string
          title: Name
      type: object
      required:
        - name
      title: CreatePolicyRequest
    CreatePolicyStatementRequest:
      properties:
        statement:
          $ref: '#/components/schemas/PolicyStatement'
      type: object
      required:
        - statement
      title: CreatePolicyStatementRequest
    CreateRole:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          maxLength: 500
          title: Description
        isActive:
          type: boolean
          title: Isactive
        rank:
          type: integer
          title: Rank
        organizationId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organizationid
        policies:
          items:
            $ref: '#/components/schemas/PolicyData-Input'
          type: array
          title: Policies
          default: []
      type: object
      required:
        - name
        - description
        - isActive
        - rank
      title: CreateRole
    CreateServiceAccount:
      properties:
        name:
          type: string
          title: Name
        scope:
          $ref: '#/components/schemas/ResourceServerAccountScope'
        clientId:
          anyOf:
            - type: string
            - type: 'null'
          title: Clientid
        accessTokenExpiration:
          type: integer
          title: Accesstokenexpiration
          default: 60
        accessTokenExpirationUnit:
          $ref: '#/components/schemas/TimeUnit'
          default: minutes
      type: object
      required:
        - name
        - scope
      title: CreateServiceAccount
    CreateUserSignupRequest:
      properties:
        email:
          type: string
          format: email
          title: Email
        firstName:
          type: string
          title: Firstname
        lastName:
          type: string
          title: Lastname
      type: object
      required:
        - email
        - firstName
        - lastName
      title: CreateUserSignupRequest
      description: Request model for creating a new user signup.
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: ErrorResponse
      description: |-
        A generic error response model format used to
        dynamically generate the api responses in openapi
        schemas.

        Mimics the format of HTTPException from FastAPI.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MetadataFile:
      properties:
        name:
          type: string
          title: Name
        content:
          type: string
          title: Content
      type: object
      required:
        - name
        - content
      title: MetadataFile
      description: |-
        Metadata file information with name and content.

        This is the single source of truth for metadata file structure,
        used across domain, request, and response schemas.
    MetadataValidationResponse:
      properties:
        valid:
          type: boolean
          title: Valid
        idpEntityId:
          anyOf:
            - type: string
            - type: 'null'
          title: Idpentityid
        ssoUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Ssourl
        certificateExpiry:
          anyOf:
            - type: string
            - type: 'null'
          title: Certificateexpiry
        warnings:
          items:
            type: string
          type: array
          title: Warnings
        errors:
          items:
            type: string
          type: array
          title: Errors
      type: object
      required:
        - valid
      title: MetadataValidationResponse
      description: Response schema for SAML metadata validation.
    MtMTokenData:
      properties:
        accessToken:
          type: string
          title: Accesstoken
        expiresIn:
          type: integer
          title: Expiresin
        tokenType:
          anyOf:
            - type: string
            - type: 'null'
          title: Tokentype
      type: object
      required:
        - accessToken
        - expiresIn
      title: MtMTokenData
    NotificationEventType:
      type: string
      enum:
        - message_notification
        - internal_redirect_notification
        - chat_attachment_processed
        - collection_document_processed
        - collection_document_processing_failed
        - collection_document_upload_skipped
        - collection_document_upload_failed
        - token_usage_updated
        - workflow_step_completed
        - workflow_run_finished
      title: NotificationEventType
      description: |-
        Enum of notification/event types recognised by the notification system.

        Values are the wire-format strings that appear in EventBridge details,
        DynamoDB records, and WebSocket messages.

        Example:
            >>> NotificationEventType.MESSAGE_NOTIFICATION
            'message_notification'
            >>> NotificationEventType.CHAT_ATTACHMENT_PROCESSED == "chat_attachment_processed"
            True
    OrgWideNotificationRequest:
      properties:
        title:
          type: string
          maxLength: 100
          minLength: 1
          title: Title
        notificationType:
          $ref: '#/components/schemas/NotificationEventType'
        body:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Body
        organizationId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organizationid
      type: object
      required:
        - title
        - notificationType
      title: OrgWideNotificationRequest
      description: >-
        Request body for broadcasting a notification to all active users in an
        organization.

        Extends BaseNotificationRequest


        Attributes:
            organization_id: Optional target organization. When omitted the
                authenticated admin's own organization is used.
    OrganizationConfiguration:
      properties:
        sandboxConfiguration:
          $ref: '#/components/schemas/OrganizationSandboxConfiguration'
      type: object
      required:
        - sandboxConfiguration
      title: OrganizationConfiguration
    OrganizationMemberData:
      properties:
        id:
          type: string
          title: Id
        firstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstname
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
        preferredName:
          anyOf:
            - type: string
            - type: 'null'
          title: Preferredname
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
      type: object
      required:
        - id
      title: OrganizationMemberData
      description: |-
        Domain model for a member within an organization.

        Attributes:
            id (str): The user's unique identifier.
            first_name (str | None): The user's first name.
            last_name (str | None): The user's last name.
            preferred_name (str | None): The user's preferred display name.
            email (str | None): The user's email address.
    OrganizationMembersResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/OrganizationMemberData'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
        organizationName:
          anyOf:
            - type: string
            - type: 'null'
          title: Organizationname
      type: object
      required:
        - items
      title: OrganizationMembersResponse
      description: >-
        Response model for listing members of the requesting user's
        organization.
    OrganizationSandboxConfiguration:
      properties:
        ipRestrictionType:
          type: string
          enum:
            - ALLOW
            - BLOCK
          title: Iprestrictiontype
          default: ALLOW
        allowList:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allowlist
        blockList:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Blocklist
      type: object
      title: OrganizationSandboxConfiguration
      description: |-
        Contains organization sandbox configuration.

        Attributes:
            ip_restriction_type (Literal[ALLOW, BLOCK]): Whether the sandbox uses a white list or black list.
                Defaults to a white list pattern.
            allow_list (list[str]): The allowed domains to access.
            block_list (list[str]): The blocked domains that can never be accessed.

        Note:
            Only one of allow or block list may ever be populated corresponding to the restriction type.
    OrganizationSummaryData:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        configuration:
          anyOf:
            - $ref: '#/components/schemas/OrganizationConfiguration'
            - type: 'null'
      type: object
      required:
        - id
        - name
      title: OrganizationSummaryData
      description: Domain model for lightweight organization records.
    PolicyData-Input:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        organizationId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organizationid
        name:
          type: string
          title: Name
        isInline:
          type: boolean
          title: Isinline
          default: false
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        statements:
          items:
            $ref: '#/components/schemas/PolicyStatement'
          type: array
          title: Statements
          default: []
      type: object
      required:
        - name
      title: PolicyData
    PolicyData-Output:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        organizationId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organizationid
        name:
          type: string
          title: Name
        isInline:
          type: boolean
          title: Isinline
          default: false
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        statements:
          items:
            $ref: '#/components/schemas/PolicyStatement'
          type: array
          title: Statements
          default: []
      type: object
      required:
        - name
      title: PolicyData
    PolicyEffect:
      type: string
      enum:
        - allow
        - deny
      title: PolicyEffect
      description: Allow/deny outcome for a policy statement.
    PolicyService:
      type: string
      enum:
        - core
        - user
        - embedding
      title: PolicyService
      description: Target service namespace for a policy statement.
    PolicyStatement:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        sid:
          type: string
          title: Sid
        effect:
          $ref: '#/components/schemas/PolicyEffect'
        service:
          $ref: '#/components/schemas/PolicyService'
        actions:
          items:
            type: string
          type: array
          title: Actions
        resources:
          items:
            type: string
          type: array
          title: Resources
      type: object
      required:
        - sid
        - effect
        - service
        - actions
        - resources
      title: PolicyStatement
      description: Shared IAM-style policy statement shape.
    PrincipalType:
      type: string
      enum:
        - user
        - service_account
        - role
      title: PrincipalType
    RefreshTokenRequest:
      properties:
        refreshToken:
          type: string
          title: Refreshtoken
      type: object
      required:
        - refreshToken
      title: RefreshTokenRequest
      description: Request schema for token refresh.
    RefreshTokenResponse:
      properties:
        message:
          type: string
          title: Message
        expiresIn:
          anyOf:
            - type: integer
            - type: 'null'
          title: Expiresin
      type: object
      required:
        - message
      title: RefreshTokenResponse
      description: |-
        The response returned from the refresh-tokens
        operation.

        Params:
            message (str): The message to the user.
            expires_in (int): The expiration, if the tokens are actually refreshed.
    ResourceApprovalData:
      properties:
        note:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Note
        submissionNote:
          anyOf:
            - type: string
            - type: 'null'
          title: Submissionnote
        resourceType:
          $ref: '#/components/schemas/ApprovalResourceType'
        resourceId:
          type: string
          format: uuid
          title: Resourceid
        extraApprovalData:
          anyOf:
            - $ref: '#/components/schemas/TokenIncreaseRequest'
            - $ref: '#/components/schemas/StorageIncreaseRequest'
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extraapprovaldata
        id:
          type: string
          format: uuid
          title: Id
        submittedByUserId:
          type: string
          maxLength: 36
          title: Submittedbyuserid
        status:
          $ref: '#/components/schemas/ResourceApprovalStatus'
        approverId:
          anyOf:
            - type: string
              maxLength: 36
            - type: 'null'
          title: Approverid
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - resourceType
        - resourceId
        - id
        - submittedByUserId
        - status
        - createdAt
        - updatedAt
      title: ResourceApprovalData
      description: |-
        Pydantic schema for resource approval API responses.

        Maps directly to the ResourceApproval ORM model for automatic
        serialization via BaseRepository's transform capability.

        Attributes:
            id: Unique identifier for the approval record.
            resource_type: The kind of resource under review.
            resource_id: Identifier of the resource under review.
            submitted_by_user_id: UUID string of the submitting user.
            submission_note: Optional note from the submitter.
            status: Current approval decision state.
            approver_id: UUID string of the reviewing administrator.
            approver_note: Optional note from the reviewer.
            created_at: Timestamp of creation.
            updated_at: Timestamp of last update.
    ResourceApprovalDataEnriched:
      properties:
        note:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Note
        submissionNote:
          anyOf:
            - type: string
            - type: 'null'
          title: Submissionnote
        resourceType:
          $ref: '#/components/schemas/ApprovalResourceType'
        resourceId:
          type: string
          format: uuid
          title: Resourceid
        extraApprovalData:
          anyOf:
            - $ref: '#/components/schemas/TokenIncreaseRequest'
            - $ref: '#/components/schemas/StorageIncreaseRequest'
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extraapprovaldata
        id:
          type: string
          format: uuid
          title: Id
        submittedByUserId:
          type: string
          maxLength: 36
          title: Submittedbyuserid
        status:
          $ref: '#/components/schemas/ResourceApprovalStatus'
        approverId:
          anyOf:
            - type: string
              maxLength: 36
            - type: 'null'
          title: Approverid
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
        resourceName:
          anyOf:
            - type: string
            - type: 'null'
          title: Resourcename
      type: object
      required:
        - resourceType
        - resourceId
        - id
        - submittedByUserId
        - status
        - createdAt
        - updatedAt
      title: ResourceApprovalDataEnriched
      description: >-
        Extends ResourceApprovalData with the resolved name of the target
        resource.


        Used by the list endpoint so the UI can display a human-readable
        resource

        name without a separate lookup.


        Attributes:
            resource_name: The display name of the resource under review
                (e.g. the workflow or agent name). None when the resource
                cannot be resolved.
    ResourceApprovalNoteRequest:
      properties:
        note:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Note
      type: object
      title: ResourceApprovalNoteRequest
      description: >-
        Request schema for review and resubmission actions on a resource
        approval.


        Used by approve, reject, revoke, and resubmit endpoints.


        Attributes:
            note: Optional note providing context for the action.
    ResourceApprovalStatus:
      type: string
      enum:
        - pending
        - approved
        - rejected
        - revoked
        - retracted
      title: ResourceApprovalStatus
      description: |-
        Enum of possible resource approval statuses.

        Values:
            PENDING: The resource is awaiting a decision.
            APPROVED: The resource has been approved by an administrator.
            REJECTED: The resource has been rejected by an administrator.
            REVOKED: The resource was previously approved but has been revoked by an administrator.
            RETRACTED: The resource was previously approved but has been taken back
                by the submitter themselves rather than by an administrator.

        Example:
            >>> approval = ResourceApproval(status=ResourceApprovalStatus.PENDING)
            >>> approval.status == ResourceApprovalStatus.PENDING
            True
    ResourceServerAccountScope:
      type: string
      enum:
        - read
        - write
        - admin
      title: ResourceServerAccountScope
    ResponseLength:
      type: string
      enum:
        - short
        - standard
        - long
        - verbose
      title: ResponseLength
      description: Allowed values for a user's preferred chat response length.
    RoleDefinition:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        name:
          type: string
          title: Name
        rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rank
        description:
          type: string
          title: Description
          default: ''
        isActive:
          type: boolean
          title: Isactive
          default: true
        organizationId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organizationid
        createdAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createdat
        updatedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updatedat
        policies:
          items:
            $ref: '#/components/schemas/PolicyData-Output'
          type: array
          title: Policies
          default: []
      type: object
      required:
        - name
      title: RoleDefinition
      description: |-
        Shared role definition for rank-based authorization.

        This is a pure data contract used by the RoleRegistry to determine
        role hierarchy. It is intentionally not an ORM model so that it can
        be shared across all API services regardless of database boundaries.

        Attributes:
            name: Unique role identifier (e.g. "admin", "super_admin").
            rank: Numerical rank determining permission hierarchy. Higher rank
                  implies greater privilege.
            description: Human-readable description of the role.
            is_active: Whether the role is currently active.
            permissions: Granular permission map for future use.

        Example:
            >>> role = RoleDefinition(name="admin", rank=2, description="Administrator role")
            >>> role.rank
            2
    RoleModificationRequest:
      properties:
        userId:
          type: string
          title: Userid
        roleId:
          type: string
          format: uuid
          title: Roleid
      type: object
      required:
        - userId
        - roleId
      title: RoleModificationRequest
      description: Request model for adding or removing a user's role.
    RolePolicyData:
      properties:
        roleId:
          type: string
          format: uuid
          title: Roleid
        policyId:
          type: string
          format: uuid
          title: Policyid
        assignedAt:
          type: string
          format: date-time
          title: Assignedat
        assignedBy:
          type: string
          title: Assignedby
      type: object
      required:
        - roleId
        - policyId
        - assignedAt
        - assignedBy
      title: RolePolicyData
    SPConfigurationResponse:
      properties:
        entityId:
          type: string
          title: Entityid
        acsUrl:
          type: string
          title: Acsurl
        logoutUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Logouturl
      type: object
      required:
        - entityId
        - acsUrl
      title: SPConfigurationResponse
      description: Response schema for Service Provider configuration details.
    SSOConfiguredResponse:
      properties:
        ssoEnabled:
          type: boolean
          title: Ssoenabled
        message:
          type: string
          title: Message
        providerName:
          type: string
          title: Providername
      type: object
      required:
        - ssoEnabled
        - message
        - providerName
      title: SSOConfiguredResponse
      description: Response schema for successful SSO configuration.
    SSODisabledResponse:
      properties:
        ssoEnabled:
          type: boolean
          title: Ssoenabled
        message:
          type: string
          title: Message
      type: object
      required:
        - ssoEnabled
        - message
      title: SSODisabledResponse
      description: Response schema for successful SSO disable.
    SSOProviderDetails:
      properties:
        idpInitEnabled:
          type: boolean
          title: Idpinitenabled
          default: false
        encryptedResponsesRequired:
          type: boolean
          title: Encryptedresponsesrequired
          default: false
        idpSignoutEnabled:
          type: boolean
          title: Idpsignoutenabled
          default: false
        signSamlRequestsEnabled:
          type: boolean
          title: Signsamlrequestsenabled
          default: false
        ssoRedirectUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Ssoredirecturl
        sloRedirectUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Sloredirecturl
        creationDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Creationdate
        lastModifiedDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastmodifieddate
      type: object
      title: SSOProviderDetails
      description: Details about the configured identity provider from Cognito.
    SSOStatusResponse:
      properties:
        ssoEnabled:
          type: boolean
          title: Ssoenabled
        providerName:
          anyOf:
            - type: string
            - type: 'null'
          title: Providername
        metadataUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Metadataurl
        metadataFile:
          anyOf:
            - $ref: '#/components/schemas/MetadataFile'
            - type: 'null'
        attributeMapping:
          anyOf:
            - $ref: '#/components/schemas/AttributeMapping'
            - type: 'null'
        providerDetails:
          anyOf:
            - $ref: '#/components/schemas/SSOProviderDetails'
            - type: 'null'
      type: object
      required:
        - ssoEnabled
      title: SSOStatusResponse
      description: Response schema for SSO configuration status.
    SelfNotificationRequest:
      properties:
        title:
          type: string
          maxLength: 100
          minLength: 1
          title: Title
        notificationType:
          $ref: '#/components/schemas/NotificationEventType'
        body:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Body
        visibleUntil:
          anyOf:
            - type: string
            - type: 'null'
          title: Visibleuntil
      type: object
      required:
        - title
        - notificationType
      title: SelfNotificationRequest
      description: >-
        Request body for creating a notification scoped to the authenticated
        user.

        Extends BaseNotificationRequest


        Attributes:
            visible_until: Optional ISO 8601 timestamp after which the notification
                should no longer be displayed. When omitted the notification persists.
    ServiceAccountClientSecret:
      properties:
        clientSecret:
          type: string
          title: Clientsecret
      type: object
      required:
        - clientSecret
      title: ServiceAccountClientSecret
    ServiceAccountData:
      properties:
        name:
          type: string
          title: Name
        scope:
          $ref: '#/components/schemas/ResourceServerAccountScope'
        clientId:
          type: string
          title: Clientid
        accessTokenExpiration:
          type: integer
          title: Accesstokenexpiration
          default: 60
        accessTokenExpirationUnit:
          $ref: '#/components/schemas/TimeUnit'
          default: minutes
        id:
          type: string
          format: uuid
          title: Id
        organizationId:
          type: string
          format: uuid
          title: Organizationid
        clientSecret:
          anyOf:
            - type: string
            - type: 'null'
          title: Clientsecret
        createdBy:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdby
        revokedBy:
          anyOf:
            - type: string
            - type: 'null'
          title: Revokedby
        lastAccessed:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Lastaccessed
        createdAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createdat
        updatedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updatedat
        roles:
          items:
            $ref: '#/components/schemas/RoleDefinition'
          type: array
          title: Roles
          default: []
        organization:
          anyOf:
            - $ref: '#/components/schemas/OrganizationSummaryData'
            - type: 'null'
      type: object
      required:
        - name
        - scope
        - clientId
        - id
        - organizationId
      title: ServiceAccountData
    ServiceAccountLoginRequest:
      properties:
        clientSecret:
          type: string
          title: Clientsecret
        id:
          type: string
          format: uuid
          title: Id
      type: object
      required:
        - clientSecret
        - id
      title: ServiceAccountLoginRequest
    ServiceAccountRoleData:
      properties:
        serviceAccountId:
          type: string
          format: uuid
          title: Serviceaccountid
        roleId:
          type: string
          format: uuid
          title: Roleid
        assignedBy:
          type: string
          title: Assignedby
        assignedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Assignedat
        isActive:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Isactive
      type: object
      required:
        - serviceAccountId
        - roleId
        - assignedBy
      title: ServiceAccountRoleData
    SimpleResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
      type: object
      required:
        - success
      title: SimpleResponse
      description: |-
        A simple response structure denoting a 200 response.

        Params:
            success (bool): Whether the executed request was successful.
            message (Optional[str]): An optional message to return in the response.
    SimulateActionRequest:
      properties:
        principalId:
          anyOf:
            - type: string
              format: uuid
            - type: string
          title: Principalid
        items:
          anyOf:
            - items:
                $ref: '#/components/schemas/ActionResourcePair'
              type: array
            - $ref: '#/components/schemas/ActionResourcePair'
          title: Items
        principalType:
          $ref: '#/components/schemas/PrincipalType'
          default: user
      type: object
      required:
        - principalId
        - items
      title: SimulateActionRequest
      description: |-
        Attributes:
            principal_id (UUID | str): The principal id. Can be the id of a role, service account, or user account.
            items (list[ActionResourcePair]): A list of action resource pairings to evaluate.
                Typical usage would pass a single pairing.
            principal_type (PrincipalType): The principal type.
                Can be a user, service account, or role. See PrincipalType
    SimulatedActionOutcome:
      properties:
        action:
          type: string
          title: Action
        resources:
          anyOf:
            - items:
                anyOf:
                  - type: string
                    format: uuid
                  - type: string
              type: array
            - type: string
              format: uuid
            - type: string
            - type: 'null'
          title: Resources
          default: '*'
        success:
          type: boolean
          title: Success
      type: object
      required:
        - action
        - success
      title: SimulatedActionOutcome
    SimulatedActionResponse:
      properties:
        outcomes:
          items:
            $ref: '#/components/schemas/SimulatedActionOutcome'
          type: array
          title: Outcomes
        passed:
          type: integer
          title: Passed
          readOnly: true
        failed:
          type: integer
          title: Failed
          readOnly: true
        allPassed:
          type: boolean
          title: Allpassed
          readOnly: true
      type: object
      required:
        - outcomes
        - passed
        - failed
        - allPassed
      title: SimulatedActionResponse
    StorageIncreaseRequest:
      properties:
        userStorageLimit:
          type: integer
          exclusiveMinimum: 0
          title: Userstoragelimit
      type: object
      required:
        - userStorageLimit
      title: StorageIncreaseRequest
    TimeUnit:
      type: string
      enum:
        - milliseconds
        - seconds
        - minutes
        - hours
        - days
        - weeks
        - years
      title: TimeUnit
    TokenAuthData:
      properties:
        accessToken:
          type: string
          title: Accesstoken
        expiresIn:
          type: integer
          title: Expiresin
        tokenType:
          anyOf:
            - type: string
            - type: 'null'
          title: Tokentype
        refreshToken:
          type: string
          title: Refreshtoken
        idToken:
          type: string
          title: Idtoken
      type: object
      required:
        - accessToken
        - expiresIn
        - refreshToken
        - idToken
      title: TokenAuthData
      description: |-
        Token Authentication data.

        Attributes:
            refresh_token (str): The refresh token.
            access_token (str): The access token.
            id_token (str): The id token.
            expires_in (int): The expiration of the access token.
            token_type (str): The token type.
    TokenExchangeRequest:
      properties:
        code:
          type: string
          title: Code
        redirectUri:
          type: string
          title: Redirecturi
        codeVerifier:
          type: string
          title: Codeverifier
      type: object
      required:
        - code
        - redirectUri
        - codeVerifier
      title: TokenExchangeRequest
      description: Request schema for OAuth code-to-token exchange.
    TokenIncreaseRequest:
      properties:
        shortPeriodScaledTokenLimit:
          type: integer
          exclusiveMinimum: 0
          title: Shortperiodscaledtokenlimit
      type: object
      required:
        - shortPeriodScaledTokenLimit
      title: TokenIncreaseRequest
    UpdateApprovalResponse:
      properties:
        updatedApproval:
          $ref: '#/components/schemas/ResourceApprovalData'
      type: object
      required:
        - updatedApproval
      title: UpdateApprovalResponse
      description: |-
        Response schema for approval status transition endpoints.

        Attributes:
            updated_approval: The resource approval record after the status change.
    UpdatePolicy:
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        statements:
          items:
            $ref: '#/components/schemas/PolicyStatement'
          type: array
          title: Statements
          default: []
      type: object
      title: UpdatePolicy
    UpdateRole:
      properties: {}
      type: object
      title: UpdateRole
    UpdateSSORequest:
      properties:
        metadataUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Metadataurl
        metadataFile:
          anyOf:
            - $ref: '#/components/schemas/MetadataFile'
            - type: 'null'
        attributeMapping:
          anyOf:
            - $ref: '#/components/schemas/AttributeMapping'
            - type: 'null'
        enableIdpInit:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enableidpinit
        requireEncryptedResponses:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Requireencryptedresponses
        signSamlRequests:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Signsamlrequests
        enableIdpSignout:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enableidpsignout
      type: object
      title: UpdateSSORequest
      description: Request schema for updating SAML SSO configuration.
    UpdateServiceAccount:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        scope:
          anyOf:
            - $ref: '#/components/schemas/ResourceServerAccountScope'
            - type: 'null'
      type: object
      title: UpdateServiceAccount
    UpdateUserPreferredName:
      properties:
        preferredName:
          type: string
          maxLength: 100
          title: Preferredname
      type: object
      required:
        - preferredName
      title: UpdateUserPreferredName
    UpdateUserRequest:
      properties:
        firstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstname
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
        preferredName:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
          title: Preferredname
        email:
          anyOf:
            - type: string
              format: email
            - type: 'null'
          title: Email
      type: object
      title: UpdateUserRequest
      description: |-
        Request model for updating user profile fields.

        All fields are optional. Only provided fields will be updated.
        The target user_id is passed as a query parameter.

        Attributes:
            first_name: The user's first name (optional, admin only).
            last_name: The user's last name (optional, admin only).
            preferred_name: The user's preferred display name (optional).
            email: The user's email address (optional, admin only).
    UserAuthenticationResponse:
      properties:
        authenticated:
          type: boolean
          title: Authenticated
        userInformation:
          $ref: '#/components/schemas/UserData'
      type: object
      required:
        - authenticated
        - userInformation
      title: UserAuthenticationResponse
      description: Response model for user authentication operations.
    UserConfigurationData:
      properties:
        userId:
          type: string
          title: Userid
        theme:
          type: string
          title: Theme
          default: auto
        language:
          type: string
          title: Language
          default: en
        timezone:
          type: string
          title: Timezone
          default: UTC
        userInstructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Userinstructions
        responseLength:
          $ref: '#/components/schemas/ResponseLength'
          default: standard
        messageFontSize:
          type: string
          title: Messagefontsize
          default: medium
        autoScroll:
          type: boolean
          title: Autoscroll
          default: true
        showTimestamps:
          type: boolean
          title: Showtimestamps
          default: true
        copyOnSelection:
          type: boolean
          title: Copyonselection
          default: true
        lastVersionSeen:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastversionseen
        intelligentContext:
          type: boolean
          title: Intelligentcontext
          default: true
      type: object
      required:
        - userId
      title: UserConfigurationData
      description: >-
        Response model representing user configuration settings.


        Contains user-specific configuration options that control the
        application's

        behavior, appearance, and AI interaction parameters.
    UserConfigurationUpdatedResponse:
      properties:
        userId:
          type: string
          title: Userid
        message:
          type: string
          title: Message
          readOnly: true
      type: object
      required:
        - userId
        - message
      title: UserConfigurationUpdatedResponse
      description: Response model for successful user configuration update operations.
    UserCreatedResponse:
      properties:
        userId:
          type: string
          title: Userid
        message:
          type: string
          title: Message
          readOnly: true
      type: object
      required:
        - userId
        - message
      title: UserCreatedResponse
      description: Response model for successful user creation operations.
    UserData:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: string
          title: Id
        organizationId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organizationid
        roles:
          items:
            $ref: '#/components/schemas/RoleDefinition'
          type: array
          title: Roles
          default: []
        firstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstname
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        username:
          anyOf:
            - type: string
            - type: 'null'
          title: Username
        externalAuthId:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalauthid
        identities:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Identities
        exp:
          anyOf:
            - type: integer
            - type: 'null'
          title: Exp
        status:
          type: string
          title: Status
          default: active
        preferredName:
          anyOf:
            - type: string
            - type: 'null'
          title: Preferredname
        createdAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createdat
        updatedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updatedat
        configuration:
          anyOf:
            - $ref: '#/components/schemas/UserConfigurationData'
            - type: 'null'
      type: object
      required:
        - id
      title: UserData
      description: >-
        User data model extracted from JWT token claims or database.


        This model inherits the base auth information provided from a JWT and
        extends it

        with relevant information that can be fetched from a users profile.


        Attributes:
            status (str): The user's account status (active, disabled, or deleted).
            preferred_name (str): The user's preferred name is applicable
            configuration (UserConfigurationData): See UserConfigurationData
            roles (List[RoleDefinition]): The user's roles. See RoleDefinition.
    UserIdRequest:
      properties:
        userId:
          type: string
          title: Userid
      type: object
      required:
        - userId
      title: UserIdRequest
      description: Request model for user operations requiring a user ID.
    UserResponse:
      properties:
        user:
          $ref: '#/components/schemas/UserData'
        canModifyRoles:
          type: boolean
          title: Canmodifyroles
          default: false
      type: object
      required:
        - user
      title: UserResponse
      description: Response model for single user lookup.
    UserUpdatedResponse:
      properties:
        userId:
          type: string
          title: Userid
        status:
          type: string
          title: Status
          default: updated
        message:
          type: string
          title: Message
          readOnly: true
      type: object
      required:
        - userId
        - message
      title: UserUpdatedResponse
      description: Response model for successful user update operations.
    ValidateMetadataFileRequest:
      properties:
        metadataContent:
          type: string
          title: Metadatacontent
      type: object
      required:
        - metadataContent
      title: ValidateMetadataFileRequest
      description: Request schema for validating SAML metadata from file content.
    ValidateMetadataRequest:
      properties:
        metadataUrl:
          type: string
          title: Metadataurl
      type: object
      required:
        - metadataUrl
      title: ValidateMetadataRequest
      description: Request schema for validating SAML metadata from URL.
    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
    APIListModel_DocumentData_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/DocumentData'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[DocumentData]
    APIListModel_ShareData_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ShareData'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[ShareData]
    BatchMoveItem:
      properties:
        itemId:
          type: string
          format: uuid
          title: Itemid
          description: Collection ID or document ID
        itemType:
          type: string
          enum:
            - collection
            - document
          title: Itemtype
          description: Whether this item is a collection or document
      type: object
      required:
        - itemId
        - itemType
      title: BatchMoveItem
      description: |-
        Single item in a batch move request.

        Args:
            item_id (UUID): The ID of the collection or document to move.
            item_type (Literal["collection", "document"]): Whether this item is a
                collection or a document.
    BatchMoveRequest:
      properties:
        items:
          items:
            $ref: '#/components/schemas/BatchMoveItem'
          type: array
          minItems: 1
          title: Items
          description: Items to move
        targetCollectionId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Targetcollectionid
          description: Target collection ID. None moves to root level.
      type: object
      required:
        - items
        - targetCollectionId
      title: BatchMoveRequest
      description: >-
        Request to move multiple collections and/or documents to a target
        collection

        in a single atomic transaction. All items are validated upfront; moves
        then

        execute in a single DB transaction so all succeed or all roll back.


        Args:
            items (list[BatchMoveItem]): List of items to move.
            target_collection_id (UUID | None): The target collection ID. None
                moves to root.
    CollectionTreeResponse:
      properties:
        collections:
          anyOf:
            - items:
                $ref: '#/components/schemas/DocumentCollectionData'
              type: array
            - items:
                additionalProperties: true
                type: object
              type: array
          title: Collections
          default: []
        orgCollections:
          anyOf:
            - items:
                $ref: '#/components/schemas/DocumentCollectionData'
              type: array
            - items:
                additionalProperties: true
                type: object
              type: array
          title: Orgcollections
          default: []
        sharedCollections:
          anyOf:
            - items:
                $ref: '#/components/schemas/SharedDocumentCollectionData'
              type: array
            - items:
                additionalProperties: true
                type: object
              type: array
          title: Sharedcollections
          default: []
      type: object
      title: CollectionTreeResponse
      description: |-
        Response schema for the collection tree endpoint.

        Splits collections into three categories for direct mapping
        to UI sections:
            - collections: Owned by the authenticated user.
            - org_collections: Public within the user's organization (not owned).
            - shared_collections: Explicitly shared with the user via shares table.
    ConfirmUploadRequest:
      properties:
        uploadKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Uploadkey
        collectionId:
          type: string
          format: uuid
          title: Collectionid
        name:
          type: string
          title: Name
        contentType:
          type: string
          title: Contenttype
        fileSizeBytes:
          type: integer
          title: Filesizebytes
        contentHash:
          type: string
          title: Contenthash
        topic:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic
      type: object
      required:
        - collectionId
        - name
        - contentType
        - fileSizeBytes
        - contentHash
      title: ConfirmUploadRequest
      description: >-
        Request schema for confirming a document upload after S3 upload
        succeeds.


        This is used in the "presigned URL first" pattern where:

        1. Client gets presigned URL (no DB record created)

        2. Client uploads file to S3

        3. Client calls confirm-upload with this request to create the DB record


        The server derives the S3 key from upload_key and name:

        {user_id}/{upload_key}_{name}


        On the idempotent retry path (the failed-doc retry button), the client

        omits upload_key because no new S3 upload happened; the server uses the

        existing ContentBlob's filepath to re-queue processing.
    ContentBlobData:
      properties:
        content_hash:
          type: string
          title: Content Hash
        filepath:
          type: string
          title: Filepath
        topic:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic
        author:
          anyOf:
            - type: string
            - type: 'null'
          title: Author
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        processing_metadata:
          anyOf:
            - $ref: '#/components/schemas/DocumentProcessingData'
            - type: 'null'
        chunks:
          items:
            $ref: '#/components/schemas/DocumentChunkData'
          type: array
          title: Chunks
          default: []
      type: object
      required:
        - content_hash
        - filepath
      title: ContentBlobData
      description: |-
        Minimal Pydantic representation of a ContentBlob row.

        This schema exists to satisfy BaseRepository's generic schema_type
        requirement when callers instantiate BaseRepository directly against
        ContentBlob. The processing pipeline consumes ORM models directly, so
        it carries only the columns that callers actually read off a blob.
    CreateCollectionRequest:
      properties:
        name:
          type: string
          title: Name
        parentCollectionId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parentcollectionid
      type: object
      required:
        - name
      title: CreateCollectionRequest
      description: |-
        Request schema for creating a collection.

        Args:
            name (str): Name for the new collection.
            parent_collection_id (UUID | None): Parent collection ID, or None to
                create the collection at root level.
    CreateDocumentRequest:
      properties:
        collectionId:
          type: string
          format: uuid
          title: Collectionid
        name:
          type: string
          title: Name
        content:
          anyOf:
            - type: string
            - type: string
              contentMediaType: application/octet-stream
          title: Content
        contentType:
          type: string
          title: Contenttype
          default: text/plain
        topic:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic
      type: object
      required:
        - collectionId
        - name
        - content
      title: CreateDocumentRequest
      description: |-
        Request schema for creating a document directly from text content.

        Server-side alternative to the presigned-URL upload flow: the caller
        supplies the document body inline and the server writes it to S3 and
        triggers processing. Used by callers that already hold the content as
        text, such as an agent persisting web search results as a document.

        Content-addressed deduplication still applies: identical text uploaded
        again by the same user into the same collection reuses the existing
        document and its chunks.
    CreateResourceApprovalRequest:
      properties:
        note:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Note
        submissionNote:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Submissionnote
        resourceType:
          $ref: '#/components/schemas/ApprovalResourceType'
        resourceId:
          type: string
          format: uuid
          title: Resourceid
        extraApprovalData:
          anyOf:
            - $ref: '#/components/schemas/TokenIncreaseRequest'
            - $ref: '#/components/schemas/StorageIncreaseRequest'
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extraapprovaldata
      type: object
      required:
        - resourceType
        - resourceId
      title: CreateResourceApprovalRequest
      description: |-
        Request schema for submitting a resource for approval.

        Attributes:
            submission_note: Optional note explaining the approval request.
            resource_type: The kind of resource being submitted.
            resource_id: The ID of the resource being submitted.
            extra: Extra information to include in the request,
                e.g. user_storage_limit
    DocumentBaseData:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        name:
          type: string
          title: Name
        filepath:
          type: string
          title: Filepath
        contentType:
          type: string
          title: Contenttype
        contentHash:
          type: string
          title: Contenthash
        fileSizeBytes:
          type: integer
          title: Filesizebytes
        author:
          type: string
          title: Author
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        collectionId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Collectionid
        isPublic:
          type: boolean
          title: Ispublic
          default: false
        topic:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic
        revision:
          type: integer
          title: Revision
          default: 0
        chunkCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Chunkcount
      type: object
      required:
        - name
        - filepath
        - contentType
        - contentHash
        - fileSizeBytes
        - author
      title: DocumentBaseData
    DocumentChunkData:
      properties:
        documentName:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentname
        documentAuthor:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentauthor
        documentTopic:
          anyOf:
            - type: string
            - type: 'null'
          title: Documenttopic
        documentCollectionId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Documentcollectionid
        documentOrganizationId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Documentorganizationid
        documentIsPublic:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Documentispublic
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        content:
          type: string
          title: Content
        chunkIndex:
          type: integer
          title: Chunkindex
          default: 0
        sectionTitle:
          type: string
          title: Sectiontitle
        similarityScore:
          anyOf:
            - type: number
            - type: 'null'
          title: Similarityscore
        isContextChunk:
          type: boolean
          title: Iscontextchunk
          default: false
        neighborSimilarityScore:
          anyOf:
            - type: number
            - type: 'null'
          title: Neighborsimilarityscore
        documentId:
          type: string
          title: Documentid
        startChar:
          type: integer
          title: Startchar
        endChar:
          type: integer
          title: Endchar
        pageNumber:
          type: integer
          title: Pagenumber
        embeddingVector:
          anyOf:
            - $ref: '#/components/schemas/Vector'
            - type: 'null'
        chunkSize:
          type: integer
          title: Chunksize
          default: 500
        overlapSize:
          type: integer
          title: Overlapsize
          default: 25
        precedingChunkId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Precedingchunkid
        followingChunkId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Followingchunkid
      type: object
      required:
        - content
        - sectionTitle
        - documentId
        - startChar
        - endChar
        - pageNumber
      title: DocumentChunkData
    DocumentChunksResponse:
      properties:
        chunks:
          items:
            $ref: '#/components/schemas/ReviewChunkData'
          type: array
          title: Chunks
        totalCount:
          type: integer
          title: Totalcount
      type: object
      required:
        - chunks
        - totalCount
      title: DocumentChunksResponse
      description: |-
        Paginated response for document chunks in admin review.

        Attributes:
            chunks: List of chunk data for the current page.
            total_count: Total number of chunks for the document.
    DocumentCollectionData:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        name:
          type: string
          title: Name
        depth:
          type: integer
          title: Depth
          default: 0
        documentCount:
          type: integer
          title: Documentcount
        parentCollectionId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parentcollectionid
        public:
          type: boolean
          title: Public
          default: false
        locked:
          type: boolean
          title: Locked
          default: false
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
        createdAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createdat
        updatedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updatedat
        organizationId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organizationid
        documents:
          anyOf:
            - items:
                $ref: '#/components/schemas/DocumentBaseData'
              type: array
            - type: 'null'
          title: Documents
          default: []
        childCollections:
          anyOf:
            - items:
                $ref: '#/components/schemas/DocumentCollectionData'
              type: array
            - type: 'null'
          title: Childcollections
          default: []
      type: object
      required:
        - name
        - documentCount
      title: DocumentCollectionData
    DocumentCollectionsResponse:
      properties:
        documents:
          items:
            $ref: '#/components/schemas/DocumentBaseData'
          type: array
          title: Documents
          default: []
        collections:
          items:
            $ref: '#/components/schemas/DocumentCollectionData'
          type: array
          title: Collections
          default: []
      type: object
      title: DocumentCollectionsResponse
    DocumentContentResponse:
      properties:
        content:
          type: string
          title: Content
      type: object
      required:
        - content
      title: DocumentContentResponse
    DocumentCreatedResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        collectionId:
          type: string
          format: uuid
          title: Collectionid
        contentType:
          type: string
          title: Contenttype
        fileSizeBytes:
          type: integer
          title: Filesizebytes
        filepath:
          anyOf:
            - type: string
            - type: 'null'
          title: Filepath
        chunkCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Chunkcount
      type: object
      required:
        - id
        - name
        - collectionId
        - contentType
        - fileSizeBytes
      title: DocumentCreatedResponse
      description: Response model for document creation and upload confirmation.
    DocumentData:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        name:
          type: string
          title: Name
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        collectionId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Collectionid
        isPublic:
          type: boolean
          title: Ispublic
          default: false
        organizationId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organizationid
        createdAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createdat
        updatedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updatedat
        deletedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deletedat
        archived:
          type: boolean
          title: Archived
          default: false
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
        revisions:
          items:
            $ref: '#/components/schemas/DocumentRevisionData'
          type: array
          title: Revisions
          default: []
      type: object
      required:
        - name
      title: DocumentData
      description: Flat Pydantic representation of a Document row.
    DocumentProcessingData:
      properties:
        content_blob_id:
          type: string
          title: Content Blob Id
        chunk_count:
          type: integer
          title: Chunk Count
        total_tokens:
          type: integer
          title: Total Tokens
        embedding_model:
          type: string
          title: Embedding Model
        chunking_strategy:
          type: string
          title: Chunking Strategy
        quality_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Quality Score
        relevance_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Relevance Score
      type: object
      required:
        - content_blob_id
        - chunk_count
        - total_tokens
        - embedding_model
        - chunking_strategy
      title: DocumentProcessingData
    DocumentRetrievalResult:
      properties:
        documentName:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentname
        documentAuthor:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentauthor
        documentTopic:
          anyOf:
            - type: string
            - type: 'null'
          title: Documenttopic
        documentCollectionId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Documentcollectionid
        documentOrganizationId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Documentorganizationid
        documentIsPublic:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Documentispublic
        documentSummary:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentsummary
        relevanceScore:
          anyOf:
            - type: number
            - type: 'null'
          title: Relevancescore
        sections:
          items:
            type: string
          type: array
          title: Sections
          default: []
        chunks:
          items:
            $ref: '#/components/schemas/RetrievalChunkData'
          type: array
          title: Chunks
          default: []
      type: object
      title: DocumentRetrievalResult
      description: >-
        A single document's retrieval result, grouping all chunks under shared
        metadata.


        One instance is produced per unique document in a retrieval response.
        Chunks

        are sorted by chunk_index for coherent passage ordering. The
        relevance_score

        and sections fields are pre-aggregated from seed chunks only (context
        chunks

        are structural neighbors, not direct semantic matches).


        Attributes:
            document_name: Human-readable document name.
            document_author: Document author.
            document_topic: Topic classification of the document.
            document_summary: A generated summary of the document.
            document_collection_id: Collection the document belongs to.
            document_organization_id: Identifier of the organization that owns the document.
            document_is_public: Whether the document is publicly accessible.
            relevance_score: The highest similarity score among all seed chunks
                for this document (0-1 for cosine similarity).
            sections: Deduplicated section titles from seed chunks, in encounter order.
            chunks: All chunks (seed + context) for this document, sorted by chunk_index.

        Example:
            ```python
            result = DocumentRetrievalResult(
                document_name="NRC Safety Report 2024",
                document_author="Jane Smith",
                relevance_score=0.87,
                sections=["Introduction", "Section 4.2 Analysis"],
                chunks=[...],
            )
            ```
    DocumentRevisionData:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        document_id:
          type: string
          format: uuid
          title: Document Id
        content_hash:
          type: string
          title: Content Hash
        content_type:
          type: string
          title: Content Type
        file_size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: File Size Bytes
        revision:
          type: integer
          title: Revision
          default: 0
        is_active:
          type: boolean
          title: Is Active
          default: true
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        deleted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deleted At
        archived:
          type: boolean
          title: Archived
          default: false
        content:
          anyOf:
            - $ref: '#/components/schemas/ContentBlobData'
            - type: 'null'
      type: object
      required:
        - document_id
        - content_hash
        - content_type
      title: DocumentRevisionData
      description: Flat Pydantic representation of a DocumentRevision row.
    PermissionLevel:
      type: string
      enum:
        - read
        - write
        - admin
      title: PermissionLevel
    PresignedUploadResponse:
      properties:
        presignedUrl:
          type: string
          title: Presignedurl
        uploadKey:
          type: string
          title: Uploadkey
      type: object
      required:
        - presignedUrl
        - uploadKey
      title: PresignedUploadResponse
    RetrievalChunkData:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        content:
          type: string
          title: Content
        chunkIndex:
          type: integer
          title: Chunkindex
        sectionTitle:
          type: string
          title: Sectiontitle
        similarityScore:
          anyOf:
            - type: number
            - type: 'null'
          title: Similarityscore
        isContextChunk:
          type: boolean
          title: Iscontextchunk
          default: false
        neighborSimilarityScore:
          anyOf:
            - type: number
            - type: 'null'
          title: Neighborsimilarityscore
      type: object
      required:
        - content
        - chunkIndex
        - sectionTitle
      title: RetrievalChunkData
      description: >-
        A single document chunk without document-level metadata.


        This is the normalized chunk representation used within grouped
        retrieval

        responses. Document metadata lives on the parent DocumentRetrievalResult

        rather than being duplicated on every chunk.


        Attributes:
            id: Unique chunk identifier.
            content: The text content of the chunk.
            section_title: The title of the section this chunk belongs to.
            chunk_index: Sequential index of this chunk within the document.
            similarity_score: The retrieval similarity score (seed chunks only).
            is_context_chunk: Whether this chunk was added via contextual expansion.
            neighbor_similarity_score: The inter-chunk similarity that caused this
                context chunk to be included during expansion.
    ReviewChunkData:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        content:
          type: string
          title: Content
        chunkIndex:
          type: integer
          title: Chunkindex
        sectionTitle:
          type: string
          title: Sectiontitle
        pageNumber:
          anyOf:
            - type: integer
            - type: 'null'
          title: Pagenumber
      type: object
      required:
        - content
        - chunkIndex
        - sectionTitle
      title: ReviewChunkData
      description: |-
        A single chunk for admin review, excluding embedding vectors.

        Attributes:
            id: Unique chunk identifier.
            content: The text content of the chunk.
            chunk_index: Sequential index of this chunk within the document.
            page_number: Page number in the original document.
            section_title: The title of the section this chunk belongs to.
    SearchResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/SearchResult'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
        query:
          type: string
          title: Query
      type: object
      required:
        - items
        - query
      title: SearchResponse
      description: |-
        Envelope for the search endpoint.

        Attributes:
            query: The query string the caller submitted.
    SearchResult:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        type:
          type: string
          enum:
            - collection
            - document
          title: Type
        path:
          type: string
          title: Path
        collectionId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Collectionid
      type: object
      required:
        - id
        - name
        - type
        - path
      title: SearchResult
      description: |-
        A single search hit, either a collection or a document.

        Attributes:
            id (UUID): The matched item's id.
            name (str): The matched item's display name.
            type (Literal["collection", "document"]): "collection" or "document".
            path (str): Slash-joined breadcrumb that includes the matched item itself
                (e.g. /Engineering/Backend/API or
                /Engineering/Backend/API/spec.pdf).
            collection_id (UUID | None): The parent collection id; populated for
                documents only.
    ShareData:
      properties:
        permissionLevel:
          anyOf:
            - $ref: '#/components/schemas/PermissionLevel'
            - type: 'null'
        status:
          anyOf:
            - $ref: '#/components/schemas/ShareStatus'
            - type: 'null'
        expires:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        sharedWithId:
          type: string
          title: Sharedwithid
        resourceId:
          type: string
          format: uuid
          title: Resourceid
        shareType:
          $ref: '#/components/schemas/ShareType'
        id:
          anyOf:
            - type: string
              format: uuid
            - type: string
          title: Id
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - sharedWithId
        - resourceId
        - shareType
        - id
        - createdAt
        - updatedAt
      title: ShareData
      description: |-
        Full data representation.
        Inherits from share create.

        Attributes:
            id: The share entity id
            share_type: The type of resource being shared
            created_at: When it was created
            updated_at: When it was updated.
    ShareRequest:
      properties:
        sharedWithId:
          type: string
          title: Sharedwithid
        permissionLevel:
          $ref: '#/components/schemas/PermissionLevel'
        expires:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires
      type: object
      required:
        - sharedWithId
        - permissionLevel
      title: ShareRequest
      description: |-
        Request schema for sharing a resource with a single user.

        The target resource id comes from the route path, not this body.

        Attributes:
            shared_with_id (str): The user id to grant access to.
            permission_level (PermissionLevel): The access level to grant (read, write, admin).
            expires (datetime | None): Optional expiration timestamp for the grant.
    ShareStatus:
      type: string
      enum:
        - active
        - revoked
        - pending
        - rejected
        - expired
      title: ShareStatus
    ShareType:
      type: string
      enum:
        - document
        - document_collection
        - conversation
        - workflow
        - agent
        - tool
        - instruction
        - project
      title: ShareType
      description: |-
        Identifies the type of resource being shared.

        Each member's value is the wire-format string stored in the database
        share_type column and used as the polymorphic discriminator.

        The label property returns a human-readable form suitable for
        user-facing notification text.

        Example:
            >>> ShareType.WORKFLOW.label
            'workflow'
            >>> ShareType.COLLECTION.label
            'collection'
    SharedDocumentCollectionData:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        name:
          type: string
          title: Name
        depth:
          type: integer
          title: Depth
          default: 0
        documentCount:
          type: integer
          title: Documentcount
        parentCollectionId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parentcollectionid
        public:
          type: boolean
          title: Public
          default: false
        locked:
          type: boolean
          title: Locked
          default: false
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
        createdAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createdat
        updatedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updatedat
        organizationId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organizationid
        documents:
          anyOf:
            - items:
                $ref: '#/components/schemas/DocumentBaseData'
              type: array
            - type: 'null'
          title: Documents
          default: []
        childCollections:
          anyOf:
            - items:
                $ref: '#/components/schemas/DocumentCollectionData'
              type: array
            - type: 'null'
          title: Childcollections
          default: []
        permissionLevel:
          type: string
          title: Permissionlevel
        sharedByUserId:
          type: string
          title: Sharedbyuserid
      type: object
      required:
        - name
        - documentCount
        - permissionLevel
        - sharedByUserId
      title: SharedDocumentCollectionData
      description: |-
        Extends DocumentCollectionData with sharing metadata.

        Used to represent collections that have been explicitly shared
        with the current user via the shares table.

        Attributes:
            permission_level: The share's permission level (e.g. 'read', 'write').
            shared_by_user_id: The user ID of the person who shared the collection.
    SimilarityMetric:
      type: string
      enum:
        - cosine
        - l2
        - inner_product
      title: SimilarityMetric
      description: >-
        Supported similarity metrics for vector retrieval.


        Each metric utilizes a corresponding HNSW index on the document_chunks
        table.


        Attributes:
            COSINE: Cosine similarity (1 - cosine_distance). Range: [-1, 1], typically [0, 1]
                for normalized vectors. Best for semantic similarity when vector magnitude
                should be ignored.
            L2: Euclidean (L2) distance converted to similarity (1 / (1 + l2_distance)).
                Range: [0, 1]. Considers both direction and magnitude.
            INNER_PRODUCT: Negative inner product distance for maximum inner product search.
                Range varies by embedding magnitude. Useful for embeddings trained with
                dot product objectives.
    UnshareRequest:
      properties:
        sharedWithId:
          type: string
          title: Sharedwithid
      type: object
      required:
        - sharedWithId
      title: UnshareRequest
      description: |-
        Request schema for revoking a single user's share of a resource.

        The target resource id comes from the route path, not this body.

        Attributes:
            shared_with_id (str): The user id whose access should be revoked.
    UpdateCollectionRequest:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
          title: Name
          description: New name for the collection
        reparent:
          type: boolean
          title: Reparent
          description: >-
            Whether to change the collection's parent. When true,
            parent_collection_id is the new parent (None moves to root). When
            false (default), parent_collection_id is ignored.
          default: false
        parentCollectionId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parentcollectionid
          description: New parent collection ID when reparent is true; None moves to root.
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
          description: New owner ID for sharing/reassignment
      type: object
      title: UpdateCollectionRequest
      description: |-
        Request schema for updating a collection.

        Collection ID is passed via route path, not body.
        Service layer handles validation and logic based on what data is passed.
        All fields are optional - only provided fields will be updated.

        Args:
            name (Optional[str]): New name for the collection.
            reparent (bool): Whether to move the collection to a new parent. When
                false (default), parent_collection_id is ignored and the parent is
                left unchanged.
            parent_collection_id (Optional[UUID]): The new parent when reparent is
                true; None moves the collection to root.
            owner_id (Optional[str]): New owner ID for sharing/reassignment/management.
    UpdateDocumentRequest:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        isPublic:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ispublic
        collectionId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Collectionid
      type: object
      title: UpdateDocumentRequest
      description: >-
        Request schema for updating document metadata and/or moving to a
        different collection.


        Supports partial updates - only provided fields will be updated.

        If collection_id is provided, the document will be moved to that
        collection.


        Note: topic and author are intrinsic to the file content and live on

        ContentBlob, so they are not updatable via this endpoint.
    Vector:
      items:
        type: number
      type: array
    APIListModel_ConsumptionEventData_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ConsumptionEventData'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[ConsumptionEventData]
    APIListModel_ConversationData_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ConversationData'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[ConversationData]
    APIListModel_MetricSurplusEventData_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/MetricSurplusEventData'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[MetricSurplusEventData]
    APIListModel_ProjectData_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ProjectData'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[ProjectData]
    APIListModel_TemplateData_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/TemplateData'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[TemplateData]
    APIListModel_TokenTimelineSeries_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/TokenTimelineSeries'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[TokenTimelineSeries]
    APIListModel_Union_AgentData_Sparse__:
      properties:
        items:
          items:
            anyOf:
              - $ref: '#/components/schemas/AgentData'
              - $ref: >-
                  #/components/schemas/app__schemas__domain__agents__agent__AgentData__Sparse
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[Union[AgentData, AgentData.Sparse]]
    APIListModel_Union_InstructionData_Sparse__:
      properties:
        items:
          items:
            anyOf:
              - $ref: '#/components/schemas/InstructionData'
              - $ref: >-
                  #/components/schemas/app__schemas__domain__agents__instruction__InstructionData__Sparse
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[Union[InstructionData, InstructionData.Sparse]]
    APIListModel_Union_ToolData_Sparse__:
      properties:
        items:
          items:
            anyOf:
              - $ref: '#/components/schemas/ToolData'
              - $ref: >-
                  #/components/schemas/app__schemas__domain__agents__tool__ToolData__Sparse
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: APIListModel[Union[ToolData, ToolData.Sparse]]
    AgentCreate:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        displayName:
          type: string
          maxLength: 255
          minLength: 1
          title: Displayname
        description:
          type: string
          maxLength: 1024
          minLength: 1
          title: Description
        version:
          type: integer
          title: Version
        isLatestVersion:
          type: boolean
          title: Islatestversion
        modelId:
          type: string
          minLength: 1
          title: Modelid
          default: anthropic.haiku
        modelVersion:
          type: string
          minLength: 1
          title: Modelversion
          default: bedrock-2023-05-31
        maxTokens:
          type: integer
          maximum: 1000000
          minimum: 1
          title: Maxtokens
          default: 8192
        temperature:
          type: number
          maximum: 2
          minimum: 0
          title: Temperature
          default: 0.7
        topP:
          type: number
          maximum: 1
          minimum: 0
          title: Topp
          default: 1
        topK:
          type: integer
          maximum: 100
          minimum: 1
          title: Topk
          default: 50
        acceptType:
          type: string
          title: Accepttype
          default: application/json
        contentType:
          type: string
          title: Contenttype
          default: application/json
        visible:
          $ref: '#/components/schemas/AgentVisibility'
          default: private
        mutable:
          type: boolean
          title: Mutable
          default: true
        enhancedReasoning:
          type: boolean
          title: Enhancedreasoning
          default: false
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        instructionAssociations:
          items:
            $ref: '#/components/schemas/InstructionAssociation'
          type: array
          title: Instructionassociations
        toolIds:
          items:
            type: string
            format: uuid
          type: array
          title: Toolids
        tags:
          items:
            type: string
          type: array
          title: Tags
      type: object
      required:
        - name
        - description
        - version
        - isLatestVersion
      title: AgentCreate
      description: |-
        Schema for creating a new agent.

        Extends the base schema with optional owner, instruction, and tool
        associations that can be set during creation.

        Attributes:
            name: Human-readable name for the agent.
            description: Detailed description of the agent's purpose.
            model_id: Identifier of the AI model to use.
            model_version: Version of the AI model.
            max_tokens: Maximum number of tokens for model responses.
            temperature: Sampling temperature for response generation.
            top_p: Nucleus sampling parameter.
            top_k: Top-k sampling parameter.
            accept_type: MIME type for accepted responses.
            content_type: MIME type for request content.
            visible: Visibility level of the agent.
            mutable: Whether the agent can be modified.
            owner_id: Optional owner identifier.
            instruction_ids: List of instruction UUIDs to attach to the agent.
            tool_ids: List of tool UUIDs to attach to the agent.
            tags: Optional list of tags to attach to the agent.
    AgentData:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        displayName:
          type: string
          maxLength: 255
          minLength: 1
          title: Displayname
        description:
          type: string
          maxLength: 1024
          minLength: 1
          title: Description
        version:
          type: integer
          title: Version
        isLatestVersion:
          type: boolean
          title: Islatestversion
        modelId:
          type: string
          minLength: 1
          title: Modelid
          default: anthropic.haiku
        modelVersion:
          type: string
          minLength: 1
          title: Modelversion
          default: bedrock-2023-05-31
        maxTokens:
          type: integer
          maximum: 1000000
          minimum: 1
          title: Maxtokens
          default: 8192
        temperature:
          type: number
          maximum: 2
          minimum: 0
          title: Temperature
          default: 0.7
        topP:
          type: number
          maximum: 1
          minimum: 0
          title: Topp
          default: 1
        topK:
          type: integer
          maximum: 100
          minimum: 1
          title: Topk
          default: 50
        acceptType:
          type: string
          title: Accepttype
          default: application/json
        contentType:
          type: string
          title: Contenttype
          default: application/json
        visible:
          $ref: '#/components/schemas/AgentVisibility'
          default: private
        mutable:
          type: boolean
          title: Mutable
          default: true
        id:
          type: string
          format: uuid
          title: Id
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        useCache:
          type: boolean
          title: Usecache
          default: false
        permissionLevel:
          anyOf:
            - $ref: '#/components/schemas/PermissionLevel'
            - type: 'null'
        sharedByUserId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sharedbyuserid
        agentInstructions:
          items:
            $ref: '#/components/schemas/AgentInstructionData'
          type: array
          title: Agentinstructions
        tools:
          items:
            $ref: '#/components/schemas/ToolData'
          type: array
          title: Tools
        tags:
          items:
            type: string
          type: array
          title: Tags
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
        enhancedReasoning:
          type: boolean
          title: Enhancedreasoning
          description: Derive the enhanced reasoning flag from the stored model_id.
          readOnly: true
      type: object
      required:
        - name
        - description
        - version
        - isLatestVersion
        - id
        - enhancedReasoning
      title: AgentData
      description: |-
        Full agent representation returned from API responses.

        Includes all base fields plus database-generated fields like id,
        timestamps, and relationships. Supports ORM integration for seamless
        conversion from database entities.

        Attributes:
            id: Unique identifier for the agent.
            name: Human-readable name for the agent.
            description: Detailed description of the agent's purpose.
            model_id: Identifier of the AI model to use.
            model_version: Version of the AI model.
            max_tokens: Maximum number of tokens for model responses.
            temperature: Sampling temperature for response generation.
            top_p: Nucleus sampling parameter.
            top_k: Top-k sampling parameter.
            accept_type: MIME type for accepted responses.
            content_type: MIME type for request content.
            visible: Visibility level of the agent.
            mutable: Whether the agent can be modified.
            owner_id: Identifier of the agent's owner.
            agent_instructions: List of agent-instruction associations with
                per-agent guideline exclusions.
            tools: List of tools attached to this agent.
            tags: List of tag names attached to this agent.
            permission_level: The caller's share permission level, populated only
                on reads for an agent shared with them; None for owned,
                organization, and system agents. Ignored on the write path.
            shared_by_user_id: The id of the user who shared the agent with the
                caller, populated alongside permission_level.
            created_at: Timestamp when the agent was created.
            updated_at: Timestamp when the agent was last modified.
    AgentInstructionData:
      properties:
        instruction:
          $ref: '#/components/schemas/InstructionData'
        excludedGuidelines:
          items:
            type: string
          type: array
          title: Excludedguidelines
      type: object
      required:
        - instruction
      title: AgentInstructionData
      description: |-
        Schema representing the association between an agent and an instruction,
        including any guideline exclusions specific to this agent.

        This schema captures the per-agent customization of an instruction by
        identifying which guidelines should be excluded when the instruction
        is rendered for this particular agent.

        Attributes:
            instruction: The full instruction data.
            excluded_guidelines: List of guideline names excluded for this agent.

        Example:
            An agent using the "safety" instruction but excluding the
            "traceability" guideline::

                AgentInstructionData(
                    instruction=safety_instruction,
                    excluded_guidelines=["traceability"],
                )
    AgentType:
      type: string
      enum:
        - core
        - software
        - engineering
        - summarization
        - reasoning
        - cot
        - compute
        - generate_title
        - generate_tool_reference
        - cli
      title: AgentType
    AgentUpdate:
      properties:
        enhancedReasoning:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enhancedreasoning
        displayName:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Displayname
        description:
          anyOf:
            - type: string
              maxLength: 1024
              minLength: 1
            - type: 'null'
          title: Description
        modelId:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Modelid
        modelVersion:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Modelversion
        maxTokens:
          anyOf:
            - type: integer
              maximum: 1000000
              minimum: 1
            - type: 'null'
          title: Maxtokens
        temperature:
          anyOf:
            - type: number
              maximum: 2
              minimum: 0
            - type: 'null'
          title: Temperature
        topP:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Topp
        topK:
          anyOf:
            - type: integer
              maximum: 100
              minimum: 1
            - type: 'null'
          title: Topk
        acceptType:
          anyOf:
            - type: string
            - type: 'null'
          title: Accepttype
        contentType:
          anyOf:
            - type: string
            - type: 'null'
          title: Contenttype
        visible:
          anyOf:
            - $ref: '#/components/schemas/AgentVisibility'
            - type: 'null'
        mutable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Mutable
        instructionAssociations:
          items:
            $ref: '#/components/schemas/InstructionAssociation'
          type: array
          title: Instructionassociations
        toolIds:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Toolids
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
      type: object
      title: AgentUpdate
      description: |-
        Schema for updating an existing agent.

        All fields are optional to support partial updates. Only provided
        fields will be updated on the agent.

        Attributes:
            name: Optional new name for the agent.
            description: Optional new description.
            model_id: Optional new model identifier.
            model_version: Optional new model version.
            max_tokens: Optional new max tokens value.
            temperature: Optional new temperature value.
            top_p: Optional new top_p value.
            top_k: Optional new top_k value.
            accept_type: Optional new accept type.
            content_type: Optional new content type.
            visible: Optional new visibility level.
            mutable: Optional new mutability flag.
            instruction_ids: Optional new list of instruction UUIDs (replaces existing).
            tool_ids: Optional new list of tool UUIDs (replaces existing).
            tags: Optional new list of tags (replaces existing).
    AgentVisibility:
      type: string
      enum:
        - internal
        - system
        - private
        - public
      title: AgentVisibility
      description: |-
        Enumeration defining categories for visibility of
        Agents, Instructions, Tools, etc.

        Attributes:
            INTERNAL: Open to only the system. Written internally and not able to be viewed.
                        Used to protect privacy of core system instructions from the users.
            SYSTEM: System-owned agent visible to all users for selection in the chat modal.
                    Immutable. Cannot be modified by end users.
            PRIVATE: Open to only the owner.
            PUBLIC: Open to all users, all users can view and reference.
    AttachmentData-Input:
      properties:
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        contextType:
          type: string
          title: Contexttype
          default: attachment
        id:
          anyOf:
            - type: string
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        explanation:
          anyOf:
            - type: string
            - type: 'null'
          title: Explanation
        fileSize:
          type: integer
          title: Filesize
        fileType:
          type: string
          title: Filetype
        origin:
          anyOf:
            - type: string
            - type: 'null'
          title: Origin
          default: user_upload
        contentHash:
          anyOf:
            - type: string
            - type: 'null'
          title: Contenthash
        tokenCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tokencount
        uniqueKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Uniquekey
        parentMessageId:
          anyOf:
            - type: string
            - type: 'null'
          title: Parentmessageid
        parentConversationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Parentconversationid
        uploaderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Uploaderid
        pageStats:
          anyOf:
            - $ref: '#/components/schemas/PageExtractionStats'
            - type: 'null'
      type: object
      required:
        - fileSize
        - fileType
      title: AttachmentData
      description: >-
        Pydantic model representing a file attachment in a chat conversation.


        This class extends ContextItem to provide attachment-specific
        functionality

        including content hashing, ORM entity conversion, and XML block
        formatting

        for inclusion in inference prompts.


        Attributes:
            context_type: Identifier for the context type, always "attachment".
            file_size: Size of the original file in bytes.
            file_type: MIME type of the file (e.g., "application/pdf", "image/png").
            origin: Source of the attachment. Defaults to "user_upload".
            content_hash: SHA-1 hash of the content for deduplication and integrity.
                Automatically generated if not provided.
            token_count: Estimated token count for the attachment content.
                Used for context window management.
            parent_message_id: UUID of the message this attachment belongs to.
            parent_conversation_id: UUID of the conversation containing this attachment.
            uploader_id: Identifier of the user who uploaded the attachment.
            page_stats: Per-page text yield reported by the parser for paginated
                formats. Extraction detail rather than attachment state, so it is
                excluded from serialization and never persisted; it exists so
                `needs_ocr` can tell a partially scanned document from a clean one.

        Example:
            Creating and persisting an attachment::

                attachment = AttachmentData(
                    title="report.pdf",
                    content="Extracted text from PDF...",
                    file_size=2048,
                    file_type="application/pdf",
                )

                # Generate XML block for inference
                xml_block = attachment.attachment_block

                # Convert to database entity
                db_entity = attachment.to_entity()
    AttachmentData-Output:
      properties:
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        contextType:
          type: string
          title: Contexttype
          default: attachment
        id:
          anyOf:
            - type: string
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        explanation:
          anyOf:
            - type: string
            - type: 'null'
          title: Explanation
        fileSize:
          type: integer
          title: Filesize
        fileType:
          type: string
          title: Filetype
        origin:
          anyOf:
            - type: string
            - type: 'null'
          title: Origin
          default: user_upload
        contentHash:
          anyOf:
            - type: string
            - type: 'null'
          title: Contenthash
        tokenCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tokencount
        uniqueKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Uniquekey
        parentMessageId:
          anyOf:
            - type: string
            - type: 'null'
          title: Parentmessageid
        parentConversationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Parentconversationid
        uploaderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Uploaderid
      type: object
      required:
        - fileSize
        - fileType
      title: AttachmentData
      description: >-
        Pydantic model representing a file attachment in a chat conversation.


        This class extends ContextItem to provide attachment-specific
        functionality

        including content hashing, ORM entity conversion, and XML block
        formatting

        for inclusion in inference prompts.


        Attributes:
            context_type: Identifier for the context type, always "attachment".
            file_size: Size of the original file in bytes.
            file_type: MIME type of the file (e.g., "application/pdf", "image/png").
            origin: Source of the attachment. Defaults to "user_upload".
            content_hash: SHA-1 hash of the content for deduplication and integrity.
                Automatically generated if not provided.
            token_count: Estimated token count for the attachment content.
                Used for context window management.
            parent_message_id: UUID of the message this attachment belongs to.
            parent_conversation_id: UUID of the conversation containing this attachment.
            uploader_id: Identifier of the user who uploaded the attachment.
            page_stats: Per-page text yield reported by the parser for paginated
                formats. Extraction detail rather than attachment state, so it is
                excluded from serialization and never persisted; it exists so
                `needs_ocr` can tell a partially scanned document from a clean one.

        Example:
            Creating and persisting an attachment::

                attachment = AttachmentData(
                    title="report.pdf",
                    content="Extracted text from PDF...",
                    file_size=2048,
                    file_type="application/pdf",
                )

                # Generate XML block for inference
                xml_block = attachment.attachment_block

                # Convert to database entity
                db_entity = attachment.to_entity()
    BatchDeleteConversationsRequest:
      properties:
        conversationIds:
          items:
            type: string
          type: array
          maxItems: 200
          minItems: 1
          title: Conversationids
      type: object
      required:
        - conversationIds
      title: BatchDeleteConversationsRequest
      description: >-
        Request body for deleting multiple conversations in a single atomic
        operation.


        Attributes:
            conversation_ids (list[str]): IDs of conversations to soft-delete.
                Must contain at least one id; capped at 200 per request.
    Body_ForkConversation:
      properties:
        conversationId:
          type: string
          title: Conversationid
      type: object
      required:
        - conversationId
      title: Body_ForkConversation
    BulkGetUserMetricsConfigurationResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/UserMetricsConfigurationData'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
        offset:
          type: integer
          minimum: 0
          title: Offset
          description: Current offset in the result set
        limit:
          type: integer
          minimum: 1
          title: Limit
          description: Maximum number of results returned
      type: object
      required:
        - items
        - offset
        - limit
      title: BulkGetUserMetricsConfigurationResponse
      description: |-
        Response model for bulk retrieval of user metrics configurations.
        Extends generic list response.

        Args:
            offset: Current offset in the result set.
            limit: Maximum number of results returned.
    BulkUpdateUserConfigurationResult:
      properties:
        userId:
          type: string
          title: Userid
          description: The user's ID
        success:
          type: boolean
          title: Success
          description: Whether the update succeeded
        configuration:
          anyOf:
            - $ref: '#/components/schemas/UserMetricsConfigurationData'
            - type: 'null'
          description: The updated configuration if successful
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Error message if the update failed
      type: object
      required:
        - userId
        - success
      title: BulkUpdateUserConfigurationResult
      description: |-
        Result for a single user configuration update in a bulk operation.

        Args:
            user_id: The user's ID.
            success: Whether the update succeeded.
            configuration: The updated configuration if successful.
            error: Error message if the update failed.
    BulkUpdateUserMetricsConfigurationRequest:
      properties:
        userIds:
          anyOf:
            - items:
                type: string
              type: array
              minItems: 1
            - type: 'null'
          title: Userids
          description: List of user IDs to update. Omit to update all users.
        shortPeriodScaledTokenLimit:
          anyOf:
            - type: integer
              maximum: 50000000
              minimum: 0
            - type: 'null'
          title: Shortperiodscaledtokenlimit
          description: Scaled token limit for the short period (4 hours)
        userStorageLimit:
          anyOf:
            - type: integer
              maximum: 1099511627776
              minimum: 0
            - type: 'null'
          title: Userstoragelimit
          description: Storage limit in bytes for the user
      type: object
      title: BulkUpdateUserMetricsConfigurationRequest
      description: >-
        Request model for bulk updating user metrics configurations.


        Applies a single uniform configuration to targeted users.

        When ``user_ids`` is provided, only those users are updated.

        When ``user_ids`` is omitted, all users are updated (requires
        super_admin).


        Args:
            user_ids: Optional list of user IDs to update. When None, all users are updated.
            short_period_scaled_token_limit: Scaled token limit for the short period (4 hours).
            user_storage_limit: Storage limit in bytes for the user.
    BulkUpdateUserMetricsConfigurationResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/BulkUpdateUserConfigurationResult'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
        successCount:
          type: integer
          minimum: 0
          title: Successcount
          description: Number of successful updates
        failureCount:
          type: integer
          minimum: 0
          title: Failurecount
          description: Number of failed updates
      type: object
      required:
        - items
        - successCount
        - failureCount
      title: BulkUpdateUserMetricsConfigurationResponse
      description: |-
        Response model for bulk updating user metrics configurations.
        Extends Generic API list response.

        Args:
            success_count: Number of successful updates.
            failure_count: Number of failed updates.
    ChangeConversationProject:
      properties:
        conversationId:
          type: string
          title: Conversationid
        projectId:
          anyOf:
            - type: string
            - type: 'null'
          title: Projectid
      type: object
      required:
        - conversationId
      title: ChangeConversationProject
      description: |-
        Request body to move a conversation into a project.

        Attributes:
            conversation_id (str): The id of the conversation to move.
            project_id (Optional[str]): The target project id, or None to detach
                the conversation from any project.
    ChangeConversationTitle:
      properties:
        conversationId:
          type: string
          title: Conversationid
        updatedTitle:
          type: string
          title: Updatedtitle
        userId:
          anyOf:
            - type: string
            - type: 'null'
          title: Userid
      type: object
      required:
        - conversationId
        - updatedTitle
      title: ChangeConversationTitle
      description: |-
        Request body to rename a conversation.

        Attributes:
            conversation_id (str): The id of the conversation to rename.
            updated_title (str): The new title to apply.
            user_id (Optional[str]): The owning user's id; parsed from the
                authorization headers when not supplied.
    ChatRequest:
      properties:
        content:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/ToolResultContentBlock'
          title: Content
        conversationId:
          type: string
          title: Conversationid
        attachments:
          anyOf:
            - items:
                anyOf:
                  - $ref: '#/components/schemas/AttachmentData-Input'
                  - $ref: '#/components/schemas/ImageAttachmentData'
              type: array
            - type: 'null'
          title: Attachments
        collectionsSources:
          anyOf:
            - $ref: '#/components/schemas/CollectionsSourceSelection'
            - type: 'null'
        streamingChatOptions:
          $ref: '#/components/schemas/StreamingChatOptions'
      type: object
      required:
        - content
        - conversationId
      title: ChatRequest
      description: |-
        An LLM chat request.

        Attributes:
            content (str | ToolResultContentBlock): The user input for this
                turn. A string represents a normal text prompt. A
                ToolResultContentBlock represents the resumption of a turn
                after a client-executed tool use; the conversation generator
                stores it as a TOOL_RESPONSE and re-invokes the LLM with the
                result paired to the original toolUse.
            conversation_id (Optional[str]): An optional conversation id to associate the request with.
            collections_sources (Optional[CollectionsSourceSelection]): Optional collection
                source selection. The server no longer retrieves from these before
                generating; they are surfaced to the model so it can scope its own
                QueryCollections calls.
            streaming_chat_options (StreamingChatOptions): Per-request generation options (agent type,
                intelligent context, web search). Defaults are applied when omitted.
    CollectionsSourceSelection:
      properties:
        collectionIds:
          items:
            type: string
          type: array
          title: Collectionids
          default: []
        documentIds:
          items:
            type: string
          type: array
          title: Documentids
          default: []
        documentCollectionMap:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Documentcollectionmap
      type: object
      title: CollectionsSourceSelection
      description: >-
        Represents the selected knowledge sources from collections for
        retrieval.


        Extends StepCollectionsSource (the domain-layer definition) so both
        share

        a single field definition. All fields are inherited:
            collection_ids (List[str]): Array of collection IDs where entire collection is selected.
            document_ids (List[str]): Array of individual document IDs selected.
            document_collection_map (Optional[Dict[str, str]]): Frontend-only UI helper mapping
                document IDs to their parent collection IDs. Not used by the backend.
    Comparison-Input:
      properties:
        variant:
          type: string
          const: comparison
          title: Variant
          default: comparison
        left:
          oneOf:
            - $ref: '#/components/schemas/OutputReference-Input'
            - $ref: '#/components/schemas/LiteralValue'
          title: Left
          discriminator:
            propertyName: variant
            mapping:
              literal: '#/components/schemas/LiteralValue'
              output: '#/components/schemas/OutputReference-Input'
        operator:
          $ref: '#/components/schemas/ComparisonOperator'
        right:
          oneOf:
            - $ref: '#/components/schemas/OutputReference-Input'
            - $ref: '#/components/schemas/LiteralValue'
          title: Right
          discriminator:
            propertyName: variant
            mapping:
              literal: '#/components/schemas/LiteralValue'
              output: '#/components/schemas/OutputReference-Input'
      type: object
      required:
        - left
        - operator
        - right
      title: Comparison
      description: |-
        A single comparison between two operands.

        Attributes:
            variant: The discriminator marking this expression as a comparison.
            left: The left-hand operand.
            operator: The comparison applied between the operands.
            right: The right-hand operand.
    Comparison-Output:
      properties:
        variant:
          type: string
          const: comparison
          title: Variant
          default: comparison
        left:
          oneOf:
            - $ref: '#/components/schemas/OutputReference-Output'
            - $ref: '#/components/schemas/LiteralValue'
          title: Left
          discriminator:
            propertyName: variant
            mapping:
              literal: '#/components/schemas/LiteralValue'
              output: '#/components/schemas/OutputReference-Output'
        operator:
          $ref: '#/components/schemas/ComparisonOperator'
        right:
          oneOf:
            - $ref: '#/components/schemas/OutputReference-Output'
            - $ref: '#/components/schemas/LiteralValue'
          title: Right
          discriminator:
            propertyName: variant
            mapping:
              literal: '#/components/schemas/LiteralValue'
              output: '#/components/schemas/OutputReference-Output'
      type: object
      required:
        - left
        - operator
        - right
      title: Comparison
      description: |-
        A single comparison between two operands.

        Attributes:
            variant: The discriminator marking this expression as a comparison.
            left: The left-hand operand.
            operator: The comparison applied between the operands.
            right: The right-hand operand.
    ComparisonOperator:
      type: string
      enum:
        - '=='
        - '!='
        - '>'
        - '>='
        - <
        - <=
        - contains
        - not_contains
        - in
        - not_in
        - starts_with
        - ends_with
        - matches
      title: ComparisonOperator
      description: >-
        The comparison applied between a deterministic condition's two operands.


        Values are persisted in the edge condition JSONB, so they are stable
        wire

        identifiers and the seam through which the expression language is
        extended.


        Attributes:
            EQ: Equality, no coercion (also compares whole lists/objects structurally).
            NE: Inequality, no coercion.
            GT: Strictly greater than (numeric).
            GTE: Greater than or equal to (numeric).
            LT: Strictly less than (numeric).
            LTE: Less than or equal to (numeric).
            CONTAINS: Structure-aware membership of the right operand in the left
                (left is a list element / dict key / substring container).
            NOT_CONTAINS: Negated structure-aware membership.
            IN: Membership of the left operand in the right (the value-first mirror
                of CONTAINS; right is a list, object, or string container).
            NOT_IN: Negated membership of the left operand in the right.
            STARTS_WITH: Left string starts with the right string.
            ENDS_WITH: Left string ends with the right string.
            MATCHES: Left string matches the right operand as a regular expression.
    ConsumptionEventData:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
        rawAmount:
          type: integer
          title: Rawamount
        resourceType:
          type: string
          title: Resourcetype
        userId:
          anyOf:
            - type: string
            - type: 'null'
          title: Userid
        organizationId:
          type: string
          format: uuid
          title: Organizationid
        poolCategory:
          type: string
          title: Poolcategory
        ioType:
          anyOf:
            - type: string
            - type: 'null'
          title: Iotype
        cacheStatus:
          anyOf:
            - type: string
            - type: 'null'
          title: Cachestatus
        modelId:
          anyOf:
            - type: string
            - type: 'null'
          title: Modelid
        scaledAmount:
          anyOf:
            - type: number
            - type: 'null'
          title: Scaledamount
        requestId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Requestid
        endpoint:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpoint
      type: object
      required:
        - id
        - createdAt
        - updatedAt
        - rawAmount
        - resourceType
        - organizationId
        - poolCategory
      title: ConsumptionEventData
      description: Domain model representing a consumption event.
    ConversationCollectionsSourcesResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/DocumentSourceEntry'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
        conversationId:
          type: string
          title: Conversationid
      type: object
      required:
        - items
        - conversationId
      title: ConversationCollectionsSourcesResponse
      description: >-
        Response model containing per-document source entries for a
        conversation.

        Extends basic list response structure.


        Attributes:
            conversation_id (str): The conversation these selections belong to.
    ConversationData:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        title:
          type: string
          title: Title
        summary:
          type: string
          title: Summary
        userId:
          type: string
          title: Userid
        messageCount:
          type: integer
          title: Messagecount
          default: 0
        userMessageCount:
          type: integer
          title: Usermessagecount
          default: 0
        isPinned:
          type: boolean
          title: Ispinned
          default: false
        source:
          $ref: '#/components/schemas/ConversationSource'
          default: web
        messages:
          items:
            $ref: '#/components/schemas/MessageData'
          type: array
          title: Messages
          default: []
        messageAttachments:
          items:
            $ref: '#/components/schemas/AttachmentData-Output'
          type: array
          title: Messageattachments
          default: []
        summaries:
          items:
            $ref: '#/components/schemas/ConversationSummaryData'
          type: array
          title: Summaries
          default: []
        project:
          anyOf:
            - $ref: '#/components/schemas/ConversationProjectData'
            - type: 'null'
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - id
        - title
        - summary
        - userId
      title: ConversationData
      description: |-
        Data model representing a conversation between a user and the system.

        This model encapsulates all information about a conversation, including
        metadata, messages, and user associations. It supports ORM integration
        and provides computed properties for efficient key-based data access.
        The model automatically tracks creation and update timestamps.

        Inherits:
            BaseModel: Pydantic base model for validation and serialization.
            OrmMixin: Custom mixin providing ORM integration capabilities.

        Attributes:
            id (UUID): Unique identifier for the conversation.
            title (str): Human-readable title or name for the conversation.
            summary (str): Brief summary or description of the conversation content.
            user_id (str): Identifier of the user who owns this conversation.
            model_selection (str): AI model used for this conversation.
                Defaults to "default".
            message_count (int): Number of messages in the conversation.
                Automatically updated via message_tie_in(). Defaults to 0.
            user_message_count (int): Count of user sent messages. Defaults to 0.
            messages (list[MessageData]): List of messages in the conversation.
                Defaults to empty list.
            created_at (datetime): UTC timestamp when the conversation was created.
                Automatically set to current UTC time.
            updated_at (datetime): UTC timestamp when the conversation was last modified.
                Automatically set to current UTC time.
            project (ConversationProjectData | None): The associated project's id and
                name when the conversation belongs to a project, otherwise None.

        Properties:
            key (str): Cached property returning the user-based key for this conversation.
                Format: "{user_id}"
            message_key (str): Cached computed property for message storage key.
                Format: "{user_id}:messages"

        Configuration:
            - Supports population from ORM attributes via from_attributes=True
            - Compatible with database models through OrmMixin

        Example:
            `python
            from uuid import uuid4

            # Create new conversation
            conversation = ConversationData(
                id=uuid4(),
                title="Project Planning Discussion",
                summary="Planning conversation for Q4 project",
                user_id="user123",
            )

            # Add messages using tie-in method
            messages = [MessageData(...), MessageData(...)]
            conversation.message_tie_in(messages)

            print(f"Conversation has {conversation.message_count} messages")
            `

        Methods:
            message_tie_in: Associates messages with this conversation and updates count.

        Note:
            The created_at and updated_at fields use UTC timezone by default.
            The cached_property decorator ensures expensive computations are
            only performed once per instance.
    ConversationProjectData:
      properties:
        id:
          type: string
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
      type: object
      required:
        - id
      title: ConversationProjectData
      description: >-
        Slim projection of a project as embedded on a conversation.


        Carries only the identity and display name a conversation needs to show

        its project association, rather than the full ProjectData (which
        includes

        large context fields). The id is serialized as a string so the model

        round-trips cleanly through the JSON-based conversation cache.


        Attributes:
            id (str): The project's identifier.
            name (str | None): The project's display name, if set.
    ConversationSource:
      type: string
      enum:
        - cli
        - web
        - desktop
        - workflow_run
      title: ConversationSource
    ConversationSummaryData:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: string
            - type: 'null'
          title: Id
        conversation_id:
          anyOf:
            - type: string
              format: uuid
            - type: string
          title: Conversation Id
        content:
          type: string
          title: Content
        message_range_start:
          type: integer
          title: Message Range Start
        message_range_end:
          type: integer
          title: Message Range End
        order_index:
          type: integer
          title: Order Index
        summary_type:
          $ref: '#/components/schemas/ConversationSummaryType'
        token_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Token Count
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - conversation_id
        - content
        - message_range_start
        - message_range_end
        - order_index
        - summary_type
      title: ConversationSummaryData
    ConversationSummaryType:
      type: string
      enum:
        - attachment
        - turn
        - batch
        - rolling
      title: ConversationSummaryType
      description: |-
        An enumeration detailing different conversation summary types.

        Values:
            ATTACHMENT: summarizes a message attachment to use in place of the
                full attachment.
            TURN: Summarizes a single user/agent message combination
            BATCH: Summarizes a combination of message turns, typically 3-5
            ROLLING: Summarizes all of the conversation, used for very old/deep messages
    CreateTemplateRequest:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: string
          title: Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        s3Key:
          type: string
          title: S3Key
        templateType:
          $ref: '#/components/schemas/TemplateType'
        layouts:
          anyOf:
            - items:
                $ref: '#/components/schemas/TemplateLayout-Input'
              type: array
            - type: 'null'
          title: Layouts
      type: object
      required:
        - id
        - name
        - description
        - s3Key
        - templateType
      title: CreateTemplateRequest
      description: |-
        Request payload for creating a new template.

        Attributes:
            name: Unique name for the template.
            description: Human-readable description of the template.
            template_type: Category/type of the template (DOCX or PPTX).
            template_data: Template content as a dictionary.

        Example:
            {
                "name": "Report Template",
                "description": "Standard report format",
                "templateType": "docx",
            }
    DeterministicCondition-Input:
      properties:
        variant:
          type: string
          const: deterministic
          title: Variant
          default: deterministic
        expression:
          oneOf:
            - $ref: '#/components/schemas/Comparison-Input'
            - $ref: '#/components/schemas/LogicalExpression-Input'
            - $ref: '#/components/schemas/QuantifierExpression-Input'
          title: Expression
          discriminator:
            propertyName: variant
            mapping:
              comparison: '#/components/schemas/Comparison-Input'
              logical: '#/components/schemas/LogicalExpression-Input'
              quantifier: '#/components/schemas/QuantifierExpression-Input'
      type: object
      required:
        - expression
      title: DeterministicCondition
      description: >-
        An edge condition evaluated in code against the preceding step's tool
        output.


        Carries a single boolean expression tree (see Expression). At a branch
        point

        the deterministic edges are evaluated in priority order and the first
        whose

        expression is true is taken, else the fallback edge.


        Attributes:
            variant: The discriminator marking this condition as deterministic.
            expression: The boolean expression evaluated against the output.
    DeterministicCondition-Output:
      properties:
        variant:
          type: string
          const: deterministic
          title: Variant
          default: deterministic
        expression:
          oneOf:
            - $ref: '#/components/schemas/Comparison-Output'
            - $ref: '#/components/schemas/LogicalExpression-Output'
            - $ref: '#/components/schemas/QuantifierExpression-Output'
          title: Expression
          discriminator:
            propertyName: variant
            mapping:
              comparison: '#/components/schemas/Comparison-Output'
              logical: '#/components/schemas/LogicalExpression-Output'
              quantifier: '#/components/schemas/QuantifierExpression-Output'
      type: object
      required:
        - expression
      title: DeterministicCondition
      description: >-
        An edge condition evaluated in code against the preceding step's tool
        output.


        Carries a single boolean expression tree (see Expression). At a branch
        point

        the deterministic edges are evaluated in priority order and the first
        whose

        expression is true is taken, else the fallback edge.


        Attributes:
            variant: The discriminator marking this condition as deterministic.
            expression: The boolean expression evaluated against the output.
    DocumentSourceEntry:
      properties:
        documentId:
          type: string
          title: Documentid
        collectionId:
          type: string
          title: Collectionid
      type: object
      required:
        - documentId
        - collectionId
      title: DocumentSourceEntry
      description: |-
        A single resolved document-to-collection mapping.

        Attributes:
            document_id (str): The document's unique identifier.
            collection_id (str): The collection the document belongs to.

        Example:
            >>> entry = DocumentSourceEntry(
            ...     document_id="550e8400-e29b-41d4-a716-446655440000",
            ...     collection_id="660e8400-e29b-41d4-a716-446655440001",
            ... )
    FallbackCondition:
      properties:
        variant:
          type: string
          const: fallback
          title: Variant
          default: fallback
      type: object
      title: FallbackCondition
      description: >-
        The catch-all branch taken when no other branch is selected.


        Carries no authored text: it is shown to the model as a numbered option

        with a generic catch-all label (see branch_option_prompt) and is also
        where

        an invalid, out-of-range, or missing decision routes.
    FileSnapshot:
      properties:
        name:
          type: string
          title: Name
        size:
          type: integer
          title: Size
      type: object
      required:
        - name
        - size
      title: FileSnapshot
      description: A file input used by a step, captured by name and size.
    ForkConversationResponse:
      properties:
        conversationId:
          type: string
          format: uuid
          title: Conversationid
      type: object
      required:
        - conversationId
      title: ForkConversationResponse
      description: |-
        Response for a successful conversation fork.

        Carries only the id of the newly created conversation so the client can
        refresh its conversation lists and navigate into the fork.

        Params:
            conversation_id (UUID): The id of the newly created forked conversation.
                Serialized as ``conversationId``.
    GenerateTitleRequest:
      properties:
        content:
          type: string
          title: Content
        conversationId:
          type: string
          title: Conversationid
      type: object
      required:
        - content
        - conversationId
      title: GenerateTitleRequest
    GenerateToolReferenceRequest:
      properties:
        userToolId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Usertoolid
        groupKey:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Groupkey
      type: object
      title: GenerateToolReferenceRequest
      description: |-
        Body for the generate-tool-reference endpoint.

        Attributes:
            user_tool_id: Optional identifier of an existing user tool to
                generate a reference for.
            group_key: Optional group key identifying an uploaded file set to
                generate a reference for.
    GenerateToolReferenceResponse:
      properties:
        toolReference:
          additionalProperties: true
          type: object
          title: Toolreference
        description:
          type: string
          title: Description
          default: ''
      type: object
      title: GenerateToolReferenceResponse
      description: |-
        JSON tool reference plus a short description, returned by the
        generate-tool-reference endpoint.

        Attributes:
            tool_reference: JSON object describing the generated tool
                reference.
            description: Short natural-language description of the tool.
    GenerateWorkflowGraphRequest:
      properties:
        content:
          type: string
          title: Content
      type: object
      required:
        - content
      title: GenerateWorkflowGraphRequest
      description: |-
        A request to generate a linear workflow graph from a description.

        Attributes:
            content (str): The natural-language description of the desired workflow.
    GenerateWorkflowTitleRequest:
      properties:
        content:
          type: string
          title: Content
      type: object
      required:
        - content
      title: GenerateWorkflowTitleRequest
    GetUserTokenConsumptionStatus:
      properties:
        nearingUsageLimits:
          type: boolean
          title: Nearingusagelimits
        shortPeriodStartTime:
          type: integer
          title: Shortperiodstarttime
        shortPeriodEndTime:
          type: integer
          title: Shortperiodendtime
      type: object
      required:
        - nearingUsageLimits
        - shortPeriodStartTime
        - shortPeriodEndTime
      title: GetUserTokenConsumptionStatus
      description: |-
        Indicates whether to display the surplus warning banner.

        True when the user has exhausted their short-period allocation AND the
        organization surplus pool has 500,000 or fewer scaled tokens remaining.
    GroupedResponse:
      properties:
        owned:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/app__schemas__domain__agents__agent__AgentData__Sparse
              type: array
            - items:
                $ref: >-
                  #/components/schemas/app__schemas__domain__agents__tool__ToolData__Sparse
              type: array
            - items:
                $ref: >-
                  #/components/schemas/app__schemas__domain__agents__instruction__InstructionData__Sparse
              type: array
          title: Owned
        shared:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/app__schemas__domain__agents__agent__AgentData__Sparse
              type: array
            - items:
                $ref: >-
                  #/components/schemas/app__schemas__domain__agents__tool__ToolData__Sparse
              type: array
            - items:
                $ref: >-
                  #/components/schemas/app__schemas__domain__agents__instruction__InstructionData__Sparse
              type: array
          title: Shared
        organization:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/app__schemas__domain__agents__agent__AgentData__Sparse
              type: array
            - items:
                $ref: >-
                  #/components/schemas/app__schemas__domain__agents__tool__ToolData__Sparse
              type: array
            - items:
                $ref: >-
                  #/components/schemas/app__schemas__domain__agents__instruction__InstructionData__Sparse
              type: array
          title: Organization
        system:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/app__schemas__domain__agents__agent__AgentData__Sparse
              type: array
            - items:
                $ref: >-
                  #/components/schemas/app__schemas__domain__agents__tool__ToolData__Sparse
              type: array
            - items:
                $ref: >-
                  #/components/schemas/app__schemas__domain__agents__instruction__InstructionData__Sparse
              type: array
          title: System
          default: []
      type: object
      required:
        - owned
        - shared
        - organization
      title: GroupedResponse
      description: |-
        Grouped sparse components for an agent-component list endpoint.

        Attributes:
            owned: Components owned by the requesting user.
            shared: Components shared with the requesting user; each carries
                optional share metadata.
            organization: Publicly visible components not owned by the user.
            system: System-owned components; empty for endpoints (e.g. agents)
                that have no system tier.
    GroupedWorkflowsResponse:
      properties:
        owned:
          items:
            $ref: '#/components/schemas/WorkflowData-Output'
          type: array
          title: Owned
          default: []
        shared:
          items:
            $ref: '#/components/schemas/WorkflowData-Output'
          type: array
          title: Shared
          default: []
        organization:
          items:
            $ref: '#/components/schemas/WorkflowData-Output'
          type: array
          title: Organization
          default: []
        system:
          items:
            $ref: '#/components/schemas/WorkflowData-Output'
          type: array
          title: System
          default: []
      type: object
      title: GroupedWorkflowsResponse
      description: >-
        Grouped workflow lists for the workflow list endpoint.


        List items omit their graph (attached only on

        single-workflow reads); shared items carry permission metadata so the
        client

        can gate edit affordances.


        Attributes:
            owned: Workflows owned by the requesting user.
            shared: Workflows shared with the requesting user; each carries the
                share's permission level and the sharer's id.
            organization: Public workflows not owned by the requesting user.
            system: Third Loop system workflows.
    ImageAttachmentData:
      properties:
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        contextType:
          type: string
          title: Contexttype
          default: attachment
        id:
          anyOf:
            - type: string
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        explanation:
          anyOf:
            - type: string
            - type: 'null'
          title: Explanation
        fileSize:
          type: integer
          title: Filesize
        fileType:
          type: string
          title: Filetype
        origin:
          anyOf:
            - type: string
            - type: 'null'
          title: Origin
          default: user_upload
        contentHash:
          anyOf:
            - type: string
            - type: 'null'
          title: Contenthash
        tokenCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tokencount
        uniqueKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Uniquekey
        parentMessageId:
          anyOf:
            - type: string
            - type: 'null'
          title: Parentmessageid
        parentConversationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Parentconversationid
        uploaderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Uploaderid
        pageStats:
          anyOf:
            - $ref: '#/components/schemas/PageExtractionStats'
            - type: 'null'
        width:
          anyOf:
            - type: integer
            - type: 'null'
          title: Width
        height:
          anyOf:
            - type: integer
            - type: 'null'
          title: Height
      type: object
      required:
        - fileSize
        - fileType
      title: ImageAttachmentData
      description: |-
        Specialized attachment data for image files.

        Extends AttachmentData with image-specific fields (width, height) and
        validation for Bedrock/Claude model constraints.

        Attributes:
            width (Optional[int]): Image width in pixels.
            height (Optional[int]): Image height in pixels.

        Example:
            >>> image = ImageAttachmentData(
            ...     content="base64_encoded_data",
            ...     title="screenshot.png",
            ...     file_size=1024000,
            ...     file_type="image/png",
            ...     width=1920,
            ...     height=1080,
            ... )
    ImageContentBlock:
      properties:
        type:
          type: string
          const: image
          title: Type
          default: image
        source:
          $ref: '#/components/schemas/ImageSource'
      type: object
      required:
        - source
      title: ImageContentBlock
      description: An image content block in a message.
    ImageSource:
      properties:
        type:
          type: string
          const: base64
          title: Type
          default: base64
        media_type:
          type: string
          title: Media Type
        data:
          type: string
          title: Data
      type: object
      required:
        - media_type
        - data
      title: ImageSource
      description: Source data for an image content block.
    InferenceRequest:
      properties:
        content:
          type: string
          title: Content
      type: object
      required:
        - content
      title: InferenceRequest
    InferenceResponse:
      properties:
        content:
          type: string
          title: Content
      type: object
      required:
        - content
      title: InferenceResponse
    InlineAgentConfig:
      properties:
        enhancedReasoning:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enhancedreasoning
        modelId:
          anyOf:
            - type: string
            - type: 'null'
          title: Modelid
        temperature:
          anyOf:
            - type: number
              maximum: 2
              minimum: 0
            - type: 'null'
          title: Temperature
        maxTokens:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
          title: Maxtokens
        topP:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Topp
        topK:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
          title: Topk
        instructionIds:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Instructionids
        toolIds:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Toolids
      type: object
      title: InlineAgentConfig
      description: >-
        Optional inline overrides for agent configuration during test
        invocations.


        Any non-None field will override the corresponding value on the agent's

        model configuration before the request is processed. Instructions and

        tools are loaded by ID and composed with the CORE agent's identity and

        safety instructions.


        Attributes:
            enhanced_reasoning (Optional[bool]): High-level model selector resolved
                server-side (True -> the enhanced model, False -> the default). The
                model-agnostic way for clients to pick a model; takes precedence
                over model_id when both are set.
            model_id (Optional[str]): Short model identifier (resolved via BedrockModelRuntimeFactory).
            temperature (Optional[float]): Sampling temperature (0.0 - 2.0).
            max_tokens (Optional[int]): Maximum number of tokens in the response.
            top_p (Optional[float]): Nucleus sampling probability (0.0 - 1.0).
            top_k (Optional[int]): Top-K sampling parameter.
            instruction_ids (Optional[List[UUID]]): Instruction IDs to include alongside identity/safety.
            tool_ids (Optional[List[UUID]]): Tool IDs to attach to the test agent.
    InstructionAssociation:
      properties:
        instructionId:
          type: string
          title: Instructionid
        excludedGuidelines:
          items:
            type: string
          type: array
          uniqueItems: true
          title: Excludedguidelines
          default: {}
      type: object
      required:
        - instructionId
      title: InstructionAssociation
      description: |-
        Defines associations between instructions and agents.

        Attributes:
            instruction_id (str): The id of the instruction.
            excluded_guidelines (Set[str]): A set of excluded guidelines.
                Defaults to {}
    InstructionCreate:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        displayName:
          type: string
          maxLength: 255
          minLength: 1
          title: Displayname
        description:
          type: string
          maxLength: 1024
          minLength: 1
          title: Description
        priority:
          $ref: '#/components/schemas/InstructionPriority'
          default: STANDARD
        instructionType:
          $ref: '#/components/schemas/InstructionType'
        visible:
          $ref: '#/components/schemas/AgentVisibility'
          default: private
        mutable:
          type: boolean
          title: Mutable
          default: true
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        guidelines:
          items:
            $ref: '#/components/schemas/InstructionGuidelineBase'
          type: array
          title: Guidelines
        tags:
          items:
            type: string
          type: array
          title: Tags
      type: object
      required:
        - name
        - description
        - instructionType
      title: InstructionCreate
      description: |-
        Schema for creating a new instruction.

        Extends the base schema with optional guidelines that can be created
        along with the instruction.

        Attributes:
            name: Human-readable name for the instruction.
            description: Detailed description of the instruction's purpose.
            priority: Priority level for conflict resolution.
            instruction_type: Category of the instruction.
            visible: Visibility level of the instruction.
            mutable: Whether the instruction can be modified.
            owner_id: Optional owner identifier.
            guidelines: Optional list of guidelines to create with the instruction.
            tags: Optional list of tags to attach to the instruction.
    InstructionData:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        displayName:
          type: string
          maxLength: 255
          minLength: 1
          title: Displayname
        description:
          type: string
          maxLength: 1024
          minLength: 1
          title: Description
        priority:
          $ref: '#/components/schemas/InstructionPriority'
          default: STANDARD
        instructionType:
          $ref: '#/components/schemas/InstructionType'
        visible:
          $ref: '#/components/schemas/AgentVisibility'
          default: private
        mutable:
          type: boolean
          title: Mutable
          default: true
        id:
          type: string
          format: uuid
          title: Id
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        permissionLevel:
          anyOf:
            - $ref: '#/components/schemas/PermissionLevel'
            - type: 'null'
        sharedByUserId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sharedbyuserid
        guidelines:
          items:
            $ref: '#/components/schemas/InstructionGuidelineData'
          type: array
          title: Guidelines
        tags:
          items:
            type: string
          type: array
          title: Tags
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - name
        - description
        - instructionType
        - id
      title: InstructionData
      description: |-
        Full instruction representation returned from API responses.

        Includes all base fields plus database-generated fields like id,
        timestamps, and relationships. Supports ORM integration for seamless
        conversion from database entities.

        Attributes:
            id: Unique identifier for the instruction.
            name: Human-readable name for the instruction.
            description: Detailed description of the instruction's purpose.
            priority: Priority level for conflict resolution.
            instruction_type: Category of the instruction.
            visible: Visibility level of the instruction.
            mutable: Whether the instruction can be modified.
            owner_id: Identifier of the instruction's owner.
            guidelines: List of associated guidelines.
            tags: List of tag names attached to this instruction.
            permission_level: The caller's share permission level, populated only
                on reads for an instruction shared with them; None for owned,
                organization, and system instructions. Ignored on the write path.
            shared_by_user_id: The id of the user who shared the instruction with
                the caller, populated alongside permission_level.
            created_at: Timestamp when the instruction was created.
            updated_at: Timestamp when the instruction was last modified.
    InstructionGuidelineBase:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        text:
          type: string
          minLength: 1
          title: Text
        priority:
          $ref: '#/components/schemas/InstructionPriority'
          default: STANDARD
      type: object
      required:
        - name
        - text
      title: InstructionGuidelineBase
      description: |-
        Base schema containing common fields for instruction guidelines.

        This base class defines the core attributes shared across all guideline
        schema variants (create, update, response).

        Attributes:
            name: Identifier name for the guideline.
            text: The guideline content/directive text.
            priority: Priority level of this guideline.
    InstructionGuidelineData:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        text:
          type: string
          minLength: 1
          title: Text
        priority:
          $ref: '#/components/schemas/InstructionPriority'
          default: STANDARD
        id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Id
        instructionId:
          type: string
          format: uuid
          title: Instructionid
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - name
        - text
        - instructionId
      title: InstructionGuidelineData
      description: |-
        Full guideline representation returned from API responses.

        Includes all base fields plus database-generated fields like id
        and timestamps. Supports ORM integration for seamless conversion
        from database entities.

        Attributes:
            id: Unique identifier for the guideline.
            name: Identifier name for the guideline.
            text: The guideline content/directive text.
            priority: Priority level of this guideline.
            instruction_id: Reference to the parent instruction.
            created_at: Timestamp when the guideline was created.
            updated_at: Timestamp when the guideline was last modified.
    InstructionPriority:
      type: string
      enum:
        - LOW
        - STANDARD
        - HIGH
        - CRITICAL
      title: InstructionPriority
      description: >-
        Enumeration defining priority levels for instructions.


        Priority levels determine the order and emphasis with which instructions

        are applied to agent behavior. Higher priority instructions take
        precedence

        when conflicts arise.


        Attributes:
            LOW: Lowest priority, applied only when no conflicts exist.
            STANDARD: Default priority level for most instructions.
            HIGH: Elevated priority for important behavioral directives.
            CRITICAL: Highest priority, must always be followed.
    InstructionType:
      type: string
      enum:
        - core
        - section
        - guideline
        - note
        - format
      title: InstructionType
      description: |-
        Enumeration defining categories of instructions.

        Instruction types categorize the purpose and scope of an instruction,
        allowing agents to process different types of directives appropriately.

        Attributes:
            CORE: Fundamental instructions that define core agent behavior.
            SECTION: Instructions that apply to specific conversation sections.
            GUIDELINE: General behavioral guidelines and best practices.
            NOTE: Informational notes that provide context without strict directives.
            FORMAT: Instructions specifically for output formatting.
    InstructionUpdate:
      properties:
        displayName:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Displayname
        description:
          anyOf:
            - type: string
              maxLength: 1024
              minLength: 1
            - type: 'null'
          title: Description
        priority:
          anyOf:
            - $ref: '#/components/schemas/InstructionPriority'
            - type: 'null'
        instructionType:
          anyOf:
            - $ref: '#/components/schemas/InstructionType'
            - type: 'null'
        visible:
          anyOf:
            - $ref: '#/components/schemas/AgentVisibility'
            - type: 'null'
        mutable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Mutable
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        guidelines:
          anyOf:
            - items:
                $ref: '#/components/schemas/InstructionGuidelineBase'
              type: array
            - type: 'null'
          title: Guidelines
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
      type: object
      title: InstructionUpdate
      description: |-
        Schema for updating an existing instruction.

        All fields are optional to support partial updates. Only provided
        fields will be updated on the instruction.

        Attributes:
            name: Optional new name for the instruction.
            description: Optional new description.
            priority: Optional new priority level.
            instruction_type: Optional new instruction type.
            visible: Optional new visibility level.
            mutable: Optional new mutability flag.
            owner_id: Optional owner identifier.
            guidelines: Optional list of guidelines.
            tags: Optional new list of tags (replaces existing).
    LayoutPlaceholder:
      properties:
        idx:
          anyOf:
            - type: integer
            - type: 'null'
          title: Idx
        name:
          type: string
          title: Name
        type:
          type: string
          title: Type
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
        position:
          anyOf:
            - $ref: '#/components/schemas/LayoutPosition'
            - type: 'null'
        textStyle:
          anyOf:
            - $ref: '#/components/schemas/TextStyle'
            - type: 'null'
      type: object
      required:
        - name
        - type
      title: LayoutPlaceholder
    LayoutPosition:
      properties:
        wIn:
          anyOf:
            - type: number
            - type: 'null'
          title: Win
        hIn:
          anyOf:
            - type: number
            - type: 'null'
          title: Hin
        xIn:
          anyOf:
            - type: number
            - type: 'null'
          title: Xin
        yIn:
          anyOf:
            - type: number
            - type: 'null'
          title: Yin
      type: object
      title: LayoutPosition
    LiteralValue:
      properties:
        variant:
          type: string
          const: literal
          title: Variant
          default: literal
        value:
          anyOf:
            - type: string
            - type: number
            - type: integer
            - type: boolean
            - items: {}
              type: array
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Value
      type: object
      title: LiteralValue
      description: >-
        A constant operand compared against an output reference.


        The value may be a scalar (string, number, boolean, null) or a
        collection (a

        list or object). A collection literal powers set membership (right
        operand of

        in / not_in, or left of contains) and structural equality against a
        whole

        list or object.


        Attributes:
            variant: The discriminator marking this operand as a literal.
            value: The constant value (string, number, boolean, null, list, or object).
    LogicalExpression-Input:
      properties:
        variant:
          type: string
          const: logical
          title: Variant
          default: logical
        operator:
          $ref: '#/components/schemas/LogicalOperator'
        operands:
          items:
            oneOf:
              - $ref: '#/components/schemas/Comparison-Input'
              - $ref: '#/components/schemas/LogicalExpression-Input'
              - $ref: '#/components/schemas/QuantifierExpression-Input'
            discriminator:
              propertyName: variant
              mapping:
                comparison: '#/components/schemas/Comparison-Input'
                logical: '#/components/schemas/LogicalExpression-Input'
                quantifier: '#/components/schemas/QuantifierExpression-Input'
          type: array
          title: Operands
      type: object
      required:
        - operator
        - operands
      title: LogicalExpression
      description: >-
        A boolean combination (and / or / not) of nested expressions.


        The after-validator enforces operand arity: not takes exactly one
        operand;

        and / or take at least two. A violation raises during request parsing.


        Attributes:
            variant: The discriminator marking this expression as logical.
            operator: The connective applied across the operands.
            operands: The nested expressions combined by the operator.
    LogicalExpression-Output:
      properties:
        variant:
          type: string
          const: logical
          title: Variant
          default: logical
        operator:
          $ref: '#/components/schemas/LogicalOperator'
        operands:
          items:
            oneOf:
              - $ref: '#/components/schemas/Comparison-Output'
              - $ref: '#/components/schemas/LogicalExpression-Output'
              - $ref: '#/components/schemas/QuantifierExpression-Output'
            discriminator:
              propertyName: variant
              mapping:
                comparison: '#/components/schemas/Comparison-Output'
                logical: '#/components/schemas/LogicalExpression-Output'
                quantifier: '#/components/schemas/QuantifierExpression-Output'
          type: array
          title: Operands
      type: object
      required:
        - operator
        - operands
      title: LogicalExpression
      description: >-
        A boolean combination (and / or / not) of nested expressions.


        The after-validator enforces operand arity: not takes exactly one
        operand;

        and / or take at least two. A violation raises during request parsing.


        Attributes:
            variant: The discriminator marking this expression as logical.
            operator: The connective applied across the operands.
            operands: The nested expressions combined by the operator.
    LogicalOperator:
      type: string
      enum:
        - and
        - or
        - not
      title: LogicalOperator
      description: |-
        The connective applied across a logical expression's operands.

        Attributes:
            AND: True when every operand evaluates true.
            OR: True when any operand evaluates true.
            NOT: Negates its single operand.
    MessageData:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        content:
          type: string
          title: Content
        messageType:
          $ref: '#/components/schemas/MessageType'
          default: user
        agentId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Agentid
        contentIsJson:
          type: boolean
          title: Contentisjson
          default: false
        clientTool:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Clienttool
          default: false
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
        sources:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Sources
        conversationSequence:
          type: integer
          title: Conversationsequence
          default: 0
        tokenCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tokencount
      type: object
      required:
        - content
      title: MessageData
      description: |-
        Data model representing a single message in a conversation.

        This model encapsulates individual messages exchanged between users and
        the system, including metadata about message type and timestamps.
        It supports ORM integration for database persistence and automatically
        tracks creation and modification times.

        Inherits:
            BaseModel: Pydantic base model for validation and serialization.
            OrmMixin: Custom mixin providing ORM integration capabilities.

        Attributes:
            id (UUID): Unique identifier for the message.
            content (str): The actual text content of the message.
            message_type (str): Type of message indicating the sender or purpose.
                Defaults to "user". Common values include "user", "assistant", "system".
            created_at (datetime): UTC timestamp when the message was created.
                Automatically set to current UTC time.
            updated_at (datetime): UTC timestamp when the message was last modified.
                Automatically set to current UTC time.

        Configuration:
            - Supports population from ORM attributes via from_attributes=True
            - Compatible with database models through OrmMixin

        Example:
            ```python
            from uuid import uuid4

            # Create user message
            user_message = MessageData(
                id=uuid4(), content="Hello, how can I help you today?", message_type="user"
            )

            print(f"Message: {user_message.content}")
            print(f"Created: {user_message.created_at}")
            ```

        Note:
            Timestamps are automatically set to UTC timezone to ensure
            consistency across different server environments.
    MessageType:
      type: string
      enum:
        - user
        - assistant
        - tool_use
        - tool_response
        - system
      title: MessageType
    MetricCacheStatus:
      type: string
      enum:
        - standard
        - cache_read
        - cache_write
      title: MetricCacheStatus
    MetricIOType:
      type: string
      enum:
        - input
        - output
      title: MetricIOType
    MetricPoolCategory:
      type: string
      enum:
        - allocated
        - surplus
        - hybrid
      title: MetricPoolCategory
    MetricResourceType:
      type: string
      enum:
        - tokens
        - storage
        - ocr
      title: MetricResourceType
    MetricSurplusEventData:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        scaledAmount:
          type: number
          title: Scaledamount
        resourceType:
          type: string
          title: Resourcetype
        eventSource:
          type: string
          title: Eventsource
        organizationId:
          type: string
          format: uuid
          title: Organizationid
        periodStart:
          type: string
          format: date-time
          title: Periodstart
        periodEnd:
          type: string
          format: date-time
          title: Periodend
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - id
        - scaledAmount
        - resourceType
        - eventSource
        - organizationId
        - periodStart
        - periodEnd
        - createdAt
        - updatedAt
      title: MetricSurplusEventData
      description: |-
        Domain model representing a metric surplus event.

        Surplus amounts are float scaled values stored as double precision.
    NaturalLanguageCondition:
      properties:
        variant:
          type: string
          const: natural_language
          title: Variant
          default: natural_language
        prompt:
          type: string
          title: Prompt
      type: object
      required:
        - prompt
      title: NaturalLanguageCondition
      description: An edge condition expressed as a natural-language prompt.
    NewConversationRequest:
      properties:
        conversationId:
          type: string
          title: Conversationid
        projectId:
          anyOf:
            - type: string
            - type: 'null'
          title: Projectid
        title:
          type: string
          title: Title
        userId:
          anyOf:
            - type: string
            - type: 'null'
          title: Userid
        source:
          anyOf:
            - $ref: '#/components/schemas/ConversationSource'
            - type: 'null'
      type: object
      required:
        - conversationId
        - title
      title: NewConversationRequest
      description: |-
        A request body to generate a new conversation.

        Attributes:
            conversation_id (str): A UUID to identify the new conversation.
            title (str): The title of the conversation.
            model_selection(str): The id of the model to use for the conversation.
            user_id (Optional[str]): The user who is requesting the new conversation.

        Note:
            The user id for this model is optional because it is parsed from authorization headers.
            However, a user id must be present in the model for succesful downstream use in service layers.
    NewProjectRequest:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        description:
          anyOf:
            - type: string
              maxLength: 1024
            - type: 'null'
          title: Description
      type: object
      required:
        - name
      title: NewProjectRequest
      description: Request schema for creating a new project.
    NodeInput:
      properties:
        variant:
          type: string
          enum:
            - text
            - file
          title: Variant
        content:
          type: string
          title: Content
      type: object
      required:
        - variant
        - content
      title: NodeInput
      description: A single text or file input attached to a step node.
    NotifyChatFileUploadedRequest:
      properties:
        uniqueKey:
          type: string
          title: Uniquekey
        filename:
          type: string
          title: Filename
        fileType:
          type: string
          title: Filetype
        conversationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Conversationid
      type: object
      required:
        - uniqueKey
        - filename
        - fileType
      title: NotifyChatFileUploadedRequest
      description: >-
        Body of `POST /api/core/file/notify-chat-file-uploaded`.


        `unique_key` is the UUID returned by the presigned-URL endpoint. The

        server uses it as the primary key of the eventual `MessageAttachment`

        row — wire field and DB `id` end up carrying the same value. Together

        with `filename` it also reconstructs the S3 object key

        (`{unique_key}_{filename}`).


        `conversation_id` is optional: when present the server ties the
        attachment

        to the conversation at notify time; when absent the attachment stays

        orphaned until the user sends their first message and it's linked then.
    OrganizationMetricsConfigurationData:
      properties:
        organizationId:
          type: string
          format: uuid
          title: Organizationid
        longPeriodScaledTokenLimit:
          type: integer
          title: Longperiodscaledtokenlimit
        orgStorageLimit:
          type: integer
          title: Orgstoragelimit
        defaultUserShortPeriodScaledLimit:
          type: integer
          title: Defaultusershortperiodscaledlimit
        defaultUserStorageLimit:
          type: integer
          title: Defaultuserstoragelimit
        updatedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updatedat
      type: object
      required:
        - organizationId
        - longPeriodScaledTokenLimit
        - orgStorageLimit
        - defaultUserShortPeriodScaledLimit
        - defaultUserStorageLimit
      title: OrganizationMetricsConfigurationData
    OutputReference-Input:
      properties:
        variant:
          type: string
          const: output
          title: Variant
          default: output
        path:
          items:
            $ref: '#/components/schemas/PathSegment'
          type: array
          title: Path
          default: []
      type: object
      title: OutputReference
      description: >-
        A reference to (part of) the preceding step's tool output.


        An empty path reads the whole output; each segment narrows it by a dict
        key,

        a list index, or a named function (see PathSegment).


        Attributes:
            variant: The discriminator marking this operand as an output reference.
            path: The ordered segments folded over the output to reach the value.
    OutputReference-Output:
      properties:
        variant:
          type: string
          const: output
          title: Variant
          default: output
        path:
          items:
            $ref: '#/components/schemas/PathSegment'
          type: array
          title: Path
          default: []
      type: object
      title: OutputReference
      description: >-
        A reference to (part of) the preceding step's tool output.


        An empty path reads the whole output; each segment narrows it by a dict
        key,

        a list index, or a named function (see PathSegment).


        Attributes:
            variant: The discriminator marking this operand as an output reference.
            path: The ordered segments folded over the output to reach the value.
    PageExtractionStats:
      properties:
        pageCount:
          type: integer
          title: Pagecount
        emptyPageCount:
          type: integer
          title: Emptypagecount
      type: object
      required:
        - pageCount
        - emptyPageCount
      title: PageExtractionStats
    PathSegment:
      properties:
        variant:
          $ref: '#/components/schemas/PathSegmentKind'
        value:
          anyOf:
            - type: string
            - type: integer
          title: Value
      type: object
      required:
        - variant
        - value
      title: PathSegment
      description: >-
        One step in the path from a tool output to the value a condition reads.


        A key or function segment carries a string value (the key or function
        name);

        an index segment carries an integer (the list position). The value
        validator

        enforces that pairing so a malformed path fails request parsing rather
        than

        at evaluation time.


        Attributes:
            variant: Which kind of path step this is.
            value: The key/function name (string) or list index (integer).
    PathSegmentKind:
      type: string
      enum:
        - key
        - index
        - function
      title: PathSegmentKind
      description: |-
        The kind of a single step in an output reference path.

        Attributes:
            KEY: A string dict-key lookup.
            INDEX: An integer list-index lookup.
            FUNCTION: A named transform applied to the value -- one of length, keys,
                type, lower, or upper.
    PresignedUrlResponse:
      properties:
        presignedUrl:
          type: string
          title: Presignedurl
        method:
          type: string
          title: Method
        uniqueKey:
          anyOf:
            - type: string
            - type: string
              format: uuid
            - type: 'null'
          title: Uniquekey
        key:
          anyOf:
            - type: string
            - type: 'null'
          title: Key
        bucket:
          anyOf:
            - type: string
            - type: 'null'
          title: Bucket
        url:
          type: string
          title: Url
          description: |-
            Return the presigned URL as a computed field.

            Returns:
                str: The presigned_url value.
          readOnly: true
      type: object
      required:
        - presignedUrl
        - method
        - url
      title: PresignedUrlResponse
      description: >-
        Response model for presigned URL operations.


        Represents a response containing a presigned URL, typically used for

        secure, time-limited access to cloud storage resources. The model
        exposes

        both snake_case and camelCase field access through aliases.


        Attributes:
            presigned_url (str): The presigned URL granting temporary access to a
                resource.
            method (str): The HTTP method the presigned URL authorizes.
            unique_key (str | UUID | None): The per-file unique key (or group key
                for grouped uploads) associated with the resource.
            key (str | None): The full S3 object key targeted by the URL.
            bucket (str | None): The S3 bucket holding the object.
    ProjectCollectionsSources:
      properties:
        collectionIds:
          items:
            type: string
          type: array
          title: Collectionids
        documentIds:
          items:
            type: string
          type: array
          title: Documentids
      type: object
      title: ProjectCollectionsSources
      description: >-
        Collection sources attached to a project as a default knowledge
        selection.


        Stored as a JSONB column on the project and applied to new chats started

        from the project. Mirrors the flat collection_ids/document_ids shape
        used

        by UpdateConversationCollectionsSourcesRequest rather than the workflow

        step source, so the project layer carries only the ids the backend acts
        on.


        Attributes:
            collection_ids: Collection IDs where the entire collection is selected.
            document_ids: Individual document IDs selected.
    ProjectData:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        isPinned:
          type: boolean
          title: Ispinned
          default: false
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
              maxLength: 1024
            - type: 'null'
          title: Description
        userGeneratedContext:
          anyOf:
            - type: string
              maxLength: 16000
            - type: 'null'
          title: Usergeneratedcontext
        aiGeneratedContext:
          anyOf:
            - type: string
              maxLength: 16000
            - type: 'null'
          title: Aigeneratedcontext
        collectionsSources:
          anyOf:
            - $ref: '#/components/schemas/ProjectCollectionsSources'
            - type: 'null'
        agentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Agentid
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      title: ProjectData
      description: >-
        Data model representing a single project.


        This model encapsulates individual projects, including metadata about
        project and timestamps.

        It supports ORM integration for database persistence and automatically

        tracks creation and modification times.


        Inherits:
            BaseModel: Pydantic base model for validation and serialization.
            OrmMixin: Custom mixin providing ORM integration capabilities.


        Note:
            Timestamps are automatically set to UTC timezone to ensure
            consistency across different server environments.
    QuantifierExpression-Input:
      properties:
        variant:
          type: string
          const: quantifier
          title: Variant
          default: quantifier
        quantifier:
          $ref: '#/components/schemas/QuantifierOperator'
        path:
          items:
            $ref: '#/components/schemas/PathSegment'
          type: array
          title: Path
          default: []
        predicate:
          oneOf:
            - $ref: '#/components/schemas/Comparison-Input'
            - $ref: '#/components/schemas/LogicalExpression-Input'
            - $ref: '#/components/schemas/QuantifierExpression-Input'
          title: Predicate
          discriminator:
            propertyName: variant
            mapping:
              comparison: '#/components/schemas/Comparison-Input'
              logical: '#/components/schemas/LogicalExpression-Input'
              quantifier: '#/components/schemas/QuantifierExpression-Input'
      type: object
      required:
        - quantifier
        - predicate
      title: QuantifierExpression
      description: >-
        A quantifier (any / all) over the elements of a collection in the
        output.


        The path resolves to a list in the current output; the predicate is then

        evaluated against each element with that element bound as the
        predicate's

        output root (so inside the predicate, an empty path or output reference
        reads

        the element). This nests: a predicate may itself be a quantifier.


        Attributes:
            variant: The discriminator marking this expression as a quantifier.
            quantifier: Whether the predicate must hold for any or all elements.
            path: The path to the collection within the current output (empty reads
                the whole output, which must itself be a list).
            predicate: The expression evaluated against each element.
    QuantifierExpression-Output:
      properties:
        variant:
          type: string
          const: quantifier
          title: Variant
          default: quantifier
        quantifier:
          $ref: '#/components/schemas/QuantifierOperator'
        path:
          items:
            $ref: '#/components/schemas/PathSegment'
          type: array
          title: Path
          default: []
        predicate:
          oneOf:
            - $ref: '#/components/schemas/Comparison-Output'
            - $ref: '#/components/schemas/LogicalExpression-Output'
            - $ref: '#/components/schemas/QuantifierExpression-Output'
          title: Predicate
          discriminator:
            propertyName: variant
            mapping:
              comparison: '#/components/schemas/Comparison-Output'
              logical: '#/components/schemas/LogicalExpression-Output'
              quantifier: '#/components/schemas/QuantifierExpression-Output'
      type: object
      required:
        - quantifier
        - predicate
      title: QuantifierExpression
      description: >-
        A quantifier (any / all) over the elements of a collection in the
        output.


        The path resolves to a list in the current output; the predicate is then

        evaluated against each element with that element bound as the
        predicate's

        output root (so inside the predicate, an empty path or output reference
        reads

        the element). This nests: a predicate may itself be a quantifier.


        Attributes:
            variant: The discriminator marking this expression as a quantifier.
            quantifier: Whether the predicate must hold for any or all elements.
            path: The path to the collection within the current output (empty reads
                the whole output, which must itself be a list).
            predicate: The expression evaluated against each element.
    QuantifierOperator:
      type: string
      enum:
        - any
        - all
      title: QuantifierOperator
      description: |-
        The quantifier applied across the elements of a collection.

        Attributes:
            ANY: True when the predicate holds for at least one element.
            ALL: True when the predicate holds for every element (vacuously true for
                an empty collection).
    ReasoningQuestion:
      properties:
        questionNumber:
          type: integer
          title: Questionnumber
        questionContent:
          type: string
          title: Questioncontent
        questionAnswer:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Questionanswer
        questionType:
          type: string
          enum:
            - text
            - file
          title: Questiontype
          default: text
      type: object
      required:
        - questionNumber
        - questionContent
      title: ReasoningQuestion
      description: >-
        Represents a single question or file input request attached to a
        workflow step.


        Attributes:
            question_number: 1-based position of this item among all questions/inputs for the step.
            question_content: The question text or file upload description shown to the user.
            question_answer: The user-supplied answer or file reference; None until
                answered. A text question holds a single string; a file question
                holds the list of attachment unique keys it was answered with (one
                per uploaded file), which the generator hydrates into extracted
                content before the step runs.
            question_type: 'text' for a free-text question, 'file' for a file upload request.
    RefineWorkflowGraphRequest:
      properties:
        workflow:
          $ref: '#/components/schemas/WorkflowData-Input'
        feedback:
          type: string
          title: Feedback
      type: object
      required:
        - workflow
        - feedback
      title: RefineWorkflowGraphRequest
      description: |-
        A request to refine an existing workflow graph using feedback.

        Attributes:
            workflow (WorkflowData): The current workflow (graph plus metadata) to
                refine, the same shape the save endpoint accepts.
            feedback (str): The user's requested changes.
    SimpleChatRequest:
      properties:
        content:
          type: string
          title: Content
        conversationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Conversationid
        agentType:
          anyOf:
            - $ref: '#/components/schemas/AgentType'
            - type: string
              format: uuid
            - type: string
            - type: 'null'
          title: Agenttype
        agentConfig:
          anyOf:
            - $ref: '#/components/schemas/InlineAgentConfig'
            - type: 'null'
      type: object
      required:
        - content
      title: SimpleChatRequest
      description: |-
        A simple LLM chat request.

        Attributes:
            content (str): The prompt from the user.
            conversation_id (Optional[str]): An optional conversation id to associate the request with.
            agent_type (Optional[AgentType | UUID | str]): The agent type or ID to use for generation.
            agent_config (Optional[InlineAgentConfig]): Optional inline agent configuration overrides
                for testing purposes.
    SortDirection:
      type: string
      enum:
        - asc
        - desc
      title: SortDirection
      description: Valid sort directions.
    StepCollectionsSource:
      properties:
        collectionIds:
          items:
            type: string
          type: array
          title: Collectionids
          default: []
        documentIds:
          items:
            type: string
          type: array
          title: Documentids
          default: []
        documentCollectionMap:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Documentcollectionmap
      type: object
      title: StepCollectionsSource
      description: |-
        Represents selected collection sources attached to a workflow step.
        Lives in the domain layer; CollectionsSourceSelection in the requests
        module extends this to avoid circular imports.

        Attributes:
            collection_ids: Array of collection IDs where the entire collection is selected.
            document_ids: Array of individual document IDs selected.
            document_collection_map: Optional mapping of document ID to its parent collection
                ID. This is a frontend-only UI helper field used for display tracking; the
                backend does not read or process this value.
    StorageUsageResponse:
      properties:
        usedBytes:
          type: integer
          title: Usedbytes
        limitBytes:
          type: integer
          title: Limitbytes
        availableBytes:
          type: integer
          title: Availablebytes
        usagePercent:
          type: number
          title: Usagepercent
      type: object
      required:
        - usedBytes
        - limitBytes
        - availableBytes
        - usagePercent
      title: StorageUsageResponse
      description: |-
        Response for the storage usage endpoint (Settings page).

        Args:
            used_bytes (int): Current storage used in bytes.
            limit_bytes (int): Storage limit in bytes.
            available_bytes (int): Remaining storage available.
            usage_percent (float): Percentage of limit used.
    StreamingChatOptions:
      properties:
        agentType:
          anyOf:
            - $ref: '#/components/schemas/AgentType'
            - type: string
              format: uuid
            - type: string
            - type: 'null'
          title: Agenttype
        intelligentContext:
          type: boolean
          title: Intelligentcontext
          default: true
        webSearch:
          type: boolean
          title: Websearch
          default: true
        reviewSources:
          type: boolean
          title: Reviewsources
          default: false
        isDesktop:
          type: boolean
          title: Isdesktop
          default: false
      type: object
      title: StreamingChatOptions
      description: >-
        Per-request generation options for an SSE chat stream.


        Groups the flags that tune how a single turn is generated so the chat

        request stays flat as new options are added. All fields have defaults,
        so

        an omitted streaming_chat_options object yields the default posture
        (CORE agent,

        intelligent context on, web search on).


        Attributes:
            agent_type (Optional[AgentType | UUID | str]): The agent type or ID to
                use for generation. When None, the handler falls back to CORE.
            intelligent_context (bool): Whether intelligent context assembly is
                enabled for this turn. Defaults to True.
            web_search (bool): Whether the web search tool is permitted for this
                turn. Defaults to True. When False, the web search tool is dropped
                from the tool list sent to the model regardless of the agent's
                configured tools.
            review_sources (bool): Whether the user reviews retrieved passages
                before the model consumes them. Defaults to False. When True, a
                QueryCollections call runs server-side as usual but its result
                is streamed to the client for approval instead of being fed back to
                the model; the turn resumes once the client posts the approved
                chunk ids as the tool result.
            is_desktop (bool): Whether the request originates in the Third Loop
                desktop app. Defaults to False. When False, desktop-only tools
                (those that execute on the user's local machine) are dropped from
                the tool list, so a cloud/web session is never offered a tool it
                cannot run. The desktop client sets this to True.
    SummarizationRequest:
      properties:
        content:
          type: string
          title: Content
        additionalInstructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Additionalinstructions
      type: object
      required:
        - content
      title: SummarizationRequest
    TemplateData:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: string
          title: Id
        name:
          type: string
          title: Name
        s3Key:
          type: string
          title: S3Key
        description:
          type: string
          title: Description
        templateType:
          $ref: '#/components/schemas/TemplateType'
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        layouts:
          anyOf:
            - items:
                $ref: '#/components/schemas/TemplateLayout-Output'
              type: array
            - type: 'null'
          title: Layouts
      type: object
      required:
        - id
        - name
        - s3Key
        - description
        - templateType
      title: TemplateData
    TemplateLayout-Input:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        placeholders:
          items:
            $ref: '#/components/schemas/LayoutPlaceholder'
          type: array
          title: Placeholders
        type:
          type: string
          title: Type
      type: object
      required:
        - id
        - name
        - placeholders
        - type
      title: TemplateLayout
    TemplateLayout-Output:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        placeholders:
          items:
            $ref: '#/components/schemas/LayoutPlaceholder'
          type: array
          title: Placeholders
        type:
          type: string
          title: Type
      type: object
      required:
        - id
        - name
        - placeholders
        - type
      title: TemplateLayout
    TemplateType:
      type: string
      enum:
        - docx
        - pptx
      title: TemplateType
    TextContentBlock:
      properties:
        type:
          type: string
          const: text
          title: Type
          default: text
        text:
          type: string
          title: Text
      type: object
      required:
        - text
      title: TextContentBlock
      description: A text content block in a message.
    TextStyle:
      properties:
        fontSize:
          anyOf:
            - type: number
            - type: 'null'
          title: Fontsize
        bullet:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Bullet
        fontFace:
          anyOf:
            - type: string
            - type: 'null'
          title: Fontface
      type: object
      title: TextStyle
    TimelineAxisMetadata:
      properties:
        xDomainMin:
          type: integer
          title: Xdomainmin
        xDomainMax:
          type: integer
          title: Xdomainmax
        yDomainMin:
          type: number
          title: Ydomainmin
        yDomainMax:
          type: number
          title: Ydomainmax
        hasLiveBucket:
          type: boolean
          title: Haslivebucket
      type: object
      required:
        - xDomainMin
        - xDomainMax
        - yDomainMin
        - yDomainMax
        - hasLiveBucket
      title: TimelineAxisMetadata
      description: |-
        Pre-computed axis rendering information for timeline charts.

        Contains x-axis and y-axis domain information and live bucket detection.
        Tick positioning is handled by the frontend charting library.
    TimelinePoint:
      properties:
        index:
          type: integer
          title: Index
        startTimeMs:
          type: integer
          title: Starttimems
        endTimeMs:
          type: integer
          title: Endtimems
        value:
          type: number
          title: Value
        eventCount:
          type: integer
          title: Eventcount
      type: object
      required:
        - index
        - startTimeMs
        - endTimeMs
        - value
        - eventCount
      title: TimelinePoint
      description: |-
        Single data point in a timeline series.

        Represents one bucket/bar in the timeline chart with
        all necessary rendering and tooltip information.
    TimelineSeries:
      properties:
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        points:
          items:
            $ref: '#/components/schemas/TimelinePoint'
          type: array
          title: Points
        axisMetadata:
          $ref: '#/components/schemas/TimelineAxisMetadata'
      type: object
      required:
        - points
        - axisMetadata
      title: TimelineSeries
      description: |-
        Complete timeline response with data points and axis metadata.

        This is the unified response format for all timeline endpoints,
        containing both the data to plot and the pre-computed rendering info.
    TokenBalancePoint:
      properties:
        timeMs:
          type: integer
          title: Timems
        value:
          type: number
          title: Value
      type: object
      required:
        - timeMs
        - value
      title: TokenBalancePoint
      description: One sample of the organization token balance over time.
    TokenConsumptionResponse:
      properties:
        scaledTokensUsed:
          type: number
          title: Scaledtokensused
        scaledTokensLimit:
          type: number
          title: Scaledtokenslimit
        shortPeriodStartTime:
          type: integer
          title: Shortperiodstarttime
        shortPeriodEndTime:
          type: integer
          title: Shortperiodendtime
        orgSurplusRemaining:
          type: number
          title: Orgsurplusremaining
        utilization:
          type: number
          title: Utilization
          readOnly: true
        utilizationString:
          type: string
          title: Utilizationstring
          readOnly: true
      type: object
      required:
        - scaledTokensUsed
        - scaledTokensLimit
        - shortPeriodStartTime
        - shortPeriodEndTime
        - orgSurplusRemaining
        - utilization
        - utilizationString
      title: TokenConsumptionResponse
    TokenCountResponse:
      properties:
        tokenCount:
          type: integer
          title: Tokencount
        allowed:
          type: boolean
          title: Allowed
        message:
          type: string
          title: Message
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
      type: object
      required:
        - tokenCount
        - allowed
        - message
      title: TokenCountResponse
    TokenMixBreakdown:
      properties:
        input:
          type: integer
          title: Input
          default: 0
        output:
          type: integer
          title: Output
          default: 0
        cacheRead:
          type: integer
          title: Cacheread
          default: 0
        cacheWrite:
          type: integer
          title: Cachewrite
          default: 0
      type: object
      title: TokenMixBreakdown
      description: |-
        Raw token counts for the current day grouped by processing category.

        Counts are unscaled so the card can describe real token volume rather
        than the cost-weighted values used for allowance accounting.
    TokenStatisticsResponse:
      properties:
        currentBalance:
          type: number
          title: Currentbalance
        balanceDeltaPercent:
          type: number
          title: Balancedeltapercent
        balanceHistory:
          items:
            $ref: '#/components/schemas/TokenBalancePoint'
          type: array
          title: Balancehistory
        allowanceUsedPercent:
          type: number
          title: Allowanceusedpercent
        allowanceResetsAt:
          type: string
          format: date-time
          title: Allowanceresetsat
        sharedPoolRemainingPercent:
          type: number
          title: Sharedpoolremainingpercent
        sharedPoolNetPerPeriod:
          type: number
          title: Sharedpoolnetperperiod
        sharedPoolDepletionAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Sharedpooldepletionat
        usersAtLimitCount:
          type: integer
          title: Usersatlimitcount
        heaviestUserId:
          type: string
          title: Heaviestuserid
        heaviestUserSharePercent:
          type: number
          title: Heaviestusersharepercent
        tokensToday:
          type: integer
          title: Tokenstoday
        tokensTodayDeltaPercent:
          type: number
          title: Tokenstodaydeltapercent
        tokenMix:
          $ref: '#/components/schemas/TokenMixBreakdown'
      type: object
      required:
        - currentBalance
        - balanceDeltaPercent
        - balanceHistory
        - allowanceUsedPercent
        - allowanceResetsAt
        - sharedPoolRemainingPercent
        - sharedPoolNetPerPeriod
        - usersAtLimitCount
        - heaviestUserId
        - heaviestUserSharePercent
        - tokensToday
        - tokensTodayDeltaPercent
        - tokenMix
      title: TokenStatisticsResponse
      description: |-
        Aggregated organization token statistics for the admin dashboard card.

        Balance and pool figures are scaled (cost-weighted) values; token mix
        and volume are raw token counts. The two are not comparable and are
        rendered as separate readouts on the client.

        ``tokens_today`` covers the current long period to date, and its delta
        compares against the previous long period at the same offset. The field
        name is retained for client contract stability.
    TokenTimelinePoint:
      properties:
        index:
          type: integer
          title: Index
        startTimeMs:
          type: integer
          title: Starttimems
        endTimeMs:
          type: integer
          title: Endtimems
        value:
          type: number
          title: Value
        eventCount:
          type: integer
          title: Eventcount
        inputValue:
          type: number
          title: Inputvalue
        outputValue:
          type: number
          title: Outputvalue
        cacheReadValue:
          type: number
          title: Cachereadvalue
          default: 0
        cacheWriteValue:
          type: number
          title: Cachewritevalue
          default: 0
      type: object
      required:
        - index
        - startTimeMs
        - endTimeMs
        - value
        - eventCount
        - inputValue
        - outputValue
      title: TokenTimelinePoint
      description: Timeline point carrying scaled input + output token totals.
    TokenTimelineSeries:
      properties:
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        points:
          items:
            $ref: '#/components/schemas/TokenTimelinePoint'
          type: array
          title: Points
        axisMetadata:
          $ref: '#/components/schemas/TimelineAxisMetadata'
      type: object
      required:
        - points
        - axisMetadata
      title: TokenTimelineSeries
      description: One token-consumption timeline series (typically per model).
    ToolArtifactData:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        lockHash:
          type: string
          title: Lockhash
        runtime:
          type: string
          title: Runtime
        runtimeVersion:
          type: string
          title: Runtimeversion
        platform:
          type: string
          title: Platform
        s3Key:
          type: string
          title: S3Key
        sizeBytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sizebytes
        createdAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createdat
        updatedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updatedat
      type: object
      required:
        - id
        - lockHash
        - runtime
        - runtimeVersion
        - platform
        - s3Key
      title: ToolArtifactData
      description: |-
        Persisted representation of a pre-built dependency artifact tarball.

        Carries the lock identity (lock_hash, runtime, runtime_version,
        platform) used to look up or rebuild a reusable artifact.

        Attributes:
            id: Unique identifier for the artifact.
            lock_hash: Hash of the resolved dependency lock used to build the
                artifact.
            runtime: Name of the runtime targeted by the artifact.
            runtime_version: Version of the runtime targeted by the artifact.
            platform: Target platform identifier for the artifact.
            s3_key: S3 key where the artifact tarball is stored.
            size_bytes: Optional size of the artifact in bytes.
            created_at: Optional timestamp when the artifact was created.
            updated_at: Optional timestamp when the artifact was last
                modified.
    ToolCreate:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        displayName:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Displayname
        description:
          anyOf:
            - type: string
              maxLength: 1024
            - type: 'null'
          title: Description
        version:
          type: integer
          title: Version
        isLatestVersion:
          type: boolean
          title: Islatestversion
        purpose:
          type: string
          minLength: 1
          title: Purpose
        text:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Text
        schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Schema
        outputSchema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Outputschema
        handler:
          anyOf:
            - $ref: '#/components/schemas/ToolHandler'
            - type: 'null'
        isCode:
          type: boolean
          title: Iscode
          default: false
        visible:
          $ref: '#/components/schemas/AgentVisibility'
          default: private
        mutable:
          type: boolean
          title: Mutable
          default: true
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        conditions:
          items:
            $ref: '#/components/schemas/TriggerConditionBase'
          type: array
          title: Conditions
        tags:
          items:
            type: string
          type: array
          title: Tags
        codeTool:
          anyOf:
            - $ref: '#/components/schemas/UserToolCreate'
            - type: 'null'
      type: object
      required:
        - name
        - version
        - isLatestVersion
        - purpose
      title: ToolCreate
      description: |-
        Schema for creating a new tool.

        Extends the base schema with optional trigger conditions that can be
        created along with the tool.

        Attributes:
            name: Human-readable name for the tool.
            version: Version string for tracking tool iterations.
            purpose: Brief description of what the tool does.
            text: Detailed tool content or instructions.
            visible: Visibility level of the tool.
            mutable: Whether the tool can be modified.
            owner_id: Optional owner identifier.
            conditions: Optional list of trigger conditions to create with the tool.
            tags: Optional list of tags to attach to the tool.
            code_tool: Optional user code-tool payload when the tool is
                implemented by user-supplied code.
    ToolData:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        displayName:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Displayname
        description:
          anyOf:
            - type: string
              maxLength: 1024
            - type: 'null'
          title: Description
        version:
          type: integer
          title: Version
        isLatestVersion:
          type: boolean
          title: Islatestversion
        purpose:
          type: string
          minLength: 1
          title: Purpose
        text:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Text
        schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Schema
        outputSchema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Outputschema
        handler:
          anyOf:
            - $ref: '#/components/schemas/ToolHandler'
            - type: 'null'
        isCode:
          type: boolean
          title: Iscode
          default: false
        visible:
          $ref: '#/components/schemas/AgentVisibility'
          default: private
        mutable:
          type: boolean
          title: Mutable
          default: true
        id:
          type: string
          format: uuid
          title: Id
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        userToolId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Usertoolid
        permissionLevel:
          anyOf:
            - $ref: '#/components/schemas/PermissionLevel'
            - type: 'null'
        sharedByUserId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sharedbyuserid
        conditions:
          items:
            $ref: '#/components/schemas/TriggerConditionData'
          type: array
          title: Conditions
        tags:
          items:
            type: string
          type: array
          title: Tags
        codeTool:
          anyOf:
            - $ref: '#/components/schemas/UserToolData'
            - type: 'null'
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - name
        - version
        - isLatestVersion
        - purpose
        - id
      title: ToolData
      description: |-
        Full tool representation returned from API responses.

        Includes all base fields plus database-generated fields like id,
        timestamps, and relationships. Supports ORM integration for seamless
        conversion from database entities.

        Attributes:
            id: Unique identifier for the tool.
            name: Human-readable name for the tool.
            version: Version string for tracking tool iterations.
            purpose: Brief description of what the tool does.
            text: Detailed tool content or instructions.
            visible: Visibility level of the tool.
            mutable: Whether the tool can be modified.
            owner_id: Identifier of the tool's owner.
            conditions: List of trigger conditions for this tool.
            tags: List of tag names attached to this tool.
            code_tool: Optional user code-tool data when the tool is
                implemented by user-supplied code.
            permission_level: The caller's share permission level, populated only
                on reads for a tool shared with them; None for owned,
                organization, and system tools. Ignored on the write path.
            shared_by_user_id: The id of the user who shared the tool with the
                caller, populated alongside permission_level.
            created_at: Timestamp when the tool was created.
            updated_at: Timestamp when the tool was last modified.
    ToolFileData:
      properties:
        id:
          type: integer
          title: Id
        relativePath:
          type: string
          title: Relativepath
        s3Key:
          type: string
          title: S3Key
        contentType:
          anyOf:
            - type: string
            - type: 'null'
          title: Contenttype
        sizeBytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sizebytes
        isEntrypoint:
          type: boolean
          title: Isentrypoint
          default: false
      type: object
      required:
        - id
        - relativePath
        - s3Key
      title: ToolFileData
      description: |-
        Persisted representation of a single file belonging to a user tool.

        Attributes:
            id: Database identifier for the file row.
            relative_path: Path of the file relative to the tool bundle root.
            s3_key: S3 key where the file content is stored.
            content_type: Optional MIME type for the file.
            size_bytes: Optional size of the file in bytes.
            is_entrypoint: Whether this file is the tool's entrypoint module.
    ToolFileSpec:
      properties:
        relativePath:
          type: string
          maxLength: 1024
          minLength: 1
          title: Relativepath
        contentType:
          anyOf:
            - type: string
            - type: 'null'
          title: Contenttype
        sizeBytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sizebytes
      type: object
      required:
        - relativePath
      title: ToolFileSpec
      description: |-
        Specification of a single file submitted with a user code tool.

        Attributes:
            relative_path: Path of the file relative to the tool bundle root.
            content_type: Optional MIME type for the file.
            size_bytes: Optional size of the file in bytes.
    ToolHandler:
      type: string
      enum:
        - client
        - server
        - sandbox
        - code
      title: ToolHandler
      description: |-
        Enumeration of execution handlers responsible for invoking a Tool.

        Attributes:
            CLIENT: Tool executed in the browser/client runtime.
            SERVER: Tool executed in-process by the core API server.
            SANDBOX: Tool executed inside the built-in sandbox runtime.
            CODE: Tool whose body is user-uploaded code executed via the
                user-tool sandbox path (see UserTool).
    ToolResultContentBlock:
      properties:
        type:
          type: string
          const: tool_result
          title: Type
          default: tool_result
        toolUseId:
          type: string
          title: Tooluseid
        content:
          anyOf:
            - type: string
            - items:
                anyOf:
                  - $ref: '#/components/schemas/TextContentBlock'
                  - $ref: '#/components/schemas/ImageContentBlock'
              type: array
            - type: 'null'
          title: Content
        isError:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Iserror
      type: object
      required:
        - toolUseId
      title: ToolResultContentBlock
      description: |-
        A tool result content block in a user message.

        Contains the output from a tool invocation, sent back to the model
        so it can incorporate the result into its response.

        Args:
            tool_use_id: The id of the tool_use block this is a response to.
            content: The tool output, either a plain string or a list of
                content blocks (e.g. text, images).
            is_error: Whether the tool invocation resulted in an error.
    ToolResultCreate:
      properties:
        toolResult:
          $ref: '#/components/schemas/ToolResultContentBlock'
        conversationId:
          type: string
          title: Conversationid
      type: object
      required:
        - toolResult
        - conversationId
      title: ToolResultCreate
      description: |-
        Posts a client-executed tool result onto a conversation as a
        terminal write.

        Use this endpoint when the tool result ends the interaction (the
        user took a UI action, the LLM has nothing further to add). To
        resume generation after a client tool, send the same
        ToolResultContentBlock as the content of a /stream request
        instead -- the conversation generator handles tool-result
        content natively and continues reasoning.

        Attributes:
            tool_result (ToolResultContentBlock): The tool result content
                block, paired by tool_use_id to the original tool use.
            conversation_id (str): The conversation the tool use belongs to.
    ToolUpdate:
      properties:
        displayName:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Displayname
        description:
          anyOf:
            - type: string
              maxLength: 1024
            - type: 'null'
          title: Description
        version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version
        isLatestVersion:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Islatestversion
        purpose:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Purpose
        text:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Text
        schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Schema
        outputSchema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Outputschema
        handler:
          anyOf:
            - $ref: '#/components/schemas/ToolHandler'
            - type: 'null'
        codeTool:
          anyOf:
            - $ref: '#/components/schemas/UserToolCreate'
            - type: 'null'
        visible:
          anyOf:
            - $ref: '#/components/schemas/AgentVisibility'
            - type: 'null'
        mutable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Mutable
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        conditions:
          anyOf:
            - items:
                $ref: '#/components/schemas/TriggerConditionBase'
              type: array
            - type: 'null'
          title: Conditions
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
      type: object
      title: ToolUpdate
      description: |-
        Schema for updating an existing tool.

        All fields are optional to support partial updates. Only provided
        fields will be updated on the tool.

        Attributes:
            name: Optional new name for the tool.
            version: Optional new version number.
            is_latest_version: Optional latest version flag.
            purpose: Optional new purpose description.
            text: Optional new tool content.
            output_schema: Optional JSON schema describing the tool response.
            handler (ToolHandler | None): Optional new handler kind. Setting
                this to ToolHandler.CODE flips the tool onto the code-tool
                path on the new version.
            code_tool (UserToolUpdate | None): Optional code-tool payload.
                Three shapes:
                - Includes group_key, entrypoint, and files: a fresh bundle
                  upload. Replaces the prior bundle and its network policy.
                - Includes only enable_network and/or network_endpoints: a
                  network-policy edit. Reuses the prior bundle's files;
                  only the policy changes.
                - Absent (None): reuse the prior bundle and policy
                  unchanged.
            visible: Optional new visibility level.
            mutable: Optional new mutability flag.
            owner_id: Optional owner identifier.
            conditions: Optional list of trigger conditions.
            tags: Optional new list of tags (replaces existing).
    TopTokenUserEntry:
      properties:
        userId:
          type: string
          format: uuid
          title: Userid
        scaledTokens:
          type: number
          title: Scaledtokens
      type: object
      required:
        - userId
        - scaledTokens
      title: TopTokenUserEntry
      description: One ranked user in the top-token-users response.
    TopTokenUsersResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/TopTokenUserEntry'
          type: array
          title: Items
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
        totalScaledTokens:
          type: number
          title: Totalscaledtokens
      type: object
      required:
        - items
        - totalScaledTokens
      title: TopTokenUsersResponse
      description: |-
        Top N users by scaled token consumption over a date range.

        total_scaled_tokens covers all users with consumption in the range,
        not just the returned top N, so the client can derive the share of
        activity that the top N represent.
    TriggerConditionBase:
      properties:
        text:
          type: string
          minLength: 1
          title: Text
        key:
          anyOf:
            - type: integer
            - type: 'null'
          title: Key
      type: object
      required:
        - text
      title: TriggerConditionBase
      description: |-
        Base schema containing common fields for trigger conditions.

        This base class defines the core attributes shared across all trigger
        condition schema variants (create, update, response).

        Attributes:
            text: Description of the condition that triggers the tool.
            key: Optional numeric key for ordering or grouping conditions.
    TriggerConditionData:
      properties:
        text:
          type: string
          minLength: 1
          title: Text
        key:
          anyOf:
            - type: integer
            - type: 'null'
          title: Key
        id:
          type: integer
          title: Id
        toolId:
          type: string
          format: uuid
          title: Toolid
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - text
        - id
        - toolId
      title: TriggerConditionData
      description: |-
        Full trigger condition representation returned from API responses.

        Includes all base fields plus database-generated fields like id
        and timestamps. Supports ORM integration for seamless conversion
        from database entities.

        Attributes:
            id: Unique identifier for the trigger condition.
            text: Description of the condition that triggers the tool.
            key: Optional numeric key for ordering or grouping conditions.
            tool_id: Reference to the parent tool.
            created_at: Timestamp when the condition was created.
            updated_at: Timestamp when the condition was last modified.
    UpdateConversationCollectionsSourcesRequest:
      properties:
        collectionIds:
          items:
            type: string
          type: array
          title: Collectionids
        documentIds:
          items:
            type: string
          type: array
          title: Documentids
      type: object
      title: UpdateConversationCollectionsSourcesRequest
      description: >-
        Request model for updating conversation collection sources.


        The conversation_id is provided via the URL path parameter, not the
        body.

        The frontend sends collection_ids and document_ids; the backend resolves

        these into per-document rows before storage.


        Attributes:
            collection_ids (List[str]): Collection IDs to set.
            document_ids (List[str]): Document IDs to set.
    UpdateOrganizationMetricsConfigurationRequest:
      properties:
        longPeriodScaledTokenLimit:
          anyOf:
            - type: integer
              maximum: 100000000000
              minimum: 0
            - type: 'null'
          title: Longperiodscaledtokenlimit
          description: Scaled token limit for the long period (1 week)
        orgStorageLimit:
          anyOf:
            - type: integer
              maximum: 10995116277760
              minimum: 0
            - type: 'null'
          title: Orgstoragelimit
          description: Storage limit in bytes for the organization
        defaultUserShortPeriodScaledLimit:
          anyOf:
            - type: integer
              maximum: 50000000
              minimum: 0
            - type: 'null'
          title: Defaultusershortperiodscaledlimit
          description: Default short period scaled token limit for new users
        defaultUserStorageLimit:
          anyOf:
            - type: integer
              maximum: 1099511627776
              minimum: 0
            - type: 'null'
          title: Defaultuserstoragelimit
          description: Default storage limit in bytes for new users
      type: object
      title: UpdateOrganizationMetricsConfigurationRequest
      description: |-
        Request model for updating an organization's metrics configuration.

        All fields are optional as only provided fields will be updated.
    UpdateProjectRequest:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
              maxLength: 1024
            - type: 'null'
          title: Description
        userGeneratedContext:
          anyOf:
            - type: string
              maxLength: 16000
            - type: 'null'
          title: Usergeneratedcontext
        aiGeneratedContext:
          anyOf:
            - type: string
              maxLength: 16000
            - type: 'null'
          title: Aigeneratedcontext
        collectionsSources:
          anyOf:
            - $ref: '#/components/schemas/ProjectCollectionsSources'
            - type: 'null'
        agentId:
          anyOf:
            - type: string
              maxLength: 36
            - type: 'null'
          title: Agentid
      type: object
      title: UpdateProjectRequest
      description: Request schema for updating an existing project.
    UpdateTemplateRequest:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
      type: object
      title: UpdateTemplateRequest
      description: |-
        Request payload for updating an existing template.

        All fields are optional; only provided fields will be updated.

        Attributes:
            name: New name for the template.
            description: New description for the template.
            template_data: New template content as a dictionary.

        Example:
            {
                "description": "Updated report format",
                "templateData": {"sections": [...]}
            }
    UpdateWorkflowMetadataRequest:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        visible:
          anyOf:
            - $ref: '#/components/schemas/WorkflowVisibility'
            - type: 'null'
      type: object
      title: UpdateWorkflowMetadataRequest
      description: |-
        Body for a partial workflow metadata update; unset fields are untouched.

        Attributes:
            name: New workflow name, or None to leave the name unchanged.
            description: New workflow description, or None to leave it unchanged.
            visible: New visibility level, or None to leave visibility unchanged.
    UserFileUploadType:
      type: string
      enum:
        - problem_report
        - chat_file
        - ocr_upload
        - template
        - tool_file
      title: UserFileUploadType
    UserMetricsConfigurationData:
      properties:
        userId:
          type: string
          title: Userid
        organizationId:
          type: string
          format: uuid
          title: Organizationid
        shortPeriodScaledTokenLimit:
          type: integer
          title: Shortperiodscaledtokenlimit
        userStorageLimit:
          type: integer
          title: Userstoragelimit
        updatedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updatedat
      type: object
      required:
        - userId
        - organizationId
        - shortPeriodScaledTokenLimit
        - userStorageLimit
      title: UserMetricsConfigurationData
    UserToolCreate:
      properties:
        enableNetwork:
          type: boolean
          title: Enablenetwork
          default: false
        networkEndpoints:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Networkendpoints
        groupKey:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Groupkey
        entrypoint:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Entrypoint
        files:
          anyOf:
            - items:
                $ref: '#/components/schemas/ToolFileSpec'
              type: array
              minItems: 1
            - type: 'null'
          title: Files
      type: object
      title: UserToolCreate
      description: |-
        Embedded inside ToolCreate.code_tool when handler == CODE.

        Attributes:
            group_key: Identifier that groups related uploaded files for the
                tool.
            entrypoint: Relative path of the entrypoint file that exposes the
                tool handler.
            files: Specifications of the files that make up the tool bundle.
    UserToolData:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        enableNetwork:
          type: boolean
          title: Enablenetwork
          default: false
        networkEndpoints:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Networkendpoints
        artifactId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Artifactid
        bundleS3Key:
          anyOf:
            - type: string
            - type: 'null'
          title: Bundles3Key
        bundleVersionKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Bundleversionkey
        bundleEntrypoint:
          anyOf:
            - type: string
            - type: 'null'
          title: Bundleentrypoint
        files:
          items:
            $ref: '#/components/schemas/ToolFileData'
          type: array
          title: Files
        artifact:
          anyOf:
            - $ref: '#/components/schemas/ToolArtifactData'
            - type: 'null'
        createdAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createdat
        updatedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updatedat
      type: object
      required:
        - id
      title: UserToolData
      description: |-
        Persisted representation of a user-uploaded code tool.

        Attributes:
            id: Unique identifier for the user tool row.
            owner_id: Denormalized owner of the user tool, used for ownership
                checks without walking back to a referencing Tool. None for
                internal/system tools (system default).
            enable_network: Whether the tool is permitted to access the
                network during execution.
            network_endpoints: Endpoints the tool is permitted to reach when
                enable_network is true. Always populated when enable_network
                is true (enforced at the database level).
            artifact_id: Optional identifier of the associated dependency
                artifact (user-created-tool path only).
            bundle_s3_key: For seeded sandbox tools, the prebuilt venv+source
                zip key resolved at runtime; None for user-created tools.
            bundle_version_key: Optional immutable bundle key for pinning.
            bundle_entrypoint: For seeded sandbox tools, the handler
                entrypoint relative path (bundle tools have no files rows).
            files: Persisted file specifications for the tool bundle.
            artifact: Optional associated dependency artifact data.
            created_at: Optional timestamp when the user tool was created.
            updated_at: Optional timestamp when the user tool was last
                modified.
    UserToolNetworkConfiguration:
      properties:
        enableNetwork:
          type: boolean
          title: Enablenetwork
          default: false
        networkEndpoints:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Networkendpoints
      type: object
      title: UserToolNetworkConfiguration
      description: |-
        Used for user tool network changes.

        Attributes:
            enable_network: Whether the tool is permitted to access the
                network during execution.
            network_endpoints: Endpoints the tool is permitted to reach when
                enable_network is true. Required (non-empty) whenever
                enable_network is true; must be omitted or null otherwise.
    WorkflowActiveRun:
      properties:
        runId:
          type: string
          format: uuid
          title: Runid
        currentStepIndex:
          type: integer
          title: Currentstepindex
        currentNodeId:
          type: integer
          title: Currentnodeid
        isStepThrough:
          type: boolean
          title: Isstepthrough
          default: false
        reviewSources:
          type: boolean
          title: Reviewsources
          default: false
        isExecuting:
          type: boolean
          title: Isexecuting
          default: false
        steps:
          items:
            $ref: '#/components/schemas/WorkflowRunStep'
          type: array
          title: Steps
      type: object
      required:
        - runId
        - currentStepIndex
        - currentNodeId
        - steps
      title: WorkflowActiveRun
      description: >-
        The in-flight run of a workflow, for the background run panel.


        Returned when a workflow is currently executing for the caller: the
        steps

        completed so far (with their messages) plus the one running step (no
        messages

        until it finishes), and the executing step's index and node id so the
        builder

        can highlight the active node on the canvas.


        Attributes:
            run_id: The active run's conversation id.
            current_step_index: 0-based index of the step currently executing.
            current_node_id: Graph node id of the executing step, for the canvas
                highlight.
            steps: The run's steps so far, ordered by step index.
            is_step_through: Whether this is an interactive step-through run, so the
                builder offers Resume (not View) and reproduces the per-step review.
            review_sources: Whether the run reviews collection sources before a
                collection step, so resume reproduces that pause.
            is_executing: Whether a step is genuinely executing right now (its
                liveness marker is live). False for a paused step-through run, and
                for one whose last step was interrupted mid-flight (its row is left
                RUNNING but the marker is gone): resume should re-execute that node
                rather than wait for a completion that will never arrive.
    WorkflowData-Input:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        graph:
          anyOf:
            - $ref: '#/components/schemas/WorkflowGraphData-Input'
            - type: 'null'
        visible:
          $ref: '#/components/schemas/WorkflowVisibility'
        permissionLevel:
          anyOf:
            - $ref: '#/components/schemas/PermissionLevel'
            - type: 'null'
        sharedByUserId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sharedbyuserid
        isRunning:
          type: boolean
          title: Isrunning
          default: false
        isPaused:
          type: boolean
          title: Ispaused
          default: false
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - id
        - name
        - visible
      title: WorkflowData
      description: >-
        Pydantic model representing a workflow resource.


        A workflow is metadata plus a node/edge graph. The graph is the
        canonical

        definition; it is loaded on single-workflow reads and attached by the

        service layer, and required on the write (PUT) path.


        Attributes:
            id: Unique identifier for the workflow.
            name: Name of the workflow.
            description: Optional description of the workflow.
            owner_id: ID of the user who owns the workflow.
            graph: The node/edge graph definition. Populated on single-workflow
                reads and required on the write (PUT) path.
            visible: Visibility level of the workflow.
            permission_level: The caller's share permission level, populated only
                on reads for a workflow shared with them; None for owned,
                organization, and system workflows. Ignored on the write path.
            shared_by_user_id: The id of the user who shared the workflow with the
                caller, populated alongside permission_level.
            is_running: Whether the caller has a run of this workflow currently
                executing (in the foreground or detached in the background); drives
                the list card's "Running" badge. Stamped on the grouped-list read.
            is_paused: Whether the caller has a step-through run of this workflow
                paused and resumable (left mid-run); drives the list card's "Paused"
                badge. Stamped on the grouped-list read.
            created_at: Timestamp when the workflow was created.
            updated_at: Timestamp when the workflow was last updated.
    WorkflowData-Output:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Ownerid
        graph:
          anyOf:
            - $ref: '#/components/schemas/WorkflowGraphData-Output'
            - type: 'null'
        visible:
          $ref: '#/components/schemas/WorkflowVisibility'
        permissionLevel:
          anyOf:
            - $ref: '#/components/schemas/PermissionLevel'
            - type: 'null'
        sharedByUserId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sharedbyuserid
        isRunning:
          type: boolean
          title: Isrunning
          default: false
        isPaused:
          type: boolean
          title: Ispaused
          default: false
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - id
        - name
        - visible
      title: WorkflowData
      description: >-
        Pydantic model representing a workflow resource.


        A workflow is metadata plus a node/edge graph. The graph is the
        canonical

        definition; it is loaded on single-workflow reads and attached by the

        service layer, and required on the write (PUT) path.


        Attributes:
            id: Unique identifier for the workflow.
            name: Name of the workflow.
            description: Optional description of the workflow.
            owner_id: ID of the user who owns the workflow.
            graph: The node/edge graph definition. Populated on single-workflow
                reads and required on the write (PUT) path.
            visible: Visibility level of the workflow.
            permission_level: The caller's share permission level, populated only
                on reads for a workflow shared with them; None for owned,
                organization, and system workflows. Ignored on the write path.
            shared_by_user_id: The id of the user who shared the workflow with the
                caller, populated alongside permission_level.
            is_running: Whether the caller has a run of this workflow currently
                executing (in the foreground or detached in the background); drives
                the list card's "Running" badge. Stamped on the grouped-list read.
            is_paused: Whether the caller has a step-through run of this workflow
                paused and resumable (left mid-run); drives the list card's "Paused"
                badge. Stamped on the grouped-list read.
            created_at: Timestamp when the workflow was created.
            updated_at: Timestamp when the workflow was last updated.
    WorkflowDecisionNodeData:
      properties:
        id:
          type: integer
          title: Id
        positionX:
          type: number
          title: Positionx
        positionY:
          type: number
          title: Positiony
      type: object
      required:
        - id
        - positionX
        - positionY
      title: WorkflowDecisionNodeData
      description: API representation of a decision (branching) node.
    WorkflowExecutionRequest:
      properties:
        graph:
          $ref: '#/components/schemas/WorkflowGraphData-Input'
        intelligentContext:
          type: boolean
          title: Intelligentcontext
          default: false
        answers:
          anyOf:
            - additionalProperties:
                items:
                  anyOf:
                    - type: string
                    - items:
                        type: string
                      type: array
                type: array
              type: object
            - type: 'null'
          title: Answers
      type: object
      required:
        - graph
      title: WorkflowExecutionRequest
      description: >-
        Request body to start a detached full run via the start-run endpoint.


        The workflow id and run id are taken from the path (POST

        /workflows/{workflow_id}/runs/{run_id}); this body carries only the

        execution inputs. The server walks the supplied graph from its entry
        step,

        following decision branches, and runs each step in turn. The run's root

        prompt is derived server-side from the workflow name, never sent by the

        client.


        Attributes:
            graph (WorkflowGraphData): The workflow graph to execute.
            intelligent_context (bool): Whether to enable intelligent context.
            answers (Optional[dict[int, list[str | list[str]]]]): Optional user
                answers keyed by step-node id, positionally matched to that node's
                questions. A text question's answer is the typed reply (a string). A
                file question's answer is the list of unique keys of the chat
                attachments uploaded (and notified for processing) ahead of the run,
                one per file; the backend resolves them to the files' extracted
                content at execution time.
    WorkflowGraphData-Input:
      properties:
        stepNodes:
          items:
            $ref: '#/components/schemas/WorkflowStepNodeData'
          type: array
          title: Stepnodes
          default: []
        decisionNodes:
          items:
            $ref: '#/components/schemas/WorkflowDecisionNodeData'
          type: array
          title: Decisionnodes
          default: []
        edges:
          items:
            $ref: '#/components/schemas/WorkflowNodeEdgeData-Input'
          type: array
          title: Edges
          default: []
      type: object
      title: WorkflowGraphData
      description: The full node/edge graph for a workflow, split by node kind.
    WorkflowGraphData-Output:
      properties:
        stepNodes:
          items:
            $ref: '#/components/schemas/WorkflowStepNodeData'
          type: array
          title: Stepnodes
          default: []
        decisionNodes:
          items:
            $ref: '#/components/schemas/WorkflowDecisionNodeData'
          type: array
          title: Decisionnodes
          default: []
        edges:
          items:
            $ref: '#/components/schemas/WorkflowNodeEdgeData-Output'
          type: array
          title: Edges
          default: []
      type: object
      title: WorkflowGraphData
      description: The full node/edge graph for a workflow, split by node kind.
    WorkflowNodeEdgeData-Input:
      properties:
        id:
          type: integer
          title: Id
        startNodeId:
          type: integer
          title: Startnodeid
        endNodeId:
          type: integer
          title: Endnodeid
        startPosition:
          $ref: '#/components/schemas/WorkflowNodeSide'
        endPosition:
          $ref: '#/components/schemas/WorkflowNodeSide'
        condition:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/NaturalLanguageCondition'
                - $ref: '#/components/schemas/FallbackCondition'
                - $ref: '#/components/schemas/DeterministicCondition-Input'
              discriminator:
                propertyName: variant
                mapping:
                  deterministic: '#/components/schemas/DeterministicCondition-Input'
                  fallback: '#/components/schemas/FallbackCondition'
                  natural_language: '#/components/schemas/NaturalLanguageCondition'
            - type: 'null'
          title: Condition
        priority:
          type: integer
          title: Priority
          default: 1
      type: object
      required:
        - id
        - startNodeId
        - endNodeId
        - startPosition
        - endPosition
      title: WorkflowNodeEdgeData
      description: |-
        API representation of a directed edge between two nodes.

        Attributes:
            id: Unique identifier for the edge.
            start_node_id: The node the edge starts from.
            end_node_id: The node the edge points to.
            start_position: The side of the origin node the edge leaves.
            end_position: The side of the insertion node the edge enters.
            condition: Optional condition that gates traversal of the edge.
            priority: Ordering priority among edges leaving the same origin node.
    WorkflowNodeEdgeData-Output:
      properties:
        id:
          type: integer
          title: Id
        startNodeId:
          type: integer
          title: Startnodeid
        endNodeId:
          type: integer
          title: Endnodeid
        startPosition:
          $ref: '#/components/schemas/WorkflowNodeSide'
        endPosition:
          $ref: '#/components/schemas/WorkflowNodeSide'
        condition:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/NaturalLanguageCondition'
                - $ref: '#/components/schemas/FallbackCondition'
                - $ref: '#/components/schemas/DeterministicCondition-Output'
              discriminator:
                propertyName: variant
                mapping:
                  deterministic: '#/components/schemas/DeterministicCondition-Output'
                  fallback: '#/components/schemas/FallbackCondition'
                  natural_language: '#/components/schemas/NaturalLanguageCondition'
            - type: 'null'
          title: Condition
        priority:
          type: integer
          title: Priority
          default: 1
      type: object
      required:
        - id
        - startNodeId
        - endNodeId
        - startPosition
        - endPosition
      title: WorkflowNodeEdgeData
      description: |-
        API representation of a directed edge between two nodes.

        Attributes:
            id: Unique identifier for the edge.
            start_node_id: The node the edge starts from.
            end_node_id: The node the edge points to.
            start_position: The side of the origin node the edge leaves.
            end_position: The side of the insertion node the edge enters.
            condition: Optional condition that gates traversal of the edge.
            priority: Ordering priority among edges leaving the same origin node.
    WorkflowNodeSide:
      type: string
      enum:
        - TOP
        - BOTTOM
        - RIGHT
        - LEFT
      title: WorkflowNodeSide
      description: |-
        The side of a node where an edge attaches.

        Attributes:
            TOP: The top edge of the node.
            BOTTOM: The bottom edge of the node.
            RIGHT: The right edge of the node.
            LEFT: The left edge of the node.
    WorkflowRunDetail:
      properties:
        runId:
          type: string
          format: uuid
          title: Runid
        executedAt:
          type: string
          format: date-time
          title: Executedat
        durationMs:
          type: integer
          title: Durationms
        steps:
          items:
            $ref: '#/components/schemas/WorkflowRunStep'
          type: array
          title: Steps
      type: object
      required:
        - runId
        - executedAt
        - durationMs
        - steps
      title: WorkflowRunDetail
      description: 'A full run: its summary fields plus its ordered step details.'
    WorkflowRunStep:
      properties:
        stepIndex:
          type: integer
          title: Stepindex
        nodeId:
          type: integer
          title: Nodeid
        nextNodeId:
          anyOf:
            - type: integer
            - type: 'null'
          title: Nextnodeid
        name:
          type: string
          title: Name
        prompt:
          type: string
          title: Prompt
        collections:
          items:
            type: string
          type: array
          title: Collections
        agent:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent
        tool:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool
        questions:
          items:
            $ref: '#/components/schemas/ReasoningQuestion'
          type: array
          title: Questions
        files:
          items:
            $ref: '#/components/schemas/FileSnapshot'
          type: array
          title: Files
        messages:
          items:
            $ref: '#/components/schemas/MessageData'
          type: array
          title: Messages
        status:
          $ref: '#/components/schemas/WorkflowStepStatus'
      type: object
      required:
        - stepIndex
        - nodeId
        - name
        - prompt
        - collections
        - questions
        - files
        - messages
        - status
      title: WorkflowRunStep
      description: |-
        One step of a run, with its resolved config and generated messages.

        Attributes:
            step_index: 0-based position of the step within the run.
            node_id: The graph step-node id that ran (the redo target on resume).
            next_node_id: The backend-resolved next node, or None when this step is
                terminal (the continue target on resume).
            name: Display name derived from the step prompt.
            prompt: The full step instruction as it ran, snapshotted at run time; the
                point-in-time source the name is derived from, and independent of the
                node's current text.
            collections: Resolved collection names attached to the step.
            agent: Resolved agent name, or None when the step pinned no agent.
            tool: Resolved tool name, or None when the step forced no tool.
            questions: The step's questions and the answers supplied.
            files: File inputs used by the step.
            messages: The run-conversation messages the step generated, in order
                (text plus any tool calls/results), from which the client
                reconstructs the rendered output. Empty for a running, failed, or
                cancelled step that produced none.
            status: Whether the step completed or failed.
    WorkflowRunSummary:
      properties:
        runId:
          type: string
          format: uuid
          title: Runid
        executedAt:
          type: string
          format: date-time
          title: Executedat
        durationMs:
          type: integer
          title: Durationms
      type: object
      required:
        - runId
        - executedAt
        - durationMs
      title: WorkflowRunSummary
      description: |-
        A single past run of a workflow, for the runs-list view.

        Attributes:
            run_id: The run's conversation id, used to open its detail.
            executed_at: When the run started (its first step's start time).
            duration_ms: Wall-clock duration of the run in milliseconds.
    WorkflowStepExecutionRequest:
      properties:
        graph:
          $ref: '#/components/schemas/WorkflowGraphData-Input'
        targetNodeId:
          type: integer
          title: Targetnodeid
        userFeedback:
          anyOf:
            - type: string
            - type: 'null'
          title: Userfeedback
        selectedChunkIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Selectedchunkids
        answers:
          anyOf:
            - additionalProperties:
                items:
                  anyOf:
                    - type: string
                    - items:
                        type: string
                      type: array
                type: array
              type: object
            - type: 'null'
          title: Answers
        isStepThrough:
          type: boolean
          title: Isstepthrough
          default: false
        reviewSources:
          type: boolean
          title: Reviewsources
          default: false
      type: object
      required:
        - graph
        - targetNodeId
      title: WorkflowStepExecutionRequest
      description: >-
        Request body to execute a single workflow step via the execute-step
        endpoint.


        The workflow id and run id are taken from the path (POST

        /workflows/{workflow_id}/runs/{run_id}/steps); this body carries only
        the

        execution inputs. The backend executes the step identified by
        target_node_id,

        reconstructing the run's position and the preceding step's output from
        its

        persisted rows, resolves the next node, and persists the step to the
        run's

        execution history. The client drives the walk one request per step; the

        backend reports the next node, so the client never predicts the path.
        The

        run's root prompt is derived server-side from the workflow name, never
        sent

        by the client.


        Step-through collects a step's inputs lazily, when the step goes active,
        so

        answers carries only the target node's answer(s) for this call.


        Attributes:
            graph (WorkflowGraphData): The workflow graph to execute.
            target_node_id (int): The id of the step node to execute.
            user_feedback (Optional[str]): Optional feedback when redoing a step.
                When present the step is a redo of the run's last step, so the prior
                persisted artifacts for that index are replaced rather than appended.
            selected_chunk_ids (Optional[list[str]]): Pre-selected chunk IDs from a
                Step Through RAG preview. When provided, these specific chunks are
                fetched by ID instead of performing semantic retrieval.
            answers (Optional[dict[int, list[str | list[str]]]]): The target node's
                lazily collected answers, keyed by its step-node id and positionally
                matched to its questions. A file question's answer is the list of
                attachment unique keys, one per uploaded file; see
                WorkflowExecutionRequest.
            is_step_through (bool): Whether this run is client-paced (pauses after
                each step's output for review, or to review sources). Persisted on
                the step row so the run can resume.
            review_sources (bool): Whether this run pauses to review retrieved
                sources before a collection step. Persisted on the step row.
    WorkflowStepNodeData:
      properties:
        id:
          type: integer
          title: Id
        positionX:
          type: number
          title: Positionx
        positionY:
          type: number
          title: Positiony
        prompt:
          type: string
          title: Prompt
        questions:
          items:
            $ref: '#/components/schemas/NodeInput'
          type: array
          title: Questions
          default: []
        agentId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Agentid
        toolId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Toolid
        collections:
          anyOf:
            - $ref: '#/components/schemas/StepCollectionsSource'
            - type: 'null'
      type: object
      required:
        - id
        - positionX
        - positionY
        - prompt
      title: WorkflowStepNodeData
      description: API representation of a step node with its prompt and inputs.
    WorkflowStepStatus:
      type: string
      enum:
        - running
        - completed
        - failed
        - cancelled
      title: WorkflowStepStatus
      description: >-
        Lifecycle status of a single executed workflow step.


        A step's row is opened with RUNNING when it starts executing and settled
        to

        a terminal status when it finishes: COMPLETED or FAILED for a step that

        ran, or CANCELLED for the pending step a run was stopped before (that

        placeholder row is created terminal; the step never started). A row left

        RUNNING after its run stopped means the worker died mid-step; liveness
        (the

        run-status marker) tells that apart from a step genuinely executing.
    WorkflowVisibility:
      type: string
      enum:
        - internal
        - system
        - private
        - public
      title: WorkflowVisibility
      description: |-
        Enumeration defining categories for visibility of Workflows.

        Attributes:
            INTERNAL: Open to only the system. Written internally and not able to be viewed.
                        Used to protect privacy of core system workflows from the users.
            SYSTEM: System-owned workflow visible to all users for selection.
                    Immutable. Cannot be modified by end users.
            PRIVATE: Open to only the owner.
            PUBLIC: Open to all users, all users can view and reference.
    app__schemas__domain__agents__agent__AgentData__Sparse:
      properties:
        permissionLevel:
          anyOf:
            - $ref: '#/components/schemas/PermissionLevel'
            - type: 'null'
        sharedByUserId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sharedbyuserid
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        version:
          type: integer
          title: Version
        visible:
          anyOf:
            - $ref: '#/components/schemas/AgentVisibility'
            - type: 'null'
      type: object
      required:
        - id
        - name
        - version
      title: Sparse
      description: |-
        Sparse representation of the AgentData.

        Attributes:
            id: Unique identifier for the agent.
            name: Identiying name for the agent.
            display_name: Human-readable name for the agent.
    app__schemas__domain__agents__instruction__InstructionData__Sparse:
      properties:
        permissionLevel:
          anyOf:
            - $ref: '#/components/schemas/PermissionLevel'
            - type: 'null'
        sharedByUserId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sharedbyuserid
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        visible:
          anyOf:
            - $ref: '#/components/schemas/AgentVisibility'
            - type: 'null'
      type: object
      required:
        - id
        - name
      title: Sparse
      description: Sparse representation of the InstructionData.
    app__schemas__domain__agents__tool__ToolData__Sparse:
      properties:
        permissionLevel:
          anyOf:
            - $ref: '#/components/schemas/PermissionLevel'
            - type: 'null'
        sharedByUserId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sharedbyuserid
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        version:
          type: integer
          title: Version
        visible:
          anyOf:
            - $ref: '#/components/schemas/AgentVisibility'
            - type: 'null'
        outputSchema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Outputschema
      type: object
      required:
        - id
        - name
        - version
      title: Sparse
      description: |-
        Minimal tool representation for list and grouped responses.

        Attributes:
            id (UUID): Unique identifier for the tool.
            name (str): Identifying name for the tool.
            display_name (str | None): Human-readable name for the tool.
            description (str | None): Short description of the tool.
            version (int): Schema version of the tool.
            visible (AgentVisibility | None): Visibility level of the tool.
            output_schema (dict | None): JSON schema describing the tool's
                output, when known.
