{
  "openapi": "3.0.0",
  "info": {
    "title": "@sippulse_ai/server",
    "version": "1.17.0",
    "description": "Server for SIPPulse AI",
    "contact": {
      "name": "Pedro Loch",
      "email": "pedro@voffice.com.br"
    }
  },
  "paths": {
    "/agents/{id}/outbound-call": {
      "post": {
        "x-controller-name": "AgentsController",
        "x-operation-name": "makeOutboundCall",
        "tags": [
          "AgentsController"
        ],
        "summary": "Make outbound call using agent's outbound trunk",
        "responses": {
          "200": {
            "description": "Outbound call initiated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutboundCallResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OutboundCallRequest"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "AgentsController.makeOutboundCall"
      }
    },
    "/agents/{id}": {
      "patch": {
        "x-controller-name": "AgentsController",
        "x-operation-name": "updateById",
        "tags": [
          "AgentsController"
        ],
        "summary": "Update Agent by ID",
        "description": "Update an agent by its ID",
        "responses": {
          "204": {
            "description": "Agent PATCH success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentWithExtensionPartialExcluding_user_id-organization_id_"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "AgentsController.updateById"
      },
      "get": {
        "x-controller-name": "AgentsController",
        "x-operation-name": "findById",
        "tags": [
          "AgentsController"
        ],
        "summary": "Find Agent by ID",
        "description": "Find an agent by its ID",
        "responses": {
          "200": {
            "description": "Agent model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentWithExtensionWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AgentsController.findById"
      },
      "delete": {
        "x-controller-name": "AgentsController",
        "x-operation-name": "deleteById",
        "tags": [
          "AgentsController"
        ],
        "summary": "Delete Agent by ID",
        "description": "Delete an agent by its ID",
        "responses": {
          "204": {
            "description": "Agent DELETE success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AgentsController.deleteById"
      }
    },
    "/agents": {
      "post": {
        "x-controller-name": "AgentsController",
        "x-operation-name": "create",
        "tags": [
          "AgentsController"
        ],
        "summary": "Create Agent",
        "description": "Create a new agent",
        "responses": {
          "200": {
            "description": "Agent model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentWithExtension"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentBody"
              }
            }
          }
        },
        "operationId": "AgentsController.create"
      },
      "get": {
        "x-controller-name": "AgentsController",
        "x-operation-name": "find",
        "tags": [
          "AgentsController"
        ],
        "summary": "List Agents",
        "description": "Get the list of Agent models",
        "responses": {
          "200": {
            "description": "Array of Agent model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentWithExtensionWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent.Filter"
                }
              }
            }
          }
        ],
        "operationId": "AgentsController.find"
      }
    },
    "/anonymize/entities/{language}": {
      "get": {
        "x-controller-name": "AnonymizeController",
        "x-operation-name": "entities",
        "tags": [
          "AnonymizeController"
        ],
        "summary": "Get Entities By Language",
        "responses": {
          "200": {
            "description": "List of entities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "language",
            "in": "path",
            "schema": {
              "enum": [
                "en",
                "pt"
              ],
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AnonymizeController.entities"
      }
    },
    "/anonymize": {
      "post": {
        "x-controller-name": "AnonymizeController",
        "x-operation-name": "anonymize",
        "tags": [
          "AnonymizeController"
        ],
        "summary": "Anonymize Text",
        "responses": {
          "200": {
            "description": "Anonymized text",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnonymizerBodyExcluding_segments_"
              }
            }
          }
        },
        "operationId": "AnonymizeController.anonymize"
      }
    },
    "/api-keys/count": {
      "get": {
        "x-controller-name": "ApiKeysController",
        "x-operation-name": "count",
        "tags": [
          "ApiKeysController"
        ],
        "summary": "Count Api Keys",
        "description": "Get the count of ApiKey models",
        "responses": {
          "200": {
            "description": "ApiKey model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "ApiKey.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<ApiKey>"
                }
              }
            }
          }
        ],
        "operationId": "ApiKeysController.count"
      }
    },
    "/api-keys/usage/compare": {
      "get": {
        "x-controller-name": "ApiKeysController",
        "x-operation-name": "compareUsage",
        "tags": [
          "ApiKeysController"
        ],
        "summary": "Compare Usage Across Multiple API Keys",
        "description": "Compare cost and usage statistics across multiple API keys owned by the user",
        "responses": {
          "200": {
            "description": "Comparison of API keys usage",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "api_key_id": {
                        "type": "string"
                      },
                      "api_key_name": {
                        "type": "string"
                      },
                      "total_cost": {
                        "type": "number"
                      },
                      "total_requests": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "api_key_ids",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "ApiKeysController.compareUsage"
      }
    },
    "/api-keys/usage/summary": {
      "get": {
        "x-controller-name": "ApiKeysController",
        "x-operation-name": "getUsageSummary",
        "tags": [
          "ApiKeysController"
        ],
        "summary": "Get API Key Usage Summary",
        "description": "Get cost summary and usage statistics for all API keys owned by the user",
        "responses": {
          "200": {
            "description": "API key usage summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "total_cost": {
                      "type": "number"
                    },
                    "total_requests": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "period": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "first_usage": {
                      "type": "string",
                      "nullable": true
                    },
                    "last_usage": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "ApiKeysController.getUsageSummary"
      }
    },
    "/api-keys/{id}/usage/aggregated": {
      "get": {
        "x-controller-name": "ApiKeysController",
        "x-operation-name": "getUsageAggregated",
        "tags": [
          "ApiKeysController"
        ],
        "summary": "Get API Key Usage Aggregated",
        "description": "Get aggregated usage data for a specific API key grouped by time period, type, or identifier",
        "responses": {
          "200": {
            "description": "API key usage aggregated data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "period": {
                        "type": "string",
                        "nullable": true
                      },
                      "charge_type": {
                        "type": "string",
                        "nullable": true
                      },
                      "charge_subtype": {
                        "type": "string",
                        "nullable": true
                      },
                      "identifier": {
                        "type": "string",
                        "nullable": true
                      },
                      "total_cost": {
                        "type": "number"
                      },
                      "total_requests": {
                        "type": "number"
                      },
                      "total_usage": {
                        "type": "number"
                      },
                      "unit": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "start_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_unit",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "ApiKeysController.getUsageAggregated"
      }
    },
    "/api-keys/{id}/usage/details": {
      "get": {
        "x-controller-name": "ApiKeysController",
        "x-operation-name": "getUsageDetails",
        "tags": [
          "ApiKeysController"
        ],
        "summary": "Get API Key Usage Details",
        "description": "Get detailed usage records for a specific API key with filtering and pagination",
        "responses": {
          "200": {
            "description": "API key usage details with pagination",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UsageRequestWithRelations"
                      }
                    },
                    "count": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageRequest.Filter"
                }
              }
            }
          }
        ],
        "operationId": "ApiKeysController.getUsageDetails"
      }
    },
    "/api-keys/{id}/usage/summary": {
      "get": {
        "x-controller-name": "ApiKeysController",
        "x-operation-name": "getUsageSummaryById",
        "tags": [
          "ApiKeysController"
        ],
        "summary": "Get API Key Usage Summary by ID",
        "description": "Get cost summary and usage statistics for a specific API key",
        "responses": {
          "200": {
            "description": "API key usage summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "api_key_id": {
                      "type": "string"
                    },
                    "api_key_name": {
                      "type": "string"
                    },
                    "total_cost": {
                      "type": "number"
                    },
                    "total_requests": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "period": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "first_usage": {
                      "type": "string",
                      "nullable": true
                    },
                    "last_usage": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "start_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "ApiKeysController.getUsageSummaryById"
      }
    },
    "/api-keys/{id}": {
      "patch": {
        "x-controller-name": "ApiKeysController",
        "x-operation-name": "updateById",
        "tags": [
          "ApiKeysController"
        ],
        "summary": "Update Api Key",
        "description": "Update an ApiKey model instance",
        "responses": {
          "204": {
            "description": "ApiKey PATCH success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyPartialExcluding_created_at-hint-key-user_id-last_used_at_"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "ApiKeysController.updateById"
      },
      "get": {
        "x-controller-name": "ApiKeysController",
        "x-operation-name": "findById",
        "tags": [
          "ApiKeysController"
        ],
        "summary": "Get Api Key",
        "description": "Get an ApiKey model instance by id",
        "responses": {
          "200": {
            "description": "ApiKey model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyExcluding_key_WithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey.Filter"
                }
              }
            }
          }
        ],
        "operationId": "ApiKeysController.findById"
      },
      "delete": {
        "x-controller-name": "ApiKeysController",
        "x-operation-name": "deleteById",
        "tags": [
          "ApiKeysController"
        ],
        "summary": "Delete Api Key",
        "description": "Delete an ApiKey model instance",
        "responses": {
          "204": {
            "description": "ApiKey DELETE success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ApiKeysController.deleteById"
      }
    },
    "/api-keys": {
      "post": {
        "x-controller-name": "ApiKeysController",
        "x-operation-name": "create",
        "tags": [
          "ApiKeysController"
        ],
        "summary": "Create Api Key",
        "description": "Create a new API key",
        "responses": {
          "200": {
            "description": "ApiKey model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "for_user_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewApiKey"
              }
            }
          }
        },
        "operationId": "ApiKeysController.create"
      },
      "get": {
        "x-controller-name": "ApiKeysController",
        "x-operation-name": "find",
        "tags": [
          "ApiKeysController"
        ],
        "summary": "List Api Keys",
        "description": "Get the list of ApiKey models",
        "responses": {
          "200": {
            "description": "Array of ApiKey model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyExcluding_key_WithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey.Filter1"
                }
              }
            }
          },
          {
            "name": "target_user_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "ApiKeysController.find"
      }
    },
    "/asr/batch/{request_id}/status": {
      "get": {
        "x-controller-name": "AsrController",
        "x-operation-name": "batchStatus",
        "tags": [
          "AsrController"
        ],
        "summary": "Get Batch Transcription Status",
        "description": "Poll for the result of a batch transcription. Returns in_progress while processing, completed with result when done.",
        "responses": {
          "200": {
            "description": "Batch transcription status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "in_progress",
                        "completed",
                        "failed"
                      ]
                    },
                    "result": {
                      "type": "object"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "request_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AsrController.batchStatus"
      }
    },
    "/asr/models": {
      "get": {
        "x-controller-name": "AsrController",
        "x-operation-name": "models",
        "tags": [
          "AsrController"
        ],
        "summary": "List ASR Models",
        "description": "List all ASR models",
        "responses": {
          "200": {
            "description": "List of all ASR models",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive"
              ]
            },
            "required": false,
            "default": "active",
            "description": "Model status"
          }
        ],
        "operationId": "AsrController.models"
      }
    },
    "/asr/transcribe/batch": {
      "post": {
        "x-controller-name": "AsrController",
        "x-operation-name": "transcribeBatch",
        "tags": [
          "AsrController"
        ],
        "summary": "Submit Batch Transcription",
        "description": "Submit audio for async transcription. Returns a request_id immediately. Poll GET /asr/batch/{request_id}/status for the result. Only supported for RunPod serverless models (pulse-precision, pulse-precision-pro).",
        "responses": {
          "202": {
            "description": "Batch transcription submitted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "submitted"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "model",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "temperature",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "response_format",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "input_sample_rate",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "description": "If the input file is a PCM file, specify the sample rate. Default is 8000"
          },
          {
            "name": "preset",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-bot-id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-room-name",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-request-id",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Optional client-provided request ID (must be a valid UUID). Used to track billing and poll status via GET /asr/batch/{request_id}/status. If not provided, the server generates one."
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "x-parser": "stream",
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          },
          "description": "Request body for multipart/form-data based file upload",
          "required": true
        },
        "operationId": "AsrController.transcribeBatch"
      }
    },
    "/asr/transcribe": {
      "post": {
        "x-controller-name": "AsrController",
        "x-operation-name": "transcribe",
        "tags": [
          "AsrController"
        ],
        "summary": "Transcribe an Audio",
        "description": "Transcribe an audio file to text",
        "responses": {
          "200": {
            "description": "Áudio Text To Speech",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "model",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "temperature",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "response_format",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "input_sample_rate",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "description": "If the input file is a PCM file, specify the sample rate. Default is 8000"
          },
          {
            "name": "insights",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "default": ""
                }
              }
            }
          },
          {
            "name": "anonymize",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "default": ""
                }
              }
            }
          },
          {
            "name": "preset",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-bot-id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-room-name",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-request-id",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Optional request ID for sync recovery (must be a valid UUID or 'auto'). If provided, the transcription is tracked and can be retrieved via GET /asr/batch/{request_id}/status in case of timeout. Use 'auto' to let the server generate the ID."
          },
          {
            "name": "x-job-id",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Deprecated: use x-request-id instead. Kept for backward compatibility."
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "x-parser": "stream",
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          },
          "description": "Request body for multipart/form-data based file upload",
          "required": true
        },
        "operationId": "AsrController.transcribe"
      }
    },
    "/billing/history": {
      "get": {
        "x-controller-name": "BillingController",
        "x-operation-name": "history",
        "tags": [
          "BillingController"
        ],
        "summary": "Billing history",
        "description": "Get billing history",
        "responses": {
          "200": {
            "description": "Billing history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CreditTransactions"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditTransactions.Filter"
                }
              }
            }
          }
        ],
        "operationId": "BillingController.history"
      }
    },
    "/forgot-password": {
      "post": {
        "x-controller-name": "AuthenticationController",
        "x-operation-name": "forgotPassword",
        "tags": [
          "AuthenticationController"
        ],
        "summary": "Forgot password",
        "description": "Recover password by email",
        "responses": {
          "200": {
            "description": "Forgot password",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  }
                }
              }
            }
          }
        },
        "operationId": "AuthenticationController.forgotPassword"
      }
    },
    "/health": {
      "get": {
        "x-controller-name": "PingController",
        "x-operation-name": "health",
        "tags": [
          "PingController"
        ],
        "responses": {
          "200": {
            "description": "Health Check Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        },
        "operationId": "PingController.health"
      }
    },
    "/knowledge/{collection_name}/add": {
      "post": {
        "x-controller-name": "KnowledgeBaseController",
        "x-operation-name": "addDocuments",
        "tags": [
          "KnowledgeBaseController"
        ],
        "summary": "Add documents to a knowledge collection",
        "responses": {
          "204": {
            "description": "Add documents to a collection"
          }
        },
        "parameters": [
          {
            "name": "collection_name",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "KnowledgeBaseController.addDocuments"
      }
    },
    "/knowledge/{collection_name}/document/{document_id}": {
      "delete": {
        "x-controller-name": "KnowledgeBaseController",
        "x-operation-name": "deleteDocument",
        "tags": [
          "KnowledgeBaseController"
        ],
        "summary": "Delete a document from a knowledge collection",
        "responses": {
          "204": {
            "description": "Document deleted from collection"
          }
        },
        "parameters": [
          {
            "name": "collection_name",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "document_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "KnowledgeBaseController.deleteDocument"
      }
    },
    "/knowledge/{collection_name}/file": {
      "post": {
        "x-controller-name": "KnowledgeBaseController",
        "x-operation-name": "addFileToCollection",
        "tags": [
          "KnowledgeBaseController"
        ],
        "summary": "Add a file to a knowledge collection",
        "responses": {
          "204": {
            "description": "File added to collection"
          }
        },
        "parameters": [
          {
            "name": "collection_name",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "x-parser": "stream",
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          },
          "description": "Request body for multipart/form-data based file upload",
          "required": true,
          "x-parameter-index": 1
        },
        "operationId": "KnowledgeBaseController.addFileToCollection"
      }
    },
    "/knowledge/{collection_name}/query": {
      "post": {
        "x-controller-name": "KnowledgeBaseController",
        "x-operation-name": "queryCollection",
        "tags": [
          "KnowledgeBaseController"
        ],
        "summary": "Query a knowledge collection",
        "responses": {
          "200": {
            "description": "Query results from a collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "collection_name",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeQueryBody"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "KnowledgeBaseController.queryCollection"
      }
    },
    "/knowledge/{collection_name}/sync": {
      "post": {
        "x-controller-name": "KnowledgeBaseController",
        "x-operation-name": "syncCollection",
        "tags": [
          "KnowledgeBaseController"
        ],
        "summary": "Sync documents to a knowledge collection",
        "responses": {
          "204": {
            "description": "Documents synced to collection"
          }
        },
        "parameters": [
          {
            "name": "collection_name",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "KnowledgeBaseController.syncCollection"
      }
    },
    "/knowledge/{collection_name}/web-scrape": {
      "post": {
        "x-controller-name": "KnowledgeBaseController",
        "x-operation-name": "addWebScrape",
        "tags": [
          "KnowledgeBaseController"
        ],
        "summary": "Add web scrape to a knowledge collection",
        "responses": {
          "204": {
            "description": "Web scrape added to collection"
          }
        },
        "parameters": [
          {
            "name": "collection_name",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScrapeWebsiteConfig"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "KnowledgeBaseController.addWebScrape"
      }
    },
    "/knowledge/{collection_name}": {
      "post": {
        "x-controller-name": "KnowledgeBaseController",
        "x-operation-name": "createCollection",
        "tags": [
          "KnowledgeBaseController"
        ],
        "summary": "Create a new knowledge collection",
        "description": "Creates a new knowledge collection. Requires X-Project-ID header with a valid project UUID.",
        "responses": {
          "200": {
            "description": "Create a new collection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeCollectionExcluding_documents_"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - X-Project-ID header is required"
          }
        },
        "parameters": [
          {
            "name": "collection_name",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "description"
                ],
                "properties": {
                  "model_name": {
                    "type": "string",
                    "nullable": true
                  },
                  "description": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "KnowledgeBaseController.createCollection"
      },
      "patch": {
        "x-controller-name": "KnowledgeBaseController",
        "x-operation-name": "updateCollection",
        "tags": [
          "KnowledgeBaseController"
        ],
        "summary": "Update an existing knowledge collection",
        "responses": {
          "204": {
            "description": "Update a collection"
          }
        },
        "parameters": [
          {
            "name": "collection_name",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model_name": {
                    "type": "string",
                    "nullable": true
                  },
                  "description": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "KnowledgeBaseController.updateCollection"
      },
      "get": {
        "x-controller-name": "KnowledgeBaseController",
        "x-operation-name": "getCollection",
        "tags": [
          "KnowledgeBaseController"
        ],
        "summary": "Get a specific knowledge collection",
        "responses": {
          "200": {
            "description": "Get a specific collection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeCollectionExcluding_documents_"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "collection_name",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "KnowledgeBaseController.getCollection"
      },
      "delete": {
        "x-controller-name": "KnowledgeBaseController",
        "x-operation-name": "deleteCollection",
        "tags": [
          "KnowledgeBaseController"
        ],
        "summary": "Delete a knowledge collection",
        "responses": {
          "204": {
            "description": "Collection deleted"
          }
        },
        "parameters": [
          {
            "name": "collection_name",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "KnowledgeBaseController.deleteCollection"
      }
    },
    "/knowledge": {
      "get": {
        "x-controller-name": "KnowledgeBaseController",
        "x-operation-name": "getKnowledge",
        "tags": [
          "KnowledgeBaseController"
        ],
        "summary": "Get all knowledge collections",
        "responses": {
          "200": {
            "description": "Get all collections",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KnowledgeCollectionExcluding_documents_"
                  }
                }
              }
            }
          }
        },
        "operationId": "KnowledgeBaseController.getKnowledge"
      }
    },
    "/llms/completion": {
      "post": {
        "x-controller-name": "LLMsController",
        "x-operation-name": "completion",
        "tags": [
          "LLMsController"
        ],
        "summary": "Chat Completion",
        "description": "Complete text generation task",
        "responses": {
          "200": {
            "description": "Chat completion",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletion"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompletionRequest"
              }
            }
          },
          "description": "Chat completion request"
        },
        "operationId": "LLMsController.completion"
      }
    },
    "/llms/models": {
      "get": {
        "x-controller-name": "LLMsController",
        "x-operation-name": "models",
        "tags": [
          "LLMsController"
        ],
        "summary": "LLM Models",
        "description": "List of all LLM models",
        "responses": {
          "200": {
            "description": "List of all LLM models",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive"
              ]
            },
            "required": false,
            "default": "active",
            "description": "Model status"
          }
        ],
        "operationId": "LLMsController.models"
      }
    },
    "/login": {
      "post": {
        "x-controller-name": "AuthenticationController",
        "x-operation-name": "login",
        "tags": [
          "AuthenticationController"
        ],
        "summary": "Login",
        "description": "Login with email and password",
        "responses": {
          "200": {
            "description": "Login for user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaCredentials"
              }
            }
          }
        },
        "operationId": "AuthenticationController.login"
      }
    },
    "/me": {
      "get": {
        "x-controller-name": "AuthenticationController",
        "x-operation-name": "me",
        "tags": [
          "AuthenticationController"
        ],
        "summary": "User Profile",
        "description": "Get the current user profile",
        "responses": {
          "200": {
            "description": "Get current user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessTokenSession"
                }
              }
            }
          }
        },
        "operationId": "AuthenticationController.me"
      }
    },
    "/models": {
      "get": {
        "x-controller-name": "ModelsController",
        "x-operation-name": "find",
        "tags": [
          "ModelsController"
        ],
        "summary": "Get Models",
        "description": "Get all models",
        "responses": {
          "200": {
            "description": "Array of Model model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ModelWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Model.Filter"
                }
              }
            }
          }
        ],
        "operationId": "ModelsController.find"
      }
    },
    "/openai/audio/speech": {
      "post": {
        "x-controller-name": "OpenAiController",
        "x-operation-name": "speech",
        "tags": [
          "OpenAiController"
        ],
        "summary": "Open AI compatible endpoint",
        "description": "Generate audio from text",
        "responses": {
          "200": {
            "description": "Audio Text To Speech"
          }
        },
        "parameters": [
          {
            "name": "x-bot-id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-room-name",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpeechBodyParams"
              }
            }
          }
        },
        "operationId": "OpenAiController.speech"
      }
    },
    "/openai/audio/transcriptions": {
      "post": {
        "x-controller-name": "OpenAiController",
        "x-operation-name": "transcriptions",
        "tags": [
          "OpenAiController"
        ],
        "summary": "Transcribe an Audio Adapter to Open AI",
        "description": "Transcribe an audio file to text",
        "responses": {
          "200": {
            "description": "Áudio Text To Speech",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "x-bot-id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-room-name",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "x-parser": "stream",
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          },
          "description": "Request body for multipart/form-data based file upload",
          "required": true
        },
        "operationId": "OpenAiController.transcriptions"
      }
    },
    "/openai/chat/completions": {
      "post": {
        "x-controller-name": "OpenAiController",
        "x-operation-name": "completions",
        "tags": [
          "OpenAiController"
        ],
        "summary": "Chat Completion",
        "description": "Endpoint designed to be compatible with OpenAI SDK",
        "responses": {
          "200": {
            "description": "Chat completion",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletion"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompletionRequest"
              }
            }
          },
          "description": "Chat completion request"
        },
        "operationId": "OpenAiController.completions"
      }
    },
    "/openai/embeddings": {
      "post": {
        "x-controller-name": "OpenAiController",
        "x-operation-name": "embeddings",
        "tags": [
          "OpenAiController"
        ],
        "summary": "OpenAI-compatible embeddings endpoint",
        "description": "Generate embeddings for text input. Compatible with OpenAI /v1/embeddings format.",
        "responses": {
          "200": {
            "description": "Embedding response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "example": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "example": "embedding"
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        }
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input",
                  "model"
                ],
                "properties": {
                  "input": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ],
                    "description": "Text to embed"
                  },
                  "model": {
                    "type": "string",
                    "description": "Model name"
                  },
                  "dimensions": {
                    "type": "number",
                    "description": "Output dimensions (Matryoshka truncation)"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ],
                    "default": "float"
                  }
                }
              }
            }
          }
        },
        "operationId": "OpenAiController.embeddings"
      }
    },
    "/organization/available-dids": {
      "get": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "availableDids",
        "tags": [
          "OrganizationController"
        ],
        "summary": "Available DIDs",
        "description": "Get available DIDs for the organization with usage information",
        "responses": {
          "200": {
            "description": "Array of available DIDs with usage info",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "did": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string",
                        "nullable": true
                      },
                      "status": {
                        "type": "string"
                      },
                      "in_use": {
                        "type": "boolean"
                      },
                      "used_by_agent_id": {
                        "type": "string",
                        "nullable": true
                      },
                      "used_by_agent_name": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "OrganizationController.availableDids"
      }
    },
    "/organization/credits": {
      "get": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "credits",
        "tags": [
          "OrganizationController"
        ],
        "summary": "Organization Credits",
        "description": "Get organization credits",
        "responses": {
          "200": {
            "description": "Organization credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationCredits"
                }
              }
            }
          }
        },
        "operationId": "OrganizationController.credits"
      }
    },
    "/organization/pricing": {
      "get": {
        "x-controller-name": "PricingController",
        "x-operation-name": "getoOrgPricing",
        "tags": [
          "PricingController"
        ],
        "summary": "Pricing",
        "description": "Get models pricing",
        "responses": {
          "200": {
            "description": "Array of ModelSubscription model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PricingWithRelations"
                  }
                }
              }
            }
          }
        },
        "operationId": "PricingController.getoOrgPricing"
      }
    },
    "/organizations/{id}/delete": {
      "post": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "deleteOrganization",
        "tags": [
          "OrganizationController"
        ],
        "summary": "Delete Organization",
        "description": "Soft-delete an organization immediately. Data is retained for 30 days for emergency restoration via admin. Only owners can delete.",
        "responses": {
          "200": {
            "description": "Organization deleted"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "OrganizationController.deleteOrganization"
      }
    },
    "/organizations/{id}/leave": {
      "post": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "leaveOrganization",
        "tags": [
          "OrganizationController"
        ],
        "summary": "Leave Organization",
        "description": "Leave an organization. Cannot leave if sole owner or if this is the user's only organization.",
        "responses": {
          "200": {
            "description": "Left organization successfully"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "OrganizationController.leaveOrganization"
      }
    },
    "/organizations/{id}/transfer-ownership": {
      "post": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "transferOwnership",
        "tags": [
          "OrganizationController"
        ],
        "summary": "Transfer Ownership",
        "description": "Transfer owner role to another active member. Current owner keeps their role (multiple owners allowed).",
        "responses": {
          "200": {
            "description": "Ownership transferred successfully"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "target_user_id"
                ],
                "properties": {
                  "target_user_id": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "OrganizationController.transferOwnership"
      }
    },
    "/organizations": {
      "post": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "createOrganization",
        "tags": [
          "OrganizationController"
        ],
        "summary": "Create Organization",
        "description": "Create a new organization (self-service). The current user becomes the owner.",
        "responses": {
          "201": {
            "description": "Created organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationExcluding_created_at-updated_at-deleted_at-founder_id_"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 255
                  },
                  "key": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 40,
                    "pattern": "^[a-z0-9-]+$"
                  },
                  "currency": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3,
                    "default": "USD"
                  }
                }
              }
            }
          }
        },
        "operationId": "OrganizationController.createOrganization"
      }
    },
    "/permissions/grouped": {
      "get": {
        "x-controller-name": "PermissionController",
        "x-operation-name": "findGrouped",
        "tags": [
          "PermissionController"
        ],
        "summary": "List permissions grouped by resource",
        "description": "Get all permissions grouped by resource for UI display",
        "responses": {
          "200": {
            "description": "Array of permission groups",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "resource": {
                        "type": "string"
                      },
                      "permissions": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/Permission"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "PermissionController.findGrouped"
      }
    },
    "/permissions": {
      "get": {
        "x-controller-name": "PermissionController",
        "x-operation-name": "find",
        "tags": [
          "PermissionController"
        ],
        "summary": "List all permissions",
        "description": "Get all available permissions in the system",
        "responses": {
          "200": {
            "description": "Array of Permission model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Permission"
                  }
                }
              }
            }
          }
        },
        "operationId": "PermissionController.find"
      }
    },
    "/projects/{id}/budget/status": {
      "get": {
        "x-controller-name": "ProjectController",
        "x-operation-name": "getBudgetStatus",
        "tags": [
          "ProjectController"
        ],
        "summary": "Get project budget status",
        "description": "Get budget status with role-scoped visibility",
        "responses": {
          "200": {
            "description": "Budget status or null"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ProjectController.getBudgetStatus"
      }
    },
    "/projects/{id}/budget": {
      "put": {
        "x-controller-name": "ProjectController",
        "x-operation-name": "configureBudget",
        "tags": [
          "ProjectController"
        ],
        "summary": "Configure project budget",
        "description": "Create or update the budget configuration for a project",
        "responses": {
          "200": {
            "description": "ProjectBudget model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectBudget"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "short_window_hours": {
                    "type": "number",
                    "minimum": 1
                  },
                  "short_window_limit": {
                    "type": "number",
                    "nullable": true,
                    "minimum": 0
                  },
                  "long_window_days": {
                    "type": "number",
                    "minimum": 1
                  },
                  "long_window_limit": {
                    "type": "number",
                    "nullable": true,
                    "minimum": 0
                  },
                  "alert_threshold_pct": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "enforce_limit": {
                    "type": "boolean"
                  },
                  "enforce_for_org_scope": {
                    "type": "boolean"
                  },
                  "count_org_scope_usage": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "ProjectController.configureBudget"
      },
      "get": {
        "x-controller-name": "ProjectController",
        "x-operation-name": "getBudget",
        "tags": [
          "ProjectController"
        ],
        "summary": "Get project budget configuration",
        "description": "Get the raw budget configuration for a project",
        "responses": {
          "200": {
            "description": "ProjectBudget model instance or null",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectBudget"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ProjectController.getBudget"
      },
      "delete": {
        "x-controller-name": "ProjectController",
        "x-operation-name": "removeBudget",
        "tags": [
          "ProjectController"
        ],
        "summary": "Remove project budget",
        "description": "Remove budget configuration, returning to unlimited",
        "responses": {
          "204": {
            "description": "Budget removed"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ProjectController.removeBudget"
      }
    },
    "/projects/{id}/members/{memberId}": {
      "delete": {
        "x-controller-name": "ProjectController",
        "x-operation-name": "removeMember",
        "tags": [
          "ProjectController"
        ],
        "summary": "Remove member from project",
        "description": "Remove a member from the project (cannot remove project creator)",
        "responses": {
          "204": {
            "description": "ProjectMember DELETE success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "memberId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ProjectController.removeMember"
      }
    },
    "/projects/{id}/members": {
      "post": {
        "x-controller-name": "ProjectController",
        "x-operation-name": "addMember",
        "tags": [
          "ProjectController"
        ],
        "summary": "Add member to project",
        "description": "Add an organization member to the project",
        "responses": {
          "200": {
            "description": "ProjectMember model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectMember"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "user_id"
                ],
                "properties": {
                  "user_id": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "ProjectController.addMember"
      },
      "get": {
        "x-controller-name": "ProjectController",
        "x-operation-name": "findMembers",
        "tags": [
          "ProjectController"
        ],
        "summary": "List project members",
        "description": "Get all members of a project with their roles",
        "responses": {
          "200": {
            "description": "Array of ProjectMember model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/ProjectMember"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "user": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "email": {
                                "type": "string"
                              },
                              "full_name": {
                                "type": "string"
                              }
                            }
                          },
                          "role": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "display_name": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ProjectController.findMembers"
      }
    },
    "/projects/{id}/reactivate": {
      "post": {
        "x-controller-name": "ProjectController",
        "x-operation-name": "reactivateById",
        "tags": [
          "ProjectController"
        ],
        "summary": "Reactivate archived project",
        "description": "Reactivate a previously archived project (sets status back to active)",
        "responses": {
          "204": {
            "description": "Project reactivated successfully"
          },
          "404": {
            "description": "Project not found"
          },
          "409": {
            "description": "Project is not archived"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ProjectController.reactivateById"
      }
    },
    "/projects/{id}": {
      "patch": {
        "x-controller-name": "ProjectController",
        "x-operation-name": "updateById",
        "tags": [
          "ProjectController"
        ],
        "summary": "Update project by ID",
        "description": "Update project details",
        "responses": {
          "204": {
            "description": "Project PATCH success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "default_model": {
                        "type": "string"
                      },
                      "icon": {
                        "type": "string"
                      },
                      "color": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "ProjectController.updateById"
      },
      "get": {
        "x-controller-name": "ProjectController",
        "x-operation-name": "findById",
        "tags": [
          "ProjectController"
        ],
        "summary": "Get project by ID",
        "description": "Get project details with budget and stats",
        "responses": {
          "200": {
            "description": "Project model instance with details",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Project"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "budget": {
                          "$ref": "#/components/schemas/ProjectBudget"
                        },
                        "stats": {
                          "type": "object",
                          "properties": {
                            "members_count": {
                              "type": "number"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ProjectController.findById"
      },
      "delete": {
        "x-controller-name": "ProjectController",
        "x-operation-name": "deleteById",
        "tags": [
          "ProjectController"
        ],
        "summary": "Archive project by ID",
        "description": "Archive a project (soft delete, sets status to archived)",
        "responses": {
          "204": {
            "description": "Project DELETE success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ProjectController.deleteById"
      }
    },
    "/projects": {
      "post": {
        "x-controller-name": "ProjectController",
        "x-operation-name": "create",
        "tags": [
          "ProjectController"
        ],
        "summary": "Create new project",
        "description": "Create a new project in the organization",
        "responses": {
          "200": {
            "description": "Project model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "default_model": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "ProjectController.create"
      },
      "get": {
        "x-controller-name": "ProjectController",
        "x-operation-name": "find",
        "tags": [
          "ProjectController"
        ],
        "summary": "List all projects",
        "description": "Get all projects the user is a member of in their organization",
        "responses": {
          "200": {
            "description": "Array of Project model instances with stats",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "member_count": {
                        "type": "number"
                      },
                      "my_role": {
                        "type": "string"
                      },
                      "budget": {
                        "type": "object",
                        "properties": {
                          "short_window_limit": {
                            "type": "number",
                            "nullable": true
                          },
                          "short_window_usage": {
                            "type": "number"
                          },
                          "long_window_limit": {
                            "type": "number",
                            "nullable": true
                          },
                          "long_window_usage": {
                            "type": "number"
                          }
                        }
                      },
                      "created_at": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "ProjectController.find"
      }
    },
    "/roles/{id}/permissions": {
      "put": {
        "x-controller-name": "RoleController",
        "x-operation-name": "updatePermissions",
        "tags": [
          "RoleController"
        ],
        "summary": "Update role permissions",
        "description": "Replace all permissions for a role",
        "responses": {
          "200": {
            "description": "Role with updated permissions",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Role"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "permissions": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "permission_ids"
                ],
                "properties": {
                  "permission_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "RoleController.updatePermissions"
      }
    },
    "/roles/{id}": {
      "patch": {
        "x-controller-name": "RoleController",
        "x-operation-name": "updateById",
        "tags": [
          "RoleController"
        ],
        "summary": "Update role by ID",
        "description": "Update role details (name cannot be changed for system roles)",
        "responses": {
          "200": {
            "description": "Role PATCH success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "display_name": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "priority": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "RoleController.updateById"
      },
      "get": {
        "x-controller-name": "RoleController",
        "x-operation-name": "findById",
        "tags": [
          "RoleController"
        ],
        "summary": "Get role by ID",
        "description": "Get role details with permissions array",
        "responses": {
          "200": {
            "description": "Role model instance with permissions",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Role"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "permissions": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "RoleController.findById"
      },
      "delete": {
        "x-controller-name": "RoleController",
        "x-operation-name": "deleteById",
        "tags": [
          "RoleController"
        ],
        "summary": "Delete role by ID",
        "description": "Delete a custom role (system roles cannot be deleted)",
        "responses": {
          "204": {
            "description": "Role DELETE success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "RoleController.deleteById"
      }
    },
    "/roles": {
      "post": {
        "x-controller-name": "RoleController",
        "x-operation-name": "create",
        "tags": [
          "RoleController"
        ],
        "summary": "Create new role",
        "description": "Create a new custom role with permissions",
        "responses": {
          "200": {
            "description": "Role model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "display_name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "display_name": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "priority": {
                    "type": "number",
                    "default": 0
                  },
                  "permission_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "RoleController.create"
      },
      "get": {
        "x-controller-name": "RoleController",
        "x-operation-name": "find",
        "tags": [
          "RoleController"
        ],
        "summary": "List all roles",
        "description": "Get all roles with permission counts and user counts",
        "responses": {
          "200": {
            "description": "Array of Role model instances with stats",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/Role"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "permission_count": {
                            "type": "number"
                          },
                          "user_count": {
                            "type": "number"
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "operationId": "RoleController.find"
      }
    },
    "/shared/thread/{token}/raw": {
      "get": {
        "x-controller-name": "SharedThreadsController",
        "x-operation-name": "getSharedThreadRaw",
        "tags": [
          "SharedThreadsController"
        ],
        "summary": "Get Shared Thread Raw Data",
        "description": "Get raw shared thread data for API consumption",
        "responses": {
          "200": {
            "description": "Raw shared thread data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreadExcluding_organization_id-user_id-share_token-deleted_at_"
                }
              }
            }
          },
          "404": {
            "description": "Thread not found or not shared"
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "SharedThreadsController.getSharedThreadRaw"
      }
    },
    "/shared/thread/{token}": {
      "get": {
        "x-controller-name": "SharedThreadsController",
        "x-operation-name": "getSharedThread",
        "tags": [
          "SharedThreadsController"
        ],
        "summary": "Get Shared Thread",
        "description": "Get a shared thread by its token (public access)",
        "responses": {
          "200": {
            "description": "Shared thread details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "role": {
                            "type": "string"
                          },
                          "content": {
                            "type": "string"
                          },
                          "metadata": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    "agent": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        }
                      }
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "shared_at": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Thread not found or not shared"
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "SharedThreadsController.getSharedThread"
      }
    },
    "/structured-analyses/count": {
      "get": {
        "x-controller-name": "StructuredAnalysisController",
        "x-operation-name": "count",
        "tags": [
          "StructuredAnalysisController"
        ],
        "summary": "Count Structured Analyses",
        "description": "Count the number of structured analyses for the current organization. The organization_id is automatically set based on the current user.",
        "responses": {
          "200": {
            "description": "StructuredAnalysis model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "StructuredAnalysis.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<StructuredAnalysis>"
                }
              }
            }
          }
        ],
        "operationId": "StructuredAnalysisController.count"
      }
    },
    "/structured-analyses/{id}/execute": {
      "post": {
        "x-controller-name": "StructuredAnalysisController",
        "x-operation-name": "execute",
        "tags": [
          "StructuredAnalysisController"
        ],
        "summary": "Execute Structured Analysis",
        "description": "Execute a structured analysis by ID. The organization_id is automatically set based on the current user.",
        "responses": {
          "200": {
            "description": "Execution result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string"
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "operationId": "StructuredAnalysisController.execute"
      }
    },
    "/structured-analyses/{id}": {
      "patch": {
        "x-controller-name": "StructuredAnalysisController",
        "x-operation-name": "updateById",
        "tags": [
          "StructuredAnalysisController"
        ],
        "summary": "Update Structured Analysis",
        "description": "Update an existing structured analysis by ID. The organization_id is automatically set based on the current user.",
        "responses": {
          "204": {
            "description": "StructuredAnalysis PATCH success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StructuredAnalysisPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "StructuredAnalysisController.updateById"
      },
      "delete": {
        "x-controller-name": "StructuredAnalysisController",
        "x-operation-name": "deleteById",
        "tags": [
          "StructuredAnalysisController"
        ],
        "summary": "Delete Structured Analysis",
        "description": "Delete an existing structured analysis by ID. The organization_id is automatically set based on the current user.",
        "responses": {
          "204": {
            "description": "StructuredAnalysis DELETE success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "StructuredAnalysisController.deleteById"
      }
    },
    "/structured-analyses": {
      "post": {
        "x-controller-name": "StructuredAnalysisController",
        "x-operation-name": "create",
        "tags": [
          "StructuredAnalysisController"
        ],
        "summary": "Create Structured Analysis",
        "description": "Create a new structured analysis. The organization_id and user_id are automatically set based on the current user.",
        "responses": {
          "200": {
            "description": "StructuredAnalysis model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewStructuredAnalysis"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewStructuredAnalysis"
              }
            }
          }
        },
        "operationId": "StructuredAnalysisController.create"
      },
      "get": {
        "x-controller-name": "StructuredAnalysisController",
        "x-operation-name": "find",
        "tags": [
          "StructuredAnalysisController"
        ],
        "summary": "Find Structured Analyses",
        "description": "Find all structured analyses for the current organization. The organization_id is automatically set based on the current user.",
        "responses": {
          "200": {
            "description": "Array of StructuredAnalysis model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StructuredAnalysisWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StructuredAnalysis.Filter"
                }
              }
            }
          }
        ],
        "operationId": "StructuredAnalysisController.find"
      }
    },
    "/subscription/limits": {
      "get": {
        "x-controller-name": "SubscriptionLimitsController",
        "x-operation-name": "getLimits",
        "tags": [
          "SubscriptionLimitsController"
        ],
        "summary": "Get Subscription Limits",
        "description": "Get all subscription limits and usage for the current organization. Requires organization-scope role (owner/admin).",
        "responses": {
          "200": {
            "description": "Subscription limits and usage",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscription": {
                      "type": "string"
                    },
                    "subscriptionLabel": {
                      "type": "string"
                    },
                    "organizationLimits": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resource": {
                            "type": "string"
                          },
                          "current": {
                            "type": "number"
                          },
                          "limit": {
                            "type": "number",
                            "nullable": true
                          }
                        }
                      }
                    },
                    "perProjectLimits": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resource": {
                            "type": "string"
                          },
                          "limit": {
                            "type": "number",
                            "nullable": true
                          }
                        }
                      }
                    },
                    "credits": {
                      "type": "object",
                      "properties": {
                        "monthly": {
                          "type": "number"
                        },
                        "signup": {
                          "type": "number"
                        }
                      }
                    },
                    "settings": {
                      "type": "object",
                      "properties": {
                        "threadsExpiringDays": {
                          "type": "number"
                        },
                        "maxConcurrentLivekitRooms": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    },
                    "features": {
                      "type": "object",
                      "properties": {
                        "sip_outbound": {
                          "type": "boolean"
                        },
                        "copilot_access": {
                          "type": "boolean"
                        },
                        "shared_threads": {
                          "type": "boolean"
                        },
                        "advanced_analytics": {
                          "type": "boolean"
                        },
                        "export_data": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires organization-scope role)"
          }
        },
        "operationId": "SubscriptionLimitsController.getLimits"
      }
    },
    "/text-inteligence": {
      "post": {
        "x-controller-name": "TextIntelligenceController",
        "x-operation-name": "analyzeText",
        "tags": [
          "TextIntelligenceController"
        ],
        "summary": "Analyze Text Intelligence",
        "responses": {
          "200": {
            "description": "Text intelligence",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TextInsightsResponseExcluding_model-usage_"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  },
                  "options": {
                    "$ref": "#/components/schemas/TextInsightsOptions"
                  }
                }
              }
            }
          }
        },
        "operationId": "TextIntelligenceController.analyzeText"
      }
    },
    "/threads/{id}/agent-snapshot": {
      "patch": {
        "x-controller-name": "ThreadsController",
        "x-operation-name": "updateAgentSnapshot",
        "tags": [
          "ThreadsController"
        ],
        "summary": "Update Thread Agent Snapshot",
        "description": "Update the agent snapshot of a thread",
        "responses": {
          "204": {
            "description": "Thread agent snapshot updated successfully"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentPartialExcluding_id-organization_id-created_at-updated_at_"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "ThreadsController.updateAgentSnapshot"
      }
    },
    "/threads/{id}/messages": {
      "post": {
        "x-controller-name": "ThreadsController",
        "x-operation-name": "addMessages",
        "tags": [
          "ThreadsController"
        ],
        "summary": "Add Messages to Thread",
        "description": "Add messages to thread history without running the agent",
        "responses": {
          "200": {
            "description": "Messages added successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "thread_id": {
                      "type": "string"
                    },
                    "added_count": {
                      "type": "number"
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "messages"
                ],
                "properties": {
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "role",
                        "content"
                      ],
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant",
                            "tool"
                          ]
                        },
                        "content": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "tool_call_id": {
                          "type": "string"
                        },
                        "tool_calls": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "arguments": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "ThreadsController.addMessages"
      }
    },
    "/threads/{id}/run": {
      "post": {
        "x-controller-name": "ThreadsController",
        "x-operation-name": "run",
        "tags": [
          "ThreadsController"
        ],
        "summary": "Run Thread",
        "description": "Run a thread",
        "responses": {
          "200": {
            "description": "Threads model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletion"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "x-bot-id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-room-name",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "role": {
                        "type": "string"
                      },
                      "content": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "array"
                          }
                        ]
                      },
                      "name": {
                        "type": "string"
                      },
                      "tool_call_id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "role"
                    ]
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string"
                        },
                        "content": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array"
                            }
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "tool_call_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "role"
                      ]
                    }
                  }
                ]
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "ThreadsController.run"
      }
    },
    "/threads/{id}/share": {
      "post": {
        "x-controller-name": "ThreadsController",
        "x-operation-name": "shareThread",
        "tags": [
          "ThreadsController"
        ],
        "summary": "Share Thread",
        "description": "Generate a shareable link for a thread",
        "responses": {
          "200": {
            "description": "Thread sharing enabled successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "is_shared": {
                      "type": "boolean"
                    },
                    "share_token": {
                      "type": "string"
                    },
                    "share_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ThreadsController.shareThread"
      }
    },
    "/threads/{id}/stream": {
      "post": {
        "x-controller-name": "ThreadsController",
        "x-operation-name": "stream",
        "tags": [
          "ThreadsController"
        ],
        "summary": "Stream Thread",
        "description": "Stream a thread",
        "responses": {
          "200": {
            "description": "Streamed response",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "x-stream-mode",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-bot-id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-room-name",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "role": {
                        "type": "string"
                      },
                      "content": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "array"
                          }
                        ]
                      },
                      "name": {
                        "type": "string"
                      },
                      "tool_call_id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "role"
                    ]
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string"
                        },
                        "content": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array"
                            }
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "tool_call_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "role"
                      ]
                    }
                  }
                ]
              }
            }
          },
          "x-parameter-index": 2
        },
        "operationId": "ThreadsController.stream"
      }
    },
    "/threads/{id}/unshare": {
      "post": {
        "x-controller-name": "ThreadsController",
        "x-operation-name": "unshareThread",
        "tags": [
          "ThreadsController"
        ],
        "summary": "Unshare Thread",
        "description": "Revoke access to a shared thread",
        "responses": {
          "200": {
            "description": "Thread sharing revoked successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "is_shared": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ThreadsController.unshareThread"
      }
    },
    "/threads/{id}": {
      "put": {
        "x-controller-name": "ThreadsController",
        "x-operation-name": "putById",
        "tags": [
          "ThreadsController"
        ],
        "summary": "Update Thread by ID (PUT)",
        "description": "Update a thread by its ID and return the updated thread",
        "responses": {
          "200": {
            "description": "Updated thread instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Thread"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ThreadPartialExcluding_id-history-agent_id-organization_id_"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "ThreadsController.putById"
      },
      "patch": {
        "x-controller-name": "ThreadsController",
        "x-operation-name": "updateById",
        "tags": [
          "ThreadsController"
        ],
        "summary": "Update Thread by ID",
        "description": "Update a thread by its ID",
        "responses": {
          "204": {
            "description": "Threads PATCH success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ThreadPartialExcluding_id-history-agent_id-organization_id_"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "ThreadsController.updateById"
      },
      "get": {
        "x-controller-name": "ThreadsController",
        "x-operation-name": "findById",
        "tags": [
          "ThreadsController"
        ],
        "summary": "Get Thread by ID",
        "description": "Get thread by ID",
        "responses": {
          "200": {
            "description": "Threads model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreadWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "include_usage_request",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "operationId": "ThreadsController.findById"
      },
      "delete": {
        "x-controller-name": "ThreadsController",
        "x-operation-name": "deleteById",
        "tags": [
          "ThreadsController"
        ],
        "summary": "Delete Thread by ID",
        "description": "Delete a thread by its ID",
        "responses": {
          "204": {
            "description": "Threads DELETE success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ThreadsController.deleteById"
      }
    },
    "/threads": {
      "post": {
        "x-controller-name": "ThreadsController",
        "x-operation-name": "create",
        "tags": [
          "ThreadsController"
        ],
        "summary": "Create Thread",
        "description": "Create a new thread",
        "responses": {
          "200": {
            "description": "Threads model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Thread"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "x-triggered-by",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-room-name",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-phone-number",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateThread"
              }
            }
          }
        },
        "operationId": "ThreadsController.create"
      },
      "get": {
        "x-controller-name": "ThreadsController",
        "x-operation-name": "find",
        "tags": [
          "ThreadsController"
        ],
        "summary": "Get Threads",
        "description": "Get all threads",
        "responses": {
          "200": {
            "description": "Array of Threads model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Thread"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Thread.Filter"
                }
              }
            }
          }
        ],
        "operationId": "ThreadsController.find"
      }
    },
    "/tts/download/{filename}": {
      "get": {
        "x-controller-name": "TtsController",
        "x-operation-name": "getTtsDownload",
        "tags": [
          "TtsController"
        ],
        "summary": "Download Audio File",
        "description": "Download a TTS audio file",
        "responses": {
          "200": {
            "description": "Audio File",
            "content": {
              "audio/mpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filename",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TtsController.getTtsDownload"
      }
    },
    "/tts/generate": {
      "post": {
        "x-controller-name": "TtsController",
        "x-operation-name": "generateTTS",
        "tags": [
          "TtsController"
        ],
        "summary": "Generate Audio",
        "description": "Generate audio from text",
        "responses": {
          "200": {
            "description": "Áudio Text To Speech",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TtsResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "x-bot-id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-room-name",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpeechBodyParams"
              }
            }
          }
        },
        "operationId": "TtsController.generateTTS"
      }
    },
    "/tts/models": {
      "get": {
        "x-controller-name": "TtsController",
        "x-operation-name": "models",
        "tags": [
          "TtsController"
        ],
        "summary": "TTS models",
        "description": "List of all TTS models",
        "responses": {
          "200": {
            "description": "List of all TTS models",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive"
              ]
            },
            "required": false,
            "default": "active",
            "description": "Model status"
          }
        ],
        "operationId": "TtsController.models"
      }
    },
    "/tts/stream/{filename}": {
      "get": {
        "x-controller-name": "TtsController",
        "x-operation-name": "getTtsStream",
        "tags": [
          "TtsController"
        ],
        "description": "Stream a TTS audio file",
        "summary": "Stream Audio File",
        "responses": {
          "200": {
            "description": "Audio File",
            "content": {
              "audio/mpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filename",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TtsController.getTtsStream"
      }
    },
    "/tts/voices": {
      "get": {
        "x-controller-name": "TtsController",
        "x-operation-name": "voices",
        "tags": [
          "TtsController"
        ],
        "summary": "Voices",
        "description": "List of voices for each model",
        "responses": {
          "200": {
            "description": "Voices",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/VoiceParams",
                      "definitions": {
                        "VoiceParams": {
                          "$ref": "#/components/schemas/VoiceParams"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "model",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "TtsController.voices"
      }
    },
    "/usage/budget": {
      "get": {
        "x-controller-name": "UsageRequestController",
        "x-operation-name": "getBudget",
        "tags": [
          "UsageRequestController"
        ],
        "summary": "Get project budget status",
        "description": "Returns budget usage as percentages for the project associated with the API key or X-Project-ID header. Never exposes absolute values.",
        "responses": {
          "200": {
            "description": "Budget status (percentages only) or null if no budget configured"
          }
        },
        "operationId": "UsageRequestController.getBudget"
      }
    },
    "/usage-requests/{id}": {
      "get": {
        "x-controller-name": "UsageRequestController",
        "x-operation-name": "findById",
        "tags": [
          "UsageRequestController"
        ],
        "summary": "Get Usage Request by ID",
        "description": "Get detailed usage request with items",
        "responses": {
          "200": {
            "description": "UsageRequest model instance with items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageRequestWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UsageRequestController.findById"
      }
    },
    "/webhooks/count": {
      "get": {
        "x-controller-name": "WebhooksController",
        "x-operation-name": "count",
        "tags": [
          "WebhooksController"
        ],
        "summary": "Count Webhooks",
        "description": "Count the number of webhooks for the current organization.",
        "responses": {
          "200": {
            "description": "Webhook model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "Webhook.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<Webhook>"
                }
              }
            }
          }
        ],
        "operationId": "WebhooksController.count"
      }
    },
    "/webhooks/{id}/event-logs/count": {
      "get": {
        "x-controller-name": "WebhooksController",
        "x-operation-name": "countLogs",
        "tags": [
          "WebhooksController"
        ],
        "summary": "Count Webhook Event Logs",
        "description": "Count the number of event logs for a specific webhook in the current organization.",
        "responses": {
          "200": {
            "description": "WebhookEventLog model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "WebhookEventLog.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<WebhookEventLog>"
                }
              }
            }
          }
        ],
        "operationId": "WebhooksController.countLogs"
      }
    },
    "/webhooks/{id}/event-logs/{log_id}": {
      "delete": {
        "x-controller-name": "WebhooksController",
        "x-operation-name": "deleteLogById",
        "tags": [
          "WebhooksController"
        ],
        "summary": "Delete Webhook Event Log",
        "description": "Delete a specific webhook event log. The organization_id is automatically set based on the current user.",
        "responses": {
          "204": {
            "description": "WebhookEventLog DELETE success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "log_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "WebhooksController.deleteLogById"
      }
    },
    "/webhooks/{id}/event-logs": {
      "get": {
        "x-controller-name": "WebhooksController",
        "x-operation-name": "findLogs",
        "tags": [
          "WebhooksController"
        ],
        "summary": "Find Webhook Event Logs",
        "description": "Find all event logs for a specific webhook in the current organization.",
        "responses": {
          "200": {
            "description": "Array of WebhookEventLog model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookEventLogWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventLog.Filter"
                }
              }
            }
          }
        ],
        "operationId": "WebhooksController.findLogs"
      }
    },
    "/webhooks/{id}/events/{log_id}/retry": {
      "post": {
        "x-controller-name": "WebhooksController",
        "x-operation-name": "retryEvent",
        "tags": [
          "WebhooksController"
        ],
        "summary": "Retry Webhook Event Log",
        "description": "Retry a specific webhook event log. The organization_id is automatically set based on the current user.",
        "responses": {
          "204": {
            "description": "WebhookEventLog retry success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "log_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "WebhooksController.retryEvent"
      }
    },
    "/webhooks/{id}": {
      "patch": {
        "x-controller-name": "WebhooksController",
        "x-operation-name": "updateById",
        "tags": [
          "WebhooksController"
        ],
        "summary": "Update Webhook by ID",
        "description": "Update an existing webhook by ID. The organization_id is automatically set based on the current user.",
        "responses": {
          "204": {
            "description": "Webhook PATCH success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "WebhooksController.updateById"
      },
      "get": {
        "x-controller-name": "WebhooksController",
        "x-operation-name": "findById",
        "tags": [
          "WebhooksController"
        ],
        "summary": "Find Webhook by ID",
        "description": "Find a webhook by its ID for the current organization.",
        "responses": {
          "200": {
            "description": "Webhook model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook.Filter"
                }
              }
            }
          }
        ],
        "operationId": "WebhooksController.findById"
      },
      "delete": {
        "x-controller-name": "WebhooksController",
        "x-operation-name": "deleteById",
        "tags": [
          "WebhooksController"
        ],
        "summary": "Delete Webhook by ID",
        "description": "Delete an existing webhook by ID. The organization_id is automatically set based on the current user.",
        "responses": {
          "204": {
            "description": "Webhook DELETE success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "WebhooksController.deleteById"
      }
    },
    "/webhooks": {
      "post": {
        "x-controller-name": "WebhooksController",
        "x-operation-name": "create",
        "tags": [
          "WebhooksController"
        ],
        "summary": "Create Webhook",
        "description": "Create a new webhook. The organization_id is automatically set based on the current user.",
        "responses": {
          "200": {
            "description": "Webhook model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewWebhook"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewWebhook"
              }
            }
          }
        },
        "operationId": "WebhooksController.create"
      },
      "get": {
        "x-controller-name": "WebhooksController",
        "x-operation-name": "find",
        "tags": [
          "WebhooksController"
        ],
        "summary": "Find all Webhooks",
        "description": "Find all webhooks for the current organization.",
        "responses": {
          "200": {
            "description": "Array of Webhook model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook.Filter1"
                }
              }
            }
          }
        ],
        "operationId": "WebhooksController.find"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.sippulse.ai"
    }
  ],
  "components": {
    "schemas": {
      "NewWebhook": {
        "title": "NewWebhook",
        "type": "object",
        "description": "(tsType: Omit<Webhook, 'id' | 'organization_id'>, schemaOptions: { title: 'NewWebhook', exclude: [ 'id', 'organization_id' ] })",
        "properties": {
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": true
            }
          },
          "target_url": {
            "type": "string",
            "nullable": false
          },
          "secret": {
            "type": "string",
            "nullable": false
          },
          "is_active": {
            "type": "boolean",
            "nullable": false
          },
          "retries": {
            "type": "number",
            "nullable": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "target_url",
          "secret",
          "is_active"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<Webhook, 'id' | 'organization_id'>"
      },
      "WebhookWithRelations": {
        "title": "WebhookWithRelations",
        "type": "object",
        "description": "(tsType: WebhookWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": true
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": true
            }
          },
          "target_url": {
            "type": "string",
            "nullable": false
          },
          "secret": {
            "type": "string",
            "nullable": false
          },
          "is_active": {
            "type": "boolean",
            "nullable": false
          },
          "retries": {
            "type": "number",
            "nullable": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "id",
          "target_url",
          "secret",
          "is_active"
        ],
        "additionalProperties": false,
        "x-typescript-type": "WebhookWithRelations"
      },
      "WebhookPartial": {
        "title": "WebhookPartial",
        "type": "object",
        "description": "(tsType: Partial<Webhook>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": true
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": true
            }
          },
          "target_url": {
            "type": "string",
            "nullable": false
          },
          "secret": {
            "type": "string",
            "nullable": false
          },
          "is_active": {
            "type": "boolean",
            "nullable": false
          },
          "retries": {
            "type": "number",
            "nullable": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<Webhook>"
      },
      "Webhook": {
        "title": "Webhook",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": true
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": true
            }
          },
          "target_url": {
            "type": "string",
            "nullable": false
          },
          "secret": {
            "type": "string",
            "nullable": false
          },
          "is_active": {
            "type": "boolean",
            "nullable": false
          },
          "retries": {
            "type": "number",
            "nullable": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "id",
          "target_url",
          "secret",
          "is_active"
        ],
        "additionalProperties": false
      },
      "WebhookEventLogWithRelations": {
        "title": "WebhookEventLogWithRelations",
        "type": "object",
        "description": "(tsType: WebhookEventLogWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "webhook_id": {
            "type": "string",
            "nullable": false
          },
          "payload": {
            "type": "object",
            "nullable": false
          },
          "status": {
            "type": "string",
            "nullable": false
          },
          "attempts": {
            "type": "number",
            "nullable": false
          },
          "last_error": {
            "type": "string",
            "nullable": true
          },
          "response_code": {
            "type": "number",
            "nullable": true
          },
          "response_body": {
            "type": "string",
            "nullable": true
          },
          "next_retry_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "event": {
            "type": "string",
            "nullable": false
          }
        },
        "required": [
          "id",
          "webhook_id",
          "payload",
          "status",
          "attempts",
          "event"
        ],
        "additionalProperties": false,
        "x-typescript-type": "WebhookEventLogWithRelations"
      },
      "WaitingList": {
        "title": "WaitingList",
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": false
          },
          "full_name": {
            "type": "string",
            "nullable": false
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "credits": {
            "type": "number",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "email",
          "full_name"
        ],
        "additionalProperties": false
      },
      "NewWaitingList": {
        "title": "NewWaitingList",
        "type": "object",
        "description": "(tsType: Omit<WaitingList, 'status' | 'credits'>, schemaOptions: { title: 'NewWaitingList', exclude: [ 'status', 'credits' ] })",
        "properties": {
          "email": {
            "type": "string",
            "nullable": false
          },
          "full_name": {
            "type": "string",
            "nullable": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "email",
          "full_name"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<WaitingList, 'status' | 'credits'>"
      },
      "MfaVerificationBody": {
        "title": "MfaVerificationBody",
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "code"
        ],
        "additionalProperties": false
      },
      "Function": {},
      "UserWithRoleExcluding_password_": {
        "title": "UserWithRoleExcluding_password_",
        "type": "object",
        "description": "(tsType: Omit<UserWithRole, 'password'>, schemaOptions: { exclude: [ 'password' ] })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "email": {
            "type": "string",
            "nullable": false,
            "format": "email"
          },
          "full_name": {
            "type": "string",
            "nullable": false
          },
          "language": {
            "type": "string",
            "nullable": false,
            "enum": [
              "pt",
              "en"
            ]
          },
          "settings": {
            "type": "object",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": false
          },
          "last_organization_id": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string"
          },
          "role_priority": {
            "type": "number"
          }
        },
        "required": [
          "email",
          "full_name"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<UserWithRole, 'password'>"
      },
      "InviteUser": {
        "title": "InviteUser",
        "type": "object",
        "description": "(tsType: @loopback/repository-json-schema#Optional<Omit<User, 'id' | 'created_at' | 'updated_at' | 'deleted_at'>, 'full_name' | 'password' | 'language' | 'status' | 'settings'>, schemaOptions: { title: 'InviteUser', exclude: [ 'id', 'created_at', 'updated_at', 'deleted_at' ], optional: [ 'full_name', 'password', 'language', 'status', 'settings' ] })",
        "properties": {
          "password": {
            "type": "string",
            "nullable": false
          },
          "email": {
            "type": "string",
            "nullable": false,
            "format": "email"
          },
          "full_name": {
            "type": "string",
            "nullable": false
          },
          "language": {
            "type": "string",
            "nullable": false,
            "enum": [
              "pt",
              "en"
            ]
          },
          "settings": {
            "type": "object",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": false
          },
          "last_organization_id": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "email"
        ],
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository-json-schema#Optional<Omit<User, 'id' | 'created_at' | 'updated_at' | 'deleted_at'>, 'full_name' | 'password' | 'language' | 'status' | 'settings'>"
      },
      "User": {
        "title": "User",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "password": {
            "type": "string",
            "nullable": false
          },
          "email": {
            "type": "string",
            "nullable": false,
            "format": "email"
          },
          "full_name": {
            "type": "string",
            "nullable": false
          },
          "language": {
            "type": "string",
            "nullable": false,
            "enum": [
              "pt",
              "en"
            ]
          },
          "settings": {
            "type": "object",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": false
          },
          "last_organization_id": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "password",
          "email",
          "full_name"
        ],
        "additionalProperties": false
      },
      "Subscription": {
        "title": "Subscription",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": false
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "price": {
            "type": "number",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "integrations": {
            "type": "string",
            "nullable": true
          },
          "resources": {
            "type": "object",
            "nullable": true
          },
          "monthly_credits": {
            "type": "number",
            "nullable": true
          },
          "signup_credits": {
            "type": "number",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "rate_deck_id": {
            "type": "string",
            "nullable": true
          },
          "max_concurrent_livekit_rooms": {
            "type": "number",
            "nullable": true
          },
          "features": {
            "type": "object",
            "nullable": true
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "CurrencyRelation": {
        "title": "CurrencyRelation",
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "nullable": false
          },
          "rate": {
            "type": "number",
            "nullable": true
          },
          "tax": {
            "type": "number",
            "nullable": true
          }
        },
        "required": [
          "currency"
        ],
        "additionalProperties": false
      },
      "Organization": {
        "title": "Organization",
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "founder_id": {
            "type": "string",
            "nullable": false
          },
          "id": {
            "type": "string",
            "nullable": false
          },
          "key": {
            "type": "string",
            "nullable": false
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "subscription": {
            "type": "string",
            "nullable": true
          },
          "settings": {
            "type": "object",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "promo_code": {
            "type": "string",
            "nullable": true
          },
          "is_internal": {
            "type": "boolean",
            "nullable": false
          },
          "deletion_scheduled_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deletion_reason": {
            "type": "string",
            "nullable": true
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "founder": {
            "$ref": "#/components/schemas/User"
          },
          "subscription_info": {
            "$ref": "#/components/schemas/Subscription"
          },
          "currency_info": {
            "$ref": "#/components/schemas/CurrencyRelation"
          }
        },
        "required": [
          "key",
          "name"
        ],
        "additionalProperties": false
      },
      "Project": {
        "title": "Project",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "settings": {
            "type": "object",
            "nullable": true
          },
          "created_by": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "organization": {
            "$ref": "#/components/schemas/Organization"
          },
          "creator": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "id",
          "organization_id",
          "name"
        ],
        "additionalProperties": false
      },
      "ProjectMember": {
        "title": "ProjectMember",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": false
          },
          "joined_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "invited_by": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "project": {
            "$ref": "#/components/schemas/Project"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "inviter": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "id",
          "user_id"
        ],
        "additionalProperties": false
      },
      "UsageItemWithRelations": {
        "title": "UsageItemWithRelations",
        "type": "object",
        "description": "(tsType: UsageItemWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "charge_subtype": {
            "type": "string",
            "nullable": false
          },
          "charge_type": {
            "type": "string",
            "nullable": false
          },
          "cost_amount": {
            "type": "number",
            "nullable": false
          },
          "cost_amount_local": {
            "type": "number",
            "nullable": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          },
          "event_timestamp": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          },
          "currency": {
            "type": "string",
            "nullable": false
          },
          "details": {
            "type": "string",
            "nullable": true
          },
          "exchange_rate": {
            "type": "number",
            "nullable": true
          },
          "execution_time_ms": {
            "type": "number",
            "nullable": true
          },
          "id": {
            "type": "string",
            "nullable": false
          },
          "identifier": {
            "type": "string",
            "nullable": true
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": true
          },
          "price_amount": {
            "type": "number",
            "nullable": false
          },
          "pricing_rule": {
            "type": "string",
            "nullable": false
          },
          "quantity": {
            "type": "number",
            "nullable": false
          },
          "request_id": {
            "type": "string",
            "nullable": true
          },
          "ttfb_ms": {
            "type": "number",
            "nullable": true
          },
          "throughput": {
            "type": "number",
            "nullable": true
          },
          "performance_details": {
            "type": "object",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "nullable": false
          },
          "cost_attribution": {
            "type": "string",
            "nullable": false
          }
        },
        "required": [
          "charge_subtype",
          "charge_type",
          "cost_amount",
          "cost_amount_local",
          "created_at",
          "event_timestamp",
          "currency",
          "id",
          "organization_id",
          "price_amount",
          "pricing_rule",
          "quantity",
          "unit",
          "cost_attribution"
        ],
        "additionalProperties": false,
        "x-typescript-type": "UsageItemWithRelations"
      },
      "UsageRequestWithRelations": {
        "title": "UsageRequestWithRelations",
        "type": "object",
        "description": "(tsType: UsageRequestWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "agent_id": {
            "type": "string",
            "nullable": true
          },
          "api_key_id": {
            "type": "string",
            "nullable": true
          },
          "auth_mode": {
            "type": "string",
            "nullable": false
          },
          "bot_id": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          },
          "event_timestamp": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          },
          "execution_time_ms": {
            "type": "number",
            "nullable": true
          },
          "id": {
            "type": "string",
            "nullable": false
          },
          "metadata": {
            "type": "string",
            "nullable": true
          },
          "guest": {
            "type": "object",
            "nullable": true
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "processing_time_ms": {
            "type": "number",
            "nullable": true
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "room_name": {
            "type": "string",
            "nullable": true
          },
          "source_service": {
            "type": "string",
            "nullable": false
          },
          "speed": {
            "type": "number",
            "nullable": true
          },
          "thread_id": {
            "type": "string",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          },
          "user_id": {
            "type": "string",
            "nullable": false
          },
          "total_price_local": {
            "type": "number",
            "nullable": false
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UsageItemWithRelations"
            }
          }
        },
        "required": [
          "auth_mode",
          "created_at",
          "event_timestamp",
          "id",
          "organization_id",
          "source_service",
          "updated_at",
          "user_id",
          "total_price_local"
        ],
        "additionalProperties": false,
        "x-typescript-type": "UsageRequestWithRelations"
      },
      "ModelResponse": {
        "title": "ModelResponse",
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "active_instances": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "resources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "execution_type": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "status"
        ],
        "additionalProperties": false
      },
      "SpeechBodyParams": {
        "title": "SpeechBodyParams",
        "type": "object",
        "properties": {
          "input": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "voice": {
            "type": "string"
          },
          "response_format": {
            "type": "string",
            "enum": [
              "mp3",
              "opus",
              "aac",
              "flac",
              "wav",
              "pcm"
            ]
          },
          "speed": {
            "type": "number"
          },
          "metadata": {
            "type": "object"
          },
          "extra_body": {
            "type": "object"
          }
        },
        "required": [
          "input",
          "model",
          "voice"
        ],
        "additionalProperties": true
      },
      "TtsResponse": {
        "title": "TtsResponse",
        "type": "object",
        "properties": {
          "filename": {
            "type": "string",
            "description": "Name of the file to be used in the endpoint /tts/stream/{filename}"
          },
          "usage": {
            "type": "object",
            "description": "DEPRECATED: Use x-request-id header to query usage via /requests endpoint. This field may contain requestId for tracking."
          },
          "performance": {
            "type": "object",
            "description": "DEPRECATED: Use x-request-id header to query performance via /requests endpoint"
          },
          "unit": {
            "type": "string"
          },
          "stream": {
            "type": "string"
          },
          "download": {
            "type": "string"
          }
        },
        "required": [
          "filename",
          "unit",
          "stream",
          "download"
        ],
        "additionalProperties": false
      },
      "Thread": {
        "title": "Thread",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": false
          },
          "agent_id": {
            "type": "string",
            "nullable": false
          },
          "history": {
            "type": "array",
            "items": {
              "type": "object",
              "nullable": true
            }
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "additional_instructions": {
            "type": "string",
            "nullable": true
          },
          "vars": {
            "type": "object",
            "nullable": true
          },
          "post_analysis": {
            "type": "array",
            "items": {
              "type": "object",
              "nullable": true
            }
          },
          "agent_snapshot": {
            "type": "object",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "triggered": {
            "type": "string",
            "nullable": true
          },
          "identifier": {
            "type": "string",
            "nullable": true
          },
          "uid": {
            "type": "string",
            "nullable": true
          },
          "is_shared": {
            "type": "boolean",
            "nullable": true
          },
          "share_token": {
            "type": "string",
            "nullable": true
          },
          "shared_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "id",
          "organization_id",
          "user_id",
          "agent_id"
        ],
        "additionalProperties": false
      },
      "CreateThread": {
        "title": "CreateThread",
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "string"
          },
          "additional_instructions": {
            "type": "string",
            "nullable": true
          },
          "vars": {
            "type": "object",
            "nullable": true
          },
          "uid": {
            "type": "string",
            "maxLength": 64,
            "nullable": true
          },
          "project_id": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "agent_id"
        ],
        "additionalProperties": false
      },
      "ThreadWithRelations": {
        "title": "ThreadWithRelations",
        "type": "object",
        "description": "(tsType: ThreadWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": false
          },
          "agent_id": {
            "type": "string",
            "nullable": false
          },
          "history": {
            "type": "array",
            "items": {
              "type": "object",
              "nullable": true
            }
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "additional_instructions": {
            "type": "string",
            "nullable": true
          },
          "vars": {
            "type": "object",
            "nullable": true
          },
          "post_analysis": {
            "type": "array",
            "items": {
              "type": "object",
              "nullable": true
            }
          },
          "agent_snapshot": {
            "type": "object",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "triggered": {
            "type": "string",
            "nullable": true
          },
          "identifier": {
            "type": "string",
            "nullable": true
          },
          "uid": {
            "type": "string",
            "nullable": true
          },
          "is_shared": {
            "type": "boolean",
            "nullable": true
          },
          "share_token": {
            "type": "string",
            "nullable": true
          },
          "shared_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "usage_requests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UsageRequestWithRelations"
            }
          }
        },
        "required": [
          "id",
          "organization_id",
          "user_id",
          "agent_id"
        ],
        "additionalProperties": false,
        "x-typescript-type": "ThreadWithRelations"
      },
      "ThreadPartialExcluding_id-history-agent_id-organization_id_": {
        "title": "ThreadPartialExcluding_id-history-agent_id-organization_id_",
        "type": "object",
        "description": "(tsType: Omit<Partial<Thread>, 'id' | 'history' | 'agent_id' | 'organization_id'>, schemaOptions: { partial: true, exclude: [ 'id', 'history', 'agent_id', 'organization_id' ] })",
        "properties": {
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": false
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "additional_instructions": {
            "type": "string",
            "nullable": true
          },
          "vars": {
            "type": "object",
            "nullable": true
          },
          "post_analysis": {
            "type": "array",
            "items": {
              "type": "object",
              "nullable": true
            }
          },
          "agent_snapshot": {
            "type": "object",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "triggered": {
            "type": "string",
            "nullable": true
          },
          "identifier": {
            "type": "string",
            "nullable": true
          },
          "uid": {
            "type": "string",
            "nullable": true
          },
          "is_shared": {
            "type": "boolean",
            "nullable": true
          },
          "share_token": {
            "type": "string",
            "nullable": true
          },
          "shared_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<Partial<Thread>, 'id' | 'history' | 'agent_id' | 'organization_id'>"
      },
      "Choice": {
        "title": "Choice",
        "type": "object",
        "properties": {
          "finish_reason": {
            "type": "string"
          },
          "message": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "CompletionUsage": {
        "title": "CompletionUsage",
        "type": "object",
        "properties": {
          "input_tokens": {
            "type": "number"
          },
          "output_tokens": {
            "type": "number"
          },
          "total_tokens": {
            "type": "number"
          }
        },
        "additionalProperties": false
      },
      "Performance": {
        "title": "Performance",
        "type": "object",
        "properties": {
          "delay": {
            "type": "number",
            "description": "The delay in milliseconds between the request and the response."
          },
          "execution_time": {
            "type": "number",
            "description": "The time taken by the model to process the response."
          },
          "relative_execution_time": {
            "type": "number",
            "description": "The relative execution time of the model. It is relative to the unit of the model. For example, if the model is a text-generation model, the unit is tokens. The relative execution time is the number of tokens processed by the model per second."
          }
        },
        "additionalProperties": false
      },
      "ChatCompletion": {
        "title": "ChatCompletion",
        "type": "object",
        "properties": {
          "choices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Choice"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/CompletionUsage"
          },
          "performance": {
            "$ref": "#/components/schemas/Performance"
          }
        },
        "additionalProperties": true
      },
      "AgentPartialExcluding_id-organization_id-created_at-updated_at_": {
        "title": "AgentPartialExcluding_id-organization_id-created_at-updated_at_",
        "type": "object",
        "description": "(tsType: Omit<Partial<Agent>, 'id' | 'organization_id' | 'created_at' | 'updated_at'>, schemaOptions: { partial: true, exclude: [ 'id', 'organization_id', 'created_at', 'updated_at' ] })",
        "properties": {
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": false
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "share": {
            "type": "string",
            "nullable": true
          },
          "instructions": {
            "type": "string",
            "nullable": true
          },
          "llm_model": {
            "type": "string",
            "nullable": false
          },
          "tts_model": {
            "type": "string",
            "nullable": false
          },
          "tts_voice": {
            "type": "string",
            "nullable": false
          },
          "language": {
            "type": "string",
            "nullable": false
          },
          "tools": {
            "type": "array",
            "items": {
              "nullable": true,
              "type": "object"
            }
          },
          "call_configuration": {
            "type": "object",
            "nullable": true
          },
          "abilities": {
            "type": "object",
            "nullable": true
          },
          "mcp_servers": {
            "type": "array",
            "items": {
              "nullable": true,
              "type": "object"
            }
          },
          "parameters": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<Partial<Agent>, 'id' | 'organization_id' | 'created_at' | 'updated_at'>"
      },
      "TextInsightsResponseExcluding_model-usage_": {
        "title": "TextInsightsResponseExcluding_model-usage_",
        "type": "object",
        "description": "(tsType: Omit<TextInsightsResponse, 'model' | 'usage'>, schemaOptions: { exclude: [ 'model', 'usage' ] })",
        "properties": {
          "content": {
            "type": "object"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<TextInsightsResponse, 'model' | 'usage'>"
      },
      "SentimentAnalysisOptions": {
        "title": "SentimentAnalysisOptions",
        "type": "object",
        "properties": {
          "sentiments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "TopicDetectionOptions": {
        "title": "TopicDetectionOptions",
        "type": "object",
        "properties": {
          "topics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "CustomOption": {
        "title": "CustomOption",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "string",
              "number",
              "boolean"
            ]
          }
        },
        "required": [
          "title",
          "description"
        ],
        "additionalProperties": false
      },
      "TextInsightsOptions": {
        "title": "TextInsightsOptions",
        "type": "object",
        "description": "(tsType: TextInsightsOptions, schemaOptions: { title: 'TextInsightsOptions' })",
        "properties": {
          "language": {
            "type": "string"
          },
          "summarization": {
            "type": "boolean"
          },
          "sentiment_analysis": {
            "$ref": "#/components/schemas/SentimentAnalysisOptions"
          },
          "topic_detection": {
            "$ref": "#/components/schemas/TopicDetectionOptions"
          },
          "custom": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomOption"
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "TextInsightsOptions"
      },
      "NewStructuredAnalysis": {
        "title": "NewStructuredAnalysis",
        "type": "object",
        "description": "(tsType: Omit<StructuredAnalysis, 'id' | 'organization_id' | 'user_id'>, schemaOptions: { title: 'NewStructuredAnalysis', exclude: [ 'id', 'organization_id', 'user_id' ] })",
        "properties": {
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "model": {
            "type": "string",
            "nullable": false
          },
          "schema": {
            "type": "object",
            "nullable": false
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "metadata": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "name",
          "model",
          "schema"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<StructuredAnalysis, 'id' | 'organization_id' | 'user_id'>"
      },
      "StructuredAnalysisWithRelations": {
        "title": "StructuredAnalysisWithRelations",
        "type": "object",
        "description": "(tsType: StructuredAnalysisWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "model": {
            "type": "string",
            "nullable": false
          },
          "schema": {
            "type": "object",
            "nullable": false
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "metadata": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "model",
          "schema"
        ],
        "additionalProperties": false,
        "x-typescript-type": "StructuredAnalysisWithRelations"
      },
      "StructuredAnalysisPartial": {
        "title": "StructuredAnalysisPartial",
        "type": "object",
        "description": "(tsType: Partial<StructuredAnalysis>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "model": {
            "type": "string",
            "nullable": false
          },
          "schema": {
            "type": "object",
            "nullable": false
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "metadata": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<StructuredAnalysis>"
      },
      "StructuredAnalysis": {
        "title": "StructuredAnalysis",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "model": {
            "type": "string",
            "nullable": false
          },
          "schema": {
            "type": "object",
            "nullable": false
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "metadata": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "model",
          "schema"
        ],
        "additionalProperties": false
      },
      "ThreadExcluding_organization_id-user_id-share_token-deleted_at_": {
        "title": "ThreadExcluding_organization_id-user_id-share_token-deleted_at_",
        "type": "object",
        "description": "(tsType: Omit<Thread, 'organization_id' | 'user_id' | 'share_token' | 'deleted_at'>, schemaOptions: { exclude: [ 'organization_id', 'user_id', 'share_token', 'deleted_at' ] })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "agent_id": {
            "type": "string",
            "nullable": false
          },
          "history": {
            "type": "array",
            "items": {
              "type": "object",
              "nullable": true
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "additional_instructions": {
            "type": "string",
            "nullable": true
          },
          "vars": {
            "type": "object",
            "nullable": true
          },
          "post_analysis": {
            "type": "array",
            "items": {
              "type": "object",
              "nullable": true
            }
          },
          "agent_snapshot": {
            "type": "object",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "triggered": {
            "type": "string",
            "nullable": true
          },
          "identifier": {
            "type": "string",
            "nullable": true
          },
          "uid": {
            "type": "string",
            "nullable": true
          },
          "is_shared": {
            "type": "boolean",
            "nullable": true
          },
          "shared_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "id",
          "agent_id"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<Thread, 'organization_id' | 'user_id' | 'share_token' | 'deleted_at'>"
      },
      "UserSettings": {
        "title": "UserSettings",
        "type": "object",
        "description": "(tsType: Omit<User, 'created_at' | 'updated_at' | 'deleted_at' | 'password' | 'id'>, schemaOptions: { exclude: [ 'created_at', 'updated_at', 'deleted_at', 'password', 'id' ], title: 'UserSettings' })",
        "properties": {
          "email": {
            "type": "string",
            "nullable": false,
            "format": "email"
          },
          "full_name": {
            "type": "string",
            "nullable": false
          },
          "language": {
            "type": "string",
            "nullable": false,
            "enum": [
              "pt",
              "en"
            ]
          },
          "settings": {
            "type": "object",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": false
          },
          "last_organization_id": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "email",
          "full_name"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<User, 'created_at' | 'updated_at' | 'deleted_at' | 'password' | 'id'>"
      },
      "PatchUserSettings": {
        "title": "PatchUserSettings",
        "type": "object",
        "description": "(tsType: Omit<Partial<User>, 'created_at' | 'updated_at' | 'deleted_at' | 'password' | 'email' | 'id'>, schemaOptions: { exclude: [ 'created_at', 'updated_at', 'deleted_at', 'password', 'email', 'id' ], title: 'PatchUserSettings', partial: true })",
        "properties": {
          "full_name": {
            "type": "string",
            "nullable": false
          },
          "language": {
            "type": "string",
            "nullable": false,
            "enum": [
              "pt",
              "en"
            ]
          },
          "settings": {
            "type": "object",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": false
          },
          "last_organization_id": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<Partial<User>, 'created_at' | 'updated_at' | 'deleted_at' | 'password' | 'email' | 'id'>"
      },
      "OrganizationSettings": {
        "title": "OrganizationSettings",
        "type": "object",
        "description": "(tsType: Omit<Partial<Organization>, 'created_at' | 'updated_at' | 'founder_id' | 'currency' | 'founder_id' | 'key' | 'subscription' | 'id'>, schemaOptions: { exclude: [ 'created_at', 'updated_at', 'founder_id', 'currency', 'founder_id', 'key', 'subscription', 'id' ], title: 'OrganizationSettings', partial: true })",
        "properties": {
          "name": {
            "type": "string",
            "nullable": false
          },
          "settings": {
            "type": "object",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "promo_code": {
            "type": "string",
            "nullable": true
          },
          "is_internal": {
            "type": "boolean",
            "nullable": false
          },
          "deletion_scheduled_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deletion_reason": {
            "type": "string",
            "nullable": true
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "founder": {
            "$ref": "#/components/schemas/User"
          },
          "subscription_info": {
            "$ref": "#/components/schemas/Subscription"
          },
          "currency_info": {
            "$ref": "#/components/schemas/CurrencyRelation"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<Partial<Organization>, 'created_at' | 'updated_at' | 'founder_id' | 'currency' | 'founder_id' | 'key' | 'subscription' | 'id'>"
      },
      "Role": {
        "title": "Role",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": false
          },
          "display_name": {
            "type": "string",
            "nullable": false
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "priority": {
            "type": "number",
            "nullable": true
          },
          "scope": {
            "type": "string",
            "nullable": false,
            "enum": [
              "organization",
              "project"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "name",
          "display_name",
          "scope"
        ],
        "additionalProperties": false
      },
      "ProjectBudget": {
        "title": "ProjectBudget",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": false
          },
          "short_window_hours": {
            "type": "number",
            "nullable": true
          },
          "short_window_limit": {
            "type": "number",
            "nullable": true
          },
          "short_window_usage": {
            "type": "number",
            "nullable": true
          },
          "short_window_started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "long_window_days": {
            "type": "number",
            "nullable": true
          },
          "long_window_limit": {
            "type": "number",
            "nullable": true
          },
          "long_window_usage": {
            "type": "number",
            "nullable": true
          },
          "long_window_started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "alert_threshold_pct": {
            "type": "number",
            "nullable": true
          },
          "enforce_limit": {
            "type": "number",
            "nullable": true
          },
          "enforce_for_org_scope": {
            "type": "number",
            "nullable": true
          },
          "count_org_scope_usage": {
            "type": "number",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "short_window_alert_pct": {
            "type": "number",
            "nullable": true
          },
          "long_window_alert_pct": {
            "type": "number",
            "nullable": true
          },
          "budget_alert_roles": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": true
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "project": {
            "$ref": "#/components/schemas/Project"
          }
        },
        "required": [
          "id",
          "project_id"
        ],
        "additionalProperties": false
      },
      "Model": {
        "title": "Model",
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": false
          },
          "group": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "provider": {
            "type": "string",
            "nullable": false
          },
          "type": {
            "type": "string",
            "nullable": false
          },
          "execution_type": {
            "type": "string",
            "nullable": false
          },
          "alias": {
            "type": "string",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "active",
              "inactive",
              "deprecated"
            ]
          },
          "parameters": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "architecture": {
            "type": "object"
          },
          "capabilities": {
            "type": "object"
          },
          "credential_key": {
            "type": "string",
            "nullable": true
          },
          "hidden": {
            "type": "boolean",
            "nullable": true
          },
          "deprecated": {
            "type": "boolean",
            "nullable": true
          },
          "experimental": {
            "type": "boolean",
            "nullable": true
          },
          "priority": {
            "type": "number",
            "nullable": true
          }
        },
        "required": [
          "description",
          "name",
          "provider",
          "type",
          "execution_type",
          "unit"
        ],
        "additionalProperties": false
      },
      "CurrencyPrice": {
        "title": "CurrencyPrice",
        "type": "object",
        "properties": {
          "currency": {
            "type": "string"
          },
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Model"
            }
          }
        },
        "required": [
          "currency",
          "models"
        ],
        "additionalProperties": false
      },
      "PricingWithRelations": {
        "title": "PricingWithRelations",
        "type": "object",
        "description": "(tsType: PricingWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "subscription_name": {
            "type": "string"
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CurrencyPrice"
            }
          }
        },
        "required": [
          "subscription_name",
          "prices"
        ],
        "additionalProperties": false,
        "x-typescript-type": "PricingWithRelations"
      },
      "Permission": {
        "title": "Permission",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "resource": {
            "type": "string",
            "nullable": false
          },
          "action": {
            "type": "string",
            "nullable": false
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "scope": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "name",
          "resource",
          "action"
        ],
        "additionalProperties": false
      },
      "OrganizationCredits": {
        "title": "OrganizationCredits",
        "type": "object",
        "properties": {
          "credits": {
            "type": "number",
            "nullable": false
          },
          "overdraft_limit": {
            "type": "number",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "organization": {
            "$ref": "#/components/schemas/Organization"
          }
        },
        "required": [
          "credits",
          "currency",
          "organization_id"
        ],
        "additionalProperties": false
      },
      "OrganizationExcluding_created_at-updated_at-deleted_at-founder_id_": {
        "title": "OrganizationExcluding_created_at-updated_at-deleted_at-founder_id_",
        "type": "object",
        "description": "(tsType: Omit<Organization, 'created_at' | 'updated_at' | 'deleted_at' | 'founder_id'>, schemaOptions: { exclude: [ 'created_at', 'updated_at', 'deleted_at', 'founder_id' ] })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "key": {
            "type": "string",
            "nullable": false
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "subscription": {
            "type": "string",
            "nullable": true
          },
          "settings": {
            "type": "object",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "promo_code": {
            "type": "string",
            "nullable": true
          },
          "is_internal": {
            "type": "boolean",
            "nullable": false
          },
          "deletion_scheduled_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deletion_reason": {
            "type": "string",
            "nullable": true
          },
          "founder": {
            "$ref": "#/components/schemas/User"
          },
          "subscription_info": {
            "$ref": "#/components/schemas/Subscription"
          },
          "currency_info": {
            "$ref": "#/components/schemas/CurrencyRelation"
          }
        },
        "required": [
          "key",
          "name"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<Organization, 'created_at' | 'updated_at' | 'deleted_at' | 'founder_id'>"
      },
      "CompletionRequest": {
        "title": "CompletionRequest",
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "default": "gpt-3.5-turbo-0125"
          },
          "messages": {
            "type": "array",
            "items": {}
          },
          "seed": {
            "type": "number"
          },
          "temperature": {
            "type": "number",
            "nullable": true
          },
          "max_tokens": {
            "type": "number"
          },
          "top_p": {
            "type": "number"
          },
          "top_k": {
            "type": "number"
          },
          "do_sample": {
            "type": "boolean"
          },
          "stream": {
            "type": "boolean"
          },
          "stop": {
            "type": "string",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "frequency_penalty": {
            "type": "number"
          },
          "presence_penalty": {
            "type": "number"
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "nullable": true
            }
          }
        },
        "required": [
          "model"
        ],
        "additionalProperties": true
      },
      "OktaIntegration": {
        "title": "OktaIntegration",
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "nullable": false
          },
          "client_id": {
            "type": "string",
            "nullable": false
          },
          "client_secret": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "domain": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "address",
          "client_id",
          "domain",
          "organization_id",
          "type"
        ],
        "additionalProperties": false
      },
      "OktaIntegrationExcluding_organization_id_": {
        "title": "OktaIntegrationExcluding_organization_id_",
        "type": "object",
        "description": "(tsType: Omit<OktaIntegration, 'organization_id'>, schemaOptions: { exclude: [ 'organization_id' ] })",
        "properties": {
          "address": {
            "type": "string",
            "nullable": false
          },
          "client_id": {
            "type": "string",
            "nullable": false
          },
          "client_secret": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "domain": {
            "type": "string",
            "nullable": false
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "address",
          "client_id",
          "domain",
          "type"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<OktaIntegration, 'organization_id'>"
      },
      "ModelPricingRuleWithRelations": {
        "title": "ModelPricingRuleWithRelations",
        "type": "object",
        "description": "(tsType: ModelPricingRuleWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "model_name": {
            "type": "string",
            "nullable": false
          },
          "pricing_rule_name": {
            "type": "string",
            "nullable": false
          },
          "pricing_rule": {
            "type": "object",
            "nullable": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "id",
          "model_name",
          "pricing_rule_name",
          "pricing_rule"
        ],
        "additionalProperties": false,
        "x-typescript-type": "ModelPricingRuleWithRelations"
      },
      "ModelWithRelations": {
        "title": "ModelWithRelations",
        "type": "object",
        "description": "(tsType: ModelWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": false
          },
          "group": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "provider": {
            "type": "string",
            "nullable": false
          },
          "type": {
            "type": "string",
            "nullable": false
          },
          "execution_type": {
            "type": "string",
            "nullable": false
          },
          "alias": {
            "type": "string",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "active",
              "inactive",
              "deprecated"
            ]
          },
          "parameters": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "architecture": {
            "type": "object"
          },
          "capabilities": {
            "type": "object"
          },
          "credential_key": {
            "type": "string",
            "nullable": true
          },
          "hidden": {
            "type": "boolean",
            "nullable": true
          },
          "deprecated": {
            "type": "boolean",
            "nullable": true
          },
          "experimental": {
            "type": "boolean",
            "nullable": true
          },
          "priority": {
            "type": "number",
            "nullable": true
          },
          "pricing_rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelPricingRuleWithRelations"
            }
          }
        },
        "required": [
          "description",
          "name",
          "provider",
          "type",
          "execution_type",
          "unit"
        ],
        "additionalProperties": false,
        "x-typescript-type": "ModelWithRelations"
      },
      "ModelPreset": {
        "title": "ModelPreset",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "type": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": true
          },
          "template": {
            "type": "object",
            "nullable": true
          }
        },
        "required": [
          "id",
          "name",
          "type"
        ],
        "additionalProperties": false
      },
      "NewModelPreset": {
        "title": "NewModelPreset",
        "type": "object",
        "description": "(tsType: Omit<ModelPreset, 'id' | 'organization_id' | 'user_id'>, schemaOptions: { title: 'NewModelPreset', exclude: [ 'id', 'organization_id', 'user_id' ] })",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "type": {
            "type": "string",
            "nullable": false
          },
          "template": {
            "type": "object",
            "nullable": true
          }
        },
        "required": [
          "name",
          "type"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<ModelPreset, 'id' | 'organization_id' | 'user_id'>"
      },
      "ModelPresetWithRelations": {
        "title": "ModelPresetWithRelations",
        "type": "object",
        "description": "(tsType: ModelPresetWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "type": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": true
          },
          "template": {
            "type": "object",
            "nullable": true
          }
        },
        "required": [
          "id",
          "name",
          "type"
        ],
        "additionalProperties": false,
        "x-typescript-type": "ModelPresetWithRelations"
      },
      "ModelPresetPartialExcluding_organization_id-user_id-id_": {
        "title": "ModelPresetPartialExcluding_organization_id-user_id-id_",
        "type": "object",
        "description": "(tsType: Omit<Partial<ModelPreset>, 'organization_id' | 'user_id' | 'id'>, schemaOptions: { partial: true, exclude: [ 'organization_id', 'user_id', 'id' ] })",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "type": {
            "type": "string",
            "nullable": false
          },
          "template": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<Partial<ModelPreset>, 'organization_id' | 'user_id' | 'id'>"
      },
      "MfaEmailBody": {
        "title": "MfaEmailBody",
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "full_name": {
            "type": "string"
          },
          "language": {
            "type": "string"
          }
        },
        "required": [
          "email",
          "full_name",
          "language"
        ],
        "additionalProperties": false
      },
      "KnowledgeCollectionExcluding_documents_": {
        "title": "KnowledgeCollectionExcluding_documents_",
        "type": "object",
        "description": "(tsType: Omit<KnowledgeCollection, 'documents'>, schemaOptions: { exclude: [ 'documents' ] })",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "size": {
            "type": "number"
          },
          "count": {
            "type": "number"
          },
          "model_name": {
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "schema": {
            "type": "object"
          }
        },
        "required": [
          "name",
          "size",
          "count"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<KnowledgeCollection, 'documents'>"
      },
      "ScrapeWebsiteConfig": {
        "title": "ScrapeWebsiteConfig",
        "type": "object",
        "properties": {
          "startUrl": {
            "type": "string"
          },
          "depth": {
            "type": "number",
            "minimum": 1,
            "maximum": 5,
            "default": 5
          },
          "maxLinks": {
            "type": "number",
            "minimum": 1,
            "maximum": 1000,
            "default": 50
          },
          "linksToAvoid": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contentSelector": {
            "type": "string"
          },
          "maxChunkSize": {
            "type": "number"
          },
          "chunkOverlap": {
            "type": "number"
          }
        },
        "required": [
          "startUrl"
        ],
        "additionalProperties": false
      },
      "KnowledgeQueryBody": {
        "title": "KnowledgeQueryBody",
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "n": {
            "type": "number"
          }
        },
        "required": [
          "query"
        ],
        "additionalProperties": false
      },
      "GuestTokenBody": {
        "title": "GuestTokenBody",
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "payload": {
            "type": "object"
          }
        },
        "required": [
          "organization_id",
          "type"
        ],
        "additionalProperties": false
      },
      "IntegrationCredential": {
        "title": "IntegrationCredential",
        "type": "object",
        "description": "(tsType: Omit<Credential, 'organization_id' | 'id' | 'hint'>, schemaOptions: { title: 'IntegrationCredential', exclude: [ 'organization_id', 'id', 'hint' ] })",
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "metadata": {
            "type": "string",
            "nullable": true
          },
          "provider": {
            "type": "string",
            "nullable": false
          },
          "type": {
            "type": "string",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": false
          }
        },
        "required": [
          "provider",
          "type",
          "value"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<Credential, 'organization_id' | 'id' | 'hint'>"
      },
      "UsagePerModel": {
        "title": "UsagePerModel",
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "total_cost": {
            "type": "number"
          },
          "total_usage": {
            "type": "number"
          },
          "total_requests": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SubscriptionWithRelations": {
        "title": "SubscriptionWithRelations",
        "type": "object",
        "description": "(tsType: SubscriptionWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "name": {
            "type": "string",
            "nullable": false
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "price": {
            "type": "number",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "integrations": {
            "type": "string",
            "nullable": true
          },
          "resources": {
            "type": "object",
            "nullable": true
          },
          "monthly_credits": {
            "type": "number",
            "nullable": true
          },
          "signup_credits": {
            "type": "number",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "rate_deck_id": {
            "type": "string",
            "nullable": true
          },
          "max_concurrent_livekit_rooms": {
            "type": "number",
            "nullable": true
          },
          "features": {
            "type": "object",
            "nullable": true
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false,
        "x-typescript-type": "SubscriptionWithRelations"
      },
      "CurrencyRelationWithRelations": {
        "title": "CurrencyRelationWithRelations",
        "type": "object",
        "description": "(tsType: CurrencyRelationWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "currency": {
            "type": "string",
            "nullable": false
          },
          "rate": {
            "type": "number",
            "nullable": true
          },
          "tax": {
            "type": "number",
            "nullable": true
          }
        },
        "required": [
          "currency"
        ],
        "additionalProperties": false,
        "x-typescript-type": "CurrencyRelationWithRelations"
      },
      "OrganizationWithRelations": {
        "title": "OrganizationWithRelations",
        "type": "object",
        "description": "(tsType: OrganizationWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "founder_id": {
            "type": "string",
            "nullable": false
          },
          "id": {
            "type": "string",
            "nullable": false
          },
          "key": {
            "type": "string",
            "nullable": false
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "subscription": {
            "type": "string",
            "nullable": true
          },
          "settings": {
            "type": "object",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "promo_code": {
            "type": "string",
            "nullable": true
          },
          "is_internal": {
            "type": "boolean",
            "nullable": false
          },
          "deletion_scheduled_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deletion_reason": {
            "type": "string",
            "nullable": true
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "founder": {
            "$ref": "#/components/schemas/User"
          },
          "subscription_info": {
            "$ref": "#/components/schemas/Subscription"
          },
          "currency_info": {
            "$ref": "#/components/schemas/CurrencyRelation"
          },
          "foreignKey": {}
        },
        "required": [
          "key",
          "name"
        ],
        "additionalProperties": false,
        "x-typescript-type": "OrganizationWithRelations"
      },
      "ProjectBudgetWithRelations": {
        "title": "ProjectBudgetWithRelations",
        "type": "object",
        "description": "(tsType: ProjectBudgetWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": false
          },
          "short_window_hours": {
            "type": "number",
            "nullable": true
          },
          "short_window_limit": {
            "type": "number",
            "nullable": true
          },
          "short_window_usage": {
            "type": "number",
            "nullable": true
          },
          "short_window_started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "long_window_days": {
            "type": "number",
            "nullable": true
          },
          "long_window_limit": {
            "type": "number",
            "nullable": true
          },
          "long_window_usage": {
            "type": "number",
            "nullable": true
          },
          "long_window_started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "alert_threshold_pct": {
            "type": "number",
            "nullable": true
          },
          "enforce_limit": {
            "type": "number",
            "nullable": true
          },
          "enforce_for_org_scope": {
            "type": "number",
            "nullable": true
          },
          "count_org_scope_usage": {
            "type": "number",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "short_window_alert_pct": {
            "type": "number",
            "nullable": true
          },
          "long_window_alert_pct": {
            "type": "number",
            "nullable": true
          },
          "budget_alert_roles": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": true
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "project": {
            "$ref": "#/components/schemas/Project"
          },
          "foreignKey": {}
        },
        "required": [
          "id",
          "project_id"
        ],
        "additionalProperties": false,
        "x-typescript-type": "ProjectBudgetWithRelations"
      },
      "ProjectWithRelations": {
        "title": "ProjectWithRelations",
        "type": "object",
        "description": "(tsType: ProjectWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "settings": {
            "type": "object",
            "nullable": true
          },
          "created_by": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "organization": {
            "$ref": "#/components/schemas/Organization"
          },
          "creator": {
            "$ref": "#/components/schemas/User"
          },
          "foreignKey": {},
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectMemberWithRelations"
            }
          },
          "budget": {
            "$ref": "#/components/schemas/ProjectBudgetWithRelations"
          }
        },
        "required": [
          "id",
          "organization_id",
          "name"
        ],
        "additionalProperties": false,
        "x-typescript-type": "ProjectWithRelations"
      },
      "ProjectMemberWithRelations": {
        "title": "ProjectMemberWithRelations",
        "type": "object",
        "description": "(tsType: ProjectMemberWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": false
          },
          "joined_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "invited_by": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "project": {
            "$ref": "#/components/schemas/Project"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "inviter": {
            "$ref": "#/components/schemas/User"
          },
          "foreignKey": {}
        },
        "required": [
          "id",
          "user_id"
        ],
        "additionalProperties": false,
        "x-typescript-type": "ProjectMemberWithRelations"
      },
      "UserWithRelations": {
        "title": "UserWithRelations",
        "type": "object",
        "description": "(tsType: UserWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "password": {
            "type": "string",
            "nullable": false
          },
          "email": {
            "type": "string",
            "nullable": false,
            "format": "email"
          },
          "full_name": {
            "type": "string",
            "nullable": false
          },
          "language": {
            "type": "string",
            "nullable": false,
            "enum": [
              "pt",
              "en"
            ]
          },
          "settings": {
            "type": "object",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": false
          },
          "last_organization_id": {
            "type": "string",
            "nullable": true
          },
          "projectMembers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectMemberWithRelations"
            }
          }
        },
        "required": [
          "password",
          "email",
          "full_name"
        ],
        "additionalProperties": false,
        "x-typescript-type": "UserWithRelations"
      },
      "ModelUsageWithRelations": {
        "title": "ModelUsageWithRelations",
        "type": "object",
        "description": "(tsType: ModelUsageWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "amount": {
            "type": "number",
            "nullable": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": false
          },
          "id": {
            "type": "string",
            "nullable": false
          },
          "model_name": {
            "type": "string",
            "nullable": true
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "cost": {
            "type": "number",
            "nullable": false
          },
          "cost_details": {
            "type": "object",
            "nullable": true
          },
          "supplier_cost": {
            "type": "number",
            "nullable": true
          },
          "supplier_cost_details": {
            "type": "object",
            "nullable": true
          },
          "metadata": {
            "type": "object",
            "nullable": true
          },
          "execution_type": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "subscription_name": {
            "type": "string",
            "nullable": false
          },
          "unit": {
            "type": "string",
            "nullable": false
          },
          "user_id": {
            "type": "string",
            "nullable": false
          },
          "overdraft": {
            "type": "boolean",
            "nullable": true
          },
          "cached": {
            "type": "boolean",
            "nullable": true
          },
          "agent_id": {
            "type": "string",
            "nullable": true
          },
          "bot_id": {
            "type": "string",
            "nullable": true
          },
          "room_name": {
            "type": "string",
            "nullable": true
          },
          "thread_id": {
            "type": "string",
            "nullable": true
          },
          "delay": {
            "type": "number",
            "nullable": true
          },
          "execution_time": {
            "type": "number",
            "nullable": true
          },
          "relative_execution_time": {
            "type": "number",
            "nullable": true
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "organization": {
            "$ref": "#/components/schemas/Organization"
          },
          "model": {
            "$ref": "#/components/schemas/Model"
          },
          "subscription": {
            "$ref": "#/components/schemas/Subscription"
          },
          "foreignKey": {}
        },
        "required": [
          "amount",
          "currency",
          "model_name",
          "organization_id",
          "cost",
          "execution_type",
          "type",
          "subscription_name",
          "unit",
          "user_id"
        ],
        "additionalProperties": false,
        "x-typescript-type": "ModelUsageWithRelations"
      },
      "UsageByType": {
        "title": "UsageByType",
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "total_cost": {
            "type": "number"
          },
          "total_usage": {
            "type": "number"
          },
          "total_requests": {
            "type": "number"
          },
          "type": {
            "type": "string"
          },
          "identifier": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "pricing_rule": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "UsageItem": {
        "title": "UsageItem",
        "type": "object",
        "properties": {
          "charge_subtype": {
            "type": "string",
            "nullable": false
          },
          "charge_type": {
            "type": "string",
            "nullable": false
          },
          "cost_amount": {
            "type": "number",
            "nullable": false
          },
          "cost_amount_local": {
            "type": "number",
            "nullable": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          },
          "event_timestamp": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          },
          "currency": {
            "type": "string",
            "nullable": false
          },
          "details": {
            "type": "string",
            "nullable": true
          },
          "exchange_rate": {
            "type": "number",
            "nullable": true
          },
          "execution_time_ms": {
            "type": "number",
            "nullable": true
          },
          "id": {
            "type": "string",
            "nullable": false
          },
          "identifier": {
            "type": "string",
            "nullable": true
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": true
          },
          "price_amount": {
            "type": "number",
            "nullable": false
          },
          "pricing_rule": {
            "type": "string",
            "nullable": false
          },
          "quantity": {
            "type": "number",
            "nullable": false
          },
          "request_id": {
            "type": "string",
            "nullable": true
          },
          "ttfb_ms": {
            "type": "number",
            "nullable": true
          },
          "throughput": {
            "type": "number",
            "nullable": true
          },
          "performance_details": {
            "type": "object",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "nullable": false
          },
          "cost_attribution": {
            "type": "string",
            "nullable": false
          }
        },
        "required": [
          "charge_subtype",
          "charge_type",
          "cost_amount",
          "cost_amount_local",
          "created_at",
          "event_timestamp",
          "currency",
          "id",
          "organization_id",
          "price_amount",
          "pricing_rule",
          "quantity",
          "unit",
          "cost_attribution"
        ],
        "additionalProperties": false
      },
      "UsageRequest": {
        "title": "UsageRequest",
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "string",
            "nullable": true
          },
          "api_key_id": {
            "type": "string",
            "nullable": true
          },
          "auth_mode": {
            "type": "string",
            "nullable": false
          },
          "bot_id": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          },
          "event_timestamp": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          },
          "execution_time_ms": {
            "type": "number",
            "nullable": true
          },
          "id": {
            "type": "string",
            "nullable": false
          },
          "metadata": {
            "type": "string",
            "nullable": true
          },
          "guest": {
            "type": "object",
            "nullable": true
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "processing_time_ms": {
            "type": "number",
            "nullable": true
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "room_name": {
            "type": "string",
            "nullable": true
          },
          "source_service": {
            "type": "string",
            "nullable": false
          },
          "speed": {
            "type": "number",
            "nullable": true
          },
          "thread_id": {
            "type": "string",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          },
          "user_id": {
            "type": "string",
            "nullable": false
          },
          "total_price_local": {
            "type": "number",
            "nullable": false
          }
        },
        "required": [
          "auth_mode",
          "created_at",
          "event_timestamp",
          "id",
          "organization_id",
          "source_service",
          "updated_at",
          "user_id",
          "total_price_local"
        ],
        "additionalProperties": false
      },
      "CreditTransactions": {
        "title": "CreditTransactions",
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "nullable": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": false
          },
          "id": {
            "type": "string",
            "nullable": false
          },
          "metadata": {
            "type": "string",
            "nullable": true
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "enum": [
              "credit",
              "debit"
            ]
          },
          "source": {
            "type": "string",
            "nullable": true,
            "enum": [
              "purchased",
              "plan",
              "auto_recharge",
              "admin",
              "system"
            ]
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "organization": {
            "$ref": "#/components/schemas/Organization"
          }
        },
        "required": [
          "amount",
          "currency",
          "organization_id",
          "user_id",
          "type"
        ],
        "additionalProperties": false
      },
      "AuthResponse": {
        "title": "AuthResponse",
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string"
          }
        },
        "required": [
          "access_token"
        ],
        "additionalProperties": false
      },
      "RegisterBody": {
        "title": "RegisterBody",
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "password": {
            "type": "string",
            "minLength": 8,
            "maxLength": 64
          },
          "full_name": {
            "type": "string",
            "minLength": 4,
            "maxLength": 64
          },
          "company_name": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "subscription_id": {
            "type": "string",
            "minLength": 4,
            "maxLength": 64
          },
          "language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 5,
            "enum": [
              "pt",
              "en"
            ]
          },
          "promo_code": {
            "type": "string",
            "minLength": 4,
            "maxLength": 20
          },
          "phone": {
            "type": "string",
            "minLength": 4,
            "maxLength": 20
          }
        },
        "required": [
          "email",
          "password",
          "full_name",
          "company_name",
          "currency",
          "phone"
        ],
        "additionalProperties": false
      },
      "MfaCredentials": {
        "title": "MfaCredentials",
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "password": {
            "type": "string",
            "minLength": 8,
            "maxLength": 64
          },
          "mfa": {
            "type": "object"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "additionalProperties": false
      },
      "AccessTokenSession": {
        "title": "AccessTokenSession",
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string"
          },
          "full_name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "impersonation_context": {
            "type": "object"
          }
        },
        "required": [
          "user_id",
          "full_name",
          "email"
        ],
        "additionalProperties": true
      },
      "OktaCredentials": {
        "title": "OktaCredentials",
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          }
        },
        "required": [
          "access_token",
          "domain"
        ],
        "additionalProperties": false
      },
      "ApiKey": {
        "title": "ApiKey",
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "hint": {
            "type": "string",
            "nullable": false
          },
          "id": {
            "type": "string",
            "nullable": false
          },
          "key": {
            "type": "string",
            "nullable": false
          },
          "last_used_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "user_id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "hint",
          "key",
          "name",
          "user_id",
          "organization_id"
        ],
        "additionalProperties": false
      },
      "NewApiKey": {
        "title": "NewApiKey",
        "type": "object",
        "description": "(tsType: Omit<ApiKey, 'id' | 'user_id' | 'organization_id' | 'created_at' | 'key' | 'hint' | 'created_at' | 'last_used_at'>, schemaOptions: { title: 'NewApiKey', exclude: [ 'id', 'user_id', 'organization_id', 'created_at', 'key', 'hint', 'created_at', 'last_used_at' ] })",
        "properties": {
          "name": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<ApiKey, 'id' | 'user_id' | 'organization_id' | 'created_at' | 'key' | 'hint' | 'created_at' | 'last_used_at'>"
      },
      "ApiKeyExcluding_key_WithRelations": {
        "title": "ApiKeyExcluding_key_WithRelations",
        "type": "object",
        "description": "(tsType: Omit<ApiKeyWithRelations, 'key'>, schemaOptions: { includeRelations: true, exclude: [ 'key' ] })",
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "hint": {
            "type": "string",
            "nullable": false
          },
          "id": {
            "type": "string",
            "nullable": false
          },
          "last_used_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "user_id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "hint",
          "name",
          "user_id",
          "organization_id"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<ApiKeyWithRelations, 'key'>"
      },
      "ApiKeyPartialExcluding_created_at-hint-key-user_id-last_used_at_": {
        "title": "ApiKeyPartialExcluding_created_at-hint-key-user_id-last_used_at_",
        "type": "object",
        "description": "(tsType: Omit<Partial<ApiKey>, 'created_at' | 'hint' | 'key' | 'user_id' | 'last_used_at'>, schemaOptions: { partial: true, exclude: [ 'created_at', 'hint', 'key', 'user_id', 'last_used_at' ] })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "name": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<Partial<ApiKey>, 'created_at' | 'hint' | 'key' | 'user_id' | 'last_used_at'>"
      },
      "SearchReplace": {
        "title": "SearchReplace",
        "type": "object",
        "properties": {
          "search": {
            "type": "string"
          },
          "replace": {
            "type": "string"
          },
          "case_sensitive": {
            "type": "boolean"
          }
        },
        "required": [
          "search",
          "replace"
        ],
        "additionalProperties": false
      },
      "AnonymizerBodyExcluding_segments_": {
        "title": "AnonymizerBodyExcluding_segments_",
        "type": "object",
        "description": "(tsType: Omit<AnonymizerBody, 'segments'>, schemaOptions: { exclude: [ 'segments' ] })",
        "properties": {
          "text": {
            "type": "string"
          },
          "entities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sequence": {
            "type": "number"
          },
          "language": {
            "type": "string",
            "nullable": true
          },
          "search_and_replace": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchReplace"
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<AnonymizerBody, 'segments'>"
      },
      "AnonymizerBody": {
        "title": "AnonymizerBody",
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "entities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sequence": {
            "type": "number"
          },
          "segments": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "language": {
            "type": "string",
            "nullable": true
          },
          "search_and_replace": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchReplace"
            }
          }
        },
        "additionalProperties": false
      },
      "AgentWithExtension": {
        "title": "AgentWithExtension",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": false
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "share": {
            "type": "string",
            "nullable": true
          },
          "instructions": {
            "type": "string",
            "nullable": true
          },
          "llm_model": {
            "type": "string",
            "nullable": false
          },
          "tts_model": {
            "type": "string",
            "nullable": false
          },
          "tts_voice": {
            "type": "string",
            "nullable": false
          },
          "language": {
            "type": "string",
            "nullable": false
          },
          "tools": {
            "type": "array",
            "items": {
              "nullable": true,
              "type": "object"
            }
          },
          "call_configuration": {
            "type": "object",
            "nullable": true
          },
          "abilities": {
            "type": "object",
            "nullable": true
          },
          "mcp_servers": {
            "type": "array",
            "items": {
              "nullable": true,
              "type": "object"
            }
          },
          "parameters": {
            "type": "object",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "post_analysis": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": true
            }
          }
        },
        "required": [
          "id",
          "organization_id",
          "user_id",
          "llm_model",
          "tts_model",
          "tts_voice",
          "language"
        ],
        "additionalProperties": false
      },
      "AgentBody": {
        "title": "AgentBody",
        "type": "object",
        "description": "(tsType: Omit<AgentWithExtension, 'id' | 'user_id' | 'organization_id'>, schemaOptions: { title: 'AgentBody', exclude: [ 'id', 'user_id', 'organization_id' ] })",
        "properties": {
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "share": {
            "type": "string",
            "nullable": true
          },
          "instructions": {
            "type": "string",
            "nullable": true
          },
          "llm_model": {
            "type": "string",
            "nullable": false
          },
          "tts_model": {
            "type": "string",
            "nullable": false
          },
          "tts_voice": {
            "type": "string",
            "nullable": false
          },
          "language": {
            "type": "string",
            "nullable": false
          },
          "tools": {
            "type": "array",
            "items": {
              "nullable": true,
              "type": "object"
            }
          },
          "call_configuration": {
            "type": "object",
            "nullable": true
          },
          "abilities": {
            "type": "object",
            "nullable": true
          },
          "mcp_servers": {
            "type": "array",
            "items": {
              "nullable": true,
              "type": "object"
            }
          },
          "parameters": {
            "type": "object",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "post_analysis": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": true
            }
          }
        },
        "required": [
          "llm_model",
          "tts_model",
          "tts_voice",
          "language"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<AgentWithExtension, 'id' | 'user_id' | 'organization_id'>"
      },
      "AgentDeployWhatsappWithRelations": {
        "title": "AgentDeployWhatsappWithRelations",
        "type": "object",
        "description": "(tsType: AgentDeployWhatsappWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "agent_id": {
            "type": "string",
            "nullable": false
          },
          "business_id": {
            "type": "string",
            "nullable": false
          },
          "configuration": {
            "type": "object",
            "nullable": true
          },
          "disabled": {
            "type": "boolean",
            "nullable": true
          },
          "organization_id": {
            "type": "string",
            "nullable": true
          },
          "phone_number_id": {
            "type": "string",
            "nullable": false
          },
          "display_phone_number": {
            "type": "string",
            "nullable": true
          },
          "phone_number_status": {
            "type": "string",
            "nullable": true
          },
          "waba_id": {
            "type": "string",
            "nullable": false
          },
          "webhook_subscription_status": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "agent_id",
          "business_id",
          "phone_number_id",
          "waba_id"
        ],
        "additionalProperties": false,
        "x-typescript-type": "AgentDeployWhatsappWithRelations"
      },
      "AgentDeployChatWidgetWithRelations": {
        "title": "AgentDeployChatWidgetWithRelations",
        "type": "object",
        "description": "(tsType: AgentDeployChatWidgetWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "organization_id": {
            "type": "string",
            "nullable": true
          },
          "agent_id": {
            "type": "string",
            "nullable": false
          },
          "disabled": {
            "type": "boolean",
            "nullable": true
          },
          "key": {
            "type": "string",
            "nullable": false
          },
          "allowed_origins": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": true
            }
          },
          "configuration": {
            "type": "object",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "agent_id",
          "key"
        ],
        "additionalProperties": false,
        "x-typescript-type": "AgentDeployChatWidgetWithRelations"
      },
      "AgentDeploySipWithRelations": {
        "title": "AgentDeploySipWithRelations",
        "type": "object",
        "description": "(tsType: AgentDeploySipWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "agent_id": {
            "type": "string",
            "nullable": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dispatch_rule_id": {
            "type": "string",
            "nullable": true
          },
          "enable_inbound": {
            "type": "boolean",
            "nullable": true
          },
          "enable_outbound": {
            "type": "boolean",
            "nullable": true
          },
          "inbound_trunk_id": {
            "type": "string",
            "nullable": true
          },
          "did_id": {
            "type": "string",
            "nullable": true
          },
          "organization_id": {
            "type": "string",
            "nullable": true
          },
          "outbound_trunk_id": {
            "type": "string",
            "nullable": true
          },
          "outbound_configuration": {
            "type": "object",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "sip_username": {
            "type": "string",
            "nullable": true
          },
          "sip_password": {
            "type": "string",
            "nullable": true
          },
          "sip_server": {
            "type": "string",
            "nullable": true
          },
          "sip_register_expires": {
            "type": "number",
            "nullable": true
          }
        },
        "required": [
          "agent_id"
        ],
        "additionalProperties": false,
        "x-typescript-type": "AgentDeploySipWithRelations"
      },
      "AgentWithExtensionWithRelations": {
        "title": "AgentWithExtensionWithRelations",
        "type": "object",
        "description": "(tsType: AgentWithExtensionWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": false
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "share": {
            "type": "string",
            "nullable": true
          },
          "instructions": {
            "type": "string",
            "nullable": true
          },
          "llm_model": {
            "type": "string",
            "nullable": false
          },
          "tts_model": {
            "type": "string",
            "nullable": false
          },
          "tts_voice": {
            "type": "string",
            "nullable": false
          },
          "language": {
            "type": "string",
            "nullable": false
          },
          "tools": {
            "type": "array",
            "items": {
              "nullable": true,
              "type": "object"
            }
          },
          "call_configuration": {
            "type": "object",
            "nullable": true
          },
          "abilities": {
            "type": "object",
            "nullable": true
          },
          "mcp_servers": {
            "type": "array",
            "items": {
              "nullable": true,
              "type": "object"
            }
          },
          "parameters": {
            "type": "object",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "post_analysis": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": true
            }
          },
          "agent_deploy_whatsapp": {
            "$ref": "#/components/schemas/AgentDeployWhatsappWithRelations"
          },
          "agent_deploy_chat_widget": {
            "$ref": "#/components/schemas/AgentDeployChatWidgetWithRelations"
          },
          "agent_deploy_sip": {
            "$ref": "#/components/schemas/AgentDeploySipWithRelations"
          }
        },
        "required": [
          "id",
          "organization_id",
          "user_id",
          "llm_model",
          "tts_model",
          "tts_voice",
          "language"
        ],
        "additionalProperties": false,
        "x-typescript-type": "AgentWithExtensionWithRelations"
      },
      "AgentWithExtensionPartialExcluding_user_id-organization_id_": {
        "title": "AgentWithExtensionPartialExcluding_user_id-organization_id_",
        "type": "object",
        "description": "(tsType: Omit<Partial<AgentWithExtension>, 'user_id' | 'organization_id'>, schemaOptions: { partial: true, exclude: [ 'user_id', 'organization_id' ] })",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "project_id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "share": {
            "type": "string",
            "nullable": true
          },
          "instructions": {
            "type": "string",
            "nullable": true
          },
          "llm_model": {
            "type": "string",
            "nullable": false
          },
          "tts_model": {
            "type": "string",
            "nullable": false
          },
          "tts_voice": {
            "type": "string",
            "nullable": false
          },
          "language": {
            "type": "string",
            "nullable": false
          },
          "tools": {
            "type": "array",
            "items": {
              "nullable": true,
              "type": "object"
            }
          },
          "call_configuration": {
            "type": "object",
            "nullable": true
          },
          "abilities": {
            "type": "object",
            "nullable": true
          },
          "mcp_servers": {
            "type": "array",
            "items": {
              "nullable": true,
              "type": "object"
            }
          },
          "parameters": {
            "type": "object",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "post_analysis": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": true
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<Partial<AgentWithExtension>, 'user_id' | 'organization_id'>"
      },
      "OutboundCallResponse": {
        "title": "OutboundCallResponse",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "callId": {
            "type": "string"
          },
          "roomName": {
            "type": "string"
          },
          "participantId": {
            "type": "string"
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": false
      },
      "OutboundCallRequest": {
        "title": "OutboundCallRequest",
        "type": "object",
        "properties": {
          "phone_number": {
            "type": "string"
          },
          "metadata_overrides": {
            "type": "object",
            "description": "Agent metadata overrides for this specific call"
          }
        },
        "required": [
          "phone_number"
        ],
        "additionalProperties": false
      },
      "AgentDeployWhatsapp": {
        "title": "AgentDeployWhatsapp",
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "string",
            "nullable": false
          },
          "business_id": {
            "type": "string",
            "nullable": false
          },
          "configuration": {
            "type": "object",
            "nullable": true
          },
          "disabled": {
            "type": "boolean",
            "nullable": true
          },
          "organization_id": {
            "type": "string",
            "nullable": true
          },
          "phone_number_id": {
            "type": "string",
            "nullable": false
          },
          "display_phone_number": {
            "type": "string",
            "nullable": true
          },
          "phone_number_status": {
            "type": "string",
            "nullable": true
          },
          "waba_id": {
            "type": "string",
            "nullable": false
          },
          "webhook_subscription_status": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "agent_id",
          "business_id",
          "phone_number_id",
          "waba_id"
        ],
        "additionalProperties": false
      },
      "NewAgentDeployWhatsapp": {
        "title": "NewAgentDeployWhatsapp",
        "type": "object",
        "description": "(tsType: Omit<AgentDeployWhatsapp, 'organization_id' | 'disabled' | 'webhook_subscription_status' | 'phone_number_status'>, schemaOptions: { title: 'NewAgentDeployWhatsapp', exclude: [ 'organization_id', 'disabled', 'webhook_subscription_status', 'phone_number_status' ] })",
        "properties": {
          "agent_id": {
            "type": "string",
            "nullable": false
          },
          "business_id": {
            "type": "string",
            "nullable": false
          },
          "configuration": {
            "type": "object",
            "nullable": true
          },
          "phone_number_id": {
            "type": "string",
            "nullable": false
          },
          "display_phone_number": {
            "type": "string",
            "nullable": true
          },
          "waba_id": {
            "type": "string",
            "nullable": false
          }
        },
        "required": [
          "agent_id",
          "business_id",
          "phone_number_id",
          "waba_id"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<AgentDeployWhatsapp, 'organization_id' | 'disabled' | 'webhook_subscription_status' | 'phone_number_status'>"
      },
      "WhatsappEvent": {
        "title": "WhatsappEvent",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": true
          },
          "thread_id": {
            "type": "string",
            "nullable": true
          },
          "message_id": {
            "type": "string",
            "nullable": true
          },
          "from_number": {
            "type": "string",
            "nullable": true
          },
          "to_number": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "nullable": true
          },
          "message_type": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "error_code": {
            "type": "string",
            "nullable": true
          },
          "attempts": {
            "type": "number",
            "nullable": true
          },
          "processed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "agent_id": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "AgentDeployWhatsappPartial": {
        "title": "AgentDeployWhatsappPartial",
        "type": "object",
        "description": "(tsType: Partial<AgentDeployWhatsapp>, schemaOptions: { partial: true })",
        "properties": {
          "agent_id": {
            "type": "string",
            "nullable": false
          },
          "business_id": {
            "type": "string",
            "nullable": false
          },
          "configuration": {
            "type": "object",
            "nullable": true
          },
          "disabled": {
            "type": "boolean",
            "nullable": true
          },
          "organization_id": {
            "type": "string",
            "nullable": true
          },
          "phone_number_id": {
            "type": "string",
            "nullable": false
          },
          "display_phone_number": {
            "type": "string",
            "nullable": true
          },
          "phone_number_status": {
            "type": "string",
            "nullable": true
          },
          "waba_id": {
            "type": "string",
            "nullable": false
          },
          "webhook_subscription_status": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<AgentDeployWhatsapp>"
      },
      "ThreadOptions": {
        "title": "ThreadOptions",
        "type": "object",
        "properties": {
          "additional_instructions": {
            "type": "string"
          },
          "vars": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "SendMessageRequest": {
        "title": "SendMessageRequest",
        "type": "object",
        "properties": {
          "to": {
            "type": "string"
          },
          "template_name": {
            "type": "string"
          },
          "variables": {
            "type": "object"
          },
          "thread_options": {
            "$ref": "#/components/schemas/ThreadOptions"
          }
        },
        "required": [
          "to",
          "template_name"
        ],
        "additionalProperties": false
      },
      "AgentDeployWhatsappBaileysWithRelations": {
        "title": "AgentDeployWhatsappBaileysWithRelations",
        "type": "object",
        "description": "(tsType: AgentDeployWhatsappBaileysWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "agent_id": {
            "type": "string",
            "nullable": false
          },
          "organization_id": {
            "type": "string",
            "nullable": false
          },
          "disabled": {
            "type": "boolean",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "human_activity_timeout": {
            "type": "number",
            "nullable": true
          },
          "qr_code": {
            "type": "string",
            "nullable": true
          },
          "lid": {
            "type": "string",
            "nullable": true
          },
          "phone_number": {
            "type": "string",
            "nullable": true
          },
          "configuration": {
            "type": "object",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          }
        },
        "required": [
          "agent_id",
          "organization_id"
        ],
        "additionalProperties": false,
        "x-typescript-type": "AgentDeployWhatsappBaileysWithRelations"
      },
      "AgentDeploySip": {
        "title": "AgentDeploySip",
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "string",
            "nullable": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dispatch_rule_id": {
            "type": "string",
            "nullable": true
          },
          "enable_inbound": {
            "type": "boolean",
            "nullable": true
          },
          "enable_outbound": {
            "type": "boolean",
            "nullable": true
          },
          "inbound_trunk_id": {
            "type": "string",
            "nullable": true
          },
          "did_id": {
            "type": "string",
            "nullable": true
          },
          "organization_id": {
            "type": "string",
            "nullable": true
          },
          "outbound_trunk_id": {
            "type": "string",
            "nullable": true
          },
          "outbound_configuration": {
            "type": "object",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "sip_username": {
            "type": "string",
            "nullable": true
          },
          "sip_password": {
            "type": "string",
            "nullable": true
          },
          "sip_server": {
            "type": "string",
            "nullable": true
          },
          "sip_register_expires": {
            "type": "number",
            "nullable": true
          }
        },
        "required": [
          "agent_id"
        ],
        "additionalProperties": false
      },
      "SipDeployRequest": {
        "title": "SipDeployRequest",
        "type": "object",
        "properties": {
          "enable_inbound": {
            "type": "boolean"
          },
          "enable_outbound": {
            "type": "boolean"
          },
          "did_id": {
            "type": "string",
            "description": "DID (phone number) ID to associate with inbound calls",
            "nullable": true
          },
          "outbound_configuration": {
            "type": "object",
            "description": "SIP trunk configuration for outbound calls",
            "nullable": true
          },
          "sip_username": {
            "type": "string",
            "description": "SIP registration username",
            "nullable": true
          },
          "sip_password": {
            "type": "string",
            "description": "SIP registration password",
            "nullable": true
          },
          "sip_server": {
            "type": "string",
            "description": "SIP server address for registration",
            "nullable": true
          },
          "sip_register_expires": {
            "type": "number",
            "description": "SIP registration expiry time in seconds",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewAgentDeployChatWidget": {
        "title": "NewAgentDeployChatWidget",
        "type": "object",
        "description": "(tsType: Omit<AgentDeployChatWidget, 'key' | 'organization_id' | 'disabled' | 'agent_id'>, schemaOptions: { title: 'NewAgentDeployChatWidget', exclude: [ 'key', 'organization_id', 'disabled', 'agent_id' ] })",
        "properties": {
          "allowed_origins": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": true
            }
          },
          "configuration": {
            "type": "object",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<AgentDeployChatWidget, 'key' | 'organization_id' | 'disabled' | 'agent_id'>"
      },
      "AgentDeployChatWidgetPartialExcluding_key-organization_id-agent_id_": {
        "title": "AgentDeployChatWidgetPartialExcluding_key-organization_id-agent_id_",
        "type": "object",
        "description": "(tsType: Omit<Partial<AgentDeployChatWidget>, 'key' | 'organization_id' | 'agent_id'>, schemaOptions: { partial: true, exclude: [ 'key', 'organization_id', 'agent_id' ] })",
        "properties": {
          "disabled": {
            "type": "boolean",
            "nullable": true
          },
          "allowed_origins": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": true
            }
          },
          "configuration": {
            "type": "object",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<Partial<AgentDeployChatWidget>, 'key' | 'organization_id' | 'agent_id'>"
      },
      "AgentDeployChatWidget": {
        "title": "AgentDeployChatWidget",
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "nullable": true
          },
          "agent_id": {
            "type": "string",
            "nullable": false
          },
          "disabled": {
            "type": "boolean",
            "nullable": true
          },
          "key": {
            "type": "string",
            "nullable": false
          },
          "allowed_origins": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": true
            }
          },
          "configuration": {
            "type": "object",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "agent_id",
          "key"
        ],
        "additionalProperties": false
      },
      "Agent.ScopeFilter": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "uniqueItems": true
              }
            ]
          },
          "include": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": false,
        "title": "Agent.ScopeFilter"
      },
      "Agent.IncludeFilter.Items": {
        "title": "Agent.IncludeFilter.Items",
        "type": "object",
        "properties": {
          "relation": {
            "type": "string",
            "enum": [
              "agent_deploy_whatsapp",
              "agent_deploy_chat_widget",
              "agent_deploy_sip"
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/Agent.ScopeFilter"
          }
        }
      },
      "Agent.Filter": {
        "type": "object",
        "title": "Agent.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "Agent.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "organization_id": {
                    "type": "boolean"
                  },
                  "project_id": {
                    "type": "boolean"
                  },
                  "user_id": {
                    "type": "boolean"
                  },
                  "name": {
                    "type": "boolean"
                  },
                  "description": {
                    "type": "boolean"
                  },
                  "share": {
                    "type": "boolean"
                  },
                  "instructions": {
                    "type": "boolean"
                  },
                  "llm_model": {
                    "type": "boolean"
                  },
                  "tts_model": {
                    "type": "boolean"
                  },
                  "tts_voice": {
                    "type": "boolean"
                  },
                  "language": {
                    "type": "boolean"
                  },
                  "tools": {
                    "type": "boolean"
                  },
                  "call_configuration": {
                    "type": "boolean"
                  },
                  "abilities": {
                    "type": "boolean"
                  },
                  "mcp_servers": {
                    "type": "boolean"
                  },
                  "parameters": {
                    "type": "boolean"
                  },
                  "created_at": {
                    "type": "boolean"
                  },
                  "updated_at": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "organization_id",
                    "project_id",
                    "user_id",
                    "name",
                    "description",
                    "share",
                    "instructions",
                    "llm_model",
                    "tts_model",
                    "tts_voice",
                    "language",
                    "tools",
                    "call_configuration",
                    "abilities",
                    "mcp_servers",
                    "parameters",
                    "created_at",
                    "updated_at"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "Agent.Fields"
          },
          "include": {
            "title": "Agent.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Agent.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<Agent>"
      },
      "loopback.Count": {
        "type": "object",
        "title": "loopback.Count",
        "x-typescript-type": "@loopback/repository#Count",
        "properties": {
          "count": {
            "type": "number"
          }
        }
      },
      "UsageRequest.ScopeFilter": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "uniqueItems": true
              }
            ]
          },
          "include": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": false,
        "title": "UsageRequest.ScopeFilter"
      },
      "UsageRequest.IncludeFilter.Items": {
        "title": "UsageRequest.IncludeFilter.Items",
        "type": "object",
        "properties": {
          "relation": {
            "type": "string",
            "enum": [
              "items"
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/UsageRequest.ScopeFilter"
          }
        }
      },
      "UsageRequest.Filter": {
        "type": "object",
        "title": "UsageRequest.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "UsageRequest.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "agent_id": {
                    "type": "boolean"
                  },
                  "api_key_id": {
                    "type": "boolean"
                  },
                  "auth_mode": {
                    "type": "boolean"
                  },
                  "bot_id": {
                    "type": "boolean"
                  },
                  "created_at": {
                    "type": "boolean"
                  },
                  "event_timestamp": {
                    "type": "boolean"
                  },
                  "execution_time_ms": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "boolean"
                  },
                  "metadata": {
                    "type": "boolean"
                  },
                  "guest": {
                    "type": "boolean"
                  },
                  "organization_id": {
                    "type": "boolean"
                  },
                  "processing_time_ms": {
                    "type": "boolean"
                  },
                  "project_id": {
                    "type": "boolean"
                  },
                  "room_name": {
                    "type": "boolean"
                  },
                  "source_service": {
                    "type": "boolean"
                  },
                  "speed": {
                    "type": "boolean"
                  },
                  "thread_id": {
                    "type": "boolean"
                  },
                  "updated_at": {
                    "type": "boolean"
                  },
                  "user_id": {
                    "type": "boolean"
                  },
                  "total_price_local": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "agent_id",
                    "api_key_id",
                    "auth_mode",
                    "bot_id",
                    "created_at",
                    "event_timestamp",
                    "execution_time_ms",
                    "id",
                    "metadata",
                    "guest",
                    "organization_id",
                    "processing_time_ms",
                    "project_id",
                    "room_name",
                    "source_service",
                    "speed",
                    "thread_id",
                    "updated_at",
                    "user_id",
                    "total_price_local"
                  ],
                  "example": "agent_id"
                },
                "uniqueItems": true
              }
            ],
            "title": "UsageRequest.Fields"
          },
          "include": {
            "title": "UsageRequest.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/UsageRequest.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<UsageRequest>"
      },
      "ApiKey.Filter": {
        "type": "object",
        "title": "ApiKey.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "created_at": {
                    "type": "boolean"
                  },
                  "hint": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "boolean"
                  },
                  "key": {
                    "type": "boolean"
                  },
                  "last_used_at": {
                    "type": "boolean"
                  },
                  "name": {
                    "type": "boolean"
                  },
                  "user_id": {
                    "type": "boolean"
                  },
                  "organization_id": {
                    "type": "boolean"
                  },
                  "project_id": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "created_at",
                    "hint",
                    "id",
                    "key",
                    "last_used_at",
                    "name",
                    "user_id",
                    "organization_id",
                    "project_id"
                  ],
                  "example": "created_at"
                },
                "uniqueItems": true
              }
            ],
            "title": "ApiKey.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<ApiKey>"
      },
      "ApiKey.Filter1": {
        "type": "object",
        "title": "ApiKey.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "ApiKey.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "created_at": {
                    "type": "boolean"
                  },
                  "hint": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "boolean"
                  },
                  "key": {
                    "type": "boolean"
                  },
                  "last_used_at": {
                    "type": "boolean"
                  },
                  "name": {
                    "type": "boolean"
                  },
                  "user_id": {
                    "type": "boolean"
                  },
                  "organization_id": {
                    "type": "boolean"
                  },
                  "project_id": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "created_at",
                    "hint",
                    "id",
                    "key",
                    "last_used_at",
                    "name",
                    "user_id",
                    "organization_id",
                    "project_id"
                  ],
                  "example": "created_at"
                },
                "uniqueItems": true
              }
            ],
            "title": "ApiKey.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<ApiKey>"
      },
      "CreditTransactions.ScopeFilter": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "uniqueItems": true
              }
            ]
          },
          "include": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": false,
        "title": "CreditTransactions.ScopeFilter"
      },
      "CreditTransactions.IncludeFilter.Items": {
        "title": "CreditTransactions.IncludeFilter.Items",
        "type": "object",
        "properties": {
          "relation": {
            "type": "string",
            "enum": [
              "user",
              "organization"
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/CreditTransactions.ScopeFilter"
          }
        }
      },
      "CreditTransactions.Filter": {
        "type": "object",
        "title": "CreditTransactions.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "CreditTransactions.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "boolean"
                  },
                  "created_at": {
                    "type": "boolean"
                  },
                  "currency": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "boolean"
                  },
                  "metadata": {
                    "type": "boolean"
                  },
                  "organization_id": {
                    "type": "boolean"
                  },
                  "description": {
                    "type": "boolean"
                  },
                  "user_id": {
                    "type": "boolean"
                  },
                  "type": {
                    "type": "boolean"
                  },
                  "source": {
                    "type": "boolean"
                  },
                  "user": {
                    "type": "boolean"
                  },
                  "organization": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "amount",
                    "created_at",
                    "currency",
                    "id",
                    "metadata",
                    "organization_id",
                    "description",
                    "user_id",
                    "type",
                    "source",
                    "user",
                    "organization"
                  ],
                  "example": "amount"
                },
                "uniqueItems": true
              }
            ],
            "title": "CreditTransactions.Fields"
          },
          "include": {
            "title": "CreditTransactions.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CreditTransactions.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<CreditTransactions>"
      },
      "HealthResponse": {
        "type": "object",
        "title": "HealthResponse",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "healthy",
              "unhealthy"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "services": {
            "type": "object",
            "properties": {
              "mysql": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "healthy",
                      "unhealthy"
                    ]
                  },
                  "latency_ms": {
                    "type": "number"
                  },
                  "error": {
                    "type": "string"
                  }
                }
              },
              "redis": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "healthy",
                      "unhealthy"
                    ]
                  },
                  "latency_ms": {
                    "type": "number"
                  },
                  "error": {
                    "type": "string"
                  }
                }
              },
              "rabbitmq": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "healthy",
                      "unhealthy"
                    ]
                  },
                  "latency_ms": {
                    "type": "number"
                  },
                  "error": {
                    "type": "string"
                  }
                }
              },
              "chromadb": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "healthy",
                      "unhealthy"
                    ]
                  },
                  "latency_ms": {
                    "type": "number"
                  },
                  "error": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "Model.ScopeFilter": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "uniqueItems": true
              }
            ]
          },
          "include": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": false,
        "title": "Model.ScopeFilter"
      },
      "Model.IncludeFilter.Items": {
        "title": "Model.IncludeFilter.Items",
        "type": "object",
        "properties": {
          "relation": {
            "type": "string",
            "enum": [
              "pricing_rules"
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/Model.ScopeFilter"
          }
        }
      },
      "Model.Filter": {
        "type": "object",
        "title": "Model.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "Model.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "created_at": {
                    "type": "boolean"
                  },
                  "description": {
                    "type": "boolean"
                  },
                  "group": {
                    "type": "boolean"
                  },
                  "name": {
                    "type": "boolean"
                  },
                  "provider": {
                    "type": "boolean"
                  },
                  "type": {
                    "type": "boolean"
                  },
                  "execution_type": {
                    "type": "boolean"
                  },
                  "alias": {
                    "type": "boolean"
                  },
                  "unit": {
                    "type": "boolean"
                  },
                  "updated_at": {
                    "type": "boolean"
                  },
                  "status": {
                    "type": "boolean"
                  },
                  "parameters": {
                    "type": "boolean"
                  },
                  "architecture": {
                    "type": "boolean"
                  },
                  "capabilities": {
                    "type": "boolean"
                  },
                  "credential_key": {
                    "type": "boolean"
                  },
                  "hidden": {
                    "type": "boolean"
                  },
                  "deprecated": {
                    "type": "boolean"
                  },
                  "experimental": {
                    "type": "boolean"
                  },
                  "priority": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "created_at",
                    "description",
                    "group",
                    "name",
                    "provider",
                    "type",
                    "execution_type",
                    "alias",
                    "unit",
                    "updated_at",
                    "status",
                    "parameters",
                    "architecture",
                    "capabilities",
                    "credential_key",
                    "hidden",
                    "deprecated",
                    "experimental",
                    "priority"
                  ],
                  "example": "created_at"
                },
                "uniqueItems": true
              }
            ],
            "title": "Model.Fields"
          },
          "include": {
            "title": "Model.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Model.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<Model>"
      },
      "StructuredAnalysis.Filter": {
        "type": "object",
        "title": "StructuredAnalysis.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "StructuredAnalysis.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "organization_id": {
                    "type": "boolean"
                  },
                  "project_id": {
                    "type": "boolean"
                  },
                  "user_id": {
                    "type": "boolean"
                  },
                  "name": {
                    "type": "boolean"
                  },
                  "description": {
                    "type": "boolean"
                  },
                  "model": {
                    "type": "boolean"
                  },
                  "schema": {
                    "type": "boolean"
                  },
                  "status": {
                    "type": "boolean"
                  },
                  "metadata": {
                    "type": "boolean"
                  },
                  "created_at": {
                    "type": "boolean"
                  },
                  "updated_at": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "organization_id",
                    "project_id",
                    "user_id",
                    "name",
                    "description",
                    "model",
                    "schema",
                    "status",
                    "metadata",
                    "created_at",
                    "updated_at"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "StructuredAnalysis.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<StructuredAnalysis>"
      },
      "Thread.ScopeFilter": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "uniqueItems": true
              }
            ]
          },
          "include": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": false,
        "title": "Thread.ScopeFilter"
      },
      "Thread.IncludeFilter.Items": {
        "title": "Thread.IncludeFilter.Items",
        "type": "object",
        "properties": {
          "relation": {
            "type": "string",
            "enum": [
              "usage_requests"
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/Thread.ScopeFilter"
          }
        }
      },
      "Thread.Filter": {
        "type": "object",
        "title": "Thread.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "Thread.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "organization_id": {
                    "type": "boolean"
                  },
                  "project_id": {
                    "type": "boolean"
                  },
                  "user_id": {
                    "type": "boolean"
                  },
                  "agent_id": {
                    "type": "boolean"
                  },
                  "history": {
                    "type": "boolean"
                  },
                  "deleted_at": {
                    "type": "boolean"
                  },
                  "created_at": {
                    "type": "boolean"
                  },
                  "updated_at": {
                    "type": "boolean"
                  },
                  "additional_instructions": {
                    "type": "boolean"
                  },
                  "vars": {
                    "type": "boolean"
                  },
                  "post_analysis": {
                    "type": "boolean"
                  },
                  "agent_snapshot": {
                    "type": "boolean"
                  },
                  "title": {
                    "type": "boolean"
                  },
                  "status": {
                    "type": "boolean"
                  },
                  "triggered": {
                    "type": "boolean"
                  },
                  "identifier": {
                    "type": "boolean"
                  },
                  "uid": {
                    "type": "boolean"
                  },
                  "is_shared": {
                    "type": "boolean"
                  },
                  "share_token": {
                    "type": "boolean"
                  },
                  "shared_at": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "organization_id",
                    "project_id",
                    "user_id",
                    "agent_id",
                    "history",
                    "deleted_at",
                    "created_at",
                    "updated_at",
                    "additional_instructions",
                    "vars",
                    "post_analysis",
                    "agent_snapshot",
                    "title",
                    "status",
                    "triggered",
                    "identifier",
                    "uid",
                    "is_shared",
                    "share_token",
                    "shared_at"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "Thread.Fields"
          },
          "include": {
            "title": "Thread.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Thread.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<Thread>"
      },
      "VoiceParams": {
        "title": "VoiceParams",
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name",
          "key",
          "languages"
        ],
        "additionalProperties": false
      },
      "WebhookEventLog.Filter": {
        "type": "object",
        "title": "WebhookEventLog.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "WebhookEventLog.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "webhook_id": {
                    "type": "boolean"
                  },
                  "payload": {
                    "type": "boolean"
                  },
                  "status": {
                    "type": "boolean"
                  },
                  "attempts": {
                    "type": "boolean"
                  },
                  "last_error": {
                    "type": "boolean"
                  },
                  "response_code": {
                    "type": "boolean"
                  },
                  "response_body": {
                    "type": "boolean"
                  },
                  "next_retry_at": {
                    "type": "boolean"
                  },
                  "created_at": {
                    "type": "boolean"
                  },
                  "updated_at": {
                    "type": "boolean"
                  },
                  "event": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "webhook_id",
                    "payload",
                    "status",
                    "attempts",
                    "last_error",
                    "response_code",
                    "response_body",
                    "next_retry_at",
                    "created_at",
                    "updated_at",
                    "event"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "WebhookEventLog.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<WebhookEventLog>"
      },
      "Webhook.Filter": {
        "type": "object",
        "title": "Webhook.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "organization_id": {
                    "type": "boolean"
                  },
                  "project_id": {
                    "type": "boolean"
                  },
                  "events": {
                    "type": "boolean"
                  },
                  "target_url": {
                    "type": "boolean"
                  },
                  "secret": {
                    "type": "boolean"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "retries": {
                    "type": "boolean"
                  },
                  "created_at": {
                    "type": "boolean"
                  },
                  "updated_at": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "organization_id",
                    "project_id",
                    "events",
                    "target_url",
                    "secret",
                    "is_active",
                    "retries",
                    "created_at",
                    "updated_at"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "Webhook.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<Webhook>"
      },
      "Webhook.Filter1": {
        "type": "object",
        "title": "Webhook.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "Webhook.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "organization_id": {
                    "type": "boolean"
                  },
                  "project_id": {
                    "type": "boolean"
                  },
                  "events": {
                    "type": "boolean"
                  },
                  "target_url": {
                    "type": "boolean"
                  },
                  "secret": {
                    "type": "boolean"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "retries": {
                    "type": "boolean"
                  },
                  "created_at": {
                    "type": "boolean"
                  },
                  "updated_at": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "organization_id",
                    "project_id",
                    "events",
                    "target_url",
                    "secret",
                    "is_active",
                    "retries",
                    "created_at",
                    "updated_at"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "Webhook.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<Webhook>"
      }
    },
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "api-key"
      }
    }
  },
  "security": [
    {
      "jwt": [],
      "ApiKeyAuth": []
    }
  ]
}